@ibiz-template/mob-vue3-components 0.7.41-alpha.10 → 0.7.41-alpha.11
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/index-q0SBDv6c.js +76 -0
- package/dist/index-q0SBDv6c.js.map +1 -0
- package/dist/index.min.css +9 -9
- package/dist/index.system.min.js +1 -1
- package/dist/{quill-editor-U1UE37xw.js → quill-editor-5QOfComp.js} +2 -2
- package/dist/{quill-editor-U1UE37xw.js.map → quill-editor-5QOfComp.js.map} +1 -1
- package/dist/{quill-editor-preview-v7UO7Unq.js → quill-editor-preview-65f3RVj0.js} +2 -2
- package/dist/{quill-editor-preview-v7UO7Unq.js.map → quill-editor-preview-65f3RVj0.js.map} +1 -1
- package/dist/{quill-EpIYtlVK.js → quill-sraxwYmv.js} +2 -2
- package/dist/{quill-EpIYtlVK.js.map → quill-sraxwYmv.js.map} +1 -1
- package/es/_virtual/index12.mjs +2 -2
- package/es/_virtual/index13.mjs +2 -2
- package/es/_virtual/index17.mjs +2 -2
- package/es/_virtual/index18.mjs +2 -2
- package/es/editor/dropdown-list/dropdown-list-editor.provider.mjs +3 -0
- package/es/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.css +1 -0
- package/es/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.d.ts +84 -0
- package/es/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.mjs +142 -0
- package/es/editor/dropdown-list/index.d.ts +1 -0
- package/es/editor/dropdown-list/index.mjs +1 -0
- package/es/editor/index.mjs +11 -1
- package/es/editor/text-box/input/input.d.ts +1 -0
- package/es/editor/text-box/input/input.mjs +6 -5
- package/es/index.mjs +1 -0
- package/es/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
- package/es/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.mjs +1 -1
- package/es/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.mjs +1 -1
- package/es/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.mjs +1 -1
- package/lib/_virtual/index12.cjs +2 -2
- package/lib/_virtual/index13.cjs +2 -2
- package/lib/_virtual/index17.cjs +2 -2
- package/lib/_virtual/index18.cjs +2 -2
- package/lib/editor/dropdown-list/dropdown-list-editor.provider.cjs +3 -0
- package/lib/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.cjs +144 -0
- package/lib/editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.css +1 -0
- package/lib/editor/dropdown-list/index.cjs +2 -0
- package/lib/editor/index.cjs +11 -0
- package/lib/editor/text-box/input/input.cjs +6 -5
- package/lib/index.cjs +2 -0
- package/lib/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
- package/lib/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.cjs +1 -1
- package/lib/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.cjs +1 -1
- package/lib/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.cjs +1 -1
- package/package.json +4 -4
- package/dist/index-pP9MJGoH.js +0 -76
- package/dist/index-pP9MJGoH.js.map +0 -1
package/es/_virtual/index12.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var middlewares = {};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { middlewares as __exports };
|
package/es/_virtual/index13.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var frameTalkClientPc = {exports: {}};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { frameTalkClientPc as __module };
|
package/es/_virtual/index17.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var lodash_clonedeep = {exports: {}};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { lodash_clonedeep as __module };
|
package/es/_virtual/index18.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var lodash_isequal = {exports: {}};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { lodash_isequal as __module };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-cascader-dropdown{height:100%}.ibiz-cascader-dropdown .van-field{font-size:var(--ibiz-form-item-font-size)}.ibiz-cascader-dropdown .van-field::after{display:none}.ibiz-cascader-dropdown .van-cell--clickable:active{background-color:transparent}.ibiz-cascader-dropdown--disabled{color:var(--ibiz-form-item-disabled-color);--van-field-input-text-color:var(--ibiz-form-item-disabled-color)}.ibiz-cascader-dropdown--readonly{--van-field-input-text-color:var(--ibiz-form-item-readonly-color);color:var(--ibiz-form-item-readonly-color)}.ibiz-cascader-dropdown input{text-align:var(--ibiz-form-item-container-editor-align)}.ibiz-cascader-dropdown.ibiz-cascader--readonly{text-align:var(--ibiz-form-item-container-editor-align)}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { DropDownListEditorController } from '../dropdown-list-editor.controller';
|
|
3
|
+
import './ibiz-cascader-dropdown.scss';
|
|
4
|
+
/**
|
|
5
|
+
* 移动端级联下拉列表(单选)
|
|
6
|
+
* @primary
|
|
7
|
+
* @description 使用van-cascader组件,用于选择树形代码表数据。基于`移动端下拉列表(单选)`编辑器扩展,编辑器样式代码名称为:CASCADER
|
|
8
|
+
* @ignoreprops autoFocus | overflowMode
|
|
9
|
+
* @ignoreemits infoTextChange | enter
|
|
10
|
+
*/
|
|
11
|
+
export declare const IBizCascaderDropdown: import("vue").DefineComponent<{
|
|
12
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
13
|
+
controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<DropDownListEditorController>, undefined, undefined>;
|
|
14
|
+
data: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<import("@ibiz-template/core").IApiData>, undefined, undefined>;
|
|
15
|
+
disabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
};
|
|
18
|
+
readonly: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
autoFocus: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
overflowMode: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
};
|
|
29
|
+
controlParams: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
required: boolean;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
35
|
+
c: DropDownListEditorController;
|
|
36
|
+
show: Ref<boolean>;
|
|
37
|
+
treeData: Ref<import("@ibiz-template/core").IApiData[]>;
|
|
38
|
+
selectValue: Ref<string | string[] | string[][] | null>;
|
|
39
|
+
curValue: import("vue").ComputedRef<any>;
|
|
40
|
+
onBlur: () => void;
|
|
41
|
+
onFocus: () => void;
|
|
42
|
+
openPopup: () => void;
|
|
43
|
+
onClose: () => void;
|
|
44
|
+
onChange: ($event: IData) => void;
|
|
45
|
+
onFinish: ($event: IData) => void;
|
|
46
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
change: (_value: unknown, _name?: string | undefined, _ignore?: boolean | undefined) => boolean;
|
|
48
|
+
blur: (_event?: import("@ibiz-template/core").IApiData | undefined) => boolean;
|
|
49
|
+
focus: (_event?: import("@ibiz-template/core").IApiData | undefined) => boolean;
|
|
50
|
+
enter: (_event?: import("@ibiz-template/core").IApiData | undefined) => boolean;
|
|
51
|
+
infoTextChange: (_text: string) => boolean;
|
|
52
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
54
|
+
controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<DropDownListEditorController>, undefined, undefined>;
|
|
55
|
+
data: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<import("@ibiz-template/core").IApiData>, undefined, undefined>;
|
|
56
|
+
disabled: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
};
|
|
59
|
+
readonly: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
autoFocus: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
overflowMode: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
};
|
|
70
|
+
controlParams: {
|
|
71
|
+
type: ObjectConstructor;
|
|
72
|
+
required: boolean;
|
|
73
|
+
};
|
|
74
|
+
}>> & {
|
|
75
|
+
onFocus?: ((_event?: import("@ibiz-template/core").IApiData | undefined) => any) | undefined;
|
|
76
|
+
onBlur?: ((_event?: import("@ibiz-template/core").IApiData | undefined) => any) | undefined;
|
|
77
|
+
onChange?: ((_value: unknown, _name?: string | undefined, _ignore?: boolean | undefined) => any) | undefined;
|
|
78
|
+
onInfoTextChange?: ((_text: string) => any) | undefined;
|
|
79
|
+
onEnter?: ((_event?: import("@ibiz-template/core").IApiData | undefined) => any) | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
readonly: boolean;
|
|
83
|
+
autoFocus: boolean;
|
|
84
|
+
}, {}>;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { ref, computed, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { getDropdownProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { isNil } from 'ramda';
|
|
4
|
+
import { IBizCommonRightIcon } from '../../common/right-icon/right-icon.mjs';
|
|
5
|
+
import '../../../util/index.mjs';
|
|
6
|
+
import './ibiz-cascader-dropdown.css';
|
|
7
|
+
import { usePopstateListener } from '../../../util/use-popstate-util/use-popstate-util.mjs';
|
|
8
|
+
|
|
9
|
+
"use strict";
|
|
10
|
+
const IBizCascaderDropdown = /* @__PURE__ */ defineComponent({
|
|
11
|
+
name: "IBizCascaderDropdown",
|
|
12
|
+
props: getDropdownProps(),
|
|
13
|
+
emits: getEditorEmits(),
|
|
14
|
+
setup(props, {
|
|
15
|
+
emit
|
|
16
|
+
}) {
|
|
17
|
+
const ns = useNamespace("cascader-dropdown");
|
|
18
|
+
const c = props.controller;
|
|
19
|
+
const treeData = ref([]);
|
|
20
|
+
const codeListMap = /* @__PURE__ */ new Map();
|
|
21
|
+
const selectValue = ref(null);
|
|
22
|
+
const show = ref(false);
|
|
23
|
+
const onClose = () => {
|
|
24
|
+
show.value = false;
|
|
25
|
+
};
|
|
26
|
+
const transformTreeData = (list, pValueField) => {
|
|
27
|
+
codeListMap.clear();
|
|
28
|
+
list.forEach((item) => {
|
|
29
|
+
codeListMap.set(item.value, {
|
|
30
|
+
...item
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const rootNodes = [];
|
|
34
|
+
if (pValueField) {
|
|
35
|
+
list.forEach((item) => {
|
|
36
|
+
const node = codeListMap.get(item.value);
|
|
37
|
+
if (isNil(item.data[pValueField])) {
|
|
38
|
+
rootNodes.push(node);
|
|
39
|
+
} else {
|
|
40
|
+
const parent = codeListMap.get(item.data[pValueField]);
|
|
41
|
+
if (parent) {
|
|
42
|
+
if (!parent.children) {
|
|
43
|
+
parent.children = [];
|
|
44
|
+
}
|
|
45
|
+
parent.children.push(node);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
rootNodes.push(...list);
|
|
51
|
+
}
|
|
52
|
+
return rootNodes;
|
|
53
|
+
};
|
|
54
|
+
const loadCodeList = async () => {
|
|
55
|
+
const codeList = await c.loadCodeList(props.data);
|
|
56
|
+
const {
|
|
57
|
+
pvaluefield
|
|
58
|
+
} = c.editorParams;
|
|
59
|
+
treeData.value = transformTreeData(codeList, pvaluefield);
|
|
60
|
+
};
|
|
61
|
+
loadCodeList();
|
|
62
|
+
const onFinish = ($event) => {
|
|
63
|
+
const {
|
|
64
|
+
value
|
|
65
|
+
} = $event;
|
|
66
|
+
onClose();
|
|
67
|
+
emit("change", value);
|
|
68
|
+
};
|
|
69
|
+
const onChange = ($event) => {
|
|
70
|
+
const {
|
|
71
|
+
value
|
|
72
|
+
} = $event;
|
|
73
|
+
emit("change", value);
|
|
74
|
+
};
|
|
75
|
+
const curValue = computed(() => {
|
|
76
|
+
const item = codeListMap.get(props.value || "");
|
|
77
|
+
return (item == null ? void 0 : item.text) || "";
|
|
78
|
+
});
|
|
79
|
+
const onBlur = () => {
|
|
80
|
+
emit("blur");
|
|
81
|
+
};
|
|
82
|
+
const onFocus = () => {
|
|
83
|
+
emit("focus");
|
|
84
|
+
};
|
|
85
|
+
const openPopup = () => {
|
|
86
|
+
if (props.disabled || props.readonly) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
show.value = !show.value;
|
|
90
|
+
};
|
|
91
|
+
usePopstateListener(onClose);
|
|
92
|
+
return {
|
|
93
|
+
ns,
|
|
94
|
+
c,
|
|
95
|
+
show,
|
|
96
|
+
treeData,
|
|
97
|
+
selectValue,
|
|
98
|
+
curValue,
|
|
99
|
+
onBlur,
|
|
100
|
+
onFocus,
|
|
101
|
+
openPopup,
|
|
102
|
+
onClose,
|
|
103
|
+
onChange,
|
|
104
|
+
onFinish
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
render() {
|
|
108
|
+
return createVNode("div", {
|
|
109
|
+
"class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""]
|
|
110
|
+
}, [this.readonly && this.curValue, !this.readonly && createVNode(resolveComponent("van-field"), {
|
|
111
|
+
"modelValue": this.curValue,
|
|
112
|
+
"onUpdate:modelValue": ($event) => this.curValue = $event,
|
|
113
|
+
"readonly": true,
|
|
114
|
+
"disabled": this.disabled,
|
|
115
|
+
"placeholder": this.c.placeHolder,
|
|
116
|
+
"onBlur": this.onBlur,
|
|
117
|
+
"onFocus": this.onFocus,
|
|
118
|
+
"onClick": this.openPopup
|
|
119
|
+
}, {
|
|
120
|
+
"right-icon": !this.readonly && createVNode(IBizCommonRightIcon, null, null)
|
|
121
|
+
}), createVNode(resolveComponent("van-popup"), {
|
|
122
|
+
"show": this.show,
|
|
123
|
+
"onUpdate:show": ($event) => this.show = $event,
|
|
124
|
+
"round": true,
|
|
125
|
+
"position": "bottom",
|
|
126
|
+
"teleport": "body",
|
|
127
|
+
"close-on-popstate": true
|
|
128
|
+
}, {
|
|
129
|
+
default: () => [createVNode(resolveComponent("van-cascader"), {
|
|
130
|
+
"modelValue": this.selectValue,
|
|
131
|
+
"onUpdate:modelValue": ($event) => this.selectValue = $event,
|
|
132
|
+
"title": this.c.placeHolder ? this.c.placeHolder : " ",
|
|
133
|
+
"options": this.treeData,
|
|
134
|
+
"onClose": this.onClose,
|
|
135
|
+
"onChange": this.onChange,
|
|
136
|
+
"onFinish": this.onFinish
|
|
137
|
+
}, null)]
|
|
138
|
+
})]);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export { IBizCascaderDropdown };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { IBizDropdown } from './ibiz-dropdown/ibiz-dropdown';
|
|
2
2
|
export { IBizEmojiPicker } from './ibiz-emoji-picker/ibiz-emoji-picker';
|
|
3
|
+
export { IBizCascaderDropdown } from './ibiz-cascader-dropdown/ibiz-cascader-dropdown';
|
|
3
4
|
export * from './dropdown-list-editor.controller';
|
|
4
5
|
export * from './dropdown-list-editor.provider';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { IBizDropdown } from './ibiz-dropdown/ibiz-dropdown.mjs';
|
|
2
2
|
export { IBizEmojiPicker } from './ibiz-emoji-picker/ibiz-emoji-picker.mjs';
|
|
3
|
+
export { IBizCascaderDropdown } from './ibiz-cascader-dropdown/ibiz-cascader-dropdown.mjs';
|
|
3
4
|
export { DropDownListEditorController } from './dropdown-list-editor.controller.mjs';
|
|
4
5
|
export { DropDownListEditorProvider } from './dropdown-list-editor.provider.mjs';
|
|
5
6
|
|
package/es/editor/index.mjs
CHANGED
|
@@ -32,6 +32,7 @@ import { IBizSwitch } from './switch/ibiz-switch/ibiz-switch.mjs';
|
|
|
32
32
|
import { IBizRadio } from './radio-button-list/ibiz-radio/ibiz-radio.mjs';
|
|
33
33
|
import { IBizDropdown } from './dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs';
|
|
34
34
|
import { IBizEmojiPicker } from './dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs';
|
|
35
|
+
import { IBizCascaderDropdown } from './dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.mjs';
|
|
35
36
|
import { IBizCheckboxList } from './check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs';
|
|
36
37
|
import { IBizSlider } from './slider/ibiz-slider/ibiz-slider.mjs';
|
|
37
38
|
import { IBizRaw } from './raw/ibiz-raw/ibiz-raw.mjs';
|
|
@@ -109,6 +110,7 @@ const IBizEditor = {
|
|
|
109
110
|
v.component(IBizDropdown.name, IBizDropdown);
|
|
110
111
|
v.component(IBizDropdownList.name, IBizDropdownList);
|
|
111
112
|
v.component(IBizEmojiPicker.name, IBizEmojiPicker);
|
|
113
|
+
v.component(IBizCascaderDropdown.name, IBizCascaderDropdown);
|
|
112
114
|
v.component(IBizCheckboxList.name, IBizCheckboxList);
|
|
113
115
|
v.component(IBizSlider.name, IBizSlider);
|
|
114
116
|
v.component(IBizRaw.name, IBizRaw);
|
|
@@ -177,6 +179,14 @@ const IBizEditor = {
|
|
|
177
179
|
"MOBDROPDOWNLIST_EMOJI_PICKER",
|
|
178
180
|
() => new DropDownListEditorProvider("EMOJI_PICKER")
|
|
179
181
|
);
|
|
182
|
+
registerEditorProvider(
|
|
183
|
+
"ROPDOWNLIST_CASCADER",
|
|
184
|
+
() => new DropDownListEditorProvider("MOBDROPDOWNLIST_CASCADER")
|
|
185
|
+
);
|
|
186
|
+
registerEditorProvider(
|
|
187
|
+
"MOBDROPDOWNLIST_CASCADER",
|
|
188
|
+
() => new DropDownListEditorProvider("MOBDROPDOWNLIST_CASCADER")
|
|
189
|
+
);
|
|
180
190
|
registerEditorProvider(
|
|
181
191
|
"MOBCHECKLIST",
|
|
182
192
|
() => new DropDownListEditorProvider("MOBCHECKLIST")
|
|
@@ -384,4 +394,4 @@ const IBizEditor = {
|
|
|
384
394
|
}
|
|
385
395
|
};
|
|
386
396
|
|
|
387
|
-
export { CascaderEditorProvider, CheckBoxListEditorProvider, ColorPickerEditorProvider, DataPickerEditorProvider, DatePickerEditorProvider, DateRangeEditorProvider, DropDownListEditorProvider, FileUploaderEditorProvider, HtmlEditorProvider, IBizCascader, IBizCheckboxList, IBizColorPicker, IBizDatePicker, IBizDateRangePicker, IBizDropdown, IBizEditor, IBizEditorCarousel, IBizEmojiPicker, IBizFileUpload, IBizImageCropping, IBizImageSelect, IBizImageUpload, IBizInput, IBizInputNumber, IBizMPicker, IBizNumberRangePicker, IBizPicker, IBizPickerSelectView, IBizRadio, IBizRate, IBizSignature, IBizSlider, IBizSpan, IBizStepper, IBizSwitch, MarkDownEditorProvider, NumberRangeEditorProvider, RadioButtonListEditorProvider, RateEditorProvider, SliderEditorProvider, SpanEditorProvider, StepperEditorProvider, SwitchEditorProvider, TextBoxEditorProvider, IBizEditor as default };
|
|
397
|
+
export { CascaderEditorProvider, CheckBoxListEditorProvider, ColorPickerEditorProvider, DataPickerEditorProvider, DatePickerEditorProvider, DateRangeEditorProvider, DropDownListEditorProvider, FileUploaderEditorProvider, HtmlEditorProvider, IBizCascader, IBizCascaderDropdown, IBizCheckboxList, IBizColorPicker, IBizDatePicker, IBizDateRangePicker, IBizDropdown, IBizEditor, IBizEditorCarousel, IBizEmojiPicker, IBizFileUpload, IBizImageCropping, IBizImageSelect, IBizImageUpload, IBizInput, IBizInputNumber, IBizMPicker, IBizNumberRangePicker, IBizPicker, IBizPickerSelectView, IBizRadio, IBizRate, IBizSignature, IBizSlider, IBizSpan, IBizStepper, IBizSwitch, MarkDownEditorProvider, NumberRangeEditorProvider, RadioButtonListEditorProvider, RateEditorProvider, SliderEditorProvider, SpanEditorProvider, StepperEditorProvider, SwitchEditorProvider, TextBoxEditorProvider, IBizEditor as default };
|
|
@@ -43,6 +43,7 @@ export declare const IBizInput: import("vue").DefineComponent<{
|
|
|
43
43
|
onClear: () => void;
|
|
44
44
|
inputRef: import("vue").Ref<any>;
|
|
45
45
|
showPassword: import("vue").Ref<boolean>;
|
|
46
|
+
enableshowpwd: boolean;
|
|
46
47
|
switchPwd: () => void;
|
|
47
48
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
48
49
|
change: (_value: unknown, _name?: string | undefined, _ignore?: boolean | undefined) => boolean;
|
|
@@ -20,13 +20,13 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
const editorModel = c.model;
|
|
21
21
|
const inputRef = ref();
|
|
22
22
|
const showPassword = ref(false);
|
|
23
|
-
let
|
|
23
|
+
let enableshowpwd = false;
|
|
24
24
|
const rows = ref(2);
|
|
25
25
|
if (editorModel.editorType === "TEXTAREA_10") {
|
|
26
26
|
rows.value = 10;
|
|
27
27
|
}
|
|
28
|
-
if (c.editorParams.
|
|
29
|
-
|
|
28
|
+
if (c.editorParams.enableshowpwd) {
|
|
29
|
+
enableshowpwd = c.editorParams.enableshowpwd === "true" || c.editorParams.enableshowpwd === "TRUE";
|
|
30
30
|
}
|
|
31
31
|
const type = computed(() => {
|
|
32
32
|
switch (editorModel.editorType) {
|
|
@@ -107,7 +107,7 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
emit("change", "");
|
|
108
108
|
};
|
|
109
109
|
const switchPwd = () => {
|
|
110
|
-
showPassword.value = !showPassword.value
|
|
110
|
+
showPassword.value = !showPassword.value;
|
|
111
111
|
};
|
|
112
112
|
return {
|
|
113
113
|
c,
|
|
@@ -122,6 +122,7 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
122
122
|
onClear,
|
|
123
123
|
inputRef,
|
|
124
124
|
showPassword,
|
|
125
|
+
enableshowpwd,
|
|
125
126
|
switchPwd
|
|
126
127
|
};
|
|
127
128
|
},
|
|
@@ -144,7 +145,7 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
144
145
|
}, [unitName]);
|
|
145
146
|
};
|
|
146
147
|
}
|
|
147
|
-
if (this.type === "password") {
|
|
148
|
+
if (this.type === "password" && this.enableshowpwd) {
|
|
148
149
|
slots["right-icon"] = () => {
|
|
149
150
|
return this.showPassword ? createVNode("ion-icon", {
|
|
150
151
|
"name": "eye-off-outline",
|
package/es/index.mjs
CHANGED
|
@@ -107,6 +107,7 @@ export { DateRangeEditorController } from './editor/date-range/date-range-editor
|
|
|
107
107
|
export { DateRangeEditorProvider } from './editor/date-range/date-range-editor.provider.mjs';
|
|
108
108
|
export { IBizDropdown } from './editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs';
|
|
109
109
|
export { IBizEmojiPicker } from './editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs';
|
|
110
|
+
export { IBizCascaderDropdown } from './editor/dropdown-list/ibiz-cascader-dropdown/ibiz-cascader-dropdown.mjs';
|
|
110
111
|
export { DropDownListEditorController } from './editor/dropdown-list/dropdown-list-editor.controller.mjs';
|
|
111
112
|
export { DropDownListEditorProvider } from './editor/dropdown-list/dropdown-list-editor.provider.mjs';
|
|
112
113
|
export { MarkDownEditorController } from './editor/markdown/markdown-editor.controller.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commonjsGlobal } from '../../../../../../../../_virtual/_commonjsHelpers.mjs';
|
|
2
|
-
import { __module as frameTalkClientPc$1 } from '../../../../../../../../_virtual/
|
|
2
|
+
import { __module as frameTalkClientPc$1 } from '../../../../../../../../_virtual/index13.mjs';
|
|
3
3
|
|
|
4
4
|
var frameTalkClientPc = frameTalkClientPc$1.exports;
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commonjsGlobal } from '../../../../../../../../_virtual/_commonjsHelpers.mjs';
|
|
2
|
-
import { __exports as middlewares } from '../../../../../../../../_virtual/
|
|
2
|
+
import { __exports as middlewares } from '../../../../../../../../_virtual/index12.mjs';
|
|
3
3
|
import '../../../../../../../../_virtual/bridge.mjs';
|
|
4
4
|
import { __require as requireRetry } from './retry.mjs';
|
|
5
5
|
import '../../../../../../../../_virtual/dealParamsAndResult.mjs';
|
package/es/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.mjs';
|
|
2
|
-
import { __module as lodash_clonedeep$1 } from '../../../../../_virtual/
|
|
2
|
+
import { __module as lodash_clonedeep$1 } from '../../../../../_virtual/index17.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.mjs';
|
|
2
|
-
import { __module as lodash_isequal$1 } from '../../../../../_virtual/
|
|
2
|
+
import { __module as lodash_isequal$1 } from '../../../../../_virtual/index18.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Lodash (Custom Build) <https://lodash.com/>
|
package/lib/_virtual/index12.cjs
CHANGED
package/lib/_virtual/index13.cjs
CHANGED
package/lib/_virtual/index17.cjs
CHANGED
package/lib/_virtual/index18.cjs
CHANGED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var ramda = require('ramda');
|
|
6
|
+
var rightIcon = require('../../common/right-icon/right-icon.cjs');
|
|
7
|
+
require('../../../util/index.cjs');
|
|
8
|
+
require('./ibiz-cascader-dropdown.css');
|
|
9
|
+
var usePopstateUtil = require('../../../util/use-popstate-util/use-popstate-util.cjs');
|
|
10
|
+
|
|
11
|
+
"use strict";
|
|
12
|
+
const IBizCascaderDropdown = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
+
name: "IBizCascaderDropdown",
|
|
14
|
+
props: vue3Util.getDropdownProps(),
|
|
15
|
+
emits: vue3Util.getEditorEmits(),
|
|
16
|
+
setup(props, {
|
|
17
|
+
emit
|
|
18
|
+
}) {
|
|
19
|
+
const ns = vue3Util.useNamespace("cascader-dropdown");
|
|
20
|
+
const c = props.controller;
|
|
21
|
+
const treeData = vue.ref([]);
|
|
22
|
+
const codeListMap = /* @__PURE__ */ new Map();
|
|
23
|
+
const selectValue = vue.ref(null);
|
|
24
|
+
const show = vue.ref(false);
|
|
25
|
+
const onClose = () => {
|
|
26
|
+
show.value = false;
|
|
27
|
+
};
|
|
28
|
+
const transformTreeData = (list, pValueField) => {
|
|
29
|
+
codeListMap.clear();
|
|
30
|
+
list.forEach((item) => {
|
|
31
|
+
codeListMap.set(item.value, {
|
|
32
|
+
...item
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const rootNodes = [];
|
|
36
|
+
if (pValueField) {
|
|
37
|
+
list.forEach((item) => {
|
|
38
|
+
const node = codeListMap.get(item.value);
|
|
39
|
+
if (ramda.isNil(item.data[pValueField])) {
|
|
40
|
+
rootNodes.push(node);
|
|
41
|
+
} else {
|
|
42
|
+
const parent = codeListMap.get(item.data[pValueField]);
|
|
43
|
+
if (parent) {
|
|
44
|
+
if (!parent.children) {
|
|
45
|
+
parent.children = [];
|
|
46
|
+
}
|
|
47
|
+
parent.children.push(node);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
rootNodes.push(...list);
|
|
53
|
+
}
|
|
54
|
+
return rootNodes;
|
|
55
|
+
};
|
|
56
|
+
const loadCodeList = async () => {
|
|
57
|
+
const codeList = await c.loadCodeList(props.data);
|
|
58
|
+
const {
|
|
59
|
+
pvaluefield
|
|
60
|
+
} = c.editorParams;
|
|
61
|
+
treeData.value = transformTreeData(codeList, pvaluefield);
|
|
62
|
+
};
|
|
63
|
+
loadCodeList();
|
|
64
|
+
const onFinish = ($event) => {
|
|
65
|
+
const {
|
|
66
|
+
value
|
|
67
|
+
} = $event;
|
|
68
|
+
onClose();
|
|
69
|
+
emit("change", value);
|
|
70
|
+
};
|
|
71
|
+
const onChange = ($event) => {
|
|
72
|
+
const {
|
|
73
|
+
value
|
|
74
|
+
} = $event;
|
|
75
|
+
emit("change", value);
|
|
76
|
+
};
|
|
77
|
+
const curValue = vue.computed(() => {
|
|
78
|
+
const item = codeListMap.get(props.value || "");
|
|
79
|
+
return (item == null ? void 0 : item.text) || "";
|
|
80
|
+
});
|
|
81
|
+
const onBlur = () => {
|
|
82
|
+
emit("blur");
|
|
83
|
+
};
|
|
84
|
+
const onFocus = () => {
|
|
85
|
+
emit("focus");
|
|
86
|
+
};
|
|
87
|
+
const openPopup = () => {
|
|
88
|
+
if (props.disabled || props.readonly) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
show.value = !show.value;
|
|
92
|
+
};
|
|
93
|
+
usePopstateUtil.usePopstateListener(onClose);
|
|
94
|
+
return {
|
|
95
|
+
ns,
|
|
96
|
+
c,
|
|
97
|
+
show,
|
|
98
|
+
treeData,
|
|
99
|
+
selectValue,
|
|
100
|
+
curValue,
|
|
101
|
+
onBlur,
|
|
102
|
+
onFocus,
|
|
103
|
+
openPopup,
|
|
104
|
+
onClose,
|
|
105
|
+
onChange,
|
|
106
|
+
onFinish
|
|
107
|
+
};
|
|
108
|
+
},
|
|
109
|
+
render() {
|
|
110
|
+
return vue.createVNode("div", {
|
|
111
|
+
"class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : ""]
|
|
112
|
+
}, [this.readonly && this.curValue, !this.readonly && vue.createVNode(vue.resolveComponent("van-field"), {
|
|
113
|
+
"modelValue": this.curValue,
|
|
114
|
+
"onUpdate:modelValue": ($event) => this.curValue = $event,
|
|
115
|
+
"readonly": true,
|
|
116
|
+
"disabled": this.disabled,
|
|
117
|
+
"placeholder": this.c.placeHolder,
|
|
118
|
+
"onBlur": this.onBlur,
|
|
119
|
+
"onFocus": this.onFocus,
|
|
120
|
+
"onClick": this.openPopup
|
|
121
|
+
}, {
|
|
122
|
+
"right-icon": !this.readonly && vue.createVNode(rightIcon.IBizCommonRightIcon, null, null)
|
|
123
|
+
}), vue.createVNode(vue.resolveComponent("van-popup"), {
|
|
124
|
+
"show": this.show,
|
|
125
|
+
"onUpdate:show": ($event) => this.show = $event,
|
|
126
|
+
"round": true,
|
|
127
|
+
"position": "bottom",
|
|
128
|
+
"teleport": "body",
|
|
129
|
+
"close-on-popstate": true
|
|
130
|
+
}, {
|
|
131
|
+
default: () => [vue.createVNode(vue.resolveComponent("van-cascader"), {
|
|
132
|
+
"modelValue": this.selectValue,
|
|
133
|
+
"onUpdate:modelValue": ($event) => this.selectValue = $event,
|
|
134
|
+
"title": this.c.placeHolder ? this.c.placeHolder : " ",
|
|
135
|
+
"options": this.treeData,
|
|
136
|
+
"onClose": this.onClose,
|
|
137
|
+
"onChange": this.onChange,
|
|
138
|
+
"onFinish": this.onFinish
|
|
139
|
+
}, null)]
|
|
140
|
+
})]);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
exports.IBizCascaderDropdown = IBizCascaderDropdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-cascader-dropdown{height:100%}.ibiz-cascader-dropdown .van-field{font-size:var(--ibiz-form-item-font-size)}.ibiz-cascader-dropdown .van-field::after{display:none}.ibiz-cascader-dropdown .van-cell--clickable:active{background-color:transparent}.ibiz-cascader-dropdown--disabled{color:var(--ibiz-form-item-disabled-color);--van-field-input-text-color:var(--ibiz-form-item-disabled-color)}.ibiz-cascader-dropdown--readonly{--van-field-input-text-color:var(--ibiz-form-item-readonly-color);color:var(--ibiz-form-item-readonly-color)}.ibiz-cascader-dropdown input{text-align:var(--ibiz-form-item-container-editor-align)}.ibiz-cascader-dropdown.ibiz-cascader--readonly{text-align:var(--ibiz-form-item-container-editor-align)}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var ibizDropdown = require('./ibiz-dropdown/ibiz-dropdown.cjs');
|
|
4
4
|
var ibizEmojiPicker = require('./ibiz-emoji-picker/ibiz-emoji-picker.cjs');
|
|
5
|
+
var ibizCascaderDropdown = require('./ibiz-cascader-dropdown/ibiz-cascader-dropdown.cjs');
|
|
5
6
|
var dropdownListEditor_controller = require('./dropdown-list-editor.controller.cjs');
|
|
6
7
|
var dropdownListEditor_provider = require('./dropdown-list-editor.provider.cjs');
|
|
7
8
|
|
|
@@ -9,5 +10,6 @@ var dropdownListEditor_provider = require('./dropdown-list-editor.provider.cjs')
|
|
|
9
10
|
|
|
10
11
|
exports.IBizDropdown = ibizDropdown.IBizDropdown;
|
|
11
12
|
exports.IBizEmojiPicker = ibizEmojiPicker.IBizEmojiPicker;
|
|
13
|
+
exports.IBizCascaderDropdown = ibizCascaderDropdown.IBizCascaderDropdown;
|
|
12
14
|
exports.DropDownListEditorController = dropdownListEditor_controller.DropDownListEditorController;
|
|
13
15
|
exports.DropDownListEditorProvider = dropdownListEditor_provider.DropDownListEditorProvider;
|