Skip to content

Commit 835d67d

Browse files
committed
chore: optimise the path length of the property-editor-ui-image-crops-configuration element
1 parent a6c2c1d commit 835d67d

File tree

9 files changed

+30
-35
lines changed

9 files changed

+30
-35
lines changed

src/packages/media/media/property-editors/image-crops-configuration/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/packages/media/media/property-editors/image-crops-configuration/property-editor-ui-image-crops-configuration.stories.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './property-editor-ui-image-crops.element.js';

src/packages/media/media/property-editors/image-crops-configuration/manifests.ts renamed to src/packages/media/media/property-editors/image-crops/manifests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type { ManifestPropertyEditorUi } from '@umbraco-cms/backoffice/extension
33
export const manifest: ManifestPropertyEditorUi = {
44
type: 'propertyEditorUi',
55
alias: 'Umb.PropertyEditorUi.ImageCropsConfiguration',
6-
name: 'Image Crops Configuration Property Editor UI',
7-
element: () => import('./property-editor-ui-image-crops-configuration.element.js'),
6+
name: 'Image Crops Property Editor UI',
7+
element: () => import('./property-editor-ui-image-crops.element.js'),
88
meta: {
99
label: 'Image Crops Configuration',
1010
icon: 'icon-autofill',
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ export type UmbCrop = {
1313
};
1414

1515
/**
16-
* @element umb-property-editor-ui-image-crops-configuration
16+
* @element umb-property-editor-ui-image-crops
1717
*/
18-
@customElement('umb-property-editor-ui-image-crops-configuration')
19-
export class UmbPropertyEditorUIImageCropsConfigurationElement
20-
extends UmbLitElement
21-
implements UmbPropertyEditorUiElement
22-
{
18+
@customElement('umb-property-editor-ui-image-crops')
19+
export class UmbPropertyEditorUIImageCropsElement extends UmbLitElement implements UmbPropertyEditorUiElement {
2320
@query('#label')
2421
private _labelInput!: HTMLInputElement;
2522

@@ -244,10 +241,10 @@ export class UmbPropertyEditorUIImageCropsConfigurationElement
244241
];
245242
}
246243

247-
export default UmbPropertyEditorUIImageCropsConfigurationElement;
244+
export default UmbPropertyEditorUIImageCropsElement;
248245

249246
declare global {
250247
interface HTMLElementTagNameMap {
251-
'umb-property-editor-ui-image-crops-configuration': UmbPropertyEditorUIImageCropsConfigurationElement;
248+
'umb-property-editor-ui-image-crops': UmbPropertyEditorUIImageCropsElement;
252249
}
253250
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { UmbPropertyEditorUIImageCropsElement } from './property-editor-ui-image-crops.element.js';
2+
import type { Meta, StoryObj } from '@storybook/web-components';
3+
4+
import './property-editor-ui-image-crops.element.js';
5+
6+
const meta: Meta<UmbPropertyEditorUIImageCropsElement> = {
7+
title: 'Property Editor UIs/Image Crops',
8+
id: 'umb-property-editor-ui-image-crops',
9+
component: 'umb-property-editor-ui-image-crops',
10+
};
11+
12+
export default meta;
13+
type Story = StoryObj<UmbPropertyEditorUIImageCropsElement>;
14+
15+
export const Overview: Story = {};
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
import { UmbPropertyEditorUIImageCropsConfigurationElement } from './property-editor-ui-image-crops-configuration.element.js';
1+
import { UmbPropertyEditorUIImageCropsElement } from './property-editor-ui-image-crops.element.js';
22
import { expect, fixture, html } from '@open-wc/testing';
33
import type { UmbTestRunnerWindow } from '@umbraco-cms/internal/test-utils';
44
//import { type UmbTestRunnerWindow, defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
55

6-
describe('UmbPropertyEditorUIImageCropsConfigurationElement', () => {
7-
let element: UmbPropertyEditorUIImageCropsConfigurationElement;
6+
describe('UmbPropertyEditorUIImageCropsElement', () => {
7+
let element: UmbPropertyEditorUIImageCropsElement;
88

99
beforeEach(async () => {
10-
element = await fixture(html`
11-
<umb-property-editor-ui-image-crops-configuration></umb-property-editor-ui-image-crops-configuration>
12-
`);
10+
element = await fixture(html` <umb-property-editor-ui-image-crops-></umb-property-editor-ui-image-crops-> `);
1311
});
1412

1513
it('is defined with its own instance', () => {
16-
expect(element).to.be.instanceOf(UmbPropertyEditorUIImageCropsConfigurationElement);
14+
expect(element).to.be.instanceOf(UmbPropertyEditorUIImageCropsElement);
1715
});
1816

1917
/*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export * from './image-cropper/index.js';
2-
export * from './image-crops-configuration/index.js';
2+
export * from './image-crops/index.js';
33
export * from './media-entity-picker/index.js';
44
export * from './media-picker/index.js';
55
export * from './upload-field/index.js';

src/packages/media/media/property-editors/manifests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { manifest as imageCropsConfiguration } from './image-crops-configuration/manifests.js';
1+
import { manifest as imageCropsConfiguration } from './image-crops/manifests.js';
22
import { manifest as mediaEntityPicker } from './media-entity-picker/manifests.js';
33
import { manifests as imageCropperManifests } from './image-cropper/manifests.js';
44
import { manifests as mediaPickerManifests } from './media-picker/manifests.js';

0 commit comments

Comments
 (0)