@zeedhi/teknisa-components-vuetify 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/teknisa-components-vuetify.es.js +3235 -0
  2. package/dist/teknisa-components-vuetify.es.js.map +1 -0
  3. package/dist/teknisa-vuetify.css +1 -1
  4. package/dist/types/components/index.d.ts +6 -0
  5. package/dist/types/components/public.d.ts +11 -0
  6. package/dist/types/components/tek-breadcrumb-header/TekBreadcrumbHeader.d.ts +3 -0
  7. package/dist/types/components/tek-grid/TekGrid.d.ts +3 -0
  8. package/dist/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +36 -0
  9. package/dist/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +2 -0
  10. package/dist/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +3 -0
  11. package/{types → dist/types}/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +1 -0
  12. package/{types → dist/types}/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +1 -0
  13. package/dist/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +3 -0
  14. package/dist/types/components/tek-grid/indentation/TekGridIndentation.d.ts +2 -0
  15. package/dist/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +3 -0
  16. package/dist/types/components/tek-grid/row/TekGridFooterRow.d.ts +2 -0
  17. package/dist/types/components/tek-grid/row/TekGridGroupRow.d.ts +2 -0
  18. package/dist/types/components/tek-loading/TekLoading.d.ts +3 -0
  19. package/dist/types/components/tek-user-info/TekUserInfo.d.ts +3 -0
  20. package/dist/types/components/tek-user-info/TekUserInfoList.d.ts +2 -0
  21. package/{types → dist/types}/composables/useTableLayout.d.ts +3 -3
  22. package/{types → dist/types}/index.d.ts +0 -1
  23. package/package.json +40 -20
  24. package/src/index.ts +5 -0
  25. package/dist/teknisa-vuetify.js +0 -4117
  26. package/environments.json +0 -16
  27. package/jest.config.cjs +0 -31
  28. package/rollup.scss.config.js +0 -13
  29. package/src/components/index.ts +0 -41
  30. package/src/components/public.ts +0 -45
  31. package/src/components/tek-breadcrumb-header/TekBreadcrumbHeader.ts +0 -41
  32. package/src/components/tek-breadcrumb-header/TekBreadcrumbHeader.vue +0 -76
  33. package/src/components/tek-grid/TekGrid.ts +0 -332
  34. package/src/components/tek-grid/TekGrid.vue +0 -235
  35. package/src/components/tek-grid/column-filter/TekGridColumnFilter.ts +0 -244
  36. package/src/components/tek-grid/column-filter/TekGridColumnFilter.vue +0 -93
  37. package/src/components/tek-grid/column-header/TekGridHeaderRow.ts +0 -147
  38. package/src/components/tek-grid/column-header/TekGridHeaderRow.vue +0 -78
  39. package/src/components/tek-grid/columns-button/TekGridColumnsButton.ts +0 -97
  40. package/src/components/tek-grid/columns-button/TekGridColumnsButton.vue +0 -273
  41. package/src/components/tek-grid/columns-button/TekGridColumnsOptionsController.ts +0 -470
  42. package/src/components/tek-grid/columns-button/TekGridColumnsOptionsModal.ts +0 -513
  43. package/src/components/tek-grid/filter-button/TekGridFilterButton.ts +0 -48
  44. package/src/components/tek-grid/filter-button/TekGridFilterButton.vue +0 -28
  45. package/src/components/tek-grid/indentation/TekGridIndentation.ts +0 -21
  46. package/src/components/tek-grid/indentation/TekGridIndentation.vue +0 -33
  47. package/src/components/tek-grid/layout-options/TekGridLayoutOptions.ts +0 -124
  48. package/src/components/tek-grid/layout-options/TekGridLayoutOptions.vue +0 -172
  49. package/src/components/tek-grid/row/TekGridFooterRow.ts +0 -62
  50. package/src/components/tek-grid/row/TekGridFooterRow.vue +0 -64
  51. package/src/components/tek-grid/row/TekGridGroupRow.ts +0 -65
  52. package/src/components/tek-grid/row/TekGridGroupRow.vue +0 -65
  53. package/src/components/tek-loading/TekLoading.ts +0 -30
  54. package/src/components/tek-loading/TekLoading.vue +0 -18
  55. package/src/components/tek-user-info/TekUserInfo.ts +0 -52
  56. package/src/components/tek-user-info/TekUserInfo.vue +0 -53
  57. package/src/components/tek-user-info/TekUserInfoList.ts +0 -44
  58. package/src/components/tek-user-info/TekUserInfoList.vue +0 -12
  59. package/src/composables/useTableLayout.ts +0 -290
  60. package/src/shims-vue.d.ts +0 -6
  61. package/src/styles/index.scss +0 -0
  62. package/src/utils/isArrayOperation.ts +0 -5
  63. package/tsconfig.eslint.json +0 -9
  64. package/types/components/index.d.ts +0 -6
  65. package/types/components/public.d.ts +0 -11
  66. package/types/components/tek-breadcrumb-header/TekBreadcrumbHeader.d.ts +0 -1168
  67. package/types/components/tek-breadcrumb-header/TekBreadcrumbHeader.ts.d.ts +0 -1168
  68. package/types/components/tek-grid/TekGrid.d.ts +0 -6443
  69. package/types/components/tek-grid/TekGrid.ts.d.ts +0 -6443
  70. package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +0 -130
  71. package/types/components/tek-grid/column-filter/TekGridColumnFilter.ts.d.ts +0 -130
  72. package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +0 -225
  73. package/types/components/tek-grid/column-header/TekGridHeaderRow.ts.d.ts +0 -225
  74. package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +0 -2933
  75. package/types/components/tek-grid/columns-button/TekGridColumnsButton.ts.d.ts +0 -2933
  76. package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +0 -3580
  77. package/types/components/tek-grid/filter-button/TekGridFilterButton.ts.d.ts +0 -3580
  78. package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +0 -32
  79. package/types/components/tek-grid/indentation/TekGridIndentation.ts.d.ts +0 -32
  80. package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +0 -2394
  81. package/types/components/tek-grid/layout-options/TekGridLayoutOptions.ts.d.ts +0 -2394
  82. package/types/components/tek-grid/row/TekGridFooterRow.d.ts +0 -90
  83. package/types/components/tek-grid/row/TekGridFooterRow.ts.d.ts +0 -90
  84. package/types/components/tek-grid/row/TekGridGroupRow.d.ts +0 -87
  85. package/types/components/tek-grid/row/TekGridGroupRow.ts.d.ts +0 -87
  86. package/types/components/tek-loading/TekLoading.d.ts +0 -663
  87. package/types/components/tek-loading/TekLoading.ts.d.ts +0 -663
  88. package/types/components/tek-user-info/TekUserInfo.d.ts +0 -2459
  89. package/types/components/tek-user-info/TekUserInfo.ts.d.ts +0 -2459
  90. package/types/components/tek-user-info/TekUserInfoList.d.ts +0 -1245
  91. package/types/components/tek-user-info/TekUserInfoList.ts.d.ts +0 -1245
  92. /package/{types → dist/types}/utils/isArrayOperation.d.ts +0 -0
@@ -0,0 +1,3235 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".tek-breadcrumb-header .v-breadcrumbs-item{padding:0}.tek-breadcrumb-header .tek-breadcrumb-header-title-col{display:flex;padding-top:5px;padding-left:0}.tek-breadcrumb-header .tek-breadcrumb-header-title-col .tek-breadcrumb-header-slot-right{margin-left:auto}.tek-breadcrumb-header .zd-breadcrumbs{padding:0;font-size:var(--zd-font-body2-size)}.tek-breadcrumb-header .zd-breadcrumbs .v-breadcrumbs__item--disabled,.tek-breadcrumb-header .zd-text{color:#667080}.tek-breadcrumb-header .zd-text.tek-breadcrumb-header-title{font-size:32px;font-weight:700;line-height:35px;margin-bottom:10px}.tek-breadcrumb-header .zd-text>p{margin:0}.tek-grid .zd-grid__row:not(.tek-grid-group-row) :nth-child(1 of td:not(.zd-grid__selectable-cell)){display:flex}.tek-grid .is-rotated{transform:rotate(180deg);transition:transform .3s ease}.tek-grid .toolbar-visible{width:0;overflow:hidden;white-space:nowrap}.tek-grid .zd-grid__toolbar{height:auto}.tek-grid .zd-grid__toolbar .toolbar-divider{margin:10px}.tek-grid .zd-grid__toolbar .zd-search{width:200px}.tek-grid-columns-button-options{max-height:250px;display:flex;flex-direction:column;background-color:#fff}.tek-grid-columns-button-options.theme--dark{background-color:#1e1e1e}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper{flex:1;overflow-y:auto}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper .tek-grid-columns-button-table{font-size:13px;border-spacing:0;width:100%}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper .tek-grid-columns-button-table thead tr th{padding:var(--spacing-2) var(--spacing-2) var(--spacing-1) var(--spacing-2);white-space:nowrap;text-align:left;position:sticky;top:0;z-index:10;background-color:var(--zd-background-base)}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper .tek-grid-columns-button-table tbody tr td{padding:var(--spacing-1) var(--spacing-2);white-space:nowrap}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper .tek-grid-columns-button-table tbody tr td.tek-grid-columns-button-column-name{cursor:-webkit-grab}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper .tek-grid-columns-button-table tbody tr td.tek-grid-columns-button-column-name>span{padding-right:4px}.tek-grid-columns-button-options .tek-grid-columns-button-table-wrapper .tek-grid-columns-button-table tbody tr td.tek-grid-columns-button-column-aggregation{max-width:150px}.tek-grid-columns-button-options .tek-grid-columns-button-table-footer{display:flex}.tek-grid-columns-button-options .tek-grid-columns-button-table-footer .zd-button{flex:1}.tek-grid-columns-button-sortable-drag{background:#fff}.tek-grid-column-option-box{margin:var(--spacing-1);background:#ccc;padding:2px var(--spacing-1);cursor:pointer}.tek-grid-column-option-box>*{display:inline-block}.tek-grid-column-option-box>.zd-icon{font-size:.9rem;margin-left:var(--spacing-2)}.tek-grid-column-option-box.tek-grid-column-option-grouped-true{cursor:default;background:#fafafa}.tek-grid-column-option-box.tek-grid-column-option-grouped-true>.zd-icon{display:none}.tek-grid-column-option-box.tek-grid-column-option-selected-true{background:var(--v-primary-base);color:#fff}.tek-grid-column-option-box.tek-grid-column-option-selected-true>.zd-icon{color:#fff}.tek-grid-column-option-container-col{position:relative}.tek-grid-column-option-container-col .tek-grid-column-option-container{background:#eee;padding:var(--spacing-1);max-height:100px;min-height:42px;align-content:center;position:relative}.tek-grid-column-option-container-col .tek-grid-column-option-container .tek-iterable-footer{display:none!important}.tek-grid-column-option-container-col .tek-grid-column-option-container .zd-text.no-data{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);text-align:center;font-size:.7rem}.tek-grid-column-option-container-col .tek-grid-column-option-label{font-weight:var(--zd-font-body2-weight)}.tek-grid-column-option-container-col .tek-grid-column-option-select-all{position:absolute;top:.5rem;right:var(--spacing-1);color:var(--v-primary-base);cursor:pointer;font-size:.8rem}.tek-grid-column-option-container-col .tek-grid-column-option-drop-here{position:absolute;z-index:100;left:50%;transform:translate(-50%);top:35px}.tek-grid-column-option-detail-name{color:var(--v-primary-base);font-weight:var(--zd-font-body2-weight);font-size:1.1rem;margin-top:var(--spacing-6)}.zd-container.tek-grid-filter-content-container{position:relative;left:calc(var(--zd-default-padding) * -1)!important;padding-left:var(--zd-default-padding)!important;width:calc(100% + var(--zd-default-padding) * 2)!important;padding-right:var(--zd-default-padding)!important;max-width:none!important}.tek-grid-indentation{display:flex;width:8px;margin-left:10px;height:100%}.tek-grid-indentation--divider{border-left:solid 1px #ccc}.tek-grid-indentation--corner{height:60%;border-bottom:1px solid #ccc}.tek-grid-layout-options-badge .v-badge__badge{font-size:var(--zd-font-caption-size);font-weight:var(--zd-font-caption-weight);line-height:14px;pointer-events:none;background-color:var(--zd-badge-background-color)!important}.tek-grid-layout-options-badge .v-badge__badge span{color:var(--zd-badge-text-color)!important}.tek-grid-layout-item{font-size:13px;cursor:pointer;min-height:30px}.tek-grid-layout-item.selected{font-weight:700}.tek-grid-layout-item:hover.theme--light{background:#eee}.tek-grid-layout-item .tek-grid-layout-item-buttons{position:absolute;right:16px}.tek-grid-layout-item .tek-grid-layout-item-buttons .v-icon{font-size:18px}.tek-grid-layout-item-header{max-width:270px;font-size:13px;font-weight:700;color:var(--v-primary-base)!important;line-height:18px}.tek-grid-layout-item-header.edited{color:var(--v-error-darken2)!important}.tek-grid-layout-item-discard{min-height:30px;padding-top:10px}.tek-grid-footer-row--summary{background:var(--row-active-color)}.tek-grid-footer-row--summary .zd-grid__cell-content{font-size:15px}.tek-grid-footer-row .zd-grid__cell-content{padding:0 8px;font-weight:700}.tek-grid-group-cell{font-weight:700}.tek-grid-group-cell__container{height:100%;align-items:center;position:sticky}.about-modal{flex-grow:0;overflow-y:unset;width:auto;border:3px solid var(--v-primary-base)}.about-modal .zd-modal-card,.about-modal .zd-modal-card-text,.about-modal .zd-modal-container,.about-modal .zd-tabs{height:100%}.about-modal .v-card-text{font-size:.875rem!important}.about-modal .zd-modal-card-text{padding:8px!important}.about-modal .zd-modal-container{display:flex;flex-direction:column}.about-modal .zd-tabs,.about-modal .v-tabs-items{overflow-y:auto}.about-modal .zd-image-valid{width:50%;align-items:center}.about-modal #basic-user-info_version_tabs{height:300px!important}.about-modal #basic-user-info_about_image{text-align:center}")),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ var Tt = Object.create;
3
+ var Se = Object.defineProperty;
4
+ var $t = Object.getOwnPropertyDescriptor;
5
+ var Ee = (e, o) => (o = Symbol[e]) ? o : Symbol.for("Symbol." + e), ie = (e) => {
6
+ throw TypeError(e);
7
+ };
8
+ var Fe = (e, o, t) => o in e ? Se(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
9
+ var Ie = (e, o) => Se(e, "name", { value: o, configurable: !0 });
10
+ var Le = (e) => [, , , Tt((e == null ? void 0 : e[Ee("metadata")]) ?? null)], Be = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], re = (e) => e !== void 0 && typeof e != "function" ? ie("Function expected") : e, It = (e, o, t, l, d) => ({ kind: Be[e], name: o, metadata: l, addInitializer: (u) => t._ ? ie("Already initialized") : d.push(re(u || null)) }), Vt = (e, o) => Fe(o, Ee("metadata"), e[3]), Re = (e, o, t, l) => {
11
+ for (var d = 0, u = e[o >> 1], r = u && u.length; d < r; d++) o & 1 ? u[d].call(t) : l = u[d].call(t, l);
12
+ return l;
13
+ }, ze = (e, o, t, l, d, u) => {
14
+ var r, h, w, g, k, f = o & 7, y = !!(o & 8), m = !!(o & 16), D = f > 3 ? e.length + 1 : f ? y ? 1 : 2 : 0, p = Be[f + 5], C = f > 3 && (e[D - 1] = []), i = e[D] || (e[D] = []), c = f && (!m && !y && (d = d.prototype), f < 5 && (f > 3 || !m) && $t(f < 4 ? d : { get [t]() {
15
+ return Ve(this, u);
16
+ }, set [t](a) {
17
+ return Ae(this, u, a);
18
+ } }, t));
19
+ f ? m && f < 4 && Ie(u, (f > 2 ? "set " : f > 1 ? "get " : "") + t) : Ie(d, t);
20
+ for (var n = l.length - 1; n >= 0; n--)
21
+ g = It(f, t, w = {}, e[3], i), f && (g.static = y, g.private = m, k = g.access = { has: m ? (a) => At(d, a) : (a) => t in a }, f ^ 3 && (k.get = m ? (a) => (f ^ 1 ? Ve : Et)(a, d, f ^ 4 ? u : c.get) : (a) => a[t]), f > 2 && (k.set = m ? (a, b) => Ae(a, d, b, f ^ 4 ? u : c.set) : (a, b) => a[t] = b)), h = (0, l[n])(f ? f < 4 ? m ? u : c[p] : f > 4 ? void 0 : { get: c.get, set: c.set } : d, g), w._ = 1, f ^ 4 || h === void 0 ? re(h) && (f > 4 ? C.unshift(h) : f ? m ? u = h : c[p] = h : d = h) : typeof h != "object" || h === null ? ie("Object expected") : (re(r = h.get) && (c.get = r), re(r = h.set) && (c.set = r), re(r = h.init) && C.unshift(r));
22
+ return f || Vt(e, d), c && Se(d, t, c), m ? f ^ 4 ? u : c : d;
23
+ }, P = (e, o, t) => Fe(e, typeof o != "symbol" ? o + "" : o, t), ve = (e, o, t) => o.has(e) || ie("Cannot " + t), At = (e, o) => Object(o) !== o ? ie('Cannot use the "in" operator on this value') : e.has(o), Ve = (e, o, t) => (ve(e, o, "read from private field"), t ? t.call(e) : o.get(e));
24
+ var Ae = (e, o, t, l) => (ve(e, o, "write to private field"), l ? l.call(e, t) : o.set(e, t), t), Et = (e, o, t) => (ve(e, o, "access private method"), t);
25
+ import Ft from "i18next-vue";
26
+ import { ModalService as Lt, Icons as Bt } from "@zeedhi/common";
27
+ import { BreadcrumbHeader as nt, TekRestDatasource as X, TekFilterHelper as Rt, TekGridColumn as zt, TekGrid as Te, TekMemoryDatasource as le, TekGridColumnsButton as lt, TekGridFilterButton as st, TekGridLayoutOptions as at, Loading as rt, TekUserInfo as it, TekUserInfoList as ut } from "@zeedhi/teknisa-components-common";
28
+ import { defineComponent as F, resolveComponent as T, openBlock as N, createElementBlock as B, createVNode as E, mergeProps as M, withCtx as $, normalizeProps as Pt, guardReactiveProps as Ht, createElementVNode as L, Fragment as x, renderList as oe, createBlock as V, resolveDynamicComponent as dt, createCommentVNode as R, renderSlot as ne, computed as Z, provide as we, nextTick as de, inject as ce, withDirectives as ct, normalizeStyle as te, normalizeClass as j, createSlots as mt, vShow as pt, reactive as gt, toDisplayString as Y, ref as se, watch as ft, createTextVNode as ue, onMounted as ht, isMemoSame as Mt, withModifiers as Ut } from "vue";
29
+ import { ZdComponentRenderProps as he, useCreateInstance as U, NotProvidedError as Oe, buildProps as Ct, ZdGridEditableProps as bt, useGridEditableInstance as yt, getRootElement as pe, useGridColumns as kt, ZdIterableColumnsButtonProps as St, useButtonInstance as Ce, ZdButtonProps as vt, ZdLoadingProps as wt, useGetMethods as be, ZdListProps as Ot } from "@zeedhi/vuetify";
30
+ import { Utils as ee, Config as ae, Metadata as ge, dayjs as _, I18n as De, Singleton as qt, Loader as Ge } from "@zeedhi/core";
31
+ import J from "lodash.clonedeep";
32
+ import ye from "lodash.debounce";
33
+ import $e from "sortablejs";
34
+ import { ZdUserInfoProps as Gt } from "@zeedhi/zd-user-info-vue";
35
+ const Pe = {
36
+ ...he,
37
+ title: {
38
+ type: String,
39
+ default: ""
40
+ },
41
+ breadcrumb: {
42
+ type: Object,
43
+ default: {},
44
+ watch: !1
45
+ },
46
+ rightSlot: {
47
+ type: Array,
48
+ default: () => [],
49
+ watch: !1
50
+ }
51
+ }, Zt = F({
52
+ props: Pe,
53
+ inheritAttrs: !1,
54
+ setup(e, o) {
55
+ const { instance: t, root: l } = U(
56
+ e,
57
+ o,
58
+ nt,
59
+ Pe
60
+ );
61
+ return {
62
+ instance: t,
63
+ root: l
64
+ };
65
+ }
66
+ }), W = (e, o) => {
67
+ const t = e.__vccOpts || e;
68
+ for (const [l, d] of o)
69
+ t[l] = d;
70
+ return t;
71
+ }, Kt = ["id"], jt = { class: "tek-breadcrumb-header-slot-right" }, Wt = { key: 0 };
72
+ function _t(e, o, t, l, d, u) {
73
+ const r = T("zd-breadcrumbs"), h = T("zd-text"), w = T("v-col");
74
+ return N(), B("div", {
75
+ id: e.instance.name,
76
+ ref: "root",
77
+ class: "tek-breadcrumb-header"
78
+ }, [
79
+ E(r, M(e.instance.breadcrumb, {
80
+ theme: e.instance.theme
81
+ }), null, 16, ["theme"]),
82
+ E(w, {
83
+ class: "tek-breadcrumb-header-title-col",
84
+ cols: "12"
85
+ }, {
86
+ default: $(() => [
87
+ E(h, Pt(Ht({
88
+ name: `${e.instance.name}-title`,
89
+ cssClass: "tek-breadcrumb-header-title",
90
+ text: e.$t(e.instance.title)
91
+ })), null, 16),
92
+ L("span", jt, [
93
+ e.instance.rightSlot.length ? (N(), B("span", Wt, [
94
+ (N(!0), B(x, null, oe(e.instance.rightSlot, (g) => (N(), V(dt(g.component), M({ ref_for: !0 }, g, {
95
+ key: g.name
96
+ }), null, 16))), 128))
97
+ ])) : R("", !0),
98
+ ne(e.$slots, "rightSlot")
99
+ ])
100
+ ]),
101
+ _: 3
102
+ })
103
+ ], 8, Kt);
104
+ }
105
+ const Yt = /* @__PURE__ */ W(Zt, [["render", _t]]);
106
+ function Nt() {
107
+ const e = ce("applyLayout"), o = ce("getColumnElements"), t = ce("getTableWidth");
108
+ if (!e)
109
+ throw new Oe("applyLayout");
110
+ if (!o)
111
+ throw new Oe("getColumnElements");
112
+ if (!t)
113
+ throw new Oe("getTableWidth");
114
+ return { applyLayout: e, getColumnElements: o, getTableWidth: t };
115
+ }
116
+ function Dt({
117
+ instance: e,
118
+ rootEl: o
119
+ }) {
120
+ var D;
121
+ const t = (D = o.value) == null ? void 0 : D.querySelector("table"), l = Z(() => u(e.columns)), d = () => {
122
+ const p = e.datasource;
123
+ return p instanceof X ? p.dynamicFilter : {};
124
+ }, u = (p) => {
125
+ const C = {};
126
+ return p.forEach((i) => {
127
+ C[i.name] = i;
128
+ }), C;
129
+ }, r = (p) => {
130
+ var c;
131
+ const C = ((c = p.columns) == null ? void 0 : c.map((n) => n.name)) || [];
132
+ Object.keys(l.value).forEach((n) => {
133
+ var a;
134
+ C.includes(n) || (a = p.columns) == null || a.push(l.value[n]);
135
+ });
136
+ }, h = (p, C) => {
137
+ p instanceof zt && (!Array.isArray(p.filterProps) && typeof C == "string" ? p.filterProps.helperValue = C : Array.isArray(p.filterProps) && Array.isArray(C) && p.filterProps.forEach((i, c) => {
138
+ i.value = C[c];
139
+ }));
140
+ }, w = (p, C) => {
141
+ const i = J(p);
142
+ return Object.keys(i).forEach((c) => {
143
+ const n = i[c], a = C[C.findIndex((S) => S.name === c)], { filterHelperValue: b } = a;
144
+ n.forEach((S) => {
145
+ ["IN", "NOT_IN", "BETWEEN"].includes(S.operation) && !Array.isArray(S.value) && (S.value = S.value.split(";"));
146
+ let I = "";
147
+ if (Array.isArray(b) ? Object.keys(b).forEach((A) => {
148
+ const s = b[A] || "";
149
+ `${S.relation || "AND"}-${S.operation || "CONTAINS"}` === A && (I = s);
150
+ }) : I = b, I) {
151
+ const A = e.getColumn(a.name);
152
+ S.value = Rt.getValue(I, A);
153
+ }
154
+ });
155
+ }), i;
156
+ }, g = (p) => {
157
+ let C = !1;
158
+ return e.datasource.order = [...p.originalDatasourceOrder], e.datasource.filter = { ...p.originalDatasourceFilter }, e.datasource instanceof X && (e.datasource.dynamicFilter = w(
159
+ p.originalDatasourceDynamicFilter,
160
+ p.originalColumnProps
161
+ )), e.columns = p.originalColumnProps.map((i) => {
162
+ const c = l.value[i.name];
163
+ return C = C || c.grouped !== i.grouped || c.groupOpened !== i.groupOpened || c.aggregation !== i.aggregation, c.isVisible = i.isVisible ?? c.isVisible, c.label = i.label ?? c.label, c.align = i.align ?? c.align, c.fixed = i.fixed ?? c.fixed, c.grouped = i.grouped ?? c.grouped, c.groupOpened = i.groupOpened ?? c.groupOpened, c.aggregation = i.aggregation ?? c.aggregation, c.minWidth = i.minWidth ?? c.minWidth, c.maxWidth = i.maxWidth ?? c.maxWidth, c.width = i.width ?? c.width, h(c, i.filterHelperValue || ""), c;
164
+ }), t && (t.style.width = "100%", Array.from(t.querySelectorAll("tr th:not(.selectable)")).forEach((c) => {
165
+ c.style.width = "unset";
166
+ })), C;
167
+ }, k = (p, C) => {
168
+ var n;
169
+ const i = Object.keys(l.value);
170
+ let c = !1;
171
+ p.columns = (n = p.columns) == null ? void 0 : n.filter((a) => {
172
+ const b = i.includes(a.name);
173
+ return b || (c = !0), b;
174
+ }), c && C(p), t && (t.style.width = p.gridWidth || "auto"), e.datasource.order = p.order !== void 0 ? p.order : e.datasource.order, e.datasource.filter = p.filter !== void 0 ? p.filter : e.datasource.filter, e.datasource instanceof X && p.dynamicFilter !== void 0 && (e.datasource.dynamicFilter = w(p.dynamicFilter, p.columns || e.columns)), p.columns && (e.columns = p.columns.map((a) => {
175
+ const b = l.value[a.name];
176
+ return b.label = a.label !== void 0 ? a.label : b.label, b.align = a.align !== void 0 ? a.align : b.align, b.isVisible = a.isVisible !== void 0 ? a.isVisible : b.isVisible, b.fixed = !!a.fixed, b.grouped = !!a.grouped, b.groupOpened = !!a.groupOpened, b.aggregation = a.aggregation, b.minWidth = a.minWidth || "", b.maxWidth = a.maxWidth || "", b.width = a.width, h(b, a.filterHelperValue || ""), b;
177
+ }), de(() => {
178
+ i.forEach((a, b) => {
179
+ const S = t == null ? void 0 : t.querySelector(
180
+ `tr th:not(.selectable)[index="${b}"]`
181
+ );
182
+ S && (S.style.width = p.columns[b].width || "unset");
183
+ });
184
+ }));
185
+ }, f = ({
186
+ layout: p,
187
+ defaultLayout: C,
188
+ changeLayoutCallback: i
189
+ }) => {
190
+ const c = e.datasource.order, n = e.datasource.filter, a = d();
191
+ let b = !1;
192
+ p ? (r(p), k(p, i)) : b = g(C), (!ee.isEqual(e.datasource.order, c) || !ee.isEqual(e.datasource.filter, n) || !ee.isEqual(d(), a)) && !b && e.loadAfterTasks();
193
+ }, y = () => {
194
+ const p = {};
195
+ return ((t == null ? void 0 : t.querySelectorAll("tr th:not(.selectable)[index]")) || []).forEach((i) => {
196
+ const c = i.getAttribute("index");
197
+ c !== null && (p[c] = i);
198
+ }), p;
199
+ }, m = () => t ? window.getComputedStyle(t).width : "auto";
200
+ we("applyLayout", f), we("getColumnElements", y), we("getTableWidth", m);
201
+ }
202
+ const He = Ct({
203
+ ...bt,
204
+ toolbarSlot: {
205
+ type: Array,
206
+ default: void 0,
207
+ watch: !1
208
+ },
209
+ title: {
210
+ type: String,
211
+ default: ""
212
+ },
213
+ addButton: {
214
+ type: [Boolean, String],
215
+ default: !1
216
+ },
217
+ deleteButton: {
218
+ type: [String, Boolean],
219
+ default: "none"
220
+ },
221
+ columnsButton: {
222
+ type: [Boolean, String],
223
+ default: !1
224
+ },
225
+ columnsButtonIgnore: {
226
+ type: [Array, String],
227
+ default: () => []
228
+ },
229
+ showEditButtons: {
230
+ type: [Boolean, String],
231
+ default: !0
232
+ },
233
+ filterButton: {
234
+ type: [Boolean, String],
235
+ default: !1
236
+ },
237
+ modalFilterProps: {
238
+ type: Object,
239
+ default: () => ({})
240
+ },
241
+ showSearch: {
242
+ type: [Boolean, String],
243
+ default: !0
244
+ },
245
+ columnFilterButton: {
246
+ type: [Boolean, String],
247
+ default: !1
248
+ },
249
+ hideActions: {
250
+ type: [Boolean, String],
251
+ default: !1
252
+ },
253
+ actions: {
254
+ type: Array,
255
+ default: () => [],
256
+ watch: !1
257
+ },
258
+ dragColumns: {
259
+ type: [Boolean, String],
260
+ default: !0
261
+ },
262
+ resizeColumns: {
263
+ type: [Boolean, String],
264
+ default: !0
265
+ },
266
+ showLayoutOptions: {
267
+ type: [Boolean, String],
268
+ default: !0
269
+ },
270
+ showExport: {
271
+ type: [String, Boolean],
272
+ default: !1
273
+ },
274
+ showReload: {
275
+ type: [Boolean, String],
276
+ default: !0
277
+ },
278
+ exportConfig: {
279
+ type: Array
280
+ },
281
+ exportActions: {
282
+ type: Array,
283
+ watch: !1
284
+ },
285
+ groupsOpened: {
286
+ type: [Boolean, String],
287
+ default: !1
288
+ },
289
+ showSummaryTotal: {
290
+ type: [Boolean, String],
291
+ default: !0
292
+ },
293
+ mainGrid: {
294
+ type: [Boolean, String],
295
+ default: !0
296
+ },
297
+ xlsDefaultType: {
298
+ type: String,
299
+ default: void 0
300
+ },
301
+ showCheckboxAllFilter: {
302
+ type: [Boolean, String],
303
+ default: ae.gridShowCheckboxAllFilter
304
+ },
305
+ toolbarOpened: {
306
+ type: [Boolean],
307
+ default: !0
308
+ },
309
+ defaultFilter: {
310
+ type: Object
311
+ },
312
+ reportTitle: {
313
+ type: String
314
+ },
315
+ editNewRowsOnly: {
316
+ type: [Boolean, String],
317
+ default: !1
318
+ },
319
+ toolbarConfig: {
320
+ type: Array,
321
+ default: () => [],
322
+ watch: !1
323
+ },
324
+ reportLabelFormatter: {
325
+ type: Function,
326
+ default: void 0
327
+ },
328
+ showHideButton: {
329
+ type: [Boolean, String],
330
+ default: !0
331
+ }
332
+ }), Jt = F({
333
+ props: He,
334
+ inheritAttrs: !1,
335
+ setup(e, o) {
336
+ const { instance: t, root: l } = U(e, o, Te, He), d = Z(() => t.isGrouped() ? t.getGroupedData() : t.getData()), u = Z(() => d.value.filter((s) => t.isItemVisible(s))), h = yt({
337
+ instance: t,
338
+ root: l,
339
+ renderedData: u,
340
+ isNavigableRow: (s) => s.classList.contains("zd-grid__row") && !s.classList.contains("tek-grid-group-row") && !s.classList.contains("tek-grid-footer-row")
341
+ }), w = pe(l), { visibleColumns: g } = kt({
342
+ instance: t,
343
+ rootEl: w,
344
+ visibilityCondition: (s) => s.isVisible && !s.grouped
345
+ });
346
+ Dt({ instance: t, rootEl: w });
347
+ const k = ye((s) => {
348
+ const O = new Event("change", { cancelable: !0 });
349
+ if (s.callEvent("beforeApplyFilter", { component: s, event: O }), O.defaultPrevented) return;
350
+ const { datasource: v } = s;
351
+ v instanceof X || v instanceof le ? v.updateDynamicFilter() : v.get();
352
+ }, 500), f = Z(() => {
353
+ if (t.datasource instanceof X || t.datasource instanceof le)
354
+ return t.datasource.dynamicFilter;
355
+ const s = t.datasource.filter, O = {};
356
+ return Object.keys(s).forEach((v) => {
357
+ O[v] = [{ relation: "AND", operation: "CONTAINS", value: s[v] }];
358
+ }), O;
359
+ }), y = (s) => {
360
+ if (!ee.isEqual(f, s)) {
361
+ if (t.datasource instanceof X || t.datasource instanceof le)
362
+ t.datasource.dynamicFilter = J(s);
363
+ else {
364
+ const O = {};
365
+ Object.keys(s).forEach((v) => {
366
+ s[v][0].value && (O[v] = s[v][0].value);
367
+ }), t.datasource.filter = O;
368
+ }
369
+ k(t), t.changeLayout();
370
+ }
371
+ }, m = (s) => t.columnHasFilter(s), D = (s, O) => t.isItemVisible(s) && h.shouldRender(O), p = (s) => {
372
+ const { uniqueKey: O, currentRow: v } = t.datasource;
373
+ return !!(s.group && s.groupValue === v.groupValue || s[O] && s[O] === v[O]);
374
+ }, C = (s) => {
375
+ let O = !1, v = !1;
376
+ const { uniqueKey: H } = t.datasource;
377
+ return s.children.forEach((q) => {
378
+ const z = t.selectedRows.findIndex((K) => q[H] === K[H]);
379
+ O = O || z !== -1, v = v || z === -1;
380
+ }), O && v;
381
+ }, i = (s) => s.children.every((O) => {
382
+ const { uniqueKey: v } = t.datasource;
383
+ return t.selectedRows.findIndex((q) => O[v] === q[v]) !== -1;
384
+ }), c = (s, O, v) => {
385
+ de(() => {
386
+ const H = pe(l);
387
+ t.selectGroupClick(s, O, v, H.value);
388
+ });
389
+ }, n = (s, O) => {
390
+ const { uniqueKey: v } = t.datasource, H = i(s);
391
+ H ? s.children.forEach((q) => {
392
+ t.selectedRows.findIndex((K) => q[v] === K[v]) !== -1 && t.selectRow(q, !1);
393
+ }) : s.children.map((z) => d.value.find((K) => z[v] === K[v])).forEach((z) => {
394
+ if (!z) return;
395
+ t.selectedRows.findIndex((ke) => z[v] === ke[v]) === -1 && t.selectRow(z, !0);
396
+ }), c(s, !H, O);
397
+ }, a = (s) => {
398
+ t.openGroup(s);
399
+ }, b = (s) => !!s.group, S = (s) => !!s.groupFooter, I = Z(() => t.columns.filter((s) => s.grouped).map((s) => s.name) || []), A = Z(() => h.sortBy.value.map(({ key: s, order: O }) => ({
400
+ key: s,
401
+ order: O
402
+ })));
403
+ return {
404
+ ...h,
405
+ instance: t,
406
+ root: l,
407
+ filter: f,
408
+ setFilter: y,
409
+ columnHasFilter: m,
410
+ visibleColumns: g,
411
+ isRowVisible: D,
412
+ isCurrentRowGroup: p,
413
+ isGroupSelectIndeterminate: C,
414
+ selectGroup: n,
415
+ isGroup: b,
416
+ openGroup: a,
417
+ renderedData: d,
418
+ isGroupSelected: i,
419
+ groupColumnNames: I,
420
+ isFooter: S,
421
+ visibleData: u,
422
+ sortBy: A
423
+ };
424
+ }
425
+ }), Xt = ["colspan"], Qt = ["colspan"];
426
+ function xt(e, o, t, l, d, u) {
427
+ const r = T("zd-grid-toolbar"), h = T("tek-grid-header-row"), w = T("tek-grid-group-row"), g = T("tek-grid-indentation"), k = T("zd-grid-editable-row"), f = T("tek-grid-footer-row"), y = T("zd-iterable-no-data"), m = T("zd-grid-footer"), D = T("v-data-table");
428
+ return ct((N(), V(D, {
429
+ ref: "root",
430
+ id: e.instance.name,
431
+ modelValue: e.selectedRows,
432
+ "onUpdate:modelValue": o[12] || (o[12] = (p) => e.selectedRows = p),
433
+ class: j([
434
+ "zd-grid",
435
+ "tek-grid",
436
+ "zd-grid-editable",
437
+ e.instance.cssClass,
438
+ {
439
+ "zd-grid--loading": e.instance.datasource.loading,
440
+ "zd-grid--cell-selection": e.instance.cellSelection
441
+ }
442
+ ]),
443
+ style: te([
444
+ e.cssColorVars,
445
+ {
446
+ height: e.$formatSize(e.instance.height),
447
+ width: e.$formatSize(e.instance.width),
448
+ maxHeight: e.$formatSize(e.instance.maxHeight),
449
+ minHeight: e.$formatSize(e.instance.minHeight),
450
+ maxWidth: e.$formatSize(e.instance.maxWidth),
451
+ minWidth: e.$formatSize(e.instance.minWidth)
452
+ },
453
+ e.$styleObject(e.instance.cssStyle)
454
+ ]),
455
+ theme: e.instance.theme,
456
+ "sort-asc-icon": "$collapse",
457
+ "sort-desc-icon": "$expand",
458
+ "fixed-header": "",
459
+ "multi-sort": "",
460
+ "hide-default-footer": "",
461
+ name: e.instance.name,
462
+ headers: e.headers,
463
+ items: e.renderedData,
464
+ search: e.instance.datasource.search,
465
+ density: e.instance.dense ? "compact" : "default",
466
+ loading: e.instance.datasource.loading,
467
+ "item-value": e.instance.datasource.uniqueKey,
468
+ "items-per-page": -1,
469
+ "no-filter": "",
470
+ "sort-by": e.sortBy,
471
+ "disable-sort": "",
472
+ "return-object": "",
473
+ tabindex: "0",
474
+ "onUpdate:sortBy": o[13] || (o[13] = (p) => e.updateSortBy(p))
475
+ }, mt({
476
+ top: $(() => [
477
+ e.hasToolbarSlot ? R("", !0) : (N(), V(r, { key: 0 })),
478
+ ne(e.$slots, "toolbarSlot")
479
+ ]),
480
+ headers: $(({ columns: p, isSorted: C, getSortIcon: i, toggleSort: c, sortBy: n }) => [
481
+ e.instance.showHeader ? (N(), V(h, {
482
+ key: 0,
483
+ name: e.instance.name,
484
+ selectable: e.instance.selectable,
485
+ headerBackground: e.instance.headerBackground,
486
+ showSelectAll: e.instance.showSelectAll,
487
+ allselectedState: e.allselectedState,
488
+ visibleColumns: e.visibleColumns,
489
+ dragColumns: e.instance.dragColumns,
490
+ headerCellTextColor: e.instance.headerCellTextColor,
491
+ resizeColumns: e.instance.resizeColumns,
492
+ getSortIcon: i,
493
+ toggleSort: c,
494
+ sortBy: n,
495
+ tableColumns: p,
496
+ isSorted: C,
497
+ disableCheckbox: e.instance.editing,
498
+ instanceName: e.instance.name,
499
+ filterRelationsDatasource: e.instance.filterRelationsDatasource,
500
+ filterOperationsDatasource: e.instance.filterOperationsDatasource,
501
+ modelValue: e.filter,
502
+ columnFilterButton: e.instance.columnFilterButton,
503
+ columnHasFilter: e.columnHasFilter,
504
+ level: e.groupColumnNames.length,
505
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => e.setFilter(a)),
506
+ onResizeMousedown: o[1] || (o[1] = (a) => e.resizeMouseDownHandler(a.column, a.event)),
507
+ onResizeClick: o[2] || (o[2] = (a) => e.resizeClickHandler(a.event)),
508
+ onSelectAllClick: o[3] || (o[3] = (a) => e.selectAllClick(a))
509
+ }, null, 8, ["name", "selectable", "headerBackground", "showSelectAll", "allselectedState", "visibleColumns", "dragColumns", "headerCellTextColor", "resizeColumns", "getSortIcon", "toggleSort", "sortBy", "tableColumns", "isSorted", "disableCheckbox", "instanceName", "filterRelationsDatasource", "filterOperationsDatasource", "modelValue", "columnFilterButton", "columnHasFilter", "level"])) : R("", !0)
510
+ ]),
511
+ "no-data": $(() => [
512
+ E(y, null, {
513
+ errorSlot: $(() => [
514
+ ne(e.$slots, "errorSlot")
515
+ ]),
516
+ noResultSlot: $(() => [
517
+ ne(e.$slots, "noResultSlot")
518
+ ]),
519
+ noDataSlot: $(() => [
520
+ ne(e.$slots, "noDataSlot")
521
+ ]),
522
+ _: 3
523
+ })
524
+ ]),
525
+ bottom: $(() => [
526
+ e.instance.showFooter && !e.hasFooterSlot ? (N(), V(m, { key: 0 })) : R("", !0),
527
+ ne(e.$slots, "footerSlot")
528
+ ]),
529
+ _: 2
530
+ }, [
531
+ e.addTopPadding() ? {
532
+ name: "body.prepend",
533
+ fn: $(({ headers: p }) => [
534
+ L("tr", null, [
535
+ L("td", {
536
+ colspan: p.length,
537
+ style: te(`padding-top:${e.scrollData.startHeight}px`)
538
+ }, null, 12, Xt)
539
+ ])
540
+ ]),
541
+ key: "0"
542
+ } : void 0,
543
+ e.addBottomPadding() ? {
544
+ name: "body.append",
545
+ fn: $(({ headers: p }) => [
546
+ L("tr", null, [
547
+ L("td", {
548
+ colspan: p.length,
549
+ style: te(`padding-top:${e.scrollData.endHeight}px`)
550
+ }, null, 12, Qt)
551
+ ])
552
+ ]),
553
+ key: "1"
554
+ } : void 0,
555
+ e.instance.datasource.data.length ? {
556
+ name: "body",
557
+ fn: $(({ internalItems: p, isSelected: C }) => [
558
+ (N(!0), B(x, null, oe(e.visibleData, (i, c) => (N(), B(x, null, [
559
+ e.isRowVisible(i, c) ? (N(), B(x, { key: 0 }, [
560
+ e.isGroup(i) ? (N(), V(w, {
561
+ key: i.groupColumnName + i.groupValue,
562
+ row: i,
563
+ "is-current-row": e.isCurrentRowGroup(i),
564
+ selectable: e.instance.selectable,
565
+ selectionDisabled: e.instance.callDisableSelection(i),
566
+ cellSelection: e.instance.cellSelection,
567
+ "is-current": e.isCurrent,
568
+ isSelected: e.isGroupSelected(i),
569
+ indeterminate: e.isGroupSelectIndeterminate(i),
570
+ onClick: (n) => e.rowClick(i, n),
571
+ onCheckboxClick: (n) => e.selectGroup(i, n),
572
+ onFocusin: o[4] || (o[4] = (n) => e.cellFocusIn(n)),
573
+ onExpandClick: (n) => e.openGroup(i)
574
+ }, null, 8, ["row", "is-current-row", "selectable", "selectionDisabled", "cellSelection", "is-current", "isSelected", "indeterminate", "onClick", "onCheckboxClick", "onExpandClick"])) : e.isFooter(i) ? (N(), V(f, {
575
+ key: "footer" + i.groupColumnName + i.groupValue,
576
+ isSelected: C(p[c]),
577
+ selectable: e.instance.selectable,
578
+ selectionDisabled: e.instance.callDisableSelection(i),
579
+ cellSelection: e.instance.cellSelection,
580
+ isCurrent: e.isCurrent,
581
+ columns: e.visibleColumns,
582
+ row: i,
583
+ fixedLeft: e.fixedLeft,
584
+ fixedRight: e.fixedRight,
585
+ onCellFocus: o[10] || (o[10] = (n) => e.cellFocus(n)),
586
+ onFocusin: o[11] || (o[11] = (n) => e.cellFocusIn(n))
587
+ }, null, 8, ["isSelected", "selectable", "selectionDisabled", "cellSelection", "isCurrent", "columns", "row", "fixedLeft", "fixedRight"])) : (N(), V(k, {
588
+ key: e.instance.getRowKey(i),
589
+ isSelected: C(p[c]),
590
+ isCurrentRow: e.isCurrentRow(i),
591
+ selectable: e.instance.selectable,
592
+ selectionDisabled: e.instance.callDisableSelection(i),
593
+ cellSelection: e.instance.cellSelection,
594
+ isCurrent: e.isCurrent,
595
+ columns: e.visibleColumns,
596
+ row: i,
597
+ fixedLeft: e.fixedLeft,
598
+ fixedRight: e.fixedRight,
599
+ isEditing: e.isEditing,
600
+ onCellFocus: o[5] || (o[5] = (n) => e.cellFocus(n)),
601
+ onCellClick: o[6] || (o[6] = (n) => e.cellClick(n)),
602
+ onClick: (n) => e.rowClick(i, n),
603
+ onFocusin: o[7] || (o[7] = (n) => e.cellFocusIn(n)),
604
+ onCheckboxClick: (n) => e.selectRowClick(i, !C(p[c]), n),
605
+ onCellEnterEdit: o[8] || (o[8] = (n) => e.cellEnterEdit(n)),
606
+ onCellKeydown: o[9] || (o[9] = (n) => e.cellKeydown(n))
607
+ }, {
608
+ "cell-prepend": $(({ index: n }) => {
609
+ var a;
610
+ return [
611
+ n === 0 && e.groupColumnNames.length > 0 ? (N(), V(g, {
612
+ key: 0,
613
+ level: (a = i.groupHeaders) == null ? void 0 : a.length
614
+ }, null, 8, ["level"])) : R("", !0)
615
+ ];
616
+ }),
617
+ _: 2
618
+ }, 1032, ["isSelected", "isCurrentRow", "selectable", "selectionDisabled", "cellSelection", "isCurrent", "columns", "row", "fixedLeft", "fixedRight", "isEditing", "onClick", "onCheckboxClick"]))
619
+ ], 64)) : R("", !0)
620
+ ], 64))), 256))
621
+ ]),
622
+ key: "2"
623
+ } : void 0
624
+ ]), 1032, ["id", "modelValue", "class", "style", "theme", "name", "headers", "items", "search", "density", "loading", "item-value", "sort-by"])), [
625
+ [pt, e.instance.isVisible]
626
+ ]);
627
+ }
628
+ const eo = /* @__PURE__ */ W(Jt, [["render", xt]]), Q = (e) => ["IN", "NOT_IN", "BETWEEN"].includes(e), to = {
629
+ hasFilterData: {
630
+ type: Boolean,
631
+ default: !1
632
+ },
633
+ column: {
634
+ type: Object,
635
+ required: !0
636
+ },
637
+ modelValue: {
638
+ type: Array,
639
+ default: []
640
+ },
641
+ instanceName: {
642
+ type: String,
643
+ required: !0
644
+ },
645
+ filterRelationsDatasource: {
646
+ type: [Object, null],
647
+ required: !1
648
+ },
649
+ filterOperationsDatasource: {
650
+ type: [Object, null],
651
+ required: !1
652
+ },
653
+ isHovering: {
654
+ type: Boolean,
655
+ default: !1
656
+ },
657
+ multiple: {
658
+ type: Boolean,
659
+ required: !0
660
+ }
661
+ }, oo = F({
662
+ props: to,
663
+ inheritAttrs: !1,
664
+ emits: ["update:modelValue"],
665
+ setup(e, o) {
666
+ const t = (n) => `${e.instanceName}-${e.column.name}-filter-value-${n}`, l = (n) => {
667
+ const a = t(n);
668
+ ge.getInstance(a).setFocus();
669
+ }, d = () => gt({
670
+ operation: "CONTAINS",
671
+ relation: "AND",
672
+ value: void 0
673
+ });
674
+ let u = d();
675
+ const r = (n, a) => {
676
+ const b = e.column.componentProps.dateFormat || ae.dateFormat, S = e.column.componentProps.displayFormat || ae.displayFormat;
677
+ return a ? _(n, S).isValid() || !_(n, b).isValid() ? n : _(n, b).format(S) : _(n, b).isValid() || !_(n, S).isValid() ? n : _(n, S).format(b);
678
+ }, h = (n, a = !1) => ["ZdDate", "ZdDateRange"].includes(e.column.componentProps.component) ? Array.isArray(n) ? n.map((b) => r(b, a)) : r(n, a) : n, w = /* @__PURE__ */ new WeakMap();
679
+ let g = 0;
680
+ const k = (n) => (w.has(n) || w.set(n, `__item__${g++}`), w.get(n)), f = Z(() => e.multiple ? [...e.modelValue, u].map((n) => ({
681
+ id: k(n),
682
+ item: n
683
+ })) : e.modelValue.length > 0 ? [{ id: k(e.modelValue[0]), item: e.modelValue[0] }] : [{ id: k(u), item: u }]), y = ye((n) => {
684
+ ee.isEqual(n, e.modelValue) || (o.emit("update:modelValue", n), u = d());
685
+ }, 500);
686
+ return {
687
+ changeValue: (n, a, { component: b }) => {
688
+ const S = J(e.modelValue), I = J(n), { value: A } = b, s = e.multiple && a === S.length;
689
+ let O = A;
690
+ if (A && Q(I.operation) && (O = A.split(";")), I.value = h(O), !e.multiple) {
691
+ y([I]);
692
+ return;
693
+ }
694
+ if (s) {
695
+ if (!I.value) return;
696
+ y([...S, I]);
697
+ return;
698
+ }
699
+ I.value || (a === S.length - 1 && (u.operation = I.operation, u.relation = I.relation), S.splice(a, 1), S.length > 0 && a === 0 && (S[0].relation = "AND"), S.length === 0 && (u.relation = "AND")), y(S);
700
+ },
701
+ changeRelation: (n, { component: a }) => {
702
+ const b = J(e.modelValue), S = n === b.length, I = S ? u : b[n], { value: A } = a;
703
+ l(n), I.relation = A, !S && y(b);
704
+ },
705
+ changeOperation: (n, { component: a }) => {
706
+ const b = J(e.modelValue), S = b[n], I = n === b.length, A = I ? u : S, { value: s } = a;
707
+ l(n), Q(s) && (A.value = Array.isArray(S.value) ? S.value : [S.value]), A.operation = s, !I && y(b);
708
+ },
709
+ getValueInputName: t,
710
+ newFilter: u,
711
+ getComponentType: (n) => Q(n) ? "ZdTextInput" : e.column.componentProps.component,
712
+ getComponentHint: (n) => Q(n) ? "TEKGRID_MULTIPLE_VALUE_HINT" : "",
713
+ modelWithIds: f,
714
+ getItemValue: (n) => Q(n.operation) ? n.value.join(";") : n.value
715
+ };
716
+ }
717
+ });
718
+ function no(e, o, t, l, d, u) {
719
+ const r = T("zd-grid-header-icon"), h = T("zd-radio"), w = T("zd-select"), g = T("v-card"), k = T("v-menu");
720
+ return N(), V(k, {
721
+ "offset-overflow": "",
722
+ "offset-y": "",
723
+ transition: "scale-transition",
724
+ "content-class": "tek-grid-column-filter__menu",
725
+ "close-on-content-click": !1
726
+ }, {
727
+ activator: $(({ props: f }) => [
728
+ E(r, M(f, {
729
+ icon: e.$getIcon("filter"),
730
+ hidden: !e.isHovering && !e.hasFilterData,
731
+ color: e.hasFilterData ? "primary" : ""
732
+ }), null, 16, ["icon", "hidden", "color"])
733
+ ]),
734
+ default: $(() => [
735
+ E(g, {
736
+ class: "zd-pa-4 zd-pb-0",
737
+ "min-width": 200,
738
+ "max-height": 300
739
+ }, {
740
+ default: $(() => [
741
+ (N(!0), B(x, null, oe(e.modelWithIds, ({ item: f, id: y }, m) => (N(), B(x, { key: y }, [
742
+ e.multiple && m > 0 ? (N(), V(h, M({
743
+ key: 0,
744
+ name: `${e.instanceName}-${e.column.name}-filter-relation-${m}`
745
+ }, { ref_for: !0 }, {
746
+ showLabel: !1,
747
+ showHelper: !1,
748
+ vertical: !1,
749
+ cssClass: "zd-mb-2",
750
+ datasource: e.filterRelationsDatasource,
751
+ dataValue: "value",
752
+ dataLabel: "text",
753
+ value: f.relation,
754
+ events: {
755
+ change: (D) => e.changeRelation(m, D)
756
+ }
757
+ }), null, 16, ["name"])) : R("", !0),
758
+ e.multiple && f.operation ? (N(), V(w, M({
759
+ key: 1,
760
+ name: `${e.instanceName}-${e.column.name}-filter-operation-${m}`
761
+ }, { ref_for: !0 }, {
762
+ autocomplete: !1,
763
+ showLabel: !1,
764
+ showHelper: !1,
765
+ clearable: !1,
766
+ cssClass: "zd-mb-2",
767
+ datasource: e.filterOperationsDatasource,
768
+ dataValue: "value",
769
+ dataText: "text",
770
+ value: f.operation,
771
+ events: {
772
+ change: (D) => e.changeOperation(m, D)
773
+ }
774
+ }), null, 16, ["name"])) : R("", !0),
775
+ (N(), V(dt(e.getComponentType(f.operation)), M({
776
+ name: `${e.instanceName}-${e.column.name}-filter-value-${m}`
777
+ }, { ref_for: !0 }, {
778
+ ...e.column.componentProps,
779
+ showLabel: !1,
780
+ showHelper: !0,
781
+ autofill: !1,
782
+ cssClass: "zd-mb-2",
783
+ value: e.getItemValue(f),
784
+ persistentHint: !0,
785
+ hint: e.getComponentHint(f.operation),
786
+ events: {
787
+ input: (D) => e.changeValue(f, m, D),
788
+ change: (D) => e.changeValue(f, m, D)
789
+ }
790
+ }), null, 16, ["name"]))
791
+ ], 64))), 128))
792
+ ]),
793
+ _: 1
794
+ })
795
+ ]),
796
+ _: 1
797
+ });
798
+ }
799
+ const lo = /* @__PURE__ */ W(oo, [["render", no]]), so = F({
800
+ props: {
801
+ selectable: {
802
+ type: Boolean,
803
+ default: !1
804
+ },
805
+ headerBackground: {
806
+ type: String,
807
+ default: ""
808
+ },
809
+ showSelectAll: {
810
+ type: Boolean,
811
+ default: !1
812
+ },
813
+ allselectedState: {
814
+ type: Number,
815
+ default: 0
816
+ },
817
+ visibleColumns: {
818
+ type: Array,
819
+ default: () => []
820
+ },
821
+ dragColumns: {
822
+ type: Boolean,
823
+ default: !1
824
+ },
825
+ headerCellTextColor: {
826
+ type: String,
827
+ default: ""
828
+ },
829
+ resizeColumns: {
830
+ type: Boolean,
831
+ default: !1
832
+ },
833
+ getSortIcon: {
834
+ type: Function,
835
+ default: () => {
836
+ }
837
+ },
838
+ isSorted: {
839
+ type: Function,
840
+ default: () => {
841
+ }
842
+ },
843
+ toggleSort: {
844
+ type: Function,
845
+ default: () => {
846
+ }
847
+ },
848
+ tableColumns: {
849
+ type: Array,
850
+ default: () => []
851
+ },
852
+ sortBy: {
853
+ type: Array,
854
+ default: () => []
855
+ },
856
+ disableCheckbox: {
857
+ type: Boolean,
858
+ default: !1
859
+ },
860
+ sortable: {
861
+ type: Boolean,
862
+ default: !0
863
+ },
864
+ name: {
865
+ type: String,
866
+ default: ""
867
+ },
868
+ modelValue: {
869
+ type: Object,
870
+ default: () => []
871
+ },
872
+ instanceName: {
873
+ type: String,
874
+ required: !0
875
+ },
876
+ filterRelationsDatasource: {
877
+ type: [Object, null],
878
+ required: !1
879
+ },
880
+ filterOperationsDatasource: {
881
+ type: [Object, null],
882
+ required: !1
883
+ },
884
+ columnFilterButton: {
885
+ type: Boolean,
886
+ required: !0
887
+ },
888
+ columnHasFilter: {
889
+ type: Function,
890
+ required: !0
891
+ },
892
+ level: {
893
+ type: Number,
894
+ default: 0
895
+ }
896
+ },
897
+ emits: ["selectAllClick", "resizeMousedown", "resizeClick", "update:modelValue"],
898
+ setup(e, { emit: o }) {
899
+ const t = ce("calcWidth");
900
+ if (!t)
901
+ throw new Error("calcWidth");
902
+ return {
903
+ calcWidth: t,
904
+ resizeMousedown: (g, k) => {
905
+ o("resizeMousedown", { event: k, column: g });
906
+ },
907
+ resizeClick: (g) => {
908
+ o("resizeClick", { event: g });
909
+ },
910
+ findOrderIndex: (g, k) => g.findIndex((f) => f.key === k.name),
911
+ updateModelValue: (g, k) => {
912
+ const f = { ...e.modelValue };
913
+ f[g] = k, o("update:modelValue", f);
914
+ },
915
+ showFilterButton: (g) => g.type !== "action" && e.columnFilterButton && g.filterable,
916
+ selectAllClick: (g) => {
917
+ o("selectAllClick", g);
918
+ }
919
+ };
920
+ }
921
+ }), ao = {
922
+ key: 0,
923
+ class: "tek-grid-column-aggregation"
924
+ };
925
+ function ro(e, o, t, l, d, u) {
926
+ const r = T("tek-grid-indentation"), h = T("tek-grid-column-filter"), w = T("zd-grid-column-header"), g = T("zd-grid-header-row");
927
+ return N(), V(g, {
928
+ name: e.name,
929
+ selectable: e.selectable,
930
+ headerBackground: e.headerBackground,
931
+ showSelectAll: e.showSelectAll,
932
+ allselectedState: e.allselectedState,
933
+ visibleColumns: e.visibleColumns,
934
+ dragColumns: e.dragColumns,
935
+ headerCellTextColor: e.headerCellTextColor,
936
+ resizeColumns: e.resizeColumns,
937
+ getSortIcon: e.getSortIcon,
938
+ toggleSort: e.toggleSort,
939
+ sortBy: e.sortBy,
940
+ tableColumns: e.tableColumns,
941
+ isSorted: e.isSorted,
942
+ disableCheckbox: e.disableCheckbox,
943
+ onSelectAllClick: e.selectAllClick
944
+ }, {
945
+ default: $(({ column: k, index: f, isHovering: y }) => [
946
+ E(w, {
947
+ cssStyle: {
948
+ color: e.headerCellTextColor,
949
+ width: e.calcWidth(k)
950
+ },
951
+ action: k.type === "action",
952
+ overflow: k.overflow,
953
+ helperText: k.helperText,
954
+ label: k.label,
955
+ columnAlign: k.align,
956
+ orderIndex: e.findOrderIndex(e.sortBy, k),
957
+ isSortable: e.sortable && k.sortable,
958
+ resizeColumns: e.resizeColumns,
959
+ sortIcon: e.getSortIcon(e.tableColumns[f]),
960
+ isSorted: e.isSorted(e.tableColumns[f]),
961
+ isHovering: y,
962
+ onClick: (m) => e.toggleSort(e.tableColumns[f]),
963
+ onResizeMousedown: (m) => e.resizeMousedown(k, m),
964
+ onResizeClick: o[0] || (o[0] = (m) => e.resizeClick(m))
965
+ }, mt({
966
+ label: $(() => [
967
+ k.aggregation ? (N(), B("span", ao, "(" + Y(e.$t(`TEKGRID_AGGREGATION_${k.aggregation}`)) + ") ", 1)) : R("", !0)
968
+ ]),
969
+ _: 2
970
+ }, [
971
+ f === 0 ? {
972
+ name: "prepend",
973
+ fn: $(() => [
974
+ E(r, {
975
+ level: e.level,
976
+ "show-divider": !1
977
+ }, null, 8, ["level"])
978
+ ]),
979
+ key: "0"
980
+ } : void 0,
981
+ e.showFilterButton(k) ? {
982
+ name: "append",
983
+ fn: $(({ isHovering: m }) => [
984
+ E(h, {
985
+ modelValue: e.modelValue[k.name],
986
+ hasFilterData: e.columnHasFilter(k.name),
987
+ column: k,
988
+ instanceName: e.instanceName,
989
+ filterRelationsDatasource: e.filterRelationsDatasource,
990
+ filterOperationsDatasource: e.filterOperationsDatasource,
991
+ isHovering: m,
992
+ multiple: !!e.filterRelationsDatasource && !!e.filterOperationsDatasource,
993
+ "onUpdate:modelValue": (D) => e.updateModelValue(k.name, D)
994
+ }, null, 8, ["modelValue", "hasFilterData", "column", "instanceName", "filterRelationsDatasource", "filterOperationsDatasource", "isHovering", "multiple", "onUpdate:modelValue"])
995
+ ]),
996
+ key: "1"
997
+ } : void 0
998
+ ]), 1032, ["cssStyle", "action", "overflow", "helperText", "label", "columnAlign", "orderIndex", "isSortable", "resizeColumns", "sortIcon", "isSorted", "isHovering", "onClick", "onResizeMousedown"])
999
+ ]),
1000
+ _: 1
1001
+ }, 8, ["name", "selectable", "headerBackground", "showSelectAll", "allselectedState", "visibleColumns", "dragColumns", "headerCellTextColor", "resizeColumns", "getSortIcon", "toggleSort", "sortBy", "tableColumns", "isSorted", "disableCheckbox", "onSelectAllClick"]);
1002
+ }
1003
+ const io = /* @__PURE__ */ W(so, [["render", ro]]);
1004
+ var ot, Ne;
1005
+ ot = [qt];
1006
+ class me {
1007
+ constructor(o) {
1008
+ P(this, "modal");
1009
+ P(this, "columnData", {});
1010
+ P(this, "fixedColumns", []);
1011
+ P(this, "visibleColumns", []);
1012
+ P(this, "groupedColumns", []);
1013
+ P(this, "otherColumns", []);
1014
+ P(this, "aggregationData", []);
1015
+ P(this, "selectedColumnNames", []);
1016
+ P(this, "searchValue", "");
1017
+ P(this, "showGroups", !0);
1018
+ P(this, "selectedColumnsAlignment");
1019
+ P(this, "selectedColumnsAggregation");
1020
+ P(this, "iterableComponent");
1021
+ P(this, "instanceValue");
1022
+ P(this, "updatingSelect", !1);
1023
+ this.modal = o;
1024
+ }
1025
+ updateArrays() {
1026
+ this.fixedColumns = [], this.visibleColumns = [], this.groupedColumns = [], this.otherColumns = [], Object.keys(this.columnData).forEach((o) => {
1027
+ const t = this.columnData[o];
1028
+ this.instanceValue && this.instanceValue.ignoreColumns.indexOf(t.name) === -1 && (t.grouped ? this.groupedColumns.push(t) : t.fixed ? this.fixedColumns.push(t) : t.isVisible ? this.visibleColumns.push(t) : this.otherColumns.push(t));
1029
+ });
1030
+ }
1031
+ set instance(o) {
1032
+ this.instanceValue = o, this.iterableComponent = o.iterableComponent, this.showGroups = o.iterableComponent instanceof Te, this.aggregationData = o.getAggregationSelectData(), this.columnData = {}, this.iterableComponent.columns.forEach((t) => {
1033
+ this.columnData[t.name] = {
1034
+ name: t.name,
1035
+ label: t.label,
1036
+ fixed: t.fixed,
1037
+ isVisible: t.isVisible,
1038
+ align: t.align,
1039
+ grouped: t.grouped || !1,
1040
+ groupOpened: t.groupOpened || !1,
1041
+ aggregation: t.aggregation,
1042
+ aggregationText: this.getAggregationText(t.aggregation),
1043
+ selected: !1
1044
+ };
1045
+ }), this.updateArrays(), this.selectedColumnNames = [];
1046
+ }
1047
+ getAggregationText(o) {
1048
+ let t = "";
1049
+ if (o) {
1050
+ const l = this.aggregationData.findIndex((d) => d.value === o);
1051
+ l !== -1 && (t = ` (${this.aggregationData[l].text})`);
1052
+ }
1053
+ return t;
1054
+ }
1055
+ columnInSearch(o) {
1056
+ return !this.searchValue || ee.normalize(o.label).indexOf(ee.normalize(this.searchValue)) !== -1;
1057
+ }
1058
+ get fixedColumnData() {
1059
+ return this.fixedColumns.filter(this.columnInSearch.bind(this));
1060
+ }
1061
+ set fixedColumnData(o) {
1062
+ }
1063
+ get visibleColumnData() {
1064
+ return this.visibleColumns.filter(this.columnInSearch.bind(this));
1065
+ }
1066
+ set visibleColumnData(o) {
1067
+ }
1068
+ get groupedColumnData() {
1069
+ return this.groupedColumns.filter(this.columnInSearch.bind(this));
1070
+ }
1071
+ set groupedColumnData(o) {
1072
+ }
1073
+ get otherColumnData() {
1074
+ return this.otherColumns.filter(this.columnInSearch.bind(this));
1075
+ }
1076
+ set otherColumnData(o) {
1077
+ }
1078
+ get hasSelectedColumn() {
1079
+ return this.selectedColumnNames.length > 0;
1080
+ }
1081
+ get hasNoSelectedColumn() {
1082
+ return !this.hasSelectedColumn;
1083
+ }
1084
+ get detailColumnName() {
1085
+ const o = this.selectedColumnNames.length ? this.selectedColumnNames.join(", ") : De.translate("TEKGRID_SELECT_COLUMN");
1086
+ return `${De.translate("TEKGRID_DETAILS_FOR")} ${o}`;
1087
+ }
1088
+ get hasNoFixedColumns() {
1089
+ return this.fixedColumns.length === 0;
1090
+ }
1091
+ get hasNoVisibleColumns() {
1092
+ return this.visibleColumns.length === 0;
1093
+ }
1094
+ get hasNoGroupedColumns() {
1095
+ return this.groupedColumns.length === 0;
1096
+ }
1097
+ get hasNoOtherColumns() {
1098
+ return this.otherColumns.length === 0;
1099
+ }
1100
+ get hasNoSingleSelection() {
1101
+ return this.selectedColumnNames.length !== 1;
1102
+ }
1103
+ get selectedColumnLabel() {
1104
+ return this.selectedColumnNames.length === 1 ? this.columnData[this.selectedColumnNames[0]].label : "";
1105
+ }
1106
+ set selectedColumnLabel(o) {
1107
+ this.selectedColumnNames.length === 1 && (this.columnData[this.selectedColumnNames[0]].label = o);
1108
+ }
1109
+ getSameValue(o) {
1110
+ return this.selectedColumnNames.length > 0 && this.selectedColumnNames.every(
1111
+ (l) => this.columnData[l][o] === this.columnData[this.selectedColumnNames[0]][o]
1112
+ ) ? this.columnData[this.selectedColumnNames[0]][o] : void 0;
1113
+ }
1114
+ setSameValue(o, t) {
1115
+ this.selectedColumnNames.forEach((l) => {
1116
+ this.columnData[l][o] = t;
1117
+ });
1118
+ }
1119
+ get groupInSelection() {
1120
+ return this.hasNoSelectedColumn || this.selectedColumnNames.some((o) => this.columnData[o].grouped);
1121
+ }
1122
+ get notGroupInSelection() {
1123
+ return this.hasNoSelectedColumn || this.selectedColumnNames.some((o) => !this.columnData[o].grouped);
1124
+ }
1125
+ get selectedColumnGroupOpened() {
1126
+ return this.getSameValue("groupOpened");
1127
+ }
1128
+ set selectedColumnGroupOpened(o) {
1129
+ this.setSameValue("groupOpened", o);
1130
+ }
1131
+ onShowModal() {
1132
+ ["tekGridColumnsOptionsColumnAlignment", "tekGridColumnsOptionsColumnAggregation"].forEach((t) => {
1133
+ const l = ge.getInstance(t);
1134
+ l.value = "";
1135
+ });
1136
+ }
1137
+ selectMounted({ component: o }) {
1138
+ this.updatingSelect = !0, o.name === "tekGridColumnsOptionsColumnAlignment" ? o.value = this.selectedColumnsAlignment : o.name === "tekGridColumnsOptionsColumnAggregation" && (o.value = this.selectedColumnsAggregation), setTimeout(() => {
1139
+ this.updatingSelect = !1;
1140
+ }, 0);
1141
+ }
1142
+ selectChange({ component: o }) {
1143
+ this.updatingSelect || (o.name === "tekGridColumnsOptionsColumnAlignment" ? this.setSameValue("align", o.value) : (this.setSameValue("aggregation", o.value), this.setSameValue("aggregationText", this.getAggregationText(o.value))));
1144
+ }
1145
+ updateSelects() {
1146
+ this.selectedColumnsAlignment = this.updateSelect("align"), this.selectedColumnsAggregation = this.updateSelect("aggregation");
1147
+ }
1148
+ updateSelect(o) {
1149
+ this.updatingSelect = !0;
1150
+ const t = this.getSameValue(o), l = {
1151
+ align: "tekGridColumnsOptionsColumnAlignment",
1152
+ aggregation: "tekGridColumnsOptionsColumnAggregation"
1153
+ }, d = ge.getInstances(l[o]);
1154
+ return d[0] && (d[0].value = t), setTimeout(() => {
1155
+ this.updatingSelect = !1;
1156
+ }, 0), t;
1157
+ }
1158
+ columnRemoveClick(o) {
1159
+ o.isVisible = !1, this.selectedColumnNames.splice(this.selectedColumnNames.indexOf(o.name), 1), this.otherColumns.push(o);
1160
+ }
1161
+ columnFixedRemoveClick({ element: o }) {
1162
+ const t = o == null ? void 0 : o.getAttribute("columnname");
1163
+ if (t) {
1164
+ const l = this.columnData[t];
1165
+ this.columnRemoveClick(l), this.fixedColumns.splice(this.fixedColumns.indexOf(l), 1);
1166
+ }
1167
+ }
1168
+ columnVisibleRemoveClick({ element: o }) {
1169
+ const t = o == null ? void 0 : o.getAttribute("columnname");
1170
+ if (t) {
1171
+ const l = this.columnData[t];
1172
+ this.columnRemoveClick(l), this.visibleColumns.splice(this.visibleColumns.indexOf(l), 1);
1173
+ }
1174
+ }
1175
+ columnGroupedRemoveClick({ element: o }) {
1176
+ const t = o == null ? void 0 : o.getAttribute("columnname");
1177
+ if (t) {
1178
+ const l = this.columnData[t];
1179
+ this.columnRemoveClick(l), this.groupedColumns.splice(this.groupedColumns.indexOf(l), 1);
1180
+ }
1181
+ }
1182
+ isMacPlatform() {
1183
+ return /Mac/.test(navigator.platform);
1184
+ }
1185
+ isMobilePlatform() {
1186
+ return /iPhone|iPad|Android/.test(navigator.platform);
1187
+ }
1188
+ columnClick({ element: o, event: t }) {
1189
+ const l = o.getAttribute("columnname");
1190
+ if (l) {
1191
+ const d = t;
1192
+ this.isMacPlatform() && d.metaKey || d.ctrlKey || this.isMobilePlatform() ? this.columnData[l].selected = !this.columnData[l].selected : Object.keys(this.columnData).forEach((h) => {
1193
+ const w = this.columnData[h];
1194
+ w.selected = w.name === l;
1195
+ });
1196
+ const r = this.fixedColumns.concat(this.visibleColumns).concat(this.groupedColumns).concat(this.otherColumns);
1197
+ this.selectedColumnNames = r.filter((h) => h.selected).map((h) => h.name), this.updateSelects();
1198
+ }
1199
+ }
1200
+ removeFromSourceList(o) {
1201
+ const t = this.columnData[o], l = this.fixedColumns.indexOf(t);
1202
+ if (l !== -1)
1203
+ this.fixedColumns.splice(l, 1);
1204
+ else {
1205
+ const d = this.visibleColumns.indexOf(t);
1206
+ if (d !== -1)
1207
+ this.visibleColumns.splice(d, 1);
1208
+ else {
1209
+ const u = this.groupedColumns.indexOf(t);
1210
+ if (u !== -1)
1211
+ this.groupedColumns.splice(u, 1);
1212
+ else {
1213
+ const r = this.otherColumns.indexOf(t);
1214
+ r !== -1 && this.otherColumns.splice(r, 1);
1215
+ }
1216
+ }
1217
+ }
1218
+ }
1219
+ onDragEnd(o) {
1220
+ const t = o.item.getAttribute("columnname");
1221
+ this.selectedColumnNames.indexOf(t) === -1 && (this.selectedColumnNames = [t], this.updateSelects(), setTimeout(() => {
1222
+ Object.keys(this.columnData).forEach((l) => {
1223
+ const d = this.columnData[l];
1224
+ d.selected = d.name === t;
1225
+ });
1226
+ })), this.selectedColumnNames.forEach((l, d) => {
1227
+ const u = o.newIndex + d;
1228
+ if (l) {
1229
+ this.removeFromSourceList(l);
1230
+ const r = this.columnData[l];
1231
+ o.to.id === "tekGridColumnsOptionsFixedColumns" ? (r.fixed = !0, r.isVisible = !0, r.grouped = !1, r.groupOpened = !1, this.fixedColumns.splice(u, 0, r)) : o.to.id === "tekGridColumnsOptionsVisibleColumns" ? (r.fixed = !1, r.isVisible = !0, r.grouped = !1, r.groupOpened = !1, this.visibleColumns.splice(u, 0, r)) : o.to.id === "tekGridColumnsOptionsOtherColumns" ? (r.fixed = !1, r.isVisible = !1, r.grouped = !1, r.groupOpened = !1, this.otherColumns.splice(u, 0, r)) : o.to.id === "tekGridColumnsOptionsGroupedColumns" && (r.fixed = !1, r.isVisible = !0, r.grouped = !0, r.aggregation = void 0, r.aggregationText = "", this.groupedColumns.splice(u, 0, r));
1232
+ }
1233
+ });
1234
+ }
1235
+ columnContainerMounted({ element: o }) {
1236
+ o && $e.create(o, {
1237
+ handle: ".tek-grid-column-option-box",
1238
+ group: "column-container",
1239
+ filter: ".no-data, .tek-grid-column-option-grouped-true",
1240
+ onEnd: this.onDragEnd.bind(this)
1241
+ });
1242
+ }
1243
+ selectAll({ component: o }) {
1244
+ let t;
1245
+ o.name === "tekGridColumnsOptionsFixedSelectAll" ? t = this.fixedColumns : o.name === "tekGridColumnsOptionsVisibleSelectAll" ? t = this.visibleColumns : o.name === "tekGridColumnsOptionsOtherSelectAll" ? t = this.otherColumns : t = this.groupedColumns, this.selectedColumnNames = t.map((l) => l.name), Object.keys(this.columnData).forEach((l) => {
1246
+ const d = this.columnData[l];
1247
+ d.selected = this.selectedColumnNames.indexOf(d.name) !== -1;
1248
+ });
1249
+ }
1250
+ cancelChanges() {
1251
+ this.modal.hide();
1252
+ }
1253
+ applyChanges({ event: o, element: t }) {
1254
+ const l = this.iterableComponent.columns.filter(
1255
+ (u) => this.instanceValue && this.instanceValue.ignoreColumns.indexOf(u.name) !== -1
1256
+ ), d = this.groupedColumns.concat(this.fixedColumns).concat(this.visibleColumns).concat(this.otherColumns).concat(l);
1257
+ if (this.iterableComponent) {
1258
+ this.iterableComponent.columns = d.map((h) => {
1259
+ const w = this.iterableComponent.columns.findIndex((k) => k.name === h.name), g = this.iterableComponent.columns[w];
1260
+ return g.fixed = h.fixed, g.isVisible = h.isVisible, g.grouped = h.grouped, g.groupOpened = h.groupOpened, g.label = h.label, g.align = h.align, g.aggregation = h.aggregation, g;
1261
+ });
1262
+ const { datasource: u } = this.iterableComponent, r = u.order.filter((h) => {
1263
+ const w = h.split(".")[0];
1264
+ return this.groupedColumns.findIndex((g) => g.name === w) === -1;
1265
+ });
1266
+ u.order = this.groupedColumns.map((h) => `${h.name}.asc`).concat(r), this.iterableComponent.changeLayout(o, t);
1267
+ }
1268
+ this.modal.hide();
1269
+ }
1270
+ }
1271
+ Ne = Le(null), me = ze(Ne, 0, "TekGridColumnsOptionsController", ot, me), Re(Ne, 1, me);
1272
+ const G = class G {
1273
+ static show(o) {
1274
+ G.modal || (G.modal = Lt.create(G.modalDef), Ge.addController(G.controllerName, me, [
1275
+ G.modal
1276
+ ]));
1277
+ const t = Ge.getInstance(G.controllerName);
1278
+ t.instance = o, G.modal.show();
1279
+ }
1280
+ static hide() {
1281
+ G.modal && G.modal.hide();
1282
+ }
1283
+ static callOnShowModal() {
1284
+ const o = Ge.getInstance(G.controllerName);
1285
+ o && o.onShowModal();
1286
+ }
1287
+ };
1288
+ P(G, "controllerName", `TekGridColumnsOptionsController_${Date.now()}`), P(G, "modalDef", {
1289
+ name: "tekGridColumnsOptionsModal",
1290
+ title: "",
1291
+ persistent: !0,
1292
+ grid: {
1293
+ sm: 11,
1294
+ md: 9
1295
+ },
1296
+ children: [
1297
+ {
1298
+ name: "tekGridColumnsOptionsCloseButtonContainer",
1299
+ component: "ZdContainer",
1300
+ cssClass: "zd-pa-0 zd-mb-6 zd-display-flex",
1301
+ children: [
1302
+ {
1303
+ name: "tekGridColumnsOptionsTitleText",
1304
+ component: "ZdText",
1305
+ text: "TEKGRID_COLUMNS_OPTIONS",
1306
+ cssClass: "zd-theme-font-title"
1307
+ },
1308
+ {
1309
+ name: "tekGridColumnsOptionsFilterSpacer",
1310
+ component: "VSpacer"
1311
+ },
1312
+ {
1313
+ name: "tekGridColumnsOptionsCloseModalButton",
1314
+ component: "ZdModalCloseButton",
1315
+ small: !0,
1316
+ modalName: "tekGridColumnsOptionsModal"
1317
+ }
1318
+ ]
1319
+ },
1320
+ {
1321
+ name: "tekGridColumnsOptionsSearchRow",
1322
+ component: "ZdRow",
1323
+ children: [
1324
+ {
1325
+ name: "tekGridColumnsOptionsSearchCol",
1326
+ component: "ZdCol",
1327
+ cols: 12,
1328
+ children: [
1329
+ {
1330
+ name: "tekGridColumnsOptionsSearchInput",
1331
+ component: "ZdTextInput",
1332
+ showLabel: !1,
1333
+ showHelper: !1,
1334
+ placeholder: "SEARCH",
1335
+ appendIcon: "magnify",
1336
+ value: `{{${G.controllerName}.searchValue}}`
1337
+ }
1338
+ ]
1339
+ }
1340
+ ]
1341
+ },
1342
+ {
1343
+ name: "tekGridColumnsOptionsFixedRow",
1344
+ component: "ZdRow",
1345
+ children: [
1346
+ {
1347
+ name: "tekGridColumnsOptionsFixedCol",
1348
+ component: "ZdCol",
1349
+ cols: 12,
1350
+ cssClass: "tek-grid-column-option-container-col",
1351
+ children: [
1352
+ {
1353
+ name: "tekGridColumnsOptionsFixedLabel",
1354
+ component: "ZdText",
1355
+ text: "TEKGRID_FIXED_COLUMNS",
1356
+ cssClass: "tek-grid-column-option-label"
1357
+ },
1358
+ {
1359
+ name: "tekGridColumnsOptionsFixedSelectAll",
1360
+ component: "ZdText",
1361
+ text: "TEKGRID_SELECT_ALL",
1362
+ cssClass: "tek-grid-column-option-select-all",
1363
+ events: {
1364
+ click: `{{${G.controllerName}.selectAll}}`
1365
+ }
1366
+ },
1367
+ {
1368
+ name: "tekGridColumnsOptionsFixedDropHere",
1369
+ component: "ZdText",
1370
+ text: "TEKGRID_DROP_COLUMNS",
1371
+ cssClass: "tek-grid-column-option-drop-here",
1372
+ isVisible: `{{${G.controllerName}.hasNoFixedColumns}}`
1373
+ },
1374
+ {
1375
+ name: "tekGridColumnsOptionsFixedColumns",
1376
+ component: "TekIterableComponentRender",
1377
+ id: "tekGridColumnsOptionsFixedColumns",
1378
+ cssClass: "tek-grid-column-option-container",
1379
+ datasource: {
1380
+ uniqueKey: "name",
1381
+ data: `{{${G.controllerName}.fixedColumnData}}`
1382
+ },
1383
+ noDataSlot: [],
1384
+ events: {
1385
+ onMounted: `{{${G.controllerName}.columnContainerMounted}}`
1386
+ },
1387
+ componentMetadata: {
1388
+ name: "tekGridColumnsOptionsFixedColumn_<<row.name>>",
1389
+ component: "ZdTag",
1390
+ columnName: "<<row.name>>",
1391
+ cssClass: "tek-grid-column-option-box zd-elevation-1 tek-grid-column-option-selected-<<row.selected>>",
1392
+ tag: "div",
1393
+ children: [
1394
+ {
1395
+ name: "tekGridColumnsOptionsFixedColumnText_<<row.name>>",
1396
+ columnName: "<<row.name>>",
1397
+ component: "ZdText",
1398
+ text: "<<row.label>><<row.aggregationText>>"
1399
+ },
1400
+ {
1401
+ name: "tekGridColumnsOptionsFixedColumnRemove_<<row.name>>",
1402
+ columnName: "<<row.name>>",
1403
+ component: "ZdIcon",
1404
+ iconName: "close",
1405
+ events: {
1406
+ click: `{{${G.controllerName}.columnFixedRemoveClick}}`
1407
+ }
1408
+ }
1409
+ ],
1410
+ events: {
1411
+ click: `{{${G.controllerName}.columnClick}}`
1412
+ }
1413
+ }
1414
+ }
1415
+ ]
1416
+ }
1417
+ ]
1418
+ },
1419
+ {
1420
+ name: "tekGridColumnsOptionsVisibleRow",
1421
+ component: "ZdRow",
1422
+ children: [
1423
+ {
1424
+ name: "tekGridColumnsOptionsVisibleCol",
1425
+ component: "ZdCol",
1426
+ cols: 12,
1427
+ cssClass: "tek-grid-column-option-container-col",
1428
+ children: [
1429
+ {
1430
+ name: "tekGridColumnsOptionsVisibleLabel",
1431
+ component: "ZdText",
1432
+ text: "TEKGRID_VISIBLE_COLUMNS",
1433
+ cssClass: "tek-grid-column-option-label"
1434
+ },
1435
+ {
1436
+ name: "tekGridColumnsOptionsVisibleSelectAll",
1437
+ component: "ZdText",
1438
+ text: "TEKGRID_SELECT_ALL",
1439
+ cssClass: "tek-grid-column-option-select-all",
1440
+ events: {
1441
+ click: `{{${G.controllerName}.selectAll}}`
1442
+ }
1443
+ },
1444
+ {
1445
+ name: "tekGridColumnsOptionsVisibleDropHere",
1446
+ component: "ZdText",
1447
+ text: "TEKGRID_DROP_COLUMNS",
1448
+ cssClass: "tek-grid-column-option-drop-here",
1449
+ isVisible: `{{${G.controllerName}.hasNoVisibleColumns}}`
1450
+ },
1451
+ {
1452
+ name: "tekGridColumnsOptionsVisibleColumns",
1453
+ component: "TekIterableComponentRender",
1454
+ id: "tekGridColumnsOptionsVisibleColumns",
1455
+ cssClass: "tek-grid-column-option-container",
1456
+ datasource: {
1457
+ uniqueKey: "name",
1458
+ data: `{{${G.controllerName}.visibleColumnData}}`
1459
+ },
1460
+ noDataSlot: [],
1461
+ events: {
1462
+ onMounted: `{{${G.controllerName}.columnContainerMounted}}`
1463
+ },
1464
+ componentMetadata: {
1465
+ name: "tekGridColumnsOptionsVisibleColumn_<<row.name>>",
1466
+ component: "ZdTag",
1467
+ columnName: "<<row.name>>",
1468
+ cssClass: "tek-grid-column-option-box zd-elevation-1 tek-grid-column-option-selected-<<row.selected>>",
1469
+ tag: "div",
1470
+ children: [
1471
+ {
1472
+ name: "tekGridColumnsOptionsVisibleColumnText_<<row.name>>",
1473
+ columnName: "<<row.name>>",
1474
+ component: "ZdText",
1475
+ text: "<<row.label>><<row.aggregationText>>"
1476
+ },
1477
+ {
1478
+ name: "tekGridColumnsOptionsVisibleColumnRemove_<<row.name>>",
1479
+ columnName: "<<row.name>>",
1480
+ component: "ZdIcon",
1481
+ iconName: "close",
1482
+ events: {
1483
+ click: `{{${G.controllerName}.columnVisibleRemoveClick}}`
1484
+ }
1485
+ }
1486
+ ],
1487
+ events: {
1488
+ click: `{{${G.controllerName}.columnClick}}`
1489
+ }
1490
+ }
1491
+ }
1492
+ ]
1493
+ }
1494
+ ]
1495
+ },
1496
+ {
1497
+ name: "tekGridColumnsOptionsGroupedRow",
1498
+ component: "ZdRow",
1499
+ isVisible: `{{${G.controllerName}.showGroups}}`,
1500
+ children: [
1501
+ {
1502
+ name: "tekGridColumnsOptionsGroupedCol",
1503
+ component: "ZdCol",
1504
+ cssClass: "tek-grid-column-option-container-col",
1505
+ cols: 12,
1506
+ children: [
1507
+ {
1508
+ name: "tekGridColumnsOptionsGroupedLabel",
1509
+ component: "ZdText",
1510
+ text: "TEKGRID_GROUPED_COLUMNS",
1511
+ cssClass: "tek-grid-column-option-label"
1512
+ },
1513
+ {
1514
+ name: "tekGridColumnsOptionsGroupedSelectAll",
1515
+ component: "ZdText",
1516
+ text: "TEKGRID_SELECT_ALL",
1517
+ cssClass: "tek-grid-column-option-select-all",
1518
+ events: {
1519
+ click: `{{${G.controllerName}.selectAll}}`
1520
+ }
1521
+ },
1522
+ {
1523
+ name: "tekGridColumnsOptionsGroupedDropHere",
1524
+ component: "ZdText",
1525
+ text: "TEKGRID_DROP_COLUMNS",
1526
+ cssClass: "tek-grid-column-option-drop-here",
1527
+ isVisible: `{{${G.controllerName}.hasNoGroupedColumns}}`
1528
+ },
1529
+ {
1530
+ name: "tekGridColumnsOptionsGroupedColumns",
1531
+ component: "TekIterableComponentRender",
1532
+ id: "tekGridColumnsOptionsGroupedColumns",
1533
+ cssClass: "tek-grid-column-option-container",
1534
+ datasource: {
1535
+ uniqueKey: "name",
1536
+ data: `{{${G.controllerName}.groupedColumnData}}`
1537
+ },
1538
+ noDataSlot: [],
1539
+ events: {
1540
+ onMounted: `{{${G.controllerName}.columnContainerMounted}}`
1541
+ },
1542
+ componentMetadata: {
1543
+ name: "tekGridColumnsOptionsGroupedColumn_<<row.name>>",
1544
+ component: "ZdTag",
1545
+ columnName: "<<row.name>>",
1546
+ cssClass: "tek-grid-column-option-box zd-elevation-1 tek-grid-column-option-selected-<<row.selected>>",
1547
+ tag: "div",
1548
+ children: [
1549
+ {
1550
+ name: "tekGridColumnsOptionsGroupedColumnText_<<row.name>>",
1551
+ columnName: "<<row.name>>",
1552
+ component: "ZdText",
1553
+ text: "<<row.label>><<row.aggregationText>>"
1554
+ },
1555
+ {
1556
+ name: "tekGridColumnsOptionsGroupedColumnRemove_<<row.name>>",
1557
+ columnName: "<<row.name>>",
1558
+ component: "ZdIcon",
1559
+ iconName: "close",
1560
+ events: {
1561
+ click: `{{${G.controllerName}.columnGroupedRemoveClick}}`
1562
+ }
1563
+ }
1564
+ ],
1565
+ events: {
1566
+ click: `{{${G.controllerName}.columnClick}}`
1567
+ }
1568
+ }
1569
+ }
1570
+ ]
1571
+ }
1572
+ ]
1573
+ },
1574
+ {
1575
+ name: "tekGridColumnsOptionsOtherRow",
1576
+ component: "ZdRow",
1577
+ children: [
1578
+ {
1579
+ name: "tekGridColumnsOptionsOtherCol",
1580
+ component: "ZdCol",
1581
+ cssClass: "tek-grid-column-option-container-col",
1582
+ cols: 12,
1583
+ children: [
1584
+ {
1585
+ name: "tekGridColumnsOptionsOtherLabel",
1586
+ component: "ZdText",
1587
+ text: "TEKGRID_OTHER_COLUMNS",
1588
+ cssClass: "tek-grid-column-option-label"
1589
+ },
1590
+ {
1591
+ name: "tekGridColumnsOptionsOtherSelectAll",
1592
+ component: "ZdText",
1593
+ text: "TEKGRID_SELECT_ALL",
1594
+ cssClass: "tek-grid-column-option-select-all",
1595
+ events: {
1596
+ click: `{{${G.controllerName}.selectAll}}`
1597
+ }
1598
+ },
1599
+ {
1600
+ name: "tekGridColumnsOptionsOtherDropHere",
1601
+ component: "ZdText",
1602
+ text: "TEKGRID_DROP_COLUMNS",
1603
+ cssClass: "tek-grid-column-option-drop-here",
1604
+ isVisible: `{{${G.controllerName}.hasNoOtherColumns}}`
1605
+ },
1606
+ {
1607
+ name: "tekGridColumnsOptionsOtherColumns",
1608
+ component: "TekIterableComponentRender",
1609
+ id: "tekGridColumnsOptionsOtherColumns",
1610
+ cssClass: "tek-grid-column-option-container",
1611
+ datasource: {
1612
+ uniqueKey: "name",
1613
+ data: `{{${G.controllerName}.otherColumnData}}`
1614
+ },
1615
+ noDataSlot: [],
1616
+ events: {
1617
+ onMounted: `{{${G.controllerName}.columnContainerMounted}}`
1618
+ },
1619
+ componentMetadata: {
1620
+ name: "tekGridColumnsOptionsOtherColumn_<<row.name>>",
1621
+ component: "ZdText",
1622
+ columnName: "<<row.name>>",
1623
+ text: "<<row.label>><<row.aggregationText>>",
1624
+ cssClass: "tek-grid-column-option-box zd-elevation-1 tek-grid-column-option-selected-<<row.selected>>",
1625
+ events: {
1626
+ click: `{{${G.controllerName}.columnClick}}`
1627
+ }
1628
+ }
1629
+ }
1630
+ ]
1631
+ }
1632
+ ]
1633
+ },
1634
+ {
1635
+ name: "tekGridColumnsOptionsDetailColumnName",
1636
+ component: "ZdText",
1637
+ cssClass: "tek-grid-column-option-detail-name",
1638
+ text: `{{${G.controllerName}.detailColumnName}}`,
1639
+ grid: {
1640
+ xs: 12
1641
+ }
1642
+ },
1643
+ {
1644
+ name: "tekGridColumnsOptionsDetailRow",
1645
+ component: "ZdRow",
1646
+ children: [
1647
+ {
1648
+ name: "tekGridColumnsOptionsDetailCol",
1649
+ component: "ZdCol",
1650
+ cols: 12,
1651
+ children: [
1652
+ {
1653
+ name: "tekGridColumnsOptionsDetailForm",
1654
+ component: "ZdForm",
1655
+ cssClass: "tek-grid-column-option-detail-form",
1656
+ children: [
1657
+ {
1658
+ name: "tekGridColumnsOptionsColumnLabel",
1659
+ component: "ZdTextInput",
1660
+ label: "TEKGRID_COLUMN_LABEL",
1661
+ showHelper: !1,
1662
+ clearable: !1,
1663
+ disabled: `{{${G.controllerName}.hasNoSingleSelection}}`,
1664
+ value: `{{${G.controllerName}.selectedColumnLabel}}`,
1665
+ grid: {
1666
+ xs: 12,
1667
+ md: 5
1668
+ }
1669
+ },
1670
+ {
1671
+ name: "tekGridColumnsOptionsColumnAlignment",
1672
+ component: "ZdSelect",
1673
+ autocomplete: !1,
1674
+ label: "TEKGRID_COLUMN_ALIGNMENT",
1675
+ disabled: `{{${G.controllerName}.hasNoSelectedColumn}}`,
1676
+ showHelper: !1,
1677
+ clearable: !1,
1678
+ grid: {
1679
+ xs: 6,
1680
+ md: 2
1681
+ },
1682
+ dataText: "text",
1683
+ dataValue: "value",
1684
+ datasource: {
1685
+ data: [
1686
+ { text: "TEKGRID_LEFT", value: "left" },
1687
+ { text: "TEKGRID_CENTER", value: "center" },
1688
+ { text: "TEKGRID_RIGHT", value: "right" }
1689
+ ],
1690
+ translate: "text"
1691
+ },
1692
+ events: {
1693
+ change: `{{${G.controllerName}.selectChange}}`,
1694
+ onMounted: `{{${G.controllerName}.selectMounted}}`
1695
+ }
1696
+ },
1697
+ {
1698
+ name: "tekGridColumnsOptionsColumnAggregation",
1699
+ component: "ZdSelect",
1700
+ isVisible: `{{${G.controllerName}.showGroups}}`,
1701
+ autocomplete: !1,
1702
+ label: "TEKGRID_COLUMN_AGGREGATION",
1703
+ showHelper: !1,
1704
+ disabled: `{{${G.controllerName}.groupInSelection}}`,
1705
+ dataText: "text",
1706
+ dataValue: "value",
1707
+ grid: {
1708
+ xs: 6,
1709
+ md: 2
1710
+ },
1711
+ datasource: {
1712
+ data: `{{${G.controllerName}.aggregationData}}`
1713
+ },
1714
+ events: {
1715
+ change: `{{${G.controllerName}.selectChange}}`,
1716
+ onMounted: `{{${G.controllerName}.selectMounted}}`
1717
+ }
1718
+ },
1719
+ {
1720
+ name: "tekGridColumnsOptionsColumnGroupOpened",
1721
+ component: "ZdCheckbox",
1722
+ isVisible: `{{${G.controllerName}.showGroups}}`,
1723
+ cssClass: "zd-form-input-align",
1724
+ disabled: `{{${G.controllerName}.notGroupInSelection}}`,
1725
+ label: "TEKGRID_COLUMN_GROUP_OPENED",
1726
+ value: `{{${G.controllerName}.selectedColumnGroupOpened}}`,
1727
+ grid: {
1728
+ xs: 6,
1729
+ md: 3
1730
+ }
1731
+ }
1732
+ ]
1733
+ }
1734
+ ]
1735
+ }
1736
+ ]
1737
+ },
1738
+ {
1739
+ name: "tekGridColumnsOptionsDetailFooter",
1740
+ component: "ZdFooter",
1741
+ padless: !0,
1742
+ color: "transparent",
1743
+ cssClass: "zd-mt-6",
1744
+ rightSlot: [
1745
+ {
1746
+ name: "tekGridColumnsOptionsDetailCancel",
1747
+ component: "ZdButton",
1748
+ outline: !0,
1749
+ label: "TEKGRID_CANCEL",
1750
+ events: {
1751
+ click: `{{${G.controllerName}.cancelChanges}}`
1752
+ }
1753
+ },
1754
+ {
1755
+ name: "tekGridColumnsOptionsDetailApply",
1756
+ component: "ZdButton",
1757
+ label: "TEKGRID_APPLY",
1758
+ events: {
1759
+ click: `{{${G.controllerName}.applyChanges}}`
1760
+ }
1761
+ }
1762
+ ]
1763
+ }
1764
+ ],
1765
+ events: {
1766
+ onShow: () => G.callOnShowModal()
1767
+ }
1768
+ }), P(G, "modal");
1769
+ let fe = G;
1770
+ const Me = {
1771
+ ...St,
1772
+ hideGroups: {
1773
+ type: [Boolean, String],
1774
+ default: !1
1775
+ }
1776
+ }, uo = F({
1777
+ props: Me,
1778
+ inheritAttrs: !1,
1779
+ setup(e, o) {
1780
+ const { instance: t, root: l } = U(
1781
+ e,
1782
+ o,
1783
+ lt,
1784
+ Me
1785
+ ), d = Ce({ instance: t, root: l }), u = se(!1), r = se(!1), h = (y) => {
1786
+ console.warn(y);
1787
+ };
1788
+ ft(u, () => {
1789
+ !u.value || r.value || (r.value = !0, de(() => {
1790
+ const y = document.querySelector(`#${t.name}_columns_table tbody`);
1791
+ y && $e.create(y, {
1792
+ handle: ".sortHandle",
1793
+ dragClass: "tek-grid-columns-button-sortable-drag",
1794
+ onEnd: g
1795
+ });
1796
+ }));
1797
+ });
1798
+ const w = Z(() => t.iterableComponent.columns.filter((y) => y.grouped).map((y) => y.name) || []), g = (y) => {
1799
+ const m = t.iterableComponent, D = Array.from(y.srcElement.querySelectorAll("tr")).map((c) => c.getAttribute("name")), p = [], C = D.map((c) => {
1800
+ const n = m.getColumn(c);
1801
+ return n.grouped && p.push(c), n;
1802
+ }), i = m.columns.filter((c) => t.ignoreColumns.indexOf(c.name) !== -1);
1803
+ m.columns = C.concat(i), m.updateGrouping && JSON.stringify(p) !== JSON.stringify(w) && m.updateGrouping(), m.changeLayout();
1804
+ };
1805
+ return {
1806
+ ...d,
1807
+ instance: t,
1808
+ root: l,
1809
+ menuIsOpened: u,
1810
+ moreOptions: () => {
1811
+ fe.show(t);
1812
+ },
1813
+ close: () => {
1814
+ u.value = !1;
1815
+ },
1816
+ teste: h,
1817
+ mergeProps: M
1818
+ };
1819
+ }
1820
+ }), co = { class: "tek-grid-columns-button-table-wrapper zd-mb-2" }, mo = ["id"], po = { key: 0 }, go = { key: 1 }, fo = ["name"], ho = { class: "tek-grid-columns-button-column-name sortHandle" }, Co = { key: 0 }, bo = {
1821
+ key: 1,
1822
+ class: "tek-grid-columns-button-column-aggregation"
1823
+ }, yo = { class: "tek-grid-columns-button-table-footer" };
1824
+ function ko(e, o, t, l, d, u) {
1825
+ const r = T("zd-activator-wrapper"), h = T("v-tooltip"), w = T("zd-checkbox"), g = T("zd-select"), k = T("zd-button"), f = T("v-card"), y = T("v-menu");
1826
+ return N(), V(y, {
1827
+ id: e.instance.name,
1828
+ modelValue: e.menuIsOpened,
1829
+ "onUpdate:modelValue": o[2] || (o[2] = (m) => e.menuIsOpened = m),
1830
+ class: j(["zd-iterable-columns-button", "tek-grid-columns-button", e.instance.cssClass]),
1831
+ style: te(e.instance.cssStyle),
1832
+ closeOnContentClick: !1,
1833
+ "offset-y": "",
1834
+ "content-class": "zd-iterable-columns-button-options tek-grid-columns-button-options"
1835
+ }, {
1836
+ activator: $(({ props: m }) => [
1837
+ E(h, { bottom: "" }, {
1838
+ activator: $(({ props: D }) => [
1839
+ E(r, M({
1840
+ "child-props": {
1841
+ component: "ZdButton",
1842
+ name: e.instance.name,
1843
+ instanceObject: e.instance
1844
+ }
1845
+ }, e.mergeProps(m, D)), null, 16, ["child-props"])
1846
+ ]),
1847
+ default: $(() => [
1848
+ L("span", null, Y(e.$t("TEKGRID_COLUMNS")), 1)
1849
+ ]),
1850
+ _: 2
1851
+ }, 1024)
1852
+ ]),
1853
+ default: $(() => [
1854
+ E(f, { class: "zd-pa-2" }, {
1855
+ default: $(() => [
1856
+ L("div", co, [
1857
+ L("table", {
1858
+ class: "tek-grid-columns-button-table",
1859
+ id: e.instance.name + "_columns_table"
1860
+ }, [
1861
+ L("thead", null, [
1862
+ L("tr", null, [
1863
+ o[3] || (o[3] = L("th", null, null, -1)),
1864
+ L("th", null, Y(e.$t("TEKGRID_COLUMN_VISIBLE")), 1),
1865
+ e.instance.hideGroups ? R("", !0) : (N(), B("th", po, Y(e.$t("TEKGRID_COLUMN_GROUPED")), 1)),
1866
+ e.instance.hideGroups ? R("", !0) : (N(), B("th", go, Y(e.$t("TEKGRID_COLUMN_AGGREGATION")), 1))
1867
+ ])
1868
+ ]),
1869
+ L("tbody", null, [
1870
+ (N(!0), B(x, null, oe(e.instance.filteredColumns(), (m) => (N(), B("tr", {
1871
+ key: m.name,
1872
+ name: m.name
1873
+ }, [
1874
+ L("td", ho, [
1875
+ o[4] || (o[4] = L("span", null, "⦙⦙", -1)),
1876
+ ue(Y(e.$t(m.label)), 1)
1877
+ ]),
1878
+ L("td", null, [
1879
+ E(w, {
1880
+ name: e.instance.name + "_column_visible_" + m.name,
1881
+ value: m.grouped || m.isVisible,
1882
+ events: {
1883
+ change: e.instance.controller.showHideTekColumn.bind(e.instance.controller, m)
1884
+ }
1885
+ }, null, 8, ["name", "value", "events"])
1886
+ ]),
1887
+ e.instance.hideGroups ? R("", !0) : (N(), B("td", Co, [
1888
+ m.type !== "action" ? (N(), V(w, {
1889
+ key: 0,
1890
+ name: e.instance.name + "_column_grouped_" + m.name,
1891
+ value: m.grouped,
1892
+ events: {
1893
+ change: e.instance.controller.changeGroupedColumn.bind(e.instance.controller, m)
1894
+ }
1895
+ }, null, 8, ["name", "value", "events"])) : R("", !0)
1896
+ ])),
1897
+ e.instance.hideGroups ? R("", !0) : (N(), B("td", bo, [
1898
+ m.type !== "action" ? (N(), V(g, M({
1899
+ key: 0,
1900
+ name: e.instance.name + "_column_aggregation_" + m.name
1901
+ }, { ref_for: !0 }, {
1902
+ value: m.aggregation,
1903
+ disabled: m.grouped || !m.isVisible,
1904
+ events: {
1905
+ change: e.instance.controller.changeAggregationColumn.bind(e.instance.controller, m)
1906
+ },
1907
+ dataText: "text",
1908
+ dataValue: "value",
1909
+ autocomplete: !1,
1910
+ showHelper: !1,
1911
+ showLabel: !1,
1912
+ datasource: {
1913
+ data: e.instance.getAggregationSelectData()
1914
+ }
1915
+ }), null, 16, ["name"])) : R("", !0)
1916
+ ]))
1917
+ ], 8, fo))), 128))
1918
+ ])
1919
+ ], 8, mo)
1920
+ ]),
1921
+ L("div", yo, [
1922
+ E(k, {
1923
+ name: e.instance.name + "_columns_table_footer_button",
1924
+ label: "TEKGRID_MORE_OPTIONS",
1925
+ small: "",
1926
+ outline: "",
1927
+ cssClass: "zd-ma-2 zd-mr-1",
1928
+ onClick: o[0] || (o[0] = (m) => e.moreOptions())
1929
+ }, null, 8, ["name"]),
1930
+ E(k, {
1931
+ name: e.instance.name + "_columns_table_footer_close",
1932
+ label: "TEKGRID_CLOSE",
1933
+ small: "",
1934
+ cssClass: "zd-ma-2 zd-ml-1",
1935
+ onClick: o[1] || (o[1] = (m) => e.close())
1936
+ }, null, 8, ["name"])
1937
+ ])
1938
+ ]),
1939
+ _: 1
1940
+ })
1941
+ ]),
1942
+ _: 1
1943
+ }, 8, ["id", "modelValue", "class", "style"]);
1944
+ }
1945
+ const So = /* @__PURE__ */ W(uo, [["render", ko]]), Ue = {
1946
+ ...vt,
1947
+ gridName: {
1948
+ type: String,
1949
+ default: ""
1950
+ },
1951
+ grid: {
1952
+ type: [Object, String],
1953
+ default: () => {
1954
+ }
1955
+ },
1956
+ showCheckboxAll: {
1957
+ type: [Boolean, String],
1958
+ default: !1
1959
+ }
1960
+ }, vo = F({
1961
+ props: Ue,
1962
+ inheritAttrs: !1,
1963
+ setup(e, o) {
1964
+ const { instance: t, root: l } = U(
1965
+ e,
1966
+ o,
1967
+ st,
1968
+ Ue
1969
+ );
1970
+ return {
1971
+ ...Ce({ instance: t, root: l }),
1972
+ instance: t,
1973
+ root: l,
1974
+ filterClick: ({ event: r }) => {
1975
+ t.click(r);
1976
+ }
1977
+ };
1978
+ }
1979
+ });
1980
+ function wo(e, o, t, l, d, u) {
1981
+ const r = T("zd-button");
1982
+ return N(), V(r, M({
1983
+ id: "instance.name",
1984
+ name: `${e.instance.name}_name`
1985
+ }, {
1986
+ icon: !0,
1987
+ cssClass: "tek-grid-filter-button",
1988
+ iconName: "mdi-filter",
1989
+ isVisible: e.instance.grid.filterButton,
1990
+ events: {
1991
+ click: e.filterClick
1992
+ }
1993
+ }), null, 16, ["name"]);
1994
+ }
1995
+ const Oo = /* @__PURE__ */ W(vo, [["render", wo]]), Go = F({
1996
+ props: {
1997
+ showDivider: {
1998
+ type: Boolean,
1999
+ default: !0
2000
+ },
2001
+ level: {
2002
+ type: Number,
2003
+ default: 0
2004
+ },
2005
+ footer: {
2006
+ type: Boolean,
2007
+ default: !1
2008
+ }
2009
+ },
2010
+ setup() {
2011
+ return {};
2012
+ }
2013
+ });
2014
+ function No(e, o, t, l, d, u) {
2015
+ return N(!0), B(x, null, oe(e.level, (r) => (N(), B("span", {
2016
+ key: r,
2017
+ class: j([
2018
+ "tek-grid-indentation",
2019
+ {
2020
+ "tek-grid-indentation--corner": e.footer && r === e.level,
2021
+ "tek-grid-indentation--divider": e.showDivider
2022
+ }
2023
+ ])
2024
+ }, null, 2))), 128);
2025
+ }
2026
+ const Do = /* @__PURE__ */ W(Go, [["render", No]]), qe = {
2027
+ ...he
2028
+ // Zeedhi 3.0
2029
+ }, To = F({
2030
+ props: qe,
2031
+ inheritAttrs: !1,
2032
+ setup(e, o) {
2033
+ const { instance: t, root: l } = U(
2034
+ e,
2035
+ o,
2036
+ at,
2037
+ qe
2038
+ ), { applyLayout: d, getColumnElements: u, getTableWidth: r } = Nt();
2039
+ ht(() => {
2040
+ t.viewApplyLayout = k, t.viewGetCurrentLayout = f;
2041
+ });
2042
+ const h = ({ component: C }) => {
2043
+ const i = C.value;
2044
+ if (i) {
2045
+ const c = f(i);
2046
+ t.newLayout(c);
2047
+ }
2048
+ y.value = !1, C.value = "";
2049
+ }, w = () => {
2050
+ const C = t.grid.datasource;
2051
+ return C instanceof X ? C.dynamicFilter : {};
2052
+ }, g = (C) => {
2053
+ t.updateLayout(C.name, f(C.name));
2054
+ }, k = (C) => {
2055
+ const i = {
2056
+ originalDatasourceOrder: t.originalDatasourceOrder,
2057
+ originalDatasourceFilter: t.originalDatasourceFilter,
2058
+ originalColumnProps: t.originalColumnProps,
2059
+ originalDatasourceDynamicFilter: t.originalDatasourceDynamicFilter
2060
+ };
2061
+ d({ layout: C, defaultLayout: i, changeLayoutCallback: g }), y.value = !1;
2062
+ }, f = (C) => {
2063
+ const { grid: i } = t, c = r(), n = u();
2064
+ return {
2065
+ name: C,
2066
+ gridWidth: c,
2067
+ order: i.datasource.order,
2068
+ filter: i.datasource.filter,
2069
+ dynamicFilter: w(),
2070
+ columns: i.columns.map((a, b) => {
2071
+ const S = n[b];
2072
+ return {
2073
+ name: a.name,
2074
+ label: a.label,
2075
+ align: a.align,
2076
+ width: S ? window.getComputedStyle(S).width : "unset",
2077
+ minWidth: a.minWidth,
2078
+ maxWidth: a.maxWidth,
2079
+ isVisible: a.isVisible,
2080
+ fixed: a.fixed,
2081
+ grouped: a.grouped,
2082
+ groupOpened: a.groupOpened,
2083
+ aggregation: a.aggregation,
2084
+ filterHelperValue: t.getHelperValue(a)
2085
+ };
2086
+ })
2087
+ };
2088
+ }, y = se(!1), m = (C, i) => {
2089
+ t.layoutEdited ? (t.updateLayout(i, f(i)), C.stopImmediatePropagation(), y.value = !1) : t.applyLayout(i);
2090
+ }, D = (C, i) => {
2091
+ t.deleteLayout(i), C.stopImmediatePropagation();
2092
+ };
2093
+ return {
2094
+ instance: t,
2095
+ root: l,
2096
+ menuActive: y,
2097
+ confirmLayoutClick: h,
2098
+ applyOrUpdateLayout: m,
2099
+ deleteButtonClick: (C) => ({ event: i }) => {
2100
+ D(i, C);
2101
+ },
2102
+ mergeProps: M
2103
+ };
2104
+ }
2105
+ }), $o = {
2106
+ key: 0,
2107
+ class: "tek-grid-layout-item-buttons"
2108
+ };
2109
+ function Io(e, o, t, l, d, u) {
2110
+ const r = T("zd-activator-wrapper"), h = T("v-badge"), w = T("v-tooltip"), g = T("v-list-item"), k = T("zd-text-input"), f = T("zd-button"), y = T("v-list"), m = T("v-menu");
2111
+ return N(), V(m, {
2112
+ id: e.instance.name,
2113
+ name: e.instance.name,
2114
+ class: j(["tek-grid-layout-options", e.instance.cssClass]),
2115
+ style: te(e.instance.cssStyle),
2116
+ modelValue: e.menuActive,
2117
+ "onUpdate:modelValue": o[2] || (o[2] = (D) => e.menuActive = D),
2118
+ "offset-y": "",
2119
+ closeOnContentClick: !1
2120
+ }, {
2121
+ activator: $(({ props: D }) => [
2122
+ E(w, { bottom: "" }, {
2123
+ activator: $(({ props: p }) => [
2124
+ ct(E(h, {
2125
+ overlap: "",
2126
+ class: "tek-grid-layout-options-badge",
2127
+ dot: "",
2128
+ offsetX: 12,
2129
+ offsetY: 12,
2130
+ value: e.instance.layoutEdited
2131
+ }, {
2132
+ default: $(() => [
2133
+ E(r, M({ ref: "root" }, e.mergeProps(D, p), {
2134
+ "child-props": {
2135
+ component: "ZdButton",
2136
+ name: e.instance.name + "_button",
2137
+ icon: !0,
2138
+ iconName: "mdi-table-star",
2139
+ isVisible: e.instance.isVisible
2140
+ }
2141
+ }), null, 16, ["child-props"])
2142
+ ]),
2143
+ _: 2
2144
+ }, 1032, ["value"]), [
2145
+ [pt, e.instance.isVisible]
2146
+ ])
2147
+ ]),
2148
+ default: $(() => [
2149
+ L("span", null, Y(e.$t("LAYOUT") + (e.instance.currentLayoutName || e.$t("DEFAULT_LAYOUT"))), 1)
2150
+ ]),
2151
+ _: 2
2152
+ }, 1024)
2153
+ ]),
2154
+ default: $(() => [
2155
+ E(y, null, {
2156
+ default: $(() => [
2157
+ E(g, {
2158
+ class: j(["tek-grid-layout-item-header", { edited: e.instance.layoutEdited }])
2159
+ }, {
2160
+ default: $(() => [
2161
+ ue(Y(e.instance.layoutEdited ? e.$t("LAYOUT_MODIFIED") : e.$t("LAYOUT_NOT_MODIFIED")), 1)
2162
+ ]),
2163
+ _: 1
2164
+ }, 8, ["class"]),
2165
+ E(g, null, {
2166
+ default: $(() => [
2167
+ E(k, M({
2168
+ name: e.instance.name + "_new_layout",
2169
+ ref: "inputNewLayout"
2170
+ }, {
2171
+ showHelper: !1,
2172
+ showLabel: !1,
2173
+ placeholder: "NEW_LAYOUT",
2174
+ appendOuterIcon: "mdi-check",
2175
+ autofocus: !0,
2176
+ autofill: !1,
2177
+ keyMap: {
2178
+ enter: {
2179
+ event: e.confirmLayoutClick,
2180
+ input: !0,
2181
+ active: !0
2182
+ }
2183
+ },
2184
+ events: {
2185
+ appendOuterIconClick: e.confirmLayoutClick
2186
+ }
2187
+ }), null, 16, ["name"])
2188
+ ]),
2189
+ _: 1
2190
+ }),
2191
+ e.instance.layoutEdited ? R("", !0) : (N(), V(g, {
2192
+ key: 0,
2193
+ class: j(["tek-grid-layout-item", {
2194
+ selected: e.instance.currentLayoutName === ""
2195
+ }]),
2196
+ onClick: o[0] || (o[0] = (D) => e.instance.applyLayout(""))
2197
+ }, {
2198
+ default: $(() => [
2199
+ ue(Y(e.$t("DEFAULT_LAYOUT")), 1)
2200
+ ]),
2201
+ _: 1
2202
+ }, 8, ["class"])),
2203
+ (N(!0), B(x, null, oe(e.instance.layoutNames, (D) => (N(), V(g, {
2204
+ key: D,
2205
+ class: j(["tek-grid-layout-item", {
2206
+ selected: D === e.instance.currentLayoutName
2207
+ }]),
2208
+ onClick: (p) => e.applyOrUpdateLayout(p, D)
2209
+ }, {
2210
+ default: $(() => [
2211
+ ue(Y(D) + " ", 1),
2212
+ e.instance.layoutEdited ? R("", !0) : (N(), B("span", $o, [
2213
+ E(f, M({
2214
+ name: "tek-grid-layout-item-delete_" + e.instance.name + D
2215
+ }, { ref_for: !0 }, {
2216
+ small: !0,
2217
+ icon: !0,
2218
+ iconName: "mdi-trash-can-outline",
2219
+ events: {
2220
+ click: e.deleteButtonClick(D)
2221
+ }
2222
+ }), null, 16, ["name"])
2223
+ ]))
2224
+ ]),
2225
+ _: 2
2226
+ }, 1032, ["class", "onClick"]))), 128)),
2227
+ e.instance.layoutEdited ? (N(), V(g, {
2228
+ key: 1,
2229
+ class: j(["tek-grid-layout-item-discard"]),
2230
+ onClick: o[1] || (o[1] = (D) => e.instance.discardChanges())
2231
+ }, {
2232
+ default: $(() => [
2233
+ E(f, {
2234
+ small: "",
2235
+ color: "error darken-2",
2236
+ width: "100%",
2237
+ name: "tek-grid-layout-item-discard-changes",
2238
+ label: "LAYOUT_DISCART_CHANGES"
2239
+ })
2240
+ ]),
2241
+ _: 1
2242
+ })) : R("", !0)
2243
+ ]),
2244
+ _: 1
2245
+ })
2246
+ ]),
2247
+ _: 1
2248
+ }, 8, ["id", "name", "class", "style", "modelValue"]);
2249
+ }
2250
+ const Vo = /* @__PURE__ */ W(To, [["render", Io]]), Ao = F({
2251
+ props: {
2252
+ isSelected: {
2253
+ type: Boolean,
2254
+ required: !0
2255
+ },
2256
+ selectable: {
2257
+ type: Boolean,
2258
+ required: !0
2259
+ },
2260
+ selectionDisabled: {
2261
+ type: Boolean,
2262
+ required: !0
2263
+ },
2264
+ cellSelection: {
2265
+ type: Boolean,
2266
+ required: !0
2267
+ },
2268
+ isCurrent: {
2269
+ type: Function,
2270
+ required: !0
2271
+ },
2272
+ columns: {
2273
+ type: Array,
2274
+ required: !0
2275
+ },
2276
+ row: {
2277
+ type: Object,
2278
+ required: !0
2279
+ },
2280
+ fixedLeft: {
2281
+ type: Object,
2282
+ required: !0
2283
+ },
2284
+ fixedRight: {
2285
+ type: Object,
2286
+ required: !0
2287
+ }
2288
+ },
2289
+ emits: ["focusin", "cellFocus"],
2290
+ setup(e, { emit: o }) {
2291
+ return {
2292
+ focusin: (u) => {
2293
+ o("focusin", { event: u, row: e.row });
2294
+ },
2295
+ getLevel: (u) => {
2296
+ if (!u.groupHeaders) return 0;
2297
+ const { length: r } = u.groupHeaders;
2298
+ return r + 1;
2299
+ },
2300
+ cellFocus: (u, r) => {
2301
+ o("cellFocus", { event: u, row: e.row, column: r });
2302
+ }
2303
+ };
2304
+ }
2305
+ }), Eo = {
2306
+ key: 0,
2307
+ class: /* @__PURE__ */ j([
2308
+ "zd-grid__cell",
2309
+ "zd-grid__cell--fixed",
2310
+ "zd-grid__selectable-cell"
2311
+ ])
2312
+ };
2313
+ function Fo(e, o, t, l, d, u) {
2314
+ const r = T("tek-grid-indentation"), h = T("zd-grid-cell"), w = T("table-row");
2315
+ return N(), V(w, {
2316
+ cssClass: [
2317
+ "tek-grid-footer-row",
2318
+ { "tek-grid-footer-row--summary": e.row.groupSummary }
2319
+ ]
2320
+ }, {
2321
+ default: $(() => [
2322
+ e.selectable ? (N(), B("td", Eo)) : R("", !0),
2323
+ (N(!0), B(x, null, oe(e.columns, (g, k, f, y) => {
2324
+ const m = [e.row, g, e.fixedLeft, e.fixedRight, e.cellSelection, e.isCurrent({ row: e.row, column: g })];
2325
+ if (y && y.el && y.key === g.name && Mt(y, m)) return y;
2326
+ const D = (N(), V(h, {
2327
+ key: g.name,
2328
+ row: e.row,
2329
+ column: g,
2330
+ cssClass: [
2331
+ {
2332
+ "zd-grid__cell--fixed": g.fixed,
2333
+ "zd-grid__action-cell--fixed": g.actionFixed
2334
+ }
2335
+ ],
2336
+ cssStyle: [{
2337
+ left: g.fixed ? e.fixedLeft[g.name] : "unset",
2338
+ right: g.actionFixed ? e.fixedRight[g.name] : "unset"
2339
+ }],
2340
+ cellSelection: e.cellSelection,
2341
+ isCurrent: e.isCurrent({ row: e.row, column: g }),
2342
+ onFocus: (p) => e.cellFocus(p, g),
2343
+ onFocusin: o[0] || (o[0] = (p) => e.focusin(p))
2344
+ }, {
2345
+ prepend: $(() => [
2346
+ k === 0 ? (N(), V(r, {
2347
+ key: 0,
2348
+ footer: "",
2349
+ level: e.getLevel(e.row)
2350
+ }, null, 8, ["level"])) : R("", !0)
2351
+ ]),
2352
+ _: 2
2353
+ }, 1032, ["row", "column", "cssClass", "cssStyle", "cellSelection", "isCurrent", "onFocus"]));
2354
+ return D.memo = m, D;
2355
+ }, o, 1), 128))
2356
+ ]),
2357
+ _: 1
2358
+ }, 8, ["cssClass"]);
2359
+ }
2360
+ const Lo = /* @__PURE__ */ W(Ao, [["render", Fo]]), Bo = F({
2361
+ props: {
2362
+ isSelected: {
2363
+ type: Boolean,
2364
+ required: !0
2365
+ },
2366
+ isCurrentRow: {
2367
+ type: Boolean,
2368
+ required: !0
2369
+ },
2370
+ selectable: {
2371
+ type: Boolean,
2372
+ required: !0
2373
+ },
2374
+ selectionDisabled: {
2375
+ type: Boolean,
2376
+ required: !0
2377
+ },
2378
+ cellSelection: {
2379
+ type: Boolean,
2380
+ required: !0
2381
+ },
2382
+ isCurrent: {
2383
+ type: Function,
2384
+ required: !0
2385
+ },
2386
+ row: {
2387
+ type: Object,
2388
+ required: !0
2389
+ },
2390
+ indeterminate: {
2391
+ type: Boolean,
2392
+ required: !0
2393
+ }
2394
+ },
2395
+ emits: ["click", "checkboxClick", "focusin", "expandClick"],
2396
+ setup(e, { emit: o }) {
2397
+ return {
2398
+ click: (r) => {
2399
+ o("click", r);
2400
+ },
2401
+ focusin: (r) => {
2402
+ o("focusin", { event: r, row: e.row });
2403
+ },
2404
+ checkboxClick: (r) => {
2405
+ o("checkboxClick", r);
2406
+ },
2407
+ expandClick: (r) => {
2408
+ o("expandClick", { event: r, row: e.row });
2409
+ }
2410
+ };
2411
+ }
2412
+ }), Ro = ["tabindex"], zo = { class: "tek-grid__group-text zd-ml-2" };
2413
+ function Po(e, o, t, l, d, u) {
2414
+ const r = T("zd-grid-checkbox"), h = T("tek-grid-indentation"), w = T("v-icon"), g = T("table-row");
2415
+ return N(), V(g, {
2416
+ class: j([
2417
+ "tek-grid-group-row",
2418
+ { "tek-grid-row-group--summary": e.row.groupSummary }
2419
+ ]),
2420
+ isCurrentRow: e.isCurrentRow,
2421
+ onClick: o[3] || (o[3] = (k) => e.click(k))
2422
+ }, {
2423
+ default: $(() => [
2424
+ e.selectable ? (N(), V(r, {
2425
+ key: 0,
2426
+ disabled: e.selectionDisabled,
2427
+ isSelected: e.isSelected,
2428
+ indeterminate: e.indeterminate,
2429
+ cellSelection: e.cellSelection,
2430
+ isCurrent: e.isCurrent({ row: e.row }),
2431
+ onFocusin: o[0] || (o[0] = (k) => e.focusin(k)),
2432
+ onClick: o[1] || (o[1] = Ut((k) => e.checkboxClick(k), ["stop"]))
2433
+ }, null, 8, ["disabled", "isSelected", "indeterminate", "cellSelection", "isCurrent"])) : R("", !0),
2434
+ L("td", {
2435
+ colspan: 999,
2436
+ class: j(
2437
+ [
2438
+ "zd-grid__cell",
2439
+ "text-left",
2440
+ "tek-grid-group-cell",
2441
+ "zd-grid__cell--fixed"
2442
+ ]
2443
+ ),
2444
+ style: te(`left: ${e.selectable ? 40 : 0}px`),
2445
+ tabindex: e.cellSelection ? 0 : ""
2446
+ }, [
2447
+ L("span", {
2448
+ class: j([
2449
+ "tek-grid-group-cell__container"
2450
+ ]),
2451
+ style: te(`left: ${e.selectable ? 48 : 8}px`)
2452
+ }, [
2453
+ E(h, {
2454
+ level: e.row.groupHeaders.length
2455
+ }, null, 8, ["level"]),
2456
+ (N(), V(w, {
2457
+ class: j({ closed: !e.row.groupOpened }),
2458
+ onClick: o[2] || (o[2] = (k) => e.expandClick(k)),
2459
+ key: `${e.row.groupIndex}_${e.row.groupValue}`
2460
+ }, {
2461
+ default: $(() => [
2462
+ ue(Y(e.$getIcon("expand")), 1)
2463
+ ]),
2464
+ _: 1
2465
+ }, 8, ["class"])),
2466
+ L("span", zo, Y((e.row.groupLabel ? e.row.groupLabel + ": " : "") + e.row.groupValue), 1)
2467
+ ], 4)
2468
+ ], 12, Ro)
2469
+ ]),
2470
+ _: 1
2471
+ }, 8, ["class", "isCurrentRow"]);
2472
+ }
2473
+ const Ho = /* @__PURE__ */ W(Bo, [["render", Po]]), Ze = {
2474
+ ...wt,
2475
+ text: {
2476
+ type: String,
2477
+ default: ""
2478
+ },
2479
+ image: {
2480
+ type: String,
2481
+ default: void 0
2482
+ }
2483
+ }, Mo = F({
2484
+ props: Ze,
2485
+ inheritAttrs: !1,
2486
+ setup(e, o) {
2487
+ const { instance: t, root: l } = U(e, o, rt, Ze);
2488
+ return {
2489
+ instance: t,
2490
+ root: l
2491
+ };
2492
+ }
2493
+ });
2494
+ function Uo(e, o, t, l, d, u) {
2495
+ const r = T("zd-loading");
2496
+ return N(), V(r, M({ ref: "root" }, {
2497
+ name: e.instance.name,
2498
+ text: e.instance.text,
2499
+ image: e.instance.image,
2500
+ zIndex: e.instance.zIndex,
2501
+ textColor: e.textColor,
2502
+ loadingColor: e.loadingColor,
2503
+ size: e.size,
2504
+ loadingWidth: e.loadingWidth,
2505
+ opacity: e.opacity
2506
+ }), null, 16);
2507
+ }
2508
+ const qo = /* @__PURE__ */ W(Mo, [["render", Uo]]), Ke = {
2509
+ ...Gt,
2510
+ aboutImage: {
2511
+ type: String,
2512
+ default: ""
2513
+ },
2514
+ defaultEmail: {
2515
+ type: String,
2516
+ default: ""
2517
+ },
2518
+ versionInfo: {
2519
+ type: [Object, String],
2520
+ default: null
2521
+ },
2522
+ versionUrl: {
2523
+ type: String,
2524
+ default: ""
2525
+ },
2526
+ bottomSlot: {
2527
+ type: Array,
2528
+ default: void 0,
2529
+ watch: !1
2530
+ }
2531
+ }, Zo = F({
2532
+ props: Ke,
2533
+ inheritAttrs: !1,
2534
+ setup(e, o) {
2535
+ const { instance: t, root: l } = U(e, o, it, Ke), { click: d, focus: u, blur: r, mouseenter: h, mouseleave: w } = be(t, l);
2536
+ return {
2537
+ instance: t,
2538
+ root: l,
2539
+ click: d,
2540
+ focus: u,
2541
+ blur: r,
2542
+ mouseenter: h,
2543
+ mouseleave: w
2544
+ };
2545
+ }
2546
+ });
2547
+ function Ko(e, o, t, l, d, u) {
2548
+ const r = T("zd-user-info");
2549
+ return N(), V(r, {
2550
+ id: e.instance.name,
2551
+ "instance-object": e.instance,
2552
+ name: "user-info"
2553
+ }, null, 8, ["id", "instance-object"]);
2554
+ }
2555
+ const jo = /* @__PURE__ */ W(Zo, [["render", Ko]]), je = {
2556
+ ...Ot,
2557
+ parentName: {
2558
+ type: String,
2559
+ default: ""
2560
+ },
2561
+ dense: {
2562
+ type: [Boolean, String],
2563
+ default: !0
2564
+ }
2565
+ }, Wo = F({
2566
+ props: je,
2567
+ inheritAttrs: !1,
2568
+ setup(e, o) {
2569
+ const { instance: t, root: l } = U(
2570
+ e,
2571
+ o,
2572
+ ut,
2573
+ je
2574
+ ), { click: d, focus: u, blur: r, mouseenter: h, mouseleave: w } = be(t, l);
2575
+ return {
2576
+ instance: t,
2577
+ root: l,
2578
+ click: d,
2579
+ focus: u,
2580
+ blur: r,
2581
+ mouseenter: h,
2582
+ mouseleave: w
2583
+ };
2584
+ }
2585
+ });
2586
+ function _o(e, o, t, l, d, u) {
2587
+ const r = T("zd-list");
2588
+ return N(), V(r, {
2589
+ id: e.instance.name,
2590
+ "instance-object": e.instance,
2591
+ name: "list"
2592
+ }, null, 8, ["id", "instance-object"]);
2593
+ }
2594
+ const Yo = /* @__PURE__ */ W(Wo, [["render", _o]]), We = {
2595
+ ...he,
2596
+ title: {
2597
+ type: String,
2598
+ default: ""
2599
+ },
2600
+ breadcrumb: {
2601
+ type: Object,
2602
+ default: {},
2603
+ watch: !1
2604
+ },
2605
+ rightSlot: {
2606
+ type: Array,
2607
+ default: () => [],
2608
+ watch: !1
2609
+ }
2610
+ }, un = F({
2611
+ props: We,
2612
+ inheritAttrs: !1,
2613
+ setup(e, o) {
2614
+ const { instance: t, root: l } = U(
2615
+ e,
2616
+ o,
2617
+ nt,
2618
+ We
2619
+ );
2620
+ return {
2621
+ instance: t,
2622
+ root: l
2623
+ };
2624
+ }
2625
+ }), _e = {
2626
+ ...wt,
2627
+ text: {
2628
+ type: String,
2629
+ default: ""
2630
+ },
2631
+ image: {
2632
+ type: String,
2633
+ default: void 0
2634
+ }
2635
+ };
2636
+ F({
2637
+ props: _e,
2638
+ inheritAttrs: !1,
2639
+ setup(e, o) {
2640
+ const { instance: t, root: l } = U(e, o, rt, _e);
2641
+ return {
2642
+ instance: t,
2643
+ root: l
2644
+ };
2645
+ }
2646
+ });
2647
+ const Ye = {
2648
+ TekBreadcrumbHeader: Yt,
2649
+ TekGrid: eo,
2650
+ TekGridColumnFilter: lo,
2651
+ TekGridHeaderRow: io,
2652
+ TekGridColumnsButton: So,
2653
+ TekGridFilterButton: Oo,
2654
+ TekGridIndentation: Do,
2655
+ TekGridLayoutOptions: Vo,
2656
+ TekGridFooterRow: Lo,
2657
+ TekGridGroupRow: Ho,
2658
+ TekLoading: qo,
2659
+ TekUserInfo: jo,
2660
+ TekUserInfoList: Yo
2661
+ }, Je = Ct({
2662
+ ...bt,
2663
+ toolbarSlot: {
2664
+ type: Array,
2665
+ default: void 0,
2666
+ watch: !1
2667
+ },
2668
+ title: {
2669
+ type: String,
2670
+ default: ""
2671
+ },
2672
+ addButton: {
2673
+ type: [Boolean, String],
2674
+ default: !1
2675
+ },
2676
+ deleteButton: {
2677
+ type: [String, Boolean],
2678
+ default: "none"
2679
+ },
2680
+ columnsButton: {
2681
+ type: [Boolean, String],
2682
+ default: !1
2683
+ },
2684
+ columnsButtonIgnore: {
2685
+ type: [Array, String],
2686
+ default: () => []
2687
+ },
2688
+ showEditButtons: {
2689
+ type: [Boolean, String],
2690
+ default: !0
2691
+ },
2692
+ filterButton: {
2693
+ type: [Boolean, String],
2694
+ default: !1
2695
+ },
2696
+ modalFilterProps: {
2697
+ type: Object,
2698
+ default: () => ({})
2699
+ },
2700
+ showSearch: {
2701
+ type: [Boolean, String],
2702
+ default: !0
2703
+ },
2704
+ columnFilterButton: {
2705
+ type: [Boolean, String],
2706
+ default: !1
2707
+ },
2708
+ hideActions: {
2709
+ type: [Boolean, String],
2710
+ default: !1
2711
+ },
2712
+ actions: {
2713
+ type: Array,
2714
+ default: () => [],
2715
+ watch: !1
2716
+ },
2717
+ dragColumns: {
2718
+ type: [Boolean, String],
2719
+ default: !0
2720
+ },
2721
+ resizeColumns: {
2722
+ type: [Boolean, String],
2723
+ default: !0
2724
+ },
2725
+ showLayoutOptions: {
2726
+ type: [Boolean, String],
2727
+ default: !0
2728
+ },
2729
+ showExport: {
2730
+ type: [String, Boolean],
2731
+ default: !1
2732
+ },
2733
+ showReload: {
2734
+ type: [Boolean, String],
2735
+ default: !0
2736
+ },
2737
+ exportConfig: {
2738
+ type: Array
2739
+ },
2740
+ exportActions: {
2741
+ type: Array,
2742
+ watch: !1
2743
+ },
2744
+ groupsOpened: {
2745
+ type: [Boolean, String],
2746
+ default: !1
2747
+ },
2748
+ showSummaryTotal: {
2749
+ type: [Boolean, String],
2750
+ default: !0
2751
+ },
2752
+ mainGrid: {
2753
+ type: [Boolean, String],
2754
+ default: !0
2755
+ },
2756
+ xlsDefaultType: {
2757
+ type: String,
2758
+ default: void 0
2759
+ },
2760
+ showCheckboxAllFilter: {
2761
+ type: [Boolean, String],
2762
+ default: ae.gridShowCheckboxAllFilter
2763
+ },
2764
+ toolbarOpened: {
2765
+ type: [Boolean],
2766
+ default: !0
2767
+ },
2768
+ defaultFilter: {
2769
+ type: Object
2770
+ },
2771
+ reportTitle: {
2772
+ type: String
2773
+ },
2774
+ editNewRowsOnly: {
2775
+ type: [Boolean, String],
2776
+ default: !1
2777
+ },
2778
+ toolbarConfig: {
2779
+ type: Array,
2780
+ default: () => [],
2781
+ watch: !1
2782
+ },
2783
+ reportLabelFormatter: {
2784
+ type: Function,
2785
+ default: void 0
2786
+ },
2787
+ showHideButton: {
2788
+ type: [Boolean, String],
2789
+ default: !0
2790
+ }
2791
+ }), dn = F({
2792
+ props: Je,
2793
+ inheritAttrs: !1,
2794
+ setup(e, o) {
2795
+ const { instance: t, root: l } = U(e, o, Te, Je), d = Z(() => t.isGrouped() ? t.getGroupedData() : t.getData()), u = Z(() => d.value.filter((s) => t.isItemVisible(s))), h = yt({
2796
+ instance: t,
2797
+ root: l,
2798
+ renderedData: u,
2799
+ isNavigableRow: (s) => s.classList.contains("zd-grid__row") && !s.classList.contains("tek-grid-group-row") && !s.classList.contains("tek-grid-footer-row")
2800
+ }), w = pe(l), { visibleColumns: g } = kt({
2801
+ instance: t,
2802
+ rootEl: w,
2803
+ visibilityCondition: (s) => s.isVisible && !s.grouped
2804
+ });
2805
+ Dt({ instance: t, rootEl: w });
2806
+ const k = ye((s) => {
2807
+ const O = new Event("change", { cancelable: !0 });
2808
+ if (s.callEvent("beforeApplyFilter", { component: s, event: O }), O.defaultPrevented) return;
2809
+ const { datasource: v } = s;
2810
+ v instanceof X || v instanceof le ? v.updateDynamicFilter() : v.get();
2811
+ }, 500), f = Z(() => {
2812
+ if (t.datasource instanceof X || t.datasource instanceof le)
2813
+ return t.datasource.dynamicFilter;
2814
+ const s = t.datasource.filter, O = {};
2815
+ return Object.keys(s).forEach((v) => {
2816
+ O[v] = [{ relation: "AND", operation: "CONTAINS", value: s[v] }];
2817
+ }), O;
2818
+ }), y = (s) => {
2819
+ if (!ee.isEqual(f, s)) {
2820
+ if (t.datasource instanceof X || t.datasource instanceof le)
2821
+ t.datasource.dynamicFilter = J(s);
2822
+ else {
2823
+ const O = {};
2824
+ Object.keys(s).forEach((v) => {
2825
+ s[v][0].value && (O[v] = s[v][0].value);
2826
+ }), t.datasource.filter = O;
2827
+ }
2828
+ k(t), t.changeLayout();
2829
+ }
2830
+ }, m = (s) => t.columnHasFilter(s), D = (s, O) => t.isItemVisible(s) && h.shouldRender(O), p = (s) => {
2831
+ const { uniqueKey: O, currentRow: v } = t.datasource;
2832
+ return !!(s.group && s.groupValue === v.groupValue || s[O] && s[O] === v[O]);
2833
+ }, C = (s) => {
2834
+ let O = !1, v = !1;
2835
+ const { uniqueKey: H } = t.datasource;
2836
+ return s.children.forEach((q) => {
2837
+ const z = t.selectedRows.findIndex((K) => q[H] === K[H]);
2838
+ O = O || z !== -1, v = v || z === -1;
2839
+ }), O && v;
2840
+ }, i = (s) => s.children.every((O) => {
2841
+ const { uniqueKey: v } = t.datasource;
2842
+ return t.selectedRows.findIndex((q) => O[v] === q[v]) !== -1;
2843
+ }), c = (s, O, v) => {
2844
+ de(() => {
2845
+ const H = pe(l);
2846
+ t.selectGroupClick(s, O, v, H.value);
2847
+ });
2848
+ }, n = (s, O) => {
2849
+ const { uniqueKey: v } = t.datasource, H = i(s);
2850
+ H ? s.children.forEach((q) => {
2851
+ t.selectedRows.findIndex((K) => q[v] === K[v]) !== -1 && t.selectRow(q, !1);
2852
+ }) : s.children.map((z) => d.value.find((K) => z[v] === K[v])).forEach((z) => {
2853
+ if (!z) return;
2854
+ t.selectedRows.findIndex((ke) => z[v] === ke[v]) === -1 && t.selectRow(z, !0);
2855
+ }), c(s, !H, O);
2856
+ }, a = (s) => {
2857
+ t.openGroup(s);
2858
+ }, b = (s) => !!s.group, S = (s) => !!s.groupFooter, I = Z(() => t.columns.filter((s) => s.grouped).map((s) => s.name) || []), A = Z(() => h.sortBy.value.map(({ key: s, order: O }) => ({
2859
+ key: s,
2860
+ order: O
2861
+ })));
2862
+ return {
2863
+ ...h,
2864
+ instance: t,
2865
+ root: l,
2866
+ filter: f,
2867
+ setFilter: y,
2868
+ columnHasFilter: m,
2869
+ visibleColumns: g,
2870
+ isRowVisible: D,
2871
+ isCurrentRowGroup: p,
2872
+ isGroupSelectIndeterminate: C,
2873
+ selectGroup: n,
2874
+ isGroup: b,
2875
+ openGroup: a,
2876
+ renderedData: d,
2877
+ isGroupSelected: i,
2878
+ groupColumnNames: I,
2879
+ isFooter: S,
2880
+ visibleData: u,
2881
+ sortBy: A
2882
+ };
2883
+ }
2884
+ }), Jo = {
2885
+ hasFilterData: {
2886
+ type: Boolean,
2887
+ default: !1
2888
+ },
2889
+ column: {
2890
+ type: Object,
2891
+ required: !0
2892
+ },
2893
+ modelValue: {
2894
+ type: Array,
2895
+ default: []
2896
+ },
2897
+ instanceName: {
2898
+ type: String,
2899
+ required: !0
2900
+ },
2901
+ filterRelationsDatasource: {
2902
+ type: [Object, null],
2903
+ required: !1
2904
+ },
2905
+ filterOperationsDatasource: {
2906
+ type: [Object, null],
2907
+ required: !1
2908
+ },
2909
+ isHovering: {
2910
+ type: Boolean,
2911
+ default: !1
2912
+ },
2913
+ multiple: {
2914
+ type: Boolean,
2915
+ required: !0
2916
+ }
2917
+ }, cn = F({
2918
+ props: Jo,
2919
+ inheritAttrs: !1,
2920
+ emits: ["update:modelValue"],
2921
+ setup(e, o) {
2922
+ const t = (n) => `${e.instanceName}-${e.column.name}-filter-value-${n}`, l = (n) => {
2923
+ const a = t(n);
2924
+ ge.getInstance(a).setFocus();
2925
+ }, d = () => gt({
2926
+ operation: "CONTAINS",
2927
+ relation: "AND",
2928
+ value: void 0
2929
+ });
2930
+ let u = d();
2931
+ const r = (n, a) => {
2932
+ const b = e.column.componentProps.dateFormat || ae.dateFormat, S = e.column.componentProps.displayFormat || ae.displayFormat;
2933
+ return a ? _(n, S).isValid() || !_(n, b).isValid() ? n : _(n, b).format(S) : _(n, b).isValid() || !_(n, S).isValid() ? n : _(n, S).format(b);
2934
+ }, h = (n, a = !1) => ["ZdDate", "ZdDateRange"].includes(e.column.componentProps.component) ? Array.isArray(n) ? n.map((b) => r(b, a)) : r(n, a) : n, w = /* @__PURE__ */ new WeakMap();
2935
+ let g = 0;
2936
+ const k = (n) => (w.has(n) || w.set(n, `__item__${g++}`), w.get(n)), f = Z(() => e.multiple ? [...e.modelValue, u].map((n) => ({
2937
+ id: k(n),
2938
+ item: n
2939
+ })) : e.modelValue.length > 0 ? [{ id: k(e.modelValue[0]), item: e.modelValue[0] }] : [{ id: k(u), item: u }]), y = ye((n) => {
2940
+ ee.isEqual(n, e.modelValue) || (o.emit("update:modelValue", n), u = d());
2941
+ }, 500);
2942
+ return {
2943
+ changeValue: (n, a, { component: b }) => {
2944
+ const S = J(e.modelValue), I = J(n), { value: A } = b, s = e.multiple && a === S.length;
2945
+ let O = A;
2946
+ if (A && Q(I.operation) && (O = A.split(";")), I.value = h(O), !e.multiple) {
2947
+ y([I]);
2948
+ return;
2949
+ }
2950
+ if (s) {
2951
+ if (!I.value) return;
2952
+ y([...S, I]);
2953
+ return;
2954
+ }
2955
+ I.value || (a === S.length - 1 && (u.operation = I.operation, u.relation = I.relation), S.splice(a, 1), S.length > 0 && a === 0 && (S[0].relation = "AND"), S.length === 0 && (u.relation = "AND")), y(S);
2956
+ },
2957
+ changeRelation: (n, { component: a }) => {
2958
+ const b = J(e.modelValue), S = n === b.length, I = S ? u : b[n], { value: A } = a;
2959
+ l(n), I.relation = A, !S && y(b);
2960
+ },
2961
+ changeOperation: (n, { component: a }) => {
2962
+ const b = J(e.modelValue), S = b[n], I = n === b.length, A = I ? u : S, { value: s } = a;
2963
+ l(n), Q(s) && (A.value = Array.isArray(S.value) ? S.value : [S.value]), A.operation = s, !I && y(b);
2964
+ },
2965
+ getValueInputName: t,
2966
+ newFilter: u,
2967
+ getComponentType: (n) => Q(n) ? "ZdTextInput" : e.column.componentProps.component,
2968
+ getComponentHint: (n) => Q(n) ? "TEKGRID_MULTIPLE_VALUE_HINT" : "",
2969
+ modelWithIds: f,
2970
+ getItemValue: (n) => Q(n.operation) ? n.value.join(";") : n.value
2971
+ };
2972
+ }
2973
+ }), Xe = {
2974
+ ...St,
2975
+ hideGroups: {
2976
+ type: [Boolean, String],
2977
+ default: !1
2978
+ }
2979
+ }, mn = F({
2980
+ props: Xe,
2981
+ inheritAttrs: !1,
2982
+ setup(e, o) {
2983
+ const { instance: t, root: l } = U(
2984
+ e,
2985
+ o,
2986
+ lt,
2987
+ Xe
2988
+ ), d = Ce({ instance: t, root: l }), u = se(!1), r = se(!1), h = (y) => {
2989
+ console.warn(y);
2990
+ };
2991
+ ft(u, () => {
2992
+ !u.value || r.value || (r.value = !0, de(() => {
2993
+ const y = document.querySelector(`#${t.name}_columns_table tbody`);
2994
+ y && $e.create(y, {
2995
+ handle: ".sortHandle",
2996
+ dragClass: "tek-grid-columns-button-sortable-drag",
2997
+ onEnd: g
2998
+ });
2999
+ }));
3000
+ });
3001
+ const w = Z(() => t.iterableComponent.columns.filter((y) => y.grouped).map((y) => y.name) || []), g = (y) => {
3002
+ const m = t.iterableComponent, D = Array.from(y.srcElement.querySelectorAll("tr")).map((c) => c.getAttribute("name")), p = [], C = D.map((c) => {
3003
+ const n = m.getColumn(c);
3004
+ return n.grouped && p.push(c), n;
3005
+ }), i = m.columns.filter((c) => t.ignoreColumns.indexOf(c.name) !== -1);
3006
+ m.columns = C.concat(i), m.updateGrouping && JSON.stringify(p) !== JSON.stringify(w) && m.updateGrouping(), m.changeLayout();
3007
+ };
3008
+ return {
3009
+ ...d,
3010
+ instance: t,
3011
+ root: l,
3012
+ menuIsOpened: u,
3013
+ moreOptions: () => {
3014
+ fe.show(t);
3015
+ },
3016
+ close: () => {
3017
+ u.value = !1;
3018
+ },
3019
+ teste: h,
3020
+ mergeProps: M
3021
+ };
3022
+ }
3023
+ }), Qe = {
3024
+ ...vt,
3025
+ gridName: {
3026
+ type: String,
3027
+ default: ""
3028
+ },
3029
+ grid: {
3030
+ type: [Object, String],
3031
+ default: () => {
3032
+ }
3033
+ },
3034
+ showCheckboxAll: {
3035
+ type: [Boolean, String],
3036
+ default: !1
3037
+ }
3038
+ }, pn = F({
3039
+ props: Qe,
3040
+ inheritAttrs: !1,
3041
+ setup(e, o) {
3042
+ const { instance: t, root: l } = U(
3043
+ e,
3044
+ o,
3045
+ st,
3046
+ Qe
3047
+ );
3048
+ return {
3049
+ ...Ce({ instance: t, root: l }),
3050
+ instance: t,
3051
+ root: l,
3052
+ filterClick: ({ event: r }) => {
3053
+ t.click(r);
3054
+ }
3055
+ };
3056
+ }
3057
+ }), xe = {
3058
+ ...he
3059
+ // Zeedhi 3.0
3060
+ }, gn = F({
3061
+ props: xe,
3062
+ inheritAttrs: !1,
3063
+ setup(e, o) {
3064
+ const { instance: t, root: l } = U(
3065
+ e,
3066
+ o,
3067
+ at,
3068
+ xe
3069
+ ), { applyLayout: d, getColumnElements: u, getTableWidth: r } = Nt();
3070
+ ht(() => {
3071
+ t.viewApplyLayout = k, t.viewGetCurrentLayout = f;
3072
+ });
3073
+ const h = ({ component: C }) => {
3074
+ const i = C.value;
3075
+ if (i) {
3076
+ const c = f(i);
3077
+ t.newLayout(c);
3078
+ }
3079
+ y.value = !1, C.value = "";
3080
+ }, w = () => {
3081
+ const C = t.grid.datasource;
3082
+ return C instanceof X ? C.dynamicFilter : {};
3083
+ }, g = (C) => {
3084
+ t.updateLayout(C.name, f(C.name));
3085
+ }, k = (C) => {
3086
+ const i = {
3087
+ originalDatasourceOrder: t.originalDatasourceOrder,
3088
+ originalDatasourceFilter: t.originalDatasourceFilter,
3089
+ originalColumnProps: t.originalColumnProps,
3090
+ originalDatasourceDynamicFilter: t.originalDatasourceDynamicFilter
3091
+ };
3092
+ d({ layout: C, defaultLayout: i, changeLayoutCallback: g }), y.value = !1;
3093
+ }, f = (C) => {
3094
+ const { grid: i } = t, c = r(), n = u();
3095
+ return {
3096
+ name: C,
3097
+ gridWidth: c,
3098
+ order: i.datasource.order,
3099
+ filter: i.datasource.filter,
3100
+ dynamicFilter: w(),
3101
+ columns: i.columns.map((a, b) => {
3102
+ const S = n[b];
3103
+ return {
3104
+ name: a.name,
3105
+ label: a.label,
3106
+ align: a.align,
3107
+ width: S ? window.getComputedStyle(S).width : "unset",
3108
+ minWidth: a.minWidth,
3109
+ maxWidth: a.maxWidth,
3110
+ isVisible: a.isVisible,
3111
+ fixed: a.fixed,
3112
+ grouped: a.grouped,
3113
+ groupOpened: a.groupOpened,
3114
+ aggregation: a.aggregation,
3115
+ filterHelperValue: t.getHelperValue(a)
3116
+ };
3117
+ })
3118
+ };
3119
+ }, y = se(!1), m = (C, i) => {
3120
+ t.layoutEdited ? (t.updateLayout(i, f(i)), C.stopImmediatePropagation(), y.value = !1) : t.applyLayout(i);
3121
+ }, D = (C, i) => {
3122
+ t.deleteLayout(i), C.stopImmediatePropagation();
3123
+ };
3124
+ return {
3125
+ instance: t,
3126
+ root: l,
3127
+ menuActive: y,
3128
+ confirmLayoutClick: h,
3129
+ applyOrUpdateLayout: m,
3130
+ deleteButtonClick: (C) => ({ event: i }) => {
3131
+ D(i, C);
3132
+ },
3133
+ mergeProps: M
3134
+ };
3135
+ }
3136
+ }), et = {
3137
+ ...Gt,
3138
+ aboutImage: {
3139
+ type: String,
3140
+ default: ""
3141
+ },
3142
+ defaultEmail: {
3143
+ type: String,
3144
+ default: ""
3145
+ },
3146
+ versionInfo: {
3147
+ type: [Object, String],
3148
+ default: null
3149
+ },
3150
+ versionUrl: {
3151
+ type: String,
3152
+ default: ""
3153
+ },
3154
+ bottomSlot: {
3155
+ type: Array,
3156
+ default: void 0,
3157
+ watch: !1
3158
+ }
3159
+ }, fn = F({
3160
+ props: et,
3161
+ inheritAttrs: !1,
3162
+ setup(e, o) {
3163
+ const { instance: t, root: l } = U(e, o, it, et), { click: d, focus: u, blur: r, mouseenter: h, mouseleave: w } = be(t, l);
3164
+ return {
3165
+ instance: t,
3166
+ root: l,
3167
+ click: d,
3168
+ focus: u,
3169
+ blur: r,
3170
+ mouseenter: h,
3171
+ mouseleave: w
3172
+ };
3173
+ }
3174
+ }), tt = {
3175
+ ...Ot,
3176
+ parentName: {
3177
+ type: String,
3178
+ default: ""
3179
+ },
3180
+ dense: {
3181
+ type: [Boolean, String],
3182
+ default: !0
3183
+ }
3184
+ }, hn = F({
3185
+ props: tt,
3186
+ inheritAttrs: !1,
3187
+ setup(e, o) {
3188
+ const { instance: t, root: l } = U(
3189
+ e,
3190
+ o,
3191
+ ut,
3192
+ tt
3193
+ ), { click: d, focus: u, blur: r, mouseenter: h, mouseleave: w } = be(t, l);
3194
+ return {
3195
+ instance: t,
3196
+ root: l,
3197
+ click: d,
3198
+ focus: u,
3199
+ blur: r,
3200
+ mouseenter: h,
3201
+ mouseleave: w
3202
+ };
3203
+ }
3204
+ });
3205
+ Bt.addIcons({
3206
+ add: "mdi-plus-box",
3207
+ delete: "mdi-trash-can-outline",
3208
+ refresh: "mdi-refresh",
3209
+ more: "mdi-dots-vertical",
3210
+ filter: "mdi-filter",
3211
+ confirmLayout: "mdi-check",
3212
+ updateLayout: "mdi-square-edit-outline",
3213
+ layout: "mdi-table-star"
3214
+ });
3215
+ const Cn = {
3216
+ install(e) {
3217
+ e._context.components.i18next || e.use(Ft, { i18next: De.instance }), Object.keys(Ye).forEach((o) => {
3218
+ e.component(o, Ye[o]);
3219
+ });
3220
+ }
3221
+ };
3222
+ export {
3223
+ un as TekBreadcrumbHeader,
3224
+ dn as TekGrid,
3225
+ cn as TekGridColumnFilter,
3226
+ mn as TekGridColumnsButton,
3227
+ pn as TekGridFilterButton,
3228
+ gn as TekGridLayoutOptions,
3229
+ qo as TekLoading,
3230
+ _e as TekLoadingProps,
3231
+ fn as TekUserInfo,
3232
+ hn as TekUserInfoList,
3233
+ Cn as default
3234
+ };
3235
+ //# sourceMappingURL=teknisa-components-vuetify.es.js.map