@kentico/xperience-admin-base 14.0.0-51372 → 22.0.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 +177 -10
- package/dist/entry.js +22 -2
- package/package.json +95 -77
- package/dist/8ce68503cd833f15dce10d33fdea4385.png +0 -0
- package/dist/commands/CommandContext.d.ts +0 -26
- package/dist/commands/CommandProvider.d.ts +0 -12
- package/dist/commands/index.d.ts +0 -3
- package/dist/commands/useCommand.types.d.ts +0 -36
- package/dist/commands/useCommandInvoker.d.ts +0 -9
- package/dist/commands/usePageCommand.d.ts +0 -11
- package/dist/components/ActionList/ActionList.d.ts +0 -3
- package/dist/components/ActionList/ActionList.types.d.ts +0 -4
- package/dist/components/index.d.ts +0 -5
- package/dist/components/loader/Loader.d.ts +0 -2
- package/dist/components/page-loader/PageLoader.d.ts +0 -2
- package/dist/components/page-message-pane/PageMessagePane.d.ts +0 -7
- package/dist/components/portal/Portal.d.ts +0 -8
- package/dist/forms/form/Form.d.ts +0 -3
- package/dist/forms/form/Form.types.d.ts +0 -73
- package/dist/forms/form/FormField.d.ts +0 -3
- package/dist/forms/form/FormField.types.d.ts +0 -7
- package/dist/forms/form/index.d.ts +0 -2
- package/dist/forms/form-components/FormComponent.types.d.ts +0 -15
- package/dist/forms/form-components/FormComponentLoader.d.ts +0 -3
- package/dist/forms/form-components/index.d.ts +0 -4
- package/dist/forms/form-components/password-form-component/PasswordFormComponent.d.ts +0 -3
- package/dist/forms/form-components/text-input-form-component/TextInputFormComponent.d.ts +0 -3
- package/dist/forms/form-components/textarea-form-component/TextAreaFormComponent.d.ts +0 -3
- package/dist/forms/hooks/index.d.ts +0 -1
- package/dist/forms/hooks/useValidationRule.d.ts +0 -2
- package/dist/forms/index.d.ts +0 -4
- package/dist/forms/validation-rules/ValidationRule.types.d.ts +0 -12
- package/dist/forms/validation-rules/ValidationRuleLoader.d.ts +0 -2
- package/dist/forms/validation-rules/ValidationRuleLoader.types.d.ts +0 -7
- package/dist/forms/validation-rules/index.d.ts +0 -7
- package/dist/forms/validation-rules/max-length-rule/MaxLengthValidationRule.d.ts +0 -3
- package/dist/forms/validation-rules/max-length-rule/MaxLengthValidationRule.types.d.ts +0 -5
- package/dist/forms/validation-rules/min-length-rule/MinLengthValidationRule.d.ts +0 -3
- package/dist/forms/validation-rules/min-length-rule/MinLengthValidationRule.types.d.ts +0 -5
- package/dist/forms/validation-rules/required-value-rule/RequiredStringValueValidationRule.Types.d.ts +0 -4
- package/dist/forms/validation-rules/required-value-rule/RequiredStringValueValidationRule.d.ts +0 -3
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useComponent.d.ts +0 -1
- package/dist/hooks/usePagePath.d.ts +0 -1
- package/dist/localization/Localization.types.d.ts +0 -7
- package/dist/localization/LocalizationContext.d.ts +0 -4
- package/dist/localization/LocalizationProvider.d.ts +0 -3
- package/dist/localization/index.d.ts +0 -4
- package/dist/template-components/index.d.ts +0 -2
- package/dist/template-components/routing-content-placeholder/RoutingContentPlaceholder.d.ts +0 -6
- package/dist/template-components/template-loader/TemplateLoader.d.ts +0 -6
- package/dist/template-properties/TemplateProperties.types.d.ts +0 -14
- package/dist/template-properties/TemplatePropertiesProvider.d.ts +0 -9
- package/dist/template-properties/index.d.ts +0 -2
- package/dist/templates/app/App.types.d.ts +0 -16
- package/dist/templates/app/AppTemplate.d.ts +0 -4
- package/dist/templates/app/avatar/Avatar.d.ts +0 -8
- package/dist/templates/app/breadcrumbs/BreadcrumbItem.d.ts +0 -4
- package/dist/templates/app/breadcrumbs/BreadcrumbItem.types.d.ts +0 -4
- package/dist/templates/app/breadcrumbs/Breadcrumbs.d.ts +0 -3
- package/dist/templates/app/breadcrumbs/Breadcrumbs.types.d.ts +0 -13
- package/dist/templates/app/breadcrumbs/BreadcrumbsContext.d.ts +0 -4
- package/dist/templates/app/breadcrumbs/BreadcrumbsProvider.d.ts +0 -3
- package/dist/templates/app/breadcrumbs/index.d.ts +0 -2
- package/dist/templates/app/header/Header.d.ts +0 -5
- package/dist/templates/app/header/index.d.ts +0 -1
- package/dist/templates/app/main/Main.d.ts +0 -8
- package/dist/templates/app/sidebar/Sidebar.d.ts +0 -7
- package/dist/templates/app/sidebar/index.d.ts +0 -1
- package/dist/templates/app/siteselector/SiteSelector.d.ts +0 -6
- package/dist/templates/dashboard/DashboardTemplate.d.ts +0 -3
- package/dist/templates/dashboard/tile/Tile.d.ts +0 -3
- package/dist/templates/dashboard/tile-category/TileCategory.d.ts +0 -3
- package/dist/templates/edit/EditTemplate.d.ts +0 -3
- package/dist/templates/edit/EditTemplate.types.d.ts +0 -10
- package/dist/templates/field-editor/FieldEditorForm.d.ts +0 -6
- package/dist/templates/field-editor/FieldEditorForm.types.d.ts +0 -22
- package/dist/templates/field-editor/FieldEditorTemplate.d.ts +0 -5
- package/dist/templates/field-editor/FieldEditorTemplate.types.d.ts +0 -20
- package/dist/templates/index.d.ts +0 -8
- package/dist/templates/listing/Listing.types.d.ts +0 -19
- package/dist/templates/listing/ListingTemplate.d.ts +0 -3
- package/dist/templates/side-navigation-layout/SideNavigationLayoutTemplate.d.ts +0 -2
- package/dist/templates/side-navigation-layout/vertical-menu/VerticalMenu.d.ts +0 -8
- package/dist/types/Action.types.d.ts +0 -13
- package/dist/types/index.d.ts +0 -2
- package/dist/utils/authentication/logonUrlProvider.d.ts +0 -10
- package/dist/utils/getBaseUri.d.ts +0 -4
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/loadModule.d.ts +0 -10
- package/dist/utils/postToAdmin.d.ts +0 -5
- package/dist/utils/responseStatusActions.d.ts +0 -12
package/dist/entry.d.ts
CHANGED
|
@@ -1,10 +1,177 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
import { default as React_2 } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Command result interface.
|
|
7
|
+
*/
|
|
8
|
+
export declare interface Command<T = any> {
|
|
9
|
+
/**
|
|
10
|
+
* Invocation callback.
|
|
11
|
+
*/
|
|
12
|
+
execute: CommandExecutor<T, void>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Defines a command context type.
|
|
17
|
+
*/
|
|
18
|
+
declare interface CommandContextType {
|
|
19
|
+
/**
|
|
20
|
+
* Executes page command.
|
|
21
|
+
* @param name Name of the command to be executed.
|
|
22
|
+
* @param data Data passed to the command.
|
|
23
|
+
* @param files Files to be uploaded by the command.
|
|
24
|
+
*/
|
|
25
|
+
executeCommand: <TCommandResult = void, TData = void>(name: string, data?: TData, files?: FileList) => Promise<TCommandResult | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Registers command into the current provider.
|
|
28
|
+
* @param name Name of the command to be registered.
|
|
29
|
+
* @param execute Callback that executes the command.
|
|
30
|
+
*/
|
|
31
|
+
registerCommand: <T>(name: string, execute: (data: T, files?: FileList) => Promise<void>) => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Command invocation callback.
|
|
36
|
+
*/
|
|
37
|
+
export declare type CommandExecutor<TData, TResponse> = (data?: TData, files?: FileList) => Promise<TResponse>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Represents information about form field.
|
|
41
|
+
*/
|
|
42
|
+
export declare interface FieldInfo {
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly fieldValues: FieldInfoValueType;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Collection of field values.
|
|
49
|
+
*/
|
|
50
|
+
export declare type FieldInfoValueType = Record<string, any>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Represents basic set of form component properties.
|
|
54
|
+
*/
|
|
55
|
+
export declare interface FormComponentProps extends FieldInfo {
|
|
56
|
+
readonly componentName: string;
|
|
57
|
+
readonly hasDependencies: boolean;
|
|
58
|
+
readonly label?: string;
|
|
59
|
+
readonly statusText?: string;
|
|
60
|
+
readonly explanationText?: string;
|
|
61
|
+
readonly tooltip?: string;
|
|
62
|
+
readonly disabled?: boolean;
|
|
63
|
+
readonly value?: any;
|
|
64
|
+
readonly invalid?: boolean;
|
|
65
|
+
readonly validationMessage?: string;
|
|
66
|
+
readonly validationRules?: ValidationRuleProps[];
|
|
67
|
+
readonly onChange?: (value: OnChangeValueType) => void;
|
|
68
|
+
readonly required?: boolean;
|
|
69
|
+
readonly inactiveMessage?: string;
|
|
70
|
+
readonly guid: string;
|
|
71
|
+
/**
|
|
72
|
+
* Dangerously sets tooltip as inner HTML.
|
|
73
|
+
*/
|
|
74
|
+
readonly tooltipAsHtml?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Dangerously sets explanation as inner HTML.
|
|
77
|
+
*/
|
|
78
|
+
readonly explanationTextAsHtml?: boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Untyped alias for value used on change.
|
|
83
|
+
*/
|
|
84
|
+
declare type OnChangeValueType = any;
|
|
85
|
+
|
|
86
|
+
export declare const RoutingContentPlaceholder: ({ children }: RoutingContentPlaceholderProps) => JSX.Element;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Represents properties for RoutingContentPlaceholder component.
|
|
90
|
+
*/
|
|
91
|
+
export declare interface RoutingContentPlaceholderProps {
|
|
92
|
+
children?: React_2.ReactNode;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Command execution configuration.
|
|
97
|
+
*/
|
|
98
|
+
export declare type UseCommandConfig<TCommandResult, TCommandData> = {
|
|
99
|
+
/**
|
|
100
|
+
* Command data.
|
|
101
|
+
*/
|
|
102
|
+
data?: TCommandData;
|
|
103
|
+
/**
|
|
104
|
+
* Indicates whether command should be invoked automatically on component mount.
|
|
105
|
+
* Defaults to `false`.
|
|
106
|
+
*/
|
|
107
|
+
executeOnMount?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Custom action executed before the command execution.
|
|
110
|
+
* If the function returns `false` the command will not be executed.
|
|
111
|
+
*/
|
|
112
|
+
before?: () => boolean | void;
|
|
113
|
+
/**
|
|
114
|
+
* Custom action executed after the command execution.
|
|
115
|
+
*/
|
|
116
|
+
after?: (commandResult: TCommandResult | undefined) => void;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Registers command into the current command provider and returns its invocation callback.
|
|
121
|
+
*
|
|
122
|
+
* @param fieldInfo Related form field info
|
|
123
|
+
* @param commandName Name of the command.
|
|
124
|
+
* @param config Command options.
|
|
125
|
+
* @param dependencies If present, command will only activate if the values in the list change.
|
|
126
|
+
* @returns Invocation callback to be executed manually.
|
|
127
|
+
*/
|
|
128
|
+
export declare const useFormComponentCommand: <TCommandResult, TCommandData = void>(fieldInfo: FieldInfo, commandName: string, config?: UseCommandConfig<TCommandResult, TCommandData> | undefined, dependencies?: React_2.DependencyList) => Command<TCommandData>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Returns the form command provider for the current page.
|
|
132
|
+
*/
|
|
133
|
+
export declare const useFormComponentCommandProvider: () => {
|
|
134
|
+
executeCommand: <TCommandResult = void, TData = void>(fieldInfo: FieldInfo, name: string, data?: TData | undefined, files?: FileList) => Promise<TCommandResult | undefined>;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Registers command into the current command provider and returns its invocation callback.
|
|
139
|
+
*
|
|
140
|
+
* @param commandName Name of the command.
|
|
141
|
+
* @param config Command options.
|
|
142
|
+
* @param dependencies If present, command will only activate if the values in the list change.
|
|
143
|
+
* @returns Invocation callback to be executed manually.
|
|
144
|
+
*/
|
|
145
|
+
export declare function usePageCommand<TCommandResult, TCommandData = void>(commandName: string, config?: UseCommandConfig<TCommandResult, TCommandData>, dependencies?: React_2.DependencyList): Command<TCommandData>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Returns the command provider for the current page.
|
|
149
|
+
*/
|
|
150
|
+
export declare const usePageCommandProvider: () => CommandContextType;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Validation rule result type.
|
|
154
|
+
*/
|
|
155
|
+
export declare interface ValidationResult {
|
|
156
|
+
readonly isValid: boolean;
|
|
157
|
+
readonly errorMessage: string | null;
|
|
158
|
+
hasChanged?: boolean;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Base type used by validation rules.
|
|
163
|
+
*/
|
|
164
|
+
export declare interface ValidationRule<P extends ValidationRuleProps, T> {
|
|
165
|
+
(props: P, value: T, fieldValues: Record<string, any>): ValidationResult;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Represents basic set of validation rule properties.
|
|
170
|
+
*/
|
|
171
|
+
export declare interface ValidationRuleProps {
|
|
172
|
+
readonly ruleName: string;
|
|
173
|
+
readonly isValid: boolean;
|
|
174
|
+
readonly errorMessage: string | null;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { }
|