@trilogy-data/trilogy-studio-components 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AssetAutoImporter-C_7Ms9xe.js +403 -0
- package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-Cd40SvdM.js} +3 -3
- package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
- package/dist/{CodeBlock-PT4no49I.js → CodeBlock-Dj-GfTbW.js} +4 -4
- package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-lX2RhHCG.js} +7 -7
- package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
- package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-CZ06qjjE.js} +49 -49
- package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-DwA938kf.js} +4 -4
- package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-CQsIqWZC.js} +276 -280
- package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-CkqH52FX.js} +2 -2
- package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-DWFlel5p.js} +39 -39
- package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
- package/dist/{Editor-DQsYpkwl.js → Editor-DQ66Vp6v.js} +105 -103
- package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
- package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-B_s3COHE.js} +20 -21
- package/dist/{IDE-HLa8vybk.js → IDE-4-Jg6gsM.js} +200 -203
- package/dist/{JobsView-B97HBoIE.js → JobsView-B5NWDUgP.js} +13 -14
- package/dist/{LLMChat-CxJcPLEG.js → LLMChat-eKgEc-I3.js} +3 -3
- package/dist/{LLMView-C1MUf0c2.js → LLMView-CdTwMLVV.js} +23 -23
- package/dist/{LoadingView-s1uznGwG.js → LoadingView-Bu3wLJ7J.js} +2 -2
- package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-B6lqdkgc.js} +531 -430
- package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-CZlg20oa.js} +179 -182
- package/dist/{ModelCard-BhN25jaV.js → ModelCard-Bs_d7Jis.js} +12 -13
- package/dist/{ModelView-DUDA_PtZ.js → ModelView-BP5yyecx.js} +7 -7
- package/dist/PageLoading-DKFeqkmK.js +5937 -0
- package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-BaDheojB.js} +8 -8
- package/dist/{Results-BJtlwebY.js → Results-CrpHB101.js} +17 -19
- package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-Clfyy-Yn.js} +2 -2
- package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CO5hXMs3.js} +2 -2
- package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-XFVErDFb.js} +6 -3
- package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
- package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-CMcTYDOV.js} +27 -28
- package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-DX_LbF3g.js} +12131 -10947
- package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-B6E35FUa.js} +5 -5
- package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
- package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
- package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
- package/dist/assets/json.worker-BezHzWUV.js +58 -0
- package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
- package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
- package/dist/components/FeedbackBanner.vue.d.ts +4 -0
- package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
- package/dist/components/editor/Editor.vue.d.ts +3 -3
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
- package/dist/components/model/ModelCard.vue.d.ts +3 -3
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
- package/dist/connections.js +3 -4
- package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
- package/dist/dashboard.js +28 -31
- package/dist/dashboards/dashboardQueryExecutor.d.ts +9 -0
- package/dist/dashboards/dashboardQueryExecutor.d.ts.map +1 -1
- package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
- package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
- package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
- package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CiWH_nGN.js} +1692 -575
- package/dist/embed.js +2 -2
- package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
- package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-DAERmOdu.js} +16 -16
- package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
- package/dist/{helpers-BLQAgX3C.js → helpers-C2pARJoZ.js} +34 -35
- package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
- package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
- package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
- package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
- package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
- package/dist/llm/data/prompts.d.ts +1 -1
- package/dist/llm/data/prompts.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +3 -3
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm-Wf4Etiu9.js +18493 -0
- package/dist/llm.js +2 -3
- package/dist/{localStorage-D9uyOFEO.js → localStorage-C3xms-ab.js} +40 -43
- package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
- package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
- package/dist/monaco.js +4 -4
- package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
- package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
- package/dist/{reconcile-Dyf4UZmj.js → reconcile-BH_ReGDR.js} +1 -1
- package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-B0K8QScO.js} +3 -3
- package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/static/test_import.vue.d.ts +4 -0
- package/dist/static/test_import.vue.d.ts.map +1 -0
- package/dist/stores-DTGQZ4_B.js +2612 -0
- package/dist/stores.js +4 -7
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
- package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
- package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-BSrzJtYI.js} +11 -11
- package/dist/{useDashboard-CdSnPe_6.js → useDashboard-CGeIdDuX.js} +1014 -1022
- package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-D9kMZLeF.js} +1729 -711
- package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
- package/dist/views/ModelView.vue.d.ts +6 -6
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +9 -9
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +192 -194
- package/dist/{vocabulary-CKLGILtR.js → vocabulary-DQK5jB7m.js} +3 -1
- package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
- package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
- package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
- package/package.json +29 -20
- package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
- package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
- package/dist/DataTable-DoRDynP1.js +0 -365
- package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
- package/dist/LoadingButton-OH3frQuO.js +0 -138
- package/dist/ModalDialog-D1EOG4rl.js +0 -42
- package/dist/ModelCreator-CCdC7EXt.js +0 -253
- package/dist/PageLoading-BzniJM0C.js +0 -2669
- package/dist/Tooltip-Dihir4zs.js +0 -103
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
- package/dist/base-C8IuZWqY.js +0 -164
- package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
- package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
- package/dist/connections-CJSb1TZl.js +0 -229
- package/dist/constants-DgFEYN2b.js +0 -7
- package/dist/dashboardStore-ppM6nGks.js +0 -641
- package/dist/demoSetup-mwa-RDC6.js +0 -2942
- package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
- package/dist/editorStore-BhhmXbi-.js +0 -1019
- package/dist/formatting-BbJ5ICgh.js +0 -6
- package/dist/llm-BBOVWb-F.js +0 -11967
- package/dist/llmStore-DJM2JhzY.js +0 -153
- package/dist/monaco.contribution-ikesdolO.js +0 -128
- package/dist/stores-BT9hTLny.js +0 -1708
- package/dist/trilogy-BroD2Qmp.js +0 -4
- package/dist/urlStore-52HG6lsX.js +0 -55
- package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
- package/dist/useIsMobile-CNpUQAvk.js +0 -8
- package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
- package/dist/workers-Br7ThUKL.js +0 -47
|
@@ -1,5 +1,464 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { t } from "./_plugin-vue_export-helper-f9Rw-Il4.js";
|
|
3
|
+
import { o as n } from "./config-DwTONafa.js";
|
|
4
|
+
import { c as r, g as i } from "./base-DuKnVD-A.js";
|
|
5
|
+
import { A as a } from "./llm-Wf4Etiu9.js";
|
|
6
|
+
import { a as o, c as s, l as c, o as l, s as u } from "./stores-DTGQZ4_B.js";
|
|
7
|
+
import { it as d } from "./editorStore-CiWH_nGN.js";
|
|
8
|
+
import { a as f, c as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./vocabulary-DQK5jB7m.js";
|
|
9
|
+
import { Fragment as S, Teleport as ee, Transition as te, computed as C, createBlock as ne, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createTextVNode as re, createVNode as D, defineComponent as ie, inject as O, markRaw as ae, mergeProps as oe, nextTick as se, normalizeClass as k, normalizeStyle as ce, onMounted as le, onUnmounted as ue, openBlock as A, ref as j, renderList as de, renderSlot as M, resolveComponent as fe, shallowRef as pe, toDisplayString as N, unref as me, useAttrs as he, vModelSelect as ge, vModelText as _e, watch as ve, withCtx as P, withDirectives as F, withKeys as ye, withModifiers as I } from "vue";
|
|
10
|
+
import L from "prismjs";
|
|
11
|
+
//#region components/ModalDialog.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var be = ["data-testid"], xe = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "modal-header"
|
|
15
|
+
}, Se = { class: "modal-title" }, Ce = { class: "modal-body" }, we = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "modal-footer"
|
|
18
|
+
}, Te = /*#__PURE__*/ t(/* @__PURE__ */ ie({
|
|
19
|
+
__name: "ModalDialog",
|
|
20
|
+
props: {
|
|
21
|
+
show: { type: Boolean },
|
|
22
|
+
title: { default: "" },
|
|
23
|
+
maxWidth: { default: "400px" },
|
|
24
|
+
testId: { default: "" },
|
|
25
|
+
closeOnOverlay: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
emits: ["close"],
|
|
31
|
+
setup(e, { emit: t }) {
|
|
32
|
+
let n = e, r = t;
|
|
33
|
+
return (e, t) => (A(), ne(ee, { to: "body" }, [n.show ? (A(), T("div", {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "modal-overlay",
|
|
36
|
+
onClick: t[1] ||= (e) => n.closeOnOverlay ? r("close") : void 0
|
|
37
|
+
}, [E("div", {
|
|
38
|
+
class: "modal-panel",
|
|
39
|
+
style: ce({ maxWidth: n.maxWidth }),
|
|
40
|
+
"data-testid": n.testId || void 0,
|
|
41
|
+
onClick: t[0] ||= I(() => {}, ["stop"])
|
|
42
|
+
}, [
|
|
43
|
+
n.title || e.$slots.header ? (A(), T("div", xe, [M(e.$slots, "header", {}, () => [E("h3", Se, N(n.title), 1)], !0)])) : w("", !0),
|
|
44
|
+
E("div", Ce, [M(e.$slots, "default", {}, void 0, !0)]),
|
|
45
|
+
e.$slots.footer ? (A(), T("div", we, [M(e.$slots, "footer", {}, void 0, !0)])) : w("", !0)
|
|
46
|
+
], 12, be)])) : w("", !0)]));
|
|
47
|
+
}
|
|
48
|
+
}), [["__scopeId", "data-v-587355bb"]]), Ee = {
|
|
49
|
+
props: {
|
|
50
|
+
content: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: !0
|
|
53
|
+
},
|
|
54
|
+
position: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "right"
|
|
57
|
+
},
|
|
58
|
+
inline: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !0
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
visible: !1,
|
|
66
|
+
hoverTimeout: null,
|
|
67
|
+
tooltipStyle: {}
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
async onMouseEnter() {
|
|
72
|
+
this.hoverTimeout = setTimeout(async () => {
|
|
73
|
+
this.computePosition(), this.visible = !0, await this.$nextTick(), this.clampToViewport();
|
|
74
|
+
}, 100);
|
|
75
|
+
},
|
|
76
|
+
onMouseLeave() {
|
|
77
|
+
this.hoverTimeout && clearTimeout(this.hoverTimeout), this.visible = !1;
|
|
78
|
+
},
|
|
79
|
+
computePosition() {
|
|
80
|
+
let e = this.$refs.wrapperRef;
|
|
81
|
+
if (!e) return;
|
|
82
|
+
let t = e.getBoundingClientRect(), n = window.getComputedStyle(e), r = n.getPropertyValue("--trilogy-embed-floating-surface-strong").trim() || n.getPropertyValue("--floating-surface-strong").trim() || "rgba(255, 255, 255, 0.97)", i = n.getPropertyValue("--trilogy-embed-floating-text").trim() || n.getPropertyValue("--floating-text").trim() || "#1f2937", a = n.getPropertyValue("--trilogy-embed-surface-shadow").trim() || n.getPropertyValue("--surface-shadow").trim() || "0 1px 2px rgba(15, 23, 42, 0.08)", o = n.getPropertyValue("--trilogy-embed-overlay-border").trim() || n.getPropertyValue("--overlay-border").trim() || "rgba(148, 163, 184, 0.14)", s = {
|
|
83
|
+
position: "fixed",
|
|
84
|
+
background: r,
|
|
85
|
+
color: i,
|
|
86
|
+
boxShadow: `${a}, 0 4px 16px rgba(0, 0, 0, 0.08)`,
|
|
87
|
+
border: `1px solid ${o}`,
|
|
88
|
+
zIndex: "99999"
|
|
89
|
+
};
|
|
90
|
+
this.tooltipStyle = this.position === "top" ? {
|
|
91
|
+
...s,
|
|
92
|
+
left: `${t.left + t.width / 2}px`,
|
|
93
|
+
top: `${t.top - 6}px`,
|
|
94
|
+
transform: "translate(-50%, -100%)"
|
|
95
|
+
} : this.position === "bottom" ? {
|
|
96
|
+
...s,
|
|
97
|
+
left: `${t.left + t.width / 2}px`,
|
|
98
|
+
top: `${t.bottom + 6}px`,
|
|
99
|
+
transform: "translateX(-50%)"
|
|
100
|
+
} : this.position === "left" ? {
|
|
101
|
+
...s,
|
|
102
|
+
left: `${t.left - 6}px`,
|
|
103
|
+
top: `${t.top + t.height / 2}px`,
|
|
104
|
+
transform: "translate(-100%, -50%)"
|
|
105
|
+
} : {
|
|
106
|
+
...s,
|
|
107
|
+
left: `${t.right + 6}px`,
|
|
108
|
+
top: `${t.top + t.height / 2}px`,
|
|
109
|
+
transform: "translateY(-50%)"
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
clampToViewport() {
|
|
113
|
+
let e = this.$refs.tooltipRef;
|
|
114
|
+
if (!e) return;
|
|
115
|
+
let t = e.getBoundingClientRect(), n = Math.max(0, t.right - (window.innerWidth - 8)), r = Math.max(0, 8 - t.left), i = Math.max(0, t.bottom - (window.innerHeight - 8)), a = Math.max(0, 8 - t.top);
|
|
116
|
+
if (n || r || i || a) {
|
|
117
|
+
let e = parseFloat(this.tooltipStyle.left) - n + r, t = parseFloat(this.tooltipStyle.top) - i + a;
|
|
118
|
+
this.tooltipStyle = {
|
|
119
|
+
...this.tooltipStyle,
|
|
120
|
+
left: `${e}px`,
|
|
121
|
+
top: `${t}px`
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region components/Tooltip.vue
|
|
129
|
+
function De(e, t, n, r, i, a) {
|
|
130
|
+
return A(), T("div", {
|
|
131
|
+
class: "tooltip-wrapper",
|
|
132
|
+
ref: "wrapperRef",
|
|
133
|
+
onMouseenter: t[0] ||= (...e) => a.onMouseEnter && a.onMouseEnter(...e),
|
|
134
|
+
onMouseleave: t[1] ||= (...e) => a.onMouseLeave && a.onMouseLeave(...e)
|
|
135
|
+
}, [M(e.$slots, "default", {}, void 0, !0), (A(), ne(ee, { to: "body" }, [D(te, { appear: "" }, {
|
|
136
|
+
default: P(() => [i.visible ? (A(), T("span", {
|
|
137
|
+
key: 0,
|
|
138
|
+
ref: "tooltipRef",
|
|
139
|
+
class: "tooltip-popup",
|
|
140
|
+
style: ce(i.tooltipStyle)
|
|
141
|
+
}, N(n.content), 5)) : w("", !0)]),
|
|
142
|
+
_: 1
|
|
143
|
+
})]))], 544);
|
|
144
|
+
}
|
|
145
|
+
var Oe = /*#__PURE__*/ t(Ee, [["render", De], ["__scopeId", "data-v-aa013d28"]]), ke = {
|
|
146
|
+
props: {
|
|
147
|
+
action: {
|
|
148
|
+
type: Function,
|
|
149
|
+
required: !0
|
|
150
|
+
},
|
|
151
|
+
useDefaultStyle: {
|
|
152
|
+
type: Boolean,
|
|
153
|
+
default: !0
|
|
154
|
+
},
|
|
155
|
+
keyCombination: {
|
|
156
|
+
type: Array,
|
|
157
|
+
default: null
|
|
158
|
+
},
|
|
159
|
+
disabled: {
|
|
160
|
+
type: Boolean,
|
|
161
|
+
default: !1
|
|
162
|
+
},
|
|
163
|
+
testId: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: ""
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
components: { ModalDialog: Te },
|
|
169
|
+
setup(e) {
|
|
170
|
+
let t = he(), n = C(() => e.testId || (typeof t["data-testid"] == "string" ? t["data-testid"] : "")), r = j(!1), i = j(null), a = j(null), o = j(!1), s = /* @__PURE__ */ new Set(), c = null, l = (t) => {
|
|
171
|
+
if (!e.keyCombination || !t.key) return;
|
|
172
|
+
s.add(t.key.toLowerCase());
|
|
173
|
+
let n = new Set(e.keyCombination.map((e) => e.toLowerCase()));
|
|
174
|
+
Array.from(n).every((e) => s.has(e)) && (s.clear(), t.preventDefault(), f());
|
|
175
|
+
}, u = (t) => {
|
|
176
|
+
e.keyCombination && t.key && s.delete(t.key.toLowerCase());
|
|
177
|
+
}, d = () => {
|
|
178
|
+
o.value = !1, a.value = null, i.value = null;
|
|
179
|
+
}, f = async () => {
|
|
180
|
+
if (r.value || o.value) return;
|
|
181
|
+
c &&= (clearTimeout(c), null), r.value = !0, a.value = null, i.value = null;
|
|
182
|
+
let t = Date.now(), n = null;
|
|
183
|
+
try {
|
|
184
|
+
await e.action(), n = "success";
|
|
185
|
+
} catch (e) {
|
|
186
|
+
n = "error", e instanceof Error ? i.value = e.message : typeof e == "string" ? i.value = e : i.value = "An unknown error occurred";
|
|
187
|
+
} finally {
|
|
188
|
+
let e = Date.now() - t, i = Math.max(500 - e, 0);
|
|
189
|
+
await new Promise((e) => setTimeout(e, i)), a.value = n, r.value = !1, n === "error" ? o.value = !0 : c = setTimeout(() => {
|
|
190
|
+
a.value = null, c = null;
|
|
191
|
+
}, 1500);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
return le(() => {
|
|
195
|
+
window.addEventListener("keydown", l), window.addEventListener("keyup", u);
|
|
196
|
+
}), ue(() => {
|
|
197
|
+
window.removeEventListener("keydown", l), window.removeEventListener("keyup", u), c && clearTimeout(c);
|
|
198
|
+
}), {
|
|
199
|
+
effectiveTestId: n,
|
|
200
|
+
errorMessage: i,
|
|
201
|
+
isLoading: r,
|
|
202
|
+
status: a,
|
|
203
|
+
showErrorModal: o,
|
|
204
|
+
handleClick: f,
|
|
205
|
+
handleKeydown: l,
|
|
206
|
+
dismissError: d,
|
|
207
|
+
retryAction: () => {
|
|
208
|
+
d(), f();
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}, Ae = /* @__PURE__ */ e({ default: () => ze }), je = ["disabled", "data-testid"], Me = {
|
|
213
|
+
key: 0,
|
|
214
|
+
class: "success status_overlay"
|
|
215
|
+
}, Ne = ["data-testid"], Pe = {
|
|
216
|
+
key: 1,
|
|
217
|
+
class: "loading status_overlay"
|
|
218
|
+
}, Fe = ["data-testid"], Ie = ["data-testid"], Le = ["data-testid"];
|
|
219
|
+
function Re(e, t, n, r, i, a) {
|
|
220
|
+
let o = fe("ModalDialog");
|
|
221
|
+
return A(), T(S, null, [E("button", oe({ class: [
|
|
222
|
+
n.useDefaultStyle ? "default-style" : "",
|
|
223
|
+
e.$attrs.class,
|
|
224
|
+
"btn"
|
|
225
|
+
] }, e.$attrs, {
|
|
226
|
+
disabled: n.disabled || r.isLoading,
|
|
227
|
+
onClick: t[0] ||= I((...e) => r.handleClick && r.handleClick(...e), ["stop"]),
|
|
228
|
+
"data-testid": r.effectiveTestId
|
|
229
|
+
}), [
|
|
230
|
+
E("span", { class: k({
|
|
231
|
+
"hidden-text": r.isLoading,
|
|
232
|
+
contents: !0
|
|
233
|
+
}) }, [M(e.$slots, "default", {}, void 0, !0)], 2),
|
|
234
|
+
D(te, { name: "status-fade" }, {
|
|
235
|
+
default: P(() => [r.status === "success" ? (A(), T("span", Me, [...t[3] ||= [E("span", {
|
|
236
|
+
class: "success-backdrop",
|
|
237
|
+
"aria-hidden": "true"
|
|
238
|
+
}, null, -1), E("span", { class: "status-symbol" }, "✔", -1)]])) : w("", !0)]),
|
|
239
|
+
_: 1
|
|
240
|
+
}),
|
|
241
|
+
r.status === "error" ? (A(), T("span", {
|
|
242
|
+
key: 0,
|
|
243
|
+
class: "error status_overlay",
|
|
244
|
+
"data-testid": `${r.effectiveTestId}-error`
|
|
245
|
+
}, "✖", 8, Ne)) : r.isLoading ? (A(), T("span", Pe, [...t[4] ||= [E("span", { class: "spinner" }, null, -1)]])) : w("", !0)
|
|
246
|
+
], 16, je), D(o, {
|
|
247
|
+
show: r.showErrorModal,
|
|
248
|
+
title: "Action failed",
|
|
249
|
+
"max-width": "560px",
|
|
250
|
+
"test-id": r.effectiveTestId ? `${r.effectiveTestId}-error-modal` : "loading-button-error-modal",
|
|
251
|
+
onClose: r.dismissError
|
|
252
|
+
}, {
|
|
253
|
+
footer: P(() => [E("button", {
|
|
254
|
+
type: "button",
|
|
255
|
+
class: "okay-button",
|
|
256
|
+
"data-testid": r.effectiveTestId ? `${r.effectiveTestId}-error-okay` : "loading-button-error-okay",
|
|
257
|
+
onClick: t[1] ||= (...e) => r.dismissError && r.dismissError(...e)
|
|
258
|
+
}, " Okay ", 8, Ie), E("button", {
|
|
259
|
+
type: "button",
|
|
260
|
+
class: "retry-button",
|
|
261
|
+
"data-testid": r.effectiveTestId ? `${r.effectiveTestId}-error-retry` : "loading-button-error-retry",
|
|
262
|
+
onClick: t[2] ||= (...e) => r.retryAction && r.retryAction(...e)
|
|
263
|
+
}, " Retry ", 8, Le)]),
|
|
264
|
+
default: P(() => [E("p", {
|
|
265
|
+
class: "error-message",
|
|
266
|
+
"data-testid": r.effectiveTestId ? `${r.effectiveTestId}-error-message` : "loading-button-error-message"
|
|
267
|
+
}, N(r.errorMessage), 9, Fe)]),
|
|
268
|
+
_: 1
|
|
269
|
+
}, 8, [
|
|
270
|
+
"show",
|
|
271
|
+
"test-id",
|
|
272
|
+
"onClose"
|
|
273
|
+
])], 64);
|
|
274
|
+
}
|
|
275
|
+
var ze = /*#__PURE__*/ t(ke, [["render", Re], ["__scopeId", "data-v-795027f0"]]);
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region components/useIsMobile.ts
|
|
278
|
+
function Be() {
|
|
279
|
+
let e = O("isMobile", !1);
|
|
280
|
+
return C(() => !!me(e));
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region static/trilogy.webp
|
|
284
|
+
var Ve = "data:image/webp;base64,UklGRpoKAABXRUJQVlA4WAoAAAAQAAAAfwAAfwAAQUxQSNcFAAABoIVt2xlJelPVZvX02LZtm2vbtm3bxti2bdt2q5rF5D3o7spXyZ+z3euKiAnA/zXWqu50QwreSnY48vw9bocjdw50OhrzmzscGfq5isOR+a8l2ctlP/LMXS47ue2Q9rgZckc/G9kw5qFLJ83RmNPMMYbuIyXI4A+VHaHNElKK9L6SpLzqf4QYDfL07S6lJb9VyLLlyK191OW+5xzLjwaNWU0UNWAHI40KGfiuooKazzNoHTLvxQTFVPkxSJNRI0/e4lJI4st5NG0BclMPVbhuO01BM3tfypOgMa2hEnptpuh6E9tQ+YegAOn/soLtGs0wKJn1VLwpoNk8CTL7mThbZX4doKTviwwAtaabAfrvlCCPXq/ZJv7ZHErqUxoASH2viCYSALjvPSdBru1iD+2GYxTd2B2A+8GLjHwbcPvcpgCS3yqUoD6xrg26rqfo8Zs0QBu6l2a3AXcw+ENlANV+DwmQvk88Fqs3Sadk7gsJAFovovkyyLyXEwG0XixBXnk8zkKeT0soGfiuIoBqv4coR566zQVoQ/ZKkAdHaVa58SoljVmNASS/WUDJ4IflkZt7AXA/eFGCXJlhkbGU3NoHgPvucxRd0AKR0JjeEEDqu0USbGKbM7e7APTfQdHdg1A6AtL/VQaAGn+FleF9NRFAs7kUPX+fG+bI7KfjAbRdqobQT1UAVP4xSMnCt1NQrgnyyLUaoA3bp4B5LQAkvpxHyfCfNRChKXJNJwAxD1202f6BAFy3naLo0jaIWID6uNoAUt8L2eoFAL02U3T/CA3RIos/SAOQY7dPDUpefjgGZmvOMgTIS40VsICCxR+mQbLPNgn2VpE+tjaEXXeccYRVHRDFxFe9qnnR3KExGqJb5aegWl4yk/VEHKLfYr7CxntgzQFeZd0Nqx7/r7qCPs4W+q0qHG1RK1hYRXuHanCyiw/GwNqqKXo/DVZXyQvA/bUAJGsOBiDuyawtvRxMG3OIpDGjkW0+8Nmsw0qW7f860w59AdSdZNio9lidEeY+F2+9c/e4AXRZZ5udxTR57EbNauSOAQC0G47ZRHJ9N8vRmNcMQPyzOYqgMbm+1cjgj5UBZH4TUAPp+8wj1N0jRnpfTgTQOEMRZNaTsQLN5xlXn4gVI0/f5oJlrUAevkYzUeXHIEkeGq0BGLZPgtzSWynkqg6RJL7iZbkr2gOIfeSyBI0ZjZRCfVztsly3n2Kk+r+1AKR9WCJABr7JtMmlx38ICJDFH6YB6LOFZoveSwVQe5wuQOY8F2+D4g/SgKZzJMjLjzSbaVDwwg0A0OmoBHm8n9XCY2uhzH7bJaRLPvUAaDTdEPG+lmixlR0BJL88UgPcd521hj6pPoDMr/2UDP5cFRaM6PAYDXDddYZc1hZA0usFFljfFUDcczkUnd8Clozg6hOxAPruYOnw3zUBVPktFKVjN2iA68YTFN01EBYtx/dZBoCmsw2WW/heKoCWC40o5DwXD6D7Boqev88NS+mT6gGo+F2AEV94wA1gyB6pwDeZAOpP0SlZ+HYKrFtqXVcACS/k0fTeIQDcD1yQMGY2AlDhCz8lw39Uh5XH8tgNGoCktRRd1ApA6rtFprb2ARD/dBZFl7aBtb95Nh5lprxTJMHQb9UA1Pw7HNGZO1yAdt0Riu4fpsHiGiKs/ldYgCx4IxlA22XleV9NAtBlLUUvPRwDe7dbKkGevdsNaCMPlAr9UhVA3Qk6JYs/TIPttRH7Jcgd/QHEPnrFWNgSgOeTEkrqY2tDibGPXJKgMbcZgPTuAOIev0rRVR2hzPSPSgTI4I+VUXr0QYoeHqNBpbXH6wKk95VEdFhB0atPxkK1nVZLkKemhinp+9wDBWvXHJGQ1SfWh6LjnsqyxNrOUHjGF76oHblOg9rrTzGikvVUPNTfbYOc7zMPHFG76YSMPqkeHDPhhVyBtV3gqJnfBkwcuVaD0zaZZUSQ9VQcnLjPtrJ8n2XAoV13nCb1ifXg4EmvLumC/38EAFZQOCCcBAAA8BoAnQEqgACAAD5tMJZIJCKiISURqvCADYlkCHAFgAfgA4AC2z4Qilrr+K5BjhbxfytiIuxCdP5gH6G/6D+pdd3+b+gD9bfWE/w/6S+5P/FeoB/ivQt9SX0AP1N9MH2F/3E/dz2lf//w//oT9bi+bPyi9Z4gMP+oTiQ2fIFnz3dfKt+K8NU0NuvD4WoXdVSBvdRfkNfV7z+LQBFekqBYkVnzFrFhcBwzb/WcwK6ngQUym5zUqKwabaa0s9cv3hXO02k+Q/3n4Y30Jgx5b2i28g1m0GNRcoiQleivrdA9twAA/t/oW1ZOpgWGPzdJ/RMRfPqmdJbo/y6wP3APiFFoSNaTP3nMVlsw3nyXkh05cLceiHkDrL1lV4V6As5ZaY3i/LsknsvGBylJni0/Hdr0bhfjvc/8yOHHDGx7jHInQAsnSaG8VUGdthLyOH5WL1977sL/UxDgWx+RSi9Quk0nRRBsBUj/0+tiymaxFq7wVyC4EPBHjgD1KLNEx8dr3/R4VD1DJJ0xnD2j7CI1USMbh0wjy9BgM7eABY0ue5VFqyTbM1o0xzBmRlegqpPNbvHhQY0G21RYEVwPNK68Vb0B9CJ575c1TVAoDAw6L1wwTR69uWPUjTjRKE7SJz7ubW3ZKMflSvLbB0k0C/nTttP+GZk3ggU/HmO6MBnRGgQAuphoj+mDlDeVd7RHAnDl+PwaY0GgZQi+h/wb8DTe1qvFuve/DglsV90M6Wuf/ILzu2gZtjNqHIxrKrmQ/WC7825VCDRkk8Vis77gjNBWOZYRbeRfparIYQv8no3Zf1TxK/l49rQUpwEd/sN/xn3oc5Jw3D7zhzyLm390gzpIp41eZNvoveY4hOgS+aUMUb8La1FxwMeJmlREXsBUoMLQAgbr85+gh1jbHPUHloH9f3XaxWqEq+vjdu7RVqzMrnZHt8A/OUswycX/zAsxldoCRBeem2uhBhuZG1tWEV9DLFMfc9i7kizMUTQbBPxnqdWisMdRRQByUvD6/AsegPqCz+0gl85n1cSSDDikjmTC1HxosHorXLPPeLshyXLV6HnXybVOkKiRrr7wblijSAOMMkP9+nxm6zeas+f/GCzHRRKlfPRa+OwzauHebyj0AjlvruYX/zwOMpl/dvsT/z7HV8YzPEKQCArEV8Uf98lAzfzLseFV5i7bzIzjfsI7CunMbloEl2WAjZMx50O3WdqQADbbcH+iSc/AnXqTk4LHjs0bXgMafSCCn5YtpOkRiHG5FXqz5M3M7DiCm8QsJYnyYtMPFFJseASJ5aNvcYrWN/6ArdXRhZHKnbbHO3X8PGi63I0jYvU3VRsQhzZWPrFkCyIG3XWpaGyULRqpF9oFjenTJasiuMFOjh8jz1ZC+lyBI2b4wF9yJuYewjoVS3lJjMk19c1EcXHGmKqxaHI0f98/eWVb3/54P/+mK//RxX+mNCaGGXMYOR7giURNp5eK2+HsNP9UAWsx//44pKygKUtpeXl7DAh+CWQwjACJt+w6XC7vztA/joMjRm1uYc2/yx68hWV/+aEHRbhCyEe/GdI2XRjiWIfB6cIIAAAAAA==", He = {
|
|
285
|
+
comment: {
|
|
286
|
+
pattern: /(?:#|\/\/).*/,
|
|
287
|
+
greedy: !0
|
|
288
|
+
},
|
|
289
|
+
"triple-quoted-string": {
|
|
290
|
+
pattern: /'''[\s\S]*?'''/,
|
|
291
|
+
greedy: !0,
|
|
292
|
+
alias: "string"
|
|
293
|
+
},
|
|
294
|
+
string: {
|
|
295
|
+
pattern: /(["'])(?:\\[\s\S]|(?!\1)[^\\\r\n])*\1/,
|
|
296
|
+
greedy: !0
|
|
297
|
+
},
|
|
298
|
+
"quoted-identifier": {
|
|
299
|
+
pattern: /f?`[^`\r\n]*`/,
|
|
300
|
+
greedy: !0,
|
|
301
|
+
alias: "symbol"
|
|
302
|
+
},
|
|
303
|
+
cast: {
|
|
304
|
+
pattern: /::\s*[a-zA-Z_]\w*/,
|
|
305
|
+
inside: {
|
|
306
|
+
operator: /^::/,
|
|
307
|
+
"class-name": /[a-zA-Z_]\w*/
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"custom-function": {
|
|
311
|
+
pattern: /@[a-zA-Z_]\w*/,
|
|
312
|
+
alias: "function"
|
|
313
|
+
},
|
|
314
|
+
"hide-modifier": {
|
|
315
|
+
pattern: /--(?=[a-zA-Z_<])/,
|
|
316
|
+
alias: "important"
|
|
317
|
+
},
|
|
318
|
+
"partial-modifier": {
|
|
319
|
+
pattern: /~(?=[a-zA-Z_<])/,
|
|
320
|
+
alias: "important"
|
|
321
|
+
},
|
|
322
|
+
function: g(m),
|
|
323
|
+
"window-function": {
|
|
324
|
+
pattern: x(y),
|
|
325
|
+
alias: "function"
|
|
326
|
+
},
|
|
327
|
+
keyword: [
|
|
328
|
+
...h.map((e) => new RegExp(e, "i")),
|
|
329
|
+
/\b(?:not\s+)?i?like\b/i,
|
|
330
|
+
x(v),
|
|
331
|
+
x(p)
|
|
332
|
+
],
|
|
333
|
+
builtin: x(_),
|
|
334
|
+
boolean: /\b(?:true|false)\b/i,
|
|
335
|
+
null: {
|
|
336
|
+
pattern: /\bnull\b/i,
|
|
337
|
+
alias: "keyword"
|
|
338
|
+
},
|
|
339
|
+
property: [/\b[a-zA-Z_]\w*(?=\s*\.)/, /\b[a-zA-Z_]\w*(?=\s*:(?!:))/],
|
|
340
|
+
"class-name": x(f),
|
|
341
|
+
number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)\b/,
|
|
342
|
+
operator: new RegExp(b([
|
|
343
|
+
"<-",
|
|
344
|
+
"->",
|
|
345
|
+
"\\.\\.",
|
|
346
|
+
">=",
|
|
347
|
+
"<=",
|
|
348
|
+
"!=",
|
|
349
|
+
"\\*\\*",
|
|
350
|
+
"\\|\\|",
|
|
351
|
+
"\\+",
|
|
352
|
+
"-",
|
|
353
|
+
"\\*",
|
|
354
|
+
"/",
|
|
355
|
+
"%",
|
|
356
|
+
"=",
|
|
357
|
+
">",
|
|
358
|
+
"<",
|
|
359
|
+
"\\?",
|
|
360
|
+
"!"
|
|
361
|
+
])),
|
|
362
|
+
punctuation: /[[\](){},;:.]/
|
|
363
|
+
};
|
|
364
|
+
function Ue(e) {
|
|
365
|
+
e.languages.trilogy = He, e.languages.preql = He;
|
|
366
|
+
}
|
|
367
|
+
//#endregion
|
|
368
|
+
//#region utility/prism.ts
|
|
369
|
+
var R = /* @__PURE__ */ new Set(), We = Promise.resolve(), Ge = [
|
|
370
|
+
"markup",
|
|
371
|
+
"javascript",
|
|
372
|
+
"typescript",
|
|
373
|
+
"python",
|
|
374
|
+
"sql",
|
|
375
|
+
"json",
|
|
376
|
+
"markdown"
|
|
377
|
+
], Ke = {
|
|
378
|
+
typescript: ["javascript"],
|
|
379
|
+
json: ["javascript"],
|
|
380
|
+
markdown: ["markup"]
|
|
381
|
+
};
|
|
382
|
+
function qe(e) {
|
|
383
|
+
let t = (e || "").trim().toLowerCase();
|
|
384
|
+
switch (t) {
|
|
385
|
+
case "js":
|
|
386
|
+
case "jsx": return "javascript";
|
|
387
|
+
case "ts":
|
|
388
|
+
case "tsx": return "typescript";
|
|
389
|
+
case "py": return "python";
|
|
390
|
+
case "preql": return "trilogy";
|
|
391
|
+
case "": return "text";
|
|
392
|
+
default: return t;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
var Je = !1;
|
|
396
|
+
function Ye() {
|
|
397
|
+
Je ||= (Ue(L), !0);
|
|
398
|
+
}
|
|
399
|
+
async function z(e) {
|
|
400
|
+
switch (e) {
|
|
401
|
+
case "javascript":
|
|
402
|
+
L.languages.javascript || (L.languages.clike || await import("prismjs/components/prism-clike"), await import("prismjs/components/prism-javascript"));
|
|
403
|
+
break;
|
|
404
|
+
case "typescript":
|
|
405
|
+
L.languages.typescript || (L.languages.javascript || await z("javascript"), await import("prismjs/components/prism-typescript"));
|
|
406
|
+
break;
|
|
407
|
+
case "python":
|
|
408
|
+
L.languages.python || await import("prismjs/components/prism-python");
|
|
409
|
+
break;
|
|
410
|
+
case "sql":
|
|
411
|
+
L.languages.sql || await import("prismjs/components/prism-sql");
|
|
412
|
+
break;
|
|
413
|
+
case "json":
|
|
414
|
+
L.languages.json || (L.languages.javascript || await z("javascript"), await import("prismjs/components/prism-json"));
|
|
415
|
+
break;
|
|
416
|
+
case "markup":
|
|
417
|
+
case "html":
|
|
418
|
+
case "xml":
|
|
419
|
+
L.languages.markup || await import("prismjs/components/prism-markup");
|
|
420
|
+
break;
|
|
421
|
+
case "markdown": L.languages.markdown || (L.languages.markup || await z("markup"), await import("prismjs/components/prism-markdown"));
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
function Xe(e) {
|
|
425
|
+
let t = new Set(e.map((e) => qe(e)).filter(Boolean));
|
|
426
|
+
for (let e of Array.from(t)) for (let n of Ke[e] ?? []) t.add(n);
|
|
427
|
+
return Ge.filter((e) => t.has(e));
|
|
428
|
+
}
|
|
429
|
+
async function Ze(e = []) {
|
|
430
|
+
Ye();
|
|
431
|
+
let t = Xe(e);
|
|
432
|
+
if (t.every((e) => R.has(e))) return;
|
|
433
|
+
let n = We.then(async () => {
|
|
434
|
+
for (let e of t) R.has(e) || (await z(e), R.add(e));
|
|
435
|
+
});
|
|
436
|
+
We = n.catch(() => {}), await n;
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region composables/usePrismHighlight.ts
|
|
440
|
+
function Qe(e, t = {}) {
|
|
441
|
+
let { languages: n, selector: r, onHighlighted: i, watchSources: a, immediate: o = !0 } = t, s = 0, c = (e) => r ? Array.from(e.querySelectorAll(r)) : [e], l = () => {
|
|
442
|
+
let t = e.value;
|
|
443
|
+
return Array.isArray(t) ? t.find((e) => !!e) ?? null : t;
|
|
444
|
+
}, u = async () => {
|
|
445
|
+
let t = ++s;
|
|
446
|
+
await se();
|
|
447
|
+
let r = l();
|
|
448
|
+
if (!r || t !== s) return;
|
|
449
|
+
await Ze(typeof n == "function" ? n(r) : n ?? c(r).map((e) => Array.from(e.classList).find((e) => e.startsWith("language-"))?.replace("language-", "")));
|
|
450
|
+
let a = l();
|
|
451
|
+
a && t === s && ((Array.isArray(e.value) ? e.value.filter(Boolean).flatMap((e) => c(e)) : c(a)).forEach((e) => L.highlightElement(e)), i?.(a));
|
|
452
|
+
}, d = () => {
|
|
453
|
+
u().catch((e) => {
|
|
454
|
+
console.error("Failed to apply syntax highlighting:", e);
|
|
455
|
+
});
|
|
456
|
+
};
|
|
457
|
+
return o && le(d), a?.length && ve(a, d), { refresh: d };
|
|
458
|
+
}
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region node_modules/.pnpm/tabulator-tables@6.5.3/node_modules/tabulator-tables/dist/js/tabulator_esm.mjs
|
|
461
|
+
var B = class {
|
|
3
462
|
constructor(e) {
|
|
4
463
|
this.table = e;
|
|
5
464
|
}
|
|
@@ -75,7 +534,7 @@ var e = class {
|
|
|
75
534
|
module(e) {
|
|
76
535
|
return this.table.module(e);
|
|
77
536
|
}
|
|
78
|
-
},
|
|
537
|
+
}, V = class {
|
|
79
538
|
static elVisible(e) {
|
|
80
539
|
return !(e.offsetWidth <= 0 && e.offsetHeight <= 0);
|
|
81
540
|
}
|
|
@@ -102,9 +561,14 @@ var e = class {
|
|
|
102
561
|
}
|
|
103
562
|
return t;
|
|
104
563
|
}
|
|
105
|
-
},
|
|
564
|
+
}, $e = class e extends B {
|
|
106
565
|
constructor(e, t, n) {
|
|
107
|
-
super(e), this.element = t, this.container = this._lookupContainer(), this.parent = n, this.reversedX = !1, this.childPopup = null, this.blurable = !1, this.blurCallback = null, this.blurEventsBound = !1, this.renderedCallback = null, this.
|
|
566
|
+
super(e), this.element = t, this.container = this._lookupContainer(), this.parent = n, this.reversedX = !1, this.childPopup = null, this.blurable = !1, this.blurCallback = null, this.blurEventsBound = !1, this.renderedCallback = null, this.offset = {
|
|
567
|
+
top: null,
|
|
568
|
+
right: null,
|
|
569
|
+
bottom: null,
|
|
570
|
+
left: null
|
|
571
|
+
}, this.visible = !1, this.hideable = !0, this.element.classList.add("tabulator-popup-container"), this.blurEvent = this.hide.bind(this, !1), this.escEvent = this._escapeCheck.bind(this), this.destroyBinding = this.tableDestroyed.bind(this), this.destroyed = !1;
|
|
108
572
|
}
|
|
109
573
|
tableDestroyed() {
|
|
110
574
|
this.destroyed = !0, this.hide(!0);
|
|
@@ -120,68 +584,92 @@ var e = class {
|
|
|
120
584
|
this.renderedCallback = e;
|
|
121
585
|
}
|
|
122
586
|
containerEventCoords(e) {
|
|
123
|
-
var
|
|
587
|
+
var t = !(e instanceof MouseEvent), n = t ? e.touches[0].pageX : e.pageX, r = t ? e.touches[0].pageY : e.pageY;
|
|
124
588
|
if (this.container !== document.body) {
|
|
125
|
-
let e =
|
|
126
|
-
|
|
589
|
+
let e = V.elOffset(this.container);
|
|
590
|
+
n -= e.left, r -= e.top;
|
|
127
591
|
}
|
|
128
592
|
return {
|
|
129
|
-
x:
|
|
130
|
-
y:
|
|
593
|
+
x: n,
|
|
594
|
+
y: r
|
|
131
595
|
};
|
|
132
596
|
}
|
|
133
|
-
elementPositionCoords(e,
|
|
134
|
-
var
|
|
135
|
-
switch (this.container !== document.body && (
|
|
597
|
+
elementPositionCoords(e, t = "right") {
|
|
598
|
+
var n = V.elOffset(e), r, i, a;
|
|
599
|
+
switch (this.container !== document.body && (r = V.elOffset(this.container), n.left -= r.left, n.top -= r.top), t) {
|
|
136
600
|
case "right":
|
|
137
|
-
|
|
601
|
+
i = n.left + e.offsetWidth, a = n.top - 1;
|
|
138
602
|
break;
|
|
139
603
|
case "bottom":
|
|
140
|
-
|
|
604
|
+
i = n.left, a = n.top + e.offsetHeight;
|
|
141
605
|
break;
|
|
142
606
|
case "left":
|
|
143
|
-
|
|
607
|
+
i = n.left, a = n.top - 1;
|
|
144
608
|
break;
|
|
145
609
|
case "top":
|
|
146
|
-
|
|
147
|
-
break;
|
|
148
|
-
case "center":
|
|
149
|
-
a = r.left + e.offsetWidth / 2, o = r.top + e.offsetHeight / 2;
|
|
610
|
+
i = n.left, a = n.top;
|
|
150
611
|
break;
|
|
612
|
+
case "center": i = n.left + e.offsetWidth / 2, a = n.top + e.offsetHeight / 2;
|
|
151
613
|
}
|
|
152
614
|
return {
|
|
153
|
-
x:
|
|
154
|
-
y:
|
|
155
|
-
offset:
|
|
615
|
+
x: i,
|
|
616
|
+
y: a,
|
|
617
|
+
offset: n
|
|
156
618
|
};
|
|
157
619
|
}
|
|
158
620
|
show(e, t) {
|
|
159
|
-
var n, r
|
|
160
|
-
|
|
621
|
+
var n, r;
|
|
622
|
+
if (this.destroyed || this.table.destroyed) return this;
|
|
623
|
+
this.parent || (this.reversedX = !1), e instanceof HTMLElement ? (n = e, r = this.elementPositionCoords(e, t).offset) : typeof e == "number" && (r = {
|
|
161
624
|
top: 0,
|
|
162
625
|
left: 0
|
|
163
|
-
}
|
|
626
|
+
});
|
|
627
|
+
let i = this.resolveCoordsByOrigin(e, t);
|
|
628
|
+
return this.offset.top = i.y, this.offset.left = i.x, this.offset.right = null, this.applyOffset(), this.container.appendChild(this.element), typeof this.renderedCallback == "function" && this.renderedCallback(), this._fitToScreen(i.x, i.y, n, r, t), this.visible = !0, this.subscribe("table-destroy", this.destroyBinding), this.element.addEventListener("mousedown", (e) => {
|
|
164
629
|
e.stopPropagation();
|
|
165
|
-
}), this
|
|
630
|
+
}), this;
|
|
631
|
+
}
|
|
632
|
+
resolveCoordsByOrigin(e, t) {
|
|
633
|
+
if (e instanceof HTMLElement) {
|
|
634
|
+
let n = this.elementPositionCoords(e, t);
|
|
635
|
+
return {
|
|
636
|
+
x: n.x,
|
|
637
|
+
y: n.y
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
return typeof e == "number" ? {
|
|
641
|
+
x: e,
|
|
642
|
+
y: t
|
|
643
|
+
} : this.containerEventCoords(e);
|
|
644
|
+
}
|
|
645
|
+
_elementWidth() {
|
|
646
|
+
return this.element.getBoundingClientRect().width || this.element.offsetWidth;
|
|
647
|
+
}
|
|
648
|
+
_elementHeight() {
|
|
649
|
+
return this.element.getBoundingClientRect().height || this.element.offsetHeight;
|
|
166
650
|
}
|
|
167
651
|
_fitToScreen(e, t, n, r, i) {
|
|
168
|
-
var a = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop;
|
|
169
|
-
(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
let e = this.element.offsetHeight;
|
|
179
|
-
if (e > o) this.element.style.top = "0px", this.element.style.height = o + "px";
|
|
652
|
+
var a = this.container === document.body ? document.documentElement.scrollTop : this.container.scrollTop, o = this.container === document.body ? document.documentElement.scrollLeft : this.container.scrollLeft, s = this.container === document.body ? o : 0, c = this.container === document.body ? o + document.documentElement.clientWidth : this.container.offsetWidth, l = this.container === document.body ? a : 0, u = this.container === document.body ? a + document.documentElement.clientHeight : Math.max(this.container.offsetHeight, a ? this.container.scrollHeight : 0), d = this._elementWidth(), f = e;
|
|
653
|
+
if ((f + d > c || this.reversedX) && (f = n && i === "right" ? r.left - d : n && i === "left" ? r.left + n.offsetWidth : n ? r.left - d : c - d, this.reversedX = !0), f + d > c && (f = c - d), f < s && (f = s), this.offset.left = f, this.offset.right = null, t + this._elementHeight() > u) {
|
|
654
|
+
if (n) switch (i) {
|
|
655
|
+
case "bottom":
|
|
656
|
+
this.offset.top = this.offset.top - this._elementHeight() - n.offsetHeight - 1;
|
|
657
|
+
break;
|
|
658
|
+
default: this.offset.top = this.offset.top - this._elementHeight() + n.offsetHeight + 1;
|
|
659
|
+
}
|
|
180
660
|
else {
|
|
181
|
-
let
|
|
182
|
-
|
|
661
|
+
let e = this._elementHeight();
|
|
662
|
+
if (e > u - l) this.offset.top = l, this.element.style.height = u - l + "px";
|
|
663
|
+
else {
|
|
664
|
+
let n = t - e;
|
|
665
|
+
n < l && (n = u - e), this.offset.top = n;
|
|
666
|
+
}
|
|
183
667
|
}
|
|
184
668
|
}
|
|
669
|
+
this.offset.top + this._elementHeight() > u && (this.offset.top = u - this._elementHeight()), this.offset.top < l && (this.offset.top = l), this.applyOffset();
|
|
670
|
+
}
|
|
671
|
+
applyOffset() {
|
|
672
|
+
this.element.style.top = this.offset.top == null ? "" : this.offset.top + "px", this.element.style.right = this.offset.right == null ? "" : this.offset.right + "px", this.element.style.bottom = this.offset.bottom == null ? "" : this.offset.bottom + "px", this.element.style.left = this.offset.left == null ? "" : this.offset.left + "px";
|
|
185
673
|
}
|
|
186
674
|
isVisible() {
|
|
187
675
|
return this.visible;
|
|
@@ -203,10 +691,10 @@ var e = class {
|
|
|
203
691
|
hide(e = !1) {
|
|
204
692
|
return this.visible && this.hideable && (this.blurable && this.blurEventsBound && (document.body.removeEventListener("keydown", this.escEvent), document.body.removeEventListener("click", this.blurEvent), document.body.removeEventListener("contextmenu", this.blurEvent), document.body.removeEventListener("mousedown", this.blurEvent), window.removeEventListener("resize", this.blurEvent), this.table.rowManager.element.removeEventListener("scroll", this.blurEvent), this.unsubscribe("cell-editing", this.blurEvent), this.blurEventsBound = !1), this.childPopup && this.childPopup.hide(), this.parent && (this.parent.childPopup = null), this.element.parentNode && this.element.parentNode.removeChild(this.element), this.visible = !1, this.blurCallback && !e && this.blurCallback(), this.unsubscribe("table-destroy", this.destroyBinding)), this;
|
|
205
693
|
}
|
|
206
|
-
child(
|
|
207
|
-
return this.childPopup && this.childPopup.hide(), this.childPopup = new
|
|
694
|
+
child(t) {
|
|
695
|
+
return this.childPopup && this.childPopup.hide(), this.childPopup = new e(this.table, t, this), this.childPopup;
|
|
208
696
|
}
|
|
209
|
-
},
|
|
697
|
+
}, H = class extends B {
|
|
210
698
|
constructor(e, t) {
|
|
211
699
|
super(e), this._handler = null;
|
|
212
700
|
}
|
|
@@ -249,7 +737,7 @@ var e = class {
|
|
|
249
737
|
return this.table.footerManager.remove(e);
|
|
250
738
|
}
|
|
251
739
|
popup(e, t) {
|
|
252
|
-
return new
|
|
740
|
+
return new $e(this.table, e, t);
|
|
253
741
|
}
|
|
254
742
|
alert(e, t) {
|
|
255
743
|
return this.table.alertManager.alert(e, t);
|
|
@@ -258,28 +746,28 @@ var e = class {
|
|
|
258
746
|
return this.table.alertManager.clear();
|
|
259
747
|
}
|
|
260
748
|
};
|
|
261
|
-
function
|
|
749
|
+
function U(e, t) {
|
|
262
750
|
var n = [];
|
|
263
751
|
if (t ||= "", Array.isArray(e)) e.forEach((e, r) => {
|
|
264
|
-
n = n.concat(
|
|
752
|
+
n = n.concat(U(e, t ? t + "[" + r + "]" : r));
|
|
265
753
|
});
|
|
266
|
-
else if (typeof e == "object") for (var r in e) n = n.concat(
|
|
754
|
+
else if (typeof e == "object") for (var r in e) n = n.concat(U(e[r], t ? t + "[" + r + "]" : r));
|
|
267
755
|
else n.push({
|
|
268
756
|
key: t,
|
|
269
757
|
value: e
|
|
270
758
|
});
|
|
271
759
|
return n;
|
|
272
760
|
}
|
|
273
|
-
function
|
|
274
|
-
var t =
|
|
761
|
+
function et(e) {
|
|
762
|
+
var t = U(e), n = [];
|
|
275
763
|
return t.forEach(function(e) {
|
|
276
764
|
n.push(encodeURIComponent(e.key) + "=" + encodeURIComponent(e.value));
|
|
277
765
|
}), n.join("&");
|
|
278
766
|
}
|
|
279
|
-
function
|
|
280
|
-
return e && n && Object.keys(n).length && (!t.method || t.method.toLowerCase() == "get") && (t.method = "get", e += (e.includes("?") ? "&" : "?") +
|
|
767
|
+
function tt(e, t, n) {
|
|
768
|
+
return e && n && Object.keys(n).length && (!t.method || t.method.toLowerCase() == "get") && (t.method = "get", e += (e.includes("?") ? "&" : "?") + et(n)), e;
|
|
281
769
|
}
|
|
282
|
-
var
|
|
770
|
+
var nt = class {
|
|
283
771
|
constructor(e) {
|
|
284
772
|
return this._cell = e, new Proxy(this, { get: function(e, t, n) {
|
|
285
773
|
return e[t] === void 0 ? e._cell.table.componentFunctionBinder.handle("cell", e._cell, t) : e[t];
|
|
@@ -330,7 +818,7 @@ var s = class {
|
|
|
330
818
|
_getSelf() {
|
|
331
819
|
return this._cell;
|
|
332
820
|
}
|
|
333
|
-
},
|
|
821
|
+
}, rt = class extends B {
|
|
334
822
|
constructor(e, t) {
|
|
335
823
|
super(e.table), this.table = e.table, this.column = e, this.row = t, this.element = null, this.value = null, this.initialValue, this.oldValue = null, this.modules = {}, this.height = null, this.width = null, this.minWidth = null, this.component = null, this.loaded = !1, this.build();
|
|
336
824
|
}
|
|
@@ -434,9 +922,9 @@ var s = class {
|
|
|
434
922
|
return this.row.getCellIndex(this);
|
|
435
923
|
}
|
|
436
924
|
getComponent() {
|
|
437
|
-
return this.component ||= new
|
|
925
|
+
return this.component ||= new nt(this), this.component;
|
|
438
926
|
}
|
|
439
|
-
},
|
|
927
|
+
}, it = class {
|
|
440
928
|
constructor(e) {
|
|
441
929
|
return this._column = e, this.type = "ColumnComponent", new Proxy(this, { get: function(e, t, n) {
|
|
442
930
|
return e[t] === void 0 ? e._column.table.componentFunctionBinder.handle("column", e._column, t) : e[t];
|
|
@@ -519,7 +1007,7 @@ var s = class {
|
|
|
519
1007
|
var t = e === !0 ? this._column.reinitializeWidth(!0) : this._column.setWidth(e);
|
|
520
1008
|
return this._column.table.columnManager.rerenderColumns(!0), t;
|
|
521
1009
|
}
|
|
522
|
-
},
|
|
1010
|
+
}, at = {
|
|
523
1011
|
title: void 0,
|
|
524
1012
|
field: void 0,
|
|
525
1013
|
columns: void 0,
|
|
@@ -536,11 +1024,11 @@ var s = class {
|
|
|
536
1024
|
headerHozAlign: void 0,
|
|
537
1025
|
headerWordWrap: !1,
|
|
538
1026
|
editableTitle: void 0
|
|
539
|
-
},
|
|
540
|
-
static defaultOptionList =
|
|
541
|
-
constructor(
|
|
542
|
-
super(n.table), this.definition =
|
|
543
|
-
var r = new t
|
|
1027
|
+
}, W = class e extends B {
|
|
1028
|
+
static defaultOptionList = at;
|
|
1029
|
+
constructor(t, n, r) {
|
|
1030
|
+
super(n.table), this.definition = t, this.parent = n, this.type = "column", this.columns = [], this.cells = [], this.isGroup = !1, this.isRowHeader = r, this.element = this.createElement(), this.contentElement = !1, this.titleHolderElement = !1, this.titleElement = !1, this.groupElement = this.createGroupElement(), this.hozAlign = "", this.vertAlign = "", this.field = "", this.fieldStructure = "", this.getFieldValue = "", this.setFieldValue = "", this.titleDownload = null, this.titleFormatterRendered = !1, this.mapDefinitions(), this.setField(this.definition.field), this.modules = {}, this.width = null, this.widthStyled = "", this.maxWidth = null, this.maxWidthStyled = "", this.maxInitialWidth = null, this.minWidth = null, this.minWidthStyled = "", this.widthFixed = !1, this.visible = !0, this.component = null, this.definition.columns ? (this.isGroup = !0, this.definition.columns.forEach((t, n) => {
|
|
1031
|
+
var r = new e(t, this);
|
|
544
1032
|
this.attachColumn(r);
|
|
545
1033
|
}), this.checkColumnVisibility()) : n.registerColumnField(this), this._initialize();
|
|
546
1034
|
}
|
|
@@ -550,9 +1038,7 @@ var s = class {
|
|
|
550
1038
|
case "middle":
|
|
551
1039
|
e.style.justifyContent = "center";
|
|
552
1040
|
break;
|
|
553
|
-
case "bottom":
|
|
554
|
-
e.style.justifyContent = "flex-end";
|
|
555
|
-
break;
|
|
1041
|
+
case "bottom": e.style.justifyContent = "flex-end";
|
|
556
1042
|
}
|
|
557
1043
|
return e;
|
|
558
1044
|
}
|
|
@@ -561,13 +1047,13 @@ var s = class {
|
|
|
561
1047
|
return e.classList.add("tabulator-col-group-cols"), e;
|
|
562
1048
|
}
|
|
563
1049
|
mapDefinitions() {
|
|
564
|
-
var
|
|
565
|
-
if (
|
|
566
|
-
this.definition = this.table.columnManager.optionsList.generate(
|
|
1050
|
+
var t = this.table.options.columnDefaults;
|
|
1051
|
+
if (t) for (let e in t) this.definition[e] === void 0 && (this.definition[e] = t[e]);
|
|
1052
|
+
this.definition = this.table.columnManager.optionsList.generate(e.defaultOptionList, this.definition);
|
|
567
1053
|
}
|
|
568
1054
|
checkDefinition() {
|
|
569
|
-
Object.keys(this.definition).forEach((
|
|
570
|
-
|
|
1055
|
+
Object.keys(this.definition).forEach((t) => {
|
|
1056
|
+
e.defaultOptionList.indexOf(t) === -1 && console.warn("Invalid column definition option in '" + (this.field || this.definition.title) + "' column:", t);
|
|
571
1057
|
});
|
|
572
1058
|
}
|
|
573
1059
|
setField(e) {
|
|
@@ -652,8 +1138,10 @@ var s = class {
|
|
|
652
1138
|
var n = e, r = this.fieldStructure, i = r.length;
|
|
653
1139
|
for (let e = 0; e < i; e++) if (e == i - 1) n[r[e]] = t;
|
|
654
1140
|
else {
|
|
655
|
-
if (!n[r[e]])
|
|
656
|
-
|
|
1141
|
+
if (!n[r[e]]) {
|
|
1142
|
+
if (t !== void 0) n[r[e]] = {};
|
|
1143
|
+
else break;
|
|
1144
|
+
}
|
|
657
1145
|
n = n[r[e]];
|
|
658
1146
|
}
|
|
659
1147
|
}
|
|
@@ -788,7 +1276,7 @@ var s = class {
|
|
|
788
1276
|
this.titleFormatterRendered && this.titleFormatterRendered(), this.dispatch("column-rendered", this);
|
|
789
1277
|
}
|
|
790
1278
|
generateCell(e) {
|
|
791
|
-
var t = new
|
|
1279
|
+
var t = new rt(this, e);
|
|
792
1280
|
return this.cells.push(t), t;
|
|
793
1281
|
}
|
|
794
1282
|
nextColumn() {
|
|
@@ -834,15 +1322,15 @@ var s = class {
|
|
|
834
1322
|
t > -1 && this.cells.splice(t, 1);
|
|
835
1323
|
}
|
|
836
1324
|
getComponent() {
|
|
837
|
-
return this.component ||= new
|
|
1325
|
+
return this.component ||= new it(this), this.component;
|
|
838
1326
|
}
|
|
839
1327
|
getPosition() {
|
|
840
1328
|
return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this) + 1;
|
|
841
1329
|
}
|
|
842
1330
|
getParentComponent() {
|
|
843
|
-
return this.parent instanceof
|
|
1331
|
+
return this.parent instanceof e && this.parent.getComponent();
|
|
844
1332
|
}
|
|
845
|
-
},
|
|
1333
|
+
}, ot = class {
|
|
846
1334
|
constructor(e) {
|
|
847
1335
|
return this._row = e, new Proxy(this, { get: function(e, t, n) {
|
|
848
1336
|
return e[t] === void 0 ? e._row.table.componentFunctionBinder.handle("row", e._row, t) : e[t];
|
|
@@ -905,7 +1393,8 @@ var s = class {
|
|
|
905
1393
|
var e = this._row.prevRow();
|
|
906
1394
|
return e && e.getComponent();
|
|
907
1395
|
}
|
|
908
|
-
},
|
|
1396
|
+
}, G = class e extends B {
|
|
1397
|
+
static rowTemplate = e.createRowTemplate();
|
|
909
1398
|
constructor(e, t, n = "row") {
|
|
910
1399
|
super(t.table), this.parent = t, this.data = {}, this.type = n, this.element = !1, this.modules = {}, this.cells = [], this.height = 0, this.heightStyled = "", this.manualHeight = !1, this.outerHeight = 0, this.initialized = !1, this.heightInitialized = !1, this.position = 0, this.positionWatchers = [], this.component = null, this.created = !1, this.setData(e);
|
|
911
1400
|
}
|
|
@@ -913,8 +1402,7 @@ var s = class {
|
|
|
913
1402
|
this.created || (this.created = !0, this.generateElement());
|
|
914
1403
|
}
|
|
915
1404
|
createElement() {
|
|
916
|
-
|
|
917
|
-
e.classList.add("tabulator-row"), e.setAttribute("role", "row"), this.element = e;
|
|
1405
|
+
this.element = e.rowTemplate.cloneNode(!1);
|
|
918
1406
|
}
|
|
919
1407
|
getElement() {
|
|
920
1408
|
return this.create(), this.element;
|
|
@@ -953,7 +1441,7 @@ var s = class {
|
|
|
953
1441
|
}
|
|
954
1442
|
calcHeight(e) {
|
|
955
1443
|
var t = 0, n = 0;
|
|
956
|
-
this.table.options.rowHeight ? this.height = this.table.options.rowHeight : (n = this.calcMinHeight(), t = this.calcMaxHeight(),
|
|
1444
|
+
this.table.options.rowHeight ? this.height = this.table.options.rowHeight : (n = this.calcMinHeight(), t = this.calcMaxHeight(), this.height = e ? Math.max(t, n) : this.manualHeight ? this.height : Math.max(t, n)), this.heightStyled = this.height ? this.height + "px" : "", this.outerHeight = this.element.offsetHeight;
|
|
957
1445
|
}
|
|
958
1446
|
calcMinHeight() {
|
|
959
1447
|
return this.table.options.resizableRows ? this.element.clientHeight : 0;
|
|
@@ -995,25 +1483,25 @@ var s = class {
|
|
|
995
1483
|
this.data = this.chain("row-data-init-before", [this, e], void 0, e), this.dispatch("row-data-init-after", this);
|
|
996
1484
|
}
|
|
997
1485
|
updateData(e) {
|
|
998
|
-
var
|
|
999
|
-
return new Promise((
|
|
1000
|
-
typeof e == "string" && (e = JSON.parse(e)), this.dispatch("row-data-save-before", this), this.subscribed("row-data-changing") && (
|
|
1486
|
+
var t = this.element && V.elVisible(this.element), n = {}, r;
|
|
1487
|
+
return new Promise((i, a) => {
|
|
1488
|
+
typeof e == "string" && (e = JSON.parse(e)), this.dispatch("row-data-save-before", this), this.subscribed("row-data-changing") && (n = Object.assign(n, this.data), n = Object.assign(n, e)), r = this.chain("row-data-changing", [
|
|
1001
1489
|
this,
|
|
1002
|
-
|
|
1490
|
+
n,
|
|
1003
1491
|
e
|
|
1004
1492
|
], null, e);
|
|
1005
1493
|
let o = [];
|
|
1006
1494
|
for (let t in e) this.table.columnManager.getColumnsByFieldRoot(t).forEach((e) => {
|
|
1007
1495
|
let t = this.getCell(e.getField());
|
|
1008
1496
|
if (t) {
|
|
1009
|
-
let n = e.getFieldValue(
|
|
1497
|
+
let n = e.getFieldValue(r);
|
|
1010
1498
|
t.getValue() !== n && o.push([t, n]);
|
|
1011
1499
|
}
|
|
1012
1500
|
});
|
|
1013
|
-
for (let e in
|
|
1014
|
-
this.dispatch("row-data-save-after", this), o.forEach(([e,
|
|
1015
|
-
e.setValueProcessData(
|
|
1016
|
-
}),
|
|
1501
|
+
for (let e in r) this.data[e] = r[e];
|
|
1502
|
+
this.dispatch("row-data-save-after", this), o.forEach(([e, n]) => {
|
|
1503
|
+
e.setValueProcessData(n), t && e.cellRendered();
|
|
1504
|
+
}), t ? (this.normalizeHeight(!0), this.table.options.rowFormatter && this.table.options.rowFormatter(this.getComponent())) : (this.initialized = !1, this.height = 0, this.heightStyled = ""), this.dispatch("row-data-changed", this, t, e), this.dispatchExternal("rowUpdated", this.getComponent()), this.subscribedExternal("dataChanged") && this.dispatchExternal("dataChanged", this.table.rowManager.getData()), i();
|
|
1017
1505
|
});
|
|
1018
1506
|
}
|
|
1019
1507
|
getData(e) {
|
|
@@ -1084,10 +1572,14 @@ var s = class {
|
|
|
1084
1572
|
return this.modules.group || !1;
|
|
1085
1573
|
}
|
|
1086
1574
|
getComponent() {
|
|
1087
|
-
return this.component ||= new
|
|
1575
|
+
return this.component ||= new ot(this), this.component;
|
|
1576
|
+
}
|
|
1577
|
+
static createRowTemplate() {
|
|
1578
|
+
let e = document.createElement("div");
|
|
1579
|
+
return e.classList.add("tabulator-row"), e.setAttribute("role", "row"), e;
|
|
1088
1580
|
}
|
|
1089
1581
|
};
|
|
1090
|
-
function
|
|
1582
|
+
function st(e, t = {}, n) {
|
|
1091
1583
|
var r = t.delimiter ? t.delimiter : ",", i = [], a = [];
|
|
1092
1584
|
e.forEach((e) => {
|
|
1093
1585
|
var t = [];
|
|
@@ -1103,25 +1595,21 @@ function m(e, t = {}, n) {
|
|
|
1103
1595
|
e && e.depth === 1 && (a[t] = e.value === void 0 || e.value === null ? "" : "\"" + String(e.value).split("\"").join("\"\"") + "\"");
|
|
1104
1596
|
});
|
|
1105
1597
|
break;
|
|
1106
|
-
case "row":
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
case "undefined":
|
|
1114
|
-
e.value = "";
|
|
1115
|
-
break;
|
|
1116
|
-
}
|
|
1117
|
-
t.push("\"" + String(e.value).split("\"").join("\"\"") + "\"");
|
|
1598
|
+
case "row": e.columns.forEach((e) => {
|
|
1599
|
+
if (e) {
|
|
1600
|
+
switch (typeof e.value) {
|
|
1601
|
+
case "object":
|
|
1602
|
+
e.value = e.value === null ? "" : JSON.stringify(e.value);
|
|
1603
|
+
break;
|
|
1604
|
+
case "undefined": e.value = "";
|
|
1118
1605
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1606
|
+
t.push("\"" + String(e.value).split("\"").join("\"\"") + "\"");
|
|
1607
|
+
}
|
|
1608
|
+
}), i.push(t.join(r));
|
|
1121
1609
|
}
|
|
1122
1610
|
}), a.length && i.unshift(a.join(r)), i = i.join("\n"), t.bom && (i = "" + i), n(i, "text/csv");
|
|
1123
1611
|
}
|
|
1124
|
-
function
|
|
1612
|
+
function ct(e, t, n) {
|
|
1125
1613
|
var r = [];
|
|
1126
1614
|
e.forEach((e) => {
|
|
1127
1615
|
var t = {};
|
|
@@ -1133,15 +1621,13 @@ function h(e, t, n) {
|
|
|
1133
1621
|
case "calc":
|
|
1134
1622
|
console.warn("Download Warning - JSON downloader cannot process column calculations");
|
|
1135
1623
|
break;
|
|
1136
|
-
case "row":
|
|
1137
|
-
e.
|
|
1138
|
-
|
|
1139
|
-
}), r.push(t);
|
|
1140
|
-
break;
|
|
1624
|
+
case "row": e.columns.forEach((e) => {
|
|
1625
|
+
e && (t[e.component.getTitleDownload() || e.component.getField()] = e.value);
|
|
1626
|
+
}), r.push(t);
|
|
1141
1627
|
}
|
|
1142
1628
|
}), r = JSON.stringify(r, null, " "), n(r, "application/json");
|
|
1143
1629
|
}
|
|
1144
|
-
function
|
|
1630
|
+
function lt(e, t = {}, n) {
|
|
1145
1631
|
var r = [], i = [], a = {}, o = t.rowGroupStyles || {
|
|
1146
1632
|
fontStyle: "bold",
|
|
1147
1633
|
fontSize: 12,
|
|
@@ -1164,9 +1650,7 @@ function g(e, t = {}, n) {
|
|
|
1164
1650
|
case "calc":
|
|
1165
1651
|
i.push(f(e, s));
|
|
1166
1652
|
break;
|
|
1167
|
-
case "row":
|
|
1168
|
-
i.push(f(e));
|
|
1169
|
-
break;
|
|
1653
|
+
case "row": i.push(f(e));
|
|
1170
1654
|
}
|
|
1171
1655
|
});
|
|
1172
1656
|
function f(e, t) {
|
|
@@ -1178,9 +1662,7 @@ function g(e, t = {}, n) {
|
|
|
1178
1662
|
case "object":
|
|
1179
1663
|
e.value = e.value === null ? "" : JSON.stringify(e.value);
|
|
1180
1664
|
break;
|
|
1181
|
-
case "undefined":
|
|
1182
|
-
e.value = "";
|
|
1183
|
-
break;
|
|
1665
|
+
case "undefined": e.value = "";
|
|
1184
1666
|
}
|
|
1185
1667
|
r = {
|
|
1186
1668
|
content: e.value,
|
|
@@ -1194,27 +1676,27 @@ function g(e, t = {}, n) {
|
|
|
1194
1676
|
d.text(l, 40, 30);
|
|
1195
1677
|
}), a.head = r, a.body = i, d.autoTable(a), t.documentProcessing && t.documentProcessing(d), n(d.output("arraybuffer"), "application/pdf");
|
|
1196
1678
|
}
|
|
1197
|
-
function
|
|
1198
|
-
var
|
|
1679
|
+
function ut(e, t, n) {
|
|
1680
|
+
var r = this, i = t.sheetName || "Sheet1", a = this.dependencyRegistry.lookup("XLSX"), o = a.utils.book_new(), s = new B(this), c = "compress" in t ? t.compress : !0, l = t.writeOptions || {
|
|
1199
1681
|
bookType: "xlsx",
|
|
1200
1682
|
bookSST: !0,
|
|
1201
|
-
compression:
|
|
1202
|
-
},
|
|
1203
|
-
|
|
1204
|
-
function
|
|
1205
|
-
var
|
|
1683
|
+
compression: c
|
|
1684
|
+
}, u;
|
|
1685
|
+
l.type = "binary", o.SheetNames = [], o.Sheets = {};
|
|
1686
|
+
function d() {
|
|
1687
|
+
var t = [], n = [], r = {}, i = {
|
|
1206
1688
|
s: {
|
|
1207
1689
|
c: 0,
|
|
1208
1690
|
r: 0
|
|
1209
1691
|
},
|
|
1210
1692
|
e: {
|
|
1211
|
-
c:
|
|
1212
|
-
r:
|
|
1693
|
+
c: e[0] ? e[0].columns.reduce((e, t) => e + (t && t.width ? t.width : 1), 0) : 0,
|
|
1694
|
+
r: e.length
|
|
1213
1695
|
}
|
|
1214
1696
|
};
|
|
1215
|
-
return
|
|
1697
|
+
return e.forEach((e, r) => {
|
|
1216
1698
|
var i = [];
|
|
1217
|
-
|
|
1699
|
+
e.columns.forEach(function(e, t) {
|
|
1218
1700
|
e ? (i.push(!(e.value instanceof Date) && typeof e.value == "object" ? JSON.stringify(e.value) : e.value), (e.width > 1 || e.height > -1) && (e.height > 1 || e.width > 1) && n.push({
|
|
1219
1701
|
s: {
|
|
1220
1702
|
r,
|
|
@@ -1225,33 +1707,33 @@ function _(t, n, r) {
|
|
|
1225
1707
|
c: t + e.width - 1
|
|
1226
1708
|
}
|
|
1227
1709
|
})) : i.push("");
|
|
1228
|
-
}),
|
|
1229
|
-
}),
|
|
1710
|
+
}), t.push(i);
|
|
1711
|
+
}), a.utils.sheet_add_aoa(r, t), r["!ref"] = a.utils.encode_range(i), n.length && (r["!merges"] = n), r;
|
|
1230
1712
|
}
|
|
1231
|
-
if (
|
|
1232
|
-
|
|
1713
|
+
if (t.sheetOnly) {
|
|
1714
|
+
n(d());
|
|
1233
1715
|
return;
|
|
1234
1716
|
}
|
|
1235
|
-
if (
|
|
1717
|
+
if (t.sheets) for (var f in t.sheets) t.sheets[f] === !0 ? (o.SheetNames.push(f), o.Sheets[f] = d()) : (o.SheetNames.push(f), s.commsSend(t.sheets[f], "download", "intercept", {
|
|
1236
1718
|
type: "xlsx",
|
|
1237
1719
|
options: { sheetOnly: !0 },
|
|
1238
|
-
active:
|
|
1720
|
+
active: r.active,
|
|
1239
1721
|
intercept: function(e) {
|
|
1240
|
-
|
|
1722
|
+
o.Sheets[f] = e;
|
|
1241
1723
|
}
|
|
1242
1724
|
}));
|
|
1243
|
-
else
|
|
1244
|
-
|
|
1245
|
-
function
|
|
1725
|
+
else o.SheetNames.push(i), o.Sheets[i] = d();
|
|
1726
|
+
t.documentProcessing && (o = t.documentProcessing(o));
|
|
1727
|
+
function p(e) {
|
|
1246
1728
|
for (var t = new ArrayBuffer(e.length), n = new Uint8Array(t), r = 0; r != e.length; ++r) n[r] = e.charCodeAt(r) & 255;
|
|
1247
1729
|
return t;
|
|
1248
1730
|
}
|
|
1249
|
-
|
|
1731
|
+
u = a.write(o, l), n(p(u), "application/octet-stream");
|
|
1250
1732
|
}
|
|
1251
|
-
function
|
|
1733
|
+
function dt(e, t, n) {
|
|
1252
1734
|
this.modExists("export", !0) && n(this.modules.export.generateHTMLTable(e), "text/html");
|
|
1253
1735
|
}
|
|
1254
|
-
function
|
|
1736
|
+
function ft(e, t, n) {
|
|
1255
1737
|
let r = [];
|
|
1256
1738
|
e.forEach((e) => {
|
|
1257
1739
|
let t = {};
|
|
@@ -1263,24 +1745,22 @@ function y(e, t, n) {
|
|
|
1263
1745
|
case "calc":
|
|
1264
1746
|
console.warn("Download Warning - JSON downloader cannot process column calculations");
|
|
1265
1747
|
break;
|
|
1266
|
-
case "row":
|
|
1267
|
-
e.
|
|
1268
|
-
|
|
1269
|
-
}), r.push(JSON.stringify(t));
|
|
1270
|
-
break;
|
|
1748
|
+
case "row": e.columns.forEach((e) => {
|
|
1749
|
+
e && (t[e.component.getTitleDownload() || e.component.getField()] = e.value);
|
|
1750
|
+
}), r.push(JSON.stringify(t));
|
|
1271
1751
|
}
|
|
1272
1752
|
}), n(r.join("\n"), "application/x-ndjson");
|
|
1273
1753
|
}
|
|
1274
|
-
var
|
|
1275
|
-
csv:
|
|
1276
|
-
json:
|
|
1277
|
-
jsonLines:
|
|
1278
|
-
pdf:
|
|
1279
|
-
xlsx:
|
|
1280
|
-
html:
|
|
1281
|
-
},
|
|
1754
|
+
var pt = {
|
|
1755
|
+
csv: st,
|
|
1756
|
+
json: ct,
|
|
1757
|
+
jsonLines: ft,
|
|
1758
|
+
pdf: lt,
|
|
1759
|
+
xlsx: ut,
|
|
1760
|
+
html: dt
|
|
1761
|
+
}, mt = class e extends H {
|
|
1282
1762
|
static moduleName = "download";
|
|
1283
|
-
static downloaders =
|
|
1763
|
+
static downloaders = pt;
|
|
1284
1764
|
constructor(e) {
|
|
1285
1765
|
super(e), this.registerTableOption("downloadEncoder", function(e, t) {
|
|
1286
1766
|
return new Blob([e], { type: t });
|
|
@@ -1315,14 +1795,10 @@ var b = {
|
|
|
1315
1795
|
o && (i ? window.open(window.URL.createObjectURL(o)) : (r ||= "Tabulator." + (typeof n == "function" ? "txt" : n), navigator.msSaveOrOpenBlob ? navigator.msSaveOrOpenBlob(o, r) : (a.setAttribute("href", window.URL.createObjectURL(o)), a.setAttribute("download", r), a.style.display = "none", document.body.appendChild(a), a.click(), document.body.removeChild(a))), this.dispatchExternal("downloadComplete"));
|
|
1316
1796
|
}
|
|
1317
1797
|
commsReceived(e, t, n) {
|
|
1318
|
-
|
|
1319
|
-
case "intercept":
|
|
1320
|
-
this.download(n.type, "", n.options, n.active, n.intercept);
|
|
1321
|
-
break;
|
|
1322
|
-
}
|
|
1798
|
+
t === "intercept" && this.download(n.type, "", n.options, n.active, n.intercept);
|
|
1323
1799
|
}
|
|
1324
1800
|
};
|
|
1325
|
-
function
|
|
1801
|
+
function K(e, t) {
|
|
1326
1802
|
var n = t.mask, r = t.maskLetterChar === void 0 ? "A" : t.maskLetterChar, i = t.maskNumberChar === void 0 ? "9" : t.maskNumberChar, a = t.maskWildcardChar === void 0 ? "*" : t.maskWildcardChar;
|
|
1327
1803
|
function o(t) {
|
|
1328
1804
|
var s = n[t];
|
|
@@ -1347,7 +1823,7 @@ function S(e, t) {
|
|
|
1347
1823
|
n.key.length === 1 && t.maskAutoFill && o(e.value.length);
|
|
1348
1824
|
}), e.placeholder ||= n, t.maskAutoFill && o(e.value.length);
|
|
1349
1825
|
}
|
|
1350
|
-
function
|
|
1826
|
+
function ht(e, t, n, r, i) {
|
|
1351
1827
|
var a = e.getValue(), o = document.createElement("input");
|
|
1352
1828
|
if (o.setAttribute("type", i.search ? "search" : "text"), o.style.padding = "4px", o.style.width = "100%", o.style.boxSizing = "border-box", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), o.setAttribute(e, o.getAttribute(e) + i.elementAttributes["+" + e])) : o.setAttribute(e, i.elementAttributes[e]);
|
|
1353
1829
|
o.value = a === void 0 ? "" : a, t(function() {
|
|
@@ -1365,13 +1841,11 @@ function C(e, t, n, r, i) {
|
|
|
1365
1841
|
r();
|
|
1366
1842
|
break;
|
|
1367
1843
|
case "End":
|
|
1368
|
-
case "Home":
|
|
1369
|
-
e.stopPropagation();
|
|
1370
|
-
break;
|
|
1844
|
+
case "Home": e.stopPropagation();
|
|
1371
1845
|
}
|
|
1372
|
-
}), i.mask &&
|
|
1846
|
+
}), i.mask && K(o, i), o;
|
|
1373
1847
|
}
|
|
1374
|
-
function
|
|
1848
|
+
function gt(e, t, n, r, i) {
|
|
1375
1849
|
var a = e.getValue(), o = i.verticalNavigation || "hybrid", s = String(a ?? ""), c = document.createElement("textarea"), l = 0;
|
|
1376
1850
|
if (c.style.display = "block", c.style.padding = "2px", c.style.height = "100%", c.style.width = "100%", c.style.boxSizing = "border-box", c.style.whiteSpace = "pre-wrap", c.style.resize = "none", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), c.setAttribute(e, c.getAttribute(e) + i.elementAttributes["+" + e])) : c.setAttribute(e, i.elementAttributes[e]);
|
|
1377
1851
|
c.value = s, t(function() {
|
|
@@ -1401,13 +1875,11 @@ function w(e, t, n, r, i) {
|
|
|
1401
1875
|
(o == "editor" || o == "hybrid" && c.selectionStart !== c.value.length) && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1402
1876
|
break;
|
|
1403
1877
|
case "End":
|
|
1404
|
-
case "Home":
|
|
1405
|
-
e.stopPropagation();
|
|
1406
|
-
break;
|
|
1878
|
+
case "Home": e.stopPropagation();
|
|
1407
1879
|
}
|
|
1408
|
-
}), i.mask &&
|
|
1880
|
+
}), i.mask && K(c, i), c;
|
|
1409
1881
|
}
|
|
1410
|
-
function
|
|
1882
|
+
function _t(e, t, n, r, i) {
|
|
1411
1883
|
var a = e.getValue(), o = i.verticalNavigation || "editor", s = document.createElement("input");
|
|
1412
1884
|
if (s.setAttribute("type", "number"), i.max !== void 0 && s.setAttribute("max", i.max), i.min !== void 0 && s.setAttribute("min", i.min), i.step !== void 0 && s.setAttribute("step", i.step), s.style.padding = "4px", s.style.width = "100%", s.style.boxSizing = "border-box", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), s.setAttribute(e, s.getAttribute(e) + i.elementAttributes["+" + e])) : s.setAttribute(e, i.elementAttributes[e]);
|
|
1413
1885
|
s.value = a;
|
|
@@ -1434,13 +1906,11 @@ function T(e, t, n, r, i) {
|
|
|
1434
1906
|
o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1435
1907
|
break;
|
|
1436
1908
|
case "End":
|
|
1437
|
-
case "Home":
|
|
1438
|
-
e.stopPropagation();
|
|
1439
|
-
break;
|
|
1909
|
+
case "Home": e.stopPropagation();
|
|
1440
1910
|
}
|
|
1441
|
-
}), i.mask &&
|
|
1911
|
+
}), i.mask && K(s, i), s;
|
|
1442
1912
|
}
|
|
1443
|
-
function
|
|
1913
|
+
function vt(e, t, n, r, i) {
|
|
1444
1914
|
var a = e.getValue(), o = document.createElement("input");
|
|
1445
1915
|
if (o.setAttribute("type", "range"), i.max !== void 0 && o.setAttribute("max", i.max), i.min !== void 0 && o.setAttribute("min", i.min), i.step !== void 0 && o.setAttribute("step", i.step), o.style.padding = "4px", o.style.width = "100%", o.style.boxSizing = "border-box", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), o.setAttribute(e, o.getAttribute(e) + i.elementAttributes["+" + e])) : o.setAttribute(e, i.elementAttributes[e]);
|
|
1446
1916
|
o.value = a, t(function() {
|
|
@@ -1457,13 +1927,11 @@ function ee(e, t, n, r, i) {
|
|
|
1457
1927
|
case "Enter":
|
|
1458
1928
|
s();
|
|
1459
1929
|
break;
|
|
1460
|
-
case "Escape":
|
|
1461
|
-
r();
|
|
1462
|
-
break;
|
|
1930
|
+
case "Escape": r();
|
|
1463
1931
|
}
|
|
1464
1932
|
}), o;
|
|
1465
1933
|
}
|
|
1466
|
-
function
|
|
1934
|
+
function yt(e, t, n, r, i) {
|
|
1467
1935
|
var a = i.format, o = i.verticalNavigation || "editor", s = a ? window.DateTime || luxon.DateTime : null, c = e.getValue(), l = document.createElement("input");
|
|
1468
1936
|
function u(e) {
|
|
1469
1937
|
return (s.isDateTime(e) ? e : a === "x" ? s.fromMillis(e) : a === "iso" ? s.fromISO(String(e)) : s.fromFormat(String(e), a)).toFormat("yyyy-MM-dd");
|
|
@@ -1505,13 +1973,11 @@ function te(e, t, n, r, i) {
|
|
|
1505
1973
|
e.stopPropagation();
|
|
1506
1974
|
break;
|
|
1507
1975
|
case "ArrowUp":
|
|
1508
|
-
case "ArrowDown":
|
|
1509
|
-
o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1510
|
-
break;
|
|
1976
|
+
case "ArrowDown": o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1511
1977
|
}
|
|
1512
1978
|
}), l;
|
|
1513
1979
|
}
|
|
1514
|
-
function
|
|
1980
|
+
function bt(e, t, n, r, i) {
|
|
1515
1981
|
var a = i.format, o = i.verticalNavigation || "editor", s = a ? window.DateTime || luxon.DateTime : null, c, l = e.getValue(), u = document.createElement("input");
|
|
1516
1982
|
if (u.type = "time", u.style.padding = "4px", u.style.width = "100%", u.style.boxSizing = "border-box", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), u.setAttribute(e, u.getAttribute(e) + i.elementAttributes["+" + e])) : u.setAttribute(e, i.elementAttributes[e]);
|
|
1517
1983
|
l = l === void 0 ? "" : l, a && (s ? (c = s.isDateTime(l) ? l : a === "x" ? s.fromMillis(l) : a === "iso" ? s.fromISO(String(l)) : s.fromFormat(String(l), a), l = c.toFormat("HH:mm")) : console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")), u.value = l, t(function() {
|
|
@@ -1550,13 +2016,11 @@ function ne(e, t, n, r, i) {
|
|
|
1550
2016
|
e.stopPropagation();
|
|
1551
2017
|
break;
|
|
1552
2018
|
case "ArrowUp":
|
|
1553
|
-
case "ArrowDown":
|
|
1554
|
-
o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1555
|
-
break;
|
|
2019
|
+
case "ArrowDown": o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1556
2020
|
}
|
|
1557
2021
|
}), u;
|
|
1558
2022
|
}
|
|
1559
|
-
function
|
|
2023
|
+
function xt(e, t, n, r, i) {
|
|
1560
2024
|
var a = i.format, o = i.verticalNavigation || "editor", s = a ? this.table.dependencyRegistry.lookup(["luxon", "DateTime"], "DateTime") : null, c, l = e.getValue(), u = document.createElement("input");
|
|
1561
2025
|
if (u.type = "datetime-local", u.style.padding = "4px", u.style.width = "100%", u.style.boxSizing = "border-box", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), u.setAttribute(e, u.getAttribute(e) + i.elementAttributes["+" + e])) : u.setAttribute(e, i.elementAttributes[e]);
|
|
1562
2026
|
l = l === void 0 ? "" : l, a && (s ? (c = s.isDateTime(l) ? l : a === "x" ? s.fromMillis(l) : a === "iso" ? s.fromISO(String(l)) : s.fromFormat(String(l), a), l = c.toFormat("yyyy-MM-dd") + "T" + c.toFormat("HH:mm")) : console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")), u.value = l, t(function() {
|
|
@@ -1595,13 +2059,11 @@ function re(e, t, n, r, i) {
|
|
|
1595
2059
|
e.stopPropagation();
|
|
1596
2060
|
break;
|
|
1597
2061
|
case "ArrowUp":
|
|
1598
|
-
case "ArrowDown":
|
|
1599
|
-
o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1600
|
-
break;
|
|
2062
|
+
case "ArrowDown": o == "editor" && (e.stopImmediatePropagation(), e.stopPropagation());
|
|
1601
2063
|
}
|
|
1602
2064
|
}), u;
|
|
1603
2065
|
}
|
|
1604
|
-
var
|
|
2066
|
+
var St = class {
|
|
1605
2067
|
constructor(e, t, n, r, i, a) {
|
|
1606
2068
|
this.edit = e, this.table = e.table, this.cell = t, this.params = this._initializeParams(a), this.data = [], this.displayItems = [], this.currentItems = [], this.focusedItem = null, this.input = this._createInputElement(), this.listEl = this._createListElement(), this.initialValues = null, this.isFilter = t.getType() === "header", this.filterTimeout = null, this.filtered = !1, this.typing = !1, this.values = [], this.popup = null, this.listIteration = 0, this.lastAction = "", this.filterTerm = "", this.blurable = !0, this.actions = {
|
|
1607
2069
|
success: r,
|
|
@@ -1633,7 +2095,7 @@ var ie = class {
|
|
|
1633
2095
|
_createInputElement() {
|
|
1634
2096
|
var e = this.params.elementAttributes, t = document.createElement("input");
|
|
1635
2097
|
if (t.setAttribute("type", this.params.clearable ? "search" : "text"), t.style.padding = "4px", t.style.width = "100%", t.style.boxSizing = "border-box", this.params.autocomplete || (t.style.cursor = "default", t.style.caretColor = "transparent"), e && typeof e == "object") for (let n in e) n.charAt(0) == "+" ? (n = n.slice(1), t.setAttribute(n, t.getAttribute(n) + e["+" + n])) : t.setAttribute(n, e[n]);
|
|
1636
|
-
return this.params.mask &&
|
|
2098
|
+
return this.params.mask && K(t, this.params), this._bindInputEvents(t), t;
|
|
1637
2099
|
}
|
|
1638
2100
|
_initializeParams(e) {
|
|
1639
2101
|
var t = [
|
|
@@ -1778,7 +2240,7 @@ var ie = class {
|
|
|
1778
2240
|
}
|
|
1779
2241
|
_ajaxRequest(e, t) {
|
|
1780
2242
|
var n = this.params.filterRemote ? { term: t } : {};
|
|
1781
|
-
return e =
|
|
2243
|
+
return e = tt(e, {}, n), fetch(e).then((e) => e.ok ? e.json().catch((e) => (console.warn("List Ajax Load Error - Invalid JSON returned", e), Promise.reject(e))) : (console.error("List Ajax Load Error - Connection Error: " + e.status, e.statusText), Promise.reject(e))).catch((e) => (console.error("List Ajax Load Error - Connection Error: ", e), Promise.reject(e)));
|
|
1782
2244
|
}
|
|
1783
2245
|
_uniqueColumnValues(e) {
|
|
1784
2246
|
var t = {}, n = this.table.getData(this.params.valuesLookup), r = e ? this.table.columnManager.getColumnByField(e) : this.cell.getColumn()._getSelf();
|
|
@@ -1941,19 +2403,20 @@ var ie = class {
|
|
|
1941
2403
|
_resolveValue(e) {
|
|
1942
2404
|
var t, n;
|
|
1943
2405
|
if (this.popup && this.popup.hide(!0), this.params.multiselect) t = this.currentItems.map((e) => e.value);
|
|
1944
|
-
else if (e && this.params.autocomplete && this.typing)
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
2406
|
+
else if (e && this.params.autocomplete && this.typing) {
|
|
2407
|
+
if (this.params.freetext || this.params.allowEmpty && this.input.value === "") t = this.input.value;
|
|
2408
|
+
else {
|
|
2409
|
+
this.actions.cancel();
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
} else this.currentItems[0] ? t = this.currentItems[0].value : this.isFilter && this.focusedItem && this.focusedItem.selected ? t = this.focusedItem.value : (n = Array.isArray(this.initialValues) ? this.initialValues[0] : this.initialValues, t = n == null || n === "" ? n : this.params.emptyValue);
|
|
1950
2413
|
t === "" && (t = this.params.emptyValue), this.actions.success(t), this.isFilter && (this.initialValues = t && !Array.isArray(t) ? [t] : t, this.currentItems = []);
|
|
1951
2414
|
}
|
|
1952
2415
|
};
|
|
1953
|
-
function
|
|
1954
|
-
return new
|
|
2416
|
+
function Ct(e, t, n, r, i) {
|
|
2417
|
+
return new St(this, e, t, n, r, i).input;
|
|
1955
2418
|
}
|
|
1956
|
-
function
|
|
2419
|
+
function wt(e, t, n, r, i) {
|
|
1957
2420
|
var a = this, o = e.getElement(), s = e.getValue(), c = o.getElementsByTagName("svg").length || 5, l = o.getElementsByTagName("svg")[0] ? o.getElementsByTagName("svg")[0].getAttribute("width") : 14, u = [], d = document.createElement("div"), f = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
1958
2421
|
function p(e) {
|
|
1959
2422
|
u.forEach(function(t, n) {
|
|
@@ -1992,13 +2455,11 @@ function E(e, t, n, r, i) {
|
|
|
1992
2455
|
case "Enter":
|
|
1993
2456
|
n(s);
|
|
1994
2457
|
break;
|
|
1995
|
-
case "Escape":
|
|
1996
|
-
r();
|
|
1997
|
-
break;
|
|
2458
|
+
case "Escape": r();
|
|
1998
2459
|
}
|
|
1999
2460
|
}), d;
|
|
2000
2461
|
}
|
|
2001
|
-
function
|
|
2462
|
+
function Tt(e, t, n, r, i) {
|
|
2002
2463
|
var a = e.getElement(), o = i.max === void 0 ? a.getElementsByTagName("div")[0] && a.getElementsByTagName("div")[0].getAttribute("max") || 100 : i.max, s = i.min === void 0 ? a.getElementsByTagName("div")[0] && a.getElementsByTagName("div")[0].getAttribute("min") || 0 : i.min, c = (o - s) / 100, l = e.getValue() || 0, u = document.createElement("div"), d = document.createElement("div"), f, p;
|
|
2003
2464
|
function m() {
|
|
2004
2465
|
var e = window.getComputedStyle(a, null), t = c * Math.round(d.offsetWidth / ((a.clientWidth - parseInt(e.getPropertyValue("padding-left")) - parseInt(e.getPropertyValue("padding-right"))) / 100)) + s;
|
|
@@ -2025,15 +2486,13 @@ function D(e, t, n, r, i) {
|
|
|
2025
2486
|
case "Enter":
|
|
2026
2487
|
m();
|
|
2027
2488
|
break;
|
|
2028
|
-
case "Escape":
|
|
2029
|
-
r();
|
|
2030
|
-
break;
|
|
2489
|
+
case "Escape": r();
|
|
2031
2490
|
}
|
|
2032
2491
|
}), a.addEventListener("blur", function() {
|
|
2033
2492
|
r();
|
|
2034
2493
|
}), d;
|
|
2035
2494
|
}
|
|
2036
|
-
function
|
|
2495
|
+
function Et(e, t, n, r, i) {
|
|
2037
2496
|
var a = e.getValue(), o = document.createElement("input"), s = i.tristate, c = i.indeterminateValue === void 0 ? null : i.indeterminateValue, l = !1, u = Object.keys(i).includes("trueValue"), d = Object.keys(i).includes("falseValue");
|
|
2038
2497
|
if (o.setAttribute("type", "checkbox"), o.style.marginTop = "5px", o.style.boxSizing = "border-box", i.elementAttributes && typeof i.elementAttributes == "object") for (let e in i.elementAttributes) e.charAt(0) == "+" ? (e = e.slice(1), o.setAttribute(e, o.getAttribute(e) + i.elementAttributes["+" + e])) : o.setAttribute(e, i.elementAttributes[e]);
|
|
2039
2498
|
o.value = a, s && (a === void 0 || a === c || a === "") && (l = !0, o.indeterminate = !0), this.table.browser != "firefox" && this.table.browser != "safari" && t(function() {
|
|
@@ -2051,7 +2510,7 @@ function O(e, t, n, r, i) {
|
|
|
2051
2510
|
e.key == "Enter" && n(f()), e.key == "Escape" && r();
|
|
2052
2511
|
}), o;
|
|
2053
2512
|
}
|
|
2054
|
-
function
|
|
2513
|
+
function Dt(e, t, n, r, i) {
|
|
2055
2514
|
var a = e._getSelf().column, o, s, c;
|
|
2056
2515
|
function l(e) {
|
|
2057
2516
|
var t = e.getValue(), n = "input";
|
|
@@ -2062,32 +2521,30 @@ function k(e, t, n, r, i) {
|
|
|
2062
2521
|
case "boolean":
|
|
2063
2522
|
n = "tickCross";
|
|
2064
2523
|
break;
|
|
2065
|
-
case "string":
|
|
2066
|
-
t.includes("\n") && (n = "textarea");
|
|
2067
|
-
break;
|
|
2524
|
+
case "string": t.includes("\n") && (n = "textarea");
|
|
2068
2525
|
}
|
|
2069
2526
|
return n;
|
|
2070
2527
|
}
|
|
2071
2528
|
return o = i.editorLookup ? i.editorLookup(e) : l(e), i.paramsLookup && (c = typeof i.paramsLookup == "function" ? i.paramsLookup(o, e) : i.paramsLookup[o]), s = this.table.modules.edit.lookupEditor(o, a), s.call(this, e, t, n, r, c || {});
|
|
2072
2529
|
}
|
|
2073
|
-
var
|
|
2074
|
-
input:
|
|
2075
|
-
textarea:
|
|
2076
|
-
number:
|
|
2077
|
-
range:
|
|
2078
|
-
date:
|
|
2079
|
-
time:
|
|
2080
|
-
datetime:
|
|
2081
|
-
list:
|
|
2082
|
-
star:
|
|
2083
|
-
progress:
|
|
2084
|
-
tickCross:
|
|
2085
|
-
adaptable:
|
|
2086
|
-
},
|
|
2530
|
+
var Ot = {
|
|
2531
|
+
input: ht,
|
|
2532
|
+
textarea: gt,
|
|
2533
|
+
number: _t,
|
|
2534
|
+
range: vt,
|
|
2535
|
+
date: yt,
|
|
2536
|
+
time: bt,
|
|
2537
|
+
datetime: xt,
|
|
2538
|
+
list: Ct,
|
|
2539
|
+
star: wt,
|
|
2540
|
+
progress: Tt,
|
|
2541
|
+
tickCross: Et,
|
|
2542
|
+
adaptable: Dt
|
|
2543
|
+
}, kt = class e extends H {
|
|
2087
2544
|
static moduleName = "edit";
|
|
2088
|
-
static editors =
|
|
2545
|
+
static editors = Ot;
|
|
2089
2546
|
constructor(t) {
|
|
2090
|
-
super(t), this.currentCell = !1, this.mouseClick = !1, this.recursionBlock = !1, this.invalidEdit = !1, this.editedCells = [], this.convertEmptyValues = !1, this.editors = e.editors, this.registerTableOption("editTriggerEvent", "focus"), this.registerTableOption("editorEmptyValue"), this.registerTableOption("editorEmptyValueFunc", this.emptyValueCheck.bind(this)), this.registerColumnOption("editable"), this.registerColumnOption("editor"), this.registerColumnOption("editorParams"), this.registerColumnOption("editorEmptyValue"), this.registerColumnOption("editorEmptyValueFunc"), this.registerColumnOption("cellEditing"), this.registerColumnOption("cellEdited"), this.registerColumnOption("cellEditCancelled"), this.registerTableFunction("getEditedCells", this.getEditedCells.bind(this)), this.registerTableFunction("clearCellEdited", this.clearCellEdited.bind(this)), this.registerTableFunction("navigatePrev", this.navigatePrev.bind(this)), this.registerTableFunction("navigateNext", this.navigateNext.bind(this)), this.registerTableFunction("navigateLeft", this.navigateLeft.bind(this)), this.registerTableFunction("navigateRight", this.navigateRight.bind(this)), this.registerTableFunction("navigateUp", this.navigateUp.bind(this)), this.registerTableFunction("navigateDown", this.navigateDown.bind(this)), this.registerComponentFunction("cell", "isEdited", this.cellIsEdited.bind(this)), this.registerComponentFunction("cell", "clearEdited", this.clearEdited.bind(this)), this.registerComponentFunction("cell", "edit", this.editCell.bind(this)), this.registerComponentFunction("cell", "cancelEdit", this.cellCancelEdit.bind(this)), this.registerComponentFunction("cell", "navigatePrev", this.navigatePrev.bind(this)), this.registerComponentFunction("cell", "navigateNext", this.navigateNext.bind(this)), this.registerComponentFunction("cell", "navigateLeft", this.navigateLeft.bind(this)), this.registerComponentFunction("cell", "navigateRight", this.navigateRight.bind(this)), this.registerComponentFunction("cell", "navigateUp", this.navigateUp.bind(this)), this.registerComponentFunction("cell", "navigateDown", this.navigateDown.bind(this));
|
|
2547
|
+
super(t), this.currentCell = !1, this.mouseClick = !1, this.recursionBlock = !1, this.invalidEdit = !1, this.editedCells = [], this.convertEmptyValues = !1, this.editors = e.editors, this.registerTableOption("editTriggerEvent", "focus"), this.registerTableOption("editorEmptyValue"), this.registerTableOption("editorEmptyValueFunc", this.emptyValueCheck.bind(this)), this.registerColumnOption("editable"), this.registerColumnOption("editor"), this.registerColumnOption("editorParams"), this.registerColumnOption("editorEmptyValue"), this.registerColumnOption("editorEmptyValueFunc"), this.registerColumnOption("cellEditing"), this.registerColumnOption("cellEdited"), this.registerColumnOption("cellEditCancelled"), this.registerTableFunction("getEditedCells", this.getEditedCells.bind(this)), this.registerTableFunction("clearCellEdited", this.clearCellEdited.bind(this)), this.registerTableFunction("setCellEdited", this.setCellEdited.bind(this)), this.registerTableFunction("navigatePrev", this.navigatePrev.bind(this)), this.registerTableFunction("navigateNext", this.navigateNext.bind(this)), this.registerTableFunction("navigateLeft", this.navigateLeft.bind(this)), this.registerTableFunction("navigateRight", this.navigateRight.bind(this)), this.registerTableFunction("navigateUp", this.navigateUp.bind(this)), this.registerTableFunction("navigateDown", this.navigateDown.bind(this)), this.registerComponentFunction("cell", "isEdited", this.cellIsEdited.bind(this)), this.registerComponentFunction("cell", "clearEdited", this.clearEdited.bind(this)), this.registerComponentFunction("cell", "setEdited", this.setEdited.bind(this)), this.registerComponentFunction("cell", "edit", this.editCell.bind(this)), this.registerComponentFunction("cell", "cancelEdit", this.cellCancelEdit.bind(this)), this.registerComponentFunction("cell", "navigatePrev", this.navigatePrev.bind(this)), this.registerComponentFunction("cell", "navigateNext", this.navigateNext.bind(this)), this.registerComponentFunction("cell", "navigateLeft", this.navigateLeft.bind(this)), this.registerComponentFunction("cell", "navigateRight", this.navigateRight.bind(this)), this.registerComponentFunction("cell", "navigateUp", this.navigateUp.bind(this)), this.registerComponentFunction("cell", "navigateDown", this.navigateDown.bind(this));
|
|
2091
2548
|
}
|
|
2092
2549
|
initialize() {
|
|
2093
2550
|
this.subscribe("cell-init", this.bindEditor.bind(this)), this.subscribe("cell-delete", this.clearEdited.bind(this)), this.subscribe("cell-value-changed", this.updateCellClass.bind(this)), this.subscribe("column-layout", this.initializeColumnCheck.bind(this)), this.subscribe("column-delete", this.columnDeleteCheck.bind(this)), this.subscribe("row-deleting", this.rowDeleteCheck.bind(this)), this.subscribe("row-layout", this.rowEditableCheck.bind(this)), this.subscribe("data-refreshing", this.cancelEdit.bind(this)), this.subscribe("clipboard-paste", this.pasteBlocker.bind(this)), this.confirm("edit-nav-disabled") || (this.subscribe("keybinding-nav-prev", this.navigatePrev.bind(this, void 0)), this.subscribe("keybinding-nav-next", this.keybindingNavigateNext.bind(this)), this.subscribe("keybinding-nav-up", this.navigateUp.bind(this, void 0)), this.subscribe("keybinding-nav-down", this.navigateDown.bind(this, void 0))), this.subscribe("edit-check-editing", this.checkEditing.bind(this)), this.subscribe("edit-cancel-cell", this.cancelEditEvent.bind(this)), Object.keys(this.table.options).includes("editorEmptyValue") && (this.convertEmptyValues = !0);
|
|
@@ -2117,6 +2574,11 @@ var A = {
|
|
|
2117
2574
|
this.table.modules.edit.clearEdited(e._getSelf());
|
|
2118
2575
|
});
|
|
2119
2576
|
}
|
|
2577
|
+
setCellEdited(e) {
|
|
2578
|
+
e && (Array.isArray(e) || (e = [e]), e.forEach((e) => {
|
|
2579
|
+
this.table.modules.edit.setEdited(e._getSelf());
|
|
2580
|
+
}));
|
|
2581
|
+
}
|
|
2120
2582
|
navigatePrev(e = this.currentCell, t) {
|
|
2121
2583
|
var n, r;
|
|
2122
2584
|
if (e) {
|
|
@@ -2149,27 +2611,27 @@ var A = {
|
|
|
2149
2611
|
var n, r;
|
|
2150
2612
|
return e && (t && t.preventDefault(), n = e.getIndex(), r = this.table.rowManager.nextDisplayRow(e.row, !0), r) ? (r.cells[n].getComponent().edit(), !0) : !1;
|
|
2151
2613
|
}
|
|
2152
|
-
findNextEditableCell(e,
|
|
2153
|
-
var
|
|
2154
|
-
if (
|
|
2155
|
-
let
|
|
2156
|
-
if (
|
|
2157
|
-
|
|
2614
|
+
findNextEditableCell(e, t) {
|
|
2615
|
+
var n = !1;
|
|
2616
|
+
if (t < e.cells.length - 1) for (var r = t + 1; r < e.cells.length; r++) {
|
|
2617
|
+
let t = e.cells[r];
|
|
2618
|
+
if (t.column.modules.edit && V.elVisible(t.getElement()) && this.allowEdit(t)) {
|
|
2619
|
+
n = t;
|
|
2158
2620
|
break;
|
|
2159
2621
|
}
|
|
2160
2622
|
}
|
|
2161
|
-
return
|
|
2623
|
+
return n;
|
|
2162
2624
|
}
|
|
2163
|
-
findPrevEditableCell(e,
|
|
2164
|
-
var
|
|
2165
|
-
if (
|
|
2166
|
-
let
|
|
2167
|
-
if (
|
|
2168
|
-
|
|
2625
|
+
findPrevEditableCell(e, t) {
|
|
2626
|
+
var n = !1;
|
|
2627
|
+
if (t > 0) for (var r = t - 1; r >= 0; r--) {
|
|
2628
|
+
let t = e.cells[r];
|
|
2629
|
+
if (t.column.modules.edit && V.elVisible(t.getElement()) && this.allowEdit(t)) {
|
|
2630
|
+
n = t;
|
|
2169
2631
|
break;
|
|
2170
2632
|
}
|
|
2171
2633
|
}
|
|
2172
|
-
return
|
|
2634
|
+
return n;
|
|
2173
2635
|
}
|
|
2174
2636
|
initializeColumnCheck(e) {
|
|
2175
2637
|
e.definition.editor !== void 0 && this.initializeColumn(e);
|
|
@@ -2206,9 +2668,7 @@ var A = {
|
|
|
2206
2668
|
case "function":
|
|
2207
2669
|
n = e;
|
|
2208
2670
|
break;
|
|
2209
|
-
case "boolean":
|
|
2210
|
-
e === !0 && (typeof t.definition.formatter == "function" ? console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", t.definition.formatter) : n = this.editors[t.definition.formatter] ? this.editors[t.definition.formatter] : this.editors.input);
|
|
2211
|
-
break;
|
|
2671
|
+
case "boolean": e === !0 && (typeof t.definition.formatter == "function" ? console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ", t.definition.formatter) : n = this.editors[t.definition.formatter] ? this.editors[t.definition.formatter] : this.editors.input);
|
|
2212
2672
|
}
|
|
2213
2673
|
return n;
|
|
2214
2674
|
}
|
|
@@ -2227,6 +2687,7 @@ var A = {
|
|
|
2227
2687
|
for (this.currentCell = !1, n = t.getElement(), this.dispatch("edit-editor-clear", t, e), n.classList.remove("tabulator-editing"); n.firstChild;) n.removeChild(n.firstChild);
|
|
2228
2688
|
t.row.getElement().classList.remove("tabulator-editing"), t.table.element.classList.remove("tabulator-editing");
|
|
2229
2689
|
}
|
|
2690
|
+
this.table.getRedrawBlock() && this.table.restoreRedraw();
|
|
2230
2691
|
}
|
|
2231
2692
|
cancelEdit() {
|
|
2232
2693
|
if (this.currentCell) {
|
|
@@ -2271,17 +2732,15 @@ var A = {
|
|
|
2271
2732
|
case "string":
|
|
2272
2733
|
t = !!e.row.data[e.column.modules.edit.check];
|
|
2273
2734
|
break;
|
|
2274
|
-
case "boolean":
|
|
2275
|
-
t = e.column.modules.edit.check;
|
|
2276
|
-
break;
|
|
2735
|
+
case "boolean": t = e.column.modules.edit.check;
|
|
2277
2736
|
}
|
|
2278
2737
|
return t;
|
|
2279
2738
|
}
|
|
2280
2739
|
edit(e, t, n) {
|
|
2281
2740
|
var r = this, i = !0, a = function() {}, o = e.getElement(), s = !1, c, l, u;
|
|
2282
2741
|
if (this.currentCell) {
|
|
2283
|
-
|
|
2284
|
-
|
|
2742
|
+
if (this.invalidEdit || this.currentCell === e) return;
|
|
2743
|
+
this.cancelEdit();
|
|
2285
2744
|
}
|
|
2286
2745
|
function d(t) {
|
|
2287
2746
|
if (r.currentCell === e && !s) {
|
|
@@ -2299,16 +2758,22 @@ var A = {
|
|
|
2299
2758
|
}
|
|
2300
2759
|
if (e.column.modules.edit.blocked) return this.mouseClick = !1, this.blur(o), !1;
|
|
2301
2760
|
if (i = this.allowEdit(e), i || n) {
|
|
2302
|
-
if (t && t.stopPropagation(), r.cancelEdit(), r.currentCell = e, this.focusScrollAdjust(e), l = e.getComponent(), this.mouseClick && (this.mouseClick = !1, e.column.definition.cellClick && e.column.definition.cellClick.call(this.table, t, l)), e.column.definition.cellEditing && e.column.definition.cellEditing.call(this.table, l), this.dispatch("cell-editing", e), this.dispatchExternal("cellEditing", l), u = typeof e.column.modules.edit.params == "function" ? e.column.modules.edit.params(l) : e.column.modules.edit.params, c = e.column.modules.edit.editor.call(r, l, p, d, f, u), this.currentCell && c !== !1)
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2761
|
+
if (t && t.stopPropagation(), r.cancelEdit(), r.currentCell = e, this.focusScrollAdjust(e), l = e.getComponent(), this.mouseClick && (this.mouseClick = !1, e.column.definition.cellClick && e.column.definition.cellClick.call(this.table, t, l)), e.column.definition.cellEditing && e.column.definition.cellEditing.call(this.table, l), this.dispatch("cell-editing", e), this.dispatchExternal("cellEditing", l), u = typeof e.column.modules.edit.params == "function" ? e.column.modules.edit.params(l) : e.column.modules.edit.params, c = e.column.modules.edit.editor.call(r, l, p, d, f, u), this.currentCell && c !== !1) {
|
|
2762
|
+
if (c instanceof Node) {
|
|
2763
|
+
for (o.classList.add("tabulator-editing"), e.row.getElement().classList.add("tabulator-editing"), e.table.element.classList.add("tabulator-editing"); o.firstChild;) o.removeChild(o.firstChild);
|
|
2764
|
+
o.appendChild(c), this.table.blockRedraw(), a();
|
|
2765
|
+
for (var m = o.children, h = 0; h < m.length; h++) m[h].addEventListener("click", function(e) {
|
|
2766
|
+
e.stopPropagation();
|
|
2767
|
+
}), m[h].addEventListener("mousedown", function(e) {
|
|
2768
|
+
e.stopPropagation();
|
|
2769
|
+
}), m[h].addEventListener("mouseup", function(e) {
|
|
2770
|
+
e.stopPropagation();
|
|
2771
|
+
});
|
|
2772
|
+
} else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:", c), this.blur(o), !1;
|
|
2773
|
+
} else return this.blur(o), !1;
|
|
2310
2774
|
return !0;
|
|
2311
|
-
}
|
|
2775
|
+
}
|
|
2776
|
+
return this.mouseClick = !1, this.blur(o), !1;
|
|
2312
2777
|
}
|
|
2313
2778
|
emptyValueCheck(e) {
|
|
2314
2779
|
return e === "" || e == null;
|
|
@@ -2330,15 +2795,18 @@ var A = {
|
|
|
2330
2795
|
var t;
|
|
2331
2796
|
e.modules.edit && e.modules.edit.edited && (e.modules.edit.edited = !1, this.dispatch("edit-edited-clear", e)), t = this.editedCells.indexOf(e), t > -1 && this.editedCells.splice(t, 1);
|
|
2332
2797
|
}
|
|
2333
|
-
|
|
2798
|
+
setEdited(e) {
|
|
2799
|
+
e.modules.edit || (e.modules.edit = {}), e.modules.edit.edited || (e.modules.edit.edited = !0, this.dispatch("edit-edited-set", e)), this.editedCells.indexOf(e) == -1 && this.editedCells.push(e);
|
|
2800
|
+
}
|
|
2801
|
+
}, At = class {
|
|
2334
2802
|
constructor(e, t, n, r) {
|
|
2335
2803
|
this.type = e, this.columns = t, this.component = n || !1, this.indent = r || 0;
|
|
2336
2804
|
}
|
|
2337
|
-
},
|
|
2805
|
+
}, q = class {
|
|
2338
2806
|
constructor(e, t, n, r, i) {
|
|
2339
2807
|
this.value = e, this.component = t || !1, this.width = n, this.height = r, this.depth = i;
|
|
2340
2808
|
}
|
|
2341
|
-
},
|
|
2809
|
+
}, jt = {}, Mt = {
|
|
2342
2810
|
visible: function() {
|
|
2343
2811
|
return this.rowManager.getVisibleRows(!1, !0);
|
|
2344
2812
|
},
|
|
@@ -2351,10 +2819,10 @@ var A = {
|
|
|
2351
2819
|
active: function() {
|
|
2352
2820
|
return this.options.pagination ? this.rowManager.getDisplayRows(this.rowManager.displayRows.length - 2) : this.rowManager.getDisplayRows();
|
|
2353
2821
|
}
|
|
2354
|
-
},
|
|
2822
|
+
}, Nt = class e extends H {
|
|
2355
2823
|
static moduleName = "export";
|
|
2356
|
-
static columnLookups =
|
|
2357
|
-
static rowLookups =
|
|
2824
|
+
static columnLookups = jt;
|
|
2825
|
+
static rowLookups = Mt;
|
|
2358
2826
|
constructor(e) {
|
|
2359
2827
|
super(e), this.config = {}, this.cloneTableStyle = !0, this.colVisProp = "", this.colVisPropAttach = "", this.registerTableOption("htmlOutputConfig", !1), this.registerColumnOption("htmlOutput"), this.registerColumnOption("titleHtmlOutput");
|
|
2360
2828
|
}
|
|
@@ -2420,9 +2888,9 @@ var A = {
|
|
|
2420
2888
|
e.forEach((e) => {
|
|
2421
2889
|
if (e) {
|
|
2422
2890
|
let n = e.title === void 0 ? "" : e.title;
|
|
2423
|
-
t.push(new
|
|
2891
|
+
t.push(new q(n, e.column.getComponent(), e.width, e.height, e.depth));
|
|
2424
2892
|
} else t.push(null);
|
|
2425
|
-
}), r.push(new
|
|
2893
|
+
}), r.push(new At("header", t));
|
|
2426
2894
|
}), r;
|
|
2427
2895
|
}
|
|
2428
2896
|
bodyToExportRows(e, t = []) {
|
|
@@ -2440,16 +2908,14 @@ var A = {
|
|
|
2440
2908
|
var i = e.getData(this.colVisProp), a = [], o = 0;
|
|
2441
2909
|
switch (e.type) {
|
|
2442
2910
|
case "group":
|
|
2443
|
-
o = e.level, a.push(new
|
|
2911
|
+
o = e.level, a.push(new q(e.key, e.getComponent(), t.length, 1));
|
|
2444
2912
|
break;
|
|
2445
2913
|
case "calc":
|
|
2446
|
-
case "row":
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
}), this.table.options.dataTree && this.config.dataTree !== !1 && (o = e.modules.dataTree.index);
|
|
2450
|
-
break;
|
|
2914
|
+
case "row": t.forEach((e) => {
|
|
2915
|
+
a.push(new q(e._column.getFieldValue(i), e, 1, 1));
|
|
2916
|
+
}), this.table.options.dataTree && this.config.dataTree !== !1 && (o = e.modules.dataTree.index);
|
|
2451
2917
|
}
|
|
2452
|
-
n.push(new
|
|
2918
|
+
n.push(new At(e.type, a, e.getComponent(), o));
|
|
2453
2919
|
}), n;
|
|
2454
2920
|
}
|
|
2455
2921
|
generateTableElement(e) {
|
|
@@ -2476,19 +2942,17 @@ var A = {
|
|
|
2476
2942
|
case "calc":
|
|
2477
2943
|
r.appendChild(this.generateCalcElement(e, o, i));
|
|
2478
2944
|
break;
|
|
2479
|
-
case "row":
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
]), r.appendChild(a);
|
|
2491
|
-
break;
|
|
2945
|
+
case "row": a = this.generateRowElement(e, o, i), this.mapElementStyles(t % 2 && i.evenRow ? i.evenRow : i.oddRow, a, [
|
|
2946
|
+
"border-top",
|
|
2947
|
+
"border-left",
|
|
2948
|
+
"border-right",
|
|
2949
|
+
"border-bottom",
|
|
2950
|
+
"color",
|
|
2951
|
+
"font-weight",
|
|
2952
|
+
"font-family",
|
|
2953
|
+
"font-size",
|
|
2954
|
+
"background-color"
|
|
2955
|
+
]), r.appendChild(a);
|
|
2492
2956
|
}
|
|
2493
2957
|
}), n.innerHTML && t.appendChild(n), t.appendChild(r), this.mapElementStyles(this.table.element, t, [
|
|
2494
2958
|
"border-top",
|
|
@@ -2601,9 +3065,7 @@ var A = {
|
|
|
2601
3065
|
case "object":
|
|
2602
3066
|
u = u === null ? "" : JSON.stringify(u);
|
|
2603
3067
|
break;
|
|
2604
|
-
case "undefined":
|
|
2605
|
-
u = "";
|
|
2606
|
-
break;
|
|
3068
|
+
case "undefined": u = "";
|
|
2607
3069
|
}
|
|
2608
3070
|
u instanceof Node ? o.appendChild(u) : o.innerHTML = u, f = [
|
|
2609
3071
|
"padding-top",
|
|
@@ -2664,7 +3126,7 @@ var A = {
|
|
|
2664
3126
|
}
|
|
2665
3127
|
}
|
|
2666
3128
|
}
|
|
2667
|
-
},
|
|
3129
|
+
}, Pt = {
|
|
2668
3130
|
"=": function(e, t, n, r) {
|
|
2669
3131
|
return t == e;
|
|
2670
3132
|
},
|
|
@@ -2706,7 +3168,7 @@ var A = {
|
|
|
2706
3168
|
},
|
|
2707
3169
|
smart: function(e, t, n, r) {
|
|
2708
3170
|
let i = e.trim();
|
|
2709
|
-
if (i === ".") return
|
|
3171
|
+
if (i === ".") return t !== null && t != "";
|
|
2710
3172
|
if (i === "!") return t === null || t == "";
|
|
2711
3173
|
if (i.indexOf("<=") === 0) return this["<="](parseFloat(i.substring(2)), t, n, r);
|
|
2712
3174
|
if (i.indexOf(">=") === 0) return this[">="](parseFloat(i.substring(2)), t, n, r);
|
|
@@ -2739,9 +3201,9 @@ var A = {
|
|
|
2739
3201
|
}
|
|
2740
3202
|
return o === null || o;
|
|
2741
3203
|
}
|
|
2742
|
-
},
|
|
3204
|
+
}, Ft = class e extends H {
|
|
2743
3205
|
static moduleName = "filter";
|
|
2744
|
-
static filters =
|
|
3206
|
+
static filters = Pt;
|
|
2745
3207
|
constructor(e) {
|
|
2746
3208
|
super(e), this.filterList = [], this.headerFilters = {}, this.headerFilterColumns = [], this.prevHeaderFilterChangeCheck = "", this.prevHeaderFilterChangeCheck = "{}", this.changed = !1, this.tableInitialized = !1, this.registerTableOption("filterMode", "local"), this.registerTableOption("initialFilter", !1), this.registerTableOption("initialHeaderFilter", !1), this.registerTableOption("headerFilterLiveFilterDelay", 300), this.registerTableOption("placeholderHeaderFilter", !1), this.registerColumnOption("headerFilter"), this.registerColumnOption("headerFilterPlaceholder"), this.registerColumnOption("headerFilterParams"), this.registerColumnOption("headerFilterEmptyCheck"), this.registerColumnOption("headerFilterFunc"), this.registerColumnOption("headerFilterFuncParams"), this.registerColumnOption("headerFilterLiveFilter"), this.registerTableFunction("searchRows", this.searchRows.bind(this)), this.registerTableFunction("searchData", this.searchData.bind(this)), this.registerTableFunction("setFilter", this.userSetFilter.bind(this)), this.registerTableFunction("refreshFilter", this.userRefreshFilter.bind(this)), this.registerTableFunction("addFilter", this.userAddFilter.bind(this)), this.registerTableFunction("getFilters", this.getFilters.bind(this)), this.registerTableFunction("setHeaderFilterFocus", this.userSetHeaderFilterFocus.bind(this)), this.registerTableFunction("getHeaderFilterValue", this.userGetHeaderFilterValue.bind(this)), this.registerTableFunction("setHeaderFilterValue", this.userSetHeaderFilterValue.bind(this)), this.registerTableFunction("getHeaderFilters", this.getHeaderFilters.bind(this)), this.registerTableFunction("removeFilter", this.userRemoveFilter.bind(this)), this.registerTableFunction("clearFilter", this.userClearFilter.bind(this)), this.registerTableFunction("clearHeaderFilter", this.userClearHeaderFilter.bind(this)), this.registerComponentFunction("column", "headerFilterFocus", this.setHeaderFilterFocus.bind(this)), this.registerComponentFunction("column", "reloadHeaderFilter", this.reloadHeaderFilter.bind(this)), this.registerComponentFunction("column", "getHeaderFilterValue", this.getHeaderFilterValue.bind(this)), this.registerComponentFunction("column", "setHeaderFilterValue", this.setHeaderFilterValue.bind(this));
|
|
2747
3209
|
}
|
|
@@ -2817,12 +3279,10 @@ var A = {
|
|
|
2817
3279
|
return i = typeof i == "function" ? i(n, a, r) : i, e.filters[t.definition.headerFilterFunc](n, a, r, i);
|
|
2818
3280
|
}) : console.warn("Header Filter Error - Matching filter function not found: ", t.definition.headerFilterFunc);
|
|
2819
3281
|
break;
|
|
2820
|
-
case "function":
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
}, o = c;
|
|
2825
|
-
break;
|
|
3282
|
+
case "function": c = function(e) {
|
|
3283
|
+
var r = t.definition.headerFilterFuncParams || {}, i = t.getFieldValue(e);
|
|
3284
|
+
return r = typeof r == "function" ? r(n, i, e) : r, t.definition.headerFilterFunc(n, i, e, r);
|
|
3285
|
+
}, o = c;
|
|
2826
3286
|
}
|
|
2827
3287
|
if (!c) switch (a) {
|
|
2828
3288
|
case "partial":
|
|
@@ -2871,11 +3331,9 @@ var A = {
|
|
|
2871
3331
|
case "function":
|
|
2872
3332
|
s = e.definition.headerFilter;
|
|
2873
3333
|
break;
|
|
2874
|
-
case "boolean":
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
})) : s = r.table.modules.edit.editors.input;
|
|
2878
|
-
break;
|
|
3334
|
+
case "boolean": e.modules.edit && e.modules.edit.editor ? s = e.modules.edit.editor : e.definition.formatter && r.table.modules.edit.editors[e.definition.formatter] ? (s = r.table.modules.edit.editors[e.definition.formatter], (e.definition.formatter === "tick" || e.definition.formatter === "tickCross") && !e.definition.headerFilterEmptyCheck && (e.modules.filter.emptyFunc = function(e) {
|
|
3335
|
+
return e !== !0 && e !== !1;
|
|
3336
|
+
})) : s = r.table.modules.edit.editors.input;
|
|
2879
3337
|
}
|
|
2880
3338
|
if (s) {
|
|
2881
3339
|
if (l = {
|
|
@@ -2915,7 +3373,7 @@ var A = {
|
|
|
2915
3373
|
u && clearTimeout(u), u = setTimeout(function() {
|
|
2916
3374
|
i(c.value);
|
|
2917
3375
|
}, r.table.options.headerFilterLiveFilterDelay);
|
|
2918
|
-
}, e.modules.filter.headerElement = c, e.modules.filter.attrType = c.hasAttribute("type") ? c.getAttribute("type").toLowerCase() : "", e.modules.filter.tagType = c.tagName.toLowerCase(), e.definition.headerFilterLiveFilter !== !1 && (e.definition.headerFilter
|
|
3376
|
+
}, e.modules.filter.headerElement = c, e.modules.filter.attrType = c.hasAttribute("type") ? c.getAttribute("type").toLowerCase() : "", e.modules.filter.tagType = c.tagName.toLowerCase(), e.definition.headerFilterLiveFilter !== !1 && (e.definition.headerFilter !== "autocomplete" && e.definition.headerFilter !== "tickCross" && (e.definition.editor !== "autocomplete" && e.definition.editor !== "tickCross" || e.definition.headerFilter !== !0) && (c.addEventListener("keyup", d), c.addEventListener("search", d), e.modules.filter.attrType == "number" && c.addEventListener("change", function(e) {
|
|
2919
3377
|
i(c.value);
|
|
2920
3378
|
}), e.modules.filter.attrType == "text" && this.table.browser !== "ie" && c.setAttribute("type", "search")), (e.modules.filter.tagType == "input" || e.modules.filter.tagType == "select" || e.modules.filter.tagType == "textarea") && c.addEventListener("mousedown", function(e) {
|
|
2921
3379
|
e.stopPropagation();
|
|
@@ -3074,92 +3532,87 @@ var A = {
|
|
|
3074
3532
|
}) : n = e.func(t), n;
|
|
3075
3533
|
}
|
|
3076
3534
|
};
|
|
3077
|
-
function
|
|
3535
|
+
function It(e, t, n) {
|
|
3078
3536
|
return this.emptyToSpace(this.sanitizeHTML(e.getValue()));
|
|
3079
3537
|
}
|
|
3080
|
-
function
|
|
3538
|
+
function Lt(e, t, n) {
|
|
3081
3539
|
return e.getValue();
|
|
3082
3540
|
}
|
|
3083
|
-
function
|
|
3541
|
+
function Rt(e, t, n) {
|
|
3084
3542
|
return e.getElement().style.whiteSpace = "pre-wrap", this.emptyToSpace(this.sanitizeHTML(e.getValue()));
|
|
3085
3543
|
}
|
|
3086
|
-
function
|
|
3544
|
+
function zt(e, t, n) {
|
|
3087
3545
|
var r = parseFloat(e.getValue()), i = "", a, o, s, c, l, u = t.decimal || ".", d = t.thousand || ",", f = t.negativeSign || "-", p = t.symbol || "", m = !!t.symbolAfter, h = t.precision === void 0 ? 2 : t.precision;
|
|
3088
3546
|
if (Number.isNaN(r)) return this.emptyToSpace(this.sanitizeHTML(e.getValue()));
|
|
3089
3547
|
if (r < 0 && (r = Math.abs(r), i = f), a = h === !1 ? r : r.toFixed(h), a = String(a).split("."), o = a[0], s = a.length > 1 ? u + a[1] : "", t.thousand !== !1) for (c = /(\d+)(\d{3})/; c.test(o);) o = o.replace(c, "$1" + d + "$2");
|
|
3090
3548
|
return l = o + s, i === !0 ? (l = "(" + l + ")", m ? l + p : p + l) : m ? i + l + p : i + p + l;
|
|
3091
3549
|
}
|
|
3092
|
-
function
|
|
3093
|
-
var
|
|
3094
|
-
function
|
|
3550
|
+
function Bt(e, t, n) {
|
|
3551
|
+
var r = e.getValue(), i = t.urlPrefix || "", a = t.download, o = r, s = document.createElement("a"), c;
|
|
3552
|
+
function l(e, t) {
|
|
3095
3553
|
var n = t[e.shift()];
|
|
3096
|
-
return e.length && typeof n == "object" ?
|
|
3554
|
+
return e.length && typeof n == "object" ? l(e, n) : n;
|
|
3097
3555
|
}
|
|
3098
|
-
if (
|
|
3556
|
+
if (t.labelField && (c = e.getData(), o = l(t.labelField.split(this.table.options.nestedFieldSeparator), c)), t.label) switch (typeof t.label) {
|
|
3099
3557
|
case "string":
|
|
3100
|
-
|
|
3101
|
-
break;
|
|
3102
|
-
case "function":
|
|
3103
|
-
s = n.label(e);
|
|
3558
|
+
o = t.label;
|
|
3104
3559
|
break;
|
|
3560
|
+
case "function": o = t.label(e);
|
|
3105
3561
|
}
|
|
3106
|
-
if (
|
|
3107
|
-
if (
|
|
3562
|
+
if (o) {
|
|
3563
|
+
if (t.urlField && (c = e.getData(), r = V.retrieveNestedData(this.table.options.nestedFieldSeparator, t.urlField, c)), t.url) switch (typeof t.url) {
|
|
3108
3564
|
case "string":
|
|
3109
|
-
|
|
3110
|
-
break;
|
|
3111
|
-
case "function":
|
|
3112
|
-
i = n.url(e);
|
|
3565
|
+
r = t.url;
|
|
3113
3566
|
break;
|
|
3567
|
+
case "function": r = t.url(e);
|
|
3114
3568
|
}
|
|
3115
|
-
return
|
|
3116
|
-
}
|
|
3569
|
+
return s.setAttribute("href", i + r), t.target && s.setAttribute("target", t.target), t.download && (a = typeof a == "function" ? a(e) : a === !0 ? "" : a, s.setAttribute("download", a)), s.innerHTML = this.emptyToSpace(this.sanitizeHTML(o)), s;
|
|
3570
|
+
}
|
|
3571
|
+
return " ";
|
|
3117
3572
|
}
|
|
3118
|
-
function
|
|
3573
|
+
function Vt(e, t, n) {
|
|
3119
3574
|
var r = document.createElement("img"), i = e.getValue();
|
|
3120
3575
|
switch (t.urlPrefix && (i = t.urlPrefix + e.getValue()), t.urlSuffix && (i += t.urlSuffix), r.setAttribute("src", i), typeof t.height) {
|
|
3121
3576
|
case "number":
|
|
3122
3577
|
r.style.height = t.height + "px";
|
|
3123
3578
|
break;
|
|
3124
|
-
case "string":
|
|
3125
|
-
r.style.height = t.height;
|
|
3126
|
-
break;
|
|
3579
|
+
case "string": r.style.height = t.height;
|
|
3127
3580
|
}
|
|
3128
3581
|
switch (typeof t.width) {
|
|
3129
3582
|
case "number":
|
|
3130
3583
|
r.style.width = t.width + "px";
|
|
3131
3584
|
break;
|
|
3132
|
-
case "string":
|
|
3133
|
-
r.style.width = t.width;
|
|
3134
|
-
break;
|
|
3585
|
+
case "string": r.style.width = t.width;
|
|
3135
3586
|
}
|
|
3136
3587
|
return r.addEventListener("load", function() {
|
|
3137
3588
|
e.getRow().normalizeHeight();
|
|
3138
3589
|
}), r;
|
|
3139
3590
|
}
|
|
3140
|
-
function
|
|
3591
|
+
function Ht(e, t, n) {
|
|
3141
3592
|
var r = e.getValue(), i = e.getElement(), a = t.allowEmpty, o = t.allowTruthy, s = Object.keys(t).includes("trueValue"), c = t.tickElement === void 0 ? "<svg enable-background=\"new 0 0 24 24\" height=\"14\" width=\"14\" viewBox=\"0 0 24 24\" xml:space=\"preserve\" ><path class=\"tabulator-tick\" clip-rule=\"evenodd\" d=\"M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z\" fill-rule=\"evenodd\"/></svg>" : t.tickElement, l = t.crossElement === void 0 ? "<svg enable-background=\"new 0 0 24 24\" height=\"14\" width=\"14\" viewBox=\"0 0 24 24\" xml:space=\"preserve\" ><path class=\"tabulator-cross\" d=\"M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z\"/></svg>" : t.crossElement;
|
|
3142
3593
|
return s && r === t.trueValue || !s && (o && r || r === !0 || r === "true" || r === "True" || r === 1 || r === "1") ? (i.setAttribute("aria-checked", !0), c || "") : a && (r === "null" || r === "" || r == null) ? (i.setAttribute("aria-checked", "mixed"), "") : (i.setAttribute("aria-checked", !1), l || "");
|
|
3143
3594
|
}
|
|
3144
|
-
function
|
|
3595
|
+
function Ut(e, t, n) {
|
|
3145
3596
|
var r = this.table.dependencyRegistry.lookup(["luxon", "DateTime"], "DateTime"), i = t.inputFormat || "yyyy-MM-dd HH:mm:ss", a = t.outputFormat || "dd/MM/yyyy HH:mm:ss", o = t.invalidPlaceholder === void 0 ? "" : t.invalidPlaceholder, s = e.getValue();
|
|
3146
3597
|
if (r !== void 0) {
|
|
3147
3598
|
var c = r.isDateTime(s) ? s : i === "x" ? r.fromMillis(s) : i === "iso" ? r.fromISO(String(s)) : r.fromFormat(String(s), i);
|
|
3148
3599
|
return c.isValid ? (t.timezone && (c = c.setZone(t.timezone)), c.toFormat(a)) : o === !0 || !s ? s : typeof o == "function" ? o(s) : o;
|
|
3149
|
-
}
|
|
3600
|
+
}
|
|
3601
|
+
console.error("Format Error - 'datetime' formatter is dependant on luxon.js");
|
|
3150
3602
|
}
|
|
3151
|
-
function
|
|
3603
|
+
function Wt(e, t, n) {
|
|
3152
3604
|
var r = this.table.dependencyRegistry.lookup(["luxon", "DateTime"], "DateTime"), i = t.inputFormat || "yyyy-MM-dd HH:mm:ss", a = t.invalidPlaceholder === void 0 ? "" : t.invalidPlaceholder, o = t.suffix !== void 0 && t.suffix, s = t.unit === void 0 ? "days" : t.unit, c = t.humanize !== void 0 && t.humanize, l = t.date === void 0 ? r.now() : t.date, u = e.getValue();
|
|
3153
3605
|
if (r !== void 0) {
|
|
3154
3606
|
var d = r.isDateTime(u) ? u : i === "x" ? r.fromMillis(u) : i === "iso" ? r.fromISO(String(u)) : r.fromFormat(String(u), i);
|
|
3155
3607
|
return d.isValid ? c ? d.diff(l, s).toHuman() + (o ? " " + o : "") : parseInt(d.diff(l, s)[s]) + (o ? " " + o : "") : a === !0 ? u : typeof a == "function" ? a(u) : a;
|
|
3156
|
-
}
|
|
3608
|
+
}
|
|
3609
|
+
console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js");
|
|
3157
3610
|
}
|
|
3158
|
-
function
|
|
3611
|
+
function Gt(e, t, n) {
|
|
3159
3612
|
var r = e.getValue();
|
|
3160
3613
|
return t[r] === void 0 ? (console.warn("Missing display value for " + r), r) : t[r];
|
|
3161
3614
|
}
|
|
3162
|
-
function
|
|
3615
|
+
function Kt(e, t, n) {
|
|
3163
3616
|
var r = e.getValue(), i = e.getElement(), a = t && t.stars ? t.stars : 5, o = document.createElement("span"), s = document.createElementNS("http://www.w3.org/2000/svg", "svg"), c = "<polygon fill=\"#FFEA00\" stroke=\"#C1AB60\" stroke-width=\"37.6152\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"10\" points=\"259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 \"/>", l = "<polygon fill=\"#D2D2D2\" stroke=\"#686868\" stroke-width=\"37.6152\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-miterlimit=\"10\" points=\"259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 \"/>";
|
|
3164
3617
|
o.style.verticalAlign = "middle", s.setAttribute("width", "14"), s.setAttribute("height", "14"), s.setAttribute("viewBox", "0 0 512 512"), s.setAttribute("xml:space", "preserve"), s.style.padding = "0 1px", r = r && !Number.isNaN(r) ? parseInt(r) : 0, r = Math.max(0, Math.min(r, a));
|
|
3165
3618
|
for (var u = 1; u <= a; u++) {
|
|
@@ -3168,7 +3621,7 @@ function oe(e, t, n) {
|
|
|
3168
3621
|
}
|
|
3169
3622
|
return i.style.whiteSpace = "nowrap", i.style.overflow = "hidden", i.style.textOverflow = "ellipsis", i.setAttribute("aria-label", r), o;
|
|
3170
3623
|
}
|
|
3171
|
-
function
|
|
3624
|
+
function qt(e, t, n) {
|
|
3172
3625
|
var r = this.sanitizeHTML(e.getValue()) || 0, i = document.createElement("span"), a = t && t.max ? t.max : 100, o = t && t.min ? t.min : 0, s = t && t.color !== void 0 ? t.color : [
|
|
3173
3626
|
"red",
|
|
3174
3627
|
"orange",
|
|
@@ -3191,90 +3644,90 @@ function se(e, t, n) {
|
|
|
3191
3644
|
return i.style.backgroundColor = c, i;
|
|
3192
3645
|
}
|
|
3193
3646
|
}
|
|
3194
|
-
function
|
|
3195
|
-
var r = this.sanitizeHTML(e.getValue()) || 0, i = e.getElement(), a = t.max ? t.max : 100, o = t.min ? t.min : 0,
|
|
3196
|
-
switch (
|
|
3647
|
+
function Jt(e, t = {}, n) {
|
|
3648
|
+
var r = this.sanitizeHTML(e.getValue()) || 0, i = e.getElement(), a = t.max ? t.max : 100, o = t.min ? t.min : 0, s = t.legendAlign ? t.legendAlign : "center", c, l = parseFloat(r) <= a ? parseFloat(r) : a, u, d, f;
|
|
3649
|
+
switch (l = parseFloat(l) >= o ? parseFloat(l) : o, c = (a - o) / 100, l = Math.round((l - o) / c), typeof t.color) {
|
|
3197
3650
|
case "string":
|
|
3198
|
-
|
|
3651
|
+
u = t.color;
|
|
3199
3652
|
break;
|
|
3200
3653
|
case "function":
|
|
3201
|
-
|
|
3654
|
+
u = t.color(r);
|
|
3202
3655
|
break;
|
|
3203
3656
|
case "object": if (Array.isArray(t.color)) {
|
|
3204
|
-
let e = 100 / t.color.length, n = Math.floor(
|
|
3205
|
-
n = Math.min(n, t.color.length - 1), n = Math.max(n, 0),
|
|
3657
|
+
let e = 100 / t.color.length, n = Math.floor(l / e);
|
|
3658
|
+
n = Math.min(n, t.color.length - 1), n = Math.max(n, 0), u = t.color[n];
|
|
3206
3659
|
break;
|
|
3207
3660
|
}
|
|
3208
|
-
default:
|
|
3661
|
+
default: u = "#2DC214";
|
|
3209
3662
|
}
|
|
3210
3663
|
switch (typeof t.legend) {
|
|
3211
3664
|
case "string":
|
|
3212
|
-
|
|
3665
|
+
d = t.legend;
|
|
3213
3666
|
break;
|
|
3214
3667
|
case "function":
|
|
3215
|
-
|
|
3668
|
+
d = t.legend(r);
|
|
3216
3669
|
break;
|
|
3217
3670
|
case "boolean":
|
|
3218
|
-
|
|
3671
|
+
d = r;
|
|
3219
3672
|
break;
|
|
3220
|
-
default:
|
|
3673
|
+
default: d = !1;
|
|
3221
3674
|
}
|
|
3222
3675
|
switch (typeof t.legendColor) {
|
|
3223
3676
|
case "string":
|
|
3224
|
-
|
|
3677
|
+
f = t.legendColor;
|
|
3225
3678
|
break;
|
|
3226
3679
|
case "function":
|
|
3227
|
-
|
|
3680
|
+
f = t.legendColor(r);
|
|
3228
3681
|
break;
|
|
3229
3682
|
case "object":
|
|
3230
3683
|
if (Array.isArray(t.legendColor)) {
|
|
3231
|
-
let e = 100 / t.legendColor.length, n = Math.floor(
|
|
3232
|
-
n = Math.min(n, t.legendColor.length - 1), n = Math.max(n, 0),
|
|
3684
|
+
let e = 100 / t.legendColor.length, n = Math.floor(l / e);
|
|
3685
|
+
n = Math.min(n, t.legendColor.length - 1), n = Math.max(n, 0), f = t.legendColor[n];
|
|
3233
3686
|
}
|
|
3234
3687
|
break;
|
|
3235
|
-
default:
|
|
3688
|
+
default: f = "#000";
|
|
3236
3689
|
}
|
|
3237
|
-
i.style.minWidth = "30px", i.style.position = "relative", i.setAttribute("aria-label",
|
|
3690
|
+
i.style.minWidth = "30px", i.style.position = "relative", i.setAttribute("aria-label", l);
|
|
3691
|
+
var p = document.createElement("div");
|
|
3692
|
+
p.style.display = "inline-block", p.style.width = l + "%", p.style.backgroundColor = u, p.style.height = "100%", p.setAttribute("data-max", a), p.setAttribute("data-min", o);
|
|
3238
3693
|
var m = document.createElement("div");
|
|
3239
|
-
m.style.
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
var g = document.createElement("div");
|
|
3243
|
-
g.style.position = "absolute", g.style.top = 0, g.style.left = 0, g.style.textAlign = c, g.style.width = "100%", g.style.color = p, g.innerHTML = f;
|
|
3694
|
+
if (m.style.position = "relative", m.style.width = "100%", m.style.height = "100%", d) {
|
|
3695
|
+
var h = document.createElement("div");
|
|
3696
|
+
h.style.position = "absolute", h.style.top = 0, h.style.left = 0, h.style.textAlign = s, h.style.width = "100%", h.style.color = f, h.innerHTML = d;
|
|
3244
3697
|
}
|
|
3245
3698
|
return n(function() {
|
|
3246
|
-
if (!(e instanceof
|
|
3699
|
+
if (!(e instanceof nt)) {
|
|
3247
3700
|
var t = document.createElement("div");
|
|
3248
3701
|
t.style.position = "absolute", t.style.top = "4px", t.style.bottom = "4px", t.style.left = "4px", t.style.right = "4px", i.appendChild(t), i = t;
|
|
3249
3702
|
}
|
|
3250
|
-
i.appendChild(
|
|
3703
|
+
i.appendChild(m), m.appendChild(p), d && m.appendChild(h);
|
|
3251
3704
|
}), "";
|
|
3252
3705
|
}
|
|
3253
|
-
function
|
|
3706
|
+
function Yt(e, t, n) {
|
|
3254
3707
|
return e.getElement().style.backgroundColor = this.sanitizeHTML(e.getValue()), "";
|
|
3255
3708
|
}
|
|
3256
|
-
function
|
|
3709
|
+
function Xt(e, t, n) {
|
|
3257
3710
|
return "<svg enable-background=\"new 0 0 24 24\" height=\"14\" width=\"14\" viewBox=\"0 0 24 24\" xml:space=\"preserve\" ><path fill=\"#2DC214\" clip-rule=\"evenodd\" d=\"M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z\" fill-rule=\"evenodd\"/></svg>";
|
|
3258
3711
|
}
|
|
3259
|
-
function
|
|
3712
|
+
function Zt(e, t, n) {
|
|
3260
3713
|
return "<svg enable-background=\"new 0 0 24 24\" height=\"14\" width=\"14\" viewBox=\"0 0 24 24\" xml:space=\"preserve\" ><path fill=\"#CE1515\" d=\"M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z\"/></svg>";
|
|
3261
3714
|
}
|
|
3262
|
-
function
|
|
3715
|
+
function Qt(e, t, n) {
|
|
3263
3716
|
var r = e.getValue(), i = t.size || 15, a = i + "px", o, s, c = !t.hasOwnProperty("onValue") || t.onValue, l = t.hasOwnProperty("offValue") ? t.offValue : !1, u = t.onTruthy ? r : r === c;
|
|
3264
3717
|
return o = document.createElement("div"), o.classList.add("tabulator-toggle"), u ? (o.classList.add("tabulator-toggle-on"), o.style.flexDirection = "row-reverse", t.onColor && (o.style.background = t.onColor)) : t.offColor && (o.style.background = t.offColor), o.style.width = 2.5 * i + "px", o.style.borderRadius = a, t.clickable && o.addEventListener("click", (t) => {
|
|
3265
3718
|
e.setValue(u ? l : c);
|
|
3266
3719
|
}), s = document.createElement("div"), s.classList.add("tabulator-toggle-switch"), s.style.height = a, s.style.width = a, s.style.borderRadius = a, o.appendChild(s), o;
|
|
3267
3720
|
}
|
|
3268
|
-
function
|
|
3721
|
+
function $t(e, t, n) {
|
|
3269
3722
|
var r = document.createElement("span"), i = e.getRow(), a = e.getTable();
|
|
3270
3723
|
return i.watchPosition((e) => {
|
|
3271
3724
|
t.relativeToPage && (e += a.modules.page.getPageSize() * (a.modules.page.getPage() - 1)), r.innerText = e;
|
|
3272
3725
|
}), r;
|
|
3273
3726
|
}
|
|
3274
|
-
function
|
|
3727
|
+
function en(e, t, n) {
|
|
3275
3728
|
return e.getElement().classList.add("tabulator-row-handle"), "<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>";
|
|
3276
3729
|
}
|
|
3277
|
-
function
|
|
3730
|
+
function tn(e, t, n) {
|
|
3278
3731
|
var r, i, a;
|
|
3279
3732
|
function o(e) {
|
|
3280
3733
|
var t = e.getValue(), n = "plaintext";
|
|
@@ -3282,50 +3735,48 @@ function he(e, t, n) {
|
|
|
3282
3735
|
case "boolean":
|
|
3283
3736
|
n = "tickCross";
|
|
3284
3737
|
break;
|
|
3285
|
-
case "string":
|
|
3286
|
-
t.includes("\n") && (n = "textarea");
|
|
3287
|
-
break;
|
|
3738
|
+
case "string": t.includes("\n") && (n = "textarea");
|
|
3288
3739
|
}
|
|
3289
3740
|
return n;
|
|
3290
3741
|
}
|
|
3291
3742
|
return r = t.formatterLookup ? t.formatterLookup(e) : o(e), t.paramsLookup && (a = typeof t.paramsLookup == "function" ? t.paramsLookup(r, e) : t.paramsLookup[r]), i = this.table.modules.format.lookupFormatter(r), i.call(this, e, a || {}, n);
|
|
3292
3743
|
}
|
|
3293
|
-
function
|
|
3294
|
-
var
|
|
3295
|
-
return
|
|
3296
|
-
return e.map((e) =>
|
|
3297
|
-
} :
|
|
3744
|
+
function nn(e, t, n) {
|
|
3745
|
+
var r = t.delimiter || ",", i = e.getValue(), a = this.table, o;
|
|
3746
|
+
return t.valueMap && (o = typeof t.valueMap == "string" ? function(e) {
|
|
3747
|
+
return e.map((e) => V.retrieveNestedData(a.options.nestedFieldSeparator, t.valueMap, e));
|
|
3748
|
+
} : t.valueMap), Array.isArray(i) ? (o && (i = o(i)), i.join(r)) : i;
|
|
3298
3749
|
}
|
|
3299
|
-
function
|
|
3750
|
+
function rn(e, t, n) {
|
|
3300
3751
|
var r = t.indent || " ", i = t.multiline === void 0 || t.multiline, a = t.replacer || null, o = e.getValue();
|
|
3301
3752
|
return i && (e.getElement().style.whiteSpace = "pre-wrap"), JSON.stringify(o, a, r);
|
|
3302
3753
|
}
|
|
3303
|
-
var
|
|
3304
|
-
plaintext:
|
|
3305
|
-
html:
|
|
3306
|
-
textarea:
|
|
3307
|
-
money:
|
|
3308
|
-
link:
|
|
3309
|
-
image:
|
|
3310
|
-
tickCross:
|
|
3311
|
-
datetime:
|
|
3312
|
-
datetimediff:
|
|
3313
|
-
lookup:
|
|
3314
|
-
star:
|
|
3315
|
-
traffic:
|
|
3316
|
-
progress:
|
|
3317
|
-
color:
|
|
3318
|
-
buttonTick:
|
|
3319
|
-
buttonCross:
|
|
3320
|
-
toggle:
|
|
3321
|
-
rownum:
|
|
3322
|
-
handle:
|
|
3323
|
-
adaptable:
|
|
3324
|
-
array:
|
|
3325
|
-
json:
|
|
3326
|
-
},
|
|
3754
|
+
var an = {
|
|
3755
|
+
plaintext: It,
|
|
3756
|
+
html: Lt,
|
|
3757
|
+
textarea: Rt,
|
|
3758
|
+
money: zt,
|
|
3759
|
+
link: Bt,
|
|
3760
|
+
image: Vt,
|
|
3761
|
+
tickCross: Ht,
|
|
3762
|
+
datetime: Ut,
|
|
3763
|
+
datetimediff: Wt,
|
|
3764
|
+
lookup: Gt,
|
|
3765
|
+
star: Kt,
|
|
3766
|
+
traffic: qt,
|
|
3767
|
+
progress: Jt,
|
|
3768
|
+
color: Yt,
|
|
3769
|
+
buttonTick: Xt,
|
|
3770
|
+
buttonCross: Zt,
|
|
3771
|
+
toggle: Qt,
|
|
3772
|
+
rownum: $t,
|
|
3773
|
+
handle: en,
|
|
3774
|
+
adaptable: tn,
|
|
3775
|
+
array: nn,
|
|
3776
|
+
json: rn
|
|
3777
|
+
}, on = class e extends H {
|
|
3327
3778
|
static moduleName = "format";
|
|
3328
|
-
static formatters =
|
|
3779
|
+
static formatters = an;
|
|
3329
3780
|
constructor(e) {
|
|
3330
3781
|
super(e), this.registerColumnOption("formatter"), this.registerColumnOption("formatterParams"), this.registerColumnOption("formatterPrint"), this.registerColumnOption("formatterPrintParams"), this.registerColumnOption("formatterClipboard"), this.registerColumnOption("formatterClipboardParams"), this.registerColumnOption("formatterHtmlOutput"), this.registerColumnOption("formatterHtmlOutputParams"), this.registerColumnOption("titleFormatter"), this.registerColumnOption("titleFormatterParams");
|
|
3331
3782
|
}
|
|
@@ -3348,9 +3799,7 @@ var ve = {
|
|
|
3348
3799
|
case "function":
|
|
3349
3800
|
n = t;
|
|
3350
3801
|
break;
|
|
3351
|
-
default:
|
|
3352
|
-
n = e.formatters.plaintext;
|
|
3353
|
-
break;
|
|
3802
|
+
default: n = e.formatters.plaintext;
|
|
3354
3803
|
}
|
|
3355
3804
|
return n;
|
|
3356
3805
|
}
|
|
@@ -3392,7 +3841,8 @@ var ve = {
|
|
|
3392
3841
|
e.modules.format || (e.modules.format = {}), e.modules.format.renderedCallback = t, e.modules.format.rendered = !1;
|
|
3393
3842
|
}
|
|
3394
3843
|
return n.formatter.call(this, e.getComponent(), r, t);
|
|
3395
|
-
}
|
|
3844
|
+
}
|
|
3845
|
+
return this.formatValue(e);
|
|
3396
3846
|
}
|
|
3397
3847
|
sanitizeHTML(e) {
|
|
3398
3848
|
if (e) {
|
|
@@ -3409,12 +3859,13 @@ var ve = {
|
|
|
3409
3859
|
return String(e).replace(/[&<>"'`=/]/g, function(e) {
|
|
3410
3860
|
return t[e];
|
|
3411
3861
|
});
|
|
3412
|
-
}
|
|
3862
|
+
}
|
|
3863
|
+
return e;
|
|
3413
3864
|
}
|
|
3414
3865
|
emptyToSpace(e) {
|
|
3415
3866
|
return e == null || e === "" ? " " : e;
|
|
3416
3867
|
}
|
|
3417
|
-
},
|
|
3868
|
+
}, sn = class extends H {
|
|
3418
3869
|
static moduleName = "interaction";
|
|
3419
3870
|
constructor(e) {
|
|
3420
3871
|
super(e), this.eventMap = {
|
|
@@ -3544,19 +3995,17 @@ var ve = {
|
|
|
3544
3995
|
clearTimeout(i.tapHold), i.tapHold = null, i.tap = null, clearTimeout(i.tapDbl), i.tapDbl = null, this.dispatchEvent(e + "TapHold", n, r);
|
|
3545
3996
|
}, 1e3);
|
|
3546
3997
|
break;
|
|
3547
|
-
case "end":
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
}, 300), clearTimeout(i.tapHold), i.tapHold = null;
|
|
3551
|
-
break;
|
|
3998
|
+
case "end": i.tap && (i.tap = null, this.dispatchEvent(e + "Tap", n, r)), i.tapDbl ? (clearTimeout(i.tapDbl), i.tapDbl = null, this.dispatchEvent(e + "DblTap", n, r)) : i.tapDbl = setTimeout(() => {
|
|
3999
|
+
clearTimeout(i.tapDbl), i.tapDbl = null;
|
|
4000
|
+
}, 300), clearTimeout(i.tapHold), i.tapHold = null;
|
|
3552
4001
|
}
|
|
3553
4002
|
}
|
|
3554
4003
|
dispatchEvent(e, t, n) {
|
|
3555
4004
|
var r = n.getComponent(), i;
|
|
3556
|
-
this.columnSubscribers[e] && (n instanceof
|
|
4005
|
+
this.columnSubscribers[e] && (n instanceof rt ? i = n.column.definition[e] : n instanceof W && (i = n.definition[e]), i && i(t, r)), this.dispatchExternal(e, t, r);
|
|
3557
4006
|
}
|
|
3558
4007
|
};
|
|
3559
|
-
function
|
|
4008
|
+
function cn(e, t, n, r, i) {
|
|
3560
4009
|
var a = document.createElement("span"), o = document.createElement("span"), s = document.createElement("span"), c = document.createElement("span"), l = document.createElement("span"), u = document.createElement("span");
|
|
3561
4010
|
return this.table.modules.localize.langBind("pagination|counter|showing", (e) => {
|
|
3562
4011
|
o.innerHTML = e;
|
|
@@ -3566,7 +4015,7 @@ function xe(e, t, n, r, i) {
|
|
|
3566
4015
|
u.innerHTML = e;
|
|
3567
4016
|
}), r ? (s.innerHTML = " " + t + "-" + Math.min(t + e - 1, r) + " ", l.innerHTML = " " + r + " ", a.appendChild(o), a.appendChild(s), a.appendChild(c), a.appendChild(l), a.appendChild(u)) : (s.innerHTML = " 0 ", a.appendChild(o), a.appendChild(s), a.appendChild(u)), a;
|
|
3568
4017
|
}
|
|
3569
|
-
function
|
|
4018
|
+
function ln(e, t, n, r, i) {
|
|
3570
4019
|
var a = document.createElement("span"), o = document.createElement("span"), s = document.createElement("span"), c = document.createElement("span"), l = document.createElement("span"), u = document.createElement("span");
|
|
3571
4020
|
return this.table.modules.localize.langBind("pagination|counter|showing", (e) => {
|
|
3572
4021
|
o.innerHTML = e;
|
|
@@ -3576,12 +4025,12 @@ function Se(e, t, n, r, i) {
|
|
|
3576
4025
|
u.innerHTML = e;
|
|
3577
4026
|
}), a.appendChild(o), a.appendChild(s), a.appendChild(c), a.appendChild(l), a.appendChild(u), a;
|
|
3578
4027
|
}
|
|
3579
|
-
var
|
|
3580
|
-
rows:
|
|
3581
|
-
pages:
|
|
3582
|
-
},
|
|
4028
|
+
var un = {
|
|
4029
|
+
rows: cn,
|
|
4030
|
+
pages: ln
|
|
4031
|
+
}, dn = class e extends H {
|
|
3583
4032
|
static moduleName = "page";
|
|
3584
|
-
static pageCounters =
|
|
4033
|
+
static pageCounters = un;
|
|
3585
4034
|
constructor(e) {
|
|
3586
4035
|
super(e), this.mode = "local", this.progressiveLoad = !1, this.element = null, this.pageCounterElement = null, this.pageCounter = null, this.size = 0, this.page = 1, this.count = 5, this.max = 1, this.remoteRowCountEstimate = null, this.initialLoad = !0, this.dataChanging = !1, this.pageSizes = [], this.registerTableOption("pagination", !1), this.registerTableOption("paginationMode", "local"), this.registerTableOption("paginationSize", !1), this.registerTableOption("paginationInitialPage", 1), this.registerTableOption("paginationCounter", !1), this.registerTableOption("paginationCounterElement", !1), this.registerTableOption("paginationButtonCount", 5), this.registerTableOption("paginationSizeSelector", !1), this.registerTableOption("paginationElement", !1), this.registerTableOption("paginationAddRow", "page"), this.registerTableOption("paginationOutOfRange", !1), this.registerTableOption("progressiveLoad", !1), this.registerTableOption("progressiveLoadDelay", 0), this.registerTableOption("progressiveLoadScrollMargin", 0), this.registerTableFunction("setMaxPage", this.setMaxPage.bind(this)), this.registerTableFunction("setPage", this.setPage.bind(this)), this.registerTableFunction("setPageToRow", this.userSetPageToRow.bind(this)), this.registerTableFunction("setPageSize", this.userSetPageSize.bind(this)), this.registerTableFunction("getPageSize", this.getPageSize.bind(this)), this.registerTableFunction("previousPage", this.previousPage.bind(this)), this.registerTableFunction("nextPage", this.nextPage.bind(this)), this.registerTableFunction("getPage", this.getPage.bind(this)), this.registerTableFunction("getPageMax", this.getPageMax.bind(this)), this.registerComponentFunction("row", "pageTo", this.setPageToRow.bind(this));
|
|
3587
4036
|
}
|
|
@@ -3686,7 +4135,7 @@ var Ce = {
|
|
|
3686
4135
|
this.dispatch("page-changed");
|
|
3687
4136
|
}
|
|
3688
4137
|
setMaxRows(e) {
|
|
3689
|
-
|
|
4138
|
+
this.max = e ? this.size === !0 ? 1 : Math.ceil(e / this.size) : 1, this.page > this.max && (this.page = this.max);
|
|
3690
4139
|
}
|
|
3691
4140
|
reset(e) {
|
|
3692
4141
|
this.initialLoad || (this.mode == "local" || e) && (this.page = 1, this.trackChanges());
|
|
@@ -3708,7 +4157,8 @@ var Ce = {
|
|
|
3708
4157
|
if (t > -1) {
|
|
3709
4158
|
var n = this.size === !0 ? 1 : Math.ceil((t + 1) / this.size);
|
|
3710
4159
|
return this.setPage(n);
|
|
3711
|
-
}
|
|
4160
|
+
}
|
|
4161
|
+
return console.warn("Pagination Error - Requested row is not visible"), Promise.reject();
|
|
3712
4162
|
}
|
|
3713
4163
|
setPageSize(e) {
|
|
3714
4164
|
e !== !0 && (e = parseInt(e)), e > 0 && (this.size = e, this.dispatchExternal("pageSizeChanged", e)), this.pageSizeSelect && this.generatePageSizeSelectList(), this.trackChanges();
|
|
@@ -3770,7 +4220,8 @@ var Ce = {
|
|
|
3770
4220
|
r && (n.push(r), r.type === "row" && (a ||= r, t++));
|
|
3771
4221
|
}
|
|
3772
4222
|
return this._setPageCounter(o.length, t, a ? o.indexOf(a) + 1 : 0), n;
|
|
3773
|
-
}
|
|
4223
|
+
}
|
|
4224
|
+
return this._setPageButtons(), this._setPageCounter(o.length), e.slice(0);
|
|
3774
4225
|
}
|
|
3775
4226
|
trigger() {
|
|
3776
4227
|
var e;
|
|
@@ -3786,32 +4237,30 @@ var Ce = {
|
|
|
3786
4237
|
}
|
|
3787
4238
|
_parseRemoteData(e) {
|
|
3788
4239
|
var t, n;
|
|
3789
|
-
if (e.last_page === void 0 && console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").last_page || "last_page") + "' property"), e.data)
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
this.
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
e = this.page === 1 ? e.data : this.table.rowManager.getData().concat(e.data), this.table.rowManager.setData(e, this.page !== 1, this.page == 1), t = this.table.options.progressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2, this.table.rowManager.element.scrollHeight <= this.table.rowManager.element.clientHeight + t && this.page < this.max && setTimeout(() => {
|
|
4240
|
+
if (e.last_page === void 0 && console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").last_page || "last_page") + "' property"), e.data) {
|
|
4241
|
+
if (this.max = parseInt(e.last_page) || 1, this.remoteRowCountEstimate = e.last_row === void 0 ? e.last_page * this.size - (this.page == e.last_page ? this.size - e.data.length : 0) : e.last_row, this.progressiveLoad) {
|
|
4242
|
+
switch (this.mode) {
|
|
4243
|
+
case "progressive_load":
|
|
4244
|
+
this.page == 1 ? this.table.rowManager.setData(e.data, !1, this.page == 1) : this.table.rowManager.addRows(e.data), this.page < this.max && setTimeout(() => {
|
|
4245
|
+
this.nextPage();
|
|
4246
|
+
}, this.table.options.progressiveLoadDelay);
|
|
4247
|
+
break;
|
|
4248
|
+
case "progressive_scroll": e = this.page === 1 ? e.data : this.table.rowManager.getData().concat(e.data), this.table.rowManager.setData(e, this.page !== 1, this.page == 1), t = this.table.options.progressiveLoadScrollMargin || this.table.rowManager.element.clientHeight * 2, this.table.rowManager.element.scrollHeight <= this.table.rowManager.element.clientHeight + t && this.page < this.max && setTimeout(() => {
|
|
3798
4249
|
this.nextPage();
|
|
3799
4250
|
});
|
|
3800
|
-
|
|
4251
|
+
}
|
|
4252
|
+
return !1;
|
|
3801
4253
|
}
|
|
3802
|
-
return !1;
|
|
3803
|
-
} else {
|
|
3804
4254
|
if (this.page > this.max && (console.warn("Remote Pagination Error - Server returned last page value lower than the current page"), n = this.options("paginationOutOfRange"), n)) return this.setPage(typeof n == "function" ? n.call(this, this.page, this.max) : n);
|
|
3805
4255
|
this.dispatchExternal("pageLoaded", this.getPage());
|
|
3806
|
-
}
|
|
3807
|
-
else console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").data || "data") + "' property");
|
|
4256
|
+
} else console.warn("Remote Pagination Error - Server response missing '" + (this.options("dataReceiveParams").data || "data") + "' property");
|
|
3808
4257
|
return e.data;
|
|
3809
4258
|
}
|
|
3810
4259
|
footerRedraw() {
|
|
3811
4260
|
var e = this.table.footerManager.containerElement;
|
|
3812
4261
|
Math.ceil(e.clientWidth) - e.scrollWidth < 0 ? this.pagesElement.style.display = "none" : (this.pagesElement.style.display = "", Math.ceil(e.clientWidth) - e.scrollWidth < 0 && (this.pagesElement.style.display = "none"));
|
|
3813
4262
|
}
|
|
3814
|
-
},
|
|
4263
|
+
}, fn = class extends H {
|
|
3815
4264
|
static moduleName = "resizeColumns";
|
|
3816
4265
|
constructor(e) {
|
|
3817
4266
|
super(e), this.startColumn = !1, this.startX = !1, this.startWidth = !1, this.latestX = !1, this.handle = null, this.initialNextColumn = null, this.nextColumn = null, this.initialized = !1, this.registerColumnOption("resizable", !0), this.registerTableOption("resizableColumnFit", !1), this.registerTableOption("resizableColumnGuide", !1);
|
|
@@ -3862,7 +4311,7 @@ var Ce = {
|
|
|
3862
4311
|
l.addEventListener("mousedown", u), l.addEventListener("touchstart", u, { passive: !0 }), l.addEventListener("dblclick", (e) => {
|
|
3863
4312
|
var t = c.getWidth();
|
|
3864
4313
|
e.stopPropagation(), c.reinitializeWidth(!0), t !== c.getWidth() && (i.dispatch("column-resized", c), i.dispatchExternal("columnResized", c.getComponent()));
|
|
3865
|
-
}), n.modules.frozen && (l.style.position = "sticky", l.style[n.modules.frozen.position] = this.frozenColumnOffset(n)), s.handleEl = l, r.parentNode && n.visible && r.after(l);
|
|
4314
|
+
}), n.modules.frozen && (l.style.position = "sticky", l.style[n.modules.frozen.position] = this.frozenColumnOffset(n)), e === "cell" && (l.style.height = t.row.heightStyled), s.handleEl = l, r.parentNode && n.visible && r.after(l);
|
|
3866
4315
|
}
|
|
3867
4316
|
t.modules.resize = s;
|
|
3868
4317
|
}
|
|
@@ -3915,14 +4364,14 @@ var Ce = {
|
|
|
3915
4364
|
e.stopPropagation(), r.startColumn.modules.edit && (r.startColumn.modules.edit.blocked = !0), r.startX = e.clientX === void 0 ? e.touches[0].clientX : e.clientX, r.latestX = r.startX, r.startWidth = t.getWidth(), document.body.addEventListener("mousemove", a), document.body.addEventListener("mouseup", o), n.addEventListener("touchmove", a, { passive: !0 }), n.addEventListener("touchend", o);
|
|
3916
4365
|
}
|
|
3917
4366
|
};
|
|
3918
|
-
function
|
|
4367
|
+
function pn(e, t, n, r, i, a, o) {
|
|
3919
4368
|
var s = o.alignEmptyValues, c = o.decimalSeparator, l = o.thousandSeparator, u = 0;
|
|
3920
4369
|
if (e = String(e), t = String(t), l && (e = e.split(l).join(""), t = t.split(l).join("")), c && (e = e.split(c).join("."), t = t.split(c).join(".")), e = parseFloat(e), t = parseFloat(t), isNaN(e)) u = isNaN(t) ? 0 : -1;
|
|
3921
4370
|
else if (isNaN(t)) u = 1;
|
|
3922
4371
|
else return e - t;
|
|
3923
4372
|
return (s === "top" && a === "desc" || s === "bottom" && a === "asc") && (u *= -1), u;
|
|
3924
4373
|
}
|
|
3925
|
-
function
|
|
4374
|
+
function mn(e, t, n, r, i, a, o) {
|
|
3926
4375
|
var s = o.alignEmptyValues, c = 0, l;
|
|
3927
4376
|
if (!e) c = t ? -1 : 0;
|
|
3928
4377
|
else if (!t) c = 1;
|
|
@@ -3931,40 +4380,39 @@ function De(e, t, n, r, i, a, o) {
|
|
|
3931
4380
|
case "boolean":
|
|
3932
4381
|
o.locale && (l = this.langLocale());
|
|
3933
4382
|
break;
|
|
3934
|
-
case "string":
|
|
3935
|
-
l = o.locale;
|
|
3936
|
-
break;
|
|
4383
|
+
case "string": l = o.locale;
|
|
3937
4384
|
}
|
|
3938
4385
|
return String(e).toLowerCase().localeCompare(String(t).toLowerCase(), l);
|
|
3939
4386
|
}
|
|
3940
4387
|
return (s === "top" && a === "desc" || s === "bottom" && a === "asc") && (c *= -1), c;
|
|
3941
4388
|
}
|
|
3942
|
-
function
|
|
4389
|
+
function J(e, t, n, r, i, a, o) {
|
|
3943
4390
|
var s = this.table.dependencyRegistry.lookup(["luxon", "DateTime"], "DateTime"), c = o.format || "dd/MM/yyyy HH:mm:ss", l = o.alignEmptyValues, u = 0;
|
|
3944
4391
|
if (s !== void 0) {
|
|
3945
4392
|
if (s.isDateTime(e) || (e = c === "iso" ? s.fromISO(String(e)) : c === "x" ? s.fromMillis(e) : s.fromFormat(String(e), c)), s.isDateTime(t) || (t = c === "iso" ? s.fromISO(String(t)) : c === "x" ? s.fromMillis(t) : s.fromFormat(String(t), c)), !e.isValid) u = t.isValid ? -1 : 0;
|
|
3946
4393
|
else if (!t.isValid) u = 1;
|
|
3947
4394
|
else return e - t;
|
|
3948
4395
|
return (l === "top" && a === "desc" || l === "bottom" && a === "asc") && (u *= -1), u;
|
|
3949
|
-
}
|
|
4396
|
+
}
|
|
4397
|
+
console.error("Sort Error - 'datetime' sorter is dependant on luxon.js");
|
|
3950
4398
|
}
|
|
3951
|
-
function
|
|
3952
|
-
return o.format ||= "dd/MM/yyyy",
|
|
4399
|
+
function hn(e, t, n, r, i, a, o) {
|
|
4400
|
+
return o.format ||= "dd/MM/yyyy", J.call(this, e, t, n, r, i, a, o);
|
|
3953
4401
|
}
|
|
3954
|
-
function
|
|
3955
|
-
return o.format ||= "HH:mm",
|
|
4402
|
+
function gn(e, t, n, r, i, a, o) {
|
|
4403
|
+
return o.format ||= "HH:mm", J.call(this, e, t, n, r, i, a, o);
|
|
3956
4404
|
}
|
|
3957
|
-
function
|
|
4405
|
+
function _n(e, t, n, r, i, a, o) {
|
|
3958
4406
|
return (e === !0 || e === "true" || e === "True" || e === 1) - +(t === !0 || t === "true" || t === "True" || t === 1);
|
|
3959
4407
|
}
|
|
3960
|
-
function
|
|
3961
|
-
var
|
|
3962
|
-
|
|
3963
|
-
return e.map((e) =>
|
|
3964
|
-
} :
|
|
3965
|
-
function
|
|
4408
|
+
function vn(e, t, n, r, i, a, o) {
|
|
4409
|
+
var s = o.type || "length", c = o.alignEmptyValues, l = 0, u = this.table, d;
|
|
4410
|
+
o.valueMap && (d = typeof o.valueMap == "string" ? function(e) {
|
|
4411
|
+
return e.map((e) => V.retrieveNestedData(u.options.nestedFieldSeparator, o.valueMap, e));
|
|
4412
|
+
} : o.valueMap);
|
|
4413
|
+
function f(e) {
|
|
3966
4414
|
var t;
|
|
3967
|
-
switch (
|
|
4415
|
+
switch (d && (e = d(e)), s) {
|
|
3968
4416
|
case "length":
|
|
3969
4417
|
t = e.length;
|
|
3970
4418
|
break;
|
|
@@ -3984,22 +4432,20 @@ function je(e, n, r, i, a, o, s) {
|
|
|
3984
4432
|
return e + t;
|
|
3985
4433
|
}) / e.length;
|
|
3986
4434
|
break;
|
|
3987
|
-
case "string":
|
|
3988
|
-
t = e.join("");
|
|
3989
|
-
break;
|
|
4435
|
+
case "string": t = e.join("");
|
|
3990
4436
|
}
|
|
3991
4437
|
return t;
|
|
3992
4438
|
}
|
|
3993
|
-
if (!Array.isArray(e))
|
|
3994
|
-
else if (!Array.isArray(
|
|
3995
|
-
else if (
|
|
3996
|
-
else return
|
|
3997
|
-
return (
|
|
4439
|
+
if (!Array.isArray(e)) l = Array.isArray(t) ? -1 : 0;
|
|
4440
|
+
else if (!Array.isArray(t)) l = 1;
|
|
4441
|
+
else if (s === "string") return String(f(e)).toLowerCase().localeCompare(String(f(t)).toLowerCase());
|
|
4442
|
+
else return f(t) - f(e);
|
|
4443
|
+
return (c === "top" && a === "desc" || c === "bottom" && a === "asc") && (l *= -1), l;
|
|
3998
4444
|
}
|
|
3999
|
-
function
|
|
4445
|
+
function yn(e, t, n, r, i, a, o) {
|
|
4000
4446
|
return (e === void 0 ? 0 : 1) - (t === void 0 ? 0 : 1);
|
|
4001
4447
|
}
|
|
4002
|
-
function
|
|
4448
|
+
function bn(e, t, n, r, i, a, o) {
|
|
4003
4449
|
var s, c, l, u, d = 0, f, p = /(\d+)|(\D+)/g, m = /\d/, h = o.alignEmptyValues, g = 0;
|
|
4004
4450
|
if (!e && e !== 0) g = !t && t !== 0 ? 0 : -1;
|
|
4005
4451
|
else if (!t && t !== 0) g = 1;
|
|
@@ -4012,19 +4458,19 @@ function Ne(e, t, n, r, i, a, o) {
|
|
|
4012
4458
|
}
|
|
4013
4459
|
return (h === "top" && a === "desc" || h === "bottom" && a === "asc") && (g *= -1), g;
|
|
4014
4460
|
}
|
|
4015
|
-
var
|
|
4016
|
-
number:
|
|
4017
|
-
string:
|
|
4018
|
-
date:
|
|
4019
|
-
time:
|
|
4020
|
-
datetime:
|
|
4021
|
-
boolean:
|
|
4022
|
-
array:
|
|
4023
|
-
exists:
|
|
4024
|
-
alphanum:
|
|
4025
|
-
},
|
|
4461
|
+
var xn = {
|
|
4462
|
+
number: pn,
|
|
4463
|
+
string: mn,
|
|
4464
|
+
date: hn,
|
|
4465
|
+
time: gn,
|
|
4466
|
+
datetime: J,
|
|
4467
|
+
boolean: _n,
|
|
4468
|
+
array: vn,
|
|
4469
|
+
exists: yn,
|
|
4470
|
+
alphanum: bn
|
|
4471
|
+
}, Sn = class e extends H {
|
|
4026
4472
|
static moduleName = "sort";
|
|
4027
|
-
static sorters =
|
|
4473
|
+
static sorters = xn;
|
|
4028
4474
|
constructor(e) {
|
|
4029
4475
|
super(e), this.sortList = [], this.changed = !1, this.registerTableOption("sortMode", "local"), this.registerTableOption("initialSort", !1), this.registerTableOption("columnHeaderSortMulti", !0), this.registerTableOption("sortOrderReverse", !1), this.registerTableOption("headerSortElement", "<div class='tabulator-arrow'></div>"), this.registerTableOption("headerSortClickElement", "header"), this.registerColumnOption("sorter"), this.registerColumnOption("sorterParams"), this.registerColumnOption("headerSort", !0), this.registerColumnOption("headerSortStartingDir"), this.registerColumnOption("headerSortTristate");
|
|
4030
4476
|
}
|
|
@@ -4052,9 +4498,7 @@ var Pe = {
|
|
|
4052
4498
|
case "string":
|
|
4053
4499
|
e.sorters[t.definition.sorter] ? n = e.sorters[t.definition.sorter] : console.warn("Sort Error - No such sorter found: ", t.definition.sorter);
|
|
4054
4500
|
break;
|
|
4055
|
-
case "function":
|
|
4056
|
-
n = t.definition.sorter;
|
|
4057
|
-
break;
|
|
4501
|
+
case "function": n = t.definition.sorter;
|
|
4058
4502
|
}
|
|
4059
4503
|
if (t.modules.sort = {
|
|
4060
4504
|
sorter: n,
|
|
@@ -4070,9 +4514,7 @@ var Pe = {
|
|
|
4070
4514
|
case "header":
|
|
4071
4515
|
r.classList.add("tabulator-col-sorter-element");
|
|
4072
4516
|
break;
|
|
4073
|
-
default:
|
|
4074
|
-
r.classList.add("tabulator-col-sorter-element");
|
|
4075
|
-
break;
|
|
4517
|
+
default: r.classList.add("tabulator-col-sorter-element");
|
|
4076
4518
|
}
|
|
4077
4519
|
switch (this.table.options.headerSortElement) {
|
|
4078
4520
|
case "function": break;
|
|
@@ -4143,9 +4585,7 @@ var Pe = {
|
|
|
4143
4585
|
case "boolean":
|
|
4144
4586
|
r = "boolean";
|
|
4145
4587
|
break;
|
|
4146
|
-
default:
|
|
4147
|
-
!isNaN(Number(a)) && a !== "" ? r = "number" : a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i) && (r = "alphanum");
|
|
4148
|
-
break;
|
|
4588
|
+
default: !isNaN(Number(a)) && a !== "" ? r = "number" : a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i) && (r = "alphanum");
|
|
4149
4589
|
}
|
|
4150
4590
|
return e.sorters[r];
|
|
4151
4591
|
}
|
|
@@ -4155,7 +4595,7 @@ var Pe = {
|
|
|
4155
4595
|
n.setColumnHeader(e.column, e.dir);
|
|
4156
4596
|
}) : (r.forEach(function(e, r) {
|
|
4157
4597
|
var a;
|
|
4158
|
-
e.column && (a = e.column.modules.sort, a && (a.sorter
|
|
4598
|
+
e.column && (a = e.column.modules.sort, a && (a.sorter || (a.sorter = n.findSorter(e.column)), e.params = typeof a.params == "function" ? a.params(e.column.getComponent(), e.dir) : a.params, i.push(e)), t || n.setColumnHeader(e.column, e.dir));
|
|
4159
4599
|
}), i.length && n._sortItems(e, i)), this.subscribedExternal("dataSorted") && (e.forEach((e) => {
|
|
4160
4600
|
a.push(e.getComponent());
|
|
4161
4601
|
}), this.dispatchExternal("dataSorted", n.getSort(), a)), e;
|
|
@@ -4189,7 +4629,7 @@ var Pe = {
|
|
|
4189
4629
|
var a, o, s = r == "asc" ? e : t, c = r == "asc" ? t : e;
|
|
4190
4630
|
return e = n.getFieldValue(s.getData()), t = n.getFieldValue(c.getData()), e = e === void 0 ? "" : e, t = t === void 0 ? "" : t, a = s.getComponent(), o = c.getComponent(), n.modules.sort.sorter.call(this, e, t, a, o, n.getComponent(), r, i);
|
|
4191
4631
|
}
|
|
4192
|
-
},
|
|
4632
|
+
}, Cn = {
|
|
4193
4633
|
debugEventsExternal: !1,
|
|
4194
4634
|
debugEventsInternal: !1,
|
|
4195
4635
|
debugInvalidOptions: !0,
|
|
@@ -4233,7 +4673,7 @@ var Pe = {
|
|
|
4233
4673
|
dataSendParams: {},
|
|
4234
4674
|
dataReceiveParams: {},
|
|
4235
4675
|
dependencies: {}
|
|
4236
|
-
},
|
|
4676
|
+
}, wn = class {
|
|
4237
4677
|
constructor(e, t, n = {}) {
|
|
4238
4678
|
this.table = e, this.msgType = t, this.registeredDefaults = Object.assign({}, n);
|
|
4239
4679
|
}
|
|
@@ -4247,7 +4687,7 @@ var Pe = {
|
|
|
4247
4687
|
for (let e in n) e in t ? n[e] = t[e] : Array.isArray(n[e]) ? n[e] = Object.assign([], n[e]) : typeof n[e] == "object" && n[e] !== null ? n[e] = Object.assign({}, n[e]) : n[e] === void 0 && delete n[e];
|
|
4248
4688
|
return n;
|
|
4249
4689
|
}
|
|
4250
|
-
},
|
|
4690
|
+
}, Y = class extends B {
|
|
4251
4691
|
constructor(e) {
|
|
4252
4692
|
super(e), this.elementVertical = e.rowManager.element, this.elementHorizontal = e.columnManager.element, this.tableElement = e.rowManager.tableElement, this.verticalFillMode = "fit";
|
|
4253
4693
|
}
|
|
@@ -4287,28 +4727,26 @@ var Pe = {
|
|
|
4287
4727
|
rerender(e) {
|
|
4288
4728
|
this.rerenderRows(), this.rerenderColumns();
|
|
4289
4729
|
}
|
|
4290
|
-
scrollToRowPosition(e,
|
|
4291
|
-
var
|
|
4292
|
-
return new Promise((
|
|
4293
|
-
if (
|
|
4294
|
-
if (
|
|
4295
|
-
switch (
|
|
4730
|
+
scrollToRowPosition(e, t, n) {
|
|
4731
|
+
var r = this.rows().indexOf(e), i = e.getElement(), a = 0;
|
|
4732
|
+
return new Promise((o, s) => {
|
|
4733
|
+
if (r > -1) {
|
|
4734
|
+
if (n === void 0 && (n = this.table.options.scrollToRowIfVisible), !n && V.elVisible(i) && (a = V.elOffset(i).top - V.elOffset(this.elementVertical).top, a > 0 && a < this.elementVertical.clientHeight - i.offsetHeight)) return o(), !1;
|
|
4735
|
+
switch (t === void 0 && (t = this.table.options.scrollToRowPosition), t === "nearest" && (t = this.scrollToRowNearestTop(e) ? "top" : "bottom"), this.scrollToRow(e), t) {
|
|
4296
4736
|
case "middle":
|
|
4297
4737
|
case "center":
|
|
4298
|
-
this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight ? this.elementVertical.scrollTop = this.elementVertical.scrollTop + (
|
|
4738
|
+
this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight ? this.elementVertical.scrollTop = this.elementVertical.scrollTop + (i.offsetTop - this.elementVertical.scrollTop) - (this.elementVertical.scrollHeight - i.offsetTop) / 2 : this.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight / 2;
|
|
4299
4739
|
break;
|
|
4300
4740
|
case "bottom":
|
|
4301
|
-
this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight ? this.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight -
|
|
4302
|
-
break;
|
|
4303
|
-
case "top":
|
|
4304
|
-
this.elementVertical.scrollTop = a.offsetTop;
|
|
4741
|
+
this.elementVertical.scrollHeight - this.elementVertical.scrollTop == this.elementVertical.clientHeight ? this.elementVertical.scrollTop = this.elementVertical.scrollTop - (this.elementVertical.scrollHeight - i.offsetTop) + i.offsetHeight : this.elementVertical.scrollTop = this.elementVertical.scrollTop - this.elementVertical.clientHeight + i.offsetHeight;
|
|
4305
4742
|
break;
|
|
4743
|
+
case "top": this.elementVertical.scrollTop = i.offsetTop;
|
|
4306
4744
|
}
|
|
4307
|
-
|
|
4308
|
-
} else console.warn("Scroll Error - Row not visible"),
|
|
4745
|
+
o();
|
|
4746
|
+
} else console.warn("Scroll Error - Row not visible"), s("Scroll Error - Row not visible");
|
|
4309
4747
|
});
|
|
4310
4748
|
}
|
|
4311
|
-
},
|
|
4749
|
+
}, Tn = class extends Y {
|
|
4312
4750
|
constructor(e) {
|
|
4313
4751
|
super(e);
|
|
4314
4752
|
}
|
|
@@ -4325,7 +4763,7 @@ var Pe = {
|
|
|
4325
4763
|
e.reinitializeWidth();
|
|
4326
4764
|
});
|
|
4327
4765
|
}
|
|
4328
|
-
},
|
|
4766
|
+
}, En = class extends Y {
|
|
4329
4767
|
constructor(e) {
|
|
4330
4768
|
super(e), this.leftCol = 0, this.rightCol = 0, this.scrollLeft = 0, this.vDomScrollPosLeft = 0, this.vDomScrollPosRight = 0, this.vDomPadLeft = 0, this.vDomPadRight = 0, this.fitDataColAvg = 0, this.windowBuffer = 200, this.visibleRows = null, this.initialized = !1, this.isFitData = !1, this.columns = [];
|
|
4331
4769
|
}
|
|
@@ -4365,7 +4803,7 @@ var Pe = {
|
|
|
4365
4803
|
leftCol: this.leftCol,
|
|
4366
4804
|
rightCol: this.rightCol
|
|
4367
4805
|
}, r = 0;
|
|
4368
|
-
e
|
|
4806
|
+
(!e || this.initialized) && (this.clear(), this.calcWindowBuffer(), this.scrollLeft = this.elementVertical.scrollLeft, this.vDomScrollPosLeft = this.scrollLeft - this.windowBuffer, this.vDomScrollPosRight = this.scrollLeft + this.elementVertical.clientWidth + this.windowBuffer, this.table.columnManager.columnsByIndex.forEach((e) => {
|
|
4369
4807
|
var t = {}, n;
|
|
4370
4808
|
e.visible && (e.modules.frozen || (n = e.getWidth(), t.leftPos = r, t.rightPos = r + n, t.width = n, this.isFitData && (t.fitDataCheck = !e.modules.vdomHoz || e.modules.vdomHoz.fitDataCheck), r + n > this.vDomScrollPosLeft && r < this.vDomScrollPosRight ? (this.leftCol == -1 && (this.leftCol = this.columns.length, this.vDomPadLeft = r), this.rightCol = this.columns.length) : this.leftCol !== -1 && (this.vDomPadRight += n), this.columns.push(e), e.modules.vdomHoz = t, r += n));
|
|
4371
4809
|
}), this.tableElement.style.paddingLeft = this.vDomPadLeft + "px", this.tableElement.style.paddingRight = this.vDomPadRight + "px", this.initialized = !0, t || (!e || this.reinitChanged(n)) && this.reinitializeRows(), this.elementVertical.scrollLeft = this.scrollLeft);
|
|
@@ -4413,7 +4851,7 @@ var Pe = {
|
|
|
4413
4851
|
}
|
|
4414
4852
|
reinitChanged(e) {
|
|
4415
4853
|
var t = !0;
|
|
4416
|
-
return e.cols.length !== this.columns.length || e.leftCol !== this.leftCol || e.rightCol !== this.rightCol
|
|
4854
|
+
return e.cols.length !== this.columns.length || e.leftCol !== this.leftCol || e.rightCol !== this.rightCol || (e.cols.forEach((e, n) => {
|
|
4417
4855
|
e !== this.columns[n] && (t = !1);
|
|
4418
4856
|
}), !t);
|
|
4419
4857
|
}
|
|
@@ -4454,19 +4892,20 @@ var Pe = {
|
|
|
4454
4892
|
addColLeft() {
|
|
4455
4893
|
for (var e = !1, t = !0; t;) {
|
|
4456
4894
|
let n = this.columns[this.leftCol - 1];
|
|
4457
|
-
if (n)
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4895
|
+
if (n) {
|
|
4896
|
+
if (n.modules.vdomHoz.rightPos >= this.vDomScrollPosLeft) {
|
|
4897
|
+
e = !0, this.getVisibleRows().forEach((e) => {
|
|
4898
|
+
if (e.type !== "group") {
|
|
4899
|
+
var t = e.getCell(n);
|
|
4900
|
+
e.getElement().insertBefore(t.getElement(), e.getCell(this.columns[this.leftCol]).getElement()), t.cellRendered();
|
|
4901
|
+
}
|
|
4902
|
+
}), this.leftCol--, this.getVisibleRows().forEach((e) => {
|
|
4903
|
+
e.type !== "group" && (e.modules.vdomHoz.leftCol = this.leftCol);
|
|
4904
|
+
}), this.leftCol <= 0 ? this.vDomPadLeft = 0 : this.vDomPadLeft -= n.getWidth();
|
|
4905
|
+
let t = this.fitDataColActualWidthCheck(n);
|
|
4906
|
+
t && (this.scrollLeft = this.elementVertical.scrollLeft = this.elementVertical.scrollLeft + t, this.vDomPadRight -= t);
|
|
4907
|
+
} else t = !1;
|
|
4468
4908
|
} else t = !1;
|
|
4469
|
-
else t = !1;
|
|
4470
4909
|
}
|
|
4471
4910
|
e && (this.tableElement.style.paddingLeft = this.vDomPadLeft + "px");
|
|
4472
4911
|
}
|
|
@@ -4536,9 +4975,9 @@ var Pe = {
|
|
|
4536
4975
|
this.initializeRow(e);
|
|
4537
4976
|
}
|
|
4538
4977
|
}
|
|
4539
|
-
},
|
|
4978
|
+
}, Dn = class extends B {
|
|
4540
4979
|
constructor(e) {
|
|
4541
|
-
super(e), this.blockHozScrollEvent = !1, this.headersElement = null, this.contentsElement = null, this.rowHeader = null, this.element = null, this.columns = [], this.columnsByIndex = [], this.columnsByField = {}, this.scrollLeft = 0, this.optionsList = new
|
|
4980
|
+
super(e), this.blockHozScrollEvent = !1, this.headersElement = null, this.contentsElement = null, this.rowHeader = null, this.element = null, this.columns = [], this.columnsByIndex = [], this.columnsByField = {}, this.scrollLeft = 0, this.optionsList = new wn(this.table, "column definition", at), this.redrawBlock = !1, this.redrawBlockUpdate = null, this.renderer = null;
|
|
4542
4981
|
}
|
|
4543
4982
|
initialize() {
|
|
4544
4983
|
this.initializeRenderer(), this.headersElement = this.createHeadersElement(), this.contentsElement = this.createHeaderContentsElement(), this.element = this.createHeaderElement(), this.contentsElement.insertBefore(this.headersElement, this.contentsElement.firstChild), this.element.insertBefore(this.contentsElement, this.element.firstChild), this.initializeScrollWheelWatcher(), this.subscribe("scroll-horizontal", this.scrollHorizontal.bind(this)), this.subscribe("scrollbar-vertical", this.padVerticalScrollbar.bind(this));
|
|
@@ -4548,8 +4987,8 @@ var Pe = {
|
|
|
4548
4987
|
}
|
|
4549
4988
|
initializeRenderer() {
|
|
4550
4989
|
var e, t = {
|
|
4551
|
-
virtual:
|
|
4552
|
-
basic:
|
|
4990
|
+
virtual: En,
|
|
4991
|
+
basic: Tn
|
|
4553
4992
|
};
|
|
4554
4993
|
e = typeof this.table.options.renderHorizontal == "string" ? t[this.table.options.renderHorizontal] : this.table.options.renderHorizontal, e ? (this.renderer = new e(this.table, this.element, this.tableElement), this.renderer.initialize()) : console.error("Unable to find matching renderer:", this.table.options.renderHorizontal);
|
|
4555
4994
|
}
|
|
@@ -4599,14 +5038,12 @@ var Pe = {
|
|
|
4599
5038
|
case "function":
|
|
4600
5039
|
this.table.options.columns = i.call(this.table, t);
|
|
4601
5040
|
break;
|
|
4602
|
-
case "object":
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
}), this.table.options.columns = t;
|
|
4609
|
-
break;
|
|
5041
|
+
case "object": Array.isArray(i) ? t.forEach((e) => {
|
|
5042
|
+
var t = i.find((t) => t.field === e.field);
|
|
5043
|
+
t && Object.assign(e, t);
|
|
5044
|
+
}) : t.forEach((e) => {
|
|
5045
|
+
i[e.field] && Object.assign(e, i[e.field]);
|
|
5046
|
+
}), this.table.options.columns = t;
|
|
4610
5047
|
}
|
|
4611
5048
|
else this.table.options.columns = t;
|
|
4612
5049
|
this.setColumns(this.table.options.columns);
|
|
@@ -4627,20 +5064,18 @@ var Pe = {
|
|
|
4627
5064
|
case "object":
|
|
4628
5065
|
t = Array.isArray(e) ? "array" : "string";
|
|
4629
5066
|
break;
|
|
4630
|
-
default:
|
|
4631
|
-
t = !isNaN(Number(e)) && e !== "" ? "number" : e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i) ? "alphanum" : "string";
|
|
4632
|
-
break;
|
|
5067
|
+
default: t = !isNaN(Number(e)) && e !== "" ? "number" : e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i) ? "alphanum" : "string";
|
|
4633
5068
|
}
|
|
4634
5069
|
return t;
|
|
4635
5070
|
}
|
|
4636
5071
|
setColumns(e, t) {
|
|
4637
5072
|
for (; this.headersElement.firstChild;) this.headersElement.removeChild(this.headersElement.firstChild);
|
|
4638
|
-
this.columns = [], this.columnsByIndex = [], this.columnsByField = {}, this.dispatch("columns-loading"), this.dispatchExternal("columnsLoading"), this.table.options.rowHeader && (this.rowHeader = new
|
|
5073
|
+
this.columns = [], this.columnsByIndex = [], this.columnsByField = {}, this.dispatch("columns-loading"), this.dispatchExternal("columnsLoading"), this.table.options.rowHeader && (this.rowHeader = new W(this.table.options.rowHeader === !0 ? {} : this.table.options.rowHeader, this, !0), this.columns.push(this.rowHeader), this.headersElement.appendChild(this.rowHeader.getElement()), this.rowHeader.columnRendered()), e.forEach((e, t) => {
|
|
4639
5074
|
this._addColumn(e);
|
|
4640
5075
|
}), this._reIndexColumns(), this.dispatch("columns-loaded"), this.subscribedExternal("columnsLoaded") && this.dispatchExternal("columnsLoaded", this.getComponents()), this.rerenderColumns(!1, !0), this.redraw(!0);
|
|
4641
5076
|
}
|
|
4642
5077
|
_addColumn(e, t, n) {
|
|
4643
|
-
var r = new
|
|
5078
|
+
var r = new W(e, this), i = r.getElement(), a = n && this.findColumnIndex(n);
|
|
4644
5079
|
if (t && this.rowHeader && (!n || n === this.rowHeader) && (t = !1, n = this.rowHeader, a = 0), n && a > -1) {
|
|
4645
5080
|
var o = n.getTopColumn(), s = this.columns.indexOf(o), c = o.getElement();
|
|
4646
5081
|
t ? (this.columns.splice(s, 0, r), c.parentNode.insertBefore(i, c)) : (this.columns.splice(s + 1, 0, r), c.parentNode.insertBefore(i, c.nextSibling));
|
|
@@ -4672,8 +5107,8 @@ var Pe = {
|
|
|
4672
5107
|
findColumn(e) {
|
|
4673
5108
|
var t;
|
|
4674
5109
|
if (typeof e == "object") {
|
|
4675
|
-
if (e instanceof
|
|
4676
|
-
if (e instanceof
|
|
5110
|
+
if (e instanceof W) return e;
|
|
5111
|
+
if (e instanceof it) return e._getSelf() || !1;
|
|
4677
5112
|
if (typeof HTMLElement < "u" && e instanceof HTMLElement) return t = [], this.columns.forEach((e) => {
|
|
4678
5113
|
t.push(e), t = t.concat(e.getColumns(!0));
|
|
4679
5114
|
}), t.find((t) => t.element === e) || !1;
|
|
@@ -4765,9 +5200,7 @@ var Pe = {
|
|
|
4765
5200
|
case "center":
|
|
4766
5201
|
a = -this.element.clientWidth / 2;
|
|
4767
5202
|
break;
|
|
4768
|
-
case "right":
|
|
4769
|
-
a = o.clientWidth - this.headersElement.clientWidth;
|
|
4770
|
-
break;
|
|
5203
|
+
case "right": a = o.clientWidth - this.headersElement.clientWidth;
|
|
4771
5204
|
}
|
|
4772
5205
|
if (!n && i > 0 && i + o.offsetWidth < this.element.clientWidth) return !1;
|
|
4773
5206
|
r = i + a, r = Math.max(Math.min(r, this.table.rowManager.element.scrollWidth - this.table.rowManager.element.clientWidth), 0), this.table.rowManager.scrollHorizontal(r), this.scrollHorizontal(r), s();
|
|
@@ -4807,9 +5240,9 @@ var Pe = {
|
|
|
4807
5240
|
this.redrawBlock = !1, this.verticalAlignHeaders(), this.renderer.rerenderColumns(this.redrawBlockUpdate);
|
|
4808
5241
|
}
|
|
4809
5242
|
redraw(e) {
|
|
4810
|
-
|
|
5243
|
+
V.elVisible(this.element) && this.verticalAlignHeaders(), e && (this.table.rowManager.resetScroll(), this.table.rowManager.reinitialize()), this.confirm("table-redrawing", e) || this.layoutRefresh(e), this.dispatch("table-redraw", e), this.table.footerManager.redraw();
|
|
4811
5244
|
}
|
|
4812
|
-
},
|
|
5245
|
+
}, On = class extends Y {
|
|
4813
5246
|
constructor(e) {
|
|
4814
5247
|
super(e), this.verticalFillMode = "fill", this.scrollTop = 0, this.scrollLeft = 0, this.scrollTop = 0, this.scrollLeft = 0;
|
|
4815
5248
|
}
|
|
@@ -4828,20 +5261,21 @@ var Pe = {
|
|
|
4828
5261
|
}), t ? e.style.minWidth = this.table.columnManager.getWidth() + "px" : e.style.minWidth = "";
|
|
4829
5262
|
}
|
|
4830
5263
|
rerenderRows(e) {
|
|
4831
|
-
|
|
5264
|
+
let t = this.elementVertical.scrollTop;
|
|
5265
|
+
this.clearRows(), e && e(), this.renderRows(), this.rows().length ? this.elementVertical.scrollTop = t : this.table.rowManager.tableEmpty();
|
|
4832
5266
|
}
|
|
4833
5267
|
scrollToRowNearestTop(e) {
|
|
4834
|
-
var
|
|
4835
|
-
return !(Math.abs(this.elementVertical.scrollTop -
|
|
5268
|
+
var t = V.elOffset(e.getElement()).top;
|
|
5269
|
+
return !(Math.abs(this.elementVertical.scrollTop - t) > Math.abs(this.elementVertical.scrollTop + this.elementVertical.clientHeight - t));
|
|
4836
5270
|
}
|
|
4837
5271
|
scrollToRow(e) {
|
|
4838
|
-
var
|
|
4839
|
-
this.elementVertical.scrollTop =
|
|
5272
|
+
var t = e.getElement();
|
|
5273
|
+
this.elementVertical.scrollTop = V.elOffset(t).top - V.elOffset(this.elementVertical).top + this.elementVertical.scrollTop;
|
|
4840
5274
|
}
|
|
4841
5275
|
visibleRows(e) {
|
|
4842
5276
|
return this.rows();
|
|
4843
5277
|
}
|
|
4844
|
-
},
|
|
5278
|
+
}, kn = class extends Y {
|
|
4845
5279
|
constructor(e) {
|
|
4846
5280
|
super(e), this.verticalFillMode = "fill", this.scrollTop = 0, this.scrollLeft = 0, this.vDomRowHeight = 20, this.vDomTop = 0, this.vDomBottom = 0, this.vDomScrollPosTop = 0, this.vDomScrollPosBottom = 0, this.vDomTopPad = 0, this.vDomBottomPad = 0, this.vDomMaxRenderChain = 90, this.vDomWindowBuffer = 0, this.vDomWindowMinTotalRows = 20, this.vDomWindowMinMarginRows = 5, this.vDomTopNewRows = [], this.vDomBottomNewRows = [];
|
|
4847
5281
|
}
|
|
@@ -4860,7 +5294,7 @@ var Pe = {
|
|
|
4860
5294
|
}
|
|
4861
5295
|
a.forEach((e) => {
|
|
4862
5296
|
e.deinitializeHeight();
|
|
4863
|
-
}), e && e(), this.rows().length ?
|
|
5297
|
+
}), e && e(), this.rows().length ? (n === !1 && (n = a.length ? this.rows().length - 1 : 0), this._virtualRenderFill(n, !0, r || 0)) : (this.clear(), this.table.rowManager.tableEmpty()), this.scrollColumns(i);
|
|
4864
5298
|
}
|
|
4865
5299
|
scrollColumns(e) {
|
|
4866
5300
|
this.table.rowManager.scrollHorizontal(e);
|
|
@@ -4886,37 +5320,40 @@ var Pe = {
|
|
|
4886
5320
|
visibleRows(e) {
|
|
4887
5321
|
var t = this.elementVertical.scrollTop, n = this.elementVertical.clientHeight + t, r = !1, i = 0, a = 0, o = this.rows();
|
|
4888
5322
|
if (e) i = this.vDomTop, a = this.vDomBottom;
|
|
4889
|
-
else for (var s = this.vDomTop; s <= this.vDomBottom; s++) if (o[s])
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
5323
|
+
else for (var s = this.vDomTop; s <= this.vDomBottom; s++) if (o[s]) {
|
|
5324
|
+
if (!r) {
|
|
5325
|
+
if (t - o[s].getElement().offsetTop >= 0) i = s;
|
|
5326
|
+
else if (r = !0, n - o[s].getElement().offsetTop >= 0) a = s;
|
|
5327
|
+
else break;
|
|
5328
|
+
} else if (n - o[s].getElement().offsetTop >= 0) a = s;
|
|
5329
|
+
else break;
|
|
5330
|
+
}
|
|
4894
5331
|
return o.slice(i, a + 1);
|
|
4895
5332
|
}
|
|
4896
|
-
_virtualRenderFill(e,
|
|
4897
|
-
var
|
|
4898
|
-
if (e ||= 0,
|
|
5333
|
+
_virtualRenderFill(e, t, n) {
|
|
5334
|
+
var r = this.tableElement, i = this.elementVertical, a = 0, o = 0, s = 0, c = 0, l = 0, u = 0, d = this.rows(), f = d.length, p = 0, m, h, g = [], _ = 0, v = 0, y = this.table.rowManager.fixedHeight, b = this.elementVertical.clientHeight, x = this.table.options.rowHeight, S = !0;
|
|
5335
|
+
if (e ||= 0, n ||= 0, !e) this.clear();
|
|
4899
5336
|
else {
|
|
4900
|
-
for (;
|
|
4901
|
-
|
|
4902
|
-
}
|
|
4903
|
-
if (
|
|
4904
|
-
for (this.vDomTop = e, this.vDomBottom = e - 1,
|
|
4905
|
-
for (
|
|
4906
|
-
if (!
|
|
4907
|
-
|
|
5337
|
+
for (; r.firstChild;) r.removeChild(r.firstChild);
|
|
5338
|
+
c = (f - e + 1) * this.vDomRowHeight, c < b && (e -= Math.ceil((b - c) / this.vDomRowHeight), e < 0 && (e = 0)), a = Math.min(Math.max(Math.floor(this.vDomWindowBuffer / this.vDomRowHeight), this.vDomWindowMinMarginRows), e), e -= a;
|
|
5339
|
+
}
|
|
5340
|
+
if (f && V.elVisible(this.elementVertical)) {
|
|
5341
|
+
for (this.vDomTop = e, this.vDomBottom = e - 1, y || this.table.options.maxHeight ? (x && (v = b / x + this.vDomWindowBuffer / x), v = Math.max(this.vDomWindowMinTotalRows, Math.ceil(v))) : v = f; (v == f || o <= b + this.vDomWindowBuffer || _ < this.vDomWindowMinTotalRows) && this.vDomBottom < f - 1;) {
|
|
5342
|
+
for (g = [], h = document.createDocumentFragment(), u = 0; u < v && this.vDomBottom < f - 1;) p = this.vDomBottom + 1, m = d[p], this.styleRow(m, p), m.initialize(!1, !0), !m.heightInitialized && !this.table.options.rowHeight && m.clearCellHeight(), h.appendChild(m.getElement()), g.push(m), this.vDomBottom++, u++;
|
|
5343
|
+
if (!g.length) break;
|
|
5344
|
+
r.appendChild(h), g.forEach((e) => {
|
|
4908
5345
|
e.rendered();
|
|
4909
5346
|
});
|
|
4910
5347
|
let e = [];
|
|
4911
|
-
|
|
5348
|
+
g.forEach((t) => {
|
|
4912
5349
|
(!t.heightInitialized || !t.getHeight()) && (t.calcHeight(!0), e.push(t));
|
|
4913
5350
|
}), e.forEach((e) => {
|
|
4914
5351
|
e.setCellHeight();
|
|
4915
|
-
}),
|
|
4916
|
-
|
|
4917
|
-
}),
|
|
5352
|
+
}), g.forEach((e) => {
|
|
5353
|
+
s = e.getHeight() || this.vDomRowHeight, _ < a ? l += s : o += s, s > this.vDomWindowBuffer && (this.vDomWindowBuffer = s * 2), _++;
|
|
5354
|
+
}), S = this.table.rowManager.adjustTableSize(!0), b = this.elementVertical.clientHeight, S && (y || this.table.options.maxHeight) && (x = o / _, v = Math.max(this.vDomWindowMinTotalRows, Math.ceil(b / x + this.vDomWindowBuffer / x)));
|
|
4918
5355
|
}
|
|
4919
|
-
e ? (this.vDomTopPad =
|
|
5356
|
+
e ? (this.vDomTopPad = t ? this.vDomRowHeight * this.vDomTop + n : this.scrollTop - l, this.vDomBottomPad = this.vDomBottom == f - 1 ? 0 : Math.max(this.vDomScrollHeight - this.vDomTopPad - o - l, 0)) : (this.vDomTopPad = 0, this.vDomRowHeight = Math.floor((o + l) / _), this.vDomBottomPad = this.vDomRowHeight * (f - this.vDomBottom - 1), this.vDomScrollHeight = l + o + this.vDomBottomPad - b), r.style.paddingTop = this.vDomTopPad + "px", r.style.paddingBottom = this.vDomBottomPad + "px", t && (this.scrollTop = this.vDomTopPad + l + n - (this.elementVertical.scrollWidth > this.elementVertical.clientWidth ? this.elementVertical.offsetHeight - b : 0)), this.scrollTop = Math.min(this.scrollTop, this.elementVertical.scrollHeight - b), this.elementVertical.scrollWidth > this.elementVertical.clientWidth && t && (this.scrollTop += this.elementVertical.offsetHeight - b), this.vDomScrollPosTop = this.scrollTop, this.vDomScrollPosBottom = this.scrollTop, i.scrollTop = this.scrollTop, this.dispatch("render-virtual-fill");
|
|
4920
5357
|
}
|
|
4921
5358
|
}
|
|
4922
5359
|
_addTopRow(e, t) {
|
|
@@ -4961,7 +5398,7 @@ var Pe = {
|
|
|
4961
5398
|
for (let t of e) t.calcHeight();
|
|
4962
5399
|
for (let t of e) t.setCellHeight();
|
|
4963
5400
|
}
|
|
4964
|
-
},
|
|
5401
|
+
}, An = class extends B {
|
|
4965
5402
|
constructor(e) {
|
|
4966
5403
|
super(e), this.element = this.createHolderElement(), this.tableElement = this.createTableElement(), this.heightFixer = this.createTableElement(), this.placeholder = null, this.placeholderContents = null, this.firstRender = !1, this.renderMode = "virtual", this.fixedHeight = !1, this.rows = [], this.activeRowsPipeline = [], this.activeRows = [], this.activeRowsCount = 0, this.displayRows = [], this.displayRowsCount = 0, this.scrollTop = 0, this.scrollLeft = 0, this.redrawBlock = !1, this.redrawBlockRestoreConfig = !1, this.redrawBlockRenderInPosition = !1, this.dataPipeline = [], this.displayPipeline = [], this.scrollbarWidth = 0, this.renderer = null;
|
|
4967
5404
|
}
|
|
@@ -4971,7 +5408,7 @@ var Pe = {
|
|
|
4971
5408
|
}
|
|
4972
5409
|
createTableElement() {
|
|
4973
5410
|
var e = document.createElement("div");
|
|
4974
|
-
return e.classList.add("tabulator-table"), e.setAttribute("role", "rowgroup"), e.setAttribute("id", "tabulator-table-body"), e;
|
|
5411
|
+
return e.classList.add("tabulator-table"), e.setAttribute("role", "rowgroup"), e.setAttribute("id", "tabulator-table-body-" + this.table.instanceId), e;
|
|
4975
5412
|
}
|
|
4976
5413
|
initializePlaceholder() {
|
|
4977
5414
|
var e = this.table.options.placeholder;
|
|
@@ -4998,8 +5435,8 @@ var Pe = {
|
|
|
4998
5435
|
}
|
|
4999
5436
|
findRow(e) {
|
|
5000
5437
|
if (typeof e == "object") {
|
|
5001
|
-
if (e instanceof
|
|
5002
|
-
if (e instanceof
|
|
5438
|
+
if (e instanceof G) return e;
|
|
5439
|
+
if (e instanceof ot) return e._getSelf() || !1;
|
|
5003
5440
|
if (typeof HTMLElement < "u" && e instanceof HTMLElement) return this.rows.find((t) => t.getElement() === e) || !1;
|
|
5004
5441
|
if (e === null) return !1;
|
|
5005
5442
|
} else if (e === void 0) return !1;
|
|
@@ -5025,7 +5462,7 @@ var Pe = {
|
|
|
5025
5462
|
_setDataActual(e, t) {
|
|
5026
5463
|
this.dispatchExternal("dataProcessing", e), this._wipeElements(), Array.isArray(e) ? (this.dispatch("data-processing", e), e.forEach((e, t) => {
|
|
5027
5464
|
if (e && typeof e == "object") {
|
|
5028
|
-
var n = new
|
|
5465
|
+
var n = new G(e, this);
|
|
5029
5466
|
this.rows.push(n);
|
|
5030
5467
|
} else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:", e);
|
|
5031
5468
|
}), this.refreshActiveData(!1, !1, t), this.dispatch("data-processed", e), this.dispatchExternal("dataProcessed", e)) : console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ", typeof e, "\nData: ", e);
|
|
@@ -5061,7 +5498,7 @@ var Pe = {
|
|
|
5061
5498
|
return e === void 0 && (e = this.table.options.addRowPos), e === "pos" && (e = !0), e === "bottom" && (e = !1), e;
|
|
5062
5499
|
}
|
|
5063
5500
|
addRowActual(e, t, n, r) {
|
|
5064
|
-
var i = e instanceof
|
|
5501
|
+
var i = e instanceof G ? e : new G(e || {}, this), a = this.findAddRowPos(t), o = -1, s, c;
|
|
5065
5502
|
return n || (c = this.chain("row-adding-position", [i, a], null, {
|
|
5066
5503
|
index: n,
|
|
5067
5504
|
top: a
|
|
@@ -5105,11 +5542,11 @@ var Pe = {
|
|
|
5105
5542
|
}
|
|
5106
5543
|
nextDisplayRow(e, t) {
|
|
5107
5544
|
var n = this.getDisplayRowIndex(e), r = !1;
|
|
5108
|
-
return n !== !1 && n < this.displayRowsCount - 1 && (r = this.getDisplayRows()[n + 1]), r && (!(r instanceof
|
|
5545
|
+
return n !== !1 && n < this.displayRowsCount - 1 && (r = this.getDisplayRows()[n + 1]), r && (!(r instanceof G) || r.type != "row") ? this.nextDisplayRow(r, t) : r;
|
|
5109
5546
|
}
|
|
5110
5547
|
prevDisplayRow(e, t) {
|
|
5111
5548
|
var n = this.getDisplayRowIndex(e), r = !1;
|
|
5112
|
-
return n && (r = this.getDisplayRows()[n - 1]), t && r && (!(r instanceof
|
|
5549
|
+
return n && (r = this.getDisplayRows()[n - 1]), t && r && (!(r instanceof G) || r.type != "row") ? this.prevDisplayRow(r, t) : r;
|
|
5113
5550
|
}
|
|
5114
5551
|
findRowIndex(e, t) {
|
|
5115
5552
|
var n;
|
|
@@ -5145,8 +5582,8 @@ var Pe = {
|
|
|
5145
5582
|
priority: t
|
|
5146
5583
|
}), this.displayPipeline.sort((e, t) => e.priority - t.priority));
|
|
5147
5584
|
}
|
|
5148
|
-
refreshActiveData(e,
|
|
5149
|
-
var
|
|
5585
|
+
refreshActiveData(e, t, n) {
|
|
5586
|
+
var r = this.table, i = "", a = 0, o = [
|
|
5150
5587
|
"all",
|
|
5151
5588
|
"dataPipeline",
|
|
5152
5589
|
"display",
|
|
@@ -5154,23 +5591,25 @@ var Pe = {
|
|
|
5154
5591
|
"end"
|
|
5155
5592
|
];
|
|
5156
5593
|
if (!this.table.destroyed) {
|
|
5157
|
-
if (typeof e == "function")
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5594
|
+
if (typeof e == "function") {
|
|
5595
|
+
if (a = this.dataPipeline.findIndex((t) => t.handler === e), a > -1) i = "dataPipeline", t && (a == this.dataPipeline.length - 1 ? i = "display" : a++);
|
|
5596
|
+
else if (a = this.displayPipeline.findIndex((t) => t.handler === e), a > -1) i = "displayPipeline", t && (a == this.displayPipeline.length - 1 ? i = "end" : a++);
|
|
5597
|
+
else {
|
|
5598
|
+
console.error("Unable to refresh data, invalid handler provided", e);
|
|
5599
|
+
return;
|
|
5600
|
+
}
|
|
5601
|
+
} else i = e || "all", a = 0;
|
|
5164
5602
|
if (this.redrawBlock) {
|
|
5165
|
-
(!this.redrawBlockRestoreConfig || this.redrawBlockRestoreConfig && (this.redrawBlockRestoreConfig.stage ===
|
|
5603
|
+
(!this.redrawBlockRestoreConfig || this.redrawBlockRestoreConfig && (this.redrawBlockRestoreConfig.stage === i && a < this.redrawBlockRestoreConfig.index || o.indexOf(i) < o.indexOf(this.redrawBlockRestoreConfig.stage))) && (this.redrawBlockRestoreConfig = {
|
|
5166
5604
|
handler: e,
|
|
5167
|
-
skipStage:
|
|
5168
|
-
renderInPosition:
|
|
5169
|
-
stage:
|
|
5170
|
-
index:
|
|
5605
|
+
skipStage: t,
|
|
5606
|
+
renderInPosition: n,
|
|
5607
|
+
stage: i,
|
|
5608
|
+
index: a
|
|
5171
5609
|
});
|
|
5172
5610
|
return;
|
|
5173
|
-
}
|
|
5611
|
+
}
|
|
5612
|
+
V.elVisible(this.element) ? n ? this.reRenderInPosition(this.refreshPipelines.bind(this, e, i, a, n)) : (this.refreshPipelines(e, i, a, n), e || this.table.columnManager.renderer.renderColumns(), this.renderTable(), r.options.layoutColumnsOnNewData && this.table.columnManager.redraw(!0)) : this.refreshPipelines(e, i, a, n), this.dispatch("data-refreshed");
|
|
5174
5613
|
}
|
|
5175
5614
|
}
|
|
5176
5615
|
refreshPipelines(e, t, n, r) {
|
|
@@ -5198,7 +5637,7 @@ var Pe = {
|
|
|
5198
5637
|
});
|
|
5199
5638
|
}
|
|
5200
5639
|
setActiveRows(e) {
|
|
5201
|
-
this.activeRows =
|
|
5640
|
+
this.activeRows = e.slice(), this.activeRowsCount = this.activeRows.length;
|
|
5202
5641
|
}
|
|
5203
5642
|
resetDisplayRows() {
|
|
5204
5643
|
this.displayRows = [], this.displayRows.push(this.activeRows.slice(0)), this.displayRowsCount = this.displayRows[0].length;
|
|
@@ -5241,10 +5680,10 @@ var Pe = {
|
|
|
5241
5680
|
}
|
|
5242
5681
|
initializeRenderer() {
|
|
5243
5682
|
var e, t = {
|
|
5244
|
-
virtual:
|
|
5245
|
-
basic:
|
|
5683
|
+
virtual: kn,
|
|
5684
|
+
basic: On
|
|
5246
5685
|
};
|
|
5247
|
-
e = typeof this.table.options.renderVertical == "string" ? t[this.table.options.renderVertical] : this.table.options.renderVertical, e ? (this.renderMode = this.table.options.renderVertical, this.renderer = new e(this.table, this.element, this.tableElement), this.renderer.initialize(), (this.table.element.clientHeight
|
|
5686
|
+
e = typeof this.table.options.renderVertical == "string" ? t[this.table.options.renderVertical] : this.table.options.renderVertical, e ? (this.renderMode = this.table.options.renderVertical, this.renderer = new e(this.table, this.element, this.tableElement), this.renderer.initialize(), this.fixedHeight = !(!this.table.element.clientHeight && !this.table.options.height || this.table.options.minHeight && this.table.options.maxHeight)) : console.error("Unable to find matching renderer:", this.table.options.renderVertical);
|
|
5248
5687
|
}
|
|
5249
5688
|
getRenderMode() {
|
|
5250
5689
|
return this.renderMode;
|
|
@@ -5282,18 +5721,18 @@ var Pe = {
|
|
|
5282
5721
|
t.normalizeHeight(e);
|
|
5283
5722
|
});
|
|
5284
5723
|
}
|
|
5285
|
-
adjustTableSize() {
|
|
5286
|
-
let
|
|
5724
|
+
adjustTableSize(e) {
|
|
5725
|
+
let t = this.element.clientHeight, n, r = !1;
|
|
5287
5726
|
if (this.renderer.verticalFillMode === "fill") {
|
|
5288
|
-
let
|
|
5727
|
+
let i = Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && this.table.footerManager.active && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0));
|
|
5289
5728
|
if (this.fixedHeight) {
|
|
5290
|
-
|
|
5291
|
-
let e = "calc(100% - " +
|
|
5292
|
-
this.element.style.minHeight =
|
|
5293
|
-
} else this.element.style.height = "", this.element.style.height = this.table.element.clientHeight -
|
|
5294
|
-
this.renderer.resize(), !this.fixedHeight &&
|
|
5729
|
+
n = isNaN(this.table.options.minHeight) ? this.table.options.minHeight : this.table.options.minHeight + "px";
|
|
5730
|
+
let e = "calc(100% - " + i + "px)";
|
|
5731
|
+
this.element.style.minHeight = n || "calc(100% - " + i + "px)", this.element.style.height = e, this.element.style.maxHeight = e;
|
|
5732
|
+
} else this.element.style.height = "", this.element.style.height = Math.max(this.table.element.clientHeight - i, 0) + "px", this.element.scrollTop = this.scrollTop;
|
|
5733
|
+
this.renderer.resize(), !this.fixedHeight && t != this.element.clientHeight && (r = !0, !e && !this.redrawing && (this.redrawing = !0, this.subscribed("table-resize") ? this.dispatch("table-resize") : this.redraw(), this.redrawing = !1)), this.scrollBarCheck();
|
|
5295
5734
|
}
|
|
5296
|
-
return this._positionPlaceholder(),
|
|
5735
|
+
return this._positionPlaceholder(), r;
|
|
5297
5736
|
}
|
|
5298
5737
|
reinitialize() {
|
|
5299
5738
|
this.rows.forEach(function(e) {
|
|
@@ -5315,7 +5754,7 @@ var Pe = {
|
|
|
5315
5754
|
e.initEvent("scroll", !1, !0), this.element.dispatchEvent(e);
|
|
5316
5755
|
} else this.element.dispatchEvent(new Event("scroll"));
|
|
5317
5756
|
}
|
|
5318
|
-
},
|
|
5757
|
+
}, jn = class extends B {
|
|
5319
5758
|
constructor(e) {
|
|
5320
5759
|
super(e), this.active = !1, this.element = this.createElement(), this.containerElement = this.createContainerElement(), this.external = !1;
|
|
5321
5760
|
}
|
|
@@ -5335,9 +5774,7 @@ var Pe = {
|
|
|
5335
5774
|
case "string":
|
|
5336
5775
|
this.table.options.footerElement[0] === "<" ? this.containerElement.innerHTML = this.table.options.footerElement : (this.external = !0, this.containerElement = document.querySelector(this.table.options.footerElement));
|
|
5337
5776
|
break;
|
|
5338
|
-
default:
|
|
5339
|
-
this.element = this.table.options.footerElement;
|
|
5340
|
-
break;
|
|
5777
|
+
default: this.element = this.table.options.footerElement;
|
|
5341
5778
|
}
|
|
5342
5779
|
}
|
|
5343
5780
|
getElement() {
|
|
@@ -5361,7 +5798,7 @@ var Pe = {
|
|
|
5361
5798
|
redraw() {
|
|
5362
5799
|
this.dispatch("footer-redraw");
|
|
5363
5800
|
}
|
|
5364
|
-
},
|
|
5801
|
+
}, Mn = class extends B {
|
|
5365
5802
|
constructor(e) {
|
|
5366
5803
|
super(e), this.el = null, this.abortClasses = ["tabulator-headers", "tabulator-table"], this.previousTargets = {}, this.listeners = [
|
|
5367
5804
|
"click",
|
|
@@ -5479,9 +5916,7 @@ var Pe = {
|
|
|
5479
5916
|
case "column":
|
|
5480
5917
|
r.components.includes("column") && (n = this.table.columnManager.findColumn(a));
|
|
5481
5918
|
break;
|
|
5482
|
-
case "cell":
|
|
5483
|
-
r.components.includes("cell") && (i.row instanceof p ? n = i.row.findCell(a) : t.row && console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));
|
|
5484
|
-
break;
|
|
5919
|
+
case "cell": r.components.includes("cell") && (i.row instanceof G ? n = i.row.findCell(a) : t.row && console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));
|
|
5485
5920
|
}
|
|
5486
5921
|
n && (i[e] = n, o[e] = {
|
|
5487
5922
|
target: a,
|
|
@@ -5502,7 +5937,7 @@ var Pe = {
|
|
|
5502
5937
|
t.handler &&= (this.el.removeEventListener(e, t.handler), null);
|
|
5503
5938
|
}
|
|
5504
5939
|
}
|
|
5505
|
-
},
|
|
5940
|
+
}, Nn = class {
|
|
5506
5941
|
constructor(e) {
|
|
5507
5942
|
this.table = e, this.bindings = {};
|
|
5508
5943
|
}
|
|
@@ -5513,7 +5948,7 @@ var Pe = {
|
|
|
5513
5948
|
if (this.bindings[e] && this.bindings[e][n] && typeof this.bindings[e][n].bind == "function") return this.bindings[e][n].bind(null, t);
|
|
5514
5949
|
n !== "then" && typeof n == "string" && !n.startsWith("_") && this.table.options.debugInvalidComponentFuncs && console.error("The " + e + " component does not have a " + n + " function, have you checked that you have the correct Tabulator module installed?");
|
|
5515
5950
|
}
|
|
5516
|
-
},
|
|
5951
|
+
}, Pn = class extends B {
|
|
5517
5952
|
constructor(e) {
|
|
5518
5953
|
super(e), this.requestOrder = 0, this.loading = !1;
|
|
5519
5954
|
}
|
|
@@ -5571,7 +6006,7 @@ var Pe = {
|
|
|
5571
6006
|
clearAlert() {
|
|
5572
6007
|
this.table.alertManager.clear();
|
|
5573
6008
|
}
|
|
5574
|
-
},
|
|
6009
|
+
}, Fn = class {
|
|
5575
6010
|
constructor(e, t, n) {
|
|
5576
6011
|
this.table = e, this.events = {}, this.optionsList = t || {}, this.subscriptionNotifiers = {}, this.dispatch = n ? this._debugDispatch.bind(this) : this._dispatch.bind(this), this.debug = n;
|
|
5577
6012
|
}
|
|
@@ -5583,13 +6018,15 @@ var Pe = {
|
|
|
5583
6018
|
}
|
|
5584
6019
|
unsubscribe(e, t) {
|
|
5585
6020
|
var n;
|
|
5586
|
-
if (this.events[e])
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
6021
|
+
if (this.events[e]) {
|
|
6022
|
+
if (t) {
|
|
6023
|
+
if (n = this.events[e].findIndex((e) => e === t), n > -1) this.events[e].splice(n, 1);
|
|
6024
|
+
else {
|
|
6025
|
+
console.warn("Cannot remove event, no matching event found:", e, t);
|
|
6026
|
+
return;
|
|
6027
|
+
}
|
|
6028
|
+
} else delete this.events[e];
|
|
6029
|
+
} else {
|
|
5593
6030
|
console.warn("Cannot remove event, no events set on:", e);
|
|
5594
6031
|
return;
|
|
5595
6032
|
}
|
|
@@ -5604,18 +6041,22 @@ var Pe = {
|
|
|
5604
6041
|
e(t);
|
|
5605
6042
|
});
|
|
5606
6043
|
}
|
|
5607
|
-
_dispatch() {
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
let
|
|
5611
|
-
|
|
5612
|
-
|
|
6044
|
+
_dispatch(e, ...t) {
|
|
6045
|
+
let n = this.events[e], r = n?.length;
|
|
6046
|
+
if (r) {
|
|
6047
|
+
let e = n[0].apply(this.table, t);
|
|
6048
|
+
for (let e = 1; e < r; e++) n[e].apply(this.table, t);
|
|
6049
|
+
return e;
|
|
6050
|
+
}
|
|
5613
6051
|
}
|
|
5614
|
-
_debugDispatch() {
|
|
5615
|
-
|
|
5616
|
-
|
|
6052
|
+
_debugDispatch(e, ...t) {
|
|
6053
|
+
if (this.debug === !0 || this.debug.includes(e)) {
|
|
6054
|
+
let n = ["ExternalEvent:" + e, ...t];
|
|
6055
|
+
console.log(...n);
|
|
6056
|
+
}
|
|
6057
|
+
return this._dispatch(e, ...t);
|
|
5617
6058
|
}
|
|
5618
|
-
},
|
|
6059
|
+
}, In = class {
|
|
5619
6060
|
constructor(e) {
|
|
5620
6061
|
this.events = {}, this.subscriptionNotifiers = {}, this.dispatch = e ? this._debugDispatch.bind(this) : this._dispatch.bind(this), this.chain = e ? this._debugChain.bind(this) : this._chain.bind(this), this.confirm = e ? this._debugConfirm.bind(this) : this._confirm.bind(this), this.debug = e;
|
|
5621
6062
|
}
|
|
@@ -5631,10 +6072,12 @@ var Pe = {
|
|
|
5631
6072
|
unsubscribe(e, t) {
|
|
5632
6073
|
var n;
|
|
5633
6074
|
if (this.events[e]) {
|
|
5634
|
-
if (t)
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
6075
|
+
if (t) {
|
|
6076
|
+
if (n = this.events[e].findIndex((e) => e.callback === t), n > -1) this.events[e].splice(n, 1);
|
|
6077
|
+
else {
|
|
6078
|
+
console.warn("Cannot remove event, no matching event found:", e, t);
|
|
6079
|
+
return;
|
|
6080
|
+
}
|
|
5638
6081
|
}
|
|
5639
6082
|
} else {
|
|
5640
6083
|
console.warn("Cannot remove event, no events set on:", e);
|
|
@@ -5646,10 +6089,14 @@ var Pe = {
|
|
|
5646
6089
|
return this.events[e] && this.events[e].length;
|
|
5647
6090
|
}
|
|
5648
6091
|
_chain(e, t, n, r) {
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
6092
|
+
let i = this.events[e];
|
|
6093
|
+
if (i && i.length) {
|
|
6094
|
+
Array.isArray(t) || (t = [t]);
|
|
6095
|
+
let e = t.slice(), r = e.length, a = n;
|
|
6096
|
+
for (let t = 0; t < i.length; t++) e[r] = a, a = i[t].callback.apply(this, e);
|
|
6097
|
+
return a;
|
|
6098
|
+
}
|
|
6099
|
+
return typeof r == "function" ? r() : r;
|
|
5653
6100
|
}
|
|
5654
6101
|
_confirm(e, t) {
|
|
5655
6102
|
var n = !1;
|
|
@@ -5663,25 +6110,37 @@ var Pe = {
|
|
|
5663
6110
|
e(t);
|
|
5664
6111
|
});
|
|
5665
6112
|
}
|
|
5666
|
-
_dispatch() {
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
t.callback.apply(this, e);
|
|
5670
|
-
});
|
|
6113
|
+
_dispatch(e, ...t) {
|
|
6114
|
+
let n = this.events[e];
|
|
6115
|
+
if (n) for (let e of n) e.callback.apply(this, t);
|
|
5671
6116
|
}
|
|
5672
|
-
_debugDispatch() {
|
|
5673
|
-
|
|
5674
|
-
|
|
6117
|
+
_debugDispatch(e, ...t) {
|
|
6118
|
+
if (this.debug === !0 || this.debug.includes(e)) {
|
|
6119
|
+
let n = ["InternalEvent:" + e, ...t];
|
|
6120
|
+
console.log(...n);
|
|
6121
|
+
}
|
|
6122
|
+
return this._dispatch(e, ...t);
|
|
5675
6123
|
}
|
|
5676
|
-
_debugChain() {
|
|
5677
|
-
|
|
5678
|
-
|
|
6124
|
+
_debugChain(e, t, n, r) {
|
|
6125
|
+
if (this.debug === !0 || this.debug.includes(e)) {
|
|
6126
|
+
let i = [
|
|
6127
|
+
"InternalEvent:" + e,
|
|
6128
|
+
t,
|
|
6129
|
+
n,
|
|
6130
|
+
r
|
|
6131
|
+
];
|
|
6132
|
+
console.log(...i);
|
|
6133
|
+
}
|
|
6134
|
+
return this._chain(e, t, n, r);
|
|
5679
6135
|
}
|
|
5680
|
-
_debugConfirm() {
|
|
5681
|
-
|
|
5682
|
-
|
|
6136
|
+
_debugConfirm(e, t) {
|
|
6137
|
+
if (this.debug === !0 || this.debug.includes(e)) {
|
|
6138
|
+
let n = ["InternalEvent:" + e, t];
|
|
6139
|
+
console.log(...n);
|
|
6140
|
+
}
|
|
6141
|
+
return this._confirm(e, t);
|
|
5683
6142
|
}
|
|
5684
|
-
},
|
|
6143
|
+
}, Ln = class extends B {
|
|
5685
6144
|
constructor(e) {
|
|
5686
6145
|
super(e);
|
|
5687
6146
|
}
|
|
@@ -5690,15 +6149,15 @@ var Pe = {
|
|
|
5690
6149
|
}
|
|
5691
6150
|
check(e, t, n) {
|
|
5692
6151
|
var r = "";
|
|
5693
|
-
return this.options(e) === void 0
|
|
6152
|
+
return this.options(e) === void 0 || (r = "Deprecated Setup Option - Use of the %c" + e + "%c option is now deprecated", t ? (r = r + ", Please use the %c" + t + "%c option instead", this._warnUser(r, "font-weight: bold;", "font-weight: normal;", "font-weight: bold;", "font-weight: normal;"), n && (this.table.options[t] = this.table.options[e])) : this._warnUser(r, "font-weight: bold;", "font-weight: normal;"), !1);
|
|
5694
6153
|
}
|
|
5695
6154
|
checkMsg(e, t) {
|
|
5696
|
-
return this.options(e) === void 0
|
|
6155
|
+
return this.options(e) === void 0 || (this._warnUser("%cDeprecated Setup Option - Use of the %c" + e + " %c option is now deprecated, " + t, "font-weight: normal;", "font-weight: bold;", "font-weight: normal;"), !1);
|
|
5697
6156
|
}
|
|
5698
6157
|
msg(e) {
|
|
5699
6158
|
this._warnUser(e);
|
|
5700
6159
|
}
|
|
5701
|
-
},
|
|
6160
|
+
}, Rn = class extends B {
|
|
5702
6161
|
constructor(e) {
|
|
5703
6162
|
super(e), this.deps = {}, this.props = {};
|
|
5704
6163
|
}
|
|
@@ -5729,21 +6188,21 @@ var Pe = {
|
|
|
5729
6188
|
console.error("Unable to find dependency", e, "Please check documentation and ensure you have imported the required library into your project");
|
|
5730
6189
|
}
|
|
5731
6190
|
};
|
|
5732
|
-
function
|
|
6191
|
+
function zn(e, t) {
|
|
5733
6192
|
t && this.table.columnManager.renderer.reinitializeColumnWidths(e), this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update();
|
|
5734
6193
|
}
|
|
5735
|
-
function
|
|
6194
|
+
function Bn(e, t) {
|
|
5736
6195
|
e.forEach(function(e) {
|
|
5737
6196
|
e.reinitializeWidth();
|
|
5738
6197
|
}), this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update();
|
|
5739
6198
|
}
|
|
5740
|
-
function
|
|
6199
|
+
function Vn(e, t) {
|
|
5741
6200
|
var n = 0, r = this.table.rowManager.element.clientWidth, i = 0, a = !1;
|
|
5742
6201
|
e.forEach((e, t) => {
|
|
5743
6202
|
e.widthFixed || e.reinitializeWidth(), (this.table.options.responsiveLayout ? e.modules.responsive.visible : e.visible) && (a = e), e.visible && (n += e.getWidth());
|
|
5744
6203
|
}), a ? (i = r - n + a.getWidth(), this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && (a.setWidth(0), this.table.modules.responsiveLayout.update()), i > 0 ? a.setWidth(i) : a.reinitializeWidth()) : this.table.options.responsiveLayout && this.table.modExists("responsiveLayout", !0) && this.table.modules.responsiveLayout.update();
|
|
5745
6204
|
}
|
|
5746
|
-
function
|
|
6205
|
+
function Hn(e, t) {
|
|
5747
6206
|
var n = this.table.rowManager.element.getBoundingClientRect().width, r = 0, i = 0, a = 0, o = 0, s = [], c = [], l = 0, u = 0, d = 0;
|
|
5748
6207
|
function f(e) {
|
|
5749
6208
|
return typeof e == "string" ? e.indexOf("%") > -1 ? n / 100 * parseInt(e) : parseInt(e) : e;
|
|
@@ -5782,15 +6241,15 @@ function Qe(e, t) {
|
|
|
5782
6241
|
e.column.setWidth(e.width);
|
|
5783
6242
|
});
|
|
5784
6243
|
}
|
|
5785
|
-
var
|
|
5786
|
-
fitData:
|
|
5787
|
-
fitDataFill:
|
|
5788
|
-
fitDataTable:
|
|
5789
|
-
fitDataStretch:
|
|
5790
|
-
fitColumns:
|
|
5791
|
-
},
|
|
6244
|
+
var Un = {
|
|
6245
|
+
fitData: zn,
|
|
6246
|
+
fitDataFill: Bn,
|
|
6247
|
+
fitDataTable: Bn,
|
|
6248
|
+
fitDataStretch: Vn,
|
|
6249
|
+
fitColumns: Hn
|
|
6250
|
+
}, Wn = class e extends H {
|
|
5792
6251
|
static moduleName = "layout";
|
|
5793
|
-
static modes =
|
|
6252
|
+
static modes = Un;
|
|
5794
6253
|
constructor(e) {
|
|
5795
6254
|
super(e, "layout"), this.mode = null, this.registerTableOption("layout", "fitData"), this.registerTableOption("layoutColumnsOnNewData", !1), this.registerColumnOption("widthGrow"), this.registerColumnOption("widthShrink");
|
|
5796
6255
|
}
|
|
@@ -5808,7 +6267,7 @@ var $e = {
|
|
|
5808
6267
|
var n = this.table.columnManager.columnsByIndex.find((e) => e.definition.variableHeight || e.definition.formatter === "textarea");
|
|
5809
6268
|
this.dispatch("layout-refreshing"), e.modes[this.mode].call(this, this.table.columnManager.columnsByIndex, t), n && this.table.rowManager.normalizeHeight(!0), this.dispatch("layout-refreshed");
|
|
5810
6269
|
}
|
|
5811
|
-
},
|
|
6270
|
+
}, Gn = { default: {
|
|
5812
6271
|
groups: {
|
|
5813
6272
|
item: "item",
|
|
5814
6273
|
items: "items"
|
|
@@ -5841,9 +6300,9 @@ var $e = {
|
|
|
5841
6300
|
default: "filter column...",
|
|
5842
6301
|
columns: {}
|
|
5843
6302
|
}
|
|
5844
|
-
} },
|
|
6303
|
+
} }, Kn = /*#__PURE__*/ Object.freeze({
|
|
5845
6304
|
__proto__: null,
|
|
5846
|
-
CommsModule: class extends
|
|
6305
|
+
CommsModule: class extends H {
|
|
5847
6306
|
static moduleName = "comms";
|
|
5848
6307
|
constructor(e) {
|
|
5849
6308
|
super(e);
|
|
@@ -5868,15 +6327,15 @@ var $e = {
|
|
|
5868
6327
|
console.warn("Inter-table Comms Error - no such module:", t);
|
|
5869
6328
|
}
|
|
5870
6329
|
},
|
|
5871
|
-
LayoutModule:
|
|
5872
|
-
LocalizeModule: class e extends
|
|
6330
|
+
LayoutModule: Wn,
|
|
6331
|
+
LocalizeModule: class e extends H {
|
|
5873
6332
|
static moduleName = "localize";
|
|
5874
|
-
static langs =
|
|
6333
|
+
static langs = Gn;
|
|
5875
6334
|
constructor(e) {
|
|
5876
6335
|
super(e), this.locale = "default", this.lang = !1, this.bindings = {}, this.langList = {}, this.registerTableOption("locale", !1), this.registerTableOption("langs", {});
|
|
5877
6336
|
}
|
|
5878
6337
|
initialize() {
|
|
5879
|
-
this.langList =
|
|
6338
|
+
this.langList = V.deepClone(e.langs), this.table.options.columnDefaults.headerFilterPlaceholder !== !1 && this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);
|
|
5880
6339
|
for (let e in this.table.options.langs) this.installLang(e, this.table.options.langs[e]);
|
|
5881
6340
|
this.setLocale(this.table.options.locale), this.registerTableFunction("setLocale", this.setLocale.bind(this)), this.registerTableFunction("getLocale", this.getLocale.bind(this)), this.registerTableFunction("getLang", this.getLang.bind(this));
|
|
5882
6341
|
}
|
|
@@ -5891,14 +6350,14 @@ var $e = {
|
|
|
5891
6350
|
}
|
|
5892
6351
|
setLocale(e) {
|
|
5893
6352
|
e ||= "default";
|
|
5894
|
-
function
|
|
5895
|
-
for (var r in e) typeof e[r] == "object" ? (
|
|
6353
|
+
function t(e, n) {
|
|
6354
|
+
for (var r in e) typeof e[r] == "object" ? (n[r] || (n[r] = {}), t(e[r], n[r])) : n[r] = e[r];
|
|
5896
6355
|
}
|
|
5897
6356
|
if (e === !0 && navigator.language && (e = navigator.language.toLowerCase()), e && !this.langList[e]) {
|
|
5898
6357
|
let t = e.split("-")[0];
|
|
5899
6358
|
this.langList[t] ? (console.warn("Localization Error - Exact matching locale not found, using closest match: ", e, t), e = t) : (console.warn("Localization Error - Matching locale not found, using default: ", e), e = "default");
|
|
5900
6359
|
}
|
|
5901
|
-
this.locale = e, this.lang =
|
|
6360
|
+
this.locale = e, this.lang = V.deepClone(this.langList.default || {}), e != "default" && t(this.langList[e], this.lang), this.dispatchExternal("localized", this.locale, this.lang), this._executeBindings();
|
|
5902
6361
|
}
|
|
5903
6362
|
getLocale(e) {
|
|
5904
6363
|
return this.locale;
|
|
@@ -5926,7 +6385,7 @@ var $e = {
|
|
|
5926
6385
|
});
|
|
5927
6386
|
}
|
|
5928
6387
|
}
|
|
5929
|
-
}),
|
|
6388
|
+
}), qn = class e {
|
|
5930
6389
|
static registry = {
|
|
5931
6390
|
tables: [],
|
|
5932
6391
|
register(t) {
|
|
@@ -5955,7 +6414,7 @@ var $e = {
|
|
|
5955
6414
|
var n = e.registry.lookupTable(t, !0);
|
|
5956
6415
|
return Array.isArray(n) && !n.length ? !1 : n;
|
|
5957
6416
|
}
|
|
5958
|
-
},
|
|
6417
|
+
}, Jn = class e extends qn {
|
|
5959
6418
|
static moduleBindings = {};
|
|
5960
6419
|
static moduleExtensions = {};
|
|
5961
6420
|
static modulesRegistered = !1;
|
|
@@ -5964,14 +6423,15 @@ var $e = {
|
|
|
5964
6423
|
super();
|
|
5965
6424
|
}
|
|
5966
6425
|
static initializeModuleBinder(t) {
|
|
5967
|
-
e.modulesRegistered || (e.modulesRegistered = !0, e._registerModules(
|
|
6426
|
+
e.modulesRegistered || (e.modulesRegistered = !0, e._registerModules(Kn, !0), t && e._registerModules(t));
|
|
5968
6427
|
}
|
|
5969
6428
|
static _extendModule(t, n, r) {
|
|
5970
6429
|
if (e.moduleBindings[t]) {
|
|
5971
6430
|
var i = e.moduleBindings[t][n];
|
|
5972
|
-
if (i)
|
|
5973
|
-
|
|
5974
|
-
|
|
6431
|
+
if (i) {
|
|
6432
|
+
if (typeof r == "object") for (let e in r) i[e] = r[e];
|
|
6433
|
+
else console.warn("Module Error - Invalid value type, it must be an object");
|
|
6434
|
+
} else console.warn("Module Error - property does not exist:", n);
|
|
5975
6435
|
} else console.warn("Module Error - module does not exist:", t);
|
|
5976
6436
|
}
|
|
5977
6437
|
static _registerModules(t, n) {
|
|
@@ -6012,7 +6472,7 @@ var $e = {
|
|
|
6012
6472
|
}
|
|
6013
6473
|
t.sort((e, t) => e.moduleInitOrder > t.moduleInitOrder ? 1 : -1), n.sort((e, t) => e.moduleInitOrder > t.moduleInitOrder ? 1 : -1), this.modulesRegular = t.concat(r.concat(n));
|
|
6014
6474
|
}
|
|
6015
|
-
},
|
|
6475
|
+
}, Yn = class extends B {
|
|
6016
6476
|
constructor(e) {
|
|
6017
6477
|
super(e), this.element = this._createAlertElement(), this.msgElement = this._createMsgElement(), this.type = null, this.element.appendChild(this.msgElement);
|
|
6018
6478
|
}
|
|
@@ -6036,8 +6496,8 @@ var $e = {
|
|
|
6036
6496
|
clear() {
|
|
6037
6497
|
this.dispatch("alert-hide", this.type), this.element.parentNode && this.element.parentNode.removeChild(this.element), this.msgElement.classList.remove(this._typeClass());
|
|
6038
6498
|
}
|
|
6039
|
-
},
|
|
6040
|
-
static defaultOptions =
|
|
6499
|
+
}, X = class e extends Jn {
|
|
6500
|
+
static defaultOptions = Cn;
|
|
6041
6501
|
static extendModule() {
|
|
6042
6502
|
e.initializeModuleBinder(), e._extendModule(...arguments);
|
|
6043
6503
|
}
|
|
@@ -6045,7 +6505,7 @@ var $e = {
|
|
|
6045
6505
|
e.initializeModuleBinder(), e._registerModule(...arguments);
|
|
6046
6506
|
}
|
|
6047
6507
|
constructor(t, n, r) {
|
|
6048
|
-
super(), e.initializeModuleBinder(r), this.options = {}, this.columnManager = null, this.rowManager = null, this.footerManager = null, this.alertManager = null, this.vdomHoz = null, this.externalEvents = null, this.eventBus = null, this.interactionMonitor = !1, this.browser = "", this.browserSlow = !1, this.browserMobile = !1, this.rtl = !1, this.originalElement = null, this.componentFunctionBinder = new
|
|
6508
|
+
super(), e.initializeModuleBinder(r), this.options = {}, this.columnManager = null, this.rowManager = null, this.footerManager = null, this.alertManager = null, this.vdomHoz = null, this.externalEvents = null, this.eventBus = null, this.interactionMonitor = !1, this.browser = "", this.browserSlow = !1, this.browserMobile = !1, this.rtl = !1, this.originalElement = null, this.componentFunctionBinder = new Nn(this), this.dataLoader = !1, this.modules = {}, this.modulesCore = [], this.modulesRegular = [], this.deprecationAdvisor = new Ln(this), this.optionsList = new wn(this, "table constructor"), this.dependencyRegistry = new Rn(this), this.initialized = !1, this.destroyed = !1, this.initializeElement(t) && (this.instanceId = this.element.id ? this.element.id : Math.random().toString(36).slice(2, 7), this.initializeCoreSystems(n), setTimeout(() => {
|
|
6049
6509
|
this._create();
|
|
6050
6510
|
})), this.constructor.registry.register(this);
|
|
6051
6511
|
}
|
|
@@ -6053,7 +6513,7 @@ var $e = {
|
|
|
6053
6513
|
return typeof HTMLElement < "u" && e instanceof HTMLElement ? (this.element = e, !0) : typeof e == "string" ? (this.element = document.querySelector(e), this.element ? !0 : (console.error("Tabulator Creation Error - no element found matching selector: ", e), !1)) : (console.error("Tabulator Creation Error - Invalid element provided:", e), !1);
|
|
6054
6514
|
}
|
|
6055
6515
|
initializeCoreSystems(t) {
|
|
6056
|
-
this.columnManager = new
|
|
6516
|
+
this.columnManager = new Dn(this), this.rowManager = new An(this), this.footerManager = new jn(this), this.dataLoader = new Pn(this), this.alertManager = new Yn(this), this._bindModules(), this.options = this.optionsList.generate(e.defaultOptions, t), this._clearObjectPointers(), this._mapDeprecatedFunctionality(), this.externalEvents = new Fn(this, this.options, this.options.debugEventsExternal), this.eventBus = new In(this.options.debugEventsInternal), this.interactionMonitor = new Mn(this), this.dataLoader.initialize(), this.footerManager.initialize(), this.dependencyRegistry.initialize();
|
|
6057
6517
|
}
|
|
6058
6518
|
_mapDeprecatedFunctionality() {}
|
|
6059
6519
|
_clearSelection() {
|
|
@@ -6086,7 +6546,7 @@ var $e = {
|
|
|
6086
6546
|
for (var i in r) typeof r[i] == "object" && n.setAttribute(r[i].name, r[i].value);
|
|
6087
6547
|
e.parentNode.replaceChild(n, e), this.element = e = n;
|
|
6088
6548
|
}
|
|
6089
|
-
for (e.classList.add("tabulator"), e.setAttribute("role", "grid"), e.setAttribute("aria-owns", "tabulator-table-body"); e.firstChild;) e.removeChild(e.firstChild);
|
|
6549
|
+
for (e.classList.add("tabulator"), e.setAttribute("role", "grid"), e.setAttribute("aria-owns", "tabulator-table-body-" + this.instanceId); e.firstChild;) e.removeChild(e.firstChild);
|
|
6090
6550
|
t.height && (t.height = isNaN(t.height) ? t.height : t.height + "px", e.style.height = t.height), t.minHeight !== !1 && (t.minHeight = isNaN(t.minHeight) ? t.minHeight : t.minHeight + "px", e.style.minHeight = t.minHeight), t.maxHeight !== !1 && (t.maxHeight = isNaN(t.maxHeight) ? t.maxHeight : t.maxHeight + "px", e.style.maxHeight = t.maxHeight);
|
|
6091
6551
|
}
|
|
6092
6552
|
_initializeTable() {
|
|
@@ -6133,6 +6593,9 @@ var $e = {
|
|
|
6133
6593
|
getDataCount(e) {
|
|
6134
6594
|
return this.rowManager.getDataCount(e);
|
|
6135
6595
|
}
|
|
6596
|
+
getRedrawBlock() {
|
|
6597
|
+
return this.rowManager.redrawBlock || this.columnManager.redrawBlock;
|
|
6598
|
+
}
|
|
6136
6599
|
replaceData(e, t, n) {
|
|
6137
6600
|
return this.initGuard(), this.dataLoader.load(e, t, n, !0, !0);
|
|
6138
6601
|
}
|
|
@@ -6304,4 +6767,559 @@ var $e = {
|
|
|
6304
6767
|
}
|
|
6305
6768
|
};
|
|
6306
6769
|
//#endregion
|
|
6307
|
-
|
|
6770
|
+
//#region components/DataTable.vue?vue&type=script&lang.ts
|
|
6771
|
+
X.registerModule([
|
|
6772
|
+
fn,
|
|
6773
|
+
mt,
|
|
6774
|
+
on,
|
|
6775
|
+
Ft,
|
|
6776
|
+
Sn,
|
|
6777
|
+
kt,
|
|
6778
|
+
Nt,
|
|
6779
|
+
dn,
|
|
6780
|
+
sn
|
|
6781
|
+
]);
|
|
6782
|
+
function Z(e, t) {
|
|
6783
|
+
if (!e) return;
|
|
6784
|
+
let n = "<table class=\"tabulator-sub-table\">", i = t.keys().next().value;
|
|
6785
|
+
if (!i) return "<table class=\"tabulator-sub-table\"><tbody><tr><td>No data</td></tr></tbody></table>";
|
|
6786
|
+
let a = t.get(i);
|
|
6787
|
+
return a ? (n += "<tbody >", e.forEach((e) => {
|
|
6788
|
+
let o = e[i];
|
|
6789
|
+
a.type == r.STRUCT && a.children ? o = Q(o, a.children) : a.type === r.ARRAY && (o = Z(o, t)), n += "<tr class=\"tabulator-sub-row\">", n += `<td class="tabulator-sub-cell">${o}</td>`, n += "</tr>";
|
|
6790
|
+
}), n += "</tbody>", n += "</table>", n) : "<table class=\"tabulator-sub-table\"><tbody><tr><td>No data</td></tr></tbody></table>";
|
|
6791
|
+
}
|
|
6792
|
+
function Q(e, t) {
|
|
6793
|
+
if (!e) return;
|
|
6794
|
+
let n = "<table class=\"tabulator-sub-table\">";
|
|
6795
|
+
return n += "<tbody >", t.forEach((t, i) => {
|
|
6796
|
+
let a = e[t.name];
|
|
6797
|
+
t.type === r.ARRAY && t.children && (a = Z(a, t.children)), t.type === r.STRUCT && t.children && (a = Q(a, t.children)), n += "<tr class=\"tabulator-sub-row\">", n += `<td class="tabulator-sub-cell tabulator-sub-cell-header">${t.name}</td>`, n += `<td class="tabulator-sub-cell">${a}</td>`, n += "</tr>";
|
|
6798
|
+
}), n += "</tbody>", n += "</table>", n;
|
|
6799
|
+
}
|
|
6800
|
+
function Xn(e) {
|
|
6801
|
+
let t = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
6802
|
+
if (e.traits?.includes("usd")) return {
|
|
6803
|
+
formatter: "money",
|
|
6804
|
+
formatterParams: {
|
|
6805
|
+
symbol: "$",
|
|
6806
|
+
precision: 4
|
|
6807
|
+
}
|
|
6808
|
+
};
|
|
6809
|
+
if (e.traits?.includes("percent")) return { formatter: (e) => (e.getValue() * 100).toFixed(2) + "%" };
|
|
6810
|
+
if (e.traits?.includes("url_image")) return { formatter: (e) => {
|
|
6811
|
+
let t = e.getValue();
|
|
6812
|
+
return t ? `<img src="${t}" alt="${t}" style="max-width: 100%; max-height: 100%;">` : "";
|
|
6813
|
+
} };
|
|
6814
|
+
switch (e.type) {
|
|
6815
|
+
case r.ARRAY: return { formatter: (t) => Z(t.getValue(), e.children || /* @__PURE__ */ new Map()) };
|
|
6816
|
+
case r.STRUCT: return { formatter: (t) => Q(t.getValue(), e.children || /* @__PURE__ */ new Map()) };
|
|
6817
|
+
case r.FLOAT: return {
|
|
6818
|
+
formatter: "money",
|
|
6819
|
+
formatterParams: { precision: e.scale && e.scale >= 0 ? e.scale : !1 }
|
|
6820
|
+
};
|
|
6821
|
+
case r.DATETIME: return {
|
|
6822
|
+
formatter: "datetime",
|
|
6823
|
+
formatterParams: {
|
|
6824
|
+
inputFormat: "iso",
|
|
6825
|
+
outputFormat: "yyyy-MM-dd HH:mm",
|
|
6826
|
+
invalidPlaceholder: "(invalid datetime)",
|
|
6827
|
+
timezone: t
|
|
6828
|
+
}
|
|
6829
|
+
};
|
|
6830
|
+
case r.TIMESTAMP: return {
|
|
6831
|
+
formatter: "datetime",
|
|
6832
|
+
formatterParams: {
|
|
6833
|
+
outputFormat: "yyyy-MM-dd HH:mm:ss Z",
|
|
6834
|
+
invalidPlaceholder: "(invalid timestamp)",
|
|
6835
|
+
timezone: t
|
|
6836
|
+
}
|
|
6837
|
+
};
|
|
6838
|
+
case r.DATE: return {
|
|
6839
|
+
formatter: "datetime",
|
|
6840
|
+
formatterParams: {
|
|
6841
|
+
inputFormat: "yyyy-MM-dd",
|
|
6842
|
+
outputFormat: "yyyy-MM-dd",
|
|
6843
|
+
invalidPlaceholder: "(invalid date)",
|
|
6844
|
+
timezone: "UTC"
|
|
6845
|
+
}
|
|
6846
|
+
};
|
|
6847
|
+
case r.TIME: return {
|
|
6848
|
+
formatter: "datetime",
|
|
6849
|
+
formatterParams: {
|
|
6850
|
+
inputFormat: "HH:mm:ss",
|
|
6851
|
+
outputFormat: "HH:mm",
|
|
6852
|
+
invalidPlaceholder: "(invalid time)",
|
|
6853
|
+
timezone: t
|
|
6854
|
+
}
|
|
6855
|
+
};
|
|
6856
|
+
case r.TIMESTAMP: return {
|
|
6857
|
+
formatter: "datetime",
|
|
6858
|
+
formatterParams: {
|
|
6859
|
+
inputFormat: "HH:mm:ss",
|
|
6860
|
+
outputFormat: "HH:mm",
|
|
6861
|
+
invalidPlaceholder: "(invalid time)",
|
|
6862
|
+
timezone: t
|
|
6863
|
+
}
|
|
6864
|
+
};
|
|
6865
|
+
case r.BOOLEAN: return {
|
|
6866
|
+
formatter: "tickCross",
|
|
6867
|
+
formatterParams: {
|
|
6868
|
+
allowEmpty: !0,
|
|
6869
|
+
tickElement: "✓",
|
|
6870
|
+
crossElement: "✗"
|
|
6871
|
+
}
|
|
6872
|
+
};
|
|
6873
|
+
default: return { formatter: "plaintext" };
|
|
6874
|
+
}
|
|
6875
|
+
}
|
|
6876
|
+
var Zn = {
|
|
6877
|
+
data() {
|
|
6878
|
+
return {
|
|
6879
|
+
tabulator: null,
|
|
6880
|
+
selectedCell: null,
|
|
6881
|
+
controlsVisible: !1,
|
|
6882
|
+
pendingRebuild: !1,
|
|
6883
|
+
visibilityObserver: null,
|
|
6884
|
+
redrawFrame: 0,
|
|
6885
|
+
lastDrawnSize: null
|
|
6886
|
+
};
|
|
6887
|
+
},
|
|
6888
|
+
props: {
|
|
6889
|
+
headers: {
|
|
6890
|
+
type: Map,
|
|
6891
|
+
required: !0
|
|
6892
|
+
},
|
|
6893
|
+
results: {
|
|
6894
|
+
type: Array,
|
|
6895
|
+
required: !0
|
|
6896
|
+
},
|
|
6897
|
+
containerHeight: Number,
|
|
6898
|
+
cellClick: {
|
|
6899
|
+
type: Function,
|
|
6900
|
+
default: () => {}
|
|
6901
|
+
},
|
|
6902
|
+
backgroundClick: {
|
|
6903
|
+
type: Function,
|
|
6904
|
+
default: () => {}
|
|
6905
|
+
},
|
|
6906
|
+
prettyPrint: {
|
|
6907
|
+
type: Boolean,
|
|
6908
|
+
default: !1
|
|
6909
|
+
},
|
|
6910
|
+
fitParent: {
|
|
6911
|
+
type: Boolean,
|
|
6912
|
+
default: !1
|
|
6913
|
+
},
|
|
6914
|
+
flushChrome: {
|
|
6915
|
+
type: Boolean,
|
|
6916
|
+
default: !1
|
|
6917
|
+
},
|
|
6918
|
+
showControls: {
|
|
6919
|
+
type: Boolean,
|
|
6920
|
+
default: !0
|
|
6921
|
+
}
|
|
6922
|
+
},
|
|
6923
|
+
setup() {
|
|
6924
|
+
let e = O("userSettingsStore", null);
|
|
6925
|
+
return {
|
|
6926
|
+
settingsStore: e,
|
|
6927
|
+
currentTheme: n(e)
|
|
6928
|
+
};
|
|
6929
|
+
},
|
|
6930
|
+
watch: {
|
|
6931
|
+
results: { handler() {
|
|
6932
|
+
this.updateTable();
|
|
6933
|
+
} },
|
|
6934
|
+
containerHeight: { handler() {
|
|
6935
|
+
this.$nextTick(() => {
|
|
6936
|
+
this.tabulator && this.containerHeight && this.tabulator.setHeight(this.containerHeight);
|
|
6937
|
+
});
|
|
6938
|
+
} }
|
|
6939
|
+
},
|
|
6940
|
+
computed: {
|
|
6941
|
+
tableData() {
|
|
6942
|
+
return Object.freeze([...this.results]);
|
|
6943
|
+
},
|
|
6944
|
+
tableColumns() {
|
|
6945
|
+
let e = [];
|
|
6946
|
+
return this.headers.forEach((t, n) => {
|
|
6947
|
+
let r = Xn(t), i = {
|
|
6948
|
+
title: this.prettyPrint ? a(t.name) : t.name,
|
|
6949
|
+
field: t.name,
|
|
6950
|
+
formatter: r.formatter,
|
|
6951
|
+
formatterParams: r.formatterParams
|
|
6952
|
+
};
|
|
6953
|
+
e.push(i);
|
|
6954
|
+
}), e;
|
|
6955
|
+
}
|
|
6956
|
+
},
|
|
6957
|
+
unmounted() {
|
|
6958
|
+
this.redrawFrame &&= (cancelAnimationFrame(this.redrawFrame), 0), this.visibilityObserver &&= (this.visibilityObserver.disconnect(), null), this.tabulator &&= (this.tabulator.destroy(), null);
|
|
6959
|
+
},
|
|
6960
|
+
mounted() {
|
|
6961
|
+
this.observeVisibility(), this.tabulator || (this.isVisible() ? this.create() : this.pendingRebuild = !0);
|
|
6962
|
+
},
|
|
6963
|
+
methods: {
|
|
6964
|
+
isVisible() {
|
|
6965
|
+
let e = this.$refs.root;
|
|
6966
|
+
return e ? e.offsetWidth > 0 && e.offsetHeight > 0 : !1;
|
|
6967
|
+
},
|
|
6968
|
+
observeVisibility() {
|
|
6969
|
+
let e = this.$refs.root;
|
|
6970
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
6971
|
+
let t = new ResizeObserver(() => {
|
|
6972
|
+
this.redrawFrame ||= requestAnimationFrame(() => {
|
|
6973
|
+
if (this.redrawFrame = 0, this.isVisible()) {
|
|
6974
|
+
if (this.pendingRebuild) this.pendingRebuild = !1, this.create();
|
|
6975
|
+
else if (this.tabulator) {
|
|
6976
|
+
let e = this.tabulator.element;
|
|
6977
|
+
if (!e || !e.isConnected) return;
|
|
6978
|
+
let t = this.$refs.root;
|
|
6979
|
+
if (!t) return;
|
|
6980
|
+
let n = {
|
|
6981
|
+
width: t.offsetWidth,
|
|
6982
|
+
height: t.offsetHeight
|
|
6983
|
+
};
|
|
6984
|
+
if (this.lastDrawnSize && this.lastDrawnSize.width === n.width && this.lastDrawnSize.height === n.height) return;
|
|
6985
|
+
this.lastDrawnSize = n;
|
|
6986
|
+
try {
|
|
6987
|
+
this.tabulator.redraw(!0);
|
|
6988
|
+
} catch {}
|
|
6989
|
+
}
|
|
6990
|
+
}
|
|
6991
|
+
});
|
|
6992
|
+
});
|
|
6993
|
+
t.observe(e), this.visibilityObserver = ae(t);
|
|
6994
|
+
},
|
|
6995
|
+
clearHighlights(e) {
|
|
6996
|
+
e.querySelectorAll(".highlighted-cell").forEach((e) => {
|
|
6997
|
+
e.classList.remove("highlighted-cell");
|
|
6998
|
+
});
|
|
6999
|
+
},
|
|
7000
|
+
async copyToClipboard() {
|
|
7001
|
+
if (this.tabulator && this.tableData && this.tableData.length !== 0) try {
|
|
7002
|
+
let e = this.tabulator.getData(), t = this.tableColumns.map((e) => e.title).join(" "), n = e.map((e) => this.tableColumns.map((t) => {
|
|
7003
|
+
let n = e[t.field];
|
|
7004
|
+
return typeof n == "object" && n ? JSON.stringify(n) : String(n || "");
|
|
7005
|
+
}).join(" ")).join("\n"), r = t + "\n" + n;
|
|
7006
|
+
await navigator.clipboard.writeText(r), this.showNotification("Table data copied to clipboard!", "success");
|
|
7007
|
+
} catch (e) {
|
|
7008
|
+
console.error("Failed to copy to clipboard:", e), this.showNotification("Failed to copy data to clipboard", "error");
|
|
7009
|
+
}
|
|
7010
|
+
},
|
|
7011
|
+
downloadData() {
|
|
7012
|
+
if (this.tabulator && this.tableData && this.tableData.length !== 0) try {
|
|
7013
|
+
let e = `table-data-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/:/g, "-")}.csv`;
|
|
7014
|
+
this.tabulator.download("csv", e, {
|
|
7015
|
+
delimiter: ",",
|
|
7016
|
+
bom: !0
|
|
7017
|
+
}), this.showNotification("Download started!", "success");
|
|
7018
|
+
} catch (e) {
|
|
7019
|
+
console.error("Failed to download data:", e), this.showNotification("Failed to download data", "error");
|
|
7020
|
+
}
|
|
7021
|
+
},
|
|
7022
|
+
showNotification(e, t) {
|
|
7023
|
+
let n = document.createElement("div");
|
|
7024
|
+
n.textContent = e, n.style.cssText = `
|
|
7025
|
+
position: fixed;
|
|
7026
|
+
top: 20px;
|
|
7027
|
+
right: 20px;
|
|
7028
|
+
padding: 6px 10px;
|
|
7029
|
+
border-radius: 0px;
|
|
7030
|
+
color: white;
|
|
7031
|
+
font-weight: 250;
|
|
7032
|
+
z-index: 10000;
|
|
7033
|
+
background-color: ${t === "success" ? "#4caf50" : "#f44336"};
|
|
7034
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
|
7035
|
+
transition: opacity 0.3s ease;
|
|
7036
|
+
`, document.body.appendChild(n), setTimeout(() => {
|
|
7037
|
+
n.style.opacity = "0", setTimeout(() => {
|
|
7038
|
+
document.body.removeChild(n);
|
|
7039
|
+
}, 300);
|
|
7040
|
+
}, 3e3);
|
|
7041
|
+
},
|
|
7042
|
+
create() {
|
|
7043
|
+
let e = this.$refs.tabulator;
|
|
7044
|
+
if (!e) return;
|
|
7045
|
+
let t = this.fitParent ? "fitDataFill" : "fitData", n = 25;
|
|
7046
|
+
for (let e of this.headers.values()) if (e.type === r.ARRAY || e.type === r.STRUCT) {
|
|
7047
|
+
n = void 0;
|
|
7048
|
+
break;
|
|
7049
|
+
}
|
|
7050
|
+
let a = new X(e, {
|
|
7051
|
+
pagination: this.tableData.length > 1e3,
|
|
7052
|
+
renderHorizontal: "virtual",
|
|
7053
|
+
maxHeight: "100%",
|
|
7054
|
+
minHeight: "100%",
|
|
7055
|
+
minWidth: "100%",
|
|
7056
|
+
rowHeight: n,
|
|
7057
|
+
data: this.tableData,
|
|
7058
|
+
columns: this.tableColumns,
|
|
7059
|
+
nestedFieldSeparator: !1,
|
|
7060
|
+
clipboard: "copy",
|
|
7061
|
+
keybindings: { copyToClipboard: !0 },
|
|
7062
|
+
downloadConfig: { columnHeaders: !0 },
|
|
7063
|
+
resizableColumns: !0,
|
|
7064
|
+
layout: t,
|
|
7065
|
+
dependencies: { DateTime: i }
|
|
7066
|
+
});
|
|
7067
|
+
a.on("cellClick", (t, n) => {
|
|
7068
|
+
let r = n.getField(), i = this.headers.get(r);
|
|
7069
|
+
if (!i) return;
|
|
7070
|
+
let o = i.address;
|
|
7071
|
+
if (!o) return;
|
|
7072
|
+
let s = n.getValue();
|
|
7073
|
+
if (t.ctrlKey) {
|
|
7074
|
+
this.$emit("drilldown-click", { filters: { [o]: s } });
|
|
7075
|
+
return;
|
|
7076
|
+
}
|
|
7077
|
+
n.getElement().classList.contains("highlighted-cell") ? (this.clearHighlights(e), this.$emit("background-click", { filters: { [o]: s } })) : (this.clearHighlights(e), this.$emit("cell-click", {
|
|
7078
|
+
filters: { [o]: s },
|
|
7079
|
+
append: !0
|
|
7080
|
+
}), a.getColumn(n.getField()).getCells().forEach((e) => {
|
|
7081
|
+
e.getValue() === s && e.getElement().classList.add("highlighted-cell");
|
|
7082
|
+
}));
|
|
7083
|
+
}), this.tabulator = pe(a);
|
|
7084
|
+
let o = this.$refs.root;
|
|
7085
|
+
this.lastDrawnSize = o ? {
|
|
7086
|
+
width: o.offsetWidth,
|
|
7087
|
+
height: o.offsetHeight
|
|
7088
|
+
} : null, this.updateTableTheme();
|
|
7089
|
+
},
|
|
7090
|
+
updateTable() {
|
|
7091
|
+
if (this.tabulator &&= (this.tabulator.destroy(), null), !this.isVisible()) {
|
|
7092
|
+
this.pendingRebuild = !0;
|
|
7093
|
+
return;
|
|
7094
|
+
}
|
|
7095
|
+
this.create();
|
|
7096
|
+
},
|
|
7097
|
+
updateTableTheme() {
|
|
7098
|
+
if (!this.tabulator) return;
|
|
7099
|
+
let e = this.tabulator;
|
|
7100
|
+
this.currentTheme === "dark" ? (e.element.classList.remove("light-theme-table"), e.element.classList.add("dark-theme-table")) : (e.element.classList.remove("dark-theme-table"), e.element.classList.add("light-theme-table"));
|
|
7101
|
+
}
|
|
7102
|
+
}
|
|
7103
|
+
}, Qn = /* @__PURE__ */ e({ default: () => $ }), $n = ["disabled"], er = ["disabled"], tr = { ref: "tabulator" };
|
|
7104
|
+
function nr(e, t, n, r, i, a) {
|
|
7105
|
+
return A(), T("div", {
|
|
7106
|
+
ref: "root",
|
|
7107
|
+
class: k(["result-table row pa-0 ba-0", { "result-table-flush": n.flushChrome }]),
|
|
7108
|
+
onMouseenter: t[2] ||= (e) => i.controlsVisible = !0,
|
|
7109
|
+
onMouseleave: t[3] ||= (e) => i.controlsVisible = !1
|
|
7110
|
+
}, [E("div", { class: k(["table-container", { "table-container-flush": n.flushChrome }]) }, [n.showControls ? (A(), T("div", {
|
|
7111
|
+
key: 0,
|
|
7112
|
+
class: k(["controls-toggle", { "controls-visible": i.controlsVisible }])
|
|
7113
|
+
}, [E("button", {
|
|
7114
|
+
class: "control-btn",
|
|
7115
|
+
onClick: t[0] ||= (...e) => a.copyToClipboard && a.copyToClipboard(...e),
|
|
7116
|
+
disabled: !a.tableData || a.tableData.length === 0,
|
|
7117
|
+
title: "Copy table data to clipboard"
|
|
7118
|
+
}, [...t[4] ||= [E("i", { class: "mdi mdi-content-copy icon" }, null, -1)]], 8, $n), E("button", {
|
|
7119
|
+
class: "control-btn",
|
|
7120
|
+
onClick: t[1] ||= (...e) => a.downloadData && a.downloadData(...e),
|
|
7121
|
+
disabled: !a.tableData || a.tableData.length === 0,
|
|
7122
|
+
title: "Download table data as CSV"
|
|
7123
|
+
}, [...t[5] ||= [E("i", { class: "mdi mdi-download-outline icon" }, null, -1)]], 8, er)], 2)) : w("", !0), E("div", tr, null, 512)], 2)], 34);
|
|
7124
|
+
}
|
|
7125
|
+
var $ = /*#__PURE__*/ t(Zn, [["render", nr], ["__scopeId", "data-v-c3af1600"]]), rr = {
|
|
7126
|
+
name: "DashboardCreatorInline",
|
|
7127
|
+
props: {
|
|
7128
|
+
visible: {
|
|
7129
|
+
type: Boolean,
|
|
7130
|
+
default: !1
|
|
7131
|
+
},
|
|
7132
|
+
testTag: {
|
|
7133
|
+
type: String,
|
|
7134
|
+
default: ""
|
|
7135
|
+
}
|
|
7136
|
+
},
|
|
7137
|
+
setup(e, { emit: t }) {
|
|
7138
|
+
let n = O("dashboardStore"), r = O("connectionStore"), i = O("llmConnectionStore"), a = O("editorStore"), o = O("saveDashboards"), s = O("setActiveDashboard");
|
|
7139
|
+
if (!n || !r || !i || !a || !o) throw Error("Dashboard or connection store is not provided!");
|
|
7140
|
+
let c = j(""), l = j(""), u = j(""), f = j(""), p = C(() => i.hasActiveDefaultConnection), m = C(() => l.value ? p.value && u.value.trim() ? !0 : !!c.value.trim() : !1), h = C(() => p.value && u.value.trim() ? "Leave blank to let the assistant choose" : "My Dashboard"), g = C(() => Object.values(r.connections).filter((e) => e.model && !e.deleted).sort((e, t) => e.name.localeCompare(t.name))), _ = C(() => {
|
|
7141
|
+
let e = l.value ? r.connections[l.value] : void 0;
|
|
7142
|
+
return e ? Object.values(a.editors).filter((t) => d(t.type) && t.connectionId === e.id).map((e) => ({
|
|
7143
|
+
id: e.id,
|
|
7144
|
+
name: e.name,
|
|
7145
|
+
alias: ""
|
|
7146
|
+
})) : [];
|
|
7147
|
+
});
|
|
7148
|
+
return C(() => (_.value.length > 0 && !f.value ? f.value = _.value[0].id : _.value.length === 0 && (f.value = ""), _.value)), g.value.length > 0 && !l.value && (l.value = g.value[0].id), {
|
|
7149
|
+
dashboardName: c,
|
|
7150
|
+
selectedConnection: l,
|
|
7151
|
+
dashboardPrompt: u,
|
|
7152
|
+
showPromptField: p,
|
|
7153
|
+
canSubmit: m,
|
|
7154
|
+
namePlaceholder: h,
|
|
7155
|
+
connections: g,
|
|
7156
|
+
availableImports: _,
|
|
7157
|
+
selectedImport: f,
|
|
7158
|
+
createDashboard: async () => {
|
|
7159
|
+
if (m.value) try {
|
|
7160
|
+
let e = c.value.trim();
|
|
7161
|
+
e ||= `Dashboard ${(/* @__PURE__ */ new Date()).toLocaleTimeString([], {
|
|
7162
|
+
hour: "2-digit",
|
|
7163
|
+
minute: "2-digit"
|
|
7164
|
+
})}`;
|
|
7165
|
+
let r = n.newDashboard(e, l.value);
|
|
7166
|
+
if (f.value) {
|
|
7167
|
+
let e = _.value.find((e) => e.id === f.value);
|
|
7168
|
+
e && n.updateDashboardImports(r.id, [e]);
|
|
7169
|
+
}
|
|
7170
|
+
let i = p.value ? u.value.trim() : "";
|
|
7171
|
+
i && n.setPendingChatPrompt(r.id, i), c.value = "", f.value = "", u.value = "", o(), t("close"), s ? s(r.id) : n.setActiveDashboard(r.id), console.log("New dashboard created:", r.id), t("dashboard-created", r.id);
|
|
7172
|
+
} catch (e) {
|
|
7173
|
+
console.error("Failed to create dashboard:", e), alert(`Error creating dashboard: ${e instanceof Error ? e.message : String(e)}`);
|
|
7174
|
+
}
|
|
7175
|
+
},
|
|
7176
|
+
cancel: () => {
|
|
7177
|
+
c.value = "", u.value = "", f.value = "", t("close");
|
|
7178
|
+
}
|
|
7179
|
+
};
|
|
7180
|
+
}
|
|
7181
|
+
}, ir = {
|
|
7182
|
+
key: 0,
|
|
7183
|
+
class: "dashboard-creator creator-container"
|
|
7184
|
+
}, ar = {
|
|
7185
|
+
key: 0,
|
|
7186
|
+
class: "form-group"
|
|
7187
|
+
}, or = ["data-testid"], sr = {
|
|
7188
|
+
key: 1,
|
|
7189
|
+
class: "form-divider"
|
|
7190
|
+
}, cr = { class: "form-group" }, lr = { for: "dashboard-name" }, ur = {
|
|
7191
|
+
key: 0,
|
|
7192
|
+
class: "optional-label"
|
|
7193
|
+
}, dr = ["placeholder", "data-testid"], fr = { class: "form-group" }, pr = ["data-testid"], mr = ["value"], hr = {
|
|
7194
|
+
key: 2,
|
|
7195
|
+
class: "form-group"
|
|
7196
|
+
}, gr = ["data-testid"], _r = ["value"], vr = { class: "form-actions button-row" }, yr = ["disabled", "data-testid"], br = ["data-testid"];
|
|
7197
|
+
function xr(e, t, n, r, i, a) {
|
|
7198
|
+
return n.visible ? (A(), T("div", ir, [
|
|
7199
|
+
t[13] ||= E("h4", null, "Create New Dashboard", -1),
|
|
7200
|
+
r.showPromptField ? (A(), T("div", ar, [t[8] ||= E("label", { for: "dashboard-prompt" }, "Describe your dashboard", -1), F(E("textarea", {
|
|
7201
|
+
id: "dashboard-prompt",
|
|
7202
|
+
"onUpdate:modelValue": t[0] ||= (e) => r.dashboardPrompt = e,
|
|
7203
|
+
placeholder: "Describe what you want to analyze. The assistant will build it (and pick a title if you skip the next field)...",
|
|
7204
|
+
rows: "3",
|
|
7205
|
+
onKeyup: t[1] ||= ye(I((...e) => r.createDashboard && r.createDashboard(...e), ["ctrl"]), ["enter"]),
|
|
7206
|
+
"data-testid": n.testTag ? `dashboard-creator-prompt-${n.testTag}` : "dashboard-creator-prompt"
|
|
7207
|
+
}, null, 40, or), [[_e, r.dashboardPrompt]])])) : w("", !0),
|
|
7208
|
+
r.showPromptField ? (A(), T("div", sr, [...t[9] ||= [E("span", null, "or set manually", -1)]])) : w("", !0),
|
|
7209
|
+
E("div", cr, [E("label", lr, [t[10] ||= re(" Name ", -1), r.showPromptField && r.dashboardPrompt.trim() ? (A(), T("span", ur, "(optional)")) : w("", !0)]), F(E("input", {
|
|
7210
|
+
id: "dashboard-name",
|
|
7211
|
+
"onUpdate:modelValue": t[2] ||= (e) => r.dashboardName = e,
|
|
7212
|
+
type: "text",
|
|
7213
|
+
placeholder: r.namePlaceholder,
|
|
7214
|
+
onKeyup: t[3] ||= ye((...e) => r.createDashboard && r.createDashboard(...e), ["enter"]),
|
|
7215
|
+
"data-testid": n.testTag ? `dashboard-creator-name-${n.testTag}` : "dashboard-creator-name"
|
|
7216
|
+
}, null, 40, dr), [[_e, r.dashboardName]])]),
|
|
7217
|
+
E("div", fr, [t[11] ||= E("label", { for: "dashboard-connection" }, "Connection", -1), F(E("select", {
|
|
7218
|
+
id: "dashboard-connection",
|
|
7219
|
+
"onUpdate:modelValue": t[4] ||= (e) => r.selectedConnection = e,
|
|
7220
|
+
"data-testid": n.testTag ? `dashboard-creator-connection-${n.testTag}` : "dashboard-creator-connection"
|
|
7221
|
+
}, [(A(!0), T(S, null, de(r.connections, (e) => (A(), T("option", {
|
|
7222
|
+
key: e.id,
|
|
7223
|
+
value: e.id
|
|
7224
|
+
}, N(e.name), 9, mr))), 128))], 8, pr), [[ge, r.selectedConnection]])]),
|
|
7225
|
+
r.selectedConnection && r.availableImports.length > 0 ? (A(), T("div", hr, [t[12] ||= E("label", { for: "dashboard-import" }, "Import", -1), F(E("select", {
|
|
7226
|
+
id: "dashboard-import",
|
|
7227
|
+
"onUpdate:modelValue": t[5] ||= (e) => r.selectedImport = e,
|
|
7228
|
+
"data-testid": n.testTag ? `dashboard-creator-import-${n.testTag}` : "dashboard-creator-import"
|
|
7229
|
+
}, [(A(!0), T(S, null, de(r.availableImports, (e) => (A(), T("option", {
|
|
7230
|
+
key: e.name,
|
|
7231
|
+
value: e.id
|
|
7232
|
+
}, N(e.name), 9, _r))), 128))], 8, gr), [[ge, r.selectedImport]])])) : w("", !0),
|
|
7233
|
+
E("div", vr, [E("button", {
|
|
7234
|
+
onClick: t[6] ||= (...e) => r.createDashboard && r.createDashboard(...e),
|
|
7235
|
+
disabled: !r.canSubmit,
|
|
7236
|
+
"data-testid": n.testTag ? `dashboard-creator-submit-${n.testTag}` : "dashboard-creator-submit",
|
|
7237
|
+
class: "create-btn"
|
|
7238
|
+
}, " Create ", 8, yr), E("button", {
|
|
7239
|
+
onClick: t[7] ||= (...e) => r.cancel && r.cancel(...e),
|
|
7240
|
+
"data-testid": n.testTag ? `dashboard-creator-cancel-${n.testTag}` : "dashboard-creator-cancel",
|
|
7241
|
+
class: "cancel-btn"
|
|
7242
|
+
}, " Cancel ", 8, br)])
|
|
7243
|
+
])) : w("", !0);
|
|
7244
|
+
}
|
|
7245
|
+
var Sr = /*#__PURE__*/ t(rr, [["render", xr], ["__scopeId", "data-v-410e08e1"]]), Cr = "trilogy-global-chat-width", wr = "trilogy-global-chat-open-pref", Tr = "open";
|
|
7246
|
+
function Er(e) {
|
|
7247
|
+
return Math.min(640, Math.max(320, Math.round(e)));
|
|
7248
|
+
}
|
|
7249
|
+
function Dr() {
|
|
7250
|
+
try {
|
|
7251
|
+
let e = localStorage.getItem(wr);
|
|
7252
|
+
if (e === "open" || e === "closed") return e;
|
|
7253
|
+
} catch {}
|
|
7254
|
+
return null;
|
|
7255
|
+
}
|
|
7256
|
+
function Or(e) {
|
|
7257
|
+
try {
|
|
7258
|
+
localStorage.setItem(wr, e);
|
|
7259
|
+
} catch {}
|
|
7260
|
+
}
|
|
7261
|
+
function kr() {
|
|
7262
|
+
try {
|
|
7263
|
+
let e = localStorage.getItem(Cr);
|
|
7264
|
+
if (e) {
|
|
7265
|
+
let t = Number(e);
|
|
7266
|
+
if (Number.isFinite(t)) return Er(t);
|
|
7267
|
+
}
|
|
7268
|
+
} catch {}
|
|
7269
|
+
return 380;
|
|
7270
|
+
}
|
|
7271
|
+
var Ar = () => {
|
|
7272
|
+
let e = j(!1), t = j(kr()), n = j(""), r = j("conversation"), i = null, a = () => {
|
|
7273
|
+
e.value ? s(l.CHAT_PANEL, n.value || Tr) : c(l.CHAT_PANEL);
|
|
7274
|
+
}, d = (t) => {
|
|
7275
|
+
t && (n.value = t, r.value = "conversation"), e.value = !0, Or("open"), a();
|
|
7276
|
+
}, f = () => {
|
|
7277
|
+
e.value = !1, Or("closed"), a();
|
|
7278
|
+
}, p = () => {
|
|
7279
|
+
e.value ? f() : d();
|
|
7280
|
+
};
|
|
7281
|
+
return {
|
|
7282
|
+
isOpen: e,
|
|
7283
|
+
panelWidth: t,
|
|
7284
|
+
activePanelChatId: n,
|
|
7285
|
+
view: r,
|
|
7286
|
+
openPanel: d,
|
|
7287
|
+
closePanel: f,
|
|
7288
|
+
togglePanel: p,
|
|
7289
|
+
setActivePanelChat: (e) => {
|
|
7290
|
+
n.value = e, r.value = "conversation", a();
|
|
7291
|
+
},
|
|
7292
|
+
setView: (e) => {
|
|
7293
|
+
r.value = e;
|
|
7294
|
+
},
|
|
7295
|
+
setPanelWidth: (e) => {
|
|
7296
|
+
t.value = Er(e);
|
|
7297
|
+
try {
|
|
7298
|
+
localStorage.setItem(Cr, String(t.value));
|
|
7299
|
+
} catch {}
|
|
7300
|
+
},
|
|
7301
|
+
addKeyListener: (t) => {
|
|
7302
|
+
i || (i = (n) => {
|
|
7303
|
+
if ((n.ctrlKey || n.metaKey) && n.shiftKey && n.code === "Period") {
|
|
7304
|
+
if (o().fullScreen.value || !e.value && t && !t()) return;
|
|
7305
|
+
n.preventDefault(), p();
|
|
7306
|
+
}
|
|
7307
|
+
}, window.addEventListener("keydown", i));
|
|
7308
|
+
},
|
|
7309
|
+
removeKeyListener: () => {
|
|
7310
|
+
i &&= (window.removeEventListener("keydown", i), null);
|
|
7311
|
+
},
|
|
7312
|
+
onInitialLoad: () => {
|
|
7313
|
+
let t = u(l.CHAT_PANEL, "");
|
|
7314
|
+
t && (e.value = !0, t !== Tr && (n.value = t));
|
|
7315
|
+
},
|
|
7316
|
+
applyDefaultOpenState: (t) => {
|
|
7317
|
+
e.value || t && Dr() !== "closed" && d();
|
|
7318
|
+
}
|
|
7319
|
+
};
|
|
7320
|
+
}, jr = null;
|
|
7321
|
+
function Mr() {
|
|
7322
|
+
return jr ||= Ar(), jr;
|
|
7323
|
+
}
|
|
7324
|
+
//#endregion
|
|
7325
|
+
export { X as a, Ve as c, Ae as d, Oe as f, Qn as i, Be as l, Sr as n, Qe as o, Te as p, $ as r, qe as s, Mr as t, ze as u };
|