@g1cloud/open-bluesea-grid 1.0.0-alpha.1 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/open-bluesea-grid.css +712 -108
- package/dist/open-bluesea-grid.es.js +281 -180
- package/dist/open-bluesea-grid.umd.js +281 -180
- package/package.json +3 -2
|
@@ -1,6 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { registerIcons, notNull, formatUtil, waitDuring, useContextMenu, BSIcon, vTooltip, componentUtil, provideSavePoint, provideFieldContext, emptyKeyProvider, useSavePoint, cancelProvidedSavePoint, BSLoadingIcon, BSPageNavigation, useModalHandle, BSModalFrame, BSButton, BSNumberInput, BSCheckbox, useModal, BSSelect, useBlueseaConfig, BSRadioButtonGroup, BSDateRange } from "@g1cloud/open-bluesea-core";
|
|
2
|
+
import { markRaw, reactive, ref, nextTick, defineComponent, createElementBlock, openBlock, withDirectives, createElementVNode, normalizeStyle, unref, vShow, computed, useSlots, withModifiers, normalizeClass, renderSlot, createVNode, createBlock, createCommentVNode, toDisplayString, watch, createTextVNode, Fragment, renderList, createSlots, withCtx, watchEffect, onBeforeUnmount, onMounted, mergeProps, toHandlers, defineAsyncComponent, withKeys, vModelText } from "vue";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
|
-
|
|
4
|
+
const checkBoxIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>';
|
|
5
|
+
const checkBoxOutlineBlankIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>';
|
|
6
|
+
const numbersIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20.5 10l.5-2h-4l1-4h-2l-1 4h-4l1-4h-2L9 8H5l-.5 2h4l-1 4h-4L3 16h4l-1 4h2l1-4h4l-1 4h2l1-4h4l.5-2h-4l1-4h4zm-7 4h-4l1-4h4l-1 4z"/></svg>';
|
|
7
|
+
const dragHandleIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 9H4v2h16V9zM4 15h16v-2H4v2z"/></svg>';
|
|
8
|
+
const editIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83l3.75 3.75l1.83-1.83z"/></svg>';
|
|
9
|
+
const replayIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6s-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8s-3.58-8-8-8z"/></svg>';
|
|
10
|
+
const searchIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z"/></svg>';
|
|
11
|
+
const tableChartIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10H3v9z"/></svg>';
|
|
12
|
+
const syncIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6c0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6c0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4l-4-4v3z"/></svg>';
|
|
13
|
+
const filterAltOffIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19.79 5.61A.998.998 0 0 0 19 4H6.83l7.97 7.97l4.99-6.36zM2.81 2.81L1.39 4.22L10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78l1.41-1.41L2.81 2.81z"/></svg>';
|
|
14
|
+
const addIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>';
|
|
15
|
+
const removeIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>';
|
|
16
|
+
registerIcons({
|
|
17
|
+
check_box: checkBoxIcon,
|
|
18
|
+
check_box_outline_blank: checkBoxOutlineBlankIcon,
|
|
19
|
+
numbers: numbersIcon,
|
|
20
|
+
drag_handle: dragHandleIcon,
|
|
21
|
+
edit: editIcon,
|
|
22
|
+
replay: replayIcon,
|
|
23
|
+
search: searchIcon,
|
|
24
|
+
data_table: tableChartIcon,
|
|
25
|
+
sync: syncIcon,
|
|
26
|
+
filter_alt_off: filterAltOffIcon,
|
|
27
|
+
add: addIcon,
|
|
28
|
+
remove: removeIcon
|
|
29
|
+
});
|
|
4
30
|
class AbstractFilter {
|
|
5
31
|
type;
|
|
6
32
|
constructor(type) {
|
|
@@ -1114,10 +1140,9 @@ const _export_sfc = (sfc, props) => {
|
|
|
1114
1140
|
return target;
|
|
1115
1141
|
};
|
|
1116
1142
|
const BSGridHeaderCellResizeHandle = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-3bda3a20"]]);
|
|
1117
|
-
const _hoisted_1$
|
|
1118
|
-
const _hoisted_2$
|
|
1143
|
+
const _hoisted_1$c = ["data-property-id"];
|
|
1144
|
+
const _hoisted_2$5 = { class: "flex items-center w-full" };
|
|
1119
1145
|
const _hoisted_3$4 = ["textContent"];
|
|
1120
|
-
const _hoisted_4$4 = ["textContent"];
|
|
1121
1146
|
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
1122
1147
|
__name: "BSGridHeaderCell",
|
|
1123
1148
|
props: {
|
|
@@ -1198,20 +1223,20 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1198
1223
|
class: normalizeClass([styleClass.value, "position-relative"]),
|
|
1199
1224
|
style: normalizeStyle(styleCss.value)
|
|
1200
1225
|
}, [
|
|
1201
|
-
createElementVNode("div", _hoisted_2$
|
|
1226
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
1202
1227
|
createElementVNode("span", {
|
|
1203
1228
|
textContent: toDisplayString(__props.column.caption),
|
|
1204
1229
|
class: "grow text-truncate"
|
|
1205
1230
|
}, null, 8, _hoisted_3$4),
|
|
1206
|
-
__props.column.sortable ? (openBlock(),
|
|
1231
|
+
__props.column.sortable ? (openBlock(), createBlock(unref(BSIcon), {
|
|
1207
1232
|
key: 0,
|
|
1233
|
+
name: ascending.value === void 0 ? "swap_vert" : "straight",
|
|
1208
1234
|
class: normalizeClass([{
|
|
1209
1235
|
"text-gray-400": ascending.value === void 0,
|
|
1210
1236
|
descending: !ascending.value
|
|
1211
|
-
}, "sort-icon
|
|
1212
|
-
onClick: sort
|
|
1213
|
-
|
|
1214
|
-
}, null, 10, _hoisted_4$4)) : createCommentVNode("", true)
|
|
1237
|
+
}, "sort-icon bs-clickable"]),
|
|
1238
|
+
onClick: sort
|
|
1239
|
+
}, null, 8, ["name", "class"])) : createCommentVNode("", true)
|
|
1215
1240
|
]),
|
|
1216
1241
|
renderSlot(_ctx.$slots, "filter", {}, void 0, true),
|
|
1217
1242
|
createVNode(BSGridHeaderCellResizeHandle, {
|
|
@@ -1219,13 +1244,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
1219
1244
|
onColumnResized: columnResized
|
|
1220
1245
|
}, null, 8, ["column"])
|
|
1221
1246
|
], 6)
|
|
1222
|
-
], 46, _hoisted_1$
|
|
1247
|
+
], 46, _hoisted_1$c);
|
|
1223
1248
|
};
|
|
1224
1249
|
}
|
|
1225
1250
|
});
|
|
1226
|
-
const BSGridHeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-
|
|
1227
|
-
const _hoisted_1$
|
|
1228
|
-
const _hoisted_2$7 = { class: "font-icon" };
|
|
1251
|
+
const BSGridHeaderCell = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-37a577b0"]]);
|
|
1252
|
+
const _hoisted_1$b = { class: "checkbox bs-clickable" };
|
|
1229
1253
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
1230
1254
|
__name: "BSGridHeaderCellCheckbox",
|
|
1231
1255
|
props: {
|
|
@@ -1241,24 +1265,29 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
1241
1265
|
class: normalizeClass([{ checked: checked.value }, "fixed func-cell"]),
|
|
1242
1266
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("click"))
|
|
1243
1267
|
}, [
|
|
1244
|
-
createElementVNode("div", _hoisted_1$
|
|
1245
|
-
|
|
1268
|
+
createElementVNode("div", _hoisted_1$b, [
|
|
1269
|
+
createVNode(unref(BSIcon), {
|
|
1270
|
+
name: checked.value ? "check_box" : "check_box_outline_blank"
|
|
1271
|
+
}, null, 8, ["name"])
|
|
1246
1272
|
])
|
|
1247
1273
|
], 2);
|
|
1248
1274
|
};
|
|
1249
1275
|
}
|
|
1250
1276
|
});
|
|
1251
|
-
const
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1277
|
+
const _hoisted_1$a = { class: "fixed func-cell serial-no min-w-48" };
|
|
1278
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
1279
|
+
__name: "BSGridHeaderCellSerialNo",
|
|
1280
|
+
setup(__props) {
|
|
1281
|
+
return (_ctx, _cache) => {
|
|
1282
|
+
return openBlock(), createElementBlock("th", _hoisted_1$a, [
|
|
1283
|
+
createElementVNode("div", null, [
|
|
1284
|
+
createVNode(unref(BSIcon), { name: "numbers" })
|
|
1285
|
+
])
|
|
1286
|
+
]);
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
const _hoisted_1$9 = ["data-property-id"];
|
|
1262
1291
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1263
1292
|
__name: "BSGridCell",
|
|
1264
1293
|
props: {
|
|
@@ -1365,11 +1394,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1365
1394
|
], 6)), [
|
|
1366
1395
|
[unref(vTooltip), { content: tooltipText.value }]
|
|
1367
1396
|
])
|
|
1368
|
-
], 14, _hoisted_1$
|
|
1397
|
+
], 14, _hoisted_1$9);
|
|
1369
1398
|
};
|
|
1370
1399
|
}
|
|
1371
1400
|
});
|
|
1372
|
-
const _hoisted_1$
|
|
1401
|
+
const _hoisted_1$8 = { class: "fixed func-cell serial-no text-right" };
|
|
1373
1402
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1374
1403
|
__name: "BSGridCellSerialNo",
|
|
1375
1404
|
props: {
|
|
@@ -1377,13 +1406,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1377
1406
|
},
|
|
1378
1407
|
setup(__props) {
|
|
1379
1408
|
return (_ctx, _cache) => {
|
|
1380
|
-
return openBlock(), createElementBlock("td", _hoisted_1$
|
|
1409
|
+
return openBlock(), createElementBlock("td", _hoisted_1$8, [
|
|
1381
1410
|
createElementVNode("div", null, toDisplayString(__props.serialNo), 1)
|
|
1382
1411
|
]);
|
|
1383
1412
|
};
|
|
1384
1413
|
}
|
|
1385
1414
|
});
|
|
1386
|
-
const _hoisted_1$8 = { class: "font-icon" };
|
|
1387
1415
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1388
1416
|
__name: "BSGridCellCheckbox",
|
|
1389
1417
|
props: {
|
|
@@ -1405,15 +1433,16 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
1405
1433
|
createElementVNode("div", {
|
|
1406
1434
|
class: normalizeClass([{ "bs-clickable": !__props.disabled }, "checkbox"])
|
|
1407
1435
|
}, [
|
|
1408
|
-
|
|
1436
|
+
createVNode(unref(BSIcon), {
|
|
1437
|
+
name: __props.checked ? "check_box" : "check_box_outline_blank"
|
|
1438
|
+
}, null, 8, ["name"])
|
|
1409
1439
|
], 2)
|
|
1410
1440
|
], 2);
|
|
1411
1441
|
};
|
|
1412
1442
|
}
|
|
1413
1443
|
});
|
|
1414
|
-
const BSGridCellCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
1444
|
+
const BSGridCellCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-704bd1b5"]]);
|
|
1415
1445
|
const _hoisted_1$7 = { class: "fixed func-cell cursor-pointer" };
|
|
1416
|
-
const _hoisted_2$6 = { class: "font-icon" };
|
|
1417
1446
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
1418
1447
|
__name: "BSGridCellEdit",
|
|
1419
1448
|
props: {
|
|
@@ -1429,7 +1458,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
1429
1458
|
key: 0,
|
|
1430
1459
|
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("toggleEditMode"), ["stop"]))
|
|
1431
1460
|
}, [
|
|
1432
|
-
|
|
1461
|
+
createVNode(unref(BSIcon), {
|
|
1462
|
+
name: __props.isEditing ? "replay" : "edit"
|
|
1463
|
+
}, null, 8, ["name"])
|
|
1433
1464
|
])) : createCommentVNode("", true)
|
|
1434
1465
|
]);
|
|
1435
1466
|
};
|
|
@@ -1540,9 +1571,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
1540
1571
|
},
|
|
1541
1572
|
setup(__props) {
|
|
1542
1573
|
return (_ctx, _cache) => {
|
|
1543
|
-
return withDirectives((openBlock(), createElementBlock("td", _hoisted_1$6, [
|
|
1544
|
-
|
|
1545
|
-
])
|
|
1574
|
+
return withDirectives((openBlock(), createElementBlock("td", _hoisted_1$6, [
|
|
1575
|
+
createVNode(unref(BSIcon), { name: "drag_handle" })
|
|
1576
|
+
])), [
|
|
1546
1577
|
[unref(vDragSupport), {
|
|
1547
1578
|
draggable: true,
|
|
1548
1579
|
sourceProvider: (td) => td.parentElement,
|
|
@@ -1694,7 +1725,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1694
1725
|
}
|
|
1695
1726
|
});
|
|
1696
1727
|
const _hoisted_1$5 = { class: "table-wrap" };
|
|
1697
|
-
const _hoisted_2$
|
|
1728
|
+
const _hoisted_2$4 = { class: "header-row" };
|
|
1698
1729
|
const _hoisted_3$3 = {
|
|
1699
1730
|
key: 0,
|
|
1700
1731
|
class: "fixed func-cell"
|
|
@@ -1704,8 +1735,9 @@ const _hoisted_4$3 = {
|
|
|
1704
1735
|
class: "fixed func-cell edit-icon"
|
|
1705
1736
|
};
|
|
1706
1737
|
const _hoisted_5$2 = { key: 0 };
|
|
1707
|
-
const _hoisted_6$1 = {
|
|
1708
|
-
const _hoisted_7$1 =
|
|
1738
|
+
const _hoisted_6$1 = { class: "absolute" };
|
|
1739
|
+
const _hoisted_7$1 = { key: 1 };
|
|
1740
|
+
const _hoisted_8$1 = ["textContent"];
|
|
1709
1741
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1710
1742
|
__name: "BSGrid",
|
|
1711
1743
|
props: {
|
|
@@ -1986,7 +2018,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1986
2018
|
ref: table
|
|
1987
2019
|
}, [
|
|
1988
2020
|
createElementVNode("thead", null, [
|
|
1989
|
-
createElementVNode("tr", _hoisted_2$
|
|
2021
|
+
createElementVNode("tr", _hoisted_2$4, [
|
|
1990
2022
|
__props.showDragHandle ? (openBlock(), createElementBlock("th", _hoisted_3$3, [..._cache[0] || (_cache[0] = [
|
|
1991
2023
|
createElementVNode("div", null, null, -1)
|
|
1992
2024
|
])])) : createCommentVNode("", true),
|
|
@@ -1998,7 +2030,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1998
2030
|
__props.editable && !__props.hideEditIcon ? (openBlock(), createElementBlock("th", _hoisted_4$3, [..._cache[1] || (_cache[1] = [
|
|
1999
2031
|
createElementVNode("div", null, null, -1)
|
|
2000
2032
|
])])) : createCommentVNode("", true),
|
|
2001
|
-
__props.showSerial ? (openBlock(), createBlock(
|
|
2033
|
+
__props.showSerial ? (openBlock(), createBlock(_sfc_main$e, { key: 3 })) : createCommentVNode("", true),
|
|
2002
2034
|
(openBlock(true), createElementBlock(Fragment, null, renderList(internalColumns.value, (column) => {
|
|
2003
2035
|
return openBlock(), createBlock(BSGridHeaderCell, {
|
|
2004
2036
|
key: column.propertyId,
|
|
@@ -2026,15 +2058,15 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2026
2058
|
]),
|
|
2027
2059
|
createElementVNode("tbody", null, [
|
|
2028
2060
|
__props.loading ? (openBlock(), createElementBlock("tr", _hoisted_5$2, [
|
|
2029
|
-
createElementVNode("td",
|
|
2061
|
+
createElementVNode("td", _hoisted_6$1, [
|
|
2030
2062
|
createVNode(unref(BSLoadingIcon), { class: "position-absolute pa-8" })
|
|
2031
2063
|
])
|
|
2032
|
-
])) : __props.data && __props.data.length === 0 ? (openBlock(), createElementBlock("tr",
|
|
2064
|
+
])) : __props.data && __props.data.length === 0 ? (openBlock(), createElementBlock("tr", _hoisted_7$1, [
|
|
2033
2065
|
createElementVNode("td", null, [
|
|
2034
2066
|
createElementVNode("div", {
|
|
2035
2067
|
textContent: toDisplayString(__props.emptyMessage),
|
|
2036
2068
|
class: "position-absolute text-nowrap pa-8"
|
|
2037
|
-
}, null, 8,
|
|
2069
|
+
}, null, 8, _hoisted_8$1)
|
|
2038
2070
|
])
|
|
2039
2071
|
])) : __props.data ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.data, (row, index) => {
|
|
2040
2072
|
return openBlock(), createBlock(_sfc_main$8, {
|
|
@@ -2097,9 +2129,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
2097
2129
|
}
|
|
2098
2130
|
});
|
|
2099
2131
|
const _hoisted_1$4 = { class: "text-center" };
|
|
2100
|
-
const _hoisted_2$
|
|
2101
|
-
const _hoisted_3$2 = { class: "
|
|
2102
|
-
const _hoisted_4$2 = { class: "
|
|
2132
|
+
const _hoisted_2$3 = { class: "text-center" };
|
|
2133
|
+
const _hoisted_3$2 = { class: "flex" };
|
|
2134
|
+
const _hoisted_4$2 = { class: "flex grow justify-end gap-1" };
|
|
2103
2135
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2104
2136
|
__name: "BSGridColumnSettingModal",
|
|
2105
2137
|
props: {
|
|
@@ -2203,7 +2235,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2203
2235
|
])
|
|
2204
2236
|
]),
|
|
2205
2237
|
fixed: withCtx(({ row }) => [
|
|
2206
|
-
createElementVNode("div", _hoisted_2$
|
|
2238
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
2207
2239
|
createVNode(unref(BSCheckbox), {
|
|
2208
2240
|
modelValue: row.fixed,
|
|
2209
2241
|
"onUpdate:modelValue": [($event) => row.fixed = $event, ($event) => updateFixedColumn($event, row)],
|
|
@@ -2249,7 +2281,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
2249
2281
|
}
|
|
2250
2282
|
});
|
|
2251
2283
|
const _hoisted_1$3 = { class: "bs-grid-control" };
|
|
2252
|
-
const _hoisted_2$
|
|
2284
|
+
const _hoisted_2$2 = { key: 0 };
|
|
2253
2285
|
const _hoisted_3$1 = { key: 1 };
|
|
2254
2286
|
const _hoisted_4$1 = { key: 2 };
|
|
2255
2287
|
const _hoisted_5$1 = { key: 3 };
|
|
@@ -2317,44 +2349,73 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2317
2349
|
};
|
|
2318
2350
|
return (_ctx, _cache) => {
|
|
2319
2351
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
2320
|
-
__props.showSetting ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2352
|
+
__props.showSetting ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
2321
2353
|
createVNode(unref(BSButton), {
|
|
2322
2354
|
caption: "Column Settings",
|
|
2323
2355
|
"data-id": "columnSettingBtn",
|
|
2324
|
-
"left-icon": "data_table",
|
|
2325
2356
|
onClick: openSettingModal
|
|
2357
|
+
}, {
|
|
2358
|
+
left: withCtx(() => [
|
|
2359
|
+
createVNode(unref(BSIcon), {
|
|
2360
|
+
class: "mt-0.5",
|
|
2361
|
+
name: "data_table"
|
|
2362
|
+
})
|
|
2363
|
+
]),
|
|
2364
|
+
_: 1
|
|
2326
2365
|
})
|
|
2327
2366
|
])) : createCommentVNode("", true),
|
|
2328
2367
|
__props.showRefresh ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
2329
2368
|
createVNode(unref(BSButton), {
|
|
2330
2369
|
caption: "Refresh",
|
|
2331
2370
|
"data-id": "refreshBtn",
|
|
2332
|
-
"left-icon": "sync",
|
|
2333
2371
|
onClick: refreshGrid
|
|
2372
|
+
}, {
|
|
2373
|
+
left: withCtx(() => [
|
|
2374
|
+
createVNode(unref(BSIcon), {
|
|
2375
|
+
class: "mt-0.5",
|
|
2376
|
+
name: "sync"
|
|
2377
|
+
})
|
|
2378
|
+
]),
|
|
2379
|
+
_: 1
|
|
2334
2380
|
})
|
|
2335
2381
|
])) : createCommentVNode("", true),
|
|
2336
2382
|
__props.showClearFilter ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
2337
2383
|
createVNode(unref(BSButton), {
|
|
2338
2384
|
caption: "Clear Settings",
|
|
2339
2385
|
"data-id": "clearSettingBtn",
|
|
2340
|
-
"left-icon": "filter_alt_off",
|
|
2341
2386
|
onClick: clearGridFilter
|
|
2387
|
+
}, {
|
|
2388
|
+
left: withCtx(() => [
|
|
2389
|
+
createVNode(unref(BSIcon), {
|
|
2390
|
+
class: "mt-0.5",
|
|
2391
|
+
name: "filter_alt_off"
|
|
2392
|
+
})
|
|
2393
|
+
]),
|
|
2394
|
+
_: 1
|
|
2342
2395
|
})
|
|
2343
2396
|
])) : createCommentVNode("", true),
|
|
2344
2397
|
__props.showAddButton ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
2345
2398
|
createVNode(unref(BSButton), {
|
|
2346
2399
|
caption: "Add Row",
|
|
2347
2400
|
"data-id": "addRowBtn",
|
|
2348
|
-
"left-icon": "add",
|
|
2349
2401
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("clickAdd"))
|
|
2402
|
+
}, {
|
|
2403
|
+
left: withCtx(() => [
|
|
2404
|
+
createVNode(unref(BSIcon), { name: "add" })
|
|
2405
|
+
]),
|
|
2406
|
+
_: 1
|
|
2350
2407
|
})
|
|
2351
2408
|
])) : createCommentVNode("", true),
|
|
2352
2409
|
__props.showRemoveButton ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
2353
2410
|
createVNode(unref(BSButton), {
|
|
2354
2411
|
caption: "Remove Row",
|
|
2355
2412
|
"data-id": "removeRowBtn",
|
|
2356
|
-
"left-icon": "remove",
|
|
2357
2413
|
onClick: _cache[1] || (_cache[1] = ($event) => emit("clickRemove"))
|
|
2414
|
+
}, {
|
|
2415
|
+
left: withCtx(() => [
|
|
2416
|
+
createVNode(unref(BSIcon), { name: "remove" })
|
|
2417
|
+
]),
|
|
2418
|
+
_: 1
|
|
2358
2419
|
})
|
|
2359
2420
|
])) : createCommentVNode("", true),
|
|
2360
2421
|
createElementVNode("div", null, [
|
|
@@ -2390,7 +2451,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
2390
2451
|
}
|
|
2391
2452
|
});
|
|
2392
2453
|
const _hoisted_1$2 = { class: "bs-text-filter" };
|
|
2393
|
-
const _hoisted_2$
|
|
2454
|
+
const _hoisted_2$1 = { class: "input-wrap" };
|
|
2394
2455
|
const _hoisted_3 = { class: "textarea-wrap" };
|
|
2395
2456
|
const _hoisted_4 = {
|
|
2396
2457
|
class: "filter-caption text-nowrap",
|
|
@@ -2408,15 +2469,31 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2408
2469
|
setup(__props, { emit: __emit }) {
|
|
2409
2470
|
const props = __props;
|
|
2410
2471
|
const emit = __emit;
|
|
2411
|
-
const likeTextFilterItems = computed(
|
|
2412
|
-
|
|
2413
|
-
|
|
2472
|
+
const likeTextFilterItems = computed(
|
|
2473
|
+
() => props.textFilterItems
|
|
2474
|
+
);
|
|
2475
|
+
const inTextFilterItems = computed(
|
|
2476
|
+
() => props.textFilterItems.filter((filter) => filter.allowMultiLineFilter)
|
|
2477
|
+
);
|
|
2478
|
+
const hasTextAreaFilterItem = computed(
|
|
2479
|
+
() => inTextFilterItems.value.length > 0
|
|
2480
|
+
);
|
|
2414
2481
|
const filterMode = ref("INPUT");
|
|
2415
2482
|
const changeFilterMode = (mode) => filterMode.value = mode;
|
|
2416
|
-
const likeFilterItems = computed(
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2483
|
+
const likeFilterItems = computed(
|
|
2484
|
+
() => likeTextFilterItems.value.filter(
|
|
2485
|
+
(item) => !item.filterCreator && item.filterType !== "NUMBER"
|
|
2486
|
+
)
|
|
2487
|
+
);
|
|
2488
|
+
const equalFilterItemPropertyIds = computed(
|
|
2489
|
+
() => likeTextFilterItems.value.filter((item) => !item.filterCreator && item.filterType === "NUMBER").map((item) => item.propertyId)
|
|
2490
|
+
);
|
|
2491
|
+
const customFilterItems = computed(
|
|
2492
|
+
() => likeTextFilterItems.value.filter((item) => item.filterCreator)
|
|
2493
|
+
);
|
|
2494
|
+
const inFilterItemPropertyIds = computed(
|
|
2495
|
+
() => inTextFilterItems.value.map((filter) => filter.propertyId)
|
|
2496
|
+
);
|
|
2420
2497
|
const getFilterKeyword = (filter) => {
|
|
2421
2498
|
const actualFilter = filter instanceof OrFilter ? filter.filters[0] : filter;
|
|
2422
2499
|
if (actualFilter && "getFilterValueString" in actualFilter) {
|
|
@@ -2447,13 +2524,31 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2447
2524
|
};
|
|
2448
2525
|
const makeLikeFilters = (items, keyword) => {
|
|
2449
2526
|
if (items.length === 0) return [];
|
|
2450
|
-
const prefixSuffix = items.map(
|
|
2527
|
+
const prefixSuffix = items.map(
|
|
2528
|
+
(item) => (item.prefix === false ? "f" : "t") + (item.suffix === false ? "f" : "t")
|
|
2529
|
+
);
|
|
2451
2530
|
if (prefixSuffix.every((val) => val === prefixSuffix[0])) {
|
|
2452
2531
|
const likeNames = likeFilterItems.value.map((item) => item.propertyId);
|
|
2453
2532
|
const first = items[0];
|
|
2454
|
-
return [
|
|
2533
|
+
return [
|
|
2534
|
+
likeFilter(
|
|
2535
|
+
likeNames,
|
|
2536
|
+
keyword,
|
|
2537
|
+
first.prefix !== false,
|
|
2538
|
+
first.suffix !== false,
|
|
2539
|
+
true
|
|
2540
|
+
)
|
|
2541
|
+
];
|
|
2455
2542
|
} else {
|
|
2456
|
-
return items.map(
|
|
2543
|
+
return items.map(
|
|
2544
|
+
(item) => likeFilter(
|
|
2545
|
+
[item.propertyId],
|
|
2546
|
+
keyword,
|
|
2547
|
+
item.prefix !== false,
|
|
2548
|
+
item.suffix !== false,
|
|
2549
|
+
true
|
|
2550
|
+
)
|
|
2551
|
+
);
|
|
2457
2552
|
}
|
|
2458
2553
|
};
|
|
2459
2554
|
const createFilter = async (text) => {
|
|
@@ -2463,13 +2558,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2463
2558
|
const like = makeLikeFilters(likeFilterItems.value, keyword);
|
|
2464
2559
|
const equalNames = equalFilterItemPropertyIds.value;
|
|
2465
2560
|
const equal = equalNames.length > 0 && !Number.isNaN(Number(keyword)) ? equalFilter(equalNames, Number(keyword), true) : void 0;
|
|
2466
|
-
const customFilters = (await Promise.all(
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
created
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2561
|
+
const customFilters = (await Promise.all(
|
|
2562
|
+
customFilterItems.value.map(async (item) => {
|
|
2563
|
+
let created = item.filterCreator?.(item.propertyId, keyword);
|
|
2564
|
+
if (created && created instanceof Promise) {
|
|
2565
|
+
created = await created;
|
|
2566
|
+
}
|
|
2567
|
+
return created || [];
|
|
2568
|
+
})
|
|
2569
|
+
)).flatMap((item) => item);
|
|
2473
2570
|
const allFilters = [...like, equal, ...customFilters].filter(notNull);
|
|
2474
2571
|
if (allFilters.length >= 2) return orFilter(allFilters);
|
|
2475
2572
|
else return allFilters[0];
|
|
@@ -2489,7 +2586,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2489
2586
|
);
|
|
2490
2587
|
return (_ctx, _cache) => {
|
|
2491
2588
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
2492
|
-
withDirectives(createElementVNode("div", _hoisted_2$
|
|
2589
|
+
withDirectives(createElementVNode("div", _hoisted_2$1, [
|
|
2493
2590
|
withDirectives(createElementVNode("input", {
|
|
2494
2591
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputText.value = $event),
|
|
2495
2592
|
"data-id": "textFilterInput",
|
|
@@ -2500,11 +2597,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2500
2597
|
}, null, 544), [
|
|
2501
2598
|
[vModelText, inputText.value]
|
|
2502
2599
|
]),
|
|
2503
|
-
hasTextAreaFilterItem.value ? (openBlock(),
|
|
2600
|
+
hasTextAreaFilterItem.value ? (openBlock(), createBlock(unref(BSIcon), {
|
|
2504
2601
|
key: 0,
|
|
2505
|
-
|
|
2602
|
+
name: "south",
|
|
2603
|
+
class: "bs-clickable m-1.5",
|
|
2506
2604
|
onClick: _cache[2] || (_cache[2] = ($event) => changeFilterMode("TEXTAREA"))
|
|
2507
|
-
}
|
|
2605
|
+
})) : createCommentVNode("", true)
|
|
2508
2606
|
], 512), [
|
|
2509
2607
|
[vShow, filterMode.value === "INPUT"]
|
|
2510
2608
|
]),
|
|
@@ -2516,10 +2614,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2516
2614
|
}, null, 544), [
|
|
2517
2615
|
[vModelText, textareaText.value]
|
|
2518
2616
|
]),
|
|
2519
|
-
|
|
2520
|
-
|
|
2617
|
+
createVNode(unref(BSIcon), {
|
|
2618
|
+
name: "north",
|
|
2619
|
+
class: "bs-clickable m-1.5",
|
|
2521
2620
|
onClick: _cache[4] || (_cache[4] = ($event) => changeFilterMode("INPUT"))
|
|
2522
|
-
}
|
|
2621
|
+
})
|
|
2523
2622
|
], 512), [
|
|
2524
2623
|
[vShow, filterMode.value === "TEXTAREA"]
|
|
2525
2624
|
]),
|
|
@@ -2844,12 +2943,80 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2844
2943
|
};
|
|
2845
2944
|
}
|
|
2846
2945
|
});
|
|
2946
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2947
|
+
__name: "BSDateRangeFilter",
|
|
2948
|
+
props: {
|
|
2949
|
+
idFrom: {},
|
|
2950
|
+
idTo: {},
|
|
2951
|
+
nameFrom: {},
|
|
2952
|
+
nameTo: {},
|
|
2953
|
+
modelValue: {},
|
|
2954
|
+
disabled: { type: Boolean },
|
|
2955
|
+
width: { default: "360px" },
|
|
2956
|
+
resolution: { default: "DAY" },
|
|
2957
|
+
displayFormat: {},
|
|
2958
|
+
popupDisplayFormat: {},
|
|
2959
|
+
popupStartYear: {},
|
|
2960
|
+
popupEndYear: {},
|
|
2961
|
+
timeZone: {}
|
|
2962
|
+
},
|
|
2963
|
+
emits: ["update:modelValue"],
|
|
2964
|
+
setup(__props, { emit: __emit }) {
|
|
2965
|
+
const props = __props;
|
|
2966
|
+
const emit = __emit;
|
|
2967
|
+
const fromValue = ref();
|
|
2968
|
+
const toValue = ref();
|
|
2969
|
+
watch(
|
|
2970
|
+
() => props.modelValue,
|
|
2971
|
+
() => {
|
|
2972
|
+
fromValue.value = props.modelValue?.from;
|
|
2973
|
+
toValue.value = props.modelValue?.to;
|
|
2974
|
+
},
|
|
2975
|
+
{ immediate: true }
|
|
2976
|
+
);
|
|
2977
|
+
const emitValue = () => {
|
|
2978
|
+
const value = {
|
|
2979
|
+
from: fromValue.value,
|
|
2980
|
+
to: toValue.value
|
|
2981
|
+
};
|
|
2982
|
+
emit("update:modelValue", value);
|
|
2983
|
+
};
|
|
2984
|
+
return (_ctx, _cache) => {
|
|
2985
|
+
return openBlock(), createBlock(unref(BSDateRange), {
|
|
2986
|
+
"from-value": fromValue.value,
|
|
2987
|
+
"onUpdate:fromValue": [
|
|
2988
|
+
_cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
2989
|
+
emitValue
|
|
2990
|
+
],
|
|
2991
|
+
"to-value": toValue.value,
|
|
2992
|
+
"onUpdate:toValue": [
|
|
2993
|
+
_cache[1] || (_cache[1] = ($event) => toValue.value = $event),
|
|
2994
|
+
emitValue
|
|
2995
|
+
],
|
|
2996
|
+
"disabled-from": __props.disabled,
|
|
2997
|
+
"disabled-to": __props.disabled,
|
|
2998
|
+
"display-format": __props.displayFormat,
|
|
2999
|
+
"id-from": __props.idFrom,
|
|
3000
|
+
"id-to": __props.idTo,
|
|
3001
|
+
"name-from": __props.nameFrom,
|
|
3002
|
+
"name-to": __props.nameTo,
|
|
3003
|
+
"popup-display-format": __props.popupDisplayFormat,
|
|
3004
|
+
"popup-end-year": __props.popupEndYear,
|
|
3005
|
+
"popup-start-year": __props.popupStartYear,
|
|
3006
|
+
resolution: __props.resolution,
|
|
3007
|
+
"time-zone": __props.timeZone,
|
|
3008
|
+
"validate-date-order": false,
|
|
3009
|
+
width: __props.width,
|
|
3010
|
+
"hide-extra-date": ""
|
|
3011
|
+
}, null, 8, ["from-value", "to-value", "disabled-from", "disabled-to", "display-format", "id-from", "id-to", "name-from", "name-to", "popup-display-format", "popup-end-year", "popup-start-year", "resolution", "time-zone", "width"]);
|
|
3012
|
+
};
|
|
3013
|
+
}
|
|
3014
|
+
});
|
|
2847
3015
|
const _hoisted_1$1 = {
|
|
2848
3016
|
key: 0,
|
|
2849
|
-
class: "date-filters
|
|
3017
|
+
class: "date-filters flex flex-col"
|
|
2850
3018
|
};
|
|
2851
|
-
const
|
|
2852
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3019
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
2853
3020
|
__name: "BSDateRangeFilters",
|
|
2854
3021
|
props: {
|
|
2855
3022
|
dateFilter: {},
|
|
@@ -2965,37 +3132,37 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2965
3132
|
return props.dateFilter.filterItems.find((item) => item.propertyId === propertyId)?.filterWidth || props.filterWidth;
|
|
2966
3133
|
};
|
|
2967
3134
|
return (_ctx, _cache) => {
|
|
2968
|
-
const _component_BSDateRangeFilter = resolveComponent("BSDateRangeFilter");
|
|
2969
3135
|
return __props.dateFilter.filterItems ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
2970
3136
|
(openBlock(true), createElementBlock(Fragment, null, renderList(dateFilterValues.value, (item, index) => {
|
|
2971
3137
|
return openBlock(), createElementBlock("div", {
|
|
2972
3138
|
key: index,
|
|
2973
|
-
class: "
|
|
3139
|
+
class: "flex gap-1 mb-1 flex-align-center"
|
|
2974
3140
|
}, [
|
|
2975
|
-
index === 0 ? (openBlock(),
|
|
3141
|
+
index === 0 ? (openBlock(), createBlock(unref(BSIcon), {
|
|
2976
3142
|
key: 0,
|
|
3143
|
+
name: "add",
|
|
2977
3144
|
class: normalizeClass([{
|
|
2978
3145
|
disabled: dateFilterValues.value.length >= __props.dateFilter.filterItems.length
|
|
2979
|
-
}, "
|
|
3146
|
+
}, "bs-clickable"]),
|
|
2980
3147
|
"data-id": "addDateFilterBtn",
|
|
2981
3148
|
onClick: addDateFilter
|
|
2982
|
-
}, "
|
|
3149
|
+
}, null, 8, ["class"])) : (openBlock(), createBlock(unref(BSIcon), {
|
|
2983
3150
|
key: 1,
|
|
2984
|
-
|
|
3151
|
+
name: "remove",
|
|
3152
|
+
class: "bs-clickable",
|
|
2985
3153
|
"data-id": "removeDateFilterBtn",
|
|
2986
3154
|
onClick: ($event) => removeDateFilter(index)
|
|
2987
|
-
},
|
|
3155
|
+
}, null, 8, ["onClick"])),
|
|
2988
3156
|
createVNode(unref(BSSelect), {
|
|
2989
3157
|
items: __props.dateFilter.filterItems,
|
|
2990
3158
|
"label-provider": (filter) => filter.caption,
|
|
2991
3159
|
"model-value": item.propertyId,
|
|
2992
3160
|
style: normalizeStyle({ minWidth: __props.captionMinWidth }),
|
|
2993
3161
|
"value-provider": (filter) => filter.propertyId,
|
|
2994
|
-
class: "mr-4",
|
|
2995
3162
|
"data-id": "filterItemSelect",
|
|
2996
3163
|
"onUpdate:modelValue": ($event) => setDateFilterPropertyId(index, $event)
|
|
2997
3164
|
}, null, 8, ["items", "label-provider", "model-value", "style", "value-provider", "onUpdate:modelValue"]),
|
|
2998
|
-
createVNode(
|
|
3165
|
+
createVNode(_sfc_main$2, {
|
|
2999
3166
|
"display-format": dateFormatOfFilterItem(item.propertyId),
|
|
3000
3167
|
"from-id": `${item.propertyId}From`,
|
|
3001
3168
|
"model-value": item.value,
|
|
@@ -3017,8 +3184,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3017
3184
|
(value, preset) => setDateFilterValue(index, value, preset)
|
|
3018
3185
|
],
|
|
3019
3186
|
presets: __props.presets,
|
|
3020
|
-
"time-zone": timeZoneOfFilterItem(item.propertyId)
|
|
3021
|
-
class: "ml-4"
|
|
3187
|
+
"time-zone": timeZoneOfFilterItem(item.propertyId)
|
|
3022
3188
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "presets", "time-zone"])
|
|
3023
3189
|
]);
|
|
3024
3190
|
}), 128))
|
|
@@ -3026,9 +3192,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3026
3192
|
};
|
|
3027
3193
|
}
|
|
3028
3194
|
});
|
|
3029
|
-
const _hoisted_1 = { class: "bs-grid-lookup
|
|
3030
|
-
const _hoisted_2 = { class: "text-nowrap" };
|
|
3031
|
-
const _sfc_main
|
|
3195
|
+
const _hoisted_1 = { class: "bs-grid-lookup flex flex-align-start" };
|
|
3196
|
+
const _hoisted_2 = { class: "text-nowrap flex gap-1" };
|
|
3197
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3032
3198
|
__name: "BSGridLookup",
|
|
3033
3199
|
props: {
|
|
3034
3200
|
gridId: {},
|
|
@@ -3126,10 +3292,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3126
3292
|
emitUpdateModelValueAndSearch
|
|
3127
3293
|
],
|
|
3128
3294
|
keyword: __props.keyword,
|
|
3129
|
-
"text-filter-items": __props.config.textFilter.filterItems
|
|
3130
|
-
class: "mr-16"
|
|
3295
|
+
"text-filter-items": __props.config.textFilter.filterItems
|
|
3131
3296
|
}, null, 8, ["modelValue", "keyword", "text-filter-items"])) : createCommentVNode("", true),
|
|
3132
|
-
__props.config?.dateFilter ? (openBlock(), createBlock(_sfc_main$
|
|
3297
|
+
__props.config?.dateFilter ? (openBlock(), createBlock(_sfc_main$1, {
|
|
3133
3298
|
key: 1,
|
|
3134
3299
|
modelValue: dateFilterValue.value,
|
|
3135
3300
|
"onUpdate:modelValue": [
|
|
@@ -3149,19 +3314,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3149
3314
|
createElementVNode("div", _hoisted_2, [
|
|
3150
3315
|
createVNode(unref(BSButton), {
|
|
3151
3316
|
caption: "Search",
|
|
3152
|
-
|
|
3153
|
-
"left-icon": "search",
|
|
3317
|
+
"button-color": "blue",
|
|
3154
3318
|
onClick: emitSearch
|
|
3319
|
+
}, {
|
|
3320
|
+
left: withCtx(() => [
|
|
3321
|
+
createVNode(unref(BSIcon), {
|
|
3322
|
+
class: "mt-0.5",
|
|
3323
|
+
name: "search"
|
|
3324
|
+
})
|
|
3325
|
+
]),
|
|
3326
|
+
_: 1
|
|
3155
3327
|
}),
|
|
3156
3328
|
__props.config?.dateFilter ? (openBlock(), createBlock(unref(BSButton), {
|
|
3157
3329
|
key: 0,
|
|
3158
3330
|
caption: "Save",
|
|
3159
|
-
class: "ml-4",
|
|
3160
3331
|
onClick: saveSearchCondition
|
|
3161
3332
|
})) : createCommentVNode("", true),
|
|
3162
3333
|
createVNode(unref(BSButton), {
|
|
3163
3334
|
caption: "Reset",
|
|
3164
|
-
class: "ml-4",
|
|
3165
3335
|
onClick: resetSearchCondition
|
|
3166
3336
|
})
|
|
3167
3337
|
])
|
|
@@ -3169,80 +3339,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3169
3339
|
};
|
|
3170
3340
|
}
|
|
3171
3341
|
});
|
|
3172
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3173
|
-
__name: "BSDateRangeFilter",
|
|
3174
|
-
props: {
|
|
3175
|
-
idFrom: {},
|
|
3176
|
-
idTo: {},
|
|
3177
|
-
nameFrom: {},
|
|
3178
|
-
nameTo: {},
|
|
3179
|
-
modelValue: {},
|
|
3180
|
-
disabled: { type: Boolean },
|
|
3181
|
-
width: { default: "300px" },
|
|
3182
|
-
resolution: { default: "DAY" },
|
|
3183
|
-
displayFormat: {},
|
|
3184
|
-
popupDisplayFormat: {},
|
|
3185
|
-
popupStartYear: {},
|
|
3186
|
-
popupEndYear: {},
|
|
3187
|
-
timeZone: {}
|
|
3188
|
-
},
|
|
3189
|
-
emits: ["update:modelValue"],
|
|
3190
|
-
setup(__props, { emit: __emit }) {
|
|
3191
|
-
const props = __props;
|
|
3192
|
-
const emit = __emit;
|
|
3193
|
-
const fromValue = ref();
|
|
3194
|
-
const toValue = ref();
|
|
3195
|
-
watch(
|
|
3196
|
-
() => props.modelValue,
|
|
3197
|
-
() => {
|
|
3198
|
-
fromValue.value = props.modelValue?.from;
|
|
3199
|
-
toValue.value = props.modelValue?.to;
|
|
3200
|
-
},
|
|
3201
|
-
{ immediate: true }
|
|
3202
|
-
);
|
|
3203
|
-
const emitValue = () => {
|
|
3204
|
-
const value = {
|
|
3205
|
-
from: fromValue.value,
|
|
3206
|
-
to: toValue.value
|
|
3207
|
-
};
|
|
3208
|
-
emit("update:modelValue", value);
|
|
3209
|
-
};
|
|
3210
|
-
return (_ctx, _cache) => {
|
|
3211
|
-
return openBlock(), createBlock(unref(BSDateRange), {
|
|
3212
|
-
"from-value": fromValue.value,
|
|
3213
|
-
"onUpdate:fromValue": [
|
|
3214
|
-
_cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
|
|
3215
|
-
emitValue
|
|
3216
|
-
],
|
|
3217
|
-
"to-value": toValue.value,
|
|
3218
|
-
"onUpdate:toValue": [
|
|
3219
|
-
_cache[1] || (_cache[1] = ($event) => toValue.value = $event),
|
|
3220
|
-
emitValue
|
|
3221
|
-
],
|
|
3222
|
-
"disabled-from": __props.disabled,
|
|
3223
|
-
"disabled-to": __props.disabled,
|
|
3224
|
-
"display-format": __props.displayFormat,
|
|
3225
|
-
"id-from": __props.idFrom,
|
|
3226
|
-
"id-to": __props.idTo,
|
|
3227
|
-
"name-from": __props.nameFrom,
|
|
3228
|
-
"name-to": __props.nameTo,
|
|
3229
|
-
"popup-display-format": __props.popupDisplayFormat,
|
|
3230
|
-
"popup-end-year": __props.popupEndYear,
|
|
3231
|
-
"popup-start-year": __props.popupStartYear,
|
|
3232
|
-
resolution: __props.resolution,
|
|
3233
|
-
"time-zone": __props.timeZone,
|
|
3234
|
-
"validate-date-order": false,
|
|
3235
|
-
width: __props.width,
|
|
3236
|
-
"hide-extra-date": ""
|
|
3237
|
-
}, null, 8, ["from-value", "to-value", "disabled-from", "disabled-to", "display-format", "id-from", "id-to", "name-from", "name-to", "popup-display-format", "popup-end-year", "popup-start-year", "resolution", "time-zone", "width"]);
|
|
3238
|
-
};
|
|
3239
|
-
}
|
|
3240
|
-
});
|
|
3241
3342
|
export {
|
|
3242
3343
|
AbstractFilter,
|
|
3243
3344
|
AndFilter,
|
|
3244
|
-
_sfc_main as BSDateRangeFilter,
|
|
3245
|
-
_sfc_main$
|
|
3345
|
+
_sfc_main$2 as BSDateRangeFilter,
|
|
3346
|
+
_sfc_main$1 as BSDateRangeFilters,
|
|
3246
3347
|
_sfc_main$3 as BSDateRangePresets,
|
|
3247
3348
|
_sfc_main$7 as BSGrid,
|
|
3248
3349
|
_sfc_main$d as BSGridCell,
|
|
@@ -3255,8 +3356,8 @@ export {
|
|
|
3255
3356
|
BSGridHeaderCell,
|
|
3256
3357
|
_sfc_main$f as BSGridHeaderCellCheckbox,
|
|
3257
3358
|
BSGridHeaderCellResizeHandle,
|
|
3258
|
-
BSGridHeaderCellSerialNo,
|
|
3259
|
-
_sfc_main
|
|
3359
|
+
_sfc_main$e as BSGridHeaderCellSerialNo,
|
|
3360
|
+
_sfc_main as BSGridLookup,
|
|
3260
3361
|
_sfc_main$8 as BSGridRow,
|
|
3261
3362
|
_sfc_main$4 as BSTextFilter,
|
|
3262
3363
|
BetweenDateFilter,
|