@kentico/xperience-admin-base 29.2.2 → 29.3.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/entry.d.ts
CHANGED
|
@@ -7,6 +7,61 @@ import { default as React_2 } from 'react';
|
|
|
7
7
|
import { RefObject } from 'react';
|
|
8
8
|
import { RegisterCommandParameters } from 'froala-editor';
|
|
9
9
|
|
|
10
|
+
declare interface Action {
|
|
11
|
+
/**
|
|
12
|
+
* Type of the action.
|
|
13
|
+
*/
|
|
14
|
+
readonly type: ActionType;
|
|
15
|
+
/**
|
|
16
|
+
* Action parameter.
|
|
17
|
+
*/
|
|
18
|
+
readonly parameter: string;
|
|
19
|
+
/**
|
|
20
|
+
* Display name of the action.
|
|
21
|
+
*/
|
|
22
|
+
readonly label: string;
|
|
23
|
+
/**
|
|
24
|
+
* Icon of the action.
|
|
25
|
+
*/
|
|
26
|
+
readonly icon?: IconName;
|
|
27
|
+
/**
|
|
28
|
+
* Indicates whether action is disabled.
|
|
29
|
+
*/
|
|
30
|
+
readonly disabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Gets or sets the tooltip of a button.
|
|
33
|
+
*/
|
|
34
|
+
readonly title?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Indicates whether action is destructive.
|
|
37
|
+
*/
|
|
38
|
+
readonly destructive: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Gets or sets the confirmation dialog configuration.
|
|
41
|
+
*/
|
|
42
|
+
readonly confirmationDialog?: ConfirmationConfiguration;
|
|
43
|
+
/**
|
|
44
|
+
* Identifier of the action.
|
|
45
|
+
*/
|
|
46
|
+
readonly identifier: string;
|
|
47
|
+
/**
|
|
48
|
+
* Fires on click handler.
|
|
49
|
+
*/
|
|
50
|
+
readonly onClick?: () => Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Link parameters.
|
|
53
|
+
*/
|
|
54
|
+
readonly linkParameters?: LinkParameters;
|
|
55
|
+
/**
|
|
56
|
+
* Action button color.
|
|
57
|
+
*/
|
|
58
|
+
readonly buttonColor: ButtonColor.Primary | ButtonColor.Secondary;
|
|
59
|
+
/**
|
|
60
|
+
* Component properties to be used for the action.
|
|
61
|
+
*/
|
|
62
|
+
readonly componentProperties?: ActionComponentProps;
|
|
63
|
+
}
|
|
64
|
+
|
|
10
65
|
/**
|
|
11
66
|
* Configuration representing props of the component.
|
|
12
67
|
*/
|
|
@@ -27,6 +82,32 @@ export declare interface ActionComponentProps {
|
|
|
27
82
|
* Notifies that the action has been executed.
|
|
28
83
|
*/
|
|
29
84
|
readonly onActionExecuted: () => void;
|
|
85
|
+
/**
|
|
86
|
+
* Rest of action data.
|
|
87
|
+
*/
|
|
88
|
+
readonly action?: Omit<Action, 'componentProperties'>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Type of an action.
|
|
93
|
+
*/
|
|
94
|
+
declare enum ActionType {
|
|
95
|
+
/**
|
|
96
|
+
* Action which redirects to a link.
|
|
97
|
+
*/
|
|
98
|
+
Link = "link",
|
|
99
|
+
/**
|
|
100
|
+
* Action which executes a page command.
|
|
101
|
+
*/
|
|
102
|
+
Command = "command",
|
|
103
|
+
/**
|
|
104
|
+
* Action which executes onClick function.
|
|
105
|
+
*/
|
|
106
|
+
Client = "client",
|
|
107
|
+
/**
|
|
108
|
+
* Action which renders a custom component.
|
|
109
|
+
*/
|
|
110
|
+
CustomComponent = "customComponent"
|
|
30
111
|
}
|
|
31
112
|
|
|
32
113
|
/**
|
|
@@ -127,6 +208,48 @@ declare interface CommandContextType {
|
|
|
127
208
|
*/
|
|
128
209
|
export declare type CommandExecutor<TData, TResponse> = (data?: TData, files?: FileList, abortController?: AbortController) => Promise<TResponse>;
|
|
129
210
|
|
|
211
|
+
declare interface ComponentContent {
|
|
212
|
+
/**
|
|
213
|
+
* Name of the rendered component.
|
|
214
|
+
*/
|
|
215
|
+
readonly componentName: string;
|
|
216
|
+
/**
|
|
217
|
+
* Configuration representing props of the component.
|
|
218
|
+
*/
|
|
219
|
+
readonly componentConfiguration: object;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
declare interface ConfirmationConfiguration {
|
|
223
|
+
/**
|
|
224
|
+
* Confirmation title shown in prompt dialog.
|
|
225
|
+
*/
|
|
226
|
+
readonly title?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Confirmation text shown in prompt dialog.
|
|
229
|
+
*/
|
|
230
|
+
readonly detail?: string | null;
|
|
231
|
+
/**
|
|
232
|
+
* Confirmation content shown in prompt dialog.
|
|
233
|
+
*/
|
|
234
|
+
readonly content?: ComponentContent;
|
|
235
|
+
/**
|
|
236
|
+
* Text of the confirmation button on the prompt dialog.
|
|
237
|
+
*/
|
|
238
|
+
readonly button: string;
|
|
239
|
+
/**
|
|
240
|
+
* Form items representing confirmation form.
|
|
241
|
+
*/
|
|
242
|
+
readonly formItems?: FormItems;
|
|
243
|
+
/**
|
|
244
|
+
* Indicates whether the confirmation button of the dialog is shown as destructive.
|
|
245
|
+
*/
|
|
246
|
+
readonly destructive?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Represents a customized form name for the dialog.
|
|
249
|
+
*/
|
|
250
|
+
readonly formName?: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
130
253
|
declare interface DialogAction extends Omit<DialogFooterActionProps, 'color'> {}
|
|
131
254
|
|
|
132
255
|
declare interface DialogFooterActionProps
|
|
@@ -156,6 +279,14 @@ export declare interface FieldInfo {
|
|
|
156
279
|
*/
|
|
157
280
|
export declare type FieldInfoValueType = Record<string, any>;
|
|
158
281
|
|
|
282
|
+
declare interface FormCategoryProps {
|
|
283
|
+
readonly title: string;
|
|
284
|
+
readonly collapsible?: boolean;
|
|
285
|
+
readonly isCollapsed?: boolean;
|
|
286
|
+
readonly tooltip?: string;
|
|
287
|
+
readonly componentName: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
159
290
|
/**
|
|
160
291
|
* Represents basic set of form component properties.
|
|
161
292
|
*/
|
|
@@ -187,6 +318,11 @@ export declare interface FormComponentProps extends FieldInfo {
|
|
|
187
318
|
readonly explanationTextAsHtml?: boolean;
|
|
188
319
|
}
|
|
189
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Array of form components and their categories.
|
|
323
|
+
*/
|
|
324
|
+
declare type FormItems = Array<FormComponentProps | FormCategoryProps>;
|
|
325
|
+
|
|
190
326
|
/** Configurator enables custom Froala Typescript plugins to use global Froala configuration methods, which would be unavailable due to different module context. */
|
|
191
327
|
declare interface FroalaEditorConfigurator {
|
|
192
328
|
readonly defineIcon: (iconName: string, parameters: Partial<DefineIconParameters>) => void;
|
|
@@ -641,6 +777,21 @@ declare interface InjectedProps {
|
|
|
641
777
|
readonly children: React.ReactNode;
|
|
642
778
|
}
|
|
643
779
|
|
|
780
|
+
declare interface LinkParameters {
|
|
781
|
+
/**
|
|
782
|
+
* Opens a link using window.open().
|
|
783
|
+
*/
|
|
784
|
+
readonly useWindowOpen?: boolean;
|
|
785
|
+
/**
|
|
786
|
+
* Name of the browsing context the resource is being loaded into.
|
|
787
|
+
*/
|
|
788
|
+
readonly target: string;
|
|
789
|
+
/**
|
|
790
|
+
* Parameters used when link is opened using window.open().
|
|
791
|
+
*/
|
|
792
|
+
readonly windowOpenLinkParameters: WindowOpenLinkParameters;
|
|
793
|
+
}
|
|
794
|
+
|
|
644
795
|
/**
|
|
645
796
|
* Describes options and configuration of a link plugin added to Rich text editor.
|
|
646
797
|
*/
|
|
@@ -998,4 +1149,11 @@ export declare interface ValidationRuleProps {
|
|
|
998
1149
|
readonly errorMessage: string | null;
|
|
999
1150
|
}
|
|
1000
1151
|
|
|
1152
|
+
declare interface WindowOpenLinkParameters {
|
|
1153
|
+
/**
|
|
1154
|
+
* Target window features.
|
|
1155
|
+
*/
|
|
1156
|
+
readonly features: string;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1001
1159
|
export { }
|