@umbraco-cms/backoffice 14.0.0--preview004-eaff2f45 → 14.0.0--preview004-8702aedd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/apps/backoffice/backoffice.element.js +1 -0
- package/dist-cms/custom-elements.json +103 -0
- package/dist-cms/mocks/browser-handlers.js +22 -20
- package/dist-cms/mocks/data/data-type.data.js +9 -0
- package/dist-cms/mocks/data/document-type/document-type.data.js +20 -0
- package/dist-cms/mocks/data/scripts.data.js +5 -5
- package/dist-cms/mocks/data/static-file.data.d.ts +15 -0
- package/dist-cms/mocks/data/static-file.data.js +46 -0
- package/dist-cms/mocks/data/utils.js +2 -2
- package/dist-cms/mocks/handlers/static-file.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/static-file.handlers.js +35 -0
- package/dist-cms/packages/core/data-type/workspace/data-type-workspace.element.d.ts +0 -1
- package/dist-cms/packages/core/data-type/workspace/data-type-workspace.element.js +5 -5
- package/dist-cms/packages/core/modal/token/index.d.ts +10 -10
- package/dist-cms/packages/core/modal/token/index.js +10 -10
- package/dist-cms/packages/dictionary/dictionary/workspace/dictionary-workspace.element.js +4 -4
- package/dist-cms/packages/documents/document-types/workspace/document-type-workspace.element.js +5 -2
- package/dist-cms/packages/documents/documents/components/input-document/input-document.context.js +2 -1
- package/dist-cms/packages/documents/documents/property-editors/document-picker/property-editor-ui-document-picker.element.js +4 -4
- package/dist-cms/packages/documents/documents/repository/document.repository.js +2 -2
- package/dist-cms/packages/documents/documents/workspace/document-workspace.element.d.ts +0 -1
- package/dist-cms/packages/documents/documents/workspace/document-workspace.element.js +5 -3
- package/dist-cms/packages/media/media/workspace/media-workspace.element.js +5 -2
- package/dist-cms/packages/media/media-types/workspace/media-type-workspace.element.js +4 -4
- package/dist-cms/packages/members/member-groups/workspace/member-group-workspace.element.js +3 -3
- package/dist-cms/packages/members/member-types/workspace/member-type-workspace.element.js +3 -3
- package/dist-cms/packages/members/members/workspace/member-workspace.element.js +3 -3
- package/dist-cms/packages/settings/languages/workspace/language/language-workspace.element.js +5 -14
- package/dist-cms/packages/settings/relation-types/workspace/relation-type-workspace.element.d.ts +0 -1
- package/dist-cms/packages/settings/relation-types/workspace/relation-type-workspace.element.js +5 -5
- package/dist-cms/packages/static-file/components/index.d.ts +1 -0
- package/dist-cms/packages/static-file/components/index.js +1 -0
- package/dist-cms/packages/static-file/components/input-static-file/index.d.ts +2 -0
- package/dist-cms/packages/static-file/components/input-static-file/index.js +2 -0
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.context.d.ts +6 -0
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.context.js +8 -0
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.element.d.ts +50 -0
- package/dist-cms/packages/static-file/components/input-static-file/input-static-file.element.js +137 -0
- package/dist-cms/packages/static-file/entity.d.ts +2 -0
- package/dist-cms/packages/static-file/entity.js +2 -0
- package/dist-cms/packages/static-file/index.d.ts +3 -0
- package/dist-cms/packages/static-file/index.js +3 -0
- package/dist-cms/packages/static-file/manifests.d.ts +1 -0
- package/dist-cms/packages/static-file/manifests.js +4 -0
- package/dist-cms/packages/static-file/modals/index.d.ts +1 -0
- package/dist-cms/packages/static-file/modals/index.js +1 -0
- package/dist-cms/packages/static-file/modals/static-file-picker-modal.token.d.ts +5 -0
- package/dist-cms/packages/static-file/modals/static-file-picker-modal.token.js +11 -0
- package/dist-cms/packages/static-file/property-editors/manifests.d.ts +1 -0
- package/dist-cms/packages/static-file/property-editors/manifests.js +2 -0
- package/dist-cms/packages/static-file/property-editors/static-file-picker/manifests.d.ts +2 -0
- package/dist-cms/packages/static-file/property-editors/static-file-picker/manifests.js +11 -0
- package/dist-cms/packages/static-file/property-editors/static-file-picker/property-editor-ui-static-file-picker.element.d.ts +20 -0
- package/dist-cms/packages/static-file/property-editors/static-file-picker/property-editor-ui-static-file-picker.element.js +59 -0
- package/dist-cms/packages/static-file/repository/index.d.ts +2 -0
- package/dist-cms/packages/static-file/repository/index.js +2 -0
- package/dist-cms/packages/static-file/repository/manifests.d.ts +5 -0
- package/dist-cms/packages/static-file/repository/manifests.js +26 -0
- package/dist-cms/packages/static-file/repository/static-file-tree.repository.d.ts +18 -0
- package/dist-cms/packages/static-file/repository/static-file-tree.repository.js +21 -0
- package/dist-cms/packages/static-file/repository/static-file-tree.server.data-source.d.ts +18 -0
- package/dist-cms/packages/static-file/repository/static-file-tree.server.data-source.js +46 -0
- package/dist-cms/packages/static-file/repository/static-file-tree.store.d.ts +18 -0
- package/dist-cms/packages/static-file/repository/static-file-tree.store.js +19 -0
- package/dist-cms/packages/static-file/repository/types.d.ts +5 -0
- package/dist-cms/packages/static-file/repository/types.js +1 -0
- package/dist-cms/packages/static-file/tree/manifests.d.ts +2 -0
- package/dist-cms/packages/static-file/tree/manifests.js +11 -0
- package/dist-cms/packages/static-file/umbraco-package.d.ts +7 -0
- package/dist-cms/packages/static-file/umbraco-package.js +9 -0
- package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace.element.d.ts +0 -1
- package/dist-cms/packages/templating/partial-views/workspace/partial-view-workspace.element.js +5 -5
- package/dist-cms/packages/templating/scripts/workspace/script-workspace.element.js +5 -2
- package/dist-cms/packages/templating/stylesheets/tree/stylesheet-tree.server.data-source.d.ts +1 -1
- package/dist-cms/packages/templating/stylesheets/tree/stylesheet-tree.server.data-source.js +1 -1
- package/dist-cms/packages/templating/stylesheets/workspace/stylesheet-workspace.element.js +5 -2
- package/dist-cms/packages/templating/templates/workspace/template-workspace.element.d.ts +0 -1
- package/dist-cms/packages/templating/templates/workspace/template-workspace.element.js +5 -5
- package/dist-cms/packages/user/user/workspace/user-workspace.element.js +3 -3
- package/dist-cms/packages/user/user-group/workspace/user-group-workspace.element.js +4 -4
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +40 -0
- package/package.json +2 -1
- package/dist-cms/packages/documents/documents/repository/document.tree.store.d.ts +0 -18
- package/dist-cms/packages/documents/documents/repository/document.tree.store.js +0 -19
|
@@ -27,6 +27,7 @@ const CORE_PACKAGES = [
|
|
|
27
27
|
import('../../packages/tags/umbraco-package.js'),
|
|
28
28
|
import('../../packages/log-viewer/umbraco-package.js'),
|
|
29
29
|
import('../../packages/health-check/umbraco-package.js'),
|
|
30
|
+
import('../../packages/static-file/umbraco-package.js'),
|
|
30
31
|
];
|
|
31
32
|
let UmbBackofficeElement = class UmbBackofficeElement extends UmbLitElement {
|
|
32
33
|
constructor() {
|
|
@@ -8074,6 +8074,109 @@
|
|
|
8074
8074
|
}
|
|
8075
8075
|
]
|
|
8076
8076
|
},
|
|
8077
|
+
{
|
|
8078
|
+
"name": "umb-input-static-file",
|
|
8079
|
+
"path": "./../src/packages/static-file/components/input-static-file/input-static-file.element.ts",
|
|
8080
|
+
"attributes": [
|
|
8081
|
+
{
|
|
8082
|
+
"name": "min",
|
|
8083
|
+
"description": "This is a minimum amount of selected files in this input.",
|
|
8084
|
+
"type": "number",
|
|
8085
|
+
"default": "\"0\""
|
|
8086
|
+
},
|
|
8087
|
+
{
|
|
8088
|
+
"name": "max",
|
|
8089
|
+
"description": "This is a maximum amount of selected files in this input.",
|
|
8090
|
+
"type": "number",
|
|
8091
|
+
"default": "\"Infinity\""
|
|
8092
|
+
},
|
|
8093
|
+
{
|
|
8094
|
+
"name": "min-message",
|
|
8095
|
+
"description": "Min validation message.",
|
|
8096
|
+
"type": "boolean",
|
|
8097
|
+
"default": "\"\""
|
|
8098
|
+
},
|
|
8099
|
+
{
|
|
8100
|
+
"name": "maxMessage",
|
|
8101
|
+
"description": "Max validation message.",
|
|
8102
|
+
"type": "boolean",
|
|
8103
|
+
"default": "\"\""
|
|
8104
|
+
},
|
|
8105
|
+
{
|
|
8106
|
+
"name": "value",
|
|
8107
|
+
"type": "string"
|
|
8108
|
+
}
|
|
8109
|
+
],
|
|
8110
|
+
"properties": [
|
|
8111
|
+
{
|
|
8112
|
+
"name": "min",
|
|
8113
|
+
"attribute": "min",
|
|
8114
|
+
"description": "This is a minimum amount of selected files in this input.",
|
|
8115
|
+
"type": "number",
|
|
8116
|
+
"default": "\"0\""
|
|
8117
|
+
},
|
|
8118
|
+
{
|
|
8119
|
+
"name": "max",
|
|
8120
|
+
"attribute": "max",
|
|
8121
|
+
"description": "This is a maximum amount of selected files in this input.",
|
|
8122
|
+
"type": "number",
|
|
8123
|
+
"default": "\"Infinity\""
|
|
8124
|
+
},
|
|
8125
|
+
{
|
|
8126
|
+
"name": "minMessage",
|
|
8127
|
+
"attribute": "min-message",
|
|
8128
|
+
"description": "Min validation message.",
|
|
8129
|
+
"type": "boolean",
|
|
8130
|
+
"default": "\"\""
|
|
8131
|
+
},
|
|
8132
|
+
{
|
|
8133
|
+
"name": "maxMessage",
|
|
8134
|
+
"attribute": "maxMessage",
|
|
8135
|
+
"description": "Max validation message.",
|
|
8136
|
+
"type": "boolean",
|
|
8137
|
+
"default": "\"\""
|
|
8138
|
+
},
|
|
8139
|
+
{
|
|
8140
|
+
"name": "selectedPaths",
|
|
8141
|
+
"type": "string[]"
|
|
8142
|
+
},
|
|
8143
|
+
{
|
|
8144
|
+
"name": "value",
|
|
8145
|
+
"attribute": "value",
|
|
8146
|
+
"type": "string"
|
|
8147
|
+
},
|
|
8148
|
+
{
|
|
8149
|
+
"name": "styles",
|
|
8150
|
+
"type": "array",
|
|
8151
|
+
"default": "[null]"
|
|
8152
|
+
}
|
|
8153
|
+
]
|
|
8154
|
+
},
|
|
8155
|
+
{
|
|
8156
|
+
"name": "umb-property-editor-ui-static-file-picker",
|
|
8157
|
+
"path": "./../src/packages/static-file/property-editors/static-file-picker/property-editor-ui-static-file-picker.element.ts",
|
|
8158
|
+
"attributes": [
|
|
8159
|
+
{
|
|
8160
|
+
"name": "value",
|
|
8161
|
+
"type": "string[]"
|
|
8162
|
+
}
|
|
8163
|
+
],
|
|
8164
|
+
"properties": [
|
|
8165
|
+
{
|
|
8166
|
+
"name": "value",
|
|
8167
|
+
"attribute": "value",
|
|
8168
|
+
"type": "string[]"
|
|
8169
|
+
},
|
|
8170
|
+
{
|
|
8171
|
+
"name": "config"
|
|
8172
|
+
}
|
|
8173
|
+
],
|
|
8174
|
+
"events": [
|
|
8175
|
+
{
|
|
8176
|
+
"name": "property-value-change"
|
|
8177
|
+
}
|
|
8178
|
+
]
|
|
8179
|
+
},
|
|
8077
8180
|
{
|
|
8078
8181
|
"name": "umb-tags-input",
|
|
8079
8182
|
"path": "./../src/packages/tags/components/tags-input/tags-input.element.ts",
|
|
@@ -27,6 +27,7 @@ import { handlers as redirectManagementHandlers } from './handlers/redirect-mana
|
|
|
27
27
|
import { handlers as logViewerHandlers } from './handlers/log-viewer.handlers.js';
|
|
28
28
|
import { handlers as packageHandlers } from './handlers/package.handlers.js';
|
|
29
29
|
import { handlers as rteEmbedHandlers } from './handlers/rte-embed.handlers.js';
|
|
30
|
+
import { handlers as staticFileHandlers } from './handlers/static-file.handlers.js';
|
|
30
31
|
import { handlers as stylesheetHandlers } from './handlers/stylesheet.handlers.js';
|
|
31
32
|
import { handlers as partialViewsHandlers } from './handlers/partial-views.handlers.js';
|
|
32
33
|
import { handlers as tagHandlers } from './handlers/tag-handlers.js';
|
|
@@ -34,38 +35,39 @@ import { handlers as configHandlers } from './handlers/config.handlers.js';
|
|
|
34
35
|
import { handlers as scriptHandlers } from './handlers/scripts.handlers.js';
|
|
35
36
|
const handlers = [
|
|
36
37
|
serverHandlers.serverVersionHandler,
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
...userHandlers,
|
|
40
|
-
...documentHandlers,
|
|
41
|
-
...mediaHandlers,
|
|
38
|
+
...configHandlers,
|
|
39
|
+
...cultureHandlers,
|
|
42
40
|
...dataTypeHandlers,
|
|
43
|
-
...
|
|
41
|
+
...dictionaryHandlers,
|
|
42
|
+
...documentHandlers,
|
|
44
43
|
...documentTypeHandlers,
|
|
45
|
-
...
|
|
46
|
-
...
|
|
47
|
-
...
|
|
44
|
+
...examineManagementHandlers,
|
|
45
|
+
...healthCheckHandlers,
|
|
46
|
+
...installHandlers,
|
|
47
|
+
...languageHandlers,
|
|
48
|
+
...logViewerHandlers,
|
|
49
|
+
...mediaHandlers,
|
|
48
50
|
...mediaTypeHandlers,
|
|
49
51
|
...memberGroupHandlers,
|
|
50
52
|
...memberHandlers,
|
|
51
53
|
...memberTypeHandlers,
|
|
52
|
-
...examineManagementHandlers,
|
|
53
54
|
...modelsBuilderHandlers,
|
|
54
|
-
...
|
|
55
|
+
...packageHandlers,
|
|
56
|
+
...partialViewsHandlers,
|
|
55
57
|
...profilingHandlers,
|
|
56
|
-
...
|
|
57
|
-
...templateHandlers,
|
|
58
|
-
...languageHandlers,
|
|
59
|
-
...cultureHandlers,
|
|
58
|
+
...publishedStatusHandlers,
|
|
60
59
|
...redirectManagementHandlers,
|
|
61
|
-
...
|
|
62
|
-
...packageHandlers,
|
|
60
|
+
...relationTypeHandlers,
|
|
63
61
|
...rteEmbedHandlers,
|
|
62
|
+
...scriptHandlers,
|
|
63
|
+
...staticFileHandlers,
|
|
64
64
|
...stylesheetHandlers,
|
|
65
|
-
...partialViewsHandlers,
|
|
66
65
|
...tagHandlers,
|
|
67
|
-
...
|
|
68
|
-
...
|
|
66
|
+
...telemetryHandlers,
|
|
67
|
+
...templateHandlers,
|
|
68
|
+
...upgradeHandlers,
|
|
69
|
+
...userGroupsHandlers,
|
|
70
|
+
...userHandlers,
|
|
69
71
|
];
|
|
70
72
|
switch (import.meta.env.VITE_UMBRACO_INSTALL_STATUS) {
|
|
71
73
|
case 'must-install':
|
|
@@ -707,6 +707,15 @@ export const data = [
|
|
|
707
707
|
propertyEditorUiAlias: 'Umb.PropertyEditorUi.MemberGroupPicker',
|
|
708
708
|
values: [],
|
|
709
709
|
},
|
|
710
|
+
{
|
|
711
|
+
type: 'data-type',
|
|
712
|
+
name: 'Static File Picker',
|
|
713
|
+
id: 'dt-staticFilePicker',
|
|
714
|
+
parentId: null,
|
|
715
|
+
propertyEditorAlias: 'Umbraco.Label',
|
|
716
|
+
propertyEditorUiAlias: 'Umb.PropertyEditorUi.StaticFilePicker',
|
|
717
|
+
values: [],
|
|
718
|
+
},
|
|
710
719
|
];
|
|
711
720
|
const createDataTypeItem = (item) => {
|
|
712
721
|
return {
|
|
@@ -618,6 +618,26 @@ export const data = [
|
|
|
618
618
|
labelOnTop: false,
|
|
619
619
|
},
|
|
620
620
|
},
|
|
621
|
+
{
|
|
622
|
+
id: '33',
|
|
623
|
+
containerId: 'all-properties-group-key',
|
|
624
|
+
alias: 'staticFilePicker',
|
|
625
|
+
name: 'Static File Picker',
|
|
626
|
+
description: '',
|
|
627
|
+
dataTypeId: 'dt-staticFilePicker',
|
|
628
|
+
variesByCulture: false,
|
|
629
|
+
variesBySegment: false,
|
|
630
|
+
sortOrder: 32,
|
|
631
|
+
validation: {
|
|
632
|
+
mandatory: true,
|
|
633
|
+
mandatoryMessage: null,
|
|
634
|
+
regEx: null,
|
|
635
|
+
regExMessage: null,
|
|
636
|
+
},
|
|
637
|
+
appearance: {
|
|
638
|
+
labelOnTop: false,
|
|
639
|
+
},
|
|
640
|
+
},
|
|
621
641
|
],
|
|
622
642
|
containers: [
|
|
623
643
|
{
|
|
@@ -40,7 +40,7 @@ export const data = [
|
|
|
40
40
|
}
|
|
41
41
|
return result;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
console.log(makeid(5));`,
|
|
45
45
|
},
|
|
46
46
|
{
|
|
@@ -67,7 +67,7 @@ export const data = [
|
|
|
67
67
|
content: `var my_arr = [4, '', 0, 10, 7, '', false, 10];
|
|
68
68
|
|
|
69
69
|
my_arr = my_arr.filter(Boolean);
|
|
70
|
-
|
|
70
|
+
|
|
71
71
|
console.log(my_arr);`,
|
|
72
72
|
},
|
|
73
73
|
{
|
|
@@ -80,7 +80,7 @@ export const data = [
|
|
|
80
80
|
const date = new Date(date_str);
|
|
81
81
|
const full_day_name = date.toLocaleDateString('default', { weekday: 'long' });
|
|
82
82
|
// -> to get full day name e.g. Tuesday
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
const short_day_name = date.toLocaleDateString('default', { weekday: 'short' });
|
|
85
85
|
console.log(short_day_name);
|
|
86
86
|
// -> TO get the short day name e.g. Tue`,
|
|
@@ -97,10 +97,10 @@ export const data = [
|
|
|
97
97
|
"department": "IT",
|
|
98
98
|
"project": "Inventory Manager"
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
|
|
101
101
|
// Remove a property
|
|
102
102
|
delete employee["project"];
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
console.log(employee);`,
|
|
105
105
|
},
|
|
106
106
|
];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UmbData } from './data.js';
|
|
2
|
+
import { FileSystemTreeItemPresentationModel, PagedFileSystemTreeItemPresentationModel, ScriptItemResponseModel, StaticFileItemResponseModel } from '../../external/backend-api/index.js';
|
|
3
|
+
type StaticFileItem = StaticFileItemResponseModel & FileSystemTreeItemPresentationModel & {
|
|
4
|
+
icon?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const data: Array<StaticFileItem>;
|
|
7
|
+
declare class UmbStaticFileData extends UmbData<StaticFileItem> {
|
|
8
|
+
constructor();
|
|
9
|
+
getTreeRoot(): PagedFileSystemTreeItemPresentationModel;
|
|
10
|
+
getTreeItemChildren(parentPath: string): PagedFileSystemTreeItemPresentationModel;
|
|
11
|
+
getTreeItem(paths: Array<string>): Array<FileSystemTreeItemPresentationModel>;
|
|
12
|
+
getItem(paths: Array<string>): Array<ScriptItemResponseModel>;
|
|
13
|
+
}
|
|
14
|
+
export declare const umbStaticFileData: UmbStaticFileData;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { UmbData } from './data.js';
|
|
2
|
+
import { createFileItemResponseModelBaseModel, createFileSystemTreeItem } from './utils.js';
|
|
3
|
+
export const data = [
|
|
4
|
+
{
|
|
5
|
+
path: 'some-file.js',
|
|
6
|
+
name: 'some-file',
|
|
7
|
+
icon: 'icon-document',
|
|
8
|
+
type: 'static-file',
|
|
9
|
+
hasChildren: false,
|
|
10
|
+
isFolder: false,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
path: 'another-file.js',
|
|
14
|
+
name: 'another-file',
|
|
15
|
+
icon: 'icon-document',
|
|
16
|
+
type: 'static-file',
|
|
17
|
+
hasChildren: false,
|
|
18
|
+
isFolder: false,
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
class UmbStaticFileData extends UmbData {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(data);
|
|
24
|
+
}
|
|
25
|
+
getTreeRoot() {
|
|
26
|
+
const items = this.data.filter((item) => item.path?.includes('/') === false);
|
|
27
|
+
const treeItems = items.map((item) => createFileSystemTreeItem(item));
|
|
28
|
+
const total = items.length;
|
|
29
|
+
return { items: treeItems, total };
|
|
30
|
+
}
|
|
31
|
+
getTreeItemChildren(parentPath) {
|
|
32
|
+
const items = this.data.filter((item) => item.path?.startsWith(parentPath));
|
|
33
|
+
const treeItems = items.map((item) => createFileSystemTreeItem(item));
|
|
34
|
+
const total = items.length;
|
|
35
|
+
return { items: treeItems, total };
|
|
36
|
+
}
|
|
37
|
+
getTreeItem(paths) {
|
|
38
|
+
const items = this.data.filter((item) => paths.includes(item.path ?? ''));
|
|
39
|
+
return items.map((item) => createFileSystemTreeItem(item));
|
|
40
|
+
}
|
|
41
|
+
getItem(paths) {
|
|
42
|
+
const items = this.data.filter((item) => paths.includes(item.path ?? ''));
|
|
43
|
+
return items.map((item) => createFileItemResponseModelBaseModel(item));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export const umbStaticFileData = new UmbStaticFileData();
|
|
@@ -58,9 +58,9 @@ export const createFileSystemTreeItem = (item) => {
|
|
|
58
58
|
return {
|
|
59
59
|
name: item.name,
|
|
60
60
|
type: item.type,
|
|
61
|
-
hasChildren: item.hasChildren,
|
|
61
|
+
hasChildren: item.hasChildren ?? false,
|
|
62
62
|
path: item.path,
|
|
63
|
-
isFolder: item.isFolder,
|
|
63
|
+
isFolder: item.isFolder ?? false,
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
export const createTextFileItem = (item) => ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handlers: import("msw").RestHandler<import("msw/lib/glossary-de6278a9.js").M<import("msw/lib/glossary-de6278a9.js").h>>[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const { rest } = window.MockServiceWorker;
|
|
2
|
+
import { umbStaticFileData } from '../data/static-file.data.js';
|
|
3
|
+
import { umbracoPath } from '../../shared/utils/index.js';
|
|
4
|
+
const treeHandlers = [
|
|
5
|
+
rest.get(umbracoPath('/tree/static-file/root'), (req, res, ctx) => {
|
|
6
|
+
const response = umbStaticFileData.getTreeRoot();
|
|
7
|
+
return res(ctx.status(200), ctx.json(response));
|
|
8
|
+
}),
|
|
9
|
+
rest.get(umbracoPath('/tree/static-file/children'), (req, res, ctx) => {
|
|
10
|
+
const path = req.url.searchParams.get('path');
|
|
11
|
+
if (!path)
|
|
12
|
+
return;
|
|
13
|
+
const response = umbStaticFileData.getTreeItemChildren(path);
|
|
14
|
+
return res(ctx.status(200), ctx.json(response));
|
|
15
|
+
}),
|
|
16
|
+
];
|
|
17
|
+
const __treeHandlers = [
|
|
18
|
+
rest.get(umbracoPath('/tree/static-file/item'), (req, res, ctx) => {
|
|
19
|
+
const paths = req.url.searchParams.getAll('paths');
|
|
20
|
+
if (!paths)
|
|
21
|
+
return;
|
|
22
|
+
const items = umbStaticFileData.getTreeItem(paths);
|
|
23
|
+
return res(ctx.status(200), ctx.json(items));
|
|
24
|
+
}),
|
|
25
|
+
];
|
|
26
|
+
const itemHandlers = [
|
|
27
|
+
rest.get(umbracoPath('/static-file/item'), (req, res, ctx) => {
|
|
28
|
+
const paths = req.url.searchParams.getAll('paths');
|
|
29
|
+
if (!paths)
|
|
30
|
+
return;
|
|
31
|
+
const items = umbStaticFileData.getTreeItem(paths);
|
|
32
|
+
return res(ctx.status(200), ctx.json(items));
|
|
33
|
+
}),
|
|
34
|
+
];
|
|
35
|
+
export const handlers = [...treeHandlers, ...itemHandlers];
|
|
@@ -4,21 +4,21 @@ 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
|
+
import { UmbDataTypeWorkspaceEditorElement } from './data-type-workspace-editor.element.js';
|
|
7
8
|
import { UmbDataTypeWorkspaceContext } from './data-type-workspace.context.js';
|
|
8
9
|
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
9
10
|
import { html, customElement } from '../../../../external/lit/index.js';
|
|
10
11
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
11
|
-
import './data-type-workspace-editor.element.js';
|
|
12
12
|
import { UmbWorkspaceIsNewRedirectController } from '../../workspace/index.js';
|
|
13
13
|
let UmbDataTypeWorkspaceElement = class UmbDataTypeWorkspaceElement extends UmbLitElement {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.#workspaceContext = new UmbDataTypeWorkspaceContext(this);
|
|
17
|
-
this.#
|
|
17
|
+
this.#createElement = () => new UmbDataTypeWorkspaceEditorElement();
|
|
18
18
|
this._routes = [
|
|
19
19
|
{
|
|
20
20
|
path: 'create/:parentUnique',
|
|
21
|
-
component:
|
|
21
|
+
component: this.#createElement,
|
|
22
22
|
setup: (_component, info) => {
|
|
23
23
|
const parentUnique = info.match.params.parentUnique === 'null' ? null : info.match.params.parentUnique;
|
|
24
24
|
this.#workspaceContext.create(parentUnique);
|
|
@@ -27,7 +27,7 @@ let UmbDataTypeWorkspaceElement = class UmbDataTypeWorkspaceElement extends UmbL
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
path: 'edit/:unique',
|
|
30
|
-
component:
|
|
30
|
+
component: this.#createElement,
|
|
31
31
|
setup: (_component, info) => {
|
|
32
32
|
const unique = info.match.params.unique;
|
|
33
33
|
this.#workspaceContext.load(unique);
|
|
@@ -36,7 +36,7 @@ let UmbDataTypeWorkspaceElement = class UmbDataTypeWorkspaceElement extends UmbL
|
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
#workspaceContext;
|
|
39
|
-
#
|
|
39
|
+
#createElement;
|
|
40
40
|
render() {
|
|
41
41
|
return html `<umb-router-slot .routes=${this._routes}></umb-router-slot>`;
|
|
42
42
|
}
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
export * from './modal-token.js';
|
|
2
|
-
export * from './create-document-modal.token.js';
|
|
3
1
|
export * from './change-password-modal.token.js';
|
|
4
2
|
export * from './code-editor-modal.token.js';
|
|
5
3
|
export * from './confirm-modal.token.js';
|
|
6
4
|
export * from './create-dictionary-modal.token.js';
|
|
5
|
+
export * from './create-document-modal.token.js';
|
|
7
6
|
export * from './create-user-modal.token.js';
|
|
8
7
|
export * from './create-user-success-modal.token.js';
|
|
9
8
|
export * from './current-user-modal.token.js';
|
|
9
|
+
export * from './data-type-picker-flow-data-type-picker-modal.token.js';
|
|
10
|
+
export * from './data-type-picker-flow-modal.token.js';
|
|
11
|
+
export * from './data-type-picker-modal.token.js';
|
|
10
12
|
export * from './debug-modal.token.js';
|
|
13
|
+
export * from './dictionary-item-picker-modal.token.js';
|
|
11
14
|
export * from './document-picker-modal.token.js';
|
|
12
15
|
export * from './document-type-picker-modal.token.js';
|
|
13
16
|
export * from './embedded-media-modal.token.js';
|
|
17
|
+
export * from './entity-user-permission-settings-modal.token.js';
|
|
14
18
|
export * from './examine-fields-settings-modal.token.js';
|
|
15
19
|
export * from './export-dictionary-modal.token.js';
|
|
20
|
+
export * from './folder-modal.token.js';
|
|
16
21
|
export * from './icon-picker-modal.token.js';
|
|
17
22
|
export * from './import-dictionary-modal.token.js';
|
|
18
23
|
export * from './language-picker-modal.token.js';
|
|
19
24
|
export * from './link-picker-modal.token.js';
|
|
20
25
|
export * from './media-tree-picker-modal.token.js';
|
|
21
26
|
export * from './media-type-picker-modal.token.js';
|
|
27
|
+
export * from './modal-token.js';
|
|
28
|
+
export * from './partial-view-picker-modal.token.js';
|
|
29
|
+
export * from './permissions-modal.token.js';
|
|
22
30
|
export * from './property-editor-ui-picker-modal.token.js';
|
|
23
31
|
export * from './property-settings-modal.token.js';
|
|
24
32
|
export * from './search-modal.token.js';
|
|
@@ -27,12 +35,4 @@ export * from './template-modal.token.js';
|
|
|
27
35
|
export * from './template-picker-modal.token.js';
|
|
28
36
|
export * from './user-group-picker-modal.token.js';
|
|
29
37
|
export * from './user-picker-modal.token.js';
|
|
30
|
-
export * from './folder-modal.token.js';
|
|
31
|
-
export * from './partial-view-picker-modal.token.js';
|
|
32
|
-
export * from './dictionary-item-picker-modal.token.js';
|
|
33
|
-
export * from './data-type-picker-modal.token.js';
|
|
34
38
|
export * from './workspace-modal.token.js';
|
|
35
|
-
export * from './data-type-picker-flow-modal.token.js';
|
|
36
|
-
export * from './data-type-picker-flow-data-type-picker-modal.token.js';
|
|
37
|
-
export * from './entity-user-permission-settings-modal.token.js';
|
|
38
|
-
export * from './permissions-modal.token.js';
|
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
export * from './modal-token.js';
|
|
2
|
-
export * from './create-document-modal.token.js';
|
|
3
1
|
export * from './change-password-modal.token.js';
|
|
4
2
|
export * from './code-editor-modal.token.js';
|
|
5
3
|
export * from './confirm-modal.token.js';
|
|
6
4
|
export * from './create-dictionary-modal.token.js';
|
|
5
|
+
export * from './create-document-modal.token.js';
|
|
7
6
|
export * from './create-user-modal.token.js';
|
|
8
7
|
export * from './create-user-success-modal.token.js';
|
|
9
8
|
export * from './current-user-modal.token.js';
|
|
9
|
+
export * from './data-type-picker-flow-data-type-picker-modal.token.js';
|
|
10
|
+
export * from './data-type-picker-flow-modal.token.js';
|
|
11
|
+
export * from './data-type-picker-modal.token.js';
|
|
10
12
|
export * from './debug-modal.token.js';
|
|
13
|
+
export * from './dictionary-item-picker-modal.token.js';
|
|
11
14
|
export * from './document-picker-modal.token.js';
|
|
12
15
|
export * from './document-type-picker-modal.token.js';
|
|
13
16
|
export * from './embedded-media-modal.token.js';
|
|
17
|
+
export * from './entity-user-permission-settings-modal.token.js';
|
|
14
18
|
export * from './examine-fields-settings-modal.token.js';
|
|
15
19
|
export * from './export-dictionary-modal.token.js';
|
|
20
|
+
export * from './folder-modal.token.js';
|
|
16
21
|
export * from './icon-picker-modal.token.js';
|
|
17
22
|
export * from './import-dictionary-modal.token.js';
|
|
18
23
|
export * from './language-picker-modal.token.js';
|
|
19
24
|
export * from './link-picker-modal.token.js';
|
|
20
25
|
export * from './media-tree-picker-modal.token.js';
|
|
21
26
|
export * from './media-type-picker-modal.token.js';
|
|
27
|
+
export * from './modal-token.js';
|
|
28
|
+
export * from './partial-view-picker-modal.token.js';
|
|
29
|
+
export * from './permissions-modal.token.js';
|
|
22
30
|
export * from './property-editor-ui-picker-modal.token.js';
|
|
23
31
|
export * from './property-settings-modal.token.js';
|
|
24
32
|
export * from './search-modal.token.js';
|
|
@@ -27,12 +35,4 @@ export * from './template-modal.token.js';
|
|
|
27
35
|
export * from './template-picker-modal.token.js';
|
|
28
36
|
export * from './user-group-picker-modal.token.js';
|
|
29
37
|
export * from './user-picker-modal.token.js';
|
|
30
|
-
export * from './folder-modal.token.js';
|
|
31
|
-
export * from './partial-view-picker-modal.token.js';
|
|
32
|
-
export * from './dictionary-item-picker-modal.token.js';
|
|
33
|
-
export * from './data-type-picker-modal.token.js';
|
|
34
38
|
export * from './workspace-modal.token.js';
|
|
35
|
-
export * from './data-type-picker-flow-modal.token.js';
|
|
36
|
-
export * from './data-type-picker-flow-data-type-picker-modal.token.js';
|
|
37
|
-
export * from './entity-user-permission-settings-modal.token.js';
|
|
38
|
-
export * from './permissions-modal.token.js';
|
|
@@ -14,11 +14,11 @@ let UmbWorkspaceDictionaryElement = class UmbWorkspaceDictionaryElement extends
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.#workspaceContext = new UmbDictionaryWorkspaceContext(this);
|
|
17
|
-
this.#
|
|
17
|
+
this.#createElement = () => new UmbDictionaryWorkspaceEditorElement();
|
|
18
18
|
this._routes = [
|
|
19
19
|
{
|
|
20
20
|
path: 'edit/:id',
|
|
21
|
-
component:
|
|
21
|
+
component: this.#createElement,
|
|
22
22
|
setup: (_component, info) => {
|
|
23
23
|
const id = info.match.params.id;
|
|
24
24
|
this.#workspaceContext.load(id);
|
|
@@ -26,7 +26,7 @@ let UmbWorkspaceDictionaryElement = class UmbWorkspaceDictionaryElement extends
|
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
path: 'create/:parentId',
|
|
29
|
-
component:
|
|
29
|
+
component: this.#createElement,
|
|
30
30
|
setup: async (_component, info) => {
|
|
31
31
|
const parentId = info.match.params.parentId === 'null' ? null : info.match.params.parentId;
|
|
32
32
|
await this.#workspaceContext.create(parentId);
|
|
@@ -36,7 +36,7 @@ let UmbWorkspaceDictionaryElement = class UmbWorkspaceDictionaryElement extends
|
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
#workspaceContext;
|
|
39
|
-
#
|
|
39
|
+
#createElement;
|
|
40
40
|
render() {
|
|
41
41
|
return html `<umb-router-slot .routes=${this._routes}></umb-router-slot> `;
|
|
42
42
|
}
|
package/dist-cms/packages/documents/document-types/workspace/document-type-workspace.element.js
CHANGED
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { UmbDocumentTypeWorkspaceContext } from './document-type-workspace.context.js';
|
|
8
|
+
import { UmbDocumentTypeWorkspaceEditorElement } from './document-type-workspace-editor.element.js';
|
|
8
9
|
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
9
10
|
import { html, customElement, state } from '../../../../external/lit/index.js';
|
|
10
11
|
import { UmbLitElement } from '../../../../shared/lit-element/index.js';
|
|
@@ -13,10 +14,11 @@ let UmbDocumentTypeWorkspaceElement = class UmbDocumentTypeWorkspaceElement exte
|
|
|
13
14
|
constructor() {
|
|
14
15
|
super(...arguments);
|
|
15
16
|
this.#workspaceContext = new UmbDocumentTypeWorkspaceContext(this);
|
|
17
|
+
this.#createElement = () => new UmbDocumentTypeWorkspaceEditorElement();
|
|
16
18
|
this._routes = [
|
|
17
19
|
{
|
|
18
20
|
path: 'create/:parentId',
|
|
19
|
-
component:
|
|
21
|
+
component: this.#createElement,
|
|
20
22
|
setup: (_component, info) => {
|
|
21
23
|
const parentId = info.match.params.parentId === 'null' ? null : info.match.params.parentId;
|
|
22
24
|
this.#workspaceContext.create(parentId);
|
|
@@ -25,7 +27,7 @@ let UmbDocumentTypeWorkspaceElement = class UmbDocumentTypeWorkspaceElement exte
|
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
29
|
path: 'edit/:id',
|
|
28
|
-
component:
|
|
30
|
+
component: this.#createElement,
|
|
29
31
|
setup: (_component, info) => {
|
|
30
32
|
this.removeControllerByAlias('_observeIsNew');
|
|
31
33
|
const id = info.match.params.id;
|
|
@@ -35,6 +37,7 @@ let UmbDocumentTypeWorkspaceElement = class UmbDocumentTypeWorkspaceElement exte
|
|
|
35
37
|
];
|
|
36
38
|
}
|
|
37
39
|
#workspaceContext;
|
|
40
|
+
#createElement;
|
|
38
41
|
render() {
|
|
39
42
|
return html ` <umb-router-slot .routes=${this._routes}></umb-router-slot> `;
|
|
40
43
|
}
|
package/dist-cms/packages/documents/documents/components/input-document/input-document.context.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { UMB_DOCUMENT_REPOSITORY_ALIAS } from '../../repository/index.js';
|
|
1
2
|
import { UmbPickerInputContext } from '../../../../core/picker-input/index.js';
|
|
2
3
|
import { UMB_DOCUMENT_PICKER_MODAL } from '../../../../core/modal/index.js';
|
|
3
4
|
export class UmbDocumentPickerContext extends UmbPickerInputContext {
|
|
4
5
|
constructor(host) {
|
|
5
|
-
super(host,
|
|
6
|
+
super(host, UMB_DOCUMENT_REPOSITORY_ALIAS, UMB_DOCUMENT_PICKER_MODAL);
|
|
6
7
|
}
|
|
7
8
|
}
|
|
@@ -19,8 +19,8 @@ let UmbPropertyEditorUIContentPickerElement = class UmbPropertyEditorUIContentPi
|
|
|
19
19
|
}
|
|
20
20
|
set config(config) {
|
|
21
21
|
const validationLimit = config?.find((x) => x.alias === 'validationLimit');
|
|
22
|
-
this._limitMin =
|
|
23
|
-
this._limitMax =
|
|
22
|
+
this._limitMin = validationLimit?.value?.min;
|
|
23
|
+
this._limitMax = validationLimit?.value?.max;
|
|
24
24
|
}
|
|
25
25
|
_onChange(event) {
|
|
26
26
|
this.value = event.target.selectedIds;
|
|
@@ -32,8 +32,8 @@ let UmbPropertyEditorUIContentPickerElement = class UmbPropertyEditorUIContentPi
|
|
|
32
32
|
<umb-input-document
|
|
33
33
|
@change=${this._onChange}
|
|
34
34
|
.selectedIds=${this._value}
|
|
35
|
-
.min=${this._limitMin}
|
|
36
|
-
.max=${this._limitMax}
|
|
35
|
+
.min=${this._limitMin ?? 0}
|
|
36
|
+
.max=${this._limitMax ?? Infinity}
|
|
37
37
|
>Add</umb-input-document
|
|
38
38
|
>
|
|
39
39
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { UMB_DOCUMENT_TREE_STORE_CONTEXT } from '../tree/document-tree.store.js';
|
|
1
2
|
import { UmbDocumentServerDataSource } from './sources/document.server.data.js';
|
|
2
3
|
import { UMB_DOCUMENT_STORE_CONTEXT_TOKEN } from './document.store.js';
|
|
3
|
-
import { UMB_DOCUMENT_TREE_STORE_CONTEXT_TOKEN } from './document.tree.store.js';
|
|
4
4
|
import { UMB_DOCUMENT_ITEM_STORE_CONTEXT_TOKEN } from './document-item.store.js';
|
|
5
5
|
import { UmbDocumentItemServerDataSource } from './sources/document-item.server.data.js';
|
|
6
6
|
import { UmbBaseController } from '../../../../libs/class-api/index.js';
|
|
@@ -19,7 +19,7 @@ export class UmbDocumentRepository extends UmbBaseController {
|
|
|
19
19
|
this.#detailDataSource = new UmbDocumentServerDataSource(this);
|
|
20
20
|
this.#itemSource = new UmbDocumentItemServerDataSource(this);
|
|
21
21
|
this.#init = Promise.all([
|
|
22
|
-
this.consumeContext(
|
|
22
|
+
this.consumeContext(UMB_DOCUMENT_TREE_STORE_CONTEXT, (instance) => {
|
|
23
23
|
this.#treeStore = instance;
|
|
24
24
|
}).asPromise(),
|
|
25
25
|
this.consumeContext(UMB_DOCUMENT_STORE_CONTEXT_TOKEN, (instance) => {
|