run prettier on all files
This commit is contained in:
@@ -1,78 +1,78 @@
|
||||
export const availableLanguages = [
|
||||
'ar',
|
||||
'ar_SA',
|
||||
'hy',
|
||||
'az',
|
||||
'eu',
|
||||
'be',
|
||||
'bn_BD',
|
||||
'bs',
|
||||
'bg_BG',
|
||||
'ca',
|
||||
'zh_CN',
|
||||
'zh_TW',
|
||||
'hr',
|
||||
'cs',
|
||||
'da',
|
||||
'dv',
|
||||
'nl',
|
||||
'en_CA',
|
||||
'en_GB',
|
||||
'et',
|
||||
'fo',
|
||||
'fi',
|
||||
'fr_FR',
|
||||
'gd',
|
||||
'gl',
|
||||
'ka_GE',
|
||||
'de',
|
||||
'de_AT',
|
||||
'el',
|
||||
'he_IL',
|
||||
'hi_IN',
|
||||
'hu_HU',
|
||||
'is_IS',
|
||||
'id',
|
||||
'it',
|
||||
'ja',
|
||||
'kab',
|
||||
'kk',
|
||||
'km_KH',
|
||||
'ko_KR',
|
||||
'ku',
|
||||
'ku_IQ',
|
||||
'lv',
|
||||
'lt',
|
||||
'lb',
|
||||
'ml',
|
||||
'ml_IN',
|
||||
'mn_MN',
|
||||
'nb_NO',
|
||||
'fa',
|
||||
'fa_IR',
|
||||
'pl',
|
||||
'pt_BR',
|
||||
'pt_PT',
|
||||
'ro',
|
||||
'ru',
|
||||
'sr',
|
||||
'si_LK',
|
||||
'sk',
|
||||
'sl_SI',
|
||||
'es',
|
||||
'es_MX',
|
||||
'sv_SE',
|
||||
'tg',
|
||||
'ta',
|
||||
'ta_IN',
|
||||
'tt',
|
||||
'th_TH',
|
||||
'tr',
|
||||
'tr_TR',
|
||||
'ug',
|
||||
'uk',
|
||||
'uk_UA',
|
||||
'vi',
|
||||
'vi_VN',
|
||||
'cy',
|
||||
];
|
||||
'ar',
|
||||
'ar_SA',
|
||||
'hy',
|
||||
'az',
|
||||
'eu',
|
||||
'be',
|
||||
'bn_BD',
|
||||
'bs',
|
||||
'bg_BG',
|
||||
'ca',
|
||||
'zh_CN',
|
||||
'zh_TW',
|
||||
'hr',
|
||||
'cs',
|
||||
'da',
|
||||
'dv',
|
||||
'nl',
|
||||
'en_CA',
|
||||
'en_GB',
|
||||
'et',
|
||||
'fo',
|
||||
'fi',
|
||||
'fr_FR',
|
||||
'gd',
|
||||
'gl',
|
||||
'ka_GE',
|
||||
'de',
|
||||
'de_AT',
|
||||
'el',
|
||||
'he_IL',
|
||||
'hi_IN',
|
||||
'hu_HU',
|
||||
'is_IS',
|
||||
'id',
|
||||
'it',
|
||||
'ja',
|
||||
'kab',
|
||||
'kk',
|
||||
'km_KH',
|
||||
'ko_KR',
|
||||
'ku',
|
||||
'ku_IQ',
|
||||
'lv',
|
||||
'lt',
|
||||
'lb',
|
||||
'ml',
|
||||
'ml_IN',
|
||||
'mn_MN',
|
||||
'nb_NO',
|
||||
'fa',
|
||||
'fa_IR',
|
||||
'pl',
|
||||
'pt_BR',
|
||||
'pt_PT',
|
||||
'ro',
|
||||
'ru',
|
||||
'sr',
|
||||
'si_LK',
|
||||
'sk',
|
||||
'sl_SI',
|
||||
'es',
|
||||
'es_MX',
|
||||
'sv_SE',
|
||||
'tg',
|
||||
'ta',
|
||||
'ta_IN',
|
||||
'tt',
|
||||
'th_TH',
|
||||
'tr',
|
||||
'tr_TR',
|
||||
'ug',
|
||||
'uk',
|
||||
'uk_UA',
|
||||
'vi',
|
||||
'vi_VN',
|
||||
'cy',
|
||||
];
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface MetaCollectionView {
|
||||
export interface ConditionsCollectionView {
|
||||
/**
|
||||
* Type of entity this collection view should be available for
|
||||
*
|
||||
*
|
||||
* @examples ["media"]
|
||||
*/
|
||||
entityType: string;
|
||||
|
||||
@@ -6,7 +6,6 @@ export interface ManifestDashboardCollection extends ManifestBase {
|
||||
conditions: ConditionsDashboardCollection;
|
||||
}
|
||||
|
||||
|
||||
export interface MetaDashboardCollection {
|
||||
/**
|
||||
* The URL path for the dashboard which is used for navigating or deep linking directly to the dashboard
|
||||
@@ -37,7 +36,7 @@ export interface MetaDashboardCollection {
|
||||
export interface ConditionsDashboardCollection {
|
||||
/**
|
||||
* An array of section aliases that the dashboard collection should be available in
|
||||
*
|
||||
*
|
||||
* @uniqueItems true
|
||||
* @examples [
|
||||
* "Umb.Section.Content",
|
||||
|
||||
@@ -32,10 +32,9 @@ export interface MetaEntityBulkAction {
|
||||
}
|
||||
|
||||
export interface ConditionsEntityBulkAction {
|
||||
|
||||
/**
|
||||
* The entity type this action is for
|
||||
*
|
||||
*
|
||||
* @examples [
|
||||
* "document",
|
||||
* "media",
|
||||
|
||||
@@ -11,11 +11,10 @@ export interface ManifestWorkspaceViewCollection
|
||||
meta: MetaEditorViewCollection;
|
||||
}
|
||||
|
||||
|
||||
export interface MetaEditorViewCollection extends MetaManifestWithView {
|
||||
/**
|
||||
* The entity type that this view collection should be available in
|
||||
*
|
||||
*
|
||||
* @examples [
|
||||
* "media"
|
||||
* ]
|
||||
@@ -31,11 +30,10 @@ export interface MetaEditorViewCollection extends MetaManifestWithView {
|
||||
repositoryAlias: string;
|
||||
}
|
||||
|
||||
|
||||
export interface ConditionsEditorViewCollection {
|
||||
/**
|
||||
* The workspaces that this view collection should be available in
|
||||
*
|
||||
*
|
||||
* @examples [
|
||||
* "Umb.Workspace.DataType",
|
||||
* "Umb.Workspace.Dictionary",
|
||||
|
||||
@@ -21,7 +21,10 @@ interface UmbEmbeddedMediaModalModel {
|
||||
}
|
||||
|
||||
@customElement('umb-embedded-media-modal')
|
||||
export class UmbEmbeddedMediaModalElement extends UmbModalBaseElement<UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult> {
|
||||
export class UmbEmbeddedMediaModalElement extends UmbModalBaseElement<
|
||||
UmbEmbeddedMediaModalData,
|
||||
UmbEmbeddedMediaModalResult
|
||||
> {
|
||||
#loading = false;
|
||||
#embedResult!: OEmbedResult;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
// TODO => investigate why exporting CodeEditorLanguage in code-editor barrel
|
||||
// TODO => investigate why exporting CodeEditorLanguage in code-editor barrel
|
||||
// causes the schema generation task to fail... For now, language property below
|
||||
// duplicates the CodeEditorLanguage type
|
||||
export interface UmbCodeEditorModalData {
|
||||
|
||||
@@ -26,12 +26,12 @@ export interface UmbEmbeddedMediaModalResult extends UmbEmbeddedMediaModalData {
|
||||
preview?: string;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
};
|
||||
}
|
||||
|
||||
export const UMB_EMBEDDED_MEDIA_MODAL = new UmbModalToken<UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult>(
|
||||
'Umb.Modal.EmbeddedMedia',
|
||||
{
|
||||
type: 'sidebar',
|
||||
size: 'medium',
|
||||
size: 'medium',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -13,7 +13,8 @@ export default {
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview = ({ value }: any) =>
|
||||
html`<umb-property-editor-ui-tiny-mce-dimensions-configuration .value=${value}></umb-property-editor-ui-tiny-mce-dimensions-configuration>`;
|
||||
html`<umb-property-editor-ui-tiny-mce-dimensions-configuration
|
||||
.value=${value}></umb-property-editor-ui-tiny-mce-dimensions-configuration>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
AAAOverview.args = {
|
||||
value: dataTypeData?.values?.find((x) => x.alias === 'dimensions')?.value,
|
||||
|
||||
@@ -3,19 +3,21 @@ import { UmbPropertyEditorUITinyMceDimensionsConfigurationElement } from './prop
|
||||
import { defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
|
||||
|
||||
describe('UmbPropertyEditorUITinyMceDimensionsConfigurationElement', () => {
|
||||
let element: UmbPropertyEditorUITinyMceDimensionsConfigurationElement;
|
||||
let element: UmbPropertyEditorUITinyMceDimensionsConfigurationElement;
|
||||
|
||||
beforeEach(async () => {
|
||||
element = await fixture(
|
||||
html` <umb-property-editor-ui-tiny-mce-dimensions-configuration></umb-property-editor-ui-tiny-mce-dimensions-configuration> `
|
||||
);
|
||||
});
|
||||
beforeEach(async () => {
|
||||
element = await fixture(
|
||||
html`
|
||||
<umb-property-editor-ui-tiny-mce-dimensions-configuration></umb-property-editor-ui-tiny-mce-dimensions-configuration>
|
||||
`
|
||||
);
|
||||
});
|
||||
|
||||
it('is defined with its own instance', () => {
|
||||
expect(element).to.be.instanceOf(UmbPropertyEditorUITinyMceDimensionsConfigurationElement);
|
||||
});
|
||||
it('is defined with its own instance', () => {
|
||||
expect(element).to.be.instanceOf(UmbPropertyEditorUITinyMceDimensionsConfigurationElement);
|
||||
});
|
||||
|
||||
it('passes the a11y audit', async () => {
|
||||
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
|
||||
});
|
||||
it('passes the a11y audit', async () => {
|
||||
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,7 +7,6 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
*/
|
||||
@customElement('umb-property-editor-ui-tiny-mce-maximagesize-configuration')
|
||||
export class UmbPropertyEditorUITinyMceMaxImageSizeConfigurationElement extends UmbLitElement {
|
||||
|
||||
@property()
|
||||
value?: number;
|
||||
|
||||
|
||||
@@ -3,19 +3,21 @@ import { UmbPropertyEditorUITinyMceMaxImageSizeConfigurationElement } from './pr
|
||||
import { defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
|
||||
|
||||
describe('UmbPropertyEditorUITinyMceMaxImSizeConfigurationElement', () => {
|
||||
let element: UmbPropertyEditorUITinyMceMaxImageSizeConfigurationElement;
|
||||
let element: UmbPropertyEditorUITinyMceMaxImageSizeConfigurationElement;
|
||||
|
||||
beforeEach(async () => {
|
||||
element = await fixture(
|
||||
html` <umb-property-editor-ui-tiny-mce-maximagesize-configuration></umb-property-editor-ui-tiny-mce-maximagesize-configuration> `
|
||||
);
|
||||
});
|
||||
beforeEach(async () => {
|
||||
element = await fixture(
|
||||
html`
|
||||
<umb-property-editor-ui-tiny-mce-maximagesize-configuration></umb-property-editor-ui-tiny-mce-maximagesize-configuration>
|
||||
`
|
||||
);
|
||||
});
|
||||
|
||||
it('is defined with its own instance', () => {
|
||||
expect(element).to.be.instanceOf(UmbPropertyEditorUITinyMceMaxImageSizeConfigurationElement);
|
||||
});
|
||||
it('is defined with its own instance', () => {
|
||||
expect(element).to.be.instanceOf(UmbPropertyEditorUITinyMceMaxImageSizeConfigurationElement);
|
||||
});
|
||||
|
||||
it('passes the a11y audit', async () => {
|
||||
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
|
||||
});
|
||||
it('passes the a11y audit', async () => {
|
||||
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,8 +14,9 @@ export default {
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview = ({ value }: any) =>
|
||||
html`<umb-property-editor-ui-tiny-mce-stylesheets-configuration .value=${value}></umb-property-editor-ui-tiny-mce-stylesheets-configuration>`;
|
||||
html`<umb-property-editor-ui-tiny-mce-stylesheets-configuration
|
||||
.value=${value}></umb-property-editor-ui-tiny-mce-stylesheets-configuration>`;
|
||||
AAAOverview.storyName = 'Overview';
|
||||
AAAOverview.args = {
|
||||
value: dataTypeData?.values?.find(x => x.alias === 'stylesheets')?.value ?? []
|
||||
}
|
||||
value: dataTypeData?.values?.find((x) => x.alias === 'stylesheets')?.value ?? [],
|
||||
};
|
||||
|
||||
@@ -3,19 +3,21 @@ import { UmbPropertyEditorUITinyMceStylesheetsConfigurationElement } from './pro
|
||||
import { defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
|
||||
|
||||
describe('UmbPropertyEditorUITinyMceStylesheetsConfigurationElement', () => {
|
||||
let element: UmbPropertyEditorUITinyMceStylesheetsConfigurationElement;
|
||||
let element: UmbPropertyEditorUITinyMceStylesheetsConfigurationElement;
|
||||
|
||||
beforeEach(async () => {
|
||||
element = await fixture(
|
||||
html` <umb-property-editor-ui-tiny-mce-stylesheets-configuration></umb-property-editor-ui-tiny-mce-stylesheets-configuration> `
|
||||
);
|
||||
});
|
||||
beforeEach(async () => {
|
||||
element = await fixture(
|
||||
html`
|
||||
<umb-property-editor-ui-tiny-mce-stylesheets-configuration></umb-property-editor-ui-tiny-mce-stylesheets-configuration>
|
||||
`
|
||||
);
|
||||
});
|
||||
|
||||
it('is defined with its own instance', () => {
|
||||
expect(element).to.be.instanceOf(UmbPropertyEditorUITinyMceStylesheetsConfigurationElement);
|
||||
});
|
||||
it('is defined with its own instance', () => {
|
||||
expect(element).to.be.instanceOf(UmbPropertyEditorUITinyMceStylesheetsConfigurationElement);
|
||||
});
|
||||
|
||||
it('passes the a11y audit', async () => {
|
||||
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
|
||||
});
|
||||
it('passes the a11y audit', async () => {
|
||||
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -14,10 +14,11 @@ export default {
|
||||
} as Meta;
|
||||
|
||||
export const AAAOverview = ({ value }: any) =>
|
||||
html`<umb-property-editor-ui-tiny-mce-toolbar-configuration .value=${value}></umb-property-editor-ui-tiny-mce-toolbar-configuration>`;
|
||||
html`<umb-property-editor-ui-tiny-mce-toolbar-configuration
|
||||
.value=${value}></umb-property-editor-ui-tiny-mce-toolbar-configuration>`;
|
||||
|
||||
AAAOverview.storyName = 'Overview';
|
||||
AAAOverview.storyName = 'Overview';
|
||||
|
||||
AAAOverview.args = {
|
||||
value: dataTypeData?.values?.find(x => x.alias === 'toolbar')?.value ?? []
|
||||
}
|
||||
AAAOverview.args = {
|
||||
value: dataTypeData?.values?.find((x) => x.alias === 'toolbar')?.value ?? [],
|
||||
};
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import { UUITextStyles, type UUIComboboxListElement } from '@umbraco-cms/backoffice/external/uui';
|
||||
import { PropertyValueMap, css, html, customElement, property, query, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
import {
|
||||
PropertyValueMap,
|
||||
css,
|
||||
html,
|
||||
customElement,
|
||||
property,
|
||||
query,
|
||||
state,
|
||||
} from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
import {
|
||||
OperatorModel,
|
||||
@@ -67,18 +75,17 @@ export class UmbQueryBuilderFilterElement extends UmbLitElement {
|
||||
this.dispatchEvent(new Event('add-filter'));
|
||||
}
|
||||
|
||||
get isFilterValid(): boolean {
|
||||
return Object.keys(this.filter).length === 3 && Object.values(this.filter).every((v) => !!v);
|
||||
}
|
||||
get isFilterValid(): boolean {
|
||||
return Object.keys(this.filter).length === 3 && Object.values(this.filter).every((v) => !!v);
|
||||
}
|
||||
|
||||
protected willUpdate(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
|
||||
if (_changedProperties.has('filter')) {
|
||||
|
||||
if (this.isFilterValid) {
|
||||
this.dispatchEvent(new Event('update-query'));
|
||||
}
|
||||
}
|
||||
}
|
||||
protected willUpdate(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
|
||||
if (_changedProperties.has('filter')) {
|
||||
if (this.isFilterValid) {
|
||||
this.dispatchEvent(new Event('update-query'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private _renderOperatorsDropdown() {
|
||||
return html`<umb-button-with-dropdown look="outline" id="operator-dropdown" label="choose operator">
|
||||
@@ -116,7 +123,7 @@ export class UmbQueryBuilderFilterElement extends UmbLitElement {
|
||||
<span>${this.unremovable ? 'where' : 'and'}</span>
|
||||
<umb-button-with-dropdown look="outline" id="property-alias-dropdown" label="Property alias"
|
||||
>${this.filter?.propertyAlias ?? ''}
|
||||
<uui-combobox-list slot="dropdown" @change=${this.#setPropertyAlias} class="options-list">
|
||||
<uui-combobox-list slot="dropdown" @change=${this.#setPropertyAlias} class="options-list">
|
||||
${this.settings?.properties?.map(
|
||||
(property) =>
|
||||
html`<uui-combobox-list-option tabindex="0" .value=${property.alias ?? ''}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
// TODO => this is NOT a full reimplementation of the existing media helper service, currently
|
||||
// contains only functions referenced by the TinyMCE editor
|
||||
|
||||
import { Editor, EditorEvent } from "tinymce";
|
||||
|
||||
export class UmbMediaHelper {
|
||||
import { Editor, EditorEvent } from 'tinymce';
|
||||
|
||||
export class UmbMediaHelper {
|
||||
/**
|
||||
*
|
||||
* @param editor
|
||||
* @param imageDomElement
|
||||
* @param imgUrl
|
||||
*
|
||||
* @param editor
|
||||
* @param imageDomElement
|
||||
* @param imgUrl
|
||||
*/
|
||||
async sizeImageInEditor(editor: Editor, imageDomElement: HTMLElement, imgUrl?: string) {
|
||||
const size = editor.dom.getSize(imageDomElement);
|
||||
@@ -35,12 +34,12 @@ export class UmbMediaHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param maxSize
|
||||
* @param width
|
||||
* @param height
|
||||
* @returns
|
||||
/**
|
||||
*
|
||||
* @param maxSize
|
||||
* @param width
|
||||
* @param height
|
||||
* @returns
|
||||
*/
|
||||
scaleToMaxSize(maxSize: number, width: number, height: number) {
|
||||
const retval = { width, height };
|
||||
@@ -73,10 +72,10 @@ export class UmbMediaHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param imagePath
|
||||
* @param options
|
||||
* @returns
|
||||
*
|
||||
* @param imagePath
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
async getProcessedImageUrl(imagePath: string, options: any) {
|
||||
if (!options) {
|
||||
@@ -85,14 +84,14 @@ export class UmbMediaHelper {
|
||||
|
||||
// TODO => use backend cli when available
|
||||
const result = await fetch('/umbraco/management/api/v1/images/GetProcessedImageUrl');
|
||||
const url = await result.json() as string;
|
||||
const url = (await result.json()) as string;
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param editor
|
||||
*
|
||||
* @param editor
|
||||
*/
|
||||
async uploadBlobImages(editor: Editor) {
|
||||
const content = editor.getContent();
|
||||
@@ -163,9 +162,9 @@ export class UmbMediaHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param e
|
||||
* @returns
|
||||
*
|
||||
* @param e
|
||||
* @returns
|
||||
*/
|
||||
async onResize(
|
||||
e: EditorEvent<{
|
||||
|
||||
Reference in New Issue
Block a user