@pilotdev/pilot-web-sdk 24.41.0 → 24.43.0

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 (89) hide show
  1. package/esm2022/lib/contexts/context.mjs +32 -0
  2. package/esm2022/lib/contexts/document-annotations-list-context.mjs +16 -0
  3. package/esm2022/lib/contexts/render-context.mjs +24 -0
  4. package/esm2022/lib/data/expected-error.mjs +9 -0
  5. package/esm2022/lib/injectable/injection-source.mjs +45 -0
  6. package/esm2022/lib/personal-settings/system-settings-keys.mjs +75 -0
  7. package/esm2022/lib/tools/attribute-permission.info.mjs +43 -0
  8. package/esm2022/lib/tools/guid.mjs +53 -0
  9. package/{fesm2020 → fesm2022}/pilotdev-pilot-web-sdk.mjs +93 -76
  10. package/{fesm2015 → fesm2022}/pilotdev-pilot-web-sdk.mjs.map +1 -1
  11. package/package.json +7 -13
  12. package/esm2020/lib/contexts/context.mjs +0 -29
  13. package/esm2020/lib/contexts/document-annotations-list-context.mjs +0 -15
  14. package/esm2020/lib/contexts/render-context.mjs +0 -22
  15. package/esm2020/lib/data/expected-error.mjs +0 -8
  16. package/esm2020/lib/injectable/injection-source.mjs +0 -37
  17. package/esm2020/lib/personal-settings/system-settings-keys.mjs +0 -75
  18. package/esm2020/lib/tools/attribute-permission.info.mjs +0 -41
  19. package/esm2020/lib/tools/guid.mjs +0 -53
  20. package/fesm2015/pilotdev-pilot-web-sdk.mjs +0 -1031
  21. package/fesm2020/pilotdev-pilot-web-sdk.mjs.map +0 -1
  22. /package/{esm2020 → esm2022}/lib/base/disposable.mjs +0 -0
  23. /package/{esm2020 → esm2022}/lib/base/index.mjs +0 -0
  24. /package/{esm2020 → esm2022}/lib/base/initializable.mjs +0 -0
  25. /package/{esm2020 → esm2022}/lib/commands/command-builder.mjs +0 -0
  26. /package/{esm2020 → esm2022}/lib/commands/index.mjs +0 -0
  27. /package/{esm2020 → esm2022}/lib/contexts/index.mjs +0 -0
  28. /package/{esm2020 → esm2022}/lib/contexts/page-context.mjs +0 -0
  29. /package/{esm2020 → esm2022}/lib/data/access.mjs +0 -0
  30. /package/{esm2020 → esm2022}/lib/data/annotations.mjs +0 -0
  31. /package/{esm2020 → esm2022}/lib/data/attribute.mjs +0 -0
  32. /package/{esm2020 → esm2022}/lib/data/certificate.mjs +0 -0
  33. /package/{esm2020 → esm2022}/lib/data/data-object.mjs +0 -0
  34. /package/{esm2020 → esm2022}/lib/data/file.mjs +0 -0
  35. /package/{esm2020 → esm2022}/lib/data/files-snapshot.mjs +0 -0
  36. /package/{esm2020 → esm2022}/lib/data/index.mjs +0 -0
  37. /package/{esm2020 → esm2022}/lib/data/organisation-unit.mjs +0 -0
  38. /package/{esm2020 → esm2022}/lib/data/person.mjs +0 -0
  39. /package/{esm2020 → esm2022}/lib/data/relation.mjs +0 -0
  40. /package/{esm2020 → esm2022}/lib/data/signature-type.mjs +0 -0
  41. /package/{esm2020 → esm2022}/lib/data/signature-verification-result.mjs +0 -0
  42. /package/{esm2020 → esm2022}/lib/data/signature-verification-status.mjs +0 -0
  43. /package/{esm2020 → esm2022}/lib/data/subscription-type.mjs +0 -0
  44. /package/{esm2020 → esm2022}/lib/data/theme.mjs +0 -0
  45. /package/{esm2020 → esm2022}/lib/icrypto-provider.mjs +0 -0
  46. /package/{esm2020 → esm2022}/lib/idata.plugin.mjs +0 -0
  47. /package/{esm2020 → esm2022}/lib/injectable/command-builder-provider.mjs +0 -0
  48. /package/{esm2020 → esm2022}/lib/injectable/index.mjs +0 -0
  49. /package/{esm2020 → esm2022}/lib/injectable/ipersonal-settings.mjs +0 -0
  50. /package/{esm2020 → esm2022}/lib/injectable/modifier-provider.mjs +0 -0
  51. /package/{esm2020 → esm2022}/lib/injectable/objects-repository.mjs +0 -0
  52. /package/{esm2020 → esm2022}/lib/injectable/progress-service.mjs +0 -0
  53. /package/{esm2020 → esm2022}/lib/injectable/render-context-provider.mjs +0 -0
  54. /package/{esm2020 → esm2022}/lib/injectable/repository-events.mjs +0 -0
  55. /package/{esm2020 → esm2022}/lib/injectable/theme-service.mjs +0 -0
  56. /package/{esm2020 → esm2022}/lib/menu/checkable-menu.builder.mjs +0 -0
  57. /package/{esm2020 → esm2022}/lib/menu/index.mjs +0 -0
  58. /package/{esm2020 → esm2022}/lib/menu/menu-item.builder.mjs +0 -0
  59. /package/{esm2020 → esm2022}/lib/menu/menu.builder.mjs +0 -0
  60. /package/{esm2020 → esm2022}/lib/menu/menu.mjs +0 -0
  61. /package/{esm2020 → esm2022}/lib/modifier/index.mjs +0 -0
  62. /package/{esm2020 → esm2022}/lib/modifier/modifier.mjs +0 -0
  63. /package/{esm2020 → esm2022}/lib/modifier/object-builder.mjs +0 -0
  64. /package/{esm2020 → esm2022}/lib/modifier/signature-modifier.mjs +0 -0
  65. /package/{esm2020 → esm2022}/lib/openspace/index.mjs +0 -0
  66. /package/{esm2020 → esm2022}/lib/openspace/openspace-view.mjs +0 -0
  67. /package/{esm2020 → esm2022}/lib/page-navigation/index.mjs +0 -0
  68. /package/{esm2020 → esm2022}/lib/page-navigation/page-navigation-section-element.builder.mjs +0 -0
  69. /package/{esm2020 → esm2022}/lib/page-navigation/page-navigation-section.builder.mjs +0 -0
  70. /package/{esm2020 → esm2022}/lib/page-navigation/page-navigation.builder.mjs +0 -0
  71. /package/{esm2020 → esm2022}/lib/page-navigation/page-navigation.mjs +0 -0
  72. /package/{esm2020 → esm2022}/lib/personal-settings/index.mjs +0 -0
  73. /package/{esm2020 → esm2022}/lib/personal-settings/isettings-feature.mjs +0 -0
  74. /package/{esm2020 → esm2022}/lib/personal-settings/isettings-value-provider.mjs +0 -0
  75. /package/{esm2020 → esm2022}/lib/tabs/index.mjs +0 -0
  76. /package/{esm2020 → esm2022}/lib/tabs/tab-item.builder.mjs +0 -0
  77. /package/{esm2020 → esm2022}/lib/tabs/tabs.builder.mjs +0 -0
  78. /package/{esm2020 → esm2022}/lib/tabs/tabs.mjs +0 -0
  79. /package/{esm2020 → esm2022}/lib/toolbar/index.mjs +0 -0
  80. /package/{esm2020 → esm2022}/lib/toolbar/toolbar-item-submenu.handler.mjs +0 -0
  81. /package/{esm2020 → esm2022}/lib/toolbar/toolbar-item.builder.mjs +0 -0
  82. /package/{esm2020 → esm2022}/lib/toolbar/toolbar-menu-item.builder.mjs +0 -0
  83. /package/{esm2020 → esm2022}/lib/toolbar/toolbar-toggle-item.builder.mjs +0 -0
  84. /package/{esm2020 → esm2022}/lib/toolbar/toolbar.builder.mjs +0 -0
  85. /package/{esm2020 → esm2022}/lib/toolbar/toolbar.mjs +0 -0
  86. /package/{esm2020 → esm2022}/lib/tools/index.mjs +0 -0
  87. /package/{esm2020 → esm2022}/lib/tools/utils.mjs +0 -0
  88. /package/{esm2020 → esm2022}/pilotdev-pilot-web-sdk.mjs +0 -0
  89. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,1031 +0,0 @@
1
- class IDisposable {
2
- constructor() {
3
- if (this.constructor == IDisposable) {
4
- throw new Error("Abstract classes can't be instantiated.");
5
- }
6
- }
7
- /**
8
- * The method is called just before class is disposed
9
- */
10
- dispose() {
11
- throw new Error("Method 'dispose()' must be implemented.");
12
- }
13
- }
14
-
15
- class IInitializable {
16
- constructor() {
17
- if (this.constructor == IInitializable) {
18
- throw new Error("Abstract classes can't be instantiated.");
19
- }
20
- }
21
- /**
22
- * The method is called after field injection is complete.
23
- */
24
- initialize(injectionSource) {
25
- throw new Error("Method 'initialize(injectionSource: InjectionSource)' must be implemented.");
26
- }
27
- }
28
-
29
- class InjectionSource {
30
- constructor(_modifierProvider, _objectsRepository, _renderContextProvider, _repositoryEvents, _progressService, _themeService, _commandBuilderProvider, _personalSettings) {
31
- this._modifierProvider = _modifierProvider;
32
- this._objectsRepository = _objectsRepository;
33
- this._renderContextProvider = _renderContextProvider;
34
- this._repositoryEvents = _repositoryEvents;
35
- this._progressService = _progressService;
36
- this._themeService = _themeService;
37
- this._commandBuilderProvider = _commandBuilderProvider;
38
- this._personalSettings = _personalSettings;
39
- }
40
- get modifierProvider() {
41
- return this._modifierProvider;
42
- }
43
- get objectsRepository() {
44
- return this._objectsRepository;
45
- }
46
- get renderContextProvider() {
47
- return this._renderContextProvider;
48
- }
49
- get repositoryEvents() {
50
- return this._repositoryEvents;
51
- }
52
- get progressService() {
53
- return this._progressService;
54
- }
55
- get themeService() {
56
- return this._themeService;
57
- }
58
- get personalSettings() {
59
- return this._personalSettings;
60
- }
61
- get commandBuilderProvider() {
62
- return this._commandBuilderProvider;
63
- }
64
- }
65
-
66
- var ProgressBarMode;
67
- (function (ProgressBarMode) {
68
- ProgressBarMode[ProgressBarMode["Determinate"] = 0] = "Determinate";
69
- ProgressBarMode[ProgressBarMode["Indeterminate"] = 1] = "Indeterminate";
70
- ProgressBarMode[ProgressBarMode["Buffer"] = 2] = "Buffer";
71
- ProgressBarMode[ProgressBarMode["Query"] = 3] = "Query";
72
- })(ProgressBarMode || (ProgressBarMode = {}));
73
-
74
- /**
75
- * Interface that allows to add new items to the toolbar
76
- */
77
- class IToolbar {
78
- constructor() {
79
- if (this.constructor == (IToolbar)) {
80
- throw new Error("Abstract classes can't be instantiated.");
81
- }
82
- }
83
- /**
84
- * The method is called just before the toolbar is created
85
- * @param builder - the toolbar builder object of associated toolbar
86
- * @param context - context
87
- */
88
- build(builder, context) {
89
- throw new Error("Method 'build(builder: IToolbarBuilder, context: TToolbarContext)' must be implemented.");
90
- }
91
- /**
92
- *
93
- * @param name
94
- * @param context
95
- */
96
- onToolbarItemClick(name, context) {
97
- throw new Error("Method 'onToolbarItemClick(name: string, context: TToolbarContext)' must be implemented.");
98
- }
99
- }
100
-
101
- /**
102
- * Represents a toolbar button and enables to set parametres to it
103
- */
104
- class IToolbarButtonItemBuilder {
105
- constructor() {
106
- if (this.constructor == IToolbarButtonItemBuilder) {
107
- throw new Error("Abstract classes can't be instantiated.");
108
- }
109
- }
110
- /**
111
- * Item's name to be displayed
112
- * @param header - value
113
- * @returns instance of IToolbarButtonItemBuilder
114
- */
115
- withHeader(header) {
116
- throw new Error("Method 'withHeader(header: string)' must be implemented.");
117
- }
118
- /**
119
- * Item's icon in SVG format
120
- * @param name - icon name
121
- * @param svg - url icon or base64 string
122
- */
123
- withIcon(name, svg) {
124
- throw new Error("Method 'withIcon(name: string, svg: string)' must be implemented.");
125
- }
126
- /**
127
- * Enabled the item
128
- * @param value - value
129
- */
130
- withIsEnabled(value) {
131
- throw new Error("Method 'withIsEnabled(value: boolean)' must be implemented.");
132
- }
133
- /**
134
- * Item's hint
135
- * @param hint - value
136
- */
137
- withHint(hint) {
138
- throw new Error("Method 'withHint(hint: string)' must be implemented.");
139
- }
140
- }
141
-
142
- class IToolbarItemSubmenuHandler {
143
- /**
144
- * Build a submenu
145
- * @param builder - toolbar builder
146
- * @returns
147
- */
148
- onSubmenuRequested(builder) {
149
- throw new Error("Method 'onSubmenuRequested(builder: IToolbarBuilder)' must be implemented.");
150
- }
151
- }
152
-
153
- /**
154
- * Represents a toolbar menu button and enables to set parametres to it
155
- */
156
- class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {
157
- /**
158
- * Build a dropdown menu
159
- * @param itemSubmenuHandler - toolbar submenu handler
160
- * @returns The toolbar button menu builder
161
- */
162
- withMenu(itemSubmenuHandler) {
163
- throw new Error("Method 'withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.");
164
- }
165
- }
166
-
167
- /**
168
- * Represents a toolbar toggle button and enables to set parametres to it
169
- */
170
- class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {
171
- /**
172
- *
173
- * @param value
174
- */
175
- withIsChecked(value) {
176
- throw new Error("Method 'withIsChecked(value: boolean)' must be implemented.");
177
- }
178
- }
179
-
180
- class IToolbarBuilder {
181
- constructor() {
182
- if (this.constructor == IToolbarBuilder) {
183
- throw new Error("Abstract classes can't be instantiated.");
184
- }
185
- }
186
- /**
187
- * Adds a new separator to the associated toolbar
188
- * @param index - The index to put the new item at
189
- */
190
- addSeparator(index) {
191
- throw new Error("Method 'addSeparator(index: number)' must be implemented.");
192
- }
193
- /**
194
- * Adds a new button to the associated toolbar
195
- * @param name - Internal item's name
196
- * @param index - The index to put the new item at
197
- */
198
- addButtonItem(name, index) {
199
- throw new Error("Method 'addButtonItem(name: string, index: number)' must be implemented.");
200
- }
201
- /**
202
- * Adds a new menu button to the associated toolbar
203
- * @param name - Internal item's name
204
- * @param index - The index to put the new item at
205
- */
206
- addMenuButtonItem(name, index) {
207
- throw new Error("Method 'addMenuButtonItem(name: string, index: number)' must be implemented.");
208
- }
209
- /**
210
- * Adds a new toggle button to the associated toolbar
211
- * @param name - Internal item's name
212
- * @param index - The index to put the new item at
213
- */
214
- addToggleButtonItem(name, index) {
215
- throw new Error("Method 'addToggleButtonItem(name: string, index: number)' must be implemented.");
216
- }
217
- /**
218
- * Replaces the item from the associated toolbar on button
219
- * @param name - The name of toolbar button to replace
220
- */
221
- replaceButtonItem(name) {
222
- throw new Error("Method 'replaceButtonItem(name: string)' must be implemented.");
223
- }
224
- /**
225
- * Replace the item from the associated toolbar on menu button
226
- * @param name - The name of toolbar menu button to replace
227
- */
228
- replaceMenuButtonItem(name) {
229
- throw new Error("Method 'replaceMenuButtonItem(name: string)' must be implemented.");
230
- }
231
- /**
232
- * Enables to set parametres to menu button item submenu
233
- * @param name - Item's internal name
234
- * @param itemSubmenuHandler - The toolbar button menu builder
235
- */
236
- handleMenuButtonItemSubmenu(name, itemSubmenuHandler) {
237
- throw new Error("Method 'handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.");
238
- }
239
- /**
240
- * Replaces the item from the associated toolbar on toggle button
241
- * @param name - The name of toolbar toggle button to replace
242
- */
243
- replaceToggleButtonItem(name) {
244
- throw new Error("Method 'replaceToggleButtonItem(name: string)' must be implemented.");
245
- }
246
- /**
247
- * Gets the list of existing item names of associated toolbar
248
- * @returns - Existing toolbar item names
249
- */
250
- get itemNames() {
251
- throw new Error("Getter 'itemNames()' must be implemented.");
252
- }
253
- /**
254
- * Gets count of toolbar items
255
- */
256
- get count() {
257
- throw new Error("Getter 'count()' must be implemented.");
258
- }
259
- /**
260
- * Removes specified item
261
- * @param itemName - Item's internal name
262
- */
263
- removeItem(itemName) {
264
- throw new Error("Method 'removeItem(name: string)' must be implemented.");
265
- }
266
- }
267
-
268
- /**
269
- * Class that allows to declare the view for the openspace container
270
- */
271
- class IOpenspaceView {
272
- constructor() {
273
- if (this.constructor == (IOpenspaceView)) {
274
- throw new Error("Abstract classes can't be instantiated.");
275
- }
276
- }
277
- /**
278
- * The method is called to match this View to the corresponding openspace container
279
- *
280
- * Should be identical with corresponding container's `withViewId(id: string)`
281
- * @returns {string}
282
- */
283
- getViewId() {
284
- throw new Error("Method 'getViewId()' must be implemented.");
285
- }
286
- /**
287
- * The method is called just before the openspace container's view is shown
288
- * @param context - context
289
- */
290
- getView(context) {
291
- throw new Error("Method 'getView(context: TTabViewContext)' must be implemented.");
292
- }
293
- }
294
-
295
- /**
296
- * Represents a builder for navigation window section's element
297
- */
298
- class IPageNavigationSectionElementBuilder {
299
- constructor() {
300
- if (this.constructor == IPageNavigationSectionElementBuilder) {
301
- throw new Error("Abstract classes can't be instantiated.");
302
- }
303
- }
304
- /**
305
- * Element's title to be displayed
306
- * @param title value
307
- */
308
- withTitle(title) {
309
- throw new Error("Method 'withTitle(title: string)' must be implemented.");
310
- }
311
- /**
312
- * Element's title to be displayed
313
- * @param description value
314
- */
315
- withDescription(description) {
316
- throw new Error("Method 'withDescription(description: string)' must be implemented.");
317
- }
318
- /**
319
- * Element's icon
320
- * @param name Icon name
321
- * @param iconSvg Url of icon or base64 string
322
- */
323
- withIcon(name, iconSvg) {
324
- throw new Error("Method 'withIcon(name: string, iconSvg: string)' must be implemented.");
325
- }
326
- /**
327
- * Element's view id
328
- *
329
- * Is matched with corresponding IOpenspaceView's `getViewId(): string`
330
- * @param value - View Id
331
- */
332
- withViewId(value) {
333
- throw new Error("Method 'withViewId(value: string)' must be implemented.");
334
- }
335
- }
336
-
337
- /**
338
- * Represents a builder for the navigation window's section
339
- */
340
- class IPageNavigationSectionBuilder {
341
- constructor() {
342
- if (this.constructor == IPageNavigationSectionBuilder) {
343
- throw new Error("Abstract classes can't be instantiated.");
344
- }
345
- }
346
- /**
347
- * Section's title to be displayed
348
- * @param title value
349
- */
350
- withTitle(title) {
351
- throw new Error("Method 'withTitle(title: string)' must be implemented.");
352
- }
353
- /**
354
- * Gets the list of existing element ids of the section
355
- * @returns Existing element ids
356
- */
357
- get elementIds() {
358
- throw new Error("Getter 'elementIds()' must be implemented.");
359
- }
360
- /**
361
- * Gets count of section's elements
362
- */
363
- get count() {
364
- throw new Error("Getter 'count()' must be implemented.");
365
- }
366
- /**
367
- * Adds a new element to the section
368
- * @param id Element's internal id
369
- * @param index The index to put the new element at
370
- */
371
- addElement(id, index) {
372
- throw new Error("Method 'addElement(id: string, index: number)' must be implemented.");
373
- }
374
- /**
375
- * Replaces the element of the section
376
- * If element does not exist - creates it
377
- * @param id Elements's internal id
378
- */
379
- replaceElement(id) {
380
- throw new Error("Method 'replaceElement(id: string)' must be implemented.");
381
- }
382
- }
383
-
384
- /**
385
- * Represents a builder for navigation window
386
- */
387
- class IPageNavigationBuilder {
388
- constructor() {
389
- if (this.constructor == IPageNavigationBuilder) {
390
- throw new Error("Abstract classes can't be instantiated.");
391
- }
392
- }
393
- /**
394
- * Gets the list of existing section ids of the navigation window
395
- * @returns Existing section ids
396
- */
397
- get sectionIds() {
398
- throw new Error("Getter 'sectionIds()' must be implemented.");
399
- }
400
- /**
401
- * Gets count of navigation window's elements
402
- */
403
- get count() {
404
- throw new Error("Getter 'count()' must be implemented.");
405
- }
406
- /**
407
- * Adds a new section to the navigation window
408
- * @param id Sections's internal id
409
- * @param index The index to put the new section at
410
- */
411
- addSection(id, index) {
412
- throw new Error("Method 'addElement(id: string, index: number)' must be implemented.");
413
- }
414
- /**
415
- * Replaces the section of the navigation window
416
- * If element does not exist - creates it
417
- * @param id Elements's internal id
418
- */
419
- replaceSection(id) {
420
- throw new Error("Method 'replaceElement(id: string)' must be implemented.");
421
- }
422
- }
423
-
424
- /**
425
- * Interface that allows to add new sections and elements to navigation window
426
- */
427
- class IPageNavigation {
428
- constructor() {
429
- if (this.constructor == IPageNavigation) {
430
- throw new Error("Abstract classes can't be instantiated.");
431
- }
432
- }
433
- build(builder) {
434
- throw new Error("Method 'build(builder: IOpenspaceBuilder)' must be implemented.");
435
- }
436
- }
437
-
438
- /**
439
- * Interface that allows to add new items to the tabs
440
- */
441
- class ITabs {
442
- /**
443
- * The method is called just before the tabs are shown
444
- * @param builder The tab group builder object of associated tab group
445
- * @param context Context
446
- */
447
- build(builder, context) {
448
- throw new Error("Method 'build(builder: IMenuBuilder, context: TTabsContext)' must be implemented.");
449
- }
450
- }
451
-
452
- /**
453
- * Represents a builder for tab groups
454
- */
455
- class ITabsBuilder {
456
- constructor() {
457
- if (this.constructor == ITabsBuilder) {
458
- throw new Error("Abstract classes can't be instantiated.");
459
- }
460
- }
461
- /**
462
- * Gets the list of existing items of a tab group
463
- * @returns Existing menu item names
464
- */
465
- get itemNames() {
466
- throw new Error("Getter 'itemNames()' must be implemented.");
467
- }
468
- /**
469
- * Gets count of tab group items
470
- */
471
- get count() {
472
- throw new Error("Getter 'count()' must be implemented.");
473
- }
474
- /**
475
- * Adds a new item to the associated tab group
476
- * @param id Item's internal id
477
- * @param index The index to put the new item at
478
- */
479
- addItem(id, index) {
480
- throw new Error("Method 'addItem(id: string, index: number)' must be implemented.");
481
- }
482
- /**
483
- * Replaces the item for the tab group.
484
- * If Item does not exist - creates it.
485
- * @param id Item's internal id
486
- */
487
- replaceItem(id) {
488
- throw new Error("Method 'replaceItem(id: string)' must be implemented.");
489
- }
490
- }
491
-
492
- /**
493
- * Enables to set parameters to the tab-group's item
494
- */
495
- class ITabItemBuilder {
496
- constructor() {
497
- if (this.constructor == ITabItemBuilder) {
498
- throw new Error("Abstract classes can't be instantiated.");
499
- }
500
- }
501
- /**
502
- * Item's title to be displayed
503
- * @param title value
504
- */
505
- withTitle(title) {
506
- throw new Error("Method 'withTitle(title: string)' must be implemented.");
507
- }
508
- /**
509
- * Item's icon
510
- * @param name Icon name
511
- * @param iconSvg Url of icon or base64 string
512
- */
513
- withIcon(name, iconSvg) {
514
- throw new Error("Method 'withIcon(name: string, iconSvg: string)' must be implemented.");
515
- }
516
- /**
517
- * Item's view id
518
- *
519
- * Is matched with corresponding IOpenspaceView's `getViewId(): string`
520
- * @param value - View Id
521
- */
522
- withViewId(value) {
523
- throw new Error("Method 'withViewId(value: string)' must be implemented.");
524
- }
525
- }
526
-
527
- /**
528
- * Interface that allows to add new items to the menu and context menus
529
- */
530
- class IMenu {
531
- /**
532
- * The method is called just before the menu is shown
533
- * @param builder The menu builder object of associated menu
534
- * @param context Context
535
- */
536
- build(builder, context) {
537
- throw new Error("Method 'build(builder: IMenuBuilder, context: TMenuContext)' must be implemented.");
538
- }
539
- /**
540
- *
541
- * @param name
542
- * @param context
543
- */
544
- onMenuItemClick(name, context) {
545
- throw new Error("Method 'onMenuItemClick(name: string, context: TMenuContext)' must be implemented.");
546
- }
547
- }
548
-
549
- /**
550
- * Represents a menu item and enables to set parametres to it
551
- */
552
- class IMenuItemBuilder {
553
- constructor() {
554
- if (this.constructor == IMenuItemBuilder) {
555
- throw new Error("Abstract classes can't be instantiated.");
556
- }
557
- }
558
- /**
559
- * Item's name to be displayed
560
- * @param header value
561
- */
562
- withHeader(header) {
563
- throw new Error("Method 'withHeader(header: string)' must be implemented.");
564
- }
565
- /**
566
- * Item's icon
567
- * @param name Icon name
568
- * @param iconSvg Url of icon or base64 string
569
- */
570
- withIcon(name, iconSvg) {
571
- throw new Error("Method 'withIcon(name: string, iconSvg: string)' must be implemented.");
572
- }
573
- /**
574
- * Enabled the item
575
- * @param value value
576
- */
577
- withIsEnabled(value) {
578
- throw new Error("Method 'withIsEnabled(value: boolean)' must be implemented.");
579
- }
580
- /**
581
- * Item's submenu
582
- */
583
- withSubmenu() {
584
- throw new Error("Method 'withSubmenu()' must be implemented.");
585
- }
586
- }
587
-
588
- /**
589
- *
590
- */
591
- class ICheckableMenuItemBuilder extends IMenuItemBuilder {
592
- /**
593
- *
594
- * @param value
595
- */
596
- withIsChecked(value) {
597
- throw new Error("Method 'withIsChecked(value: boolean)' must be implemented.");
598
- }
599
- }
600
-
601
- /**
602
- * Represents a menu and enables to add new items to it
603
- */
604
- class IMenuBuilder {
605
- constructor() {
606
- if (this.constructor == IMenuBuilder) {
607
- throw new Error("Abstract classes can't be instantiated.");
608
- }
609
- }
610
- /**
611
- * Gets the list of existing items of associated menu or subitems of an item
612
- * @returns Existing menu item names
613
- */
614
- get itemNames() {
615
- throw new Error("Getter 'itemNames()' must be implemented.");
616
- }
617
- /**
618
- * Gets count of menu items
619
- */
620
- get count() {
621
- throw new Error("Getter 'count()' must be implemented.");
622
- }
623
- /**
624
- * Adds a new separator to the associated menu
625
- * @param index The index to put the new item at
626
- */
627
- addSeparator(index) {
628
- throw new Error("Method 'addSeparator(index: number)' must be implemented.");
629
- }
630
- /**
631
- * Adds a new item to the associated menu
632
- * @param name Item's internal name
633
- * @param index The index to put the new item at
634
- */
635
- addItem(name, index) {
636
- throw new Error("Method 'addItem(name: string, index: number)' must be implemented.");
637
- }
638
- /**
639
- * Adds a new checkable item to the associated menu
640
- * @param name Item's internal name
641
- * @param index The index to put the new item at
642
- */
643
- addCheckableItem(name, index) {
644
- throw new Error("Method 'addCheckableItem(name: string, index: number)' must be implemented.");
645
- }
646
- /**
647
- * Replaces the item to the associated menu
648
- * @param name Item's internal name
649
- */
650
- replaceItem(name) {
651
- throw new Error("Method 'replaceItem(name: string)' must be implemented.");
652
- }
653
- /**
654
- * Removes the item with the specified name
655
- * @param name Item's internal name
656
- */
657
- removeItem(name) {
658
- throw new Error("Method 'removeItem(name: string)' must be implemented.");
659
- }
660
- /**
661
- * Gets the item
662
- * @param name Item's internal name
663
- */
664
- getItem(name) {
665
- throw new Error("Method 'getItem(name: string)' must be implemented.");
666
- }
667
- }
668
-
669
- /**
670
- * Contex for objects view
671
- */
672
- class ObjectsViewContext {
673
- constructor(selectedObjects, context, shortcuts) {
674
- this._selectedObjects = selectedObjects;
675
- this._context = context;
676
- this._shortcuts = shortcuts !== null && shortcuts !== void 0 ? shortcuts : [];
677
- }
678
- /**
679
- *
680
- */
681
- get selectedObjects() {
682
- return this._selectedObjects;
683
- }
684
- /**
685
- *
686
- */
687
- get contextObject() {
688
- return this._context;
689
- }
690
- /**
691
- *
692
- */
693
- get shortcuts() {
694
- return this._shortcuts;
695
- }
696
- }
697
-
698
- /**
699
- * Context for document annotations list
700
- */
701
- class DocumentAnnotationsListContext {
702
- constructor(selectedAnnotations) {
703
- this._selectedAnnotations = selectedAnnotations;
704
- }
705
- /**
706
- *
707
- */
708
- get selectedAnnotations() {
709
- return this._selectedAnnotations;
710
- }
711
- }
712
-
713
- /**
714
- * Context for xps render
715
- */
716
- class RenderContext {
717
- constructor(dataObject, selectedVersion) {
718
- this._dataObject = dataObject;
719
- this._selectedVersion = selectedVersion;
720
- }
721
- /**
722
- * Target object
723
- */
724
- get dataObject() {
725
- return this._dataObject;
726
- }
727
- /**
728
- * Selected version time
729
- */
730
- get selectedVersion() {
731
- return this._selectedVersion;
732
- }
733
- }
734
-
735
- class PageContext {
736
- }
737
-
738
- function objectToMap(objectMap) {
739
- const map = new Map();
740
- Object.keys(objectMap).forEach(key => {
741
- map.set(key, objectMap[key]);
742
- });
743
- return map;
744
- }
745
-
746
- class AttributePermissionInfo {
747
- constructor(editableForPositionsSource) {
748
- this.ATTRIBUTE_NAME_MARKER = '&';
749
- this.orgUnits = new Array();
750
- this.orgUnitAttributes = new Array();
751
- if (!editableForPositionsSource)
752
- return;
753
- editableForPositionsSource.forEach(str => {
754
- if (str.length > 0 && str[0] === this.ATTRIBUTE_NAME_MARKER) {
755
- this.orgUnitAttributes.push(str.substring(1));
756
- }
757
- else {
758
- const num = Number(str);
759
- if (!isNaN(num))
760
- this.orgUnits.push(num);
761
- }
762
- });
763
- }
764
- extractAllOrgUnits(obj) {
765
- const attrMap = objectToMap(obj.attributes);
766
- return this.extractAllOrgUnitsByAttributes(attrMap);
767
- }
768
- extractAllOrgUnitsByAttributes(attributes) {
769
- let result = new Array();
770
- if (!this.orgUnitAttributes || !attributes)
771
- return result;
772
- this.orgUnitAttributes.forEach(permissionAttributeName => {
773
- if (attributes.has(permissionAttributeName)) {
774
- const value = attributes.get(permissionAttributeName);
775
- if (value && Array.isArray(value)) {
776
- value.forEach(intValue => {
777
- result.push(intValue);
778
- });
779
- }
780
- }
781
- });
782
- return result;
783
- }
784
- }
785
-
786
- const byteToHex = Array();
787
- for (let i = 0; i < 256; ++i) {
788
- byteToHex.push((i + 0x100).toString(16).slice(1));
789
- }
790
- class Guid {
791
- static newGuid() {
792
- if (window.isSecureContext) {
793
- // If crypto.getRandomValues is available try to use it.
794
- return window.crypto.randomUUID();
795
- }
796
- // Fall back to Math.random if a higher quality random number generator is not available.
797
- const uuid = new Array(16);
798
- var d = new Date().getTime();
799
- for (var i = 0; i < 16; i++) {
800
- var r = ((d + Math.random() * 256) % 256) | 0;
801
- d = Math.trunc(d / 256);
802
- uuid[i] = r;
803
- }
804
- // Makes uuid compliant to RFC-4122
805
- uuid[6] = (uuid[6] & 0x0F) | 0x40; // uuid version
806
- uuid[8] = (uuid[8] & 0x3F) | 0x80; // uuid variant
807
- return this.stringify(uuid);
808
- }
809
- static isGuid(str) {
810
- const regex = new RegExp(this.regex);
811
- return regex.test(str) && str.length === 36;
812
- }
813
- static stringify(arr) {
814
- return (byteToHex[arr[0]] +
815
- byteToHex[arr[1]] +
816
- byteToHex[arr[2]] +
817
- byteToHex[arr[3]] +
818
- '-' +
819
- byteToHex[arr[4]] +
820
- byteToHex[arr[5]] +
821
- '-' +
822
- byteToHex[arr[6]] +
823
- byteToHex[arr[7]] +
824
- '-' +
825
- byteToHex[arr[8]] +
826
- byteToHex[arr[9]] +
827
- '-' +
828
- byteToHex[arr[10]] +
829
- byteToHex[arr[11]] +
830
- byteToHex[arr[12]] +
831
- byteToHex[arr[13]] +
832
- byteToHex[arr[14]] +
833
- byteToHex[arr[15]]).toLowerCase();
834
- }
835
- }
836
- Guid.regex = "(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})";
837
- Guid.EMPTY = "00000000-0000-0000-0000-000000000000";
838
-
839
- var AccessLevel;
840
- (function (AccessLevel) {
841
- AccessLevel[AccessLevel["None"] = 0] = "None";
842
- AccessLevel[AccessLevel["Create"] = 1] = "Create";
843
- AccessLevel[AccessLevel["Edit"] = 2] = "Edit";
844
- AccessLevel[AccessLevel["View"] = 4] = "View";
845
- AccessLevel[AccessLevel["Freeze"] = 8] = "Freeze";
846
- AccessLevel[AccessLevel["Agreement"] = 16] = "Agreement";
847
- AccessLevel[AccessLevel["Share"] = 32] = "Share";
848
- AccessLevel[AccessLevel["ViewCreate"] = 5] = "ViewCreate";
849
- AccessLevel[AccessLevel["ViewEdit"] = 7] = "ViewEdit";
850
- AccessLevel[AccessLevel["ViewEditAgrement"] = 23] = "ViewEditAgrement";
851
- AccessLevel[AccessLevel["Full"] = 63] = "Full";
852
- })(AccessLevel || (AccessLevel = {}));
853
- var AccessType;
854
- (function (AccessType) {
855
- AccessType[AccessType["Allow"] = 0] = "Allow";
856
- AccessType[AccessType["Deny"] = 1] = "Deny";
857
- })(AccessType || (AccessType = {}));
858
- var AccessInheritance;
859
- (function (AccessInheritance) {
860
- AccessInheritance[AccessInheritance["None"] = 0] = "None";
861
- AccessInheritance[AccessInheritance["InheritUntilSecret"] = 1] = "InheritUntilSecret";
862
- AccessInheritance[AccessInheritance["InheritWholeSubtree"] = 2] = "InheritWholeSubtree";
863
- })(AccessInheritance || (AccessInheritance = {}));
864
-
865
- var AttributeType;
866
- (function (AttributeType) {
867
- AttributeType[AttributeType["Integer"] = 0] = "Integer";
868
- AttributeType[AttributeType["Double"] = 1] = "Double";
869
- AttributeType[AttributeType["DateTime"] = 2] = "DateTime";
870
- AttributeType[AttributeType["String"] = 3] = "String";
871
- AttributeType[AttributeType["Decimal"] = 4] = "Decimal";
872
- AttributeType[AttributeType["Numerator"] = 5] = "Numerator";
873
- AttributeType[AttributeType["Array"] = 6] = "Array";
874
- AttributeType[AttributeType["UserState"] = 7] = "UserState";
875
- AttributeType[AttributeType["OrgUnit"] = 8] = "OrgUnit";
876
- AttributeType[AttributeType["ElementBook"] = 9] = "ElementBook";
877
- AttributeType[AttributeType["Guid"] = 10] = "Guid";
878
- AttributeType[AttributeType["IntegerArray"] = 11] = "IntegerArray";
879
- AttributeType[AttributeType["Unknown"] = 99] = "Unknown";
880
- })(AttributeType || (AttributeType = {}));
881
-
882
- class ExpectedError extends Error {
883
- constructor(message, isSilent = false) {
884
- super(message);
885
- this.isSilent = isSilent;
886
- this.isExpected = true;
887
- }
888
- }
889
-
890
- var RelationType;
891
- (function (RelationType) {
892
- RelationType[RelationType["SourceFiles"] = 1] = "SourceFiles";
893
- RelationType[RelationType["TaskInitiatorAttachments"] = 2] = "TaskInitiatorAttachments";
894
- RelationType[RelationType["TaskExecutorAttachments"] = 3] = "TaskExecutorAttachments";
895
- RelationType[RelationType["MessageAttachments"] = 4] = "MessageAttachments";
896
- RelationType[RelationType["Custom"] = 5] = "Custom";
897
- RelationType[RelationType["TaskAttachments"] = 6] = "TaskAttachments";
898
- })(RelationType || (RelationType = {}));
899
- var ObjectState;
900
- (function (ObjectState) {
901
- ObjectState[ObjectState["Alive"] = 0] = "Alive";
902
- ObjectState[ObjectState["InRecycleBin"] = 1] = "InRecycleBin";
903
- ObjectState[ObjectState["DeletedPermanently"] = 2] = "DeletedPermanently";
904
- ObjectState[ObjectState["Frozen"] = 3] = "Frozen";
905
- ObjectState[ObjectState["LockRequested"] = 4] = "LockRequested";
906
- ObjectState[ObjectState["LockAccepted"] = 5] = "LockAccepted";
907
- })(ObjectState || (ObjectState = {}));
908
-
909
- var OrgUnitKind;
910
- (function (OrgUnitKind) {
911
- OrgUnitKind[OrgUnitKind["Department"] = 0] = "Department";
912
- OrgUnitKind[OrgUnitKind["Position"] = 1] = "Position";
913
- OrgUnitKind[OrgUnitKind["Group"] = 2] = "Group";
914
- })(OrgUnitKind || (OrgUnitKind = {}));
915
-
916
- var SignatureType;
917
- (function (SignatureType) {
918
- SignatureType[SignatureType["CadesBes"] = 0] = "CadesBes";
919
- SignatureType[SignatureType["CadesT"] = 1] = "CadesT";
920
- SignatureType[SignatureType["CadesC"] = 2] = "CadesC";
921
- SignatureType[SignatureType["CadesXLong"] = 3] = "CadesXLong";
922
- SignatureType[SignatureType["CadesXLongType1"] = 4] = "CadesXLongType1";
923
- })(SignatureType || (SignatureType = {}));
924
-
925
- var SignatureVerificationStatus;
926
- (function (SignatureVerificationStatus) {
927
- SignatureVerificationStatus[SignatureVerificationStatus["Unknown"] = 0] = "Unknown";
928
- SignatureVerificationStatus[SignatureVerificationStatus["Valid"] = 1] = "Valid";
929
- SignatureVerificationStatus[SignatureVerificationStatus["ValidWithWarnings"] = 2] = "ValidWithWarnings";
930
- SignatureVerificationStatus[SignatureVerificationStatus["CannotBeChecked"] = 3] = "CannotBeChecked";
931
- SignatureVerificationStatus[SignatureVerificationStatus["Invalid"] = 4] = "Invalid";
932
- SignatureVerificationStatus[SignatureVerificationStatus["Error"] = 5] = "Error";
933
- })(SignatureVerificationStatus || (SignatureVerificationStatus = {}));
934
-
935
- var SubscriptionType;
936
- (function (SubscriptionType) {
937
- SubscriptionType[SubscriptionType["Shallow"] = 0] = "Shallow";
938
- SubscriptionType[SubscriptionType["Deep"] = 1] = "Deep";
939
- })(SubscriptionType || (SubscriptionType = {}));
940
-
941
- var Theme;
942
- (function (Theme) {
943
- Theme[Theme["Light"] = 0] = "Light";
944
- Theme[Theme["Dark"] = 1] = "Dark";
945
- })(Theme || (Theme = {}));
946
-
947
- class SystemSettingsKeys {
948
- }
949
- /**
950
- * Get's favorites feature key
951
- */
952
- SystemSettingsKeys.favoritesFeatureKey = "Favorites-880e609e-54f9-4463-9c5e-f2b742a944dc";
953
- /**
954
- * Get's pilot storage drive letter feature key
955
- */
956
- SystemSettingsKeys.pilotStorageDriveLetter = "PilotStorageDriveLetter-880e609e-54f9-4463-9c5e-f2b742a944dc";
957
- /**
958
- * Get's agreement roles feature key
959
- */
960
- SystemSettingsKeys.agreementRolesFeatureKey = "AgreementRoles-0a782ccd-adb3-484f-8fb2-a6c58fc5a61d";
961
- /**
962
- * Get's tasks filters feature key
963
- */
964
- SystemSettingsKeys.tasksFiltersFeatureKey = "TasksFilters-deab09c1-2276-457b-a59b-5682baec43c7";
965
- /**
966
- * Get's annotation filter feature key
967
- */
968
- SystemSettingsKeys.annotationFilterFeatureKey = "AnnotationFilter-F151E782-6CEB-44AF-ADF1-AFB0A0FAB95E";
969
- /**
970
- * Get's annotation filter feature key
971
- */
972
- SystemSettingsKeys.personalAnnotationFilterFeatureKey = "PersonalAnnotationFilter-9382f499-c1b9-433f-95bb-d83195d52121";
973
- /**
974
- * Get's mounted on Pilot-Storage items feature key
975
- */
976
- SystemSettingsKeys.mountedItemsList = "MountedItems-29eff31a-8bd2-40a2-bdac-c020db132c8b";
977
- /**
978
- * Get's Pilot-Storage work folders feature key
979
- */
980
- SystemSettingsKeys.workfoldersList = "Workfolders-C4A424C8-AE20-4277-9CA5-94629CEB1B86";
981
- /**
982
- * Get's selection path of the DocumentsExplorer
983
- */
984
- SystemSettingsKeys.tabsState = "TabsState-9b9e6a36-013a-423c-9599-c6edc32a5b4f";
985
- /**
986
- * Get's auto blocking file extensions feature key
987
- */
988
- SystemSettingsKeys.autoBlockingFileExtensionsFeatureKey = "AutoBlockingFileExtensions-1bb027f4-7dd0-4aec-8c0d-cffe63bfcbb3";
989
- /**
990
- * Get's auto commiting file extensions feature key
991
- */
992
- SystemSettingsKeys.autoCommitingFileExtensionsFeatureKey = " AutoCommitingFileExtensions-2d0de5a1-f6c1-426e-b3e6-610dfb4b2666";
993
- /**
994
- * Get's auto updating files feature key
995
- */
996
- SystemSettingsKeys.autoUpdatingFilesFeatureKey = "AutoUpdatingFileExtensions-6FB5DE6C-96B2-4F84-8650-7A2EB102EAC5";
997
- /**
998
- * Get's auto publishing settings feature key
999
- */
1000
- SystemSettingsKeys.autoPublishingExtensionsFeatureKey = "AutoPublishingExtensions-F6FF1869-DBC2-4253-A5AA-7B225D69E416";
1001
- /**
1002
- * Get's eml attributes dictionary feature key
1003
- */
1004
- SystemSettingsKeys.emlAttributesDictionaryKeyFeatureKey = "EmlAttributesDictionary-354AB75D-A421-4836-A343-16FEC3014A4F";
1005
- /**
1006
- * Get's documents autofill feature key
1007
- */
1008
- SystemSettingsKeys.docsAutoFillFeatureKey = "DocsAutoFillFeatureKey-d19b557b-2109-4221-8970-794372039186";
1009
- /**
1010
- * User-defined temp files regex masks
1011
- */
1012
- SystemSettingsKeys.tempFileMasksFeatureKey = "TempFileMasksFeatureKey-388BD8A4-E7C0-48DD-B235-8C05030CFCF3";
1013
- /**
1014
- * User-defined Export/Import settings
1015
- */
1016
- SystemSettingsKeys.exportImportFeatureKey = "ExportImportFeatureKey-4697EA6F-E018-4989-929D-992D1176CC3C";
1017
- /**
1018
- * User-defined digital signature title
1019
- */
1020
- SystemSettingsKeys.digitalSinatureTitleFeatureKey = "DigitalSinatureTitleFeatureKey-481EFA14-B116-434A-BAD6-F90DB883DEC9";
1021
-
1022
- /*
1023
- * Public API Surface of pilot-web-sdk
1024
- */
1025
-
1026
- /**
1027
- * Generated bundle index. Do not edit.
1028
- */
1029
-
1030
- export { AccessInheritance, AccessLevel, AccessType, AttributePermissionInfo, AttributeType, DocumentAnnotationsListContext, ExpectedError, Guid, ICheckableMenuItemBuilder, IDisposable, IInitializable, IMenu, IMenuBuilder, IMenuItemBuilder, IOpenspaceView, IPageNavigation, IPageNavigationBuilder, IPageNavigationSectionBuilder, IPageNavigationSectionElementBuilder, ITabItemBuilder, ITabs, ITabsBuilder, IToolbar, IToolbarBuilder, IToolbarButtonItemBuilder, IToolbarItemSubmenuHandler, IToolbarMenuButtonItemBuilder, IToolbarToggleButtonItemBuilder, InjectionSource, ObjectState, ObjectsViewContext, OrgUnitKind, PageContext, ProgressBarMode, RelationType, RenderContext, SignatureType, SignatureVerificationStatus, SubscriptionType, SystemSettingsKeys, Theme, objectToMap };
1031
- //# sourceMappingURL=pilotdev-pilot-web-sdk.mjs.map