@pilotdev/pilot-web-sdk 24.4.0 → 24.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/esm2020/lib/contexts/context.mjs +29 -0
  2. package/esm2020/lib/contexts/document-annotations-list-context.mjs +15 -0
  3. package/esm2020/lib/contexts/index.mjs +4 -0
  4. package/esm2020/lib/contexts/render-context.mjs +22 -0
  5. package/esm2020/lib/data/access.mjs +26 -0
  6. package/esm2020/lib/data/annotations.mjs +2 -0
  7. package/esm2020/lib/data/attribute.mjs +17 -0
  8. package/esm2020/lib/data/data-object.mjs +19 -0
  9. package/esm2020/lib/data/file.mjs +2 -0
  10. package/esm2020/lib/data/files-snapshot.mjs +2 -0
  11. package/esm2020/lib/data/index.mjs +13 -0
  12. package/esm2020/lib/data/modifier.mjs +2 -0
  13. package/esm2020/lib/data/object-builder.mjs +2 -0
  14. package/esm2020/lib/data/organisation-unit.mjs +7 -0
  15. package/esm2020/lib/data/person.mjs +2 -0
  16. package/esm2020/lib/data/relation.mjs +2 -0
  17. package/esm2020/lib/data/subscriptionType.mjs +6 -0
  18. package/esm2020/lib/idata.plugin.mjs +2 -0
  19. package/esm2020/lib/injectable/index.mjs +5 -0
  20. package/esm2020/lib/injectable/modifier-provider.mjs +2 -0
  21. package/esm2020/lib/injectable/objects-repository.mjs +2 -0
  22. package/esm2020/lib/injectable/render-context-provider.mjs +2 -0
  23. package/esm2020/lib/injectable/repository-events.mjs +2 -0
  24. package/esm2020/lib/menu/checkable-menu.builder.mjs +14 -0
  25. package/esm2020/lib/menu/index.mjs +5 -0
  26. package/esm2020/lib/menu/menu-item.builder.mjs +39 -0
  27. package/esm2020/lib/menu/menu.builder.mjs +68 -0
  28. package/esm2020/lib/menu/menu.mjs +22 -0
  29. package/esm2020/lib/toolbar/index.mjs +7 -0
  30. package/esm2020/lib/toolbar/toolbar-item-submenu.handler.mjs +11 -0
  31. package/esm2020/lib/toolbar/toolbar-item.builder.mjs +41 -0
  32. package/esm2020/lib/toolbar/toolbar-menu-item.builder.mjs +15 -0
  33. package/esm2020/lib/toolbar/toolbar-toggle-item.builder.mjs +14 -0
  34. package/esm2020/lib/toolbar/toolbar.builder.mjs +88 -0
  35. package/esm2020/lib/toolbar/toolbar.mjs +27 -0
  36. package/esm2020/lib/tools/attribute-permission.info.mjs +41 -0
  37. package/esm2020/lib/tools/guid.mjs +53 -0
  38. package/esm2020/lib/tools/index.mjs +4 -0
  39. package/esm2020/lib/tools/utils.mjs +8 -0
  40. package/esm2020/pilotdev-pilot-web-sdk.mjs +5 -0
  41. package/esm2020/public-api.mjs +11 -0
  42. package/fesm2015/pilotdev-pilot-web-sdk.mjs +588 -0
  43. package/fesm2015/pilotdev-pilot-web-sdk.mjs.map +1 -0
  44. package/fesm2020/pilotdev-pilot-web-sdk.mjs +588 -0
  45. package/fesm2020/pilotdev-pilot-web-sdk.mjs.map +1 -0
  46. package/index.d.ts +5 -0
  47. package/lib/contexts/context.d.ts +22 -0
  48. package/lib/contexts/document-annotations-list-context.d.ts +12 -0
  49. package/{src/lib/contexts/index.ts → lib/contexts/index.d.ts} +1 -1
  50. package/lib/contexts/render-context.d.ts +17 -0
  51. package/lib/data/access.d.ts +35 -0
  52. package/lib/data/annotations.d.ts +15 -0
  53. package/lib/data/attribute.d.ts +30 -0
  54. package/lib/data/data-object.d.ts +74 -0
  55. package/lib/data/file.d.ts +23 -0
  56. package/lib/data/files-snapshot.d.ts +8 -0
  57. package/{src/lib/data/index.ts → lib/data/index.d.ts} +2 -2
  58. package/lib/data/modifier.d.ts +30 -0
  59. package/lib/data/object-builder.d.ts +110 -0
  60. package/lib/data/organisation-unit.d.ts +18 -0
  61. package/lib/data/person.d.ts +17 -0
  62. package/lib/data/relation.d.ts +8 -0
  63. package/lib/data/subscriptionType.d.ts +4 -0
  64. package/lib/idata.plugin.d.ts +2 -0
  65. package/{src/lib/injectable/index.ts → lib/injectable/index.d.ts} +2 -2
  66. package/{src/lib/injectable/modifier-provider.ts → lib/injectable/modifier-provider.d.ts} +5 -6
  67. package/lib/injectable/objects-repository.d.ts +72 -0
  68. package/lib/injectable/render-context-provider.d.ts +10 -0
  69. package/lib/injectable/repository-events.d.ts +31 -0
  70. package/lib/menu/checkable-menu.builder.d.ts +11 -0
  71. package/{src/lib/menu/index.ts → lib/menu/index.d.ts} +1 -2
  72. package/lib/menu/menu-item.builder.d.ts +27 -0
  73. package/lib/menu/menu.builder.d.ts +49 -0
  74. package/lib/menu/menu.d.ts +18 -0
  75. package/{src/lib/toolbar/index.ts → lib/toolbar/index.d.ts} +1 -2
  76. package/lib/toolbar/toolbar-item-submenu.handler.d.ts +9 -0
  77. package/lib/toolbar/toolbar-item.builder.d.ts +28 -0
  78. package/lib/toolbar/toolbar-menu-item.builder.d.ts +13 -0
  79. package/lib/toolbar/toolbar-toggle-item.builder.d.ts +11 -0
  80. package/lib/toolbar/toolbar.builder.d.ts +65 -0
  81. package/lib/toolbar/toolbar.d.ts +19 -0
  82. package/lib/tools/attribute-permission.info.d.ts +8 -0
  83. package/lib/tools/guid.d.ts +7 -0
  84. package/lib/tools/index.d.ts +3 -0
  85. package/lib/tools/utils.d.ts +3 -0
  86. package/package.json +22 -3
  87. package/{src/public-api.ts → public-api.d.ts} +1 -4
  88. package/.eslintrc.json +0 -31
  89. package/ng-package.json +0 -7
  90. package/src/lib/contexts/context.ts +0 -38
  91. package/src/lib/contexts/document-annotations-list-context.ts +0 -21
  92. package/src/lib/contexts/render-context.ts +0 -28
  93. package/src/lib/data/access.ts +0 -40
  94. package/src/lib/data/annotations.ts +0 -20
  95. package/src/lib/data/attribute.ts +0 -33
  96. package/src/lib/data/data-object.ts +0 -78
  97. package/src/lib/data/file.ts +0 -25
  98. package/src/lib/data/files-snapshot.ts +0 -9
  99. package/src/lib/data/modifier.ts +0 -31
  100. package/src/lib/data/object-builder.ts +0 -111
  101. package/src/lib/data/organisation-unit.ts +0 -20
  102. package/src/lib/data/person.ts +0 -17
  103. package/src/lib/data/relation.ts +0 -10
  104. package/src/lib/data/subscriptionType.ts +0 -5
  105. package/src/lib/idata.plugin.ts +0 -2
  106. package/src/lib/injectable/objects-repository.ts +0 -74
  107. package/src/lib/injectable/render-context-provider.ts +0 -11
  108. package/src/lib/injectable/repository-events.ts +0 -33
  109. package/src/lib/menu/checkable-menu.builder.ts +0 -15
  110. package/src/lib/menu/menu-item.builder.ts +0 -45
  111. package/src/lib/menu/menu.builder.ts +0 -79
  112. package/src/lib/menu/menu.ts +0 -24
  113. package/src/lib/toolbar/toolbar-item-submenu.handler.ts +0 -12
  114. package/src/lib/toolbar/toolbar-item.builder.ts +0 -45
  115. package/src/lib/toolbar/toolbar-menu-item.builder.ts +0 -16
  116. package/src/lib/toolbar/toolbar-toggle-item.builder.ts +0 -15
  117. package/src/lib/toolbar/toolbar.builder.ts +0 -104
  118. package/src/lib/toolbar/toolbar.ts +0 -31
  119. package/src/lib/tools/attribute-permission.info.ts +0 -51
  120. package/src/lib/tools/guid.ts +0 -63
  121. package/src/lib/tools/index.ts +0 -3
  122. package/src/lib/tools/utils.ts +0 -8
  123. package/tsconfig.lib.json +0 -15
  124. package/tsconfig.lib.prod.json +0 -10
@@ -0,0 +1,588 @@
1
+ /**
2
+ * Interface that allows to add new items to the toolbar
3
+ */
4
+ class IToolbar {
5
+ constructor() {
6
+ if (this.constructor == (IToolbar)) {
7
+ throw new Error("Abstract classes can't be instantiated.");
8
+ }
9
+ }
10
+ /**
11
+ * The method is called just before the toolbar is created
12
+ * @param builder - the toolbar builder object of associated toolbar
13
+ * @param context - context
14
+ */
15
+ build(builder, context) {
16
+ throw new Error("Method 'build(builder: IToolbarBuilder, context: TToolbarContext)' must be implemented.");
17
+ }
18
+ /**
19
+ *
20
+ * @param name
21
+ * @param context
22
+ */
23
+ onToolbarItemClick(name, context) {
24
+ throw new Error("Method 'onToolbarItemClick(name: string, context: TToolbarContext)' must be implemented.");
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Represents a toolbar button and enables to set parametres to it
30
+ */
31
+ class IToolbarButtonItemBuilder {
32
+ constructor() {
33
+ if (this.constructor == IToolbarButtonItemBuilder) {
34
+ throw new Error("Abstract classes can't be instantiated.");
35
+ }
36
+ }
37
+ /**
38
+ * Item's name to be displayed
39
+ * @param header - value
40
+ * @returns instance of IToolbarButtonItemBuilder
41
+ */
42
+ withHeader(header) {
43
+ throw new Error("Method 'withHeader(header: string)' must be implemented.");
44
+ }
45
+ /**
46
+ * Item's icon in SVG format
47
+ * @param name - icon name
48
+ * @param svg - url icon or base64 string
49
+ */
50
+ withIcon(name, svg) {
51
+ throw new Error("Method 'withIcon(name: string, svg: string)' must be implemented.");
52
+ }
53
+ /**
54
+ * Enabled the item
55
+ * @param value - value
56
+ */
57
+ withIsEnabled(value) {
58
+ throw new Error("Method 'withIsEnabled(value: boolean)' must be implemented.");
59
+ }
60
+ /**
61
+ * Item's hint
62
+ * @param hint - value
63
+ */
64
+ withHint(hint) {
65
+ throw new Error("Method 'withHint(hint: string)' must be implemented.");
66
+ }
67
+ }
68
+
69
+ class IToolbarItemSubmenuHandler {
70
+ /**
71
+ * Build a submenu
72
+ * @param builder - toolbar builder
73
+ * @returns
74
+ */
75
+ onSubmenuRequested(builder) {
76
+ throw new Error("Method 'onSubmenuRequested(builder: IToolbarBuilder)' must be implemented.");
77
+ }
78
+ }
79
+
80
+ /**
81
+ * Represents a toolbar menu button and enables to set parametres to it
82
+ */
83
+ class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {
84
+ /**
85
+ * Build a dropdown menu
86
+ * @param itemSubmenuHandler - toolbar submenu handler
87
+ * @returns The toolbar button menu builder
88
+ */
89
+ withMenu(itemSubmenuHandler) {
90
+ throw new Error("Method 'withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.");
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Represents a toolbar toggle button and enables to set parametres to it
96
+ */
97
+ class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {
98
+ /**
99
+ *
100
+ * @param value
101
+ */
102
+ withIsChecked(value) {
103
+ throw new Error("Method 'withIsChecked(value: boolean)' must be implemented.");
104
+ }
105
+ }
106
+
107
+ class IToolbarBuilder {
108
+ constructor() {
109
+ if (this.constructor == IToolbarBuilder) {
110
+ throw new Error("Abstract classes can't be instantiated.");
111
+ }
112
+ }
113
+ /**
114
+ * Adds a new separator to the associated toolbar
115
+ * @param index - The index to put the new item at
116
+ */
117
+ addSeparator(index) {
118
+ throw new Error("Method 'addSeparator(index: number)' must be implemented.");
119
+ }
120
+ /**
121
+ * Adds a new button to the associated toolbar
122
+ * @param name - Internal item's name
123
+ * @param index - The index to put the new item at
124
+ */
125
+ addButtonItem(name, index) {
126
+ throw new Error("Method 'addButtonItem(name: string, index: number)' must be implemented.");
127
+ }
128
+ /**
129
+ * Adds a new menu button to the associated toolbar
130
+ * @param name - Internal item's name
131
+ * @param index - The index to put the new item at
132
+ */
133
+ addMenuButtonItem(name, index) {
134
+ throw new Error("Method 'addMenuButtonItem(name: string, index: number)' must be implemented.");
135
+ }
136
+ /**
137
+ * Adds a new toggle button to the associated toolbar
138
+ * @param name - Internal item's name
139
+ * @param index - The index to put the new item at
140
+ */
141
+ addToggleButtonItem(name, index) {
142
+ throw new Error("Method 'addToggleButtonItem(name: string, index: number)' must be implemented.");
143
+ }
144
+ /**
145
+ * Replaces the item from the associated toolbar on button
146
+ * @param name - The name of toolbar button to replace
147
+ */
148
+ replaceButtonItem(name) {
149
+ throw new Error("Method 'replaceButtonItem(name: string)' must be implemented.");
150
+ }
151
+ /**
152
+ * Replace the item from the associated toolbar on menu button
153
+ * @param name - The name of toolbar menu button to replace
154
+ */
155
+ replaceMenuButtonItem(name) {
156
+ throw new Error("Method 'replaceMenuButtonItem(name: string)' must be implemented.");
157
+ }
158
+ /**
159
+ * Enables to set parametres to menu button item submenu
160
+ * @param name - Item's internal name
161
+ * @param itemSubmenuHandler - The toolbar button menu builder
162
+ */
163
+ handleMenuButtonItemSubmenu(name, itemSubmenuHandler) {
164
+ throw new Error("Method 'handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.");
165
+ }
166
+ /**
167
+ * Replaces the item from the associated toolbar on toggle button
168
+ * @param name - The name of toolbar toggle button to replace
169
+ */
170
+ replaceToggleButtonItem(name) {
171
+ throw new Error("Method 'replaceToggleButtonItem(name: string)' must be implemented.");
172
+ }
173
+ /**
174
+ * Gets the list of existing item names of associated toolbar
175
+ * @returns - Existing toolbar item names
176
+ */
177
+ get itemNames() {
178
+ throw new Error("Getter 'itemNames()' must be implemented.");
179
+ }
180
+ /**
181
+ * Gets count of toolbar items
182
+ */
183
+ get count() {
184
+ throw new Error("Getter 'count()' must be implemented.");
185
+ }
186
+ /**
187
+ * Removes specified item
188
+ * @param itemName - Item's internal name
189
+ */
190
+ removeItem(itemName) {
191
+ throw new Error("Method 'removeItem(name: string)' must be implemented.");
192
+ }
193
+ }
194
+
195
+ /**
196
+ * Interface that allows to add new items to the menu and context menus
197
+ */
198
+ class IMenu {
199
+ /**
200
+ * The method is called just before the menu is shown
201
+ * @param builder The menu builder object of associated menu
202
+ * @param context Context
203
+ */
204
+ build(builder, context) {
205
+ throw new Error("Method 'build(builder: IMenuBuilder, context: TMenuContext)' must be implemented.");
206
+ }
207
+ /**
208
+ *
209
+ * @param name
210
+ * @param context
211
+ */
212
+ onMenuItemClick(name, context) {
213
+ throw new Error("Method 'onMenuItemClick(name: string, context: TMenuContext)' must be implemented.");
214
+ }
215
+ }
216
+
217
+ /**
218
+ * Represents a menu item and enables to set parametres to it
219
+ */
220
+ class IMenuItemBuilder {
221
+ constructor() {
222
+ if (this.constructor == IMenuItemBuilder) {
223
+ throw new Error("Abstract classes can't be instantiated.");
224
+ }
225
+ }
226
+ /**
227
+ * Item's name to be displayed
228
+ * @param header value
229
+ */
230
+ withHeader(header) {
231
+ throw new Error("Method 'withHeader(header: string)' must be implemented.");
232
+ }
233
+ /**
234
+ * Item's icon
235
+ * @param name Icon name
236
+ * @param iconSvg Url of icon or base64 string
237
+ */
238
+ withIcon(name, iconSvg) {
239
+ throw new Error("Method 'withIcon(name: string, iconSvg: string)' must be implemented.");
240
+ }
241
+ /**
242
+ * Enabled the item
243
+ * @param value value
244
+ */
245
+ withIsEnabled(value) {
246
+ throw new Error("Method 'withIsEnabled(value: boolean)' must be implemented.");
247
+ }
248
+ /**
249
+ * Item's submenu
250
+ */
251
+ withSubmenu() {
252
+ throw new Error("Method 'withSubmenu()' must be implemented.");
253
+ }
254
+ }
255
+
256
+ /**
257
+ *
258
+ */
259
+ class ICheckableMenuItemBuilder extends IMenuItemBuilder {
260
+ /**
261
+ *
262
+ * @param value
263
+ */
264
+ withIsChecked(value) {
265
+ throw new Error("Method 'withIsChecked(value: boolean)' must be implemented.");
266
+ }
267
+ }
268
+
269
+ /**
270
+ * Represents a menu and enables to add new items to it
271
+ */
272
+ class IMenuBuilder {
273
+ constructor() {
274
+ if (this.constructor == IMenuBuilder) {
275
+ throw new Error("Abstract classes can't be instantiated.");
276
+ }
277
+ }
278
+ /**
279
+ * Gets the list of existing items of associated menu or subitems of an item
280
+ * @returns Existing menu item names
281
+ */
282
+ get itemNames() {
283
+ throw new Error("Getter 'itemNames()' must be implemented.");
284
+ }
285
+ /**
286
+ * Gets count of menu items
287
+ */
288
+ get count() {
289
+ throw new Error("Getter 'count()' must be implemented.");
290
+ }
291
+ /**
292
+ * Adds a new separator to the associated menu
293
+ * @param index The index to put the new item at
294
+ */
295
+ addSeparator(index) {
296
+ throw new Error("Method 'addSeparator(index: number)' must be implemented.");
297
+ }
298
+ /**
299
+ * Adds a new item to the associated menu
300
+ * @param name Item's internal name
301
+ * @param index The index to put the new item at
302
+ */
303
+ addItem(name, index) {
304
+ throw new Error("Method 'addItem(name: string, index: number)' must be implemented.");
305
+ }
306
+ /**
307
+ * Adds a new checkable item to the associated menu
308
+ * @param name Item's internal name
309
+ * @param index The index to put the new item at
310
+ */
311
+ addCheckableItem(name, index) {
312
+ throw new Error("Method 'addCheckableItem(name: string, index: number)' must be implemented.");
313
+ }
314
+ /**
315
+ * Replaces the item to the associated menu
316
+ * @param name Item's internal name
317
+ */
318
+ replaceItem(name) {
319
+ throw new Error("Method 'replaceItem(name: string)' must be implemented.");
320
+ }
321
+ /**
322
+ * Removes the item with the specified name
323
+ * @param name Item's internal name
324
+ */
325
+ removeItem(name) {
326
+ throw new Error("Method 'removeItem(name: string)' must be implemented.");
327
+ }
328
+ /**
329
+ * Gets the item
330
+ * @param name Item's internal name
331
+ */
332
+ getItem(name) {
333
+ throw new Error("Method 'getItem(name: string)' must be implemented.");
334
+ }
335
+ }
336
+
337
+ /**
338
+ * Contex for objects view
339
+ */
340
+ class ObjectsViewContext {
341
+ constructor(selectedObjects, context, shortcuts) {
342
+ this._selectedObjects = selectedObjects;
343
+ this._context = context;
344
+ this._shortcuts = shortcuts !== null && shortcuts !== void 0 ? shortcuts : [];
345
+ }
346
+ /**
347
+ *
348
+ */
349
+ get selectedObjects() {
350
+ return this._selectedObjects;
351
+ }
352
+ /**
353
+ *
354
+ */
355
+ get contextObject() {
356
+ return this._context;
357
+ }
358
+ /**
359
+ *
360
+ */
361
+ get shortcuts() {
362
+ return this._shortcuts;
363
+ }
364
+ }
365
+
366
+ /**
367
+ * Context for document annotations list
368
+ */
369
+ class DocumentAnnotationsListContext {
370
+ constructor(selectedAnnotations) {
371
+ this._selectedAnnotations = selectedAnnotations;
372
+ }
373
+ /**
374
+ *
375
+ */
376
+ get selectedAnnotations() {
377
+ return this._selectedAnnotations;
378
+ }
379
+ }
380
+
381
+ /**
382
+ * Context for xps render
383
+ */
384
+ class RenderContext {
385
+ constructor(dataObject, selectedVersion) {
386
+ this._dataObject = dataObject;
387
+ this._selectedVersion = selectedVersion;
388
+ }
389
+ /**
390
+ * Target object
391
+ */
392
+ get dataObject() {
393
+ return this._dataObject;
394
+ }
395
+ /**
396
+ * Selected version time
397
+ */
398
+ get selectedVersion() {
399
+ return this._selectedVersion;
400
+ }
401
+ }
402
+
403
+ function objectToMap(objectMap) {
404
+ const map = new Map();
405
+ Object.keys(objectMap).forEach(key => {
406
+ map.set(key, objectMap[key]);
407
+ });
408
+ return map;
409
+ }
410
+
411
+ class AttributePermissionInfo {
412
+ constructor(editableForPositionsSource) {
413
+ this.ATTRIBUTE_NAME_MARKER = '&';
414
+ this.orgUnits = new Array();
415
+ this.orgUnitAttributes = new Array();
416
+ if (!editableForPositionsSource)
417
+ return;
418
+ editableForPositionsSource.forEach(str => {
419
+ if (str.length > 0 && str[0] === this.ATTRIBUTE_NAME_MARKER) {
420
+ this.orgUnitAttributes.push(str.substring(1));
421
+ }
422
+ else {
423
+ const num = Number(str);
424
+ if (!isNaN(num))
425
+ this.orgUnits.push(num);
426
+ }
427
+ });
428
+ }
429
+ extractAllOrgUnits(obj) {
430
+ const attrMap = objectToMap(obj.attributes);
431
+ return this.extractAllOrgUnitsByAttributes(attrMap);
432
+ }
433
+ extractAllOrgUnitsByAttributes(attributes) {
434
+ let result = new Array();
435
+ if (!this.orgUnitAttributes || !attributes)
436
+ return result;
437
+ this.orgUnitAttributes.forEach(permissionAttributeName => {
438
+ if (attributes.has(permissionAttributeName)) {
439
+ const value = attributes.get(permissionAttributeName);
440
+ if (value && Array.isArray(value)) {
441
+ value.forEach(intValue => {
442
+ result.push(intValue);
443
+ });
444
+ }
445
+ }
446
+ });
447
+ return result;
448
+ }
449
+ }
450
+
451
+ const byteToHex = Array();
452
+ for (let i = 0; i < 256; ++i) {
453
+ byteToHex.push((i + 0x100).toString(16).slice(1));
454
+ }
455
+ class Guid {
456
+ static newGuid() {
457
+ if (window.isSecureContext) {
458
+ // If crypto.getRandomValues is available try to use it.
459
+ return window.crypto.randomUUID();
460
+ }
461
+ // Fall back to Math.random if a higher quality random number generator is not available.
462
+ const uuid = new Array(16);
463
+ var d = new Date().getTime();
464
+ for (var i = 0; i < 16; i++) {
465
+ var r = ((d + Math.random() * 256) % 256) | 0;
466
+ d = Math.trunc(d / 256);
467
+ uuid[i] = r;
468
+ }
469
+ // Makes uuid compliant to RFC-4122
470
+ uuid[6] = (uuid[6] & 0x0F) | 0x40; // uuid version
471
+ uuid[8] = (uuid[8] & 0x3F) | 0x80; // uuid variant
472
+ return this.stringify(uuid);
473
+ }
474
+ static isGuid(str) {
475
+ const regex = new RegExp(this.regex);
476
+ return regex.test(str) && str.length === 36;
477
+ }
478
+ static stringify(arr) {
479
+ return (byteToHex[arr[0]] +
480
+ byteToHex[arr[1]] +
481
+ byteToHex[arr[2]] +
482
+ byteToHex[arr[3]] +
483
+ '-' +
484
+ byteToHex[arr[4]] +
485
+ byteToHex[arr[5]] +
486
+ '-' +
487
+ byteToHex[arr[6]] +
488
+ byteToHex[arr[7]] +
489
+ '-' +
490
+ byteToHex[arr[8]] +
491
+ byteToHex[arr[9]] +
492
+ '-' +
493
+ byteToHex[arr[10]] +
494
+ byteToHex[arr[11]] +
495
+ byteToHex[arr[12]] +
496
+ byteToHex[arr[13]] +
497
+ byteToHex[arr[14]] +
498
+ byteToHex[arr[15]]).toLowerCase();
499
+ }
500
+ }
501
+ 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})";
502
+ Guid.EMPTY = "00000000-0000-0000-0000-000000000000";
503
+
504
+ var AccessLevel;
505
+ (function (AccessLevel) {
506
+ AccessLevel[AccessLevel["None"] = 0] = "None";
507
+ AccessLevel[AccessLevel["Create"] = 1] = "Create";
508
+ AccessLevel[AccessLevel["Edit"] = 2] = "Edit";
509
+ AccessLevel[AccessLevel["View"] = 4] = "View";
510
+ AccessLevel[AccessLevel["Freeze"] = 8] = "Freeze";
511
+ AccessLevel[AccessLevel["Agreement"] = 16] = "Agreement";
512
+ AccessLevel[AccessLevel["Share"] = 32] = "Share";
513
+ AccessLevel[AccessLevel["ViewCreate"] = 5] = "ViewCreate";
514
+ AccessLevel[AccessLevel["ViewEdit"] = 7] = "ViewEdit";
515
+ AccessLevel[AccessLevel["ViewEditAgrement"] = 23] = "ViewEditAgrement";
516
+ AccessLevel[AccessLevel["Full"] = 63] = "Full";
517
+ })(AccessLevel || (AccessLevel = {}));
518
+ var AccessType;
519
+ (function (AccessType) {
520
+ AccessType[AccessType["Allow"] = 0] = "Allow";
521
+ AccessType[AccessType["Deny"] = 1] = "Deny";
522
+ })(AccessType || (AccessType = {}));
523
+ var AccessInheritance;
524
+ (function (AccessInheritance) {
525
+ AccessInheritance[AccessInheritance["None"] = 0] = "None";
526
+ AccessInheritance[AccessInheritance["InheritUntilSecret"] = 1] = "InheritUntilSecret";
527
+ AccessInheritance[AccessInheritance["InheritWholeSubtree"] = 2] = "InheritWholeSubtree";
528
+ })(AccessInheritance || (AccessInheritance = {}));
529
+
530
+ var AttributeType;
531
+ (function (AttributeType) {
532
+ AttributeType[AttributeType["Integer"] = 0] = "Integer";
533
+ AttributeType[AttributeType["Double"] = 1] = "Double";
534
+ AttributeType[AttributeType["DateTime"] = 2] = "DateTime";
535
+ AttributeType[AttributeType["String"] = 3] = "String";
536
+ AttributeType[AttributeType["Decimal"] = 4] = "Decimal";
537
+ AttributeType[AttributeType["Numerator"] = 5] = "Numerator";
538
+ AttributeType[AttributeType["Array"] = 6] = "Array";
539
+ AttributeType[AttributeType["UserState"] = 7] = "UserState";
540
+ AttributeType[AttributeType["OrgUnit"] = 8] = "OrgUnit";
541
+ AttributeType[AttributeType["ElementBook"] = 9] = "ElementBook";
542
+ AttributeType[AttributeType["Guid"] = 10] = "Guid";
543
+ AttributeType[AttributeType["IntegerArray"] = 11] = "IntegerArray";
544
+ AttributeType[AttributeType["Unknown"] = 99] = "Unknown";
545
+ })(AttributeType || (AttributeType = {}));
546
+
547
+ var RelationType;
548
+ (function (RelationType) {
549
+ RelationType[RelationType["SourceFiles"] = 1] = "SourceFiles";
550
+ RelationType[RelationType["TaskInitiatorAttachments"] = 2] = "TaskInitiatorAttachments";
551
+ RelationType[RelationType["TaskExecutorAttachments"] = 3] = "TaskExecutorAttachments";
552
+ RelationType[RelationType["MessageAttachments"] = 4] = "MessageAttachments";
553
+ RelationType[RelationType["Custom"] = 5] = "Custom";
554
+ RelationType[RelationType["TaskAttachments"] = 6] = "TaskAttachments";
555
+ })(RelationType || (RelationType = {}));
556
+ var ObjectState;
557
+ (function (ObjectState) {
558
+ ObjectState[ObjectState["Alive"] = 0] = "Alive";
559
+ ObjectState[ObjectState["InRecycleBin"] = 1] = "InRecycleBin";
560
+ ObjectState[ObjectState["DeletedPermanently"] = 2] = "DeletedPermanently";
561
+ ObjectState[ObjectState["Frozen"] = 3] = "Frozen";
562
+ ObjectState[ObjectState["LockRequested"] = 4] = "LockRequested";
563
+ ObjectState[ObjectState["LockAccepted"] = 5] = "LockAccepted";
564
+ })(ObjectState || (ObjectState = {}));
565
+
566
+ var OrgUnitKind;
567
+ (function (OrgUnitKind) {
568
+ OrgUnitKind[OrgUnitKind["Department"] = 0] = "Department";
569
+ OrgUnitKind[OrgUnitKind["Position"] = 1] = "Position";
570
+ OrgUnitKind[OrgUnitKind["Group"] = 2] = "Group";
571
+ })(OrgUnitKind || (OrgUnitKind = {}));
572
+
573
+ var SubscriptionType;
574
+ (function (SubscriptionType) {
575
+ SubscriptionType[SubscriptionType["Shallow"] = 0] = "Shallow";
576
+ SubscriptionType[SubscriptionType["Deep"] = 1] = "Deep";
577
+ })(SubscriptionType || (SubscriptionType = {}));
578
+
579
+ /*
580
+ * Public API Surface of pilot-web-sdk
581
+ */
582
+
583
+ /**
584
+ * Generated bundle index. Do not edit.
585
+ */
586
+
587
+ export { AccessInheritance, AccessLevel, AccessType, AttributePermissionInfo, AttributeType, DocumentAnnotationsListContext, Guid, ICheckableMenuItemBuilder, IMenu, IMenuBuilder, IMenuItemBuilder, IToolbar, IToolbarBuilder, IToolbarButtonItemBuilder, IToolbarItemSubmenuHandler, IToolbarMenuButtonItemBuilder, IToolbarToggleButtonItemBuilder, ObjectState, ObjectsViewContext, OrgUnitKind, RelationType, RenderContext, SubscriptionType, objectToMap };
588
+ //# sourceMappingURL=pilotdev-pilot-web-sdk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pilotdev-pilot-web-sdk.mjs","sources":["../../../projects/pilot-web-sdk/src/lib/toolbar/toolbar.ts","../../../projects/pilot-web-sdk/src/lib/toolbar/toolbar-item.builder.ts","../../../projects/pilot-web-sdk/src/lib/toolbar/toolbar-item-submenu.handler.ts","../../../projects/pilot-web-sdk/src/lib/toolbar/toolbar-menu-item.builder.ts","../../../projects/pilot-web-sdk/src/lib/toolbar/toolbar-toggle-item.builder.ts","../../../projects/pilot-web-sdk/src/lib/toolbar/toolbar.builder.ts","../../../projects/pilot-web-sdk/src/lib/menu/menu.ts","../../../projects/pilot-web-sdk/src/lib/menu/menu-item.builder.ts","../../../projects/pilot-web-sdk/src/lib/menu/checkable-menu.builder.ts","../../../projects/pilot-web-sdk/src/lib/menu/menu.builder.ts","../../../projects/pilot-web-sdk/src/lib/contexts/context.ts","../../../projects/pilot-web-sdk/src/lib/contexts/document-annotations-list-context.ts","../../../projects/pilot-web-sdk/src/lib/contexts/render-context.ts","../../../projects/pilot-web-sdk/src/lib/tools/utils.ts","../../../projects/pilot-web-sdk/src/lib/tools/attribute-permission.info.ts","../../../projects/pilot-web-sdk/src/lib/tools/guid.ts","../../../projects/pilot-web-sdk/src/lib/data/access.ts","../../../projects/pilot-web-sdk/src/lib/data/attribute.ts","../../../projects/pilot-web-sdk/src/lib/data/data-object.ts","../../../projects/pilot-web-sdk/src/lib/data/organisation-unit.ts","../../../projects/pilot-web-sdk/src/lib/data/subscriptionType.ts","../../../projects/pilot-web-sdk/src/public-api.ts","../../../projects/pilot-web-sdk/src/pilotdev-pilot-web-sdk.ts"],"sourcesContent":["import { IToolbarBuilder } from \"./toolbar.builder\";\n\n/**\n * Interface that allows to add new items to the toolbar\n */\nexport abstract class IToolbar<TToolbarContext> {\n\n constructor() {\n if (this.constructor == IToolbar<TToolbarContext>) {\n throw new Error(\"Abstract classes can't be instantiated.\");\n }\n }\n\n /**\n * The method is called just before the toolbar is created\n * @param builder - the toolbar builder object of associated toolbar\n * @param context - context\n */\n build(builder: IToolbarBuilder, context: TToolbarContext): void {\n throw new Error(\"Method 'build(builder: IToolbarBuilder, context: TToolbarContext)' must be implemented.\");\n }\n\n /**\n * \n * @param name \n * @param context \n */\n onToolbarItemClick(name: string, context: TToolbarContext): void {\n throw new Error(\"Method 'onToolbarItemClick(name: string, context: TToolbarContext)' must be implemented.\");\n }\n}","/**\n * Represents a toolbar button and enables to set parametres to it\n */\nexport abstract class IToolbarButtonItemBuilder {\n \n constructor() {\n if (this.constructor == IToolbarButtonItemBuilder) {\n throw new Error(\"Abstract classes can't be instantiated.\");\n }\n }\n\n /**\n * Item's name to be displayed\n * @param header - value\n * @returns instance of IToolbarButtonItemBuilder\n */\n withHeader(header: string): IToolbarButtonItemBuilder {\n throw new Error(\"Method 'withHeader(header: string)' must be implemented.\");\n }\n\n /**\n * Item's icon in SVG format\n * @param name - icon name\n * @param svg - url icon or base64 string\n */\n withIcon(name: string, svg: string): IToolbarButtonItemBuilder {\n throw new Error(\"Method 'withIcon(name: string, svg: string)' must be implemented.\");\n }\n\n /**\n * Enabled the item\n * @param value - value\n */\n withIsEnabled(value: boolean): IToolbarButtonItemBuilder {\n throw new Error(\"Method 'withIsEnabled(value: boolean)' must be implemented.\");\n }\n\n /**\n * Item's hint\n * @param hint - value\n */\n withHint(hint: string): IToolbarButtonItemBuilder {\n throw new Error(\"Method 'withHint(hint: string)' must be implemented.\");\n }\n}","import { IToolbarBuilder } from \"./toolbar.builder\";\n\nexport abstract class IToolbarItemSubmenuHandler {\n /**\n * Build a submenu\n * @param builder - toolbar builder\n * @returns\n */\n onSubmenuRequested(builder: IToolbarBuilder): void {\n throw new Error(\"Method 'onSubmenuRequested(builder: IToolbarBuilder)' must be implemented.\");\n }\n}","import { IToolbarButtonItemBuilder } from \"./toolbar-item.builder\";\nimport { IToolbarItemSubmenuHandler } from \"./toolbar-item-submenu.handler\";\n\n/**\n * Represents a toolbar menu button and enables to set parametres to it\n */\nexport abstract class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {\n /**\n * Build a dropdown menu\n * @param itemSubmenuHandler - toolbar submenu handler\n * @returns The toolbar button menu builder\n */\n withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler): IToolbarMenuButtonItemBuilder {\n throw new Error(\"Method 'withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.\");\n }\n}","import { IToolbarButtonItemBuilder } from \"./toolbar-item.builder\";\n\n/**\n * Represents a toolbar toggle button and enables to set parametres to it\n */\nexport abstract class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {\n \n /**\n * \n * @param value \n */\n withIsChecked(value: boolean): IToolbarToggleButtonItemBuilder {\n throw new Error(\"Method 'withIsChecked(value: boolean)' must be implemented.\");\n }\n}","import { IToolbarButtonItemBuilder } from \"./toolbar-item.builder\";\nimport { IToolbarItemSubmenuHandler } from \"./toolbar-item-submenu.handler\";\nimport { IToolbarMenuButtonItemBuilder } from \"./toolbar-menu-item.builder\";\nimport { IToolbarToggleButtonItemBuilder } from \"./toolbar-toggle-item.builder\";\n\nexport abstract class IToolbarBuilder {\n\n constructor() {\n if (this.constructor == IToolbarBuilder) {\n throw new Error(\"Abstract classes can't be instantiated.\");\n }\n }\n\n /**\n * Adds a new separator to the associated toolbar\n * @param index - The index to put the new item at\n */\n addSeparator(index: number): void {\n throw new Error(\"Method 'addSeparator(index: number)' must be implemented.\");\n }\n\n /**\n * Adds a new button to the associated toolbar\n * @param name - Internal item's name\n * @param index - The index to put the new item at\n */\n addButtonItem(name: string, index: number): IToolbarButtonItemBuilder {\n throw new Error(\"Method 'addButtonItem(name: string, index: number)' must be implemented.\");\n }\n\n /**\n * Adds a new menu button to the associated toolbar\n * @param name - Internal item's name\n * @param index - The index to put the new item at\n */\n addMenuButtonItem(name: string, index: number): IToolbarMenuButtonItemBuilder {\n throw new Error(\"Method 'addMenuButtonItem(name: string, index: number)' must be implemented.\");\n }\n\n /**\n * Adds a new toggle button to the associated toolbar\n * @param name - Internal item's name\n * @param index - The index to put the new item at\n */\n addToggleButtonItem(name: string, index: number): IToolbarToggleButtonItemBuilder {\n throw new Error(\"Method 'addToggleButtonItem(name: string, index: number)' must be implemented.\");\n }\n\n /**\n * Replaces the item from the associated toolbar on button\n * @param name - The name of toolbar button to replace\n */\n replaceButtonItem(name: string): IToolbarButtonItemBuilder {\n throw new Error(\"Method 'replaceButtonItem(name: string)' must be implemented.\");\n }\n\n /**\n * Replace the item from the associated toolbar on menu button\n * @param name - The name of toolbar menu button to replace \n */\n replaceMenuButtonItem(name: string): IToolbarMenuButtonItemBuilder {\n throw new Error(\"Method 'replaceMenuButtonItem(name: string)' must be implemented.\");\n }\n\n /**\n * Enables to set parametres to menu button item submenu\n * @param name - Item's internal name\n * @param itemSubmenuHandler - The toolbar button menu builder\n */\n handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler): void {\n throw new Error(\"Method 'handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.\");\n }\n\n /**\n * Replaces the item from the associated toolbar on toggle button\n * @param name - The name of toolbar toggle button to replace\n */\n replaceToggleButtonItem(name: string): IToolbarToggleButtonItemBuilder {\n throw new Error(\"Method 'replaceToggleButtonItem(name: string)' must be implemented.\");\n }\n\n /** \n * Gets the list of existing item names of associated toolbar \n * @returns - Existing toolbar item names \n */\n get itemNames(): string[] {\n throw new Error(\"Getter 'itemNames()' must be implemented.\");\n }\n\n /**\n * Gets count of toolbar items\n */\n get count(): number {\n throw new Error(\"Getter 'count()' must be implemented.\");\n }\n\n /**\n * Removes specified item\n * @param itemName - Item's internal name\n */\n removeItem(itemName: string): void {\n throw new Error(\"Method 'removeItem(name: string)' must be implemented.\");\n }\n}","import { IMenuBuilder } from \"./menu.builder\";\n\n/**\n * Interface that allows to add new items to the menu and context menus\n */\nexport abstract class IMenu<TMenuContext> {\n /**\n * The method is called just before the menu is shown\n * @param builder The menu builder object of associated menu\n * @param context Context\n */\n build(builder: IMenuBuilder, context: TMenuContext): void {\n throw new Error(\"Method 'build(builder: IMenuBuilder, context: TMenuContext)' must be implemented.\");\n }\n \n /**\n * \n * @param name \n * @param context \n */\n onMenuItemClick(name: string, context: TMenuContext): void {\n throw new Error(\"Method 'onMenuItemClick(name: string, context: TMenuContext)' must be implemented.\");\n }\n}","import { IMenuBuilder } from \"./menu.builder\";\n\n/**\n * Represents a menu item and enables to set parametres to it\n */\nexport abstract class IMenuItemBuilder {\n\n constructor() {\n if (this.constructor == IMenuItemBuilder) {\n throw new Error(\"Abstract classes can't be instantiated.\");\n }\n }\n\n /**\n * Item's name to be displayed\n * @param header value\n */\n withHeader(header: string): IMenuItemBuilder {\n throw new Error(\"Method 'withHeader(header: string)' must be implemented.\");\n }\n\n /**\n * Item's icon\n * @param name Icon name\n * @param iconSvg Url of icon or base64 string\n */\n withIcon(name: string, iconSvg: string): IMenuItemBuilder {\n throw new Error(\"Method 'withIcon(name: string, iconSvg: string)' must be implemented.\");\n }\n\n /**\n * Enabled the item\n * @param value value\n */\n withIsEnabled(value: boolean): IMenuItemBuilder {\n throw new Error(\"Method 'withIsEnabled(value: boolean)' must be implemented.\");\n }\n \n /**\n * Item's submenu\n */\n withSubmenu(): IMenuBuilder {\n throw new Error(\"Method 'withSubmenu()' must be implemented.\");\n }\n}","import { IMenuItemBuilder } from \"./menu-item.builder\";\n\n/**\n * \n */\nexport abstract class ICheckableMenuItemBuilder extends IMenuItemBuilder {\n \n /**\n * \n * @param value \n */\n withIsChecked(value: boolean): ICheckableMenuItemBuilder {\n throw new Error(\"Method 'withIsChecked(value: boolean)' must be implemented.\");\n }\n}","import { ICheckableMenuItemBuilder } from \"./checkable-menu.builder\";\nimport { IMenuItemBuilder } from \"./menu-item.builder\";\n\n/**\n * Represents a menu and enables to add new items to it\n */\nexport abstract class IMenuBuilder {\n\n constructor() {\n if (this.constructor == IMenuBuilder) {\n throw new Error(\"Abstract classes can't be instantiated.\");\n }\n }\n\n /**\n * Gets the list of existing items of associated menu or subitems of an item\n * @returns Existing menu item names\n */\n get itemNames(): string[] {\n throw new Error(\"Getter 'itemNames()' must be implemented.\");\n }\n\n /**\n * Gets count of menu items\n */\n get count(): number { \n throw new Error(\"Getter 'count()' must be implemented.\");\n }\n\n /**\n * Adds a new separator to the associated menu\n * @param index The index to put the new item at\n */\n addSeparator(index: number): void {\n throw new Error(\"Method 'addSeparator(index: number)' must be implemented.\");\n }\n\n /**\n * Adds a new item to the associated menu\n * @param name Item's internal name\n * @param index The index to put the new item at\n */\n addItem(name: string, index: number): IMenuItemBuilder {\n throw new Error(\"Method 'addItem(name: string, index: number)' must be implemented.\");\n }\n\n /**\n * Adds a new checkable item to the associated menu\n * @param name Item's internal name\n * @param index The index to put the new item at\n */\n addCheckableItem(name: string, index: number): ICheckableMenuItemBuilder {\n throw new Error(\"Method 'addCheckableItem(name: string, index: number)' must be implemented.\");\n }\n\n /**\n * Replaces the item to the associated menu\n * @param name Item's internal name\n */\n replaceItem(name: string): IMenuItemBuilder {\n throw new Error(\"Method 'replaceItem(name: string)' must be implemented.\");\n }\n\n /**\n * Removes the item with the specified name\n * @param name Item's internal name\n */\n removeItem(name: string): void {\n throw new Error(\"Method 'removeItem(name: string)' must be implemented.\");\n }\n\n /**\n * Gets the item\n * @param name Item's internal name\n */\n getItem(name: string): IMenuBuilder {\n throw new Error(\"Method 'getItem(name: string)' must be implemented.\");\n }\n}","import { IDataObject } from \"../data\";\n\n\n/**\n * Contex for objects view\n */\nexport class ObjectsViewContext {\n private readonly _selectedObjects: IDataObject[];\n private readonly _shortcuts: IDataObject[]; \n private readonly _context: IDataObject;\n \n constructor(selectedObjects: IDataObject[], context: IDataObject, shortcuts?: IDataObject[]) {\n this._selectedObjects = selectedObjects;\n this._context = context;\n this._shortcuts = shortcuts ?? [];\n }\n\n /**\n * \n */\n public get selectedObjects(): IDataObject[] {\n return this._selectedObjects;\n }\n\n /**\n * \n */\n public get contextObject(): IDataObject {\n return this._context;\n }\n\n /**\n * \n */\n public get shortcuts(): IDataObject[] {\n return this._shortcuts;\n }\n}","import { IAnnotationContainerObject } from \"../data\";\n\n\n/**\n * Context for document annotations list\n */\nexport class DocumentAnnotationsListContext {\n private readonly _selectedAnnotations: IAnnotationContainerObject[]; \n \n constructor(selectedAnnotations: IAnnotationContainerObject[]) {\n this._selectedAnnotations = selectedAnnotations;\n }\n\n /**\n * \n */\n public get selectedAnnotations(): IAnnotationContainerObject[] {\n return this._selectedAnnotations;\n }\n\n}","import { IDataObject } from \"../data\";\n\n/**\n * Context for xps render\n */\nexport class RenderContext {\n private readonly _dataObject: IDataObject;\n private readonly _selectedVersion: string;\n \n constructor(dataObject: IDataObject, selectedVersion: string) {\n this._dataObject = dataObject;\n this._selectedVersion = selectedVersion;\n }\n\n /**\n * Target object\n */\n public get dataObject(): IDataObject {\n return this._dataObject;\n }\n\n /**\n * Selected version time\n */\n public get selectedVersion(): string {\n return this._selectedVersion;\n }\n}","\nexport function objectToMap<T>(objectMap: { [key: string]: any; }): Map<string, T> {\n const map = new Map<string, T>();\n Object.keys(objectMap).forEach(key => {\n map.set(key, objectMap[key]);\n });\n return map;\n} \n","import { objectToMap } from \"./utils\";\n\nexport class AttributePermissionInfo {\n private ATTRIBUTE_NAME_MARKER = '&';\n \n orgUnits: number[];\n orgUnitAttributes: string[];\n\n constructor(editableForPositionsSource: string[]) {\n this.orgUnits = new Array<number>();\n this.orgUnitAttributes = new Array<string>();\n\n if (!editableForPositionsSource)\n return;\n\n editableForPositionsSource.forEach(str => {\n if (str.length > 0 && str[0] === this.ATTRIBUTE_NAME_MARKER) {\n this.orgUnitAttributes.push(str.substring(1));\n }\n else {\n const num = Number(str);\n if (!isNaN(num)) \n this.orgUnits.push(num);\n }\n });\n }\n\n extractAllOrgUnits(obj: any): number[] {\n const attrMap = objectToMap<any>(obj.attributes);\n return this.extractAllOrgUnitsByAttributes(attrMap);\n }\n\n extractAllOrgUnitsByAttributes(attributes: Map<string, any>) : number[] {\n let result = new Array<number>();\n if (!this.orgUnitAttributes || !attributes )\n return result;\n\n this.orgUnitAttributes.forEach(permissionAttributeName => {\n if (attributes.has(permissionAttributeName)){\n const value = attributes.get(permissionAttributeName);\n if (value && Array.isArray(value)){\n value.forEach(intValue => {\n result.push(intValue);\n });\n }\n }\n });\n\n return result;\n }\n}\n","const byteToHex = Array();\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport class Guid {\n private static readonly regex = \"(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})\";\n\n static readonly EMPTY = \"00000000-0000-0000-0000-000000000000\";\n\n static newGuid(): string {\n\n if (window.isSecureContext) {\n // If crypto.getRandomValues is available try to use it.\n return window.crypto.randomUUID();\n }\n\n // Fall back to Math.random if a higher quality random number generator is not available.\n const uuid = new Array(16);\n var d = new Date().getTime();\n for (var i = 0; i < 16; i++) {\n var r = ((d + Math.random() * 256) % 256) | 0;\n d = Math.trunc(d / 256);\n uuid[i] = r;\n }\n \n // Makes uuid compliant to RFC-4122\n uuid[6] = (uuid[6] & 0x0F) | 0x40; // uuid version\n uuid[8] = (uuid[8] & 0x3F) | 0x80; // uuid variant\n \n return this.stringify(uuid);\n }\n\n static isGuid(str: string) {\n const regex = new RegExp(this.regex);\n return regex.test(str) && str.length === 36;\n }\n\n private static stringify(arr: Array<number>) {\n return (\n byteToHex[arr[0]] +\n byteToHex[arr[1]] +\n byteToHex[arr[2]] +\n byteToHex[arr[3]] +\n '-' +\n byteToHex[arr[4]] +\n byteToHex[arr[5]] +\n '-' +\n byteToHex[arr[6]] +\n byteToHex[arr[7]] +\n '-' +\n byteToHex[arr[8]] +\n byteToHex[arr[9]] +\n '-' +\n byteToHex[arr[10]] +\n byteToHex[arr[11]] +\n byteToHex[arr[12]] +\n byteToHex[arr[13]] +\n byteToHex[arr[14]] +\n byteToHex[arr[15]]\n ).toLowerCase();\n }\n}","export enum AccessLevel {\n None = 0,\n Create = 1 << 0,\n Edit = 1 << 1,\n View = 1 << 2,\n Freeze = 1 << 3,\n Agreement = 1 << 4,\n Share = 1 << 5,\n\n ViewCreate = View | Create,\n ViewEdit = View | Create | Edit,\n ViewEditAgrement = ViewEdit | Agreement,\n Full = View | Create | Edit | Freeze | Agreement | Share\n}\n\nexport enum AccessType {\n Allow,\n Deny\n}\n\nexport enum AccessInheritance {\n None,\n InheritUntilSecret,\n InheritWholeSubtree\n}\n\nexport interface IAccessRecord {\n get orgUnitId(): number;\n get access(): IAccess;\n get recordOwnerPosition(): number;\n get inheritanceSource(): string;\n}\n\nexport interface IAccess {\n get type(): AccessType;\n get accessLevel(): AccessLevel;\n get validThrough(): string;\n get inheritance(): AccessInheritance;\n get typeIds(): number[];\n}\n","\nexport interface IAttribute {\n get name(): string;\n get title(): string;\n get obligatory(): boolean;\n get type(): AttributeType;\n get displayHeight(): number;\n get showInTree(): boolean;\n get displaySortOrder(): number;\n get isService(): boolean;\n get configuration(): string;\n get joinWithPrevious(): boolean;\n get isUnique(): boolean;\n get groupTitle(): string;\n get editableForPositionsSource(): string[];\n}\n\n\nexport enum AttributeType {\n Integer = 0,\n Double = 1,\n DateTime = 2,\n String = 3,\n Decimal = 4,\n Numerator = 5,\n Array = 6,\n UserState = 7,\n OrgUnit = 8,\n ElementBook = 9,\n Guid = 10,\n IntegerArray = 11,\n Unknown = 99\n}","import { AccessLevel, IAccessRecord } from \"./access\";\nimport { IAttribute } from \"./attribute\";\nimport { IFileSnapshot } from \"./files-snapshot\";\nimport { IPerson } from \"./person\";\nimport { IRelation } from \"./relation\";\n\n\nexport enum RelationType {\n SourceFiles = 1,\n TaskInitiatorAttachments = 2,\n TaskExecutorAttachments = 3,\n MessageAttachments = 4,\n Custom = 5,\n TaskAttachments = 6,\n}\n\nexport enum ObjectState {\n Alive,\n InRecycleBin,\n DeletedPermanently,\n Frozen,\n LockRequested,\n LockAccepted\n}\n\nexport interface IDataObject {\n get id(): string;\n get parentId(): string;\n get title(): string;\n get type(): IType;\n get attributes(): { [key: string]: any; };\n get children(): IChild[];\n get creator(): IPerson;\n get created(): string;\n get actualFileSnapshot(): IFileSnapshot;\n get previousFileSnapshots(): IFileSnapshot[];\n get context(): string[];\n get relations(): IRelation[];\n get access(): IAccessRecord[];\n get accessLevels(): { [key: number]: AccessLevel; };\n get stateInfo(): IStateInfo;\n get secretInfo(): ISecretInfo;\n}\n\nexport interface IType {\n get id(): number;\n get title(): string;\n get name(): string;\n get icon(): string;\n get sort(): number;\n get hasFiles(): boolean;\n get children(): number[];\n get attributes(): IAttribute[];\n get isDeleted(): boolean;\n get kind(): number;\n get isMountable(): boolean;\n get isService(): boolean;\n get isProject(): boolean;\n get configuration(): string;\n}\n\nexport interface IChild {\n get objectId(): string;\n get typeId(): number;\n}\n\nexport interface ISecretInfo {\n get isSecret(): boolean;\n get secretParentId(): string;\n get secretChangedBy(): number;\n}\n\nexport interface IStateInfo {\n get state(): ObjectState;\n get date(): string;\n get personId(): number;\n get positionId(): number;\n}","\nexport interface IOrganizationUnit {\n get id(): number;\n get title(): string;\n get kind(): OrgUnitKind;\n get children(): number[];\n get isDeleted(): boolean;\n get isBoss(): boolean;\n get version(): number;\n get person(): number;\n get vicePersons(): number[];\n get isCanceled(): boolean;\n get groupPersons(): number[];\n}\n\nexport enum OrgUnitKind {\n Department = 0,\n Position = 1,\n Group = 2\n}","\nexport enum SubscriptionType {\n Shallow,\n Deep\n}","/*\n * Public API Surface of pilot-web-sdk\n */\nexport * from './lib/idata.plugin';\nexport * from './lib/injectable/index';\nexport * from './lib/toolbar/index';\nexport * from './lib/menu/index';\nexport * from './lib/contexts/index';\nexport * from './lib/tools/index';\nexport * from './lib/data/index';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEA;;AAEG;MACmB,QAAQ,CAAA;AAE5B,IAAA,WAAA,GAAA;A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