@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.
Files changed (118) hide show
  1. package/dist-cms/apps/app/app.element.js +4 -1
  2. package/dist-cms/apps/app/index.d.ts +1 -0
  3. package/dist-cms/apps/app/index.js +1 -0
  4. package/dist-cms/apps/backoffice/backoffice.element.js +1 -0
  5. package/dist-cms/custom-elements.json +173 -140
  6. package/dist-cms/mocks/browser-handlers.js +2 -0
  7. package/dist-cms/mocks/data/scripts.data.d.ts +21 -0
  8. package/dist-cms/mocks/data/scripts.data.js +205 -0
  9. package/dist-cms/mocks/handlers/scripts.handlers.d.ts +2 -0
  10. package/dist-cms/mocks/handlers/scripts.handlers.js +83 -0
  11. package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.d.ts +1 -1
  12. package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +1 -1
  13. package/dist-cms/packages/core/culture/components/index.d.ts +1 -0
  14. package/dist-cms/packages/core/culture/components/index.js +1 -0
  15. package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.js +5 -5
  16. package/dist-cms/packages/core/culture/index.d.ts +2 -0
  17. package/dist-cms/packages/core/culture/index.js +2 -0
  18. package/dist-cms/packages/core/culture/manifests.d.ts +1 -0
  19. package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.js +1 -1
  20. package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.d.ts +1 -1
  21. package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.js +1 -1
  22. package/dist-cms/packages/core/index.d.ts +1 -0
  23. package/dist-cms/packages/core/index.js +3 -0
  24. package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.d.ts +1 -0
  25. package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.element.js +37 -4
  26. package/dist-cms/packages/core/modal/token/property-settings-modal.token.d.ts +5 -2
  27. package/dist-cms/packages/documents/dashboards/redirect-management/dashboard-redirect-management.element.d.ts +5 -17
  28. package/dist-cms/packages/documents/dashboards/redirect-management/dashboard-redirect-management.element.js +184 -214
  29. package/dist-cms/packages/documents/document-types/index.d.ts +1 -0
  30. package/dist-cms/packages/documents/document-types/index.js +1 -0
  31. package/dist-cms/packages/documents/document-types/repository/document-type.repository.d.ts +2 -2
  32. package/dist-cms/packages/documents/document-types/repository/document-type.store.d.ts +2 -2
  33. package/dist-cms/packages/documents/document-types/repository/index.d.ts +3 -0
  34. package/dist-cms/packages/documents/document-types/repository/index.js +3 -0
  35. package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-properties.element.js +8 -2
  36. package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit-property.element.js +7 -1
  37. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/dashboard-health-check.element.d.ts +1 -1
  38. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/dashboard-health-check.element.js +5 -5
  39. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check-dashboard.context.d.ts +2 -2
  40. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check-dashboard.context.js +1 -1
  41. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check.context.d.ts +3 -3
  42. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/health-check.context.js +4 -4
  43. package/dist-cms/packages/health-check/index.d.ts +1 -0
  44. package/dist-cms/packages/health-check/index.js +1 -0
  45. package/dist-cms/packages/health-check/manifests.d.ts +16 -0
  46. package/dist-cms/packages/health-check/manifests.js +20 -0
  47. package/dist-cms/packages/health-check/umbraco-package.d.ts +7 -0
  48. package/dist-cms/packages/health-check/umbraco-package.js +9 -0
  49. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-action.element.d.ts +2 -2
  50. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-action.element.js +5 -5
  51. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group-box-overview.element.d.ts +2 -2
  52. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group-box-overview.element.js +5 -5
  53. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group.element.d.ts +2 -2
  54. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-group.element.js +5 -5
  55. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-overview.element.d.ts +1 -1
  56. package/dist-cms/packages/{settings/dashboards/health-check → health-check}/views/health-check-overview.element.js +3 -3
  57. package/dist-cms/packages/settings/dashboards/manifests.js +0 -18
  58. package/dist-cms/packages/settings/manifests.js +0 -2
  59. package/dist-cms/packages/templating/manifests.js +2 -0
  60. package/dist-cms/packages/templating/scripts/config.d.ts +20 -0
  61. package/dist-cms/packages/templating/scripts/config.js +22 -0
  62. package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.d.ts +8 -0
  63. package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.js +9 -0
  64. package/dist-cms/packages/templating/scripts/entity-actions/manifests.d.ts +2 -0
  65. package/dist-cms/packages/templating/scripts/entity-actions/manifests.js +56 -0
  66. package/dist-cms/packages/templating/scripts/index.d.ts +2 -0
  67. package/dist-cms/packages/templating/scripts/index.js +2 -0
  68. package/dist-cms/packages/templating/scripts/manifests.d.ts +1 -0
  69. package/dist-cms/packages/templating/scripts/manifests.js +12 -0
  70. package/dist-cms/packages/templating/scripts/menu-item/manifests.d.ts +1 -0
  71. package/dist-cms/packages/templating/scripts/menu-item/manifests.js +16 -0
  72. package/dist-cms/packages/templating/scripts/repository/index.d.ts +1 -0
  73. package/dist-cms/packages/templating/scripts/repository/index.js +1 -0
  74. package/dist-cms/packages/templating/scripts/repository/manifests.d.ts +2 -0
  75. package/dist-cms/packages/templating/scripts/repository/manifests.js +23 -0
  76. package/dist-cms/packages/templating/scripts/repository/scripts.repository.d.ts +71 -0
  77. package/dist-cms/packages/templating/scripts/repository/scripts.repository.js +154 -0
  78. package/dist-cms/packages/templating/scripts/repository/scripts.store.d.ts +31 -0
  79. package/dist-cms/packages/templating/scripts/repository/scripts.store.js +37 -0
  80. package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.d.ts +19 -0
  81. package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.js +21 -0
  82. package/dist-cms/packages/templating/scripts/repository/sources/index.d.ts +11 -0
  83. package/dist-cms/packages/templating/scripts/repository/sources/index.js +1 -0
  84. package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.d.ts +41 -0
  85. package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.js +57 -0
  86. package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.d.ts +17 -0
  87. package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.js +23 -0
  88. package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.d.ts +14 -0
  89. package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.js +31 -0
  90. package/dist-cms/packages/templating/scripts/tree/manifests.d.ts +2 -0
  91. package/dist-cms/packages/templating/scripts/tree/manifests.js +20 -0
  92. package/dist-cms/packages/templating/scripts/workspace/manifests.d.ts +2 -0
  93. package/dist-cms/packages/templating/scripts/workspace/manifests.js +32 -0
  94. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.d.ts +24 -0
  95. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.js +171 -0
  96. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.d.ts +23 -0
  97. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.js +87 -0
  98. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.d.ts +14 -0
  99. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.js +50 -0
  100. package/dist-cms/packages/users/current-user/modals/current-user/current-user-modal.element.js +2 -2
  101. package/dist-cms/shared/auth/auth-flow.js +3 -1
  102. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  103. package/dist-cms/vscode-html-custom-data.json +86 -72
  104. package/package.json +3 -2
  105. package/dist-cms/packages/settings/cultures/components/index.d.ts +0 -1
  106. package/dist-cms/packages/settings/cultures/components/index.js +0 -1
  107. package/dist-cms/packages/settings/cultures/manifests.d.ts +0 -1
  108. package/dist-cms/shared/context/index.d.ts +0 -1
  109. package/dist-cms/shared/context/index.js +0 -1
  110. /package/dist-cms/{shared/context → apps/app}/app.context.d.ts +0 -0
  111. /package/dist-cms/{shared/context → apps/app}/app.context.js +0 -0
  112. /package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.d.ts +0 -0
  113. /package/dist-cms/packages/{settings/cultures → core/culture}/manifests.js +0 -0
  114. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.d.ts +0 -0
  115. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.d.ts +0 -0
  116. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.js +0 -0
  117. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.d.ts +0 -0
  118. /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._trackerStatus = true;
18
- this._currentPage = 1;
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._getTrackerStatus();
26
- this._getRedirectData();
26
+ this.#getTrackerStatus();
27
+ this.#getRedirectData();
27
28
  }
28
- async _getTrackerStatus() {
29
+ async #getTrackerStatus() {
29
30
  const { data } = await tryExecuteAndNotify(this, RedirectManagementResource.getRedirectManagementStatus());
30
31
  if (data && data.status)
31
- this._trackerStatus = data.status === RedirectStatusModel.ENABLED ? true : false;
32
+ this._trackerEnabled = data.status === RedirectStatusModel.ENABLED ? true : false;
32
33
  }
33
- _removeRedirectHandler(data) {
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>This will remove the redirect</p>
39
- Original URL: <strong>${data.originalUrl}</strong><br />
40
- Redirected To: <strong>${data.destinationUrl}</strong>
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?.onSubmit().then(() => {
48
- this._removeRedirect(data);
49
- });
68
+ modalContext
69
+ ?.onSubmit()
70
+ .then(() => {
71
+ this.#redirectDelete(data.id);
72
+ })
73
+ .catch(() => undefined);
50
74
  }
51
- async _removeRedirect(r) {
52
- if (!r.id)
75
+ async #redirectDelete(id) {
76
+ const { error } = await tryExecuteAndNotify(this, RedirectManagementResource.deleteRedirectManagementById({ id }));
77
+ if (error)
53
78
  return;
54
- const res = await tryExecuteAndNotify(this, RedirectManagementResource.deleteRedirectManagementById({ id: r.id }));
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
- async _toggleRedirect() {
74
- const { error } = await tryExecuteAndNotify(this, RedirectManagementResource.postRedirectManagementStatus({ status: RedirectStatusModel.ENABLED }));
75
- if (!error) {
76
- this._trackerStatus = !this._trackerStatus;
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
- async _searchHandler() {
84
- this._filter = this._searchField.value;
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._currentPage = 1;
88
- if (this._filter.length) {
89
- this._buttonState = 'waiting';
90
- }
91
- this._getRedirectData();
91
+ this.page = 1;
92
+ this.#getRedirectData(this._search.value);
92
93
  }
93
- _onPageChange(event) {
94
- if (this._currentPage === event.target.current)
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
- <umb-body-layout header-transparent class="uui-text">
113
- <div slot="header" id="header">
114
- ${this._trackerStatus
115
- ? html `<div>
116
- <uui-input
117
- id="search-input"
118
- placeholder="Original URL"
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
- label="Disable URL tracker"
134
- look="outline"
135
- color="danger"
136
- @click="${this._disableRedirectHandler}">
137
- Disable URL tracker
138
- </uui-button> `
139
- : html `<uui-button
140
- label="Enable URL tracker"
141
- look="primary"
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
- @click="${this._toggleRedirect}">
144
- Enable URL tracker
145
- </uui-button>`}
146
- </div>
147
-
148
- <div id="main">
149
- ${this._total && this._total > 0
150
- ? html `<div class="wrapper ${this._trackerStatus ? 'trackerEnabled' : 'trackerDisabled'}">
151
- ${this.renderTable()}
152
- </div>`
153
- : this._filter?.length
154
- ? this._renderZeroResults()
155
- : this.renderNoRedirects()}
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
- _renderZeroResults() {
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>No redirects have been made</strong>
169
- <p>When a published page gets renamed or moved, a redirect will automatically be made to the new page.</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
- // TODO: Instead of map, use repeat lit util:
174
- return html `<uui-box style="--uui-box-default-padding: 0;">
175
- <uui-table>
176
- <uui-table-head>
177
- <uui-table-head-cell style="width:10%;">Culture</uui-table-head-cell>
178
- <uui-table-head-cell>Original URL</uui-table-head-cell>
179
- <uui-table-head-cell style="width:10%;"></uui-table-head-cell>
180
- <uui-table-head-cell>Redirected To</uui-table-head-cell>
181
- <uui-table-head-cell style="width:10%;">Actions</uui-table-head-cell>
182
- </uui-table-head>
183
- ${this._redirectData?.map((data) => {
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
- <uui-table-cell> ${data.culture || '*'} </uui-table-cell>
186
- <uui-table-cell>
187
- <a href="${data.originalUrl || '#'}" target="_blank"> ${data.originalUrl}</a>
188
- <uui-icon name="umb:out"></uui-icon>
189
- </uui-table-cell>
190
- <uui-table-cell>
191
- <uui-icon name="umb:arrow-right"></uui-icon>
192
- </uui-table-cell>
193
- <uui-table-cell>
194
- <a href="${data.destinationUrl || '#'}" target="_blank"> ${data.destinationUrl}</a>
195
- <uui-icon name="umb:out"></uui-icon>
196
- </uui-table-cell>
197
- <uui-table-cell>
198
- <uui-action-bar style="justify-self: left;">
199
- <uui-button
200
- label="Delete"
201
- look="secondary"
202
- .disabled=${!this._trackerStatus}
203
- @click="${() => this._removeRedirectHandler(data)}">
204
- <uui-icon name="delete"></uui-icon>
205
- </uui-button>
206
- </uui-action-bar>
207
- </uui-table-cell>
208
- </uui-table-row>`;
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
- _renderPagination() {
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="${this._onPageChange}"></uui-pagination>
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: block;
231
- height: 100%;
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
- #header {
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
- #header uui-icon {
243
- transform: translateX(50%);
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
- uui-table-head-cell:nth-child(2*n) {
251
- width: 10%;
247
+ #redirect-wrapper {
248
+ position: relative;
249
+ display: block;
252
250
  }
253
-
254
- uui-table-head-cell:last-child,
255
- uui-table-cell:last-child {
256
- text-align: right;
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
- state()
306
- ], UmbDashboardRedirectManagementElement.prototype, "_redirectData", void 0);
275
+ property({ type: Number })
276
+ ], UmbDashboardRedirectManagementElement.prototype, "page", void 0);
307
277
  __decorate([
308
278
  state()
309
- ], UmbDashboardRedirectManagementElement.prototype, "_trackerStatus", void 0);
279
+ ], UmbDashboardRedirectManagementElement.prototype, "_trackerEnabled", void 0);
310
280
  __decorate([
311
281
  state()
312
- ], UmbDashboardRedirectManagementElement.prototype, "_currentPage", void 0);
282
+ ], UmbDashboardRedirectManagementElement.prototype, "_total", void 0);
313
283
  __decorate([
314
284
  state()
315
- ], UmbDashboardRedirectManagementElement.prototype, "_total", void 0);
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-input')
324
- ], UmbDashboardRedirectManagementElement.prototype, "_searchField", void 0);
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<any>;
41
+ asObservable: () => import("rxjs").Observable<DocumentTypeResponseModel | undefined>;
42
42
  }>;
43
- byId(id: string): Promise<import("rxjs").Observable<any>>;
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<any>;
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
@@ -0,0 +1,3 @@
1
+ export * from './document-type.repository.js';
2
+ export * from './document-type.store.js';
3
+ export * from './document-type.tree.store.js';
@@ -0,0 +1,3 @@
1
+ export * from './document-type.repository.js';
2
+ export * from './document-type.store.js';
3
+ export * from './document-type.tree.store.js';
@@ -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
- return (await this._propertyStructureHelper.createPropertyScaffold(this._containerId)) ?? false;
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.getOwnerDocumentTypes();
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
- return this.property ?? false;
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);
@@ -1,4 +1,4 @@
1
- import { UmbLitElement } from '../../../../shared/lit-element/index.js';
1
+ import { UmbLitElement } from '../../shared/lit-element/index.js';
2
2
  export declare class UmbDashboardHealthCheckElement extends UmbLitElement {
3
3
  #private;
4
4
  private _routes;
@@ -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 '../../../../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';
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 '../../../core/extension-registry/index.js';
3
- import { UmbContextToken } from '../../../../libs/context-api/index.js';
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,4 +1,4 @@
1
- import { UmbContextToken } from '../../../../libs/context-api/index.js';
1
+ import { UmbContextToken } from '../../libs/context-api/index.js';
2
2
  export class UmbHealthCheckDashboardContext {
3
3
  #manifests;
4
4
  set manifests(value) {
@@ -1,6 +1,6 @@
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';
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>;