@ixon-cdk/types 1.11.0 → 1.12.0-next.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.
@@ -1,13 +1,16 @@
1
+ /** @deprecated */
1
2
  export interface ActionBottomSheetOptions {
2
3
  /** List of actions. */
3
4
  actions: ActionBottomSheetAction[];
4
5
  }
6
+ /** @deprecated */
5
7
  export interface ActionBottomSheetAction {
6
8
  /** Title of the action. */
7
9
  title: string;
8
10
  /** Indicates that the action result is destructive. Defaults to false. */
9
11
  destructive?: boolean;
10
12
  }
13
+ /** @deprecated */
11
14
  export interface ActionBottomSheetResult {
12
15
  /** The index of the action that was clicked (zero-based). */
13
16
  index: number;
@@ -1,8 +1,8 @@
1
1
  interface DialogOptions {
2
2
  /** Message to show on the dialog. */
3
- message: string;
3
+ message?: string;
4
4
  /** Title of the dialog. */
5
- title: string;
5
+ title?: string;
6
6
  }
7
7
  export interface AlertDialogOptions extends DialogOptions {
8
8
  /** Text to use on the action button. Defaults to "Done". */
@@ -20,7 +20,28 @@ export interface ConfirmDialogOptions extends DialogOptions {
20
20
  /** Indicates that the confirmation result is destructive. Defaults to false. */
21
21
  destructive?: boolean;
22
22
  }
23
- export interface FormDialogOptions {
23
+ export interface ContentDialogOptions {
24
+ /** HTML content of the dialog. */
25
+ htmlContent: HTMLElement | string;
26
+ /** CSS styles for the dialog content. */
27
+ styles?: string;
28
+ /** Title of the dialog. */
29
+ title?: string;
30
+ /**
31
+ * Called when the dialog is opened.
32
+ *
33
+ * @param shadowRoot The shadow root that contains the HTML content and styles.
34
+ * @param close This function call closes the dialog.
35
+ */
36
+ onopened?: (shadowRoot: ShadowRoot, close: () => void) => any;
37
+ /**
38
+ * Called when the dialog closes.
39
+ *
40
+ * @param shadowRoot The shadow root that contains the HTML content and styles.
41
+ */
42
+ onclose?: (shadowRoot: ShadowRoot) => any;
43
+ }
44
+ export interface FormDialogOptions extends DialogOptions {
24
45
  /** Text to use on the cancelation action button. Defaults to "Cancel". */
25
46
  cancelButtonText?: string;
26
47
  /**
@@ -36,10 +57,6 @@ export interface FormDialogOptions {
36
57
  initialValue?: any;
37
58
  /** Inputs that will be rendered in the dialog content. */
38
59
  inputs: any[];
39
- /** Message to show on the dialog. */
40
- message?: string;
41
- /** Title of the dialog. */
42
- title: string;
43
60
  }
44
61
  export interface FormDialogResult {
45
62
  /** The form value that was submitted. */
@@ -6,11 +6,13 @@ import type { ResourceDataClient } from '../resource-data';
6
6
  import type { VpnClientStatus } from '../vpn-client';
7
7
  import type { ComponentContextAppData } from './app-data';
8
8
  import type { ActionBottomSheetOptions, ActionBottomSheetResult } from './bottom-sheet';
9
- import type { AlertDialogOptions, ConfirmDialogOptions, FormDialogOptions, FormDialogResult } from './dialog';
9
+ import type { AlertDialogOptions, ConfirmDialogOptions, ContentDialogOptions, FormDialogOptions, FormDialogResult } from './dialog';
10
+ import type { ActionMenuOptions, ActionMenuResult } from './menu';
10
11
  import type { Tooltip, TooltipOptions } from './tooltip';
11
12
  export type { ComponentContextAppData } from './app-data';
12
13
  export type { ActionBottomSheetAction, ActionBottomSheetOptions, ActionBottomSheetResult } from './bottom-sheet';
13
- export type { AlertDialogOptions, ConfirmDialogOptions, FormDialogOptions, FormDialogResult } from './dialog';
14
+ export type { AlertDialogOptions, ConfirmDialogOptions, ContentDialogOptions, FormDialogOptions, FormDialogResult, } from './dialog';
15
+ export type { ActionMenuAction, ActionMenuOptions, ActionMenuResult } from './menu';
14
16
  export type { Tooltip, TooltipOptions } from './tooltip';
15
17
  export * from './input';
16
18
  /**
@@ -132,10 +134,20 @@ export interface ComponentContext<ComponentContextInputs extends object = {
132
134
  *
133
135
  * @param options configures the action sheet
134
136
  *
135
- * @experimental
137
+ * @deprecated Please use `openActionMenu(target, options)` instead.
136
138
  * @ignore
137
139
  */
138
140
  openActionBottomSheet(options: ActionBottomSheetOptions): Promise<ActionBottomSheetResult>;
141
+ /**
142
+ * Opens an action menu that displays actions a user can take.
143
+ *
144
+ * @param target the target element
145
+ * @param options configures the action menu
146
+ *
147
+ * @experimental
148
+ * @ignore
149
+ */
150
+ openActionMenu(target: HTMLElement, options: ActionMenuOptions): Promise<ActionMenuResult | undefined>;
139
151
  /**
140
152
  * Opens an alert dialog.
141
153
  *
@@ -148,6 +160,15 @@ export interface ComponentContext<ComponentContextInputs extends object = {
148
160
  * @param options configures the confirm dialog
149
161
  */
150
162
  openConfirmDialog(options: ConfirmDialogOptions): Promise<boolean | undefined>;
163
+ /**
164
+ * Opens a content dialog.
165
+ *
166
+ * @param options configures the content dialog
167
+ *
168
+ * @experimental
169
+ * @ignore
170
+ */
171
+ openContentDialog(options: ContentDialogOptions): Promise<undefined>;
151
172
  /**
152
173
  * Opens a form dialog.
153
174
  *
@@ -0,0 +1,14 @@
1
+ export interface ActionMenuOptions {
2
+ /** List of actions. */
3
+ actions: ActionMenuAction[];
4
+ }
5
+ export interface ActionMenuAction {
6
+ /** Title of the action. */
7
+ title: string;
8
+ /** Indicates that the action result is destructive. Defaults to false. */
9
+ destructive?: boolean;
10
+ }
11
+ export interface ActionMenuResult {
12
+ /** The index of the action that was clicked (zero-based). */
13
+ index: number;
14
+ }
@@ -1,4 +1,7 @@
1
+ import type { AgentReference, AssetReference } from './reference';
1
2
  export interface Audience {
3
+ agents?: AgentReference[];
4
+ assets?: AssetReference[];
2
5
  custom?: {};
3
6
  default?: boolean;
4
7
  description?: string | null;
@@ -1,5 +1,7 @@
1
+ import type { CompanyReference } from './company';
1
2
  import type { ResLink } from './res-link';
2
3
  export interface BackendComponentTemplateShare {
3
- company: ResLink;
4
- template: ResLink;
4
+ company?: CompanyReference | null;
5
+ publicId: string;
6
+ template?: ResLink;
5
7
  }
@@ -90,6 +90,7 @@ export * from './password-change';
90
90
  export * from './permission';
91
91
  export * from './platform-server';
92
92
  export * from './policy';
93
+ export * from './reference';
93
94
  export * from './registration';
94
95
  export * from './report-recurrence';
95
96
  export * from './report-schedule';
@@ -0,0 +1,8 @@
1
+ export interface AgentReference {
2
+ publicId: string;
3
+ name?: string | null;
4
+ }
5
+ export interface AssetReference {
6
+ publicId: string;
7
+ name?: string;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixon-cdk/types",
3
- "version": "1.11.0",
3
+ "version": "1.12.0-next.1",
4
4
  "description": "",
5
5
  "main": "./dist/component-devkit/src/types/src/index.d.ts",
6
6
  "author": "",