overgrid-vue 1.13.0 → 1.13.1
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.d.ts +9 -0
- package/dist/overgrid.es.js +122 -115
- package/dist/overgrid.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -510,6 +510,14 @@ export declare interface OverGridExtraRowConfig {
|
|
|
510
510
|
* Ths extraRow slot gets the full record object of the "parent". You can define extra fields here that you want to pass to the slot.
|
|
511
511
|
*/
|
|
512
512
|
extraSlotParams: object;
|
|
513
|
+
/**
|
|
514
|
+
* If true, the extra row is opened by default.
|
|
515
|
+
*/
|
|
516
|
+
openedByDefault?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* If true, the close button of the extra row is disabled. The user cannot close the extra row. Works only if openedByDefault is true.
|
|
519
|
+
*/
|
|
520
|
+
disableCloseButton?: boolean;
|
|
513
521
|
}
|
|
514
522
|
|
|
515
523
|
export declare class OverGridField {
|
|
@@ -906,6 +914,7 @@ export declare interface OverGridUseExtraRowInterface {
|
|
|
906
914
|
openRow: (id?: string) => void;
|
|
907
915
|
closeRow: (id?: string) => void;
|
|
908
916
|
toggleRow: (id?: string) => void;
|
|
917
|
+
setOpenedRows: (ids: string[]) => void;
|
|
909
918
|
}
|
|
910
919
|
|
|
911
920
|
export declare interface OverGridUseOrderingInterface {
|
package/dist/overgrid.es.js
CHANGED
|
@@ -23468,79 +23468,82 @@ const {
|
|
|
23468
23468
|
} = yt, OF = (e) => e ? e(yt) : yt, DF = (e, t, r, n, a, i) => {
|
|
23469
23469
|
let s = new URLSearchParams();
|
|
23470
23470
|
return t && t.active && (t.page || t.page === 0) && t.pageSize && (s.set("page", t.page.toString()), s.set("size", t.pageSize.toString())), e && Array.isArray(e) && e.length > 0 && s.set("orders", JSON.stringify(e)), r && Array.isArray(r) && r.length > 0 && s.set("filters", JSON.stringify(r)), i && typeof i == "string" && i.trim().length > 0 && s.set("query", i.trim()), s;
|
|
23471
|
-
}, CF = (e, t) => {
|
|
23472
|
-
const
|
|
23473
|
-
|
|
23474
|
-
let
|
|
23471
|
+
}, CF = (e, t, r) => {
|
|
23472
|
+
const n = Oe([]), a = XE(e.pagination, e.gridUniqueId), i = KE(e.orderConfiguration), s = ZE(e.columnFilters), o = JE(e.search), l = Bs(), f = Oe(!1), u = OF(e.axiosConfigurator), c = async () => {
|
|
23473
|
+
f.value = !0;
|
|
23474
|
+
let d = await u.get(e.endpoint, {
|
|
23475
23475
|
params: e.serverTransformation ? e.serverTransformation(
|
|
23476
|
-
|
|
23477
|
-
|
|
23478
|
-
|
|
23476
|
+
i.rawState.value,
|
|
23477
|
+
a.state,
|
|
23478
|
+
s.filters.value,
|
|
23479
23479
|
e,
|
|
23480
23480
|
t.getFieldsSnapshot(),
|
|
23481
|
-
|
|
23481
|
+
o.query.value
|
|
23482
23482
|
) : DF(
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23483
|
+
i.rawState.value,
|
|
23484
|
+
a.state,
|
|
23485
|
+
s.filters.value,
|
|
23486
23486
|
e,
|
|
23487
23487
|
t.getFieldsSnapshot(),
|
|
23488
|
-
|
|
23488
|
+
o.query.value
|
|
23489
23489
|
),
|
|
23490
23490
|
responseType: "json"
|
|
23491
23491
|
});
|
|
23492
|
-
|
|
23493
|
-
let
|
|
23494
|
-
if (Array.isArray(
|
|
23492
|
+
a.setByResponse(d.data);
|
|
23493
|
+
let m = e.rootkey && d.data[e.rootkey] ? d.data[e.rootkey] : d.data;
|
|
23494
|
+
if (Array.isArray(m) || (l.error(
|
|
23495
23495
|
'The response data is not an array. Please check your server response format and the "rootkey" configuration.'
|
|
23496
|
-
),
|
|
23497
|
-
let
|
|
23498
|
-
typeof
|
|
23496
|
+
), m = []), e.events && e.events.onDataLoad) {
|
|
23497
|
+
let x = e.events.onDataLoad(m);
|
|
23498
|
+
typeof x == "object" && (m = x);
|
|
23499
23499
|
}
|
|
23500
|
-
if (e.events && e.events.onDataLoadWithFullResponse && e.events.onDataLoadWithFullResponse(
|
|
23501
|
-
|
|
23500
|
+
if (e.events && e.events.onDataLoadWithFullResponse && e.events.onDataLoadWithFullResponse(d), n.value = m || [], a.state.page > a.state.totalPages && a.state.totalPages > 0) {
|
|
23501
|
+
f.value = !1, a.lastPage();
|
|
23502
23502
|
return;
|
|
23503
23503
|
}
|
|
23504
23504
|
sf(function() {
|
|
23505
|
-
var
|
|
23506
|
-
e.events && e.events.readyAfterRefresh && ((
|
|
23507
|
-
|
|
23508
|
-
|
|
23505
|
+
var x;
|
|
23506
|
+
if (e.events && e.events.readyAfterRefresh && ((x = e.events) == null || x.readyAfterRefresh()), e.extraRow && e.extraRow.openedByDefault) {
|
|
23507
|
+
const p = m.map((v) => v[e.idkey || "id"].toString());
|
|
23508
|
+
r.setOpenedRows(p);
|
|
23509
|
+
}
|
|
23510
|
+
}), f.value = !1;
|
|
23511
|
+
}, h = qE(e.refreshable, e.gridUniqueId, c);
|
|
23509
23512
|
return ir(
|
|
23510
|
-
() => [
|
|
23511
|
-
(
|
|
23512
|
-
|
|
23513
|
+
() => [a.state.page, a.state.pageSize],
|
|
23514
|
+
(d) => {
|
|
23515
|
+
l.info("Page changed to:", d), c();
|
|
23513
23516
|
}
|
|
23514
23517
|
), ir(
|
|
23515
|
-
() =>
|
|
23518
|
+
() => i.rawState,
|
|
23516
23519
|
() => {
|
|
23517
|
-
|
|
23520
|
+
c();
|
|
23518
23521
|
},
|
|
23519
23522
|
{ deep: !0 }
|
|
23520
23523
|
// Deep watch to capture changes in the orders array
|
|
23521
23524
|
), ir(
|
|
23522
|
-
() =>
|
|
23525
|
+
() => s.filters,
|
|
23523
23526
|
() => {
|
|
23524
|
-
|
|
23527
|
+
c();
|
|
23525
23528
|
},
|
|
23526
23529
|
{ deep: !0 }
|
|
23527
23530
|
// Deep watch to capture changes in the filters array
|
|
23528
23531
|
), ir(
|
|
23529
|
-
() =>
|
|
23532
|
+
() => o.query.value,
|
|
23530
23533
|
() => {
|
|
23531
|
-
|
|
23534
|
+
o.debounce(c);
|
|
23532
23535
|
},
|
|
23533
23536
|
{ deep: !0 }
|
|
23534
23537
|
// Deep watch to capture changes in the filters array
|
|
23535
23538
|
), {
|
|
23536
|
-
records:
|
|
23537
|
-
fetchRecords:
|
|
23538
|
-
pagination:
|
|
23539
|
-
ordering:
|
|
23540
|
-
loading:
|
|
23541
|
-
autoRefresh:
|
|
23542
|
-
columnFilters:
|
|
23543
|
-
search:
|
|
23539
|
+
records: n,
|
|
23540
|
+
fetchRecords: c,
|
|
23541
|
+
pagination: a,
|
|
23542
|
+
ordering: i,
|
|
23543
|
+
loading: f,
|
|
23544
|
+
autoRefresh: h,
|
|
23545
|
+
columnFilters: s,
|
|
23546
|
+
search: o
|
|
23544
23547
|
};
|
|
23545
23548
|
}, RF = (e, t) => {
|
|
23546
23549
|
const r = Oe(!1), n = Oe(null);
|
|
@@ -23679,27 +23682,31 @@ const {
|
|
|
23679
23682
|
e && e.active && !t && r.warn(
|
|
23680
23683
|
"Extra row functionality is active in configuration, but no idkey is provided (its required). Please provide an idkey to enable extra row functionality."
|
|
23681
23684
|
);
|
|
23682
|
-
function a(
|
|
23683
|
-
|
|
23685
|
+
function a(f) {
|
|
23686
|
+
f && n.value.push(f);
|
|
23684
23687
|
}
|
|
23685
|
-
function i(
|
|
23686
|
-
if (!
|
|
23688
|
+
function i(f) {
|
|
23689
|
+
if (!f)
|
|
23687
23690
|
return;
|
|
23688
|
-
const
|
|
23689
|
-
|
|
23691
|
+
const u = n.value.indexOf(f);
|
|
23692
|
+
u !== -1 && n.value.splice(u, 1);
|
|
23690
23693
|
}
|
|
23691
|
-
function s(
|
|
23692
|
-
|
|
23694
|
+
function s(f) {
|
|
23695
|
+
f && (o(f) ? i(f) : a(f));
|
|
23696
|
+
}
|
|
23697
|
+
function o(f) {
|
|
23698
|
+
return f ? n.value.includes(f) : !1;
|
|
23693
23699
|
}
|
|
23694
|
-
function
|
|
23695
|
-
|
|
23700
|
+
function l(f) {
|
|
23701
|
+
n.value = [...f], console.log("Opened rows set to:", n.value);
|
|
23696
23702
|
}
|
|
23697
23703
|
return {
|
|
23698
23704
|
openedRows: n,
|
|
23699
23705
|
isRowOpened: o,
|
|
23700
23706
|
toggleRow: s,
|
|
23701
23707
|
openRow: a,
|
|
23702
|
-
closeRow: i
|
|
23708
|
+
closeRow: i,
|
|
23709
|
+
setOpenedRows: l
|
|
23703
23710
|
};
|
|
23704
23711
|
}, UF = {
|
|
23705
23712
|
key: 1,
|
|
@@ -24058,26 +24065,26 @@ const {
|
|
|
24058
24065
|
var x, p;
|
|
24059
24066
|
const r = e, n = wh();
|
|
24060
24067
|
Oe(document.documentElement.clientWidth);
|
|
24061
|
-
const a = Oe(null), i = Pt(r.config.locale || "en"), s = jE(), o = CF(r.config, s),
|
|
24068
|
+
const a = Oe(null), i = Pt(r.config.locale || "en"), s = jE(), o = BF(r.config.extraRow, r.config.idkey), l = CF(r.config, s, o), f = RF(r.config.columnSelector, r.config.gridUniqueId), u = NF(r.config.currentPageExport), c = PF((x = r.config) != null && x.hideAboutWindow ? r.config.hideAboutWindow : !1), h = IF(
|
|
24062
24069
|
r.config.bulkOperations,
|
|
24063
24070
|
r.config.idkey,
|
|
24064
24071
|
(p = r.config.events) == null ? void 0 : p.onBulkSelectChanges
|
|
24065
|
-
),
|
|
24072
|
+
), d = MF(r.config.rowHighlighter);
|
|
24066
24073
|
af(() => {
|
|
24067
|
-
r.config.skipAutoFetch ||
|
|
24074
|
+
r.config.skipAutoFetch || l.fetchRecords();
|
|
24068
24075
|
});
|
|
24069
24076
|
const m = Je(() => {
|
|
24070
24077
|
var v;
|
|
24071
|
-
return
|
|
24078
|
+
return l.search.isToolbarOptionEnabled.value || h.isToolbarOptionEnabled.value || ((v = r.config.refreshable) == null ? void 0 : v.manualActive) || f.isToolbarOptionEnabled.value || u.isToolbarOptionEnabled.value || c.isToolbarOptionEnabled.value || l.autoRefresh.isToolbarOptionEnabled.value || l.pagination.isToolbarOptionEnabled.value || !!n.toolbarSpacer;
|
|
24072
24079
|
});
|
|
24073
24080
|
return t({
|
|
24074
24081
|
fields: s,
|
|
24075
|
-
records:
|
|
24076
|
-
orderApi:
|
|
24077
|
-
columnFiltersApi:
|
|
24078
|
-
searchApi:
|
|
24079
|
-
paginationApi:
|
|
24080
|
-
refresh:
|
|
24082
|
+
records: l,
|
|
24083
|
+
orderApi: l.ordering,
|
|
24084
|
+
columnFiltersApi: l.columnFilters,
|
|
24085
|
+
searchApi: l.search,
|
|
24086
|
+
paginationApi: l.pagination,
|
|
24087
|
+
refresh: l.fetchRecords
|
|
24081
24088
|
}), (v, y) => {
|
|
24082
24089
|
var T, R, N, V, E;
|
|
24083
24090
|
return G(), Q("div", {
|
|
@@ -24086,34 +24093,34 @@ const {
|
|
|
24086
24093
|
"grid-unique-id": r.config.gridUniqueId
|
|
24087
24094
|
}, [
|
|
24088
24095
|
m.value ? (G(), Q("div", rk, [
|
|
24089
|
-
Y(
|
|
24096
|
+
Y(l).search.isToolbarOptionEnabled.value && v.$slots.search ? pr(v.$slots, "search", {
|
|
24090
24097
|
key: 0,
|
|
24091
24098
|
config: r.config.search,
|
|
24092
|
-
searchApi: Y(
|
|
24099
|
+
searchApi: Y(l).search
|
|
24093
24100
|
}) : we("", !0),
|
|
24094
|
-
Y(
|
|
24101
|
+
Y(l).search.isToolbarOptionEnabled.value && !v.$slots.search ? (G(), tt(YE, {
|
|
24095
24102
|
key: 1,
|
|
24096
24103
|
searchConfig: r.config.search,
|
|
24097
|
-
searcher: Y(
|
|
24104
|
+
searcher: Y(l).search
|
|
24098
24105
|
}, null, 8, ["searchConfig", "searcher"])) : we("", !0),
|
|
24099
24106
|
X("span", nk, [
|
|
24100
24107
|
pr(v.$slots, "toolbarSpacer", {
|
|
24101
24108
|
config: r.config,
|
|
24102
|
-
paginationApi: Y(
|
|
24103
|
-
orderApi: Y(
|
|
24104
|
-
columnFiltersApi: Y(
|
|
24105
|
-
searchApi: Y(
|
|
24109
|
+
paginationApi: Y(l).pagination,
|
|
24110
|
+
orderApi: Y(l).ordering,
|
|
24111
|
+
columnFiltersApi: Y(l).columnFilters,
|
|
24112
|
+
searchApi: Y(l).search
|
|
24106
24113
|
})
|
|
24107
24114
|
]),
|
|
24108
24115
|
X("div", ak, [
|
|
24109
|
-
Y(
|
|
24116
|
+
Y(h).isToolbarOptionEnabled.value ? (G(), tt(LF, {
|
|
24110
24117
|
key: 0,
|
|
24111
24118
|
config: r.config.bulkOperations,
|
|
24112
|
-
bulkOperator: Y(
|
|
24119
|
+
bulkOperator: Y(h)
|
|
24113
24120
|
}, null, 8, ["config", "bulkOperator"])) : we("", !0),
|
|
24114
24121
|
(T = r.config.refreshable) != null && T.manualActive ? (G(), tt(sr, {
|
|
24115
24122
|
key: 1,
|
|
24116
|
-
onClick: Y(
|
|
24123
|
+
onClick: Y(l).fetchRecords,
|
|
24117
24124
|
customClass: "overgrid-btn-manual-refresh",
|
|
24118
24125
|
variant: "primary",
|
|
24119
24126
|
size: "sm",
|
|
@@ -24128,7 +24135,7 @@ const {
|
|
|
24128
24135
|
]),
|
|
24129
24136
|
_: 1
|
|
24130
24137
|
}, 8, ["onClick"])) : we("", !0),
|
|
24131
|
-
Y(
|
|
24138
|
+
Y(f).isToolbarOptionEnabled.value || Y(u).isToolbarOptionEnabled.value || Y(c).isToolbarOptionEnabled.value || Y(l).autoRefresh.isToolbarOptionEnabled.value || Y(l).pagination.isToolbarOptionEnabled.value ? (G(), tt(zo, {
|
|
24132
24139
|
key: 2,
|
|
24133
24140
|
orientation: "left",
|
|
24134
24141
|
ref_key: "operationsDropdown",
|
|
@@ -24155,24 +24162,24 @@ const {
|
|
|
24155
24162
|
content: Be(() => {
|
|
24156
24163
|
var O, C, j, P, H;
|
|
24157
24164
|
return [
|
|
24158
|
-
Y(
|
|
24165
|
+
Y(f).isToolbarOptionEnabled.value || Y(u).isToolbarOptionEnabled.value || Y(c).isToolbarOptionEnabled.value ? (G(), tt(Zh, {
|
|
24159
24166
|
key: 0,
|
|
24160
24167
|
config: r.config,
|
|
24161
|
-
columnSelector: Y(
|
|
24162
|
-
currentPageExporter: Y(
|
|
24163
|
-
aboutModal: Y(
|
|
24168
|
+
columnSelector: Y(f),
|
|
24169
|
+
currentPageExporter: Y(u),
|
|
24170
|
+
aboutModal: Y(c),
|
|
24164
24171
|
closeDropdown: (O = a.value) == null ? void 0 : O.close,
|
|
24165
24172
|
ref: "baseOperations"
|
|
24166
24173
|
}, null, 8, ["config", "columnSelector", "currentPageExporter", "aboutModal", "closeDropdown"])) : we("", !0),
|
|
24167
|
-
Y(
|
|
24174
|
+
Y(l).autoRefresh.isToolbarOptionEnabled.value ? (G(), tt(ad, {
|
|
24168
24175
|
key: 1,
|
|
24169
|
-
autoRefresher: Y(
|
|
24176
|
+
autoRefresher: Y(l).autoRefresh,
|
|
24170
24177
|
config: (C = r.config) == null ? void 0 : C.refreshable,
|
|
24171
24178
|
closeDropdown: (j = a.value) == null ? void 0 : j.close
|
|
24172
24179
|
}, null, 8, ["autoRefresher", "config", "closeDropdown"])) : we("", !0),
|
|
24173
|
-
Y(
|
|
24180
|
+
Y(l).pagination.isToolbarOptionEnabled.value ? (G(), tt(fd, {
|
|
24174
24181
|
key: 2,
|
|
24175
|
-
paginator: Y(
|
|
24182
|
+
paginator: Y(l).pagination,
|
|
24176
24183
|
config: (P = r.config) == null ? void 0 : P.pagination,
|
|
24177
24184
|
closeDropdown: (H = a.value) == null ? void 0 : H.close
|
|
24178
24185
|
}, null, 8, ["paginator", "config", "closeDropdown"])) : we("", !0)
|
|
@@ -24186,13 +24193,13 @@ const {
|
|
|
24186
24193
|
X("table", sk, [
|
|
24187
24194
|
X("thead", ok, [
|
|
24188
24195
|
X("tr", null, [
|
|
24189
|
-
r.config.extraRow && r.config.extraRow.active && r.config.idkey ? (G(), Q("th", lk, y[1] || (y[1] = [
|
|
24196
|
+
r.config.extraRow && r.config.extraRow.active && r.config.idkey && (!r.config.extraRow.openedByDefault || r.config.extraRow.openedByDefault && !r.config.extraRow.disableCloseButton) ? (G(), Q("th", lk, y[1] || (y[1] = [
|
|
24190
24197
|
X("label", { class: "" }, null, -1)
|
|
24191
24198
|
]))) : we("", !0),
|
|
24192
24199
|
r.config.bulkOperations && r.config.bulkOperations.active && ((R = r.config.bulkOperations.methods) == null ? void 0 : R.length) > 0 && r.config.idkey ? (G(), Q("th", fk, y[2] || (y[2] = [
|
|
24193
24200
|
X("label", { class: "" }, null, -1)
|
|
24194
24201
|
]))) : we("", !0),
|
|
24195
|
-
(G(!0), Q(Wt, null, wr(Y(
|
|
24202
|
+
(G(!0), Q(Wt, null, wr(Y(f).filter(Y(s).mappingVisible()), (O) => {
|
|
24196
24203
|
var C, j, P, H, ue, Ee;
|
|
24197
24204
|
return G(), Q("th", {
|
|
24198
24205
|
style: Yo({ width: O.width || "auto" }),
|
|
@@ -24204,30 +24211,30 @@ const {
|
|
|
24204
24211
|
titleField: O,
|
|
24205
24212
|
orderActive: (C = r.config.orderConfiguration) == null ? void 0 : C.active,
|
|
24206
24213
|
orderable: O.orderable,
|
|
24207
|
-
orderApi: Y(
|
|
24214
|
+
orderApi: Y(l).ordering,
|
|
24208
24215
|
orderConfig: r.config.orderConfiguration,
|
|
24209
|
-
columnFiltersApi: Y(
|
|
24216
|
+
columnFiltersApi: Y(l).columnFilters,
|
|
24210
24217
|
columnFiltersActive: (j = r.config.columnFilters) == null ? void 0 : j.active
|
|
24211
24218
|
}) : (G(), Q("div", {
|
|
24212
24219
|
key: 1,
|
|
24213
24220
|
class: wt(["flex flex-row items-center overgrid-column-title-container h-12 px-4", {
|
|
24214
24221
|
"overgrid-column-title-container-hoverable cursor-pointer": ((P = r.config.orderConfiguration) == null ? void 0 : P.active) && O.orderable
|
|
24215
24222
|
}]),
|
|
24216
|
-
onClick: () => Y(
|
|
24223
|
+
onClick: () => Y(l).ordering.toggleField(O)
|
|
24217
24224
|
}, [
|
|
24218
24225
|
X("span", ck, Ae(O.title), 1),
|
|
24219
24226
|
y[3] || (y[3] = X("span", { class: "grow min-w-3" }, null, -1)),
|
|
24220
24227
|
X("div", hk, [
|
|
24221
24228
|
(H = r.config.orderConfiguration) != null && H.active && O.orderable ? (G(), Q("div", dk, [
|
|
24222
24229
|
me(Ph, {
|
|
24223
|
-
orderer: Y(
|
|
24230
|
+
orderer: Y(l).ordering,
|
|
24224
24231
|
field: O,
|
|
24225
24232
|
config: r.config.orderConfiguration
|
|
24226
24233
|
}, null, 8, ["orderer", "field", "config"])
|
|
24227
24234
|
])) : we("", !0),
|
|
24228
24235
|
(ue = r.config.columnFilters) != null && ue.active && ((Ee = O.columnFilter) != null && Ee.active) ? (G(), Q("div", mk, [
|
|
24229
24236
|
me(Vh, {
|
|
24230
|
-
columnFilter: Y(
|
|
24237
|
+
columnFilter: Y(l).columnFilters,
|
|
24231
24238
|
field: O,
|
|
24232
24239
|
config: r.config.columnFilters
|
|
24233
24240
|
}, null, 8, ["columnFilter", "field", "config"])
|
|
@@ -24238,8 +24245,8 @@ const {
|
|
|
24238
24245
|
}), 128))
|
|
24239
24246
|
])
|
|
24240
24247
|
]),
|
|
24241
|
-
Y(
|
|
24242
|
-
(G(!0), Q(Wt, null, wr(Y(
|
|
24248
|
+
Y(l).records.value && Y(l).records.value.length > 0 ? (G(), Q("tbody", pk, [
|
|
24249
|
+
(G(!0), Q(Wt, null, wr(Y(l).records.value, (O, C) => {
|
|
24243
24250
|
var j, P;
|
|
24244
24251
|
return G(), Q(Wt, {
|
|
24245
24252
|
key: "record_" + (r.config.idkey ? O[r.config.idkey] : C)
|
|
@@ -24253,11 +24260,11 @@ const {
|
|
|
24253
24260
|
)
|
|
24254
24261
|
)
|
|
24255
24262
|
}, [
|
|
24256
|
-
r.config.extraRow && r.config.extraRow.active && r.config.idkey ? (G(), Q("td", vk, [
|
|
24263
|
+
r.config.extraRow && r.config.extraRow.active && r.config.idkey && (!r.config.extraRow.openedByDefault || r.config.extraRow.openedByDefault && !r.config.extraRow.disableCloseButton) ? (G(), Q("td", vk, [
|
|
24257
24264
|
me(sr, {
|
|
24258
24265
|
onClick: (H) => {
|
|
24259
24266
|
var ue;
|
|
24260
|
-
return Y(
|
|
24267
|
+
return Y(o).toggleRow((ue = O[r.config.idkey]) == null ? void 0 : ue.toString());
|
|
24261
24268
|
},
|
|
24262
24269
|
customClass: "overgrid-btn-manual-refresh",
|
|
24263
24270
|
variant: "light",
|
|
@@ -24268,7 +24275,7 @@ const {
|
|
|
24268
24275
|
iconLeft: Be(() => {
|
|
24269
24276
|
var H;
|
|
24270
24277
|
return [
|
|
24271
|
-
Y(
|
|
24278
|
+
Y(o).isRowOpened((H = O[r.config.idkey]) == null ? void 0 : H.toString()) ? (G(), tt(Ot, {
|
|
24272
24279
|
key: 1,
|
|
24273
24280
|
type: "chevron-down",
|
|
24274
24281
|
class: "w-3 h-3"
|
|
@@ -24286,13 +24293,13 @@ const {
|
|
|
24286
24293
|
X("label", gk, [
|
|
24287
24294
|
me(ms, {
|
|
24288
24295
|
value: (P = O[r.config.idkey]) == null ? void 0 : P.toString(),
|
|
24289
|
-
modelValue: Y(
|
|
24290
|
-
"onUpdate:modelValue": y[0] || (y[0] = (H) => Y(
|
|
24296
|
+
modelValue: Y(h).checkedRows.value,
|
|
24297
|
+
"onUpdate:modelValue": y[0] || (y[0] = (H) => Y(h).checkedRows.value = H),
|
|
24291
24298
|
variant: "secondary"
|
|
24292
24299
|
}, null, 8, ["value", "modelValue"])
|
|
24293
24300
|
])
|
|
24294
24301
|
])) : we("", !0),
|
|
24295
|
-
(G(!0), Q(Wt, null, wr(Y(
|
|
24302
|
+
(G(!0), Q(Wt, null, wr(Y(f).filter(Y(s).mappingVisible()), (H) => (G(), Q("td", {
|
|
24296
24303
|
class: "overgrid-cell px-4 text-sm",
|
|
24297
24304
|
key: "body_" + H.key
|
|
24298
24305
|
}, [
|
|
@@ -24306,11 +24313,11 @@ const {
|
|
|
24306
24313
|
fieldKey: H.key,
|
|
24307
24314
|
record: O,
|
|
24308
24315
|
refreshGrid: () => {
|
|
24309
|
-
Y(
|
|
24316
|
+
Y(l).fetchRecords();
|
|
24310
24317
|
},
|
|
24311
24318
|
customFormatters: r.customFormatters,
|
|
24312
24319
|
openExtraRow: (ue) => {
|
|
24313
|
-
r.config.idkey && Y(
|
|
24320
|
+
r.config.idkey && Y(o).toggleRow(ue);
|
|
24314
24321
|
}
|
|
24315
24322
|
}, null, 8, ["theme", "type", "data", "formatterConfig", "rowid", "fieldKey", "record", "refreshGrid", "customFormatters", "openExtraRow"])) : (G(), Q(Wt, { key: 1 }, [
|
|
24316
24323
|
cs(Ae(H.middleware ? H.middleware(O[H.key], O) : O[H.key]), 1)
|
|
@@ -24324,7 +24331,7 @@ const {
|
|
|
24324
24331
|
r.config.extraRow && r.config.extraRow.active && r.config.idkey ? Gr((G(), Q("tr", wk, [
|
|
24325
24332
|
X("td", {
|
|
24326
24333
|
class: "overgrid-extra-row-cell",
|
|
24327
|
-
colspan: Y(
|
|
24334
|
+
colspan: Y(f).filter(Y(s).mappingVisible()).length + (r.config.bulkOperations && r.config.bulkOperations.active && ((H = r.config.bulkOperations.methods) == null ? void 0 : H.length) > 0 && r.config.idkey ? 1 : 0) + 1
|
|
24328
24335
|
}, [
|
|
24329
24336
|
pr(v.$slots, "extraRow", {
|
|
24330
24337
|
record: O,
|
|
@@ -24332,7 +24339,7 @@ const {
|
|
|
24332
24339
|
})
|
|
24333
24340
|
], 8, yk)
|
|
24334
24341
|
], 512)), [
|
|
24335
|
-
[ii, Y(
|
|
24342
|
+
[ii, Y(o).openedRows.value.includes((Ee = O[r.config.idkey]) == null ? void 0 : Ee.toString())]
|
|
24336
24343
|
]) : we("", !0)
|
|
24337
24344
|
];
|
|
24338
24345
|
}),
|
|
@@ -24343,7 +24350,7 @@ const {
|
|
|
24343
24350
|
])) : (G(), Q("tbody", Tk, [
|
|
24344
24351
|
X("tr", null, [
|
|
24345
24352
|
X("td", {
|
|
24346
|
-
colspan: Y(
|
|
24353
|
+
colspan: Y(f).filter(Y(s).mappingVisible()).length + (r.config.bulkOperations && r.config.bulkOperations.active && ((N = r.config.bulkOperations.methods) == null ? void 0 : N.length) > 0 && r.config.idkey ? 1 : 0) + 1
|
|
24347
24354
|
}, [
|
|
24348
24355
|
pr(v.$slots, "emptyResult")
|
|
24349
24356
|
], 8, Ek)
|
|
@@ -24353,40 +24360,40 @@ const {
|
|
|
24353
24360
|
]),
|
|
24354
24361
|
(V = r.config.pagination) != null && V.active && v.$slots.pagination ? pr(v.$slots, "pagination", {
|
|
24355
24362
|
key: 1,
|
|
24356
|
-
paginationApi: Y(
|
|
24363
|
+
paginationApi: Y(l).pagination
|
|
24357
24364
|
}) : we("", !0),
|
|
24358
24365
|
(E = r.config.pagination) != null && E.active && !v.$slots.pagination ? (G(), tt(Ch, {
|
|
24359
24366
|
key: 2,
|
|
24360
|
-
paginator: Y(
|
|
24367
|
+
paginator: Y(l).pagination
|
|
24361
24368
|
}, null, 8, ["paginator"])) : we("", !0),
|
|
24362
|
-
Y(
|
|
24369
|
+
Y(l).loading.value ? (G(), Q("div", Sk, [
|
|
24363
24370
|
X("span", Fk, Ae(Y(i).l("loading_data")), 1)
|
|
24364
24371
|
])) : we("", !0),
|
|
24365
24372
|
me(kd, {
|
|
24366
24373
|
mappingVisible: Y(s).mappingVisible(),
|
|
24367
|
-
columnSelector: Y(
|
|
24374
|
+
columnSelector: Y(f)
|
|
24368
24375
|
}, null, 8, ["mappingVisible", "columnSelector"]),
|
|
24369
24376
|
me(eE, {
|
|
24370
24377
|
currentPageExporterConfig: r.config.currentPageExport,
|
|
24371
|
-
mappingVisible: Y(
|
|
24372
|
-
currentPageExporter: Y(
|
|
24373
|
-
currentRecords: Y(
|
|
24378
|
+
mappingVisible: Y(f).filter(Y(s).mappingVisible()),
|
|
24379
|
+
currentPageExporter: Y(u),
|
|
24380
|
+
currentRecords: Y(l).records
|
|
24374
24381
|
}, null, 8, ["currentPageExporterConfig", "mappingVisible", "currentPageExporter", "currentRecords"]),
|
|
24375
|
-
me(zE, { aboutModal: Y(
|
|
24382
|
+
me(zE, { aboutModal: Y(c) }, null, 8, ["aboutModal"]),
|
|
24376
24383
|
me(hE, {
|
|
24377
|
-
columnFilters: Y(
|
|
24384
|
+
columnFilters: Y(l).columnFilters
|
|
24378
24385
|
}, null, 8, ["columnFilters"]),
|
|
24379
24386
|
me(yE, {
|
|
24380
|
-
columnFilters: Y(
|
|
24387
|
+
columnFilters: Y(l).columnFilters
|
|
24381
24388
|
}, null, 8, ["columnFilters"]),
|
|
24382
24389
|
me(RE, {
|
|
24383
|
-
columnFilters: Y(
|
|
24390
|
+
columnFilters: Y(l).columnFilters
|
|
24384
24391
|
}, null, 8, ["columnFilters"]),
|
|
24385
24392
|
me(UE, {
|
|
24386
|
-
columnFilters: Y(
|
|
24393
|
+
columnFilters: Y(l).columnFilters
|
|
24387
24394
|
}, null, 8, ["columnFilters"]),
|
|
24388
24395
|
me(VE, {
|
|
24389
|
-
columnFilters: Y(
|
|
24396
|
+
columnFilters: Y(l).columnFilters
|
|
24390
24397
|
}, null, 8, ["columnFilters"])
|
|
24391
24398
|
], 8, tk);
|
|
24392
24399
|
};
|
package/dist/overgrid.umd.js
CHANGED
|
@@ -148,4 +148,4 @@ se.version="2.30.1",X2(Je),se.fn=Q,se.min=Pw,se.max=Iw,se.now=Lw,se.utc=Or,se.un
|
|
|
148
148
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[ru]=this[ru]={accessors:{}}).accessors,a=this.prototype;function i(s){const o=Ga(s);n[o]||(tS(a,s),n[o]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}};Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Jt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),Y.freezeMethods(Jt);function cl(e,t){const r=this||Ya,n=t||r,a=Jt.from(n.headers);let i=n.data;return Y.forEach(e,function(o){i=o.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function nu(e){return!!(e&&e.__CANCEL__)}function ca(e,t,r){ke.call(this,e??"canceled",ke.ERR_CANCELED,t,r),this.name="CanceledError"}Y.inherits(ca,ke,{__CANCEL__:!0});function au(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ke("Request failed with status code "+r.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function rS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nS(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,s;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),u=n[i];s||(s=c),r[a]=f,n[a]=c;let h=i,d=0;for(;h!==a;)d+=r[h++],h=h%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),c-s<t)return;const m=u&&c-u;return m?Math.round(d*1e3/m):void 0}}function aS(e,t){let r=0,n=1e3/t,a,i;const s=(c,u=Date.now())=>{r=u,a=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),h=u-r;h>=n?s(c,u):(a=c,i||(i=setTimeout(()=>{i=null,s(a)},n-h)))},()=>a&&s(a)]}const ps=(e,t,r=3)=>{let n=0;const a=nS(50,250);return aS(i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,f=s-n,c=a(f),u=s<=o;n=s;const h={loaded:s,total:o,progress:o?s/o:void 0,bytes:f,rate:c||void 0,estimated:c&&o&&u?(o-s)/c:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(h)},r)},iu=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},su=e=>(...t)=>Y.asap(()=>e(...t)),iS=Lt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Lt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,sS=Lt.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const s=[e+"="+encodeURIComponent(t)];Y.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),Y.isString(n)&&s.push("path="+n),Y.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lS(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ou(e,t,r){let n=!oS(t);return e&&(n||r==!1)?lS(e,t):t}const lu=e=>e instanceof Jt?{...e}:e;function On(e,t){t=t||{};const r={};function n(c,u,h,d){return Y.isPlainObject(c)&&Y.isPlainObject(u)?Y.merge.call({caseless:d},c,u):Y.isPlainObject(u)?Y.merge({},u):Y.isArray(u)?u.slice():u}function a(c,u,h,d){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return n(void 0,c,h,d)}else return n(c,u,h,d)}function i(c,u){if(!Y.isUndefined(u))return n(void 0,u)}function s(c,u){if(Y.isUndefined(u)){if(!Y.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function o(c,u,h){if(h in t)return n(c,u);if(h in e)return n(void 0,c)}const f={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(c,u,h)=>a(lu(c),lu(u),h,!0)};return Y.forEach(Object.keys(Object.assign({},e,t)),function(u){const h=f[u]||a,d=h(e[u],t[u],u);Y.isUndefined(d)&&h!==o||(r[u]=d)}),r}const fu=e=>{const t=On({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:o}=t;t.headers=s=Jt.from(s),t.url=Jc(ou(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let f;if(Y.isFormData(r)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((f=s.getContentType())!==!1){const[c,...u]=f?f.split(";").map(h=>h.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Lt.hasStandardBrowserEnv&&(n&&Y.isFunction(n)&&(n=n(t)),n||n!==!1&&iS(t.url))){const c=a&&i&&sS.read(i);c&&s.set(a,c)}return t},fS=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const a=fu(e);let i=a.data;const s=Jt.from(a.headers).normalize();let{responseType:o,onUploadProgress:f,onDownloadProgress:c}=a,u,h,d,m,p;function _(){m&&m(),p&&p(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function g(){if(!x)return;const T=Jt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),B={data:!o||o==="text"||o==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:T,config:e,request:x};au(function(S){r(S),_()},function(S){n(S),_()},B),x=null}"onloadend"in x?x.onloadend=g:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(g)},x.onabort=function(){x&&(n(new ke("Request aborted",ke.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new ke("Network Error",ke.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let R=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const B=a.transitional||eu;a.timeoutErrorMessage&&(R=a.timeoutErrorMessage),n(new ke(R,B.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,x)),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&Y.forEach(s.toJSON(),function(R,B){x.setRequestHeader(B,R)}),Y.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),o&&o!=="json"&&(x.responseType=a.responseType),c&&([d,p]=ps(c,!0),x.addEventListener("progress",d)),f&&x.upload&&([h,m]=ps(f),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(u=T=>{x&&(n(!T||T.type?new ca(null,e,x):T),x.abort(),x=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const E=rS(a.url);if(E&&Lt.protocols.indexOf(E)===-1){n(new ke("Unsupported protocol "+E+":",ke.ERR_BAD_REQUEST,e));return}x.send(i||null)})},cS=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(c){if(!a){a=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ke?u:new ca(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,i(new ke(`timeout ${t} of ms exceeded`,ke.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>Y.asap(o),f}},uS=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},hS=async function*(e,t){for await(const r of dS(e))yield*uS(r,t)},dS=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},cu=(e,t,r,n)=>{const a=hS(e,t);let i=0,s,o=f=>{s||(s=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:c,value:u}=await a.next();if(c){o(),f.close();return}let h=u.byteLength;if(r){let d=i+=h;r(d)}f.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(f){return o(f),a.return()}},{highWaterMark:2})},xs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uu=xs&&typeof ReadableStream=="function",mS=xs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},pS=uu&&hu(()=>{let e=!1;const t=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),du=64*1024,ul=uu&&hu(()=>Y.isReadableStream(new Response("").body)),_s={stream:ul&&(e=>e.body)};xs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_s[t]&&(_s[t]=Y.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ke(`Response type '${t}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})})(new Response);const xS=async e=>{if(e==null)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e))return(await new Request(Lt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Y.isArrayBufferView(e)||Y.isArrayBuffer(e))return e.byteLength;if(Y.isURLSearchParams(e)&&(e=e+""),Y.isString(e))return(await mS(e)).byteLength},_S=async(e,t)=>{const r=Y.toFiniteNumber(e.getContentLength());return r??xS(t)},hl={http:LT,xhr:fS,fetch:xs&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:s,onDownloadProgress:o,onUploadProgress:f,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:d}=fu(e);c=c?(c+"").toLowerCase():"text";let m=cS([a,i&&i.toAbortSignal()],s),p;const _=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let x;try{if(f&&pS&&r!=="get"&&r!=="head"&&(x=await _S(u,n))!==0){let B=new Request(t,{method:"POST",body:n,duplex:"half"}),H;if(Y.isFormData(n)&&(H=B.headers.get("content-type"))&&u.setContentType(H),B.body){const[S,C]=iu(x,ps(su(f)));n=cu(B.body,du,S,C)}}Y.isString(h)||(h=h?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...d,signal:m,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:g?h:void 0});let E=await fetch(p,d);const T=ul&&(c==="stream"||c==="response");if(ul&&(o||T&&_)){const B={};["status","statusText","headers"].forEach(D=>{B[D]=E[D]});const H=Y.toFiniteNumber(E.headers.get("content-length")),[S,C]=o&&iu(H,ps(su(o),!0))||[];E=new Response(cu(E.body,du,S,()=>{C&&C(),_&&_()}),B)}c=c||"text";let R=await _s[Y.findKey(_s,c)||"text"](E,e);return!T&&_&&_(),await new Promise((B,H)=>{au(B,H,{data:R,headers:Jt.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:p})})}catch(g){throw _&&_(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,p),{cause:g.cause||g}):ke.from(g,g&&g.code,e,p)}})};Y.forEach(hl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mu=e=>`- ${e}`,gS=e=>Y.isFunction(e)||e===null||e===!1,pu={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i<t;i++){r=e[i];let s;if(n=r,!gS(r)&&(n=hl[(s=String(r)).toLowerCase()],n===void 0))throw new ke(`Unknown adapter '${s}'`);if(n)break;a[s||"#"+i]=n}if(!n){const i=Object.entries(a).map(([o,f])=>`adapter ${o} `+(f===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
149
149
|
`+i.map(mu).join(`
|
|
150
150
|
`):" "+mu(i[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:hl};function dl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ca(null,e)}function xu(e){return dl(e),e.headers=Jt.from(e.headers),e.data=cl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pu.getAdapter(e.adapter||Ya.adapter)(e).then(function(n){return dl(e),n.data=cl.call(e,e.transformResponse,n),n.headers=Jt.from(n.headers),n},function(n){return nu(n)||(dl(e),n&&n.response&&(n.response.data=cl.call(e,e.transformResponse,n.response),n.response.headers=Jt.from(n.response.headers))),Promise.reject(n)})}const _u="1.10.0",gs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gs[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const gu={};gs.transitional=function(t,r,n){function a(i,s){return"[Axios v"+_u+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new ke(a(s," has been removed"+(r?" in "+r:"")),ke.ERR_DEPRECATED);return r&&!gu[s]&&(gu[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,o):!0}},gs.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function vS(e,t,r){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],s=t[i];if(s){const o=e[i],f=o===void 0||s(o,i,e);if(f!==!0)throw new ke("option "+i+" must be "+f,ke.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ke("Unknown option "+i,ke.ERR_BAD_OPTION)}}const vs={assertOptions:vS,validators:gs},Rr=vs.validators;let Cn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Qc,response:new Qc}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
151
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=On(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&vs.assertOptions(n,{silentJSONParsing:Rr.transitional(Rr.boolean),forcedJSONParsing:Rr.transitional(Rr.boolean),clarifyTimeoutError:Rr.transitional(Rr.boolean)},!1),a!=null&&(Y.isFunction(a)?r.paramsSerializer={serialize:a}:vs.assertOptions(a,{encode:Rr.function,serialize:Rr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),vs.assertOptions(r,{baseUrl:Rr.spelling("baseURL"),withXsrfToken:Rr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&Y.merge(i.common,i[r.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=Jt.concat(s,i);const o=[];let f=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(f=f&&_.synchronous,o.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let u,h=0,d;if(!f){const p=[xu.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,u=Promise.resolve(r);h<d;)u=u.then(p[h++],p[h++]);return u}d=o.length;let m=r;for(h=0;h<d;){const p=o[h++],_=o[h++];try{m=p(m)}catch(x){_.call(this,x);break}}try{u=xu.call(this,m)}catch(p){return Promise.reject(p)}for(h=0,d=c.length;h<d;)u=u.then(c[h++],c[h++]);return u}getUri(t){t=On(this.defaults,t);const r=ou(t.baseURL,t.url,t.allowAbsoluteUrls);return Jc(r,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Cn.prototype[t]=function(r,n){return this.request(On(n||{},{method:t,url:r,data:(n||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,o){return this.request(On(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Cn.prototype[t]=r(),Cn.prototype[t+"Form"]=r(!0)});let wS=class Tu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{n.subscribe(o),i=o}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,o){n.reason||(n.reason=new ca(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Tu(function(a){t=a}),cancel:t}}};function yS(e){return function(r){return e.apply(null,r)}}function ES(e){return Y.isObject(e)&&e.isAxiosError===!0}const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ml).forEach(([e,t])=>{ml[t]=e});function vu(e){const t=new Cn(e),r=Ic(Cn.prototype.request,t);return Y.extend(r,Cn.prototype,t,{allOwnKeys:!0}),Y.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return vu(On(e,a))},r}const ot=vu(Ya);ot.Axios=Cn,ot.CanceledError=ca,ot.CancelToken=wS,ot.isCancel=nu,ot.VERSION=_u,ot.toFormData=ds,ot.AxiosError=ke,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=yS,ot.isAxiosError=ES,ot.mergeConfig=On,ot.AxiosHeaders=Jt,ot.formToJSON=e=>tu(Y.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=pu.getAdapter,ot.HttpStatusCode=ml,ot.default=ot;const{Axios:zk,AxiosError:Yk,CanceledError:Gk,isCancel:jk,CancelToken:Xk,VERSION:Kk,all:qk,Cancel:Zk,isAxiosError:Jk,spread:Qk,toFormData:eF,AxiosHeaders:tF,HttpStatusCode:rF,formToJSON:nF,getAdapter:aF,mergeConfig:iF}=ot,TS=e=>e?e(ot):ot,SS=(e,t,r,n,a,i)=>{let s=new URLSearchParams;return t&&t.active&&(t.page||t.page===0)&&t.pageSize&&(s.set("page",t.page.toString()),s.set("size",t.pageSize.toString())),e&&Array.isArray(e)&&e.length>0&&s.set("orders",JSON.stringify(e)),r&&Array.isArray(r)&&r.length>0&&s.set("filters",JSON.stringify(r)),i&&typeof i=="string"&&i.trim().length>0&&s.set("query",i.trim()),s},kS=(e,t)=>{const r=l.ref([]),n=K4(e.pagination,e.gridUniqueId),a=q4(e.orderConfiguration),i=J4(e.columnFilters),s=Q4(e.search),o=os(),f=l.ref(!1),c=TS(e.axiosConfigurator),u=async()=>{f.value=!0;let d=await c.get(e.endpoint,{params:e.serverTransformation?e.serverTransformation(a.rawState.value,n.state,i.filters.value,e,t.getFieldsSnapshot(),s.query.value):SS(a.rawState.value,n.state,i.filters.value,e,t.getFieldsSnapshot(),s.query.value),responseType:"json"});n.setByResponse(d.data);let m=e.rootkey&&d.data[e.rootkey]?d.data[e.rootkey]:d.data;if(Array.isArray(m)||(o.error('The response data is not an array. Please check your server response format and the "rootkey" configuration.'),m=[]),e.events&&e.events.onDataLoad){let p=e.events.onDataLoad(m);typeof p=="object"&&(m=p)}if(e.events&&e.events.onDataLoadWithFullResponse&&e.events.onDataLoadWithFullResponse(d),r.value=m||[],n.state.page>n.state.totalPages&&n.state.totalPages>0){f.value=!1,n.lastPage();return}l.nextTick(function(){var p;e.events&&e.events.readyAfterRefresh&&((p=e.events)==null||p.readyAfterRefresh())}),f.value=!1},h=Z4(e.refreshable,e.gridUniqueId,u);return l.watch(()=>[n.state.page,n.state.pageSize],d=>{o.info("Page changed to:",d),u()}),l.watch(()=>a.rawState,()=>{u()},{deep:!0}),l.watch(()=>i.filters,()=>{u()},{deep:!0}),l.watch(()=>s.query.value,()=>{s.debounce(u)},{deep:!0}),{records:r,fetchRecords:u,pagination:n,ordering:a,loading:f,autoRefresh:h,columnFilters:i,search:s}},FS=(e,t)=>{const r=l.ref(!1),n=l.ref(null);function a(){r.value=!0}function i(){r.value=!1}function s(c){n.value=c,localStorage.setItem("overgrid-column-selector-"+t,JSON.stringify(n.value))}function o(c){return n.value===null?c:c.filter(u=>{var h;return(h=n.value)==null?void 0:h.includes(u.key)})}if(localStorage.getItem("overgrid-column-selector-"+t)){const c=JSON.parse(localStorage.getItem("overgrid-column-selector-"+t)||"[]");n.value=c.length>0?c:null}const f=l.computed(()=>!!(e&&e.active));return{showModal:a,closeModal:i,isModalShown:r,selectedFields:n,setColumns:s,filter:o,isToolbarOptionEnabled:f}},AS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>!!(e!=null&&e.active&&(e!=null&&e.xlsxEnabled||e!=null&&e.csvEnabled)));return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},bS=e=>{const t=os();function r(n,a=""){let i=a+" ";return e!=null&&e.active?e!=null&&e.fn&&typeof e.fn=="function"&&(e!=null&&e.fn(n))?i+(e.classList+" overgrid-row-highlighted"||""):(t.warn('Row highlighter configuration is not defined a function in "fn" key.'),i.trim()):i.trim()}return{getClassList:r}},OS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>e!==!0);return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},CS=(e,t,r)=>{const n=l.ref([]),a=os();e&&e.active&&!t&&a.warn("Bulk operations are active, but no idkey is provided. Please provide an idkey to enable bulk operations."),l.watch(()=>n.value,()=>{r&&typeof r=="function"&&r(n.value)},{deep:!0});const i=l.computed(()=>{var s;return!!(e&&e.active&&((s=e.methods)==null?void 0:s.length)>0&&t)});return{checkedRows:n,isToolbarOptionEnabled:i}},NS=l.defineComponent({__name:"BulkOperationsDropdown",props:{config:{},bulkOperator:{}},setup(e){const t=wt(),r=e,n=l.ref("");function a(){let i;if(r.config){for(var s in r.config.methods)if(r.config.methods[s].key==n.value){i=r.config.methods[s].action;break}i&&i(r.bulkOperator.checkedRows.value,()=>{n.value="",r.bulkOperator.checkedRows.value=[]})}}return(i,s)=>{var o;return l.openBlock(),l.createBlock(is,{rounded:"full",variant:"primary",size:"sm",customClass:"overgrid-select min-w-32 sm:min-w-48",disabled:r.bulkOperator.checkedRows.value.length<=0,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=f=>n.value=f),options:(o=r.config)!=null&&o.methods?r.config.methods.map(f=>({key:f.key,text:f.title})):[],onChange:a,enableNullOption:!0,nullOptionText:l.unref(t).l("selected_rows",{selectedCount:r.bulkOperator.checkedRows.value.length.toString()})},null,8,["disabled","modelValue","options","nullOptionText"])}}}),DS=(e,t)=>{const r=os(),n=l.ref([]);e&&e.active&&!t&&r.warn("Extra row functionality is active in configuration, but no idkey is provided (its required). Please provide an idkey to enable extra row functionality.");function a(f){f&&n.value.push(f)}function i(f){if(!f)return;const c=n.value.indexOf(f);c!==-1&&n.value.splice(c,1)}function s(f){f&&(o(f)?i(f):a(f))}function o(f){return f?n.value.includes(f):!1}return{openedRows:n,isRowOpened:o,toggleRow:s,openRow:a,closeRow:i}},RS={key:1,class:"flex flex-row gap-1"},BS=l.defineComponent({__name:"EnumFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f,c,u,h,d,m,p;return Array.isArray(t.data)?(l.openBlock(),l.createElementBlock("span",RS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.data,(_,x)=>{var g,E,T,R,B,H,S,C,D,G,P,z;return l.openBlock(),l.createElementBlock("span",{key:x,class:l.normalizeClass(((R=(T=(E=(g=t.formatterConfig)==null?void 0:g.config)==null?void 0:E.mapping)==null?void 0:T[_])==null?void 0:R.class)||"")},l.toDisplayString((C=(S=(H=(B=t.formatterConfig)==null?void 0:B.config)==null?void 0:H.mapping)==null?void 0:S[_])!=null&&C.title?(z=(P=(G=(D=t.formatterConfig)==null?void 0:D.config)==null?void 0:G.mapping)==null?void 0:P[_])==null?void 0:z.title:_),3)}),128))])):(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(((s=(i=(a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.mapping)==null?void 0:i[t.data])==null?void 0:s.class)||"")},l.toDisplayString((u=(c=(f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.mapping)==null?void 0:c[t.data])!=null&&u.title?(p=(m=(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.mapping)==null?void 0:m[t.data])==null?void 0:p.title:t.data),3))}}}),MS=l.defineComponent({__name:"BooleanFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s;return l.toDisplayString(t.data?(n=t.formatterConfig.config)!=null&&n.trueText?(a=t.formatterConfig.config)==null?void 0:a.trueText:t.l("yes"):(i=t.formatterConfig.config)!=null&&i.falseText?(s=t.formatterConfig.config)==null?void 0:s.falseText:t.l("no"))}}}),PS=l.defineComponent({__name:"ClassFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(t.data),3)}}}),IS=l.defineComponent({__name:"DateFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(l.unref(se)(t.data,((s=(i=t.formatterConfig)==null?void 0:i.config)==null?void 0:s.inputFormat)||"YYYY-MM-DD").format(((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.outputFormat)||"YYYY-MM-DD")),3)}}}),LS=l.defineComponent({__name:"NumberFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var a,i,s,o,f,c,u,h,d,m,p,_,x,g;return t.data?parseFloat(t.data).toLocaleString((i=(a=t.formatterConfig)==null?void 0:a.config)!=null&&i.locale?(o=(s=t.formatterConfig)==null?void 0:s.config)==null?void 0:o.locale:"en-EN",{minimumFractionDigits:((c=(f=t.formatterConfig)==null?void 0:f.config)==null?void 0:c.minimumFractionDigits)||0,maximumFractionDigits:((h=(u=t.formatterConfig)==null?void 0:u.config)==null?void 0:h.maximumFractionDigits)||2,useGrouping:((m=(d=t.formatterConfig)==null?void 0:d.config)==null?void 0:m.useGrouping)!==void 0&&typeof((_=(p=t.formatterConfig)==null?void 0:p.config)==null?void 0:_.useGrouping)=="boolean"?(g=(x=t.formatterConfig)==null?void 0:x.config)==null?void 0:g.useGrouping:!0}):""});return(n,a)=>{var i,s;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((s=(i=n.formatterConfig)==null?void 0:i.config)==null?void 0:s.class)||"")},l.toDisplayString(r.value),3)}}}),US={key:0,class:"flex flex-row items-center gap-1.5 pr-1"},VS=["innerHTML"],WS={key:1,class:"flex items-center ml-1.5"},$S={class:"!rounded-md font-inter w-full"},HS={class:"my-1 rounded-lg"},zS=["disabled","data-test-value","onClick"],YS=l.defineComponent({__name:"ActionButtonsFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var i,s,o,f,c,u,h,d;return!t.formatterConfig||!((s=(i=t.formatterConfig)==null?void 0:i.config)!=null&&s.buttons)?[]:typeof((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.buttons)=="function"?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.buttons(t.record):(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.buttons}),n=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned&&s.push(i[o]);return s}),a=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned||s.push(i[o]);return s});return(i,s)=>{var o,f,c,u;return l.openBlock(),l.createElementBlock("div",{"data-test":"",class:"flex flex-row overflow-y-visible overgrid-action-buttons",onMousedown:s[0]||(s[0]=l.withModifiers(()=>{},["stop"]))},[a.value.length>0?(l.openBlock(),l.createElementBlock("span",US,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(h,d)=>(l.openBlock(),l.createBlock(Wt,{rounded:"",iconOnly:!h.title,variant:h.variant,onClick:m=>{h.action(m,i.fieldKey,i.data,i.record)},disabled:h.disabled?h.disabled:!1,"data-test":"overgrid-action-button","data-test-value":h.testValueAttribute,key:d,customClass:h.classList},l.createSlots({default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(h.title),1)]),_:2},[h.icon?{name:"iconLeft",fn:l.withCtx(()=>[l.createElementVNode("span",{innerHTML:h.icon},null,8,VS)]),key:"0"}:void 0]),1032,["iconOnly","variant","onClick","disabled","data-test-value","customClass"]))),128))])):l.createCommentVNode("",!0),n.value.length>0?(l.openBlock(),l.createElementBlock("span",WS,[l.createVNode(Ts,{orientation:(f=(o=t.formatterConfig)==null?void 0:o.config)!=null&&f.dropdownOrientation?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.dropdownOrientation:"right"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{rounded:"",iconOnly:"",variant:"ghost","data-test":"overgrid-action-button-dropdown"},{iconLeft:l.withCtx(()=>s[1]||(s[1]=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 min-w-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)])),_:1})]),content:l.withCtx(()=>[l.createElementVNode("div",$S,[l.createElementVNode("ul",HS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,(h,d)=>(l.openBlock(),l.createElementBlock("li",{class:"hover:bg-black/5",key:d},[l.createElementVNode("a",{href:"javascript:void(null);",disabled:h.disabled?h.disabled:!1,"data-test-value":h.testValueAttribute,onClick:m=>{h.disabled||h.action(m,i.fieldKey,i.data,i.record)},class:l.normalizeClass(["font-normal text-left flex flex-row items-center p-3 py-1.5 gap-1",{"cursor-not-allowed opacity-50 overgrid-action-button-disabled":h.disabled}])},l.toDisplayString(h.title),11,zS)]))),128))])])]),_:1},8,["orientation"])])):l.createCommentVNode("",!0)],32)}}}),GS=["innerHTML"],jS=l.defineComponent({__name:"HtmlFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e;return(r,n)=>(l.openBlock(),l.createElementBlock("div",{innerHTML:t.data},null,8,GS))}}),XS=l.defineComponent({__name:"RootFormatter",props:{theme:{},type:{},data:{},rowid:{},formatterConfig:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function},customFormatters:{}},setup(e){const t=wt(),r=e,n=[{name:"EnumFormatter",component:BS},{name:"BooleanFormatter",component:MS},{name:"ClassFormatter",component:PS},{name:"DateFormatter",component:IS},{name:"NumberFormatter",component:LS},{name:"ActionButtonsFormatter",component:YS},{name:"HtmlFormatter",component:jS}].concat(r.customFormatters||[]);return(a,i)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(n),s=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[a.type===s.name?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.component),{key:0,l:l.unref(t).l,data:r.data,formatterConfig:a.formatterConfig,rowid:a.rowid,fieldKey:a.fieldKey,record:a.record,refreshGrid:a.refreshGrid,openExtraRow:a.openExtraRow},null,8,["l","data","formatterConfig","rowid","fieldKey","record","refreshGrid","openExtraRow"])):l.createCommentVNode("",!0)],64))),256))}}),KS=["data-theme","grid-unique-id"],qS={key:0,class:"overgrid-toolbar flex flex-row items-center justify-center h-12"},ZS={class:"overgrid-toolbar-spacer flex grow"},JS={class:"flex flex-row gap-2 items-center justify-center overgrid-toolbar-right-section"},QS={class:"overgrid-scroller w-full max-w-full overflow-x-auto"},ek={class:"overgrid-table w-full rounded-xl overflow-hidden"},tk={class:"overgrid-header h-12"},rk={key:0,class:"overgrid-cell h-12 overgrid-extra-row-cell text-sm w-12"},nk={key:1,class:"overgrid-cell h-12 overgrid-checkbox-cell text-sm w-12"},ak=["onClick"],ik={class:"overgrid-column-title whitespace-nowrap"},sk={class:"flex flex-row items-center justify-center gap-2"},ok={key:0,class:"overgrid-orderer-container flex flex-row items-center justify-center"},lk={key:1,class:"overgrid-column-filters-container flex flex-row items-center justify-center"},fk={key:0,class:"overgrid-body"},ck=["rownum"],uk={key:0,class:"overgrid-cell px-4 overgrid-btn-extra-row text-sm"},hk={key:1,class:"overgrid-cell px-4 overgrid-checkbox-cell text-sm"},dk={class:"overgrid-checkbox-label flex items-center justify-center"},mk={key:0,class:"overgrid-extra-row"},pk=["colspan"],xk={key:1},_k=["colspan"],gk={key:3,class:"overgrid-ui-loader absolute w-full h-full top-0 left-0 flex items-center justify-center"},vk={class:"overgrid-ui-loader-message"},wk=l.defineComponent({__name:"OverGrid",props:{config:{},customFormatters:{}},setup(e,{expose:t}){var _,x;const r=e,n=l.useSlots();l.ref(document.documentElement.clientWidth);const a=l.ref(null),i=wt(r.config.locale||"en"),s=X4(),o=kS(r.config,s),f=FS(r.config.columnSelector,r.config.gridUniqueId),c=AS(r.config.currentPageExport),u=OS((_=r.config)!=null&&_.hideAboutWindow?r.config.hideAboutWindow:!1),h=CS(r.config.bulkOperations,r.config.idkey,(x=r.config.events)==null?void 0:x.onBulkSelectChanges),d=DS(r.config.extraRow,r.config.idkey),m=bS(r.config.rowHighlighter);l.onMounted(()=>{r.config.skipAutoFetch||o.fetchRecords()});const p=l.computed(()=>{var g;return o.search.isToolbarOptionEnabled.value||h.isToolbarOptionEnabled.value||((g=r.config.refreshable)==null?void 0:g.manualActive)||f.isToolbarOptionEnabled.value||c.isToolbarOptionEnabled.value||u.isToolbarOptionEnabled.value||o.autoRefresh.isToolbarOptionEnabled.value||o.pagination.isToolbarOptionEnabled.value||!!n.toolbarSpacer});return t({fields:s,records:o,orderApi:o.ordering,columnFiltersApi:o.columnFilters,searchApi:o.search,paginationApi:o.pagination,refresh:o.fetchRecords}),(g,E)=>{var T,R,B,H,S;return l.openBlock(),l.createElementBlock("div",{class:"overgrid relative w-full max-w-full","data-theme":r.config.theme||"default","grid-unique-id":r.config.gridUniqueId},[p.value?(l.openBlock(),l.createElementBlock("div",qS,[l.unref(o).search.isToolbarOptionEnabled.value&&g.$slots.search?l.renderSlot(g.$slots,"search",{key:0,config:r.config.search,searchApi:l.unref(o).search}):l.createCommentVNode("",!0),l.unref(o).search.isToolbarOptionEnabled.value&&!g.$slots.search?(l.openBlock(),l.createBlock(Y4,{key:1,searchConfig:r.config.search,searcher:l.unref(o).search},null,8,["searchConfig","searcher"])):l.createCommentVNode("",!0),l.createElementVNode("span",ZS,[l.renderSlot(g.$slots,"toolbarSpacer",{config:r.config,paginationApi:l.unref(o).pagination,orderApi:l.unref(o).ordering,columnFiltersApi:l.unref(o).columnFilters,searchApi:l.unref(o).search})]),l.createElementVNode("div",JS,[l.unref(h).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(NS,{key:0,config:r.config.bulkOperations,bulkOperator:l.unref(h)},null,8,["config","bulkOperator"])):l.createCommentVNode("",!0),(T=r.config.refreshable)!=null&&T.manualActive?(l.openBlock(),l.createBlock(Wt,{key:1,onClick:l.unref(o).fetchRecords,customClass:"overgrid-btn-manual-refresh",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"refresh",class:"w-4 h-4"})]),_:1},8,["onClick"])):l.createCommentVNode("",!0),l.unref(f).isToolbarOptionEnabled.value||l.unref(c).isToolbarOptionEnabled.value||l.unref(u).isToolbarOptionEnabled.value||l.unref(o).autoRefresh.isToolbarOptionEnabled.value||l.unref(o).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Ts,{key:2,orientation:"left",ref_key:"operationsDropdown",ref:a,class:"overgrid-operations-dropdown"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{customClass:"overgrid-btn-operations",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"horizontal-dots",class:"w-4 h-4"})]),_:1})]),content:l.withCtx(()=>{var C,D,G,P,z;return[l.unref(f).isToolbarOptionEnabled.value||l.unref(c).isToolbarOptionEnabled.value||l.unref(u).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Qu,{key:0,config:r.config,columnSelector:l.unref(f),currentPageExporter:l.unref(c),aboutModal:l.unref(u),closeDropdown:(C=a.value)==null?void 0:C.close,ref:"baseOperations"},null,8,["config","columnSelector","currentPageExporter","aboutModal","closeDropdown"])):l.createCommentVNode("",!0),l.unref(o).autoRefresh.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(sh,{key:1,autoRefresher:l.unref(o).autoRefresh,config:(D=r.config)==null?void 0:D.refreshable,closeDropdown:(G=a.value)==null?void 0:G.close},null,8,["autoRefresher","config","closeDropdown"])):l.createCommentVNode("",!0),l.unref(o).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(uh,{key:2,paginator:l.unref(o).pagination,config:(P=r.config)==null?void 0:P.pagination,closeDropdown:(z=a.value)==null?void 0:z.close},null,8,["paginator","config","closeDropdown"])):l.createCommentVNode("",!0)]}),_:1},512)):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0),l.createElementVNode("div",QS,[l.createElementVNode("table",ek,[l.createElementVNode("thead",tk,[l.createElementVNode("tr",null,[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",rk,E[1]||(E[1]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((R=r.config.bulkOperations.methods)==null?void 0:R.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",nk,E[2]||(E[2]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f).filter(l.unref(s).mappingVisible()),C=>{var D,G,P,z,oe,ge;return l.openBlock(),l.createElementBlock("th",{style:l.normalizeStyle({width:C.width||"auto"}),class:"overgrid-cell text-sm h-12",key:"head_"+C.key},[g.$slots.cellHeader?l.renderSlot(g.$slots,"cellHeader",{key:0,titleField:C,orderActive:(D=r.config.orderConfiguration)==null?void 0:D.active,orderable:C.orderable,orderApi:l.unref(o).ordering,orderConfig:r.config.orderConfiguration,columnFiltersApi:l.unref(o).columnFilters,columnFiltersActive:(G=r.config.columnFilters)==null?void 0:G.active}):(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(["flex flex-row items-center overgrid-column-title-container h-12 px-4",{"overgrid-column-title-container-hoverable cursor-pointer":((P=r.config.orderConfiguration)==null?void 0:P.active)&&C.orderable}]),onClick:()=>l.unref(o).ordering.toggleField(C)},[l.createElementVNode("span",ik,l.toDisplayString(C.title),1),E[3]||(E[3]=l.createElementVNode("span",{class:"grow min-w-3"},null,-1)),l.createElementVNode("div",sk,[(z=r.config.orderConfiguration)!=null&&z.active&&C.orderable?(l.openBlock(),l.createElementBlock("div",ok,[l.createVNode(Iu,{orderer:l.unref(o).ordering,field:C,config:r.config.orderConfiguration},null,8,["orderer","field","config"])])):l.createCommentVNode("",!0),(oe=r.config.columnFilters)!=null&&oe.active&&((ge=C.columnFilter)!=null&&ge.active)?(l.openBlock(),l.createElementBlock("div",lk,[l.createVNode(zu,{columnFilter:l.unref(o).columnFilters,field:C,config:r.config.columnFilters},null,8,["columnFilter","field","config"])])):l.createCommentVNode("",!0)])],10,ak))],4)}),128))])]),l.unref(o).records.value&&l.unref(o).records.value.length>0?(l.openBlock(),l.createElementBlock("tbody",fk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o).records.value,(C,D)=>{var G,P;return l.openBlock(),l.createElementBlock(l.Fragment,{key:"record_"+(r.config.idkey?C[r.config.idkey]:D)},[l.createElementVNode("tr",{rownum:D,class:l.normalizeClass(l.unref(m).getClassList(C,"overgrid-row h-12 "+(D%2===0?"overgrid-row-odd":"overgrid-row-even")))},[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",uk,[l.createVNode(Wt,{onClick:z=>{var oe;return l.unref(d).toggleRow((oe=C[r.config.idkey])==null?void 0:oe.toString())},customClass:"overgrid-btn-manual-refresh",variant:"light",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>{var z;return[l.unref(d).isRowOpened((z=C[r.config.idkey])==null?void 0:z.toString())?(l.openBlock(),l.createBlock(dt,{key:1,type:"chevron-down",class:"w-3 h-3"})):(l.openBlock(),l.createBlock(dt,{key:0,type:"chevron-right",class:"w-3 h-3"}))]}),_:2},1032,["onClick"])])):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((G=r.config.bulkOperations.methods)==null?void 0:G.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",hk,[l.createElementVNode("label",dk,[l.createVNode(Ja,{value:(P=C[r.config.idkey])==null?void 0:P.toString(),modelValue:l.unref(h).checkedRows.value,"onUpdate:modelValue":E[0]||(E[0]=z=>l.unref(h).checkedRows.value=z),variant:"secondary"},null,8,["value","modelValue"])])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f).filter(l.unref(s).mappingVisible()),z=>(l.openBlock(),l.createElementBlock("td",{class:"overgrid-cell px-4 text-sm",key:"body_"+z.key},[z.formatter&&typeof z.formatter=="object"&&z.formatter.type?(l.openBlock(),l.createBlock(XS,{key:"formatter_"+z.key+"_"+(r.config.idkey?C[r.config.idkey]:D),theme:r.config.theme?r.config.theme:"default",type:z.formatter.type,data:z.middleware?z.middleware(C[z.key],C):C[z.key],formatterConfig:z.formatter,rowid:r.config.idkey?C[r.config.idkey]:null,fieldKey:z.key,record:C,refreshGrid:()=>{l.unref(o).fetchRecords()},customFormatters:r.customFormatters,openExtraRow:oe=>{r.config.idkey&&l.unref(d).toggleRow(oe)}},null,8,["theme","type","data","formatterConfig","rowid","fieldKey","record","refreshGrid","customFormatters","openExtraRow"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(z.middleware?z.middleware(C[z.key],C):C[z.key]),1)],64))]))),128))],10,ck),l.createVNode(l.Transition,{name:"overgrid-anim-extra-row"},{default:l.withCtx(()=>{var z,oe,ge;return[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?l.withDirectives((l.openBlock(),l.createElementBlock("tr",mk,[l.createElementVNode("td",{class:"overgrid-extra-row-cell",colspan:l.unref(f).filter(l.unref(s).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((z=r.config.bulkOperations.methods)==null?void 0:z.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(g.$slots,"extraRow",{record:C,extraSlotParams:(oe=r.config.extraRow)==null?void 0:oe.extraSlotParams})],8,pk)],512)),[[l.vShow,l.unref(d).isRowOpened((ge=C[r.config.idkey])==null?void 0:ge.toString())]]):l.createCommentVNode("",!0)]}),_:2},1024)],64)}),128))])):(l.openBlock(),l.createElementBlock("tbody",xk,[l.createElementVNode("tr",null,[l.createElementVNode("td",{colspan:l.unref(f).filter(l.unref(s).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((B=r.config.bulkOperations.methods)==null?void 0:B.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(g.$slots,"emptyResult")],8,_k)])]))])]),(H=r.config.pagination)!=null&&H.active&&g.$slots.pagination?l.renderSlot(g.$slots,"pagination",{key:1,paginationApi:l.unref(o).pagination}):l.createCommentVNode("",!0),(S=r.config.pagination)!=null&&S.active&&!g.$slots.pagination?(l.openBlock(),l.createBlock(Ru,{key:2,paginator:l.unref(o).pagination},null,8,["paginator"])):l.createCommentVNode("",!0),l.unref(o).loading.value?(l.openBlock(),l.createElementBlock("div",gk,[l.createElementVNode("span",vk,l.toDisplayString(l.unref(i).l("loading_data")),1)])):l.createCommentVNode("",!0),l.createVNode(Ah,{mappingVisible:l.unref(s).mappingVisible(),columnSelector:l.unref(f)},null,8,["mappingVisible","columnSelector"]),l.createVNode(t4,{currentPageExporterConfig:r.config.currentPageExport,mappingVisible:l.unref(f).filter(l.unref(s).mappingVisible()),currentPageExporter:l.unref(c),currentRecords:l.unref(o).records},null,8,["currentPageExporterConfig","mappingVisible","currentPageExporter","currentRecords"]),l.createVNode(G4,{aboutModal:l.unref(u)},null,8,["aboutModal"]),l.createVNode(d4,{columnFilters:l.unref(o).columnFilters},null,8,["columnFilters"]),l.createVNode(E4,{columnFilters:l.unref(o).columnFilters},null,8,["columnFilters"]),l.createVNode(R4,{columnFilters:l.unref(o).columnFilters},null,8,["columnFilters"]),l.createVNode(V4,{columnFilters:l.unref(o).columnFilters},null,8,["columnFilters"]),l.createVNode(H4,{columnFilters:l.unref(o).columnFilters},null,8,["columnFilters"])],8,KS)}}});Qt.OverGrid=wk,Object.defineProperty(Qt,Symbol.toStringTag,{value:"Module"})});
|
|
151
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=On(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&vs.assertOptions(n,{silentJSONParsing:Rr.transitional(Rr.boolean),forcedJSONParsing:Rr.transitional(Rr.boolean),clarifyTimeoutError:Rr.transitional(Rr.boolean)},!1),a!=null&&(Y.isFunction(a)?r.paramsSerializer={serialize:a}:vs.assertOptions(a,{encode:Rr.function,serialize:Rr.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),vs.assertOptions(r,{baseUrl:Rr.spelling("baseURL"),withXsrfToken:Rr.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&Y.merge(i.common,i[r.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=Jt.concat(s,i);const o=[];let f=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(f=f&&_.synchronous,o.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let u,h=0,d;if(!f){const p=[xu.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,c),d=p.length,u=Promise.resolve(r);h<d;)u=u.then(p[h++],p[h++]);return u}d=o.length;let m=r;for(h=0;h<d;){const p=o[h++],_=o[h++];try{m=p(m)}catch(x){_.call(this,x);break}}try{u=xu.call(this,m)}catch(p){return Promise.reject(p)}for(h=0,d=c.length;h<d;)u=u.then(c[h++],c[h++]);return u}getUri(t){t=On(this.defaults,t);const r=ou(t.baseURL,t.url,t.allowAbsoluteUrls);return Jc(r,t.params,t.paramsSerializer)}};Y.forEach(["delete","get","head","options"],function(t){Cn.prototype[t]=function(r,n){return this.request(On(n||{},{method:t,url:r,data:(n||{}).data}))}}),Y.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,o){return this.request(On(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Cn.prototype[t]=r(),Cn.prototype[t+"Form"]=r(!0)});let wS=class Tu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const s=new Promise(o=>{n.subscribe(o),i=o}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,o){n.reason||(n.reason=new ca(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Tu(function(a){t=a}),cancel:t}}};function yS(e){return function(r){return e.apply(null,r)}}function ES(e){return Y.isObject(e)&&e.isAxiosError===!0}const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ml).forEach(([e,t])=>{ml[t]=e});function vu(e){const t=new Cn(e),r=Ic(Cn.prototype.request,t);return Y.extend(r,Cn.prototype,t,{allOwnKeys:!0}),Y.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return vu(On(e,a))},r}const ot=vu(Ya);ot.Axios=Cn,ot.CanceledError=ca,ot.CancelToken=wS,ot.isCancel=nu,ot.VERSION=_u,ot.toFormData=ds,ot.AxiosError=ke,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=yS,ot.isAxiosError=ES,ot.mergeConfig=On,ot.AxiosHeaders=Jt,ot.formToJSON=e=>tu(Y.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=pu.getAdapter,ot.HttpStatusCode=ml,ot.default=ot;const{Axios:zk,AxiosError:Yk,CanceledError:Gk,isCancel:jk,CancelToken:Xk,VERSION:Kk,all:qk,Cancel:Zk,isAxiosError:Jk,spread:Qk,toFormData:eF,AxiosHeaders:tF,HttpStatusCode:rF,formToJSON:nF,getAdapter:aF,mergeConfig:iF}=ot,TS=e=>e?e(ot):ot,SS=(e,t,r,n,a,i)=>{let s=new URLSearchParams;return t&&t.active&&(t.page||t.page===0)&&t.pageSize&&(s.set("page",t.page.toString()),s.set("size",t.pageSize.toString())),e&&Array.isArray(e)&&e.length>0&&s.set("orders",JSON.stringify(e)),r&&Array.isArray(r)&&r.length>0&&s.set("filters",JSON.stringify(r)),i&&typeof i=="string"&&i.trim().length>0&&s.set("query",i.trim()),s},kS=(e,t,r)=>{const n=l.ref([]),a=K4(e.pagination,e.gridUniqueId),i=q4(e.orderConfiguration),s=J4(e.columnFilters),o=Q4(e.search),f=os(),c=l.ref(!1),u=TS(e.axiosConfigurator),h=async()=>{c.value=!0;let m=await u.get(e.endpoint,{params:e.serverTransformation?e.serverTransformation(i.rawState.value,a.state,s.filters.value,e,t.getFieldsSnapshot(),o.query.value):SS(i.rawState.value,a.state,s.filters.value,e,t.getFieldsSnapshot(),o.query.value),responseType:"json"});a.setByResponse(m.data);let p=e.rootkey&&m.data[e.rootkey]?m.data[e.rootkey]:m.data;if(Array.isArray(p)||(f.error('The response data is not an array. Please check your server response format and the "rootkey" configuration.'),p=[]),e.events&&e.events.onDataLoad){let _=e.events.onDataLoad(p);typeof _=="object"&&(p=_)}if(e.events&&e.events.onDataLoadWithFullResponse&&e.events.onDataLoadWithFullResponse(m),n.value=p||[],a.state.page>a.state.totalPages&&a.state.totalPages>0){c.value=!1,a.lastPage();return}l.nextTick(function(){var _;if(e.events&&e.events.readyAfterRefresh&&((_=e.events)==null||_.readyAfterRefresh()),e.extraRow&&e.extraRow.openedByDefault){const x=p.map(g=>g[e.idkey||"id"].toString());r.setOpenedRows(x)}}),c.value=!1},d=Z4(e.refreshable,e.gridUniqueId,h);return l.watch(()=>[a.state.page,a.state.pageSize],m=>{f.info("Page changed to:",m),h()}),l.watch(()=>i.rawState,()=>{h()},{deep:!0}),l.watch(()=>s.filters,()=>{h()},{deep:!0}),l.watch(()=>o.query.value,()=>{o.debounce(h)},{deep:!0}),{records:n,fetchRecords:h,pagination:a,ordering:i,loading:c,autoRefresh:d,columnFilters:s,search:o}},FS=(e,t)=>{const r=l.ref(!1),n=l.ref(null);function a(){r.value=!0}function i(){r.value=!1}function s(c){n.value=c,localStorage.setItem("overgrid-column-selector-"+t,JSON.stringify(n.value))}function o(c){return n.value===null?c:c.filter(u=>{var h;return(h=n.value)==null?void 0:h.includes(u.key)})}if(localStorage.getItem("overgrid-column-selector-"+t)){const c=JSON.parse(localStorage.getItem("overgrid-column-selector-"+t)||"[]");n.value=c.length>0?c:null}const f=l.computed(()=>!!(e&&e.active));return{showModal:a,closeModal:i,isModalShown:r,selectedFields:n,setColumns:s,filter:o,isToolbarOptionEnabled:f}},AS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>!!(e!=null&&e.active&&(e!=null&&e.xlsxEnabled||e!=null&&e.csvEnabled)));return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},bS=e=>{const t=os();function r(n,a=""){let i=a+" ";return e!=null&&e.active?e!=null&&e.fn&&typeof e.fn=="function"&&(e!=null&&e.fn(n))?i+(e.classList+" overgrid-row-highlighted"||""):(t.warn('Row highlighter configuration is not defined a function in "fn" key.'),i.trim()):i.trim()}return{getClassList:r}},OS=e=>{const t=l.ref(!1);function r(){t.value=!0}function n(){t.value=!1}const a=l.computed(()=>e!==!0);return{showModal:r,closeModal:n,isModalShown:t,isToolbarOptionEnabled:a}},CS=(e,t,r)=>{const n=l.ref([]),a=os();e&&e.active&&!t&&a.warn("Bulk operations are active, but no idkey is provided. Please provide an idkey to enable bulk operations."),l.watch(()=>n.value,()=>{r&&typeof r=="function"&&r(n.value)},{deep:!0});const i=l.computed(()=>{var s;return!!(e&&e.active&&((s=e.methods)==null?void 0:s.length)>0&&t)});return{checkedRows:n,isToolbarOptionEnabled:i}},NS=l.defineComponent({__name:"BulkOperationsDropdown",props:{config:{},bulkOperator:{}},setup(e){const t=wt(),r=e,n=l.ref("");function a(){let i;if(r.config){for(var s in r.config.methods)if(r.config.methods[s].key==n.value){i=r.config.methods[s].action;break}i&&i(r.bulkOperator.checkedRows.value,()=>{n.value="",r.bulkOperator.checkedRows.value=[]})}}return(i,s)=>{var o;return l.openBlock(),l.createBlock(is,{rounded:"full",variant:"primary",size:"sm",customClass:"overgrid-select min-w-32 sm:min-w-48",disabled:r.bulkOperator.checkedRows.value.length<=0,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=f=>n.value=f),options:(o=r.config)!=null&&o.methods?r.config.methods.map(f=>({key:f.key,text:f.title})):[],onChange:a,enableNullOption:!0,nullOptionText:l.unref(t).l("selected_rows",{selectedCount:r.bulkOperator.checkedRows.value.length.toString()})},null,8,["disabled","modelValue","options","nullOptionText"])}}}),DS=(e,t)=>{const r=os(),n=l.ref([]);e&&e.active&&!t&&r.warn("Extra row functionality is active in configuration, but no idkey is provided (its required). Please provide an idkey to enable extra row functionality.");function a(c){c&&n.value.push(c)}function i(c){if(!c)return;const u=n.value.indexOf(c);u!==-1&&n.value.splice(u,1)}function s(c){c&&(o(c)?i(c):a(c))}function o(c){return c?n.value.includes(c):!1}function f(c){n.value=[...c],console.log("Opened rows set to:",n.value)}return{openedRows:n,isRowOpened:o,toggleRow:s,openRow:a,closeRow:i,setOpenedRows:f}},RS={key:1,class:"flex flex-row gap-1"},BS=l.defineComponent({__name:"EnumFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f,c,u,h,d,m,p;return Array.isArray(t.data)?(l.openBlock(),l.createElementBlock("span",RS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.data,(_,x)=>{var g,E,T,R,B,H,S,C,D,G,P,z;return l.openBlock(),l.createElementBlock("span",{key:x,class:l.normalizeClass(((R=(T=(E=(g=t.formatterConfig)==null?void 0:g.config)==null?void 0:E.mapping)==null?void 0:T[_])==null?void 0:R.class)||"")},l.toDisplayString((C=(S=(H=(B=t.formatterConfig)==null?void 0:B.config)==null?void 0:H.mapping)==null?void 0:S[_])!=null&&C.title?(z=(P=(G=(D=t.formatterConfig)==null?void 0:D.config)==null?void 0:G.mapping)==null?void 0:P[_])==null?void 0:z.title:_),3)}),128))])):(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(((s=(i=(a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.mapping)==null?void 0:i[t.data])==null?void 0:s.class)||"")},l.toDisplayString((u=(c=(f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.mapping)==null?void 0:c[t.data])!=null&&u.title?(p=(m=(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.mapping)==null?void 0:m[t.data])==null?void 0:p.title:t.data),3))}}}),MS=l.defineComponent({__name:"BooleanFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s;return l.toDisplayString(t.data?(n=t.formatterConfig.config)!=null&&n.trueText?(a=t.formatterConfig.config)==null?void 0:a.trueText:t.l("yes"):(i=t.formatterConfig.config)!=null&&i.falseText?(s=t.formatterConfig.config)==null?void 0:s.falseText:t.l("no"))}}}),PS=l.defineComponent({__name:"ClassFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(t.data),3)}}}),IS=l.defineComponent({__name:"DateFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){return(t,r)=>{var n,a,i,s,o,f;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((a=(n=t.formatterConfig)==null?void 0:n.config)==null?void 0:a.class)||"")},l.toDisplayString(l.unref(se)(t.data,((s=(i=t.formatterConfig)==null?void 0:i.config)==null?void 0:s.inputFormat)||"YYYY-MM-DD").format(((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.outputFormat)||"YYYY-MM-DD")),3)}}}),LS=l.defineComponent({__name:"NumberFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var a,i,s,o,f,c,u,h,d,m,p,_,x,g;return t.data?parseFloat(t.data).toLocaleString((i=(a=t.formatterConfig)==null?void 0:a.config)!=null&&i.locale?(o=(s=t.formatterConfig)==null?void 0:s.config)==null?void 0:o.locale:"en-EN",{minimumFractionDigits:((c=(f=t.formatterConfig)==null?void 0:f.config)==null?void 0:c.minimumFractionDigits)||0,maximumFractionDigits:((h=(u=t.formatterConfig)==null?void 0:u.config)==null?void 0:h.maximumFractionDigits)||2,useGrouping:((m=(d=t.formatterConfig)==null?void 0:d.config)==null?void 0:m.useGrouping)!==void 0&&typeof((_=(p=t.formatterConfig)==null?void 0:p.config)==null?void 0:_.useGrouping)=="boolean"?(g=(x=t.formatterConfig)==null?void 0:x.config)==null?void 0:g.useGrouping:!0}):""});return(n,a)=>{var i,s;return l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(((s=(i=n.formatterConfig)==null?void 0:i.config)==null?void 0:s.class)||"")},l.toDisplayString(r.value),3)}}}),US={key:0,class:"flex flex-row items-center gap-1.5 pr-1"},VS=["innerHTML"],WS={key:1,class:"flex items-center ml-1.5"},$S={class:"!rounded-md font-inter w-full"},HS={class:"my-1 rounded-lg"},zS=["disabled","data-test-value","onClick"],YS=l.defineComponent({__name:"ActionButtonsFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e,r=l.computed(()=>{var i,s,o,f,c,u,h,d;return!t.formatterConfig||!((s=(i=t.formatterConfig)==null?void 0:i.config)!=null&&s.buttons)?[]:typeof((f=(o=t.formatterConfig)==null?void 0:o.config)==null?void 0:f.buttons)=="function"?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.buttons(t.record):(d=(h=t.formatterConfig)==null?void 0:h.config)==null?void 0:d.buttons}),n=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned&&s.push(i[o]);return s}),a=l.computed(()=>{var i=r.value,s=[];for(var o in i)i[o].dropdowned||s.push(i[o]);return s});return(i,s)=>{var o,f,c,u;return l.openBlock(),l.createElementBlock("div",{"data-test":"",class:"flex flex-row overflow-y-visible overgrid-action-buttons",onMousedown:s[0]||(s[0]=l.withModifiers(()=>{},["stop"]))},[a.value.length>0?(l.openBlock(),l.createElementBlock("span",US,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(h,d)=>(l.openBlock(),l.createBlock(Wt,{rounded:"",iconOnly:!h.title,variant:h.variant,onClick:m=>{h.action(m,i.fieldKey,i.data,i.record)},disabled:h.disabled?h.disabled:!1,"data-test":"overgrid-action-button","data-test-value":h.testValueAttribute,key:d,customClass:h.classList},l.createSlots({default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(h.title),1)]),_:2},[h.icon?{name:"iconLeft",fn:l.withCtx(()=>[l.createElementVNode("span",{innerHTML:h.icon},null,8,VS)]),key:"0"}:void 0]),1032,["iconOnly","variant","onClick","disabled","data-test-value","customClass"]))),128))])):l.createCommentVNode("",!0),n.value.length>0?(l.openBlock(),l.createElementBlock("span",WS,[l.createVNode(Ts,{orientation:(f=(o=t.formatterConfig)==null?void 0:o.config)!=null&&f.dropdownOrientation?(u=(c=t.formatterConfig)==null?void 0:c.config)==null?void 0:u.dropdownOrientation:"right"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{rounded:"",iconOnly:"",variant:"ghost","data-test":"overgrid-action-button-dropdown"},{iconLeft:l.withCtx(()=>s[1]||(s[1]=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 min-w-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"})],-1)])),_:1})]),content:l.withCtx(()=>[l.createElementVNode("div",$S,[l.createElementVNode("ul",HS,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,(h,d)=>(l.openBlock(),l.createElementBlock("li",{class:"hover:bg-black/5",key:d},[l.createElementVNode("a",{href:"javascript:void(null);",disabled:h.disabled?h.disabled:!1,"data-test-value":h.testValueAttribute,onClick:m=>{h.disabled||h.action(m,i.fieldKey,i.data,i.record)},class:l.normalizeClass(["font-normal text-left flex flex-row items-center p-3 py-1.5 gap-1",{"cursor-not-allowed opacity-50 overgrid-action-button-disabled":h.disabled}])},l.toDisplayString(h.title),11,zS)]))),128))])])]),_:1},8,["orientation"])])):l.createCommentVNode("",!0)],32)}}}),GS=["innerHTML"],jS=l.defineComponent({__name:"HtmlFormatter",props:{data:{},l:{type:Function},formatterConfig:{},rowid:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function}},setup(e){const t=e;return(r,n)=>(l.openBlock(),l.createElementBlock("div",{innerHTML:t.data},null,8,GS))}}),XS=l.defineComponent({__name:"RootFormatter",props:{theme:{},type:{},data:{},rowid:{},formatterConfig:{},fieldKey:{},record:{},refreshGrid:{type:Function},openExtraRow:{type:Function},customFormatters:{}},setup(e){const t=wt(),r=e,n=[{name:"EnumFormatter",component:BS},{name:"BooleanFormatter",component:MS},{name:"ClassFormatter",component:PS},{name:"DateFormatter",component:IS},{name:"NumberFormatter",component:LS},{name:"ActionButtonsFormatter",component:YS},{name:"HtmlFormatter",component:jS}].concat(r.customFormatters||[]);return(a,i)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(n),s=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[a.type===s.name?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.component),{key:0,l:l.unref(t).l,data:r.data,formatterConfig:a.formatterConfig,rowid:a.rowid,fieldKey:a.fieldKey,record:a.record,refreshGrid:a.refreshGrid,openExtraRow:a.openExtraRow},null,8,["l","data","formatterConfig","rowid","fieldKey","record","refreshGrid","openExtraRow"])):l.createCommentVNode("",!0)],64))),256))}}),KS=["data-theme","grid-unique-id"],qS={key:0,class:"overgrid-toolbar flex flex-row items-center justify-center h-12"},ZS={class:"overgrid-toolbar-spacer flex grow"},JS={class:"flex flex-row gap-2 items-center justify-center overgrid-toolbar-right-section"},QS={class:"overgrid-scroller w-full max-w-full overflow-x-auto"},ek={class:"overgrid-table w-full rounded-xl overflow-hidden"},tk={class:"overgrid-header h-12"},rk={key:0,class:"overgrid-cell h-12 overgrid-extra-row-cell text-sm w-12"},nk={key:1,class:"overgrid-cell h-12 overgrid-checkbox-cell text-sm w-12"},ak=["onClick"],ik={class:"overgrid-column-title whitespace-nowrap"},sk={class:"flex flex-row items-center justify-center gap-2"},ok={key:0,class:"overgrid-orderer-container flex flex-row items-center justify-center"},lk={key:1,class:"overgrid-column-filters-container flex flex-row items-center justify-center"},fk={key:0,class:"overgrid-body"},ck=["rownum"],uk={key:0,class:"overgrid-cell px-4 overgrid-btn-extra-row text-sm"},hk={key:1,class:"overgrid-cell px-4 overgrid-checkbox-cell text-sm"},dk={class:"overgrid-checkbox-label flex items-center justify-center"},mk={key:0,class:"overgrid-extra-row"},pk=["colspan"],xk={key:1},_k=["colspan"],gk={key:3,class:"overgrid-ui-loader absolute w-full h-full top-0 left-0 flex items-center justify-center"},vk={class:"overgrid-ui-loader-message"},wk=l.defineComponent({__name:"OverGrid",props:{config:{},customFormatters:{}},setup(e,{expose:t}){var _,x;const r=e,n=l.useSlots();l.ref(document.documentElement.clientWidth);const a=l.ref(null),i=wt(r.config.locale||"en"),s=X4(),o=DS(r.config.extraRow,r.config.idkey),f=kS(r.config,s,o),c=FS(r.config.columnSelector,r.config.gridUniqueId),u=AS(r.config.currentPageExport),h=OS((_=r.config)!=null&&_.hideAboutWindow?r.config.hideAboutWindow:!1),d=CS(r.config.bulkOperations,r.config.idkey,(x=r.config.events)==null?void 0:x.onBulkSelectChanges),m=bS(r.config.rowHighlighter);l.onMounted(()=>{r.config.skipAutoFetch||f.fetchRecords()});const p=l.computed(()=>{var g;return f.search.isToolbarOptionEnabled.value||d.isToolbarOptionEnabled.value||((g=r.config.refreshable)==null?void 0:g.manualActive)||c.isToolbarOptionEnabled.value||u.isToolbarOptionEnabled.value||h.isToolbarOptionEnabled.value||f.autoRefresh.isToolbarOptionEnabled.value||f.pagination.isToolbarOptionEnabled.value||!!n.toolbarSpacer});return t({fields:s,records:f,orderApi:f.ordering,columnFiltersApi:f.columnFilters,searchApi:f.search,paginationApi:f.pagination,refresh:f.fetchRecords}),(g,E)=>{var T,R,B,H,S;return l.openBlock(),l.createElementBlock("div",{class:"overgrid relative w-full max-w-full","data-theme":r.config.theme||"default","grid-unique-id":r.config.gridUniqueId},[p.value?(l.openBlock(),l.createElementBlock("div",qS,[l.unref(f).search.isToolbarOptionEnabled.value&&g.$slots.search?l.renderSlot(g.$slots,"search",{key:0,config:r.config.search,searchApi:l.unref(f).search}):l.createCommentVNode("",!0),l.unref(f).search.isToolbarOptionEnabled.value&&!g.$slots.search?(l.openBlock(),l.createBlock(Y4,{key:1,searchConfig:r.config.search,searcher:l.unref(f).search},null,8,["searchConfig","searcher"])):l.createCommentVNode("",!0),l.createElementVNode("span",ZS,[l.renderSlot(g.$slots,"toolbarSpacer",{config:r.config,paginationApi:l.unref(f).pagination,orderApi:l.unref(f).ordering,columnFiltersApi:l.unref(f).columnFilters,searchApi:l.unref(f).search})]),l.createElementVNode("div",JS,[l.unref(d).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(NS,{key:0,config:r.config.bulkOperations,bulkOperator:l.unref(d)},null,8,["config","bulkOperator"])):l.createCommentVNode("",!0),(T=r.config.refreshable)!=null&&T.manualActive?(l.openBlock(),l.createBlock(Wt,{key:1,onClick:l.unref(f).fetchRecords,customClass:"overgrid-btn-manual-refresh",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"refresh",class:"w-4 h-4"})]),_:1},8,["onClick"])):l.createCommentVNode("",!0),l.unref(c).isToolbarOptionEnabled.value||l.unref(u).isToolbarOptionEnabled.value||l.unref(h).isToolbarOptionEnabled.value||l.unref(f).autoRefresh.isToolbarOptionEnabled.value||l.unref(f).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Ts,{key:2,orientation:"left",ref_key:"operationsDropdown",ref:a,class:"overgrid-operations-dropdown"},{iconButton:l.withCtx(()=>[l.createVNode(Wt,{customClass:"overgrid-btn-operations",variant:"primary",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>[l.createVNode(dt,{type:"horizontal-dots",class:"w-4 h-4"})]),_:1})]),content:l.withCtx(()=>{var C,D,G,P,z;return[l.unref(c).isToolbarOptionEnabled.value||l.unref(u).isToolbarOptionEnabled.value||l.unref(h).isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(Qu,{key:0,config:r.config,columnSelector:l.unref(c),currentPageExporter:l.unref(u),aboutModal:l.unref(h),closeDropdown:(C=a.value)==null?void 0:C.close,ref:"baseOperations"},null,8,["config","columnSelector","currentPageExporter","aboutModal","closeDropdown"])):l.createCommentVNode("",!0),l.unref(f).autoRefresh.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(sh,{key:1,autoRefresher:l.unref(f).autoRefresh,config:(D=r.config)==null?void 0:D.refreshable,closeDropdown:(G=a.value)==null?void 0:G.close},null,8,["autoRefresher","config","closeDropdown"])):l.createCommentVNode("",!0),l.unref(f).pagination.isToolbarOptionEnabled.value?(l.openBlock(),l.createBlock(uh,{key:2,paginator:l.unref(f).pagination,config:(P=r.config)==null?void 0:P.pagination,closeDropdown:(z=a.value)==null?void 0:z.close},null,8,["paginator","config","closeDropdown"])):l.createCommentVNode("",!0)]}),_:1},512)):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0),l.createElementVNode("div",QS,[l.createElementVNode("table",ek,[l.createElementVNode("thead",tk,[l.createElementVNode("tr",null,[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey&&(!r.config.extraRow.openedByDefault||r.config.extraRow.openedByDefault&&!r.config.extraRow.disableCloseButton)?(l.openBlock(),l.createElementBlock("th",rk,E[1]||(E[1]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((R=r.config.bulkOperations.methods)==null?void 0:R.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("th",nk,E[2]||(E[2]=[l.createElementVNode("label",{class:""},null,-1)]))):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c).filter(l.unref(s).mappingVisible()),C=>{var D,G,P,z,oe,ge;return l.openBlock(),l.createElementBlock("th",{style:l.normalizeStyle({width:C.width||"auto"}),class:"overgrid-cell text-sm h-12",key:"head_"+C.key},[g.$slots.cellHeader?l.renderSlot(g.$slots,"cellHeader",{key:0,titleField:C,orderActive:(D=r.config.orderConfiguration)==null?void 0:D.active,orderable:C.orderable,orderApi:l.unref(f).ordering,orderConfig:r.config.orderConfiguration,columnFiltersApi:l.unref(f).columnFilters,columnFiltersActive:(G=r.config.columnFilters)==null?void 0:G.active}):(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(["flex flex-row items-center overgrid-column-title-container h-12 px-4",{"overgrid-column-title-container-hoverable cursor-pointer":((P=r.config.orderConfiguration)==null?void 0:P.active)&&C.orderable}]),onClick:()=>l.unref(f).ordering.toggleField(C)},[l.createElementVNode("span",ik,l.toDisplayString(C.title),1),E[3]||(E[3]=l.createElementVNode("span",{class:"grow min-w-3"},null,-1)),l.createElementVNode("div",sk,[(z=r.config.orderConfiguration)!=null&&z.active&&C.orderable?(l.openBlock(),l.createElementBlock("div",ok,[l.createVNode(Iu,{orderer:l.unref(f).ordering,field:C,config:r.config.orderConfiguration},null,8,["orderer","field","config"])])):l.createCommentVNode("",!0),(oe=r.config.columnFilters)!=null&&oe.active&&((ge=C.columnFilter)!=null&&ge.active)?(l.openBlock(),l.createElementBlock("div",lk,[l.createVNode(zu,{columnFilter:l.unref(f).columnFilters,field:C,config:r.config.columnFilters},null,8,["columnFilter","field","config"])])):l.createCommentVNode("",!0)])],10,ak))],4)}),128))])]),l.unref(f).records.value&&l.unref(f).records.value.length>0?(l.openBlock(),l.createElementBlock("tbody",fk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f).records.value,(C,D)=>{var G,P;return l.openBlock(),l.createElementBlock(l.Fragment,{key:"record_"+(r.config.idkey?C[r.config.idkey]:D)},[l.createElementVNode("tr",{rownum:D,class:l.normalizeClass(l.unref(m).getClassList(C,"overgrid-row h-12 "+(D%2===0?"overgrid-row-odd":"overgrid-row-even")))},[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey&&(!r.config.extraRow.openedByDefault||r.config.extraRow.openedByDefault&&!r.config.extraRow.disableCloseButton)?(l.openBlock(),l.createElementBlock("td",uk,[l.createVNode(Wt,{onClick:z=>{var oe;return l.unref(o).toggleRow((oe=C[r.config.idkey])==null?void 0:oe.toString())},customClass:"overgrid-btn-manual-refresh",variant:"light",size:"sm",iconOnly:"",rounded:""},{iconLeft:l.withCtx(()=>{var z;return[l.unref(o).isRowOpened((z=C[r.config.idkey])==null?void 0:z.toString())?(l.openBlock(),l.createBlock(dt,{key:1,type:"chevron-down",class:"w-3 h-3"})):(l.openBlock(),l.createBlock(dt,{key:0,type:"chevron-right",class:"w-3 h-3"}))]}),_:2},1032,["onClick"])])):l.createCommentVNode("",!0),r.config.bulkOperations&&r.config.bulkOperations.active&&((G=r.config.bulkOperations.methods)==null?void 0:G.length)>0&&r.config.idkey?(l.openBlock(),l.createElementBlock("td",hk,[l.createElementVNode("label",dk,[l.createVNode(Ja,{value:(P=C[r.config.idkey])==null?void 0:P.toString(),modelValue:l.unref(d).checkedRows.value,"onUpdate:modelValue":E[0]||(E[0]=z=>l.unref(d).checkedRows.value=z),variant:"secondary"},null,8,["value","modelValue"])])])):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c).filter(l.unref(s).mappingVisible()),z=>(l.openBlock(),l.createElementBlock("td",{class:"overgrid-cell px-4 text-sm",key:"body_"+z.key},[z.formatter&&typeof z.formatter=="object"&&z.formatter.type?(l.openBlock(),l.createBlock(XS,{key:"formatter_"+z.key+"_"+(r.config.idkey?C[r.config.idkey]:D),theme:r.config.theme?r.config.theme:"default",type:z.formatter.type,data:z.middleware?z.middleware(C[z.key],C):C[z.key],formatterConfig:z.formatter,rowid:r.config.idkey?C[r.config.idkey]:null,fieldKey:z.key,record:C,refreshGrid:()=>{l.unref(f).fetchRecords()},customFormatters:r.customFormatters,openExtraRow:oe=>{r.config.idkey&&l.unref(o).toggleRow(oe)}},null,8,["theme","type","data","formatterConfig","rowid","fieldKey","record","refreshGrid","customFormatters","openExtraRow"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(z.middleware?z.middleware(C[z.key],C):C[z.key]),1)],64))]))),128))],10,ck),l.createVNode(l.Transition,{name:"overgrid-anim-extra-row"},{default:l.withCtx(()=>{var z,oe,ge;return[r.config.extraRow&&r.config.extraRow.active&&r.config.idkey?l.withDirectives((l.openBlock(),l.createElementBlock("tr",mk,[l.createElementVNode("td",{class:"overgrid-extra-row-cell",colspan:l.unref(c).filter(l.unref(s).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((z=r.config.bulkOperations.methods)==null?void 0:z.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(g.$slots,"extraRow",{record:C,extraSlotParams:(oe=r.config.extraRow)==null?void 0:oe.extraSlotParams})],8,pk)],512)),[[l.vShow,l.unref(o).openedRows.value.includes((ge=C[r.config.idkey])==null?void 0:ge.toString())]]):l.createCommentVNode("",!0)]}),_:2},1024)],64)}),128))])):(l.openBlock(),l.createElementBlock("tbody",xk,[l.createElementVNode("tr",null,[l.createElementVNode("td",{colspan:l.unref(c).filter(l.unref(s).mappingVisible()).length+(r.config.bulkOperations&&r.config.bulkOperations.active&&((B=r.config.bulkOperations.methods)==null?void 0:B.length)>0&&r.config.idkey?1:0)+1},[l.renderSlot(g.$slots,"emptyResult")],8,_k)])]))])]),(H=r.config.pagination)!=null&&H.active&&g.$slots.pagination?l.renderSlot(g.$slots,"pagination",{key:1,paginationApi:l.unref(f).pagination}):l.createCommentVNode("",!0),(S=r.config.pagination)!=null&&S.active&&!g.$slots.pagination?(l.openBlock(),l.createBlock(Ru,{key:2,paginator:l.unref(f).pagination},null,8,["paginator"])):l.createCommentVNode("",!0),l.unref(f).loading.value?(l.openBlock(),l.createElementBlock("div",gk,[l.createElementVNode("span",vk,l.toDisplayString(l.unref(i).l("loading_data")),1)])):l.createCommentVNode("",!0),l.createVNode(Ah,{mappingVisible:l.unref(s).mappingVisible(),columnSelector:l.unref(c)},null,8,["mappingVisible","columnSelector"]),l.createVNode(t4,{currentPageExporterConfig:r.config.currentPageExport,mappingVisible:l.unref(c).filter(l.unref(s).mappingVisible()),currentPageExporter:l.unref(u),currentRecords:l.unref(f).records},null,8,["currentPageExporterConfig","mappingVisible","currentPageExporter","currentRecords"]),l.createVNode(G4,{aboutModal:l.unref(h)},null,8,["aboutModal"]),l.createVNode(d4,{columnFilters:l.unref(f).columnFilters},null,8,["columnFilters"]),l.createVNode(E4,{columnFilters:l.unref(f).columnFilters},null,8,["columnFilters"]),l.createVNode(R4,{columnFilters:l.unref(f).columnFilters},null,8,["columnFilters"]),l.createVNode(V4,{columnFilters:l.unref(f).columnFilters},null,8,["columnFilters"]),l.createVNode(H4,{columnFilters:l.unref(f).columnFilters},null,8,["columnFilters"])],8,KS)}}});Qt.OverGrid=wk,Object.defineProperty(Qt,Symbol.toStringTag,{value:"Module"})});
|