@umbraco-cms/backoffice 14.0.0--preview007-5b109fa3 → 14.0.0--preview007-cccfbc9c
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 +47 -20
- package/dist-cms/mocks/data/data-type/data-type.data.js +34 -1
- package/dist-cms/mocks/data/document/document.data.js +7 -1
- package/dist-cms/mocks/data/document-type/document-type.data.js +25 -2
- package/dist-cms/packages/core/collection/action/collection-action-button.element.d.ts +1 -1
- package/dist-cms/packages/core/collection/collection-bulk-action-permission.condition.d.ts +14 -0
- package/dist-cms/packages/core/collection/collection-bulk-action-permission.condition.js +36 -0
- package/dist-cms/packages/core/collection/collection.element.d.ts +5 -3
- package/dist-cms/packages/core/collection/collection.element.js +40 -18
- package/dist-cms/packages/core/collection/components/collection-toolbar.element.js +1 -0
- package/dist-cms/packages/core/collection/components/collection-view-bundle.element.js +1 -1
- package/dist-cms/packages/core/collection/default/collection-default.context.d.ts +9 -2
- package/dist-cms/packages/core/collection/default/collection-default.context.js +20 -8
- package/dist-cms/packages/core/collection/index.d.ts +1 -0
- package/dist-cms/packages/core/collection/index.js +1 -0
- package/dist-cms/packages/core/collection/manifests.js +2 -1
- package/dist-cms/packages/core/collection/types.d.ts +14 -1
- package/dist-cms/packages/core/extension-registry/conditions/types.d.ts +2 -1
- package/dist-cms/packages/core/extension-registry/umbraco-package.d.ts +35 -0
- package/dist-cms/packages/core/property-editor/schemas/Umbraco.ListView.js +8 -8
- package/dist-cms/packages/core/property-editor/uis/collection-view/config/bulk-action-permissions/property-editor-ui-collection-view-bulk-action-permissions.element.d.ts +3 -9
- package/dist-cms/packages/core/property-editor/uis/collection-view/manifests.js +5 -5
- package/dist-cms/packages/core/property-editor/uis/collection-view/property-editor-ui-collection-view.element.d.ts +4 -3
- package/dist-cms/packages/core/property-editor/uis/collection-view/property-editor-ui-collection-view.element.js +27 -7
- package/dist-cms/packages/documents/documents/collection/action/create-document-collection-action.element.d.ts +19 -0
- package/dist-cms/packages/documents/documents/collection/action/create-document-collection-action.element.js +120 -0
- package/dist-cms/packages/documents/documents/collection/action/manifests.d.ts +3 -0
- package/dist-cms/packages/documents/documents/collection/action/manifests.js +19 -0
- package/dist-cms/packages/documents/documents/collection/document-collection-toolbar.element.d.ts +13 -0
- package/dist-cms/packages/documents/documents/collection/document-collection-toolbar.element.js +77 -0
- package/dist-cms/packages/documents/documents/collection/document-collection.context.d.ts +7 -0
- package/dist-cms/packages/documents/documents/collection/document-collection.context.js +8 -0
- package/dist-cms/packages/documents/documents/collection/document-collection.element.d.ts +11 -0
- package/dist-cms/packages/documents/documents/collection/document-collection.element.js +19 -0
- package/dist-cms/packages/documents/documents/collection/index.d.ts +1 -1
- package/dist-cms/packages/documents/documents/collection/index.js +1 -1
- package/dist-cms/packages/documents/documents/collection/manifests.d.ts +1 -3
- package/dist-cms/packages/documents/documents/collection/manifests.js +20 -27
- package/dist-cms/packages/documents/documents/collection/repository/document-collection.repository.d.ts +19 -0
- package/dist-cms/packages/documents/documents/collection/repository/document-collection.repository.js +25 -0
- package/dist-cms/packages/documents/documents/collection/repository/document-collection.server.data-source.d.ts +18 -0
- package/dist-cms/packages/documents/documents/collection/repository/document-collection.server.data-source.js +60 -0
- package/dist-cms/packages/documents/documents/collection/repository/index.d.ts +2 -0
- package/dist-cms/packages/documents/documents/collection/repository/index.js +2 -0
- package/dist-cms/packages/documents/documents/collection/repository/manifests.d.ts +2 -0
- package/dist-cms/packages/documents/documents/collection/repository/manifests.js +9 -0
- package/dist-cms/packages/documents/documents/collection/types.d.ts +5 -0
- package/dist-cms/packages/documents/documents/collection/types.js +1 -0
- package/dist-cms/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.d.ts +17 -0
- package/dist-cms/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.js +107 -0
- package/dist-cms/packages/documents/documents/collection/views/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/collection/views/index.js +1 -0
- package/dist-cms/packages/documents/documents/collection/views/manifests.d.ts +4 -0
- package/dist-cms/packages/documents/documents/collection/views/manifests.js +40 -0
- package/dist-cms/packages/documents/documents/collection/views/table/document-table-collection-view.element.d.ts +0 -1
- package/dist-cms/packages/documents/documents/collection/views/table/document-table-collection-view.element.js +19 -18
- package/dist-cms/packages/documents/documents/conditions/document-workspace-has-collection.condition.d.ts +11 -0
- package/dist-cms/packages/documents/documents/conditions/document-workspace-has-collection.condition.js +37 -0
- package/dist-cms/packages/documents/documents/conditions/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/conditions/index.js +1 -0
- package/dist-cms/packages/documents/documents/conditions/manifests.d.ts +1 -0
- package/dist-cms/packages/documents/documents/conditions/manifests.js +2 -0
- package/dist-cms/packages/documents/documents/entity-bulk-actions/delete/delete.action.d.ts +7 -0
- package/dist-cms/packages/documents/documents/entity-bulk-actions/delete/delete.action.js +10 -0
- package/dist-cms/packages/documents/documents/entity-bulk-actions/manifests.d.ts +1 -1
- package/dist-cms/packages/documents/documents/entity-bulk-actions/manifests.js +85 -14
- package/dist-cms/packages/documents/documents/entity-bulk-actions/publish/publish.action.d.ts +7 -0
- package/dist-cms/packages/documents/documents/entity-bulk-actions/publish/publish.action.js +10 -0
- package/dist-cms/packages/documents/documents/entity-bulk-actions/unpublish/unpublish.action.d.ts +7 -0
- package/dist-cms/packages/documents/documents/entity-bulk-actions/unpublish/unpublish.action.js +10 -0
- package/dist-cms/packages/documents/documents/index.d.ts +1 -0
- package/dist-cms/packages/documents/documents/index.js +1 -0
- package/dist-cms/packages/documents/documents/manifests.js +2 -0
- package/dist-cms/packages/documents/documents/repository/detail/document-detail.server.data-source.js +5 -1
- package/dist-cms/packages/documents/documents/tree/document-tree.server.data-source.js +1 -1
- package/dist-cms/packages/documents/documents/tree/types.d.ts +1 -1
- package/dist-cms/packages/documents/documents/types.d.ts +1 -0
- package/dist-cms/packages/documents/documents/workspace/document-workspace.context.d.ts +1 -0
- package/dist-cms/packages/documents/documents/workspace/document-workspace.context.js +5 -1
- package/dist-cms/packages/documents/documents/workspace/manifests.js +20 -2
- package/dist-cms/packages/documents/documents/workspace/views/collection/document-workspace-view-collection.element.d.ts +14 -0
- package/dist-cms/packages/documents/documents/workspace/views/collection/document-workspace-view-collection.element.js +65 -0
- package/dist-cms/packages/user/user/collection/user-collection.context.js +1 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/umbraco-package-schema.json +81 -0
- package/dist-cms/umbraco-package.json +1 -0
- package/dist-cms/vscode-html-custom-data.json +32 -12
- package/package.json +3 -2
|
@@ -1041,15 +1041,6 @@
|
|
|
1041
1041
|
}
|
|
1042
1042
|
]
|
|
1043
1043
|
},
|
|
1044
|
-
{
|
|
1045
|
-
"name": "umb-collection-action",
|
|
1046
|
-
"path": "./../src/packages/core/collection/action/collection-action-button.element.ts",
|
|
1047
|
-
"properties": [
|
|
1048
|
-
{
|
|
1049
|
-
"name": "manifest"
|
|
1050
|
-
}
|
|
1051
|
-
]
|
|
1052
|
-
},
|
|
1053
1044
|
{
|
|
1054
1045
|
"name": "umb-collection",
|
|
1055
1046
|
"path": "./../src/packages/core/collection/collection.element.ts",
|
|
@@ -1064,6 +1055,10 @@
|
|
|
1064
1055
|
"name": "alias",
|
|
1065
1056
|
"attribute": "alias",
|
|
1066
1057
|
"type": "string | undefined"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"name": "config",
|
|
1061
|
+
"type": "UmbCollectionConfiguration | undefined"
|
|
1067
1062
|
}
|
|
1068
1063
|
]
|
|
1069
1064
|
},
|
|
@@ -3943,14 +3938,14 @@
|
|
|
3943
3938
|
"attributes": [
|
|
3944
3939
|
{
|
|
3945
3940
|
"name": "value",
|
|
3946
|
-
"type": "
|
|
3941
|
+
"type": "UmbCollectionBulkActionPermissions"
|
|
3947
3942
|
}
|
|
3948
3943
|
],
|
|
3949
3944
|
"properties": [
|
|
3950
3945
|
{
|
|
3951
3946
|
"name": "value",
|
|
3952
3947
|
"attribute": "value",
|
|
3953
|
-
"type": "
|
|
3948
|
+
"type": "UmbCollectionBulkActionPermissions"
|
|
3954
3949
|
},
|
|
3955
3950
|
{
|
|
3956
3951
|
"name": "config"
|
|
@@ -4047,25 +4042,18 @@
|
|
|
4047
4042
|
"attributes": [
|
|
4048
4043
|
{
|
|
4049
4044
|
"name": "value",
|
|
4050
|
-
"type": "string"
|
|
4051
|
-
"default": "\"\""
|
|
4045
|
+
"type": "string | undefined"
|
|
4052
4046
|
}
|
|
4053
4047
|
],
|
|
4054
4048
|
"properties": [
|
|
4055
4049
|
{
|
|
4056
4050
|
"name": "value",
|
|
4057
4051
|
"attribute": "value",
|
|
4058
|
-
"type": "string"
|
|
4059
|
-
"default": "\"\""
|
|
4052
|
+
"type": "string | undefined"
|
|
4060
4053
|
},
|
|
4061
4054
|
{
|
|
4062
4055
|
"name": "config",
|
|
4063
4056
|
"type": "UmbPropertyEditorConfigCollection | undefined"
|
|
4064
|
-
},
|
|
4065
|
-
{
|
|
4066
|
-
"name": "styles",
|
|
4067
|
-
"type": "array",
|
|
4068
|
-
"default": "[\"UmbTextStyles\"]"
|
|
4069
4057
|
}
|
|
4070
4058
|
]
|
|
4071
4059
|
},
|
|
@@ -6357,6 +6345,41 @@
|
|
|
6357
6345
|
}
|
|
6358
6346
|
]
|
|
6359
6347
|
},
|
|
6348
|
+
{
|
|
6349
|
+
"name": "umb-create-document-collection-action",
|
|
6350
|
+
"path": "./../src/packages/documents/documents/collection/action/create-document-collection-action.element.ts",
|
|
6351
|
+
"properties": [
|
|
6352
|
+
{
|
|
6353
|
+
"name": "manifest"
|
|
6354
|
+
}
|
|
6355
|
+
]
|
|
6356
|
+
},
|
|
6357
|
+
{
|
|
6358
|
+
"name": "umb-document-collection-toolbar",
|
|
6359
|
+
"path": "./../src/packages/documents/documents/collection/document-collection-toolbar.element.ts",
|
|
6360
|
+
"properties": [
|
|
6361
|
+
{
|
|
6362
|
+
"name": "styles",
|
|
6363
|
+
"type": "array",
|
|
6364
|
+
"default": "[null]"
|
|
6365
|
+
}
|
|
6366
|
+
]
|
|
6367
|
+
},
|
|
6368
|
+
{
|
|
6369
|
+
"name": "umb-document-collection",
|
|
6370
|
+
"path": "./../src/packages/documents/documents/collection/document-collection.element.ts"
|
|
6371
|
+
},
|
|
6372
|
+
{
|
|
6373
|
+
"name": "umb-document-grid-collection-view",
|
|
6374
|
+
"path": "./../src/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.ts",
|
|
6375
|
+
"properties": [
|
|
6376
|
+
{
|
|
6377
|
+
"name": "styles",
|
|
6378
|
+
"type": "array",
|
|
6379
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
6380
|
+
}
|
|
6381
|
+
]
|
|
6382
|
+
},
|
|
6360
6383
|
{
|
|
6361
6384
|
"name": "umb-document-table-actions-column-layout",
|
|
6362
6385
|
"path": "./../src/packages/documents/documents/collection/views/table/column-layouts/document-table-actions-column-layout.element.ts",
|
|
@@ -6694,6 +6717,10 @@
|
|
|
6694
6717
|
}
|
|
6695
6718
|
]
|
|
6696
6719
|
},
|
|
6720
|
+
{
|
|
6721
|
+
"name": "umb-document-workspace-view-collection",
|
|
6722
|
+
"path": "./../src/packages/documents/documents/workspace/views/collection/document-workspace-view-collection.element.ts"
|
|
6723
|
+
},
|
|
6697
6724
|
{
|
|
6698
6725
|
"name": "umb-document-workspace-view-edit-properties",
|
|
6699
6726
|
"path": "./../src/packages/documents/documents/workspace/views/edit/document-workspace-view-edit-properties.element.ts",
|
|
@@ -693,7 +693,40 @@ export const data = [
|
|
|
693
693
|
editorUiAlias: 'Umb.PropertyEditorUi.CollectionView',
|
|
694
694
|
hasChildren: false,
|
|
695
695
|
isFolder: false,
|
|
696
|
-
values: [
|
|
696
|
+
values: [
|
|
697
|
+
{ alias: 'pageSize', value: 2 },
|
|
698
|
+
{ alias: 'orderDirection', value: 'desc' },
|
|
699
|
+
{
|
|
700
|
+
alias: 'includeProperties',
|
|
701
|
+
value: [
|
|
702
|
+
{ alias: 'sortOrder', header: 'Sort order', isSystem: true, nameTemplate: '' },
|
|
703
|
+
{ alias: 'updateDate', header: 'Last edited', isSystem: true },
|
|
704
|
+
{ alias: 'owner', header: 'Created by', isSystem: true },
|
|
705
|
+
],
|
|
706
|
+
},
|
|
707
|
+
{ alias: 'orderBy', value: 'updateDate' },
|
|
708
|
+
{
|
|
709
|
+
alias: 'bulkActionPermissions',
|
|
710
|
+
value: {
|
|
711
|
+
allowBulkPublish: true,
|
|
712
|
+
allowBulkUnpublish: false,
|
|
713
|
+
allowBulkCopy: true,
|
|
714
|
+
allowBulkMove: false,
|
|
715
|
+
allowBulkDelete: true,
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
alias: 'layouts',
|
|
720
|
+
value: [
|
|
721
|
+
{ icon: 'icon-grid', isSystem: true, name: 'Grid', path: '', selected: true },
|
|
722
|
+
{ icon: 'icon-list', isSystem: true, name: 'Table', path: '', selected: true },
|
|
723
|
+
],
|
|
724
|
+
},
|
|
725
|
+
{ alias: 'icon', value: 'icon-layers' },
|
|
726
|
+
{ alias: 'tabName', value: 'Children' },
|
|
727
|
+
{ alias: 'showContentFirst', value: true },
|
|
728
|
+
{ alias: 'useInfiniteEditor', value: true },
|
|
729
|
+
],
|
|
697
730
|
},
|
|
698
731
|
{
|
|
699
732
|
name: 'Icon Picker',
|
|
@@ -684,7 +684,7 @@ export const data = [
|
|
|
684
684
|
documentType: {
|
|
685
685
|
id: 'simple-document-type-id',
|
|
686
686
|
icon: 'icon-document',
|
|
687
|
-
hasListView:
|
|
687
|
+
hasListView: true,
|
|
688
688
|
},
|
|
689
689
|
hasChildren: false,
|
|
690
690
|
noAccess: false,
|
|
@@ -708,6 +708,12 @@ export const data = [
|
|
|
708
708
|
segment: null,
|
|
709
709
|
value: null,
|
|
710
710
|
},
|
|
711
|
+
{
|
|
712
|
+
alias: 'listView',
|
|
713
|
+
culture: null,
|
|
714
|
+
segment: null,
|
|
715
|
+
value: null,
|
|
716
|
+
},
|
|
711
717
|
],
|
|
712
718
|
},
|
|
713
719
|
];
|
|
@@ -673,7 +673,7 @@ export const data = [
|
|
|
673
673
|
alias: 'blogPost',
|
|
674
674
|
name: 'All property editors document type',
|
|
675
675
|
description: null,
|
|
676
|
-
icon: '
|
|
676
|
+
icon: 'icon-eco',
|
|
677
677
|
allowedAsRoot: true,
|
|
678
678
|
variesByCulture: true,
|
|
679
679
|
variesBySegment: false,
|
|
@@ -702,6 +702,26 @@ export const data = [
|
|
|
702
702
|
labelOnTop: false,
|
|
703
703
|
},
|
|
704
704
|
},
|
|
705
|
+
{
|
|
706
|
+
id: '7',
|
|
707
|
+
container: { id: 'all-properties-group-key' },
|
|
708
|
+
alias: 'listView',
|
|
709
|
+
name: 'List View',
|
|
710
|
+
description: '',
|
|
711
|
+
dataType: { id: 'dt-collectionView' },
|
|
712
|
+
variesByCulture: false,
|
|
713
|
+
variesBySegment: false,
|
|
714
|
+
sortOrder: 1,
|
|
715
|
+
validation: {
|
|
716
|
+
mandatory: false,
|
|
717
|
+
mandatoryMessage: null,
|
|
718
|
+
regEx: null,
|
|
719
|
+
regExMessage: null,
|
|
720
|
+
},
|
|
721
|
+
appearance: {
|
|
722
|
+
labelOnTop: false,
|
|
723
|
+
},
|
|
724
|
+
},
|
|
705
725
|
],
|
|
706
726
|
containers: [
|
|
707
727
|
{
|
|
@@ -712,7 +732,10 @@ export const data = [
|
|
|
712
732
|
sortOrder: 0,
|
|
713
733
|
},
|
|
714
734
|
],
|
|
715
|
-
allowedDocumentTypes: [
|
|
735
|
+
allowedDocumentTypes: [
|
|
736
|
+
{ documentType: { id: 'simple-document-type-id' }, sortOrder: 0 },
|
|
737
|
+
{ documentType: { id: '29643452-cff9-47f2-98cd-7de4b6807681' }, sortOrder: 1 },
|
|
738
|
+
],
|
|
716
739
|
compositions: [],
|
|
717
740
|
cleanup: {
|
|
718
741
|
preventCleanup: false,
|
|
@@ -12,6 +12,6 @@ export declare class UmbCollectionActionButtonElement extends UmbLitElement {
|
|
|
12
12
|
export default UmbCollectionActionButtonElement;
|
|
13
13
|
declare global {
|
|
14
14
|
interface HTMLElementTagNameMap {
|
|
15
|
-
'umb-collection-action': UmbCollectionActionButtonElement;
|
|
15
|
+
'umb-collection-action-button': UmbCollectionActionButtonElement;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { UmbCollectionBulkActionPermissions } from './types.js';
|
|
2
|
+
import { UmbBaseController } from '../../../libs/class-api/index.js';
|
|
3
|
+
import type { ManifestCondition, UmbConditionConfigBase, UmbConditionControllerArguments, UmbExtensionCondition } from '../../../libs/extension-api/index.js';
|
|
4
|
+
export declare class UmbCollectionBulkActionPermissionCondition extends UmbBaseController implements UmbExtensionCondition {
|
|
5
|
+
#private;
|
|
6
|
+
config: CollectionBulkActionPermissionConditionConfig;
|
|
7
|
+
permitted: boolean;
|
|
8
|
+
constructor(args: UmbConditionControllerArguments<CollectionBulkActionPermissionConditionConfig>);
|
|
9
|
+
}
|
|
10
|
+
export type CollectionBulkActionPermissionConditionConfig = UmbConditionConfigBase<typeof UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION> & {
|
|
11
|
+
match: (permissions: UmbCollectionBulkActionPermissions) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION = "Umb.Condition.CollectionBulkActionPermission";
|
|
14
|
+
export declare const manifest: ManifestCondition;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
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");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
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 _UmbCollectionBulkActionPermissionCondition_onChange;
|
|
13
|
+
import { UMB_DEFAULT_COLLECTION_CONTEXT } from './default/collection-default.context.js';
|
|
14
|
+
import { UmbBaseController } from '../../../libs/class-api/index.js';
|
|
15
|
+
export class UmbCollectionBulkActionPermissionCondition extends UmbBaseController {
|
|
16
|
+
constructor(args) {
|
|
17
|
+
super(args.host);
|
|
18
|
+
this.permitted = false;
|
|
19
|
+
_UmbCollectionBulkActionPermissionCondition_onChange.set(this, void 0);
|
|
20
|
+
this.config = args.config;
|
|
21
|
+
__classPrivateFieldSet(this, _UmbCollectionBulkActionPermissionCondition_onChange, args.onChange, "f");
|
|
22
|
+
this.consumeContext(UMB_DEFAULT_COLLECTION_CONTEXT, (context) => {
|
|
23
|
+
const allowedActions = context.getConfig().allowedEntityBulkActions;
|
|
24
|
+
this.permitted = allowedActions ? this.config.match(allowedActions) : false;
|
|
25
|
+
__classPrivateFieldGet(this, _UmbCollectionBulkActionPermissionCondition_onChange, "f").call(this);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
_UmbCollectionBulkActionPermissionCondition_onChange = new WeakMap();
|
|
30
|
+
export const UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION = 'Umb.Condition.CollectionBulkActionPermission';
|
|
31
|
+
export const manifest = {
|
|
32
|
+
type: 'condition',
|
|
33
|
+
name: 'Collection Bulk Action Permission Condition',
|
|
34
|
+
alias: UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION,
|
|
35
|
+
api: UmbCollectionBulkActionPermissionCondition,
|
|
36
|
+
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { UmbCollectionConfiguration } from './types.js';
|
|
1
2
|
import { UmbLitElement } from '../lit-element/index.js';
|
|
2
3
|
export declare class UmbCollectionElement extends UmbLitElement {
|
|
3
4
|
#private;
|
|
4
|
-
_alias?: string;
|
|
5
|
-
get alias(): string | undefined;
|
|
6
5
|
set alias(newVal: string | undefined);
|
|
6
|
+
get alias(): string | undefined;
|
|
7
|
+
set config(newVal: UmbCollectionConfiguration | undefined);
|
|
8
|
+
get config(): UmbCollectionConfiguration | undefined;
|
|
7
9
|
_element: HTMLElement | undefined;
|
|
8
|
-
render():
|
|
10
|
+
render(): HTMLElement | undefined;
|
|
9
11
|
}
|
|
10
12
|
declare global {
|
|
11
13
|
interface HTMLElementTagNameMap {
|
|
@@ -4,45 +4,58 @@ 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
7
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13
8
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14
9
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15
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");
|
|
16
11
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17
12
|
};
|
|
18
|
-
var
|
|
19
|
-
|
|
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 _UmbCollectionElement_instances, _UmbCollectionElement_alias, _UmbCollectionElement_config, _UmbCollectionElement_manifest, _UmbCollectionElement_api, _UmbCollectionElement_observeManifest, _UmbCollectionElement_createApi, _UmbCollectionElement_createElement, _UmbCollectionElement_setConfig;
|
|
19
|
+
import { customElement, property, state } from '../../../external/lit/index.js';
|
|
20
|
+
import { createExtensionApi, createExtensionElement } from '../../../libs/extension-api/index.js';
|
|
20
21
|
import { UmbLitElement } from '../lit-element/index.js';
|
|
21
22
|
import { umbExtensionsRegistry } from '../extension-registry/index.js';
|
|
22
|
-
import { createExtensionApi, createExtensionElement } from '../../../libs/extension-api/index.js';
|
|
23
23
|
let UmbCollectionElement = class UmbCollectionElement extends UmbLitElement {
|
|
24
24
|
constructor() {
|
|
25
25
|
super(...arguments);
|
|
26
26
|
_UmbCollectionElement_instances.add(this);
|
|
27
|
+
_UmbCollectionElement_alias.set(this, void 0);
|
|
28
|
+
_UmbCollectionElement_config.set(this, { pageSize: 50 });
|
|
27
29
|
_UmbCollectionElement_manifest.set(this, void 0);
|
|
28
|
-
|
|
29
|
-
get alias() {
|
|
30
|
-
return this._alias;
|
|
30
|
+
_UmbCollectionElement_api.set(this, void 0);
|
|
31
31
|
}
|
|
32
32
|
set alias(newVal) {
|
|
33
|
-
this
|
|
33
|
+
__classPrivateFieldSet(this, _UmbCollectionElement_alias, newVal, "f");
|
|
34
34
|
__classPrivateFieldGet(this, _UmbCollectionElement_instances, "m", _UmbCollectionElement_observeManifest).call(this);
|
|
35
35
|
}
|
|
36
|
+
get alias() {
|
|
37
|
+
return __classPrivateFieldGet(this, _UmbCollectionElement_alias, "f");
|
|
38
|
+
}
|
|
39
|
+
set config(newVal) {
|
|
40
|
+
__classPrivateFieldSet(this, _UmbCollectionElement_config, newVal, "f");
|
|
41
|
+
__classPrivateFieldGet(this, _UmbCollectionElement_instances, "m", _UmbCollectionElement_setConfig).call(this);
|
|
42
|
+
}
|
|
43
|
+
get config() {
|
|
44
|
+
return __classPrivateFieldGet(this, _UmbCollectionElement_config, "f");
|
|
45
|
+
}
|
|
36
46
|
render() {
|
|
37
|
-
return
|
|
47
|
+
return this._element;
|
|
38
48
|
}
|
|
39
49
|
};
|
|
50
|
+
_UmbCollectionElement_alias = new WeakMap();
|
|
51
|
+
_UmbCollectionElement_config = new WeakMap();
|
|
40
52
|
_UmbCollectionElement_manifest = new WeakMap();
|
|
53
|
+
_UmbCollectionElement_api = new WeakMap();
|
|
41
54
|
_UmbCollectionElement_instances = new WeakSet();
|
|
42
55
|
_UmbCollectionElement_observeManifest = function _UmbCollectionElement_observeManifest() {
|
|
43
|
-
if (!this
|
|
56
|
+
if (!__classPrivateFieldGet(this, _UmbCollectionElement_alias, "f"))
|
|
44
57
|
return;
|
|
45
|
-
this.observe(umbExtensionsRegistry.byTypeAndAlias('collection', this
|
|
58
|
+
this.observe(umbExtensionsRegistry.byTypeAndAlias('collection', __classPrivateFieldGet(this, _UmbCollectionElement_alias, "f")), async (manifest) => {
|
|
46
59
|
if (!manifest)
|
|
47
60
|
return;
|
|
48
61
|
__classPrivateFieldSet(this, _UmbCollectionElement_manifest, manifest, "f");
|
|
@@ -53,10 +66,11 @@ _UmbCollectionElement_observeManifest = function _UmbCollectionElement_observeMa
|
|
|
53
66
|
_UmbCollectionElement_createApi = async function _UmbCollectionElement_createApi() {
|
|
54
67
|
if (!__classPrivateFieldGet(this, _UmbCollectionElement_manifest, "f"))
|
|
55
68
|
throw new Error('No manifest');
|
|
56
|
-
|
|
57
|
-
if (!
|
|
69
|
+
__classPrivateFieldSet(this, _UmbCollectionElement_api, (await createExtensionApi(__classPrivateFieldGet(this, _UmbCollectionElement_manifest, "f"), [this])), "f");
|
|
70
|
+
if (!__classPrivateFieldGet(this, _UmbCollectionElement_api, "f"))
|
|
58
71
|
throw new Error('No api');
|
|
59
|
-
|
|
72
|
+
__classPrivateFieldGet(this, _UmbCollectionElement_api, "f").setManifest(__classPrivateFieldGet(this, _UmbCollectionElement_manifest, "f"));
|
|
73
|
+
__classPrivateFieldGet(this, _UmbCollectionElement_instances, "m", _UmbCollectionElement_setConfig).call(this);
|
|
60
74
|
};
|
|
61
75
|
_UmbCollectionElement_createElement = async function _UmbCollectionElement_createElement() {
|
|
62
76
|
if (!__classPrivateFieldGet(this, _UmbCollectionElement_manifest, "f"))
|
|
@@ -64,9 +78,17 @@ _UmbCollectionElement_createElement = async function _UmbCollectionElement_creat
|
|
|
64
78
|
this._element = await createExtensionElement(__classPrivateFieldGet(this, _UmbCollectionElement_manifest, "f"));
|
|
65
79
|
this.requestUpdate();
|
|
66
80
|
};
|
|
81
|
+
_UmbCollectionElement_setConfig = function _UmbCollectionElement_setConfig() {
|
|
82
|
+
if (!__classPrivateFieldGet(this, _UmbCollectionElement_config, "f") || !__classPrivateFieldGet(this, _UmbCollectionElement_api, "f"))
|
|
83
|
+
return;
|
|
84
|
+
__classPrivateFieldGet(this, _UmbCollectionElement_api, "f").setConfig(__classPrivateFieldGet(this, _UmbCollectionElement_config, "f"));
|
|
85
|
+
};
|
|
67
86
|
__decorate([
|
|
68
87
|
property({ type: String, reflect: true })
|
|
69
88
|
], UmbCollectionElement.prototype, "alias", null);
|
|
89
|
+
__decorate([
|
|
90
|
+
property({ type: Object, attribute: false })
|
|
91
|
+
], UmbCollectionElement.prototype, "config", null);
|
|
70
92
|
__decorate([
|
|
71
93
|
state()
|
|
72
94
|
], UmbCollectionElement.prototype, "_element", void 0);
|
|
@@ -44,7 +44,7 @@ let UmbCollectionViewBundleElement = class UmbCollectionViewBundleElement extend
|
|
|
44
44
|
<uui-button compact popovertarget="collection-view-bundle-popover" label="status">
|
|
45
45
|
${__classPrivateFieldGet(this, _UmbCollectionViewBundleElement_instances, "m", _UmbCollectionViewBundleElement_renderItemDisplay).call(this, this._currentView)}
|
|
46
46
|
</uui-button>
|
|
47
|
-
<uui-popover-container id="collection-view-bundle-popover" placement="bottom">
|
|
47
|
+
<uui-popover-container id="collection-view-bundle-popover" placement="bottom-end">
|
|
48
48
|
<umb-popover-layout>
|
|
49
49
|
<div class="filter-dropdown">${this._views.map((view) => __classPrivateFieldGet(this, _UmbCollectionViewBundleElement_instances, "m", _UmbCollectionViewBundleElement_renderItem).call(this, view))}</div>
|
|
50
50
|
</umb-popover-layout>
|
|
@@ -2,7 +2,7 @@ import type { UmbCollectionConfiguration, UmbCollectionContext } from '../types.
|
|
|
2
2
|
import { UmbCollectionViewManager } from '../collection-view.manager.js';
|
|
3
3
|
import type { UmbCollectionRepository } from '../../repository/index.js';
|
|
4
4
|
import { UmbContextBase } from '../../../../libs/class-api/index.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { UmbControllerHost } from '../../../../libs/controller-api/index.js';
|
|
6
6
|
import { UmbContextToken } from '../../../../libs/context-api/index.js';
|
|
7
7
|
import type { UmbApi } from '../../../../libs/extension-api/index.js';
|
|
8
8
|
import type { ManifestCollection } from '../../extension-registry/index.js';
|
|
@@ -17,7 +17,14 @@ export declare class UmbDefaultCollectionContext<CollectionItemType = any, Filte
|
|
|
17
17
|
readonly pagination: UmbPaginationManager;
|
|
18
18
|
readonly selection: UmbSelectionManager;
|
|
19
19
|
readonly view: UmbCollectionViewManager;
|
|
20
|
-
constructor(host:
|
|
20
|
+
constructor(host: UmbControllerHost, defaultViewAlias: string);
|
|
21
|
+
/**
|
|
22
|
+
* Sets the configuration for the collection.
|
|
23
|
+
* @param {UmbCollectionConfiguration} config
|
|
24
|
+
* @memberof UmbCollectionContext
|
|
25
|
+
*/
|
|
26
|
+
setConfig(config: UmbCollectionConfiguration): void;
|
|
27
|
+
getConfig(): UmbCollectionConfiguration;
|
|
21
28
|
/**
|
|
22
29
|
* Sets the manifest for the collection.
|
|
23
30
|
* @param {ManifestCollection} manifest
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
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
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _UmbDefaultCollectionContext_instances, _UmbDefaultCollectionContext_manifest, _UmbDefaultCollectionContext_items, _UmbDefaultCollectionContext_totalItems, _UmbDefaultCollectionContext_filter, _UmbDefaultCollectionContext_initResolver, _UmbDefaultCollectionContext_initialized, _UmbDefaultCollectionContext_init, _UmbDefaultCollectionContext_checkIfInitialized, _UmbDefaultCollectionContext_configure, _UmbDefaultCollectionContext_onPageChange, _UmbDefaultCollectionContext_observeRepository;
|
|
12
|
+
var _UmbDefaultCollectionContext_instances, _UmbDefaultCollectionContext_manifest, _UmbDefaultCollectionContext_items, _UmbDefaultCollectionContext_totalItems, _UmbDefaultCollectionContext_filter, _UmbDefaultCollectionContext_initResolver, _UmbDefaultCollectionContext_initialized, _UmbDefaultCollectionContext_init, _UmbDefaultCollectionContext_checkIfInitialized, _UmbDefaultCollectionContext_config, _UmbDefaultCollectionContext_configure, _UmbDefaultCollectionContext_onPageChange, _UmbDefaultCollectionContext_observeRepository;
|
|
13
13
|
import { UmbCollectionViewManager } from '../collection-view.manager.js';
|
|
14
14
|
import { UmbContextBase } from '../../../../libs/class-api/index.js';
|
|
15
15
|
import { UmbContextToken } from '../../../../libs/context-api/index.js';
|
|
@@ -19,7 +19,7 @@ import { umbExtensionsRegistry } from '../../extension-registry/index.js';
|
|
|
19
19
|
import { UmbSelectionManager, UmbPaginationManager } from '../../../../shared/utils/index.js';
|
|
20
20
|
import { UmbChangeEvent } from '../../event/index.js';
|
|
21
21
|
export class UmbDefaultCollectionContext extends UmbContextBase {
|
|
22
|
-
constructor(host,
|
|
22
|
+
constructor(host, defaultViewAlias) {
|
|
23
23
|
super(host, UMB_DEFAULT_COLLECTION_CONTEXT);
|
|
24
24
|
_UmbDefaultCollectionContext_instances.add(this);
|
|
25
25
|
_UmbDefaultCollectionContext_manifest.set(this, void 0);
|
|
@@ -36,6 +36,7 @@ export class UmbDefaultCollectionContext extends UmbContextBase {
|
|
|
36
36
|
}));
|
|
37
37
|
this.pagination = new UmbPaginationManager();
|
|
38
38
|
this.selection = new UmbSelectionManager(this);
|
|
39
|
+
_UmbDefaultCollectionContext_config.set(this, { pageSize: 50 });
|
|
39
40
|
_UmbDefaultCollectionContext_onPageChange.set(this, (event) => {
|
|
40
41
|
const target = event.target;
|
|
41
42
|
const skipFilter = { skip: target.getSkip() };
|
|
@@ -43,8 +44,19 @@ export class UmbDefaultCollectionContext extends UmbContextBase {
|
|
|
43
44
|
});
|
|
44
45
|
// listen for page changes on the pagination manager
|
|
45
46
|
this.pagination.addEventListener(UmbChangeEvent.TYPE, __classPrivateFieldGet(this, _UmbDefaultCollectionContext_onPageChange, "f"));
|
|
46
|
-
this.view = new UmbCollectionViewManager(this, { defaultViewAlias:
|
|
47
|
-
|
|
47
|
+
this.view = new UmbCollectionViewManager(this, { defaultViewAlias: defaultViewAlias });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Sets the configuration for the collection.
|
|
51
|
+
* @param {UmbCollectionConfiguration} config
|
|
52
|
+
* @memberof UmbCollectionContext
|
|
53
|
+
*/
|
|
54
|
+
setConfig(config) {
|
|
55
|
+
__classPrivateFieldSet(this, _UmbDefaultCollectionContext_config, config, "f");
|
|
56
|
+
__classPrivateFieldGet(this, _UmbDefaultCollectionContext_instances, "m", _UmbDefaultCollectionContext_configure).call(this);
|
|
57
|
+
}
|
|
58
|
+
getConfig() {
|
|
59
|
+
return __classPrivateFieldGet(this, _UmbDefaultCollectionContext_config, "f");
|
|
48
60
|
}
|
|
49
61
|
/**
|
|
50
62
|
* Sets the manifest for the collection.
|
|
@@ -94,15 +106,15 @@ export class UmbDefaultCollectionContext extends UmbContextBase {
|
|
|
94
106
|
this.requestCollection();
|
|
95
107
|
}
|
|
96
108
|
}
|
|
97
|
-
_UmbDefaultCollectionContext_manifest = new WeakMap(), _UmbDefaultCollectionContext_items = new WeakMap(), _UmbDefaultCollectionContext_totalItems = new WeakMap(), _UmbDefaultCollectionContext_filter = new WeakMap(), _UmbDefaultCollectionContext_initResolver = new WeakMap(), _UmbDefaultCollectionContext_initialized = new WeakMap(), _UmbDefaultCollectionContext_init = new WeakMap(), _UmbDefaultCollectionContext_onPageChange = new WeakMap(), _UmbDefaultCollectionContext_instances = new WeakSet(), _UmbDefaultCollectionContext_checkIfInitialized = function _UmbDefaultCollectionContext_checkIfInitialized() {
|
|
109
|
+
_UmbDefaultCollectionContext_manifest = new WeakMap(), _UmbDefaultCollectionContext_items = new WeakMap(), _UmbDefaultCollectionContext_totalItems = new WeakMap(), _UmbDefaultCollectionContext_filter = new WeakMap(), _UmbDefaultCollectionContext_initResolver = new WeakMap(), _UmbDefaultCollectionContext_initialized = new WeakMap(), _UmbDefaultCollectionContext_init = new WeakMap(), _UmbDefaultCollectionContext_config = new WeakMap(), _UmbDefaultCollectionContext_onPageChange = new WeakMap(), _UmbDefaultCollectionContext_instances = new WeakSet(), _UmbDefaultCollectionContext_checkIfInitialized = function _UmbDefaultCollectionContext_checkIfInitialized() {
|
|
98
110
|
if (this.repository) {
|
|
99
111
|
__classPrivateFieldSet(this, _UmbDefaultCollectionContext_initialized, true, "f");
|
|
100
112
|
__classPrivateFieldGet(this, _UmbDefaultCollectionContext_initResolver, "f")?.call(this);
|
|
101
113
|
}
|
|
102
|
-
}, _UmbDefaultCollectionContext_configure = function _UmbDefaultCollectionContext_configure(
|
|
114
|
+
}, _UmbDefaultCollectionContext_configure = function _UmbDefaultCollectionContext_configure() {
|
|
103
115
|
this.selection.setMultiple(true);
|
|
104
|
-
this.pagination.setPageSize(
|
|
105
|
-
__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").setValue({ ...__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue(), skip: 0, take:
|
|
116
|
+
this.pagination.setPageSize(__classPrivateFieldGet(this, _UmbDefaultCollectionContext_config, "f").pageSize);
|
|
117
|
+
__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").setValue({ ...__classPrivateFieldGet(this, _UmbDefaultCollectionContext_filter, "f").getValue(), skip: 0, take: __classPrivateFieldGet(this, _UmbDefaultCollectionContext_config, "f").pageSize });
|
|
106
118
|
}, _UmbDefaultCollectionContext_observeRepository = function _UmbDefaultCollectionContext_observeRepository(repositoryAlias) {
|
|
107
119
|
new UmbExtensionApiInitializer(this, umbExtensionsRegistry, repositoryAlias, [this._host], (permitted, ctrl) => {
|
|
108
120
|
this.repository = permitted ? ctrl.api : undefined;
|
|
@@ -7,4 +7,5 @@ export * from './components/index.js';
|
|
|
7
7
|
export * from './default/collection-default.context.js';
|
|
8
8
|
export * from './collection-filter-model.interface.js';
|
|
9
9
|
export { UMB_COLLECTION_ALIAS_CONDITION } from './collection-alias.condition.js';
|
|
10
|
+
export { UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION } from './collection-bulk-action-permission.condition.js';
|
|
10
11
|
export { UmbCollectionActionElement, UmbCollectionActionBase } from './action/index.js';
|
|
@@ -7,4 +7,5 @@ export * from './components/index.js';
|
|
|
7
7
|
export * from './default/collection-default.context.js';
|
|
8
8
|
export * from './collection-filter-model.interface.js';
|
|
9
9
|
export { UMB_COLLECTION_ALIAS_CONDITION } from './collection-alias.condition.js';
|
|
10
|
+
export { UMB_COLLECTION_BULK_ACTION_PERMISSION_CONDITION } from './collection-bulk-action-permission.condition.js';
|
|
10
11
|
export { UmbCollectionActionElement, UmbCollectionActionBase } from './action/index.js';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { manifest as collectionAliasCondition } from './collection-alias.condition.js';
|
|
2
|
-
|
|
2
|
+
import { manifest as collectionBulkActionPermissionCondition } from './collection-bulk-action-permission.condition.js';
|
|
3
|
+
export const manifests = [collectionAliasCondition, collectionBulkActionPermissionCondition];
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import type { ManifestCollection } from '../extension-registry/index.js';
|
|
2
2
|
import type { Observable } from '../../../external/rxjs/index.js';
|
|
3
3
|
import type { UmbPaginationManager } from '../../../shared/utils/index.js';
|
|
4
|
+
export interface UmbCollectionBulkActionPermissions {
|
|
5
|
+
allowBulkCopy: boolean;
|
|
6
|
+
allowBulkDelete: boolean;
|
|
7
|
+
allowBulkMove: boolean;
|
|
8
|
+
allowBulkPublish: boolean;
|
|
9
|
+
allowBulkUnpublish: boolean;
|
|
10
|
+
}
|
|
4
11
|
export interface UmbCollectionConfiguration {
|
|
12
|
+
allowedEntityBulkActions?: UmbCollectionBulkActionPermissions;
|
|
13
|
+
includeProperties?: Array<any>;
|
|
14
|
+
orderBy?: string;
|
|
15
|
+
orderDirection?: string;
|
|
5
16
|
pageSize?: number;
|
|
6
|
-
|
|
17
|
+
useInfiniteEditor?: boolean;
|
|
7
18
|
}
|
|
8
19
|
export interface UmbCollectionContext {
|
|
20
|
+
setConfig(config: UmbCollectionConfiguration): void;
|
|
21
|
+
getConfig(): UmbCollectionConfiguration | undefined;
|
|
9
22
|
setManifest(manifest: ManifestCollection): void;
|
|
10
23
|
getManifest(): ManifestCollection | undefined;
|
|
11
24
|
requestCollection(): Promise<void>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { CollectionAliasConditionConfig } from '../../collection/collection-alias.condition.js';
|
|
2
|
+
import type { CollectionBulkActionPermissionConditionConfig } from '../../collection/collection-bulk-action-permission.condition.js';
|
|
2
3
|
import type { SectionAliasConditionConfig } from './section-alias.condition.js';
|
|
3
4
|
import type { SwitchConditionConfig } from './switch.condition.js';
|
|
4
5
|
import type { UserPermissionConditionConfig } from '../../../user/user-permission/index.js';
|
|
5
6
|
import type { BlockWorkspaceHasSettingsConditionConfig } from '../../../block/index.js';
|
|
6
7
|
import type { WorkspaceAliasConditionConfig, WorkspaceEntityTypeConditionConfig } from '../../workspace/index.js';
|
|
7
8
|
import type { UmbConditionConfigBase } from '../../../../libs/extension-api/index.js';
|
|
8
|
-
export type ConditionTypes = CollectionAliasConditionConfig | SectionAliasConditionConfig | WorkspaceAliasConditionConfig | BlockWorkspaceHasSettingsConditionConfig | WorkspaceEntityTypeConditionConfig | SwitchConditionConfig | UserPermissionConditionConfig | UmbConditionConfigBase;
|
|
9
|
+
export type ConditionTypes = CollectionAliasConditionConfig | CollectionBulkActionPermissionConditionConfig | SectionAliasConditionConfig | WorkspaceAliasConditionConfig | BlockWorkspaceHasSettingsConditionConfig | WorkspaceEntityTypeConditionConfig | SwitchConditionConfig | UserPermissionConditionConfig | UmbConditionConfigBase;
|
|
@@ -27,4 +27,39 @@ export interface UmbracoPackage {
|
|
|
27
27
|
* @required
|
|
28
28
|
*/
|
|
29
29
|
extensions: ManifestTypes[];
|
|
30
|
+
/**
|
|
31
|
+
* @title The importmap for the package
|
|
32
|
+
* @description This is used to define the imports and the scopes for the package to be used in the browser. It will be combined with the global importmap.
|
|
33
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap
|
|
34
|
+
*/
|
|
35
|
+
importmap?: UmbracoPackageImportmap;
|
|
36
|
+
}
|
|
37
|
+
export interface UmbracoPackageImportmap {
|
|
38
|
+
/**
|
|
39
|
+
* @title A module specifier with a path for the importmap
|
|
40
|
+
* @description This is used to define the module specifiers and their respective paths for the package to be used in the browser.
|
|
41
|
+
* @examples [{
|
|
42
|
+
* "library": "./path/to/library.js",
|
|
43
|
+
* "library/*": "./path/to/library/*"
|
|
44
|
+
* }]
|
|
45
|
+
* @required
|
|
46
|
+
* @minProperties 1
|
|
47
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap#imports
|
|
48
|
+
*/
|
|
49
|
+
imports: UmbracoPackageImportmapValue;
|
|
50
|
+
/**
|
|
51
|
+
* @title The importmap scopes for the package
|
|
52
|
+
* @description This is used to define the scopes for the package to be used in the browser. It has to specify a path and a value that is an object with module specifiers and their respective paths.
|
|
53
|
+
* @examples [{
|
|
54
|
+
* "/path/to/library": { "library": "./path/to/some/other/library.js" }
|
|
55
|
+
* }]
|
|
56
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap#scopes
|
|
57
|
+
*/
|
|
58
|
+
scopes?: UmbracoPackageImportmapScopes;
|
|
59
|
+
}
|
|
60
|
+
export interface UmbracoPackageImportmapScopes {
|
|
61
|
+
[key: string]: UmbracoPackageImportmapValue;
|
|
62
|
+
}
|
|
63
|
+
export interface UmbracoPackageImportmapValue {
|
|
64
|
+
[key: string]: string;
|
|
30
65
|
}
|