@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.
Files changed (92) hide show
  1. package/dist/entry.d.ts +177 -10
  2. package/dist/entry.js +22 -2
  3. package/package.json +95 -77
  4. package/dist/8ce68503cd833f15dce10d33fdea4385.png +0 -0
  5. package/dist/commands/CommandContext.d.ts +0 -26
  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 -9
  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/index.d.ts +0 -5
  14. package/dist/components/loader/Loader.d.ts +0 -2
  15. package/dist/components/page-loader/PageLoader.d.ts +0 -2
  16. package/dist/components/page-message-pane/PageMessagePane.d.ts +0 -7
  17. package/dist/components/portal/Portal.d.ts +0 -8
  18. package/dist/forms/form/Form.d.ts +0 -3
  19. package/dist/forms/form/Form.types.d.ts +0 -73
  20. package/dist/forms/form/FormField.d.ts +0 -3
  21. package/dist/forms/form/FormField.types.d.ts +0 -7
  22. package/dist/forms/form/index.d.ts +0 -2
  23. package/dist/forms/form-components/FormComponent.types.d.ts +0 -15
  24. package/dist/forms/form-components/FormComponentLoader.d.ts +0 -3
  25. package/dist/forms/form-components/index.d.ts +0 -4
  26. package/dist/forms/form-components/password-form-component/PasswordFormComponent.d.ts +0 -3
  27. package/dist/forms/form-components/text-input-form-component/TextInputFormComponent.d.ts +0 -3
  28. package/dist/forms/form-components/textarea-form-component/TextAreaFormComponent.d.ts +0 -3
  29. package/dist/forms/hooks/index.d.ts +0 -1
  30. package/dist/forms/hooks/useValidationRule.d.ts +0 -2
  31. package/dist/forms/index.d.ts +0 -4
  32. package/dist/forms/validation-rules/ValidationRule.types.d.ts +0 -12
  33. package/dist/forms/validation-rules/ValidationRuleLoader.d.ts +0 -2
  34. package/dist/forms/validation-rules/ValidationRuleLoader.types.d.ts +0 -7
  35. package/dist/forms/validation-rules/index.d.ts +0 -7
  36. package/dist/forms/validation-rules/max-length-rule/MaxLengthValidationRule.d.ts +0 -3
  37. package/dist/forms/validation-rules/max-length-rule/MaxLengthValidationRule.types.d.ts +0 -5
  38. package/dist/forms/validation-rules/min-length-rule/MinLengthValidationRule.d.ts +0 -3
  39. package/dist/forms/validation-rules/min-length-rule/MinLengthValidationRule.types.d.ts +0 -5
  40. package/dist/forms/validation-rules/required-value-rule/RequiredStringValueValidationRule.Types.d.ts +0 -4
  41. package/dist/forms/validation-rules/required-value-rule/RequiredStringValueValidationRule.d.ts +0 -3
  42. package/dist/hooks/index.d.ts +0 -2
  43. package/dist/hooks/useComponent.d.ts +0 -1
  44. package/dist/hooks/usePagePath.d.ts +0 -1
  45. package/dist/localization/Localization.types.d.ts +0 -7
  46. package/dist/localization/LocalizationContext.d.ts +0 -4
  47. package/dist/localization/LocalizationProvider.d.ts +0 -3
  48. package/dist/localization/index.d.ts +0 -4
  49. package/dist/template-components/index.d.ts +0 -2
  50. package/dist/template-components/routing-content-placeholder/RoutingContentPlaceholder.d.ts +0 -6
  51. package/dist/template-components/template-loader/TemplateLoader.d.ts +0 -6
  52. package/dist/template-properties/TemplateProperties.types.d.ts +0 -14
  53. package/dist/template-properties/TemplatePropertiesProvider.d.ts +0 -9
  54. package/dist/template-properties/index.d.ts +0 -2
  55. package/dist/templates/app/App.types.d.ts +0 -16
  56. package/dist/templates/app/AppTemplate.d.ts +0 -4
  57. package/dist/templates/app/avatar/Avatar.d.ts +0 -8
  58. package/dist/templates/app/breadcrumbs/BreadcrumbItem.d.ts +0 -4
  59. package/dist/templates/app/breadcrumbs/BreadcrumbItem.types.d.ts +0 -4
  60. package/dist/templates/app/breadcrumbs/Breadcrumbs.d.ts +0 -3
  61. package/dist/templates/app/breadcrumbs/Breadcrumbs.types.d.ts +0 -13
  62. package/dist/templates/app/breadcrumbs/BreadcrumbsContext.d.ts +0 -4
  63. package/dist/templates/app/breadcrumbs/BreadcrumbsProvider.d.ts +0 -3
  64. package/dist/templates/app/breadcrumbs/index.d.ts +0 -2
  65. package/dist/templates/app/header/Header.d.ts +0 -5
  66. package/dist/templates/app/header/index.d.ts +0 -1
  67. package/dist/templates/app/main/Main.d.ts +0 -8
  68. package/dist/templates/app/sidebar/Sidebar.d.ts +0 -7
  69. package/dist/templates/app/sidebar/index.d.ts +0 -1
  70. package/dist/templates/app/siteselector/SiteSelector.d.ts +0 -6
  71. package/dist/templates/dashboard/DashboardTemplate.d.ts +0 -3
  72. package/dist/templates/dashboard/tile/Tile.d.ts +0 -3
  73. package/dist/templates/dashboard/tile-category/TileCategory.d.ts +0 -3
  74. package/dist/templates/edit/EditTemplate.d.ts +0 -3
  75. package/dist/templates/edit/EditTemplate.types.d.ts +0 -10
  76. package/dist/templates/field-editor/FieldEditorForm.d.ts +0 -6
  77. package/dist/templates/field-editor/FieldEditorForm.types.d.ts +0 -22
  78. package/dist/templates/field-editor/FieldEditorTemplate.d.ts +0 -5
  79. package/dist/templates/field-editor/FieldEditorTemplate.types.d.ts +0 -20
  80. package/dist/templates/index.d.ts +0 -8
  81. package/dist/templates/listing/Listing.types.d.ts +0 -19
  82. package/dist/templates/listing/ListingTemplate.d.ts +0 -3
  83. package/dist/templates/side-navigation-layout/SideNavigationLayoutTemplate.d.ts +0 -2
  84. package/dist/templates/side-navigation-layout/vertical-menu/VerticalMenu.d.ts +0 -8
  85. package/dist/types/Action.types.d.ts +0 -13
  86. package/dist/types/index.d.ts +0 -2
  87. package/dist/utils/authentication/logonUrlProvider.d.ts +0 -10
  88. package/dist/utils/getBaseUri.d.ts +0 -4
  89. package/dist/utils/index.d.ts +0 -3
  90. package/dist/utils/loadModule.d.ts +0 -10
  91. package/dist/utils/postToAdmin.d.ts +0 -5
  92. package/dist/utils/responseStatusActions.d.ts +0 -12
@@ -1,14 +0,0 @@
1
- export interface Route {
2
- name: string;
3
- path: string;
4
- templateName: string;
5
- }
6
- export interface Breadcrumbs {
7
- name?: string;
8
- show: boolean;
9
- }
10
- export interface TemplateProperties {
11
- routes: Route[];
12
- defaultRoute?: Route;
13
- breadcrumbs: Breadcrumbs;
14
- }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { TemplateProperties } from '.';
3
- export declare const TemplatePropertiesContext: React.Context<TemplateProperties>;
4
- interface TemplatePropertiesProviderProps {
5
- readonly properties: TemplateProperties;
6
- readonly children: React.ReactNode;
7
- }
8
- export declare const TemplatePropertiesProvider: ({ properties, children }: TemplatePropertiesProviderProps) => JSX.Element;
9
- export {};
@@ -1,2 +0,0 @@
1
- export * from './TemplatePropertiesProvider';
2
- export * from './TemplateProperties.types';
@@ -1,16 +0,0 @@
1
- import { IconName } from '@kentico/xperience-admin-components';
2
- export interface Application {
3
- readonly name: string;
4
- readonly icon: IconName;
5
- readonly path: string;
6
- }
7
- export interface ApplicationCategory {
8
- readonly name: string;
9
- readonly icon: IconName;
10
- readonly applications: Application[];
11
- readonly path: string;
12
- }
13
- export interface ApplicationCategories {
14
- readonly categories: ApplicationCategory[];
15
- readonly siteName: string;
16
- }
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { ApplicationCategories } from './App.types';
3
- declare const AppTemplate: ({ categories, siteName }: ApplicationCategories) => JSX.Element;
4
- export { AppTemplate };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- declare type AvatarBaseProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'onClick'>;
3
- interface AvatarProps extends AvatarBaseProps {
4
- image?: string;
5
- name?: string;
6
- }
7
- declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
8
- export { Avatar };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { BreadcrumbItemProps as BreadcrumbItemProps } from './BreadcrumbItem.types';
3
- declare const BreadcrumbItem: ({ text, path }: BreadcrumbItemProps) => JSX.Element;
4
- export { BreadcrumbItem };
@@ -1,4 +0,0 @@
1
- export interface BreadcrumbItemProps {
2
- readonly text: string;
3
- readonly path: string;
4
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const Breadcrumbs: () => JSX.Element;
3
- export { Breadcrumbs };
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- export interface BreadcrumbsContextType {
3
- readonly breadcrumbs: BreadcrumItem[];
4
- readonly setItem: (level: number, path: string, text?: string) => void;
5
- readonly refreshItem: (level: number, text: string) => void;
6
- }
7
- export interface BreadcrumItem {
8
- readonly text?: string;
9
- readonly path: string;
10
- }
11
- export interface BreadcrumbsProviderProps {
12
- readonly children: React.ReactNode;
13
- }
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { BreadcrumbsContextType } from './Breadcrumbs.types';
3
- export declare const BreadcrumbsContext: React.Context<BreadcrumbsContextType>;
4
- export declare const useBreadcrumbs: () => BreadcrumbsContextType;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { BreadcrumbsProviderProps } from './Breadcrumbs.types';
3
- export declare const BreadcrumbsProvider: ({ children }: BreadcrumbsProviderProps) => JSX.Element;
@@ -1,2 +0,0 @@
1
- export * from './BreadcrumbsContext';
2
- export * from './BreadcrumbsProvider';
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- declare const Header: ({ siteName }: {
3
- siteName: string;
4
- }) => JSX.Element;
5
- export { Header };
@@ -1 +0,0 @@
1
- export { Header } from './Header';
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { ApplicationCategory } from '../App.types';
3
- interface MainProps {
4
- readonly categories: ApplicationCategory[];
5
- readonly siteName: string;
6
- }
7
- declare const Main: ({ categories, siteName }: MainProps) => JSX.Element;
8
- export { Main };
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { ApplicationCategory } from '../App.types';
3
- interface SidebarProps {
4
- readonly categories: ApplicationCategory[];
5
- }
6
- declare const Sidebar: ({ categories }: SidebarProps) => JSX.Element;
7
- export { Sidebar };
@@ -1 +0,0 @@
1
- export { Sidebar } from './Sidebar';
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface SiteSelectorProps {
3
- siteName: string;
4
- }
5
- declare const SiteSelector: React.FC<SiteSelectorProps>;
6
- export { SiteSelector };
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ApplicationCategories } from '../app/App.types';
3
- export declare const DashboardTemplate: ({ categories }: ApplicationCategories) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { Application } from '../../app/App.types';
3
- export declare const Tile: (application: Application) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ApplicationCategory } from '../../app/App.types';
3
- export declare const TileCategory: (applicationCategory: ApplicationCategory) => JSX.Element;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { EditTemplateProps } from './EditTemplate.types';
3
- export declare const EditTemplate: ({ components, submitLabel, errorMessage, readOnly }: EditTemplateProps) => JSX.Element;
@@ -1,10 +0,0 @@
1
- import { FormComponentProps } from '../../forms/form-components/FormComponent.types';
2
- export interface EditTemplateProps {
3
- readonly readOnly: boolean;
4
- readonly submitLabel: string;
5
- readonly components: FormComponentProps[];
6
- readonly errorMessage?: string;
7
- }
8
- export interface FormChangeResult {
9
- readonly components: FormComponentProps[];
10
- }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { FieldEditorFormProps } from './FieldEditorForm.types';
3
- /**
4
- * Form used in Field Editor for each displayed field.
5
- */
6
- export declare const FieldEditorForm: ({ name, components, commandName, onSubmit }: FieldEditorFormProps) => JSX.Element;
@@ -1,22 +0,0 @@
1
- import { FormComponentProps } from '../../forms';
2
- import { Field } from './FieldEditorTemplate.types';
3
- /**
4
- * Represents properties for each displayed field.
5
- */
6
- export interface FieldEditorFormProps {
7
- readonly name: string;
8
- readonly components: FormComponentProps[];
9
- readonly onSubmit: (updatedField: Field) => void;
10
- readonly commandName: string;
11
- }
12
- export interface UpdateFieldResult {
13
- readonly fieldListingModel: Field;
14
- readonly formComponents: FormComponentProps[];
15
- readonly isValid: boolean;
16
- }
17
- export interface UpdateFieldParameters {
18
- readonly data: {
19
- [fieldName: string]: unknown;
20
- };
21
- readonly editedFieldName: string;
22
- }
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * Field editor template.
4
- */
5
- export declare const FieldEditorTemplate: () => JSX.Element;
@@ -1,20 +0,0 @@
1
- import { FormComponentProps } from '../../forms/form-components';
2
- /**
3
- * Represents a field, edited by the field editor.
4
- */
5
- export interface Field {
6
- readonly name: string;
7
- }
8
- export interface GetFieldsResult {
9
- readonly fields: Field[];
10
- }
11
- export interface GetFormFieldMetadataResult {
12
- readonly form: FormComponentProps[];
13
- }
14
- export declare enum FieldKind {
15
- Standard = "standard",
16
- Dummy = "dummy",
17
- System = "system",
18
- Primary = "primary",
19
- Extra = "extra"
20
- }
@@ -1,8 +0,0 @@
1
- export * from './app/AppTemplate';
2
- export * from './dashboard/DashboardTemplate';
3
- export * from './edit/EditTemplate';
4
- export * from './listing/ListingTemplate';
5
- export * from './side-navigation-layout/SideNavigationLayoutTemplate';
6
- export * from './field-editor/FieldEditorTemplate';
7
- export * from './app/breadcrumbs/BreadcrumbsProvider';
8
- export * from './app/breadcrumbs';
@@ -1,19 +0,0 @@
1
- import { TableColumn, TableRow, SortType } from '@kentico/xperience-admin-components';
2
- import { Action } from '../../types';
3
- export interface ListingProps {
4
- readonly columns: TableColumn[];
5
- readonly headerActions?: Action[];
6
- readonly pageSizes: number[];
7
- readonly pageSize: number;
8
- readonly caption: string;
9
- readonly sortBy: string;
10
- readonly sortType: SortType;
11
- readonly pageSizesLabel: string;
12
- }
13
- export interface LoadDataResult {
14
- readonly rows?: TableRow[];
15
- readonly totalCount: number;
16
- }
17
- export interface RowActionResult {
18
- reload: boolean;
19
- }
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import { ListingProps } from './Listing.types';
3
- export declare const ListingTemplate: ({ headerActions, columns, caption, ...props }: ListingProps) => JSX.Element;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const SideNavigationLayoutTemplate: () => JSX.Element;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import { Route } from '../../../template-properties';
3
- interface VerticalMenuProps {
4
- routes: Route[];
5
- isInner: boolean;
6
- }
7
- export declare const VerticalMenu: ({ routes, isInner }: VerticalMenuProps) => JSX.Element;
8
- export {};
@@ -1,13 +0,0 @@
1
- import { IconName } from '@kentico/xperience-admin-components';
2
- export declare enum ActionType {
3
- Link = "link",
4
- Command = "command"
5
- }
6
- export interface Action {
7
- readonly type: ActionType;
8
- readonly parameter: string;
9
- readonly label: string;
10
- readonly icon: IconName;
11
- readonly disabled: boolean;
12
- readonly confirmation?: string;
13
- }
@@ -1,2 +0,0 @@
1
- export { ActionType } from './Action.types';
2
- export type { Action } from './Action.types';
@@ -1,10 +0,0 @@
1
- declare const LogonPath = "/logon";
2
- /**
3
- * Gets the logon page URL including the given return URL in a query parameter.
4
- */
5
- declare const getLogonUrl: (returnUrl: string) => string;
6
- /**
7
- * Gets the return URL from a query parameter of the given URL.
8
- */
9
- declare const getReturnUrl: (url: string) => string | null;
10
- export { getLogonUrl, getReturnUrl, LogonPath };
@@ -1,4 +0,0 @@
1
- /**
2
- * Gets base path (without domain) obtained from html document
3
- */
4
- export declare const getBaseUri: () => URL;
@@ -1,3 +0,0 @@
1
- export * from './authentication/logonUrlProvider';
2
- export * from './postToAdmin';
3
- export * from './getBaseUri';
@@ -1,10 +0,0 @@
1
- declare type ModuleLoaderResultType = Promise<{
2
- default: any;
3
- }>;
4
- declare type ModuleLoaderType = (packageName: string, importName: string) => ModuleLoaderResultType;
5
- /**
6
- * Loads external module based on fully qualified path in format:
7
- * @scope/project/Component (e.g @kentico/xperience-admin-base/Listing)
8
- */
9
- export declare const loadModule: (fileName: string, moduleLoader?: ModuleLoaderType | undefined) => ModuleLoaderResultType;
10
- export {};
@@ -1,5 +0,0 @@
1
- export declare const postToAdmin: <TResult>(path: string, requestData: any, handleErrorMessage?: ((message: string) => void) | undefined) => Promise<TResult>;
2
- /**
3
- * Handles invalid response status codes.
4
- */
5
- export declare const handleResponseStatus: (statusCode: Number, handleErrorMessage?: ((message: string) => void) | undefined) => void;
@@ -1,12 +0,0 @@
1
- /** Handles a "bad" request response */
2
- declare const handle400Response: (handleErrorMessage?: ((message: string) => void) | undefined) => void;
3
- /**
4
- * Redirects to the logon page.
5
- * Keeps the current URL in the 'returnUrl' query parameter.
6
- */
7
- declare const handle401Response: () => void;
8
- /**
9
- * Displays a 403 alert.
10
- */
11
- declare const handle403Response: (handleErrorMessage?: ((message: string) => void) | undefined) => void;
12
- export { handle400Response, handle401Response, handle403Response };