@umbraco-cms/backoffice 14.0.0--preview007-2dadc781 → 14.0.0--preview007-1b2f128e
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/custom-elements.json +0 -11
- package/dist-cms/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.d.ts +1 -2
- package/dist-cms/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.js +19 -17
- package/dist-cms/packages/documents/documents/collection/views/manifests.d.ts +1 -1
- package/dist-cms/packages/documents/documents/collection/views/manifests.js +2 -2
- package/dist-cms/packages/documents/documents/collection/views/table/document-table-collection-view.element.d.ts +1 -4
- package/dist-cms/packages/documents/documents/collection/views/table/document-table-collection-view.element.js +27 -27
- package/dist-cms/packages/documents/documents/entity-bulk-actions/manifests.js +0 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +1 -6
- package/package.json +1 -1
|
@@ -6576,17 +6576,6 @@
|
|
|
6576
6576
|
}
|
|
6577
6577
|
]
|
|
6578
6578
|
},
|
|
6579
|
-
{
|
|
6580
|
-
"name": "umb-collection-view-document-table",
|
|
6581
|
-
"path": "./../src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts",
|
|
6582
|
-
"properties": [
|
|
6583
|
-
{
|
|
6584
|
-
"name": "styles",
|
|
6585
|
-
"type": "array",
|
|
6586
|
-
"default": "[\"UmbTextStyles\",null]"
|
|
6587
|
-
}
|
|
6588
|
-
]
|
|
6589
|
-
},
|
|
6590
6579
|
{
|
|
6591
6580
|
"name": "umb-input-document-granular-permission",
|
|
6592
6581
|
"path": "./../src/packages/documents/documents/components/input-document-granular-permission/input-document-granular-permission.element.ts",
|
|
@@ -2,11 +2,10 @@ import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
|
2
2
|
export declare class UmbDocumentGridCollectionViewElement extends UmbLitElement {
|
|
3
3
|
#private;
|
|
4
4
|
private _items;
|
|
5
|
+
private _loading;
|
|
5
6
|
private _selection;
|
|
6
7
|
private _userDefinedProperties?;
|
|
7
|
-
private _loading;
|
|
8
8
|
constructor();
|
|
9
|
-
private _handleOpenCard;
|
|
10
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
11
10
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
12
11
|
}
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
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
16
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
17
|
};
|
|
18
|
-
var _UmbDocumentGridCollectionViewElement_instances, _UmbDocumentGridCollectionViewElement_collectionContext, _UmbDocumentGridCollectionViewElement_observeCollectionContext, _UmbDocumentGridCollectionViewElement_onSelect, _UmbDocumentGridCollectionViewElement_onDeselect, _UmbDocumentGridCollectionViewElement_renderCard, _UmbDocumentGridCollectionViewElement_renderState, _UmbDocumentGridCollectionViewElement_renderProperties;
|
|
18
|
+
var _UmbDocumentGridCollectionViewElement_instances, _UmbDocumentGridCollectionViewElement_collectionContext, _UmbDocumentGridCollectionViewElement_observeCollectionContext, _UmbDocumentGridCollectionViewElement_onOpen, _UmbDocumentGridCollectionViewElement_onSelect, _UmbDocumentGridCollectionViewElement_onDeselect, _UmbDocumentGridCollectionViewElement_isSelected, _UmbDocumentGridCollectionViewElement_renderCard, _UmbDocumentGridCollectionViewElement_renderState, _UmbDocumentGridCollectionViewElement_renderProperties;
|
|
19
19
|
import { getPropertyValueByAlias } from '../index.js';
|
|
20
20
|
import { css, html, customElement, state, repeat } from '../../../../../../external/lit/index.js';
|
|
21
21
|
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
@@ -26,19 +26,14 @@ let UmbDocumentGridCollectionViewElement = class UmbDocumentGridCollectionViewEl
|
|
|
26
26
|
super();
|
|
27
27
|
_UmbDocumentGridCollectionViewElement_instances.add(this);
|
|
28
28
|
this._items = [];
|
|
29
|
-
this._selection = [];
|
|
30
29
|
this._loading = false;
|
|
30
|
+
this._selection = [];
|
|
31
31
|
_UmbDocumentGridCollectionViewElement_collectionContext.set(this, void 0);
|
|
32
|
-
this.consumeContext(UMB_DEFAULT_COLLECTION_CONTEXT, (
|
|
33
|
-
__classPrivateFieldSet(this, _UmbDocumentGridCollectionViewElement_collectionContext,
|
|
32
|
+
this.consumeContext(UMB_DEFAULT_COLLECTION_CONTEXT, (collectionContext) => {
|
|
33
|
+
__classPrivateFieldSet(this, _UmbDocumentGridCollectionViewElement_collectionContext, collectionContext, "f");
|
|
34
34
|
__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_instances, "m", _UmbDocumentGridCollectionViewElement_observeCollectionContext).call(this);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
// TODO: How should we handle url stuff? [?]
|
|
38
|
-
_handleOpenCard(id) {
|
|
39
|
-
// TODO: this will not be needed when cards works as links with href [?]
|
|
40
|
-
history.pushState(null, '', 'section/content/workspace/document/edit/' + id);
|
|
41
|
-
}
|
|
42
37
|
render() {
|
|
43
38
|
if (this._loading) {
|
|
44
39
|
return html `<div class="container"><uui-loader></uui-loader></div>`;
|
|
@@ -61,14 +56,21 @@ _UmbDocumentGridCollectionViewElement_observeCollectionContext = function _UmbDo
|
|
|
61
56
|
this.observe(__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f").userDefinedProperties, (userDefinedProperties) => {
|
|
62
57
|
this._userDefinedProperties = userDefinedProperties;
|
|
63
58
|
}, 'umbCollectionUserDefinedPropertiesObserver');
|
|
64
|
-
this.observe(__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f").selection.selection, (selection) => (this._selection = selection), 'umbCollectionSelectionObserver');
|
|
65
59
|
this.observe(__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f").items, (items) => (this._items = items), 'umbCollectionItemsObserver');
|
|
60
|
+
this.observe(__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f").selection.selection, (selection) => (this._selection = selection), 'umbCollectionSelectionObserver');
|
|
61
|
+
};
|
|
62
|
+
_UmbDocumentGridCollectionViewElement_onOpen = function _UmbDocumentGridCollectionViewElement_onOpen(id) {
|
|
63
|
+
// TODO: this will not be needed when cards works as links with href [?]
|
|
64
|
+
history.pushState(null, '', 'section/content/workspace/document/edit/' + id);
|
|
66
65
|
};
|
|
67
66
|
_UmbDocumentGridCollectionViewElement_onSelect = function _UmbDocumentGridCollectionViewElement_onSelect(item) {
|
|
68
|
-
__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f")?.selection.select(item.unique
|
|
67
|
+
__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f")?.selection.select(item.unique);
|
|
69
68
|
};
|
|
70
69
|
_UmbDocumentGridCollectionViewElement_onDeselect = function _UmbDocumentGridCollectionViewElement_onDeselect(item) {
|
|
71
|
-
__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f")?.selection.deselect(item.unique
|
|
70
|
+
__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f")?.selection.deselect(item.unique);
|
|
71
|
+
};
|
|
72
|
+
_UmbDocumentGridCollectionViewElement_isSelected = function _UmbDocumentGridCollectionViewElement_isSelected(item) {
|
|
73
|
+
return __classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_collectionContext, "f")?.selection.isSelected(item.unique);
|
|
72
74
|
};
|
|
73
75
|
_UmbDocumentGridCollectionViewElement_renderCard = function _UmbDocumentGridCollectionViewElement_renderCard(item) {
|
|
74
76
|
return html `
|
|
@@ -76,8 +78,8 @@ _UmbDocumentGridCollectionViewElement_renderCard = function _UmbDocumentGridColl
|
|
|
76
78
|
.name=${item.name ?? 'Unnamed Document'}
|
|
77
79
|
selectable
|
|
78
80
|
?select-only=${this._selection.length > 0}
|
|
79
|
-
?selected=${__classPrivateFieldGet(this,
|
|
80
|
-
@open=${() => this.
|
|
81
|
+
?selected=${__classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_instances, "m", _UmbDocumentGridCollectionViewElement_isSelected).call(this, item)}
|
|
82
|
+
@open=${() => __classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_instances, "m", _UmbDocumentGridCollectionViewElement_onOpen).call(this, item.unique ?? '')}
|
|
81
83
|
@selected=${() => __classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_instances, "m", _UmbDocumentGridCollectionViewElement_onSelect).call(this, item)}
|
|
82
84
|
@deselected=${() => __classPrivateFieldGet(this, _UmbDocumentGridCollectionViewElement_instances, "m", _UmbDocumentGridCollectionViewElement_onDeselect).call(this, item)}>
|
|
83
85
|
<uui-icon slot="icon" name=${item.icon}></uui-icon>
|
|
@@ -160,13 +162,13 @@ __decorate([
|
|
|
160
162
|
], UmbDocumentGridCollectionViewElement.prototype, "_items", void 0);
|
|
161
163
|
__decorate([
|
|
162
164
|
state()
|
|
163
|
-
], UmbDocumentGridCollectionViewElement.prototype, "
|
|
165
|
+
], UmbDocumentGridCollectionViewElement.prototype, "_loading", void 0);
|
|
164
166
|
__decorate([
|
|
165
167
|
state()
|
|
166
|
-
], UmbDocumentGridCollectionViewElement.prototype, "
|
|
168
|
+
], UmbDocumentGridCollectionViewElement.prototype, "_selection", void 0);
|
|
167
169
|
__decorate([
|
|
168
170
|
state()
|
|
169
|
-
], UmbDocumentGridCollectionViewElement.prototype, "
|
|
171
|
+
], UmbDocumentGridCollectionViewElement.prototype, "_userDefinedProperties", void 0);
|
|
170
172
|
UmbDocumentGridCollectionViewElement = __decorate([
|
|
171
173
|
customElement('umb-document-grid-collection-view')
|
|
172
174
|
], UmbDocumentGridCollectionViewElement);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ManifestCollectionView } from '../../../../core/extension-registry/index.js';
|
|
2
|
-
export declare const UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS = "Umb.CollectionView.Document.Table";
|
|
3
2
|
export declare const UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS = "Umb.CollectionView.Document.Grid";
|
|
3
|
+
export declare const UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS = "Umb.CollectionView.Document.Table";
|
|
4
4
|
export declare const manifests: ManifestCollectionView[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UMB_COLLECTION_ALIAS_CONDITION } from '../../../../core/collection/index.js';
|
|
2
|
-
export const UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS = 'Umb.CollectionView.Document.Table';
|
|
3
2
|
export const UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS = 'Umb.CollectionView.Document.Grid';
|
|
3
|
+
export const UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS = 'Umb.CollectionView.Document.Table';
|
|
4
4
|
const gridViewManifest = {
|
|
5
5
|
type: 'collectionView',
|
|
6
6
|
alias: UMB_DOCUMENT_GRID_COLLECTION_VIEW_ALIAS,
|
|
@@ -24,7 +24,7 @@ const tableViewManifest = {
|
|
|
24
24
|
alias: UMB_DOCUMENT_TABLE_COLLECTION_VIEW_ALIAS,
|
|
25
25
|
name: 'Document Table Collection View',
|
|
26
26
|
element: () => import('./table/document-table-collection-view.element.js'),
|
|
27
|
-
weight:
|
|
27
|
+
weight: 300,
|
|
28
28
|
meta: {
|
|
29
29
|
label: 'Table',
|
|
30
30
|
icon: 'icon-list',
|
|
@@ -11,15 +11,12 @@ export declare class UmbDocumentTableCollectionViewElement extends UmbLitElement
|
|
|
11
11
|
private _tableItems;
|
|
12
12
|
private _selection;
|
|
13
13
|
constructor();
|
|
14
|
-
private _handleSelect;
|
|
15
|
-
private _handleDeselect;
|
|
16
|
-
private _handleOrdering;
|
|
17
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
18
15
|
static styles: import("@lit/reactive-element/css-tag.js").CSSResult[];
|
|
19
16
|
}
|
|
20
17
|
export default UmbDocumentTableCollectionViewElement;
|
|
21
18
|
declare global {
|
|
22
19
|
interface HTMLElementTagNameMap {
|
|
23
|
-
'umb-collection-view
|
|
20
|
+
'umb-document-table-collection-view': UmbDocumentTableCollectionViewElement;
|
|
24
21
|
}
|
|
25
22
|
}
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
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
16
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
17
|
};
|
|
18
|
-
var _UmbDocumentTableCollectionViewElement_instances, _UmbDocumentTableCollectionViewElement_systemColumns, _UmbDocumentTableCollectionViewElement_collectionContext, _UmbDocumentTableCollectionViewElement_observeCollectionContext, _UmbDocumentTableCollectionViewElement_createTableHeadings, _UmbDocumentTableCollectionViewElement_createTableItems;
|
|
18
|
+
var _UmbDocumentTableCollectionViewElement_instances, _UmbDocumentTableCollectionViewElement_systemColumns, _UmbDocumentTableCollectionViewElement_collectionContext, _UmbDocumentTableCollectionViewElement_observeCollectionContext, _UmbDocumentTableCollectionViewElement_createTableHeadings, _UmbDocumentTableCollectionViewElement_createTableItems, _UmbDocumentTableCollectionViewElement_handleSelect, _UmbDocumentTableCollectionViewElement_handleDeselect, _UmbDocumentTableCollectionViewElement_handleOrdering;
|
|
19
19
|
import { getPropertyValueByAlias } from '../index.js';
|
|
20
20
|
import { css, html, customElement, state } from '../../../../../../external/lit/index.js';
|
|
21
21
|
import { UmbLitElement } from '../../../../../core/lit-element/index.js';
|
|
@@ -49,32 +49,11 @@ let UmbDocumentTableCollectionViewElement = class UmbDocumentTableCollectionView
|
|
|
49
49
|
this._tableItems = [];
|
|
50
50
|
this._selection = [];
|
|
51
51
|
_UmbDocumentTableCollectionViewElement_collectionContext.set(this, void 0);
|
|
52
|
-
this.consumeContext(UMB_DEFAULT_COLLECTION_CONTEXT, (
|
|
53
|
-
__classPrivateFieldSet(this, _UmbDocumentTableCollectionViewElement_collectionContext,
|
|
52
|
+
this.consumeContext(UMB_DEFAULT_COLLECTION_CONTEXT, (collectionContext) => {
|
|
53
|
+
__classPrivateFieldSet(this, _UmbDocumentTableCollectionViewElement_collectionContext, collectionContext, "f");
|
|
54
54
|
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_instances, "m", _UmbDocumentTableCollectionViewElement_observeCollectionContext).call(this);
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
_handleSelect(event) {
|
|
58
|
-
event.stopPropagation();
|
|
59
|
-
const table = event.target;
|
|
60
|
-
const selection = table.selection;
|
|
61
|
-
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_collectionContext, "f")?.selection.setSelection(selection);
|
|
62
|
-
}
|
|
63
|
-
_handleDeselect(event) {
|
|
64
|
-
event.stopPropagation();
|
|
65
|
-
const table = event.target;
|
|
66
|
-
const selection = table.selection;
|
|
67
|
-
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_collectionContext, "f")?.selection.setSelection(selection);
|
|
68
|
-
}
|
|
69
|
-
_handleOrdering(event) {
|
|
70
|
-
const table = event.target;
|
|
71
|
-
const orderingColumn = table.orderingColumn;
|
|
72
|
-
const orderingDesc = table.orderingDesc;
|
|
73
|
-
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_collectionContext, "f")?.setFilter({
|
|
74
|
-
orderBy: orderingColumn,
|
|
75
|
-
orderDirection: orderingDesc ? 'desc' : 'asc',
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
57
|
render() {
|
|
79
58
|
if (this._loading) {
|
|
80
59
|
return html `<div class="container"><uui-loader></uui-loader></div>`;
|
|
@@ -88,9 +67,9 @@ let UmbDocumentTableCollectionViewElement = class UmbDocumentTableCollectionView
|
|
|
88
67
|
.columns=${this._tableColumns}
|
|
89
68
|
.items=${this._tableItems}
|
|
90
69
|
.selection=${this._selection}
|
|
91
|
-
@selected="${this
|
|
92
|
-
@deselected="${this
|
|
93
|
-
@ordered="${this
|
|
70
|
+
@selected="${__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_instances, "m", _UmbDocumentTableCollectionViewElement_handleSelect)}"
|
|
71
|
+
@deselected="${__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_instances, "m", _UmbDocumentTableCollectionViewElement_handleDeselect)}"
|
|
72
|
+
@ordered="${__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_instances, "m", _UmbDocumentTableCollectionViewElement_handleOrdering)}"></umb-table>
|
|
94
73
|
`;
|
|
95
74
|
}
|
|
96
75
|
};
|
|
@@ -142,6 +121,27 @@ _UmbDocumentTableCollectionViewElement_createTableItems = function _UmbDocumentT
|
|
|
142
121
|
};
|
|
143
122
|
});
|
|
144
123
|
};
|
|
124
|
+
_UmbDocumentTableCollectionViewElement_handleSelect = function _UmbDocumentTableCollectionViewElement_handleSelect(event) {
|
|
125
|
+
event.stopPropagation();
|
|
126
|
+
const table = event.target;
|
|
127
|
+
const selection = table.selection;
|
|
128
|
+
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_collectionContext, "f")?.selection.setSelection(selection);
|
|
129
|
+
};
|
|
130
|
+
_UmbDocumentTableCollectionViewElement_handleDeselect = function _UmbDocumentTableCollectionViewElement_handleDeselect(event) {
|
|
131
|
+
event.stopPropagation();
|
|
132
|
+
const table = event.target;
|
|
133
|
+
const selection = table.selection;
|
|
134
|
+
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_collectionContext, "f")?.selection.setSelection(selection);
|
|
135
|
+
};
|
|
136
|
+
_UmbDocumentTableCollectionViewElement_handleOrdering = function _UmbDocumentTableCollectionViewElement_handleOrdering(event) {
|
|
137
|
+
const table = event.target;
|
|
138
|
+
const orderingColumn = table.orderingColumn;
|
|
139
|
+
const orderingDesc = table.orderingDesc;
|
|
140
|
+
__classPrivateFieldGet(this, _UmbDocumentTableCollectionViewElement_collectionContext, "f")?.setFilter({
|
|
141
|
+
orderBy: orderingColumn,
|
|
142
|
+
orderDirection: orderingDesc ? 'desc' : 'asc',
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
145
|
UmbDocumentTableCollectionViewElement.styles = [
|
|
146
146
|
UmbTextStyles,
|
|
147
147
|
css `
|
|
@@ -6,7 +6,6 @@ import { UmbDocumentMoveEntityBulkAction } from './move/move.action.js';
|
|
|
6
6
|
import { UmbDocumentPublishEntityBulkAction } from './publish/publish.action.js';
|
|
7
7
|
import { UmbDocumentUnpublishEntityBulkAction } from './unpublish/unpublish.action.js';
|
|
8
8
|
import { UMB_COLLECTION_ALIAS_CONDITION, UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION, } from '../../../core/collection/index.js';
|
|
9
|
-
// TODO: [LK] Wondering how these actions could be wired up to the `bulkActionPermissions` config?
|
|
10
9
|
export const manifests = [
|
|
11
10
|
{
|
|
12
11
|
type: 'entityBulkAction',
|