@umbraco-cms/backoffice 14.0.0-a0074b6e → 14.0.0-a8030000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/apps/app/app.element.js +4 -1
- package/dist-cms/apps/app/index.d.ts +1 -0
- package/dist-cms/apps/app/index.js +1 -0
- package/dist-cms/apps/backoffice/backoffice.element.js +1 -0
- package/dist-cms/custom-elements.json +173 -140
- package/dist-cms/mocks/browser-handlers.js +2 -0
- package/dist-cms/mocks/data/scripts.data.d.ts +21 -0
- package/dist-cms/mocks/data/scripts.data.js +205 -0
- package/dist-cms/mocks/handlers/scripts.handlers.d.ts +2 -0
- package/dist-cms/mocks/handlers/scripts.handlers.js +83 -0
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.d.ts +1 -1
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +1 -1
- package/dist-cms/packages/core/culture/components/index.d.ts +1 -0
- package/dist-cms/packages/core/culture/components/index.js +1 -0
- package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.js +5 -5
- package/dist-cms/packages/core/culture/index.d.ts +2 -0
- package/dist-cms/packages/core/culture/index.js +2 -0
- package/dist-cms/packages/core/culture/manifests.d.ts +1 -0
- package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.js +1 -1
- package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.d.ts +1 -1
- package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.js +1 -1
- package/dist-cms/packages/core/index.d.ts +1 -0
- package/dist-cms/packages/core/index.js +3 -0
- package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.d.ts +1 -0
- package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.js +37 -4
- package/dist-cms/packages/core/modal/token/property-settings-modal.token.d.ts +5 -2
- package/dist-cms/packages/documents/dashboards/redirect-management/dashboard-redirect-management.element.d.ts +5 -17
- package/dist-cms/packages/documents/dashboards/redirect-management/dashboard-redirect-management.element.js +184 -214
- package/dist-cms/packages/documents/document-types/index.d.ts +1 -0
- package/dist-cms/packages/documents/document-types/index.js +1 -0
- package/dist-cms/packages/documents/document-types/repository/document-type.repository.d.ts +2 -2
- package/dist-cms/packages/documents/document-types/repository/document-type.store.d.ts +2 -2
- package/dist-cms/packages/documents/document-types/repository/index.d.ts +3 -0
- package/dist-cms/packages/documents/document-types/repository/index.js +3 -0
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.js +8 -2
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.js +7 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/dashboard-health-check.element.d.ts +1 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/dashboard-health-check.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check-dashboard.context.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check-dashboard.context.js +1 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check.context.d.ts +3 -3
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check.context.js +4 -4
- package/dist-cms/packages/health-check/index.d.ts +1 -0
- package/dist-cms/packages/health-check/index.js +1 -0
- package/dist-cms/packages/health-check/manifests.d.ts +16 -0
- package/dist-cms/packages/health-check/manifests.js +20 -0
- package/dist-cms/packages/health-check/umbraco-package.d.ts +7 -0
- package/dist-cms/packages/health-check/umbraco-package.js +9 -0
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-action.element.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-action.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group-box-overview.element.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group-box-overview.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group.element.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-overview.element.d.ts +1 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-overview.element.js +3 -3
- package/dist-cms/packages/settings/dashboards/manifests.js +0 -18
- package/dist-cms/packages/settings/manifests.js +0 -2
- package/dist-cms/packages/templating/manifests.js +2 -0
- package/dist-cms/packages/templating/scripts/config.d.ts +20 -0
- package/dist-cms/packages/templating/scripts/config.js +22 -0
- package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.d.ts +8 -0
- package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.js +9 -0
- package/dist-cms/packages/templating/scripts/entity-actions/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/entity-actions/manifests.js +56 -0
- package/dist-cms/packages/templating/scripts/index.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/index.js +2 -0
- package/dist-cms/packages/templating/scripts/manifests.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/manifests.js +12 -0
- package/dist-cms/packages/templating/scripts/menu-item/manifests.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/menu-item/manifests.js +16 -0
- package/dist-cms/packages/templating/scripts/repository/index.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/repository/index.js +1 -0
- package/dist-cms/packages/templating/scripts/repository/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/repository/manifests.js +23 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.repository.d.ts +71 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.repository.js +154 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.store.d.ts +31 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.store.js +37 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.d.ts +19 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.js +21 -0
- package/dist-cms/packages/templating/scripts/repository/sources/index.d.ts +11 -0
- package/dist-cms/packages/templating/scripts/repository/sources/index.js +1 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.d.ts +41 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.js +57 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.d.ts +17 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.js +23 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.d.ts +14 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.js +31 -0
- package/dist-cms/packages/templating/scripts/tree/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/tree/manifests.js +20 -0
- package/dist-cms/packages/templating/scripts/workspace/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/workspace/manifests.js +32 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.d.ts +24 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.js +171 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.d.ts +23 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.js +87 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.d.ts +14 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.js +50 -0
- package/dist-cms/packages/users/current-user/modals/current-user/current-user-modal.element.js +2 -2
- package/dist-cms/shared/auth/auth-flow.js +3 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +86 -72
- package/package.json +3 -2
- package/dist-cms/packages/settings/cultures/components/index.d.ts +0 -1
- package/dist-cms/packages/settings/cultures/components/index.js +0 -1
- package/dist-cms/packages/settings/cultures/manifests.d.ts +0 -1
- package/dist-cms/shared/context/index.d.ts +0 -1
- package/dist-cms/shared/context/index.js +0 -1
- /package/dist-cms/{shared/context → apps/app}/app.context.d.ts +0 -0
- /package/dist-cms/{shared/context → apps/app}/app.context.js +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/manifests.js +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.js +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.js +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const { rest } = window.MockServiceWorker;
|
|
2
|
+
import { umbScriptsData } from '../data/scripts.data.js';
|
|
3
|
+
import { umbracoPath } from '../../shared/utils/index.js';
|
|
4
|
+
const treeHandlers = [
|
|
5
|
+
rest.get(umbracoPath('/tree/script/root'), (req, res, ctx) => {
|
|
6
|
+
const response = umbScriptsData.getTreeRoot();
|
|
7
|
+
return res(ctx.status(200), ctx.json(response));
|
|
8
|
+
}),
|
|
9
|
+
rest.get(umbracoPath('/tree/script/children'), (req, res, ctx) => {
|
|
10
|
+
const path = req.url.searchParams.get('path');
|
|
11
|
+
if (!path)
|
|
12
|
+
return;
|
|
13
|
+
const response = umbScriptsData.getTreeItemChildren(path);
|
|
14
|
+
return res(ctx.status(200), ctx.json(response));
|
|
15
|
+
}),
|
|
16
|
+
rest.get(umbracoPath('/tree/script/item'), (req, res, ctx) => {
|
|
17
|
+
const paths = req.url.searchParams.getAll('paths');
|
|
18
|
+
if (!paths)
|
|
19
|
+
return;
|
|
20
|
+
const items = umbScriptsData.getTreeItem(paths);
|
|
21
|
+
return res(ctx.status(200), ctx.json(items));
|
|
22
|
+
}),
|
|
23
|
+
];
|
|
24
|
+
const detailHandlers = [
|
|
25
|
+
rest.get(umbracoPath('/script'), (req, res, ctx) => {
|
|
26
|
+
const path = decodeURIComponent(req.url.searchParams.get('path') ?? '').replace('-js', '.js');
|
|
27
|
+
if (!path)
|
|
28
|
+
return res(ctx.status(400));
|
|
29
|
+
const response = umbScriptsData.getScript(path);
|
|
30
|
+
return res(ctx.status(200), ctx.json(response));
|
|
31
|
+
}),
|
|
32
|
+
rest.get(umbracoPath('/script/item'), (req, res, ctx) => {
|
|
33
|
+
const path = decodeURIComponent(req.url.searchParams.get('path') ?? '').replace('-js', '.js');
|
|
34
|
+
if (!path)
|
|
35
|
+
return res(ctx.status(400, 'no body found'));
|
|
36
|
+
const response = umbScriptsData.getItem([path]);
|
|
37
|
+
return res(ctx.status(200), ctx.json(response));
|
|
38
|
+
}),
|
|
39
|
+
rest.post(umbracoPath('/script'), async (req, res, ctx) => {
|
|
40
|
+
const requestBody = (await req.json());
|
|
41
|
+
if (!requestBody)
|
|
42
|
+
return res(ctx.status(400, 'no body found'));
|
|
43
|
+
const response = umbScriptsData.insertScript(requestBody);
|
|
44
|
+
return res(ctx.status(200), ctx.json(response));
|
|
45
|
+
}),
|
|
46
|
+
rest.delete(umbracoPath('/script'), (req, res, ctx) => {
|
|
47
|
+
const path = req.url.searchParams.get('path');
|
|
48
|
+
if (!path)
|
|
49
|
+
return res(ctx.status(400));
|
|
50
|
+
const response = umbScriptsData.delete([path]);
|
|
51
|
+
return res(ctx.status(200), ctx.json(response));
|
|
52
|
+
}),
|
|
53
|
+
rest.put(umbracoPath('/script'), async (req, res, ctx) => {
|
|
54
|
+
const requestBody = (await req.json());
|
|
55
|
+
if (!requestBody)
|
|
56
|
+
return res(ctx.status(400, 'no body found'));
|
|
57
|
+
const response = umbScriptsData.updateData(requestBody);
|
|
58
|
+
return res(ctx.status(200));
|
|
59
|
+
}),
|
|
60
|
+
];
|
|
61
|
+
const folderHandlers = [
|
|
62
|
+
rest.get(umbracoPath('script/folder'), (req, res, ctx) => {
|
|
63
|
+
const path = decodeURIComponent(req.url.searchParams.get('path') ?? '').replace('-js', '.js');
|
|
64
|
+
if (!path)
|
|
65
|
+
return res(ctx.status(400));
|
|
66
|
+
const response = umbScriptsData.getFolder(path);
|
|
67
|
+
return res(ctx.status(200), ctx.json(response));
|
|
68
|
+
}),
|
|
69
|
+
rest.post(umbracoPath('script/folder'), (req, res, ctx) => {
|
|
70
|
+
const requestBody = req.json();
|
|
71
|
+
if (!requestBody)
|
|
72
|
+
return res(ctx.status(400, 'no body found'));
|
|
73
|
+
return res(ctx.status(200));
|
|
74
|
+
}),
|
|
75
|
+
rest.delete(umbracoPath('script/folder'), (req, res, ctx) => {
|
|
76
|
+
const path = decodeURIComponent(req.url.searchParams.get('path') ?? '').replace('-js', '.js');
|
|
77
|
+
if (!path)
|
|
78
|
+
return res(ctx.status(400));
|
|
79
|
+
const response = umbScriptsData.deleteFolder(path);
|
|
80
|
+
return res(ctx.status(200), ctx.json(response));
|
|
81
|
+
}),
|
|
82
|
+
];
|
|
83
|
+
export const handlers = [...treeHandlers, ...detailHandlers, ...folderHandlers];
|
package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class UmbContentTypePropertyStructureHelper {
|
|
|
8
8
|
private _containerName?;
|
|
9
9
|
readonly propertyStructure: import("rxjs").Observable<PropertyTypeModelBaseModel[]>;
|
|
10
10
|
constructor(host: UmbControllerHostElement);
|
|
11
|
-
|
|
11
|
+
get ownerDocumentTypes(): import("rxjs").Observable<import("../../../external/backend-api/index.js").DocumentTypeResponseModel[]> | undefined;
|
|
12
12
|
setStructureManager(structure: UmbContentTypePropertyStructureManager): void;
|
|
13
13
|
setContainerType(value?: PropertyContainerTypes): void;
|
|
14
14
|
getContainerType(): PropertyContainerTypes | undefined;
|
|
@@ -15,7 +15,7 @@ export class UmbContentTypePropertyStructureHelper {
|
|
|
15
15
|
// TODO: Remove as any when sortOrder is implemented:
|
|
16
16
|
this.#propertyStructure.sortBy((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0));
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
get ownerDocumentTypes() {
|
|
19
19
|
return this.#structure?.documentTypes;
|
|
20
20
|
}
|
|
21
21
|
setStructureManager(structure) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-culture-select/input-culture-select.element.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-culture-select/input-culture-select.element.js';
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { UmbCultureRepository } from '../../repository/culture.repository.js';
|
|
8
8
|
import { html, repeat, ifDefined, customElement, property, state } from '../../../../../external/lit/index.js';
|
|
9
|
-
import { FormControlMixin
|
|
9
|
+
import { FormControlMixin } from '../../../../../external/uui/index.js';
|
|
10
10
|
import { UmbChangeEvent } from '../../../../../shared/umb-events/index.js';
|
|
11
11
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
12
12
|
export let UmbInputCultureSelectElement = class UmbInputCultureSelectElement extends FormControlMixin(UmbLitElement) {
|
|
@@ -73,10 +73,10 @@ export let UmbInputCultureSelectElement = class UmbInputCultureSelectElement ext
|
|
|
73
73
|
@search=${this.#onSearchChange}>
|
|
74
74
|
<uui-combobox-list>
|
|
75
75
|
${repeat(this.#filteredCultures, (culture) => culture.name, (culture) => html `
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
<uui-combobox-list-option value=${ifDefined(culture.name)}
|
|
77
|
+
>${culture.englishName}</uui-combobox-list-option
|
|
78
|
+
>
|
|
79
|
+
`)}
|
|
80
80
|
</uui-combobox-list>
|
|
81
81
|
</uui-combobox>
|
|
82
82
|
`}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: import("../index.js").ManifestRepository[];
|
package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UmbCultureServerDataSource } from './sources/culture.server.data.js';
|
|
2
2
|
import { UmbContextConsumerController } from '../../../../libs/context-api/index.js';
|
|
3
|
-
import { UMB_NOTIFICATION_CONTEXT_TOKEN } from '
|
|
3
|
+
import { UMB_NOTIFICATION_CONTEXT_TOKEN } from '../../notification/index.js';
|
|
4
4
|
export class UmbCultureRepository {
|
|
5
5
|
#init;
|
|
6
6
|
#host;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ManifestRepository } from '
|
|
1
|
+
import { ManifestRepository } from '../../extension-registry/index.js';
|
|
2
2
|
export declare const CULTURE_REPOSITORY_ALIAS = "Umb.Repository.Culture";
|
|
3
3
|
export declare const manifests: ManifestRepository[];
|
|
@@ -8,6 +8,7 @@ import { manifests as workspaceManifests } from './workspace/manifests.js';
|
|
|
8
8
|
import { manifests as modalManifests } from './modal/common/manifests.js';
|
|
9
9
|
import { manifests as themeManifests } from './themes/manifests.js';
|
|
10
10
|
import { manifests as conditionManifests } from './extension-registry/conditions/manifests.js';
|
|
11
|
+
import { manifests as cultureManifests } from './culture/manifests.js';
|
|
11
12
|
import { UmbNotificationContext, UMB_NOTIFICATION_CONTEXT_TOKEN } from './notification/index.js';
|
|
12
13
|
import { UmbModalManagerContext, UMB_MODAL_MANAGER_CONTEXT_TOKEN } from './modal/index.js';
|
|
13
14
|
import { UmbContextProviderController } from '../../libs/context-api/index.js';
|
|
@@ -35,6 +36,7 @@ export * from './store/index.js';
|
|
|
35
36
|
export * from './tree/index.js';
|
|
36
37
|
export * from './variant/index.js';
|
|
37
38
|
export * from './workspace/index.js';
|
|
39
|
+
export * from './culture/index.js';
|
|
38
40
|
const manifests = [
|
|
39
41
|
...conditionManifests,
|
|
40
42
|
...debugManifests,
|
|
@@ -45,6 +47,7 @@ const manifests = [
|
|
|
45
47
|
...workspaceManifests,
|
|
46
48
|
...modalManifests,
|
|
47
49
|
...themeManifests,
|
|
50
|
+
...cultureManifests,
|
|
48
51
|
];
|
|
49
52
|
export const onInit = (host, extensionRegistry) => {
|
|
50
53
|
new UmbMultiExtensionsClassInitializer(host, ['globalContext', 'store', 'treeStore', 'itemStore']);
|
package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare class UmbPropertySettingsModalElement extends UmbModalBaseElement
|
|
|
5
5
|
#private;
|
|
6
6
|
private _customValidationOptions;
|
|
7
7
|
private _aliasLocked;
|
|
8
|
+
protected _ownerDocumentType?: UmbPropertySettingsModalResult;
|
|
8
9
|
protected _returnData: UmbPropertySettingsModalResult;
|
|
9
10
|
connectedCallback(): void;
|
|
10
11
|
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.js
CHANGED
|
@@ -8,6 +8,7 @@ import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
|
8
8
|
import { css, html, nothing, customElement, state } from '../../../../../external/lit/index.js';
|
|
9
9
|
import { UmbModalBaseElement } from '../../../../../shared/modal/index.js';
|
|
10
10
|
import { generateAlias } from '../../../../../shared/utils/index.js';
|
|
11
|
+
import { UMB_DOCUMENT_TYPE_STORE_CONTEXT_TOKEN } from '../../../../documents/document-types/index.js';
|
|
11
12
|
// TODO: Could base take a token to get its types?.
|
|
12
13
|
// TODO: Missing a workspace context... unless this should not be a workspace any way.
|
|
13
14
|
export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalElement extends UmbModalBaseElement {
|
|
@@ -42,7 +43,14 @@ export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalEleme
|
|
|
42
43
|
}
|
|
43
44
|
connectedCallback() {
|
|
44
45
|
super.connectedCallback();
|
|
45
|
-
|
|
46
|
+
// TODO: This is actually not good enough, we need to be able to get to the DOCUMENT_WORKSPACE_CONTEXT, so we can have a look at the draft/runtime version of the document. Otherwise 'Vary by culture' is first updated when saved.
|
|
47
|
+
this.consumeContext(UMB_DOCUMENT_TYPE_STORE_CONTEXT_TOKEN, (instance) => {
|
|
48
|
+
this.observe(instance.byId(this.data?.documentTypeId), (documentType) => {
|
|
49
|
+
this._ownerDocumentType = documentType;
|
|
50
|
+
this.requestUpdate('_ownerDocumentType');
|
|
51
|
+
}, '_observeDocumentType');
|
|
52
|
+
});
|
|
53
|
+
this._returnData = JSON.parse(JSON.stringify(this.data?.propertyData ?? {}));
|
|
46
54
|
this._returnData.validation ??= {};
|
|
47
55
|
const regEx = this._returnData.validation.regEx ?? null;
|
|
48
56
|
const newlySelected = this._customValidationOptions.find((option) => {
|
|
@@ -93,7 +101,7 @@ export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalEleme
|
|
|
93
101
|
this._returnData.alias = alias;
|
|
94
102
|
}
|
|
95
103
|
else {
|
|
96
|
-
this._returnData.alias = this.data?.alias;
|
|
104
|
+
this._returnData.alias = this.data?.propertyData?.alias;
|
|
97
105
|
}
|
|
98
106
|
this.requestUpdate('_returnData');
|
|
99
107
|
}
|
|
@@ -155,6 +163,10 @@ export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalEleme
|
|
|
155
163
|
this._returnData.validation.regExMessage = event.target.value.toString();
|
|
156
164
|
this.requestUpdate('_returnData');
|
|
157
165
|
}
|
|
166
|
+
#onVaryByCultureChange(event) {
|
|
167
|
+
this._returnData.variesByCulture = event.target.checked;
|
|
168
|
+
this.requestUpdate('_returnData');
|
|
169
|
+
}
|
|
158
170
|
// TODO: This would conceptually be a Property Editor Workspace, should be changed at one point in the future.
|
|
159
171
|
// For now this is hacky made available by giving the element an fixed alias.
|
|
160
172
|
// This would allow for workspace views and workspace actions.
|
|
@@ -204,6 +216,7 @@ export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalEleme
|
|
|
204
216
|
${this.#renderCustomValidation()}
|
|
205
217
|
</div>
|
|
206
218
|
<hr />
|
|
219
|
+
${this.#renderVariationControls()}
|
|
207
220
|
<div class="container">
|
|
208
221
|
<b style="margin-bottom: var(--uui-size-space-3)">Appearance</b>
|
|
209
222
|
<div id="appearances">${this.#renderAlignLeftIcon()} ${this.#renderAlignTopIcon()}</div>
|
|
@@ -252,13 +265,13 @@ export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalEleme
|
|
|
252
265
|
<uui-toggle
|
|
253
266
|
@change=${this.#onMandatoryChange}
|
|
254
267
|
id="mandatory"
|
|
255
|
-
|
|
268
|
+
.checked=${this._returnData.validation?.mandatory ?? false}
|
|
256
269
|
slot="editor"></uui-toggle>
|
|
257
270
|
</div>
|
|
258
271
|
${this._returnData.validation?.mandatory
|
|
259
272
|
? html `<uui-input
|
|
260
273
|
name="mandatory-message"
|
|
261
|
-
value=${this._returnData.validation?.mandatoryMessage}
|
|
274
|
+
value=${this._returnData.validation?.mandatoryMessage ?? ''}
|
|
262
275
|
@change=${this.#onMandatoryMessageChange}
|
|
263
276
|
style="margin-top: var(--uui-size-space-1)"
|
|
264
277
|
id="mandatory-message"
|
|
@@ -285,6 +298,23 @@ export let UmbPropertySettingsModalElement = class UmbPropertySettingsModalEleme
|
|
|
285
298
|
`
|
|
286
299
|
: nothing} `;
|
|
287
300
|
}
|
|
301
|
+
#renderVariationControls() {
|
|
302
|
+
return this._ownerDocumentType?.variesByCulture || this._ownerDocumentType?.variesBySegment ?
|
|
303
|
+
html `
|
|
304
|
+
<div class="container">
|
|
305
|
+
<b>Variation</b>
|
|
306
|
+
${this._ownerDocumentType?.variesByCulture ? this.#renderVaryByCulture() : ''}
|
|
307
|
+
</div>
|
|
308
|
+
<hr />`
|
|
309
|
+
: '';
|
|
310
|
+
}
|
|
311
|
+
#renderVaryByCulture() {
|
|
312
|
+
return html `<uui-toggle
|
|
313
|
+
@change=${this.#onVaryByCultureChange}
|
|
314
|
+
.checked=${this._returnData.variesByCulture ?? false}
|
|
315
|
+
label="Vary by culture"></uui-toggle>
|
|
316
|
+
`;
|
|
317
|
+
}
|
|
288
318
|
static { this.styles = [
|
|
289
319
|
UmbTextStyles,
|
|
290
320
|
css `
|
|
@@ -423,6 +453,9 @@ __decorate([
|
|
|
423
453
|
__decorate([
|
|
424
454
|
state()
|
|
425
455
|
], UmbPropertySettingsModalElement.prototype, "_aliasLocked", void 0);
|
|
456
|
+
__decorate([
|
|
457
|
+
state()
|
|
458
|
+
], UmbPropertySettingsModalElement.prototype, "_ownerDocumentType", void 0);
|
|
426
459
|
__decorate([
|
|
427
460
|
state()
|
|
428
461
|
], UmbPropertySettingsModalElement.prototype, "_returnData", void 0);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { PropertyTypeModelBaseModel } from '../../../../external/backend-api/index.js';
|
|
2
2
|
import { UmbModalToken } from '../index.js';
|
|
3
|
-
export type UmbPropertySettingsModalData =
|
|
3
|
+
export type UmbPropertySettingsModalData = {
|
|
4
|
+
documentTypeId: string;
|
|
5
|
+
propertyData: PropertyTypeModelBaseModel;
|
|
6
|
+
};
|
|
4
7
|
export type UmbPropertySettingsModalResult = PropertyTypeModelBaseModel;
|
|
5
|
-
export declare const UMB_PROPERTY_SETTINGS_MODAL: UmbModalToken<
|
|
8
|
+
export declare const UMB_PROPERTY_SETTINGS_MODAL: UmbModalToken<UmbPropertySettingsModalData, PropertyTypeModelBaseModel>;
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
2
2
|
export declare class UmbDashboardRedirectManagementElement extends UmbLitElement {
|
|
3
|
+
#private;
|
|
3
4
|
itemsPerPage: number;
|
|
5
|
+
page: number;
|
|
6
|
+
private _trackerEnabled;
|
|
7
|
+
private _total;
|
|
4
8
|
private _redirectData?;
|
|
5
|
-
private _trackerStatus;
|
|
6
|
-
private _currentPage;
|
|
7
|
-
private _total?;
|
|
8
9
|
private _buttonState;
|
|
9
10
|
private _filter?;
|
|
10
|
-
private
|
|
11
|
+
private _search;
|
|
11
12
|
private _pagination?;
|
|
12
13
|
private _modalContext?;
|
|
13
14
|
constructor();
|
|
14
15
|
connectedCallback(): void;
|
|
15
|
-
private _getTrackerStatus;
|
|
16
|
-
private _removeRedirectHandler;
|
|
17
|
-
private _removeRedirect;
|
|
18
|
-
private _disableRedirectHandler;
|
|
19
|
-
private _toggleRedirect;
|
|
20
|
-
private _inputHandler;
|
|
21
|
-
private _searchHandler;
|
|
22
|
-
private _onPageChange;
|
|
23
|
-
private _getRedirectData;
|
|
24
16
|
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
-
private _renderZeroResults;
|
|
26
|
-
private renderNoRedirects;
|
|
27
|
-
private renderTable;
|
|
28
|
-
private _renderPagination;
|
|
29
17
|
static styles: import("@lit/reactive-element/css-tag").CSSResult[];
|
|
30
18
|
}
|
|
31
19
|
export default UmbDashboardRedirectManagementElement;
|