@kentico/xperience-admin-base 31.3.3 → 31.4.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 +30 -20
- package/dist/entry.js +6 -6
- package/package.json +12 -12
package/dist/entry.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DefineIconParameters } from 'froala-editor';
|
|
2
2
|
import { DraggableProvidedDragHandleProps } from '@hello-pangea/dnd';
|
|
3
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
3
4
|
import { FroalaOptions } from 'froala-editor';
|
|
4
5
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
6
|
import { MutableRefObject } from 'react';
|
|
6
7
|
import { default as React_2 } from 'react';
|
|
8
|
+
import { RefAttributes } from 'react';
|
|
7
9
|
import { RefObject } from 'react';
|
|
8
10
|
import { RegisterCommandParameters } from 'froala-editor';
|
|
9
11
|
|
|
@@ -161,6 +163,9 @@ export declare interface AssetRichTextEditorPluginOptions extends RichTextEditor
|
|
|
161
163
|
export declare interface AssetRichTextEditorPluginProps extends RichTextEditorPluginProps {
|
|
162
164
|
}
|
|
163
165
|
|
|
166
|
+
/**
|
|
167
|
+
* @deprecated The interface is no longer used and will be removed in the future.
|
|
168
|
+
*/
|
|
164
169
|
export declare interface AssetUploadPlaceholderData {
|
|
165
170
|
/**
|
|
166
171
|
* The file associated with the placeholder.
|
|
@@ -336,15 +341,15 @@ declare interface DialogHandlers {
|
|
|
336
341
|
/**
|
|
337
342
|
* Represents information about form field.
|
|
338
343
|
*/
|
|
339
|
-
export declare interface FieldInfo {
|
|
344
|
+
export declare interface FieldInfo<TValues extends FieldInfoValueType = FieldInfoValueType> {
|
|
340
345
|
readonly name: string;
|
|
341
|
-
readonly fieldValues:
|
|
346
|
+
readonly fieldValues: TValues;
|
|
342
347
|
}
|
|
343
348
|
|
|
344
349
|
/**
|
|
345
350
|
* Collection of field values.
|
|
346
351
|
*/
|
|
347
|
-
export declare type FieldInfoValueType =
|
|
352
|
+
export declare type FieldInfoValueType = FormValues;
|
|
348
353
|
|
|
349
354
|
declare interface FormCategoryProps {
|
|
350
355
|
readonly title: string;
|
|
@@ -357,7 +362,7 @@ declare interface FormCategoryProps {
|
|
|
357
362
|
/**
|
|
358
363
|
* Represents basic set of form component properties.
|
|
359
364
|
*/
|
|
360
|
-
export declare interface FormComponentProps extends FieldInfo {
|
|
365
|
+
export declare interface FormComponentProps<TValue extends FormFieldValue = FormFieldValue> extends FieldInfo {
|
|
361
366
|
/**
|
|
362
367
|
* Name of the component.
|
|
363
368
|
*/
|
|
@@ -393,7 +398,7 @@ export declare interface FormComponentProps extends FieldInfo {
|
|
|
393
398
|
/**
|
|
394
399
|
* Value of the form component.
|
|
395
400
|
*/
|
|
396
|
-
readonly value?:
|
|
401
|
+
readonly value?: TValue;
|
|
397
402
|
/**
|
|
398
403
|
* Indicates if the form component is in invalid state.
|
|
399
404
|
*/
|
|
@@ -418,7 +423,7 @@ export declare interface FormComponentProps extends FieldInfo {
|
|
|
418
423
|
* The callback function called when the value of the form component changes.
|
|
419
424
|
* * @argument value changed value of the form component.
|
|
420
425
|
*/
|
|
421
|
-
readonly onChange?: (value
|
|
426
|
+
readonly onChange?: (value?: TValue) => void;
|
|
422
427
|
/**
|
|
423
428
|
* Indicates whether the value of the form component is required.
|
|
424
429
|
*/
|
|
@@ -456,10 +461,19 @@ declare enum FormEditMode {
|
|
|
456
461
|
ReadOnly = 'readOnly'
|
|
457
462
|
}
|
|
458
463
|
|
|
464
|
+
declare type FormFieldValue = JSONPrimitive | Date | FormFieldValue[] | {
|
|
465
|
+
[key: string]: FormFieldValue;
|
|
466
|
+
};
|
|
467
|
+
|
|
459
468
|
/**
|
|
460
469
|
* Array of form components and their categories.
|
|
461
470
|
*/
|
|
462
|
-
declare type FormItems = Array<FormComponentProps | FormCategoryProps>;
|
|
471
|
+
declare type FormItems<TValues extends FormValues = FormValues> = Array<FormComponentProps<TValues[keyof TValues]> | FormCategoryProps>;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Represents form submit parameters.
|
|
475
|
+
*/
|
|
476
|
+
declare type FormValues = Record<string, FormFieldValue>;
|
|
463
477
|
|
|
464
478
|
/** Configurator enables custom Froala Typescript plugins to use global Froala configuration methods, which would be unavailable due to different module context. */
|
|
465
479
|
declare interface FroalaEditorConfigurator {
|
|
@@ -508,6 +522,8 @@ declare interface InjectedProps {
|
|
|
508
522
|
readonly children: React.ReactNode;
|
|
509
523
|
}
|
|
510
524
|
|
|
525
|
+
declare type JSONPrimitive = string | number | boolean | null | undefined;
|
|
526
|
+
|
|
511
527
|
declare const KXIconSets = {
|
|
512
528
|
'xp-default-icon-set': Icons,
|
|
513
529
|
'xp-flags-icon-set': Flags
|
|
@@ -601,11 +617,6 @@ declare enum NotificationMessageType {
|
|
|
601
617
|
Info = "info"
|
|
602
618
|
}
|
|
603
619
|
|
|
604
|
-
/**
|
|
605
|
-
* Untyped alias for value used on change.
|
|
606
|
-
*/
|
|
607
|
-
declare type OnChangeValueType = Object | null;
|
|
608
|
-
|
|
609
620
|
/**
|
|
610
621
|
* Describes single dropdown option configuration.
|
|
611
622
|
*/
|
|
@@ -620,14 +631,13 @@ export declare interface RichTextEditorDropdownOption {
|
|
|
620
631
|
readonly componentName?: string;
|
|
621
632
|
}
|
|
622
633
|
|
|
623
|
-
export declare const RichTextEditorNestedComponentLoader:
|
|
624
|
-
({ onLoad, ...props }: RichTextEditorNestedComponentLoaderProps): JSX_2.Element;
|
|
625
|
-
displayName: string;
|
|
626
|
-
};
|
|
634
|
+
export declare const RichTextEditorNestedComponentLoader: ForwardRefExoticComponent<RichTextEditorNestedComponentLoaderProps & RefAttributes<RichTextEditorNestedComponentRef>>;
|
|
627
635
|
|
|
628
636
|
export declare interface RichTextEditorNestedComponentLoaderProps extends RichTextEditorNestedComponentProps {
|
|
629
|
-
/** Function called after load of the plugin.
|
|
630
|
-
|
|
637
|
+
/** Function called after load of the plugin.
|
|
638
|
+
* @deprecated - use ref instead to get the reference to the nested component and call the method on it directly
|
|
639
|
+
*/
|
|
640
|
+
readonly onLoad?: (inputRef: RichTextEditorNestedComponentRef) => void;
|
|
631
641
|
}
|
|
632
642
|
|
|
633
643
|
export declare interface RichTextEditorNestedComponentProps {
|
|
@@ -952,8 +962,8 @@ export declare interface ValidationResult {
|
|
|
952
962
|
/**
|
|
953
963
|
* Base type used by validation rules.
|
|
954
964
|
*/
|
|
955
|
-
export declare interface ValidationRule<P extends ValidationRuleProps,
|
|
956
|
-
(props: P, value:
|
|
965
|
+
export declare interface ValidationRule<P extends ValidationRuleProps, TValue extends FormFieldValue> {
|
|
966
|
+
(props: P, value: TValue, fieldValues: FormValues): ValidationResult;
|
|
957
967
|
}
|
|
958
968
|
|
|
959
969
|
/**
|