@pilotdev/pilot-web-sdk 23.0.0-alpha.1 → 23.0.0-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/lib/context.mjs +11 -0
- package/esm2020/lib/idata.plugin.mjs +2 -0
- package/esm2020/lib/injectable/index.mjs +2 -0
- package/esm2020/lib/injectable/objects.repository.mjs +2 -0
- package/esm2020/lib/menu/checkable-menu.builder.mjs +14 -0
- package/esm2020/lib/menu/index.mjs +5 -0
- package/esm2020/lib/menu/menu-item.builder.mjs +39 -0
- package/esm2020/lib/menu/menu.builder.mjs +68 -0
- package/esm2020/lib/menu/menu.mjs +22 -0
- package/esm2020/lib/toolbar/index.mjs +7 -0
- package/esm2020/lib/toolbar/toolbar-item-submenu.handler.mjs +3 -0
- package/esm2020/lib/toolbar/toolbar-item.builder.mjs +41 -0
- package/esm2020/lib/toolbar/toolbar-menu-item.builder.mjs +15 -0
- package/esm2020/lib/toolbar/toolbar-toggle-item.builder.mjs +14 -0
- package/esm2020/lib/toolbar/toolbar.builder.mjs +88 -0
- package/esm2020/lib/toolbar/toolbar.mjs +27 -0
- package/esm2020/pilotdev-pilot-web-sdk.mjs +5 -0
- package/esm2020/public-api.mjs +9 -0
- package/fesm2015/pilotdev-pilot-web-sdk.mjs +349 -0
- package/fesm2015/pilotdev-pilot-web-sdk.mjs.map +1 -0
- package/fesm2020/pilotdev-pilot-web-sdk.mjs +349 -0
- package/fesm2020/pilotdev-pilot-web-sdk.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/context.d.ts +18 -0
- package/lib/idata.plugin.d.ts +2 -0
- package/lib/injectable/index.d.ts +1 -0
- package/lib/injectable/objects.repository.d.ts +5 -0
- package/lib/menu/checkable-menu.builder.d.ts +11 -0
- package/{src/lib/menu/index.ts → lib/menu/index.d.ts} +1 -2
- package/lib/menu/menu-item.builder.d.ts +27 -0
- package/lib/menu/menu.builder.d.ts +49 -0
- package/lib/menu/menu.d.ts +18 -0
- package/{src/lib/toolbar/index.ts → lib/toolbar/index.d.ts} +1 -2
- package/lib/toolbar/toolbar-item-submenu.handler.d.ts +2 -0
- package/lib/toolbar/toolbar-item.builder.d.ts +28 -0
- package/lib/toolbar/toolbar-menu-item.builder.d.ts +13 -0
- package/lib/toolbar/toolbar-toggle-item.builder.d.ts +11 -0
- package/lib/toolbar/toolbar.builder.d.ts +65 -0
- package/lib/toolbar/toolbar.d.ts +19 -0
- package/package.json +32 -13
- package/{src/public-api.ts → public-api.d.ts} +1 -4
- package/ng-package.json +0 -7
- package/src/lib/context.ts +0 -25
- package/src/lib/idata.plugin.ts +0 -2
- package/src/lib/injectable/index.ts +0 -1
- package/src/lib/injectable/objects.repository.ts +0 -7
- package/src/lib/menu/checkable-menu.builder.ts +0 -15
- package/src/lib/menu/menu-item.builder.ts +0 -45
- package/src/lib/menu/menu.builder.ts +0 -79
- package/src/lib/menu/menu.ts +0 -24
- package/src/lib/toolbar/toolbar-item-submenu.handler.ts +0 -4
- package/src/lib/toolbar/toolbar-item.builder.ts +0 -45
- package/src/lib/toolbar/toolbar-menu-item.builder.ts +0 -16
- package/src/lib/toolbar/toolbar-toggle-item.builder.ts +0 -15
- package/src/lib/toolbar/toolbar.builder.ts +0 -104
- package/src/lib/toolbar/toolbar.ts +0 -31
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
@@ -0,0 +1,349 @@
|
|
1
|
+
/**
|
2
|
+
* Contex for objects view
|
3
|
+
*/
|
4
|
+
class ObjectsViewContext {
|
5
|
+
constructor(selectedObjects, isContext, shortcuts) {
|
6
|
+
this.selectedObjects = selectedObjects;
|
7
|
+
this.isContext = isContext;
|
8
|
+
this.shortcuts = shortcuts;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Interface that allows to add new items to the toolbar
|
14
|
+
*/
|
15
|
+
class IToolbar {
|
16
|
+
constructor() {
|
17
|
+
if (this.constructor == (IToolbar)) {
|
18
|
+
throw new Error("Abstract classes can't be instantiated.");
|
19
|
+
}
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* The method is called just before the toolbar is created
|
23
|
+
* @param builder - the toolbar builder object of associated toolbar
|
24
|
+
* @param context - context
|
25
|
+
*/
|
26
|
+
build(builder, context) {
|
27
|
+
throw new Error("Method 'build(builder: IToolbarBuilder, context: TToolbarContext)' must be implemented.");
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
*
|
31
|
+
* @param name
|
32
|
+
* @param context
|
33
|
+
*/
|
34
|
+
onToolbarItemClick(name, context) {
|
35
|
+
throw new Error("Method 'onToolbarItemClick(name: string, context: TToolbarContext)' must be implemented.");
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Represents a toolbar button and enables to set parametres to it
|
41
|
+
*/
|
42
|
+
class IToolbarButtonItemBuilder {
|
43
|
+
constructor() {
|
44
|
+
if (this.constructor == IToolbarButtonItemBuilder) {
|
45
|
+
throw new Error("Abstract classes can't be instantiated.");
|
46
|
+
}
|
47
|
+
}
|
48
|
+
/**
|
49
|
+
* Item's name to be displayed
|
50
|
+
* @param header - value
|
51
|
+
* @returns instance of IToolbarButtonItemBuilder
|
52
|
+
*/
|
53
|
+
withHeader(header) {
|
54
|
+
throw new Error("Method 'withHeader(header: string)' must be implemented.");
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* Item's icon in SVG format
|
58
|
+
* @param name - icon name
|
59
|
+
* @param svg - url icon or base64 string
|
60
|
+
*/
|
61
|
+
withIcon(name, svg) {
|
62
|
+
throw new Error("Method 'withIcon(name: string, svg: string)' must be implemented.");
|
63
|
+
}
|
64
|
+
/**
|
65
|
+
* Enabled the item
|
66
|
+
* @param value - value
|
67
|
+
*/
|
68
|
+
withIsEnabled(value) {
|
69
|
+
throw new Error("Method 'withIsEnabled(value: boolean)' must be implemented.");
|
70
|
+
}
|
71
|
+
/**
|
72
|
+
* Item's hint
|
73
|
+
* @param hint - value
|
74
|
+
*/
|
75
|
+
withHint(hint) {
|
76
|
+
throw new Error("Method 'withHint(hint: string)' must be implemented.");
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
class IToolbarItemSubmenuHandler {
|
81
|
+
}
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Represents a toolbar menu button and enables to set parametres to it
|
85
|
+
*/
|
86
|
+
class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {
|
87
|
+
/**
|
88
|
+
* Build a dropdown menu
|
89
|
+
* @param itemSubmenuHandler - toolbar submenu handler
|
90
|
+
* @returns The toolbar button menu builder
|
91
|
+
*/
|
92
|
+
withMenu(itemSubmenuHandler) {
|
93
|
+
throw new Error("Method 'withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.");
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
/**
|
98
|
+
* Represents a toolbar toggle button and enables to set parametres to it
|
99
|
+
*/
|
100
|
+
class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {
|
101
|
+
/**
|
102
|
+
*
|
103
|
+
* @param value
|
104
|
+
*/
|
105
|
+
withIsChecked(value) {
|
106
|
+
throw new Error("Method 'withIsChecked(value: boolean)' must be implemented.");
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
class IToolbarBuilder {
|
111
|
+
constructor() {
|
112
|
+
if (this.constructor == IToolbarBuilder) {
|
113
|
+
throw new Error("Abstract classes can't be instantiated.");
|
114
|
+
}
|
115
|
+
}
|
116
|
+
/**
|
117
|
+
* Adds a new separator to the associated toolbar
|
118
|
+
* @param index - The index to put the new item at
|
119
|
+
*/
|
120
|
+
addSeparator(index) {
|
121
|
+
throw new Error("Method 'addSeparator(index: number)' must be implemented.");
|
122
|
+
}
|
123
|
+
/**
|
124
|
+
* Adds a new button to the associated toolbar
|
125
|
+
* @param name - Internal item's name
|
126
|
+
* @param index - The index to put the new item at
|
127
|
+
*/
|
128
|
+
addButtonItem(name, index) {
|
129
|
+
throw new Error("Method 'addButtonItem(name: string, index: number)' must be implemented.");
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Adds a new menu button to the associated toolbar
|
133
|
+
* @param name - Internal item's name
|
134
|
+
* @param index - The index to put the new item at
|
135
|
+
*/
|
136
|
+
addMenuButtonItem(name, index) {
|
137
|
+
throw new Error("Method 'addMenuButtonItem(name: string, index: number)' must be implemented.");
|
138
|
+
}
|
139
|
+
/**
|
140
|
+
* Adds a new toggle button to the associated toolbar
|
141
|
+
* @param name - Internal item's name
|
142
|
+
* @param index - The index to put the new item at
|
143
|
+
*/
|
144
|
+
addToggleButtonItem(name, index) {
|
145
|
+
throw new Error("Method 'addToggleButtonItem(name: string, index: number)' must be implemented.");
|
146
|
+
}
|
147
|
+
/**
|
148
|
+
* Replaces the item from the associated toolbar on button
|
149
|
+
* @param name - The name of toolbar button to replace
|
150
|
+
*/
|
151
|
+
replaceButtonItem(name) {
|
152
|
+
throw new Error("Method 'replaceButtonItem(name: string)' must be implemented.");
|
153
|
+
}
|
154
|
+
/**
|
155
|
+
* Replace the item from the associated toolbar on menu button
|
156
|
+
* @param name - The name of toolbar menu button to replace
|
157
|
+
*/
|
158
|
+
replaceMenuButtonItem(name) {
|
159
|
+
throw new Error("Method 'replaceMenuButtonItem(name: string)' must be implemented.");
|
160
|
+
}
|
161
|
+
/**
|
162
|
+
* Enables to set parametres to menu button item submenu
|
163
|
+
* @param name - Item's internal name
|
164
|
+
* @param itemSubmenuHandler - The toolbar button menu builder
|
165
|
+
*/
|
166
|
+
handleMenuButtonItemSubmenu(name, itemSubmenuHandler) {
|
167
|
+
throw new Error("Method 'handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.");
|
168
|
+
}
|
169
|
+
/**
|
170
|
+
* Replaces the item from the associated toolbar on toggle button
|
171
|
+
* @param name - The name of toolbar toggle button to replace
|
172
|
+
*/
|
173
|
+
replaceToggleButtonItem(name) {
|
174
|
+
throw new Error("Method 'replaceToggleButtonItem(name: string)' must be implemented.");
|
175
|
+
}
|
176
|
+
/**
|
177
|
+
* Gets the list of existing item names of associated toolbar
|
178
|
+
* @returns - Existing toolbar item names
|
179
|
+
*/
|
180
|
+
get itemNames() {
|
181
|
+
throw new Error("Getter 'itemNames()' must be implemented.");
|
182
|
+
}
|
183
|
+
/**
|
184
|
+
* Gets count of toolbar items
|
185
|
+
*/
|
186
|
+
get count() {
|
187
|
+
throw new Error("Getter 'count()' must be implemented.");
|
188
|
+
}
|
189
|
+
/**
|
190
|
+
* Removes specified item
|
191
|
+
* @param itemName - Item's internal name
|
192
|
+
*/
|
193
|
+
removeItem(itemName) {
|
194
|
+
throw new Error("Method 'removeItem(name: string)' must be implemented.");
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Interface that allows to add new items to the menu and context menus
|
200
|
+
*/
|
201
|
+
class IMenu {
|
202
|
+
/**
|
203
|
+
* The method is called just before the menu is shown
|
204
|
+
* @param builder The menu builder object of associated menu
|
205
|
+
* @param context Context
|
206
|
+
*/
|
207
|
+
build(builder, context) {
|
208
|
+
throw new Error("Method 'build(builder: IMenuBuilder, context: TMenuContext)' must be implemented.");
|
209
|
+
}
|
210
|
+
/**
|
211
|
+
*
|
212
|
+
* @param name
|
213
|
+
* @param context
|
214
|
+
*/
|
215
|
+
onMenuItemClick(name, context) {
|
216
|
+
throw new Error("Method 'onMenuItemClick(name: string, context: TMenuContext)' must be implemented.");
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
/**
|
221
|
+
* Represents a menu item and enables to set parametres to it
|
222
|
+
*/
|
223
|
+
class IMenuItemBuilder {
|
224
|
+
constructor() {
|
225
|
+
if (this.constructor == IMenuItemBuilder) {
|
226
|
+
throw new Error("Abstract classes can't be instantiated.");
|
227
|
+
}
|
228
|
+
}
|
229
|
+
/**
|
230
|
+
* Item's name to be displayed
|
231
|
+
* @param header value
|
232
|
+
*/
|
233
|
+
withHeader(header) {
|
234
|
+
throw new Error("Method 'withHeader(header: string)' must be implemented.");
|
235
|
+
}
|
236
|
+
/**
|
237
|
+
* Item's icon
|
238
|
+
* @param name Icon name
|
239
|
+
* @param iconSvg Url of icon or base64 string
|
240
|
+
*/
|
241
|
+
withIcon(name, iconSvg) {
|
242
|
+
throw new Error("Method 'withIcon(name: string, iconSvg: string)' must be implemented.");
|
243
|
+
}
|
244
|
+
/**
|
245
|
+
* Enabled the item
|
246
|
+
* @param value value
|
247
|
+
*/
|
248
|
+
withIsEnabled(value) {
|
249
|
+
throw new Error("Method 'withIsEnabled(value: boolean)' must be implemented.");
|
250
|
+
}
|
251
|
+
/**
|
252
|
+
* Item's submenu
|
253
|
+
*/
|
254
|
+
withSubmenu() {
|
255
|
+
throw new Error("Method 'withSubmenu()' must be implemented.");
|
256
|
+
}
|
257
|
+
}
|
258
|
+
|
259
|
+
/**
|
260
|
+
*
|
261
|
+
*/
|
262
|
+
class ICheckableMenuItemBuilder extends IMenuItemBuilder {
|
263
|
+
/**
|
264
|
+
*
|
265
|
+
* @param value
|
266
|
+
*/
|
267
|
+
withIsChecked(value) {
|
268
|
+
throw new Error("Method 'withIsChecked(value: boolean)' must be implemented.");
|
269
|
+
}
|
270
|
+
}
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Represents a menu and enables to add new items to it
|
274
|
+
*/
|
275
|
+
class IMenuBuilder {
|
276
|
+
constructor() {
|
277
|
+
if (this.constructor == IMenuBuilder) {
|
278
|
+
throw new Error("Abstract classes can't be instantiated.");
|
279
|
+
}
|
280
|
+
}
|
281
|
+
/**
|
282
|
+
* Gets the list of existing items of associated menu or subitems of an item
|
283
|
+
* @returns Existing menu item names
|
284
|
+
*/
|
285
|
+
get itemNames() {
|
286
|
+
throw new Error("Getter 'itemNames()' must be implemented.");
|
287
|
+
}
|
288
|
+
/**
|
289
|
+
* Gets count of menu items
|
290
|
+
*/
|
291
|
+
get count() {
|
292
|
+
throw new Error("Getter 'count()' must be implemented.");
|
293
|
+
}
|
294
|
+
/**
|
295
|
+
* Adds a new separator to the associated menu
|
296
|
+
* @param index The index to put the new item at
|
297
|
+
*/
|
298
|
+
addSeparator(index) {
|
299
|
+
throw new Error("Method 'addSeparator(index: number)' must be implemented.");
|
300
|
+
}
|
301
|
+
/**
|
302
|
+
* Adds a new item to the associated menu
|
303
|
+
* @param name Item's internal name
|
304
|
+
* @param index The index to put the new item at
|
305
|
+
*/
|
306
|
+
addItem(name, index) {
|
307
|
+
throw new Error("Method 'addItem(name: string, index: number)' must be implemented.");
|
308
|
+
}
|
309
|
+
/**
|
310
|
+
* Adds a new checkable item to the associated menu
|
311
|
+
* @param name Item's internal name
|
312
|
+
* @param index The index to put the new item at
|
313
|
+
*/
|
314
|
+
addCheckableItem(name, index) {
|
315
|
+
throw new Error("Method 'addCheckableItem(name: string, index: number)' must be implemented.");
|
316
|
+
}
|
317
|
+
/**
|
318
|
+
* Replaces the item to the associated menu
|
319
|
+
* @param name Item's internal name
|
320
|
+
*/
|
321
|
+
replaceItem(name) {
|
322
|
+
throw new Error("Method 'replaceItem(name: string)' must be implemented.");
|
323
|
+
}
|
324
|
+
/**
|
325
|
+
* Removes the item with the specified name
|
326
|
+
* @param name Item's internal name
|
327
|
+
*/
|
328
|
+
removeItem(name) {
|
329
|
+
throw new Error("Method 'removeItem(name: string)' must be implemented.");
|
330
|
+
}
|
331
|
+
/**
|
332
|
+
* Gets the item
|
333
|
+
* @param name Item's internal name
|
334
|
+
*/
|
335
|
+
getItem(name) {
|
336
|
+
throw new Error("Method 'getItem(name: string)' must be implemented.");
|
337
|
+
}
|
338
|
+
}
|
339
|
+
|
340
|
+
/*
|
341
|
+
* Public API Surface of pilot-web-sdk
|
342
|
+
*/
|
343
|
+
|
344
|
+
/**
|
345
|
+
* Generated bundle index. Do not edit.
|
346
|
+
*/
|
347
|
+
|
348
|
+
export { ICheckableMenuItemBuilder, IMenu, IMenuBuilder, IMenuItemBuilder, IToolbar, IToolbarBuilder, IToolbarButtonItemBuilder, IToolbarItemSubmenuHandler, IToolbarMenuButtonItemBuilder, IToolbarToggleButtonItemBuilder, ObjectsViewContext };
|
349
|
+
//# 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/context.ts","../../../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/public-api.ts","../../../projects/pilot-web-sdk/src/pilotdev-pilot-web-sdk.ts"],"sourcesContent":["/**\r\n * Contex for objects view\r\n */\r\nexport class ObjectsViewContext {\r\n \r\n constructor(selectedObjects: any[], isContext: boolean, shortcuts?: any[]) {\r\n this.selectedObjects = selectedObjects;\r\n this.isContext = isContext;\r\n this.shortcuts = shortcuts;\r\n }\r\n\r\n /**\r\n * \r\n */\r\n readonly selectedObjects: any[]; // IDataObject[]\r\n\r\n /**\r\n * \r\n */\r\n readonly isContext: boolean;\r\n /**\r\n * \r\n */\r\n readonly shortcuts: any[]; // IDataObject[]\r\n}","import { IToolbarBuilder } from \"./toolbar.builder\";\r\n\r\n/**\r\n * Interface that allows to add new items to the toolbar\r\n */\r\nexport abstract class IToolbar<TToolbarContext> {\r\n\r\n constructor() {\r\n if (this.constructor == IToolbar<TToolbarContext>) {\r\n throw new Error(\"Abstract classes can't be instantiated.\");\r\n }\r\n }\r\n\r\n /**\r\n * The method is called just before the toolbar is created\r\n * @param builder - the toolbar builder object of associated toolbar\r\n * @param context - context\r\n */\r\n build(builder: IToolbarBuilder, context: TToolbarContext): void {\r\n throw new Error(\"Method 'build(builder: IToolbarBuilder, context: TToolbarContext)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * \r\n * @param name \r\n * @param context \r\n */\r\n onToolbarItemClick(name: string, context: TToolbarContext): void {\r\n throw new Error(\"Method 'onToolbarItemClick(name: string, context: TToolbarContext)' must be implemented.\");\r\n }\r\n}","/**\r\n * Represents a toolbar button and enables to set parametres to it\r\n */\r\nexport abstract class IToolbarButtonItemBuilder {\r\n \r\n constructor() {\r\n if (this.constructor == IToolbarButtonItemBuilder) {\r\n throw new Error(\"Abstract classes can't be instantiated.\");\r\n }\r\n }\r\n\r\n /**\r\n * Item's name to be displayed\r\n * @param header - value\r\n * @returns instance of IToolbarButtonItemBuilder\r\n */\r\n withHeader(header: string): IToolbarButtonItemBuilder {\r\n throw new Error(\"Method 'withHeader(header: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Item's icon in SVG format\r\n * @param name - icon name\r\n * @param svg - url icon or base64 string\r\n */\r\n withIcon(name: string, svg: string): IToolbarButtonItemBuilder {\r\n throw new Error(\"Method 'withIcon(name: string, svg: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Enabled the item\r\n * @param value - value\r\n */\r\n withIsEnabled(value: boolean): IToolbarButtonItemBuilder {\r\n throw new Error(\"Method 'withIsEnabled(value: boolean)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Item's hint\r\n * @param hint - value\r\n */\r\n withHint(hint: string): IToolbarButtonItemBuilder {\r\n throw new Error(\"Method 'withHint(hint: string)' must be implemented.\");\r\n }\r\n}","\r\nexport abstract class IToolbarItemSubmenuHandler {\r\n \r\n}","import { IToolbarButtonItemBuilder } from \"./toolbar-item.builder\";\r\nimport { IToolbarItemSubmenuHandler } from \"./toolbar-item-submenu.handler\";\r\n\r\n/**\r\n * Represents a toolbar menu button and enables to set parametres to it\r\n */\r\nexport abstract class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {\r\n /**\r\n * Build a dropdown menu\r\n * @param itemSubmenuHandler - toolbar submenu handler\r\n * @returns The toolbar button menu builder\r\n */\r\n withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler): IToolbarMenuButtonItemBuilder {\r\n throw new Error(\"Method 'withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.\");\r\n }\r\n}","import { IToolbarButtonItemBuilder } from \"./toolbar-item.builder\";\r\n\r\n/**\r\n * Represents a toolbar toggle button and enables to set parametres to it\r\n */\r\nexport abstract class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {\r\n \r\n /**\r\n * \r\n * @param value \r\n */\r\n withIsChecked(value: boolean): IToolbarToggleButtonItemBuilder {\r\n throw new Error(\"Method 'withIsChecked(value: boolean)' must be implemented.\");\r\n }\r\n}","import { IToolbarButtonItemBuilder } from \"./toolbar-item.builder\";\r\nimport { IToolbarItemSubmenuHandler } from \"./toolbar-item-submenu.handler\";\r\nimport { IToolbarMenuButtonItemBuilder } from \"./toolbar-menu-item.builder\";\r\nimport { IToolbarToggleButtonItemBuilder } from \"./toolbar-toggle-item.builder\";\r\n\r\nexport abstract class IToolbarBuilder {\r\n\r\n constructor() {\r\n if (this.constructor == IToolbarBuilder) {\r\n throw new Error(\"Abstract classes can't be instantiated.\");\r\n }\r\n }\r\n\r\n /**\r\n * Adds a new separator to the associated toolbar\r\n * @param index - The index to put the new item at\r\n */\r\n addSeparator(index: number): void {\r\n throw new Error(\"Method 'addSeparator(index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Adds a new button to the associated toolbar\r\n * @param name - Internal item's name\r\n * @param index - The index to put the new item at\r\n */\r\n addButtonItem(name: string, index: number): IToolbarButtonItemBuilder {\r\n throw new Error(\"Method 'addButtonItem(name: string, index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Adds a new menu button to the associated toolbar\r\n * @param name - Internal item's name\r\n * @param index - The index to put the new item at\r\n */\r\n addMenuButtonItem(name: string, index: number): IToolbarMenuButtonItemBuilder {\r\n throw new Error(\"Method 'addMenuButtonItem(name: string, index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Adds a new toggle button to the associated toolbar\r\n * @param name - Internal item's name\r\n * @param index - The index to put the new item at\r\n */\r\n addToggleButtonItem(name: string, index: number): IToolbarToggleButtonItemBuilder {\r\n throw new Error(\"Method 'addToggleButtonItem(name: string, index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Replaces the item from the associated toolbar on button\r\n * @param name - The name of toolbar button to replace\r\n */\r\n replaceButtonItem(name: string): IToolbarButtonItemBuilder {\r\n throw new Error(\"Method 'replaceButtonItem(name: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Replace the item from the associated toolbar on menu button\r\n * @param name - The name of toolbar menu button to replace \r\n */\r\n replaceMenuButtonItem(name: string): IToolbarMenuButtonItemBuilder {\r\n throw new Error(\"Method 'replaceMenuButtonItem(name: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Enables to set parametres to menu button item submenu\r\n * @param name - Item's internal name\r\n * @param itemSubmenuHandler - The toolbar button menu builder\r\n */\r\n handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler): void {\r\n throw new Error(\"Method 'handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Replaces the item from the associated toolbar on toggle button\r\n * @param name - The name of toolbar toggle button to replace\r\n */\r\n replaceToggleButtonItem(name: string): IToolbarToggleButtonItemBuilder {\r\n throw new Error(\"Method 'replaceToggleButtonItem(name: string)' must be implemented.\");\r\n }\r\n\r\n /** \r\n * Gets the list of existing item names of associated toolbar \r\n * @returns - Existing toolbar item names \r\n */\r\n get itemNames(): string[] {\r\n throw new Error(\"Getter 'itemNames()' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Gets count of toolbar items\r\n */\r\n get count(): number {\r\n throw new Error(\"Getter 'count()' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Removes specified item\r\n * @param itemName - Item's internal name\r\n */\r\n removeItem(itemName: string): void {\r\n throw new Error(\"Method 'removeItem(name: string)' must be implemented.\");\r\n }\r\n}","import { IMenuBuilder } from \"./menu.builder\";\r\n\r\n/**\r\n * Interface that allows to add new items to the menu and context menus\r\n */\r\nexport abstract class IMenu<TMenuContext> {\r\n /**\r\n * The method is called just before the menu is shown\r\n * @param builder The menu builder object of associated menu\r\n * @param context Context\r\n */\r\n build(builder: IMenuBuilder, context: TMenuContext): void {\r\n throw new Error(\"Method 'build(builder: IMenuBuilder, context: TMenuContext)' must be implemented.\");\r\n }\r\n \r\n /**\r\n * \r\n * @param name \r\n * @param context \r\n */\r\n onMenuItemClick(name: string, context: TMenuContext): void {\r\n throw new Error(\"Method 'onMenuItemClick(name: string, context: TMenuContext)' must be implemented.\");\r\n }\r\n}","import { IMenuBuilder } from \"./menu.builder\";\r\n\r\n/**\r\n * Represents a menu item and enables to set parametres to it\r\n */\r\nexport abstract class IMenuItemBuilder {\r\n\r\n constructor() {\r\n if (this.constructor == IMenuItemBuilder) {\r\n throw new Error(\"Abstract classes can't be instantiated.\");\r\n }\r\n }\r\n\r\n /**\r\n * Item's name to be displayed\r\n * @param header value\r\n */\r\n withHeader(header: string): IMenuItemBuilder {\r\n throw new Error(\"Method 'withHeader(header: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Item's icon\r\n * @param name Icon name\r\n * @param iconSvg Url of icon or base64 string\r\n */\r\n withIcon(name: string, iconSvg: string): IMenuItemBuilder {\r\n throw new Error(\"Method 'withIcon(name: string, iconSvg: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Enabled the item\r\n * @param value value\r\n */\r\n withIsEnabled(value: boolean): IMenuItemBuilder {\r\n throw new Error(\"Method 'withIsEnabled(value: boolean)' must be implemented.\");\r\n }\r\n \r\n /**\r\n * Item's submenu\r\n */\r\n withSubmenu(): IMenuBuilder {\r\n throw new Error(\"Method 'withSubmenu()' must be implemented.\");\r\n }\r\n}","import { IMenuItemBuilder } from \"./menu-item.builder\";\r\n\r\n/**\r\n * \r\n */\r\nexport abstract class ICheckableMenuItemBuilder extends IMenuItemBuilder {\r\n \r\n /**\r\n * \r\n * @param value \r\n */\r\n withIsChecked(value: boolean): ICheckableMenuItemBuilder {\r\n throw new Error(\"Method 'withIsChecked(value: boolean)' must be implemented.\");\r\n }\r\n}","import { ICheckableMenuItemBuilder } from \"./checkable-menu.builder\";\r\nimport { IMenuItemBuilder } from \"./menu-item.builder\";\r\n\r\n/**\r\n * Represents a menu and enables to add new items to it\r\n */\r\nexport abstract class IMenuBuilder {\r\n\r\n constructor() {\r\n if (this.constructor == IMenuBuilder) {\r\n throw new Error(\"Abstract classes can't be instantiated.\");\r\n }\r\n }\r\n\r\n /**\r\n * Gets the list of existing items of associated menu or subitems of an item\r\n * @returns Existing menu item names\r\n */\r\n get itemNames(): string[] {\r\n throw new Error(\"Getter 'itemNames()' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Gets count of menu items\r\n */\r\n get count(): number { \r\n throw new Error(\"Getter 'count()' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Adds a new separator to the associated menu\r\n * @param index The index to put the new item at\r\n */\r\n addSeparator(index: number): void {\r\n throw new Error(\"Method 'addSeparator(index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Adds a new item to the associated menu\r\n * @param name Item's internal name\r\n * @param index The index to put the new item at\r\n */\r\n addItem(name: string, index: number): IMenuItemBuilder {\r\n throw new Error(\"Method 'addItem(name: string, index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Adds a new checkable item to the associated menu\r\n * @param name Item's internal name\r\n * @param index The index to put the new item at\r\n */\r\n addCheckableItem(name: string, index: number): ICheckableMenuItemBuilder {\r\n throw new Error(\"Method 'addCheckableItem(name: string, index: number)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Replaces the item to the associated menu\r\n * @param name Item's internal name\r\n */\r\n replaceItem(name: string): IMenuItemBuilder {\r\n throw new Error(\"Method 'replaceItem(name: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Removes the item with the specified name\r\n * @param name Item's internal name\r\n */\r\n removeItem(name: string): void {\r\n throw new Error(\"Method 'removeItem(name: string)' must be implemented.\");\r\n }\r\n\r\n /**\r\n * Gets the item\r\n * @param name Item's internal name\r\n */\r\n getItem(name: string): IMenuBuilder {\r\n throw new Error(\"Method 'getItem(name: string)' must be implemented.\");\r\n }\r\n}","/*\r\n * Public API Surface of pilot-web-sdk\r\n */\r\nexport * from './lib/context';\r\nexport * from './lib/idata.plugin';\r\nexport * from './lib/injectable/index';\r\nexport * from './lib/toolbar/index';\r\nexport * from './lib/menu/index';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;AAEG;MACU,kBAAkB,CAAA;AAE7B,IAAA,WAAA,CAAY,eAAsB,EAAE,SAAkB,EAAE,SAAiB,EAAA;AACvE,QAAA,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;AACvC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC5B;AAeF;;ACtBD;;AAEG;MACmB,QAAQ,CAAA;AAE5B,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,IAAI,CAAC,WAAW,KAAI,QAAyB,CAAA,EAAE;AACjD,YAAA,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAC5D,SAAA;KACF;AAED;;;;AAIG;IACH,KAAK,CAAC,OAAwB,EAAE,OAAwB,EAAA;AACtD,QAAA,MAAM,IAAI,KAAK,CAAC,yFAAyF,CAAC,CAAC;KAC5G;AAED;;;;AAIG;IACH,kBAAkB,CAAC,IAAY,EAAE,OAAw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