@sassoftware/vi-api 1.44.0 → 1.48.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.
@@ -197,6 +197,13 @@ export interface ControlStateApi {
197
197
  * @deprecated use `api.control.masking.isMasked`
198
198
  */
199
199
  readonly maskActive: boolean;
200
+ /**
201
+ * Returns the state with a specified key.
202
+ * @method
203
+ * @param state {string} The key of the state to be returned.
204
+ * @returns The specified state of the calling control, or undefined if no match.
205
+ */
206
+ get<T extends keyof ControlClientStates>(state: T): boolean | undefined;
200
207
  /**
201
208
  * Registers a function to be invoked whenever a state change event occurs.
202
209
  * This function receives an object that contains information about the change event.
@@ -391,8 +398,9 @@ export interface ControlPageApi extends ControlPageApiBase {
391
398
  * When providing a url for content: the panel properties will be available on the controller's "slidingPanel" object.
392
399
  * When providing a selector for content: the properties will be set on the element to be created.
393
400
  * @param [onClose] {function} A callback function invoked when the panel is dismissed. There are no parameters. Returns void.
401
+ * @param [focusPreviousActiveElementOnClose] {boolean} Toggle for whether the app should apply focus to the last active element before the panel was opened.
394
402
  */
395
- toggleSlidingPanel<T>(sectionLabel?: string, content?: SlidingPanelContent<T>, panelProperties?: SlidingPanelProperties, onClose?: () => void): void;
403
+ toggleSlidingPanel<T>(sectionLabel?: string, content?: SlidingPanelContent<T>, panelProperties?: SlidingPanelProperties, onClose?: () => void, focusPreviousActiveElementOnClose?: boolean): void;
396
404
  /**
397
405
  * Checks if a page is in edit mode.
398
406
  * @method
@@ -439,6 +447,11 @@ export interface ControlPageApi extends ControlPageApiBase {
439
447
  */
440
448
  masking: MaskingPageApi;
441
449
  onNavigationStart(callback: () => void): void;
450
+ /**
451
+ * Checks if the sliding panel is pinned
452
+ * @returns A boolean value that checks whether the sliding panel is pinned.
453
+ */
454
+ isSlidingPanelPinned(): boolean | undefined;
442
455
  }
443
456
  /**
444
457
  * Methods related to files.
@@ -527,3 +540,45 @@ export interface FieldNotOnPageError {
527
540
  message: string;
528
541
  fields: string[];
529
542
  }
543
+ /**
544
+ * Represents the client states of a control.
545
+ */
546
+ export interface ControlClientStates {
547
+ /**
548
+ * Indicates if the control is required.
549
+ */
550
+ required: boolean;
551
+ /**
552
+ * Indicates if the control is read-only.
553
+ */
554
+ readOnly: boolean;
555
+ /**
556
+ * Indicates if the control is hidden.
557
+ */
558
+ hidden: boolean;
559
+ /**
560
+ * Indicates if the control allows input.
561
+ */
562
+ allowInput: boolean;
563
+ /**
564
+ * Indicates if the control could potentially be read-only
565
+ */
566
+ couldBeReadOnly: boolean;
567
+ /**
568
+ * Indicates if the control could potentially be required
569
+ */
570
+ couldBeRequired: boolean;
571
+ /**
572
+ * Indicates if the control is disabled.
573
+ */
574
+ disabled: boolean;
575
+ /**
576
+ * Indicates if the control has masking active.
577
+ * @deprecated Use `api.control.masking.isMasked` instead.
578
+ */
579
+ maskActive: boolean;
580
+ /**
581
+ * A dynamic map of additional states, where the key is the state name and the value is a boolean.
582
+ */
583
+ [state: string]: boolean;
584
+ }
package/control/page.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Type } from "@angular/core";
2
2
  import { ActionState } from "../object/object-api";
3
- export declare const enum PageModeEvent {
3
+ export declare enum PageModeEvent {
4
4
  CREATE = "create",
5
5
  EDIT = "edit",
6
6
  OPEN = "open",
package/control/page.js CHANGED
@@ -1 +1,8 @@
1
- export {};
1
+ export var PageModeEvent;
2
+ (function (PageModeEvent) {
3
+ PageModeEvent["CREATE"] = "create";
4
+ PageModeEvent["EDIT"] = "edit";
5
+ PageModeEvent["OPEN"] = "open";
6
+ PageModeEvent["INSPECT"] = "inspect";
7
+ PageModeEvent["SUMMARY"] = "summary";
8
+ })(PageModeEvent || (PageModeEvent = {}));
@@ -17,6 +17,14 @@ export interface IdentitySummary {
17
17
  state?: IdentityState;
18
18
  type: IdentityType;
19
19
  }
20
+ export interface IdentityFlatMembership {
21
+ id: string;
22
+ name: string;
23
+ providerId: string;
24
+ implicit: boolean;
25
+ parentsIds?: string[];
26
+ topLevel: boolean;
27
+ }
20
28
  export interface UserSummary extends IdentitySummary {
21
29
  readonly type: IdentityType.User;
22
30
  }
@@ -53,7 +61,7 @@ export interface CurrentUserApi {
53
61
  * @param limit Maximum number of groups to be returned. Default: 1000.
54
62
  * @returns A list of group details.
55
63
  */
56
- getUserMemberships(limit?: number): Promise<IdentitySummary[]>;
64
+ getUserMemberships(limit?: number): Promise<IdentityFlatMembership[]>;
57
65
  /**
58
66
  * @method
59
67
  * @description Verifies if the current user has administration features.
@@ -1,3 +1,4 @@
1
+ import { expectType } from "../../shared/util/helper-functions";
1
2
  export var IdentityState;
2
3
  (function (IdentityState) {
3
4
  IdentityState["Active"] = "active";
@@ -9,3 +10,4 @@ export var IdentityType;
9
10
  IdentityType["User"] = "user";
10
11
  IdentityType["Group"] = "group";
11
12
  })(IdentityType || (IdentityType = {}));
13
+ expectType(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/vi-api",
3
- "version": "1.44.0",
3
+ "version": "1.48.0",
4
4
  "description": "Types used in the SAS Visual Investigator API",
5
5
  "keywords": [
6
6
  "SAS",
@@ -1,4 +1,4 @@
1
- import { ResourcedString } from "../svi-datahub";
1
+ import { ControlAttributeMap, IBaseControlAttribute, IGenericControlAttribute } from "../config/control-attribute-types";
2
2
  import { Control } from "../control/page";
3
3
  import { ChildNode, TypeAttributes } from "../object/object-api";
4
4
  import { PageTemplateMetadata } from "../page-model/page-model-api";
@@ -11,20 +11,7 @@ export interface EntityToolbarItem {
11
11
  [attr: string]: any;
12
12
  };
13
13
  }
14
- export interface PropertyConfig {
15
- [property: string]: any;
16
- order?: number;
17
- type: string;
18
- displayName: ResourcedString;
19
- required?: boolean | string;
20
- localizable?: boolean | string;
21
- allowMultiple?: boolean | string;
22
- states?: Record<string, boolean>;
23
- defaultValue?: any;
24
- disabledExpression?: string;
25
- picklistName?: string;
26
- ignoreRestrictions?: boolean;
27
- }
14
+ export type PropertyConfig<T = any> = ControlAttributeMap<T>[keyof ControlAttributeMap<T>] | IBaseControlAttribute | IGenericControlAttribute;
28
15
  export interface SelectedNode {
29
16
  id: number;
30
17
  node: ChildNode;
@@ -1,6 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- // Generated using typescript-generator version 2.15.527 on 2024-10-22 14:13:02.
3
+ // Generated using typescript-generator version 2.15.527 on 2025-04-07 09:10:17.
4
4
 
5
5
  export interface BaseRep extends TrackedResource {
6
6
  links?: Link[];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@types/score-reps",
3
- "version": "7.4.4",
3
+ "version": "8.3.2",
4
4
  "types": "index.d.ts"
5
5
  }
@@ -71,6 +71,13 @@ export interface SviShellTabData {
71
71
  * { and: ["svi-alert", "documentGeneratorAdapter"] }
72
72
  */
73
73
  requiredServices?: RequiredResourcesExpression;
74
+ /**
75
+ * Set to true if the tab visibility depends on CAS being enabled.
76
+ * If CAS is enabled, the tab will show. If CAS is disabled, the tab will be
77
+ * hidden and cannot be navigated to. If set to false/undefined (default),
78
+ * the tab will show regardless of whether CAS is enabled.
79
+ */
80
+ CASSensitive?: boolean;
74
81
  [key: string]: any;
75
82
  }
76
83
  export interface ExternalTabConfig<T = SviShellTabData, P = any> {