@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,22 @@
1
+ import { IDataObject } from "../data";
2
+ /**
3
+ * Contex for objects view
4
+ */
5
+ export declare class ObjectsViewContext {
6
+ private readonly _selectedObjects;
7
+ private readonly _shortcuts;
8
+ private readonly _context;
9
+ constructor(selectedObjects: IDataObject[], context: IDataObject, shortcuts?: IDataObject[]);
10
+ /**
11
+ *
12
+ */
13
+ get selectedObjects(): IDataObject[];
14
+ /**
15
+ *
16
+ */
17
+ get contextObject(): IDataObject;
18
+ /**
19
+ *
20
+ */
21
+ get shortcuts(): IDataObject[];
22
+ }
@@ -0,0 +1,12 @@
1
+ import { IAnnotationContainerObject } from "../data";
2
+ /**
3
+ * Context for document annotations list
4
+ */
5
+ export declare class DocumentAnnotationsListContext {
6
+ private readonly _selectedAnnotations;
7
+ constructor(selectedAnnotations: IAnnotationContainerObject[]);
8
+ /**
9
+ *
10
+ */
11
+ get selectedAnnotations(): IAnnotationContainerObject[];
12
+ }
@@ -1,3 +1,3 @@
1
1
  export * from './context';
2
2
  export * from './document-annotations-list-context';
3
- export * from './render-context';
3
+ export * from './render-context';
@@ -0,0 +1,17 @@
1
+ import { IDataObject } from "../data";
2
+ /**
3
+ * Context for xps render
4
+ */
5
+ export declare class RenderContext {
6
+ private readonly _dataObject;
7
+ private readonly _selectedVersion;
8
+ constructor(dataObject: IDataObject, selectedVersion: string);
9
+ /**
10
+ * Target object
11
+ */
12
+ get dataObject(): IDataObject;
13
+ /**
14
+ * Selected version time
15
+ */
16
+ get selectedVersion(): string;
17
+ }
@@ -0,0 +1,35 @@
1
+ export declare enum AccessLevel {
2
+ None = 0,
3
+ Create = 1,
4
+ Edit = 2,
5
+ View = 4,
6
+ Freeze = 8,
7
+ Agreement = 16,
8
+ Share = 32,
9
+ ViewCreate = 5,
10
+ ViewEdit = 7,
11
+ ViewEditAgrement = 23,
12
+ Full = 63
13
+ }
14
+ export declare enum AccessType {
15
+ Allow = 0,
16
+ Deny = 1
17
+ }
18
+ export declare enum AccessInheritance {
19
+ None = 0,
20
+ InheritUntilSecret = 1,
21
+ InheritWholeSubtree = 2
22
+ }
23
+ export interface IAccessRecord {
24
+ get orgUnitId(): number;
25
+ get access(): IAccess;
26
+ get recordOwnerPosition(): number;
27
+ get inheritanceSource(): string;
28
+ }
29
+ export interface IAccess {
30
+ get type(): AccessType;
31
+ get accessLevel(): AccessLevel;
32
+ get validThrough(): string;
33
+ get inheritance(): AccessInheritance;
34
+ get typeIds(): number[];
35
+ }
@@ -0,0 +1,15 @@
1
+ import { IDataObject } from "./data-object";
2
+ export interface IAnnotationContainerObject {
3
+ get container(): IAnnotationContainer;
4
+ get source(): IDataObject;
5
+ get attributes(): any;
6
+ }
7
+ export interface IAnnotationContainer {
8
+ get annotationId(): string;
9
+ get version(): string;
10
+ get positionX(): number;
11
+ get positionY(): number;
12
+ get pageNumber(): number;
13
+ get data(): string;
14
+ get kind(): string;
15
+ }
@@ -0,0 +1,30 @@
1
+ export interface IAttribute {
2
+ get name(): string;
3
+ get title(): string;
4
+ get obligatory(): boolean;
5
+ get type(): AttributeType;
6
+ get displayHeight(): number;
7
+ get showInTree(): boolean;
8
+ get displaySortOrder(): number;
9
+ get isService(): boolean;
10
+ get configuration(): string;
11
+ get joinWithPrevious(): boolean;
12
+ get isUnique(): boolean;
13
+ get groupTitle(): string;
14
+ get editableForPositionsSource(): string[];
15
+ }
16
+ export declare enum AttributeType {
17
+ Integer = 0,
18
+ Double = 1,
19
+ DateTime = 2,
20
+ String = 3,
21
+ Decimal = 4,
22
+ Numerator = 5,
23
+ Array = 6,
24
+ UserState = 7,
25
+ OrgUnit = 8,
26
+ ElementBook = 9,
27
+ Guid = 10,
28
+ IntegerArray = 11,
29
+ Unknown = 99
30
+ }
@@ -0,0 +1,74 @@
1
+ import { AccessLevel, IAccessRecord } from "./access";
2
+ import { IAttribute } from "./attribute";
3
+ import { IFileSnapshot } from "./files-snapshot";
4
+ import { IPerson } from "./person";
5
+ import { IRelation } from "./relation";
6
+ export declare enum RelationType {
7
+ SourceFiles = 1,
8
+ TaskInitiatorAttachments = 2,
9
+ TaskExecutorAttachments = 3,
10
+ MessageAttachments = 4,
11
+ Custom = 5,
12
+ TaskAttachments = 6
13
+ }
14
+ export declare enum ObjectState {
15
+ Alive = 0,
16
+ InRecycleBin = 1,
17
+ DeletedPermanently = 2,
18
+ Frozen = 3,
19
+ LockRequested = 4,
20
+ LockAccepted = 5
21
+ }
22
+ export interface IDataObject {
23
+ get id(): string;
24
+ get parentId(): string;
25
+ get title(): string;
26
+ get type(): IType;
27
+ get attributes(): {
28
+ [key: string]: any;
29
+ };
30
+ get children(): IChild[];
31
+ get creator(): IPerson;
32
+ get created(): string;
33
+ get actualFileSnapshot(): IFileSnapshot;
34
+ get previousFileSnapshots(): IFileSnapshot[];
35
+ get context(): string[];
36
+ get relations(): IRelation[];
37
+ get access(): IAccessRecord[];
38
+ get accessLevels(): {
39
+ [key: number]: AccessLevel;
40
+ };
41
+ get stateInfo(): IStateInfo;
42
+ get secretInfo(): ISecretInfo;
43
+ }
44
+ export interface IType {
45
+ get id(): number;
46
+ get title(): string;
47
+ get name(): string;
48
+ get icon(): string;
49
+ get sort(): number;
50
+ get hasFiles(): boolean;
51
+ get children(): number[];
52
+ get attributes(): IAttribute[];
53
+ get isDeleted(): boolean;
54
+ get kind(): number;
55
+ get isMountable(): boolean;
56
+ get isService(): boolean;
57
+ get isProject(): boolean;
58
+ get configuration(): string;
59
+ }
60
+ export interface IChild {
61
+ get objectId(): string;
62
+ get typeId(): number;
63
+ }
64
+ export interface ISecretInfo {
65
+ get isSecret(): boolean;
66
+ get secretParentId(): string;
67
+ get secretChangedBy(): number;
68
+ }
69
+ export interface IStateInfo {
70
+ get state(): ObjectState;
71
+ get date(): string;
72
+ get personId(): number;
73
+ get positionId(): number;
74
+ }
@@ -0,0 +1,23 @@
1
+ export interface IFile {
2
+ get body(): IFileBody;
3
+ get name(): string;
4
+ get signatures(): ISignature[];
5
+ }
6
+ export interface IFileBody {
7
+ get id(): string;
8
+ get size(): number;
9
+ get md5(): any;
10
+ get modified(): string;
11
+ get created(): string;
12
+ get accessed(): string;
13
+ }
14
+ export interface ISignature {
15
+ get id(): string;
16
+ get databaseId(): string;
17
+ get positionId(): number;
18
+ get role(): string;
19
+ get sign(): string;
20
+ get requestedSigner(): string;
21
+ get isAdditional(): boolean;
22
+ get objectId(): string;
23
+ }
@@ -0,0 +1,8 @@
1
+ import { IFile } from "./file";
2
+ export interface IFileSnapshot {
3
+ get created(): string;
4
+ get creatorId(): number;
5
+ get reason(): string;
6
+ get files(): IFile[];
7
+ get hasAnnotations(): boolean;
8
+ }
@@ -8,5 +8,5 @@ export * from './person';
8
8
  export * from './relation';
9
9
  export * from './object-builder';
10
10
  export * from './modifier';
11
- export * from './organisation-unit'
12
- export * from './subscriptionType'
11
+ export * from './organisation-unit';
12
+ export * from './subscriptionType';
@@ -0,0 +1,30 @@
1
+ import { Observable } from "rxjs/internal/Observable";
2
+ import { IDataObject } from ".";
3
+ import { IObjectBuilder } from "./object-builder";
4
+ /**
5
+ * Creates, modifies and deletes objects
6
+ */
7
+ export interface IModifier {
8
+ /**
9
+ * Creates a new object
10
+ *
11
+ * @param id New object id
12
+ * @param parentId Parent id
13
+ * @param typeId Creating object's type id
14
+ * @return Fluent interface that enables you to modify created object
15
+ */
16
+ create(id: string, parentId: string, typeId: number): IObjectBuilder;
17
+ /**
18
+ * Edits existing object
19
+ *
20
+ * @param id Id of object to modify
21
+ * @returns Fluent interface that enables you to modify created object
22
+ */
23
+ edit(id: string): IObjectBuilder;
24
+ /**
25
+ * Applies all the changes have been made in modifier
26
+ *
27
+ * @returns Created and edited objects wrapped in cold Observable
28
+ */
29
+ apply(): Observable<IDataObject[]>;
30
+ }
@@ -0,0 +1,110 @@
1
+ import { AttributeType } from "./attribute";
2
+ import { IAnnotationContainer } from "./annotations";
3
+ import { IAccessRecord } from "./access";
4
+ import { IRelation } from "./relation";
5
+ /**
6
+ * Fluent interface that enables you to modify the associated object
7
+ */
8
+ export interface IObjectBuilder {
9
+ /**
10
+ * Sets the string attribute value
11
+ *
12
+ * @param name Attribute name
13
+ * @param value Attribute value
14
+ * @returns Self
15
+ */
16
+ setAttribute(name: string, value: any, type: AttributeType): IObjectBuilder;
17
+ /**
18
+ * Adds access record to an object
19
+ *
20
+ * @param record Access record
21
+ * @returns Self
22
+ */
23
+ setAccess(record: IAccessRecord): IObjectBuilder;
24
+ /**
25
+ * Removes access record
26
+ *
27
+ * @param record Access record
28
+ * @returns Self
29
+ */
30
+ removeAccess(record: IAccessRecord): IObjectBuilder;
31
+ /**
32
+ * Adds a relation
33
+ *
34
+ * @param relation Relation
35
+ * @returns Self
36
+ */
37
+ addRelation(relation: IRelation): IObjectBuilder;
38
+ /**
39
+ * Removes relation
40
+ *
41
+ * @param relationId Relation id
42
+ * @returns Self
43
+ */
44
+ removeRelation(relationId: string): IObjectBuilder;
45
+ /**
46
+ * Sets new type. It is recommended to use this method only for recovering permanently deleted objects. In other cases, this can lead to system malfunction.
47
+ *
48
+ * @param typeId Type id
49
+ * @returns Self
50
+ */
51
+ setTypeId(typeId: number): IObjectBuilder;
52
+ /**
53
+ * Sets new parent
54
+ *
55
+ * @param parentId Parent id
56
+ * @returns Self
57
+ */
58
+ setParentId(parentId: string): IObjectBuilder;
59
+ /**
60
+ * Adds file snapshot
61
+ *
62
+ * @param reason Reason
63
+ * @returns Self
64
+ */
65
+ createSnapshot(reason: string): IObjectBuilder;
66
+ /**
67
+ * Makes file snapshot actual
68
+ *
69
+ * @param version Version of file snapshot to make actual
70
+ * @param reason Reason
71
+ * @returns Self
72
+ */
73
+ createSnapshotFrom(version: string, reason: string): IObjectBuilder;
74
+ /**
75
+ * Sets permanently deleted flag
76
+ *
77
+ * @param isDeleted Value
78
+ * @returns Self
79
+ */
80
+ setIsDeleted(isDeleted: boolean): IObjectBuilder;
81
+ /**
82
+ * Set flag in recycle bin
83
+ *
84
+ * @param isInRecycleBin Value
85
+ * @returns Self
86
+ */
87
+ setIsInRecycleBin(isInRecycleBin: boolean): IObjectBuilder;
88
+ /**
89
+ * Sets frozen flag
90
+ *
91
+ * @param isFreezed Value
92
+ * @returns Self
93
+ */
94
+ setIsFreezed(isFreezed: boolean): IObjectBuilder;
95
+ /**
96
+ * Sets object's secret info
97
+ *
98
+ * @param isSecret Value
99
+ * @returns Self
100
+ */
101
+ setIsSecret(isSecret: boolean): IObjectBuilder;
102
+ /**
103
+ * Adds or changes a annotation
104
+ *
105
+ * @param container Annotation container
106
+ * @param attrbutes Annotation attributes
107
+ * @returns Self
108
+ */
109
+ addAnnotationContainer(container: IAnnotationContainer, attrbutes: any): IObjectBuilder;
110
+ }
@@ -0,0 +1,18 @@
1
+ export interface IOrganizationUnit {
2
+ get id(): number;
3
+ get title(): string;
4
+ get kind(): OrgUnitKind;
5
+ get children(): number[];
6
+ get isDeleted(): boolean;
7
+ get isBoss(): boolean;
8
+ get version(): number;
9
+ get person(): number;
10
+ get vicePersons(): number[];
11
+ get isCanceled(): boolean;
12
+ get groupPersons(): number[];
13
+ }
14
+ export declare enum OrgUnitKind {
15
+ Department = 0,
16
+ Position = 1,
17
+ Group = 2
18
+ }
@@ -0,0 +1,17 @@
1
+ export interface IPerson {
2
+ get id(): number;
3
+ get login(): string;
4
+ get isInactive(): boolean;
5
+ get displayName(): string;
6
+ get positions(): number[];
7
+ get groups(): number[];
8
+ get bossOf(): number[];
9
+ get allOrgUnits(): number[];
10
+ get comment(): string;
11
+ get email(): string;
12
+ get sid(): string;
13
+ get uidDn(): string;
14
+ get isDeleted(): boolean;
15
+ get isAdmin(): boolean;
16
+ get version(): number;
17
+ }
@@ -0,0 +1,8 @@
1
+ import { RelationType } from "./data-object";
2
+ export interface IRelation {
3
+ get id(): string;
4
+ get targetId(): string;
5
+ get type(): RelationType;
6
+ get name(): string;
7
+ get versionId(): string;
8
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum SubscriptionType {
2
+ Shallow = 0,
3
+ Deep = 1
4
+ }
@@ -0,0 +1,2 @@
1
+ export interface IDataPlugin {
2
+ }
@@ -1,4 +1,4 @@
1
1
  export * from './objects-repository';
2
2
  export * from './render-context-provider';
3
- export * from './modifier-provider'
4
- export * from './repository-events'
3
+ export * from './modifier-provider';
4
+ export * from './repository-events';
@@ -1,11 +1,10 @@
1
1
  import { IModifier } from "../data/modifier";
2
-
3
2
  /**
4
3
  * Provides modifier
5
4
  */
6
5
  export interface IModifierProvider {
7
- /**
8
- *
9
- */
10
- newModifier(): IModifier;
11
- }
6
+ /**
7
+ *
8
+ */
9
+ newModifier(): IModifier;
10
+ }
@@ -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,10 @@
1
+ import { RenderContext } from "../contexts/render-context";
2
+ /**
3
+ * Provides render context
4
+ */
5
+ export interface IRenderContextProvider {
6
+ /**
7
+ *
8
+ */
9
+ getRenderContext(): RenderContext;
10
+ }
@@ -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
+ }
@@ -0,0 +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,5 +1,4 @@
1
-
2
1
  export * from './menu';
3
2
  export * from './checkable-menu.builder';
4
3
  export * from './menu-item.builder';
5
- export * from './menu.builder';
4
+ export * from './menu.builder';
@@ -0,0 +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
+ }