@umbraco-cms/backoffice 1.0.0-next.596cc732 → 1.0.0-next.6c429eee

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/element.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { HTMLElementConstructor } from './models';
3
- import { UmbControllerHostInterface } from './controller';
3
+ import { UmbControllerHostElement } from './controller';
4
4
  import { UmbContextToken, UmbContextProviderController, UmbContextCallback, UmbContextConsumerController } from './context-api';
5
5
  import { UmbObserverController } from './observable-api';
6
6
 
7
7
  interface ResolvedContexts {
8
8
  [key: string]: any;
9
9
  }
10
- declare class UmbElementMixinInterface extends UmbControllerHostInterface {
10
+ declare class UmbElementMixinInterface extends UmbControllerHostElement {
11
11
  observe<T>(source: Observable<T>, callback: (_value: T) => void, unique?: string): UmbObserverController<T>;
12
12
  provideContext<R = unknown>(alias: string | UmbContextToken<R>, instance: R): UmbContextProviderController<R>;
13
13
  consumeContext<R = unknown>(alias: string | UmbContextToken<R>, callback: UmbContextCallback<R>): UmbContextConsumerController<R>;
14
14
  consumeAllContexts(contextAliases: string[], callback: (_instances: ResolvedContexts) => void): void;
15
15
  }
16
- declare const UmbElementMixin: <T extends HTMLElementConstructor<HTMLElement>>(superClass: T) => HTMLElementConstructor<UmbElementMixinInterface> & T;
16
+ declare const UmbElementMixin: <T extends HTMLElementConstructor>(superClass: T) => HTMLElementConstructor<UmbElementMixinInterface> & T;
17
17
 
18
18
  export { UmbElementMixin, UmbElementMixinInterface };
@@ -1,15 +1,16 @@
1
- import { UmbControllerHostInterface } from './controller';
1
+ import { UmbControllerHostElement } from './controller';
2
2
  import { UmbEntityActionBase as UmbEntityActionBase$1 } from './entity-action';
3
+ import { UmbFolderRepository } from './repository';
3
4
 
4
5
  interface UmbAction<RepositoryType = unknown> {
5
- host: UmbControllerHostInterface;
6
+ host: UmbControllerHostElement;
6
7
  repository: RepositoryType;
7
8
  execute(): Promise<void>;
8
9
  }
9
10
  declare class UmbActionBase<RepositoryType> {
10
- host: UmbControllerHostInterface;
11
+ host: UmbControllerHostElement;
11
12
  repository?: RepositoryType;
12
- constructor(host: UmbControllerHostInterface, repositoryAlias: string);
13
+ constructor(host: UmbControllerHostElement, repositoryAlias: string);
13
14
  }
14
15
 
15
16
  interface UmbEntityAction<RepositoryType> extends UmbAction<RepositoryType> {
@@ -17,7 +18,8 @@ interface UmbEntityAction<RepositoryType> extends UmbAction<RepositoryType> {
17
18
  }
18
19
  declare class UmbEntityActionBase<RepositoryType> extends UmbActionBase<RepositoryType> {
19
20
  unique: string;
20
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
21
+ repositoryAlias: string;
22
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
21
23
  }
22
24
 
23
25
  interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<RepositoryType> {
@@ -26,37 +28,52 @@ interface UmbEntityBulkAction<RepositoryType = unknown> extends UmbAction<Reposi
26
28
  }
27
29
  declare class UmbEntityBulkActionBase<RepositoryType = unknown> extends UmbActionBase<RepositoryType> {
28
30
  selection: Array<string>;
29
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, selection: Array<string>);
31
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, selection: Array<string>);
30
32
  setSelection(selection: Array<string>): void;
31
33
  }
32
34
 
33
35
  declare class UmbCopyEntityAction<T extends {
34
36
  copy(): Promise<void>;
35
37
  }> extends UmbEntityActionBase$1<T> {
36
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
38
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
37
39
  execute(): Promise<void>;
38
40
  }
39
41
 
40
42
  declare class UmbDeleteEntityAction<T extends {
41
43
  delete(unique: string): Promise<void>;
42
- requestItems(uniques: Array<string>): any;
44
+ requestTreeItems(uniques: Array<string>): any;
43
45
  }> extends UmbEntityActionBase$1<T> {
44
46
  #private;
45
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
47
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
48
+ execute(): Promise<void>;
49
+ }
50
+
51
+ declare class UmbDeleteFolderEntityAction<T extends {
52
+ deleteFolder(unique: string): Promise<void>;
53
+ requestTreeItems(uniques: Array<string>): any;
54
+ }> extends UmbEntityActionBase$1<T> {
55
+ #private;
56
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
57
+ execute(): Promise<void>;
58
+ }
59
+
60
+ declare class UmbFolderUpdateEntityAction<T extends UmbFolderRepository = UmbFolderRepository> extends UmbEntityActionBase$1<T> {
61
+ #private;
62
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
46
63
  execute(): Promise<void>;
47
64
  }
48
65
 
49
66
  declare class UmbMoveEntityAction<T extends {
50
67
  move(): Promise<void>;
51
68
  }> extends UmbEntityActionBase$1<T> {
52
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
69
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
53
70
  execute(): Promise<void>;
54
71
  }
55
72
 
56
73
  declare class UmbSortChildrenOfEntityAction<T extends {
57
74
  sortChildrenOf(): Promise<void>;
58
75
  }> extends UmbEntityActionBase$1<T> {
59
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
76
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
60
77
  execute(): Promise<void>;
61
78
  }
62
79
 
@@ -65,8 +82,8 @@ declare class UmbTrashEntityAction<T extends {
65
82
  requestTreeItems(uniques: Array<string>): any;
66
83
  }> extends UmbEntityActionBase$1<T> {
67
84
  #private;
68
- constructor(host: UmbControllerHostInterface, repositoryAlias: string, unique: string);
85
+ constructor(host: UmbControllerHostElement, repositoryAlias: string, unique: string);
69
86
  execute(): Promise<void>;
70
87
  }
71
88
 
72
- export { UmbAction, UmbActionBase, UmbCopyEntityAction, UmbDeleteEntityAction, UmbEntityAction, UmbEntityActionBase, UmbEntityBulkAction, UmbEntityBulkActionBase, UmbMoveEntityAction, UmbSortChildrenOfEntityAction, UmbTrashEntityAction };
89
+ export { UmbAction, UmbActionBase, UmbCopyEntityAction, UmbDeleteEntityAction, UmbDeleteFolderEntityAction, UmbEntityAction, UmbEntityActionBase, UmbEntityBulkAction, UmbEntityBulkActionBase, UmbFolderUpdateEntityAction, UmbMoveEntityAction, UmbSortChildrenOfEntityAction, UmbTrashEntityAction };
@@ -1,7 +1,8 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ManifestTypes, ManifestKind, ManifestTypeMap, ManifestBase, SpecificManifestTypeOrManifestBase, ManifestElement, ManifestElementWithElementName, ManifestClass } from './extensions-registry';
3
3
  import { UmbContextToken } from './context-api';
4
- import { UmbControllerHostInterface } from './controller';
4
+ import { PageComponent } from './router';
5
+ import { UmbControllerHostElement } from './controller';
5
6
 
6
7
  declare class UmbExtensionRegistry {
7
8
  private _extensions;
@@ -22,13 +23,13 @@ declare class UmbExtensionRegistry {
22
23
  }
23
24
  declare const UMB_EXTENSION_REGISTRY_TOKEN: UmbContextToken<UmbExtensionRegistry>;
24
25
 
25
- declare function createExtensionElement(manifest: ManifestElement): Promise<HTMLElement | undefined>;
26
+ declare function createExtensionElement(manifest: ManifestElement): Promise<PageComponent>;
26
27
 
27
28
  declare function hasDefaultExport<ConstructorType>(object: unknown): object is {
28
29
  default: ConstructorType;
29
30
  };
30
31
 
31
- type UmbEntrypointOnInit = (host: UmbControllerHostInterface, extensionRegistry: UmbExtensionRegistry) => void;
32
+ type UmbEntrypointOnInit = (host: UmbControllerHostElement, extensionRegistry: UmbExtensionRegistry) => void;
32
33
  /**
33
34
  * Interface containing supported life-cycle functions for ESModule entrypoints
34
35
  */
@@ -3,7 +3,7 @@ import { UmbWorkspaceAction } from './workspace';
3
3
  import { ClassConstructor } from './models';
4
4
  import { UmbStoreBase, UmbTreeStore } from './store';
5
5
  import { UmbExtensionRegistry } from './extensions-api';
6
- import { UmbControllerHostInterface } from './controller';
6
+ import { UmbControllerHostElement } from './controller';
7
7
 
8
8
  interface ManifestCollectionView extends ManifestElement, ManifestWithConditions<ConditionsCollectionView> {
9
9
  type: 'collectionView';
@@ -253,11 +253,11 @@ interface ConditionsTreeItem {
253
253
  entityType: string;
254
254
  }
255
255
 
256
- interface ManifestUserDashboard extends ManifestElement {
257
- type: 'userDashboard';
258
- meta: MetaUserDashboard;
256
+ interface ManifestUserProfileApp extends ManifestElement {
257
+ type: 'userProfileApp';
258
+ meta: MetaUserProfileApp;
259
259
  }
260
- interface MetaUserDashboard {
260
+ interface MetaUserProfileApp {
261
261
  label: string;
262
262
  pathname: string;
263
263
  }
@@ -330,7 +330,7 @@ interface ManifestTreeStore extends ManifestClass<UmbTreeStore> {
330
330
  type: 'treeStore';
331
331
  }
332
332
 
333
- type ManifestTypes = ManifestCollectionView | ManifestDashboard | ManifestDashboardCollection | ManifestEntityAction | ManifestEntityBulkAction | ManifestEntrypoint | ManifestExternalLoginProvider | ManifestHeaderApp | ManifestHeaderAppButtonKind | ManifestHealthCheck | ManifestPackageView | ManifestPropertyAction | ManifestPropertyEditorModel | ManifestPropertyEditorUI | ManifestRepository | ManifestSection | ManifestSectionSidebarApp | ManifestSectionSidebarAppMenuKind | ManifestSectionView | ManifestMenu | ManifestMenuItem | ManifestMenuItemTreeKind | ManifestTheme | ManifestTree | ManifestTreeItem | ManifestUserDashboard | ManifestWorkspace | ManifestWorkspaceAction | ManifestWorkspaceView | ManifestWorkspaceViewCollection | ManifestModal | ManifestStore | ManifestTreeStore | ManifestBase;
333
+ type ManifestTypes = ManifestCollectionView | ManifestDashboard | ManifestDashboardCollection | ManifestEntityAction | ManifestEntityBulkAction | ManifestEntrypoint | ManifestExternalLoginProvider | ManifestHeaderApp | ManifestHeaderAppButtonKind | ManifestHealthCheck | ManifestPackageView | ManifestPropertyAction | ManifestPropertyEditorModel | ManifestPropertyEditorUI | ManifestRepository | ManifestSection | ManifestSectionSidebarApp | ManifestSectionSidebarAppMenuKind | ManifestSectionView | ManifestMenu | ManifestMenuItem | ManifestMenuItemTreeKind | ManifestTheme | ManifestTree | ManifestTreeItem | ManifestUserProfileApp | ManifestWorkspace | ManifestWorkspaceAction | ManifestWorkspaceView | ManifestWorkspaceViewCollection | ManifestModal | ManifestStore | ManifestTreeStore | ManifestBase;
334
334
  type ManifestStandardTypes = ManifestTypes['type'];
335
335
  type ManifestTypeMap = {
336
336
  [Manifest in ManifestTypes as Manifest['type']]: Manifest;
@@ -390,8 +390,8 @@ interface ManifestEntrypoint extends ManifestBase {
390
390
 
391
391
  declare class UmbEntryPointExtensionInitializer {
392
392
  #private;
393
- constructor(rootHost: UmbControllerHostInterface, extensionRegistry: UmbExtensionRegistry);
393
+ constructor(rootHost: UmbControllerHostElement, extensionRegistry: UmbExtensionRegistry);
394
394
  instantiateEntryPoint(manifest: ManifestEntrypoint): void;
395
395
  }
396
396
 
397
- export { ConditionsCollectionView, ConditionsDashboard, ConditionsDashboardCollection, ConditionsEditorViewCollection, ConditionsEntityAction, ConditionsEntityBulkAction, ConditionsMenuItem, ConditionsPropertyAction, ConditionsSectionSidebarApp, ConditionsSectionView, ConditionsTreeItem, ConditionsWorkspaceAction, ConditionsWorkspaceView, HealthCheck, ManifestBase, ManifestClass, ManifestClassWithClassConstructor, ManifestCollectionView, ManifestDashboard, ManifestDashboardCollection, ManifestElement, ManifestElementWithElementName, ManifestEntityAction, ManifestEntityBulkAction, ManifestEntrypoint, ManifestExternalLoginProvider, ManifestHeaderApp, ManifestHeaderAppButtonKind, ManifestHealthCheck, ManifestKind, ManifestMenu, ManifestMenuItem, ManifestMenuItemTreeKind, ManifestModal, ManifestPackageView, ManifestPropertyAction, ManifestPropertyEditorModel, ManifestPropertyEditorUI, ManifestRepository, ManifestSection, ManifestSectionSidebarApp, ManifestSectionSidebarAppMenuKind, ManifestSectionView, ManifestStandardTypes, ManifestStore, ManifestTheme, ManifestTree, ManifestTreeItem, ManifestTreeStore, ManifestTypeMap, ManifestTypes, ManifestUserDashboard, ManifestWithConditions, ManifestWithLoader, ManifestWithMeta, ManifestWithView, ManifestWorkspace, ManifestWorkspaceAction, ManifestWorkspaceView, ManifestWorkspaceViewCollection, MetaCollectionView, MetaDashboard, MetaDashboardCollection, MetaEditor, MetaEditorViewCollection, MetaEntityAction, MetaEntityBulkAction, MetaExternalLoginProvider, MetaHeaderApp, MetaHeaderAppButtonKind, MetaHealthCheck, MetaManifestWithView, MetaMenuItem, MetaMenuItemTreeKind, MetaPackageView, MetaPropertyEditorModel, MetaPropertyEditorUI, MetaSection, MetaSectionSidebarAppMenuKind, MetaSectionView, MetaTree, MetaUserDashboard, MetaWorkspaceAction, MetaWorkspaceView, PropertyEditorConfig, PropertyEditorConfigDefaultData, PropertyEditorConfigProperty, SpecificManifestTypeOrManifestBase, UmbEntryPointExtensionInitializer };
397
+ export { ConditionsCollectionView, ConditionsDashboard, ConditionsDashboardCollection, ConditionsEditorViewCollection, ConditionsEntityAction, ConditionsEntityBulkAction, ConditionsMenuItem, ConditionsPropertyAction, ConditionsSectionSidebarApp, ConditionsSectionView, ConditionsTreeItem, ConditionsWorkspaceAction, ConditionsWorkspaceView, HealthCheck, ManifestBase, ManifestClass, ManifestClassWithClassConstructor, ManifestCollectionView, ManifestDashboard, ManifestDashboardCollection, ManifestElement, ManifestElementWithElementName, ManifestEntityAction, ManifestEntityBulkAction, ManifestEntrypoint, ManifestExternalLoginProvider, ManifestHeaderApp, ManifestHeaderAppButtonKind, ManifestHealthCheck, ManifestKind, ManifestMenu, ManifestMenuItem, ManifestMenuItemTreeKind, ManifestModal, ManifestPackageView, ManifestPropertyAction, ManifestPropertyEditorModel, ManifestPropertyEditorUI, ManifestRepository, ManifestSection, ManifestSectionSidebarApp, ManifestSectionSidebarAppMenuKind, ManifestSectionView, ManifestStandardTypes, ManifestStore, ManifestTheme, ManifestTree, ManifestTreeItem, ManifestTreeStore, ManifestTypeMap, ManifestTypes, ManifestUserProfileApp, ManifestWithConditions, ManifestWithLoader, ManifestWithMeta, ManifestWithView, ManifestWorkspace, ManifestWorkspaceAction, ManifestWorkspaceView, ManifestWorkspaceViewCollection, MetaCollectionView, MetaDashboard, MetaDashboardCollection, MetaEditor, MetaEditorViewCollection, MetaEntityAction, MetaEntityBulkAction, MetaExternalLoginProvider, MetaHeaderApp, MetaHeaderAppButtonKind, MetaHealthCheck, MetaManifestWithView, MetaMenuItem, MetaMenuItemTreeKind, MetaPackageView, MetaPropertyEditorModel, MetaPropertyEditorUI, MetaSection, MetaSectionSidebarAppMenuKind, MetaSectionView, MetaTree, MetaUserProfileApp, MetaWorkspaceAction, MetaWorkspaceView, PropertyEditorConfig, PropertyEditorConfigDefaultData, PropertyEditorConfigProperty, SpecificManifestTypeOrManifestBase, UmbEntryPointExtensionInitializer };
package/modal.d.ts CHANGED
@@ -4,10 +4,11 @@ import * as lit_html from 'lit-html';
4
4
  import * as lit from 'lit';
5
5
  import { LitElement, TemplateResult } from 'lit';
6
6
  import { UUIModalDialogElement, UUIModalSidebarElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
7
- import { UmbControllerHostInterface as UmbControllerHostInterface$1 } from './controller';
7
+ import { UmbControllerHostElement, UmbControllerInterface } from './controller';
8
8
  import { UmbContextToken } from './context-api';
9
+ import { Params } from './router';
9
10
  import { UmbModalToken as UmbModalToken$1, UmbModalConfig as UmbModalConfig$1, UmbPickerModalData as UmbPickerModalData$1 } from './modal';
10
- import { LanguageResponseModel } from './backend-api';
11
+ import { LanguageResponseModel, FolderReponseModel } from './backend-api';
11
12
  import { UserDetails } from './models';
12
13
 
13
14
  declare class UmbSearchModalElement extends LitElement {
@@ -89,7 +90,7 @@ declare class UmbModalHandlerClass<ModalData extends object = object, ModalResul
89
90
  key: string;
90
91
  type: UmbModalType;
91
92
  size: UUIModalSidebarSize;
92
- constructor(host: UmbControllerHostInterface$1, modalAlias: string | UmbModalToken<ModalData, ModalResult>, data?: ModalData, config?: UmbModalConfig);
93
+ constructor(host: UmbControllerHostElement, modalAlias: string | UmbModalToken<ModalData, ModalResult>, data?: ModalData, config?: UmbModalConfig);
93
94
  private submit;
94
95
  reject(): void;
95
96
  onSubmit(): Promise<ModalResult>;
@@ -103,9 +104,9 @@ interface UmbModalConfig {
103
104
  }
104
105
  declare class UmbModalContext {
105
106
  #private;
106
- host: UmbControllerHostInterface$1;
107
- readonly modals: rxjs.Observable<UmbModalHandler<object, any>[]>;
108
- constructor(host: UmbControllerHostInterface$1);
107
+ host: UmbControllerHostElement;
108
+ readonly modals: rxjs.Observable<UmbModalHandler[]>;
109
+ constructor(host: UmbControllerHostElement);
109
110
  search(): UmbModalHandler<any, any>;
110
111
  /**
111
112
  * Opens a modal or sidebar modal
@@ -126,316 +127,6 @@ declare class UmbModalContext {
126
127
  }
127
128
  declare const UMB_MODAL_CONTEXT_TOKEN: UmbContextToken<UmbModalContext>;
128
129
 
129
- interface IRouterSlot<D = any, P = any> extends HTMLElement {
130
- readonly route: IRoute<D> | null;
131
- readonly isRoot: boolean;
132
- readonly fragments: IPathFragments | null;
133
- readonly params: Params | null;
134
- readonly match: IRouteMatch<D> | null;
135
- routes: IRoute<D>[];
136
- add: ((routes: IRoute<D>[], navigate?: boolean) => void);
137
- clear: (() => void);
138
- render: (() => Promise<void>);
139
- constructAbsolutePath: ((path: PathFragment) => string);
140
- parent: IRouterSlot<P> | null | undefined;
141
- queryParentRouterSlot: (() => IRouterSlot<P> | null);
142
- }
143
- type IRoutingInfo<D = any, P = any> = {
144
- slot: IRouterSlot<D, P>;
145
- match: IRouteMatch<D>;
146
- };
147
- type CustomResolver<D = any, P = any> = ((info: IRoutingInfo<D>) => boolean | void | Promise<boolean> | Promise<void>);
148
- type Guard<D = any, P = any> = ((info: IRoutingInfo<D, P>) => boolean | Promise<boolean>);
149
- type PageComponent = HTMLElement;
150
- type ModuleResolver = Promise<{
151
- default: any;
152
- }>;
153
- type Class<T extends PageComponent = PageComponent> = {
154
- new (...args: any[]): T;
155
- };
156
- type Setup<D = any> = ((component: PageComponent, info: IRoutingInfo<D>) => void);
157
- type PathMatch = "prefix" | "suffix" | "full" | "fuzzy";
158
- /**
159
- * The base route interface.
160
- * D = the data type of the data
161
- */
162
- interface IRouteBase<D = any> {
163
- path: PathFragment;
164
- data?: D;
165
- guards?: Guard[];
166
- pathMatch?: PathMatch;
167
- }
168
- /**
169
- * Route type used for redirection.
170
- */
171
- interface IRedirectRoute<D = any> extends IRouteBase<D> {
172
- redirectTo: string;
173
- preserveQuery?: boolean;
174
- }
175
- /**
176
- * Route type used to resolve and stamp components.
177
- */
178
- interface IComponentRoute<D = any> extends IRouteBase<D> {
179
- component: Class | ModuleResolver | PageComponent | (() => Class) | (() => PageComponent) | (() => ModuleResolver);
180
- setup?: Setup;
181
- }
182
- /**
183
- * Route type used to take control of how the route should resolve.
184
- */
185
- interface IResolverRoute<D = any> extends IRouteBase<D> {
186
- resolve: CustomResolver;
187
- }
188
- type IRoute<D = any> = IRedirectRoute<D> | IComponentRoute<D> | IResolverRoute<D>;
189
- type PathFragment = string;
190
- type IPathFragments = {
191
- consumed: PathFragment;
192
- rest: PathFragment;
193
- };
194
- interface IRouteMatch<D = any> {
195
- route: IRoute<D>;
196
- params: Params;
197
- fragments: IPathFragments;
198
- match: RegExpMatchArray;
199
- }
200
- type PushStateEvent = CustomEvent<null>;
201
- type ReplaceStateEvent = CustomEvent<null>;
202
- type ChangeStateEvent = CustomEvent<null>;
203
- type WillChangeStateEvent = CustomEvent<{
204
- url?: string | null;
205
- eventName: GlobalRouterEvent;
206
- }>;
207
- type NavigationStartEvent<D = any> = CustomEvent<IRoutingInfo<D>>;
208
- type NavigationSuccessEvent<D = any> = CustomEvent<IRoutingInfo<D>>;
209
- type NavigationCancelEvent<D = any> = CustomEvent<IRoutingInfo<D>>;
210
- type NavigationErrorEvent<D = any> = CustomEvent<IRoutingInfo<D>>;
211
- type NavigationEndEvent<D = any> = CustomEvent<IRoutingInfo<D>>;
212
- type Params = {
213
- [key: string]: string;
214
- };
215
- /**
216
- * History related events.
217
- */
218
- type GlobalRouterEvent = "pushstate" | "replacestate" | "popstate" | "changestate" | "willchangestate" | "navigationstart" | "navigationcancel" | "navigationerror" | "navigationsuccess" | "navigationend";
219
- declare global {
220
- interface GlobalEventHandlersEventMap {
221
- "pushstate": PushStateEvent;
222
- "replacestate": ReplaceStateEvent;
223
- "popstate": PopStateEvent;
224
- "changestate": ChangeStateEvent;
225
- "navigationstart": NavigationStartEvent;
226
- "navigationend": NavigationEndEvent;
227
- "navigationsuccess": NavigationSuccessEvent;
228
- "navigationcancel": NavigationCancelEvent;
229
- "navigationerror": NavigationErrorEvent;
230
- "willchangestate": WillChangeStateEvent;
231
- }
232
- }
233
-
234
- /**
235
- * Slot for a node in the router tree.
236
- * @slot - Default content.
237
- * @event changestate - Dispatched when the router slot state changes.
238
- */
239
- declare class RouterSlot<D = any, P = any> extends HTMLElement implements IRouterSlot<D, P> {
240
- /**
241
- * Listeners on the router.
242
- */
243
- private listeners;
244
- /**
245
- * The available routes.
246
- */
247
- private _routes;
248
- get routes(): IRoute<D>[];
249
- set routes(routes: IRoute<D>[]);
250
- /**
251
- * The parent router.
252
- * Is REQUIRED if this router is a child.
253
- * When set, the relevant listeners are added or teared down because they depend on the parent.
254
- */
255
- _parent: IRouterSlot<P> | null | undefined;
256
- get parent(): IRouterSlot<P> | null | undefined;
257
- set parent(router: IRouterSlot<P> | null | undefined);
258
- /**
259
- * Whether the router is a root router.
260
- */
261
- get isRoot(): boolean;
262
- /**
263
- * The current route match.
264
- */
265
- private _routeMatch;
266
- get match(): IRouteMatch<D> | null;
267
- /**
268
- * The current route of the match.
269
- */
270
- get route(): IRoute<D> | null;
271
- /**
272
- * The current path fragment of the match
273
- */
274
- get fragments(): IPathFragments | null;
275
- /**
276
- * The current params of the match.
277
- */
278
- get params(): Params | null;
279
- /**
280
- * Hooks up the element.
281
- */
282
- constructor();
283
- /**
284
- * Query the parent router slot when the router slot is connected.
285
- */
286
- connectedCallback(): void;
287
- /**
288
- * Tears down the element.
289
- */
290
- disconnectedCallback(): void;
291
- /**
292
- * Queries the parent router.
293
- */
294
- queryParentRouterSlot(): IRouterSlot<P> | null;
295
- /**
296
- * Returns an absolute path relative to the router slot.
297
- * @param path
298
- */
299
- constructAbsolutePath(path: PathFragment): string;
300
- /**
301
- * Adds routes to the router.
302
- * Navigates automatically if the router slot is the root and is connected.
303
- * @param routes
304
- * @param navigate
305
- */
306
- add(routes: IRoute<D>[], navigate?: boolean): void;
307
- /**
308
- * Removes all routes.
309
- */
310
- clear(): void;
311
- /**
312
- * Each time the path changes, load the new path.
313
- */
314
- render(): Promise<void>;
315
- /**
316
- * Attaches listeners, either globally or on the parent router.
317
- */
318
- protected attachListeners(): void;
319
- /**
320
- * Clears the children in the DOM.
321
- */
322
- protected clearChildren(): void;
323
- /**
324
- * Detaches the listeners.
325
- */
326
- protected detachListeners(): void;
327
- /**
328
- * Notify the listeners.
329
- */
330
- notifyChildRouters(info: any): void;
331
- /**
332
- * Loads a new path based on the routes.
333
- * Returns true if a navigation was made to a new page.
334
- */
335
- protected renderPath(path: string | PathFragment): Promise<boolean>;
336
- }
337
- declare global {
338
- interface HTMLElementTagNameMap {
339
- "router-slot": RouterSlot;
340
- }
341
- }
342
-
343
- /**
344
- * Router link.
345
- * @slot - Default content.
346
- */
347
- declare class RouterLink extends HTMLElement {
348
- private listeners;
349
- private _context;
350
- static get observedAttributes(): string[];
351
- /**
352
- * The path of the navigation.
353
- * @attr
354
- */
355
- set path(value: string | PathFragment);
356
- get path(): string | PathFragment;
357
- /**
358
- * Whether the element is disabled or not.
359
- * @attr
360
- */
361
- get disabled(): boolean;
362
- set disabled(value: boolean);
363
- /**
364
- * Whether the element is active or not.
365
- * @attr
366
- */
367
- get active(): boolean;
368
- set active(value: boolean);
369
- /**
370
- * Whether the focus should be delegated.
371
- * @attr
372
- */
373
- get delegateFocus(): boolean;
374
- set delegateFocus(value: boolean);
375
- /**
376
- * Whether the query should be preserved or not.
377
- * @attr
378
- */
379
- get preserveQuery(): boolean;
380
- set preserveQuery(value: boolean);
381
- /**
382
- * The current router slot context.
383
- */
384
- get context(): IRouterSlot | null;
385
- set context(value: IRouterSlot | null);
386
- /**
387
- * Returns the absolute path.
388
- */
389
- get absolutePath(): string;
390
- constructor();
391
- /**
392
- * Hooks up the element.
393
- */
394
- connectedCallback(): void;
395
- /**
396
- * Tear down listeners.
397
- */
398
- disconnectedCallback(): void;
399
- /**
400
- * Reacts to attribute changed callback.
401
- * @param name
402
- * @param oldValue
403
- * @param newValue
404
- */
405
- attributeChangedCallback(name: string, oldValue: unknown, newValue: unknown): void;
406
- private updateTabIndex;
407
- /**
408
- * Returns the absolute path constructed relative to the context.
409
- * If no router parent was found the path property is the absolute one.
410
- */
411
- constructAbsolutePath(path: string): string;
412
- /**
413
- * Updates whether the route is active or not.
414
- */
415
- protected updateActive(): void;
416
- /**
417
- * Navigates to the specified path.
418
- */
419
- navigate(path: string, e?: Event): void;
420
- }
421
- declare global {
422
- interface HTMLElementTagNameMap {
423
- "router-link": RouterLink;
424
- }
425
- }
426
-
427
- declare global {
428
- interface History {
429
- "native": {
430
- "back": ((distance?: any) => void);
431
- "forward": ((distance?: any) => void);
432
- "go": ((delta?: any) => void);
433
- "pushState": ((data: any, title?: string, url?: string | null) => void);
434
- "replaceState": ((data: any, title?: string, url?: string | null) => void);
435
- };
436
- }
437
- }
438
-
439
130
  type UmbModalRouteBuilder = (params: {
440
131
  [key: string]: string | number;
441
132
  }) => string;
@@ -466,30 +157,10 @@ declare class UmbModalRouteRegistration<UmbModalTokenData extends object = objec
466
157
  routeSetup(modalContext: UmbModalContext, params: Params): UmbModalHandler<UmbModalTokenData, UmbModalTokenResult> | null;
467
158
  }
468
159
 
469
- interface UmbControllerInterface {
470
- get unique(): string | undefined;
471
- hostConnected(): void;
472
- hostDisconnected(): void;
473
- destroy(): void;
474
- }
475
-
476
- declare class UmbControllerHostInterface extends HTMLElement {
477
- hasController(controller: UmbControllerInterface): boolean;
478
- getControllers(filterMethod: (ctrl: UmbControllerInterface) => boolean): UmbControllerInterface[];
479
- addController(controller: UmbControllerInterface): void;
480
- removeController(controller: UmbControllerInterface): void;
481
- }
482
- declare global {
483
- interface HTMLElement {
484
- connectedCallback(): void;
485
- disconnectedCallback(): void;
486
- }
487
- }
488
-
489
160
  declare class UmbModalRouteRegistrationController<D extends object = object, R = any> extends UmbModalRouteRegistration<D, R> implements UmbControllerInterface {
490
161
  #private;
491
162
  get unique(): undefined;
492
- constructor(host: UmbControllerHostInterface, alias: UmbModalToken$1<D, R> | string, path: string, uniqueParts?: Map<string, string | undefined> | null, modalConfig?: UmbModalConfig$1);
163
+ constructor(host: UmbControllerHostElement, alias: UmbModalToken$1<D, R> | string, path: string, uniqueParts?: Map<string, string | undefined> | null, modalConfig?: UmbModalConfig$1);
493
164
  setUniqueIdentifier(identifier: string, value: string | undefined): void;
494
165
  private _registererModal;
495
166
  hostConnected(): void;
@@ -498,7 +169,7 @@ declare class UmbModalRouteRegistrationController<D extends object = object, R =
498
169
  }
499
170
 
500
171
  interface UmbAllowedDocumentTypesModalData {
501
- key: string | null;
172
+ id: string | null;
502
173
  }
503
174
  interface UmbAllowedDocumentTypesModalResult {
504
175
  documentTypeKey: string;
@@ -546,6 +217,15 @@ interface UmbDocumentPickerModalResult {
546
217
  }
547
218
  declare const UMB_DOCUMENT_PICKER_MODAL: UmbModalToken$1<UmbDocumentPickerModalData, UmbDocumentPickerModalResult>;
548
219
 
220
+ interface UmbDocumentTypePickerModalData {
221
+ multiple?: boolean;
222
+ selection?: Array<string>;
223
+ }
224
+ interface UmbDocumentTypePickerModalResult {
225
+ selection: Array<string>;
226
+ }
227
+ declare const UMB_DOCUMENT_TYPE_PICKER_MODAL: UmbModalToken$1<UmbDocumentTypePickerModalData, UmbDocumentTypePickerModalResult>;
228
+
549
229
  declare enum OEmbedStatus {
550
230
  NotSupported = 0,
551
231
  Error = 1,
@@ -600,8 +280,8 @@ interface UmbImportDictionaryModalData {
600
280
  unique: string | null;
601
281
  }
602
282
  interface UmbImportDictionaryModalResult {
603
- fileName?: string;
604
- parentKey?: string;
283
+ temporaryFileId?: string;
284
+ parentId?: string;
605
285
  }
606
286
  declare const UMB_IMPORT_DICTIONARY_MODAL: UmbModalToken$1<UmbImportDictionaryModalData, UmbImportDictionaryModalResult>;
607
287
 
@@ -684,10 +364,37 @@ interface UmbSectionPickerModalData {
684
364
  }
685
365
  declare const UMB_SECTION_PICKER_MODAL: UmbModalToken$1<UmbSectionPickerModalData, unknown>;
686
366
 
367
+ interface UmbTemplateModalData {
368
+ id: string;
369
+ language?: 'razor' | 'typescript' | 'javascript' | 'css' | 'markdown' | 'json' | 'html';
370
+ }
371
+ interface UmbTemplateModalResult {
372
+ id: string;
373
+ }
374
+ declare const UMB_TEMPLATE_MODAL: UmbModalToken$1<UmbTemplateModalData, UmbTemplateModalResult>;
375
+
376
+ interface UmbTemplatePickerModalData {
377
+ multiple: boolean;
378
+ selection: string[];
379
+ }
380
+ interface UmbTemplatePickerModalResult {
381
+ selection: string[] | undefined;
382
+ }
383
+ declare const UMB_TEMPLATE_PICKER_MODAL: UmbModalToken$1<UmbTemplatePickerModalData, UmbTemplatePickerModalResult>;
384
+
687
385
  declare const UMB_USER_GROUP_PICKER_MODAL: UmbModalToken$1<UmbPickerModalData$1<UserDetails>, unknown>;
688
386
 
689
387
  declare const UMB_USER_PICKER_MODAL: UmbModalToken$1<UmbPickerModalData$1<UserDetails>, unknown>;
690
388
 
389
+ interface UmbFolderModalData {
390
+ repositoryAlias: string;
391
+ unique?: string;
392
+ }
393
+ interface UmbFolderModalResult {
394
+ folder: FolderReponseModel;
395
+ }
396
+ declare const UMB_FOLDER_MODAL: UmbModalToken$1<UmbFolderModalData, UmbFolderModalResult>;
397
+
691
398
  interface UmbPickerModalData<T> {
692
399
  multiple: boolean;
693
400
  selection: Array<string>;
@@ -697,4 +404,4 @@ interface UmbPickerModalResult<T> {
697
404
  selection: Array<string>;
698
405
  }
699
406
 
700
- export { OEmbedResult, OEmbedStatus, UMB_ALLOWED_DOCUMENT_TYPES_MODAL, UMB_CHANGE_PASSWORD_MODAL, UMB_CONFIRM_MODAL, UMB_CONTEXT_DEBUGGER_MODAL, UMB_CREATE_DICTIONARY_MODAL, UMB_CREATE_USER_MODAL, UMB_CURRENT_USER_MODAL, UMB_DOCUMENT_PICKER_MODAL, UMB_EMBEDDED_MEDIA_MODAL, UMB_EXAMINE_FIELDS_SETTINGS_MODAL, UMB_EXPORT_DICTIONARY_MODAL, UMB_ICON_PICKER_MODAL, UMB_IMPORT_DICTIONARY_MODAL, UMB_INVITE_USER_MODAL, UMB_LANGUAGE_PICKER_MODAL, UMB_LINK_PICKER_MODAL, UMB_MEDIA_PICKER_MODAL, UMB_MODAL_CONTEXT_TOKEN, UMB_PROPERTY_EDITOR_UI_PICKER_MODAL, UMB_PROPERTY_SETTINGS_MODAL, UMB_SEARCH_MODAL, UMB_SECTION_PICKER_MODAL, UMB_USER_GROUP_PICKER_MODAL, UMB_USER_PICKER_MODAL, UmbAllowedDocumentTypesModalData, UmbAllowedDocumentTypesModalResult, UmbChangePasswordModalData, UmbConfirmModalData, UmbConfirmModalResult, UmbContextDebuggerModalData, UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult, UmbCreateDocumentModalResultData, UmbDocumentPickerModalData, UmbDocumentPickerModalResult, UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult, UmbExamineFieldsSettingsModalData, UmbExportDictionaryModalData, UmbExportDictionaryModalResult, UmbIconPickerModalData, UmbIconPickerModalResult, UmbImportDictionaryModalData, UmbImportDictionaryModalResult, UmbLanguagePickerModalData, UmbLanguagePickerModalResult, UmbLinkPickerConfig, UmbLinkPickerLink, UmbLinkPickerModalData, UmbLinkPickerModalResult, UmbMediaPickerModalData, UmbMediaPickerModalResult, UmbModalConfig, UmbModalContext, UmbModalHandler, UmbModalHandlerClass, UmbModalRouteBuilder, UmbModalRouteRegistration, UmbModalRouteRegistrationController, UmbModalToken, UmbModalType, UmbPickerModalData, UmbPickerModalResult, UmbPropertyEditorUIPickerModalData, UmbPropertyEditorUIPickerModalResult, UmbPropertySettingsModalResult, UmbSectionPickerModalData };
407
+ export { OEmbedResult, OEmbedStatus, UMB_ALLOWED_DOCUMENT_TYPES_MODAL, UMB_CHANGE_PASSWORD_MODAL, UMB_CONFIRM_MODAL, UMB_CONTEXT_DEBUGGER_MODAL, UMB_CREATE_DICTIONARY_MODAL, UMB_CREATE_USER_MODAL, UMB_CURRENT_USER_MODAL, UMB_DOCUMENT_PICKER_MODAL, UMB_DOCUMENT_TYPE_PICKER_MODAL, UMB_EMBEDDED_MEDIA_MODAL, UMB_EXAMINE_FIELDS_SETTINGS_MODAL, UMB_EXPORT_DICTIONARY_MODAL, UMB_FOLDER_MODAL, UMB_ICON_PICKER_MODAL, UMB_IMPORT_DICTIONARY_MODAL, UMB_INVITE_USER_MODAL, UMB_LANGUAGE_PICKER_MODAL, UMB_LINK_PICKER_MODAL, UMB_MEDIA_PICKER_MODAL, UMB_MODAL_CONTEXT_TOKEN, UMB_PROPERTY_EDITOR_UI_PICKER_MODAL, UMB_PROPERTY_SETTINGS_MODAL, UMB_SEARCH_MODAL, UMB_SECTION_PICKER_MODAL, UMB_TEMPLATE_MODAL, UMB_TEMPLATE_PICKER_MODAL, UMB_USER_GROUP_PICKER_MODAL, UMB_USER_PICKER_MODAL, UmbAllowedDocumentTypesModalData, UmbAllowedDocumentTypesModalResult, UmbChangePasswordModalData, UmbConfirmModalData, UmbConfirmModalResult, UmbContextDebuggerModalData, UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult, UmbCreateDocumentModalResultData, UmbDocumentPickerModalData, UmbDocumentPickerModalResult, UmbDocumentTypePickerModalData, UmbDocumentTypePickerModalResult, UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult, UmbExamineFieldsSettingsModalData, UmbExportDictionaryModalData, UmbExportDictionaryModalResult, UmbFolderModalData, UmbFolderModalResult, UmbIconPickerModalData, UmbIconPickerModalResult, UmbImportDictionaryModalData, UmbImportDictionaryModalResult, UmbLanguagePickerModalData, UmbLanguagePickerModalResult, UmbLinkPickerConfig, UmbLinkPickerLink, UmbLinkPickerModalData, UmbLinkPickerModalResult, UmbMediaPickerModalData, UmbMediaPickerModalResult, UmbModalConfig, UmbModalContext, UmbModalHandler, UmbModalHandlerClass, UmbModalRouteBuilder, UmbModalRouteRegistration, UmbModalRouteRegistrationController, UmbModalToken, UmbModalType, UmbPickerModalData, UmbPickerModalResult, UmbPropertyEditorUIPickerModalData, UmbPropertyEditorUIPickerModalResult, UmbPropertySettingsModalResult, UmbSectionPickerModalData, UmbTemplateModalData, UmbTemplateModalResult, UmbTemplatePickerModalData, UmbTemplatePickerModalResult };