@umbraco-cms/backoffice 14.0.0--preview005-2dd3b083 → 14.0.0--preview005-7ef2bd26
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 +19 -15
- package/dist-cms/custom-elements.json +40 -6
- package/dist-cms/libs/element-api/element.mixin.d.ts +3 -3
- package/dist-cms/libs/element-api/element.mixin.js +2 -2
- package/dist-cms/libs/extension-api/registry/extension.registry.d.ts +19 -0
- package/dist-cms/libs/extension-api/registry/extension.registry.js +42 -1
- package/dist-cms/libs/localization-api/index.d.ts +2 -2
- package/dist-cms/libs/localization-api/index.js +2 -2
- package/dist-cms/libs/localization-api/{localize.controller.d.ts → localization.controller.d.ts} +6 -4
- package/dist-cms/libs/localization-api/{localize.controller.js → localization.controller.js} +34 -24
- package/dist-cms/libs/localization-api/localization.manager.d.ts +29 -0
- package/dist-cms/libs/localization-api/localization.manager.js +94 -0
- package/dist-cms/mocks/data/data-type/data-type.data.js +7 -0
- package/dist-cms/mocks/data/document-type/document-type.data.js +26 -0
- package/dist-cms/packages/block/block/workspace/block-workspace.context.js +0 -1
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-group-configuration/manifests.d.ts +2 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-group-configuration/manifests.js +11 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.d.ts +19 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.js +61 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.d.ts +10 -3
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.js +130 -11
- package/dist-cms/packages/block/block-grid/property-editors/manifests.js +8 -1
- package/dist-cms/packages/block/block-grid/types.d.ts +9 -2
- package/dist-cms/packages/block/block-grid/types.js +1 -1
- package/dist-cms/packages/block/block-list/property-editors/block-list-type-configuration/property-editor-ui-block-list-type-configuration.element.d.ts +3 -0
- package/dist-cms/packages/block/block-list/property-editors/block-list-type-configuration/property-editor-ui-block-list-type-configuration.element.js +41 -3
- package/dist-cms/packages/block/block-list/types.d.ts +1 -0
- package/dist-cms/packages/block/block-list/types.js +1 -1
- package/dist-cms/packages/block/block-type/components/index.d.ts +1 -1
- package/dist-cms/packages/block/block-type/components/index.js +1 -1
- package/dist-cms/packages/block/block-type/components/input-block-type/input-block-type.element.d.ts +1 -3
- package/dist-cms/packages/block/block-type/components/input-block-type/input-block-type.element.js +42 -46
- package/dist-cms/packages/block/block-type/workspace/block-type-workspace.context.d.ts +4 -4
- package/dist-cms/packages/block/block-type/workspace/block-type-workspace.context.js +3 -1
- package/dist-cms/packages/block/block-type/workspace/block-type-workspace.element.js +4 -2
- package/dist-cms/packages/core/localization/registry/localization.registry.d.ts +3 -3
- package/dist-cms/packages/core/localization/registry/localization.registry.js +59 -60
- package/dist-cms/packages/core/tree/tree-menu-item-default/tree-menu-item-default.element.js +1 -1
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit.element.js +1 -1
- package/dist-cms/packages/media/media-types/workspace/views/design/media-type-workspace-view-edit.element.js +1 -1
- package/dist-cms/packages/user/current-user/current-user.context.js +2 -7
- package/dist-cms/shared/auth/auth-flow.d.ts +0 -2
- package/dist-cms/shared/auth/auth-flow.js +28 -9
- package/dist-cms/shared/auth/auth.context.d.ts +14 -5
- package/dist-cms/shared/auth/auth.context.js +15 -3
- package/dist-cms/shared/auth/auth.context.token.d.ts +4 -2
- package/dist-cms/shared/auth/auth.context.token.js +2 -0
- package/dist-cms/shared/auth/index.d.ts +0 -1
- package/dist-cms/shared/auth/index.js +0 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +23 -5
- package/package.json +1 -1
- package/dist-cms/libs/localization-api/manager.d.ts +0 -18
- package/dist-cms/libs/localization-api/manager.js +0 -40
- package/dist-cms/shared/auth/auth.context.interface.d.ts +0 -39
- package/dist-cms/shared/auth/auth.context.interface.js +0 -1
|
@@ -211,6 +211,20 @@
|
|
|
211
211
|
}
|
|
212
212
|
]
|
|
213
213
|
},
|
|
214
|
+
{
|
|
215
|
+
"name": "umb-property-editor-ui-block-grid-group-configuration",
|
|
216
|
+
"description": "Events:\n\n * `property-value-change` {`CustomEvent<unknown>`} - \n\nAttributes:\n\n * `value` {`UmbBlockGridGroupType[]`} - \n\nProperties:\n\n * `_value` {`UmbBlockGridGroupType[]`} - \n\n * `value` {`UmbBlockGridGroupType[]`} - \n\n * `config` - \n\n * `styles` {`any[]`} - ",
|
|
217
|
+
"attributes": [
|
|
218
|
+
{
|
|
219
|
+
"name": "value",
|
|
220
|
+
"description": "`value` {`UmbBlockGridGroupType[]`} - \n\nProperty: value"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "onproperty-value-change",
|
|
224
|
+
"description": "`property-value-change` {`CustomEvent<unknown>`} - "
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
214
228
|
{
|
|
215
229
|
"name": "umb-property-editor-ui-block-grid-layout-stylesheet",
|
|
216
230
|
"description": "Events:\n\n * `property-value-change` {`CustomEvent<unknown>`} - \n\nAttributes:\n\n * `value` {`string[]`} - \n\nProperties:\n\n * `_value` {`string[]`} - \n\n * `value` {`string[]`} - \n\n * `config` - \n\n * `styles` {`any[]`} - ",
|
|
@@ -227,7 +241,7 @@
|
|
|
227
241
|
},
|
|
228
242
|
{
|
|
229
243
|
"name": "umb-property-editor-ui-block-grid-type-configuration",
|
|
230
|
-
"description": "Properties:\n\n * `value` {`
|
|
244
|
+
"description": "Properties:\n\n * `_value` {`UmbBlockTypeWithGroupKey[]`} - \n\n * `value` {`UmbBlockTypeWithGroupKey[]`} - \n\n * `config` - \n\n * `_blockGroups` {`UmbBlockGridGroupType[]`} - \n\n * `_mappedValuesAndGroups` {`UmbBlockGridGroupTypeConfiguration[]`} - \n\n * `_workspacePath` {`string | undefined`} - \n\n * `styles` {`any[]`} - \n\n * `#blockTypeWorkspaceModalRegistration` - ",
|
|
231
245
|
"attributes": []
|
|
232
246
|
},
|
|
233
247
|
{
|
|
@@ -278,7 +292,7 @@
|
|
|
278
292
|
},
|
|
279
293
|
{
|
|
280
294
|
"name": "umb-property-editor-ui-block-list-type-configuration",
|
|
281
|
-
"description": "Properties:\n\n * `value` {`UmbBlockTypeBaseModel[]`} - \n\n * `config` - \n\n * `styles` {`any[]`} - ",
|
|
295
|
+
"description": "Properties:\n\n * `_workspacePath` {`string | undefined`} - \n\n * `value` {`UmbBlockTypeBaseModel[]`} - \n\n * `config` - \n\n * `styles` {`any[]`} - \n\n * `#blockTypeWorkspaceModalRegistration` - ",
|
|
282
296
|
"attributes": []
|
|
283
297
|
},
|
|
284
298
|
{
|
|
@@ -298,12 +312,16 @@
|
|
|
298
312
|
},
|
|
299
313
|
{
|
|
300
314
|
"name": "umb-input-block-type",
|
|
301
|
-
"description": "
|
|
315
|
+
"description": "Events:\n\n * `create` {`CustomEvent<{ contentElementTypeKey: any; }>`} - \n\nAttributes:\n\n * `workspacePath` {`string | undefined`} - \n\nProperties:\n\n * `value` {`BlockType[]`} - \n\n * `workspacePath` {`string | undefined`} - \n\n * `_items` {`BlockType[]`} - \n\n * `styles` {`any[]`} - ",
|
|
302
316
|
"attributes": [
|
|
303
317
|
{
|
|
304
|
-
"name": "
|
|
305
|
-
"description": "`
|
|
318
|
+
"name": "workspacePath",
|
|
319
|
+
"description": "`workspacePath` {`string | undefined`} - \n\nProperty: workspacePath",
|
|
306
320
|
"values": []
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "oncreate",
|
|
324
|
+
"description": "`create` {`CustomEvent<{ contentElementTypeKey: any; }>`} - "
|
|
307
325
|
}
|
|
308
326
|
]
|
|
309
327
|
},
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { UmbLocalizationEntry } from './types/localization.js';
|
|
2
|
-
export type FunctionParams<T> = T extends (...args: infer U) => string ? U : [];
|
|
3
|
-
export interface LocalizationSet {
|
|
4
|
-
$code: string;
|
|
5
|
-
$dir: 'ltr' | 'rtl';
|
|
6
|
-
}
|
|
7
|
-
export interface DefaultLocalizationSet extends LocalizationSet {
|
|
8
|
-
[key: string]: UmbLocalizationEntry;
|
|
9
|
-
}
|
|
10
|
-
export declare const connectedElements: Set<HTMLElement>;
|
|
11
|
-
export declare const localizations: Map<string, LocalizationSet>;
|
|
12
|
-
export declare let documentDirection: string;
|
|
13
|
-
export declare let documentLanguage: string;
|
|
14
|
-
export declare let fallback: LocalizationSet;
|
|
15
|
-
/** Registers one or more translations */
|
|
16
|
-
export declare function registerLocalization(...translation: LocalizationSet[]): void;
|
|
17
|
-
/** Updates all localized elements that are currently connected */
|
|
18
|
-
export declare function update(): void;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export const connectedElements = new Set();
|
|
2
|
-
const documentElementObserver = new MutationObserver(update);
|
|
3
|
-
export const localizations = new Map();
|
|
4
|
-
export let documentDirection = document.documentElement.dir || 'ltr';
|
|
5
|
-
export let documentLanguage = document.documentElement.lang || navigator.language;
|
|
6
|
-
export let fallback;
|
|
7
|
-
// Watch for changes on <html lang>
|
|
8
|
-
documentElementObserver.observe(document.documentElement, {
|
|
9
|
-
attributes: true,
|
|
10
|
-
attributeFilter: ['dir', 'lang'],
|
|
11
|
-
});
|
|
12
|
-
/** Registers one or more translations */
|
|
13
|
-
export function registerLocalization(...translation) {
|
|
14
|
-
translation.map((t) => {
|
|
15
|
-
const code = t.$code.toLowerCase();
|
|
16
|
-
if (localizations.has(code)) {
|
|
17
|
-
// Merge translations that share the same language code
|
|
18
|
-
localizations.set(code, { ...localizations.get(code), ...t });
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
localizations.set(code, t);
|
|
22
|
-
}
|
|
23
|
-
// The first translation that's registered is the fallback
|
|
24
|
-
if (!fallback) {
|
|
25
|
-
fallback = t;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
update();
|
|
29
|
-
}
|
|
30
|
-
/** Updates all localized elements that are currently connected */
|
|
31
|
-
export function update() {
|
|
32
|
-
documentDirection = document.documentElement.dir || 'ltr';
|
|
33
|
-
documentLanguage = document.documentElement.lang || navigator.language;
|
|
34
|
-
[...connectedElements.keys()].map((el) => {
|
|
35
|
-
if (typeof el.requestUpdate === 'function') {
|
|
36
|
-
// TODO: We might want to implement a specific Umbraco method for informing about this. and then make the default UmbLitElement call requestUpdate..? Cause then others can implement their own solution?
|
|
37
|
-
el.requestUpdate();
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Observable } from '../../external/rxjs/index.js';
|
|
2
|
-
export interface IUmbAuthContext {
|
|
3
|
-
isAuthorized: Observable<boolean>;
|
|
4
|
-
/**
|
|
5
|
-
* Initiates the login flow.
|
|
6
|
-
*/
|
|
7
|
-
login(): void;
|
|
8
|
-
/**
|
|
9
|
-
* Initialise the auth flow.
|
|
10
|
-
*/
|
|
11
|
-
setInitialState(): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Checks if there is a token and it is still valid.
|
|
14
|
-
*/
|
|
15
|
-
getIsAuthorized(): boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Gets the latest token from the Management API.
|
|
18
|
-
* If the token is expired, it will be refreshed.
|
|
19
|
-
*
|
|
20
|
-
* NB! The user may experience being redirected to the login screen if the token is expired.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```js
|
|
24
|
-
* const token = await authContext.getLatestToken();
|
|
25
|
-
* const result = await fetch('https://my-api.com', { headers: { Authorization: `Bearer ${token}` } });
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @returns The latest token from the Management API
|
|
29
|
-
*/
|
|
30
|
-
getLatestToken(): Promise<string>;
|
|
31
|
-
/**
|
|
32
|
-
* Clears the token storage.
|
|
33
|
-
*/
|
|
34
|
-
clearTokenStorage(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Signs the user out by removing any tokens from the browser.
|
|
37
|
-
*/
|
|
38
|
-
signOut(): Promise<void>;
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|