@umbraco-cms/backoffice 14.0.0-695f1c3f → 14.0.0-709b3cbf

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 (243) hide show
  1. package/dist-cms/apps/app/app.element.js +1 -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/assets/lang/en-us.js +18 -18
  5. package/dist-cms/assets/lang/en-us.ts +18 -18
  6. package/dist-cms/custom-elements.json +71 -49
  7. package/dist-cms/external/backend-api/index.js +1 -1
  8. package/dist-cms/external/backend-api/src/index.d.ts +17 -1
  9. package/dist-cms/external/backend-api/src/models/CreateContentRequestModelBaseDocumentValueModelDocumentVariantRequestModel.d.ts +1 -0
  10. package/dist-cms/external/backend-api/src/models/CreateContentRequestModelBaseMediaValueModelMediaVariantRequestModel.d.ts +1 -0
  11. package/dist-cms/external/backend-api/src/models/CreateContentTypeRequestModelBaseCreateDocumentTypePropertyTypeRequestModelCreateDocumentTypePropertyTypeContainerRequestModel.d.ts +2 -0
  12. package/dist-cms/external/backend-api/src/models/CreateContentTypeRequestModelBaseCreateMediaTypePropertyTypeRequestModelCreateMediaTypePropertyTypeContainerRequestModel.d.ts +20 -0
  13. package/dist-cms/external/backend-api/src/models/CreateMediaTypePropertyTypeContainerRequestModel.d.ts +2 -0
  14. package/dist-cms/external/backend-api/src/models/CreateMediaTypePropertyTypeRequestModel.d.ts +2 -0
  15. package/dist-cms/external/backend-api/src/models/CreateMediaTypeRequestModel.d.ts +2 -0
  16. package/dist-cms/external/backend-api/src/models/DeleteUserGroupsRequestModel.d.ts +3 -0
  17. package/dist-cms/external/backend-api/src/models/DeleteUsersRequestModel.d.ts +3 -0
  18. package/dist-cms/external/backend-api/src/models/ItemSortingRequestModel.d.ts +4 -0
  19. package/dist-cms/external/backend-api/src/models/ProblemDetailsBuilderModel.d.ts +1 -0
  20. package/dist-cms/external/backend-api/src/models/RelationResponseModel.d.ts +2 -2
  21. package/dist-cms/external/backend-api/src/models/ResetPasswordRequestModel.d.ts +3 -0
  22. package/dist-cms/external/backend-api/src/models/ResetPasswordTokenRequestModel.d.ts +4 -0
  23. package/dist-cms/external/backend-api/src/models/SortingRequestModel.d.ts +5 -0
  24. package/dist-cms/external/backend-api/src/models/UpdateContentTypeRequestModelBaseUpdateMediaTypePropertyTypeRequestModelUpdateMediaTypePropertyTypeContainerRequestModel.d.ts +18 -0
  25. package/dist-cms/external/backend-api/src/models/{UpdateFolderReponseModel.d.ts → UpdateFolderResponseModel.d.ts} +1 -1
  26. package/dist-cms/external/backend-api/src/models/UpdateMediaTypePropertyTypeContainerRequestModel.d.ts +2 -0
  27. package/dist-cms/external/backend-api/src/models/UpdateMediaTypePropertyTypeRequestModel.d.ts +2 -0
  28. package/dist-cms/external/backend-api/src/models/UpdateMediaTypeRequestModel.d.ts +2 -0
  29. package/dist-cms/external/backend-api/src/models/VerifyResetPasswordTokenRequestModel.d.ts +4 -0
  30. package/dist-cms/external/backend-api/src/services/DataTypeResource.d.ts +2 -2
  31. package/dist-cms/external/backend-api/src/services/DocumentResource.d.ts +21 -21
  32. package/dist-cms/external/backend-api/src/services/DocumentTypeResource.d.ts +35 -3
  33. package/dist-cms/external/backend-api/src/services/MediaResource.d.ts +13 -5
  34. package/dist-cms/external/backend-api/src/services/MediaTypeResource.d.ts +56 -0
  35. package/dist-cms/external/backend-api/src/services/RelationResource.d.ts +1 -9
  36. package/dist-cms/external/backend-api/src/services/SecurityResource.d.ts +24 -0
  37. package/dist-cms/external/backend-api/src/services/UserGroupResource.d.ts +8 -0
  38. package/dist-cms/external/backend-api/src/services/UserResource.d.ts +8 -0
  39. package/dist-cms/external/router-slot/config.d.ts +8 -0
  40. package/dist-cms/external/router-slot/index.d.ts +4 -3
  41. package/dist-cms/external/router-slot/index.js +1 -1
  42. package/dist-cms/external/router-slot/model.d.ts +123 -0
  43. package/dist-cms/external/router-slot/router-slot.d.ts +111 -0
  44. package/dist-cms/external/router-slot/util/anchor.d.ts +5 -0
  45. package/dist-cms/external/router-slot/util/events.d.ts +26 -0
  46. package/dist-cms/external/router-slot/util/history.d.ts +32 -0
  47. package/dist-cms/external/router-slot/util/index.d.ts +6 -0
  48. package/dist-cms/external/router-slot/util/router.d.ts +72 -0
  49. package/dist-cms/external/router-slot/util/shadow.d.ts +15 -0
  50. package/dist-cms/external/router-slot/util/url.d.ts +78 -0
  51. package/dist-cms/external/router-slot/util.d.ts +1 -0
  52. package/dist-cms/libs/observable-api/observer.js +2 -1
  53. package/dist-cms/mocks/browser-handlers.js +3 -1
  54. package/dist-cms/mocks/data/document.data.d.ts +6 -2
  55. package/dist-cms/mocks/data/document.data.js +54 -4
  56. package/dist-cms/mocks/data/entity.data.js +0 -2
  57. package/dist-cms/mocks/data/scripts.data.d.ts +21 -0
  58. package/dist-cms/mocks/data/scripts.data.js +205 -0
  59. package/dist-cms/mocks/handlers/{document.handlers.js → document/document.handlers.js} +28 -40
  60. package/dist-cms/mocks/handlers/document/index.d.ts +1 -0
  61. package/dist-cms/mocks/handlers/document/index.js +5 -0
  62. package/dist-cms/mocks/handlers/document/item.handlers.d.ts +1 -0
  63. package/dist-cms/mocks/handlers/document/item.handlers.js +13 -0
  64. package/dist-cms/mocks/handlers/document/recycle-bin.handlers.d.ts +1 -0
  65. package/dist-cms/mocks/handlers/document/recycle-bin.handlers.js +16 -0
  66. package/dist-cms/mocks/handlers/document/slug.d.ts +1 -0
  67. package/dist-cms/mocks/handlers/document/slug.js +1 -0
  68. package/dist-cms/mocks/handlers/document/tree.handlers.d.ts +1 -0
  69. package/dist-cms/mocks/handlers/document/tree.handlers.js +16 -0
  70. package/dist-cms/mocks/handlers/scripts.handlers.d.ts +2 -0
  71. package/dist-cms/mocks/handlers/scripts.handlers.js +83 -0
  72. package/dist-cms/packages/core/components/input-list-base/input-list-base.js +1 -1
  73. package/dist-cms/packages/core/content-type/content-type-container-structure-helper.class.js +2 -2
  74. package/dist-cms/packages/core/content-type/content-type-property-structure-helper.class.js +1 -1
  75. package/dist-cms/packages/core/content-type/content-type-structure-manager.class.d.ts +15 -15
  76. package/dist-cms/packages/core/content-type/content-type-structure-manager.class.js +79 -103
  77. package/dist-cms/packages/core/culture/components/index.d.ts +1 -0
  78. package/dist-cms/packages/core/culture/components/index.js +1 -0
  79. package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.js +5 -5
  80. package/dist-cms/packages/core/culture/index.d.ts +2 -0
  81. package/dist-cms/packages/core/culture/index.js +2 -0
  82. package/dist-cms/packages/core/culture/manifests.d.ts +1 -0
  83. package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.js +1 -1
  84. package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.d.ts +1 -1
  85. package/dist-cms/packages/{settings/cultures → core/culture}/repository/manifests.js +1 -1
  86. package/dist-cms/packages/core/entity-action/common/trash/trash.action.d.ts +1 -1
  87. package/dist-cms/packages/core/entity-action/common/trash/trash.action.js +1 -1
  88. package/dist-cms/packages/core/index.d.ts +1 -0
  89. package/dist-cms/packages/core/index.js +3 -0
  90. package/dist-cms/packages/core/modal/token/create-document-modal.token.d.ts +8 -0
  91. package/dist-cms/packages/core/modal/token/create-document-modal.token.js +5 -0
  92. package/dist-cms/packages/core/modal/token/index.d.ts +1 -1
  93. package/dist-cms/packages/core/modal/token/index.js +1 -1
  94. package/dist-cms/packages/core/store/store-base.d.ts +18 -6
  95. package/dist-cms/packages/core/store/store-base.js +22 -6
  96. package/dist-cms/packages/documents/document-types/entity-actions/manifests.js +1 -1
  97. package/dist-cms/packages/documents/document-types/manifests.js +0 -2
  98. package/dist-cms/packages/documents/document-types/repository/document-type-item.store.d.ts +20 -0
  99. package/dist-cms/packages/documents/document-types/repository/document-type-item.store.js +23 -0
  100. package/dist-cms/packages/documents/document-types/repository/document-type.repository.d.ts +5 -21
  101. package/dist-cms/packages/documents/document-types/repository/document-type.repository.js +26 -20
  102. package/dist-cms/packages/documents/document-types/repository/manifests.d.ts +3 -2
  103. package/dist-cms/packages/documents/document-types/repository/manifests.js +9 -1
  104. package/dist-cms/packages/documents/document-types/repository/sources/document-type-item.server.data.d.ts +25 -0
  105. package/dist-cms/packages/documents/document-types/repository/sources/document-type-item.server.data.js +32 -0
  106. package/dist-cms/packages/documents/document-types/repository/sources/document-type.server.data.d.ts +1 -1
  107. package/dist-cms/packages/documents/document-types/repository/sources/document-type.server.data.js +1 -12
  108. package/dist-cms/packages/documents/document-types/workspace/document-type-workspace.context.js +27 -27
  109. package/dist-cms/packages/documents/document-types/workspace/views/design/document-type-workspace-view-edit.element.js +8 -4
  110. package/dist-cms/packages/documents/documents/entity-actions/create/create-document-modal.element.d.ts +17 -0
  111. package/dist-cms/packages/documents/{document-types/modals/allowed-document-types/allowed-document-types-modal.element.js → documents/entity-actions/create/create-document-modal.element.js} +29 -38
  112. package/dist-cms/packages/documents/documents/entity-actions/create/create.action.d.ts +0 -2
  113. package/dist-cms/packages/documents/documents/entity-actions/create/create.action.js +7 -23
  114. package/dist-cms/packages/documents/documents/entity-actions/create/manifests.d.ts +2 -0
  115. package/dist-cms/packages/documents/documents/entity-actions/create/manifests.js +27 -0
  116. package/dist-cms/packages/documents/documents/entity-actions/manifests.d.ts +2 -2
  117. package/dist-cms/packages/documents/documents/entity-actions/manifests.js +15 -48
  118. package/dist-cms/packages/documents/documents/index.d.ts +1 -0
  119. package/dist-cms/packages/documents/documents/index.js +1 -0
  120. package/dist-cms/packages/documents/documents/manifests.d.ts +13 -1
  121. package/dist-cms/packages/documents/documents/manifests.js +2 -0
  122. package/dist-cms/packages/documents/documents/menu-item/manifests.js +1 -1
  123. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.d.ts +14 -0
  124. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.js +18 -0
  125. package/dist-cms/packages/documents/documents/recycle-bin/index.d.ts +1 -0
  126. package/dist-cms/packages/documents/documents/recycle-bin/index.js +1 -0
  127. package/dist-cms/packages/documents/documents/recycle-bin/manifests.d.ts +13 -0
  128. package/dist-cms/packages/documents/documents/recycle-bin/manifests.js +5 -0
  129. package/dist-cms/packages/documents/documents/recycle-bin/menu-item/manifests.d.ts +1 -0
  130. package/dist-cms/packages/documents/documents/recycle-bin/menu-item/manifests.js +14 -0
  131. package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle-bin.repository.d.ts +28 -0
  132. package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle-bin.repository.js +56 -0
  133. package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle.bin.tree.store.d.ts +18 -0
  134. package/dist-cms/packages/documents/documents/recycle-bin/repository/document-recycle.bin.tree.store.js +19 -0
  135. package/dist-cms/packages/documents/documents/recycle-bin/repository/index.d.ts +1 -0
  136. package/dist-cms/packages/documents/documents/recycle-bin/repository/index.js +1 -0
  137. package/dist-cms/packages/documents/documents/recycle-bin/repository/manifests.d.ts +4 -0
  138. package/dist-cms/packages/documents/documents/recycle-bin/repository/manifests.js +17 -0
  139. package/dist-cms/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.d.ts +29 -0
  140. package/dist-cms/packages/documents/documents/recycle-bin/repository/sources/document-recycle-bin.tree.server.data.js +49 -0
  141. package/dist-cms/packages/documents/documents/recycle-bin/tree/manifests.d.ts +2 -0
  142. package/dist-cms/packages/documents/documents/recycle-bin/tree/manifests.js +19 -0
  143. package/dist-cms/packages/documents/documents/repository/document-item.store.d.ts +20 -0
  144. package/dist-cms/packages/documents/documents/repository/document-item.store.js +23 -0
  145. package/dist-cms/packages/documents/documents/repository/document.repository.d.ts +10 -9
  146. package/dist-cms/packages/documents/documents/repository/document.repository.js +47 -25
  147. package/dist-cms/packages/documents/documents/repository/document.store.d.ts +0 -12
  148. package/dist-cms/packages/documents/documents/repository/document.store.js +0 -16
  149. package/dist-cms/packages/documents/documents/repository/sources/document-item.server.data.d.ts +24 -0
  150. package/dist-cms/packages/documents/documents/repository/sources/document-item.server.data.js +31 -0
  151. package/dist-cms/packages/documents/documents/repository/sources/document.server.data.d.ts +9 -21
  152. package/dist-cms/packages/documents/documents/repository/sources/document.server.data.js +33 -62
  153. package/dist-cms/packages/documents/documents/workspace/manifests.js +6 -4
  154. package/dist-cms/packages/documents/manifests.d.ts +13 -1
  155. package/dist-cms/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.d.ts +3 -1
  156. package/dist-cms/packages/settings/dashboards/performance-profiling/dashboard-performance-profiling.element.js +26 -40
  157. package/dist-cms/packages/settings/manifests.js +0 -2
  158. package/dist-cms/packages/settings/relation-types/workspace/views/relation/workspace-view-relation-type-relation.element.js +17 -17
  159. package/dist-cms/packages/templating/manifests.js +2 -0
  160. package/dist-cms/packages/templating/scripts/config.d.ts +20 -0
  161. package/dist-cms/packages/templating/scripts/config.js +22 -0
  162. package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.d.ts +8 -0
  163. package/dist-cms/packages/templating/scripts/entity-actions/create/create-empty.action.js +9 -0
  164. package/dist-cms/packages/templating/scripts/entity-actions/manifests.d.ts +2 -0
  165. package/dist-cms/packages/templating/scripts/entity-actions/manifests.js +56 -0
  166. package/dist-cms/packages/templating/scripts/index.d.ts +2 -0
  167. package/dist-cms/packages/templating/scripts/index.js +2 -0
  168. package/dist-cms/packages/templating/scripts/manifests.d.ts +1 -0
  169. package/dist-cms/packages/templating/scripts/manifests.js +12 -0
  170. package/dist-cms/packages/templating/scripts/menu-item/manifests.d.ts +1 -0
  171. package/dist-cms/packages/templating/scripts/menu-item/manifests.js +16 -0
  172. package/dist-cms/packages/templating/scripts/repository/index.d.ts +1 -0
  173. package/dist-cms/packages/templating/scripts/repository/index.js +1 -0
  174. package/dist-cms/packages/templating/scripts/repository/manifests.d.ts +2 -0
  175. package/dist-cms/packages/templating/scripts/repository/manifests.js +23 -0
  176. package/dist-cms/packages/templating/scripts/repository/scripts.repository.d.ts +71 -0
  177. package/dist-cms/packages/templating/scripts/repository/scripts.repository.js +154 -0
  178. package/dist-cms/packages/templating/scripts/repository/scripts.store.d.ts +31 -0
  179. package/dist-cms/packages/templating/scripts/repository/scripts.store.js +37 -0
  180. package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.d.ts +19 -0
  181. package/dist-cms/packages/templating/scripts/repository/scripts.tree.store.js +21 -0
  182. package/dist-cms/packages/templating/scripts/repository/sources/index.d.ts +11 -0
  183. package/dist-cms/packages/templating/scripts/repository/sources/index.js +1 -0
  184. package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.d.ts +41 -0
  185. package/dist-cms/packages/templating/scripts/repository/sources/scripts.detail.server.data.js +57 -0
  186. package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.d.ts +17 -0
  187. package/dist-cms/packages/templating/scripts/repository/sources/scripts.folder.server.data.js +23 -0
  188. package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.d.ts +14 -0
  189. package/dist-cms/packages/templating/scripts/repository/sources/scripts.tree.server.data.js +31 -0
  190. package/dist-cms/packages/templating/scripts/tree/manifests.d.ts +2 -0
  191. package/dist-cms/packages/templating/scripts/tree/manifests.js +20 -0
  192. package/dist-cms/packages/templating/scripts/workspace/manifests.d.ts +2 -0
  193. package/dist-cms/packages/templating/scripts/workspace/manifests.js +32 -0
  194. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.d.ts +24 -0
  195. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace-edit.element.js +171 -0
  196. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.d.ts +23 -0
  197. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.context.js +87 -0
  198. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.d.ts +14 -0
  199. package/dist-cms/packages/templating/scripts/workspace/scripts-workspace.element.js +50 -0
  200. package/dist-cms/packages/templating/templates/modals/query-builder/query-builder.element.d.ts +1 -1
  201. package/dist-cms/packages/templating/templates/modals/query-builder/query-builder.element.js +1 -1
  202. package/dist-cms/packages/users/current-user/modals/current-user/current-user-modal.element.js +2 -2
  203. package/dist-cms/packages/users/user-groups/collection/user-group-collection-header.element.js +2 -2
  204. package/dist-cms/packages/users/user-groups/collection/user-group-collection-view.element.js +6 -6
  205. package/dist-cms/packages/users/user-groups/workspace/user-group-workspace-editor.element.js +15 -12
  206. package/dist-cms/packages/users/users/collection/user-collection-header.element.js +18 -11
  207. package/dist-cms/packages/users/users/collection/views/grid/user-collection-grid-view.element.js +6 -6
  208. package/dist-cms/packages/users/users/collection/views/table/column-layouts/status/user-table-status-column-layout.element.js +3 -3
  209. package/dist-cms/packages/users/users/index.d.ts +1 -0
  210. package/dist-cms/packages/users/users/index.js +1 -0
  211. package/dist-cms/packages/users/users/repository/index.d.ts +1 -0
  212. package/dist-cms/packages/users/users/repository/index.js +1 -0
  213. package/dist-cms/packages/users/users/workspace/user-workspace-editor.element.js +36 -35
  214. package/dist-cms/packages/users/utils.d.ts +5 -2
  215. package/dist-cms/packages/users/utils.js +14 -14
  216. package/dist-cms/shared/repository/data-source/folder-data-source.interface.d.ts +2 -2
  217. package/dist-cms/shared/repository/folder-repository.interface.d.ts +2 -2
  218. package/dist-cms/shared/router/index.d.ts +1 -1
  219. package/dist-cms/shared/router/index.js +1 -1
  220. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  221. package/dist-cms/vscode-html-custom-data.json +33 -23
  222. package/package.json +4 -4
  223. package/dist-cms/packages/core/modal/token/allowed-document-types-modal.token.d.ts +0 -9
  224. package/dist-cms/packages/core/modal/token/allowed-document-types-modal.token.js +0 -5
  225. package/dist-cms/packages/documents/document-types/modals/allowed-document-types/allowed-document-types-modal.element.d.ts +0 -19
  226. package/dist-cms/packages/documents/document-types/modals/manifests.d.ts +0 -2
  227. package/dist-cms/packages/documents/document-types/modals/manifests.js +0 -9
  228. package/dist-cms/packages/settings/cultures/components/index.d.ts +0 -1
  229. package/dist-cms/packages/settings/cultures/components/index.js +0 -1
  230. package/dist-cms/packages/settings/cultures/manifests.d.ts +0 -1
  231. package/dist-cms/shared/context/index.d.ts +0 -1
  232. package/dist-cms/shared/context/index.js +0 -1
  233. package/router-slot-2.3.0.tgz +0 -0
  234. /package/dist-cms/{shared/context → apps/app}/app.context.d.ts +0 -0
  235. /package/dist-cms/{shared/context → apps/app}/app.context.js +0 -0
  236. /package/dist-cms/mocks/handlers/{document.handlers.d.ts → document/document.handlers.d.ts} +0 -0
  237. /package/dist-cms/packages/{settings/cultures → core/culture}/components/input-culture-select/input-culture-select.element.d.ts +0 -0
  238. /package/dist-cms/packages/{settings/cultures → core/culture}/manifests.js +0 -0
  239. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/culture.repository.d.ts +0 -0
  240. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.d.ts +0 -0
  241. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/culture.server.data.js +0 -0
  242. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.d.ts +0 -0
  243. /package/dist-cms/packages/{settings/cultures → core/culture}/repository/sources/index.js +0 -0
@@ -0,0 +1,111 @@
1
+ import { IPathFragments, IRoute, IRouteMatch, IRouterSlot, IRoutingInfo, Params, PathFragment } from "./model.js";
2
+ /**
3
+ * Slot for a node in the router tree.
4
+ * @slot - Default content.
5
+ * @event changestate - Dispatched when the router slot state changes.
6
+ */
7
+ export declare class RouterSlot<D = any, P = any> extends HTMLElement implements IRouterSlot<D, P> {
8
+ /**
9
+ * Listeners on the router.
10
+ */
11
+ private listeners;
12
+ /**
13
+ * The available routes.
14
+ */
15
+ private _routes;
16
+ get routes(): IRoute<D>[];
17
+ set routes(routes: IRoute<D>[]);
18
+ /**
19
+ * The parent router.
20
+ * Is REQUIRED if this router is a child.
21
+ * When set, the relevant listeners are added or teared down because they depend on the parent.
22
+ */
23
+ _parent: IRouterSlot<P> | null | undefined;
24
+ get parent(): IRouterSlot<P> | null | undefined;
25
+ set parent(router: IRouterSlot<P> | null | undefined);
26
+ private _lockParent;
27
+ private _setParent;
28
+ /**
29
+ * Whether the router is a root router.
30
+ */
31
+ get isRoot(): boolean;
32
+ /**
33
+ * The current route match.
34
+ */
35
+ private _routeMatch;
36
+ get match(): IRouteMatch<D> | null;
37
+ /**
38
+ * The current route of the match.
39
+ */
40
+ get route(): IRoute<D> | null;
41
+ /**
42
+ * The current path fragment of the match
43
+ */
44
+ get fragments(): IPathFragments | null;
45
+ /**
46
+ * The current params of the match.
47
+ */
48
+ get params(): Params | null;
49
+ /**
50
+ * Hooks up the element.
51
+ */
52
+ constructor();
53
+ /**
54
+ * Query the parent router slot when the router slot is connected.
55
+ */
56
+ connectedCallback(): void;
57
+ /**
58
+ * Tears down the element.
59
+ */
60
+ disconnectedCallback(): void;
61
+ /**
62
+ * Queries the parent router.
63
+ */
64
+ queryParentRouterSlot(): IRouterSlot<P> | null;
65
+ /**
66
+ * Returns an absolute path relative to the router slot.
67
+ * @param path
68
+ */
69
+ constructAbsolutePath(path: PathFragment): string;
70
+ /**
71
+ * Adds routes to the router.
72
+ * Navigates automatically if the router slot is the root and is connected.
73
+ * @param routes
74
+ * @param navigate
75
+ */
76
+ add(routes: IRoute<D>[], navigate?: boolean): void;
77
+ /**
78
+ * Removes all routes.
79
+ */
80
+ clear(): void;
81
+ /**
82
+ * Each time the path changes, load the new path.
83
+ */
84
+ render(): Promise<void>;
85
+ /**
86
+ * Attaches listeners, either globally or on the parent router.
87
+ */
88
+ protected attachListeners(): void;
89
+ /**
90
+ * Clears the children in the DOM.
91
+ */
92
+ protected clearChildren(): void;
93
+ /**
94
+ * Detaches the listeners.
95
+ */
96
+ protected detachListeners(): void;
97
+ /**
98
+ * Notify the listeners.
99
+ */
100
+ notifyChildRouters<D = any>(info: IRoutingInfo<D>): void;
101
+ /**
102
+ * Loads a new path based on the routes.
103
+ * Returns true if a navigation was made to a new page.
104
+ */
105
+ protected renderPath(path: string | PathFragment): Promise<boolean>;
106
+ }
107
+ declare global {
108
+ interface HTMLElementTagNameMap {
109
+ "router-slot": RouterSlot;
110
+ }
111
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Hook up a click listener to the window that, for all anchor tags
3
+ * that has a relative HREF, uses the history API instead.
4
+ */
5
+ export declare function ensureAnchorHistory(): void;
@@ -0,0 +1,26 @@
1
+ import { EventListenerSubscription, GlobalRouterEvent, IRoutingInfo } from "../model";
2
+ /**
3
+ * Dispatches a did change route event.
4
+ * @param $elem
5
+ * @param {IRoute} detail
6
+ */
7
+ export declare function dispatchRouteChangeEvent<D = any>($elem: HTMLElement, detail: IRoutingInfo<D>): void;
8
+ /**
9
+ * Dispatches an event on the window object.
10
+ * @param name
11
+ * @param detail
12
+ */
13
+ export declare function dispatchGlobalRouterEvent<D = any>(name: GlobalRouterEvent, detail?: IRoutingInfo<D>): void;
14
+ /**
15
+ * Adds an event listener (or more) to an element and returns a function to unsubscribe.
16
+ * @param $elem
17
+ * @param type
18
+ * @param listener
19
+ * @param options
20
+ */
21
+ export declare function addListener<T extends Event, eventType extends string>($elem: EventTarget, type: eventType[] | eventType, listener: ((e: T) => void), options?: boolean | AddEventListenerOptions): EventListenerSubscription;
22
+ /**
23
+ * Removes the event listeners in the array.
24
+ * @param listeners
25
+ */
26
+ export declare function removeListeners(listeners: EventListenerSubscription[]): void;
@@ -0,0 +1,32 @@
1
+ import { GlobalRouterEvent } from "../model";
2
+ export declare const historyPatches: [string, GlobalRouterEvent[]][];
3
+ /**
4
+ * Patches the history object by ensuring correct events are dispatches when the history changes.
5
+ */
6
+ export declare function ensureHistoryEvents(): void;
7
+ /**
8
+ * Attaches a global router event after the native function on the object has been invoked.
9
+ * Stores the original function at the _name.
10
+ * @param obj
11
+ * @param functionName
12
+ * @param eventName
13
+ */
14
+ export declare function attachCallback(obj: any, functionName: string, eventName: GlobalRouterEvent): void;
15
+ /**
16
+ * Saves the native function on the history object.
17
+ * @param obj
18
+ * @param name
19
+ * @param func
20
+ */
21
+ export declare function saveNativeFunction(obj: any, name: string, func: (() => void)): void;
22
+ declare global {
23
+ interface History {
24
+ "native": {
25
+ "back": ((distance?: any) => void);
26
+ "forward": ((distance?: any) => void);
27
+ "go": ((delta?: any) => void);
28
+ "pushState": ((data: any, title?: string, url?: string | null) => void);
29
+ "replaceState": ((data: any, title?: string, url?: string | null) => void);
30
+ };
31
+ }
32
+ }
@@ -0,0 +1,6 @@
1
+ export * from './events.js';
2
+ export * from './history.js';
3
+ export * from './router.js';
4
+ export * from './shadow.js';
5
+ export * from './url.js';
6
+ export * from './anchor.js';
@@ -0,0 +1,72 @@
1
+ import { IComponentRoute, IRedirectRoute, IResolverRoute, IRoute, IRouteMatch, IRouterSlot, PageComponent, PathFragment, RouterTree, IRoutingInfo } from "../model";
2
+ /**
3
+ * Determines whether the path is active.
4
+ * If the full path starts with the path and is followed by the end of the string or a "/" the path is considered active.
5
+ * @param path
6
+ * @param fullPath
7
+ */
8
+ export declare function isPathActive(path: string | PathFragment, fullPath?: string): boolean;
9
+ /**
10
+ * Matches a route.
11
+ * @param route
12
+ * @param path
13
+ */
14
+ export declare function matchRoute<D = any>(route: IRoute<D>, path: string | PathFragment): IRouteMatch<D> | null;
15
+ /**
16
+ * Matches the first route that matches the given path.
17
+ * @param routes
18
+ * @param path
19
+ */
20
+ export declare function matchRoutes<D = any>(routes: IRoute<D>[], path: string | PathFragment): IRouteMatch<D> | null;
21
+ /**
22
+ * Returns the page from the route.
23
+ * If the component provided is a function (and not a class) call the function to get the promise.
24
+ * @param route
25
+ * @param info
26
+ */
27
+ export declare function resolvePageComponent(route: IComponentRoute, info: IRoutingInfo): Promise<PageComponent>;
28
+ /**
29
+ * Determines if a route is a redirect route.
30
+ * @param route
31
+ */
32
+ export declare function isRedirectRoute(route: IRoute): route is IRedirectRoute;
33
+ /**
34
+ * Determines if a route is a resolver route.
35
+ * @param route
36
+ */
37
+ export declare function isResolverRoute(route: IRoute): route is IResolverRoute;
38
+ /**
39
+ * Traverses the router tree up to the root route.
40
+ * @param slot
41
+ */
42
+ export declare function traverseRouterTree(slot: IRouterSlot): {
43
+ tree: RouterTree;
44
+ depth: number;
45
+ };
46
+ /**
47
+ * Generates a path based on the router tree.
48
+ * @param tree
49
+ * @param depth
50
+ */
51
+ export declare function getFragments(tree: RouterTree, depth: number): PathFragment[];
52
+ /**
53
+ * Constructs the correct absolute path based on a router.
54
+ * - Handles relative paths: "mypath"
55
+ * - Handles absolute paths: "/mypath"
56
+ * - Handles traversing paths: "../../mypath"
57
+ * @param slot
58
+ * @param path
59
+ */
60
+ export declare function constructAbsolutePath<D = any, P = any>(slot: IRouterSlot<D, P>, path?: string | PathFragment): string;
61
+ /**
62
+ * Handles a redirect.
63
+ * @param slot
64
+ * @param route
65
+ */
66
+ export declare function handleRedirect(slot: IRouterSlot, route: IRedirectRoute): void;
67
+ /**
68
+ * Determines whether the navigation should start based on the current match and the new match.
69
+ * @param currentMatch
70
+ * @param newMatch
71
+ */
72
+ export declare function shouldNavigate<D>(currentMatch: IRouteMatch<D> | null, newMatch: IRouteMatch<D>): boolean;
@@ -0,0 +1,15 @@
1
+ import { IRouterSlot } from "../model";
2
+ /**
3
+ * Queries the parent router.
4
+ * @param $elem
5
+ */
6
+ export declare function queryParentRouterSlot<D = any>($elem: Element): IRouterSlot<D> | null;
7
+ /**
8
+ * Traverses the roots and returns the first match.
9
+ * The minRoots parameter indicates how many roots should be traversed before we started matching with the query.
10
+ * @param $elem
11
+ * @param query
12
+ * @param minRoots
13
+ * @param roots
14
+ */
15
+ export declare function queryParentRoots<T>($elem: Element, query: string, minRoots?: number, roots?: number): T | null;
@@ -0,0 +1,78 @@
1
+ import { ISlashOptions, Query } from "../model";
2
+ /**
3
+ * The current path of the location.
4
+ * As default slashes are included at the start and end.
5
+ * @param options
6
+ */
7
+ export declare function path(options?: Partial<ISlashOptions>): string;
8
+ /**
9
+ * Returns the path without the base path.
10
+ * @param options
11
+ */
12
+ export declare function pathWithoutBasePath(options?: Partial<ISlashOptions>): string;
13
+ /**
14
+ * Returns the base path as defined in the <base> tag in the head in a reliable way.
15
+ * If eg. <base href="/router-slot/"> is defined this function will return "/router-slot/".
16
+ *
17
+ * An alternative would be to use regex on document.baseURI,
18
+ * but that will be unreliable in some cases because it
19
+ * doesn't use the built in HTMLHyperlinkElementUtils.
20
+ *
21
+ * To make this method more performant we could cache the anchor element.
22
+ * As default it will return the base path with slashes in front and at the end.
23
+ */
24
+ export declare function basePath(options?: Partial<ISlashOptions>): string;
25
+ /**
26
+ * Creates an URL using the built in HTMLHyperlinkElementUtils.
27
+ * An alternative would be to use regex on document.baseURI,
28
+ * but that will be unreliable in some cases because it
29
+ * doesn't use the built in HTMLHyperlinkElementUtils.
30
+ *
31
+ * As default it will return the base path with slashes in front and at the end.
32
+ * @param path
33
+ * @param options
34
+ */
35
+ export declare function constructPathWithBasePath(path: string, options?: Partial<ISlashOptions>): string;
36
+ /**
37
+ * Removes the start of the path that matches the part.
38
+ * @param path
39
+ * @param part
40
+ */
41
+ export declare function stripStart(path: string, part: string): string;
42
+ /**
43
+ * Returns the query string.
44
+ */
45
+ export declare function queryString(): string;
46
+ /**
47
+ * Returns the params for the current path.
48
+ * @returns Params
49
+ */
50
+ export declare function query(): Query;
51
+ /**
52
+ * Strips the slash from the start and end of a path.
53
+ * @param path
54
+ */
55
+ export declare function stripSlash(path: string): string;
56
+ /**
57
+ * Ensures the path starts and ends with a slash
58
+ * @param path
59
+ */
60
+ export declare function ensureSlash(path: string): string;
61
+ /**
62
+ * Makes sure that the start and end slashes are present or not depending on the options.
63
+ * @param path
64
+ * @param start
65
+ * @param end
66
+ */
67
+ export declare function slashify(path: string, { start, end }?: Partial<ISlashOptions>): string;
68
+ /**
69
+ * Turns a query string into an object.
70
+ * @param {string} queryString (example: ("test=123&hejsa=LOL&wuhuu"))
71
+ * @returns {Query}
72
+ */
73
+ export declare function toQuery(queryString: string): Query;
74
+ /**
75
+ * Turns a query object into a string query.
76
+ * @param query
77
+ */
78
+ export declare function toQueryString(query: Query): string;
@@ -0,0 +1 @@
1
+ export * from './util/index.js';
@@ -34,7 +34,8 @@ export class UmbObserver {
34
34
  });
35
35
  }
36
36
  hostConnected() {
37
- if (this.#subscription.closed) {
37
+ // Notice: This will not re-subscribe if this controller was destroyed. Only if the subscription was closed.
38
+ if (this.#subscription?.closed) {
38
39
  this.#subscription = this.#source.subscribe(this.#callback);
39
40
  }
40
41
  }
@@ -13,7 +13,7 @@ import { handlers as examineManagementHandlers } from './handlers/examine-manage
13
13
  import { handlers as modelsBuilderHandlers } from './handlers/modelsbuilder.handlers.js';
14
14
  import { handlers as healthCheckHandlers } from './handlers/health-check.handlers.js';
15
15
  import { handlers as profilingHandlers } from './handlers/performance-profiling.handlers.js';
16
- import { handlers as documentHandlers } from './handlers/document.handlers.js';
16
+ import { handlers as documentHandlers } from './handlers/document/index.js';
17
17
  import { handlers as mediaHandlers } from './handlers/media.handlers.js';
18
18
  import { handlers as dictionaryHandlers } from './handlers/dictionary.handlers.js';
19
19
  import { handlers as mediaTypeHandlers } from './handlers/media-type.handlers.js';
@@ -31,6 +31,7 @@ import { handlers as stylesheetHandlers } from './handlers/stylesheet.handlers.j
31
31
  import { handlers as partialViewsHandlers } from './handlers/partial-views.handlers.js';
32
32
  import { handlers as tagHandlers } from './handlers/tag-handlers.js';
33
33
  import { handlers as configHandlers } from './handlers/config.handlers.js';
34
+ import { handlers as scriptHandlers } from './handlers/scripts.handlers.js';
34
35
  const handlers = [
35
36
  serverHandlers.serverVersionHandler,
36
37
  ...installHandlers,
@@ -64,6 +65,7 @@ const handlers = [
64
65
  ...partialViewsHandlers,
65
66
  ...tagHandlers,
66
67
  ...configHandlers,
68
+ ...scriptHandlers,
67
69
  ];
68
70
  switch (import.meta.env.VITE_UMBRACO_INSTALL_STATUS) {
69
71
  case 'must-install':
@@ -1,5 +1,5 @@
1
1
  import { UmbEntityData } from './entity.data.js';
2
- import { DocumentResponseModel, DocumentTreeItemResponseModel, PagedDocumentTreeItemResponseModel, PagedDocumentTypeResponseModel } from '../../external/backend-api/index.js';
2
+ import { DocumentItemResponseModel, DocumentResponseModel, DocumentTreeItemResponseModel, PagedDocumentTreeItemResponseModel, PagedDocumentTypeResponseModel, PagedRecycleBinItemResponseModel } from '../../external/backend-api/index.js';
3
3
  export declare const data: Array<DocumentResponseModel>;
4
4
  export declare const treeData: Array<DocumentTreeItemResponseModel>;
5
5
  declare class UmbDocumentData extends UmbEntityData<DocumentResponseModel> {
@@ -7,11 +7,15 @@ declare class UmbDocumentData extends UmbEntityData<DocumentResponseModel> {
7
7
  constructor();
8
8
  insert(item: DocumentResponseModel): DocumentResponseModel;
9
9
  update(id: string, item: DocumentResponseModel): DocumentResponseModel;
10
+ trash(ids: string[]): DocumentResponseModel[];
10
11
  getTreeRoot(): PagedDocumentTreeItemResponseModel;
11
- getTreeItemChildren(id: string): PagedDocumentTreeItemResponseModel;
12
+ getTreeItemChildrenOf(id: string): PagedDocumentTreeItemResponseModel;
12
13
  getTreeItem(ids: Array<string>): Array<DocumentTreeItemResponseModel>;
14
+ getItems(ids: Array<string>): Array<DocumentItemResponseModel>;
13
15
  getDocumentByIdAllowedDocumentTypes(id: string): PagedDocumentTypeResponseModel;
14
16
  getAllowedDocumentTypesAtRoot(): PagedDocumentTypeResponseModel;
17
+ getRecycleBinRoot(): PagedRecycleBinItemResponseModel;
18
+ getRecycleBinChildrenOf(parentId: string): PagedRecycleBinItemResponseModel;
15
19
  }
16
20
  export declare const umbDocumentData: UmbDocumentData;
17
21
  export {};
@@ -460,7 +460,7 @@ export const data = [
460
460
  publishDate: '2023-02-06T15:32:24.957009',
461
461
  culture: 'en-us',
462
462
  segment: null,
463
- name: 'Blog post B',
463
+ name: 'Simple Document',
464
464
  createDate: '2023-02-06T15:32:05.350038',
465
465
  updateDate: '2023-02-06T15:32:24.957009',
466
466
  },
@@ -538,7 +538,29 @@ export const treeData = [
538
538
  isEdited: false,
539
539
  isTrashed: false,
540
540
  },
541
+ {
542
+ name: 'Trashed',
543
+ type: 'document',
544
+ icon: 'document',
545
+ hasChildren: false,
546
+ id: 'trashed-document-id',
547
+ isContainer: false,
548
+ parentId: null,
549
+ noAccess: false,
550
+ isProtected: false,
551
+ isPublished: false,
552
+ isEdited: false,
553
+ isTrashed: true,
554
+ },
541
555
  ];
556
+ const createDocumentItem = (item) => {
557
+ return {
558
+ id: item.id,
559
+ name: item.variants?.[0].name,
560
+ contentTypeId: item.contentTypeId,
561
+ };
562
+ };
563
+ // TODO: look into making a combined document model so we don't need to maintain two+ data sets.
542
564
  // Temp mocked database
543
565
  // TODO: all properties are optional in the server schema. I don't think this is correct.
544
566
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -566,14 +588,26 @@ class UmbDocumentData extends UmbEntityData {
566
588
  });
567
589
  return result;
568
590
  }
591
+ trash(ids) {
592
+ const result = super.trash(ids);
593
+ this.treeData = this.treeData.map((x) => {
594
+ if (x.id && ids.includes(x.id)) {
595
+ return { ...x, isTrashed: true };
596
+ }
597
+ else {
598
+ return x;
599
+ }
600
+ });
601
+ return result;
602
+ }
569
603
  getTreeRoot() {
570
- const items = this.treeData.filter((item) => item.parentId === null);
604
+ const items = this.treeData.filter((item) => item.parentId === null && item.isTrashed === false);
571
605
  const treeItems = items.map((item) => item);
572
606
  const total = items.length;
573
607
  return { items: treeItems, total };
574
608
  }
575
- getTreeItemChildren(id) {
576
- const items = this.treeData.filter((item) => item.parentId === id);
609
+ getTreeItemChildrenOf(id) {
610
+ const items = this.treeData.filter((item) => item.parentId === id && item.isTrashed === false);
577
611
  const treeItems = items.map((item) => item);
578
612
  const total = items.length;
579
613
  return { items: treeItems, total };
@@ -582,6 +616,10 @@ class UmbDocumentData extends UmbEntityData {
582
616
  const items = this.treeData.filter((item) => ids.includes(item.id ?? ''));
583
617
  return items.map((item) => item);
584
618
  }
619
+ getItems(ids) {
620
+ const items = this.data.filter((item) => ids.includes(item.id ?? ''));
621
+ return items.map((item) => createDocumentItem(item));
622
+ }
585
623
  getDocumentByIdAllowedDocumentTypes(id) {
586
624
  const item = this.getById(id);
587
625
  if (item?.contentTypeId) {
@@ -599,5 +637,17 @@ class UmbDocumentData extends UmbEntityData {
599
637
  const total = items?.length;
600
638
  return { items, total };
601
639
  }
640
+ getRecycleBinRoot() {
641
+ const items = this.treeData.filter((item) => item.parentId === null && item.isTrashed === true);
642
+ const treeItems = items.map((item) => item);
643
+ const total = items.length;
644
+ return { items: treeItems, total };
645
+ }
646
+ getRecycleBinChildrenOf(parentId) {
647
+ const items = this.treeData.filter((item) => item.parentId === parentId && item.isTrashed === true);
648
+ const treeItems = items.map((item) => item);
649
+ const total = items.length;
650
+ return { items: treeItems, total };
651
+ }
602
652
  }
603
653
  export const umbDocumentData = new UmbDocumentData();
@@ -51,8 +51,6 @@ export class UmbEntityData extends UmbData {
51
51
  const item = this.getById(id);
52
52
  if (!item)
53
53
  return;
54
- // TODO: how do we handle trashed items?
55
- // TODO: remove ignore when we know how to handle trashed items.
56
54
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
57
55
  // @ts-ignore
58
56
  item.isTrashed = true;
@@ -0,0 +1,21 @@
1
+ import { UmbData } from './data.js';
2
+ import { CreatePathFolderRequestModel, CreateTextFileViewModelBaseModel, FileSystemTreeItemPresentationModel, PagedFileSystemTreeItemPresentationModel, ScriptItemResponseModel, ScriptResponseModel, UpdateScriptRequestModel } from '../../external/backend-api/index.js';
3
+ type ScriptsDataItem = ScriptResponseModel & FileSystemTreeItemPresentationModel;
4
+ export declare const data: Array<ScriptsDataItem>;
5
+ declare class UmbScriptsData extends UmbData<ScriptsDataItem> {
6
+ constructor();
7
+ getTreeRoot(): PagedFileSystemTreeItemPresentationModel;
8
+ getTreeItemChildren(parentPath: string): PagedFileSystemTreeItemPresentationModel;
9
+ getTreeItem(paths: Array<string>): Array<FileSystemTreeItemPresentationModel>;
10
+ getItem(paths: Array<string>): Array<ScriptItemResponseModel>;
11
+ getFolder(path: string): FileSystemTreeItemPresentationModel;
12
+ postFolder(payload: CreatePathFolderRequestModel): ScriptsDataItem;
13
+ deleteFolder(path: string): (string | undefined)[];
14
+ getScript(path: string): ScriptResponseModel | undefined;
15
+ insertScript(item: CreateTextFileViewModelBaseModel): ScriptsDataItem;
16
+ insert(item: ScriptsDataItem): ScriptsDataItem;
17
+ updateData(updateItem: UpdateScriptRequestModel): void;
18
+ delete(paths: Array<string>): (string | undefined)[];
19
+ }
20
+ export declare const umbScriptsData: UmbScriptsData;
21
+ export {};