@umbraco-cms/backoffice 14.0.0-a0074b6e → 14.0.0-a8030000
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cms/apps/app/app.element.js +4 -1
- package/dist-cms/apps/app/index.d.ts +1 -0
- package/dist-cms/apps/app/index.js +1 -0
- package/dist-cms/apps/backoffice/backoffice.element.js +1 -0
- package/dist-cms/custom-elements.json +173 -140
- package/dist-cms/mocks/browser-handlers.js +2 -0
- package/dist-cms/mocks/data/scripts.data.d.ts +21 -0
- package/dist-cms/mocks/data/scripts.data.js +205 -0
- package/dist-cms/mocks/handlers/scripts.handlers.d.ts +2 -0
- package/dist-cms/mocks/handlers/scripts.handlers.js +83 -0
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.d.ts +1 -1
- package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +1 -1
- package/dist-cms/packages/core/culture/components/index.d.ts +1 -0
- package/dist-cms/packages/core/culture/components/index.js +1 -0
- package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.js +5 -5
- package/dist-cms/packages/core/culture/index.d.ts +2 -0
- package/dist-cms/packages/core/culture/index.js +2 -0
- package/dist-cms/packages/core/culture/manifests.d.ts +1 -0
- package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.js +1 -1
- package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.d.ts +1 -1
- package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.js +1 -1
- package/dist-cms/packages/core/index.d.ts +1 -0
- package/dist-cms/packages/core/index.js +3 -0
- package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.d.ts +1 -0
- package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.js +37 -4
- package/dist-cms/packages/core/modal/token/property-settings-modal.token.d.ts +5 -2
- package/dist-cms/packages/documents/dashboards/redirect-management/dashboard-redirect-management.element.d.ts +5 -17
- package/dist-cms/packages/documents/dashboards/redirect-management/dashboard-redirect-management.element.js +184 -214
- package/dist-cms/packages/documents/document-types/index.d.ts +1 -0
- package/dist-cms/packages/documents/document-types/index.js +1 -0
- package/dist-cms/packages/documents/document-types/repository/document-type.repository.d.ts +2 -2
- package/dist-cms/packages/documents/document-types/repository/document-type.store.d.ts +2 -2
- package/dist-cms/packages/documents/document-types/repository/index.d.ts +3 -0
- package/dist-cms/packages/documents/document-types/repository/index.js +3 -0
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.js +8 -2
- package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.js +7 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/dashboard-health-check.element.d.ts +1 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/dashboard-health-check.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check-dashboard.context.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check-dashboard.context.js +1 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check.context.d.ts +3 -3
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check.context.js +4 -4
- package/dist-cms/packages/health-check/index.d.ts +1 -0
- package/dist-cms/packages/health-check/index.js +1 -0
- package/dist-cms/packages/health-check/manifests.d.ts +16 -0
- package/dist-cms/packages/health-check/manifests.js +20 -0
- package/dist-cms/packages/health-check/umbraco-package.d.ts +7 -0
- package/dist-cms/packages/health-check/umbraco-package.js +9 -0
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-action.element.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-action.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group-box-overview.element.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group-box-overview.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group.element.d.ts +2 -2
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group.element.js +5 -5
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-overview.element.d.ts +1 -1
- package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-overview.element.js +3 -3
- package/dist-cms/packages/settings/dashboards/manifests.js +0 -18
- package/dist-cms/packages/settings/manifests.js +0 -2
- package/dist-cms/packages/templating/manifests.js +2 -0
- package/dist-cms/packages/templating/scripts/config.d.ts +20 -0
- package/dist-cms/packages/templating/scripts/config.js +22 -0
- package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.d.ts +8 -0
- package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.js +9 -0
- package/dist-cms/packages/templating/scripts/entity-actions/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/entity-actions/manifests.js +56 -0
- package/dist-cms/packages/templating/scripts/index.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/index.js +2 -0
- package/dist-cms/packages/templating/scripts/manifests.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/manifests.js +12 -0
- package/dist-cms/packages/templating/scripts/menu-item/manifests.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/menu-item/manifests.js +16 -0
- package/dist-cms/packages/templating/scripts/repository/index.d.ts +1 -0
- package/dist-cms/packages/templating/scripts/repository/index.js +1 -0
- package/dist-cms/packages/templating/scripts/repository/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/repository/manifests.js +23 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.repository.d.ts +71 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.repository.js +154 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.store.d.ts +31 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.store.js +37 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.d.ts +19 -0
- package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.js +21 -0
- package/dist-cms/packages/templating/scripts/repository/sources/index.d.ts +11 -0
- package/dist-cms/packages/templating/scripts/repository/sources/index.js +1 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.d.ts +41 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.js +57 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.d.ts +17 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.js +23 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.d.ts +14 -0
- package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.js +31 -0
- package/dist-cms/packages/templating/scripts/tree/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/tree/manifests.js +20 -0
- package/dist-cms/packages/templating/scripts/workspace/manifests.d.ts +2 -0
- package/dist-cms/packages/templating/scripts/workspace/manifests.js +32 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.d.ts +24 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.js +171 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.d.ts +23 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.js +87 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.d.ts +14 -0
- package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.js +50 -0
- package/dist-cms/packages/users/current-user/modals/current-user/current-user-modal.element.js +2 -2
- package/dist-cms/shared/auth/auth-flow.js +3 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +86 -72
- package/package.json +3 -2
- package/dist-cms/packages/settings/cultures/components/index.d.ts +0 -1
- package/dist-cms/packages/settings/cultures/components/index.js +0 -1
- package/dist-cms/packages/settings/cultures/manifests.d.ts +0 -1
- package/dist-cms/shared/context/index.d.ts +0 -1
- package/dist-cms/shared/context/index.js +0 -1
- /package/dist-cms/{shared/context → apps/app}/app.context.d.ts +0 -0
- /package/dist-cms/{shared/context → apps/app}/app.context.js +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/manifests.js +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.js +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.d.ts +0 -0
- /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.js +0 -0
|
@@ -14,287 +14,257 @@ export let UmbDashboardRedirectManagementElement = class UmbDashboardRedirectMan
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super();
|
|
16
16
|
this.itemsPerPage = 20;
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
17
|
+
this.page = 1;
|
|
18
|
+
this._trackerEnabled = true;
|
|
19
|
+
this._total = 0;
|
|
19
20
|
this.consumeContext(UMB_MODAL_MANAGER_CONTEXT_TOKEN, (_instance) => {
|
|
20
21
|
this._modalContext = _instance;
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
connectedCallback() {
|
|
24
25
|
super.connectedCallback();
|
|
25
|
-
this
|
|
26
|
-
this
|
|
26
|
+
this.#getTrackerStatus();
|
|
27
|
+
this.#getRedirectData();
|
|
27
28
|
}
|
|
28
|
-
async
|
|
29
|
+
async #getTrackerStatus() {
|
|
29
30
|
const { data } = await tryExecuteAndNotify(this, RedirectManagementResource.getRedirectManagementStatus());
|
|
30
31
|
if (data && data.status)
|
|
31
|
-
this.
|
|
32
|
+
this._trackerEnabled = data.status === RedirectStatusModel.ENABLED ? true : false;
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
// Fetch data
|
|
35
|
+
async #getRedirectData(filter = undefined) {
|
|
36
|
+
const skip = this.page * this.itemsPerPage - this.itemsPerPage;
|
|
37
|
+
const { data } = await tryExecuteAndNotify(this, RedirectManagementResource.getRedirectManagement({ filter, take: this.itemsPerPage, skip }));
|
|
38
|
+
if (!data)
|
|
39
|
+
return;
|
|
40
|
+
this._total = data?.total;
|
|
41
|
+
this._redirectData = data?.items;
|
|
42
|
+
if (filter !== undefined)
|
|
43
|
+
this._buttonState = 'success';
|
|
44
|
+
}
|
|
45
|
+
// Pagination
|
|
46
|
+
#onPageChange(event) {
|
|
47
|
+
if (this.page === event.target.current)
|
|
48
|
+
return;
|
|
49
|
+
this.page = event.target.current;
|
|
50
|
+
this.#getRedirectData();
|
|
51
|
+
}
|
|
52
|
+
// Delete Redirect Action
|
|
53
|
+
#onRequestDelete(data) {
|
|
54
|
+
if (!data.id)
|
|
55
|
+
return;
|
|
34
56
|
const modalContext = this._modalContext?.open(UMB_CONFIRM_MODAL, {
|
|
35
57
|
headline: 'Delete',
|
|
36
58
|
content: html `
|
|
37
59
|
<div style="width:300px">
|
|
38
|
-
<p
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<p>Are you sure you want to delete?</p>
|
|
60
|
+
<p>${this.localize.term('redirectUrls_redirectRemoveWarning')}</p>
|
|
61
|
+
${this.localize.term('redirectUrls_originalUrl')}: <strong>${data.originalUrl}</strong><br />
|
|
62
|
+
${this.localize.term('redirectUrls_redirectedTo')}: <strong>${data.destinationUrl}</strong>
|
|
42
63
|
</div>
|
|
43
64
|
`,
|
|
44
65
|
color: 'danger',
|
|
45
66
|
confirmLabel: 'Delete',
|
|
46
67
|
});
|
|
47
|
-
modalContext
|
|
48
|
-
|
|
49
|
-
|
|
68
|
+
modalContext
|
|
69
|
+
?.onSubmit()
|
|
70
|
+
.then(() => {
|
|
71
|
+
this.#redirectDelete(data.id);
|
|
72
|
+
})
|
|
73
|
+
.catch(() => undefined);
|
|
50
74
|
}
|
|
51
|
-
async
|
|
52
|
-
|
|
75
|
+
async #redirectDelete(id) {
|
|
76
|
+
const { error } = await tryExecuteAndNotify(this, RedirectManagementResource.deleteRedirectManagementById({ id }));
|
|
77
|
+
if (error)
|
|
53
78
|
return;
|
|
54
|
-
|
|
55
|
-
if (!res.error) {
|
|
56
|
-
// or just run a this._getRedirectData() again?
|
|
57
|
-
//this.shadowRoot?.getElementById(`redirect-key-${r.id}`)?.remove();
|
|
58
|
-
// No no, never manipulate DOM manipulate the data for the DOM:
|
|
59
|
-
this._redirectData = this._redirectData?.filter((x) => x.id !== r.id);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
_disableRedirectHandler() {
|
|
63
|
-
const modalContext = this._modalContext?.open(UMB_CONFIRM_MODAL, {
|
|
64
|
-
headline: 'Disable URL tracker',
|
|
65
|
-
content: html `Are you sure you want to disable the URL tracker?`,
|
|
66
|
-
color: 'danger',
|
|
67
|
-
confirmLabel: 'Disable',
|
|
68
|
-
});
|
|
69
|
-
modalContext?.onSubmit().then(() => {
|
|
70
|
-
this._toggleRedirect();
|
|
71
|
-
});
|
|
79
|
+
this._redirectData = this._redirectData?.filter((x) => x.id !== id);
|
|
72
80
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (
|
|
76
|
-
this
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
_inputHandler(pressed) {
|
|
80
|
-
if (pressed.key === 'Enter')
|
|
81
|
-
this._searchHandler();
|
|
81
|
+
// Search action
|
|
82
|
+
#onKeypress(e) {
|
|
83
|
+
if (e.key === 'Enter')
|
|
84
|
+
this.#onSearch();
|
|
82
85
|
}
|
|
83
|
-
|
|
84
|
-
this.
|
|
86
|
+
#onSearch() {
|
|
87
|
+
this._buttonState = 'waiting';
|
|
88
|
+
this._filter = this._search?.value ?? '';
|
|
85
89
|
if (this._pagination)
|
|
86
90
|
this._pagination.current = 1;
|
|
87
|
-
this.
|
|
88
|
-
|
|
89
|
-
this._buttonState = 'waiting';
|
|
90
|
-
}
|
|
91
|
-
this._getRedirectData();
|
|
91
|
+
this.page = 1;
|
|
92
|
+
this.#getRedirectData(this._search.value);
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
// Tracker disable/enable
|
|
95
|
+
#onRequestTrackerToggle() {
|
|
96
|
+
if (!this._trackerEnabled) {
|
|
97
|
+
this.#trackerToggle();
|
|
95
98
|
return;
|
|
96
|
-
this._currentPage = event.target.current;
|
|
97
|
-
this._getRedirectData();
|
|
98
|
-
}
|
|
99
|
-
async _getRedirectData() {
|
|
100
|
-
const skip = this._currentPage * this.itemsPerPage - this.itemsPerPage;
|
|
101
|
-
const { data } = await tryExecuteAndNotify(this, RedirectManagementResource.getRedirectManagement({ filter: this._filter, take: this.itemsPerPage, skip }));
|
|
102
|
-
if (data) {
|
|
103
|
-
this._total = data?.total;
|
|
104
|
-
this._redirectData = data?.items;
|
|
105
|
-
if (this._filter?.length) {
|
|
106
|
-
this._buttonState = 'success';
|
|
107
|
-
}
|
|
108
99
|
}
|
|
100
|
+
const modalContext = this._modalContext?.open(UMB_CONFIRM_MODAL, {
|
|
101
|
+
headline: `${this.localize.term('redirectUrls_disableUrlTracker')}`,
|
|
102
|
+
content: `${this.localize.term('redirectUrls_confirmDisable')}`,
|
|
103
|
+
color: 'danger',
|
|
104
|
+
confirmLabel: 'Disable',
|
|
105
|
+
});
|
|
106
|
+
modalContext
|
|
107
|
+
?.onSubmit()
|
|
108
|
+
.then(() => {
|
|
109
|
+
this.#trackerToggle();
|
|
110
|
+
})
|
|
111
|
+
.catch(() => undefined);
|
|
112
|
+
}
|
|
113
|
+
async #trackerToggle() {
|
|
114
|
+
const status = this._trackerEnabled ? RedirectStatusModel.DISABLED : RedirectStatusModel.ENABLED;
|
|
115
|
+
const { error } = await tryExecuteAndNotify(this, RedirectManagementResource.postRedirectManagementStatus({ status }));
|
|
116
|
+
if (error)
|
|
117
|
+
return;
|
|
118
|
+
this._trackerEnabled = !this._trackerEnabled;
|
|
109
119
|
}
|
|
120
|
+
// Renders
|
|
110
121
|
render() {
|
|
111
|
-
return html `
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
label="input for search"
|
|
120
|
-
@keypress="${this._inputHandler}">
|
|
121
|
-
</uui-input>
|
|
122
|
-
<uui-button
|
|
123
|
-
id="search-button"
|
|
124
|
-
look="primary"
|
|
125
|
-
color="positive"
|
|
126
|
-
label="search"
|
|
127
|
-
.state="${this._buttonState}"
|
|
128
|
-
@click="${this._searchHandler}">
|
|
129
|
-
Search<uui-icon name="umb:search"></uui-icon>
|
|
130
|
-
</uui-button>
|
|
131
|
-
</div>
|
|
122
|
+
return html ` <div id="redirect-actions">
|
|
123
|
+
${this._trackerEnabled
|
|
124
|
+
? html `<div id="search-wrapper">
|
|
125
|
+
<uui-input
|
|
126
|
+
id="search"
|
|
127
|
+
placeholder="${this.localize.term('redirectUrls_originalUrl')}"
|
|
128
|
+
label="${this.localize.term('redirectUrls_originalUrl')}"
|
|
129
|
+
@keypress=${this.#onKeypress}></uui-input>
|
|
132
130
|
<uui-button
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
@click
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
131
|
+
look="primary"
|
|
132
|
+
color="positive"
|
|
133
|
+
label="${this.localize.term('general_search')}"
|
|
134
|
+
@click=${this.#onSearch}
|
|
135
|
+
.state=${this._buttonState}>
|
|
136
|
+
${this.localize.term('general_search')}
|
|
137
|
+
</uui-button>
|
|
138
|
+
</div>
|
|
139
|
+
<uui-button
|
|
140
|
+
look="outline"
|
|
141
|
+
color="danger"
|
|
142
|
+
label="${this.localize.term('redirectUrls_disableUrlTracker')}"
|
|
143
|
+
@click=${this.#onRequestTrackerToggle}>
|
|
144
|
+
${this.localize.term('redirectUrls_disableUrlTracker')}
|
|
145
|
+
</uui-button>`
|
|
146
|
+
: html `<div></div>
|
|
147
|
+
<uui-button
|
|
148
|
+
look="outline"
|
|
142
149
|
color="positive"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
</div>
|
|
157
|
-
</umb-body-layout>
|
|
158
|
-
`;
|
|
150
|
+
label="${this.localize.term('redirectUrls_enableUrlTracker')}"
|
|
151
|
+
@click=${this.#onRequestTrackerToggle}>
|
|
152
|
+
${this.localize.term('redirectUrls_enableUrlTracker')}
|
|
153
|
+
</uui-button>`}
|
|
154
|
+
</div>
|
|
155
|
+
${this._redirectData?.length
|
|
156
|
+
? html `<uui-box id="redirect-wrapper" style="--uui-box-default-padding:0">
|
|
157
|
+
${this._trackerEnabled ? '' : html `<div id="grey-out"></div>`} ${this.#renderTable()}
|
|
158
|
+
</uui-box>`
|
|
159
|
+
: this._filter !== undefined
|
|
160
|
+
? this.#renderZeroResults()
|
|
161
|
+
: this.#renderNoRedirects()}
|
|
162
|
+
${this.#renderPagination()}`;
|
|
159
163
|
}
|
|
160
|
-
|
|
164
|
+
#renderZeroResults() {
|
|
161
165
|
return html `<uui-box>
|
|
162
166
|
<strong>No redirects matching this search criteria</strong>
|
|
163
167
|
<p>Double check your search for any error or spelling mistakes.</p>
|
|
164
168
|
</uui-box>`;
|
|
165
169
|
}
|
|
166
|
-
renderNoRedirects() {
|
|
170
|
+
#renderNoRedirects() {
|
|
167
171
|
return html `<uui-box>
|
|
168
|
-
<strong
|
|
169
|
-
<p
|
|
172
|
+
<strong>${this.localize.term('redirectUrls_noRedirects')}</strong>
|
|
173
|
+
<p>${this.localize.term('redirectUrls_noRedirectsDescription')}</p>
|
|
170
174
|
</uui-box>`;
|
|
171
175
|
}
|
|
172
|
-
renderTable() {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<uui-table>
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
#renderTable() {
|
|
177
|
+
return html `<uui-table>
|
|
178
|
+
<uui-table-head>
|
|
179
|
+
<uui-table-head-cell style="width:10%;">${this.localize.term('redirectUrls_culture')}</uui-table-head-cell>
|
|
180
|
+
<uui-table-head-cell>${this.localize.term('redirectUrls_originalUrl')}</uui-table-head-cell>
|
|
181
|
+
<uui-table-head-cell style="width:10%;"></uui-table-head-cell>
|
|
182
|
+
<uui-table-head-cell>${this.localize.term('redirectUrls_redirectedTo')}</uui-table-head-cell>
|
|
183
|
+
<uui-table-head-cell style="width:10%;">${this.localize.term('general_actions')}</uui-table-head-cell>
|
|
184
|
+
</uui-table-head>
|
|
185
|
+
${this.#renderTableData()}
|
|
186
|
+
</uui-table>`;
|
|
187
|
+
}
|
|
188
|
+
#renderTableData() {
|
|
189
|
+
return html `${this._redirectData?.map((data) => {
|
|
184
190
|
return html ` <uui-table-row>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
})}
|
|
210
|
-
</uui-table>
|
|
211
|
-
</uui-box>
|
|
212
|
-
${this._renderPagination()}
|
|
213
|
-
</uui-scroll-container
|
|
214
|
-
>`;
|
|
191
|
+
<uui-table-cell> ${data.culture || '*'} </uui-table-cell>
|
|
192
|
+
<uui-table-cell>
|
|
193
|
+
<a href="${data.originalUrl || '#'}" target="_blank"> ${data.originalUrl}</a>
|
|
194
|
+
<uui-icon name="umb:out"></uui-icon>
|
|
195
|
+
</uui-table-cell>
|
|
196
|
+
<uui-table-cell>
|
|
197
|
+
<uui-icon name="umb:arrow-right"></uui-icon>
|
|
198
|
+
</uui-table-cell>
|
|
199
|
+
<uui-table-cell>
|
|
200
|
+
<a href="${data.destinationUrl || '#'}" target="_blank"> ${data.destinationUrl}</a>
|
|
201
|
+
<uui-icon name="umb:out"></uui-icon>
|
|
202
|
+
</uui-table-cell>
|
|
203
|
+
<uui-table-cell>
|
|
204
|
+
<uui-action-bar style="justify-self: left;">
|
|
205
|
+
<uui-button
|
|
206
|
+
label="Delete"
|
|
207
|
+
look="secondary"
|
|
208
|
+
.disabled=${!this._trackerEnabled}
|
|
209
|
+
@click=${() => this.#onRequestDelete(data)}>
|
|
210
|
+
<uui-icon name="delete"></uui-icon>
|
|
211
|
+
</uui-button>
|
|
212
|
+
</uui-action-bar>
|
|
213
|
+
</uui-table-cell>
|
|
214
|
+
</uui-table-row>`;
|
|
215
|
+
})}`;
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
+
#renderPagination() {
|
|
217
218
|
if (!this._total)
|
|
218
219
|
return nothing;
|
|
219
220
|
const totalPages = Math.ceil(this._total / this.itemsPerPage);
|
|
220
221
|
if (totalPages <= 1)
|
|
221
222
|
return nothing;
|
|
222
223
|
return html `<div class="pagination">
|
|
223
|
-
<uui-pagination .total=${totalPages} @change
|
|
224
|
+
<uui-pagination .total=${totalPages} @change=${this.#onPageChange}></uui-pagination>
|
|
224
225
|
</div>`;
|
|
225
226
|
}
|
|
226
227
|
static { this.styles = [
|
|
227
228
|
UmbTextStyles,
|
|
228
229
|
css `
|
|
229
230
|
:host {
|
|
230
|
-
display:
|
|
231
|
-
|
|
231
|
+
display: flex;
|
|
232
|
+
flex-direction: column;
|
|
233
|
+
gap: var(--uui-size-4);
|
|
234
|
+
padding: var(--uui-size-layout-1);
|
|
232
235
|
}
|
|
233
236
|
|
|
234
|
-
#
|
|
237
|
+
#redirect-actions {
|
|
235
238
|
display: flex;
|
|
236
|
-
gap: var(--uui-size-space-1);
|
|
237
239
|
justify-content: space-between;
|
|
238
|
-
width: 100%;
|
|
239
|
-
padding: 0 var(--uui-size-layout-1);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
#
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
uui-table {
|
|
247
|
-
table-layout: fixed;
|
|
242
|
+
#search-wrapper {
|
|
243
|
+
display: flex;
|
|
244
|
+
gap: var(--uui-size-4);
|
|
248
245
|
}
|
|
249
246
|
|
|
250
|
-
|
|
251
|
-
|
|
247
|
+
#redirect-wrapper {
|
|
248
|
+
position: relative;
|
|
249
|
+
display: block;
|
|
252
250
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
251
|
+
#redirect-wrapper #grey-out {
|
|
252
|
+
position: absolute;
|
|
253
|
+
inset: 0;
|
|
254
|
+
background-color: var(--uui-color-surface-alt);
|
|
255
|
+
opacity: 0.7;
|
|
256
|
+
z-index: 1;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
uui-table uui-icon {
|
|
260
|
-
vertical-align: sub;
|
|
261
|
-
}
|
|
262
259
|
uui-pagination {
|
|
263
260
|
display: inline-block;
|
|
264
261
|
}
|
|
262
|
+
|
|
265
263
|
.pagination {
|
|
266
264
|
display: flex;
|
|
267
265
|
justify-content: center;
|
|
268
266
|
margin-top: var(--uui-size-space-5);
|
|
269
267
|
}
|
|
270
|
-
|
|
271
|
-
.trackerDisabled {
|
|
272
|
-
position: relative;
|
|
273
|
-
-webkit-user-select: none;
|
|
274
|
-
-ms-user-select: none;
|
|
275
|
-
user-select: none;
|
|
276
|
-
}
|
|
277
|
-
.trackerDisabled::after {
|
|
278
|
-
content: '';
|
|
279
|
-
background-color: var(--uui-color-disabled);
|
|
280
|
-
position: absolute;
|
|
281
|
-
border-radius: 2px;
|
|
282
|
-
left: 0;
|
|
283
|
-
right: 0;
|
|
284
|
-
top: 0;
|
|
285
|
-
bottom: 0;
|
|
286
|
-
-webkit-user-select: none;
|
|
287
|
-
-ms-user-select: none;
|
|
288
|
-
user-select: none;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
a {
|
|
292
|
-
color: var(--uui-color-interactive);
|
|
293
|
-
}
|
|
294
|
-
a:hover,
|
|
295
|
-
a:focus {
|
|
296
|
-
color: var(--uui-color-interactive-emphasis);
|
|
297
|
-
}
|
|
298
268
|
`,
|
|
299
269
|
]; }
|
|
300
270
|
};
|
|
@@ -302,17 +272,17 @@ __decorate([
|
|
|
302
272
|
property({ type: Number, attribute: 'items-per-page' })
|
|
303
273
|
], UmbDashboardRedirectManagementElement.prototype, "itemsPerPage", void 0);
|
|
304
274
|
__decorate([
|
|
305
|
-
|
|
306
|
-
], UmbDashboardRedirectManagementElement.prototype, "
|
|
275
|
+
property({ type: Number })
|
|
276
|
+
], UmbDashboardRedirectManagementElement.prototype, "page", void 0);
|
|
307
277
|
__decorate([
|
|
308
278
|
state()
|
|
309
|
-
], UmbDashboardRedirectManagementElement.prototype, "
|
|
279
|
+
], UmbDashboardRedirectManagementElement.prototype, "_trackerEnabled", void 0);
|
|
310
280
|
__decorate([
|
|
311
281
|
state()
|
|
312
|
-
], UmbDashboardRedirectManagementElement.prototype, "
|
|
282
|
+
], UmbDashboardRedirectManagementElement.prototype, "_total", void 0);
|
|
313
283
|
__decorate([
|
|
314
284
|
state()
|
|
315
|
-
], UmbDashboardRedirectManagementElement.prototype, "
|
|
285
|
+
], UmbDashboardRedirectManagementElement.prototype, "_redirectData", void 0);
|
|
316
286
|
__decorate([
|
|
317
287
|
state()
|
|
318
288
|
], UmbDashboardRedirectManagementElement.prototype, "_buttonState", void 0);
|
|
@@ -320,8 +290,8 @@ __decorate([
|
|
|
320
290
|
state()
|
|
321
291
|
], UmbDashboardRedirectManagementElement.prototype, "_filter", void 0);
|
|
322
292
|
__decorate([
|
|
323
|
-
query('#search
|
|
324
|
-
], UmbDashboardRedirectManagementElement.prototype, "
|
|
293
|
+
query('#search')
|
|
294
|
+
], UmbDashboardRedirectManagementElement.prototype, "_search", void 0);
|
|
325
295
|
__decorate([
|
|
326
296
|
query('uui-pagination')
|
|
327
297
|
], UmbDashboardRedirectManagementElement.prototype, "_pagination", void 0);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './components/index.js';
|
|
2
|
+
export * from './repository/index.js';
|
|
2
3
|
export declare const DOCUMENT_TYPE_ROOT_ENTITY_TYPE = "document-type-root";
|
|
3
4
|
export declare const DOCUMENT_TYPE_ENTITY_TYPE = "document-type";
|
|
4
5
|
export declare const DOCUMENT_TYPE_FOLDER_ENTITY_TYPE = "document-type-folder";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import './components/index.js';
|
|
2
|
+
export * from './repository/index.js';
|
|
2
3
|
export const DOCUMENT_TYPE_ROOT_ENTITY_TYPE = 'document-type-root';
|
|
3
4
|
export const DOCUMENT_TYPE_ENTITY_TYPE = 'document-type';
|
|
4
5
|
export const DOCUMENT_TYPE_FOLDER_ENTITY_TYPE = 'document-type-folder';
|
|
@@ -38,9 +38,9 @@ export declare class UmbDocumentTypeRepository implements UmbTreeRepository<Enti
|
|
|
38
38
|
requestById(id: string): Promise<{
|
|
39
39
|
data: DocumentTypeResponseModel | undefined;
|
|
40
40
|
error: import("../../../../external/backend-api/index.js").ApiError | import("../../../../external/backend-api/index.js").CancelError | undefined;
|
|
41
|
-
asObservable: () => import("rxjs").Observable<
|
|
41
|
+
asObservable: () => import("rxjs").Observable<DocumentTypeResponseModel | undefined>;
|
|
42
42
|
}>;
|
|
43
|
-
byId(id: string): Promise<import("rxjs").Observable<
|
|
43
|
+
byId(id: string): Promise<import("rxjs").Observable<DocumentTypeResponseModel | undefined>>;
|
|
44
44
|
requestAllowedChildTypesOf(id: string): Promise<import("../../../../shared/repository/index.js").DataSourceResponse<any>>;
|
|
45
45
|
create(documentType: ItemType): Promise<{
|
|
46
46
|
data: {
|
|
@@ -8,7 +8,7 @@ import { UmbControllerHostElement } from '../../../../libs/controller-api/index.
|
|
|
8
8
|
* @extends {UmbStoreBase}
|
|
9
9
|
* @description - Data Store for Document Types
|
|
10
10
|
*/
|
|
11
|
-
export declare class UmbDocumentTypeStore extends UmbStoreBase {
|
|
11
|
+
export declare class UmbDocumentTypeStore extends UmbStoreBase<DocumentTypeResponseModel> {
|
|
12
12
|
/**
|
|
13
13
|
* Creates an instance of UmbDocumentTypeStore.
|
|
14
14
|
* @param {UmbControllerHostElement} host
|
|
@@ -26,7 +26,7 @@ export declare class UmbDocumentTypeStore extends UmbStoreBase {
|
|
|
26
26
|
* @param {DocumentTypeModel} document
|
|
27
27
|
* @memberof UmbDocumentTypeStore
|
|
28
28
|
*/
|
|
29
|
-
byId(id: DocumentTypeResponseModel['id']): import("rxjs").Observable<
|
|
29
|
+
byId(id: DocumentTypeResponseModel['id']): import("rxjs").Observable<DocumentTypeResponseModel | undefined>;
|
|
30
30
|
/**
|
|
31
31
|
* Removes document-types in the store with the given uniques
|
|
32
32
|
* @param {string[]} uniques
|
|
@@ -84,7 +84,13 @@ export let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocument
|
|
|
84
84
|
new UmbModalRouteRegistrationController(this, UMB_PROPERTY_SETTINGS_MODAL)
|
|
85
85
|
.addAdditionalPath('new-property')
|
|
86
86
|
.onSetup(async () => {
|
|
87
|
-
|
|
87
|
+
const documentTypeId = this._ownerDocumentTypes?.find((types) => types.containers?.find((containers) => containers.id === this.containerId))?.id;
|
|
88
|
+
if (documentTypeId === undefined)
|
|
89
|
+
return false;
|
|
90
|
+
const propertyData = await this._propertyStructureHelper.createPropertyScaffold(this._containerId);
|
|
91
|
+
if (propertyData === undefined)
|
|
92
|
+
return false;
|
|
93
|
+
return { propertyData, documentTypeId };
|
|
88
94
|
})
|
|
89
95
|
.onSubmit((result) => {
|
|
90
96
|
this.#addProperty(result);
|
|
@@ -95,7 +101,7 @@ export let UmbDocumentTypeWorkspaceViewEditPropertiesElement = class UmbDocument
|
|
|
95
101
|
}
|
|
96
102
|
connectedCallback() {
|
|
97
103
|
super.connectedCallback();
|
|
98
|
-
const doctypes = this._propertyStructureHelper.
|
|
104
|
+
const doctypes = this._propertyStructureHelper.ownerDocumentTypes;
|
|
99
105
|
if (!doctypes)
|
|
100
106
|
return;
|
|
101
107
|
this.observe(doctypes, (documents) => {
|
|
@@ -50,7 +50,13 @@ export let UmbDocumentTypeWorkspacePropertyElement = class UmbDocumentTypeWorksp
|
|
|
50
50
|
this.#modalRegistration = new UmbModalRouteRegistrationController(this, UMB_PROPERTY_SETTINGS_MODAL)
|
|
51
51
|
.addUniquePaths(['propertyId'])
|
|
52
52
|
.onSetup(() => {
|
|
53
|
-
|
|
53
|
+
const documentTypeId = this.ownerDocumentTypeId;
|
|
54
|
+
if (documentTypeId === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
const propertyData = this.property;
|
|
57
|
+
if (propertyData === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
return { propertyData, documentTypeId };
|
|
54
60
|
})
|
|
55
61
|
.onSubmit((result) => {
|
|
56
62
|
this._partialUpdate(result);
|
|
@@ -6,11 +6,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { UmbHealthCheckDashboardContext, UMB_HEALTHCHECK_DASHBOARD_CONTEXT_TOKEN, } from './health-check-dashboard.context.js';
|
|
8
8
|
import { UmbHealthCheckContext } from './health-check.context.js';
|
|
9
|
-
import { html, customElement, state } from '
|
|
10
|
-
import { HealthCheckResource } from '
|
|
11
|
-
import { UmbLitElement } from '
|
|
12
|
-
import { umbExtensionsRegistry } from '
|
|
13
|
-
import { tryExecuteAndNotify } from '
|
|
9
|
+
import { html, customElement, state } from '../../external/lit/index.js';
|
|
10
|
+
import { HealthCheckResource } from '../../external/backend-api/index.js';
|
|
11
|
+
import { UmbLitElement } from '../../shared/lit-element/index.js';
|
|
12
|
+
import { umbExtensionsRegistry } from '../core/extension-registry/index.js';
|
|
13
|
+
import { tryExecuteAndNotify } from '../../shared/resources/index.js';
|
|
14
14
|
export let UmbDashboardHealthCheckElement = class UmbDashboardHealthCheckElement extends UmbLitElement {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UmbHealthCheckContext } from './health-check.context.js';
|
|
2
|
-
import type { ManifestHealthCheck } from '
|
|
3
|
-
import { UmbContextToken } from '
|
|
2
|
+
import type { ManifestHealthCheck } from '../core/extension-registry/index.js';
|
|
3
|
+
import { UmbContextToken } from '../../libs/context-api/index.js';
|
|
4
4
|
export declare class UmbHealthCheckDashboardContext {
|
|
5
5
|
#private;
|
|
6
6
|
set manifests(value: ManifestHealthCheck[]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HealthCheckGroupPresentationModel, HealthCheckGroupWithResultResponseModel } from '
|
|
2
|
-
import { UmbContextToken } from '
|
|
3
|
-
import { UmbControllerHostElement } from '
|
|
1
|
+
import { HealthCheckGroupPresentationModel, HealthCheckGroupWithResultResponseModel } from '../../external/backend-api/index.js';
|
|
2
|
+
import { UmbContextToken } from '../../libs/context-api/index.js';
|
|
3
|
+
import { UmbControllerHostElement } from '../../libs/controller-api/index.js';
|
|
4
4
|
export declare class UmbHealthCheckContext {
|
|
5
5
|
private _checks;
|
|
6
6
|
readonly checks: import("rxjs/internal/Observable").Observable<HealthCheckGroupPresentationModel | undefined>;
|