@sassoftware/vi-api 0.0.29

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.
Files changed (140) hide show
  1. package/alert-reps/index.d.ts +677 -0
  2. package/alert-reps/package.json +5 -0
  3. package/component/bindings.d.ts +85 -0
  4. package/component/bindings.js +1 -0
  5. package/component/index.d.ts +49 -0
  6. package/component/index.js +16 -0
  7. package/component/package.json +9 -0
  8. package/component/public-api.d.ts +1 -0
  9. package/component/public-api.js +1 -0
  10. package/config/config-api.d.ts +92 -0
  11. package/config/config-api.js +6 -0
  12. package/config/package.json +9 -0
  13. package/config/public-api.d.ts +1 -0
  14. package/config/public-api.js +1 -0
  15. package/control/control-api.d.ts +450 -0
  16. package/control/control-api.js +1 -0
  17. package/control/data-types.d.ts +9 -0
  18. package/control/data-types.js +1 -0
  19. package/control/events.d.ts +75 -0
  20. package/control/events.js +5 -0
  21. package/control/file.d.ts +14 -0
  22. package/control/file.js +1 -0
  23. package/control/image.d.ts +14 -0
  24. package/control/image.js +1 -0
  25. package/control/package.json +9 -0
  26. package/control/page.d.ts +55 -0
  27. package/control/page.js +1 -0
  28. package/control/public-api.d.ts +8 -0
  29. package/control/public-api.js +8 -0
  30. package/control/restrictions.d.ts +33 -0
  31. package/control/restrictions.js +1 -0
  32. package/control/toolbar-property-api.d.ts +16 -0
  33. package/control/toolbar-property-api.js +1 -0
  34. package/current-user/currentUser-api.d.ts +65 -0
  35. package/current-user/currentUser-api.js +11 -0
  36. package/current-user/package.json +9 -0
  37. package/current-user/public-api.d.ts +1 -0
  38. package/current-user/public-api.js +1 -0
  39. package/event/event-api.d.ts +57 -0
  40. package/event/event-api.js +26 -0
  41. package/event/package.json +9 -0
  42. package/event/public-api.d.ts +1 -0
  43. package/event/public-api.js +1 -0
  44. package/file/file-api.d.ts +44 -0
  45. package/file/file-api.js +1 -0
  46. package/file/package.json +9 -0
  47. package/file/public-api.d.ts +1 -0
  48. package/file/public-api.js +1 -0
  49. package/http/index.d.ts +364 -0
  50. package/http/index.js +45 -0
  51. package/http/package.json +9 -0
  52. package/http/public-api.d.ts +1 -0
  53. package/http/public-api.js +1 -0
  54. package/index.d.ts +65 -0
  55. package/index.js +1 -0
  56. package/localization/localization-api.d.ts +26 -0
  57. package/localization/localization-api.js +1 -0
  58. package/localization/package.json +9 -0
  59. package/localization/public-api.d.ts +1 -0
  60. package/localization/public-api.js +1 -0
  61. package/metadata/admin/admin-metadata-api.d.ts +18 -0
  62. package/metadata/admin/admin-metadata-api.js +1 -0
  63. package/metadata/metadata-api.d.ts +237 -0
  64. package/metadata/metadata-api.js +1 -0
  65. package/metadata/package.json +9 -0
  66. package/metadata/public-api.d.ts +2 -0
  67. package/metadata/public-api.js +2 -0
  68. package/object/object-api.d.ts +507 -0
  69. package/object/object-api.js +13 -0
  70. package/object/package.json +9 -0
  71. package/object/public-api.d.ts +1 -0
  72. package/object/public-api.js +1 -0
  73. package/package.json +14 -0
  74. package/page-admin/package.json +9 -0
  75. package/page-admin/page-admin-api.d.ts +29 -0
  76. package/page-admin/page-admin-api.js +11 -0
  77. package/page-admin/public-api.d.ts +1 -0
  78. package/page-admin/public-api.js +1 -0
  79. package/page-model/package.json +9 -0
  80. package/page-model/page-model-api.d.ts +126 -0
  81. package/page-model/page-model-api.js +11 -0
  82. package/page-model/public-api.d.ts +1 -0
  83. package/page-model/public-api.js +1 -0
  84. package/page-state/package.json +9 -0
  85. package/page-state/page-state-api.d.ts +59 -0
  86. package/page-state/page-state-api.js +1 -0
  87. package/page-state/public-api.d.ts +1 -0
  88. package/page-state/public-api.js +1 -0
  89. package/property/package.json +9 -0
  90. package/property/property-api.d.ts +46 -0
  91. package/property/property-api.js +17 -0
  92. package/property/public-api.d.ts +1 -0
  93. package/property/public-api.js +1 -0
  94. package/public-api.d.ts +1 -0
  95. package/public-api.js +1 -0
  96. package/reference-data/package.json +9 -0
  97. package/reference-data/public-api.d.ts +1 -0
  98. package/reference-data/public-api.js +1 -0
  99. package/reference-data/refData.d.ts +72 -0
  100. package/reference-data/refData.js +1 -0
  101. package/resource/package.json +9 -0
  102. package/resource/public-api.d.ts +1 -0
  103. package/resource/public-api.js +1 -0
  104. package/resource/resource-api.d.ts +17 -0
  105. package/resource/resource-api.js +1 -0
  106. package/score-reps/index.d.ts +133 -0
  107. package/score-reps/package.json +5 -0
  108. package/search/client/client-search-api.d.ts +159 -0
  109. package/search/client/client-search-api.js +14 -0
  110. package/search/package.json +9 -0
  111. package/search/public-api.d.ts +2 -0
  112. package/search/public-api.js +2 -0
  113. package/search/search-api.d.ts +72 -0
  114. package/search/search-api.js +1 -0
  115. package/sheet/package.json +9 -0
  116. package/sheet/public-api.d.ts +1 -0
  117. package/sheet/public-api.js +1 -0
  118. package/sheet/sheet-api.d.ts +184 -0
  119. package/sheet/sheet-api.js +1 -0
  120. package/svi-datahub/index.d.ts +4514 -0
  121. package/svi-datahub/package.json +5 -0
  122. package/svi-sand/index.d.ts +1057 -0
  123. package/svi-sand/package.json +5 -0
  124. package/tab/package.json +9 -0
  125. package/tab/public-api.d.ts +1 -0
  126. package/tab/public-api.js +1 -0
  127. package/tab/tab-api.d.ts +33 -0
  128. package/tab/tab-api.js +1 -0
  129. package/theme/package.json +9 -0
  130. package/theme/public-api.d.ts +1 -0
  131. package/theme/public-api.js +1 -0
  132. package/theme/theme-api.d.ts +35 -0
  133. package/theme/theme-api.js +17 -0
  134. package/time-slider/index.d.ts +35 -0
  135. package/time-slider/index.js +17 -0
  136. package/traversal/package.json +9 -0
  137. package/traversal/public-api.d.ts +1 -0
  138. package/traversal/public-api.js +1 -0
  139. package/traversal/traversal-api.d.ts +34 -0
  140. package/traversal/traversal-api.js +1 -0
@@ -0,0 +1,85 @@
1
+ import { PageDataChange, PageModeChange } from "../control/events";
2
+ import { Relationship } from "../svi-datahub";
3
+ import { QueryMode } from "../svi-sand";
4
+ import { ControlContainer } from "../object/object-api";
5
+ import { PageModel, PageModelObjectData } from "../page-model/page-model-api";
6
+ import { SearchObject, SearchQuery } from "../search/client/client-search-api";
7
+ import { TimeSliderEventDates, TimeSliderRange } from "../time-slider";
8
+ export interface SearchAndSelectWithPreviewBindings {
9
+ onSearchItemSelected: (selectedItem: SearchObject | null) => void;
10
+ onSearchItemDoubleClicked?: (selectedItem: SearchObject) => void;
11
+ initialQuery?: string;
12
+ additionalModes?: QueryMode[];
13
+ objectTypeFilter?: string[];
14
+ }
15
+ export interface PageViewerApi {
16
+ save: () => Promise<void>;
17
+ isDirty: () => boolean;
18
+ isValid: () => Promise<boolean>;
19
+ }
20
+ export interface PageBindings {
21
+ docId?: string;
22
+ docType?: string;
23
+ eventName?: string;
24
+ templateUuid?: string;
25
+ showToolbar?: boolean;
26
+ tempCreateId?: string;
27
+ containerClass?: string;
28
+ pageClass?: string;
29
+ enableSheets?: string;
30
+ pageModel?: PageModel;
31
+ staticDocumentData?: Record<string, any>;
32
+ initialCreateData?: Record<string, any>;
33
+ setApi?: (api: PageViewerApi) => void;
34
+ mainTab?: string;
35
+ onDirty?: (isDirty: boolean) => void;
36
+ onChange?: (change: PageDataChange | PageModeChange) => void;
37
+ }
38
+ export interface ControlCollectionBindings {
39
+ controlContainer?: ControlContainer;
40
+ pageModel?: PageModel;
41
+ root?: boolean;
42
+ }
43
+ export interface RelationshipDetailsBindings {
44
+ targetObjectTypeName: string;
45
+ targetObjectTypeLabel: string;
46
+ parentObjectTypeName: string;
47
+ parentObjectTypeLabel: string;
48
+ linkReasons: Relationship[];
49
+ selectedItem?: {
50
+ id: string;
51
+ type: string;
52
+ };
53
+ newPageModel?: {
54
+ model: PageModelObjectData;
55
+ };
56
+ onLinkReasonSelected: (linkReason: Relationship) => void;
57
+ relationshipValues?: Record<string, any>;
58
+ initialCreateData?: Record<string, any>;
59
+ setApi?: (api: PageViewerApi) => void;
60
+ onRelatedPageChange?: (change: PageDataChange | PageModeChange) => void;
61
+ onRelationshipValuesChange?: (current: Record<string, any>, previous?: Record<string, any>) => void;
62
+ }
63
+ export interface SearchInputInputBindings {
64
+ entityName: string;
65
+ queryBuilderId?: string;
66
+ showQueryBuilder?: boolean;
67
+ queryText?: string;
68
+ autoFocus?: boolean;
69
+ }
70
+ export interface SearchInputBindings extends SearchInputInputBindings {
71
+ onSearch?: (model: SearchQuery) => void;
72
+ onValueChange?: (val: string) => void;
73
+ }
74
+ export interface TimeSliderInputBindings {
75
+ timeSliderId: string;
76
+ timeSliderDates: TimeSliderEventDates;
77
+ viewRange: TimeSliderRange;
78
+ isReadOnly: boolean;
79
+ sliderWidth: number;
80
+ }
81
+ export interface TimeSliderBindings extends TimeSliderInputBindings {
82
+ rangeChangeEvent?: () => void;
83
+ close?: () => void;
84
+ }
85
+ export declare type SviComponentBindings = ControlCollectionBindings | RelationshipDetailsBindings | SearchInputBindings | PageBindings | SearchAndSelectWithPreviewBindings | TimeSliderBindings;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,49 @@
1
+ import { ControlCollectionBindings, PageBindings, RelationshipDetailsBindings, SearchAndSelectWithPreviewBindings, SearchInputBindings, SviComponentBindings, TimeSliderBindings } from "./bindings";
2
+ export declare enum SviComponent {
3
+ ControlCollection = "svi-control-collection",
4
+ RelationshipDetails = "svi-relationship-details",
5
+ SearchInput = "svi-search-input",
6
+ Page = "svi-page",
7
+ SearchAndSelectWithPreview = "svi-search-and-select-with-preview",
8
+ TimeSlider = "svi-time-slider"
9
+ }
10
+ export interface ComponentCreationResult {
11
+ element: HTMLElement;
12
+ destroy: () => void;
13
+ component: Record<string, any>;
14
+ }
15
+ /**
16
+ * Functionality related to dynamically creating SAS Visual Investigator UI components.
17
+ * Accessed from the window at window.sas.vi.component.
18
+ */
19
+ export interface ComponentApi {
20
+ create(component: SviComponent.ControlCollection, target: HTMLElement, bindings?: ControlCollectionBindings): Promise<ComponentCreationResult>;
21
+ create(component: SviComponent.Page, target: HTMLElement, bindings?: PageBindings): Promise<ComponentCreationResult>;
22
+ create(component: SviComponent.RelationshipDetails, target: HTMLElement, bindings?: RelationshipDetailsBindings): Promise<ComponentCreationResult>;
23
+ create(component: SviComponent.SearchInput, target: HTMLElement, bindings?: SearchInputBindings): Promise<ComponentCreationResult>;
24
+ create(component: SviComponent.SearchAndSelectWithPreview, target: HTMLElement, bindings?: SearchAndSelectWithPreviewBindings): Promise<ComponentCreationResult>;
25
+ create(component: SviComponent.TimeSlider, target: HTMLElement, bindings?: TimeSliderBindings): Promise<ComponentCreationResult>;
26
+ /**
27
+ * Dynamically create a SAS Visual Investigator UI component appended to a given target DOM element location.
28
+ *
29
+ * @method
30
+ * @param component {SviComponent} Creates the component.
31
+ * @param target {HTMLElement} Appends the component to the element.
32
+ * @param [bindings] {SviComponentBindings} Creates the component with the bindings.
33
+ * @returns A promise that resolves when the component has been created.
34
+ * Resolves to an object containing the created element and a function to destroy it.
35
+ */
36
+ create(component: SviComponent, target: HTMLElement, bindings?: SviComponentBindings): Promise<ComponentCreationResult>;
37
+ /**
38
+ * @method
39
+ * Notifies the application to identify and react to any changes that have been applied.
40
+ * @param [callback] {ComponentApi~afterDetectChanges} Function to be called after a change is detected.
41
+ */
42
+ detectChanges(callback?: () => void): void;
43
+ }
44
+ /**
45
+ * @callback ComponentApi~afterDetectChanges
46
+ * @description A function to be called after change detection
47
+ * @returns {void}
48
+ */
49
+ export * from "./bindings";
@@ -0,0 +1,16 @@
1
+ /* An enum containing the components that we support the creation of. */
2
+ export var SviComponent;
3
+ (function (SviComponent) {
4
+ SviComponent["ControlCollection"] = "svi-control-collection";
5
+ SviComponent["RelationshipDetails"] = "svi-relationship-details";
6
+ SviComponent["SearchInput"] = "svi-search-input";
7
+ SviComponent["Page"] = "svi-page";
8
+ SviComponent["SearchAndSelectWithPreview"] = "svi-search-and-select-with-preview";
9
+ SviComponent["TimeSlider"] = "svi-time-slider";
10
+ })(SviComponent || (SviComponent = {}));
11
+ /**
12
+ * @callback ComponentApi~afterDetectChanges
13
+ * @description A function to be called after change detection
14
+ * @returns {void}
15
+ */
16
+ export * from "./bindings";
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/component",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -0,0 +1 @@
1
+ export * from "./index";
@@ -0,0 +1 @@
1
+ export * from "./index";
@@ -0,0 +1,92 @@
1
+ import { ControlMetadata, ResourcedString } from "../svi-datahub";
2
+ import { ControlStates } from "../control/page";
3
+ export declare enum ControlType {
4
+ AngularJS = "angularjs",
5
+ Angular = "angular",
6
+ WebComponent = "webcomponent"
7
+ }
8
+ export interface Solution {
9
+ label: string;
10
+ version?: string;
11
+ }
12
+ export interface SolutionExtension extends ControlMetadata {
13
+ controlAttributes?: SolutionExtensionConfigTypeAttributes;
14
+ metadata?: SolutionExtensionMetadata;
15
+ resolvedDisplayName?: string;
16
+ resolvedDescription?: string;
17
+ name: string;
18
+ }
19
+ export interface SolutionExtensionConfigTypeAttributes {
20
+ metadata?: SolutionExtensionMetadata;
21
+ attributes?: Record<string, SolutionExtensionAttribute>;
22
+ }
23
+ export interface SolutionExtensionAttribute {
24
+ type: string;
25
+ displayName: ResourcedString;
26
+ order?: number;
27
+ required?: boolean | string;
28
+ localizable?: boolean | string;
29
+ allowMultiple?: boolean | string;
30
+ states?: Record<string, boolean>;
31
+ defaultValue?: any;
32
+ disabledExpression?: string;
33
+ picklistName?: string;
34
+ ignoreRestrictions?: boolean;
35
+ }
36
+ export interface SolutionExtensionMetadata {
37
+ iconClass?: string;
38
+ useDragHandle?: boolean;
39
+ renderAs?: ControlType;
40
+ containerRestrictions?: string[];
41
+ fullScreenMode?: boolean;
42
+ states?: ControlStates;
43
+ path?: string;
44
+ showInToolbox?: "true" | "false";
45
+ mainDocumentOnly?: boolean;
46
+ }
47
+ /**
48
+ * Functionality related to configuration.
49
+ * Accessed from the window at window.sas.vi.config.
50
+ */
51
+ export interface ConfigApi {
52
+ /**
53
+ * @method
54
+ * @description Gets the soft expansion limit of the network nodes.
55
+ * @returns Promise containing the soft expansion limit.
56
+ */
57
+ getSoftExpansionLimit(): Promise<number>;
58
+ /**
59
+ * @method
60
+ * @description Gets the hard expansion limit of the network nodes.
61
+ * @returns Promise containing the hard expansion limit.
62
+ */
63
+ getHardExpansionLimit(): Promise<number>;
64
+ /**
65
+ * @method
66
+ * @description Gets the registered solutions and their labels and versions.
67
+ * @returns The currently registered solutions.
68
+ */
69
+ getSolutions(): Map<string, Solution>;
70
+ /**
71
+ * @method
72
+ * @description Registers a new solution and version in the SAS Visual Investigator about dialog box.
73
+ * If a solution with that key already exists, it will not be overwritten.
74
+ * @param key {string} Unique identifier for the solution.
75
+ * @param label {string} Localised name of the solution to be shown to the user.
76
+ * @param [version] {string} Version of the solution.
77
+ */
78
+ registerSolution(key: string, label: string, version?: string): void;
79
+ /**
80
+ * @method
81
+ * @description Retrieves registered solution extension with a given name.
82
+ * @param name {string} Name of the solution extension.
83
+ * @returns A promise that resolves to the solution extension if the name is found.
84
+ */
85
+ getSolutionExtension(name: string): Promise<SolutionExtension | undefined>;
86
+ /**
87
+ * @method
88
+ * @description Registers a solution extension with the application.
89
+ * @param config {SolutionExtension} Solution extension configuration.
90
+ */
91
+ registerSolutionExtension(config: SolutionExtension): void;
92
+ }
@@ -0,0 +1,6 @@
1
+ export var ControlType;
2
+ (function (ControlType) {
3
+ ControlType["AngularJS"] = "angularjs";
4
+ ControlType["Angular"] = "angular";
5
+ ControlType["WebComponent"] = "webcomponent";
6
+ })(ControlType || (ControlType = {}));
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/config",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -0,0 +1 @@
1
+ export * from "./config-api";
@@ -0,0 +1 @@
1
+ export * from "./config-api";