@umbraco-cms/backoffice 14.0.0--preview006-89e89a2e → 14.0.0--preview006-7bdcb4ac
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/css/umbraco-blockgridlayout.css +50 -0
- package/dist-cms/custom-elements.json +71 -40
- package/dist-cms/libs/observable-api/utils/append-to-frozen-array.function.d.ts +6 -5
- package/dist-cms/libs/observable-api/utils/append-to-frozen-array.function.js +6 -5
- package/dist-cms/mocks/data/data-type/data-type.data.js +1 -1
- package/dist-cms/mocks/data/document/document.data.js +91 -1
- package/dist-cms/packages/block/block/context/block-entries.context-token.d.ts +5 -0
- package/dist-cms/packages/block/block/context/block-entries.context-token.js +2 -0
- package/dist-cms/packages/block/block/context/block-entries.context.d.ts +29 -0
- package/dist-cms/packages/block/block/context/block-entries.context.js +69 -0
- package/dist-cms/packages/block/block/context/block-entry.context-token.d.ts +6 -0
- package/dist-cms/packages/block/block/context/block-entry.context-token.js +2 -0
- package/dist-cms/packages/block/block/context/{block-entity.context.d.ts → block-entry.context.d.ts} +25 -10
- package/dist-cms/packages/block/block/context/block-entry.context.js +208 -0
- package/dist-cms/packages/block/block/{manager → context}/block-manager.context.d.ts +21 -5
- package/dist-cms/packages/block/block/{manager → context}/block-manager.context.js +56 -53
- package/dist-cms/packages/block/block/context/index.d.ts +6 -1
- package/dist-cms/packages/block/block/context/index.js +5 -1
- package/dist-cms/packages/block/block/index.d.ts +0 -1
- package/dist-cms/packages/block/block/index.js +0 -1
- package/dist-cms/packages/block/block/workspace/block-workspace-editor.element.d.ts +0 -1
- package/dist-cms/packages/block/block/workspace/block-workspace-editor.element.js +1 -17
- package/dist-cms/packages/block/block/workspace/block-workspace.context.js +78 -45
- package/dist-cms/packages/block/block/workspace/views/edit/{block-workspace-view-edit-no-router.element.d.ts → block-workspace-view-edit-content-no-router.element.d.ts} +8 -5
- package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit-content-no-router.element.js +148 -0
- package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit.element.js +4 -1
- package/dist-cms/packages/block/block-grid/components/block-grid-areas-container/block-grid-areas-container.element.d.ts +18 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-areas-container/block-grid-areas-container.element.js +46 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-areas-container/index.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-areas-container/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.d.ts +21 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.js +118 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/index.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts +28 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.js +124 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/index.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/index.d.ts +0 -0
- package/dist-cms/packages/block/block-grid/components/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/ref-grid-block/index.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/ref-grid-block/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.d.ts +18 -0
- package/dist-cms/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.js +47 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entries.context-token.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entries.context-token.js +3 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entries.context.d.ts +25 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entries.context.js +134 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entry.context-token.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entry.context-token.js +3 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entry.context.d.ts +12 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-entry.context.js +38 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-manager.context.d.ts +25 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-manager.context.js +38 -0
- package/dist-cms/packages/block/block-grid/context/index.d.ts +2 -0
- package/dist-cms/packages/block/block-grid/context/index.js +2 -0
- package/dist-cms/packages/block/block-grid/index.d.ts +2 -1
- package/dist-cms/packages/block/block-grid/index.js +2 -1
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/manifests.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/manifests.js +2 -1
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.d.ts +7 -8
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.js +59 -89
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-group-configuration/property-editor-ui-block-grid-group-configuration.element.d.ts +3 -3
- package/dist-cms/packages/block/block-grid/types.d.ts +15 -3
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.d.ts +29 -0
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +132 -0
- package/dist-cms/packages/block/block-list/components/block-list-entry/index.d.ts +1 -0
- package/dist-cms/packages/block/block-list/components/block-list-entry/index.js +1 -0
- package/dist-cms/packages/block/block-list/components/inline-list-block/inline-list-block.element.d.ts +1 -1
- package/dist-cms/packages/block/block-list/components/inline-list-block/inline-list-block.element.js +5 -6
- package/dist-cms/packages/block/block-list/components/ref-list-block/ref-list-block.element.js +3 -2
- package/dist-cms/packages/block/block-list/context/block-list-entries.context-token.d.ts +3 -0
- package/dist-cms/packages/block/block-list/context/block-list-entries.context-token.js +3 -0
- package/dist-cms/packages/block/block-list/context/block-list-entries.context.d.ts +23 -0
- package/dist-cms/packages/block/block-list/context/block-list-entries.context.js +81 -0
- package/dist-cms/packages/block/block-list/context/block-list-entry.context-token.d.ts +3 -0
- package/dist-cms/packages/block/block-list/context/block-list-entry.context-token.js +3 -0
- package/dist-cms/packages/block/block-list/context/block-list-entry.context.d.ts +11 -0
- package/dist-cms/packages/block/block-list/context/{block-list.context.js → block-list-entry.context.js} +11 -10
- package/dist-cms/packages/block/block-list/{manager → context}/block-list-manager.context.d.ts +13 -4
- package/dist-cms/packages/block/block-list/{manager → context}/block-list-manager.context.js +8 -4
- package/dist-cms/packages/block/block-list/context/index.d.ts +1 -0
- package/dist-cms/packages/block/block-list/context/index.js +1 -0
- package/dist-cms/packages/block/block-list/index.d.ts +2 -1
- package/dist-cms/packages/block/block-list/index.js +2 -1
- package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.d.ts +2 -7
- package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.js +39 -30
- package/dist-cms/packages/block/block-list/types.d.ts +3 -1
- package/dist-cms/packages/block/block-type/components/block-type-card/block-type-card.element.js +1 -1
- package/dist-cms/packages/core/modal/modal-route-registration.controller.d.ts +1 -1
- package/dist-cms/packages/core/modal/modal-route-registration.controller.js +1 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +36 -25
- package/package.json +13 -2
- package/dist-cms/packages/block/block/context/block-entity.context.js +0 -151
- package/dist-cms/packages/block/block/manager/index.d.ts +0 -2
- package/dist-cms/packages/block/block/manager/index.js +0 -1
- package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit-no-router.element.js +0 -132
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid-inner-test.element.d.ts +0 -18
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid-inner-test.element.js +0 -87
- package/dist-cms/packages/block/block-list/components/block-list-block/block-list-block.element.d.ts +0 -31
- package/dist-cms/packages/block/block-list/components/block-list-block/block-list-block.element.js +0 -149
- package/dist-cms/packages/block/block-list/components/block-list-block/index.d.ts +0 -1
- package/dist-cms/packages/block/block-list/components/block-list-block/index.js +0 -1
- package/dist-cms/packages/block/block-list/context/block-list.context-token.d.ts +0 -3
- package/dist-cms/packages/block/block-list/context/block-list.context-token.js +0 -2
- package/dist-cms/packages/block/block-list/context/block-list.context.d.ts +0 -9
- /package/dist-cms/packages/block/block/{manager → context}/block-manager.context-token.d.ts +0 -0
- /package/dist-cms/packages/block/block/{manager → context}/block-manager.context-token.js +0 -0
package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { UmbPropertyEditorUiElement } from '../../../../core/extension-registry/index.js';
|
|
2
|
+
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
3
|
+
import '../ref-grid-block/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @element umb-block-grid-entry
|
|
6
|
+
*/
|
|
7
|
+
export declare class UmbBlockGridEntryElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
8
|
+
#private;
|
|
9
|
+
get contentUdi(): string | undefined;
|
|
10
|
+
set contentUdi(value: string | undefined);
|
|
11
|
+
private _contentUdi?;
|
|
12
|
+
_hasSettings: boolean;
|
|
13
|
+
_label: string;
|
|
14
|
+
_workspaceEditPath?: string;
|
|
15
|
+
_inlineEditingMode?: boolean;
|
|
16
|
+
_blockViewProps: {
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
19
|
+
constructor();
|
|
20
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
21
|
+
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
22
|
+
}
|
|
23
|
+
export default UmbBlockGridEntryElement;
|
|
24
|
+
declare global {
|
|
25
|
+
interface HTMLElementTagNameMap {
|
|
26
|
+
'umb-block-grid-entry': UmbBlockGridEntryElement;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
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 _UmbBlockGridEntryElement_instances, _UmbBlockGridEntryElement_context, _UmbBlockGridEntryElement_renderRefBlock, _UmbBlockGridEntryElement_renderBlock;
|
|
13
|
+
import { UmbBlockGridEntryContext } from '../../context/block-grid-entry.context.js';
|
|
14
|
+
import { html, css, customElement, property, state } from '../../../../../external/lit/index.js';
|
|
15
|
+
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
16
|
+
import '../ref-grid-block/index.js';
|
|
17
|
+
/**
|
|
18
|
+
* @element umb-block-grid-entry
|
|
19
|
+
*/
|
|
20
|
+
let UmbBlockGridEntryElement = class UmbBlockGridEntryElement extends UmbLitElement {
|
|
21
|
+
//
|
|
22
|
+
get contentUdi() {
|
|
23
|
+
return this._contentUdi;
|
|
24
|
+
}
|
|
25
|
+
set contentUdi(value) {
|
|
26
|
+
if (!value)
|
|
27
|
+
return;
|
|
28
|
+
this._contentUdi = value;
|
|
29
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntryElement_context, "f").setContentUdi(value);
|
|
30
|
+
}
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
_UmbBlockGridEntryElement_instances.add(this);
|
|
34
|
+
//
|
|
35
|
+
_UmbBlockGridEntryElement_context.set(this, new UmbBlockGridEntryContext(this));
|
|
36
|
+
this._hasSettings = false;
|
|
37
|
+
this._label = '';
|
|
38
|
+
// TODO: Move type for the Block Properties, and use it on the Element Interface for the Manifest.
|
|
39
|
+
this._blockViewProps = {};
|
|
40
|
+
this.observe(__classPrivateFieldGet(this, _UmbBlockGridEntryElement_context, "f").workspaceEditPath, (workspaceEditPath) => {
|
|
41
|
+
this._workspaceEditPath = workspaceEditPath;
|
|
42
|
+
});
|
|
43
|
+
this.observe(__classPrivateFieldGet(this, _UmbBlockGridEntryElement_context, "f").blockTypeSettingsElementTypeKey, (blockTypeSettingsElementTypeKey) => {
|
|
44
|
+
this._hasSettings = !!blockTypeSettingsElementTypeKey;
|
|
45
|
+
});
|
|
46
|
+
this.observe(__classPrivateFieldGet(this, _UmbBlockGridEntryElement_context, "f").label, (label) => {
|
|
47
|
+
this._blockViewProps.label = label;
|
|
48
|
+
this._label = label;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
return __classPrivateFieldGet(this, _UmbBlockGridEntryElement_instances, "m", _UmbBlockGridEntryElement_renderBlock).call(this);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
_UmbBlockGridEntryElement_context = new WeakMap();
|
|
56
|
+
_UmbBlockGridEntryElement_instances = new WeakSet();
|
|
57
|
+
_UmbBlockGridEntryElement_renderRefBlock = function _UmbBlockGridEntryElement_renderRefBlock() {
|
|
58
|
+
return html `<umb-ref-grid-block .label=${this._label}></umb-ref-grid-block>`;
|
|
59
|
+
};
|
|
60
|
+
_UmbBlockGridEntryElement_renderBlock = function _UmbBlockGridEntryElement_renderBlock() {
|
|
61
|
+
return html `
|
|
62
|
+
<umb-extension-slot
|
|
63
|
+
type="blockEditorCustomView"
|
|
64
|
+
default-element=${'umb-ref-grid-block'}
|
|
65
|
+
.props=${this._blockViewProps}
|
|
66
|
+
>${__classPrivateFieldGet(this, _UmbBlockGridEntryElement_instances, "m", _UmbBlockGridEntryElement_renderRefBlock).call(this)}</umb-extension-slot
|
|
67
|
+
>
|
|
68
|
+
<uui-action-bar>
|
|
69
|
+
${this._workspaceEditPath
|
|
70
|
+
? html `<uui-button label="edit" compact href=${this._workspaceEditPath}>
|
|
71
|
+
<uui-icon name="icon-edit"></uui-icon>
|
|
72
|
+
</uui-button>`
|
|
73
|
+
: ''}
|
|
74
|
+
${this._workspaceEditPath && this._hasSettings
|
|
75
|
+
? html `<uui-button label="Edit settings" compact href=${this._workspaceEditPath + '/view/settings'}>
|
|
76
|
+
<uui-icon name="icon-settings"></uui-icon>
|
|
77
|
+
</uui-button>`
|
|
78
|
+
: ''}
|
|
79
|
+
<uui-button label="delete" compact @click=${() => __classPrivateFieldGet(this, _UmbBlockGridEntryElement_context, "f").requestDelete()}>
|
|
80
|
+
<uui-icon name="icon-remove"></uui-icon>
|
|
81
|
+
</uui-button>
|
|
82
|
+
</uui-action-bar>
|
|
83
|
+
`;
|
|
84
|
+
};
|
|
85
|
+
UmbBlockGridEntryElement.styles = [
|
|
86
|
+
css `
|
|
87
|
+
:host {
|
|
88
|
+
position: relative;
|
|
89
|
+
display: block;
|
|
90
|
+
}
|
|
91
|
+
uui-action-bar {
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: var(--uui-size-2);
|
|
94
|
+
right: var(--uui-size-2);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
:host([drag-placeholder]) {
|
|
98
|
+
opacity: 0.2;
|
|
99
|
+
}
|
|
100
|
+
`,
|
|
101
|
+
];
|
|
102
|
+
__decorate([
|
|
103
|
+
property({ attribute: false })
|
|
104
|
+
], UmbBlockGridEntryElement.prototype, "contentUdi", null);
|
|
105
|
+
__decorate([
|
|
106
|
+
state()
|
|
107
|
+
], UmbBlockGridEntryElement.prototype, "_hasSettings", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
state()
|
|
110
|
+
], UmbBlockGridEntryElement.prototype, "_label", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
state()
|
|
113
|
+
], UmbBlockGridEntryElement.prototype, "_workspaceEditPath", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
state()
|
|
116
|
+
], UmbBlockGridEntryElement.prototype, "_inlineEditingMode", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
state()
|
|
119
|
+
], UmbBlockGridEntryElement.prototype, "_blockViewProps", void 0);
|
|
120
|
+
UmbBlockGridEntryElement = __decorate([
|
|
121
|
+
customElement('umb-block-grid-entry')
|
|
122
|
+
], UmbBlockGridEntryElement);
|
|
123
|
+
export { UmbBlockGridEntryElement };
|
|
124
|
+
export default UmbBlockGridEntryElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './block-grid-entry.element.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './block-grid-entry.element.js';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ref-grid-block.element.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ref-grid-block.element.js';
|
package/dist-cms/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
2
|
+
import '../block-grid-areas-container/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* @element umb-ref-grid-block
|
|
5
|
+
*/
|
|
6
|
+
export declare class UmbRefGridBlockElement extends UmbLitElement {
|
|
7
|
+
label?: string;
|
|
8
|
+
_workspaceEditPath?: string;
|
|
9
|
+
constructor();
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
11
|
+
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
12
|
+
}
|
|
13
|
+
export default UmbRefGridBlockElement;
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'umb-ref-grid-block': UmbRefGridBlockElement;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist-cms/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
8
|
+
import { UMB_BLOCK_ENTRY_CONTEXT } from '../../../index.js';
|
|
9
|
+
import { css, customElement, html, property, state } from '../../../../../external/lit/index.js';
|
|
10
|
+
import '../block-grid-areas-container/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* @element umb-ref-grid-block
|
|
13
|
+
*/
|
|
14
|
+
let UmbRefGridBlockElement = class UmbRefGridBlockElement extends UmbLitElement {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.consumeContext(UMB_BLOCK_ENTRY_CONTEXT, (context) => {
|
|
18
|
+
this.observe(context.workspaceEditPath, (workspaceEditPath) => {
|
|
19
|
+
this._workspaceEditPath = workspaceEditPath;
|
|
20
|
+
}, 'observeWorkspaceEditPath');
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
// href=${this._workspaceEditPath ?? '#'}
|
|
25
|
+
return html `<uui-ref-node standalone .name=${this.label ?? ''}>
|
|
26
|
+
<umb-block-grid-area-container></umb-block-grid-area-container>
|
|
27
|
+
</uui-ref-node>`;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
UmbRefGridBlockElement.styles = [
|
|
31
|
+
css `
|
|
32
|
+
uui-ref-node {
|
|
33
|
+
min-height: var(--uui-size-16);
|
|
34
|
+
}
|
|
35
|
+
`,
|
|
36
|
+
];
|
|
37
|
+
__decorate([
|
|
38
|
+
property({ type: String })
|
|
39
|
+
], UmbRefGridBlockElement.prototype, "label", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
state()
|
|
42
|
+
], UmbRefGridBlockElement.prototype, "_workspaceEditPath", void 0);
|
|
43
|
+
UmbRefGridBlockElement = __decorate([
|
|
44
|
+
customElement('umb-ref-grid-block')
|
|
45
|
+
], UmbRefGridBlockElement);
|
|
46
|
+
export { UmbRefGridBlockElement };
|
|
47
|
+
export default UmbRefGridBlockElement;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { UmbBlockGridEntriesContext } from './block-grid-entries.context.js';
|
|
2
|
+
import { UmbContextToken } from '../../../../libs/context-api/index.js';
|
|
3
|
+
export declare const UMB_BLOCK_GRID_ENTRIES_CONTEXT: UmbContextToken<UmbBlockGridEntriesContext, UmbBlockGridEntriesContext>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { UmbBlockDataType } from '../../block/index.js';
|
|
2
|
+
import { UmbBlockEntriesContext } from '../../block/index.js';
|
|
3
|
+
import { type UmbBlockGridWorkspaceData } from '../index.js';
|
|
4
|
+
import type { UmbBlockGridLayoutModel, UmbBlockGridTypeModel } from '../types.js';
|
|
5
|
+
import { UMB_BLOCK_GRID_MANAGER_CONTEXT } from './block-grid-manager.context.js';
|
|
6
|
+
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
7
|
+
export declare class UmbBlockGridEntriesContext extends UmbBlockEntriesContext<typeof UMB_BLOCK_GRID_MANAGER_CONTEXT, typeof UMB_BLOCK_GRID_MANAGER_CONTEXT.TYPE, UmbBlockGridTypeModel, UmbBlockGridLayoutModel> {
|
|
8
|
+
#private;
|
|
9
|
+
setParentUnique(contentUdi: string | null): void;
|
|
10
|
+
setAreaKey(areaKey: string | null): void;
|
|
11
|
+
constructor(host: UmbControllerHost);
|
|
12
|
+
protected _gotBlockManager(): void;
|
|
13
|
+
getPathForCreateBlock(index: number): string | undefined;
|
|
14
|
+
getPathForClipboard(index: number): string | undefined;
|
|
15
|
+
create(contentElementTypeKey: string, partialLayoutEntry?: Omit<UmbBlockGridLayoutModel, 'contentUdi'>, modalData?: UmbBlockGridWorkspaceData): Promise<{
|
|
16
|
+
layout: UmbBlockGridLayoutModel;
|
|
17
|
+
content: {
|
|
18
|
+
udi: string;
|
|
19
|
+
contentTypeKey: string;
|
|
20
|
+
};
|
|
21
|
+
settings: UmbBlockDataType | undefined;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
insert(layoutEntry: UmbBlockGridLayoutModel, content: UmbBlockDataType, settings: UmbBlockDataType | undefined, modalData: UmbBlockGridWorkspaceData): Promise<boolean>;
|
|
24
|
+
delete(contentUdi: string): Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
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");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
+
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");
|
|
10
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
|
+
};
|
|
12
|
+
var _UmbBlockGridEntriesContext_instances, _UmbBlockGridEntriesContext_catalogueModal, _UmbBlockGridEntriesContext_catalogueRouteBuilder, _UmbBlockGridEntriesContext_parentEntry, _UmbBlockGridEntriesContext_retrieveParentEntry, _UmbBlockGridEntriesContext_areaKey, _UmbBlockGridEntriesContext_gotAreaKey;
|
|
13
|
+
import { UMB_BLOCK_CATALOGUE_MODAL, UmbBlockEntriesContext } from '../../block/index.js';
|
|
14
|
+
import { UMB_BLOCK_GRID_ENTRY_CONTEXT } from '../index.js';
|
|
15
|
+
import { UMB_BLOCK_GRID_MANAGER_CONTEXT } from './block-grid-manager.context.js';
|
|
16
|
+
import { UmbModalRouteRegistrationController } from '../../../core/modal/index.js';
|
|
17
|
+
export class UmbBlockGridEntriesContext extends UmbBlockEntriesContext {
|
|
18
|
+
setParentUnique(contentUdi) {
|
|
19
|
+
this._workspaceModal.setUniquePathValue('parentUnique', contentUdi ?? 'null');
|
|
20
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_catalogueModal, "f").setUniquePathValue('parentUnique', contentUdi ?? 'null');
|
|
21
|
+
}
|
|
22
|
+
setAreaKey(areaKey) {
|
|
23
|
+
__classPrivateFieldSet(this, _UmbBlockGridEntriesContext_areaKey, areaKey, "f");
|
|
24
|
+
this._workspaceModal.setUniquePathValue('areaKey', areaKey ?? 'null');
|
|
25
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_catalogueModal, "f").setUniquePathValue('areaKey', areaKey ?? 'null');
|
|
26
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_instances, "m", _UmbBlockGridEntriesContext_gotAreaKey).call(this);
|
|
27
|
+
}
|
|
28
|
+
constructor(host) {
|
|
29
|
+
super(host, UMB_BLOCK_GRID_MANAGER_CONTEXT);
|
|
30
|
+
_UmbBlockGridEntriesContext_instances.add(this);
|
|
31
|
+
//
|
|
32
|
+
_UmbBlockGridEntriesContext_catalogueModal.set(this, void 0);
|
|
33
|
+
_UmbBlockGridEntriesContext_catalogueRouteBuilder.set(this, void 0);
|
|
34
|
+
_UmbBlockGridEntriesContext_parentEntry.set(this, void 0);
|
|
35
|
+
_UmbBlockGridEntriesContext_retrieveParentEntry.set(this, void 0);
|
|
36
|
+
//#parentUnique?: string;
|
|
37
|
+
_UmbBlockGridEntriesContext_areaKey.set(this, void 0);
|
|
38
|
+
this._workspaceModal.addUniquePaths(['parentUnique', 'areaKey']);
|
|
39
|
+
__classPrivateFieldSet(this, _UmbBlockGridEntriesContext_retrieveParentEntry, this.consumeContext(UMB_BLOCK_GRID_ENTRY_CONTEXT, (blockGridEntry) => {
|
|
40
|
+
__classPrivateFieldSet(this, _UmbBlockGridEntriesContext_parentEntry, blockGridEntry, "f");
|
|
41
|
+
//this.#gotBlockParentEntry();// is not used at this point.
|
|
42
|
+
}).asPromise(), "f");
|
|
43
|
+
__classPrivateFieldSet(this, _UmbBlockGridEntriesContext_catalogueModal, new UmbModalRouteRegistrationController(this, UMB_BLOCK_CATALOGUE_MODAL)
|
|
44
|
+
.addUniquePaths(['propertyAlias', 'variantId', 'parentUnique', 'areaKey'])
|
|
45
|
+
.addAdditionalPath(':view/:index')
|
|
46
|
+
.onSetup((routingInfo) => {
|
|
47
|
+
// Idea: Maybe on setup should be async, so it can retrieve the values when needed? [NL]
|
|
48
|
+
const index = routingInfo.index ? parseInt(routingInfo.index) : -1;
|
|
49
|
+
return {
|
|
50
|
+
data: {
|
|
51
|
+
blocks: [],
|
|
52
|
+
blockGroups: [],
|
|
53
|
+
openClipboard: routingInfo.view === 'clipboard',
|
|
54
|
+
blockOriginData: { index: index },
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
})
|
|
58
|
+
.observeRouteBuilder((routeBuilder) => {
|
|
59
|
+
__classPrivateFieldSet(this, _UmbBlockGridEntriesContext_catalogueRouteBuilder, routeBuilder, "f");
|
|
60
|
+
// TODO: Trigger render update?
|
|
61
|
+
}), "f");
|
|
62
|
+
}
|
|
63
|
+
_gotBlockManager() {
|
|
64
|
+
if (!this._manager)
|
|
65
|
+
return;
|
|
66
|
+
this.observe(this._manager.propertyAlias, (alias) => {
|
|
67
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_catalogueModal, "f").setUniquePathValue('propertyAlias', alias ?? 'null');
|
|
68
|
+
}, 'observePropertyAlias');
|
|
69
|
+
this.observe(this._manager.variantId, (variantId) => {
|
|
70
|
+
if (variantId) {
|
|
71
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_catalogueModal, "f").setUniquePathValue('variantId', variantId.toString());
|
|
72
|
+
}
|
|
73
|
+
}, 'observePropertyAlias');
|
|
74
|
+
}
|
|
75
|
+
getPathForCreateBlock(index) {
|
|
76
|
+
return __classPrivateFieldGet(this, _UmbBlockGridEntriesContext_catalogueRouteBuilder, "f")?.call(this, { view: 'create', index: index });
|
|
77
|
+
}
|
|
78
|
+
getPathForClipboard(index) {
|
|
79
|
+
return __classPrivateFieldGet(this, _UmbBlockGridEntriesContext_catalogueRouteBuilder, "f")?.call(this, { view: 'clipboard', index: index });
|
|
80
|
+
}
|
|
81
|
+
async create(contentElementTypeKey, partialLayoutEntry, modalData) {
|
|
82
|
+
await this._retrieveManager;
|
|
83
|
+
return this._manager?.create(contentElementTypeKey, partialLayoutEntry, modalData);
|
|
84
|
+
}
|
|
85
|
+
// insert Block?
|
|
86
|
+
async insert(layoutEntry, content, settings, modalData) {
|
|
87
|
+
await this._retrieveManager;
|
|
88
|
+
// TODO: Insert layout entry at the right spot.
|
|
89
|
+
return this._manager?.insert(layoutEntry, content, settings, modalData) ?? false;
|
|
90
|
+
}
|
|
91
|
+
// create Block?
|
|
92
|
+
async delete(contentUdi) {
|
|
93
|
+
// TODO: Loop through children and delete them as well?
|
|
94
|
+
await super.delete(contentUdi);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
_UmbBlockGridEntriesContext_catalogueModal = new WeakMap(), _UmbBlockGridEntriesContext_catalogueRouteBuilder = new WeakMap(), _UmbBlockGridEntriesContext_parentEntry = new WeakMap(), _UmbBlockGridEntriesContext_retrieveParentEntry = new WeakMap(), _UmbBlockGridEntriesContext_areaKey = new WeakMap(), _UmbBlockGridEntriesContext_instances = new WeakSet(), _UmbBlockGridEntriesContext_gotAreaKey =
|
|
98
|
+
/*#gotBlockParentEntry() {
|
|
99
|
+
if (!this.#parentEntry) return;
|
|
100
|
+
}*/
|
|
101
|
+
async function _UmbBlockGridEntriesContext_gotAreaKey() {
|
|
102
|
+
if (__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_areaKey, "f") === undefined)
|
|
103
|
+
return;
|
|
104
|
+
if (__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_areaKey, "f") === null) {
|
|
105
|
+
// Root entries:
|
|
106
|
+
await this._retrieveManager;
|
|
107
|
+
if (!this._manager)
|
|
108
|
+
return;
|
|
109
|
+
this.setParentUnique(null);
|
|
110
|
+
this.observe(this._manager.layouts, (layouts) => {
|
|
111
|
+
this._layoutEntries.setValue(layouts);
|
|
112
|
+
}, 'observeParentLayouts');
|
|
113
|
+
this.observe(this.layoutEntries, (layouts) => {
|
|
114
|
+
this._manager?.setLayouts(layouts);
|
|
115
|
+
}, 'observeThisLayouts');
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// entries of a area:
|
|
119
|
+
await __classPrivateFieldGet(this, _UmbBlockGridEntriesContext_retrieveParentEntry, "f");
|
|
120
|
+
if (!__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_parentEntry, "f"))
|
|
121
|
+
return;
|
|
122
|
+
this.observe(__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_parentEntry, "f").unique, (unique) => {
|
|
123
|
+
this.setParentUnique(unique ?? null);
|
|
124
|
+
}, 'observeParentUnique');
|
|
125
|
+
this.observe(__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_parentEntry, "f").layoutsOfArea(__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_areaKey, "f")), (layouts) => {
|
|
126
|
+
this._layoutEntries.setValue(layouts);
|
|
127
|
+
}, 'observeParentLayouts');
|
|
128
|
+
this.observe(this.layoutEntries, (layouts) => {
|
|
129
|
+
if (__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_areaKey, "f")) {
|
|
130
|
+
__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_parentEntry, "f")?.setLayoutsOfArea(__classPrivateFieldGet(this, _UmbBlockGridEntriesContext_areaKey, "f"), layouts);
|
|
131
|
+
}
|
|
132
|
+
}, 'observeThisLayouts');
|
|
133
|
+
}
|
|
134
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UMB_BLOCK_GRID_MANAGER_CONTEXT } from './block-grid-manager.context.js';
|
|
2
|
+
import { UMB_BLOCK_GRID_ENTRIES_CONTEXT } from './block-grid-entries.context-token.js';
|
|
3
|
+
import { UmbBlockEntryContext, type UmbBlockGridTypeModel, type UmbBlockGridLayoutModel } from '../../index.js';
|
|
4
|
+
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
5
|
+
export declare class UmbBlockGridEntryContext extends UmbBlockEntryContext<typeof UMB_BLOCK_GRID_MANAGER_CONTEXT, typeof UMB_BLOCK_GRID_MANAGER_CONTEXT.TYPE, typeof UMB_BLOCK_GRID_ENTRIES_CONTEXT, typeof UMB_BLOCK_GRID_ENTRIES_CONTEXT.TYPE, UmbBlockGridTypeModel, UmbBlockGridLayoutModel> {
|
|
6
|
+
areas: import("rxjs").Observable<import("../../index.js").UmbBlockGridLayoutAreaItemModel[]>;
|
|
7
|
+
constructor(host: UmbControllerHost);
|
|
8
|
+
layoutsOfArea(areaKey: string): import("rxjs").Observable<UmbBlockGridLayoutModel[]>;
|
|
9
|
+
setLayoutsOfArea(areaKey: string, layouts: UmbBlockGridLayoutModel[]): void;
|
|
10
|
+
_gotManager(): void;
|
|
11
|
+
_gotEntries(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UMB_BLOCK_GRID_MANAGER_CONTEXT } from './block-grid-manager.context.js';
|
|
2
|
+
import { UMB_BLOCK_GRID_ENTRIES_CONTEXT } from './block-grid-entries.context-token.js';
|
|
3
|
+
import { UmbBlockEntryContext, } from '../../index.js';
|
|
4
|
+
import { appendToFrozenArray } from '../../../../libs/observable-api/index.js';
|
|
5
|
+
export class UmbBlockGridEntryContext extends UmbBlockEntryContext {
|
|
6
|
+
constructor(host) {
|
|
7
|
+
super(host, UMB_BLOCK_GRID_MANAGER_CONTEXT, UMB_BLOCK_GRID_ENTRIES_CONTEXT);
|
|
8
|
+
this.areas = this._layout.asObservablePart((x) => x?.areas ?? []);
|
|
9
|
+
}
|
|
10
|
+
layoutsOfArea(areaKey) {
|
|
11
|
+
return this._layout.asObservablePart((x) => x?.areas.find((x) => x.key === areaKey)?.items ?? []);
|
|
12
|
+
}
|
|
13
|
+
setLayoutsOfArea(areaKey, layouts) {
|
|
14
|
+
const frozenValue = this._layout.value;
|
|
15
|
+
if (!frozenValue)
|
|
16
|
+
return;
|
|
17
|
+
const areas = appendToFrozenArray(frozenValue?.areas, {
|
|
18
|
+
key: areaKey,
|
|
19
|
+
items: layouts,
|
|
20
|
+
}, (x) => x.key);
|
|
21
|
+
this._layout.update({ areas });
|
|
22
|
+
}
|
|
23
|
+
_gotManager() {
|
|
24
|
+
if (this._manager) {
|
|
25
|
+
/*this.observe(
|
|
26
|
+
this._manager.inlineEditingMode,
|
|
27
|
+
(inlineEditingMode) => {
|
|
28
|
+
this.#inlineEditingMode.setValue(inlineEditingMode);
|
|
29
|
+
},
|
|
30
|
+
'observeInlineEditingMode',
|
|
31
|
+
);*/
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
//this.removeControllerByAlias('observeInlineEditingMode');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
_gotEntries() { }
|
|
38
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { UmbBlockGridLayoutModel, UmbBlockGridTypeModel } from '../types.js';
|
|
2
|
+
import { UmbBlockManagerContext } from '../../block/context/block-manager.context.js';
|
|
3
|
+
import type { UmbBlockGridWorkspaceData } from '../index.js';
|
|
4
|
+
import type { UmbBlockTypeGroup } from '../../block-type/types.js';
|
|
5
|
+
import type { UmbBlockDataType } from '../../block/types.js';
|
|
6
|
+
import { UmbContextToken } from '../../../../libs/context-api/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* A implementation of the Block Manager specifically for the Block Grid Editor.
|
|
9
|
+
*/
|
|
10
|
+
export declare class UmbBlockGridManagerContext<BlockLayoutType extends UmbBlockGridLayoutModel = UmbBlockGridLayoutModel> extends UmbBlockManagerContext<UmbBlockGridTypeModel, UmbBlockGridLayoutModel> {
|
|
11
|
+
#private;
|
|
12
|
+
readonly blockGroups: import("rxjs").Observable<UmbBlockTypeGroup[]>;
|
|
13
|
+
setBlockGroups(blockGroups: Array<UmbBlockTypeGroup>): void;
|
|
14
|
+
getBlockGroups(): UmbBlockTypeGroup[];
|
|
15
|
+
create(contentElementTypeKey: string, partialLayoutEntry?: Omit<BlockLayoutType, 'contentUdi'>, modalData?: UmbBlockGridWorkspaceData): {
|
|
16
|
+
layout: UmbBlockGridLayoutModel;
|
|
17
|
+
content: {
|
|
18
|
+
udi: string;
|
|
19
|
+
contentTypeKey: string;
|
|
20
|
+
};
|
|
21
|
+
settings: UmbBlockDataType | undefined;
|
|
22
|
+
};
|
|
23
|
+
insert(layoutEntry: BlockLayoutType, content: UmbBlockDataType, settings: UmbBlockDataType | undefined, modalData: UmbBlockGridWorkspaceData): boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const UMB_BLOCK_GRID_MANAGER_CONTEXT: UmbContextToken<UmbBlockGridManagerContext<UmbBlockGridLayoutModel>, UmbBlockGridManagerContext<UmbBlockGridLayoutModel>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
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");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _UmbBlockGridManagerContext_blockGroups;
|
|
7
|
+
import { UmbBlockManagerContext } from '../../block/context/block-manager.context.js';
|
|
8
|
+
import { UmbContextToken } from '../../../../libs/context-api/index.js';
|
|
9
|
+
import { UmbArrayState } from '../../../../libs/observable-api/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* A implementation of the Block Manager specifically for the Block Grid Editor.
|
|
12
|
+
*/
|
|
13
|
+
export class UmbBlockGridManagerContext extends UmbBlockManagerContext {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
_UmbBlockGridManagerContext_blockGroups.set(this, new UmbArrayState([], (x) => x.key));
|
|
19
|
+
this.blockGroups = __classPrivateFieldGet(this, _UmbBlockGridManagerContext_blockGroups, "f").asObservable();
|
|
20
|
+
}
|
|
21
|
+
setBlockGroups(blockGroups) {
|
|
22
|
+
__classPrivateFieldGet(this, _UmbBlockGridManagerContext_blockGroups, "f").setValue(blockGroups);
|
|
23
|
+
}
|
|
24
|
+
getBlockGroups() {
|
|
25
|
+
return __classPrivateFieldGet(this, _UmbBlockGridManagerContext_blockGroups, "f").value;
|
|
26
|
+
}
|
|
27
|
+
create(contentElementTypeKey, partialLayoutEntry, modalData) {
|
|
28
|
+
return super.createBlockData(contentElementTypeKey, partialLayoutEntry);
|
|
29
|
+
}
|
|
30
|
+
insert(layoutEntry, content, settings, modalData) {
|
|
31
|
+
this._layouts.appendOneAt(layoutEntry, modalData.originData.index ?? -1);
|
|
32
|
+
this.insertBlockData(layoutEntry, content, settings, modalData);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
_UmbBlockGridManagerContext_blockGroups = new WeakMap();
|
|
37
|
+
// TODO: Make discriminator method for this:
|
|
38
|
+
export const UMB_BLOCK_GRID_MANAGER_CONTEXT = new UmbContextToken('UmbBlockManagerContext');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const UMB_BLOCK_GRID_PROPERTY_EDITOR_ALIAS = 'Umbraco.BlockGrid';
|
|
1
2
|
export const manifest = {
|
|
2
3
|
type: 'propertyEditorUi',
|
|
3
4
|
alias: 'Umb.PropertyEditorUi.BlockGrid',
|
|
@@ -5,7 +6,7 @@ export const manifest = {
|
|
|
5
6
|
js: () => import('./property-editor-ui-block-grid.element.js'),
|
|
6
7
|
meta: {
|
|
7
8
|
label: 'Block Grid',
|
|
8
|
-
propertyEditorSchemaAlias:
|
|
9
|
+
propertyEditorSchemaAlias: UMB_BLOCK_GRID_PROPERTY_EDITOR_ALIAS,
|
|
9
10
|
icon: 'icon-layout',
|
|
10
11
|
group: 'richContent',
|
|
11
12
|
settings: {
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import type { UmbPropertyEditorUiElement } from '../../../../core/extension-registry/index.js';
|
|
2
2
|
import { UmbLitElement } from '../../../../core/lit-element/index.js';
|
|
3
3
|
import type { UmbPropertyEditorConfigCollection } from '../../../../core/property-editor/index.js';
|
|
4
|
+
import type { UmbBlockGridValueModel } from '../../../index.js';
|
|
5
|
+
import '../../components/block-grid-entries/index.js';
|
|
4
6
|
/**
|
|
5
7
|
* @element umb-property-editor-ui-block-grid
|
|
6
8
|
*/
|
|
7
9
|
export declare class UmbPropertyEditorUIBlockGridElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
8
10
|
#private;
|
|
9
|
-
|
|
11
|
+
private _value;
|
|
12
|
+
set config(config: UmbPropertyEditorConfigCollection | undefined);
|
|
10
13
|
private _limitMin?;
|
|
11
14
|
private _limitMax?;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
private _catalogueRouteBuilder?;
|
|
16
|
-
private _directRoute?;
|
|
17
|
-
private _createButtonLabel;
|
|
18
|
-
set config(config: UmbPropertyEditorConfigCollection | undefined);
|
|
15
|
+
get value(): UmbBlockGridValueModel;
|
|
16
|
+
set value(value: UmbBlockGridValueModel | undefined);
|
|
17
|
+
private _rootLayouts;
|
|
19
18
|
constructor();
|
|
20
19
|
render(): import("lit-html").TemplateResult<1>;
|
|
21
20
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|