@farris/ui-vue 1.6.5-beta.7 → 1.6.5
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/components/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as f, computed as P, createVNode as t, Fragment as z, watch as Z, withModifiers as we, withDirectives as ye, vModelText as Ie, defineComponent as ee, createTextVNode as Y } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { useFilter as Se, useIdentify as ke, useHierarchy as be, useGroupData as Ve, useDataView as Fe, useSelection as De, usePagination as Me, useRow as Re, useEdit as Te, useVisualDataBound as Oe, useVisualDataCell as Be, useVisualDataRow as He, useVisualGroupRow as xe, useVisualSummaryRow as Pe, useVisualData as je, useSidebar as Le, useColumn as _e, useVirtualScroll as
|
|
2
|
+
import { getCustomClass as W, getCustomStyle as $ } from "../common/index.esm.js";
|
|
3
|
+
import { useFilter as Se, useIdentify as ke, useHierarchy as be, useGroupData as Ve, useDataView as Fe, useSelection as De, usePagination as Me, useRow as Re, useEdit as Te, useVisualDataBound as Oe, useVisualDataCell as Be, useVisualDataRow as He, useVisualGroupRow as xe, useVisualSummaryRow as Pe, useVisualData as je, useSidebar as Le, useColumn as _e, useVirtualScroll as Ae, getPagination as Ge } from "../data-view/index.esm.js";
|
|
4
4
|
import { useI18n as Ee } from "vue-i18n";
|
|
5
5
|
import { FCheckbox as K } from "../checkbox/index.esm.js";
|
|
6
6
|
const te = {
|
|
@@ -79,39 +79,39 @@ function ze(e, l) {
|
|
|
79
79
|
s.push(h), h = a.nextNode();
|
|
80
80
|
return s;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function S(a, s) {
|
|
83
83
|
const h = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
84
84
|
return w(h).map((p) => ({ textNode: p, text: (p.textContent || "").toLocaleLowerCase() })).map(({ textNode: p, text: i }) => {
|
|
85
85
|
const u = [];
|
|
86
86
|
let M = 0;
|
|
87
87
|
for (; M < i.length; ) {
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
88
|
+
const k = i.indexOf(s, M);
|
|
89
|
+
if (k === -1)
|
|
90
90
|
break;
|
|
91
|
-
u.push(
|
|
91
|
+
u.push(k), M = k + s.length;
|
|
92
92
|
}
|
|
93
|
-
return u.map((
|
|
94
|
-
const
|
|
95
|
-
return
|
|
93
|
+
return u.map((k) => {
|
|
94
|
+
const y = new Range();
|
|
95
|
+
return y.setStart(p, k), y.setEnd(p, k + s.length), y;
|
|
96
96
|
});
|
|
97
97
|
}).flat();
|
|
98
98
|
}
|
|
99
99
|
function C(a) {
|
|
100
100
|
if (!CSS.highlights || (CSS.highlights.clear(), !a || !l))
|
|
101
101
|
return;
|
|
102
|
-
const s =
|
|
102
|
+
const s = S(l.value, a.toLocaleLowerCase()), h = new Highlight(...s);
|
|
103
103
|
CSS.highlights.set("search-result", h);
|
|
104
104
|
}
|
|
105
105
|
return { search: C };
|
|
106
106
|
}
|
|
107
|
-
function q(e, l, w,
|
|
107
|
+
function q(e, l, w, S, C, a, s, h, O, g) {
|
|
108
108
|
const R = f(e.size), p = f(e.textField), i = f(e.titleField), u = f(e.disableField), M = P(() => {
|
|
109
109
|
var n, m;
|
|
110
110
|
return ((n = e.selection) == null ? void 0 : n.multiSelect) && ((m = e.selection) == null ? void 0 : m.showCheckbox);
|
|
111
111
|
}), {
|
|
112
|
-
onMouseenterItem:
|
|
113
|
-
onMouseoverItem:
|
|
114
|
-
onMouseoutItem:
|
|
112
|
+
onMouseenterItem: k,
|
|
113
|
+
onMouseoverItem: y,
|
|
114
|
+
onMouseoutItem: D
|
|
115
115
|
} = a, {
|
|
116
116
|
getKey: V,
|
|
117
117
|
listViewItemClass: T,
|
|
@@ -136,9 +136,9 @@ function q(e, l, w, k, C, a, s, h, O, g) {
|
|
|
136
136
|
key: V(n, m),
|
|
137
137
|
style: H(n, m),
|
|
138
138
|
onClick: (B) => c(n, m, B),
|
|
139
|
-
onMouseenter: (B) =>
|
|
140
|
-
onMouseover: (B) =>
|
|
141
|
-
onMouseout: (B) =>
|
|
139
|
+
onMouseenter: (B) => k(B, n, m),
|
|
140
|
+
onMouseover: (B) => y(B, n, m),
|
|
141
|
+
onMouseout: (B) => D(B, n, m)
|
|
142
142
|
}, [M.value && t("div", {
|
|
143
143
|
class: "f-list-select",
|
|
144
144
|
onClick: (B) => B.stopPropagation()
|
|
@@ -163,14 +163,14 @@ function q(e, l, w, k, C, a, s, h, O, g) {
|
|
|
163
163
|
renderItem: v
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function Ne(e, l, w,
|
|
166
|
+
function Ne(e, l, w, S, C, a, s, h, O, g) {
|
|
167
167
|
const R = f(e.multiSelect), p = f(e.disableField), i = f(e.textField), {
|
|
168
168
|
onMouseenterItem: u,
|
|
169
169
|
onMouseoverItem: M,
|
|
170
|
-
onMouseoutItem:
|
|
170
|
+
onMouseoutItem: k
|
|
171
171
|
} = a, {
|
|
172
|
-
getKey:
|
|
173
|
-
listViewItemClass:
|
|
172
|
+
getKey: y,
|
|
173
|
+
listViewItemClass: D,
|
|
174
174
|
listViewItemStyle: V,
|
|
175
175
|
onCheckItem: T,
|
|
176
176
|
onClickItem: H
|
|
@@ -190,19 +190,19 @@ function Ne(e, l, w, k, C, a, s, h, O, g) {
|
|
|
190
190
|
}
|
|
191
191
|
function c(o, v, n) {
|
|
192
192
|
return t("li", {
|
|
193
|
-
class:
|
|
194
|
-
id:
|
|
195
|
-
key:
|
|
193
|
+
class: D(o, v),
|
|
194
|
+
id: y(o, v),
|
|
195
|
+
key: y(o, v),
|
|
196
196
|
style: V(o, v),
|
|
197
197
|
onClick: (m) => H(o, v, m),
|
|
198
198
|
onMouseenter: (m) => u(m, o, v),
|
|
199
199
|
onMouseover: (m) => M(m, o, v),
|
|
200
|
-
onMouseout: (m) =>
|
|
200
|
+
onMouseout: (m) => k(m, o, v)
|
|
201
201
|
}, [R.value && t("div", {
|
|
202
202
|
class: "f-list-select",
|
|
203
203
|
onClick: (m) => m.stopPropagation()
|
|
204
204
|
}, [t(K, {
|
|
205
|
-
id: "list-" +
|
|
205
|
+
id: "list-" + y(o, v),
|
|
206
206
|
customClass: "listview-checkbox",
|
|
207
207
|
disabled: o[p.value] || !o.checked,
|
|
208
208
|
checked: o.checked,
|
|
@@ -216,14 +216,14 @@ function Ne(e, l, w, k, C, a, s, h, O, g) {
|
|
|
216
216
|
renderItem: c
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
function Ue(e, l, w,
|
|
219
|
+
function Ue(e, l, w, S, C, a, s, h, O, g) {
|
|
220
220
|
const R = f(e.multiSelect), p = f(e.disableField), i = f(e.textField), {
|
|
221
221
|
onMouseenterItem: u,
|
|
222
222
|
onMouseoverItem: M,
|
|
223
|
-
onMouseoutItem:
|
|
223
|
+
onMouseoutItem: k
|
|
224
224
|
} = a, {
|
|
225
|
-
getKey:
|
|
226
|
-
listViewItemClass:
|
|
225
|
+
getKey: y,
|
|
226
|
+
listViewItemClass: D,
|
|
227
227
|
onCheckItem: V,
|
|
228
228
|
onClickItem: T
|
|
229
229
|
} = s, {
|
|
@@ -231,7 +231,7 @@ function Ue(e, l, w, k, C, a, s, h, O, g) {
|
|
|
231
231
|
dragenter: j,
|
|
232
232
|
dragover: c,
|
|
233
233
|
dragend: o
|
|
234
|
-
} =
|
|
234
|
+
} = S, {
|
|
235
235
|
removeItem: v
|
|
236
236
|
} = O, n = P(() => ({
|
|
237
237
|
margin: R.value ? "10px 0" : "10px 0px 10px 14px"
|
|
@@ -249,36 +249,38 @@ function Ue(e, l, w, k, C, a, s, h, O, g) {
|
|
|
249
249
|
function B() {
|
|
250
250
|
return l.slots.itemContent ? l.slots.itemContent : L;
|
|
251
251
|
}
|
|
252
|
-
const
|
|
253
|
-
function
|
|
252
|
+
const A = B();
|
|
253
|
+
function I(r, d, x) {
|
|
254
254
|
return t("li", {
|
|
255
|
-
class:
|
|
256
|
-
id:
|
|
257
|
-
key:
|
|
258
|
-
onClick: (
|
|
259
|
-
onMouseenter: (
|
|
260
|
-
onMouseover: (
|
|
261
|
-
onMouseout: (
|
|
255
|
+
class: D(r, d),
|
|
256
|
+
id: y(r, d),
|
|
257
|
+
key: y(r, d),
|
|
258
|
+
onClick: (F) => T(r, d, F),
|
|
259
|
+
onMouseenter: (F) => u(F, r, d),
|
|
260
|
+
onMouseover: (F) => M(F, r, d),
|
|
261
|
+
onMouseout: (F) => k(F, r, d),
|
|
262
262
|
draggable: "true",
|
|
263
|
-
onDragstart: (
|
|
264
|
-
onDragenter: (
|
|
265
|
-
onDragend: (
|
|
266
|
-
onDragover: (
|
|
263
|
+
onDragstart: (F) => H(F, r, d),
|
|
264
|
+
onDragenter: (F) => j(F, d),
|
|
265
|
+
onDragend: (F) => o(F, r),
|
|
266
|
+
onDragover: (F) => c(F)
|
|
267
267
|
}, [R.value && t("div", {
|
|
268
268
|
class: "f-list-select",
|
|
269
|
-
onClick: (
|
|
269
|
+
onClick: (F) => F.stopPropagation()
|
|
270
270
|
}, [t(K, {
|
|
271
|
-
id: "list-" +
|
|
271
|
+
id: "list-" + y(r, d),
|
|
272
272
|
customClass: "listview-checkbox",
|
|
273
273
|
disabled: r[p.value] || !r.checked,
|
|
274
274
|
checked: r.checked,
|
|
275
|
-
"onUpdate:checked": (
|
|
276
|
-
onChange: (
|
|
275
|
+
"onUpdate:checked": (F) => r.checked = F,
|
|
276
|
+
onChange: (F) => V(r, d, !F.checked)
|
|
277
277
|
}, null)]), t("div", {
|
|
278
278
|
class: "f-list-content"
|
|
279
|
-
}, [
|
|
279
|
+
}, [A(r)]), t("div", {
|
|
280
280
|
class: "f-list-remove",
|
|
281
|
-
onClick: (
|
|
281
|
+
onClick: (F) => {
|
|
282
|
+
F.stopPropagation(), v(d);
|
|
283
|
+
}
|
|
282
284
|
}, [t("div", {
|
|
283
285
|
class: "f-list-remove-icon"
|
|
284
286
|
}, [t("i", {
|
|
@@ -290,44 +292,44 @@ function Ue(e, l, w, k, C, a, s, h, O, g) {
|
|
|
290
292
|
}, null)])])]);
|
|
291
293
|
}
|
|
292
294
|
return {
|
|
293
|
-
renderItem:
|
|
295
|
+
renderItem: I
|
|
294
296
|
};
|
|
295
297
|
}
|
|
296
|
-
function We(e, l, w,
|
|
297
|
-
var
|
|
298
|
-
const R = f(((
|
|
298
|
+
function We(e, l, w, S, C, a, s, h, O, g) {
|
|
299
|
+
var y;
|
|
300
|
+
const R = f(((y = e.group) == null ? void 0 : y.groupFields) || []), {
|
|
299
301
|
collpaseGroupIconClass: p
|
|
300
302
|
} = C, {
|
|
301
303
|
toggleGroupRow: i
|
|
302
304
|
} = g;
|
|
303
|
-
function u(
|
|
305
|
+
function u(D, V) {
|
|
304
306
|
V.collapse = !V.collapse, w.value = i(V.collapse ? "collapse" : "expand", V, w.value);
|
|
305
307
|
}
|
|
306
|
-
function M(
|
|
308
|
+
function M(D, V, T) {
|
|
307
309
|
return l.slots.group ? t(z, null, [l.slots.content && l.slots.group({
|
|
308
|
-
item:
|
|
310
|
+
item: D.raw,
|
|
309
311
|
index: V,
|
|
310
312
|
selectedItem: T
|
|
311
313
|
})]) : t("div", {
|
|
312
314
|
class: "f-navlookup-recentHeader",
|
|
313
|
-
onClick: (H) => u(H,
|
|
315
|
+
onClick: (H) => u(H, D)
|
|
314
316
|
}, [t("div", {
|
|
315
317
|
class: "fv-grid-group-row-icon"
|
|
316
318
|
}, [t("span", {
|
|
317
|
-
class: p(
|
|
319
|
+
class: p(D)
|
|
318
320
|
}, null)]), t("div", {
|
|
319
321
|
class: "f-navlookup-recommandLabel"
|
|
320
|
-
}, [
|
|
322
|
+
}, [D.raw[R.value[D.layer]]])]);
|
|
321
323
|
}
|
|
322
|
-
function
|
|
323
|
-
return
|
|
324
|
+
function k(D, V, T) {
|
|
325
|
+
return D.layer > -1 && M(D, V, T);
|
|
324
326
|
}
|
|
325
327
|
return {
|
|
326
|
-
renderItem:
|
|
328
|
+
renderItem: k
|
|
327
329
|
};
|
|
328
330
|
}
|
|
329
|
-
function Ke(e, l, w,
|
|
330
|
-
const { dataView: C } = w, { updateSelectedItems: a } =
|
|
331
|
+
function Ke(e, l, w, S) {
|
|
332
|
+
const { dataView: C } = w, { updateSelectedItems: a } = S;
|
|
331
333
|
function s(h) {
|
|
332
334
|
if (h > -1 && h < C.value.length) {
|
|
333
335
|
if (e != null && e.checkBeforeRemoveItem && !e.checkBeforeRemoveItem(C.value[h]))
|
|
@@ -338,24 +340,24 @@ function Ke(e, l, w, k) {
|
|
|
338
340
|
}
|
|
339
341
|
return { removeItem: s };
|
|
340
342
|
}
|
|
341
|
-
function Xe(e, l, w,
|
|
343
|
+
function Xe(e, l, w, S, C, a, s, h, O, g) {
|
|
342
344
|
const {
|
|
343
345
|
t: R
|
|
344
|
-
} = Ee(), p = f(e.view), i = f(e.view === "CardView"), u = f({}), M = f(R("listView.emptyMessage")),
|
|
346
|
+
} = Ee(), p = f(e.view), i = f(e.view === "CardView"), u = f({}), M = f(R("listView.emptyMessage")), k = Ke(e, l, S, O), y = P(() => ({
|
|
345
347
|
"f-list-view-group": !0,
|
|
346
348
|
"f-list-view-group-multiselect": e.multiSelect,
|
|
347
349
|
"d-flex": i.value,
|
|
348
350
|
"flex-wrap": i.value
|
|
349
|
-
})),
|
|
351
|
+
})), D = P(() => !!w.value && w.value.length > 0), V = P(() => w.value.length === 0);
|
|
350
352
|
P(() => V.value && !l.slots.empty);
|
|
351
353
|
function T() {
|
|
352
354
|
return p.value === "SingleView" ? q : p.value === "DraggableView" ? Ue : (p.value === "ContentView" || p.value === "CardView") && (e.contentTemplate || l.slots.content) ? Ne : q;
|
|
353
355
|
}
|
|
354
356
|
const H = T(), {
|
|
355
357
|
renderItem: j
|
|
356
|
-
} = H(e, l, w, g, C, a, O, s,
|
|
358
|
+
} = H(e, l, w, g, C, a, O, s, k, h), {
|
|
357
359
|
renderItem: c
|
|
358
|
-
} = We(e, l, w, g, C, a, O, s,
|
|
360
|
+
} = We(e, l, w, g, C, a, O, s, k, h), o = [j, c];
|
|
359
361
|
function v() {
|
|
360
362
|
return w.value.filter((L) => L.visible !== !1).map((L, B) => o[L.type](L, B, u));
|
|
361
363
|
}
|
|
@@ -369,26 +371,26 @@ function Xe(e, l, w, k, C, a, s, h, O, g) {
|
|
|
369
371
|
}
|
|
370
372
|
function m() {
|
|
371
373
|
return t("ul", {
|
|
372
|
-
class:
|
|
374
|
+
class: y.value,
|
|
373
375
|
style: "list-style: none;"
|
|
374
|
-
}, [
|
|
376
|
+
}, [D.value && v(), V.value && n()]);
|
|
375
377
|
}
|
|
376
378
|
return {
|
|
377
379
|
renderListArea: m
|
|
378
380
|
};
|
|
379
381
|
}
|
|
380
382
|
function Ye(e, l, w) {
|
|
381
|
-
function
|
|
383
|
+
function S() {
|
|
382
384
|
return l.slots.header && t("div", {
|
|
383
385
|
class: "f-list-view-header"
|
|
384
386
|
}, [l.slots.header()]);
|
|
385
387
|
}
|
|
386
388
|
return {
|
|
387
|
-
renderHeader:
|
|
389
|
+
renderHeader: S
|
|
388
390
|
};
|
|
389
391
|
}
|
|
390
392
|
function J(e, l, w) {
|
|
391
|
-
const
|
|
393
|
+
const S = f(e.headerClass), C = f(e.placeholder), a = f(""), s = P(() => !a.value), h = P(() => !!a.value);
|
|
392
394
|
function O(i) {
|
|
393
395
|
a.value = "";
|
|
394
396
|
}
|
|
@@ -400,7 +402,7 @@ function J(e, l, w) {
|
|
|
400
402
|
"form-group": !0,
|
|
401
403
|
"farris-form-group": !0
|
|
402
404
|
};
|
|
403
|
-
return
|
|
405
|
+
return S.value && S.value.split(" ").reduce((M, k) => (M[k] = !0, M), i), i;
|
|
404
406
|
});
|
|
405
407
|
function R(i) {
|
|
406
408
|
}
|
|
@@ -441,15 +443,15 @@ function J(e, l, w) {
|
|
|
441
443
|
};
|
|
442
444
|
}
|
|
443
445
|
function $e() {
|
|
444
|
-
const e = f(""), l = f(-1), w = f(""),
|
|
446
|
+
const e = f(""), l = f(-1), w = f(""), S = f(-1), C = f(!1);
|
|
445
447
|
function a(p, i, u) {
|
|
446
|
-
|
|
448
|
+
S.value = u;
|
|
447
449
|
}
|
|
448
450
|
function s(p, i, u) {
|
|
449
|
-
C.value || (
|
|
451
|
+
C.value || (S.value = u);
|
|
450
452
|
}
|
|
451
453
|
function h(p, i, u) {
|
|
452
|
-
|
|
454
|
+
S.value = -1;
|
|
453
455
|
}
|
|
454
456
|
function O() {
|
|
455
457
|
C.value = !0;
|
|
@@ -463,7 +465,7 @@ function $e() {
|
|
|
463
465
|
return {
|
|
464
466
|
activeIndex: l,
|
|
465
467
|
focusedItemId: w,
|
|
466
|
-
hoverIndex:
|
|
468
|
+
hoverIndex: S,
|
|
467
469
|
clearActiveItem: R,
|
|
468
470
|
onMouseenterItem: a,
|
|
469
471
|
onMouseoverItem: s,
|
|
@@ -472,14 +474,14 @@ function $e() {
|
|
|
472
474
|
suspendHover: O
|
|
473
475
|
};
|
|
474
476
|
}
|
|
475
|
-
function qe(e, l, w,
|
|
476
|
-
const C = f(e.idField), { dataView: a } = w, s = f(-1), h = f(!1), { activeIndex: O, focusedItemId: g, hoverIndex: R, resumeHover: p, suspendHover: i } =
|
|
477
|
-
let u, M = 0,
|
|
478
|
-
function
|
|
479
|
-
const v = c - M, n = o -
|
|
480
|
-
u.style.left = parseInt(u.style.left) + v + "px", u.style.top = parseInt(u.style.top) + n + "px", M = c,
|
|
481
|
-
}
|
|
482
|
-
function
|
|
477
|
+
function qe(e, l, w, S) {
|
|
478
|
+
const C = f(e.idField), { dataView: a } = w, s = f(-1), h = f(!1), { activeIndex: O, focusedItemId: g, hoverIndex: R, resumeHover: p, suspendHover: i } = S;
|
|
479
|
+
let u, M = 0, k = 0;
|
|
480
|
+
function y(c, o) {
|
|
481
|
+
const v = c - M, n = o - k;
|
|
482
|
+
u.style.left = parseInt(u.style.left) + v + "px", u.style.top = parseInt(u.style.top) + n + "px", M = c, k = o;
|
|
483
|
+
}
|
|
484
|
+
function D(c) {
|
|
483
485
|
const { left: o, top: v } = c.getBoundingClientRect(), n = c.cloneNode(!0);
|
|
484
486
|
return n.style.cssText = `
|
|
485
487
|
position:absolute;
|
|
@@ -504,11 +506,11 @@ function qe(e, l, w, k) {
|
|
|
504
506
|
}
|
|
505
507
|
function V(c, o, v) {
|
|
506
508
|
if (c.stopPropagation(), i(), o) {
|
|
507
|
-
if (u =
|
|
509
|
+
if (u = D(c.target), c.dataTransfer) {
|
|
508
510
|
const n = new Image();
|
|
509
511
|
n.src = "", c.dataTransfer.setDragImage(n, 0, 0);
|
|
510
512
|
}
|
|
511
|
-
M = c.pageX,
|
|
513
|
+
M = c.pageX, k = c.pageY, setTimeout(() => {
|
|
512
514
|
s.value = v, h.value = !0, o.moving = !0;
|
|
513
515
|
});
|
|
514
516
|
}
|
|
@@ -516,11 +518,11 @@ function qe(e, l, w, k) {
|
|
|
516
518
|
function T(c, o) {
|
|
517
519
|
if (c.preventDefault(), s.value !== o) {
|
|
518
520
|
const v = a.value[s.value], n = a.value;
|
|
519
|
-
n.splice(s.value, 1), n.splice(o, 0, v), s.value = o,
|
|
521
|
+
n.splice(s.value, 1), n.splice(o, 0, v), s.value = o, y(c.pageX, c.pageY);
|
|
520
522
|
}
|
|
521
523
|
}
|
|
522
524
|
function H(c) {
|
|
523
|
-
c.preventDefault(), c.dataTransfer && (c.dataTransfer.dropEffect = "move"),
|
|
525
|
+
c.preventDefault(), c.dataTransfer && (c.dataTransfer.dropEffect = "move"), y(c.pageX, c.pageY);
|
|
524
526
|
}
|
|
525
527
|
function j(c, o) {
|
|
526
528
|
o && (o.moving = !1, u && (document.body.removeChild(u), u = null)), a.value.forEach((v, n) => {
|
|
@@ -535,66 +537,66 @@ function qe(e, l, w, k) {
|
|
|
535
537
|
isDragging: h
|
|
536
538
|
};
|
|
537
539
|
}
|
|
538
|
-
function Je(e, l, w,
|
|
540
|
+
function Je(e, l, w, S, C, a) {
|
|
539
541
|
const s = f(e.idField), h = f(e.disableField), O = f(e.draggable);
|
|
540
542
|
f(e.itemClass);
|
|
541
|
-
const g = f(e.selection.multiSelect ?? !1), R = f(e.selection.multiSelectMode), { isDragging: p } =
|
|
543
|
+
const g = f(e.selection.multiSelect ?? !1), R = f(e.selection.multiSelectMode), { isDragging: p } = S, { activeIndex: i, focusedItemId: u, hoverIndex: M } = C, { clearSelection: k, getSelectedItems: y, toggleSelectItem: D, currentSelectedDataId: V } = a, T = f(y()), H = (I) => T.value.length === 0 ? !1 : T.value.some((r) => {
|
|
542
544
|
let d = "";
|
|
543
|
-
return r.data ? d = r.data[s.value] : d = r[s.value], d ===
|
|
545
|
+
return r.data ? d = r.data[s.value] : d = r[s.value], d === I;
|
|
544
546
|
});
|
|
545
547
|
function j() {
|
|
546
|
-
T.value =
|
|
548
|
+
T.value = y();
|
|
547
549
|
}
|
|
548
|
-
function c(
|
|
549
|
-
return
|
|
550
|
+
function c(I, r) {
|
|
551
|
+
return I.raw[s.value] != null ? I.raw[s.value] : "";
|
|
550
552
|
}
|
|
551
|
-
function o(
|
|
553
|
+
function o(I, r) {
|
|
552
554
|
const d = {
|
|
553
555
|
"f-list-view-group-item": !0,
|
|
554
556
|
"f-list-view-draggable-item": O.value,
|
|
555
|
-
"f-un-click": !
|
|
556
|
-
"f-un-select": !!
|
|
557
|
+
"f-un-click": !I.checked,
|
|
558
|
+
"f-un-select": !!I.raw[h.value],
|
|
557
559
|
"f-listview-active": (
|
|
558
560
|
// 多选
|
|
559
|
-
g.value && H(c(
|
|
560
|
-
!g.value &&
|
|
561
|
+
g.value && H(c(I)) || // 单选
|
|
562
|
+
!g.value && I.raw[s.value] === V.value
|
|
561
563
|
),
|
|
562
564
|
"f-listview-hover": !p.value && r === M.value,
|
|
563
|
-
moving: !!
|
|
565
|
+
moving: !!I.moving
|
|
564
566
|
};
|
|
565
567
|
if (typeof e.itemClass == "string")
|
|
566
568
|
return W(d, e.itemClass);
|
|
567
569
|
if (typeof e.itemClass == "function") {
|
|
568
|
-
const x = e.itemClass(
|
|
570
|
+
const x = e.itemClass(I);
|
|
569
571
|
return W(d, x);
|
|
570
572
|
}
|
|
571
573
|
return d;
|
|
572
574
|
}
|
|
573
|
-
function v(
|
|
575
|
+
function v(I, r) {
|
|
574
576
|
const d = (
|
|
575
577
|
// 多选
|
|
576
|
-
g.value && H(c(
|
|
577
|
-
!g.value &&
|
|
578
|
+
g.value && H(c(I)) || // 单选
|
|
579
|
+
!g.value && I.raw[s.value] === V.value
|
|
578
580
|
), x = {};
|
|
579
581
|
if (d && (x.backgroundColor = "#dae9ff"), typeof e.itemStyle == "string")
|
|
580
582
|
return $(x, e.itemStyle);
|
|
581
583
|
if (typeof e.itemStyle == "function") {
|
|
582
|
-
const
|
|
583
|
-
return $(x,
|
|
584
|
+
const F = e.itemStyle(I);
|
|
585
|
+
return $(x, F);
|
|
584
586
|
}
|
|
585
587
|
return x;
|
|
586
588
|
}
|
|
587
589
|
const n = P(() => !g.value);
|
|
588
|
-
function m(
|
|
589
|
-
|
|
590
|
+
function m(I, r, d) {
|
|
591
|
+
I.checked = d, !I.raw[h.value] && (n.value && (u.value = I.raw[s.value]), D(I));
|
|
590
592
|
}
|
|
591
593
|
const L = P(() => g.value && R.value === "OnCheckClearByClick"), B = P(() => !g.value || g.value && (R.value === "OnCheckAndClick" || R.value === "OnClick"));
|
|
592
|
-
function
|
|
593
|
-
if (
|
|
594
|
+
function A(I, r, d) {
|
|
595
|
+
if (I.raw[h.value]) {
|
|
594
596
|
d == null || d.preventDefault(), d == null || d.stopPropagation();
|
|
595
597
|
return;
|
|
596
598
|
}
|
|
597
|
-
u.value =
|
|
599
|
+
u.value = I.raw[s.value], i.value = r, L.value && k(), B.value && (D(I), j()), l.emit("clickItem", { data: T.value, index: r, dataItem: I.raw }), l.emit("activeChange", T.value);
|
|
598
600
|
}
|
|
599
601
|
return {
|
|
600
602
|
getKey: c,
|
|
@@ -603,7 +605,7 @@ function Je(e, l, w, k, C, a) {
|
|
|
603
605
|
listViewItemStyle: v,
|
|
604
606
|
updateSelectedItems: j,
|
|
605
607
|
onCheckItem: m,
|
|
606
|
-
onClickItem:
|
|
608
|
+
onClickItem: A
|
|
607
609
|
};
|
|
608
610
|
}
|
|
609
611
|
const U = /* @__PURE__ */ ee({
|
|
@@ -611,30 +613,30 @@ const U = /* @__PURE__ */ ee({
|
|
|
611
613
|
props: te,
|
|
612
614
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectItem", "unSelectItem", "selectionChange", "removeItem", "change", "activeChange", "pageIndexChanged", "pageSizeChanged", "changed", "selectionUpdate"],
|
|
613
615
|
setup(e, l) {
|
|
614
|
-
const w = f(),
|
|
616
|
+
const w = f(), S = f(!0), C = f(!1), a = f([]), s = 0, h = f(e.columns), O = Se(e, l), g = ke(e), R = be(e), p = Ve(e, g), i = Fe(e, /* @__PURE__ */ new Map(), O, R, g), u = De(e, i, g, a, l), M = ze(e, w), k = Me(e, i), y = P(() => i.dataView.value.length), D = Re(e, l, u, g), V = Te(e, l, g, D, a), T = Oe(e), H = Be(e, {}, T), j = He(e, i, V, R, g, T, H), c = xe(e, g, H, j), o = Pe(e, g, H, j), v = je(e, h, i, y, s, j, c, o), {
|
|
615
617
|
getVisualData: n
|
|
616
618
|
} = v;
|
|
617
|
-
a.value = n(0,
|
|
619
|
+
a.value = n(0, y.value + s - 1);
|
|
618
620
|
const m = P(() => {
|
|
619
621
|
const b = {
|
|
620
622
|
"f-list-view": !0,
|
|
621
623
|
"f-list-view-multiple": e.multiSelect
|
|
622
624
|
};
|
|
623
625
|
return e.size !== "default" && (b[`${e.size}-item`] = !0), W(b, e.customClass);
|
|
624
|
-
}), L = P(() => !!l.slots.footer ||
|
|
626
|
+
}), L = P(() => !!l.slots.footer || S.value);
|
|
625
627
|
function B() {
|
|
626
628
|
return e.header === "SearchBar" ? J : e.header === "ContentHeader" ? Ye : J;
|
|
627
629
|
}
|
|
628
|
-
const
|
|
629
|
-
renderHeader:
|
|
630
|
-
} =
|
|
631
|
-
renderListArea:
|
|
630
|
+
const A = B(), {
|
|
631
|
+
renderHeader: I
|
|
632
|
+
} = A(e, l, M), r = $e(), d = qe(e, l, i, r), x = Je(e, l, a, d, r, u), {
|
|
633
|
+
renderListArea: F
|
|
632
634
|
} = Xe(e, l, a, i, p, r, u, v, x, d);
|
|
633
635
|
function ne(b) {
|
|
634
636
|
M.search(b);
|
|
635
637
|
}
|
|
636
638
|
function le(b) {
|
|
637
|
-
b && (i.load(b), a.value = n(0,
|
|
639
|
+
b && (i.load(b), a.value = n(0, y.value + s - 1));
|
|
638
640
|
}
|
|
639
641
|
function ae() {
|
|
640
642
|
u.clearSelection(), r.clearActiveItem();
|
|
@@ -652,18 +654,18 @@ const U = /* @__PURE__ */ ee({
|
|
|
652
654
|
return u.currentSelectedDataId.value;
|
|
653
655
|
}
|
|
654
656
|
function ue(b) {
|
|
655
|
-
|
|
657
|
+
D.activeRowById(b);
|
|
656
658
|
}
|
|
657
659
|
function ce(b) {
|
|
658
|
-
const _ = g.idField.value,
|
|
659
|
-
|
|
660
|
+
const _ = g.idField.value, G = a.value.find((N) => N.raw[_] === b), E = a.value.findIndex((N) => N.raw[_] === b);
|
|
661
|
+
G && E > -1 && x.onClickItem(G, E);
|
|
660
662
|
}
|
|
661
663
|
function re(b) {
|
|
662
|
-
const _ = g.idField.value,
|
|
663
|
-
|
|
664
|
+
const _ = g.idField.value, G = a.value.find((E) => E.raw[_] === b);
|
|
665
|
+
G && D.changeRow(G);
|
|
664
666
|
}
|
|
665
667
|
function de(b) {
|
|
666
|
-
|
|
668
|
+
k.updatePagination(b);
|
|
667
669
|
}
|
|
668
670
|
function fe(b) {
|
|
669
671
|
return a.value.filter((_) => b.includes(_.raw[e.idField]));
|
|
@@ -695,15 +697,11 @@ const U = /* @__PURE__ */ ee({
|
|
|
695
697
|
applyColumnSorter: Ze,
|
|
696
698
|
columnContext: Ce,
|
|
697
699
|
updateColumnRenderContext: et
|
|
698
|
-
} = he, pe =
|
|
699
|
-
|
|
700
|
-
} = y, {
|
|
701
|
-
renderDataGridPagination: nt
|
|
702
|
-
} = Ae(e, l, i, pe, y, u);
|
|
703
|
-
return () => t("div", {
|
|
700
|
+
} = he, pe = Ae(e, i, a, Ce, v, y, s, ge, V);
|
|
701
|
+
return Ge(e, l, i, pe, k, u), () => t("div", {
|
|
704
702
|
class: m.value,
|
|
705
703
|
onClick: ve
|
|
706
|
-
}, [
|
|
704
|
+
}, [I(), t("div", {
|
|
707
705
|
ref: w,
|
|
708
706
|
class: "f-list-view-content",
|
|
709
707
|
onMouseover: () => {
|
|
@@ -712,7 +710,7 @@ const U = /* @__PURE__ */ ee({
|
|
|
712
710
|
onMouseleave: () => {
|
|
713
711
|
C.value = !1;
|
|
714
712
|
}
|
|
715
|
-
}, [
|
|
713
|
+
}, [F()]), L.value && t("div", {
|
|
716
714
|
class: "f-list-view-footer"
|
|
717
715
|
}, [e.footerTemplate ? e.footerTemplate() : l.slots.footer && l.slots.footer()])]);
|
|
718
716
|
}
|
|
@@ -756,10 +754,10 @@ const U = /* @__PURE__ */ ee({
|
|
|
756
754
|
desc: "导游5",
|
|
757
755
|
amount: 84.13,
|
|
758
756
|
avatar: "./assets/avatar5.png"
|
|
759
|
-
}],
|
|
757
|
+
}], S = P(() => e.data.length > 0 ? e.data : w);
|
|
760
758
|
return () => {
|
|
761
759
|
var C;
|
|
762
|
-
return t(z, null, [(C =
|
|
760
|
+
return t(z, null, [(C = S.value) == null ? void 0 : C.map((a) => t("div", {
|
|
763
761
|
class: "f-template-listview-row"
|
|
764
762
|
}, [t("div", {
|
|
765
763
|
class: "list-view-item-title"
|