@opentiny/vue-renderless 3.14.0 → 3.15.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/LICENSE +22 -0
- package/action-menu/index.js +44 -0
- package/action-menu/vue.js +25 -8
- package/calendar-view/index.js +21 -13
- package/calendar-view/vue.js +6 -3
- package/cascader/index.js +1 -1
- package/cascader-select/index.js +5 -0
- package/cascader-select/vue.js +3 -1
- package/common/bigInt.js +2 -2
- package/common/deps/date-util.js +4 -2
- package/common/deps/vue-popper.js +22 -2
- package/common/index.js +15 -2
- package/common/runtime.js +1 -1
- package/date-range/vue.js +1 -0
- package/date-table/index.js +30 -53
- package/date-table/vue.js +1 -1
- package/dept/index.js +8 -1
- package/dept/vue.js +10 -1
- package/dialog-box/index.js +12 -6
- package/dialog-box/vue.js +1 -1
- package/dropdown-item/mf.js +2 -2
- package/file-upload/index.js +0 -1
- package/grid/utils/dom.js +30 -10
- package/image/index.js +4 -0
- package/image/vue.js +6 -3
- package/image-viewer/vue.js +3 -1
- package/input/index.js +6 -1
- package/input/vue.js +9 -5
- package/modal/index.js +1 -1
- package/numeric/index.js +9 -20
- package/numeric/vue.js +3 -12
- package/option-group/index.js +13 -0
- package/option-group/vue.js +19 -6
- package/package.json +7 -7
- package/picker/index.js +218 -193
- package/picker/vue.js +7 -4
- package/popconfirm/index.js +6 -0
- package/popconfirm/vue.js +11 -3
- package/popeditor/index.js +2 -2
- package/popover/index.js +4 -1
- package/popover/vue.js +2 -1
- package/quarter-panel/index.js +61 -0
- package/quarter-panel/vue.js +46 -0
- package/select/index.js +111 -55
- package/select/vue.js +53 -19
- package/skeleton/vue.js +2 -2
- package/skeleton-item/vue.js +1 -1
- package/statistic/index.js +22 -0
- package/statistic/vue.js +20 -0
- package/tabs/index.js +16 -1
- package/tall-storage/index.js +1 -1
- package/time-picker-mobile/index.js +10 -1
- package/time-picker-mobile/vue.js +5 -3
- package/time-spinner/index.js +52 -1
- package/time-spinner/vue.js +4 -2
- package/timeline-item/index.js +14 -1
- package/timeline-item/vue.js +7 -4
- package/tree/index.js +8 -4
- package/tree/vue.js +3 -3
- package/tree-node/index.js +2 -2
- package/types/action-menu.type.d.ts +40 -12
- package/types/action-sheet.type.d.ts +2 -2
- package/types/alert.type.d.ts +1 -1
- package/types/checkbox.type.d.ts +3 -3
- package/types/collapse.type.d.ts +1 -1
- package/types/date-table.type.d.ts +13 -0
- package/types/dialog-box.type.d.ts +1 -1
- package/types/drawer.type.d.ts +1 -1
- package/types/{dropdown-item.type-8475a549.d.ts → dropdown-item.type-678794c9.d.ts} +4 -0
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-222799ae.d.ts → form.type-8e30b25c.d.ts} +2 -1
- package/types/form.type.d.ts +1 -1
- package/types/image.type.d.ts +4 -0
- package/types/input.type.d.ts +3 -1
- package/types/milestone.type.d.ts +1 -1
- package/types/numeric.type.d.ts +4 -5
- package/types/pager.type.d.ts +1 -1
- package/types/popconfirm.type.d.ts +8 -0
- package/types/popeditor.type.d.ts +1 -1
- package/types/popover.type.d.ts +3 -3
- package/types/progress.type.d.ts +1 -1
- package/types/skeleton.type.d.ts +1 -1
- package/types/statistic.type.d.ts +56 -0
- package/types/steps.type.d.ts +1 -1
- package/types/switch.type.d.ts +3 -3
- package/types/tag.type.d.ts +4 -1
- package/types/{time-line.type-b155cb4f.d.ts → time-line.type-1b501c41.d.ts} +7 -0
- package/types/time-line.type.d.ts +1 -1
- package/types/timeline-item.type.d.ts +1 -1
- package/types/transfer.type.d.ts +3 -3
- package/types/upload-dragger.type.d.ts +2 -2
- package/types/{upload-list.type-a29aea50.d.ts → upload-list.type-f34997c8.d.ts} +9 -5
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/user/index.js +1 -1
- package/credit-card/index.js +0 -93
- package/credit-card/vue.js +0 -62
- package/credit-card-form/index.js +0 -112
- package/credit-card-form/vue.js +0 -119
- package/detail-page/index.js +0 -79
- package/detail-page/vue.js +0 -78
- package/slide-bar/index.js +0 -67
- package/slide-bar/vue.js +0 -32
package/types/input.type.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ declare const $constants: {
|
|
|
19
19
|
FormItem: string;
|
|
20
20
|
};
|
|
21
21
|
MASKSYMBOL: string;
|
|
22
|
+
TEXTAREA_HEIGHT_MOBILE: number;
|
|
22
23
|
};
|
|
23
24
|
declare const inputProps: {
|
|
24
25
|
_constants: {
|
|
@@ -40,6 +41,7 @@ declare const inputProps: {
|
|
|
40
41
|
FormItem: string;
|
|
41
42
|
};
|
|
42
43
|
MASKSYMBOL: string;
|
|
44
|
+
TEXTAREA_HEIGHT_MOBILE: number;
|
|
43
45
|
};
|
|
44
46
|
};
|
|
45
47
|
name: StringConstructor;
|
|
@@ -231,7 +233,7 @@ declare const calculateNodeStyling: () => (targetElement: HTMLElement) => {
|
|
|
231
233
|
borderSize: number;
|
|
232
234
|
boxSizing: string;
|
|
233
235
|
};
|
|
234
|
-
declare const calcTextareaHeight: ({ api, hiddenTextarea, props, state }: Pick<IInputRenderlessParams, "state" | "api" | "
|
|
236
|
+
declare const calcTextareaHeight: ({ api, hiddenTextarea, props, state, mode, constants }: Pick<IInputRenderlessParams, "mode" | "props" | "state" | "api" | "constants"> & {
|
|
235
237
|
hiddenTextarea: HTMLTextAreaElement | null;
|
|
236
238
|
}) => (targetElement: HTMLTextAreaElement, minRows?: number, maxRows?: null) => {
|
|
237
239
|
minHeight?: string | undefined;
|
package/types/numeric.type.d.ts
CHANGED
|
@@ -58,6 +58,9 @@ declare const numericProps: {
|
|
|
58
58
|
type: BooleanConstructor;
|
|
59
59
|
default: boolean;
|
|
60
60
|
};
|
|
61
|
+
emptyValue: {
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
61
64
|
circulate: BooleanConstructor;
|
|
62
65
|
controls: {
|
|
63
66
|
type: BooleanConstructor;
|
|
@@ -189,7 +192,7 @@ declare const initService: (service: INumericRenderlessParamUtils['service']) =>
|
|
|
189
192
|
getNumberFormat: Function;
|
|
190
193
|
};
|
|
191
194
|
declare const getDecimal: (props: INumericProps) => (value: number) => BigIntDecimal;
|
|
192
|
-
declare const watchValue: ({ api, props, state
|
|
195
|
+
declare const watchValue: ({ api, props, state }: Pick<INumericRenderlessParams, 'api' | 'state' | 'props'>) => (value: number) => void;
|
|
193
196
|
declare const toPrecision: (state: INumericState) => ({ num, precision }: {
|
|
194
197
|
num: number;
|
|
195
198
|
precision: number;
|
|
@@ -218,8 +221,6 @@ declare const updated: ({ constants, parent, state }: Pick<INumericRenderlessPar
|
|
|
218
221
|
declare const displayValue: ({ props, state, api }: Pick<INumericRenderlessParams, 'props' | 'state' | 'api'>) => () => string | number;
|
|
219
222
|
declare const getNumPecision: ({ api, props }: Pick<INumericRenderlessParams, 'api' | 'props'>) => () => number;
|
|
220
223
|
declare const mouseEvent: ({ api, props, state }: Pick<INumericRenderlessParams, 'api' | 'props' | 'state'>) => (event: MouseEvent) => void | boolean;
|
|
221
|
-
declare const dispatchDisplayedValue: ({ state, api, dispatch }: Pick<INumericRenderlessParams, 'state' | 'api' | 'dispatch'>) => () => void;
|
|
222
|
-
declare const getDisplayedValue: ({ state, props }: Pick<INumericRenderlessParams, 'state' | 'props'>) => () => string;
|
|
223
224
|
declare const getDisplayOnlyText: ({ parent, state, props }: Pick<INumericRenderlessParams, 'parent' | 'state' | 'props'>) => () => string | number;
|
|
224
225
|
declare const filterValue: ({ state }: Pick<INumericRenderlessParams, 'state'>) => () => number | string;
|
|
225
226
|
declare const handleClear: ({ state, emit }: Pick<INumericRenderlessParams, 'state' | 'emit'>) => () => void;
|
|
@@ -269,8 +270,6 @@ interface INumericApi {
|
|
|
269
270
|
handleBlur: ReturnType<typeof handleBlur>;
|
|
270
271
|
watchValue: ReturnType<typeof watchValue>;
|
|
271
272
|
setCurrentValue: ReturnType<typeof setCurrentValue>;
|
|
272
|
-
dispatchDisplayedValue: ReturnType<typeof dispatchDisplayedValue>;
|
|
273
|
-
getDisplayedValue: ReturnType<typeof getDisplayedValue>;
|
|
274
273
|
getDisplayOnlyText: ReturnType<typeof getDisplayOnlyText>;
|
|
275
274
|
filterValue: ReturnType<typeof filterValue>;
|
|
276
275
|
handleClear: ReturnType<typeof handleClear>;
|
package/types/pager.type.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ declare const popConfirmProps: {
|
|
|
41
41
|
type: BooleanConstructor;
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
|
+
closeOnClickOutside: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
44
48
|
title: StringConstructor;
|
|
45
49
|
placement: {
|
|
46
50
|
type: StringConstructor;
|
|
@@ -50,6 +54,10 @@ declare const popConfirmProps: {
|
|
|
50
54
|
type: (StringConstructor | ObjectConstructor)[];
|
|
51
55
|
reference: {};
|
|
52
56
|
events: ObjectConstructor;
|
|
57
|
+
popperAppendToBody: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
53
61
|
tiny_mode: StringConstructor;
|
|
54
62
|
tiny_mode_root: BooleanConstructor;
|
|
55
63
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
package/types/popover.type.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ declare const popoverProps: {
|
|
|
67
67
|
maxHeight: {
|
|
68
68
|
type: (StringConstructor | NumberConstructor)[];
|
|
69
69
|
};
|
|
70
|
-
listData: (
|
|
70
|
+
listData: (ObjectConstructor | ArrayConstructor)[];
|
|
71
71
|
genArrowByHtml: {
|
|
72
72
|
type: BooleanConstructor;
|
|
73
73
|
default: () => boolean;
|
|
@@ -92,7 +92,7 @@ declare const popoverProps: {
|
|
|
92
92
|
*
|
|
93
93
|
*/
|
|
94
94
|
|
|
95
|
-
declare const mounted: ({ api, state, constants, props, nextTick, mode }: Pick<IPopoverRenderlessParams, "
|
|
95
|
+
declare const mounted: ({ api, state, constants, props, nextTick, mode }: Pick<IPopoverRenderlessParams, "mode" | "props" | "state" | "api" | "nextTick"> & {
|
|
96
96
|
constants: {
|
|
97
97
|
IDPREFIX: string;
|
|
98
98
|
};
|
|
@@ -106,7 +106,7 @@ declare const handleBlur: ({ props, state }: Pick<IPopoverRenderlessParams, 'sta
|
|
|
106
106
|
declare const handleMouseEnter: ({ props, state }: Pick<IPopoverRenderlessParams, 'state' | 'props'>) => () => void;
|
|
107
107
|
declare const handleKeydown: ({ api, props }: Pick<IPopoverRenderlessParams, 'api' | 'props'>) => (event: KeyboardEvent) => void;
|
|
108
108
|
declare const handleMouseLeave: ({ props, state }: Pick<IPopoverRenderlessParams, 'state' | 'props'>) => () => void;
|
|
109
|
-
declare const handleDocumentClick: ({ vm, state }: Pick<IPopoverRenderlessParams, 'state' | 'vm'>) => (event: MouseEvent) =>
|
|
109
|
+
declare const handleDocumentClick: ({ vm, state }: Pick<IPopoverRenderlessParams, 'state' | 'vm'>) => (event: MouseEvent) => boolean;
|
|
110
110
|
declare const handleAfterEnter: (emit: IPopoverRenderlessParams['emit']) => () => void;
|
|
111
111
|
declare const handleAfterLeave: (emit: IPopoverRenderlessParams['emit']) => () => void;
|
|
112
112
|
/** mobile.vue中,给listData项的点击事件 */
|
package/types/progress.type.d.ts
CHANGED
package/types/skeleton.type.d.ts
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { PropType } from '@opentiny/vue-common';
|
|
3
|
+
import { ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
4
|
+
|
|
5
|
+
declare const $constants: {
|
|
6
|
+
PREFIX: string;
|
|
7
|
+
};
|
|
8
|
+
declare const statisticProps: {
|
|
9
|
+
_constants: {
|
|
10
|
+
type: ObjectConstructor;
|
|
11
|
+
default: () => {
|
|
12
|
+
PREFIX: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
precision: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
formatter: FunctionConstructor;
|
|
20
|
+
value: {
|
|
21
|
+
type: PropType<number | object>;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
prefix: StringConstructor;
|
|
25
|
+
suffix: StringConstructor;
|
|
26
|
+
title: (StringConstructor | ObjectConstructor)[];
|
|
27
|
+
valueStyle: {
|
|
28
|
+
type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
29
|
+
};
|
|
30
|
+
groupSeparator: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
tiny_mode: StringConstructor;
|
|
35
|
+
tiny_mode_root: BooleanConstructor;
|
|
36
|
+
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
37
|
+
tiny_renderless: FunctionConstructor;
|
|
38
|
+
tiny_theme: StringConstructor;
|
|
39
|
+
tiny_chart_theme: ObjectConstructor;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type IStatisticProps = ExtractPropTypes<typeof statisticProps>;
|
|
43
|
+
type IStatisticConstants = typeof $constants;
|
|
44
|
+
interface IStatisticState {
|
|
45
|
+
getIntegerAndDecimal: number | string;
|
|
46
|
+
}
|
|
47
|
+
interface IStatisticApi {
|
|
48
|
+
getIntegerAndDecimal: (value: string | number) => string | undefined;
|
|
49
|
+
}
|
|
50
|
+
type IStatisticPcRenderlessParams = ISharedRenderlessFunctionParams<never> & {
|
|
51
|
+
state: IStatisticState;
|
|
52
|
+
props: IStatisticProps;
|
|
53
|
+
api: IStatisticApi;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { IStatisticApi, IStatisticConstants, IStatisticPcRenderlessParams, IStatisticProps, IStatisticState };
|
package/types/steps.type.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const stepsProps: {
|
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
|
-
data: (
|
|
17
|
+
data: (ObjectConstructor | ArrayConstructor)[];
|
|
18
18
|
space: (StringConstructor | NumberConstructor)[];
|
|
19
19
|
active: {
|
|
20
20
|
type: NumberConstructor;
|
package/types/switch.type.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const switchProps: {
|
|
|
30
30
|
};
|
|
31
31
|
falseColor: StringConstructor;
|
|
32
32
|
falseValue: {
|
|
33
|
-
type: (
|
|
33
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
36
|
mini: {
|
|
@@ -38,7 +38,7 @@ declare const switchProps: {
|
|
|
38
38
|
default: boolean;
|
|
39
39
|
};
|
|
40
40
|
modelValue: {
|
|
41
|
-
type: (
|
|
41
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
44
|
size: (StringConstructor | NumberConstructor)[];
|
|
@@ -48,7 +48,7 @@ declare const switchProps: {
|
|
|
48
48
|
};
|
|
49
49
|
trueColor: StringConstructor;
|
|
50
50
|
trueValue: {
|
|
51
|
-
type: (
|
|
51
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
beforeChange: FunctionConstructor;
|
package/types/tag.type.d.ts
CHANGED
|
@@ -7,7 +7,10 @@ declare const tagProps: {
|
|
|
7
7
|
type: StringConstructor;
|
|
8
8
|
theme: StringConstructor;
|
|
9
9
|
size: StringConstructor;
|
|
10
|
-
color:
|
|
10
|
+
color: {
|
|
11
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
11
14
|
closable: BooleanConstructor;
|
|
12
15
|
operable: BooleanConstructor;
|
|
13
16
|
disabled: BooleanConstructor;
|
|
@@ -164,6 +164,10 @@ declare const timelineItemProps: {
|
|
|
164
164
|
type: (StringConstructor | NumberConstructor)[];
|
|
165
165
|
default: string;
|
|
166
166
|
};
|
|
167
|
+
autoColorField: {
|
|
168
|
+
type: StringConstructor;
|
|
169
|
+
default: string;
|
|
170
|
+
};
|
|
167
171
|
tiny_mode: StringConstructor;
|
|
168
172
|
tiny_mode_root: BooleanConstructor;
|
|
169
173
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -195,6 +199,7 @@ declare const getStatusCls: ({ constants, state }: Pick<ITimelineItemRenderlessP
|
|
|
195
199
|
declare const computedCurrent: ({ state, api }: Pick<ITimelineItemRenderlessParams, 'state' | 'api'>) => () => number;
|
|
196
200
|
declare const computedIsReverse: (api: ITimelineItemApi) => () => boolean;
|
|
197
201
|
declare const computedItemCls: ({ props, api, state }: Pick<ITimelineItemRenderlessParams, 'props' | 'api' | 'state'>) => () => ITimelineCustomCls;
|
|
202
|
+
declare const computedIconClass: ({ props, api }: Pick<ITimelineItemRenderlessParams, 'props' | 'api'>) => () => Array<string | Object>;
|
|
198
203
|
declare const computedItemStyle: ({ props, state, api }: Pick<ITimelineItemRenderlessParams, 'props' | 'state' | 'api'>) => () => {
|
|
199
204
|
width?: string | number;
|
|
200
205
|
height?: string | number;
|
|
@@ -227,6 +232,7 @@ interface ITimelineItemState {
|
|
|
227
232
|
[key: string]: string | number;
|
|
228
233
|
} | null;
|
|
229
234
|
computedLineWidth: string;
|
|
235
|
+
iconClass: ITimelineCustomCls;
|
|
230
236
|
}
|
|
231
237
|
interface ITimelineItemApi {
|
|
232
238
|
state: ITimelineItemState;
|
|
@@ -240,6 +246,7 @@ interface ITimelineItemApi {
|
|
|
240
246
|
getStatus: ReturnType<typeof getStatus>;
|
|
241
247
|
handleClick: ReturnType<typeof handleClick>;
|
|
242
248
|
getStatusCls: ReturnType<typeof getStatusCls>;
|
|
249
|
+
computedIconClass: ReturnType<typeof computedIconClass>;
|
|
243
250
|
}
|
|
244
251
|
type ITimelineItemRenderlessParams = ISharedRenderlessFunctionParams<ITimelineItemConstants> & {
|
|
245
252
|
api: ITimelineItemApi;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { l as ITimelineApi, i as ITimelineConstants, o as ITimelineCustomCls, h as ITimelineProps, j as ITimelineRenderlessParamUtils, m as ITimelineRenderlessParams, k as ITimelineState, n as ITimelineStatusCls } from './time-line.type-
|
|
2
|
+
export { l as ITimelineApi, i as ITimelineConstants, o as ITimelineCustomCls, h as ITimelineProps, j as ITimelineRenderlessParamUtils, m as ITimelineRenderlessParams, k as ITimelineState, n as ITimelineStatusCls } from './time-line.type-1b501c41.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import '@opentiny/vue-common';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { g as ITimelineInject, f as ITimelineItem, d as ITimelineItemApi, a as ITimelineItemConstants, I as ITimelineItemProps, b as ITimelineItemRenderlessParamUtils, e as ITimelineItemRenderlessParams, c as ITimelineItemState, T as TimelineItemType } from './time-line.type-
|
|
2
|
+
export { g as ITimelineInject, f as ITimelineItem, d as ITimelineItemApi, a as ITimelineItemConstants, I as ITimelineItemProps, b as ITimelineItemRenderlessParamUtils, e as ITimelineItemRenderlessParams, c as ITimelineItemState, T as TimelineItemType } from './time-line.type-1b501c41.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import '@opentiny/vue-common';
|
package/types/transfer.type.d.ts
CHANGED
|
@@ -108,14 +108,14 @@ declare const getSourceData: ({ props, Tree }: Pick<ITransferRenderlessParams, "
|
|
|
108
108
|
Tree: string;
|
|
109
109
|
}) => () => unknown[];
|
|
110
110
|
/** 返回右边的数据项 */
|
|
111
|
-
declare const getTargetData: ({ props, state, Tree, Table }: Pick<ITransferRenderlessParams, "
|
|
111
|
+
declare const getTargetData: ({ props, state, Tree, Table }: Pick<ITransferRenderlessParams, "props" | "state"> & {
|
|
112
112
|
Tree: string;
|
|
113
113
|
Table: string;
|
|
114
114
|
}) => () => unknown;
|
|
115
115
|
declare const onSourceCheckedChange: ({ emit, state }: Pick<ITransferRenderlessParams, 'emit' | 'state'>) => (val: string[], movedKeys: string[]) => void;
|
|
116
116
|
declare const onTargetCheckedChange: ({ emit, state }: Pick<ITransferRenderlessParams, 'emit' | 'state'>) => (val: string[], movedKeys: string[]) => void;
|
|
117
117
|
declare const addToLeft: ({ emit, props, state }: Pick<ITransferRenderlessParams, 'emit' | 'props' | 'state'>) => (value: undefined | 'all') => void;
|
|
118
|
-
declare const addToRight: ({ emit, refs, props, state, Tree }: Pick<ITransferRenderlessParams, "
|
|
118
|
+
declare const addToRight: ({ emit, refs, props, state, Tree }: Pick<ITransferRenderlessParams, "emit" | "props" | "state" | "refs"> & {
|
|
119
119
|
Tree: string;
|
|
120
120
|
}) => (value: undefined | 'all') => void;
|
|
121
121
|
declare const clearQuery: (refs: ITransferRenderlessParams['refs']) => (which: 'left' | 'right') => void;
|
|
@@ -126,7 +126,7 @@ declare const logicFun: ({ props, emit, state }: Pick<ITransferRenderlessParams,
|
|
|
126
126
|
pullMode?: "sort" | undefined;
|
|
127
127
|
}) => void;
|
|
128
128
|
/** 组件加载后,给左右面板初始化Sortable的功能 */
|
|
129
|
-
declare const sortableEvent: ({ api, droppanel, props, queryDom, refs }: Pick<ITransferRenderlessParams, "
|
|
129
|
+
declare const sortableEvent: ({ api, droppanel, props, queryDom, refs }: Pick<ITransferRenderlessParams, "props" | "api" | "refs"> & {
|
|
130
130
|
droppanel: string;
|
|
131
131
|
queryDom: string;
|
|
132
132
|
}) => () => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
3
|
-
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-
|
|
3
|
+
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-f34997c8.js';
|
|
4
4
|
|
|
5
5
|
declare const UploadDraggerProps: {
|
|
6
6
|
disabled: BooleanConstructor;
|
|
7
|
-
customClass: (
|
|
7
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
8
8
|
tiny_mode: StringConstructor;
|
|
9
9
|
tiny_mode_root: BooleanConstructor;
|
|
10
10
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -336,7 +336,7 @@ declare const fileUploadProps: {
|
|
|
336
336
|
type: BooleanConstructor;
|
|
337
337
|
default: boolean;
|
|
338
338
|
};
|
|
339
|
-
customClass: (
|
|
339
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
340
340
|
hwh5: ObjectConstructor;
|
|
341
341
|
mode: {
|
|
342
342
|
type: StringConstructor;
|
|
@@ -403,7 +403,7 @@ declare const beforeUpload: ({ props, api, Modal, constants, t, state }: Pick<IF
|
|
|
403
403
|
declare const startUpload: ({ state, constants, vm, Modal, api, t }: Pick<IFileUploadRenderlessParams, 'state' | 'constants' | 'vm' | 'api' | 't'> & IFileUploadModalVm) => (file: IFileUploadFile, isList: boolean) => void;
|
|
404
404
|
declare const properFileSize: ({ props, state, api, constants, Modal, t }: Pick<IFileUploadRenderlessParams, 'props' | 'state' | 'constants' | 'api' | 't'> & IFileUploadModalVm) => (file: IFileUploadFile) => boolean;
|
|
405
405
|
declare const addFileToList: ({ api, constants, emit, props, state, mode }: Pick<IFileUploadRenderlessParams, 'api' | 'constants' | 'emit' | 'props' | 'state' | 'mode'>) => (rawFile: IFileUploadFile, updateId: string, reUpload: boolean) => void;
|
|
406
|
-
declare const getFileHash: ({ emit, Modal, constants, t, CryptoJS, state }: Pick<IFileUploadRenderlessParams, "
|
|
406
|
+
declare const getFileHash: ({ emit, Modal, constants, t, CryptoJS, state }: Pick<IFileUploadRenderlessParams, "emit" | "state" | "t" | "constants"> & IFileUploadModalVm & {
|
|
407
407
|
CryptoJS: object;
|
|
408
408
|
}) => ({ file, chunkSize, showTips }: {
|
|
409
409
|
file: IFileUploadFile;
|
|
@@ -482,13 +482,13 @@ declare const sliceDownloadChunk: ({ state }: Pick<IFileUploadRenderlessParams,
|
|
|
482
482
|
declare const batchSegmentDownload: ({ state, api }: Pick<IFileUploadRenderlessParams, 'state' | 'api'>) => ({ batchIndex, batches, docId, isBatch, isLessThan17G }: IFileUploadBatchSegmentDownload) => void;
|
|
483
483
|
declare const downloadFileInner: ({ api, props, state }: Pick<IFileUploadRenderlessParams, 'api' | 'props' | 'state'>) => ({ batchIndex, file, range, isBatch, isChunk, isLessThan17G }: IFileUploadDownloadFileInner) => void;
|
|
484
484
|
declare const afterDownload: ({ api, state }: Pick<IFileUploadRenderlessParams, 'api' | 'state'>) => ({ batchIndex, range, data, file, isBatch, isChunk, isLessThan17G }: IFileUploadAfterDownload) => void;
|
|
485
|
-
declare const setWriterFile: ({ state, emit, Streamsaver }: Pick<IFileUploadRenderlessParams, "
|
|
485
|
+
declare const setWriterFile: ({ state, emit, Streamsaver }: Pick<IFileUploadRenderlessParams, "emit" | "state"> & {
|
|
486
486
|
Streamsaver: IFileUploadStreamsaver;
|
|
487
487
|
}) => ({ data, index, isLessThan17G, file }: IFileUploadSetWriterFile) => Function;
|
|
488
488
|
declare const getFormData$1: ({ constants, props, state }: Pick<IFileUploadRenderlessParams, 'constants' | 'props' | 'state'>) => ({ formData, file, type }: IFileUploadGetFormData) => IUploadFormData;
|
|
489
489
|
declare const largeDocumentUpload: ({ api, Modal, state, t, emit, constants }: Pick<IFileUploadRenderlessParams, 'api' | 'state' | 't' | 'emit' | 'constants'> & IFileUploadModalVm) => (file: IFileUploadFile) => void;
|
|
490
490
|
declare const segmentUploadInit: ({ api, props, service, state, constants }: Pick<IFileUploadRenderlessParams, 'api' | 'props' | 'service' | 'state' | 'constants'>) => (file: IFileUploadFile) => Promise<unknown>;
|
|
491
|
-
declare const segmentUpload: ({ api, props, service, state, emit, constants, CryptoJS }: Pick<IFileUploadRenderlessParams, "
|
|
491
|
+
declare const segmentUpload: ({ api, props, service, state, emit, constants, CryptoJS }: Pick<IFileUploadRenderlessParams, "emit" | "props" | "state" | "api" | "constants" | "service"> & {
|
|
492
492
|
CryptoJS: object;
|
|
493
493
|
}) => (batchIndex: number, file: IFileUploadFile, progress: {
|
|
494
494
|
file: IFileUploadFile;
|
|
@@ -664,7 +664,7 @@ declare const uploadProps: {
|
|
|
664
664
|
type: BooleanConstructor;
|
|
665
665
|
default: boolean;
|
|
666
666
|
};
|
|
667
|
-
customClass: (
|
|
667
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
668
668
|
handleTriggerClick: {
|
|
669
669
|
type: FunctionConstructor;
|
|
670
670
|
default: () => void;
|
|
@@ -1104,6 +1104,10 @@ declare const uploadListProps: {
|
|
|
1104
1104
|
type: BooleanConstructor;
|
|
1105
1105
|
default: boolean;
|
|
1106
1106
|
};
|
|
1107
|
+
compact: {
|
|
1108
|
+
type: BooleanConstructor;
|
|
1109
|
+
default: boolean;
|
|
1110
|
+
};
|
|
1107
1111
|
tiny_mode: StringConstructor;
|
|
1108
1112
|
tiny_mode_root: BooleanConstructor;
|
|
1109
1113
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-
|
|
2
|
+
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-f34997c8.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/upload.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-
|
|
2
|
+
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-f34997c8.js';
|
|
3
3
|
import './shared.type.js';
|
package/user/index.js
CHANGED
|
@@ -191,7 +191,7 @@ const updateOptions = ({ props, state, nextTick }) => (usersList) => {
|
|
|
191
191
|
return nextTick();
|
|
192
192
|
};
|
|
193
193
|
const autoSelect = ({ props, state, nextTick }) => (usersList) => {
|
|
194
|
-
if (!usersList.length) {
|
|
194
|
+
if (!usersList.length || props.multiple && props.multipleLimit && state.user.length >= props.multipleLimit) {
|
|
195
195
|
return nextTick();
|
|
196
196
|
}
|
|
197
197
|
const values = props.multiple ? [].concat(state.user) : [];
|
package/credit-card/index.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
const cardType = (number) => {
|
|
3
|
-
if (number.startsWith("4")) {
|
|
4
|
-
return "visa";
|
|
5
|
-
}
|
|
6
|
-
if (/^(34|37)/.test(number)) {
|
|
7
|
-
return "amex";
|
|
8
|
-
}
|
|
9
|
-
if (/^5[1-5]/.test(number)) {
|
|
10
|
-
return "mastercard";
|
|
11
|
-
}
|
|
12
|
-
if (number.startsWith("6011")) {
|
|
13
|
-
return "discover";
|
|
14
|
-
}
|
|
15
|
-
if (number.startsWith("62")) {
|
|
16
|
-
return "unionpay";
|
|
17
|
-
}
|
|
18
|
-
if (number.startsWith("9792")) {
|
|
19
|
-
return "troy";
|
|
20
|
-
}
|
|
21
|
-
if (/^3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}/.test(number)) {
|
|
22
|
-
return "dinersclub";
|
|
23
|
-
}
|
|
24
|
-
if (/^35(2[89]|[3-8])/.test(number)) {
|
|
25
|
-
return "jcb";
|
|
26
|
-
}
|
|
27
|
-
return "";
|
|
28
|
-
};
|
|
29
|
-
const changeFocus = ({ refs, state }) => () => {
|
|
30
|
-
let target = refs[state.currentFocus];
|
|
31
|
-
if (target) {
|
|
32
|
-
const transform = `translateX(${target.offsetLeft}px) translateY(${target.offsetTop}px)`;
|
|
33
|
-
state.focusElementStyle = {
|
|
34
|
-
transform,
|
|
35
|
-
width: `${target.offsetWidth}px`,
|
|
36
|
-
height: `${target.offsetHeight}px`
|
|
37
|
-
};
|
|
38
|
-
} else {
|
|
39
|
-
state.focusElementStyle = null;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const getIsNumberMasked = (props) => (index, n) => index > 4 && index < 14 && props.labels.cardNumber.length > index && n.trim() !== "" && props.isCardNumberMasked;
|
|
43
|
-
const changePlaceholder = ({ api, nextTick, state }) => () => {
|
|
44
|
-
if (state.cardType === "amex") {
|
|
45
|
-
state.currentPlaceholder = state.amexCardPlaceholder;
|
|
46
|
-
} else if (state.cardType === "dinersclub") {
|
|
47
|
-
state.currentPlaceholder = state.dinersCardPlaceholder;
|
|
48
|
-
} else {
|
|
49
|
-
state.currentPlaceholder = state.defaultCardPlaceholder;
|
|
50
|
-
}
|
|
51
|
-
nextTick(() => {
|
|
52
|
-
api.changeFocus();
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
const focus = ({ props, state }) => (event) => {
|
|
56
|
-
const element = event.target;
|
|
57
|
-
state.isFocused = true;
|
|
58
|
-
if (element.id === props.fields.cardYear || element.id === props.fields.cardMonth) {
|
|
59
|
-
state.currentFocus = "cardDate";
|
|
60
|
-
} else {
|
|
61
|
-
state.currentFocus = element.id;
|
|
62
|
-
}
|
|
63
|
-
state.isCardFlipped = element.id === props.fields.cardCvv;
|
|
64
|
-
};
|
|
65
|
-
const blur = ({ props, state }) => (event) => {
|
|
66
|
-
const element = event.target;
|
|
67
|
-
state.isCardFlipped = !element.id === props.fields.cardCvv;
|
|
68
|
-
setTimeout(() => {
|
|
69
|
-
if (!state.isFocused) {
|
|
70
|
-
state.currentFocus = null;
|
|
71
|
-
}
|
|
72
|
-
}, 300);
|
|
73
|
-
state.isFocused = false;
|
|
74
|
-
};
|
|
75
|
-
const toggleEvent = ({ api, fieldsEls, type }) => {
|
|
76
|
-
if (fieldsEls) {
|
|
77
|
-
for (let i = 0; i < fieldsEls.length; i++) {
|
|
78
|
-
const element = fieldsEls[i];
|
|
79
|
-
const eventType = `${type}EventListener`;
|
|
80
|
-
element[eventType]("focus", api.focus);
|
|
81
|
-
element[eventType]("blur", api.blur);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
blur,
|
|
87
|
-
cardType,
|
|
88
|
-
changeFocus,
|
|
89
|
-
changePlaceholder,
|
|
90
|
-
focus,
|
|
91
|
-
getIsNumberMasked,
|
|
92
|
-
toggleEvent
|
|
93
|
-
};
|
package/credit-card/vue.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import { cardType, changeFocus, getIsNumberMasked, changePlaceholder, focus, blur, toggleEvent } from "./index";
|
|
3
|
-
const api = ["state", "changeFocus", "getIsNumberMasked", "changePlaceholder"];
|
|
4
|
-
const initState = ({ reactive, props, computed }) => {
|
|
5
|
-
const state = reactive({
|
|
6
|
-
isFocused: false,
|
|
7
|
-
currentFocus: null,
|
|
8
|
-
isCardFlipped: false,
|
|
9
|
-
focusElementStyle: null,
|
|
10
|
-
currentPlaceholder: "",
|
|
11
|
-
amexCardPlaceholder: "#### ###### #####",
|
|
12
|
-
dinersCardPlaceholder: "#### ###### ####",
|
|
13
|
-
defaultCardPlaceholder: "#### #### #### ####",
|
|
14
|
-
cardType: computed(() => cardType(props.labels.cardNumber))
|
|
15
|
-
});
|
|
16
|
-
return state;
|
|
17
|
-
};
|
|
18
|
-
const initApi = ({ api: api2, state, props, refs, nextTick }) => {
|
|
19
|
-
Object.assign(api2, {
|
|
20
|
-
state,
|
|
21
|
-
blur: blur({ props, state }),
|
|
22
|
-
focus: focus({ props, state }),
|
|
23
|
-
changeFocus: changeFocus({ refs, state }),
|
|
24
|
-
getIsNumberMasked: getIsNumberMasked(props),
|
|
25
|
-
changePlaceholder: changePlaceholder({ api: api2, nextTick, state })
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
const initWatch = ({ watch, state, api: api2 }) => {
|
|
29
|
-
watch(
|
|
30
|
-
() => state.currentFocus,
|
|
31
|
-
() => {
|
|
32
|
-
if (state.currentFocus) {
|
|
33
|
-
api2.changeFocus();
|
|
34
|
-
} else {
|
|
35
|
-
state.focusElementStyle = null;
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{ immediate: true }
|
|
39
|
-
);
|
|
40
|
-
watch(() => state.cardType, api2.changePlaceholder, { immediate: true });
|
|
41
|
-
};
|
|
42
|
-
const renderless = (props, { computed, onMounted, reactive, watch, onBeforeUnmount }, { refs, nextTick, parent }) => {
|
|
43
|
-
const api2 = {};
|
|
44
|
-
const state = initState({ reactive, props, computed });
|
|
45
|
-
initApi({ api: api2, state, props, refs, nextTick });
|
|
46
|
-
initWatch({ watch, state, api: api2 });
|
|
47
|
-
let fieldsEls;
|
|
48
|
-
onMounted(() => {
|
|
49
|
-
api2.changePlaceholder();
|
|
50
|
-
fieldsEls = parent.$parent.$el.querySelectorAll("[data-credit-card-field]");
|
|
51
|
-
toggleEvent({ api: api2, fieldsEls, type: "add" });
|
|
52
|
-
});
|
|
53
|
-
onBeforeUnmount(() => {
|
|
54
|
-
toggleEvent({ api: api2, fieldsEls, type: "remove" });
|
|
55
|
-
fieldsEls = null;
|
|
56
|
-
});
|
|
57
|
-
return api2;
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
api,
|
|
61
|
-
renderless
|
|
62
|
-
};
|