@uzum-tech/ui 1.5.2 → 1.5.3
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/README.md +0 -1
- package/dist/index.js +1030 -564
- package/dist/index.prod.js +3 -3
- package/es/_internal/checkbox/src/use-checkbox.js +3 -3
- package/es/_internal/radio/src/use-radio.js +3 -3
- package/es/_mixins/use-form-item.d.ts +4 -4
- package/es/_mixins/use-form-item.js +4 -4
- package/es/_styles/common/dark.js +1 -1
- package/es/_styles/common/light.d.ts +3 -0
- package/es/_styles/common/light.js +1 -1
- package/es/_utils/composable/composables.d.ts +11 -0
- package/es/_utils/composable/composables.js +40 -0
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.js +1 -1
- package/es/_utils/uzum/index.d.ts +1 -0
- package/es/_utils/uzum/index.js +1 -0
- package/es/_utils/uzum/value.d.ts +1 -0
- package/es/_utils/uzum/value.js +9 -0
- package/es/_utils/vue/resolve-slot.d.ts +1 -1
- package/es/alert/styles/light.js +6 -6
- package/es/auto-complete/src/AutoComplete.js +10 -10
- package/es/avatar/src/Avatar.d.ts +6 -0
- package/es/avatar/src/Avatar.js +9 -3
- package/es/card-list/src/CardList.js +1 -1
- package/es/card-list/src/CardListItem.d.ts +13 -0
- package/es/card-list/src/CardListItem.js +11 -4
- package/es/card-list/src/interface.d.ts +1 -0
- package/es/card-list/src/styles/index.cssr.js +6 -6
- package/es/card-list/styles/light.js +2 -2
- package/es/cascader/src/Cascader.js +7 -7
- package/es/checkbox/src/CheckboxGroup.js +9 -9
- package/es/color-picker/src/ColorPicker.js +6 -6
- package/es/components.d.ts +1 -0
- package/es/components.js +1 -0
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +5 -0
- package/es/data-table/src/DataTable.js +20 -10
- package/es/data-table/src/TableParts/Body.js +3 -2
- package/es/data-table/src/TableParts/Cell.js +85 -23
- package/es/data-table/src/interface.d.ts +11 -6
- package/es/data-table/src/styles/index.cssr.js +5 -3
- package/es/data-table/src/use-mask.d.ts +3 -6
- package/es/data-table/src/utils.d.ts +2 -1
- package/es/data-table/src/utils.js +13 -0
- package/es/date-picker/src/DatePicker.js +7 -7
- package/es/dialog/src/DialogProvider.d.ts +6 -0
- package/es/dynamic-tags/src/DynamicTags.js +3 -3
- package/es/input/src/Input.js +8 -8
- package/es/input-number/src/InputNumber.js +7 -7
- package/es/input-otp/index.d.ts +3 -0
- package/es/input-otp/index.js +1 -0
- package/es/input-otp/src/InputOtp.d.ts +871 -0
- package/es/input-otp/src/InputOtp.js +250 -0
- package/es/input-otp/src/public-types.d.ts +25 -0
- package/es/input-otp/src/public-types.js +1 -0
- package/es/input-otp/src/styles/index.cssr.d.ts +2 -0
- package/es/input-otp/src/styles/index.cssr.js +20 -0
- package/es/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
- package/es/input-otp/src/styles/input-otp-rtl.cssr.js +5 -0
- package/es/input-otp/styles/dark.d.ts +3 -0
- package/es/input-otp/styles/dark.js +12 -0
- package/es/input-otp/styles/index.d.ts +4 -0
- package/es/input-otp/styles/index.js +3 -0
- package/es/input-otp/styles/light.d.ts +83 -0
- package/es/input-otp/styles/light.js +22 -0
- package/es/input-otp/styles/rtl.d.ts +2 -0
- package/es/input-otp/styles/rtl.js +5 -0
- package/es/legacy-transfer/src/Transfer.js +3 -3
- package/es/list/src/ListItem.js +8 -4
- package/es/mention/src/Mention.js +7 -7
- package/es/radio/src/RadioGroup.js +5 -5
- package/es/rate/src/Rate.js +3 -3
- package/es/select/src/Select.js +7 -7
- package/es/slider/src/Slider.js +3 -3
- package/es/styles.d.ts +1 -0
- package/es/styles.js +1 -0
- package/es/switch/src/Switch.js +7 -7
- package/es/theme-editor/src/ThemeEditor.d.ts +3 -0
- package/es/themes/dark.js +2 -0
- package/es/themes/light.js +2 -0
- package/es/time-picker/src/TimePicker.js +7 -7
- package/es/transfer/src/Transfer.js +3 -3
- package/es/tree-select/src/TreeSelect.js +5 -5
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/checkbox/src/use-checkbox.js +3 -3
- package/lib/_internal/radio/src/use-radio.js +3 -3
- package/lib/_mixins/use-form-item.d.ts +4 -4
- package/lib/_mixins/use-form-item.js +4 -4
- package/lib/_styles/common/dark.js +1 -1
- package/lib/_styles/common/light.d.ts +3 -0
- package/lib/_styles/common/light.js +1 -1
- package/lib/_utils/composable/composables.d.ts +11 -0
- package/lib/_utils/composable/composables.js +47 -0
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +2 -1
- package/lib/_utils/uzum/index.d.ts +1 -0
- package/lib/_utils/uzum/index.js +3 -1
- package/lib/_utils/uzum/value.d.ts +1 -0
- package/lib/_utils/uzum/value.js +12 -0
- package/lib/_utils/vue/resolve-slot.d.ts +1 -1
- package/lib/alert/styles/light.js +6 -6
- package/lib/auto-complete/src/AutoComplete.js +10 -10
- package/lib/avatar/src/Avatar.d.ts +6 -0
- package/lib/avatar/src/Avatar.js +9 -3
- package/lib/card-list/src/CardList.js +1 -1
- package/lib/card-list/src/CardListItem.d.ts +13 -0
- package/lib/card-list/src/CardListItem.js +11 -4
- package/lib/card-list/src/interface.d.ts +1 -0
- package/lib/card-list/src/styles/index.cssr.js +5 -5
- package/lib/card-list/styles/light.js +2 -2
- package/lib/cascader/src/Cascader.js +7 -7
- package/lib/checkbox/src/CheckboxGroup.js +9 -9
- package/lib/color-picker/src/ColorPicker.js +6 -6
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +5 -0
- package/lib/data-table/src/DataTable.js +20 -10
- package/lib/data-table/src/TableParts/Body.js +3 -2
- package/lib/data-table/src/TableParts/Cell.js +84 -22
- package/lib/data-table/src/interface.d.ts +11 -6
- package/lib/data-table/src/styles/index.cssr.js +5 -3
- package/lib/data-table/src/use-mask.d.ts +3 -6
- package/lib/data-table/src/utils.d.ts +2 -1
- package/lib/data-table/src/utils.js +14 -1
- package/lib/date-picker/src/DatePicker.js +7 -7
- package/lib/dialog/src/DialogProvider.d.ts +6 -0
- package/lib/dynamic-tags/src/DynamicTags.js +3 -3
- package/lib/input/src/Input.js +8 -8
- package/lib/input-number/src/InputNumber.js +7 -7
- package/lib/input-otp/index.d.ts +3 -0
- package/lib/input-otp/index.js +9 -0
- package/lib/input-otp/src/InputOtp.d.ts +871 -0
- package/lib/input-otp/src/InputOtp.js +256 -0
- package/lib/input-otp/src/public-types.d.ts +25 -0
- package/lib/input-otp/src/public-types.js +2 -0
- package/lib/input-otp/src/styles/index.cssr.d.ts +2 -0
- package/lib/input-otp/src/styles/index.cssr.js +25 -0
- package/lib/input-otp/src/styles/input-otp-rtl.cssr.d.ts +2 -0
- package/lib/input-otp/src/styles/input-otp-rtl.cssr.js +10 -0
- package/lib/input-otp/styles/dark.d.ts +3 -0
- package/lib/input-otp/styles/dark.js +14 -0
- package/lib/input-otp/styles/index.d.ts +4 -0
- package/lib/input-otp/styles/index.js +12 -0
- package/lib/input-otp/styles/light.d.ts +83 -0
- package/lib/input-otp/styles/light.js +25 -0
- package/lib/input-otp/styles/rtl.d.ts +2 -0
- package/lib/input-otp/styles/rtl.js +11 -0
- package/lib/legacy-transfer/src/Transfer.js +3 -3
- package/lib/list/src/ListItem.js +8 -4
- package/lib/mention/src/Mention.js +7 -7
- package/lib/radio/src/RadioGroup.js +5 -5
- package/lib/rate/src/Rate.js +3 -3
- package/lib/select/src/Select.js +7 -7
- package/lib/slider/src/Slider.js +3 -3
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +106 -103
- package/lib/switch/src/Switch.js +7 -7
- package/lib/theme-editor/src/ThemeEditor.d.ts +3 -0
- package/lib/themes/dark.js +2 -0
- package/lib/themes/light.js +2 -0
- package/lib/time-picker/src/TimePicker.js +7 -7
- package/lib/transfer/src/Transfer.js +3 -3
- package/lib/tree-select/src/TreeSelect.js +5 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +1 -0
- package/web-types.json +119 -4
|
@@ -2913,6 +2913,10 @@ export interface CommonColumnInfo<T = InternalRowData> {
|
|
|
2913
2913
|
cellProps?: (rowData: T, rowIndex: number) => HTMLAttributes;
|
|
2914
2914
|
visible?: boolean;
|
|
2915
2915
|
}
|
|
2916
|
+
export interface TableColumnMaskObject {
|
|
2917
|
+
postProcess: (value: string) => string;
|
|
2918
|
+
}
|
|
2919
|
+
export type TableColumnMask = string | ((value: string) => string) | TableColumnMaskObject;
|
|
2916
2920
|
export type TableColumnTitle = string | ((column: TableBaseColumn) => VNodeChild);
|
|
2917
2921
|
export type TableExpandColumnTitle = string | ((column: TableExpandColumn) => VNodeChild);
|
|
2918
2922
|
export type TableColumnGroupTitle = string | ((column: TableColumnGroup) => VNodeChild);
|
|
@@ -2932,18 +2936,14 @@ export type TableBaseColumn<T = InternalRowData> = {
|
|
|
2932
2936
|
type?: never;
|
|
2933
2937
|
key: ColumnKey;
|
|
2934
2938
|
editable?: boolean;
|
|
2935
|
-
mask?:
|
|
2936
|
-
|
|
2937
|
-
};
|
|
2939
|
+
mask?: TableColumnMask;
|
|
2940
|
+
numeric?: boolean;
|
|
2938
2941
|
placeholder?: string;
|
|
2939
2942
|
totalRow?: {
|
|
2940
2943
|
type: 'sum' | 'default' | 'diff' | 'multiply' | 'divide' | 'percentage' | 'function';
|
|
2941
2944
|
value?: string;
|
|
2942
2945
|
fields?: string[];
|
|
2943
2946
|
function?: (values: number[]) => number;
|
|
2944
|
-
mask?: string | ((value: string) => string) | {
|
|
2945
|
-
postProcess: (value: string) => string;
|
|
2946
|
-
};
|
|
2947
2947
|
};
|
|
2948
2948
|
tree?: boolean;
|
|
2949
2949
|
sorter?: boolean | Sorter<T> | 'default';
|
|
@@ -3138,6 +3138,11 @@ export interface DataTableInst {
|
|
|
3138
3138
|
page: (page: number) => void;
|
|
3139
3139
|
sort: (columnKey: ColumnKey, order: SortOrder) => void;
|
|
3140
3140
|
scrollTo: ScrollTo;
|
|
3141
|
+
getData: () => {
|
|
3142
|
+
data: InternalRowData[];
|
|
3143
|
+
totalRows: InternalRowData | null;
|
|
3144
|
+
};
|
|
3145
|
+
getTotalRowData: () => InternalRowData | null;
|
|
3141
3146
|
/** @deprecated it but just leave it here, it does no harm */
|
|
3142
3147
|
clearFilter: () => void;
|
|
3143
3148
|
}
|
|
@@ -301,19 +301,21 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('data-table', `
|
|
|
301
301
|
`), (0, cssr_1.cM)('editable', `
|
|
302
302
|
cursor: pointer;
|
|
303
303
|
position: relative;
|
|
304
|
-
|
|
304
|
+
padding: 0;
|
|
305
305
|
.u-data-table-editable-input {
|
|
306
306
|
appearance: none;
|
|
307
307
|
text-align: right;
|
|
308
308
|
border: none;
|
|
309
309
|
background: none;
|
|
310
310
|
outline: none;
|
|
311
|
-
|
|
311
|
+
box-sizing: border-box;
|
|
312
|
+
padding: var(--u-td-padding);
|
|
312
313
|
margin: 0;
|
|
313
314
|
font: inherit;
|
|
314
315
|
color: inherit;
|
|
315
316
|
box-shadow: none;
|
|
316
|
-
|
|
317
|
+
height: 100%;
|
|
318
|
+
width: 100%;
|
|
317
319
|
}
|
|
318
320
|
`), fixedColumnStyle]), (0, cssr_1.cB)('data-table-empty', `
|
|
319
321
|
box-sizing: border-box;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
+
import { TableColumnMask } from './interface';
|
|
1
2
|
export declare function applyMask(value: string, mask: string): string;
|
|
2
|
-
export declare function processMaskedValue(value: string | number, mask:
|
|
3
|
-
|
|
4
|
-
}): string;
|
|
5
|
-
export declare function processInputWithMask(value: string, mask: string | ((value: string) => string) | {
|
|
6
|
-
postProcess: (value: string) => string;
|
|
7
|
-
}): {
|
|
3
|
+
export declare function processMaskedValue(value: string | number, mask: TableColumnMask): string;
|
|
4
|
+
export declare function processInputWithMask(value: string, mask: TableColumnMask): {
|
|
8
5
|
processedValue: string | number;
|
|
9
6
|
displayValue: string;
|
|
10
7
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { CSSProperties } from 'vue';
|
|
2
|
-
import type { SortOrder, TableBaseColumn, InternalRowData, SortOrderFlag, SortState, CreateRowClassName, TableSelectionColumn, TableColumn, TableExpandColumn } from './interface';
|
|
2
|
+
import type { SortOrder, TableBaseColumn, InternalRowData, SortOrderFlag, SortState, CreateRowClassName, TableSelectionColumn, TableColumn, TableExpandColumn, TableColumnMaskObject } from './interface';
|
|
3
3
|
export declare const SELECTION_COL_WIDTH = 40;
|
|
4
4
|
export declare const EXPAND_COL_WIDTH = 40;
|
|
5
5
|
export declare const REGEX: {
|
|
6
6
|
ONLY_DIGITS: RegExp;
|
|
7
7
|
ONLY_NUMERIC_AND_DOT: RegExp;
|
|
8
8
|
};
|
|
9
|
+
export declare const defaultNumericMask: TableColumnMaskObject;
|
|
9
10
|
export declare function getNumberColWidth(col: TableColumn): number | undefined;
|
|
10
11
|
export declare function getStringColWidth(col: TableColumn): string | undefined;
|
|
11
12
|
export declare function getColKey(col: TableColumn): string | number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REGEX = exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
|
|
3
|
+
exports.defaultNumericMask = exports.REGEX = exports.EXPAND_COL_WIDTH = exports.SELECTION_COL_WIDTH = void 0;
|
|
4
4
|
exports.getNumberColWidth = getNumberColWidth;
|
|
5
5
|
exports.getStringColWidth = getStringColWidth;
|
|
6
6
|
exports.getColKey = getColKey;
|
|
@@ -23,6 +23,19 @@ exports.REGEX = {
|
|
|
23
23
|
ONLY_DIGITS: /\D/g,
|
|
24
24
|
ONLY_NUMERIC_AND_DOT: /[^\d.]/g
|
|
25
25
|
};
|
|
26
|
+
exports.defaultNumericMask = {
|
|
27
|
+
postProcess: (value) => {
|
|
28
|
+
if (!value)
|
|
29
|
+
return '';
|
|
30
|
+
const isNegative = value.trim().startsWith('-');
|
|
31
|
+
const cleaned = value.replace(/[^\d.]/g, '');
|
|
32
|
+
const [intPartRaw, decimalPartRaw = ''] = cleaned.split('.', 2);
|
|
33
|
+
const intPart = intPartRaw.replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
|
34
|
+
const decimalPart = decimalPartRaw.slice(0, 2);
|
|
35
|
+
const result = cleaned.includes('.') ? `${intPart}.${decimalPart}` : intPart;
|
|
36
|
+
return isNegative ? `-${result}` : result;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
26
39
|
function getNumberColWidth(col) {
|
|
27
40
|
if (col.type === 'selection') {
|
|
28
41
|
return col.width === undefined ? exports.SELECTION_COL_WIDTH : (0, seemly_1.depx)(col.width);
|
|
@@ -287,7 +287,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onChange } = props;
|
|
290
|
-
const {
|
|
290
|
+
const { triggerFormChange, triggerFormInput } = formItem;
|
|
291
291
|
const formattedValue = getFormattedValue(value);
|
|
292
292
|
if (options.doConfirm) {
|
|
293
293
|
doConfirm(value, formattedValue);
|
|
@@ -302,8 +302,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
302
302
|
(0, _utils_1.call)(onChange, value, formattedValue);
|
|
303
303
|
uncontrolledValueRef.value = value;
|
|
304
304
|
doUpdateFormattedValue(formattedValue, value);
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
triggerFormChange();
|
|
306
|
+
triggerFormInput();
|
|
307
307
|
}
|
|
308
308
|
function doClear() {
|
|
309
309
|
const { onClear } = props;
|
|
@@ -316,17 +316,17 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
316
316
|
}
|
|
317
317
|
function doFocus(e) {
|
|
318
318
|
const { onFocus } = props;
|
|
319
|
-
const {
|
|
319
|
+
const { triggerFormFocus } = formItem;
|
|
320
320
|
if (onFocus)
|
|
321
321
|
(0, _utils_1.call)(onFocus, e);
|
|
322
|
-
|
|
322
|
+
triggerFormFocus();
|
|
323
323
|
}
|
|
324
324
|
function doBlur(e) {
|
|
325
325
|
const { onBlur } = props;
|
|
326
|
-
const {
|
|
326
|
+
const { triggerFormBlur } = formItem;
|
|
327
327
|
if (onBlur)
|
|
328
328
|
(0, _utils_1.call)(onBlur, e);
|
|
329
|
-
|
|
329
|
+
triggerFormBlur();
|
|
330
330
|
}
|
|
331
331
|
function doUpdateShow(show) {
|
|
332
332
|
const { 'onUpdate:show': _onUpdateShow, onUpdateShow } = props;
|
|
@@ -283,6 +283,9 @@ export declare const UDialogProvider: import("vue").DefineComponent<{
|
|
|
283
283
|
scrollbarHeight: string;
|
|
284
284
|
scrollbarBorderRadius: string;
|
|
285
285
|
opacityDisabled: string;
|
|
286
|
+
brand150: string;
|
|
287
|
+
brand350: string;
|
|
288
|
+
brand550: string;
|
|
286
289
|
brandPrimary50: string;
|
|
287
290
|
brandPrimary100: string;
|
|
288
291
|
brandPrimary200: string;
|
|
@@ -639,6 +642,9 @@ export declare const UDialogProvider: import("vue").DefineComponent<{
|
|
|
639
642
|
scrollbarHeight: string;
|
|
640
643
|
scrollbarBorderRadius: string;
|
|
641
644
|
opacityDisabled: string;
|
|
645
|
+
brand150: string;
|
|
646
|
+
brand350: string;
|
|
647
|
+
brand550: string;
|
|
642
648
|
brandPrimary50: string;
|
|
643
649
|
brandPrimary100: string;
|
|
644
650
|
brandPrimary200: string;
|
|
@@ -67,7 +67,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
67
67
|
});
|
|
68
68
|
function doChange(value) {
|
|
69
69
|
const { onChange, 'onUpdate:value': _onUpdateValue, onUpdateValue } = props;
|
|
70
|
-
const {
|
|
70
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
71
71
|
if (onChange)
|
|
72
72
|
(0, _utils_1.call)(onChange, value);
|
|
73
73
|
if (onUpdateValue)
|
|
@@ -75,8 +75,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
75
75
|
if (_onUpdateValue)
|
|
76
76
|
(0, _utils_1.call)(_onUpdateValue, value);
|
|
77
77
|
uncontrolledValueRef.value = value;
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
triggerFormInput();
|
|
79
|
+
triggerFormChange();
|
|
80
80
|
}
|
|
81
81
|
function handleCloseClick(index) {
|
|
82
82
|
const tags = mergedValueRef.value.slice(0);
|
package/lib/input/src/Input.js
CHANGED
|
@@ -273,7 +273,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
273
273
|
const vm = (0, vue_1.getCurrentInstance)().proxy;
|
|
274
274
|
function doUpdateValue(value) {
|
|
275
275
|
const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onInput } = props;
|
|
276
|
-
const {
|
|
276
|
+
const { triggerFormInput } = formItem;
|
|
277
277
|
if (onUpdateValue)
|
|
278
278
|
(0, _utils_1.call)(onUpdateValue, value);
|
|
279
279
|
if (_onUpdateValue)
|
|
@@ -281,30 +281,30 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
281
281
|
if (onInput)
|
|
282
282
|
(0, _utils_1.call)(onInput, value);
|
|
283
283
|
uncontrolledValueRef.value = value;
|
|
284
|
-
|
|
284
|
+
triggerFormInput();
|
|
285
285
|
emitDebouncedInput(value);
|
|
286
286
|
}
|
|
287
287
|
function doChange(value) {
|
|
288
288
|
const { onChange } = props;
|
|
289
|
-
const {
|
|
289
|
+
const { triggerFormChange } = formItem;
|
|
290
290
|
if (onChange)
|
|
291
291
|
(0, _utils_1.call)(onChange, value);
|
|
292
292
|
uncontrolledValueRef.value = value;
|
|
293
|
-
|
|
293
|
+
triggerFormChange();
|
|
294
294
|
}
|
|
295
295
|
function doBlur(e) {
|
|
296
296
|
const { onBlur } = props;
|
|
297
|
-
const {
|
|
297
|
+
const { triggerFormBlur } = formItem;
|
|
298
298
|
if (onBlur)
|
|
299
299
|
(0, _utils_1.call)(onBlur, e);
|
|
300
|
-
|
|
300
|
+
triggerFormBlur();
|
|
301
301
|
}
|
|
302
302
|
function doFocus(e) {
|
|
303
303
|
const { onFocus } = props;
|
|
304
|
-
const {
|
|
304
|
+
const { triggerFormFocus } = formItem;
|
|
305
305
|
if (onFocus)
|
|
306
306
|
(0, _utils_1.call)(onFocus, e);
|
|
307
|
-
|
|
307
|
+
triggerFormFocus();
|
|
308
308
|
}
|
|
309
309
|
function doClear(e) {
|
|
310
310
|
const { onClear } = props;
|
|
@@ -120,7 +120,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onChange } = props;
|
|
123
|
-
const {
|
|
123
|
+
const { triggerFormInput, triggerFormChange } = formItem;
|
|
124
124
|
if (onChange)
|
|
125
125
|
(0, _utils_1.call)(onChange, value);
|
|
126
126
|
if (onUpdateValue)
|
|
@@ -128,8 +128,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
128
128
|
if (_onUpdateValue)
|
|
129
129
|
(0, _utils_1.call)(_onUpdateValue, value);
|
|
130
130
|
uncontrolledValueRef.value = value;
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
triggerFormInput();
|
|
132
|
+
triggerFormChange();
|
|
133
133
|
};
|
|
134
134
|
const deriveValueFromDisplayedValue = ({ offset, doUpdateIfValid, fixPrecision, isInputing }) => {
|
|
135
135
|
const { value: displayedValue } = displayedValueRef;
|
|
@@ -240,10 +240,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
240
240
|
});
|
|
241
241
|
function doFocus(e) {
|
|
242
242
|
const { onFocus } = props;
|
|
243
|
-
const {
|
|
243
|
+
const { triggerFormFocus } = formItem;
|
|
244
244
|
if (onFocus)
|
|
245
245
|
(0, _utils_1.call)(onFocus, e);
|
|
246
|
-
|
|
246
|
+
triggerFormFocus();
|
|
247
247
|
}
|
|
248
248
|
function doBlur(e) {
|
|
249
249
|
var _a, _b;
|
|
@@ -278,10 +278,10 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
278
278
|
deriveDisplayedValueFromValue();
|
|
279
279
|
}
|
|
280
280
|
const { onBlur } = props;
|
|
281
|
-
const {
|
|
281
|
+
const { triggerFormBlur } = formItem;
|
|
282
282
|
if (onBlur)
|
|
283
283
|
(0, _utils_1.call)(onBlur, e);
|
|
284
|
-
|
|
284
|
+
triggerFormBlur();
|
|
285
285
|
// User may change value in blur callback, we make sure it will be
|
|
286
286
|
// displayed. Sometimes mergedValue won't be viewed as changed
|
|
287
287
|
void (0, vue_1.nextTick)(() => {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UInputOtp = exports.inputOtpProps = void 0;
|
|
7
|
+
var InputOtp_1 = require("./src/InputOtp");
|
|
8
|
+
Object.defineProperty(exports, "inputOtpProps", { enumerable: true, get: function () { return InputOtp_1.inputOtpProps; } });
|
|
9
|
+
Object.defineProperty(exports, "UInputOtp", { enumerable: true, get: function () { return __importDefault(InputOtp_1).default; } });
|