@scbt-ecom/ui 0.24.0 → 0.25.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/{CustomLink-BuvHLRaW.js → CustomLink-CKaoTS8A.js} +3 -18
- package/dist/{CustomLink-BuvHLRaW.js.map → CustomLink-CKaoTS8A.js.map} +1 -1
- package/dist/hooks.js +39 -105
- package/dist/hooks.js.map +1 -1
- package/dist/{parse-DTNzQgVi.js → parse-C_80L3wX.js} +262 -248
- package/dist/parse-C_80L3wX.js.map +1 -0
- package/dist/shared/ui/customLink/CustomLink.d.ts +1 -2
- package/dist/shared/ui/formElements/controlled/index.d.ts +1 -0
- package/dist/shared/ui/formElements/editorControl/model/config.d.ts +1 -1
- package/dist/shared/ui/formElements/editorControl/ui/commands/index.d.ts +1 -1
- package/dist/shared/ui/formElements/editorControl/ui/commands/setCustomLink.d.ts +6 -0
- package/dist/shared/ui/formElements/uncontrolled/index.d.ts +1 -0
- package/dist/shared/ui/formElements/uncontrolled/select/Select.d.ts +15 -0
- package/dist/shared/ui/formElements/uncontrolled/select/hooks/useSelectController.d.ts +3 -1
- package/dist/shared/validation/messages.d.ts +1 -0
- package/dist/ui.js +5720 -5685
- package/dist/ui.js.map +1 -1
- package/dist/useDebounce-DyvGYvL9.js +1169 -0
- package/dist/useDebounce-DyvGYvL9.js.map +1 -0
- package/dist/validation.js +26 -37
- package/dist/validation.js.map +1 -1
- package/dist/widget.js +1 -1
- package/package.json +1 -2
- package/dist/parse-DTNzQgVi.js.map +0 -1
- package/dist/shared/ui/formElements/editorControl/ui/commands/SetLink.d.ts +0 -6
- package/dist/useDebounce-DSBzpBLy.js +0 -1106
- package/dist/useDebounce-DSBzpBLy.js.map +0 -1
|
@@ -4,7 +4,6 @@ import { TAllowedIcons } from '..';
|
|
|
4
4
|
declare const customLinkConfig: (props?: ({
|
|
5
5
|
intent?: "blue" | "white" | null | undefined;
|
|
6
6
|
withUnderline?: boolean | null | undefined;
|
|
7
|
-
withIcon?: boolean | null | undefined;
|
|
8
7
|
disabled?: boolean | null | undefined;
|
|
9
8
|
size?: "sm" | "md" | null | undefined;
|
|
10
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -17,5 +16,5 @@ export interface ICustomLinkProps extends TCustomLinkConfig, Omit<ComponentProps
|
|
|
17
16
|
icon?: TAllowedIcons;
|
|
18
17
|
classes?: TCustomLinkClasses;
|
|
19
18
|
}
|
|
20
|
-
export declare const CustomLink: ({ intent, children,
|
|
19
|
+
export declare const CustomLink: ({ intent, children, disabled, size, icon, classes, withUnderline, ...props }: ICustomLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export {};
|
|
@@ -50,6 +50,7 @@ export declare const Controlled: {
|
|
|
50
50
|
inputValue?: string;
|
|
51
51
|
attachmentProps?: import('../../../types').DeepPartial<import('../ui').IFieldAttachmentProps>;
|
|
52
52
|
filterDisabled?: boolean;
|
|
53
|
+
externalHandlers?: import('../uncontrolled/select/Select').ExternalHandlers;
|
|
53
54
|
} & {
|
|
54
55
|
control: import('react-hook-form').Control<TFieldValues>;
|
|
55
56
|
classes?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const editorConfig: (import('@tiptap/core').Extension<import('@tiptap/starter-kit').StarterKitOptions, any> | import('@tiptap/core').Mark<import('@tiptap/extension-underline').UnderlineOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extension-color').ColorOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-heading').HeadingOptions, any>)[];
|
|
1
|
+
export declare const editorConfig: (import('@tiptap/core').Extension<import('@tiptap/starter-kit').StarterKitOptions, any> | import('@tiptap/core').Mark<import('@tiptap/extension-underline').UnderlineOptions, any> | import('@tiptap/core').Extension<import('@tiptap/extension-color').ColorOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-heading').HeadingOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-hard-break').HardBreakOptions, any>)[];
|
|
@@ -45,6 +45,7 @@ export declare const Uncontrolled: {
|
|
|
45
45
|
inputValue?: string;
|
|
46
46
|
attachmentProps?: import('../../../types').DeepPartial<import('../ui').IFieldAttachmentProps>;
|
|
47
47
|
filterDisabled?: boolean;
|
|
48
|
+
externalHandlers?: import('./select/Select').ExternalHandlers;
|
|
48
49
|
} & import('react').RefAttributes<HTMLElement>>;
|
|
49
50
|
CheckboxBase: import('react').ForwardRefExoticComponent<import('@radix-ui/react-checkbox').CheckboxProps & {
|
|
50
51
|
classes?: {
|
|
@@ -8,6 +8,13 @@ export type SelectClasses = SelectItemProps['classes'] & {
|
|
|
8
8
|
root?: string;
|
|
9
9
|
list?: string;
|
|
10
10
|
};
|
|
11
|
+
export type ExternalHandlers = {
|
|
12
|
+
onChange?: (value?: SelectItemOption | SelectItemOption[]) => void;
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
14
|
+
onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
15
|
+
onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
16
|
+
onInputChange?: (value: string) => void;
|
|
17
|
+
};
|
|
11
18
|
export type SelectBaseProps<Multi extends boolean> = Omit<ComboboxProps<SelectItemOption, Multi, 'li'>, 'multiple' | 'onChange' | 'by' | 'virtual' | 'className'> & {
|
|
12
19
|
/**
|
|
13
20
|
* Отображаемый лейбл
|
|
@@ -57,6 +64,10 @@ export type SelectBaseProps<Multi extends boolean> = Omit<ComboboxProps<SelectIt
|
|
|
57
64
|
* Свойство для выключении фильтрации по поиску
|
|
58
65
|
*/
|
|
59
66
|
filterDisabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Внешние handlers которые можно прокинуть из вне
|
|
69
|
+
*/
|
|
70
|
+
externalHandlers?: ExternalHandlers;
|
|
60
71
|
};
|
|
61
72
|
export declare const SelectBase: import('react').ForwardRefExoticComponent<Omit<ComboboxProps<SelectItemOption, boolean, "li">, "onChange" | "className" | "multiple" | "by" | "virtual"> & {
|
|
62
73
|
/**
|
|
@@ -107,5 +118,9 @@ export declare const SelectBase: import('react').ForwardRefExoticComponent<Omit<
|
|
|
107
118
|
* Свойство для выключении фильтрации по поиску
|
|
108
119
|
*/
|
|
109
120
|
filterDisabled?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Внешние handlers которые можно прокинуть из вне
|
|
123
|
+
*/
|
|
124
|
+
externalHandlers?: ExternalHandlers;
|
|
110
125
|
} & import('react').RefAttributes<HTMLElement>>;
|
|
111
126
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SelectItemOption } from '../model';
|
|
2
|
+
import { ExternalHandlers } from '../Select';
|
|
2
3
|
type UseSelectControllerProps = {
|
|
3
4
|
options: SelectItemOption[];
|
|
4
5
|
isMulti?: boolean;
|
|
@@ -8,8 +9,9 @@ type UseSelectControllerProps = {
|
|
|
8
9
|
filterDisabled: boolean;
|
|
9
10
|
externalInputValue?: string;
|
|
10
11
|
externalOnInputChange?: (value: string) => void;
|
|
12
|
+
externalHandlers?: ExternalHandlers;
|
|
11
13
|
};
|
|
12
|
-
export declare const useSelectController: ({ options: initialOptions, displayValue, isSearchable, onChange, filterDisabled, externalInputValue, externalOnInputChange }: UseSelectControllerProps) => {
|
|
14
|
+
export declare const useSelectController: ({ options: initialOptions, displayValue, isSearchable, onChange, filterDisabled, externalInputValue, externalOnInputChange, externalHandlers }: UseSelectControllerProps) => {
|
|
13
15
|
options: SelectItemOption[];
|
|
14
16
|
inputValue: string;
|
|
15
17
|
onInputValueChange: import('react').ChangeEventHandler<HTMLInputElement>;
|
|
@@ -9,4 +9,5 @@ export declare const VALIDATION_MESSAGES: {
|
|
|
9
9
|
readonly INVALID_VALUE: "Поле заполнено некорректно";
|
|
10
10
|
readonly INVALID_DATE: "Введите корректную дату";
|
|
11
11
|
readonly FUTURE_DATE_NOT_ALLOWED: "Нельзя выбрать дату позже текущей";
|
|
12
|
+
readonly INVALID_URL: "Некорректная ссылка";
|
|
12
13
|
};
|