@kentico/xperience-admin-base 14.0.0-68025 → 22.0.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.
Files changed (188) hide show
  1. package/dist/entry.d.ts +177 -12
  2. package/dist/entry.js +22 -2
  3. package/package.json +61 -47
  4. package/dist/8ce68503cd833f15dce1.png +0 -0
  5. package/dist/commands/CommandContext.d.ts +0 -27
  6. package/dist/commands/CommandProvider.d.ts +0 -12
  7. package/dist/commands/index.d.ts +0 -3
  8. package/dist/commands/useCommand.types.d.ts +0 -36
  9. package/dist/commands/useCommandInvoker.d.ts +0 -11
  10. package/dist/commands/usePageCommand.d.ts +0 -11
  11. package/dist/components/ActionList/ActionList.d.ts +0 -3
  12. package/dist/components/ActionList/ActionList.types.d.ts +0 -4
  13. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +0 -11
  14. package/dist/components/ErrorBoundary/ErrorBoundary.types.d.ts +0 -9
  15. package/dist/components/index.d.ts +0 -5
  16. package/dist/components/loader/Loader.d.ts +0 -2
  17. package/dist/components/page-loader/PageLoader.d.ts +0 -2
  18. package/dist/components/page-message-pane/PageMessagePane.d.ts +0 -7
  19. package/dist/components/portal/Portal.d.ts +0 -8
  20. package/dist/forms/form/Form.d.ts +0 -3
  21. package/dist/forms/form/Form.types.d.ts +0 -88
  22. package/dist/forms/form/FormField.d.ts +0 -3
  23. package/dist/forms/form/FormField.types.d.ts +0 -6
  24. package/dist/forms/form/index.d.ts +0 -2
  25. package/dist/forms/form-components/FormComponent.types.d.ts +0 -22
  26. package/dist/forms/form-components/FormComponentLoader.d.ts +0 -3
  27. package/dist/forms/form-components/checkbox-form-component/CheckboxFormComponent.d.ts +0 -3
  28. package/dist/forms/form-components/condition-builder-form-component/ConditionBuilderFormComponent.d.ts +0 -3
  29. package/dist/forms/form-components/condition-builder-form-component/ConditionBuilderFormComponent.types.d.ts +0 -18
  30. package/dist/forms/form-components/condition-builder-form-component/single-object-selector-form-component/SingleObjectSelectorFormComponent.d.ts +0 -3
  31. package/dist/forms/form-components/condition-builder-form-component/single-object-selector-form-component/SingleObjectSelectorFormComponentProps.types.d.ts +0 -16
  32. package/dist/forms/form-components/dropdown-form-component/DropDownFormComponent.d.ts +0 -3
  33. package/dist/forms/form-components/dropdown-form-component/DropDownFormComponentProps.types.d.ts +0 -9
  34. package/dist/forms/form-components/formComponentUtils.d.ts +0 -5
  35. package/dist/forms/form-components/index.d.ts +0 -13
  36. package/dist/forms/form-components/namespace-code-name-form-component/NamespaceCodeNameFormComponent.d.ts +0 -3
  37. package/dist/forms/form-components/namespace-code-name-form-component/NamespaceCodeNameFormComponent.types.d.ts +0 -3
  38. package/dist/forms/form-components/number-input-form-component/NumberInputFormComponent.d.ts +0 -3
  39. package/dist/forms/form-components/password-form-component/PasswordFormComponent.d.ts +0 -3
  40. package/dist/forms/form-components/rich-text-editor-form-component/RichTextEditorFormComponent.d.ts +0 -3
  41. package/dist/forms/form-components/rich-text-editor-form-component/RichTextEditorFormComponentProps.types.d.ts +0 -19
  42. package/dist/forms/form-components/text-input-form-component/TextInputFormComponent.d.ts +0 -3
  43. package/dist/forms/form-components/text-input-form-component/TextInputFormComponentProps.types.d.ts +0 -4
  44. package/dist/forms/form-components/textarea-form-component/TextAreaFormComponent.d.ts +0 -3
  45. package/dist/forms/hooks/FormComponentCommand.types.d.ts +0 -7
  46. package/dist/forms/hooks/FormComponentCommandUtils.d.ts +0 -4
  47. package/dist/forms/hooks/index.d.ts +0 -3
  48. package/dist/forms/hooks/useFormComponentCommand.d.ts +0 -4
  49. package/dist/forms/hooks/useFormComponentCommandProvider.d.ts +0 -4
  50. package/dist/forms/hooks/useValidationRule.d.ts +0 -2
  51. package/dist/forms/index.d.ts +0 -4
  52. package/dist/forms/validation-rules/ValidationRule.types.d.ts +0 -12
  53. package/dist/forms/validation-rules/ValidationRuleLoader.d.ts +0 -2
  54. package/dist/forms/validation-rules/ValidationRuleLoader.types.d.ts +0 -7
  55. package/dist/forms/validation-rules/index.d.ts +0 -8
  56. package/dist/forms/validation-rules/max-length-rule/MaxLengthValidationRule.d.ts +0 -3
  57. package/dist/forms/validation-rules/max-length-rule/MaxLengthValidationRule.types.d.ts +0 -5
  58. package/dist/forms/validation-rules/min-length-rule/MinLengthValidationRule.d.ts +0 -3
  59. package/dist/forms/validation-rules/min-length-rule/MinLengthValidationRule.types.d.ts +0 -5
  60. package/dist/forms/validation-rules/required-value-rule/RequiredStringValueValidationRule.Types.d.ts +0 -4
  61. package/dist/forms/validation-rules/required-value-rule/RequiredStringValueValidationRule.d.ts +0 -3
  62. package/dist/forms/validation-rules/server-rule/ServerValidationRule.d.ts +0 -2
  63. package/dist/hooks/index.d.ts +0 -4
  64. package/dist/hooks/useComponent.d.ts +0 -1
  65. package/dist/hooks/useInterval.d.ts +0 -1
  66. package/dist/hooks/useNotificationMessage.d.ts +0 -9
  67. package/dist/hooks/usePagePath.d.ts +0 -5
  68. package/dist/localization/Localization.types.d.ts +0 -7
  69. package/dist/localization/LocalizationContext.d.ts +0 -4
  70. package/dist/localization/LocalizationProvider.d.ts +0 -3
  71. package/dist/localization/index.d.ts +0 -4
  72. package/dist/notifications/NotificationsContext.d.ts +0 -5
  73. package/dist/notifications/NotificationsContext.types.d.ts +0 -13
  74. package/dist/notifications/index.d.ts +0 -2
  75. package/dist/shared-components/AppLinkButton/AppLinkButton.d.ts +0 -3
  76. package/dist/shared-components/AppLinkButton/AppLinkButton.types.d.ts +0 -4
  77. package/dist/shared-components/AppLinkButton/index.d.ts +0 -2
  78. package/dist/shared-components/AssetsFoldersTreeView/AssetsFoldersTreeView.d.ts +0 -3
  79. package/dist/shared-components/AssetsFoldersTreeView/AssetsFoldersTreeView.types.d.ts +0 -17
  80. package/dist/shared-components/AssetsFoldersTreeView/index.d.ts +0 -2
  81. package/dist/shared-components/AssetsPanel/AssetsPanel.d.ts +0 -3
  82. package/dist/shared-components/AssetsPanel/AssetsPanel.types.d.ts +0 -39
  83. package/dist/shared-components/AssetsPanel/index.d.ts +0 -2
  84. package/dist/shared-components/AssetsSelector/AssetsSelector.d.ts +0 -3
  85. package/dist/shared-components/AssetsSelector/AssetsSelector.types.d.ts +0 -35
  86. package/dist/shared-components/ConditionBuilder/Condition/ConditionBuilderCondition.d.ts +0 -3
  87. package/dist/shared-components/ConditionBuilder/Condition/ConditionBuilderCondition.types.d.ts +0 -33
  88. package/dist/shared-components/ConditionBuilder/Condition/index.d.ts +0 -2
  89. package/dist/shared-components/ConditionBuilder/ConditionBuilder/ConditionBuilder.d.ts +0 -3
  90. package/dist/shared-components/ConditionBuilder/ConditionBuilder/ConditionBuilder.types.d.ts +0 -16
  91. package/dist/shared-components/ConditionBuilder/ConditionBuilder/index.d.ts +0 -2
  92. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/ConditionBuilderOverview.d.ts +0 -6
  93. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/ConditionBuilderOverview.types.d.ts +0 -4
  94. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/ComponentParameter/DropDownParameterOverview.d.ts +0 -3
  95. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/ComponentParameter/NumberInputParameterOverview.d.ts +0 -3
  96. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/ComponentParameter/SingleObjectSelectorParameterOverview.d.ts +0 -3
  97. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/ComponentParameter/TextInputFormParameterOverview.d.ts +0 -3
  98. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/ParameterOverviewComponentLoader.d.ts +0 -3
  99. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/TextualParameter/ParameterText.d.ts +0 -6
  100. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/Parameters/TextualParameter/ParameterText.types.d.ts +0 -4
  101. package/dist/shared-components/ConditionBuilder/ConditionBuilderOverview/index.d.ts +0 -6
  102. package/dist/shared-components/ConditionBuilder/ConditionGroup/ConditionBuilderConditionGroup.d.ts +0 -3
  103. package/dist/shared-components/ConditionBuilder/ConditionGroup/ConditionBuilderConditionGroup.types.d.ts +0 -23
  104. package/dist/shared-components/ConditionBuilder/ConditionGroup/index.d.ts +0 -2
  105. package/dist/shared-components/ConditionBuilder/ConditionPicker/ConditionBuilderConditionPicker.d.ts +0 -6
  106. package/dist/shared-components/ConditionBuilder/ConditionPicker/ConditionBuilderConditionPicker.types.d.ts +0 -9
  107. package/dist/shared-components/ConditionBuilder/ConditionPicker/index.d.ts +0 -2
  108. package/dist/shared-components/ConditionBuilder/OperatorSelect/OperatorSelect.d.ts +0 -3
  109. package/dist/shared-components/ConditionBuilder/OperatorSelect/OperatorSelect.types.d.ts +0 -6
  110. package/dist/shared-components/ConditionBuilder/OperatorSelect/index.d.ts +0 -2
  111. package/dist/shared-components/ConditionBuilder/Operators.d.ts +0 -4
  112. package/dist/shared-components/ConditionBuilder/utils/convertModel.d.ts +0 -2
  113. package/dist/shared-components/ConditionBuilder/utils/findMacroRule.d.ts +0 -2
  114. package/dist/shared-components/ConditionBuilder/utils/getInitialSelectedParameterValues.d.ts +0 -2
  115. package/dist/shared-components/ConditionBuilder/utils/getOperatorName.d.ts +0 -2
  116. package/dist/shared-components/ConditionBuilder/utils/getOperatorText.d.ts +0 -2
  117. package/dist/shared-components/ConditionBuilder/utils/index.d.ts +0 -8
  118. package/dist/shared-components/ConditionBuilder/utils/isComponentParameter.d.ts +0 -2
  119. package/dist/shared-components/ConditionBuilder/utils/isTextualParameter.d.ts +0 -2
  120. package/dist/shared-components/ConditionBuilder/utils/mapArrayToKeys.d.ts +0 -6
  121. package/dist/shared-components/OverviewCard/OverviewCard.d.ts +0 -3
  122. package/dist/shared-components/OverviewCard/OverviewCard.types.d.ts +0 -13
  123. package/dist/shared-components/OverviewCard/index.d.ts +0 -2
  124. package/dist/shared-components/OverviewCardGroup/OverviewCardGroup.d.ts +0 -3
  125. package/dist/shared-components/OverviewCardGroup/OverviewCardGroup.types.d.ts +0 -4
  126. package/dist/shared-components/OverviewCardGroup/index.d.ts +0 -2
  127. package/dist/shared-components/callout/Callout.d.ts +0 -3
  128. package/dist/shared-components/callout/Callout.types.d.ts +0 -9
  129. package/dist/shared-components/index.d.ts +0 -5
  130. package/dist/template-components/dialog/TemplateDialog.d.ts +0 -3
  131. package/dist/template-components/dialog/TemplateDialog.types.d.ts +0 -8
  132. package/dist/template-components/dialog/TemplateDialogContext.d.ts +0 -4
  133. package/dist/template-components/dialog/TemplateDialogContext.types.d.ts +0 -32
  134. package/dist/template-components/index.d.ts +0 -4
  135. package/dist/template-components/routing-content-placeholder/RoutingContentPlaceholder.d.ts +0 -4
  136. package/dist/template-components/routing-content-placeholder/RoutingContentPlaceholder.types.d.ts +0 -7
  137. package/dist/template-components/template-loader/TemplateLoader.d.ts +0 -6
  138. package/dist/template-components/template-loader/useTemplateDataLoader.d.ts +0 -9
  139. package/dist/template-properties/TemplateProperties.types.d.ts +0 -29
  140. package/dist/template-properties/TemplatePropertiesProvider.d.ts +0 -9
  141. package/dist/template-properties/index.d.ts +0 -2
  142. package/dist/templates/app/App.types.d.ts +0 -17
  143. package/dist/templates/app/AppTemplate.d.ts +0 -4
  144. package/dist/templates/app/avatar/Avatar.d.ts +0 -8
  145. package/dist/templates/app/breadcrumbs/Breadcrumbs.d.ts +0 -4
  146. package/dist/templates/app/breadcrumbs/Breadcrumbs.types.d.ts +0 -18
  147. package/dist/templates/app/breadcrumbs/BreadcrumbsContext.d.ts +0 -4
  148. package/dist/templates/app/breadcrumbs/BreadcrumbsProvider.d.ts +0 -3
  149. package/dist/templates/app/breadcrumbs/index.d.ts +0 -2
  150. package/dist/templates/app/header/Header.d.ts +0 -5
  151. package/dist/templates/app/header/index.d.ts +0 -1
  152. package/dist/templates/app/main/Main.d.ts +0 -8
  153. package/dist/templates/app/sidebar/Sidebar.d.ts +0 -7
  154. package/dist/templates/app/sidebar/index.d.ts +0 -1
  155. package/dist/templates/app/siteselector/SiteSelector.d.ts +0 -6
  156. package/dist/templates/condition-builder/ConditionBuilderTemplate.d.ts +0 -3
  157. package/dist/templates/condition-builder/ConditionBuilderTemplate.types.d.ts +0 -7
  158. package/dist/templates/dashboard/DashboardTemplate.d.ts +0 -3
  159. package/dist/templates/dashboard/tile/Tile.d.ts +0 -3
  160. package/dist/templates/dashboard/tile-category/TileCategory.d.ts +0 -3
  161. package/dist/templates/edit/EditTemplate.d.ts +0 -3
  162. package/dist/templates/edit/EditTemplate.types.d.ts +0 -12
  163. package/dist/templates/field-editor/FieldEditorBarItemHeader.d.ts +0 -3
  164. package/dist/templates/field-editor/FieldEditorBarItemHeader.types.d.ts +0 -4
  165. package/dist/templates/field-editor/FieldEditorForm.d.ts +0 -6
  166. package/dist/templates/field-editor/FieldEditorForm.types.d.ts +0 -11
  167. package/dist/templates/field-editor/FieldEditorTemplate.d.ts +0 -15
  168. package/dist/templates/field-editor/FieldEditorTemplate.types.d.ts +0 -83
  169. package/dist/templates/index.d.ts +0 -10
  170. package/dist/templates/listing/Listing.types.d.ts +0 -22
  171. package/dist/templates/listing/ListingTemplate.d.ts +0 -3
  172. package/dist/templates/overview/OverviewTemplate.d.ts +0 -3
  173. package/dist/templates/overview/OverviewTemplate.types.d.ts +0 -71
  174. package/dist/templates/side-navigation-layout/SideNavigationLayoutTemplate.d.ts +0 -2
  175. package/dist/templates/side-navigation-layout/vertical-menu/VerticalMenu.d.ts +0 -8
  176. package/dist/types/Action.types.d.ts +0 -14
  177. package/dist/types/NotificationMessage.types.d.ts +0 -11
  178. package/dist/types/index.d.ts +0 -4
  179. package/dist/utils/authentication/logonUrlProvider.d.ts +0 -10
  180. package/dist/utils/basePathUtils.d.ts +0 -8
  181. package/dist/utils/constants.d.ts +0 -2
  182. package/dist/utils/convertTagGradient.d.ts +0 -3
  183. package/dist/utils/index.d.ts +0 -4
  184. package/dist/utils/loadModule.d.ts +0 -10
  185. package/dist/utils/pathUtils/index.d.ts +0 -1
  186. package/dist/utils/pathUtils/pathUtils.d.ts +0 -9
  187. package/dist/utils/postToAdmin.d.ts +0 -21
  188. package/dist/utils/responseStatusActions.d.ts +0 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kentico/xperience-admin-base",
3
- "version": "14.0.0-68025",
3
+ "version": "22.0.1",
4
4
  "main": "dist/entry.js",
5
5
  "types": "dist/entry.d.ts",
6
6
  "files": [
@@ -16,67 +16,81 @@
16
16
  ],
17
17
  "license": "SEE LICENSE IN LICENSE.txt",
18
18
  "dependencies": {
19
- "@kentico/xperience-admin-components": "14.0.0-68025",
19
+ "@kentico/xperience-admin-components": "22.0.1",
20
+ "@react-aria/focus": "^3.6.1",
21
+ "@react-aria/visually-hidden": "^3.3.1",
20
22
  "classnames": "^2.3.1",
21
- "history": "^5.0.1",
22
- "react": "^17.0.2",
23
- "react-dom": "^17.0.2",
24
- "react-router-dom": "6.0.0-beta.2",
25
- "use-resize-observer": "7.0.1",
26
- "uuid": "^8.3.2",
27
- "@react-aria/visually-hidden": "^3.2.3"
23
+ "history": "^5.3.0",
24
+ "react": "^18.2.0",
25
+ "react-cool-inview": "^3.0.1",
26
+ "react-dnd": "^15.1.1",
27
+ "react-dnd-html5-backend": "^15.1.2",
28
+ "react-dom": "^18.2.0",
29
+ "react-router-dom": "6.3.0",
30
+ "react-select": "^5.3.2",
31
+ "react-select-async-paginate": "^0.6.1",
32
+ "use-debounce": "^8.0.1",
33
+ "use-resize-observer": "9.0.2",
34
+ "uuid": "^8.3.2"
28
35
  },
29
36
  "devDependencies": {
30
- "@babel/core": "^7.15.4",
31
- "@babel/eslint-parser": "^7.15.4",
32
- "@babel/plugin-transform-runtime": "^7.15.0",
33
- "@babel/preset-env": "^7.15.4",
34
- "@babel/preset-react": "^7.14.5",
35
- "@babel/preset-typescript": "^7.15.0",
36
- "@babel/runtime": "^7.15.4",
37
- "@testing-library/jest-dom": "^5.14.1",
38
- "@testing-library/react": "^12.0.0",
39
- "@types/history": "^4.7.9",
40
- "@types/jest": "^27.0.1",
41
- "@types/react": "^17.0.19",
37
+ "@babel/core": "^7.18.6",
38
+ "@babel/eslint-parser": "^7.18.2",
39
+ "@babel/plugin-transform-runtime": "^7.18.6",
40
+ "@babel/preset-env": "^7.18.6",
41
+ "@babel/preset-react": "^7.18.6",
42
+ "@babel/preset-typescript": "^7.18.6",
43
+ "@babel/runtime": "^7.18.6",
44
+ "@testing-library/jest-dom": "^5.16.4",
45
+ "@testing-library/react": "^13.3.0",
46
+ "@testing-library/react-hooks": "^8.0.1",
47
+ "@types/dompurify": "2.3.3",
48
+ "@types/jest": "^28.1.3",
49
+ "@types/react": "^18.0.14",
42
50
  "@types/react-beautiful-dnd": "^13.1.2",
43
- "@types/react-dom": "^17.0.9",
44
- "@types/react-router-dom": "^5.1.8",
51
+ "@types/react-dom": "^18.0.5",
52
+ "@types/react-router-dom": "^5.3.3",
45
53
  "@types/systemjs": "^6.1.1",
46
- "@types/webpack-env": "^1.16.2",
47
- "@types/uuid": "^8.3.1",
48
- "autoprefixer": "^10.3.4",
49
- "babel-loader": "8.2.2",
54
+ "@types/testing-library__jest-dom": "5.14.5",
55
+ "@types/uuid": "^8.3.4",
56
+ "@types/webpack-env": "^1.17.0",
57
+ "autoprefixer": "^10.4.7",
58
+ "babel-loader": "8.2.5",
50
59
  "cross-env": "^7.0.3",
51
- "css-loader": "^6.2.0",
52
- "eslint": "^7.32.0",
53
- "eslint-config-prettier": "^8.3.0",
60
+ "css-loader": "^6.7.1",
61
+ "dompurify": "2.3.8",
62
+ "eslint": "^8.18.0",
63
+ "eslint-config-prettier": "^8.5.0",
54
64
  "eslint-config-ts-react-important-stuff": "^3.0.0",
55
- "eslint-plugin-prettier": "^4.0.0",
56
- "eslint-plugin-react": "^7.25.1",
65
+ "eslint-plugin-prettier": "^4.1.0",
66
+ "eslint-plugin-react": "^7.30.1",
57
67
  "file-loader": "^6.2.0",
58
- "jest": "^27.1.0",
59
- "jest-junit": "^12.2.0",
60
- "postcss": "^8.3.6",
61
- "postcss-loader": "^6.1.1",
62
- "prettier": "^2.3.2",
63
- "sass": "^1.39.0",
64
- "sass-loader": "^12.1.0",
65
- "style-loader": "^3.2.1",
66
- "ts-jest": "^27.0.5",
67
- "typescript": "^4.4.2",
68
- "webpack": "^5.51.2",
69
- "webpack-cli": "^4.8.0",
70
- "webpack-dev-server": "^4.1.0",
68
+ "jest": "^28.1.1",
69
+ "jest-environment-jsdom": "28.1.1",
70
+ "jest-junit": "^14.0.0",
71
+ "postcss": "^8.4.14",
72
+ "postcss-loader": "^7.0.0",
73
+ "prettier": "^2.7.1",
74
+ "react-test-renderer": "^18.2.0",
75
+ "sass": "^1.53.0",
76
+ "sass-loader": "^13.0.2",
77
+ "style-loader": "^3.3.1",
78
+ "ts-jest": "^28.0.5",
79
+ "typescript": "^4.7.4",
80
+ "webpack": "^5.73.0",
81
+ "webpack-cli": "^4.10.0",
82
+ "webpack-dev-server": "^4.9.2",
71
83
  "webpack-merge": "^5.8.0"
72
84
  },
73
85
  "scripts": {
74
86
  "start": "webpack serve --mode development",
75
87
  "dev:remote": "webpack serve --mode development --env remote",
76
88
  "build": "webpack --mode=production",
77
- "declaration": "tsc --project tsconfig.declaration.json",
78
89
  "typecheck": "tsc --noEmit",
79
90
  "analyze": "webpack --mode=production --env.analyze=true",
80
- "test": "cross-env BABEL_ENV=test jest"
91
+ "test": "cross-env BABEL_ENV=test jest",
92
+ "tsc-decleration": "tsc --project tsconfig.declaration.json",
93
+ "declaration": "npm run tsc-decleration && npx ts-node ../../scripts/typesRollup",
94
+ "validate-api": "npx ts-node ../../scripts/validateApi"
81
95
  }
82
96
  }
Binary file
@@ -1,27 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Instance of command context type.
4
- */
5
- export declare const CommandContext: React.Context<CommandContextType>;
6
- /**
7
- * Defines a command context type.
8
- */
9
- export interface CommandContextType {
10
- /**
11
- * Executes page command.
12
- * @param name Name of the command to be executed.
13
- * @param data Data passed to the command.
14
- * @param files Files to be uploaded by the command.
15
- */
16
- executeCommand: <TCommandResult = void, TData = void>(name: string, data?: TData, files?: FileList) => Promise<TCommandResult | undefined>;
17
- /**
18
- * Registers command into the current provider.
19
- * @param name Name of the command to be registered.
20
- * @param execute Callback that executes the command.
21
- */
22
- registerCommand: <T>(name: string, execute: (data: T, files?: FileList) => Promise<void>) => void;
23
- }
24
- /**
25
- * Returns the command provider for the current page.
26
- */
27
- export declare const usePageCommandProvider: () => CommandContextType;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface CommandProviderProps {
3
- readonly children: React.ReactNode;
4
- }
5
- /**
6
- * Ensures the command context for current template.
7
- */
8
- export declare const CommandProvider: {
9
- ({ children }: CommandProviderProps): JSX.Element;
10
- displayName: string;
11
- };
12
- export {};
@@ -1,3 +0,0 @@
1
- export { usePageCommand } from './usePageCommand';
2
- export { usePageCommandProvider } from './CommandContext';
3
- export type { Command, CommandExecutor, UseCommandConfig } from './useCommand.types';
@@ -1,36 +0,0 @@
1
- /**
2
- * Command result interface.
3
- */
4
- export interface Command<T = any> {
5
- /**
6
- * Invocation callback.
7
- */
8
- execute: CommandExecutor<T, void>;
9
- }
10
- /**
11
- * Command execution configuration.
12
- */
13
- export declare type UseCommandConfig<TCommandResult, TCommandData> = {
14
- /**
15
- * Command data.
16
- */
17
- data?: TCommandData;
18
- /**
19
- * Indicates whether command should be invoked automatically on component mount.
20
- * Defaults to `false`.
21
- */
22
- executeOnMount?: boolean;
23
- /**
24
- * Custom action executed before the command execution.
25
- * If the function returns `false` the command will not be executed.
26
- */
27
- before?: () => boolean | void;
28
- /**
29
- * Custom action executed after the command execution.
30
- */
31
- after?: (commandResult: TCommandResult | undefined) => void;
32
- };
33
- /**
34
- * Command invocation callback.
35
- */
36
- export declare type CommandExecutor<TData, TResponse> = (data?: TData, files?: FileList) => Promise<TResponse>;
@@ -1,11 +0,0 @@
1
- interface CommandInvokerResponse<T> {
2
- result: T;
3
- command: string;
4
- }
5
- /**
6
- * Defines a command invocation function with messaging and navigation support.
7
- *
8
- * @returns Command invocation function.
9
- */
10
- export declare function useCommandInvoker<T>(): (name: string, data?: any, files?: FileList | undefined) => Promise<CommandInvokerResponse<T> | undefined>;
11
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Command, UseCommandConfig } from './useCommand.types';
3
- /**
4
- * Registers command into the current command provider and returns its invocation callback.
5
- *
6
- * @param commandName Name of the command.
7
- * @param config Command options.
8
- * @param dependencies If present, command will only activate if the values in the list change.
9
- * @returns Invocation callback to be executed manually.
10
- */
11
- export declare function usePageCommand<TCommandResult, TCommandData = void>(commandName: string, config?: UseCommandConfig<TCommandResult, TCommandData>, dependencies?: React.DependencyList): Command<TCommandData>;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ActionListProps } from './ActionList.types';
3
- export declare const ActionList: ({ actions }: ActionListProps) => JSX.Element;
@@ -1,4 +0,0 @@
1
- import { Action } from '../../types';
2
- export interface ActionListProps {
3
- actions?: Action[];
4
- }
@@ -1,11 +0,0 @@
1
- import React, { Component, ErrorInfo } from 'react';
2
- import { ErrorBoundaryProps, ErrorBoundaryState } from './ErrorBoundary.types';
3
- /**
4
- * ErrorBoundary component allows to catch the unhandled errors and display a fallback component.
5
- */
6
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
7
- state: ErrorBoundaryState;
8
- static getDerivedStateFromError(error: Error): ErrorBoundaryState;
9
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
10
- render(): React.ReactNode;
11
- }
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface ErrorBoundaryProps {
3
- readonly children: ReactNode;
4
- readonly fallback: (error: Error | null) => ReactNode;
5
- }
6
- export interface ErrorBoundaryState {
7
- readonly hasError: boolean;
8
- readonly error: Error | null;
9
- }
@@ -1,5 +0,0 @@
1
- export { ActionList } from './ActionList/ActionList';
2
- export { Loader } from './loader/Loader';
3
- export { PageLoader } from './page-loader/PageLoader';
4
- export { PageMessagePane } from './page-message-pane/PageMessagePane';
5
- export { Portal } from './portal/Portal';
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Loader: () => JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const PageLoader: () => JSX.Element;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export interface PageMessagePaneProps {
3
- readonly title: string;
4
- readonly text?: string;
5
- readonly children?: React.ReactNode;
6
- }
7
- export declare const PageMessagePane: ({ title, text, children }: PageMessagePaneProps) => JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface PortalProps {
3
- readonly children: React.ReactNode;
4
- readonly container: HTMLElement | null;
5
- readonly key?: string | null | undefined;
6
- }
7
- declare const Portal: ({ children, container, key }: PortalProps) => JSX.Element;
8
- export { Portal };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import { FormProps, FormRef } from './Form.types';
3
- export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<FormRef>>;
@@ -1,88 +0,0 @@
1
- import React from 'react';
2
- import { FormComponentProps } from '../form-components/FormComponent.types';
3
- /**
4
- * Form reference exposing Form functions.
5
- */
6
- export declare type FormRef = {
7
- /**
8
- * Submits the entire form.
9
- */
10
- submit: (action?: string) => void;
11
- } | null;
12
- /**
13
- * Name of the form the components are rendered within.
14
- */
15
- export declare const FormNameContext: React.Context<string>;
16
- /**
17
- * Properties for Form cmponent.
18
- */
19
- export interface FormProps {
20
- /**
21
- * Form component has no button rendered, define the children to display submitting component.
22
- */
23
- readonly children?: React.ReactNode;
24
- /**
25
- * Collection of form components which will be displayed inside the form.
26
- */
27
- readonly components: FormComponentProps[];
28
- /**
29
- * Name of the form.
30
- */
31
- readonly name?: string;
32
- /**
33
- * Determines whether the form is read only.
34
- */
35
- readonly readOnly?: boolean;
36
- /**
37
- * Function for form value change monitoring.
38
- */
39
- readonly onChange?: (e: ChangeEventHandler) => void;
40
- /**
41
- * Submit function used to submit form data.
42
- */
43
- readonly onSubmit?: (e: SubmitEventHandler, action?: string) => void;
44
- }
45
- export interface ChangeEventHandler {
46
- readonly changedField: {
47
- name: string;
48
- hasDependencies: boolean;
49
- };
50
- readonly values: {
51
- [fieldName: string]: any;
52
- };
53
- }
54
- export interface SubmitEventHandler {
55
- readonly values: {
56
- [fieldName: string]: any;
57
- };
58
- }
59
- /**
60
- * Represents result of form submission.
61
- */
62
- export interface FormSubmissionResult {
63
- /**
64
- * Collection of form components which will be displayed inside the form.
65
- */
66
- readonly components: FormComponentProps[];
67
- /**
68
- * Status of the form submission and validation process.
69
- */
70
- readonly status: FormSubmissionStatus;
71
- }
72
- /**
73
- * Indicates the state of the form submission and validation result.
74
- */
75
- export declare enum FormSubmissionStatus {
76
- /**
77
- * Error during the form submission.
78
- */
79
- Error = "error",
80
- /**
81
- * Form validation failed.
82
- */
83
- ValidationFailure = "validationFailure",
84
- /**
85
- * Submission and validation successful.
86
- */
87
- ValidationSuccess = "validationSuccess"
88
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormFieldProps } from './FormField.types';
3
- export declare const FormField: (props: FormFieldProps) => JSX.Element;
@@ -1,6 +0,0 @@
1
- import { FormComponentProps } from '../form-components/FormComponent.types';
2
- import { ValidationResult } from '../validation-rules/ValidationRule.types';
3
- export interface FormFieldProps extends FormComponentProps {
4
- readonly allowRevalidate: boolean;
5
- readonly onValidated?: (invalidValidationResults: ValidationResult[]) => void;
6
- }
@@ -1,2 +0,0 @@
1
- export * from './Form';
2
- export * from './Form.types';
@@ -1,22 +0,0 @@
1
- import { ValidationRuleProps } from '../validation-rules/ValidationRule.types';
2
- export declare type OnChangeValueType = string | number | boolean;
3
- export interface FieldInfo {
4
- readonly name: string;
5
- readonly fieldValues: Record<string, any>;
6
- }
7
- export interface FormComponentProps extends FieldInfo {
8
- readonly componentName: string;
9
- readonly hasDependencies: boolean;
10
- readonly label?: string;
11
- readonly explanationText?: string;
12
- readonly tooltip?: string;
13
- readonly readOnly?: boolean;
14
- readonly value?: any;
15
- readonly invalid?: boolean;
16
- readonly validationMessage?: string;
17
- readonly validationRules?: ValidationRuleProps[];
18
- readonly onChange?: (value: OnChangeValueType) => void;
19
- readonly required?: boolean;
20
- readonly disabledMessage?: string;
21
- readonly guid: string;
22
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormComponentProps } from './FormComponent.types';
3
- export declare const FormComponentLoader: (props: FormComponentProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormComponentProps } from '../FormComponent.types';
3
- export declare const CheckboxFormComponent: (props: FormComponentProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ConditionBuilderFormComponentProps } from './ConditionBuilderFormComponent.types';
3
- export declare const ConditionBuilderFormComponent: ({ initialConfiguration, availableMacroRules, availableMacroRuleConfigurations, onChange, label, disabledMessage, invalid, validationMessage, readOnly, required, explanationText, tooltip }: ConditionBuilderFormComponentProps) => JSX.Element;
@@ -1,18 +0,0 @@
1
- import { FormComponentProps } from '../FormComponent.types';
2
- import { ConditionBuilderProps } from '../../../shared-components/ConditionBuilder/ConditionBuilder';
3
- import { FormSubmissionStatus } from '../..';
4
- export interface ConditionBuilderFormComponentProps extends FormComponentProps, Omit<ConditionBuilderProps, 'onChange'> {
5
- }
6
- /**
7
- * Represents result of form submission.
8
- */
9
- export interface GetMacroCommandSubmissionResult {
10
- /**
11
- * Status of the form submission and validation process.
12
- */
13
- readonly status: FormSubmissionStatus;
14
- /**
15
- * Status of the form submission and validation process.
16
- */
17
- readonly result?: string;
18
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { SingleObjectSelectorFormComponentProps } from './SingleObjectSelectorFormComponentProps.types';
3
- export declare const SingleObjectSelectorFormComponent: ({ objectType, textColumnName, valueColumnName, ...props }: SingleObjectSelectorFormComponentProps) => JSX.Element;
@@ -1,16 +0,0 @@
1
- import { DropDownOption } from '../../dropdown-form-component/DropDownFormComponentProps.types';
2
- import { FormComponentProps } from '../../FormComponent.types';
3
- export interface SingleObjectSelectorFormComponentProps extends FormComponentProps {
4
- readonly objectType: string;
5
- readonly textColumnName: string;
6
- readonly valueColumnName: string;
7
- readonly placeholder?: string;
8
- }
9
- export interface LoadOptionsCommandArguments {
10
- readonly options: DropDownOption[];
11
- }
12
- export interface LoadOptionsCommandResult {
13
- readonly objectType: string;
14
- readonly textColumnName: string;
15
- readonly valueColumnName: string;
16
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { DropDownFormComponentProps } from './DropDownFormComponentProps.types';
3
- export declare const DropdownSelectorFormComponent: (props: DropDownFormComponentProps) => JSX.Element;
@@ -1,9 +0,0 @@
1
- import { FormComponentProps } from '../FormComponent.types';
2
- export interface DropDownFormComponentProps extends FormComponentProps {
3
- readonly options: DropDownOption[];
4
- readonly placeholder?: string;
5
- }
6
- export interface DropDownOption {
7
- readonly value: string;
8
- readonly text: string;
9
- }
@@ -1,5 +0,0 @@
1
- import { IconName } from '@kentico/xperience-admin-components';
2
- /**
3
- * Returns form component label icon only if tooltip text is defined
4
- */
5
- export declare const getFormLabelIcon: (toolTipText: string | undefined) => IconName | undefined;
@@ -1,13 +0,0 @@
1
- export * from './FormComponent.types';
2
- export * from './checkbox-form-component/CheckboxFormComponent';
3
- export * from './namespace-code-name-form-component/NamespaceCodeNameFormComponent';
4
- export * from './condition-builder-form-component/ConditionBuilderFormComponent';
5
- export * from './dropdown-form-component/DropDownFormComponent';
6
- export * from './dropdown-form-component/DropDownFormComponentProps.types';
7
- export * from './number-input-form-component/NumberInputFormComponent';
8
- export * from './password-form-component/PasswordFormComponent';
9
- export * from './rich-text-editor-form-component/RichTextEditorFormComponent';
10
- export * from './text-input-form-component/TextInputFormComponent';
11
- export * from './text-input-form-component/TextInputFormComponentProps.types';
12
- export * from './textarea-form-component/TextAreaFormComponent';
13
- export * from './condition-builder-form-component/single-object-selector-form-component/SingleObjectSelectorFormComponent';
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { NamespaceCodeNameProps } from './NamespaceCodeNameFormComponent.types';
3
- export declare const NamespaceCodeNameFormComponent: (props: NamespaceCodeNameProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- import { FormComponentProps } from '..';
2
- export interface NamespaceCodeNameProps extends FormComponentProps {
3
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormComponentProps } from '../FormComponent.types';
3
- export declare const NumberInputFormComponent: (props: FormComponentProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormComponentProps } from '../FormComponent.types';
3
- export declare const PasswordFormComponent: (props: FormComponentProps) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { RichTextEditorFormComponentProps } from './RichTextEditorFormComponentProps.types';
3
- export declare const RichTextEditorFormComponent: ({ label, placeholder, tooltipTextOnDisabled, value, onChange, invalid, validationMessage, readOnly, required, disabledMessage, tooltip, explanationText, guid, ...props }: RichTextEditorFormComponentProps) => JSX.Element;
@@ -1,19 +0,0 @@
1
- import { FormComponentProps } from '../FormComponent.types';
2
- export interface RichTextEditorFormComponentProps extends FormComponentProps {
3
- readonly placeholder?: string;
4
- readonly tooltipTextOnDisabled?: string;
5
- readonly assetsPanelEnabled: boolean;
6
- }
7
- export interface LoadAssetsPanelItemsParameters {
8
- readonly folderPath: string;
9
- readonly libraryIdentifier: string;
10
- }
11
- export interface LoadAssetsFoldersParameters {
12
- readonly folderPath: string;
13
- readonly isSelected: boolean;
14
- readonly libraryIdentifier: string;
15
- }
16
- export interface UploadAssetsParameters {
17
- readonly folderPath: string;
18
- readonly libraryIdentifier: string;
19
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { TextInputFormComponentProps } from './TextInputFormComponentProps.types';
3
- export declare const TextInputFormComponent: (props: TextInputFormComponentProps) => JSX.Element;
@@ -1,4 +0,0 @@
1
- import { FormComponentProps } from '../FormComponent.types';
2
- export interface TextInputFormComponentProps extends FormComponentProps {
3
- readonly watermarkText?: string;
4
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormComponentProps } from '../FormComponent.types';
3
- export declare const TextAreaFormComponent: (props: FormComponentProps) => JSX.Element;
@@ -1,7 +0,0 @@
1
- export interface FormComponentCommandModel {
2
- formName: string;
3
- fieldValues: Record<string, any>;
4
- fieldName: string;
5
- commandName: string;
6
- commandData?: string;
7
- }
@@ -1,4 +0,0 @@
1
- import { FieldInfo } from '../form-components/FormComponent.types';
2
- import { FormComponentCommandModel } from './FormComponentCommand.types';
3
- export declare const componentCommandName = "ComponentCommand";
4
- export declare const prepareFormComponentCommandPayload: <TData = unknown>(formName: string, fieldInfo: FieldInfo, commandName: string, data?: TData | undefined) => FormComponentCommandModel;
@@ -1,3 +0,0 @@
1
- export * from './useFormComponentCommand';
2
- export * from './useFormComponentCommandProvider';
3
- export * from './useValidationRule';