@umbraco-cms/backoffice 1.0.0-next.37dcc47c → 1.0.0-next.3bcfb12e

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/modal.d.ts CHANGED
@@ -1,20 +1,23 @@
1
1
  import * as rxjs from 'rxjs';
2
- import * as lit_html from 'lit-html';
2
+ import { Observable } from 'rxjs';
3
3
  import * as lit from 'lit';
4
- import { LitElement } from 'lit';
5
- import { UUIModalSidebarElement, UUIModalSidebarSize } from '@umbraco-ui/uui-modal-sidebar';
6
- import { UUIModalDialogElement } from '@umbraco-ui/uui-modal-dialog';
7
- import { UmbControllerHostInterface } from './controller';
8
- import { UmbContextToken } from './context-api';
4
+ import { LitElement, TemplateResult } from 'lit';
5
+ import * as lit_html from 'lit-html';
6
+ import { UUIModalDialogElement, UUIModalSidebarElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
7
+ import { UmbControllerHostElement, UmbControllerInterface } from '@umbraco-cms/backoffice/controller';
8
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
9
+ import { Params } from '@umbraco-cms/backoffice/router';
10
+ import { UmbModalToken as UmbModalToken$1, UmbModalConfig as UmbModalConfig$1, UmbTreePickerModalData as UmbTreePickerModalData$1, UmbPickerModalResult as UmbPickerModalResult$1, UmbPickerModalData as UmbPickerModalData$1 } from '@umbraco-cms/backoffice/modal';
11
+ import { DocumentTreeItemResponseModel, EntityTreeItemResponseModel, LanguageResponseModel, ContentTreeItemResponseModel, UserResponseModel, FolderReponseModel, FolderTreeItemResponseModel } from '@umbraco-cms/backoffice/backend-api';
9
12
 
10
13
  declare class UmbSearchModalElement extends LitElement {
11
14
  #private;
12
- static styles: lit.CSSResult[];
13
15
  private _input;
14
16
  private _search;
15
17
  private _groups;
16
18
  connectedCallback(): void;
17
19
  render(): lit_html.TemplateResult<1>;
20
+ static styles: lit.CSSResult[];
18
21
  }
19
22
 
20
23
  declare global {
@@ -23,38 +26,36 @@ declare global {
23
26
  }
24
27
  }
25
28
 
26
- declare class UmbModalToken<Data = unknown, Result = unknown> {
29
+ declare class UmbModalToken<ModalDataType extends object = object, ModalResultType = unknown> {
27
30
  protected alias: string;
28
31
  protected defaultConfig?: UmbModalConfig | undefined;
29
- protected _desc?: string | undefined;
32
+ protected defaultData?: ModalDataType | undefined;
30
33
  /**
31
34
  * Get the data type of the token's data.
32
35
  *
33
36
  * @public
34
- * @type {Data}
37
+ * @type {ModalDataType}
35
38
  * @memberOf UmbModalToken
36
39
  * @example `typeof MyModal.TYPE`
37
40
  * @returns undefined
38
41
  */
39
- readonly DATA: Data;
42
+ readonly DATA: ModalDataType;
40
43
  /**
41
44
  * Get the result type of the token
42
45
  *
43
46
  * @public
44
- * @type {Result}
47
+ * @type {ModalResultType}
45
48
  * @memberOf UmbModalToken
46
49
  * @example `typeof MyModal.RESULT`
47
50
  * @returns undefined
48
51
  */
49
- readonly RESULT: Result;
52
+ readonly RESULT: ModalResultType;
50
53
  /**
51
54
  * @param alias Unique identifier for the token,
52
55
  * @param defaultConfig Default configuration for the modal,
53
- * @param _desc Description for the token,
54
- * used only for debugging purposes,
55
- * it should but does not need to be unique
56
+ * @param defaultData Default data for the modal,
56
57
  */
57
- constructor(alias: string, defaultConfig?: UmbModalConfig | undefined, _desc?: string | undefined);
58
+ constructor(alias: string, defaultConfig?: UmbModalConfig | undefined, defaultData?: ModalDataType | undefined);
58
59
  /**
59
60
  * This method must always return the unique alias of the token since that
60
61
  * will be used to look up the token in the injector.
@@ -63,12 +64,13 @@ declare class UmbModalToken<Data = unknown, Result = unknown> {
63
64
  */
64
65
  toString(): string;
65
66
  getDefaultConfig(): UmbModalConfig | undefined;
67
+ getDefaultData(): ModalDataType | undefined;
66
68
  }
67
69
 
68
70
  /**
69
71
  * Type which omits the real submit method, and replaces it with a submit method which accepts an optional argument depending on the generic type.
70
72
  */
71
- type UmbModalHandler<ModalData = unknown, ModalResult = unknown> = Omit<UmbModalHandlerClass<ModalData, ModalResult>, 'submit'> & OptionalSubmitArgumentIfUndefined<ModalResult>;
73
+ type UmbModalHandler<ModalData extends object = object, ModalResult = any> = Omit<UmbModalHandlerClass<ModalData, ModalResult>, 'submit'> & OptionalSubmitArgumentIfUndefined<ModalResult>;
72
74
  type OptionalSubmitArgumentIfUndefined<T> = T extends undefined ? {
73
75
  submit: () => void;
74
76
  } : T extends unknown ? {
@@ -76,17 +78,17 @@ type OptionalSubmitArgumentIfUndefined<T> = T extends undefined ? {
76
78
  } : {
77
79
  submit: (arg: T) => void;
78
80
  };
79
- declare class UmbModalHandlerClass<ModalData, ModalResult> {
81
+ declare class UmbModalHandlerClass<ModalData extends object = object, ModalResult = unknown> {
80
82
  #private;
81
83
  private _submitPromise;
82
84
  private _submitResolver?;
83
85
  private _submitRejecter?;
84
86
  modalElement: UUIModalDialogElement | UUIModalSidebarElement;
85
- readonly innerElement: rxjs.Observable<any>;
87
+ readonly innerElement: rxjs.Observable<HTMLElement | undefined>;
86
88
  key: string;
87
89
  type: UmbModalType;
88
90
  size: UUIModalSidebarSize;
89
- constructor(host: UmbControllerHostInterface, modalAlias: string | UmbModalToken<ModalData, ModalResult>, data?: ModalData, config?: UmbModalConfig);
91
+ constructor(host: UmbControllerHostElement, modalAlias: string | UmbModalToken<ModalData, ModalResult>, data?: ModalData, config?: UmbModalConfig);
90
92
  private submit;
91
93
  reject(): void;
92
94
  onSubmit(): Promise<ModalResult>;
@@ -100,9 +102,9 @@ interface UmbModalConfig {
100
102
  }
101
103
  declare class UmbModalContext {
102
104
  #private;
103
- host: UmbControllerHostInterface;
104
- readonly modals: rxjs.Observable<UmbModalHandler<any, any>[]>;
105
- constructor(host: UmbControllerHostInterface);
105
+ host: UmbControllerHostElement;
106
+ readonly modals: rxjs.Observable<UmbModalHandler[]>;
107
+ constructor(host: UmbControllerHostElement);
106
108
  search(): UmbModalHandler<any, any>;
107
109
  /**
108
110
  * Opens a modal or sidebar modal
@@ -112,7 +114,7 @@ declare class UmbModalContext {
112
114
  * @return {*} {UmbModalHandler}
113
115
  * @memberof UmbModalContext
114
116
  */
115
- open<ModalData = unknown, ModalResult = unknown>(modalAlias: string | UmbModalToken<ModalData, ModalResult>, data?: ModalData, config?: UmbModalConfig): UmbModalHandler<ModalData, ModalResult>;
117
+ open<ModalData extends object = object, ModalResult = unknown>(modalAlias: string | UmbModalToken<ModalData, ModalResult>, data?: ModalData, config?: UmbModalConfig): UmbModalHandler<ModalData, ModalResult>;
116
118
  /**
117
119
  * Closes a modal or sidebar modal
118
120
  * @private
@@ -123,13 +125,296 @@ declare class UmbModalContext {
123
125
  }
124
126
  declare const UMB_MODAL_CONTEXT_TOKEN: UmbContextToken<UmbModalContext>;
125
127
 
126
- interface UmbPickerModalData<T> {
127
- multiple: boolean;
128
- selection: Array<string>;
129
- filter?: (language: T) => boolean;
128
+ type UmbModalRouteBuilder = (params: {
129
+ [key: string]: string | number;
130
+ }) => string;
131
+ declare class UmbModalRouteRegistration<UmbModalTokenData extends object = object, UmbModalTokenResult = any> {
132
+ #private;
133
+ constructor(modalAlias: UmbModalToken<UmbModalTokenData, UmbModalTokenResult> | string, path: string, modalConfig?: UmbModalConfig);
134
+ get key(): string;
135
+ get alias(): string | UmbModalToken<UmbModalTokenData, UmbModalTokenResult>;
136
+ get path(): string;
137
+ protected _setPath(path: string): void;
138
+ get modalConfig(): UmbModalConfig | undefined;
139
+ /**
140
+ * Returns true if the modal is currently active.
141
+ */
142
+ get active(): boolean;
143
+ open(params: {
144
+ [key: string]: string | number;
145
+ }): void;
146
+ /**
147
+ * Returns the modal handler if the modal is currently active. Otherwise its undefined.
148
+ */
149
+ get modalHandler(): UmbModalHandler<UmbModalTokenData, UmbModalTokenResult> | undefined;
150
+ observeRouteBuilder(callback: (urlBuilder: UmbModalRouteBuilder) => void): this;
151
+ _internal_setRouteBuilder(urlBuilder: UmbModalRouteBuilder): void;
152
+ onSetup(callback: (routingInfo: Params) => UmbModalTokenData | false): this;
153
+ onSubmit(callback: (data: UmbModalTokenResult) => void): this;
154
+ onReject(callback: () => void): this;
155
+ routeSetup(modalContext: UmbModalContext, params: Params): UmbModalHandler<UmbModalTokenData, UmbModalTokenResult> | null;
156
+ }
157
+
158
+ declare class UmbModalRouteRegistrationController<D extends object = object, R = any> extends UmbModalRouteRegistration<D, R> implements UmbControllerInterface {
159
+ #private;
160
+ get unique(): undefined;
161
+ constructor(host: UmbControllerHostElement, alias: UmbModalToken$1<D, R> | string, path: string, uniqueParts?: Map<string, string | undefined> | null, modalConfig?: UmbModalConfig$1);
162
+ setUniqueIdentifier(identifier: string, value: string | undefined): void;
163
+ private _registererModal;
164
+ hostConnected(): void;
165
+ hostDisconnected(): void;
166
+ destroy(): void;
167
+ }
168
+
169
+ interface UmbAllowedDocumentTypesModalData {
170
+ id: string | null;
171
+ }
172
+ interface UmbAllowedDocumentTypesModalResult {
173
+ documentTypeKey: string;
174
+ }
175
+ declare const UMB_ALLOWED_DOCUMENT_TYPES_MODAL: UmbModalToken$1<UmbAllowedDocumentTypesModalData, UmbAllowedDocumentTypesModalResult>;
176
+
177
+ interface UmbChangePasswordModalData {
178
+ requireOldPassword: boolean;
179
+ }
180
+ declare const UMB_CHANGE_PASSWORD_MODAL: UmbModalToken$1<UmbChangePasswordModalData, unknown>;
181
+
182
+ interface UmbConfirmModalData {
183
+ headline: string;
184
+ content: TemplateResult | string;
185
+ color?: 'positive' | 'danger';
186
+ confirmLabel?: string;
187
+ }
188
+ type UmbConfirmModalResult = undefined;
189
+ declare const UMB_CONFIRM_MODAL: UmbModalToken$1<UmbConfirmModalData, undefined>;
190
+
191
+ interface UmbCreateDictionaryModalData {
192
+ unique: string | null;
193
+ parentName?: Observable<string | undefined>;
130
194
  }
131
- interface UmbPickerModalResult<T> {
195
+ interface UmbCreateDictionaryModalResult {
196
+ name?: string;
197
+ }
198
+ declare const UMB_CREATE_DICTIONARY_MODAL: UmbModalToken$1<UmbCreateDictionaryModalData, UmbCreateDictionaryModalResult>;
199
+
200
+ declare const UMB_CREATE_USER_MODAL: UmbModalToken$1<object, unknown>;
201
+
202
+ declare const UMB_CURRENT_USER_MODAL: UmbModalToken$1<object, unknown>;
203
+
204
+ interface UmbContextDebuggerModalData {
205
+ content: TemplateResult | string;
206
+ }
207
+ declare const UMB_CONTEXT_DEBUGGER_MODAL: UmbModalToken$1<UmbContextDebuggerModalData, unknown>;
208
+
209
+ type UmbDocumentPickerModalData = UmbTreePickerModalData$1<DocumentTreeItemResponseModel>;
210
+ type UmbDocumentPickerModalResult = UmbPickerModalResult$1;
211
+ declare const UMB_DOCUMENT_PICKER_MODAL: UmbModalToken$1<UmbDocumentPickerModalData, UmbPickerModalResult$1>;
212
+
213
+ type UmbDocumentTypePickerModalData = UmbTreePickerModalData$1<EntityTreeItemResponseModel>;
214
+ type UmbDocumentTypePickerModalResult = UmbPickerModalResult$1;
215
+ declare const UMB_DOCUMENT_TYPE_PICKER_MODAL: UmbModalToken$1<UmbDocumentTypePickerModalData, UmbPickerModalResult$1>;
216
+
217
+ declare enum OEmbedStatus {
218
+ NotSupported = 0,
219
+ Error = 1,
220
+ Success = 2
221
+ }
222
+ interface UmbEmbeddedMediaDimensions {
223
+ width?: number;
224
+ height?: number;
225
+ constrain?: boolean;
226
+ }
227
+ interface UmbEmbeddedMediaModalData extends UmbEmbeddedMediaDimensions {
228
+ url?: string;
229
+ }
230
+ interface OEmbedResult extends UmbEmbeddedMediaDimensions {
231
+ oEmbedStatus: OEmbedStatus;
232
+ supportsDimensions: boolean;
233
+ markup?: string;
234
+ }
235
+ type UmbEmbeddedMediaModalResult = {
236
+ selection: OEmbedResult;
237
+ };
238
+ declare const UMB_EMBEDDED_MEDIA_MODAL: UmbModalToken$1<UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult>;
239
+
240
+ type UmbExamineFieldsSettingsModalData = Array<{
241
+ name: string;
242
+ exposed: boolean;
243
+ }>;
244
+ interface UmbCreateDocumentModalResultData {
245
+ fields?: UmbExamineFieldsSettingsModalData;
246
+ }
247
+ declare const UMB_EXAMINE_FIELDS_SETTINGS_MODAL: UmbModalToken$1<UmbExamineFieldsSettingsModalData, UmbCreateDocumentModalResultData>;
248
+
249
+ interface UmbExportDictionaryModalData {
250
+ unique: string | null;
251
+ }
252
+ interface UmbExportDictionaryModalResult {
253
+ includeChildren?: boolean;
254
+ }
255
+ declare const UMB_EXPORT_DICTIONARY_MODAL: UmbModalToken$1<UmbExportDictionaryModalData, UmbExportDictionaryModalResult>;
256
+
257
+ interface UmbIconPickerModalData {
258
+ color: string | undefined;
259
+ icon: string | undefined;
260
+ }
261
+ interface UmbIconPickerModalResult {
262
+ color: string | undefined;
263
+ icon: string | undefined;
264
+ }
265
+ declare const UMB_ICON_PICKER_MODAL: UmbModalToken$1<UmbIconPickerModalData, UmbIconPickerModalResult>;
266
+
267
+ interface UmbImportDictionaryModalData {
268
+ unique: string | null;
269
+ }
270
+ interface UmbImportDictionaryModalResult {
271
+ temporaryFileId?: string;
272
+ parentId?: string;
273
+ }
274
+ declare const UMB_IMPORT_DICTIONARY_MODAL: UmbModalToken$1<UmbImportDictionaryModalData, UmbImportDictionaryModalResult>;
275
+
276
+ declare const UMB_INVITE_USER_MODAL: UmbModalToken$1<object, unknown>;
277
+
278
+ interface UmbLanguagePickerModalData {
279
+ multiple?: boolean;
280
+ selection?: Array<string | null>;
281
+ filter?: (language: LanguageResponseModel) => boolean;
282
+ }
283
+ interface UmbLanguagePickerModalResult {
284
+ selection: Array<string | null>;
285
+ }
286
+ declare const UMB_LANGUAGE_PICKER_MODAL: UmbModalToken$1<UmbLanguagePickerModalData, UmbLanguagePickerModalResult>;
287
+
288
+ interface UmbLinkPickerModalData {
289
+ index: number | null;
290
+ link: UmbLinkPickerLink;
291
+ config: UmbLinkPickerConfig;
292
+ }
293
+ type UmbLinkPickerModalResult = {
294
+ index: number | null;
295
+ link: UmbLinkPickerLink;
296
+ };
297
+ interface UmbLinkPickerLink {
298
+ icon?: string | null;
299
+ name?: string | null;
300
+ published?: boolean | null;
301
+ queryString?: string | null;
302
+ target?: string | null;
303
+ trashed?: boolean | null;
304
+ udi?: string | null;
305
+ url?: string | null;
306
+ }
307
+ interface UmbLinkPickerConfig {
308
+ hideAnchor?: boolean;
309
+ ignoreUserStartNodes?: boolean;
310
+ overlaySize?: UUIModalSidebarSize;
311
+ }
312
+ declare const UMB_LINK_PICKER_MODAL: UmbModalToken$1<UmbLinkPickerModalData, UmbLinkPickerModalResult>;
313
+
314
+ type UmbMediaTreePickerModalData = UmbTreePickerModalData$1<ContentTreeItemResponseModel>;
315
+ type UmbMediaTreePickerModalResult = UmbPickerModalResult$1;
316
+ declare const UMB_MEDIA_TREE_PICKER_MODAL: UmbModalToken$1<UmbMediaTreePickerModalData, UmbPickerModalResult$1>;
317
+
318
+ interface UmbPropertyEditorUIPickerModalData {
319
+ selection?: Array<string>;
320
+ submitLabel?: string;
321
+ }
322
+ type UmbPropertyEditorUIPickerModalResult = {
132
323
  selection: Array<string>;
324
+ };
325
+ declare const UMB_PROPERTY_EDITOR_UI_PICKER_MODAL: UmbModalToken$1<UmbPropertyEditorUIPickerModalData, UmbPropertyEditorUIPickerModalResult>;
326
+
327
+ interface UmbPropertySettingsModalResult {
328
+ label: string;
329
+ alias: string;
330
+ description: string;
331
+ propertyEditorUI?: string;
332
+ labelOnTop: boolean;
333
+ validation: {
334
+ mandatory: boolean;
335
+ mandatoryMessage: string;
336
+ pattern: string;
337
+ patternMessage: string;
338
+ };
339
+ }
340
+ declare const UMB_PROPERTY_SETTINGS_MODAL: UmbModalToken$1<object, UmbPropertySettingsModalResult>;
341
+
342
+ declare const UMB_SEARCH_MODAL: UmbModalToken$1<object, unknown>;
343
+
344
+ interface UmbSectionPickerModalData {
345
+ multiple: boolean;
346
+ selection: Array<string | null>;
347
+ }
348
+ interface UmbSectionPickerModalResult {
349
+ selection: Array<string | null>;
350
+ }
351
+ declare const UMB_SECTION_PICKER_MODAL: UmbModalToken$1<UmbSectionPickerModalData, UmbSectionPickerModalResult>;
352
+
353
+ interface UmbTemplateModalData {
354
+ id: string;
355
+ language?: 'razor' | 'typescript' | 'javascript' | 'css' | 'markdown' | 'json' | 'html';
356
+ }
357
+ interface UmbTemplateModalResult {
358
+ id: string;
359
+ }
360
+ declare const UMB_TEMPLATE_MODAL: UmbModalToken$1<UmbTemplateModalData, UmbTemplateModalResult>;
361
+
362
+ type UmbTemplatePickerModalData = UmbTreePickerModalData$1<EntityTreeItemResponseModel>;
363
+ type UmbTemplatePickerModalResult = UmbPickerModalResult$1;
364
+ declare const UMB_TEMPLATE_PICKER_MODAL: UmbModalToken$1<UmbTemplatePickerModalData, UmbPickerModalResult$1>;
365
+
366
+ declare const UMB_USER_GROUP_PICKER_MODAL: UmbModalToken$1<UmbPickerModalData$1<any>, unknown>;
367
+
368
+ type UmbUserPickerModalData = UmbPickerModalData$1<UserResponseModel>;
369
+ interface UmbUserPickerModalResult {
370
+ selection: Array<string | null>;
371
+ }
372
+ declare const UMB_USER_PICKER_MODAL: UmbModalToken$1<UmbUserPickerModalData, UmbUserPickerModalResult>;
373
+
374
+ interface UmbFolderModalData {
375
+ repositoryAlias: string;
376
+ unique?: string;
377
+ }
378
+ interface UmbFolderModalResult {
379
+ folder: FolderReponseModel;
380
+ }
381
+ declare const UMB_FOLDER_MODAL: UmbModalToken$1<UmbFolderModalData, UmbFolderModalResult>;
382
+
383
+ interface UmbPartialViewPickerModalData {
384
+ multiple: boolean;
385
+ selection: string[];
386
+ }
387
+ interface UmbPartialViewPickerModalResult {
388
+ selection: Array<string | null> | undefined;
389
+ }
390
+ declare const UMB_PARTIAL_VIEW_PICKER_MODAL_ALIAS = "Umb.Modal.PartialViewPicker";
391
+ declare const UMB_PARTIAL_VIEW_PICKER_MODAL: UmbModalToken$1<UmbPartialViewPickerModalData, UmbPartialViewPickerModalResult>;
392
+
393
+ interface UmbDictionaryItemPickerModalData {
394
+ multiple: boolean;
395
+ selection: string[];
396
+ }
397
+ interface UmbDictionaryItemPickerModalResult {
398
+ selection: Array<string | null>;
399
+ }
400
+ declare const UMB_DICTIONARY_ITEM_PICKER_MODAL_ALIAS = "Umb.Modal.DictionaryItemPicker";
401
+ declare const UMB_DICTIONARY_ITEM_PICKER_MODAL: UmbModalToken$1<UmbDictionaryItemPickerModalData, UmbDictionaryItemPickerModalResult>;
402
+
403
+ type UmbDataTypePickerModalData = UmbTreePickerModalData$1<FolderTreeItemResponseModel>;
404
+ type UmbDataTypePickerModalResult = UmbPickerModalResult$1;
405
+ declare const UMB_DATA_TYPE_PICKER_MODAL: UmbModalToken$1<UmbDataTypePickerModalData, UmbPickerModalResult$1>;
406
+
407
+ interface UmbPickerModalData<ItemType> {
408
+ multiple?: boolean;
409
+ selection?: Array<string | null>;
410
+ filter?: (item: ItemType) => boolean;
411
+ pickableFilter?: (item: ItemType) => boolean;
412
+ }
413
+ interface UmbPickerModalResult {
414
+ selection: Array<string | null>;
415
+ }
416
+ interface UmbTreePickerModalData<TreeItemType> extends UmbPickerModalData<TreeItemType> {
417
+ treeAlias?: string;
133
418
  }
134
419
 
135
- export { UMB_MODAL_CONTEXT_TOKEN, UmbModalConfig, UmbModalContext, UmbModalHandler, UmbModalHandlerClass, UmbModalToken, UmbModalType, UmbPickerModalData, UmbPickerModalResult };
420
+ 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_DATA_TYPE_PICKER_MODAL, UMB_DICTIONARY_ITEM_PICKER_MODAL, UMB_DICTIONARY_ITEM_PICKER_MODAL_ALIAS, 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_TREE_PICKER_MODAL, UMB_MODAL_CONTEXT_TOKEN, UMB_PARTIAL_VIEW_PICKER_MODAL, UMB_PARTIAL_VIEW_PICKER_MODAL_ALIAS, 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, UmbDataTypePickerModalData, UmbDataTypePickerModalResult, UmbDictionaryItemPickerModalData, UmbDictionaryItemPickerModalResult, UmbDocumentPickerModalData, UmbDocumentPickerModalResult, UmbDocumentTypePickerModalData, UmbDocumentTypePickerModalResult, UmbEmbeddedMediaModalData, UmbEmbeddedMediaModalResult, UmbExamineFieldsSettingsModalData, UmbExportDictionaryModalData, UmbExportDictionaryModalResult, UmbFolderModalData, UmbFolderModalResult, UmbIconPickerModalData, UmbIconPickerModalResult, UmbImportDictionaryModalData, UmbImportDictionaryModalResult, UmbLanguagePickerModalData, UmbLanguagePickerModalResult, UmbLinkPickerConfig, UmbLinkPickerLink, UmbLinkPickerModalData, UmbLinkPickerModalResult, UmbMediaTreePickerModalData, UmbMediaTreePickerModalResult, UmbModalConfig, UmbModalContext, UmbModalHandler, UmbModalHandlerClass, UmbModalRouteBuilder, UmbModalRouteRegistration, UmbModalRouteRegistrationController, UmbModalToken, UmbModalType, UmbPartialViewPickerModalData, UmbPartialViewPickerModalResult, UmbPickerModalData, UmbPickerModalResult, UmbPropertyEditorUIPickerModalData, UmbPropertyEditorUIPickerModalResult, UmbPropertySettingsModalResult, UmbSectionPickerModalData, UmbSectionPickerModalResult, UmbTemplateModalData, UmbTemplateModalResult, UmbTemplatePickerModalData, UmbTemplatePickerModalResult, UmbTreePickerModalData, UmbUserPickerModalData, UmbUserPickerModalResult };
package/models.d.ts CHANGED
@@ -1,75 +1,13 @@
1
- import { EntityTreeItemResponseModel, FolderTreeItemResponseModel, PackageManifestResponseModel } from './backend-api';
2
-
3
1
  type HTMLElementConstructor<T = HTMLElement> = new (...args: any[]) => T;
4
2
  type ClassConstructor<T> = new (...args: any[]) => T;
5
- interface Entity {
6
- key: string;
7
- name: string;
8
- icon: string;
9
- type: string;
10
- hasChildren: boolean;
11
- parentKey: string | null;
12
- }
13
- interface UserEntity extends Entity {
14
- type: 'user';
15
- }
16
- type UserStatus = 'enabled' | 'inactive' | 'invited' | 'disabled';
17
- interface UserDetails extends UserEntity {
18
- email: string;
19
- status: UserStatus;
20
- language: string;
21
- lastLoginDate?: string;
22
- lastLockoutDate?: string;
23
- lastPasswordChangeDate?: string;
24
- updateDate: string;
25
- createDate: string;
26
- failedLoginAttempts: number;
27
- userGroups: Array<string>;
28
- contentStartNodes: Array<string>;
29
- mediaStartNodes: Array<string>;
30
- }
31
- interface UserGroupEntity extends Entity {
32
- type: 'user-group';
33
- }
34
- interface UserGroupDetails extends UserGroupEntity {
35
- sections: Array<string>;
36
- contentStartNode?: string;
37
- mediaStartNode?: string;
38
- permissions: Array<string>;
39
- }
40
- interface MemberTypeDetails extends EntityTreeItemResponseModel {
41
- key: string;
42
- alias: string;
43
- properties: [];
44
- }
45
- interface MediaTypeDetails extends FolderTreeItemResponseModel {
46
- key: string;
47
- alias: string;
48
- properties: [];
49
- }
50
- interface MemberGroupDetails extends EntityTreeItemResponseModel {
51
- key: string;
52
- }
53
- interface MemberDetails extends EntityTreeItemResponseModel {
54
- key: string;
55
- }
56
- interface DocumentBlueprintDetails {
57
- key: string;
58
- name: string;
59
- type: 'document-blueprint';
60
- properties: Array<any>;
61
- data: Array<any>;
62
- icon: string;
63
- documentTypeKey: string;
64
- }
65
- interface SwatchDetails {
3
+ /** Tried to find a common base of our entities — used by Entity Workspace Context */
4
+ type UmbEntityBase = {
5
+ id?: string;
6
+ name?: string;
7
+ };
8
+ interface UmbSwatchDetails {
66
9
  label: string;
67
10
  value: string;
68
11
  }
69
- type UmbPackage = PackageManifestResponseModel;
70
- type PackageManifestResponse = UmbPackage[];
71
- type UmbPackageWithMigrationStatus = UmbPackage & {
72
- hasPendingMigrations: boolean;
73
- };
74
12
 
75
- export { ClassConstructor, DocumentBlueprintDetails, Entity, HTMLElementConstructor, MediaTypeDetails, MemberDetails, MemberGroupDetails, MemberTypeDetails, PackageManifestResponse, SwatchDetails, UmbPackage, UmbPackageWithMigrationStatus, UserDetails, UserEntity, UserGroupDetails, UserGroupEntity, UserStatus };
13
+ export { ClassConstructor, HTMLElementConstructor, UmbEntityBase, UmbSwatchDetails };
package/notification.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as rxjs from 'rxjs';
2
- import { UmbContextToken } from './context-api';
2
+ import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
3
3
 
4
4
  /**
5
5
  * @export