@pilotdev/pilot-web-sdk 23.0.0-alpha.2 → 24.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/esm2020/lib/contexts/context.mjs +29 -0
- package/esm2020/lib/contexts/document-annotations-list-context.mjs +15 -0
- package/esm2020/lib/contexts/index.mjs +4 -0
- package/esm2020/lib/contexts/render-context.mjs +22 -0
- package/esm2020/lib/data/access.mjs +26 -0
- package/esm2020/lib/data/annotations.mjs +2 -0
- package/esm2020/lib/data/attribute.mjs +17 -0
- package/esm2020/lib/data/data-object.mjs +19 -0
- package/esm2020/lib/data/file.mjs +2 -0
- package/esm2020/lib/data/files-snapshot.mjs +2 -0
- package/esm2020/lib/data/index.mjs +13 -0
- package/esm2020/lib/data/modifier.mjs +2 -0
- package/esm2020/lib/data/object-builder.mjs +2 -0
- package/esm2020/lib/data/organisation-unit.mjs +7 -0
- package/esm2020/lib/data/person.mjs +2 -0
- package/esm2020/lib/data/relation.mjs +2 -0
- package/esm2020/lib/data/subscriptionType.mjs +6 -0
- package/esm2020/lib/idata.plugin.mjs +2 -2
- package/esm2020/lib/injectable/index.mjs +5 -2
- package/esm2020/lib/injectable/modifier-provider.mjs +2 -0
- package/esm2020/lib/injectable/objects-repository.mjs +2 -0
- package/esm2020/lib/injectable/render-context-provider.mjs +2 -0
- package/esm2020/lib/injectable/repository-events.mjs +2 -0
- package/esm2020/lib/menu/checkable-menu.builder.mjs +14 -14
- package/esm2020/lib/menu/index.mjs +5 -5
- package/esm2020/lib/menu/menu-item.builder.mjs +39 -39
- package/esm2020/lib/menu/menu.builder.mjs +68 -68
- package/esm2020/lib/menu/menu.mjs +22 -22
- package/esm2020/lib/toolbar/index.mjs +7 -7
- package/esm2020/lib/toolbar/toolbar-item-submenu.handler.mjs +11 -3
- package/esm2020/lib/toolbar/toolbar-item.builder.mjs +41 -41
- package/esm2020/lib/toolbar/toolbar-menu-item.builder.mjs +15 -15
- package/esm2020/lib/toolbar/toolbar-toggle-item.builder.mjs +14 -14
- package/esm2020/lib/toolbar/toolbar.builder.mjs +88 -88
- package/esm2020/lib/toolbar/toolbar.mjs +27 -27
- package/esm2020/lib/tools/attribute-permission.info.mjs +41 -0
- package/esm2020/lib/tools/guid.mjs +53 -0
- package/esm2020/lib/tools/index.mjs +4 -0
- package/esm2020/lib/tools/utils.mjs +8 -0
- package/esm2020/pilotdev-pilot-web-sdk.mjs +4 -4
- package/esm2020/public-api.mjs +11 -9
- package/fesm2015/pilotdev-pilot-web-sdk.mjs +561 -322
- package/fesm2015/pilotdev-pilot-web-sdk.mjs.map +1 -1
- package/fesm2020/pilotdev-pilot-web-sdk.mjs +561 -322
- package/fesm2020/pilotdev-pilot-web-sdk.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/contexts/context.d.ts +22 -0
- package/lib/contexts/document-annotations-list-context.d.ts +12 -0
- package/lib/contexts/index.d.ts +3 -0
- package/lib/contexts/render-context.d.ts +17 -0
- package/lib/data/access.d.ts +35 -0
- package/lib/data/annotations.d.ts +15 -0
- package/lib/data/attribute.d.ts +30 -0
- package/lib/data/data-object.d.ts +74 -0
- package/lib/data/file.d.ts +23 -0
- package/lib/data/files-snapshot.d.ts +8 -0
- package/lib/data/index.d.ts +12 -0
- package/lib/data/modifier.d.ts +30 -0
- package/lib/data/object-builder.d.ts +110 -0
- package/lib/data/organisation-unit.d.ts +18 -0
- package/lib/data/person.d.ts +17 -0
- package/lib/data/relation.d.ts +8 -0
- package/lib/data/subscriptionType.d.ts +4 -0
- package/lib/idata.plugin.d.ts +2 -2
- package/lib/injectable/index.d.ts +4 -1
- package/lib/injectable/modifier-provider.d.ts +10 -0
- package/lib/injectable/objects-repository.d.ts +72 -0
- package/lib/injectable/render-context-provider.d.ts +10 -0
- package/lib/injectable/repository-events.d.ts +31 -0
- package/lib/menu/checkable-menu.builder.d.ts +11 -11
- package/lib/menu/index.d.ts +4 -4
- package/lib/menu/menu-item.builder.d.ts +27 -27
- package/lib/menu/menu.builder.d.ts +49 -49
- package/lib/menu/menu.d.ts +18 -18
- package/lib/toolbar/index.d.ts +6 -6
- package/lib/toolbar/toolbar-item-submenu.handler.d.ts +9 -2
- package/lib/toolbar/toolbar-item.builder.d.ts +28 -28
- package/lib/toolbar/toolbar-menu-item.builder.d.ts +13 -13
- package/lib/toolbar/toolbar-toggle-item.builder.d.ts +11 -11
- package/lib/toolbar/toolbar.builder.d.ts +65 -65
- package/lib/toolbar/toolbar.d.ts +19 -19
- package/lib/tools/attribute-permission.info.d.ts +8 -0
- package/lib/tools/guid.d.ts +7 -0
- package/lib/tools/index.d.ts +3 -0
- package/lib/tools/utils.d.ts +3 -0
- package/package.json +5 -5
- package/public-api.d.ts +7 -5
- package/esm2020/lib/context.mjs +0 -11
- package/esm2020/lib/injectable/objects.repository.mjs +0 -2
- package/lib/context.d.ts +0 -18
- package/lib/injectable/objects.repository.d.ts +0 -5
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { AccessLevel } from "../data/access";
|
|
3
|
+
import { IDataObject, IPerson, IType, IOrganizationUnit } from "../data";
|
|
4
|
+
/**
|
|
5
|
+
* Represents the repository that provides access to objects, types, organisation units and people
|
|
6
|
+
*/
|
|
7
|
+
export interface IObjectsRepository {
|
|
8
|
+
/**
|
|
9
|
+
* Get objects with specified ids
|
|
10
|
+
*
|
|
11
|
+
* @param ids Ids of objects to subsribe
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
getObjects(ids: string[]): Observable<IDataObject[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Get object's access for the person
|
|
17
|
+
*
|
|
18
|
+
* @param objectId Object id
|
|
19
|
+
* @param personId Person Id
|
|
20
|
+
* @returns Cold Observable
|
|
21
|
+
*/
|
|
22
|
+
getCurrentAccess(objectId: string, personId: number): Observable<AccessLevel>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the person with specified id
|
|
25
|
+
*
|
|
26
|
+
* @param id Person id
|
|
27
|
+
* @returns Person
|
|
28
|
+
*/
|
|
29
|
+
getPerson(id: number): IPerson;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the current person
|
|
32
|
+
*
|
|
33
|
+
* @returns Person
|
|
34
|
+
*/
|
|
35
|
+
getCurrentPerson(): IPerson;
|
|
36
|
+
/**
|
|
37
|
+
* Gets all the people registred in database
|
|
38
|
+
*
|
|
39
|
+
* @returns Person[]
|
|
40
|
+
*/
|
|
41
|
+
getPeople(): IPerson[];
|
|
42
|
+
/**
|
|
43
|
+
* Gets type by identifier
|
|
44
|
+
*
|
|
45
|
+
* @returns Type
|
|
46
|
+
*/
|
|
47
|
+
getType(id: number): IType;
|
|
48
|
+
/**
|
|
49
|
+
* Gets type by name
|
|
50
|
+
*
|
|
51
|
+
* @returns Type
|
|
52
|
+
*/
|
|
53
|
+
getTypeByName(name: string): IType;
|
|
54
|
+
/**
|
|
55
|
+
* Gets all the types registered in database
|
|
56
|
+
*
|
|
57
|
+
* @returns Type[]
|
|
58
|
+
*/
|
|
59
|
+
getTypes(): IType[];
|
|
60
|
+
/**
|
|
61
|
+
* Gets organisation unit by identifier
|
|
62
|
+
*
|
|
63
|
+
* @returns OrganisationUnit
|
|
64
|
+
*/
|
|
65
|
+
getOrganisationUnit(id: number): IOrganizationUnit;
|
|
66
|
+
/**
|
|
67
|
+
* Get all the organisation units registered in database
|
|
68
|
+
*
|
|
69
|
+
* @returns OrganisationUnit
|
|
70
|
+
*/
|
|
71
|
+
getOrganisationUnits(): IOrganizationUnit[];
|
|
72
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { IDataObject, IPerson, IType, IOrganizationUnit } from "../data";
|
|
3
|
+
/**
|
|
4
|
+
* Notifies on change events
|
|
5
|
+
*/
|
|
6
|
+
export interface IRepositoryEvents {
|
|
7
|
+
/**
|
|
8
|
+
* Subsribes to changes in objects with specified identifiers
|
|
9
|
+
*
|
|
10
|
+
* @returns Hot observable
|
|
11
|
+
*/
|
|
12
|
+
subscribeObjects(ids: string[]): Observable<IDataObject>;
|
|
13
|
+
/**
|
|
14
|
+
* Subsribes to changes in people
|
|
15
|
+
*
|
|
16
|
+
* @returns Hot observable
|
|
17
|
+
*/
|
|
18
|
+
subscribePeople(): Observable<IPerson>;
|
|
19
|
+
/**
|
|
20
|
+
* Subsribes to changes in types
|
|
21
|
+
*
|
|
22
|
+
* @returns Hot observable
|
|
23
|
+
*/
|
|
24
|
+
subscribeTypes(): Observable<IType>;
|
|
25
|
+
/**
|
|
26
|
+
* Subsribes to changes in organisation units
|
|
27
|
+
*
|
|
28
|
+
* @returns Hot observable
|
|
29
|
+
*/
|
|
30
|
+
subscribeOrganisationUnits(): Observable<IOrganizationUnit>;
|
|
31
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IMenuItemBuilder } from "./menu-item.builder";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class ICheckableMenuItemBuilder extends IMenuItemBuilder {
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param value
|
|
9
|
-
*/
|
|
10
|
-
withIsChecked(value: boolean): ICheckableMenuItemBuilder;
|
|
11
|
-
}
|
|
1
|
+
import { IMenuItemBuilder } from "./menu-item.builder";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class ICheckableMenuItemBuilder extends IMenuItemBuilder {
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param value
|
|
9
|
+
*/
|
|
10
|
+
withIsChecked(value: boolean): ICheckableMenuItemBuilder;
|
|
11
|
+
}
|
package/lib/menu/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './menu';
|
|
2
|
-
export * from './checkable-menu.builder';
|
|
3
|
-
export * from './menu-item.builder';
|
|
4
|
-
export * from './menu.builder';
|
|
1
|
+
export * from './menu';
|
|
2
|
+
export * from './checkable-menu.builder';
|
|
3
|
+
export * from './menu-item.builder';
|
|
4
|
+
export * from './menu.builder';
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { IMenuBuilder } from "./menu.builder";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a menu item and enables to set parametres to it
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class IMenuItemBuilder {
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* Item's name to be displayed
|
|
9
|
-
* @param header value
|
|
10
|
-
*/
|
|
11
|
-
withHeader(header: string): IMenuItemBuilder;
|
|
12
|
-
/**
|
|
13
|
-
* Item's icon
|
|
14
|
-
* @param name Icon name
|
|
15
|
-
* @param iconSvg Url of icon or base64 string
|
|
16
|
-
*/
|
|
17
|
-
withIcon(name: string, iconSvg: string): IMenuItemBuilder;
|
|
18
|
-
/**
|
|
19
|
-
* Enabled the item
|
|
20
|
-
* @param value value
|
|
21
|
-
*/
|
|
22
|
-
withIsEnabled(value: boolean): IMenuItemBuilder;
|
|
23
|
-
/**
|
|
24
|
-
* Item's submenu
|
|
25
|
-
*/
|
|
26
|
-
withSubmenu(): IMenuBuilder;
|
|
27
|
-
}
|
|
1
|
+
import { IMenuBuilder } from "./menu.builder";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a menu item and enables to set parametres to it
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class IMenuItemBuilder {
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* Item's name to be displayed
|
|
9
|
+
* @param header value
|
|
10
|
+
*/
|
|
11
|
+
withHeader(header: string): IMenuItemBuilder;
|
|
12
|
+
/**
|
|
13
|
+
* Item's icon
|
|
14
|
+
* @param name Icon name
|
|
15
|
+
* @param iconSvg Url of icon or base64 string
|
|
16
|
+
*/
|
|
17
|
+
withIcon(name: string, iconSvg: string): IMenuItemBuilder;
|
|
18
|
+
/**
|
|
19
|
+
* Enabled the item
|
|
20
|
+
* @param value value
|
|
21
|
+
*/
|
|
22
|
+
withIsEnabled(value: boolean): IMenuItemBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* Item's submenu
|
|
25
|
+
*/
|
|
26
|
+
withSubmenu(): IMenuBuilder;
|
|
27
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { ICheckableMenuItemBuilder } from "./checkable-menu.builder";
|
|
2
|
-
import { IMenuItemBuilder } from "./menu-item.builder";
|
|
3
|
-
/**
|
|
4
|
-
* Represents a menu and enables to add new items to it
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class IMenuBuilder {
|
|
7
|
-
constructor();
|
|
8
|
-
/**
|
|
9
|
-
* Gets the list of existing items of associated menu or subitems of an item
|
|
10
|
-
* @returns Existing menu item names
|
|
11
|
-
*/
|
|
12
|
-
get itemNames(): string[];
|
|
13
|
-
/**
|
|
14
|
-
* Gets count of menu items
|
|
15
|
-
*/
|
|
16
|
-
get count(): number;
|
|
17
|
-
/**
|
|
18
|
-
* Adds a new separator to the associated menu
|
|
19
|
-
* @param index The index to put the new item at
|
|
20
|
-
*/
|
|
21
|
-
addSeparator(index: number): void;
|
|
22
|
-
/**
|
|
23
|
-
* Adds a new item to the associated menu
|
|
24
|
-
* @param name Item's internal name
|
|
25
|
-
* @param index The index to put the new item at
|
|
26
|
-
*/
|
|
27
|
-
addItem(name: string, index: number): IMenuItemBuilder;
|
|
28
|
-
/**
|
|
29
|
-
* Adds a new checkable item to the associated menu
|
|
30
|
-
* @param name Item's internal name
|
|
31
|
-
* @param index The index to put the new item at
|
|
32
|
-
*/
|
|
33
|
-
addCheckableItem(name: string, index: number): ICheckableMenuItemBuilder;
|
|
34
|
-
/**
|
|
35
|
-
* Replaces the item to the associated menu
|
|
36
|
-
* @param name Item's internal name
|
|
37
|
-
*/
|
|
38
|
-
replaceItem(name: string): IMenuItemBuilder;
|
|
39
|
-
/**
|
|
40
|
-
* Removes the item with the specified name
|
|
41
|
-
* @param name Item's internal name
|
|
42
|
-
*/
|
|
43
|
-
removeItem(name: string): void;
|
|
44
|
-
/**
|
|
45
|
-
* Gets the item
|
|
46
|
-
* @param name Item's internal name
|
|
47
|
-
*/
|
|
48
|
-
getItem(name: string): IMenuBuilder;
|
|
49
|
-
}
|
|
1
|
+
import { ICheckableMenuItemBuilder } from "./checkable-menu.builder";
|
|
2
|
+
import { IMenuItemBuilder } from "./menu-item.builder";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a menu and enables to add new items to it
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class IMenuBuilder {
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Gets the list of existing items of associated menu or subitems of an item
|
|
10
|
+
* @returns Existing menu item names
|
|
11
|
+
*/
|
|
12
|
+
get itemNames(): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Gets count of menu items
|
|
15
|
+
*/
|
|
16
|
+
get count(): number;
|
|
17
|
+
/**
|
|
18
|
+
* Adds a new separator to the associated menu
|
|
19
|
+
* @param index The index to put the new item at
|
|
20
|
+
*/
|
|
21
|
+
addSeparator(index: number): void;
|
|
22
|
+
/**
|
|
23
|
+
* Adds a new item to the associated menu
|
|
24
|
+
* @param name Item's internal name
|
|
25
|
+
* @param index The index to put the new item at
|
|
26
|
+
*/
|
|
27
|
+
addItem(name: string, index: number): IMenuItemBuilder;
|
|
28
|
+
/**
|
|
29
|
+
* Adds a new checkable item to the associated menu
|
|
30
|
+
* @param name Item's internal name
|
|
31
|
+
* @param index The index to put the new item at
|
|
32
|
+
*/
|
|
33
|
+
addCheckableItem(name: string, index: number): ICheckableMenuItemBuilder;
|
|
34
|
+
/**
|
|
35
|
+
* Replaces the item to the associated menu
|
|
36
|
+
* @param name Item's internal name
|
|
37
|
+
*/
|
|
38
|
+
replaceItem(name: string): IMenuItemBuilder;
|
|
39
|
+
/**
|
|
40
|
+
* Removes the item with the specified name
|
|
41
|
+
* @param name Item's internal name
|
|
42
|
+
*/
|
|
43
|
+
removeItem(name: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the item
|
|
46
|
+
* @param name Item's internal name
|
|
47
|
+
*/
|
|
48
|
+
getItem(name: string): IMenuBuilder;
|
|
49
|
+
}
|
package/lib/menu/menu.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { IMenuBuilder } from "./menu.builder";
|
|
2
|
-
/**
|
|
3
|
-
* Interface that allows to add new items to the menu and context menus
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class IMenu<TMenuContext> {
|
|
6
|
-
/**
|
|
7
|
-
* The method is called just before the menu is shown
|
|
8
|
-
* @param builder The menu builder object of associated menu
|
|
9
|
-
* @param context Context
|
|
10
|
-
*/
|
|
11
|
-
build(builder: IMenuBuilder, context: TMenuContext): void;
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param name
|
|
15
|
-
* @param context
|
|
16
|
-
*/
|
|
17
|
-
onMenuItemClick(name: string, context: TMenuContext): void;
|
|
18
|
-
}
|
|
1
|
+
import { IMenuBuilder } from "./menu.builder";
|
|
2
|
+
/**
|
|
3
|
+
* Interface that allows to add new items to the menu and context menus
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class IMenu<TMenuContext> {
|
|
6
|
+
/**
|
|
7
|
+
* The method is called just before the menu is shown
|
|
8
|
+
* @param builder The menu builder object of associated menu
|
|
9
|
+
* @param context Context
|
|
10
|
+
*/
|
|
11
|
+
build(builder: IMenuBuilder, context: TMenuContext): void;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param name
|
|
15
|
+
* @param context
|
|
16
|
+
*/
|
|
17
|
+
onMenuItemClick(name: string, context: TMenuContext): void;
|
|
18
|
+
}
|
package/lib/toolbar/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './toolbar';
|
|
2
|
-
export * from './toolbar-item.builder';
|
|
3
|
-
export * from './toolbar-item-submenu.handler';
|
|
4
|
-
export * from './toolbar-menu-item.builder';
|
|
5
|
-
export * from './toolbar-toggle-item.builder';
|
|
6
|
-
export * from './toolbar.builder';
|
|
1
|
+
export * from './toolbar';
|
|
2
|
+
export * from './toolbar-item.builder';
|
|
3
|
+
export * from './toolbar-item-submenu.handler';
|
|
4
|
+
export * from './toolbar-menu-item.builder';
|
|
5
|
+
export * from './toolbar-toggle-item.builder';
|
|
6
|
+
export * from './toolbar.builder';
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { IToolbarBuilder } from "./toolbar.builder";
|
|
2
|
+
export declare abstract class IToolbarItemSubmenuHandler {
|
|
3
|
+
/**
|
|
4
|
+
* Build a submenu
|
|
5
|
+
* @param builder - toolbar builder
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
onSubmenuRequested(builder: IToolbarBuilder): void;
|
|
9
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents a toolbar button and enables to set parametres to it
|
|
3
|
-
*/
|
|
4
|
-
export declare abstract class IToolbarButtonItemBuilder {
|
|
5
|
-
constructor();
|
|
6
|
-
/**
|
|
7
|
-
* Item's name to be displayed
|
|
8
|
-
* @param header - value
|
|
9
|
-
* @returns instance of IToolbarButtonItemBuilder
|
|
10
|
-
*/
|
|
11
|
-
withHeader(header: string): IToolbarButtonItemBuilder;
|
|
12
|
-
/**
|
|
13
|
-
* Item's icon in SVG format
|
|
14
|
-
* @param name - icon name
|
|
15
|
-
* @param svg - url icon or base64 string
|
|
16
|
-
*/
|
|
17
|
-
withIcon(name: string, svg: string): IToolbarButtonItemBuilder;
|
|
18
|
-
/**
|
|
19
|
-
* Enabled the item
|
|
20
|
-
* @param value - value
|
|
21
|
-
*/
|
|
22
|
-
withIsEnabled(value: boolean): IToolbarButtonItemBuilder;
|
|
23
|
-
/**
|
|
24
|
-
* Item's hint
|
|
25
|
-
* @param hint - value
|
|
26
|
-
*/
|
|
27
|
-
withHint(hint: string): IToolbarButtonItemBuilder;
|
|
28
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Represents a toolbar button and enables to set parametres to it
|
|
3
|
+
*/
|
|
4
|
+
export declare abstract class IToolbarButtonItemBuilder {
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Item's name to be displayed
|
|
8
|
+
* @param header - value
|
|
9
|
+
* @returns instance of IToolbarButtonItemBuilder
|
|
10
|
+
*/
|
|
11
|
+
withHeader(header: string): IToolbarButtonItemBuilder;
|
|
12
|
+
/**
|
|
13
|
+
* Item's icon in SVG format
|
|
14
|
+
* @param name - icon name
|
|
15
|
+
* @param svg - url icon or base64 string
|
|
16
|
+
*/
|
|
17
|
+
withIcon(name: string, svg: string): IToolbarButtonItemBuilder;
|
|
18
|
+
/**
|
|
19
|
+
* Enabled the item
|
|
20
|
+
* @param value - value
|
|
21
|
+
*/
|
|
22
|
+
withIsEnabled(value: boolean): IToolbarButtonItemBuilder;
|
|
23
|
+
/**
|
|
24
|
+
* Item's hint
|
|
25
|
+
* @param hint - value
|
|
26
|
+
*/
|
|
27
|
+
withHint(hint: string): IToolbarButtonItemBuilder;
|
|
28
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IToolbarButtonItemBuilder } from "./toolbar-item.builder";
|
|
2
|
-
import { IToolbarItemSubmenuHandler } from "./toolbar-item-submenu.handler";
|
|
3
|
-
/**
|
|
4
|
-
* Represents a toolbar menu button and enables to set parametres to it
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {
|
|
7
|
-
/**
|
|
8
|
-
* Build a dropdown menu
|
|
9
|
-
* @param itemSubmenuHandler - toolbar submenu handler
|
|
10
|
-
* @returns The toolbar button menu builder
|
|
11
|
-
*/
|
|
12
|
-
withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler): IToolbarMenuButtonItemBuilder;
|
|
13
|
-
}
|
|
1
|
+
import { IToolbarButtonItemBuilder } from "./toolbar-item.builder";
|
|
2
|
+
import { IToolbarItemSubmenuHandler } from "./toolbar-item-submenu.handler";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a toolbar menu button and enables to set parametres to it
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class IToolbarMenuButtonItemBuilder extends IToolbarButtonItemBuilder {
|
|
7
|
+
/**
|
|
8
|
+
* Build a dropdown menu
|
|
9
|
+
* @param itemSubmenuHandler - toolbar submenu handler
|
|
10
|
+
* @returns The toolbar button menu builder
|
|
11
|
+
*/
|
|
12
|
+
withMenu(itemSubmenuHandler: IToolbarItemSubmenuHandler): IToolbarMenuButtonItemBuilder;
|
|
13
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IToolbarButtonItemBuilder } from "./toolbar-item.builder";
|
|
2
|
-
/**
|
|
3
|
-
* Represents a toolbar toggle button and enables to set parametres to it
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param value
|
|
9
|
-
*/
|
|
10
|
-
withIsChecked(value: boolean): IToolbarToggleButtonItemBuilder;
|
|
11
|
-
}
|
|
1
|
+
import { IToolbarButtonItemBuilder } from "./toolbar-item.builder";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a toolbar toggle button and enables to set parametres to it
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class IToolbarToggleButtonItemBuilder extends IToolbarButtonItemBuilder {
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param value
|
|
9
|
+
*/
|
|
10
|
+
withIsChecked(value: boolean): IToolbarToggleButtonItemBuilder;
|
|
11
|
+
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { IToolbarButtonItemBuilder } from "./toolbar-item.builder";
|
|
2
|
-
import { IToolbarItemSubmenuHandler } from "./toolbar-item-submenu.handler";
|
|
3
|
-
import { IToolbarMenuButtonItemBuilder } from "./toolbar-menu-item.builder";
|
|
4
|
-
import { IToolbarToggleButtonItemBuilder } from "./toolbar-toggle-item.builder";
|
|
5
|
-
export declare abstract class IToolbarBuilder {
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* Adds a new separator to the associated toolbar
|
|
9
|
-
* @param index - The index to put the new item at
|
|
10
|
-
*/
|
|
11
|
-
addSeparator(index: number): void;
|
|
12
|
-
/**
|
|
13
|
-
* Adds a new button to the associated toolbar
|
|
14
|
-
* @param name - Internal item's name
|
|
15
|
-
* @param index - The index to put the new item at
|
|
16
|
-
*/
|
|
17
|
-
addButtonItem(name: string, index: number): IToolbarButtonItemBuilder;
|
|
18
|
-
/**
|
|
19
|
-
* Adds a new menu button to the associated toolbar
|
|
20
|
-
* @param name - Internal item's name
|
|
21
|
-
* @param index - The index to put the new item at
|
|
22
|
-
*/
|
|
23
|
-
addMenuButtonItem(name: string, index: number): IToolbarMenuButtonItemBuilder;
|
|
24
|
-
/**
|
|
25
|
-
* Adds a new toggle button to the associated toolbar
|
|
26
|
-
* @param name - Internal item's name
|
|
27
|
-
* @param index - The index to put the new item at
|
|
28
|
-
*/
|
|
29
|
-
addToggleButtonItem(name: string, index: number): IToolbarToggleButtonItemBuilder;
|
|
30
|
-
/**
|
|
31
|
-
* Replaces the item from the associated toolbar on button
|
|
32
|
-
* @param name - The name of toolbar button to replace
|
|
33
|
-
*/
|
|
34
|
-
replaceButtonItem(name: string): IToolbarButtonItemBuilder;
|
|
35
|
-
/**
|
|
36
|
-
* Replace the item from the associated toolbar on menu button
|
|
37
|
-
* @param name - The name of toolbar menu button to replace
|
|
38
|
-
*/
|
|
39
|
-
replaceMenuButtonItem(name: string): IToolbarMenuButtonItemBuilder;
|
|
40
|
-
/**
|
|
41
|
-
* Enables to set parametres to menu button item submenu
|
|
42
|
-
* @param name - Item's internal name
|
|
43
|
-
* @param itemSubmenuHandler - The toolbar button menu builder
|
|
44
|
-
*/
|
|
45
|
-
handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler): void;
|
|
46
|
-
/**
|
|
47
|
-
* Replaces the item from the associated toolbar on toggle button
|
|
48
|
-
* @param name - The name of toolbar toggle button to replace
|
|
49
|
-
*/
|
|
50
|
-
replaceToggleButtonItem(name: string): IToolbarToggleButtonItemBuilder;
|
|
51
|
-
/**
|
|
52
|
-
* Gets the list of existing item names of associated toolbar
|
|
53
|
-
* @returns - Existing toolbar item names
|
|
54
|
-
*/
|
|
55
|
-
get itemNames(): string[];
|
|
56
|
-
/**
|
|
57
|
-
* Gets count of toolbar items
|
|
58
|
-
*/
|
|
59
|
-
get count(): number;
|
|
60
|
-
/**
|
|
61
|
-
* Removes specified item
|
|
62
|
-
* @param itemName - Item's internal name
|
|
63
|
-
*/
|
|
64
|
-
removeItem(itemName: string): void;
|
|
65
|
-
}
|
|
1
|
+
import { IToolbarButtonItemBuilder } from "./toolbar-item.builder";
|
|
2
|
+
import { IToolbarItemSubmenuHandler } from "./toolbar-item-submenu.handler";
|
|
3
|
+
import { IToolbarMenuButtonItemBuilder } from "./toolbar-menu-item.builder";
|
|
4
|
+
import { IToolbarToggleButtonItemBuilder } from "./toolbar-toggle-item.builder";
|
|
5
|
+
export declare abstract class IToolbarBuilder {
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* Adds a new separator to the associated toolbar
|
|
9
|
+
* @param index - The index to put the new item at
|
|
10
|
+
*/
|
|
11
|
+
addSeparator(index: number): void;
|
|
12
|
+
/**
|
|
13
|
+
* Adds a new button to the associated toolbar
|
|
14
|
+
* @param name - Internal item's name
|
|
15
|
+
* @param index - The index to put the new item at
|
|
16
|
+
*/
|
|
17
|
+
addButtonItem(name: string, index: number): IToolbarButtonItemBuilder;
|
|
18
|
+
/**
|
|
19
|
+
* Adds a new menu button to the associated toolbar
|
|
20
|
+
* @param name - Internal item's name
|
|
21
|
+
* @param index - The index to put the new item at
|
|
22
|
+
*/
|
|
23
|
+
addMenuButtonItem(name: string, index: number): IToolbarMenuButtonItemBuilder;
|
|
24
|
+
/**
|
|
25
|
+
* Adds a new toggle button to the associated toolbar
|
|
26
|
+
* @param name - Internal item's name
|
|
27
|
+
* @param index - The index to put the new item at
|
|
28
|
+
*/
|
|
29
|
+
addToggleButtonItem(name: string, index: number): IToolbarToggleButtonItemBuilder;
|
|
30
|
+
/**
|
|
31
|
+
* Replaces the item from the associated toolbar on button
|
|
32
|
+
* @param name - The name of toolbar button to replace
|
|
33
|
+
*/
|
|
34
|
+
replaceButtonItem(name: string): IToolbarButtonItemBuilder;
|
|
35
|
+
/**
|
|
36
|
+
* Replace the item from the associated toolbar on menu button
|
|
37
|
+
* @param name - The name of toolbar menu button to replace
|
|
38
|
+
*/
|
|
39
|
+
replaceMenuButtonItem(name: string): IToolbarMenuButtonItemBuilder;
|
|
40
|
+
/**
|
|
41
|
+
* Enables to set parametres to menu button item submenu
|
|
42
|
+
* @param name - Item's internal name
|
|
43
|
+
* @param itemSubmenuHandler - The toolbar button menu builder
|
|
44
|
+
*/
|
|
45
|
+
handleMenuButtonItemSubmenu(name: string, itemSubmenuHandler: IToolbarItemSubmenuHandler): void;
|
|
46
|
+
/**
|
|
47
|
+
* Replaces the item from the associated toolbar on toggle button
|
|
48
|
+
* @param name - The name of toolbar toggle button to replace
|
|
49
|
+
*/
|
|
50
|
+
replaceToggleButtonItem(name: string): IToolbarToggleButtonItemBuilder;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the list of existing item names of associated toolbar
|
|
53
|
+
* @returns - Existing toolbar item names
|
|
54
|
+
*/
|
|
55
|
+
get itemNames(): string[];
|
|
56
|
+
/**
|
|
57
|
+
* Gets count of toolbar items
|
|
58
|
+
*/
|
|
59
|
+
get count(): number;
|
|
60
|
+
/**
|
|
61
|
+
* Removes specified item
|
|
62
|
+
* @param itemName - Item's internal name
|
|
63
|
+
*/
|
|
64
|
+
removeItem(itemName: string): void;
|
|
65
|
+
}
|
package/lib/toolbar/toolbar.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { IToolbarBuilder } from "./toolbar.builder";
|
|
2
|
-
/**
|
|
3
|
-
* Interface that allows to add new items to the toolbar
|
|
4
|
-
*/
|
|
5
|
-
export declare abstract class IToolbar<TToolbarContext> {
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* The method is called just before the toolbar is created
|
|
9
|
-
* @param builder - the toolbar builder object of associated toolbar
|
|
10
|
-
* @param context - context
|
|
11
|
-
*/
|
|
12
|
-
build(builder: IToolbarBuilder, context: TToolbarContext): void;
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param name
|
|
16
|
-
* @param context
|
|
17
|
-
*/
|
|
18
|
-
onToolbarItemClick(name: string, context: TToolbarContext): void;
|
|
19
|
-
}
|
|
1
|
+
import { IToolbarBuilder } from "./toolbar.builder";
|
|
2
|
+
/**
|
|
3
|
+
* Interface that allows to add new items to the toolbar
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class IToolbar<TToolbarContext> {
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* The method is called just before the toolbar is created
|
|
9
|
+
* @param builder - the toolbar builder object of associated toolbar
|
|
10
|
+
* @param context - context
|
|
11
|
+
*/
|
|
12
|
+
build(builder: IToolbarBuilder, context: TToolbarContext): void;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param name
|
|
16
|
+
* @param context
|
|
17
|
+
*/
|
|
18
|
+
onToolbarItemClick(name: string, context: TToolbarContext): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class AttributePermissionInfo {
|
|
2
|
+
private ATTRIBUTE_NAME_MARKER;
|
|
3
|
+
orgUnits: number[];
|
|
4
|
+
orgUnitAttributes: string[];
|
|
5
|
+
constructor(editableForPositionsSource: string[]);
|
|
6
|
+
extractAllOrgUnits(obj: any): number[];
|
|
7
|
+
extractAllOrgUnitsByAttributes(attributes: Map<string, any>): number[];
|
|
8
|
+
}
|