@kentico/xperience-admin-base 30.6.4 → 30.8.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.
package/dist/entry.d.ts CHANGED
@@ -69,7 +69,7 @@ declare interface Action {
69
69
  /**
70
70
  * Configuration representing props of the component.
71
71
  */
72
- export declare interface ActionComponentProps {
72
+ export declare interface ActionComponentProps<T = any> {
73
73
  /**
74
74
  * Name of the rendered component.
75
75
  */
@@ -81,7 +81,7 @@ export declare interface ActionComponentProps {
81
81
  /**
82
82
  * The data for the component.
83
83
  */
84
- readonly componentData: any;
84
+ readonly componentData: T;
85
85
  /**
86
86
  * Notifies that the action has been executed.
87
87
  */
@@ -239,6 +239,10 @@ declare interface ConfirmationConfiguration {
239
239
  * Confirmation text shown in prompt dialog.
240
240
  */
241
241
  readonly detail?: string | null;
242
+ /**
243
+ * Indicates whether the detail text should be rendered as HTML.
244
+ */
245
+ readonly detailAsHtml?: boolean;
242
246
  /**
243
247
  * Confirmation content shown in prompt dialog.
244
248
  */
@@ -431,6 +435,20 @@ declare interface FroalaEditorConfigurator {
431
435
  readonly configureOptions?: (callback: (currentOptions: Partial<FroalaOptions>) => Partial<FroalaOptions>) => void;
432
436
  }
433
437
 
438
+ /**
439
+ * Type representing the globalization state, containing the globalization culture.
440
+ */
441
+ export declare type GlobalizationType = {
442
+ /**
443
+ * The currently selected UI language code (e.g., 'en-us').
444
+ */
445
+ uiLanguage: UICultureCode_2;
446
+ /**
447
+ * The currently selected UI locale code for date formatting (e.g., 'en-us').
448
+ */
449
+ uiLocale: UICultureCode_2;
450
+ };
451
+
434
452
  declare type HTMLButtonProps = Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title' | 'onClick'>;
435
453
 
436
454
  declare type IconName = IconNameMap[keyof typeof KXIconSets];
@@ -727,11 +745,35 @@ export declare interface TemplateDialogContextProps {
727
745
  readonly setActionInProgress: (prevent: boolean) => void;
728
746
  }
729
747
 
748
+ /**
749
+ * Unified test ID map used in both components and tests.
750
+ * Combines UI-defined IDs and test-only generated ones.
751
+ *
752
+ * Intended for internal use only.
753
+ * Shared `data-testid` values used across tests and UI.
754
+ * May change over time.
755
+ */
756
+ // eslint-disable-next-line @typescript-eslint/naming-convention
757
+ declare type TestId = string & { readonly __type: 'TestId' };
758
+
759
+ /**
760
+ * Represents a culture code used for localization in the UI.
761
+ */
762
+ declare type UICultureCode = string & {
763
+ readonly __type: 'UICultureCode';
764
+ };
765
+
766
+ /**
767
+ * Represents a culture code used for localization in the UI.
768
+ */
769
+ // eslint-disable-next-line @typescript-eslint/naming-convention
770
+ declare type UICultureCode_2 = string & { readonly __type: 'UICultureCode' };
771
+
730
772
  declare interface UITestProps {
731
773
  /**
732
774
  * Test id data attribute.
733
775
  */
734
- readonly dataTestId?: string;
776
+ readonly dataTestId?: TestId;
735
777
  }
736
778
 
737
779
  /**
@@ -776,6 +818,11 @@ export declare const useFormComponentCommandProvider: () => {
776
818
  executeCommand: <TCommandResult = void, TData = void>(fieldInfo: FieldInfo, name: string, data?: TData, files?: FileList, abortController?: AbortController) => Promise<TCommandResult | undefined>;
777
819
  };
778
820
 
821
+ export declare const useGlobalization: () => {
822
+ uiLanguage: UICultureCode;
823
+ uiLocale: UICultureCode;
824
+ };
825
+
779
826
  /**
780
827
  * Registers command into the current command provider and returns its invocation callback.
781
828
  *