From c0d82eb210704cad052e93bbef8c5f876bfb88ab Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Fri, 30 Sep 2022 15:23:52 +0200 Subject: [PATCH] move textarea and textbox + align naming --- .../entity-property/entity-propery.stories.ts | 2 +- .../property-editor-ui-text-box.element.ts} | 8 ++++---- .../property-editor-ui-text-box.stories.ts | 15 +++++++++++++++ .../property-editor-ui-textarea.element.ts} | 8 ++++---- .../property-editor-ui-textarea.stories.ts | 15 +++++++++++++++ .../property-editor-config.stories.ts | 2 +- .../text/property-editor-text.stories.ts | 15 --------------- .../textarea/property-editor-textarea.stories.ts | 15 --------------- .../src/mocks/data/data-type.data.ts | 2 +- .../src/temp-internal-manifests/index.ts | 4 ++-- .../temp-internal-manifests/property-editor-ui.ts | 7 +++---- 11 files changed, 46 insertions(+), 47 deletions(-) rename src/Umbraco.Web.UI.Client/src/backoffice/{property-editors/text/property-editor-text.element.ts => property-editor-uis/text-box/property-editor-ui-text-box.element.ts} (74%) create mode 100644 src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.stories.ts rename src/Umbraco.Web.UI.Client/src/backoffice/{property-editors/textarea/property-editor-textarea.element.ts => property-editor-uis/textarea/property-editor-ui-textarea.element.ts} (76%) create mode 100644 src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.stories.ts delete mode 100644 src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.stories.ts delete mode 100644 src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.stories.ts diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-propery.stories.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-propery.stories.ts index 7c4796f6c9..f0e4721217 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-propery.stories.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/entity-property/entity-propery.stories.ts @@ -15,6 +15,6 @@ export const AAAOverview: Story = () => label="Property" description="Description" alias="textProperty" - property-editor-ui-alias="Umb.PropertyEditorUI.Text" + property-editor-ui-alias="Umb.PropertyEditorUI.TextBox" .value="${'Hello'}">`; AAAOverview.storyName = 'Overview'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.element.ts similarity index 74% rename from src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.element.ts rename to src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.element.ts index c67cc20595..4ea729ad37 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.element.ts @@ -2,8 +2,8 @@ import { css, html, LitElement } from 'lit'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { customElement, property } from 'lit/decorators.js'; -@customElement('umb-property-editor-text') -export class UmbPropertyEditorTextElement extends LitElement { +@customElement('umb-property-editor-ui-text-box') +export class UmbPropertyEditorUITextBoxElement extends LitElement { static styles = [ UUITextStyles, css` @@ -29,10 +29,10 @@ export class UmbPropertyEditorTextElement extends LitElement { } } -export default UmbPropertyEditorTextElement; +export default UmbPropertyEditorUITextBoxElement; declare global { interface HTMLElementTagNameMap { - 'umb-property-editor-text': UmbPropertyEditorTextElement; + 'umb-property-editor-ui-text-box': UmbPropertyEditorUITextBoxElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.stories.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.stories.ts new file mode 100644 index 0000000000..a636a73f31 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/text-box/property-editor-ui-text-box.stories.ts @@ -0,0 +1,15 @@ +import { Meta, Story } from '@storybook/web-components'; +import { html } from 'lit-html'; + +import type { UmbPropertyEditorUITextBoxElement } from './property-editor-ui-text-box.element'; +import './property-editor-ui-text-box.element'; + +export default { + title: 'Property Editor UIs/Text Box', + component: 'umb-property-editor-ui-text-box', + id: 'umb-property-editor-ui-text-box', +} as Meta; + +export const AAAOverview: Story = () => + html` `; +AAAOverview.storyName = 'Overview'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.element.ts similarity index 76% rename from src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.element.ts rename to src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.element.ts index 22f149043d..595ccadce4 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.element.ts @@ -2,8 +2,8 @@ import { css, html, LitElement } from 'lit'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { customElement, property } from 'lit/decorators.js'; -@customElement('umb-property-editor-textarea') -export class UmbPropertyEditorTextareaElement extends LitElement { +@customElement('umb-property-editor-ui-textarea') +export class UmbPropertyEditorUITextareaElement extends LitElement { static styles = [ UUITextStyles, css` @@ -30,10 +30,10 @@ export class UmbPropertyEditorTextareaElement extends LitElement { } } -export default UmbPropertyEditorTextareaElement; +export default UmbPropertyEditorUITextareaElement; declare global { interface HTMLElementTagNameMap { - 'umb-property-editor-textarea': UmbPropertyEditorTextareaElement; + 'umb-property-editor-ui-textarea': UmbPropertyEditorUITextareaElement; } } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.stories.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.stories.ts new file mode 100644 index 0000000000..49cfb72302 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/backoffice/property-editor-uis/textarea/property-editor-ui-textarea.stories.ts @@ -0,0 +1,15 @@ +import { Meta, Story } from '@storybook/web-components'; +import { html } from 'lit-html'; + +import type { UmbPropertyEditorUITextareaElement } from './property-editor-ui-textarea.element'; +import './property-editor-ui-textarea.element'; + +export default { + title: 'Property Editor UIs/Textarea', + component: 'umb-property-editor-ui-textarea', + id: 'umb-property-editor-ui-textarea', +} as Meta; + +export const AAAOverview: Story = () => + html` `; +AAAOverview.storyName = 'Overview'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/shared/property-editor-config/property-editor-config.stories.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/shared/property-editor-config/property-editor-config.stories.ts index e467d25273..85e2f7a2df 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/shared/property-editor-config/property-editor-config.stories.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/shared/property-editor-config/property-editor-config.stories.ts @@ -20,6 +20,6 @@ const data = [ export const AAAOverview: Story = () => html``; AAAOverview.storyName = 'Overview'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.stories.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.stories.ts deleted file mode 100644 index bf3048c69e..0000000000 --- a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/text/property-editor-text.stories.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Meta, Story } from '@storybook/web-components'; -import { html } from 'lit-html'; - -import type { UmbPropertyEditorTextElement } from './property-editor-text.element'; -import './property-editor-text.element'; - -export default { - title: 'Property Editors/Text', - component: 'umb-property-editor-text', - id: 'umb-property-editor-text', -} as Meta; - -export const AAAOverview: Story = () => - html` `; -AAAOverview.storyName = 'Overview'; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.stories.ts b/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.stories.ts deleted file mode 100644 index f5248754a4..0000000000 --- a/src/Umbraco.Web.UI.Client/src/backoffice/property-editors/textarea/property-editor-textarea.stories.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Meta, Story } from '@storybook/web-components'; -import { html } from 'lit-html'; - -import type { UmbPropertyEditorTextareaElement } from './property-editor-textarea.element'; -import './property-editor-textarea.element'; - -export default { - title: 'Property Editors/Textarea', - component: 'umb-property-editor-textarea', - id: 'umb-property-editor-textarea', -} as Meta; - -export const AAAOverview: Story = () => - html` `; -AAAOverview.storyName = 'Overview'; diff --git a/src/Umbraco.Web.UI.Client/src/mocks/data/data-type.data.ts b/src/Umbraco.Web.UI.Client/src/mocks/data/data-type.data.ts index 5bd9bbd006..141c11296d 100644 --- a/src/Umbraco.Web.UI.Client/src/mocks/data/data-type.data.ts +++ b/src/Umbraco.Web.UI.Client/src/mocks/data/data-type.data.ts @@ -26,7 +26,7 @@ export const data: Array = [ hasChildren: false, icon: 'umb:autofill', propertyEditorAlias: 'Umbraco.TextBox', - propertyEditorUIAlias: 'Umb.PropertyEditorUI.Text', + propertyEditorUIAlias: 'Umb.PropertyEditorUI.TextBox', data: [ { alias: 'maxChars', diff --git a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts index 25dd130953..a8053a574a 100644 --- a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts +++ b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/index.ts @@ -257,7 +257,7 @@ export const internalManifests: Array Promise import('../backoffice/property-actions/copy/property-action-copy.element'), meta: { - propertyEditors: ['Umb.PropertyEditorUI.Text'], + propertyEditors: ['Umb.PropertyEditorUI.TextBox'], }, }, { @@ -267,7 +267,7 @@ export const internalManifests: Array Promise import('../backoffice/property-actions/clear/property-action-clear.element'), meta: { - propertyEditors: ['Umb.PropertyEditorUI.Text'], + propertyEditors: ['Umb.PropertyEditorUI.TextBox'], }, }, { diff --git a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/property-editor-ui.ts b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/property-editor-ui.ts index 6d095dfb4c..ff1f011fcb 100644 --- a/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/property-editor-ui.ts +++ b/src/Umbraco.Web.UI.Client/src/temp-internal-manifests/property-editor-ui.ts @@ -39,9 +39,9 @@ export const manifests: Array Promise import('../backoffice/property-editors/text/property-editor-text.element'), + loader: () => import('../backoffice/property-editor-uis/text-box/property-editor-ui-text-box.element'), meta: { label: 'Text', icon: 'umb:edit', @@ -53,8 +53,7 @@ export const manifests: Array Promise import('../backoffice/property-editors/textarea/property-editor-textarea.element'), + loader: () => import('../backoffice/property-editor-uis/textarea/property-editor-ui-textarea.element'), meta: { label: 'Textarea', icon: 'umb:edit',