chore: optimise the path length of the property-editor-ui-image-crops-configuration element

This commit is contained in:
Jacob Overgaard
2024-07-03 16:02:17 +02:00
parent f4e171a796
commit d662aa0fcd
9 changed files with 30 additions and 35 deletions

View File

@@ -1 +0,0 @@
export * from './property-editor-ui-image-crops-configuration.element.js';

View File

@@ -1,15 +0,0 @@
import type { UmbPropertyEditorUIImageCropsConfigurationElement } from './property-editor-ui-image-crops-configuration.element.js';
import type { Meta, Story } from '@storybook/web-components';
import { html } from '@umbraco-cms/backoffice/external/lit';
import './property-editor-ui-image-crops-configuration.element.js';
export default {
title: 'Property Editor UIs/Image Crops Configuration',
component: 'umb-property-editor-ui-image-crops-configuration',
id: 'umb-property-editor-ui-image-crops-configuration',
} as Meta;
export const AAAOverview: Story<UmbPropertyEditorUIImageCropsConfigurationElement> = () =>
html`<umb-property-editor-ui-image-crops-configuration></umb-property-editor-ui-image-crops-configuration>`;
AAAOverview.storyName = 'Overview';

View File

@@ -0,0 +1 @@
export * from './property-editor-ui-image-crops.element.js';

View File

@@ -3,8 +3,8 @@ import type { ManifestPropertyEditorUi } from '@umbraco-cms/backoffice/extension
export const manifest: ManifestPropertyEditorUi = {
type: 'propertyEditorUi',
alias: 'Umb.PropertyEditorUi.ImageCropsConfiguration',
name: 'Image Crops Configuration Property Editor UI',
element: () => import('./property-editor-ui-image-crops-configuration.element.js'),
name: 'Image Crops Property Editor UI',
element: () => import('./property-editor-ui-image-crops.element.js'),
meta: {
label: 'Image Crops Configuration',
icon: 'icon-autofill',

View File

@@ -13,13 +13,10 @@ export type UmbCrop = {
};
/**
* @element umb-property-editor-ui-image-crops-configuration
* @element umb-property-editor-ui-image-crops
*/
@customElement('umb-property-editor-ui-image-crops-configuration')
export class UmbPropertyEditorUIImageCropsConfigurationElement
extends UmbLitElement
implements UmbPropertyEditorUiElement
{
@customElement('umb-property-editor-ui-image-crops')
export class UmbPropertyEditorUIImageCropsElement extends UmbLitElement implements UmbPropertyEditorUiElement {
@query('#label')
private _labelInput!: HTMLInputElement;
@@ -244,10 +241,10 @@ export class UmbPropertyEditorUIImageCropsConfigurationElement
];
}
export default UmbPropertyEditorUIImageCropsConfigurationElement;
export default UmbPropertyEditorUIImageCropsElement;
declare global {
interface HTMLElementTagNameMap {
'umb-property-editor-ui-image-crops-configuration': UmbPropertyEditorUIImageCropsConfigurationElement;
'umb-property-editor-ui-image-crops': UmbPropertyEditorUIImageCropsElement;
}
}

View File

@@ -0,0 +1,15 @@
import type { UmbPropertyEditorUIImageCropsElement } from './property-editor-ui-image-crops.element.js';
import type { Meta, StoryObj } from '@storybook/web-components';
import './property-editor-ui-image-crops.element.js';
const meta: Meta<UmbPropertyEditorUIImageCropsElement> = {
title: 'Property Editor UIs/Image Crops',
id: 'umb-property-editor-ui-image-crops',
component: 'umb-property-editor-ui-image-crops',
};
export default meta;
type Story = StoryObj<UmbPropertyEditorUIImageCropsElement>;
export const Overview: Story = {};

View File

@@ -1,19 +1,17 @@
import { UmbPropertyEditorUIImageCropsConfigurationElement } from './property-editor-ui-image-crops-configuration.element.js';
import { UmbPropertyEditorUIImageCropsElement } from './property-editor-ui-image-crops.element.js';
import { expect, fixture, html } from '@open-wc/testing';
import type { UmbTestRunnerWindow } from '@umbraco-cms/internal/test-utils';
//import { type UmbTestRunnerWindow, defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
describe('UmbPropertyEditorUIImageCropsConfigurationElement', () => {
let element: UmbPropertyEditorUIImageCropsConfigurationElement;
describe('UmbPropertyEditorUIImageCropsElement', () => {
let element: UmbPropertyEditorUIImageCropsElement;
beforeEach(async () => {
element = await fixture(html`
<umb-property-editor-ui-image-crops-configuration></umb-property-editor-ui-image-crops-configuration>
`);
element = await fixture(html` <umb-property-editor-ui-image-crops-></umb-property-editor-ui-image-crops-> `);
});
it('is defined with its own instance', () => {
expect(element).to.be.instanceOf(UmbPropertyEditorUIImageCropsConfigurationElement);
expect(element).to.be.instanceOf(UmbPropertyEditorUIImageCropsElement);
});
/*

View File

@@ -1,5 +1,5 @@
export * from './image-cropper/index.js';
export * from './image-crops-configuration/index.js';
export * from './image-crops/index.js';
export * from './media-entity-picker/index.js';
export * from './media-picker/index.js';
export * from './upload-field/index.js';

View File

@@ -1,4 +1,4 @@
import { manifest as imageCropsConfiguration } from './image-crops-configuration/manifests.js';
import { manifest as imageCropsConfiguration } from './image-crops/manifests.js';
import { manifest as mediaEntityPicker } from './media-entity-picker/manifests.js';
import { manifests as imageCropperManifests } from './image-cropper/manifests.js';
import { manifests as mediaPickerManifests } from './media-picker/manifests.js';