@opentiny/vue-renderless 3.16.0 → 3.17.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/action-sheet/index.js +0 -1
- package/base-select/index.js +1510 -0
- package/base-select/vue.js +555 -0
- package/breadcrumb-item/vue.js +4 -2
- package/card/index.js +15 -0
- package/card/vue.js +6 -3
- package/carousel/index.js +89 -17
- package/carousel/vue.js +29 -24
- package/carousel-item/index.js +24 -9
- package/carousel-item/vue.js +10 -9
- package/cascader/vue.js +2 -1
- package/cascader-panel/index.js +8 -1
- package/cascader-panel/vue.js +1 -1
- package/cascader-select/column-index.js +11 -6
- package/cascader-select/column.js +8 -5
- package/cascader-select/usePicker.js +3 -2
- package/checkbox/index.js +0 -17
- package/checkbox/vue.js +4 -10
- package/collapse-item/vue.js +4 -2
- package/common/deps/clickoutside.js +15 -8
- package/common/deps/popper.js +15 -1
- package/common/deps/throttle.js +7 -0
- package/common/deps/touch-emulator.js +1 -1
- package/common/deps/tree-model/node.js +1 -0
- package/common/deps/tree-model/tree-store.js +4 -1
- package/common/deps/useEventListener.js +9 -2
- package/common/deps/useInstanceSlots.js +22 -0
- package/common/deps/useRelation.js +72 -0
- package/common/deps/vue-popper.js +1 -0
- package/common/function.js +28 -0
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- package/common/type.js +2 -0
- package/dialog-box/index.js +0 -22
- package/dialog-box/vue.js +1 -4
- package/drawer/index.js +27 -29
- package/drawer/vue.js +6 -10
- package/file-upload/index.js +1 -1
- package/fluent-editor/index.js +679 -0
- package/fluent-editor/options.js +234 -0
- package/fluent-editor/vue.js +192 -0
- package/form/index.js +5 -1
- package/grid/utils/column.js +4 -2
- package/grid/utils/common.js +18 -29
- package/grid/utils/event.js +14 -9
- package/guide/index.js +6 -5
- package/guide/vue.js +2 -2
- package/input/index.js +32 -2
- package/input/vue.js +21 -2
- package/nav-menu/index.js +1 -1
- package/numeric/index.js +4 -1
- package/option/vue.js +6 -6
- package/package.json +1 -1
- package/picker/mb.js +6 -1
- package/picker/vue.js +2 -1
- package/select/index.js +65 -40
- package/select/vue.js +1 -1
- package/split/index.js +16 -9
- package/split/vue.js +7 -2
- package/statistic/index.js +7 -0
- package/tabs/index.js +37 -13
- package/tabs-mf/index.js +116 -13
- package/tabs-mf/vue-bar.js +6 -0
- package/tabs-mf/vue-nav-item.js +1 -1
- package/tabs-mf/vue.js +42 -7
- package/tag-group/vue.js +7 -1
- package/time/index.js +1 -1
- package/time-line/index.js +2 -2
- package/time-line/vue.js +4 -13
- package/timeline-item/index.js +5 -5
- package/timeline-item/vue.js +13 -6
- package/tree/index.js +29 -2
- package/tree/vue.js +5 -2
- package/tree-node/vue.js +2 -1
- package/types/action-menu.type.d.ts +12 -4
- package/types/cascader-menu.type.d.ts +1 -1
- package/types/cascader-node.type.d.ts +1 -1
- package/types/{cascader-panel.type-2bd03be3.d.ts → cascader-panel.type-8f58e628.d.ts} +1 -1
- package/types/cascader-panel.type.d.ts +1 -1
- package/types/cascader.type.d.ts +1 -1
- package/types/collapse-item.type.d.ts +3 -0
- package/types/dialog-box.type.d.ts +2 -6
- package/types/drawer.type.d.ts +28 -30
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-8e30b25c.d.ts → form.type-33aa784a.d.ts} +4 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +4 -0
- package/types/ip-address.type.d.ts +1 -6
- package/types/numeric.type.d.ts +1 -0
- package/types/search.type.d.ts +1 -3
- package/types/{time-line.type-1b501c41.d.ts → time-line.type-9fb16096.d.ts} +7 -5
- package/types/time-line.type.d.ts +1 -1
- package/types/timeline-item.type.d.ts +1 -1
- package/user/index.js +10 -4
- package/year-table/index.js +5 -3
- package/year-table/vue.js +1 -1
- package/common/deps/letter-only.js +0 -19
- package/common/deps/number-only.js +0 -20
package/tree/vue.js
CHANGED
|
@@ -68,6 +68,7 @@ import {
|
|
|
68
68
|
handleClickPlainNode,
|
|
69
69
|
setCheckedByNodeKey
|
|
70
70
|
} from "./index";
|
|
71
|
+
import { random } from "../common/string";
|
|
71
72
|
const api = [
|
|
72
73
|
"state",
|
|
73
74
|
"closeMenu",
|
|
@@ -160,7 +161,9 @@ const initState = ({ reactive, emitter, props, computed, api: api2 }) => {
|
|
|
160
161
|
deleteData: [],
|
|
161
162
|
editData: []
|
|
162
163
|
},
|
|
163
|
-
|
|
164
|
+
newNodeId: Math.floor(random() * 1e4),
|
|
165
|
+
plainNodeStore: {},
|
|
166
|
+
allNodeKeys: []
|
|
164
167
|
});
|
|
165
168
|
return state;
|
|
166
169
|
};
|
|
@@ -252,7 +255,7 @@ const renderless = (props, { computed, onMounted, onUpdated, reactive, watch, pr
|
|
|
252
255
|
cancelDelete: cancelDelete({ state }),
|
|
253
256
|
openEdit: openEdit({ props, state, api: api2, emit }),
|
|
254
257
|
saveNode: saveNode({ state, emit, api: api2 }),
|
|
255
|
-
addNode: addNode({ api: api2 }),
|
|
258
|
+
addNode: addNode({ api: api2, props, state }),
|
|
256
259
|
editNode: editNode({ state }),
|
|
257
260
|
closeEdit: closeEdit({ props, state, api: api2, emit }),
|
|
258
261
|
saveEdit: saveEdit({ props, state, emit }),
|
package/tree-node/vue.js
CHANGED
|
@@ -65,6 +65,7 @@ const initState = ({ reactive, treeRoot, props, emitter, $parentEmitter, vm, api
|
|
|
65
65
|
emitter: emitter(),
|
|
66
66
|
parentEmitter: $parentEmitter,
|
|
67
67
|
isSaaSTheme: (props.theme || vm.theme) === "saas",
|
|
68
|
+
props: treeRoot.props,
|
|
68
69
|
computedExpandIcon: computed(() => api2.computedExpandIcon(treeRoot, state)),
|
|
69
70
|
computedIndent: computed(() => api2.computedIndent(props, state))
|
|
70
71
|
});
|
|
@@ -94,7 +95,7 @@ const initApi = ({ api: api2, state, dispatch, broadcast, vm, props, treeRoot, n
|
|
|
94
95
|
watchIndeterminate: watchIndeterminate({ api: api2, props }),
|
|
95
96
|
watchChecked: watchChecked({ api: api2, props }),
|
|
96
97
|
openEdit: openEdit({ state, vm }),
|
|
97
|
-
addNode: addNode({ state, props, api: api2 }),
|
|
98
|
+
addNode: debounce(500, true, addNode({ state, props, api: api2 })),
|
|
98
99
|
saveEdit: saveEdit({ state }),
|
|
99
100
|
deleteNode: deleteNode({ state }),
|
|
100
101
|
handleChildNodeExpand: handleChildNodeExpand(state),
|
|
@@ -87,14 +87,22 @@ declare const visibleChange: (emit: IActionMenuRenderlessParams['emit']) => (sta
|
|
|
87
87
|
*
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
|
+
interface IActonMenuOptionsItem {
|
|
91
|
+
label?: string;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
divided?: boolean;
|
|
94
|
+
children?: IActonMenuOptionsItem[];
|
|
95
|
+
icon?: any;
|
|
96
|
+
[key: string]: any;
|
|
97
|
+
}
|
|
90
98
|
interface IActionMenuState {
|
|
91
|
-
visibleOptions:
|
|
92
|
-
moreOptions:
|
|
99
|
+
visibleOptions: IActonMenuOptionsItem[];
|
|
100
|
+
moreOptions: IActonMenuOptionsItem[];
|
|
93
101
|
isCardMode: boolean;
|
|
94
102
|
spacing: string | number;
|
|
95
103
|
maxShowNum: number;
|
|
96
104
|
moreText: string;
|
|
97
|
-
suffixIcon: string |
|
|
105
|
+
suffixIcon: string | object;
|
|
98
106
|
}
|
|
99
107
|
type IActionMenuProps = ExtractPropTypes<typeof actionMenuProps>;
|
|
100
108
|
type IActionMenuRenderlessParams = ISharedRenderlessFunctionParams<null> & {
|
|
@@ -118,4 +126,4 @@ interface IActionMenuApi {
|
|
|
118
126
|
}
|
|
119
127
|
type IActionMenuRenderlessParamUtils = ISharedRenderlessParamUtils<null>;
|
|
120
128
|
|
|
121
|
-
export { IActionMenuApi, IActionMenuItemData, IActionMenuProps, IActionMenuRenderlessParamUtils, IActionMenuRenderlessParams, IActionMenuState };
|
|
129
|
+
export { IActionMenuApi, IActionMenuItemData, IActionMenuProps, IActionMenuRenderlessParamUtils, IActionMenuRenderlessParams, IActionMenuState, IActonMenuOptionsItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js';
|
|
2
|
-
import { I as ICascaderPanelNode, a as ICascaderPanelApi } from './cascader-panel.type-
|
|
2
|
+
import { I as ICascaderPanelNode, a as ICascaderPanelApi } from './cascader-panel.type-8f58e628.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
-
import { I as ICascaderPanelNode, b as ICascaderPanelConfig, c as ICascaderPanelNodeValue, d as ICascaderPanelNodePropValue, a as ICascaderPanelApi } from './cascader-panel.type-
|
|
2
|
+
import { I as ICascaderPanelNode, b as ICascaderPanelConfig, c as ICascaderPanelNodeValue, d as ICascaderPanelNodePropValue, a as ICascaderPanelApi } from './cascader-panel.type-8f58e628.js';
|
|
3
3
|
import { ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -129,7 +129,7 @@ declare const checkNode: (api: ICascaderPanelApi) => (el: HTMLElement) => void;
|
|
|
129
129
|
declare const handleKeyDown: ({ api, emit, menus }: Pick<ICascaderPanelRenderlessParams, 'api' | 'emit' | 'menus'>) => (event: KeyboardEvent) => void;
|
|
130
130
|
declare const handleExpand: ({ emit, state }: Pick<ICascaderPanelRenderlessParams, 'emit' | 'state'>) => (node: ICascaderPanelNode, silent?: boolean) => void;
|
|
131
131
|
declare const handleCheckChange: (state: ICascaderPanelState) => (value: ICascaderPanelNodePropValue) => void;
|
|
132
|
-
declare const lazyLoad: ({ api, $parent, state, Store }: Pick<ICascaderPanelRenderlessParams, 'api' | '$parent' | 'state' | 'Store'>) => (currentNode?: ICascaderPanelNode, onFullfiled?: ((dataList: ICascaderPanelData[]) => void) | undefined) => void;
|
|
132
|
+
declare const lazyLoad: ({ api, $parent, state, Store, emit }: Pick<ICascaderPanelRenderlessParams, 'api' | '$parent' | 'state' | 'Store' | 'emit'>) => (currentNode?: ICascaderPanelNode, onFullfiled?: ((dataList: ICascaderPanelData[]) => void) | undefined) => void;
|
|
133
133
|
declare const calculateMultiCheckedValue: ({ api, state }: Pick<ICascaderPanelRenderlessParams, 'api' | 'state'>) => () => void;
|
|
134
134
|
declare const scrollIntoView: ({ menus }: Pick<ICascaderPanelRenderlessParams, 'menus'>) => () => void;
|
|
135
135
|
declare const getNodeByValue: (state: ICascaderPanelState) => (val: ICascaderPanelNodePropValue | null) => ICascaderPanelNode | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { a as ICascaderPanelApi, b as ICascaderPanelConfig, g as ICascaderPanelData, f as ICascaderPanelLazyLoadNode, I as ICascaderPanelNode, d as ICascaderPanelNodePropValue, c as ICascaderPanelNodeValue, h as ICascaderPanelProps, k as ICascaderPanelRenderlessParamUtils, j as ICascaderPanelRenderlessParams, i as ICascaderPanelState, e as ICascaderPanelStore } from './cascader-panel.type-
|
|
2
|
+
export { a as ICascaderPanelApi, b as ICascaderPanelConfig, g as ICascaderPanelData, f as ICascaderPanelLazyLoadNode, I as ICascaderPanelNode, d as ICascaderPanelNodePropValue, c as ICascaderPanelNodeValue, h as ICascaderPanelProps, k as ICascaderPanelRenderlessParamUtils, j as ICascaderPanelRenderlessParams, i as ICascaderPanelState, e as ICascaderPanelStore } from './cascader-panel.type-8f58e628.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/cascader.type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ISharedRenderlessParamUtils } from './shared.type.js';
|
|
2
2
|
import { ExtractPropTypes } from 'vue';
|
|
3
|
-
import { N as Node, d as ICascaderPanelNodePropValue, a as ICascaderPanelApi } from './cascader-panel.type-
|
|
3
|
+
import { N as Node, d as ICascaderPanelNodePropValue, a as ICascaderPanelApi } from './cascader-panel.type-8f58e628.js';
|
|
4
4
|
|
|
5
5
|
declare const cascaderProps: {
|
|
6
6
|
_constants: {
|
|
@@ -17,6 +17,9 @@ declare const collapseItemProps: {
|
|
|
17
17
|
type: (StringConstructor | NumberConstructor)[];
|
|
18
18
|
default(): any;
|
|
19
19
|
};
|
|
20
|
+
expandIcon: {
|
|
21
|
+
type: (StringConstructor | ObjectConstructor)[];
|
|
22
|
+
};
|
|
20
23
|
disabled: BooleanConstructor;
|
|
21
24
|
tiny_mode: StringConstructor;
|
|
22
25
|
tiny_mode_root: BooleanConstructor;
|
|
@@ -21,7 +21,7 @@ declare const $constants: {
|
|
|
21
21
|
PC_SCROLL_LOCK_CLASS: string;
|
|
22
22
|
MOBILE_SCROLL_LOCK_CLASS: string;
|
|
23
23
|
Mode: string;
|
|
24
|
-
|
|
24
|
+
SCROLL_LOCK_CLASS(mode: any): any;
|
|
25
25
|
};
|
|
26
26
|
declare const dialogBoxProps: {
|
|
27
27
|
_constants: {
|
|
@@ -35,7 +35,7 @@ declare const dialogBoxProps: {
|
|
|
35
35
|
PC_SCROLL_LOCK_CLASS: string;
|
|
36
36
|
MOBILE_SCROLL_LOCK_CLASS: string;
|
|
37
37
|
Mode: string;
|
|
38
|
-
|
|
38
|
+
SCROLL_LOCK_CLASS(mode: any): any;
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
appendToBody: {
|
|
@@ -150,9 +150,6 @@ declare const dialogBoxProps: {
|
|
|
150
150
|
|
|
151
151
|
declare const computedAnimationName: ({ constants, props }: Pick<IDialogBoxRenderlessParams, 'constants' | 'props'>) => () => string;
|
|
152
152
|
declare const computedStyle: ({ props, state, designConfig }: Pick<IDialogBoxRenderlessParams, 'props' | 'state' | 'designConfig'>) => () => IDialogBoxStyle;
|
|
153
|
-
declare const computedBodyStyle: ({ vm, props, state }: Pick<IDialogBoxRenderlessParams, 'vm' | 'props' | 'state'>) => () => {
|
|
154
|
-
maxHeight?: string | undefined;
|
|
155
|
-
};
|
|
156
153
|
declare const watchVisible: ({ api, constants, emit, nextTick, parent, props, vm, state }: Pick<IDialogBoxRenderlessParams, 'api' | 'constants' | 'emit' | 'nextTick' | 'parent' | 'props' | 'vm' | 'state'>) => (val: boolean) => void;
|
|
157
154
|
declare const mounted: ({ api, parent, props }: Pick<IDialogBoxRenderlessParams, 'api' | 'parent' | 'props'>) => () => void;
|
|
158
155
|
declare const unMounted: ({ api, parent, props }: Pick<IDialogBoxRenderlessParams, 'api' | 'parent' | 'props'>) => () => void;
|
|
@@ -223,7 +220,6 @@ interface IDialogBoxApi {
|
|
|
223
220
|
handleClose: ReturnType<typeof handleClose>;
|
|
224
221
|
watchVisible: ReturnType<typeof watchVisible>;
|
|
225
222
|
computedStyle: ReturnType<typeof computedStyle>;
|
|
226
|
-
computedBodyStyle: ReturnType<typeof computedBodyStyle>;
|
|
227
223
|
mounted: ReturnType<typeof mounted>;
|
|
228
224
|
unMounted: ReturnType<typeof unMounted>;
|
|
229
225
|
computedAnimationName: ReturnType<typeof computedAnimationName>;
|
package/types/drawer.type.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ISharedRenderlessParamUtils } from './shared.type.js';
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
3
3
|
|
|
4
|
+
declare const $constants: {
|
|
5
|
+
SCROLL_LOCK_CLASS(mode: string): string;
|
|
6
|
+
DEFAULT_WIDTH: string;
|
|
7
|
+
};
|
|
4
8
|
declare const drawerProps: {
|
|
5
9
|
_constants: {
|
|
6
10
|
type: ObjectConstructor;
|
|
@@ -57,6 +61,7 @@ declare const drawerProps: {
|
|
|
57
61
|
};
|
|
58
62
|
beforeClose: FunctionConstructor;
|
|
59
63
|
tipsProps: ObjectConstructor;
|
|
64
|
+
customSlots: ObjectConstructor;
|
|
60
65
|
tiny_mode: StringConstructor;
|
|
61
66
|
tiny_mode_root: BooleanConstructor;
|
|
62
67
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -65,26 +70,16 @@ declare const drawerProps: {
|
|
|
65
70
|
tiny_chart_theme: ObjectConstructor;
|
|
66
71
|
};
|
|
67
72
|
|
|
68
|
-
declare const computedWidth: ({ state, designConfig, props, constants }: Pick<
|
|
69
|
-
SCROLL_LOCK_CLASS(mode: string): string;
|
|
70
|
-
DEFAULT_WIDTH: string;
|
|
71
|
-
}>, "designConfig" | "constants"> & {
|
|
72
|
-
state: IDrawerState;
|
|
73
|
-
} & {
|
|
74
|
-
props: IDrawerProps;
|
|
75
|
-
}) => () => string;
|
|
73
|
+
declare const computedWidth: ({ state, designConfig, props, constants }: Pick<IDrawerRenderlessParams, 'state' | 'designConfig' | 'props' | 'constants'>) => () => string;
|
|
76
74
|
declare const close: ({ api }: {
|
|
77
|
-
api:
|
|
75
|
+
api: IDrawerApi;
|
|
78
76
|
}) => (force?: boolean) => void;
|
|
79
|
-
declare const watchVisible: ({ state }:
|
|
80
|
-
|
|
81
|
-
}) => (bool: any) => void;
|
|
82
|
-
declare const watchToggle: ({ emit }: {
|
|
83
|
-
emit: ISharedRenderlessParamUtils['emit'];
|
|
84
|
-
}) => (bool: boolean) => void;
|
|
77
|
+
declare const watchVisible: ({ state, api }: Pick<IDrawerRenderlessParams, 'state' | 'api'>) => (value: boolean) => void;
|
|
78
|
+
declare const open: ({ state, emit, vm }: Pick<IDrawerRenderlessParams, 'state' | 'emit' | 'vm'>) => () => void;
|
|
85
79
|
declare const confirm: ({ api }: {
|
|
86
|
-
api:
|
|
80
|
+
api: IDrawerApi;
|
|
87
81
|
}) => () => void;
|
|
82
|
+
declare const handleClose: ({ emit, props, state }: Pick<IDrawerRenderlessParams, 'emit' | 'props' | 'state'>) => (type: string, force?: boolean) => void;
|
|
88
83
|
declare const mousedown: ({ state, vm }: {
|
|
89
84
|
vm: ISharedRenderlessParamUtils<IDrawerCT>['vm'];
|
|
90
85
|
state: IDrawerState;
|
|
@@ -95,7 +90,7 @@ declare const mousemove: ({ state, props }: {
|
|
|
95
90
|
}) => EventListenerOrEventListenerObject;
|
|
96
91
|
declare const mouseup: ({ state }: {
|
|
97
92
|
state: IDrawerState;
|
|
98
|
-
}) => () => void;
|
|
93
|
+
}) => (event: MouseEvent) => void;
|
|
99
94
|
declare const addDragEvent: ({ api, vm }: {
|
|
100
95
|
api: IDrawerApi;
|
|
101
96
|
vm: ISharedRenderlessParamUtils<IDrawerCT>['vm'];
|
|
@@ -104,15 +99,11 @@ declare const removeDragEvent: ({ api, vm }: {
|
|
|
104
99
|
api: IDrawerApi;
|
|
105
100
|
vm: ISharedRenderlessParamUtils<IDrawerCT>['vm'];
|
|
106
101
|
}) => () => void;
|
|
107
|
-
declare const showScrollbar: (lockScrollClass:
|
|
108
|
-
declare const hideScrollbar: (lockScrollClass:
|
|
109
|
-
declare const watchVisibleNotImmediate: ({ api, props }: {
|
|
110
|
-
api: IDrawerApi;
|
|
111
|
-
props: IDrawerProps;
|
|
112
|
-
}) => (visible: boolean) => void;
|
|
102
|
+
declare const showScrollbar: (lockScrollClass: string) => () => void;
|
|
103
|
+
declare const hideScrollbar: (lockScrollClass: string) => () => void;
|
|
113
104
|
|
|
114
105
|
interface IDrawerState {
|
|
115
|
-
|
|
106
|
+
visible: boolean;
|
|
116
107
|
width: number;
|
|
117
108
|
height: number;
|
|
118
109
|
dragEvent: {
|
|
@@ -122,12 +113,13 @@ interface IDrawerState {
|
|
|
122
113
|
offsetWidth: number;
|
|
123
114
|
offsetHeight: number;
|
|
124
115
|
};
|
|
125
|
-
computedWidth:
|
|
116
|
+
computedWidth: string;
|
|
126
117
|
btnOrderReversed: boolean;
|
|
127
118
|
}
|
|
128
119
|
type IDrawerProps = ExtractPropTypes<typeof drawerProps>;
|
|
129
120
|
interface IDrawerApi {
|
|
130
121
|
state: IDrawerState;
|
|
122
|
+
open: ReturnType<typeof open>;
|
|
131
123
|
confirm: ReturnType<typeof confirm>;
|
|
132
124
|
close: ReturnType<typeof close>;
|
|
133
125
|
mousemove: ReturnType<typeof mousemove>;
|
|
@@ -136,12 +128,18 @@ interface IDrawerApi {
|
|
|
136
128
|
addDragEvent: ReturnType<typeof addDragEvent>;
|
|
137
129
|
removeDragEvent: ReturnType<typeof removeDragEvent>;
|
|
138
130
|
watchVisible: ReturnType<typeof watchVisible>;
|
|
139
|
-
watchToggle: ReturnType<typeof watchToggle>;
|
|
140
131
|
showScrollbar: ReturnType<typeof showScrollbar>;
|
|
141
132
|
hideScrollbar: ReturnType<typeof hideScrollbar>;
|
|
142
|
-
watchVisibleNotImmediate: ReturnType<typeof watchVisibleNotImmediate>;
|
|
143
133
|
computedWidth: ReturnType<typeof computedWidth>;
|
|
134
|
+
handleClose: ReturnType<typeof handleClose>;
|
|
144
135
|
}
|
|
145
136
|
type IDrawerCT = ReturnType<typeof drawerProps._constants.default>;
|
|
137
|
+
type IDrawerConstants = typeof $constants;
|
|
138
|
+
type IDrawerRenderlessParams = ISharedRenderlessFunctionParams<IDrawerConstants> & {
|
|
139
|
+
api: IDrawerApi;
|
|
140
|
+
state: IDrawerState;
|
|
141
|
+
props: IDrawerProps;
|
|
142
|
+
};
|
|
143
|
+
type IDrawerRenderlessParamUtils = ISharedRenderlessParamUtils<IDrawerConstants>;
|
|
146
144
|
|
|
147
|
-
export { IDrawerApi, IDrawerCT, IDrawerProps, IDrawerState };
|
|
145
|
+
export { IDrawerApi, IDrawerCT, IDrawerConstants, IDrawerProps, IDrawerRenderlessParamUtils, IDrawerRenderlessParams, IDrawerState };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-
|
|
2
|
+
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-33aa784a.js';
|
|
3
3
|
import './shared.type.js';
|
|
@@ -92,6 +92,10 @@ declare const formProps: {
|
|
|
92
92
|
type: BooleanConstructor;
|
|
93
93
|
default: boolean;
|
|
94
94
|
};
|
|
95
|
+
tooltipConfig: {
|
|
96
|
+
type: ObjectConstructor;
|
|
97
|
+
default: () => {};
|
|
98
|
+
};
|
|
95
99
|
tiny_mode: StringConstructor;
|
|
96
100
|
tiny_mode_root: BooleanConstructor;
|
|
97
101
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
package/types/form.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-
|
|
2
|
+
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-33aa784a.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/input.type.d.ts
CHANGED
|
@@ -30,14 +30,9 @@ declare const ipAddressProps: {
|
|
|
30
30
|
type: (StringConstructor | ObjectConstructor)[];
|
|
31
31
|
default: string;
|
|
32
32
|
};
|
|
33
|
-
tiny_mode: StringConstructor;
|
|
34
|
-
* @property {Boolean} readonly - 只读
|
|
35
|
-
*/
|
|
33
|
+
tiny_mode: StringConstructor;
|
|
36
34
|
tiny_mode_root: BooleanConstructor;
|
|
37
35
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
38
|
-
/**
|
|
39
|
-
* @property {Boolean} disabled - 禁用
|
|
40
|
-
*/
|
|
41
36
|
tiny_renderless: FunctionConstructor;
|
|
42
37
|
tiny_theme: StringConstructor;
|
|
43
38
|
tiny_chart_theme: ObjectConstructor;
|
package/types/numeric.type.d.ts
CHANGED
|
@@ -212,6 +212,7 @@ declare const handleBlur: ({ constants, dispatch, emit, props, state, api }: Pic
|
|
|
212
212
|
declare const handleFocus: ({ emit, state, props, api, vm }: Pick<INumericRenderlessParams, 'emit' | 'state' | 'props' | 'api' | 'vm'>) => (event: FocusEvent) => void;
|
|
213
213
|
declare const focus: (vm: INumericRenderlessParams['vm']) => () => void;
|
|
214
214
|
declare const setCurrentValue: ({ api, constants, dispatch, emit, props, state }: Pick<INumericRenderlessParams, 'api' | 'constants' | 'dispatch' | 'emit' | 'props' | 'state'>) => (newVal: number, emitChangeFlag?: boolean) => void;
|
|
215
|
+
/** 处理输入字符: input / compositionend 事件均进入该函数 */
|
|
215
216
|
declare const handleInput: ({ state, api, emit, props }: Pick<INumericRenderlessParams, 'state' | 'api' | 'emit' | 'props'>) => (event: InputEvent) => void;
|
|
216
217
|
declare const handleInputChange: ({ api, state, props }: Pick<INumericRenderlessParams, 'api' | 'state' | 'props'>) => (event: Event) => void;
|
|
217
218
|
declare const select: (vm: INumericRenderlessParams['vm']) => () => any;
|
package/types/search.type.d.ts
CHANGED
|
@@ -78,9 +78,7 @@ declare const searchProps: {
|
|
|
78
78
|
suffixIcon: (StringConstructor | ObjectConstructor)[];
|
|
79
79
|
tiny_mode: StringConstructor;
|
|
80
80
|
tiny_mode_root: BooleanConstructor;
|
|
81
|
-
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
82
|
-
* 搜索的类型选项,格式为[{text:'文档',value:1},...],不配置时类型选择固定显示为All
|
|
83
|
-
*/
|
|
81
|
+
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
84
82
|
tiny_renderless: FunctionConstructor;
|
|
85
83
|
tiny_theme: StringConstructor;
|
|
86
84
|
tiny_chart_theme: ObjectConstructor;
|
|
@@ -61,7 +61,10 @@ declare const timelineProps: {
|
|
|
61
61
|
type: NumberConstructor;
|
|
62
62
|
default: number;
|
|
63
63
|
};
|
|
64
|
-
data:
|
|
64
|
+
data: {
|
|
65
|
+
type: ArrayConstructor;
|
|
66
|
+
default: () => never[];
|
|
67
|
+
};
|
|
65
68
|
space: {
|
|
66
69
|
type: (StringConstructor | NumberConstructor)[];
|
|
67
70
|
default: string;
|
|
@@ -194,8 +197,8 @@ declare const getDate: (dateTime: string) => {
|
|
|
194
197
|
};
|
|
195
198
|
declare const getStatus: ({ state, t }: Pick<ITimelineItemRenderlessParams, 'state' | 't'>) => (value: number) => string;
|
|
196
199
|
declare const computedWidth: () => (width: string | number) => string | number;
|
|
197
|
-
declare const handleClick: ({ emit, state }: Pick<ITimelineItemRenderlessParams, 'emit' | 'state'>) => (node: ITimelineItem) => void;
|
|
198
|
-
declare const getStatusCls: ({ constants, state }: Pick<ITimelineItemRenderlessParams, 'constants' | 'state'>) => (node: ITimelineItem) => ITimelineStatusCls;
|
|
200
|
+
declare const handleClick: ({ emit, state, props }: Pick<ITimelineItemRenderlessParams, 'emit' | 'state' | 'props'>) => (node: ITimelineItem) => void;
|
|
201
|
+
declare const getStatusCls: ({ constants, state, props }: Pick<ITimelineItemRenderlessParams, 'constants' | 'state' | 'props'>) => (node: ITimelineItem) => ITimelineStatusCls;
|
|
199
202
|
declare const computedCurrent: ({ state, api }: Pick<ITimelineItemRenderlessParams, 'state' | 'api'>) => () => number;
|
|
200
203
|
declare const computedIsReverse: (api: ITimelineItemApi) => () => boolean;
|
|
201
204
|
declare const computedItemCls: ({ props, api, state }: Pick<ITimelineItemRenderlessParams, 'props' | 'api' | 'state'>) => () => ITimelineCustomCls;
|
|
@@ -263,8 +266,7 @@ interface ITimelineItem {
|
|
|
263
266
|
fold?: boolean;
|
|
264
267
|
}
|
|
265
268
|
interface ITimelineInject {
|
|
266
|
-
|
|
267
|
-
nodes: ITimelineItem[];
|
|
269
|
+
state: ITimelineItem[];
|
|
268
270
|
props: ITimelineProps;
|
|
269
271
|
}
|
|
270
272
|
|
|
@@ -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-9fb16096.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-9fb16096.js';
|
|
3
3
|
import './shared.type.js';
|
|
4
4
|
import '@opentiny/vue-common';
|
package/user/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../chunk-G2ADBYYC.js";
|
|
2
5
|
import debounce from "../common/deps/debounce";
|
|
3
6
|
import { toDateStr } from "../common/date";
|
|
4
7
|
import { toJsonStr } from "../common/object";
|
|
@@ -493,10 +496,13 @@ const initService = ({ props, service }) => {
|
|
|
493
496
|
const filter = ({ props, state }) => () => {
|
|
494
497
|
if (props.multiple && props.hideSelected) {
|
|
495
498
|
const selectedUsers = state.user.map((value) => typeof value === "string" ? value.toLocaleLowerCase() : value);
|
|
496
|
-
return state.options.
|
|
497
|
-
|
|
498
|
-
typeof user[state.valueField] === "string" ? user[state.valueField].toLocaleLowerCase() : user[state.
|
|
499
|
+
return state.options.map((user) => {
|
|
500
|
+
const _show = !~selectedUsers.indexOf(
|
|
501
|
+
typeof user[state.valueField] === "string" ? user[state.valueField].toLocaleLowerCase() : user[state.valueField]
|
|
499
502
|
);
|
|
503
|
+
return __spreadProps(__spreadValues({}, user), {
|
|
504
|
+
_show
|
|
505
|
+
});
|
|
500
506
|
});
|
|
501
507
|
}
|
|
502
508
|
return state.options;
|
package/year-table/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { toDate } from "../common/date";
|
|
3
|
-
import { hasClass } from "../common/deps/dom";
|
|
4
3
|
import { range, nextDate, getDayCountOfYear } from "../common/deps/date-util";
|
|
5
4
|
import { arrayFindIndex, coerceTruthyValueToArray, arrayFind } from "../date-table";
|
|
6
5
|
import { DATEPICKER } from "../common";
|
|
@@ -9,7 +8,7 @@ const datesInYear = (year) => {
|
|
|
9
8
|
const firstDay = new Date(year, 0, 1);
|
|
10
9
|
return range(numOfDays).map((n) => nextDate(firstDay, n));
|
|
11
10
|
};
|
|
12
|
-
const getCellStyle = ({ props }) => (cell) => {
|
|
11
|
+
const getCellStyle = ({ props, state }) => (cell) => {
|
|
13
12
|
const { defaultValue } = props;
|
|
14
13
|
const year = cell.text;
|
|
15
14
|
const style = {};
|
|
@@ -28,6 +27,9 @@ const getCellStyle = ({ props }) => (cell) => {
|
|
|
28
27
|
if (cell.end) {
|
|
29
28
|
style[DATEPICKER.EndDate] = true;
|
|
30
29
|
}
|
|
30
|
+
for (const key in style) {
|
|
31
|
+
state[key] = style[key];
|
|
32
|
+
}
|
|
31
33
|
return style;
|
|
32
34
|
};
|
|
33
35
|
const clearDate = (date) => {
|
|
@@ -110,7 +112,7 @@ const handleYearTableClick = ({ emit, props }) => (event) => {
|
|
|
110
112
|
const target = event.target;
|
|
111
113
|
const { selectionMode } = props;
|
|
112
114
|
if (target.tagName === "A") {
|
|
113
|
-
if (
|
|
115
|
+
if (target.hasAttribute("aria-disabled")) {
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
116
118
|
const year = Number(target.textContent || target.innerText);
|
package/year-table/vue.js
CHANGED
|
@@ -9,7 +9,7 @@ const renderless = (props, { computed, reactive, watch }, { emit, vm }) => {
|
|
|
9
9
|
});
|
|
10
10
|
Object.assign(api2, {
|
|
11
11
|
state,
|
|
12
|
-
getCellStyle: getCellStyle({ props }),
|
|
12
|
+
getCellStyle: getCellStyle({ props, state }),
|
|
13
13
|
handleYearTableClick: handleYearTableClick({ emit, props, state }),
|
|
14
14
|
markRange: markRange({ props, state }),
|
|
15
15
|
watchDate: watchDate({ api: api2, props }),
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "../../chunk-G2ADBYYC.js";
|
|
2
|
-
import { on, off } from "./dom";
|
|
3
|
-
const checkValue = (event) => {
|
|
4
|
-
if (event.charCode >= 48 && event.charCode <= 57) {
|
|
5
|
-
event.preventDefault();
|
|
6
|
-
}
|
|
7
|
-
return true;
|
|
8
|
-
};
|
|
9
|
-
var letter_only_default = {
|
|
10
|
-
bind(element) {
|
|
11
|
-
on(element, "keypress", checkValue);
|
|
12
|
-
},
|
|
13
|
-
unbind(element) {
|
|
14
|
-
off(element, "keypress", checkValue);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
letter_only_default as default
|
|
19
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "../../chunk-G2ADBYYC.js";
|
|
2
|
-
import { on, off } from "./dom";
|
|
3
|
-
const checkValue = (event) => {
|
|
4
|
-
event.target.value = event.target.value.replace(/[^0-9]/g, "");
|
|
5
|
-
if (event.charCode >= 48 && event.charCode <= 57) {
|
|
6
|
-
return true;
|
|
7
|
-
}
|
|
8
|
-
event.preventDefault();
|
|
9
|
-
};
|
|
10
|
-
var number_only_default = {
|
|
11
|
-
bind(element) {
|
|
12
|
-
on(element, "keypress", checkValue);
|
|
13
|
-
},
|
|
14
|
-
unbind(element) {
|
|
15
|
-
off(element, "keypress", checkValue);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
number_only_default as default
|
|
20
|
-
};
|