@umbraco-cms/backoffice 16.0.0-rc2 → 16.0.0-rc3

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 (193) hide show
  1. package/dist-cms/custom-elements.json +80 -0
  2. package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit-properties.element.d.ts +1 -1
  3. package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit-properties.element.js +7 -7
  4. package/dist-cms/packages/block/block/workspace/views/edit/block-workspace-view-edit-property.element.js +1 -1
  5. package/dist-cms/packages/block/block-type/components/input-block-type/input-block-type.element.js +1 -2
  6. package/dist-cms/packages/clipboard/property/value-translator/copy/clipboard-copy-translator-value-resolver.js +6 -1
  7. package/dist-cms/packages/content/content/controller/merge-content-variant-data.controller.js +1 -0
  8. package/dist-cms/packages/content/content/property-dataset-context/element-property-dataset.context.js +4 -1
  9. package/dist-cms/packages/content/content/workspace/content-detail-workspace-base.js +4 -0
  10. package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.d.ts +1 -1
  11. package/dist-cms/packages/content/content/workspace/views/edit/content-editor-properties.element.js +7 -7
  12. package/dist-cms/packages/content/content/workspace/views/edit/content-editor-property.element.js +1 -1
  13. package/dist-cms/packages/core/backend-api/types.gen.d.ts +2 -0
  14. package/dist-cms/packages/core/collection/default/collection-default.context.d.ts +1 -0
  15. package/dist-cms/packages/core/collection/default/collection-default.context.js +3 -0
  16. package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.js +4 -1
  17. package/dist-cms/packages/core/culture/manifests.d.ts +1 -1
  18. package/dist-cms/packages/core/entity-action/common/create/create.action.js +1 -0
  19. package/dist-cms/packages/core/entity-item/entity-item-ref/entity-item-ref.element.d.ts +9 -0
  20. package/dist-cms/packages/core/entity-item/entity-item-ref/entity-item-ref.element.js +80 -2
  21. package/dist-cms/packages/core/picker/search/picker-search-result.element.js +1 -2
  22. package/dist-cms/packages/core/property/manifests.d.ts +1 -1
  23. package/dist-cms/packages/core/property/property-dataset/property-dataset-base-context.js +7 -2
  24. package/dist-cms/packages/core/property/property-guard-manager/variant-property-guard.manager.d.ts +15 -2
  25. package/dist-cms/packages/core/property/property-guard-manager/variant-property-guard.manager.js +22 -15
  26. package/dist-cms/packages/core/property/property-value-cloner/property-value-clone.controller.js +2 -0
  27. package/dist-cms/packages/core/property/property-value-preset/property-value-preset-builder.controller.js +6 -1
  28. package/dist-cms/packages/core/section/section-default.element.js +3 -0
  29. package/dist-cms/packages/core/temporary-file/config/config.repository.d.ts +1 -0
  30. package/dist-cms/packages/core/temporary-file/config/config.repository.js +7 -3
  31. package/dist-cms/packages/core/temporary-file/config/config.server.data-source.js +1 -1
  32. package/dist-cms/packages/core/temporary-file/manifests.d.ts +1 -1
  33. package/dist-cms/packages/core/temporary-file/temporary-file-manager.class.js +15 -4
  34. package/dist-cms/packages/core/themes/manifests.d.ts +1 -1
  35. package/dist-cms/packages/core/utils/media/image-size.function.d.ts +5 -3
  36. package/dist-cms/packages/core/utils/media/image-size.function.js +9 -11
  37. package/dist-cms/packages/core/validation/controllers/bind-server-validation-to-form-control.controller.js +1 -1
  38. package/dist-cms/packages/core/validation/controllers/form-control-validator.controller.js +4 -4
  39. package/dist-cms/packages/core/validation/controllers/validation-path-translation/validation-property-path-translation.controller.js +1 -0
  40. package/dist-cms/packages/core/validation/controllers/validation.controller.js +4 -4
  41. package/dist-cms/packages/core/variant/constants.d.ts +1 -0
  42. package/dist-cms/packages/core/variant/constants.js +1 -0
  43. package/dist-cms/packages/core/variant/context/constants.d.ts +1 -0
  44. package/dist-cms/packages/core/variant/context/constants.js +1 -0
  45. package/dist-cms/packages/core/variant/context/index.d.ts +1 -0
  46. package/dist-cms/packages/core/variant/context/index.js +1 -0
  47. package/dist-cms/packages/core/variant/context/variant.context.d.ts +91 -0
  48. package/dist-cms/packages/core/variant/context/variant.context.js +141 -0
  49. package/dist-cms/packages/core/variant/context/variant.context.token.d.ts +3 -0
  50. package/dist-cms/packages/core/variant/context/variant.context.token.js +2 -0
  51. package/dist-cms/packages/core/variant/index.d.ts +2 -0
  52. package/dist-cms/packages/core/variant/index.js +2 -0
  53. package/dist-cms/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.js +0 -4
  54. package/dist-cms/packages/core/workspace/workspace-property-dataset/invariant-workspace-property-dataset-context.js +4 -1
  55. package/dist-cms/packages/data-type/constants.d.ts +1 -0
  56. package/dist-cms/packages/data-type/constants.js +1 -0
  57. package/dist-cms/packages/data-type/search/constants.d.ts +2 -0
  58. package/dist-cms/packages/data-type/search/constants.js +2 -0
  59. package/dist-cms/packages/data-type/search/global-search/constants.d.ts +1 -0
  60. package/dist-cms/packages/data-type/search/global-search/constants.js +1 -0
  61. package/dist-cms/packages/data-type/search/global-search/manifests.d.ts +1 -0
  62. package/dist-cms/packages/data-type/search/global-search/manifests.js +22 -0
  63. package/dist-cms/packages/data-type/search/manifests.js +2 -0
  64. package/dist-cms/packages/dictionary/search/constants.d.ts +1 -0
  65. package/dist-cms/packages/dictionary/search/constants.js +1 -0
  66. package/dist-cms/packages/dictionary/search/global-search/constants.d.ts +1 -0
  67. package/dist-cms/packages/dictionary/search/global-search/constants.js +1 -0
  68. package/dist-cms/packages/dictionary/search/global-search/manifests.d.ts +1 -0
  69. package/dist-cms/packages/dictionary/search/global-search/manifests.js +22 -0
  70. package/dist-cms/packages/dictionary/search/manifests.js +2 -0
  71. package/dist-cms/packages/documents/document-types/search/constants.d.ts +1 -0
  72. package/dist-cms/packages/documents/document-types/search/constants.js +1 -0
  73. package/dist-cms/packages/documents/document-types/search/global-search/constants.d.ts +1 -0
  74. package/dist-cms/packages/documents/document-types/search/global-search/constants.js +1 -0
  75. package/dist-cms/packages/documents/document-types/search/global-search/manifests.d.ts +1 -0
  76. package/dist-cms/packages/documents/document-types/search/global-search/manifests.js +22 -0
  77. package/dist-cms/packages/documents/document-types/search/manifests.js +2 -0
  78. package/dist-cms/packages/documents/documents/collection/document-collection.context.d.ts +2 -0
  79. package/dist-cms/packages/documents/documents/collection/document-collection.context.js +23 -0
  80. package/dist-cms/packages/documents/documents/components/input-document/input-document.context.js +4 -0
  81. package/dist-cms/packages/documents/documents/item/document-item-data-resolver.d.ts +2 -2
  82. package/dist-cms/packages/documents/documents/item/document-item-data-resolver.js +55 -68
  83. package/dist-cms/packages/documents/documents/item/document-item-ref.element.d.ts +4 -0
  84. package/dist-cms/packages/documents/documents/item/document-item-ref.element.js +33 -2
  85. package/dist-cms/packages/documents/documents/picker/document-picker-search-result-item.element.d.ts +1 -0
  86. package/dist-cms/packages/documents/documents/picker/document-picker-search-result-item.element.js +14 -8
  87. package/dist-cms/packages/documents/documents/property-dataset-context/document-property-dataset.context.d.ts +0 -1
  88. package/dist-cms/packages/documents/documents/property-dataset-context/document-property-dataset.context.js +0 -42
  89. package/dist-cms/packages/documents/documents/search/constants.d.ts +1 -0
  90. package/dist-cms/packages/documents/documents/search/constants.js +1 -0
  91. package/dist-cms/packages/documents/documents/search/document-search.server.data-source.js +3 -2
  92. package/dist-cms/packages/documents/documents/search/global-search/constants.d.ts +1 -0
  93. package/dist-cms/packages/documents/documents/search/global-search/constants.js +1 -0
  94. package/dist-cms/packages/documents/documents/search/global-search/document-global-search.d.ts +6 -0
  95. package/dist-cms/packages/documents/documents/search/global-search/document-global-search.js +15 -0
  96. package/dist-cms/packages/documents/documents/search/global-search/manifests.d.ts +1 -0
  97. package/dist-cms/packages/documents/documents/search/global-search/manifests.js +23 -0
  98. package/dist-cms/packages/documents/documents/search/manifests.js +2 -0
  99. package/dist-cms/packages/documents/documents/search/types.d.ts +1 -0
  100. package/dist-cms/packages/documents/documents/url/document-urls-data-resolver.d.ts +37 -0
  101. package/dist-cms/packages/documents/documents/url/document-urls-data-resolver.js +78 -0
  102. package/dist-cms/packages/documents/documents/url/index.d.ts +1 -0
  103. package/dist-cms/packages/documents/documents/url/index.js +1 -0
  104. package/dist-cms/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.d.ts +0 -1
  105. package/dist-cms/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.js +29 -24
  106. package/dist-cms/packages/documents/documents/url/repository/types.d.ts +1 -1
  107. package/dist-cms/packages/documents/documents/workspace/document-workspace.context.js +29 -0
  108. package/dist-cms/packages/language/global-contexts/app-language.context.js +14 -12
  109. package/dist-cms/packages/markdown-editor/components/input-markdown-editor/input-markdown.element.js +3 -0
  110. package/dist-cms/packages/media/media/components/input-media/input-media.context.js +4 -0
  111. package/dist-cms/packages/media/media/constants.d.ts +1 -1
  112. package/dist-cms/packages/media/media/constants.js +1 -1
  113. package/dist-cms/packages/media/media/modals/media-picker/media-picker-modal.element.js +8 -0
  114. package/dist-cms/packages/media/media/search/constants.d.ts +1 -0
  115. package/dist-cms/packages/media/media/search/constants.js +1 -0
  116. package/dist-cms/packages/media/media/search/global-search/constants.d.ts +1 -0
  117. package/dist-cms/packages/media/media/search/global-search/constants.js +1 -0
  118. package/dist-cms/packages/media/media/search/global-search/manifests.d.ts +1 -0
  119. package/dist-cms/packages/media/media/search/global-search/manifests.js +23 -0
  120. package/dist-cms/packages/media/media/search/global-search/media-global-search.d.ts +15 -0
  121. package/dist-cms/packages/media/media/search/global-search/media-global-search.js +15 -0
  122. package/dist-cms/packages/media/media/search/manifests.js +2 -0
  123. package/dist-cms/packages/media/media/search/media-search.server.data-source.js +3 -2
  124. package/dist-cms/packages/media/media/search/types.d.ts +1 -0
  125. package/dist-cms/packages/media/media-types/constants.d.ts +1 -0
  126. package/dist-cms/packages/media/media-types/constants.js +1 -0
  127. package/dist-cms/packages/media/media-types/search/constants.d.ts +2 -0
  128. package/dist-cms/packages/media/media-types/search/constants.js +2 -0
  129. package/dist-cms/packages/media/media-types/search/global-search/constants.d.ts +1 -0
  130. package/dist-cms/packages/media/media-types/search/global-search/constants.js +1 -0
  131. package/dist-cms/packages/media/media-types/search/global-search/manifests.d.ts +1 -0
  132. package/dist-cms/packages/media/media-types/search/global-search/manifests.js +22 -0
  133. package/dist-cms/packages/media/media-types/search/manifests.js +4 -1
  134. package/dist-cms/packages/members/member/search/constants.d.ts +1 -0
  135. package/dist-cms/packages/members/member/search/constants.js +1 -0
  136. package/dist-cms/packages/members/member/search/global-search/constants.d.ts +1 -0
  137. package/dist-cms/packages/members/member/search/global-search/constants.js +1 -0
  138. package/dist-cms/packages/members/member/search/global-search/manifests.d.ts +1 -0
  139. package/dist-cms/packages/members/member/search/global-search/manifests.js +22 -0
  140. package/dist-cms/packages/members/member/search/manifests.js +2 -0
  141. package/dist-cms/packages/members/member-type/constants.d.ts +1 -0
  142. package/dist-cms/packages/members/member-type/constants.js +1 -0
  143. package/dist-cms/packages/members/member-type/search/constants.d.ts +2 -0
  144. package/dist-cms/packages/members/member-type/search/constants.js +2 -0
  145. package/dist-cms/packages/members/member-type/search/global-search/constants.d.ts +1 -0
  146. package/dist-cms/packages/members/member-type/search/global-search/constants.js +1 -0
  147. package/dist-cms/packages/members/member-type/search/global-search/manifests.d.ts +1 -0
  148. package/dist-cms/packages/members/member-type/search/global-search/manifests.js +22 -0
  149. package/dist-cms/packages/members/member-type/search/manifests.js +4 -1
  150. package/dist-cms/packages/multi-url-picker/components/input-multi-url/input-multi-url.element.d.ts +4 -0
  151. package/dist-cms/packages/multi-url-picker/components/input-multi-url/input-multi-url.element.js +48 -1
  152. package/dist-cms/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.d.ts +2 -2
  153. package/dist-cms/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.js +95 -34
  154. package/dist-cms/packages/relations/relations/reference/workspace-info-app/entity-references-workspace-view-info.element.js +6 -1
  155. package/dist-cms/packages/search/global-search/global-search-base.d.ts +11 -0
  156. package/dist-cms/packages/search/global-search/global-search-base.js +49 -0
  157. package/dist-cms/packages/search/global-search/global-search.extension.d.ts +15 -0
  158. package/dist-cms/packages/search/global-search/global-search.extension.js +1 -0
  159. package/dist-cms/packages/search/global-search/index.d.ts +1 -0
  160. package/dist-cms/packages/search/global-search/index.js +1 -0
  161. package/dist-cms/packages/search/global-search/types.d.ts +4 -0
  162. package/dist-cms/packages/search/global-search/types.js +1 -0
  163. package/dist-cms/packages/search/index.d.ts +1 -0
  164. package/dist-cms/packages/search/index.js +1 -0
  165. package/dist-cms/packages/search/search-modal/search-modal.element.d.ts +4 -4
  166. package/dist-cms/packages/search/search-modal/search-modal.element.js +40 -29
  167. package/dist-cms/packages/search/types.d.ts +1 -0
  168. package/dist-cms/packages/sysinfo/components/sysinfo.element.js +49 -9
  169. package/dist-cms/packages/sysinfo/repository/sysinfo.repository.d.ts +3 -0
  170. package/dist-cms/packages/sysinfo/repository/sysinfo.repository.js +8 -0
  171. package/dist-cms/packages/templating/templates/constants.d.ts +1 -0
  172. package/dist-cms/packages/templating/templates/constants.js +1 -0
  173. package/dist-cms/packages/templating/templates/search/constants.d.ts +2 -0
  174. package/dist-cms/packages/templating/templates/search/constants.js +2 -0
  175. package/dist-cms/packages/templating/templates/search/global-search/constants.d.ts +1 -0
  176. package/dist-cms/packages/templating/templates/search/global-search/constants.js +1 -0
  177. package/dist-cms/packages/templating/templates/search/global-search/manifests.d.ts +1 -0
  178. package/dist-cms/packages/templating/templates/search/global-search/manifests.js +22 -0
  179. package/dist-cms/packages/templating/templates/search/manifests.js +4 -1
  180. package/dist-cms/packages/tiptap/extensions/core/media-upload.tiptap-api.d.ts +6 -1
  181. package/dist-cms/packages/tiptap/extensions/core/media-upload.tiptap-api.js +16 -6
  182. package/dist-cms/packages/tiptap/extensions/toolbar/media-picker.tiptap-toolbar-api.d.ts +6 -1
  183. package/dist-cms/packages/tiptap/extensions/toolbar/media-picker.tiptap-toolbar-api.js +27 -6
  184. package/dist-cms/packages/user/current-user/action/current-user-app-button.element.d.ts +1 -1
  185. package/dist-cms/packages/user/current-user/action/current-user-app-button.element.js +4 -8
  186. package/dist-cms/packages/user/current-user/current-user-action.extension.d.ts +0 -11
  187. package/dist-cms/packages/user/current-user/external-login/manifests.js +0 -1
  188. package/dist-cms/packages/user/current-user/mfa-login/manifests.js +0 -1
  189. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  190. package/dist-cms/umbraco-package-schema.json +147 -0
  191. package/dist-cms/umbraco-package.json +1 -1
  192. package/dist-cms/vscode-html-custom-data.json +48 -8
  193. package/package.json +1 -1
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { css, html, nothing, repeat, customElement, query, state, property, when, } from '@umbraco-cms/backoffice/external/lit';
8
8
  import { UmbExtensionsManifestInitializer, createExtensionApi } from '@umbraco-cms/backoffice/extension-api';
9
- import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
9
+ import { createExtensionApiByAlias, umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
10
10
  import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
11
11
  import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
12
12
  import '../search-result/search-result-item.element.js';
@@ -18,7 +18,7 @@ let UmbSearchModalElement = class UmbSearchModalElement extends UmbLitElement {
18
18
  super();
19
19
  this._search = '';
20
20
  this._searchResults = [];
21
- this._searchProviders = [];
21
+ this._globalSearchers = [];
22
22
  this._loading = false;
23
23
  this.#searchItemNavIndex = 0;
24
24
  this.#inputTimerAmount = 300;
@@ -28,7 +28,7 @@ let UmbSearchModalElement = class UmbSearchModalElement extends UmbLitElement {
28
28
  return;
29
29
  this.modalContext?.reject();
30
30
  };
31
- this.#observeProviders();
31
+ this.#observeGlobalSearchers();
32
32
  }
33
33
  connectedCallback() {
34
34
  super.connectedCallback();
@@ -44,22 +44,33 @@ let UmbSearchModalElement = class UmbSearchModalElement extends UmbLitElement {
44
44
  document.removeEventListener('click', this.#onDocumentClick);
45
45
  }
46
46
  #onDocumentClick;
47
- #observeProviders() {
48
- new UmbExtensionsManifestInitializer(this, umbExtensionsRegistry, 'searchProvider', null, async (providers) => {
49
- const searchProviders = [];
50
- for (const provider of providers) {
51
- const api = await createExtensionApi(this, provider.manifest);
52
- if (api) {
53
- searchProviders.push({
54
- name: provider.manifest.meta?.label || provider.manifest.name,
55
- api,
56
- alias: provider.alias,
57
- });
47
+ #observeGlobalSearchers() {
48
+ new UmbExtensionsManifestInitializer(this, umbExtensionsRegistry, 'globalSearch', null, async (controllers) => {
49
+ const globalSearch = [];
50
+ for (const controller of controllers) {
51
+ let searchApi = undefined;
52
+ if (controller.manifest.api) {
53
+ searchApi = await createExtensionApi(this, controller.manifest);
54
+ if (searchApi) {
55
+ // TODO: we need to investigate if it makes sense to have a function that does this when creating a new extension api? [MR]
56
+ searchApi.manifest = controller.manifest;
57
+ }
58
+ }
59
+ else {
60
+ searchApi = await createExtensionApiByAlias(this, controller.manifest.meta?.searchProviderAlias);
61
+ }
62
+ if (searchApi) {
63
+ const searcher = {
64
+ name: controller.manifest.meta?.label || controller.manifest.name,
65
+ api: searchApi,
66
+ alias: controller.alias,
67
+ };
68
+ globalSearch.push(searcher);
58
69
  }
59
70
  }
60
- this._searchProviders = searchProviders;
61
- if (this._searchProviders.length > 0) {
62
- this._currentProvider = this._searchProviders[0];
71
+ this._globalSearchers = globalSearch;
72
+ if (this._globalSearchers.length > 0) {
73
+ this._currentGlobalSearcher = this._globalSearchers[0];
63
74
  }
64
75
  });
65
76
  }
@@ -89,18 +100,18 @@ let UmbSearchModalElement = class UmbSearchModalElement extends UmbLitElement {
89
100
  this._inputFakeCursor.style.display = 'none';
90
101
  }
91
102
  }
92
- #setCurrentProvider(searchProvider) {
93
- if (this._currentProvider === searchProvider)
103
+ #setCurrentSearcher(searcher) {
104
+ if (this._currentGlobalSearcher === searcher)
94
105
  return;
95
- this._currentProvider = searchProvider;
106
+ this._currentGlobalSearcher = searcher;
96
107
  this.#focusInput();
97
108
  this._loading = true;
98
109
  this._searchResults = [];
99
110
  this.#updateSearchResults();
100
111
  }
101
112
  async #updateSearchResults() {
102
- if (this._search && this._currentProvider?.api) {
103
- const { data } = await this._currentProvider.api.search({ query: this._search });
113
+ if (this._search && this._currentGlobalSearcher?.api) {
114
+ const { data } = await this._currentGlobalSearcher.api.search({ query: this._search });
104
115
  if (!data)
105
116
  return;
106
117
  this._searchResults = data.items;
@@ -246,13 +257,13 @@ let UmbSearchModalElement = class UmbSearchModalElement extends UmbLitElement {
246
257
  #renderSearchTags() {
247
258
  return html `
248
259
  <div id="search-providers">
249
- ${repeat(this._searchProviders, (searchProvider) => searchProvider.alias, (searchProvider) => html `
260
+ ${repeat(this._globalSearchers, (searcher) => searcher.alias, (searcher) => html `
250
261
  <button
251
- class="search-provider ${this._currentProvider?.alias === searchProvider.alias ? 'active' : ''}"
252
- data-provider-alias=${searchProvider.alias}
253
- @click=${() => this.#setCurrentProvider(searchProvider)}
262
+ class="search-provider ${this._currentGlobalSearcher?.alias === searcher.alias ? 'active' : ''}"
263
+ data-provider-alias=${searcher.alias}
264
+ @click=${() => this.#setCurrentSearcher(searcher)}
254
265
  @keydown=${() => ''}>
255
- ${searchProvider.name}
266
+ ${searcher.name}
256
267
  </button>
257
268
  `)}
258
269
  </div>
@@ -487,10 +498,10 @@ __decorate([
487
498
  ], UmbSearchModalElement.prototype, "_searchResults", void 0);
488
499
  __decorate([
489
500
  state()
490
- ], UmbSearchModalElement.prototype, "_searchProviders", void 0);
501
+ ], UmbSearchModalElement.prototype, "_globalSearchers", void 0);
491
502
  __decorate([
492
503
  state()
493
- ], UmbSearchModalElement.prototype, "_currentProvider", void 0);
504
+ ], UmbSearchModalElement.prototype, "_currentGlobalSearcher", void 0);
494
505
  __decorate([
495
506
  state()
496
507
  ], UmbSearchModalElement.prototype, "_loading", void 0);
@@ -5,6 +5,7 @@ import type { UmbPagedModel, UmbRepositoryResponse } from '@umbraco-cms/backoffi
5
5
  export type { UmbSearchDataSource } from './search-data-source.interface.js';
6
6
  export type { UmbSearchRepository } from './search-repository.interface.js';
7
7
  export type * from './extensions/types.js';
8
+ export type * from './global-search/types.js';
8
9
  export type UmbSearchResultModel = SearchResultResponseModelReadable;
9
10
  export type UmbSearchResultItemModel = {
10
11
  entityType: string;
@@ -10,6 +10,7 @@ import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
10
10
  import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
11
11
  import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
12
12
  import { UmbCurrentUserRepository } from '@umbraco-cms/backoffice/current-user';
13
+ import { UmbTemporaryFileConfigRepository } from '@umbraco-cms/backoffice/temporary-file';
13
14
  let UmbSysinfoElement = class UmbSysinfoElement extends UmbModalBaseElement {
14
15
  constructor() {
15
16
  super(...arguments);
@@ -18,10 +19,12 @@ let UmbSysinfoElement = class UmbSysinfoElement extends UmbModalBaseElement {
18
19
  this.#serverKeyValues = [];
19
20
  this.#sysinfoRepository = new UmbSysinfoRepository(this);
20
21
  this.#currentUserRepository = new UmbCurrentUserRepository(this);
22
+ this.#temporaryFileConfigRepository = new UmbTemporaryFileConfigRepository(this);
21
23
  }
22
24
  #serverKeyValues;
23
25
  #sysinfoRepository;
24
26
  #currentUserRepository;
27
+ #temporaryFileConfigRepository;
25
28
  connectedCallback() {
26
29
  super.connectedCallback();
27
30
  this.#populate();
@@ -29,24 +32,33 @@ let UmbSysinfoElement = class UmbSysinfoElement extends UmbModalBaseElement {
29
32
  async #populate() {
30
33
  this._loading = true;
31
34
  this.#serverKeyValues.length = 0;
32
- const [serverTroubleshooting, serverInformation] = await Promise.all([
35
+ const [serverTroubleshooting, serverInformation, clientInformation, { data: currentUser }, temporaryFileConfig] = await Promise.all([
33
36
  this.#sysinfoRepository.requestTroubleShooting(),
34
37
  this.#sysinfoRepository.requestServerInformation(),
38
+ this.#sysinfoRepository.requestClientInformation(),
39
+ this.#currentUserRepository.requestCurrentUser(),
40
+ this.#temporaryFileConfigRepository.requestTemporaryFileConfiguration(),
35
41
  ]);
42
+ this.#serverKeyValues.push({ name: 'Server Troubleshooting' });
36
43
  if (serverTroubleshooting) {
37
44
  this.#serverKeyValues.push(...serverTroubleshooting.items);
38
45
  }
46
+ this.#serverKeyValues.push({});
47
+ this.#serverKeyValues.push({ name: 'Server Information' });
39
48
  if (serverInformation) {
40
49
  this.#serverKeyValues.push({ name: 'Umbraco build version', data: serverInformation.version });
50
+ this.#serverKeyValues.push({ name: 'Umbraco assembly version', data: serverInformation.assemblyVersion });
41
51
  this.#serverKeyValues.push({ name: 'Server time offset', data: serverInformation.baseUtcOffset });
42
52
  this.#serverKeyValues.push({ name: 'Runtime mode', data: serverInformation.runtimeMode });
43
53
  }
44
- // Browser information
45
- this.#serverKeyValues.push({ name: 'Browser (user agent)', data: navigator.userAgent });
46
- this.#serverKeyValues.push({ name: 'Browser language', data: navigator.language });
47
- this.#serverKeyValues.push({ name: 'Browser location', data: location.href });
54
+ this.#serverKeyValues.push({});
55
+ this.#serverKeyValues.push({ name: 'Client Information' });
56
+ if (clientInformation) {
57
+ this.#serverKeyValues.push({ name: 'Umbraco client version', data: clientInformation.version });
58
+ }
48
59
  // User information
49
- const { data: currentUser } = await this.#currentUserRepository.requestCurrentUser();
60
+ this.#serverKeyValues.push({});
61
+ this.#serverKeyValues.push({ name: 'Current user' });
50
62
  if (currentUser) {
51
63
  this.#serverKeyValues.push({ name: 'User is admin', data: currentUser.isAdmin ? 'Yes' : 'No' });
52
64
  this.#serverKeyValues.push({ name: 'User sections', data: currentUser.allowedSections.join(', ') });
@@ -57,16 +69,43 @@ let UmbSysinfoElement = class UmbSysinfoElement extends UmbModalBaseElement {
57
69
  });
58
70
  this.#serverKeyValues.push({
59
71
  name: 'User document start nodes',
60
- data: currentUser.documentStartNodeUniques.length ? currentUser.documentStartNodeUniques.join(', ') : 'None',
72
+ data: currentUser.documentStartNodeUniques.join(', '),
73
+ });
74
+ }
75
+ this.#serverKeyValues.push({});
76
+ this.#serverKeyValues.push({ name: 'Temporary file configuration' });
77
+ // Temporary file configuration
78
+ if (temporaryFileConfig) {
79
+ this.#serverKeyValues.push({
80
+ name: 'Max allowed file size',
81
+ data: temporaryFileConfig.maxFileSize?.toString() ?? 'Not set (unlimited)',
82
+ });
83
+ this.#serverKeyValues.push({
84
+ name: 'Allowed file types',
85
+ data: temporaryFileConfig.allowedUploadedFileExtensions.join(', '),
86
+ });
87
+ this.#serverKeyValues.push({
88
+ name: 'Disallowed file types',
89
+ data: temporaryFileConfig.disallowedUploadedFilesExtensions?.join(', '),
90
+ });
91
+ this.#serverKeyValues.push({
92
+ name: 'Image file types',
93
+ data: temporaryFileConfig.imageFileTypes?.join(', '),
61
94
  });
62
95
  }
96
+ // Browser information
97
+ this.#serverKeyValues.push({});
98
+ this.#serverKeyValues.push({ name: 'Browser Troubleshooting' });
99
+ this.#serverKeyValues.push({ name: 'Browser (user agent)', data: navigator.userAgent });
100
+ this.#serverKeyValues.push({ name: 'Browser language', data: navigator.language });
101
+ this.#serverKeyValues.push({ name: 'Browser location', data: location.href });
63
102
  this._systemInformation = this.#renderServerKeyValues();
64
103
  this._loading = false;
65
104
  }
66
105
  #renderServerKeyValues() {
67
106
  return this.#serverKeyValues
68
107
  .map((serverKeyValue) => {
69
- return `${serverKeyValue.name}: ${serverKeyValue.data}`;
108
+ return serverKeyValue.name ? `${serverKeyValue.name}: ${serverKeyValue.data ?? ''}` : '';
70
109
  })
71
110
  .join('\n');
72
111
  }
@@ -125,8 +164,9 @@ ${this._systemInformation}`;
125
164
  static { this.styles = [
126
165
  UmbTextStyles,
127
166
  css `
128
- #code-block {
167
+ #codeblock {
129
168
  max-height: 300px;
169
+ overflow: auto;
130
170
  }
131
171
  `,
132
172
  ]; }
@@ -6,6 +6,9 @@ export declare class UmbSysinfoRepository extends UmbRepositoryBase {
6
6
  constructor(host: UmbControllerHost);
7
7
  requestTroubleShooting(): Promise<import("@umbraco-cms/backoffice/external/backend-api").ServerTroubleshootingResponseModel>;
8
8
  requestServerInformation(): Promise<import("@umbraco-cms/backoffice/external/backend-api").ServerInformationResponseModel>;
9
+ requestClientInformation(): Promise<{
10
+ version: string;
11
+ }>;
9
12
  /**
10
13
  * Check if the server has an upgrade available and return the result.
11
14
  * If the server has an upgrade available, the result will be stored in local storage.
@@ -1,3 +1,4 @@
1
+ import packageJson from '../../../../package.json';
1
2
  import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
2
3
  import { tryExecute } from '@umbraco-cms/backoffice/resources';
3
4
  import { ServerService } from '@umbraco-cms/backoffice/external/backend-api';
@@ -14,6 +15,13 @@ export class UmbSysinfoRepository extends UmbRepositoryBase {
14
15
  const { data } = await tryExecute(this, ServerService.getServerInformation(), { disableNotifications: true });
15
16
  return data;
16
17
  }
18
+ async requestClientInformation() {
19
+ const { version } = packageJson;
20
+ const clientInformation = {
21
+ version,
22
+ };
23
+ return clientInformation;
24
+ }
17
25
  /**
18
26
  * Check if the server has an upgrade available and return the result.
19
27
  * If the server has an upgrade available, the result will be stored in local storage.
@@ -1,3 +1,4 @@
1
1
  export * from './conditions/constants.js';
2
2
  export * from './repository/constants.js';
3
+ export * from './search/constants.js';
3
4
  export * from './workspace/constants.js';
@@ -1,3 +1,4 @@
1
1
  export * from './conditions/constants.js';
2
2
  export * from './repository/constants.js';
3
+ export * from './search/constants.js';
3
4
  export * from './workspace/constants.js';
@@ -0,0 +1,2 @@
1
+ export * from './global-search/constants.js';
2
+ export declare const UMB_TEMPLATE_SEARCH_PROVIDER_ALIAS = "Umb.SearchProvider.Template";
@@ -0,0 +1,2 @@
1
+ export * from './global-search/constants.js';
2
+ export const UMB_TEMPLATE_SEARCH_PROVIDER_ALIAS = 'Umb.SearchProvider.Template';
@@ -0,0 +1 @@
1
+ export declare const UMB_TEMPLATE_GLOBAL_SEARCH_ALIAS = "Umb.GlobalSearch.Template";
@@ -0,0 +1 @@
1
+ export const UMB_TEMPLATE_GLOBAL_SEARCH_ALIAS = 'Umb.GlobalSearch.Template';
@@ -0,0 +1 @@
1
+ export declare const manifests: Array<UmbExtensionManifest>;
@@ -0,0 +1,22 @@
1
+ import { UMB_TEMPLATE_SEARCH_PROVIDER_ALIAS } from '../constants.js';
2
+ import { UMB_TEMPLATE_GLOBAL_SEARCH_ALIAS } from './constants.js';
3
+ import { UMB_SECTION_USER_PERMISSION_CONDITION_ALIAS } from '@umbraco-cms/backoffice/section';
4
+ import { UMB_SETTINGS_SECTION_ALIAS } from '@umbraco-cms/backoffice/settings';
5
+ export const manifests = [
6
+ {
7
+ name: 'Template Global Search',
8
+ alias: UMB_TEMPLATE_GLOBAL_SEARCH_ALIAS,
9
+ type: 'globalSearch',
10
+ weight: 200,
11
+ meta: {
12
+ label: 'Templates',
13
+ searchProviderAlias: UMB_TEMPLATE_SEARCH_PROVIDER_ALIAS,
14
+ },
15
+ conditions: [
16
+ {
17
+ alias: UMB_SECTION_USER_PERMISSION_CONDITION_ALIAS,
18
+ match: UMB_SETTINGS_SECTION_ALIAS,
19
+ },
20
+ ],
21
+ },
22
+ ];
@@ -1,8 +1,10 @@
1
1
  import { UMB_TEMPLATE_ENTITY_TYPE } from '../entity.js';
2
+ import { UMB_TEMPLATE_SEARCH_PROVIDER_ALIAS } from './constants.js';
3
+ import { manifests as globalSearchManifests } from './global-search/manifests.js';
2
4
  export const manifests = [
3
5
  {
4
6
  name: 'Template Search Provider',
5
- alias: 'Umb.SearchProvider.Template',
7
+ alias: UMB_TEMPLATE_SEARCH_PROVIDER_ALIAS,
6
8
  type: 'searchProvider',
7
9
  api: () => import('./template.search-provider.js'),
8
10
  weight: 100,
@@ -16,4 +18,5 @@ export const manifests = [
16
18
  type: 'searchResultItem',
17
19
  forEntityTypes: [UMB_TEMPLATE_ENTITY_TYPE],
18
20
  },
21
+ ...globalSearchManifests,
19
22
  ];
@@ -5,9 +5,14 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
5
5
  export default class UmbTiptapMediaUploadExtensionApi extends UmbTiptapExtensionApiBase {
6
6
  #private;
7
7
  /**
8
+ * @returns {number} The configured maximum allowed image size
9
+ */
10
+ get maxImageSize(): number;
11
+ /**
12
+ * @deprecated Use `maxImageSize` instead.
8
13
  * @returns {number} The maximum width of uploaded images
9
14
  */
10
- get maxWidth(): number;
15
+ maxWidth: number;
11
16
  /**
12
17
  * @returns {Array<string>} The allowed mime types for uploads
13
18
  */
@@ -8,9 +8,9 @@ import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification';
8
8
  export default class UmbTiptapMediaUploadExtensionApi extends UmbTiptapExtensionApiBase {
9
9
  #configuration;
10
10
  /**
11
- * @returns {number} The maximum width of uploaded images
11
+ * @returns {number} The configured maximum allowed image size
12
12
  */
13
- get maxWidth() {
13
+ get maxImageSize() {
14
14
  const maxImageSize = parseInt(this.#configuration?.getValueByAlias('maxImageSize') ?? '', 10);
15
15
  return isNaN(maxImageSize) ? 500 : maxImageSize;
16
16
  }
@@ -20,11 +20,18 @@ export default class UmbTiptapMediaUploadExtensionApi extends UmbTiptapExtension
20
20
  get allowedFileTypes() {
21
21
  return (this.#configuration?.getValueByAlias('allowedFileTypes') ?? ['image/jpeg', 'image/png', 'image/gif']);
22
22
  }
23
- #manager = new UmbTemporaryFileManager(this);
24
- #localize = new UmbLocalizationController(this);
23
+ #manager;
24
+ #localize;
25
25
  #notificationContext;
26
26
  constructor(host) {
27
27
  super(host);
28
+ /**
29
+ * @deprecated Use `maxImageSize` instead.
30
+ * @returns {number} The maximum width of uploaded images
31
+ */
32
+ this.maxWidth = this.maxImageSize;
33
+ this.#manager = new UmbTemporaryFileManager(this);
34
+ this.#localize = new UmbLocalizationController(this);
28
35
  this.consumeContext(UMB_NOTIFICATION_CONTEXT, (instance) => {
29
36
  this.#notificationContext = instance;
30
37
  });
@@ -76,7 +83,7 @@ export default class UmbTiptapMediaUploadExtensionApi extends UmbTiptapExtension
76
83
  const fileModels = filteredFiles.map((file) => this.#mapFileToTemporaryFile(file));
77
84
  this.dispatchEvent(new CustomEvent('rte.file.uploading', { composed: true, bubbles: true, detail: fileModels }));
78
85
  const uploads = await this.#manager.upload(fileModels);
79
- const maxImageSize = this.maxWidth;
86
+ const maxImageSize = this.maxImageSize;
80
87
  uploads.forEach(async (upload) => {
81
88
  if (upload.status !== TemporaryFileStatus.SUCCESS) {
82
89
  this.#notificationContext?.peek('danger', {
@@ -88,7 +95,10 @@ export default class UmbTiptapMediaUploadExtensionApi extends UmbTiptapExtension
88
95
  return;
89
96
  }
90
97
  const blobUrl = URL.createObjectURL(upload.file);
91
- const { width, height } = await imageSize(blobUrl, { maxWidth: maxImageSize });
98
+ // Get the image dimensions - this essentially simulates what the server would do
99
+ // when it resizes the image. The server will return the resized image URL.
100
+ // We need to use the blob URL here, as the server will not be able to access the local file.
101
+ const { width, height } = await imageSize(blobUrl, { maxWidth: maxImageSize, maxHeight: maxImageSize });
92
102
  editor
93
103
  .chain()
94
104
  .focus()
@@ -4,9 +4,14 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
4
4
  export default class UmbTiptapToolbarMediaPickerToolbarExtensionApi extends UmbTiptapToolbarElementApiBase {
5
5
  #private;
6
6
  /**
7
+ * @returns {number} The configured maximum allowed image size
8
+ */
9
+ get maxImageSize(): number;
10
+ /**
11
+ * @deprecated Use `maxImageSize` instead.
7
12
  * @returns {number} The maximum width of uploaded images
8
13
  */
9
- get maxWidth(): number;
14
+ maxWidth: number;
10
15
  constructor(host: UmbControllerHost);
11
16
  isActive(editor?: Editor): boolean;
12
17
  execute(editor: Editor): Promise<void>;
@@ -1,19 +1,27 @@
1
1
  import { UmbTiptapToolbarElementApiBase } from '../base.js';
2
- import { getGuidFromUdi, getProcessedImageUrl, imageSize } from '@umbraco-cms/backoffice/utils';
2
+ import { getGuidFromUdi, imageSize } from '@umbraco-cms/backoffice/utils';
3
3
  import { ImageCropModeModel } from '@umbraco-cms/backoffice/external/backend-api';
4
+ import { UmbImagingRepository } from '@umbraco-cms/backoffice/imaging';
4
5
  import { UMB_MEDIA_CAPTION_ALT_TEXT_MODAL, UMB_MEDIA_PICKER_MODAL } from '@umbraco-cms/backoffice/media';
5
6
  import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
6
7
  export default class UmbTiptapToolbarMediaPickerToolbarExtensionApi extends UmbTiptapToolbarElementApiBase {
8
+ #imagingRepository;
7
9
  #modalManager;
8
10
  /**
9
- * @returns {number} The maximum width of uploaded images
11
+ * @returns {number} The configured maximum allowed image size
10
12
  */
11
- get maxWidth() {
13
+ get maxImageSize() {
12
14
  const maxImageSize = parseInt(this.configuration?.getValueByAlias('maxImageSize') ?? '', 10);
13
15
  return isNaN(maxImageSize) ? 500 : maxImageSize;
14
16
  }
15
17
  constructor(host) {
16
18
  super(host);
19
+ this.#imagingRepository = new UmbImagingRepository(this);
20
+ /**
21
+ * @deprecated Use `maxImageSize` instead.
22
+ * @returns {number} The maximum width of uploaded images
23
+ */
24
+ this.maxWidth = this.maxImageSize;
17
25
  this.consumeContext(UMB_MODAL_MANAGER_CONTEXT, (instance) => {
18
26
  this.#modalManager = instance;
19
27
  });
@@ -78,11 +86,24 @@ export default class UmbTiptapToolbarMediaPickerToolbarExtensionApi extends UmbT
78
86
  async #insertInEditor(editor, mediaUnique, media) {
79
87
  if (!media?.url)
80
88
  return;
81
- const { width, height } = await imageSize(media.url, { maxWidth: this.maxWidth });
82
- const src = await getProcessedImageUrl(media.url, { width, height, mode: ImageCropModeModel.MAX });
89
+ const maxImageSize = this.maxImageSize;
90
+ // Get the resized image URL
91
+ const { data } = await this.#imagingRepository.requestResizedItems([mediaUnique], {
92
+ width: maxImageSize,
93
+ height: maxImageSize,
94
+ mode: ImageCropModeModel.MAX,
95
+ });
96
+ if (!data?.length || !data[0]?.url) {
97
+ console.error('No data returned from imaging repository');
98
+ return;
99
+ }
100
+ // Set the media URL to the first item in the data array
101
+ const src = data[0].url;
102
+ // Fetch the actual image dimensions
103
+ const { width, height } = await imageSize(src);
83
104
  const img = {
84
- alt: media.altText,
85
105
  src,
106
+ alt: media.altText,
86
107
  'data-udi': `umb://media/${mediaUnique.replace(/-/g, '')}`,
87
108
  width: width.toString(),
88
109
  height: height.toString(),
@@ -2,7 +2,7 @@ import type { ManifestCurrentUserActionDefaultKind, MetaCurrentUserActionDefault
2
2
  import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
3
3
  export declare class UmbCurrentUserAppButtonElement<MetaType extends MetaCurrentUserActionDefaultKind = MetaCurrentUserActionDefaultKind, ApiType extends UmbCurrentUserAction<MetaType> = UmbCurrentUserAction<MetaType>> extends UmbLitElement {
4
4
  #private;
5
- _href?: string;
5
+ private _href?;
6
6
  manifest?: ManifestCurrentUserActionDefaultKind<MetaType>;
7
7
  set api(api: ApiType | undefined);
8
8
  get label(): string | undefined;
@@ -5,7 +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 { UmbTextStyles } from '@umbraco-cms/backoffice/style';
8
- import { html, customElement, ifDefined, state, property } from '@umbraco-cms/backoffice/external/lit';
8
+ import { html, customElement, ifDefined, state, property, nothing } from '@umbraco-cms/backoffice/external/lit';
9
9
  import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
10
10
  import { UmbActionExecutedEvent } from '@umbraco-cms/backoffice/event';
11
11
  let UmbCurrentUserAppButtonElement = class UmbCurrentUserAppButtonElement extends UmbLitElement {
@@ -28,13 +28,9 @@ let UmbCurrentUserAppButtonElement = class UmbCurrentUserAppButtonElement extend
28
28
  }
29
29
  render() {
30
30
  return html `
31
- <uui-button
32
- @click=${this.#onClick}
33
- look="${this.manifest?.meta.look ?? 'primary'}"
34
- color="${this.manifest?.meta.color ?? 'default'}"
35
- label="${ifDefined(this.label)}"
36
- href="${ifDefined(this._href)}">
37
- ${this.manifest?.meta.icon ? html `<uui-icon name="${this.manifest.meta.icon}"></uui-icon>` : ''} ${this.label}
31
+ <uui-button @click=${this.#onClick} look="secondary" label=${ifDefined(this.label)} href=${ifDefined(this._href)}>
32
+ ${this.manifest?.meta.icon ? html `<uui-icon name=${this.manifest.meta.icon}></uui-icon>` : nothing}
33
+ ${this.label}
38
34
  </uui-button>
39
35
  `;
40
36
  }
@@ -1,7 +1,6 @@
1
1
  import type { UmbAction } from '@umbraco-cms/backoffice/action';
2
2
  import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
3
3
  import type { ManifestElementAndApi, ManifestWithDynamicConditions } from '@umbraco-cms/backoffice/extension-api';
4
- import type { UUIInterfaceColor, UUIInterfaceLook } from '@umbraco-cms/backoffice/external/uui';
5
4
  export interface UmbCurrentUserActionArgs<MetaArgsType> {
6
5
  meta: MetaArgsType;
7
6
  }
@@ -44,16 +43,6 @@ export interface MetaCurrentUserActionDefaultKind extends MetaCurrentUserAction
44
43
  * ]
45
44
  */
46
45
  label: string;
47
- /**
48
- * The look of the button
49
- * @default primary
50
- */
51
- look?: UUIInterfaceLook;
52
- /**
53
- * The color of the button
54
- * @default default
55
- */
56
- color?: UUIInterfaceColor;
57
46
  }
58
47
  declare global {
59
48
  interface UmbExtensionManifestMap {
@@ -15,7 +15,6 @@ export const manifests = [
15
15
  meta: {
16
16
  label: '#defaultdialogs_externalLoginProviders',
17
17
  icon: 'icon-lock',
18
- look: 'secondary',
19
18
  },
20
19
  conditions: [
21
20
  {
@@ -10,7 +10,6 @@ export const manifests = [
10
10
  meta: {
11
11
  label: '#user_configureTwoFactor',
12
12
  icon: 'icon-rectangle-ellipsis',
13
- look: 'secondary',
14
13
  },
15
14
  conditions: [
16
15
  {