@ixon-cdk/types 1.2.0-next.9 → 1.3.0-next.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/dist/types/backend-component/backend-component-call.d.ts +1 -1
- package/dist/types/backend-component/backend-component-client.d.ts +2 -2
- package/dist/types/component-context/bottom-sheet.d.ts +14 -0
- package/dist/types/component-context/dialog.d.ts +48 -0
- package/dist/types/component-context/index.d.ts +40 -0
- package/dist/types/resource-data/resource-data-client.d.ts +2 -0
- package/dist/types/resource-data/resource-data-query.d.ts +1 -1
- package/dist/types/resource-data/resource-data.d.ts +14 -0
- package/package.json +1 -1
|
@@ -4,9 +4,9 @@ export interface BackendComponentClient {
|
|
|
4
4
|
destroy(): void;
|
|
5
5
|
/**
|
|
6
6
|
* @param {string} functionName The name of the Custom Backend Component function you want to call
|
|
7
|
-
* @param {{ [key: string]:
|
|
7
|
+
* @param {{ [key: string]: any }} functionArguments The arguments you want to pass to the Custom Backend Component function
|
|
8
8
|
*/
|
|
9
9
|
call(functionName: string, functionArguments?: {
|
|
10
|
-
[key: string]:
|
|
10
|
+
[key: string]: any;
|
|
11
11
|
}): Promise<BackendComponentResult>;
|
|
12
12
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ActionBottomSheetOptions {
|
|
2
|
+
/** List of actions. */
|
|
3
|
+
actions: ActionBottomSheetAction[];
|
|
4
|
+
}
|
|
5
|
+
export interface ActionBottomSheetAction {
|
|
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 ActionBottomSheetResult {
|
|
12
|
+
/** The index of the action that was clicked (zero-based). */
|
|
13
|
+
index: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface DialogOptions {
|
|
2
|
+
/** Message to show on the dialog. */
|
|
3
|
+
message: string;
|
|
4
|
+
/** Title of the dialog. */
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AlertDialogOptions extends DialogOptions {
|
|
8
|
+
/** Text to use on the action button. Defaults to "Done". */
|
|
9
|
+
buttonText?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ConfirmDialogOptions extends DialogOptions {
|
|
12
|
+
/** Text to use on the cancelation action button. Defaults to "Cancel". */
|
|
13
|
+
cancelButtonText?: string;
|
|
14
|
+
/** Text to use on the confirmation action button. Defaults to "Confirm". */
|
|
15
|
+
confirmButtonText?: string;
|
|
16
|
+
/** Indicates whether a confirm checkbox must be shown. Defaults to false. */
|
|
17
|
+
confirmCheckbox?: boolean;
|
|
18
|
+
/** Text to use for the confirm checkbox. Defaults to "I am sure". */
|
|
19
|
+
confirmCheckboxText?: string;
|
|
20
|
+
/** Indicates that the confirmation result is destructive. Defaults to false. */
|
|
21
|
+
destructive?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface FormDialogOptions {
|
|
24
|
+
/** Text to use on the cancelation action button. Defaults to "Cancel". */
|
|
25
|
+
cancelButtonText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates whether a discard changes prompt is shown, when the form state is dirty and the user closes the form dialog by pressing
|
|
28
|
+
* escape, clicking on the backdrop or clicking on the cancel button.
|
|
29
|
+
*
|
|
30
|
+
* Defaults to false.
|
|
31
|
+
* */
|
|
32
|
+
discardChangesPrompt?: boolean;
|
|
33
|
+
/** Text to use on the submit action button. Defaults to "Submit". */
|
|
34
|
+
submitButtonText?: string;
|
|
35
|
+
/** Initial value for the form. */
|
|
36
|
+
initialValue?: any;
|
|
37
|
+
/** Inputs that will be rendered in the dialog content. */
|
|
38
|
+
inputs: any[];
|
|
39
|
+
/** Message to show on the dialog. */
|
|
40
|
+
message?: string;
|
|
41
|
+
/** Title of the dialog. */
|
|
42
|
+
title: string;
|
|
43
|
+
}
|
|
44
|
+
export interface FormDialogResult {
|
|
45
|
+
/** The form value that was submitted. */
|
|
46
|
+
value: any;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -4,8 +4,12 @@ import type { LoggingDataClient, LoggingDataTimeRange } from '../logging-data';
|
|
|
4
4
|
import type { ResourceDataClient } from '../resource-data';
|
|
5
5
|
import type { VpnClientStatus } from '../vpn-client';
|
|
6
6
|
import type { ComponentContextAppData } from './app-data';
|
|
7
|
+
import type { ActionBottomSheetOptions, ActionBottomSheetResult } from './bottom-sheet';
|
|
8
|
+
import type { AlertDialogOptions, ConfirmDialogOptions, FormDialogOptions, FormDialogResult } from './dialog';
|
|
7
9
|
import type { Tooltip, TooltipOptions } from './tooltip';
|
|
8
10
|
export type { ComponentContextAppData } from './app-data';
|
|
11
|
+
export type { ActionBottomSheetAction, ActionBottomSheetOptions, ActionBottomSheetResult } from './bottom-sheet';
|
|
12
|
+
export type { AlertDialogOptions, ConfirmDialogOptions, FormDialogOptions, FormDialogResult } from './dialog';
|
|
9
13
|
export type { Tooltip, TooltipOptions } from './tooltip';
|
|
10
14
|
export * from './input';
|
|
11
15
|
/**
|
|
@@ -122,6 +126,42 @@ export interface ComponentContext<ComponentContextInputs extends object = {
|
|
|
122
126
|
* @param url The URL to navigate to, don't include the host.
|
|
123
127
|
*/
|
|
124
128
|
navigateByUrl(url: string): void;
|
|
129
|
+
/**
|
|
130
|
+
* Opens an action sheet from the bottom of the screen that displays actions a user can take.
|
|
131
|
+
*
|
|
132
|
+
* @param options configures the action sheet
|
|
133
|
+
*
|
|
134
|
+
* @experimental
|
|
135
|
+
* @ignore
|
|
136
|
+
*/
|
|
137
|
+
openActionBottomSheet(options: ActionBottomSheetOptions): Promise<ActionBottomSheetResult>;
|
|
138
|
+
/**
|
|
139
|
+
* Opens an alert dialog.
|
|
140
|
+
*
|
|
141
|
+
* @param options configures the alert dialog
|
|
142
|
+
*
|
|
143
|
+
* @experimental
|
|
144
|
+
* @ignore
|
|
145
|
+
*/
|
|
146
|
+
openAlertDialog(options: AlertDialogOptions): Promise<true | undefined>;
|
|
147
|
+
/**
|
|
148
|
+
* Opens a confirmation dialog.
|
|
149
|
+
*
|
|
150
|
+
* @param options configures the confirm dialog
|
|
151
|
+
*
|
|
152
|
+
* @experimental
|
|
153
|
+
* @ignore
|
|
154
|
+
*/
|
|
155
|
+
openConfirmDialog(options: ConfirmDialogOptions): Promise<boolean | undefined>;
|
|
156
|
+
/**
|
|
157
|
+
* Opens a form dialog.
|
|
158
|
+
*
|
|
159
|
+
* @param options configures the form dialog
|
|
160
|
+
*
|
|
161
|
+
* @experimental
|
|
162
|
+
* @ignore
|
|
163
|
+
*/
|
|
164
|
+
openFormDialog(options: FormDialogOptions): Promise<FormDialogResult | false | undefined>;
|
|
125
165
|
/**
|
|
126
166
|
* Save a file.
|
|
127
167
|
*
|
|
@@ -8,9 +8,11 @@ interface ResultDataMap {
|
|
|
8
8
|
Branding: ResourceData.Branding;
|
|
9
9
|
CustomPropertyList: ResourceData.CustomProperty[];
|
|
10
10
|
GroupList: ResourceData.Group[];
|
|
11
|
+
MyCompany: ResourceData.MyCompany;
|
|
11
12
|
MyUser: ResourceData.MyUser;
|
|
12
13
|
PagePage: ResourceData.PagePage;
|
|
13
14
|
PageVersion: ResourceData.PageVersion;
|
|
15
|
+
UserList: ResourceData.User[];
|
|
14
16
|
}
|
|
15
17
|
export interface ResourceDataClient {
|
|
16
18
|
destroy(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @module ResourceDataQuery */
|
|
2
|
-
export type ResourceDataQuerySelector = 'Agent' | 'Asset' | 'Branding' | 'CustomPropertyList' | 'GroupList' | 'MyUser' | 'PagePage' | 'PageVersion';
|
|
2
|
+
export type ResourceDataQuerySelector = 'Agent' | 'Asset' | 'Branding' | 'CustomPropertyList' | 'GroupList' | 'MyCompany' | 'MyUser' | 'PagePage' | 'PageVersion' | 'UserList';
|
|
3
3
|
export interface ResourceDataQuery<T = ResourceDataQuerySelector> {
|
|
4
4
|
/**
|
|
5
5
|
* String reference unique to the query call made by the client
|
|
@@ -44,6 +44,7 @@ interface AgentResourceData {
|
|
|
44
44
|
}[];
|
|
45
45
|
mqttChangedOn?: string | null;
|
|
46
46
|
name?: string;
|
|
47
|
+
permissions?: string[];
|
|
47
48
|
publicId: string;
|
|
48
49
|
rateLimiting?: {
|
|
49
50
|
configMqttCommandCounter?: number;
|
|
@@ -81,6 +82,7 @@ interface AssetResourceData {
|
|
|
81
82
|
publicId: string;
|
|
82
83
|
}[];
|
|
83
84
|
name?: string;
|
|
85
|
+
permissions?: string[];
|
|
84
86
|
publicId: string;
|
|
85
87
|
resourceVariant?: {
|
|
86
88
|
publicId: string;
|
|
@@ -111,10 +113,16 @@ interface GroupResourceData {
|
|
|
111
113
|
publicId: string;
|
|
112
114
|
} | null;
|
|
113
115
|
}
|
|
116
|
+
interface MyCompanyResourceData {
|
|
117
|
+
name?: string;
|
|
118
|
+
permissions?: string[];
|
|
119
|
+
publicId: string;
|
|
120
|
+
}
|
|
114
121
|
interface MyUserResourceData {
|
|
115
122
|
custom?: Record<string, any>;
|
|
116
123
|
name?: string;
|
|
117
124
|
publicId: string;
|
|
125
|
+
support?: boolean;
|
|
118
126
|
unreadMessagesCount?: number;
|
|
119
127
|
}
|
|
120
128
|
interface PagePageResourceData {
|
|
@@ -129,14 +137,20 @@ interface PageVersionResourceData {
|
|
|
129
137
|
publicId: string;
|
|
130
138
|
title?: string | null;
|
|
131
139
|
}
|
|
140
|
+
interface UserResourceData {
|
|
141
|
+
name?: string;
|
|
142
|
+
publicId: string;
|
|
143
|
+
}
|
|
132
144
|
export declare namespace ResourceData {
|
|
133
145
|
type Agent = AgentResourceData;
|
|
134
146
|
type Asset = AssetResourceData;
|
|
135
147
|
type Branding = BrandingResourceData;
|
|
136
148
|
type CustomProperty = CustomPropertyResourceData;
|
|
137
149
|
type Group = GroupResourceData;
|
|
150
|
+
type MyCompany = MyCompanyResourceData;
|
|
138
151
|
type MyUser = MyUserResourceData;
|
|
139
152
|
type PagePage = PagePageResourceData;
|
|
140
153
|
type PageVersion = PageVersionResourceData;
|
|
154
|
+
type User = UserResourceData;
|
|
141
155
|
}
|
|
142
156
|
export {};
|