@umbraco-cms/backoffice 14.0.0--preview005-c6c57135 → 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/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/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/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/shared/auth/auth.context.interface.d.ts +0 -39
- package/dist-cms/shared/auth/auth.context.interface.js +0 -1
|
@@ -18,7 +18,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
18
18
|
var _UmbAppElement_instances, _UmbAppElement_authContext, _UmbAppElement_umbIconRegistry, _UmbAppElement_uuiIconRegistry, _UmbAppElement_serverConnection, _UmbAppElement_setup, _UmbAppElement_setAuthStatus, _UmbAppElement_redirect, _UmbAppElement_isAuthorizedGuard, _UmbAppElement_errorPage;
|
|
19
19
|
import { UmbAppContext } from './app.context.js';
|
|
20
20
|
import { UmbServerConnection } from './server-connection.js';
|
|
21
|
-
import { UmbAuthContext } from '../../shared/auth/index.js';
|
|
21
|
+
import { UMB_STORAGE_REDIRECT_URL, UmbAuthContext } from '../../shared/auth/index.js';
|
|
22
22
|
import { css, html, customElement, property } from '../../external/lit/index.js';
|
|
23
23
|
import { UUIIconRegistryEssential } from '../../external/uui/index.js';
|
|
24
24
|
import { UmbIconRegistry } from '../../shared/icon-registry/index.js';
|
|
@@ -46,7 +46,6 @@ let UmbAppElement = class UmbAppElement extends UmbLitElement {
|
|
|
46
46
|
/**
|
|
47
47
|
* Bypass authentication.
|
|
48
48
|
*/
|
|
49
|
-
// TODO: this might not be the right solution
|
|
50
49
|
this.bypassAuth = false;
|
|
51
50
|
this._routes = [
|
|
52
51
|
{
|
|
@@ -141,6 +140,14 @@ async function _UmbAppElement_setAuthStatus() {
|
|
|
141
140
|
OpenAPI.WITH_CREDENTIALS = true;
|
|
142
141
|
};
|
|
143
142
|
_UmbAppElement_redirect = function _UmbAppElement_redirect() {
|
|
143
|
+
// If there is a ?code parameter in the url, then we are in the middle of the oauth flow
|
|
144
|
+
// and we need to complete the login (the authorization notifier will redirect after this is done
|
|
145
|
+
// essentially hitting this method again)
|
|
146
|
+
const queryParams = new URLSearchParams(window.location.search);
|
|
147
|
+
if (queryParams.has('code')) {
|
|
148
|
+
__classPrivateFieldGet(this, _UmbAppElement_authContext, "f")?.completeAuthorizationRequest();
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
144
151
|
switch (__classPrivateFieldGet(this, _UmbAppElement_serverConnection, "f")?.getStatus()) {
|
|
145
152
|
case RuntimeLevelModel.INSTALL:
|
|
146
153
|
history.replaceState(null, '', 'install');
|
|
@@ -153,16 +160,14 @@ _UmbAppElement_redirect = function _UmbAppElement_redirect() {
|
|
|
153
160
|
break;
|
|
154
161
|
case RuntimeLevelModel.RUN: {
|
|
155
162
|
const pathname = pathWithoutBasePath({ start: true, end: false });
|
|
156
|
-
// If we are on
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
if (savedRoute) {
|
|
161
|
-
sessionStorage.removeItem('umb:auth:redirect');
|
|
162
|
-
currentRoute = savedRoute;
|
|
163
|
+
// If we are on installer or upgrade page, redirect to the root since we are in the RUN state
|
|
164
|
+
if (pathname === '/install' || pathname === '/upgrade') {
|
|
165
|
+
history.replaceState(null, '', '/');
|
|
166
|
+
break;
|
|
163
167
|
}
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
// Keep the current path but replace state anyway to initialize the router
|
|
169
|
+
// because the router will not initialize a wildcard route by itself
|
|
170
|
+
history.replaceState(null, '', location.href);
|
|
166
171
|
break;
|
|
167
172
|
}
|
|
168
173
|
default:
|
|
@@ -179,10 +184,9 @@ _UmbAppElement_isAuthorizedGuard = function _UmbAppElement_isAuthorizedGuard() {
|
|
|
179
184
|
return true;
|
|
180
185
|
}
|
|
181
186
|
// Save location.href so we can redirect to it after login
|
|
182
|
-
window.sessionStorage.setItem(
|
|
187
|
+
window.sessionStorage.setItem(UMB_STORAGE_REDIRECT_URL, location.href);
|
|
183
188
|
// Make a request to the auth server to start the auth flow
|
|
184
|
-
|
|
185
|
-
__classPrivateFieldGet(this, _UmbAppElement_authContext, "f").login();
|
|
189
|
+
__classPrivateFieldGet(this, _UmbAppElement_authContext, "f").makeAuthorizationRequest();
|
|
186
190
|
// Return false to prevent the route from being rendered
|
|
187
191
|
return false;
|
|
188
192
|
};
|
|
@@ -219,7 +223,7 @@ __decorate([
|
|
|
219
223
|
], UmbAppElement.prototype, "serverUrl", void 0);
|
|
220
224
|
__decorate([
|
|
221
225
|
property({ type: String })
|
|
222
|
-
// TODO: get from
|
|
226
|
+
// TODO: get from base element or maybe move to UmbAuthContext.#getRedirectUrl since it is only used there
|
|
223
227
|
], UmbAppElement.prototype, "backofficePath", void 0);
|
|
224
228
|
__decorate([
|
|
225
229
|
property({ type: Boolean })
|
|
@@ -504,6 +504,36 @@
|
|
|
504
504
|
}
|
|
505
505
|
]
|
|
506
506
|
},
|
|
507
|
+
{
|
|
508
|
+
"name": "umb-property-editor-ui-block-grid-group-configuration",
|
|
509
|
+
"path": "./../src/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.ts",
|
|
510
|
+
"attributes": [
|
|
511
|
+
{
|
|
512
|
+
"name": "value",
|
|
513
|
+
"type": "UmbBlockGridGroupType[]"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"properties": [
|
|
517
|
+
{
|
|
518
|
+
"name": "value",
|
|
519
|
+
"attribute": "value",
|
|
520
|
+
"type": "UmbBlockGridGroupType[]"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "config"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "styles",
|
|
527
|
+
"type": "array",
|
|
528
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"events": [
|
|
532
|
+
{
|
|
533
|
+
"name": "property-value-change"
|
|
534
|
+
}
|
|
535
|
+
]
|
|
536
|
+
},
|
|
507
537
|
{
|
|
508
538
|
"name": "umb-property-editor-ui-block-grid-layout-stylesheet",
|
|
509
539
|
"path": "./../src/packages/block/block-grid/property-editors/block-grid-layout-stylesheet/property-editor-ui-block-grid-layout-stylesheet.element.ts",
|
|
@@ -540,8 +570,7 @@
|
|
|
540
570
|
"properties": [
|
|
541
571
|
{
|
|
542
572
|
"name": "value",
|
|
543
|
-
"type": "
|
|
544
|
-
"default": "[]"
|
|
573
|
+
"type": "UmbBlockTypeWithGroupKey[]"
|
|
545
574
|
},
|
|
546
575
|
{
|
|
547
576
|
"name": "config"
|
|
@@ -549,7 +578,7 @@
|
|
|
549
578
|
{
|
|
550
579
|
"name": "styles",
|
|
551
580
|
"type": "array",
|
|
552
|
-
"default": "[\"UmbTextStyles\"]"
|
|
581
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
553
582
|
}
|
|
554
583
|
]
|
|
555
584
|
},
|
|
@@ -722,7 +751,7 @@
|
|
|
722
751
|
"path": "./../src/packages/block/block-type/components/input-block-type/input-block-type.element.ts",
|
|
723
752
|
"attributes": [
|
|
724
753
|
{
|
|
725
|
-
"name": "
|
|
754
|
+
"name": "workspacePath",
|
|
726
755
|
"type": "string | undefined"
|
|
727
756
|
}
|
|
728
757
|
],
|
|
@@ -732,8 +761,8 @@
|
|
|
732
761
|
"type": "BlockType[]"
|
|
733
762
|
},
|
|
734
763
|
{
|
|
735
|
-
"name": "
|
|
736
|
-
"attribute": "
|
|
764
|
+
"name": "workspacePath",
|
|
765
|
+
"attribute": "workspacePath",
|
|
737
766
|
"type": "string | undefined"
|
|
738
767
|
},
|
|
739
768
|
{
|
|
@@ -741,6 +770,11 @@
|
|
|
741
770
|
"type": "array",
|
|
742
771
|
"default": "[null]"
|
|
743
772
|
}
|
|
773
|
+
],
|
|
774
|
+
"events": [
|
|
775
|
+
{
|
|
776
|
+
"name": "create"
|
|
777
|
+
}
|
|
744
778
|
]
|
|
745
779
|
},
|
|
746
780
|
{
|
|
@@ -692,6 +692,13 @@ export const data = [
|
|
|
692
692
|
icon: 'icon-book-alt',
|
|
693
693
|
groupKey: 'demo-block-group-id',
|
|
694
694
|
},
|
|
695
|
+
{
|
|
696
|
+
label: 'Test broken group key',
|
|
697
|
+
contentElementTypeKey: 'test-block-id',
|
|
698
|
+
editorSize: 'medium',
|
|
699
|
+
icon: 'icon-war',
|
|
700
|
+
groupKey: 'group-id-that-does-not-exist',
|
|
701
|
+
},
|
|
695
702
|
],
|
|
696
703
|
},
|
|
697
704
|
],
|
|
@@ -1474,4 +1474,30 @@ export const data = [
|
|
|
1474
1474
|
properties: [],
|
|
1475
1475
|
containers: [],
|
|
1476
1476
|
},
|
|
1477
|
+
{
|
|
1478
|
+
allowedTemplateIds: [],
|
|
1479
|
+
defaultTemplateId: null,
|
|
1480
|
+
id: 'test-block-id',
|
|
1481
|
+
alias: 'testBlock',
|
|
1482
|
+
name: 'Test broken group key',
|
|
1483
|
+
description: null,
|
|
1484
|
+
icon: 'icon-war',
|
|
1485
|
+
allowedAsRoot: true,
|
|
1486
|
+
variesByCulture: false,
|
|
1487
|
+
variesBySegment: false,
|
|
1488
|
+
isElement: true,
|
|
1489
|
+
hasChildren: false,
|
|
1490
|
+
isContainer: false,
|
|
1491
|
+
parentId: null,
|
|
1492
|
+
isFolder: false,
|
|
1493
|
+
allowedContentTypes: [],
|
|
1494
|
+
compositions: [],
|
|
1495
|
+
cleanup: {
|
|
1496
|
+
preventCleanup: false,
|
|
1497
|
+
keepAllVersionsNewerThanDays: null,
|
|
1498
|
+
keepLatestVersionPerDayForDays: null,
|
|
1499
|
+
},
|
|
1500
|
+
properties: [],
|
|
1501
|
+
containers: [],
|
|
1502
|
+
},
|
|
1477
1503
|
];
|
|
@@ -19,7 +19,6 @@ import { buildUdi } from '../../../../shared/utils/index.js';
|
|
|
19
19
|
import { UMB_MODAL_CONTEXT } from '../../../core/modal/index.js';
|
|
20
20
|
export class UmbBlockWorkspaceContext extends UmbEditableWorkspaceContextBase {
|
|
21
21
|
constructor(host, workspaceArgs) {
|
|
22
|
-
// TODO: We don't need a repo here, so maybe we should not require this of the UmbEditableWorkspaceContextBase
|
|
23
22
|
super(host, workspaceArgs.manifest.alias);
|
|
24
23
|
_UmbBlockWorkspaceContext_instances.add(this);
|
|
25
24
|
// Just for context token safety:
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const manifest = {
|
|
2
|
+
type: 'propertyEditorUi',
|
|
3
|
+
alias: 'Umb.PropertyEditorUi.BlockTypeGroupConfiguration',
|
|
4
|
+
name: 'Block Grid Group Configuration Property Editor UI',
|
|
5
|
+
js: () => import('./property-editor-ui-block-grid-group-configuration.element.js'),
|
|
6
|
+
meta: {
|
|
7
|
+
label: '',
|
|
8
|
+
icon: 'icon-box-alt',
|
|
9
|
+
group: 'common',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { UmbPropertyEditorUiElement } from '../../../../core/extension-registry/index.js';
|
|
2
|
+
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
3
|
+
import type { UmbPropertyEditorConfigCollection } from '../../../../core/property-editor/index.js';
|
|
4
|
+
import type { UmbBlockGridGroupType } from '../../../index.js';
|
|
5
|
+
export declare class UmbPropertyEditorUIBlockGridGroupConfigurationElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
6
|
+
#private;
|
|
7
|
+
private _value;
|
|
8
|
+
get value(): Array<UmbBlockGridGroupType>;
|
|
9
|
+
set value(value: Array<UmbBlockGridGroupType>);
|
|
10
|
+
set config(config: UmbPropertyEditorConfigCollection | undefined);
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
12
|
+
static styles: import("../../../../../external/lit/index.js").CSSResult[];
|
|
13
|
+
}
|
|
14
|
+
export default UmbPropertyEditorUIBlockGridGroupConfigurationElement;
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'umb-property-editor-ui-block-grid-group-configuration': UmbPropertyEditorUIBlockGridGroupConfigurationElement;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UmbPropertyEditorUIBlockGridGroupConfigurationElement_instances, _UmbPropertyEditorUIBlockGridGroupConfigurationElement_addGroup;
|
|
13
|
+
import { html, customElement, property, css } from '../../../../../external/lit/index.js';
|
|
14
|
+
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
15
|
+
import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
16
|
+
import { UmbId } from '../../../../core/id/index.js';
|
|
17
|
+
let UmbPropertyEditorUIBlockGridGroupConfigurationElement = class UmbPropertyEditorUIBlockGridGroupConfigurationElement extends UmbLitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
_UmbPropertyEditorUIBlockGridGroupConfigurationElement_instances.add(this);
|
|
21
|
+
this._value = [];
|
|
22
|
+
}
|
|
23
|
+
get value() {
|
|
24
|
+
return this._value;
|
|
25
|
+
}
|
|
26
|
+
set value(value) {
|
|
27
|
+
this._value = value || [];
|
|
28
|
+
}
|
|
29
|
+
set config(config) { }
|
|
30
|
+
render() {
|
|
31
|
+
return html `
|
|
32
|
+
<uui-button label=${this.localize.term('blockEditor_addBlockGroup')} look="placeholder" @click=${__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridGroupConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridGroupConfigurationElement_addGroup)}>
|
|
33
|
+
${this.localize.term('blockEditor_addBlockGroup')}
|
|
34
|
+
</uui-button>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
_UmbPropertyEditorUIBlockGridGroupConfigurationElement_instances = new WeakSet();
|
|
39
|
+
_UmbPropertyEditorUIBlockGridGroupConfigurationElement_addGroup = function _UmbPropertyEditorUIBlockGridGroupConfigurationElement_addGroup() {
|
|
40
|
+
this.value = [...this._value, { name: 'Unnamed group', key: UmbId.new() }];
|
|
41
|
+
this.dispatchEvent(new CustomEvent('property-value-change'));
|
|
42
|
+
};
|
|
43
|
+
UmbPropertyEditorUIBlockGridGroupConfigurationElement.styles = [
|
|
44
|
+
UmbTextStyles,
|
|
45
|
+
css `
|
|
46
|
+
uui-button {
|
|
47
|
+
display: block;
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
];
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: Array })
|
|
53
|
+
], UmbPropertyEditorUIBlockGridGroupConfigurationElement.prototype, "value", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ attribute: false })
|
|
56
|
+
], UmbPropertyEditorUIBlockGridGroupConfigurationElement.prototype, "config", null);
|
|
57
|
+
UmbPropertyEditorUIBlockGridGroupConfigurationElement = __decorate([
|
|
58
|
+
customElement('umb-property-editor-ui-block-grid-group-configuration')
|
|
59
|
+
], UmbPropertyEditorUIBlockGridGroupConfigurationElement);
|
|
60
|
+
export { UmbPropertyEditorUIBlockGridGroupConfigurationElement };
|
|
61
|
+
export default UmbPropertyEditorUIBlockGridGroupConfigurationElement;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UmbBlockTypeWithGroupKey } from '../../../block-type/index.js';
|
|
2
2
|
import '../../../block-type/components/input-block-type/index.js';
|
|
3
3
|
import type { UmbPropertyEditorUiElement } from '../../../../core/extension-registry/index.js';
|
|
4
|
-
import type
|
|
4
|
+
import { type UmbPropertyEditorConfigCollection } from '../../../../core/property-editor/index.js';
|
|
5
5
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* @element umb-property-editor-ui-block-grid-type-configuration
|
|
8
8
|
*/
|
|
9
9
|
export declare class UmbPropertyEditorUIBlockGridTypeConfigurationElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
10
|
-
|
|
10
|
+
#private;
|
|
11
|
+
private _value;
|
|
12
|
+
get value(): Array<UmbBlockTypeWithGroupKey>;
|
|
13
|
+
set value(value: Array<UmbBlockTypeWithGroupKey>);
|
|
11
14
|
config?: UmbPropertyEditorConfigCollection;
|
|
15
|
+
private _blockGroups;
|
|
16
|
+
private _mappedValuesAndGroups;
|
|
17
|
+
private _workspacePath?;
|
|
18
|
+
constructor();
|
|
12
19
|
render(): import("lit-html").TemplateResult<1>;
|
|
13
20
|
static styles: import("../../../../../external/lit/index.js").CSSResult[];
|
|
14
21
|
}
|
|
@@ -4,34 +4,153 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
16
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
|
+
};
|
|
18
|
+
var _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_blockTypeWorkspaceModalRegistration, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_observeProperties, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_mapValuesToBlockGroups, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_onChange, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_onCreate, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_deleteGroup, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_changeGroupName, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_renderGroupInput;
|
|
7
19
|
import '../../../block-type/components/input-block-type/index.js';
|
|
8
|
-
import { html, customElement, property } from '../../../../../external/lit/index.js';
|
|
20
|
+
import { html, customElement, property, state, repeat, nothing, css } from '../../../../../external/lit/index.js';
|
|
21
|
+
import { UmbPropertyValueChangeEvent, } from '../../../../core/property-editor/index.js';
|
|
9
22
|
import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
10
23
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
24
|
+
import { UMB_BLOCK_GRID_TYPE, } from '../../../index.js';
|
|
25
|
+
import { UMB_PROPERTY_DATASET_CONTEXT } from '../../../../core/property/index.js';
|
|
26
|
+
import { UMB_WORKSPACE_MODAL, UmbModalRouteRegistrationController } from '../../../../core/modal/index.js';
|
|
11
27
|
/**
|
|
12
28
|
* @element umb-property-editor-ui-block-grid-type-configuration
|
|
13
29
|
*/
|
|
14
30
|
let UmbPropertyEditorUIBlockGridTypeConfigurationElement = class UmbPropertyEditorUIBlockGridTypeConfigurationElement extends UmbLitElement {
|
|
31
|
+
get value() {
|
|
32
|
+
return this._value;
|
|
33
|
+
}
|
|
34
|
+
set value(value) {
|
|
35
|
+
this._value = value ?? [];
|
|
36
|
+
}
|
|
15
37
|
constructor() {
|
|
16
|
-
super(
|
|
17
|
-
this
|
|
38
|
+
super();
|
|
39
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances.add(this);
|
|
40
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext.set(this, void 0);
|
|
41
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_blockTypeWorkspaceModalRegistration.set(this, void 0);
|
|
42
|
+
this._value = [];
|
|
43
|
+
this._blockGroups = [];
|
|
44
|
+
this._mappedValuesAndGroups = [];
|
|
45
|
+
this.consumeContext(UMB_PROPERTY_DATASET_CONTEXT, async (instance) => {
|
|
46
|
+
__classPrivateFieldSet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, instance, "f");
|
|
47
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_observeProperties).call(this);
|
|
48
|
+
});
|
|
49
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_blockTypeWorkspaceModalRegistration, "f")?.destroy();
|
|
50
|
+
__classPrivateFieldSet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_blockTypeWorkspaceModalRegistration, new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL)
|
|
51
|
+
.addAdditionalPath(UMB_BLOCK_GRID_TYPE)
|
|
52
|
+
.onSetup(() => {
|
|
53
|
+
return { data: { entityType: UMB_BLOCK_GRID_TYPE, preset: {} }, modal: { size: 'large' } };
|
|
54
|
+
})
|
|
55
|
+
.observeRouteBuilder((routeBuilder) => {
|
|
56
|
+
const newpath = routeBuilder({});
|
|
57
|
+
this._workspacePath = newpath;
|
|
58
|
+
}), "f");
|
|
18
59
|
}
|
|
19
60
|
render() {
|
|
20
|
-
return html
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
61
|
+
return html `${repeat(this._mappedValuesAndGroups, (group) => group.key, (group) => html `${group.key ? __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_renderGroupInput).call(this, group.key, group.name) : nothing}
|
|
62
|
+
<umb-input-block-type
|
|
63
|
+
.value=${group.blocks}
|
|
64
|
+
.workspacePath=${this._workspacePath}
|
|
65
|
+
@create=${(e) => __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_onCreate).call(this, e, group.key ?? null)}
|
|
66
|
+
@change=${(e) => __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_onChange).call(this, e, group.key)}></umb-input-block-type>`)}`;
|
|
26
67
|
}
|
|
27
68
|
};
|
|
28
|
-
|
|
69
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext = new WeakMap();
|
|
70
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_blockTypeWorkspaceModalRegistration = new WeakMap();
|
|
71
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances = new WeakSet();
|
|
72
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_observeProperties = async function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_observeProperties() {
|
|
73
|
+
if (!__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, "f"))
|
|
74
|
+
return;
|
|
75
|
+
this.observe(await __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, "f").propertyValueByAlias('blockGroups'), (value) => {
|
|
76
|
+
this._blockGroups = value ?? [];
|
|
77
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_mapValuesToBlockGroups).call(this);
|
|
78
|
+
});
|
|
79
|
+
this.observe(await __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, "f").propertyValueByAlias('blocks'), () => {
|
|
80
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_mapValuesToBlockGroups).call(this);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_mapValuesToBlockGroups = function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_mapValuesToBlockGroups() {
|
|
84
|
+
// What if a block is in a group that does not exist in the block groups? Should it be removed? (Right now they will never be rendered)
|
|
85
|
+
const valuesWithNoGroup = this._value.filter((value) => !value.groupKey);
|
|
86
|
+
const valuesWithGroup = this._blockGroups.map((group) => {
|
|
87
|
+
return { name: group.name, key: group.key, blocks: this._value.filter((value) => value.groupKey === group.key) };
|
|
88
|
+
});
|
|
89
|
+
this._mappedValuesAndGroups = [{ blocks: valuesWithNoGroup }, ...valuesWithGroup];
|
|
90
|
+
};
|
|
91
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_onChange = function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_onChange(e, groupKey) {
|
|
92
|
+
const updatedValues = e.target.value.map((value) => ({ ...value, groupKey }));
|
|
93
|
+
const filteredValues = this.value.filter((value) => value.groupKey !== groupKey);
|
|
94
|
+
this.value = [...filteredValues, ...updatedValues];
|
|
95
|
+
this.dispatchEvent(new UmbPropertyValueChangeEvent());
|
|
96
|
+
};
|
|
97
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_onCreate = function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_onCreate(e, groupKey) {
|
|
98
|
+
const selectedElementType = e.detail.contentElementTypeKey;
|
|
99
|
+
if (selectedElementType) {
|
|
100
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_blockTypeWorkspaceModalRegistration, "f")?.open({}, 'create/' + selectedElementType + '/' + groupKey);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_deleteGroup = function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_deleteGroup(groupKey) {
|
|
104
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, "f")?.setPropertyValue('blockGroups', this._blockGroups.filter((group) => group.key !== groupKey));
|
|
105
|
+
// Should blocks that belonged to the removed group be deleted as well?
|
|
106
|
+
this.value = this._value.filter((block) => block.groupKey !== groupKey);
|
|
107
|
+
};
|
|
108
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_changeGroupName = function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_changeGroupName(e, groupKey) {
|
|
109
|
+
const groupName = e.target.value;
|
|
110
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_datasetContext, "f")?.setPropertyValue('blockGroups', this._blockGroups.map((group) => (group.key === groupKey ? { ...group, name: groupName } : group)));
|
|
111
|
+
};
|
|
112
|
+
_UmbPropertyEditorUIBlockGridTypeConfigurationElement_renderGroupInput = function _UmbPropertyEditorUIBlockGridTypeConfigurationElement_renderGroupInput(groupKey, groupName) {
|
|
113
|
+
return html `<uui-input
|
|
114
|
+
auto-width
|
|
115
|
+
label="Group"
|
|
116
|
+
.value=${groupName ?? ''}
|
|
117
|
+
@change=${(e) => __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_changeGroupName).call(this, e, groupKey)}>
|
|
118
|
+
<uui-button compact slot="append" label="delete" @click=${() => __classPrivateFieldGet(this, _UmbPropertyEditorUIBlockGridTypeConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockGridTypeConfigurationElement_deleteGroup).call(this, groupKey)}>
|
|
119
|
+
<uui-icon name="icon-trash"></uui-icon>
|
|
120
|
+
</uui-button>
|
|
121
|
+
</uui-input>`;
|
|
122
|
+
};
|
|
123
|
+
UmbPropertyEditorUIBlockGridTypeConfigurationElement.styles = [
|
|
124
|
+
UmbTextStyles,
|
|
125
|
+
css `
|
|
126
|
+
uui-input {
|
|
127
|
+
margin-top: var(--uui-size-6);
|
|
128
|
+
margin-bottom: var(--uui-size-4);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
uui-input:not(:hover, :focus) {
|
|
132
|
+
border: 1px solid transparent;
|
|
133
|
+
}
|
|
134
|
+
uui-input:not(:hover, :focus) uui-button {
|
|
135
|
+
opacity: 0;
|
|
136
|
+
}
|
|
137
|
+
`,
|
|
138
|
+
];
|
|
29
139
|
__decorate([
|
|
30
140
|
property({ attribute: false })
|
|
31
|
-
], UmbPropertyEditorUIBlockGridTypeConfigurationElement.prototype, "value",
|
|
141
|
+
], UmbPropertyEditorUIBlockGridTypeConfigurationElement.prototype, "value", null);
|
|
32
142
|
__decorate([
|
|
33
143
|
property({ type: Object, attribute: false })
|
|
34
144
|
], UmbPropertyEditorUIBlockGridTypeConfigurationElement.prototype, "config", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
state()
|
|
147
|
+
], UmbPropertyEditorUIBlockGridTypeConfigurationElement.prototype, "_blockGroups", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
state()
|
|
150
|
+
], UmbPropertyEditorUIBlockGridTypeConfigurationElement.prototype, "_mappedValuesAndGroups", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
state()
|
|
153
|
+
], UmbPropertyEditorUIBlockGridTypeConfigurationElement.prototype, "_workspacePath", void 0);
|
|
35
154
|
UmbPropertyEditorUIBlockGridTypeConfigurationElement = __decorate([
|
|
36
155
|
customElement('umb-property-editor-ui-block-grid-type-configuration')
|
|
37
156
|
], UmbPropertyEditorUIBlockGridTypeConfigurationElement);
|
|
@@ -2,4 +2,11 @@ import { manifest as blockGridEditor } from './block-grid-editor/manifests.js';
|
|
|
2
2
|
import { manifest as blockGridLayoutStylesheet } from './block-grid-layout-stylesheet/manifests.js';
|
|
3
3
|
import { manifest as blockGridTypeConfiguration } from './block-grid-type-configuration/manifests.js';
|
|
4
4
|
import { manifest as blockGridColumnSpan } from './block-grid-column-span/manifests.js';
|
|
5
|
-
|
|
5
|
+
import { manifest as blockGridGroupConfiguration } from './block-grid-group-configuration/manifests.js';
|
|
6
|
+
export const manifests = [
|
|
7
|
+
blockGridTypeConfiguration,
|
|
8
|
+
blockGridEditor,
|
|
9
|
+
blockGridLayoutStylesheet,
|
|
10
|
+
blockGridColumnSpan,
|
|
11
|
+
blockGridGroupConfiguration,
|
|
12
|
+
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { UmbBlockTypeBaseModel } from '../block-type/index.js';
|
|
1
|
+
import type { UmbBlockTypeBaseModel, UmbBlockTypeWithGroupKey } from '../block-type/index.js';
|
|
2
|
+
export declare const UMB_BLOCK_GRID_TYPE = "block-grid-type";
|
|
2
3
|
export interface UmbBlockGridType extends UmbBlockTypeBaseModel {
|
|
3
4
|
columnSpanOptions: Array<number>;
|
|
4
5
|
allowAtRoot: boolean;
|
|
@@ -8,5 +9,11 @@ export interface UmbBlockGridType extends UmbBlockTypeBaseModel {
|
|
|
8
9
|
thumbnail?: string;
|
|
9
10
|
areaGridColumns?: number;
|
|
10
11
|
areas: Array<any>;
|
|
11
|
-
|
|
12
|
+
}
|
|
13
|
+
export interface UmbBlockGridGroupType {
|
|
14
|
+
name: string;
|
|
15
|
+
key: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UmbBlockGridGroupTypeConfiguration extends Partial<UmbBlockGridGroupType> {
|
|
18
|
+
blocks: Array<UmbBlockTypeWithGroupKey>;
|
|
12
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const UMB_BLOCK_GRID_TYPE = 'block-grid-type';
|
|
@@ -7,6 +7,9 @@ import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
|
7
7
|
* @element umb-property-editor-ui-block-list-type-configuration
|
|
8
8
|
*/
|
|
9
9
|
export declare class UmbPropertyEditorUIBlockListBlockConfigurationElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
10
|
+
#private;
|
|
11
|
+
private _workspacePath?;
|
|
12
|
+
constructor();
|
|
10
13
|
value: UmbBlockTypeBaseModel[];
|
|
11
14
|
config?: UmbPropertyEditorConfigCollection;
|
|
12
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -4,28 +4,66 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
16
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17
|
+
};
|
|
18
|
+
var _UmbPropertyEditorUIBlockListBlockConfigurationElement_instances, _UmbPropertyEditorUIBlockListBlockConfigurationElement_blockTypeWorkspaceModalRegistration, _UmbPropertyEditorUIBlockListBlockConfigurationElement_onCreate;
|
|
7
19
|
import '../../../block-type/components/input-block-type/index.js';
|
|
8
|
-
import {
|
|
20
|
+
import { UMB_BLOCK_LIST_TYPE } from '../../types.js';
|
|
21
|
+
import { html, customElement, property, state } from '../../../../../external/lit/index.js';
|
|
9
22
|
import { UmbTextStyles } from '../../../../../shared/style/index.js';
|
|
10
23
|
import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
|
|
24
|
+
import { UMB_WORKSPACE_MODAL, UmbModalRouteRegistrationController } from '../../../../core/modal/index.js';
|
|
11
25
|
/**
|
|
12
26
|
* @element umb-property-editor-ui-block-list-type-configuration
|
|
13
27
|
*/
|
|
14
28
|
let UmbPropertyEditorUIBlockListBlockConfigurationElement = class UmbPropertyEditorUIBlockListBlockConfigurationElement extends UmbLitElement {
|
|
15
29
|
constructor() {
|
|
16
|
-
super(
|
|
30
|
+
super();
|
|
31
|
+
_UmbPropertyEditorUIBlockListBlockConfigurationElement_instances.add(this);
|
|
32
|
+
_UmbPropertyEditorUIBlockListBlockConfigurationElement_blockTypeWorkspaceModalRegistration.set(this, void 0);
|
|
17
33
|
this.value = [];
|
|
34
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockListBlockConfigurationElement_blockTypeWorkspaceModalRegistration, "f")?.destroy();
|
|
35
|
+
__classPrivateFieldSet(this, _UmbPropertyEditorUIBlockListBlockConfigurationElement_blockTypeWorkspaceModalRegistration, new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL)
|
|
36
|
+
.addAdditionalPath(UMB_BLOCK_LIST_TYPE)
|
|
37
|
+
.onSetup(() => {
|
|
38
|
+
return { data: { entityType: UMB_BLOCK_LIST_TYPE, preset: {} }, modal: { size: 'large' } };
|
|
39
|
+
})
|
|
40
|
+
.observeRouteBuilder((routeBuilder) => {
|
|
41
|
+
const newpath = routeBuilder({});
|
|
42
|
+
this._workspacePath = newpath;
|
|
43
|
+
}), "f");
|
|
18
44
|
}
|
|
19
45
|
render() {
|
|
20
46
|
return html `<umb-input-block-type
|
|
21
|
-
entity-type="block-list-type"
|
|
22
47
|
.value=${this.value}
|
|
48
|
+
.workspacePath=${this._workspacePath}
|
|
49
|
+
@create=${__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockListBlockConfigurationElement_instances, "m", _UmbPropertyEditorUIBlockListBlockConfigurationElement_onCreate)}
|
|
23
50
|
@change=${(e) => {
|
|
24
51
|
this.value = e.target.value;
|
|
25
52
|
}}></umb-input-block-type>`;
|
|
26
53
|
}
|
|
27
54
|
};
|
|
55
|
+
_UmbPropertyEditorUIBlockListBlockConfigurationElement_blockTypeWorkspaceModalRegistration = new WeakMap();
|
|
56
|
+
_UmbPropertyEditorUIBlockListBlockConfigurationElement_instances = new WeakSet();
|
|
57
|
+
_UmbPropertyEditorUIBlockListBlockConfigurationElement_onCreate = function _UmbPropertyEditorUIBlockListBlockConfigurationElement_onCreate(e) {
|
|
58
|
+
const selectedElementType = e.detail.contentElementTypeKey;
|
|
59
|
+
if (selectedElementType) {
|
|
60
|
+
__classPrivateFieldGet(this, _UmbPropertyEditorUIBlockListBlockConfigurationElement_blockTypeWorkspaceModalRegistration, "f")?.open({}, 'create/' + selectedElementType + '/null');
|
|
61
|
+
}
|
|
62
|
+
};
|
|
28
63
|
UmbPropertyEditorUIBlockListBlockConfigurationElement.styles = [UmbTextStyles];
|
|
64
|
+
__decorate([
|
|
65
|
+
state()
|
|
66
|
+
], UmbPropertyEditorUIBlockListBlockConfigurationElement.prototype, "_workspacePath", void 0);
|
|
29
67
|
__decorate([
|
|
30
68
|
property({ attribute: false })
|
|
31
69
|
], UmbPropertyEditorUIBlockListBlockConfigurationElement.prototype, "value", void 0);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UmbBlockTypeBaseModel } from '../block-type/index.js';
|
|
2
2
|
import type { UmbBlockLayoutBaseModel } from '../index.js';
|
|
3
|
+
export declare const UMB_BLOCK_LIST_TYPE = "block-list-type";
|
|
3
4
|
export interface UmbBlockListTypeModel extends UmbBlockTypeBaseModel {
|
|
4
5
|
}
|
|
5
6
|
export interface UmbBlockListLayoutModel extends UmbBlockLayoutBaseModel {
|