@sassoftware/vi-api 1.5.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert-reps/index.d.ts +1 -1
- package/alert-reps/package.json +5 -0
- package/component/bindings.d.ts +10 -4
- package/component/index.d.ts +11 -10
- package/component/index.js +1 -1
- package/component/package.json +9 -0
- package/config/config-api.d.ts +21 -2
- package/config/package.json +9 -0
- package/control/control-api.d.ts +40 -15
- package/control/package.json +9 -0
- package/control/restrictions.d.ts +5 -1
- package/current-user/package.json +9 -0
- package/event/event-api.d.ts +3 -1
- package/event/event-api.js +2 -0
- package/event/package.json +9 -0
- package/file/package.json +9 -0
- package/http/package.json +9 -0
- package/index.d.ts +4 -2
- package/localization/package.json +9 -0
- package/metadata/metadata-api.d.ts +17 -14
- package/metadata/package.json +9 -0
- package/object/object-api.d.ts +34 -21
- package/object/package.json +9 -0
- package/package.json +2 -1
- package/page-admin/package.json +9 -0
- package/page-admin/page-admin-api.d.ts +2 -2
- package/page-model/package.json +9 -0
- package/page-model/page-model-api.d.ts +92 -1
- package/page-state/package.json +9 -0
- package/page-state/page-state-api.d.ts +6 -33
- package/property/package.json +9 -0
- package/property/property-api.d.ts +6 -6
- package/property/property-api.js +2 -2
- package/reference-data/package.json +9 -0
- package/resource/package.json +9 -0
- package/score-reps/index.d.ts +1 -1
- package/score-reps/package.json +5 -0
- package/search/client/client-search-api.d.ts +24 -14
- package/search/package.json +9 -0
- package/search/search-api.d.ts +1 -1
- package/sheet/package.json +9 -0
- package/sheet/sheet-api.d.ts +6 -6
- package/shell-tabs/package.json +9 -0
- package/shell-tabs/public-api.d.ts +2 -0
- package/shell-tabs/public-api.js +2 -0
- package/shell-tabs/shell-tabs-api.d.ts +199 -0
- package/shell-tabs/shell-tabs-api.js +6 -0
- package/shell-tabs/shell-tabs-lifecycle-api.d.ts +69 -0
- package/shell-tabs/shell-tabs-lifecycle-api.js +14 -0
- package/svi-datahub/index.d.ts +295 -135
- package/svi-datahub/package.json +5 -0
- package/svi-sand/index.d.ts +31 -24
- package/svi-sand/package.json +5 -0
- package/tab/package.json +9 -0
- package/tab/tab-api.d.ts +1 -1
- package/theme/package.json +9 -0
- package/time-slider/index.d.ts +9 -0
- package/traversal/package.json +9 -0
- package/api-init.service.js +0 -86
- package/component/component-api.service.js +0 -161
- package/config/config-api.service.js +0 -54
- package/current-user/currentUser-api.service.js +0 -49
- package/event/event-api.service.js +0 -32
- package/file/file-api.service.js +0 -24
- package/http/http-api.service.js +0 -64
- package/localization/localization-api.service.js +0 -38
- package/metadata/admin/admin-metadata-api.service.js +0 -30
- package/metadata/metadata-api.service.js +0 -85
- package/object/object-api.service.js +0 -207
- package/page-admin/page-admin-api.service.js +0 -25
- package/page-model/page-model-api.service.js +0 -25
- package/page-state/page-state-api.service.js +0 -70
- package/property/property-api.service.js +0 -34
- package/reference-data/refData.service.js +0 -40
- package/resource/resource-api.service.js +0 -24
- package/search/client/client-search-api.service.js +0 -111
- package/search/search-api.service.js +0 -28
- package/sheet/network-menu-handler.service.js +0 -39
- package/sheet/sheet-api.service.js +0 -140
- package/tab/tab-api.service.js +0 -35
- package/theme/theme-api.service.js +0 -35
- package/traversal/traversal-api.service.js +0 -77
package/svi-sand/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
// Generated using typescript-generator version 2.15.527 on
|
|
3
|
+
// Generated using typescript-generator version 2.15.527 on 2023-07-07 09:34:29.
|
|
4
4
|
|
|
5
5
|
export interface ApplicationSetting extends ResponsesErrorResponse {
|
|
6
6
|
name?: string;
|
|
@@ -264,6 +264,10 @@ export interface TypeBucket {
|
|
|
264
264
|
selected?: boolean;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
export interface MaskedFieldConfiguration {
|
|
268
|
+
type?: MaskedFieldType;
|
|
269
|
+
}
|
|
270
|
+
|
|
267
271
|
export interface AbstractCompositeFilter extends AbstractFilter {
|
|
268
272
|
type: "and" | "or";
|
|
269
273
|
filters?: AbstractFilterUnion[];
|
|
@@ -297,8 +301,8 @@ export interface FilterVisitor<T> {
|
|
|
297
301
|
export interface MapBoundedBoxFilter extends AbstractFilter {
|
|
298
302
|
type: "box";
|
|
299
303
|
coordinates?: number[][];
|
|
300
|
-
bottomRight?: Coordinate;
|
|
301
304
|
topLeft?: Coordinate;
|
|
305
|
+
bottomRight?: Coordinate;
|
|
302
306
|
}
|
|
303
307
|
|
|
304
308
|
export interface MapBoundedPolygonFilter extends AbstractFilter {
|
|
@@ -377,8 +381,8 @@ export interface Edge extends Endpoint {
|
|
|
377
381
|
endpoints?: EndpointUnion[];
|
|
378
382
|
subtype?: string;
|
|
379
383
|
label?: string;
|
|
380
|
-
validFrom?:
|
|
381
|
-
validTo?:
|
|
384
|
+
validFrom?: string;
|
|
385
|
+
validTo?: string;
|
|
382
386
|
fields?: SummaryFieldValue[];
|
|
383
387
|
style?: RelationshipStyle;
|
|
384
388
|
}
|
|
@@ -422,8 +426,8 @@ export interface Vertex extends Endpoint {
|
|
|
422
426
|
typeLabel?: string;
|
|
423
427
|
label?: string;
|
|
424
428
|
attachmentsCount?: number;
|
|
425
|
-
validFrom?:
|
|
426
|
-
validTo?:
|
|
429
|
+
validFrom?: string;
|
|
430
|
+
validTo?: string;
|
|
427
431
|
style?: EntityStyle;
|
|
428
432
|
}
|
|
429
433
|
|
|
@@ -441,6 +445,7 @@ export interface ChildObjectHighlighting {
|
|
|
441
445
|
id?: string;
|
|
442
446
|
name?: string;
|
|
443
447
|
highlighting?: { [index: string]: any[] };
|
|
448
|
+
maskedFields?: { [index: string]: MaskedFieldConfiguration };
|
|
444
449
|
}
|
|
445
450
|
|
|
446
451
|
export interface ObjectId extends Serializable {
|
|
@@ -681,6 +686,7 @@ export interface HighlightResponse extends ResponsesErrorResponse {
|
|
|
681
686
|
defaultChildEntityLimit?: number;
|
|
682
687
|
fieldHighlighting?: { [index: string]: any[] };
|
|
683
688
|
childEntityHighlighting?: { [index: string]: ChildEntityHighlighting };
|
|
689
|
+
maskedFields?: { [index: string]: MaskedFieldConfiguration };
|
|
684
690
|
}
|
|
685
691
|
|
|
686
692
|
export interface OperationResponse extends OperationRepresentation {
|
|
@@ -757,12 +763,14 @@ export interface SummaryFieldValue {
|
|
|
757
763
|
name?: string;
|
|
758
764
|
type?: FieldType;
|
|
759
765
|
value?: any;
|
|
766
|
+
masked?: MaskedFieldConfiguration;
|
|
760
767
|
}
|
|
761
768
|
|
|
762
769
|
export interface TableColumnHeading {
|
|
763
770
|
field?: string;
|
|
764
771
|
label?: string;
|
|
765
772
|
type?: FieldType;
|
|
773
|
+
masked?: MaskedFieldConfiguration;
|
|
766
774
|
}
|
|
767
775
|
|
|
768
776
|
export interface ClusterSwimLaneEntry extends SwimLaneEntry {
|
|
@@ -779,7 +787,7 @@ export interface ObjectSwimLaneEntry extends SwimLaneEntry {
|
|
|
779
787
|
}
|
|
780
788
|
|
|
781
789
|
export interface SwimLane {
|
|
782
|
-
id?:
|
|
790
|
+
id?: string;
|
|
783
791
|
label?: string;
|
|
784
792
|
description?: string;
|
|
785
793
|
attachmentsCount?: number;
|
|
@@ -789,18 +797,15 @@ export interface SwimLane {
|
|
|
789
797
|
objectType?: string;
|
|
790
798
|
}
|
|
791
799
|
|
|
792
|
-
export interface Id extends ObjectId {
|
|
793
|
-
}
|
|
794
|
-
|
|
795
800
|
export interface SwimLaneEntry {
|
|
796
801
|
entryType: "cluster" | "object";
|
|
797
|
-
group?:
|
|
798
|
-
startTimestamp?:
|
|
799
|
-
endTimestamp?:
|
|
802
|
+
group?: string;
|
|
803
|
+
startTimestamp?: string;
|
|
804
|
+
endTimestamp?: string;
|
|
800
805
|
}
|
|
801
806
|
|
|
802
807
|
export interface TimebarInterval {
|
|
803
|
-
start?:
|
|
808
|
+
start?: string;
|
|
804
809
|
hitCount?: number;
|
|
805
810
|
}
|
|
806
811
|
|
|
@@ -914,8 +919,8 @@ export interface TableVisualizationResponse extends PagedVisualizationResponse {
|
|
|
914
919
|
|
|
915
920
|
export interface TimebarVisualizationRepresentation extends VisualizationRepresentation {
|
|
916
921
|
type: "timebar";
|
|
917
|
-
startTimestamp?:
|
|
918
|
-
endTimestamp?:
|
|
922
|
+
startTimestamp?: string;
|
|
923
|
+
endTimestamp?: string;
|
|
919
924
|
intervalCount?: number;
|
|
920
925
|
geoEventsRequired?: boolean;
|
|
921
926
|
}
|
|
@@ -926,8 +931,8 @@ export interface TimebarVisualizationResponse extends VisualizationResponse {
|
|
|
926
931
|
geoEventsRequired?: boolean;
|
|
927
932
|
hitCount?: number;
|
|
928
933
|
eventCount?: number;
|
|
929
|
-
globalMinTime?:
|
|
930
|
-
globalMaxTime?:
|
|
934
|
+
globalMinTime?: string;
|
|
935
|
+
globalMaxTime?: string;
|
|
931
936
|
interval?: string;
|
|
932
937
|
intervalSize?: number;
|
|
933
938
|
timebarIntervals?: TimebarInterval[];
|
|
@@ -935,8 +940,8 @@ export interface TimebarVisualizationResponse extends VisualizationResponse {
|
|
|
935
940
|
|
|
936
941
|
export interface TimelineVisualizationRepresentation extends PagedVisualizationRepresentation {
|
|
937
942
|
type: "timeline";
|
|
938
|
-
startTimestamp?:
|
|
939
|
-
endTimestamp?:
|
|
943
|
+
startTimestamp?: string;
|
|
944
|
+
endTimestamp?: string;
|
|
940
945
|
intervalCount?: number;
|
|
941
946
|
minimumClusterSize?: number;
|
|
942
947
|
paddingFactor?: number;
|
|
@@ -948,10 +953,10 @@ export interface TimelineVisualizationResponse extends PagedVisualizationRespons
|
|
|
948
953
|
minimumClusterSize?: number;
|
|
949
954
|
paddingFactor?: number;
|
|
950
955
|
eventCount?: number;
|
|
951
|
-
globalMinTime?:
|
|
952
|
-
globalMaxTime?:
|
|
953
|
-
minTime?:
|
|
954
|
-
maxTime?:
|
|
956
|
+
globalMinTime?: string;
|
|
957
|
+
globalMaxTime?: string;
|
|
958
|
+
minTime?: string;
|
|
959
|
+
maxTime?: string;
|
|
955
960
|
interval?: DateTimeInterval;
|
|
956
961
|
swimLanes?: SwimLane[];
|
|
957
962
|
swimLaneEntries?: SwimLaneEntryUnion[];
|
|
@@ -1020,6 +1025,8 @@ export type DateTimeInterval = "oneHundredYear" | "fiftyYear" | "tenYear" | "yea
|
|
|
1020
1025
|
|
|
1021
1026
|
export type FieldType = "boolean" | "date" | "double" | "float" | "geoPoint" | "geoShape" | "integer" | "long" | "nested" | "object" | "text";
|
|
1022
1027
|
|
|
1028
|
+
export type MaskedFieldType = "full" | "partial" | "none";
|
|
1029
|
+
|
|
1023
1030
|
export type TextFieldFeature = "search" | "facet" | "sort" | "html" | "email";
|
|
1024
1031
|
|
|
1025
1032
|
export type MapRelation = "contains" | "disjoint" | "intersects" | "within";
|
package/tab/package.json
ADDED
package/tab/tab-api.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface TabApi {
|
|
|
11
11
|
* @param objectId {string} ID of the object to be opened.
|
|
12
12
|
* @param [suppressNavigation = false] {boolean} Allows the tab to be opened without navigating to it.
|
|
13
13
|
* @param [mode = PageModeEvent.OPEN] {PageModeEvent} Mode to open the tab in.
|
|
14
|
-
* @return A
|
|
14
|
+
* @return A Promise that resolves when the tab is opened.
|
|
15
15
|
*/
|
|
16
16
|
openTab(objectType: string, objectId: string, suppressNavigation?: boolean, mode?: PageModeEvent): Promise<void>;
|
|
17
17
|
/**
|
package/time-slider/index.d.ts
CHANGED
|
@@ -39,3 +39,12 @@ export interface TimeSliderContextMenuHideOptions {
|
|
|
39
39
|
showHistogram?: boolean;
|
|
40
40
|
closeTimeSlider?: boolean;
|
|
41
41
|
}
|
|
42
|
+
export interface MinMaxDates {
|
|
43
|
+
min: Date;
|
|
44
|
+
max: Date;
|
|
45
|
+
}
|
|
46
|
+
export interface TimeSliderRangeChangedEvent {
|
|
47
|
+
start: Date;
|
|
48
|
+
end: Date;
|
|
49
|
+
rangeChangedOutsideTimeSlider: boolean;
|
|
50
|
+
}
|
package/api-init.service.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from "@angular/core";
|
|
8
|
-
let ApiInitService = class ApiInitService {
|
|
9
|
-
/*
|
|
10
|
-
This loads Angular specific services/functions to the api that won't be downgraded
|
|
11
|
-
*/
|
|
12
|
-
constructor(adminMetadataApiService, componentApiService, configApiService, configurationService, currentUserApiService, clientSearchApiService, eventApiService, fileApiService, httpApiService, localizationApiService, metadataApiService, objectApiService, pageAdminApiService, pageModelApiService, pageStateApiService, propertyApiService, refDataApiService, resourceApiService, searchApiService, sheetApiService, tabApiService, themeApiService, traversalApiService) {
|
|
13
|
-
this.adminMetadataApiService = adminMetadataApiService;
|
|
14
|
-
this.componentApiService = componentApiService;
|
|
15
|
-
this.configApiService = configApiService;
|
|
16
|
-
this.configurationService = configurationService;
|
|
17
|
-
this.currentUserApiService = currentUserApiService;
|
|
18
|
-
this.clientSearchApiService = clientSearchApiService;
|
|
19
|
-
this.eventApiService = eventApiService;
|
|
20
|
-
this.fileApiService = fileApiService;
|
|
21
|
-
this.httpApiService = httpApiService;
|
|
22
|
-
this.localizationApiService = localizationApiService;
|
|
23
|
-
this.metadataApiService = metadataApiService;
|
|
24
|
-
this.objectApiService = objectApiService;
|
|
25
|
-
this.pageAdminApiService = pageAdminApiService;
|
|
26
|
-
this.pageModelApiService = pageModelApiService;
|
|
27
|
-
this.pageStateApiService = pageStateApiService;
|
|
28
|
-
this.propertyApiService = propertyApiService;
|
|
29
|
-
this.refDataApiService = refDataApiService;
|
|
30
|
-
this.resourceApiService = resourceApiService;
|
|
31
|
-
this.searchApiService = searchApiService;
|
|
32
|
-
this.sheetApiService = sheetApiService;
|
|
33
|
-
this.tabApiService = tabApiService;
|
|
34
|
-
this.themeApiService = themeApiService;
|
|
35
|
-
this.traversalApiService = traversalApiService;
|
|
36
|
-
}
|
|
37
|
-
createSviApi() {
|
|
38
|
-
const api = {};
|
|
39
|
-
window.sas = window.sas ?? {};
|
|
40
|
-
window.sas.vi = api;
|
|
41
|
-
this.addCommonApiModules(api);
|
|
42
|
-
if (this.isClientApi(api)) {
|
|
43
|
-
this.addClientApiModules(api);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.addAdminApiModules(api);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
addCommonApiModules(api) {
|
|
50
|
-
api.component = this.componentApiService.getApi();
|
|
51
|
-
api.config = this.configApiService.getApi();
|
|
52
|
-
api.currentUser = this.currentUserApiService.getApi();
|
|
53
|
-
api.event = this.eventApiService.getApi();
|
|
54
|
-
api.file = this.fileApiService.getApi();
|
|
55
|
-
api.http = this.httpApiService.getApi();
|
|
56
|
-
api.localization = this.localizationApiService.getApi();
|
|
57
|
-
api.metadata = this.metadataApiService.getApi();
|
|
58
|
-
api.pageAdmin = this.pageAdminApiService.getApi();
|
|
59
|
-
api.pageModel = this.pageModelApiService.getApi();
|
|
60
|
-
api.pageState = this.pageStateApiService.getApi();
|
|
61
|
-
api.property = this.propertyApiService.getApi();
|
|
62
|
-
api.refData = this.refDataApiService.getApi();
|
|
63
|
-
api.resource = this.resourceApiService.getApi();
|
|
64
|
-
api.search = this.searchApiService.getApi();
|
|
65
|
-
api.theme = this.themeApiService.getApi();
|
|
66
|
-
api.traversal = this.traversalApiService.getApi();
|
|
67
|
-
}
|
|
68
|
-
addClientApiModules(api) {
|
|
69
|
-
api.object = this.objectApiService.getApi();
|
|
70
|
-
api.search = this.clientSearchApiService.getApi();
|
|
71
|
-
api.sheet = this.sheetApiService.getApi();
|
|
72
|
-
api.tab = this.tabApiService.getApi();
|
|
73
|
-
}
|
|
74
|
-
addAdminApiModules(api) {
|
|
75
|
-
api.metadata = this.adminMetadataApiService.getApi();
|
|
76
|
-
}
|
|
77
|
-
isClientApi(api) {
|
|
78
|
-
return !this.configurationService.isAdmin() && !!api;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
ApiInitService = __decorate([
|
|
82
|
-
Injectable({
|
|
83
|
-
providedIn: "root"
|
|
84
|
-
})
|
|
85
|
-
], ApiInitService);
|
|
86
|
-
export { ApiInitService };
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from "@angular/core";
|
|
8
|
-
import { each, get, isFunction, noop, set } from "lodash-es";
|
|
9
|
-
import { compileAngularJsComponent, getAngularJsInjectable } from "../../commons/angular-angularjs-utils";
|
|
10
|
-
import { TimeSliderComponent } from "../../commons/time-slider/time-slider.component";
|
|
11
|
-
import { SandSearchInputComponent } from "../../sand/search-input/sand-search-input.component";
|
|
12
|
-
import { ControlCollectionComponent } from "../../spb/page-viewer/control-collection/control-collection.component";
|
|
13
|
-
import { zoneWrap } from "../../commons/api-utils";
|
|
14
|
-
import { SearchAndSelectWithPreviewComponent } from "../../sand/search-and-select-with-preview/search-and-select-with-preview.component";
|
|
15
|
-
/* The details of our supported components. This maps each SviComponent to its associated selector
|
|
16
|
-
or Angular Component class. This indirection allows us to change implementation details at a later
|
|
17
|
-
date. */
|
|
18
|
-
export const components = {
|
|
19
|
-
"svi-control-collection": {
|
|
20
|
-
selector: "spb-control-collection",
|
|
21
|
-
class: ControlCollectionComponent
|
|
22
|
-
},
|
|
23
|
-
"svi-relationship-details": {
|
|
24
|
-
selector: "relate-to-details",
|
|
25
|
-
fnBindings: {
|
|
26
|
-
onLinkReasonSelected: { params: ["linkReason"] },
|
|
27
|
-
setApi: { params: ["api"] },
|
|
28
|
-
onRelatedPageLoad: { params: [] },
|
|
29
|
-
onRelatedPageChange: { params: ["change"] },
|
|
30
|
-
onRelationshipValuesChange: { params: ["current", "previous"] }
|
|
31
|
-
},
|
|
32
|
-
defaultBindings: {
|
|
33
|
-
onRelatedPageLoad: () => {
|
|
34
|
-
window.sas.vi?.component.detectChanges();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"svi-search-input": {
|
|
39
|
-
selector: "sand-search-input",
|
|
40
|
-
class: SandSearchInputComponent
|
|
41
|
-
},
|
|
42
|
-
"svi-page": {
|
|
43
|
-
selector: "spb-sds-page-viewer",
|
|
44
|
-
fnBindings: {
|
|
45
|
-
setApi: { params: ["api"] },
|
|
46
|
-
onDirty: { params: ["isDirty"] },
|
|
47
|
-
onPageLoad: { params: [] },
|
|
48
|
-
onChange: { params: ["change"] }
|
|
49
|
-
},
|
|
50
|
-
defaultBindings: {
|
|
51
|
-
onPageLoad: () => {
|
|
52
|
-
window.sas.vi?.component.detectChanges();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"svi-search-and-select-with-preview": {
|
|
57
|
-
selector: "sand-search-and-select-with-preview",
|
|
58
|
-
class: SearchAndSelectWithPreviewComponent
|
|
59
|
-
},
|
|
60
|
-
"svi-time-slider": {
|
|
61
|
-
selector: "svi-time-slider",
|
|
62
|
-
class: TimeSliderComponent
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
let ComponentApiService = class ComponentApiService {
|
|
66
|
-
constructor(componentFactoryResolver, injector, appRef, ngZone) {
|
|
67
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
68
|
-
this.injector = injector;
|
|
69
|
-
this.appRef = appRef;
|
|
70
|
-
this.ngZone = ngZone;
|
|
71
|
-
this.$timeout = () => getAngularJsInjectable("$timeout");
|
|
72
|
-
this.getApi = () => {
|
|
73
|
-
return {
|
|
74
|
-
create: zoneWrap(this.create.bind(this), this.ngZone),
|
|
75
|
-
detectChanges: this.detectChanges
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
this.detectChanges = (callback = noop) => {
|
|
79
|
-
// $timeout for AngularJS
|
|
80
|
-
this.$timeout()(() => {
|
|
81
|
-
// ngZone.run() for Angular. A single $timeout is not enough in some circumstances.
|
|
82
|
-
this.ngZone.run(callback);
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
this.compileComponent = (component, target, bindings = {}) => {
|
|
86
|
-
const details = components[component];
|
|
87
|
-
bindings = { ...bindings, ...details.defaultBindings };
|
|
88
|
-
if (details.class) {
|
|
89
|
-
return this.compileAngularComponent(details.class, target, bindings);
|
|
90
|
-
}
|
|
91
|
-
return this.compileAngularJSComponent(component, target, bindings);
|
|
92
|
-
};
|
|
93
|
-
this.compileAngularJSComponent = (component, target, bindings = {}) => {
|
|
94
|
-
const selector = components[component].selector;
|
|
95
|
-
const attrs = this.getAngularJsAttrs(bindings, component);
|
|
96
|
-
const { element, destroy, scope } = compileAngularJsComponent(target, selector, bindings, attrs, true);
|
|
97
|
-
return Promise.resolve({ element, destroy, component: scope });
|
|
98
|
-
};
|
|
99
|
-
this.getAngularJsAttrs = (bindings, component) => {
|
|
100
|
-
const attrs = {};
|
|
101
|
-
each(bindings, (_v, k) => {
|
|
102
|
-
const fnBinding = get(components[component].fnBindings, k);
|
|
103
|
-
if (fnBinding) {
|
|
104
|
-
// The attribute value for function bindings (&) must be of the form:
|
|
105
|
-
// on-foo="onFoo(arg1,arg2)"
|
|
106
|
-
// If not, the function will not be invoked. The argument names must
|
|
107
|
-
// also match those that the caller uses.
|
|
108
|
-
const params = fnBinding.params.join(",");
|
|
109
|
-
set(attrs, k, `${k}(${params})`);
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
set(attrs, k, k);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
return attrs;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
create(component, target, bindings) {
|
|
119
|
-
if (!(component in components)) {
|
|
120
|
-
console.warn(`"${component}" is not a component that can be created.`);
|
|
121
|
-
return Promise.reject();
|
|
122
|
-
}
|
|
123
|
-
return this.compileComponent(component, target, bindings).then((result) => {
|
|
124
|
-
this.detectChanges();
|
|
125
|
-
return result;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
compileAngularComponent(component, target, bindings) {
|
|
129
|
-
const factory = this.componentFactoryResolver.resolveComponentFactory(component);
|
|
130
|
-
const ref = factory.create(this.injector);
|
|
131
|
-
const instance = ref.instance;
|
|
132
|
-
const element = ref.hostView.rootNodes[0];
|
|
133
|
-
const subscriptions = [];
|
|
134
|
-
each(bindings, (v, k) => {
|
|
135
|
-
if (isFunction(v)) {
|
|
136
|
-
const sub = instance[k].subscribe(v);
|
|
137
|
-
subscriptions.push(sub);
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
set(instance, k, v);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
this.appRef.attachView(ref.hostView);
|
|
144
|
-
target.append(element);
|
|
145
|
-
this.appRef.tick();
|
|
146
|
-
return Promise.resolve({
|
|
147
|
-
element,
|
|
148
|
-
destroy: () => {
|
|
149
|
-
this.appRef.detachView(ref.hostView);
|
|
150
|
-
ref.destroy();
|
|
151
|
-
each(subscriptions, s => s.unsubscribe());
|
|
152
|
-
this.detectChanges();
|
|
153
|
-
},
|
|
154
|
-
component: instance
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
ComponentApiService = __decorate([
|
|
159
|
-
Injectable()
|
|
160
|
-
], ComponentApiService);
|
|
161
|
-
export { ComponentApiService };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from "@angular/core";
|
|
8
|
-
import { map } from "rxjs/operators";
|
|
9
|
-
let ConfigApiService = class ConfigApiService {
|
|
10
|
-
constructor(networkConfigService, controlService) {
|
|
11
|
-
this.networkConfigService = networkConfigService;
|
|
12
|
-
this.controlService = controlService;
|
|
13
|
-
this.getSoftExpansionLimit = () => {
|
|
14
|
-
return this.networkConfigService.getSoftExpansionLimit().toPromise();
|
|
15
|
-
};
|
|
16
|
-
this.getHardExpansionLimit = () => {
|
|
17
|
-
return this.networkConfigService.getHardExpansionLimit().toPromise();
|
|
18
|
-
};
|
|
19
|
-
this.getSolutions = () => {
|
|
20
|
-
return this.solutions;
|
|
21
|
-
};
|
|
22
|
-
this.registerSolution = (key, label, version) => {
|
|
23
|
-
if (key && label && !this.solutions.has(key)) {
|
|
24
|
-
this.solutions.set(key, { label, version });
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
this.getSolutionExtension = (name) => {
|
|
28
|
-
return this.controlService
|
|
29
|
-
.whenInitialized()
|
|
30
|
-
.pipe(map(() => this.controlService.getControlByName(name)))
|
|
31
|
-
.toPromise();
|
|
32
|
-
};
|
|
33
|
-
this.registerSolutionExtension = (config) => {
|
|
34
|
-
return this.controlService.registerControl(config).toPromise();
|
|
35
|
-
};
|
|
36
|
-
this.solutions = new Map();
|
|
37
|
-
}
|
|
38
|
-
getApi() {
|
|
39
|
-
return {
|
|
40
|
-
getSoftExpansionLimit: this.getSoftExpansionLimit,
|
|
41
|
-
getHardExpansionLimit: this.getHardExpansionLimit,
|
|
42
|
-
getSolutions: this.getSolutions,
|
|
43
|
-
registerSolution: this.registerSolution,
|
|
44
|
-
getSolutionExtension: this.getSolutionExtension,
|
|
45
|
-
registerSolutionExtension: this.registerSolutionExtension
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
ConfigApiService = __decorate([
|
|
50
|
-
Injectable({
|
|
51
|
-
providedIn: "root"
|
|
52
|
-
})
|
|
53
|
-
], ConfigApiService);
|
|
54
|
-
export { ConfigApiService };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from "@angular/core";
|
|
8
|
-
import { pick } from "lodash-es";
|
|
9
|
-
let CurrentUserApiService = class CurrentUserApiService {
|
|
10
|
-
constructor(configurationService, featureService, identitiesService) {
|
|
11
|
-
this.configurationService = configurationService;
|
|
12
|
-
this.featureService = featureService;
|
|
13
|
-
this.identitiesService = identitiesService;
|
|
14
|
-
this.getSessionDetails = () => {
|
|
15
|
-
return pick(this.configurationService.getSessionDetails(), [
|
|
16
|
-
"authorizedFeatures",
|
|
17
|
-
"displayName",
|
|
18
|
-
"id",
|
|
19
|
-
"softwareVersionNumber"
|
|
20
|
-
]);
|
|
21
|
-
};
|
|
22
|
-
this.getUserDetails = () => {
|
|
23
|
-
return this.identitiesService.getUserDetails(this.userId).toPromise();
|
|
24
|
-
};
|
|
25
|
-
this.getUserMemberships = () => {
|
|
26
|
-
return this.identitiesService.getUserMemberships(this.userId).toPromise();
|
|
27
|
-
};
|
|
28
|
-
this.hasAdminFeatures = () => {
|
|
29
|
-
return this.featureService.hasAdminFeatures();
|
|
30
|
-
};
|
|
31
|
-
this.hasFeatures = (features) => {
|
|
32
|
-
return this.featureService.hasRequiredFeatures(features);
|
|
33
|
-
};
|
|
34
|
-
this.userId = configurationService.getSessionDetails().id;
|
|
35
|
-
}
|
|
36
|
-
getApi() {
|
|
37
|
-
return {
|
|
38
|
-
getSessionDetails: this.getSessionDetails,
|
|
39
|
-
getUserDetails: this.getUserDetails,
|
|
40
|
-
getUserMemberships: this.getUserMemberships,
|
|
41
|
-
hasAdminFeatures: this.hasAdminFeatures,
|
|
42
|
-
hasFeatures: this.hasFeatures
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
CurrentUserApiService = __decorate([
|
|
47
|
-
Injectable()
|
|
48
|
-
], CurrentUserApiService);
|
|
49
|
-
export { CurrentUserApiService };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from "@angular/core";
|
|
8
|
-
let EventApiService = class EventApiService {
|
|
9
|
-
constructor(eventService) {
|
|
10
|
-
this.eventService = eventService;
|
|
11
|
-
this.publish = (eventName, payload) => {
|
|
12
|
-
this.eventService.publish(eventName, payload);
|
|
13
|
-
};
|
|
14
|
-
this.subscribe = (eventName, observer) => {
|
|
15
|
-
return this.eventService.subscribe(eventName, observer);
|
|
16
|
-
};
|
|
17
|
-
this.unsubscribe = (subscription) => {
|
|
18
|
-
this.eventService.unsubscribe(subscription);
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
getApi() {
|
|
22
|
-
return {
|
|
23
|
-
publish: this.publish,
|
|
24
|
-
subscribe: this.subscribe,
|
|
25
|
-
unsubscribe: this.unsubscribe
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
EventApiService = __decorate([
|
|
30
|
-
Injectable()
|
|
31
|
-
], EventApiService);
|
|
32
|
-
export { EventApiService };
|
package/file/file-api.service.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Injectable } from "@angular/core";
|
|
8
|
-
let FileApiService = class FileApiService {
|
|
9
|
-
constructor(sviFilesService) {
|
|
10
|
-
this.sviFilesService = sviFilesService;
|
|
11
|
-
this.uploadToViFolder = (file, fileName) => {
|
|
12
|
-
return this.sviFilesService.uploadFileToViFolderFromFile(file, fileName).toPromise();
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
getApi() {
|
|
16
|
-
return {
|
|
17
|
-
uploadToViFolder: this.uploadToViFolder
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
FileApiService = __decorate([
|
|
22
|
-
Injectable()
|
|
23
|
-
], FileApiService);
|
|
24
|
-
export { FileApiService };
|