@umbraco-cms/backoffice 14.3.1 → 14.3.2
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/backoffice/components/backoffice-main.element.d.ts +1 -1
- package/dist-cms/apps/preview/apps/preview-culture.element.d.ts +1 -1
- package/dist-cms/apps/preview/preview.element.d.ts +1 -1
- package/dist-cms/libs/localization-api/localization.controller.d.ts +11 -3
- package/dist-cms/libs/localization-api/localization.controller.js +24 -8
- package/dist-cms/mocks/data/user/user.db.js +4 -1
- package/dist-cms/mocks/data/user-group/user-group.db.d.ts +3 -0
- package/dist-cms/mocks/data/user-group/user-group.db.js +8 -0
- package/dist-cms/packages/block/block/workspace/block-workspace-editor.element.d.ts +1 -1
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts +1 -1
- package/dist-cms/packages/block/block-grid/workspace/views/block-grid-type-workspace-view-areas.element.d.ts +1 -1
- package/dist-cms/packages/core/auth/auth-flow.js +1 -1
- package/dist-cms/packages/core/auth/auth.context.js +2 -1
- package/dist-cms/packages/core/auth/auth.context.token.d.ts +0 -2
- package/dist-cms/packages/core/auth/auth.context.token.js +0 -2
- package/dist-cms/packages/core/auth/constants.d.ts +1 -0
- package/dist-cms/packages/core/auth/constants.js +1 -0
- package/dist-cms/packages/core/auth/index.d.ts +1 -0
- package/dist-cms/packages/core/auth/index.js +1 -0
- package/dist-cms/packages/core/collection/components/collection-selection-actions.element.d.ts +1 -1
- package/dist-cms/packages/core/collection/components/collection-view-bundle.element.d.ts +1 -1
- package/dist-cms/packages/core/collection/components/pagination/collection-pagination.element.d.ts +1 -1
- package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.d.ts +1 -1
- package/dist-cms/packages/core/components/input-collection-configuration/input-collection-configuration.element.d.ts +1 -1
- package/dist-cms/packages/core/components/input-radio-button-list/input-radio-button-list.element.d.ts +1 -1
- package/dist-cms/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.d.ts +1 -1
- package/dist-cms/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.d.ts +1 -1
- package/dist-cms/packages/core/content-type/workspace/views/design/content-type-design-editor.element.d.ts +1 -1
- package/dist-cms/packages/core/debug/debug.element.d.ts +1 -1
- package/dist-cms/packages/core/modal/common/item-picker/item-picker-modal.element.d.ts +1 -1
- package/dist-cms/packages/core/picker/search/picker-search-field.element.d.ts +1 -1
- package/dist-cms/packages/core/picker/search/picker-search-result.element.d.ts +1 -1
- package/dist-cms/packages/core/picker/search/result-item/default/default-picker-search-result-item.element.d.ts +1 -1
- package/dist-cms/packages/core/property-action/components/property-action-menu/property-action-menu.element.d.ts +1 -1
- package/dist-cms/packages/core/section/section-main-views/section-main-views.element.d.ts +1 -1
- package/dist-cms/packages/core/tree/entity-actions/duplicate-to/modal/duplicate-to-modal.element.d.ts +1 -1
- package/dist-cms/packages/core/tree/tree-menu-item-default/tree-menu-item-default.element.d.ts +1 -1
- package/dist-cms/packages/core/utils/index.d.ts +1 -0
- package/dist-cms/packages/core/utils/index.js +1 -0
- package/dist-cms/packages/core/utils/path/stored-path.function.d.ts +1 -0
- package/dist-cms/packages/core/utils/path/stored-path.function.js +1 -1
- package/dist-cms/packages/core/utils/sanitize/escape-html.function.d.ts +7 -0
- package/dist-cms/packages/core/utils/sanitize/escape-html.function.js +27 -0
- package/dist-cms/packages/core/workspace/components/workspace-action-menu/workspace-action-menu.element.d.ts +1 -1
- package/dist-cms/packages/core/workspace/components/workspace-collection/workspace-view-collection.element.d.ts +1 -1
- package/dist-cms/packages/core/workspace/components/workspace-entity-action-menu/workspace-entity-action-menu.element.d.ts +1 -1
- package/dist-cms/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.d.ts +1 -1
- package/dist-cms/packages/core/workspace/workspace.element.d.ts +1 -1
- package/dist-cms/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.js +1 -5
- package/dist-cms/packages/documents/document-blueprints/workspace/document-blueprint-workspace-split-view.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/collection/views/table/column-layouts/document-table-column-name.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/collection/views/table/document-table-collection-view.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/entity-actions/duplicate/modal/duplicate-document-modal.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/modals/shared/document-variant-language-picker.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/search/document-search-result-item.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/workspace/document-workspace-split-view.element.d.ts +1 -1
- package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-reference.element.d.ts +1 -1
- package/dist-cms/packages/health-check/views/health-check-group.element.d.ts +1 -1
- package/dist-cms/packages/language/collection/views/table/column-layouts/boolean/language-table-boolean-column-layout.element.d.ts +1 -1
- package/dist-cms/packages/language/collection/views/table/column-layouts/entity-actions/language-table-entity-actions-column-layout.element.d.ts +1 -1
- package/dist-cms/packages/language/collection/views/table/column-layouts/name/language-table-name-column-layout.element.d.ts +1 -1
- package/dist-cms/packages/media/media/collection/views/grid/media-grid-collection-view.element.d.ts +1 -1
- package/dist-cms/packages/media/media/collection/views/table/column-layouts/media-table-column-name.element.d.ts +1 -1
- package/dist-cms/packages/media/media/collection/views/table/media-table-collection-view.element.d.ts +1 -1
- package/dist-cms/packages/media/media/components/input-image-cropper/image-cropper-focus-setter.element.d.ts +1 -1
- package/dist-cms/packages/media/media/property-editors/image-cropper/property-editor-ui-image-cropper.element.d.ts +1 -1
- package/dist-cms/packages/media/media/workspace/media-workspace-split-view.element.d.ts +1 -1
- package/dist-cms/packages/members/member/workspace/member-workspace-split-view.element.d.ts +1 -1
- package/dist-cms/packages/packages/package-builder/workspace/workspace-package-builder.element.d.ts +1 -1
- package/dist-cms/packages/property-editors/checkbox-list/components/input-checkbox-list/input-checkbox-list.element.d.ts +1 -1
- package/dist-cms/packages/search/examine-management-dashboard/modal/fields-viewer/examine-fields-viewer-modal.element.d.ts +1 -1
- package/dist-cms/packages/search/search-result/search-result-item.element.d.ts +1 -1
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.element.d.ts +1 -1
- package/dist-cms/packages/templating/stylesheets/workspace/stylesheet-workspace-editor.element.d.ts +1 -1
- package/dist-cms/packages/tiny-mce/property-editors/block/property-editor-ui-block-rte-type-configuration.element.d.ts +1 -1
- package/dist-cms/packages/user/current-user/theme/current-user-theme-user-profile-app.element.d.ts +1 -1
- package/dist-cms/packages/user/user/collection/views/grid/user-grid-collection-view.element.d.ts +1 -1
- package/dist-cms/packages/user/user/workspace/components/user-workspace-info/user-workspace-info.element.d.ts +1 -1
- package/dist-cms/packages/user/user-group/workspace/user-group-workspace-editor.element.d.ts +1 -1
- package/dist-cms/packages/webhook/collection/views/table/column-layouts/content-type/webhook-table-name-column-layout.element.d.ts +1 -1
- package/dist-cms/packages/webhook/collection/views/table/column-layouts/name/webhook-table-name-column-layout.element.d.ts +1 -1
- package/dist-cms/packages/webhook/workspace/webhook/views/webhook-details-workspace-view.element.d.ts +1 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package-schema.json +1832 -25
- package/dist-cms/umbraco-package.json +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export declare class UmbBackofficeMainElement extends UmbLitElement {
|
|
|
10
10
|
private _createRoutes;
|
|
11
11
|
private _onRouteChange;
|
|
12
12
|
private _provideSectionContext;
|
|
13
|
-
render(): import("lit-html").TemplateResult<1
|
|
13
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
14
14
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
15
15
|
}
|
|
16
16
|
declare global {
|
|
@@ -6,7 +6,7 @@ export declare class UmbPreviewCultureElement extends UmbLitElement {
|
|
|
6
6
|
private _culture?;
|
|
7
7
|
private _cultures;
|
|
8
8
|
connectedCallback(): void;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1
|
|
9
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
10
10
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
11
11
|
}
|
|
12
12
|
export { UmbPreviewCultureElement as element };
|
|
@@ -11,7 +11,7 @@ export declare class UmbPreviewElement extends UmbLitElement {
|
|
|
11
11
|
disconnectedCallback(): void;
|
|
12
12
|
private _iframeReady?;
|
|
13
13
|
private _previewUrl?;
|
|
14
|
-
render(): import("lit-html").TemplateResult<1
|
|
14
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
15
15
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
16
16
|
}
|
|
17
17
|
export default UmbPreviewElement;
|
|
@@ -39,8 +39,9 @@ export declare class UmbLocalizationController<LocalizationSetType extends UmbLo
|
|
|
39
39
|
private getLocalizationData;
|
|
40
40
|
/**
|
|
41
41
|
* Outputs a translated term.
|
|
42
|
-
* @param key
|
|
43
|
-
* @param {...any} args
|
|
42
|
+
* @param {string} key - the localization key, the indicator of what localization entry you want to retrieve.
|
|
43
|
+
* @param {...any} args - the arguments to parse for this localization entry.
|
|
44
|
+
* @returns {string} - the translated term as a string.
|
|
44
45
|
*/
|
|
45
46
|
term<K extends keyof LocalizationSetType>(key: K, ...args: FunctionParams<LocalizationSetType[K]>): string;
|
|
46
47
|
/**
|
|
@@ -62,5 +63,12 @@ export declare class UmbLocalizationController<LocalizationSetType extends UmbLo
|
|
|
62
63
|
* @param options
|
|
63
64
|
*/
|
|
64
65
|
relativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, options?: Intl.RelativeTimeFormatOptions): string;
|
|
65
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Translates a string containing one or more terms. The terms should be prefixed with a `#` character.
|
|
68
|
+
* If the term is found in the localization set, it will be replaced with the localized term.
|
|
69
|
+
* If the term is not found, the original term will be returned.
|
|
70
|
+
* @param {string} text The text to translate.
|
|
71
|
+
* @returns {string} The translated text.
|
|
72
|
+
*/
|
|
73
|
+
string(text: unknown): string;
|
|
66
74
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { umbLocalizationManager } from './localization.manager.js';
|
|
2
|
+
import { escapeHTML } from '../../packages/core/utils/index.js';
|
|
2
3
|
const LocalizationControllerAlias = Symbol();
|
|
3
4
|
/**
|
|
4
5
|
* The UmbLocalizeController enables localization for your element.
|
|
@@ -74,37 +75,42 @@ export class UmbLocalizationController {
|
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Outputs a translated term.
|
|
77
|
-
* @param key
|
|
78
|
-
* @param {...any} args
|
|
78
|
+
* @param {string} key - the localization key, the indicator of what localization entry you want to retrieve.
|
|
79
|
+
* @param {...any} args - the arguments to parse for this localization entry.
|
|
80
|
+
* @returns {string} - the translated term as a string.
|
|
79
81
|
*/
|
|
80
82
|
term(key, ...args) {
|
|
81
83
|
if (!this.#usedKeys.includes(key)) {
|
|
82
84
|
this.#usedKeys.push(key);
|
|
83
85
|
}
|
|
84
86
|
const { primary, secondary } = this.getLocalizationData(this.lang());
|
|
87
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
88
|
let term;
|
|
86
89
|
// Look for a matching term using regionCode, code, then the fallback
|
|
87
|
-
if (primary
|
|
90
|
+
if (primary?.[key]) {
|
|
88
91
|
term = primary[key];
|
|
89
92
|
}
|
|
90
|
-
else if (secondary
|
|
93
|
+
else if (secondary?.[key]) {
|
|
91
94
|
term = secondary[key];
|
|
92
95
|
}
|
|
93
|
-
else if (umbLocalizationManager.fallback
|
|
96
|
+
else if (umbLocalizationManager.fallback?.[key]) {
|
|
94
97
|
term = umbLocalizationManager.fallback[key];
|
|
95
98
|
}
|
|
96
99
|
else {
|
|
97
100
|
return String(key);
|
|
98
101
|
}
|
|
102
|
+
// As translated texts can contain HTML, we will need to render with unsafeHTML.
|
|
103
|
+
// But arguments can come from user input, so they should be escaped.
|
|
104
|
+
const sanitizedArgs = args.map((a) => escapeHTML(a));
|
|
99
105
|
if (typeof term === 'function') {
|
|
100
|
-
return term(...
|
|
106
|
+
return term(...sanitizedArgs);
|
|
101
107
|
}
|
|
102
108
|
if (typeof term === 'string') {
|
|
103
|
-
if (
|
|
109
|
+
if (sanitizedArgs.length) {
|
|
104
110
|
// Replace placeholders of format "%index%" and "{index}" with provided values
|
|
105
111
|
term = term.replace(/(%(\d+)%|\{(\d+)\})/g, (match, _p1, p2, p3) => {
|
|
106
112
|
const index = p2 || p3;
|
|
107
|
-
return String(
|
|
113
|
+
return typeof sanitizedArgs[index] !== 'undefined' ? String(sanitizedArgs[index]) : match;
|
|
108
114
|
});
|
|
109
115
|
}
|
|
110
116
|
}
|
|
@@ -137,7 +143,17 @@ export class UmbLocalizationController {
|
|
|
137
143
|
relativeTime(value, unit, options) {
|
|
138
144
|
return new Intl.RelativeTimeFormat(this.lang(), options).format(value, unit);
|
|
139
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Translates a string containing one or more terms. The terms should be prefixed with a `#` character.
|
|
148
|
+
* If the term is found in the localization set, it will be replaced with the localized term.
|
|
149
|
+
* If the term is not found, the original term will be returned.
|
|
150
|
+
* @param {string} text The text to translate.
|
|
151
|
+
* @returns {string} The translated text.
|
|
152
|
+
*/
|
|
140
153
|
string(text) {
|
|
154
|
+
if (typeof text !== 'string') {
|
|
155
|
+
return '';
|
|
156
|
+
}
|
|
141
157
|
// find all words starting with #
|
|
142
158
|
const regex = /#\w+/g;
|
|
143
159
|
const localizedText = text.replace(regex, (match) => {
|
|
@@ -35,6 +35,9 @@ class UmbUserMockDB extends UmbEntityMockDbBase {
|
|
|
35
35
|
getCurrentUser() {
|
|
36
36
|
const firstUser = this.data[0];
|
|
37
37
|
const permissions = firstUser.userGroupIds?.length ? umbUserGroupMockDb.getPermissions(firstUser.userGroupIds) : [];
|
|
38
|
+
const fallbackPermissions = firstUser.userGroupIds?.length
|
|
39
|
+
? umbUserGroupMockDb.getFallbackPermissions(firstUser.userGroupIds)
|
|
40
|
+
: [];
|
|
38
41
|
const allowedSections = firstUser.userGroupIds?.length
|
|
39
42
|
? umbUserGroupMockDb.getAllowedSections(firstUser.userGroupIds)
|
|
40
43
|
: [];
|
|
@@ -52,7 +55,7 @@ class UmbUserMockDB extends UmbEntityMockDbBase {
|
|
|
52
55
|
mediaStartNodeIds: firstUser.mediaStartNodeIds,
|
|
53
56
|
hasDocumentRootAccess: firstUser.hasDocumentRootAccess,
|
|
54
57
|
hasMediaRootAccess: firstUser.hasMediaRootAccess,
|
|
55
|
-
fallbackPermissions
|
|
58
|
+
fallbackPermissions,
|
|
56
59
|
permissions,
|
|
57
60
|
allowedSections,
|
|
58
61
|
isAdmin: firstUser.isAdmin,
|
|
@@ -21,6 +21,9 @@ export declare class UmbUserGroupMockDB extends UmbEntityMockDbBase<UmbMockUserG
|
|
|
21
21
|
getPermissions(userGroupIds: Array<{
|
|
22
22
|
id: string;
|
|
23
23
|
}>): Array<DocumentPermissionPresentationModel | UnknownTypePermissionPresentationModel>;
|
|
24
|
+
getFallbackPermissions(userGroupIds: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
}>): Array<string>;
|
|
24
27
|
getAllowedSections(userGroupIds: Array<{
|
|
25
28
|
id: string;
|
|
26
29
|
}>): string[];
|
|
@@ -26,6 +26,14 @@ export class UmbUserGroupMockDB extends UmbEntityMockDbBase {
|
|
|
26
26
|
const uniqueArray = Array.from(new Set(permissions.map((e) => JSON.stringify(e)))).map((e) => JSON.parse(e));
|
|
27
27
|
return uniqueArray;
|
|
28
28
|
}
|
|
29
|
+
getFallbackPermissions(userGroupIds) {
|
|
30
|
+
const permissions = this.data
|
|
31
|
+
.filter((userGroup) => userGroupIds.map((reference) => reference.id).includes(userGroup.id))
|
|
32
|
+
.map((userGroup) => (userGroup.fallbackPermissions?.length ? userGroup.fallbackPermissions : []))
|
|
33
|
+
.flat();
|
|
34
|
+
// Remove duplicates
|
|
35
|
+
return Array.from(new Set(permissions));
|
|
36
|
+
}
|
|
29
37
|
getAllowedSections(userGroupIds) {
|
|
30
38
|
const sections = this.data
|
|
31
39
|
.filter((userGroup) => userGroupIds.map((reference) => reference.id).includes(userGroup.id))
|
|
@@ -4,7 +4,7 @@ export declare class UmbBlockWorkspaceEditorElement extends UmbLitElement {
|
|
|
4
4
|
workspaceAlias?: string;
|
|
5
5
|
constructor();
|
|
6
6
|
_headline: string;
|
|
7
|
-
render(): import("lit-html").TemplateResult<1
|
|
7
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
8
8
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
9
9
|
}
|
|
10
10
|
export default UmbBlockWorkspaceEditorElement;
|
package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare class UmbBlockGridEntryElement extends UmbLitElement implements U
|
|
|
38
38
|
constructor();
|
|
39
39
|
connectedCallback(): void;
|
|
40
40
|
protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
41
|
-
render(): import("lit-html").TemplateResult<1
|
|
41
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
42
42
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
43
43
|
}
|
|
44
44
|
export default UmbBlockGridEntryElement;
|
|
@@ -6,7 +6,7 @@ export declare class UmbBlockGridTypeWorkspaceViewAreasElement extends UmbLitEle
|
|
|
6
6
|
_areaColumnsConfigurationObject?: UmbPropertyEditorConfig;
|
|
7
7
|
_areaConfigConfigurationObject?: UmbPropertyEditorConfig;
|
|
8
8
|
constructor();
|
|
9
|
-
render(): import("lit-html").TemplateResult<1
|
|
9
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
10
10
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
11
11
|
}
|
|
12
12
|
export default UmbBlockGridTypeWorkspaceViewAreasElement;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* License for the specific language governing permissions and limitations under
|
|
14
14
|
* the License.
|
|
15
15
|
*/
|
|
16
|
-
import { UMB_STORAGE_TOKEN_RESPONSE_NAME } from './
|
|
16
|
+
import { UMB_STORAGE_TOKEN_RESPONSE_NAME } from './constants.js';
|
|
17
17
|
import { BaseTokenRequestHandler, BasicQueryStringUtils, FetchRequestor, LocalStorageBackend, RedirectRequestHandler, AuthorizationRequest, AuthorizationNotifier, AuthorizationServiceConfiguration, GRANT_TYPE_AUTHORIZATION_CODE, GRANT_TYPE_REFRESH_TOKEN, RevokeTokenRequest, TokenRequest, TokenResponse, } from '../../../external/openid/index.js';
|
|
18
18
|
import { Subject } from '../../../external/rxjs/index.js';
|
|
19
19
|
const requestor = new FetchRequestor();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UmbAuthFlow } from './auth-flow.js';
|
|
2
|
-
import { UMB_AUTH_CONTEXT
|
|
2
|
+
import { UMB_AUTH_CONTEXT } from './auth.context.token.js';
|
|
3
|
+
import { UMB_STORAGE_TOKEN_RESPONSE_NAME } from './constants.js';
|
|
3
4
|
import { OpenAPI } from '../../../external/backend-api/index.js';
|
|
4
5
|
import { UmbContextBase } from '../../../libs/class-api/index.js';
|
|
5
6
|
import { UmbBooleanState } from '../../../libs/observable-api/index.js';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import type { UmbAuthContext } from './auth.context.js';
|
|
2
2
|
import { UmbContextToken } from '../../../libs/context-api/index.js';
|
|
3
3
|
export declare const UMB_AUTH_CONTEXT: UmbContextToken<UmbAuthContext, UmbAuthContext>;
|
|
4
|
-
export declare const UMB_STORAGE_TOKEN_RESPONSE_NAME = "umb:userAuthTokenResponse";
|
|
5
|
-
export declare const UMB_STORAGE_REDIRECT_URL = "umb:auth:redirect";
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { UmbContextToken } from '../../../libs/context-api/index.js';
|
|
2
2
|
export const UMB_AUTH_CONTEXT = new UmbContextToken('UmbAuthContext');
|
|
3
|
-
export const UMB_STORAGE_TOKEN_RESPONSE_NAME = 'umb:userAuthTokenResponse';
|
|
4
|
-
export const UMB_STORAGE_REDIRECT_URL = 'umb:auth:redirect';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UMB_STORAGE_TOKEN_RESPONSE_NAME = "umb:userAuthTokenResponse";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const UMB_STORAGE_TOKEN_RESPONSE_NAME = 'umb:userAuthTokenResponse';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './components/index.js';
|
|
2
2
|
export * from './auth.context.js';
|
|
3
3
|
export * from './auth.context.token.js';
|
|
4
|
+
export * from './constants.js';
|
|
4
5
|
export * from './modals/index.js';
|
|
5
6
|
export * from './models/openApiConfiguration.js';
|
|
6
7
|
export * from './components/index.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './components/index.js';
|
|
2
2
|
export * from './auth.context.js';
|
|
3
3
|
export * from './auth.context.token.js';
|
|
4
|
+
export * from './constants.js';
|
|
4
5
|
export * from './modals/index.js';
|
|
5
6
|
export * from './models/openApiConfiguration.js';
|
|
6
7
|
export * from './components/index.js';
|
package/dist-cms/packages/core/collection/components/collection-selection-actions.element.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class UmbCollectionSelectionActionsElement extends UmbLitElement
|
|
|
12
12
|
private _handleClearSelection;
|
|
13
13
|
private _observeCollectionContext;
|
|
14
14
|
private _renderSelectionCount;
|
|
15
|
-
render(): import("lit-html").TemplateResult<1
|
|
15
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
16
16
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
17
17
|
}
|
|
18
18
|
declare global {
|
|
@@ -14,7 +14,7 @@ export declare class UmbCollectionViewBundleElement extends UmbLitElement {
|
|
|
14
14
|
private _entityUnique?;
|
|
15
15
|
constructor();
|
|
16
16
|
private _popover?;
|
|
17
|
-
render(): import("lit-html").TemplateResult<1
|
|
17
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
18
18
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
19
19
|
}
|
|
20
20
|
declare global {
|
package/dist-cms/packages/core/collection/components/pagination/collection-pagination.element.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class UmbCollectionPaginationElement extends UmbLitElement {
|
|
|
6
6
|
_currentPage: number;
|
|
7
7
|
private _collectionContext?;
|
|
8
8
|
constructor();
|
|
9
|
-
render(): import("lit-html").TemplateResult<1
|
|
9
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
10
10
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
11
11
|
}
|
|
12
12
|
declare global {
|
package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class UmbEntityActionsBundleElement extends UmbLitElement {
|
|
|
11
11
|
private _firstActionApi?;
|
|
12
12
|
constructor();
|
|
13
13
|
protected updated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
14
|
-
render(): import("lit-html").TemplateResult<1
|
|
14
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
15
15
|
}
|
|
16
16
|
declare global {
|
|
17
17
|
interface HTMLElementTagNameMap {
|
|
@@ -7,7 +7,7 @@ export declare class UmbInputCollectionConfigurationElement extends UmbInputColl
|
|
|
7
7
|
private _dataTypePickerModalPath?;
|
|
8
8
|
defaultValue?: string;
|
|
9
9
|
constructor();
|
|
10
|
-
render(): import("lit-html").TemplateResult<1
|
|
10
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
11
11
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
12
12
|
}
|
|
13
13
|
export default UmbInputCollectionConfigurationElement;
|
|
@@ -18,7 +18,7 @@ export declare class UmbInputRadioButtonListElement extends UmbInputRadioButtonL
|
|
|
18
18
|
*/
|
|
19
19
|
readonly: boolean;
|
|
20
20
|
protected getFormElement(): undefined;
|
|
21
|
-
render(): import("lit-html").TemplateResult<1
|
|
21
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
22
22
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
23
23
|
}
|
|
24
24
|
export default UmbInputRadioButtonListElement;
|
|
@@ -17,7 +17,7 @@ export declare class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitE
|
|
|
17
17
|
_inherited?: boolean;
|
|
18
18
|
_inheritedFrom?: Array<UmbContentTypeModel>;
|
|
19
19
|
_singleValueUpdate(propertyName: string, value: string | number | boolean | null | undefined): void;
|
|
20
|
-
render(): import("lit-html").TemplateResult<1
|
|
20
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
21
21
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
22
22
|
}
|
|
23
23
|
export default UmbContentTypeWorkspaceViewEditGroupElement;
|
|
@@ -33,7 +33,7 @@ export declare class UmbContentTypeDesignEditorPropertyElement extends UmbLitEle
|
|
|
33
33
|
renderEditableProperty(): import("lit-html").TemplateResult<1> | undefined;
|
|
34
34
|
renderSortableProperty(): import("lit-html").TemplateResult<1> | undefined;
|
|
35
35
|
renderPropertyAlias(): import("lit-html").TemplateResult<1> | undefined;
|
|
36
|
-
renderPropertyTags(): import("lit-html").TemplateResult<1
|
|
36
|
+
renderPropertyTags(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
37
37
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
38
38
|
}
|
|
39
39
|
declare global {
|
|
@@ -20,7 +20,7 @@ export declare class UmbContentTypeDesignEditorElement extends UmbLitElement imp
|
|
|
20
20
|
renderAddButton(): import("lit-html").TemplateResult<1> | undefined;
|
|
21
21
|
renderActions(): import("lit-html").TemplateResult<1>;
|
|
22
22
|
renderTabsNavigation(): import("lit-html").TemplateResult<1> | undefined;
|
|
23
|
-
renderRootTab(): import("lit-html").TemplateResult<1
|
|
23
|
+
renderRootTab(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
24
24
|
renderTab(tab: UmbPropertyTypeContainerModel): import("lit-html").TemplateResult<1>;
|
|
25
25
|
renderTabInner(tab: UmbPropertyTypeContainerModel, tabActive: boolean, ownedTab: boolean): import("lit-html").TemplateResult<1>;
|
|
26
26
|
renderDeleteFor(tab: UmbPropertyTypeContainerModel): import("lit-html").TemplateResult<1>;
|
|
@@ -8,7 +8,7 @@ export declare class UmbDebugElement extends UmbLitElement {
|
|
|
8
8
|
private _debugPaneOpen;
|
|
9
9
|
private _modalContext?;
|
|
10
10
|
constructor();
|
|
11
|
-
render(): import("lit-html").TemplateResult<1
|
|
11
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
12
12
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
13
13
|
}
|
|
14
14
|
declare global {
|
|
@@ -5,7 +5,7 @@ export declare class UmbItemPickerModalElement extends UmbModalBaseElement<UmbIt
|
|
|
5
5
|
#private;
|
|
6
6
|
private _filtered;
|
|
7
7
|
connectedCallback(): void;
|
|
8
|
-
render(): import("lit-html").TemplateResult<1
|
|
8
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
9
9
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
10
10
|
}
|
|
11
11
|
export default UmbItemPickerModalElement;
|
|
@@ -7,7 +7,7 @@ export declare class UmbPickerSearchFieldElement extends UmbLitElement {
|
|
|
7
7
|
_searching: boolean;
|
|
8
8
|
_isSearchable: boolean;
|
|
9
9
|
constructor();
|
|
10
|
-
render(): import("lit-html").TemplateResult<1
|
|
10
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
11
11
|
static readonly styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
12
12
|
}
|
|
13
13
|
declare global {
|
|
@@ -10,7 +10,7 @@ export declare class UmbPickerSearchResultElement extends UmbLitElement {
|
|
|
10
10
|
_items: UmbEntityModel[];
|
|
11
11
|
_isSearchable: boolean;
|
|
12
12
|
constructor();
|
|
13
|
-
render(): import("lit-html").TemplateResult<1
|
|
13
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
14
14
|
}
|
|
15
15
|
declare global {
|
|
16
16
|
interface HTMLElementTagNameMap {
|
|
@@ -8,7 +8,7 @@ export declare class UmbDefaultPickerSearchResultItemElement extends UmbLitEleme
|
|
|
8
8
|
set item(value: UmbSearchResultItemModel | undefined);
|
|
9
9
|
_isSelected: boolean;
|
|
10
10
|
constructor();
|
|
11
|
-
render(): import("lit-html").TemplateResult<1
|
|
11
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
12
12
|
static readonly styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
13
13
|
}
|
|
14
14
|
export { UmbDefaultPickerSearchResultItemElement as element };
|
|
@@ -5,7 +5,7 @@ export declare class UmbPropertyActionMenuElement extends UmbLitElement {
|
|
|
5
5
|
private _actions;
|
|
6
6
|
set propertyEditorUiAlias(alias: string);
|
|
7
7
|
get propertyEditorUiAlias(): string;
|
|
8
|
-
render(): import("lit-html").TemplateResult<1
|
|
8
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
9
9
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
10
10
|
}
|
|
11
11
|
declare global {
|
|
@@ -9,7 +9,7 @@ export declare class UmbSectionMainViewElement extends UmbLitElement {
|
|
|
9
9
|
private _activePath?;
|
|
10
10
|
private _routes;
|
|
11
11
|
constructor();
|
|
12
|
-
render(): import("lit-html").TemplateResult<1
|
|
12
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
13
13
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
14
14
|
}
|
|
15
15
|
export default UmbSectionMainViewElement;
|
|
@@ -5,7 +5,7 @@ declare const elementName = "umb-duplicate-to-modal";
|
|
|
5
5
|
export declare class UmbDuplicateToModalElement extends UmbModalBaseElement<UmbDuplicateToModalData, UmbDuplicateToModalValue> {
|
|
6
6
|
#private;
|
|
7
7
|
_destinationUnique?: string | null;
|
|
8
|
-
render(): import("lit-html").TemplateResult<1
|
|
8
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
9
9
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
10
10
|
}
|
|
11
11
|
export { UmbDuplicateToModalElement as element };
|
package/dist-cms/packages/core/tree/tree-menu-item-default/tree-menu-item-default.element.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { UmbLitElement } from '../../lit-element/index.js';
|
|
|
3
3
|
import type { ManifestMenuItemTreeKind, UmbMenuItemElement } from '../../extension-registry/index.js';
|
|
4
4
|
export declare class UmbMenuItemTreeDefaultElement extends UmbLitElement implements UmbMenuItemElement {
|
|
5
5
|
manifest?: ManifestMenuItemTreeKind;
|
|
6
|
-
render(): import("lit-html").TemplateResult<1
|
|
6
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
7
7
|
}
|
|
8
8
|
export default UmbMenuItemTreeDefaultElement;
|
|
9
9
|
declare global {
|
|
@@ -17,6 +17,7 @@ export * from './path/stored-path.function.js';
|
|
|
17
17
|
export * from './path/transform-server-path-to-client-path.function.js';
|
|
18
18
|
export * from './path/umbraco-path.function.js';
|
|
19
19
|
export * from './path/url-pattern-to-string.function.js';
|
|
20
|
+
export * from './sanitize/escape-html.function.js';
|
|
20
21
|
export * from './sanitize/sanitize-html.function.js';
|
|
21
22
|
export * from './selection-manager/selection.manager.js';
|
|
22
23
|
export * from './state-manager/index.js';
|
|
@@ -17,6 +17,7 @@ export * from './path/stored-path.function.js';
|
|
|
17
17
|
export * from './path/transform-server-path-to-client-path.function.js';
|
|
18
18
|
export * from './path/umbraco-path.function.js';
|
|
19
19
|
export * from './path/url-pattern-to-string.function.js';
|
|
20
|
+
export * from './sanitize/escape-html.function.js';
|
|
20
21
|
export * from './sanitize/sanitize-html.function.js';
|
|
21
22
|
export * from './selection-manager/selection.manager.js';
|
|
22
23
|
export * from './state-manager/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ensureLocalPath } from './ensure-local-path.function.js';
|
|
2
|
-
|
|
2
|
+
export const UMB_STORAGE_REDIRECT_URL = 'umb:auth:redirect';
|
|
3
3
|
/**
|
|
4
4
|
* Retrieve the stored path from the session storage.
|
|
5
5
|
* @remark This is used to redirect the user to the correct page after login.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Escapes HTML entities in a string.
|
|
3
|
+
* @example escapeHTML('<script>alert("XSS")</script>'), // "<script>alert("XSS")</script>"
|
|
4
|
+
* @param html The HTML string to escape.
|
|
5
|
+
* @returns The sanitized HTML string.
|
|
6
|
+
*/
|
|
7
|
+
export declare function escapeHTML(html: unknown): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
2
|
+
// Match everything outside of normal chars and " (quote character)
|
|
3
|
+
const NON_ALPHANUMERIC_REGEXP = /([^#-~| |!])/g;
|
|
4
|
+
/**
|
|
5
|
+
* Escapes HTML entities in a string.
|
|
6
|
+
* @example escapeHTML('<script>alert("XSS")</script>'), // "<script>alert("XSS")</script>"
|
|
7
|
+
* @param html The HTML string to escape.
|
|
8
|
+
* @returns The sanitized HTML string.
|
|
9
|
+
*/
|
|
10
|
+
export function escapeHTML(html) {
|
|
11
|
+
if (typeof html !== 'string' && html instanceof String === false) {
|
|
12
|
+
return html;
|
|
13
|
+
}
|
|
14
|
+
return html
|
|
15
|
+
.toString()
|
|
16
|
+
.replace(/&/g, '&')
|
|
17
|
+
.replace(SURROGATE_PAIR_REGEXP, function (value) {
|
|
18
|
+
const hi = value.charCodeAt(0);
|
|
19
|
+
const low = value.charCodeAt(1);
|
|
20
|
+
return '&#' + ((hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000) + ';';
|
|
21
|
+
})
|
|
22
|
+
.replace(NON_ALPHANUMERIC_REGEXP, function (value) {
|
|
23
|
+
return '&#' + value.charCodeAt(0) + ';';
|
|
24
|
+
})
|
|
25
|
+
.replace(/</g, '<')
|
|
26
|
+
.replace(/>/g, '>');
|
|
27
|
+
}
|
|
@@ -9,7 +9,7 @@ export declare class UmbWorkspaceActionMenuElement extends UmbLitElement {
|
|
|
9
9
|
color: UUIInterfaceColor;
|
|
10
10
|
items: Array<UmbExtensionElementAndApiInitializer<ManifestWorkspaceActionMenuItem>>;
|
|
11
11
|
_popoverOpen: boolean;
|
|
12
|
-
render(): import("lit-html").TemplateResult<1
|
|
12
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
13
13
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
14
14
|
}
|
|
15
15
|
declare global {
|
|
@@ -8,7 +8,7 @@ export declare class UmbWorkspaceViewCollectionElement extends UmbLitElement imp
|
|
|
8
8
|
private _collectionAlias?;
|
|
9
9
|
private _documentUnique?;
|
|
10
10
|
constructor();
|
|
11
|
-
render(): import("lit-html").TemplateResult<1
|
|
11
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
12
12
|
}
|
|
13
13
|
export default UmbWorkspaceViewCollectionElement;
|
|
14
14
|
declare global {
|
|
@@ -9,7 +9,7 @@ export declare class UmbWorkspaceEntityActionMenuElement extends UmbLitElement {
|
|
|
9
9
|
private _popover?;
|
|
10
10
|
constructor();
|
|
11
11
|
private _observeInfo;
|
|
12
|
-
render(): import("lit-html").TemplateResult<1
|
|
12
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
13
13
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
14
14
|
}
|
|
15
15
|
declare global {
|
|
@@ -15,7 +15,7 @@ export declare class UmbWorkspaceSplitViewVariantSelectorElement extends UmbLitE
|
|
|
15
15
|
private _variantSelectorOpen;
|
|
16
16
|
private _readOnlyCultures;
|
|
17
17
|
constructor();
|
|
18
|
-
render(): import("lit-html").TemplateResult<1
|
|
18
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
19
19
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
20
20
|
}
|
|
21
21
|
declare global {
|
|
@@ -2,7 +2,7 @@ import { nothing } from '../../../external/lit/index.js';
|
|
|
2
2
|
import { UmbLitElement } from '../lit-element/index.js';
|
|
3
3
|
export declare class UmbWorkspaceElement extends UmbLitElement {
|
|
4
4
|
entityType: string;
|
|
5
|
-
render(): import("lit-html").TemplateResult<1
|
|
5
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
7
7
|
export { UmbWorkspaceElement as element };
|
|
8
8
|
declare global {
|
package/dist-cms/packages/dictionary/workspace/views/workspace-view-dictionary-editor.element.js
CHANGED
|
@@ -10,11 +10,7 @@ import { css, html, customElement, state, repeat } from '../../../../external/li
|
|
|
10
10
|
import { UmbLitElement } from '../../../core/lit-element/index.js';
|
|
11
11
|
import { UmbLanguageCollectionRepository } from '../../../language/index.js';
|
|
12
12
|
import { UMB_CURRENT_USER_CONTEXT } from '../../../user/current-user/index.js';
|
|
13
|
-
import { sanitizeHTML } from '../../../core/utils/index.js';
|
|
14
13
|
let UmbWorkspaceViewDictionaryEditorElement = class UmbWorkspaceViewDictionaryEditorElement extends UmbLitElement {
|
|
15
|
-
get #dictionaryName() {
|
|
16
|
-
return typeof this._dictionary?.name !== 'undefined' ? sanitizeHTML(this._dictionary.name) : '...';
|
|
17
|
-
}
|
|
18
14
|
#languageCollectionRepository;
|
|
19
15
|
#workspaceContext;
|
|
20
16
|
#currentUserContext;
|
|
@@ -74,7 +70,7 @@ let UmbWorkspaceViewDictionaryEditorElement = class UmbWorkspaceViewDictionaryEd
|
|
|
74
70
|
render() {
|
|
75
71
|
return html `
|
|
76
72
|
<uui-box>
|
|
77
|
-
|
|
73
|
+
<umb-localize key="dictionaryItem_description" .args=${[this._dictionary?.name ?? '...']}></umb-localize>
|
|
78
74
|
${repeat(this._languages, (item) => item.unique, (item) => this.#renderTranslation(item))}
|
|
79
75
|
</uui-box>
|
|
80
76
|
`;
|
|
@@ -6,7 +6,7 @@ export declare class UmbDocumentBlueprintWorkspaceSplitViewElement extends UmbLi
|
|
|
6
6
|
_variants?: Array<ActiveVariant>;
|
|
7
7
|
constructor();
|
|
8
8
|
private _observeActiveVariantInfo;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1
|
|
9
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
10
10
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
11
11
|
}
|
|
12
12
|
export default UmbDocumentBlueprintWorkspaceSplitViewElement;
|