n8n-editor-ui 1.109.0 → 1.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddDataStoreModal-DQSrUeGv.js → AddDataStoreModal-B9V0kmK3.js} +2 -2
- package/dist/assets/{AnimatedSpinner-DG0OJkY1.js → AnimatedSpinner-DsluWUrA.js} +1 -1
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-DL7yrAdr.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-CRU6PTDq.js} +1 -1
- package/dist/assets/{AuthView-BjsoW1-5.js → AuthView-D6CVGqjD.js} +2 -2
- package/dist/assets/{ChangePasswordView-wL-Pegb8.js → ChangePasswordView-YYerxuPJ.js} +3 -3
- package/dist/assets/CollectionParameter--M3ItR7D.js +4 -0
- package/dist/assets/{ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-Y9jgPwUm.js → ConsumedTokensDetails.vue_vue_type_script_setup_true_lang-upvzJHw_.js} +1 -1
- package/dist/assets/{CredentialsView-Cp-dKa-6.js → CredentialsView-DOTUEbkP.js} +9 -8
- package/dist/assets/{DataStoreActions.vue_vue_type_script_setup_true_lang-jUSBJd47.js → DataStoreActions.vue_vue_type_script_setup_true_lang-BsbILsds.js} +2 -2
- package/dist/assets/{DataStoreDetailsView-D9YNa5HC.js → DataStoreDetailsView-B_TSNGAN.js} +1574 -227
- package/dist/assets/{DataStoreDetailsView-BxDmY87S.css → DataStoreDetailsView-DSpK3R_L.css} +294 -71
- package/dist/assets/{DataStoreView-Bs-qcZ8z.js → DataStoreView-BvrQf26p.js} +26 -39
- package/dist/assets/{DataStoreView-bZrewhaR.css → DataStoreView-D0R0E_jH.css} +9 -10
- package/dist/assets/{DemoFooter-DPTKA9IL.js → DemoFooter-Bw8iTzqE.js} +6 -6
- package/dist/assets/{EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-DiIUOGo1.js → EmptySharedSectionActionBox.vue_vue_type_script_setup_true_lang-GKs7cbkR.js} +1 -1
- package/dist/assets/{EntityNotFound-7GWizCKV.js → EntityNotFound-CXLwU46X.js} +1 -1
- package/dist/assets/{EntityUnAuthorised-BGNR4Y6R.js → EntityUnAuthorised-D_OocRok.js} +1 -1
- package/dist/assets/{ErrorView-Dbc4jM8G.js → ErrorView-Ddve61SR.js} +1 -1
- package/dist/assets/{EvaluationsRootView-bKi3SFkK.js → EvaluationsRootView-CwnpaTOj.js} +1 -1
- package/dist/assets/{EvaluationsView-URJMmngS.js → EvaluationsView-qyuUuYXa.js} +3 -3
- package/dist/assets/{ExecutionsTime.vue_vue_type_script_setup_true_lang-C8GA5YsR.js → ExecutionsTime.vue_vue_type_script_setup_true_lang-BUewTSGd.js} +2 -2
- package/dist/assets/{ExecutionsView-C32NF_Mi.js → ExecutionsView-DJrYHBv3.js} +19 -37
- package/dist/assets/{ExecutionsView-BHBePl1_.css → ExecutionsView-DpVZbkhT.css} +5 -22
- package/dist/assets/{FixedCollectionParameter-C32o7Xw1.js → FixedCollectionParameter-DwEogsZk.js} +1 -1
- package/dist/assets/{ForgotMyPasswordView-BIGcjM0k.js → ForgotMyPasswordView-DI84hvl-.js} +3 -3
- package/dist/assets/{InfoAccordion-DVdDpADr.js → InfoAccordion-BE3HeAda.js} +1 -1
- package/dist/assets/{InsightsChartAverageRuntime-CjOAk50Z.js → InsightsChartAverageRuntime-BtvhyT4O.js} +4 -4
- package/dist/assets/{InsightsChartFailed-DCQYezXm.js → InsightsChartFailed-dkCtU8dv.js} +4 -4
- package/dist/assets/{InsightsChartFailureRate-L674yUIQ.js → InsightsChartFailureRate-WuP5IVli.js} +4 -4
- package/dist/assets/{InsightsChartTimeSaved-B6a4bv2j.js → InsightsChartTimeSaved-fJ4sJVOO.js} +4 -4
- package/dist/assets/{InsightsChartTotal-BGmz_E44.js → InsightsChartTotal-iySL1IzO.js} +4 -4
- package/dist/assets/{InsightsDashboard-CbtPLqME.js → InsightsDashboard-CWQypWnL.js} +10 -10
- package/dist/assets/{InsightsPaywall-iTfZzLCq.js → InsightsPaywall-xxlsNh03.js} +1 -1
- package/dist/assets/{InsightsSummary-D0XZxoWu.js → InsightsSummary-B9ja1nMH.js} +1 -1
- package/dist/assets/{InsightsTableWorkflows-DYL5sIeL.js → InsightsTableWorkflows-C6FAPyPO.js} +4 -4
- package/dist/assets/{Logo-BF6xE_TK.js → Logo-D7CE2pbe.js} +1 -1
- package/dist/assets/{LogsPanel-DhSbCRI8.js → LogsPanel-BiYKXufL.js} +32 -20
- package/dist/assets/{MainHeader-C992btCf.js → MainHeader-CglQ1iop.js} +19 -14
- package/dist/assets/{MainHeader-BofAi8wS.css → MainHeader-pDg5KXTB.css} +16 -16
- package/dist/assets/{MainSidebar-CfBkhJuz.js → MainSidebar-CwXyHnb4.js} +25 -14
- package/dist/assets/{MainSidebar-D74VZmM5.css → MainSidebar-a73tcV9E.css} +2 -2
- package/dist/assets/{NodeCreation-CxN6JIS_.css → NodeCreation-C4gQlPqI.css} +6 -3
- package/dist/assets/{NodeCreation-C4-JrWkw.js → NodeCreation-o_K0NT5J.js} +21 -12
- package/dist/assets/NodeCreator-COTYfPaK.css +1637 -0
- package/dist/assets/{NodeCreator-BHFu5J3H.js → NodeCreator-b-LnZdSN.js} +28 -1227
- package/dist/assets/{NodeDetailsView-DucQbxES.js → NodeDetailsView-DUVQMLye.js} +18 -16
- package/dist/assets/{NodeDetailsViewV2-By7jano3.js → NodeDetailsViewV2-BQ8TJyUD.js} +19 -16
- package/dist/assets/{NodeView-CiaJbQtZ.css → NodeView-BRa11kAq.css} +177 -50
- package/dist/assets/{NodeView-Bi4OfDJp.js → NodeView-DbmrvKR2.js} +270 -147
- package/dist/assets/PageViewLayout-CJlzbuVj.css +141 -0
- package/dist/assets/PageViewLayout-DZqdTTmk.js +27 -0
- package/dist/assets/PrebuiltAgentTemplatesView-COxu7Iih.css +166 -0
- package/dist/assets/PrebuiltAgentTemplatesView-WwV7YqEW.js +196 -0
- package/dist/assets/{ProjectBreadcrumb-l5PnV6Jp.js → ProjectBreadcrumb-BI6swolU.js} +1 -1
- package/dist/assets/{ProjectHeader-D1veUs2f.js → ProjectHeader-CnsOY_oX.js} +39 -5
- package/dist/assets/{ProjectSettings-CiMu32JB.js → ProjectSettings-EJHNdA8h.js} +10 -10
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-Cl5RoRJK.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-CLOnjTDY.js} +1 -1
- package/dist/assets/{ResourcesListLayout-C1JgyGhX.css → ResourcesListLayout-B5eMf4SI.css} +27 -164
- package/dist/assets/{ResourcesListLayout-V2ovJZd-.js → ResourcesListLayout-DhiDqjXw.js} +25 -45
- package/dist/assets/{RunDataJson--o61ywP4.js → RunDataJson-B2NTI_mB.js} +5 -3
- package/dist/assets/{RunDataJsonActions-BuTnnCdp.js → RunDataJsonActions-DXk7AkuZ.js} +1 -1
- package/dist/assets/{RunDataParsedAiContent-Dv43fJJj.js → RunDataParsedAiContent-DO8FIZ0n.js} +2 -2
- package/dist/assets/{RunDataSearch-DhhRomuh.js → RunDataSearch-B3I1BHmn.js} +1 -1
- package/dist/assets/{RunDataTable-BRNjCbjf.js → RunDataTable-B1jJSa32.js} +34 -32
- package/dist/assets/{RunDataTable-n918b-Qv.css → RunDataTable-BZzteeuj.css} +54 -53
- package/dist/assets/{SamlOnboarding-ChVfS2ix.js → SamlOnboarding-DNKahChr.js} +3 -3
- package/dist/assets/SelectedItemsInfo-CfUb0ZrI.css +139 -0
- package/dist/assets/SelectedItemsInfo-Dc4Okb_S.js +60 -0
- package/dist/assets/{SettingsApiView-EJcHWxis.js → SettingsApiView-B1JK9R6f.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-BCGKGJGl.js → SettingsCommunityNodesView-PgfaI_WI.js} +4 -4
- package/dist/assets/{SettingsExternalSecrets-DQ6GuwI_.js → SettingsExternalSecrets-BZ3lZITS.js} +1 -1
- package/dist/assets/{SettingsLdapView-YMEEL5g4.js → SettingsLdapView-MUSj3Las.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-CMRM9qEX.js → SettingsLogStreamingView-g4sm9ihp.js} +1 -1
- package/dist/assets/{SettingsPersonalView-CQ3j6jFh.js → SettingsPersonalView-DZscNVF5.js} +1 -1
- package/dist/assets/{SettingsSourceControl-W3xQHBQs.js → SettingsSourceControl-CaCqYmDO.js} +1 -1
- package/dist/assets/{SettingsSso-B-RJISS8.js → SettingsSso-BoLpDt6z.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-BI4z3ArV.js → SettingsUsageAndPlan-B1ibE1jm.js} +1 -1
- package/dist/assets/{SettingsUsersView-FdTxfP_9.js → SettingsUsersView-Be7pqBLD.js} +1 -1
- package/dist/assets/{SettingsView-enVRJi4X.js → SettingsView-DIw6ydDb.js} +1 -1
- package/dist/assets/{SetupView-DhQVRFto.js → SetupView-BCV1wNp0.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-o-0v9TC0.js → SetupWorkflowCredentialsButton-DxydQJ6C.js} +1 -1
- package/dist/assets/{SetupWorkflowFromTemplateView-t24Wf8j0.js → SetupWorkflowFromTemplateView-B0B3GOOf.js} +3 -3
- package/dist/assets/{SigninView-CqnnxcHH.js → SigninView-DOGcmqE3.js} +26 -9
- package/dist/assets/{SignoutView-BYkRErR0.js → SignoutView-B9IoLPOG.js} +1 -1
- package/dist/assets/{SignupView-CZ5xz8Ej.js → SignupView-DC6gW-aS.js} +3 -3
- package/dist/assets/{TableBase-DZ3KHAaq.js → TableBase-rH4yk1ew.js} +1 -1
- package/dist/assets/{Tag-BZXOdJeY.js → Tag-C0MYaZ1N.js} +1 -1
- package/dist/assets/{Tags-BGrNA-zc.js → Tags-DbHWxo-G.js} +2 -2
- package/dist/assets/{TemplateDetails-CGeXTU0J.js → TemplateDetails-Bizetmsp.js} +2 -2
- package/dist/assets/{TemplateList-BUJPQKR1.js → TemplateList-nvQBix9z.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-CDz25qgN.js → TemplatesCollectionView-B9sB1kty.js} +7 -7
- package/dist/assets/{TemplatesSearchView-l-Ueq6ha.js → TemplatesSearchView-AXAdkVMZ.js} +3 -3
- package/dist/assets/{TemplatesView-CbzVhmOD.js → TemplatesView-CumdCs93.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-D2fR5qLE.js → TemplatesWorkflowView-C-gTBSHB.js} +7 -7
- package/dist/assets/{TriggerPanel-BNb8Fkp3.js → TriggerPanel-BMnQXPE0.js} +7 -7
- package/dist/assets/{TriggerPanel-BFPMKijE.css → TriggerPanel-DiD8pi0I.css} +4 -4
- package/dist/assets/{VariablesView-ZO4oTir0.js → VariablesView-CSyZZSGu.js} +6 -5
- package/dist/assets/{WorkerView-DjYjCGEz.js → WorkerView-y1gN4jjY.js} +6 -6
- package/dist/assets/{WorkflowActivator-CFrLXTxM.js → WorkflowActivator-34Rs65ZA.js} +3 -3
- package/dist/assets/{WorkflowExecutionsInfoAccordion-C8Tc4Mno.js → WorkflowExecutionsInfoAccordion-Td0WBvMx.js} +2 -2
- package/dist/assets/{WorkflowExecutionsLandingPage-BiuuJ3ll.js → WorkflowExecutionsLandingPage-Bro6PvBk.js} +3 -3
- package/dist/assets/{WorkflowExecutionsPreview-CYoDxL8E.js → WorkflowExecutionsPreview-Px9mMJbR.js} +4 -4
- package/dist/assets/{WorkflowExecutionsView-C78loZuv.js → WorkflowExecutionsView-Bo7yagw5.js} +7 -7
- package/dist/assets/{WorkflowHistory-CqoFF8_8.js → WorkflowHistory-D5nOy2uN.js} +2 -2
- package/dist/assets/{WorkflowOnboardingView-dpvpoau1.js → WorkflowOnboardingView-CapOEI4L.js} +1 -1
- package/dist/assets/{WorkflowPreview-83_iB67I.js → WorkflowPreview-Dd49ncZV.js} +1 -1
- package/dist/assets/{WorkflowsView-Bhr5Vfcw.js → WorkflowsView-CnOu7hid.js} +113 -30
- package/dist/assets/{canvas-Kg89rGSt.js → canvas-JvPOqEjf.js} +1 -1
- package/dist/assets/{chartjs.utils-6nSeP00a.js → chartjs.utils-U9Db2woJ.js} +2 -2
- package/dist/assets/{core-BiQ8TPaF.js → core-BKMZD8Mn.js} +1 -1
- package/dist/assets/{dataStore.store-Bru4R38e.js → dataStore.store-CN-ElCfI.js} +49 -29
- package/dist/assets/{en-CZDXhi4W.js → en-DhcqXAmr.js} +25 -8
- package/dist/assets/{global-link-actions-BfwrTt1h.js → global-link-actions-DDCy0nlC.js} +1 -1
- package/dist/assets/{index-CZxO9Y7t.js → index-BrzJ49KI.js} +1 -1
- package/dist/assets/{index-Am8RmnT4.css → index-DXNU_2Fk.css} +3613 -1439
- package/dist/assets/{index-V25MIkzH.js → index-De29TdKc.js} +16550 -14429
- package/dist/assets/{pickBy-CInoejW7.js → pickBy-BmxGkcfr.js} +1 -1
- package/dist/assets/{readyToRunWorkflows.store-D8qADh9A.js → readyToRunWorkflows.store-BGvURDML.js} +1 -1
- package/dist/assets/{templateActions-CytValxU.js → templateActions-AROReKhy.js} +1 -1
- package/dist/assets/{useBeforeUnload-yQFY1z_s.js → useBeforeUnload-Bl2noypd.js} +1 -1
- package/dist/assets/{useExecutionDebugging-DiCw9NpL.js → useExecutionDebugging-BFA_6rY-.js} +12 -8
- package/dist/assets/{useImportCurlCommand-UhCp_Hxn.js → useImportCurlCommand-Dj7YTg7e.js} +1 -1
- package/dist/assets/{useProjectPages-DNuz01tw.js → useProjectPages-B_FiANIN.js} +1 -1
- package/dist/assets/{usePushConnection-BOddel3U.js → usePushConnection-BmGujaBx.js} +8 -3
- package/dist/assets/{useWorkflowActivate-DKZ9PzgK.js → useWorkflowActivate-BNP9vQIn.js} +1 -1
- package/dist/index.html +2 -2
- package/eslint.config.mjs +1 -0
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-CGRCLW5F.js +0 -4
- package/dist/assets/NodeCreator-vQ-Sfr_5.css +0 -3568
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { d as defineComponent, aG as useTemplateRef, b as useRouter, a as useToast, r as ref, x as computed, c as useI18n, a7 as watch, h as createElementBlock, g as openBlock, n as normalizeClass, i as createVNode, j as createBaseVNode, w as withCtx, t as toDisplayString, aH as InlineRename, l as unref, e as createBlock, f as createCommentVNode,
|
|
2
|
-
import { u as useDataStoreStore } from "./dataStore.store-
|
|
3
|
-
import { B as Breadcrumbs, _ as __unplugin_components_0 } from "./ProjectBreadcrumb-
|
|
4
|
-
import { _ as _sfc_main$
|
|
1
|
+
import { d as defineComponent, aG as useTemplateRef, b as useRouter, a as useToast, r as ref, x as computed, c as useI18n, a7 as watch, h as createElementBlock, g as openBlock, n as normalizeClass, i as createVNode, j as createBaseVNode, w as withCtx, t as toDisplayString, aH as InlineRename, l as unref, e as createBlock, f as createCommentVNode, gk as PROJECT_DATA_STORES, Y as nextTick, _ as _export_sfc, ef as mergeModels, c1 as toRefs, eg as useModel, o as onMounted, ez as getCurrentInstance, gI as markRaw, c7 as onUnmounted, gJ as mergeDefaults, eW as toRaw, gK as render, c0 as isRef, gL as isReactive, fW as isProxy, b2 as withDirectives, N as N8nIcon, b3 as vShow, aM as N8nActionDropdown, P as useDebounce, y as N8nPopoverReka, e5 as N8nInputLabel, cZ as N8nInput, b8 as withKeys, gM as MAX_COLUMN_NAME_LENGTH, p as N8nText, k as createTextVNode, a9 as Tooltip, e8 as N8nSelect, F as Fragment, A as renderList, e9 as _sfc_main$9, q as N8nButton, aa as _sfc_main$a, gN as COLUMN_NAME_REGEX, bd as DateTime, a8 as resolveComponent, ap as normalizeStyle, ca as useClipboard, bq as onClickOutside, gO as DATA_STORE_HEADER_HEIGHT, gP as DATA_STORE_ROW_HEIGHT, gQ as ADD_ROW_ROW_ID, gR as DEFAULT_ID_COLUMN_NAME, am as useMessage, an as MODAL_CONFIRM, gS as NULL_VALUE, gT as EMPTY_VALUE, eS as orderBy, gU as DATA_STORE_ID_COLUMN_WIDTH, ax as useDocumentTitle, gV as MIN_LOADING_TIME, dK as N8nLoading, dJ as _sfc_main$b, gW as DATA_STORE_VIEW } from "./index-De29TdKc.js";
|
|
2
|
+
import { u as useDataStoreStore, r as reorderItem } from "./dataStore.store-CN-ElCfI.js";
|
|
3
|
+
import { B as Breadcrumbs, _ as __unplugin_components_0 } from "./ProjectBreadcrumb-BI6swolU.js";
|
|
4
|
+
import { _ as _sfc_main$8 } from "./DataStoreActions.vue_vue_type_script_setup_true_lang-BsbILsds.js";
|
|
5
|
+
import { S as SelectedItemsInfo } from "./SelectedItemsInfo-Dc4Okb_S.js";
|
|
5
6
|
const BREADCRUMBS_SEPARATOR = "/";
|
|
6
|
-
const _sfc_main$
|
|
7
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
7
8
|
__name: "DataStoreBreadcrumbs",
|
|
8
9
|
props: {
|
|
9
10
|
dataStore: {}
|
|
@@ -80,6 +81,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
80
81
|
createVNode(_component_n8n_breadcrumbs, {
|
|
81
82
|
items: breadcrumbs.value,
|
|
82
83
|
separator: BREADCRUMBS_SEPARATOR,
|
|
84
|
+
"highlight-last-item": false,
|
|
83
85
|
onItemSelected: onItemClicked
|
|
84
86
|
}, {
|
|
85
87
|
prepend: withCtx(() => [
|
|
@@ -113,7 +115,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
113
115
|
createBaseVNode("div", {
|
|
114
116
|
class: normalizeClass(_ctx.$style["data-store-actions"])
|
|
115
117
|
}, [
|
|
116
|
-
createVNode(_sfc_main$
|
|
118
|
+
createVNode(_sfc_main$8, {
|
|
117
119
|
"data-store": props.dataStore,
|
|
118
120
|
location: "breadcrumbs",
|
|
119
121
|
onRename,
|
|
@@ -125,16 +127,16 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
125
127
|
}
|
|
126
128
|
});
|
|
127
129
|
const separator = "_separator_12h50_132";
|
|
128
|
-
const style0$
|
|
130
|
+
const style0$2 = {
|
|
129
131
|
"data-store-breadcrumbs": "_data-store-breadcrumbs_12h50_123",
|
|
130
132
|
"data-store-actions": "_data-store-actions_12h50_128",
|
|
131
133
|
separator,
|
|
132
134
|
"breadcrumb-current": "_breadcrumb-current_12h50_138"
|
|
133
135
|
};
|
|
134
|
-
const cssModules$
|
|
135
|
-
"$style": style0$
|
|
136
|
+
const cssModules$2 = {
|
|
137
|
+
"$style": style0$2
|
|
136
138
|
};
|
|
137
|
-
const DataStoreBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
139
|
+
const DataStoreBreadcrumbs = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$2]]);
|
|
138
140
|
var LocalEventService = class {
|
|
139
141
|
constructor() {
|
|
140
142
|
this.allSyncListeners = /* @__PURE__ */ new Map();
|
|
@@ -1466,6 +1468,9 @@ function _isColumnsSortingCoupledToGroup(gos) {
|
|
|
1466
1468
|
const autoGroupColumnDef = gos.get("autoGroupColumnDef");
|
|
1467
1469
|
return !autoGroupColumnDef?.comparator && !gos.get("treeData");
|
|
1468
1470
|
}
|
|
1471
|
+
function _getGrandTotalRow(gos) {
|
|
1472
|
+
return gos.get("grandTotalRow");
|
|
1473
|
+
}
|
|
1469
1474
|
function _isGroupUseEntireRow(gos, pivotMode) {
|
|
1470
1475
|
if (pivotMode) {
|
|
1471
1476
|
return false;
|
|
@@ -8496,6 +8501,18 @@ function _createGlobalRowEvent(rowNode, gos, type) {
|
|
|
8496
8501
|
rowPinned: rowNode.rowPinned
|
|
8497
8502
|
});
|
|
8498
8503
|
}
|
|
8504
|
+
var IGNORED_SIBLING_PROPERTIES = /* @__PURE__ */ new Set(["__localEventService", "__objectId", "sticky", "__autoHeights", "__checkAutoHeightsDebounced", "childStore"]);
|
|
8505
|
+
function _createRowNodeSibling(rowNode, beans) {
|
|
8506
|
+
const sibling = new RowNode(beans);
|
|
8507
|
+
Object.keys(rowNode).forEach((key) => {
|
|
8508
|
+
if (IGNORED_SIBLING_PROPERTIES.has(key)) {
|
|
8509
|
+
return;
|
|
8510
|
+
}
|
|
8511
|
+
sibling[key] = rowNode[key];
|
|
8512
|
+
});
|
|
8513
|
+
sibling.oldRowTop = null;
|
|
8514
|
+
return sibling;
|
|
8515
|
+
}
|
|
8499
8516
|
var FILTER_HANDLER_MAP = {
|
|
8500
8517
|
agSetColumnFilter: "agSetColumnFilterHandler",
|
|
8501
8518
|
agMultiColumnFilter: "agMultiColumnFilterHandler",
|
|
@@ -9346,6 +9363,49 @@ var ViewportSizeFeature = class extends BeanStub {
|
|
|
9346
9363
|
this.beans.colViewport.setScrollPosition(scrollWidth, scrollPosition);
|
|
9347
9364
|
}
|
|
9348
9365
|
};
|
|
9366
|
+
function processClassRules(expressionSvc, previousClassRules, classRules, params, onApplicableClass, onNotApplicableClass) {
|
|
9367
|
+
if (classRules == null && previousClassRules == null) {
|
|
9368
|
+
return;
|
|
9369
|
+
}
|
|
9370
|
+
const classesToApply = {};
|
|
9371
|
+
const classesToRemove = {};
|
|
9372
|
+
const forEachSingleClass = (className, callback) => {
|
|
9373
|
+
className.split(" ").forEach((singleClass) => {
|
|
9374
|
+
if (singleClass.trim() == "")
|
|
9375
|
+
return;
|
|
9376
|
+
callback(singleClass);
|
|
9377
|
+
});
|
|
9378
|
+
};
|
|
9379
|
+
if (classRules) {
|
|
9380
|
+
const classNames = Object.keys(classRules);
|
|
9381
|
+
for (let i = 0; i < classNames.length; i++) {
|
|
9382
|
+
const className = classNames[i];
|
|
9383
|
+
const rule = classRules[className];
|
|
9384
|
+
let resultOfRule;
|
|
9385
|
+
if (typeof rule === "string") {
|
|
9386
|
+
resultOfRule = expressionSvc ? expressionSvc.evaluate(rule, params) : true;
|
|
9387
|
+
} else if (typeof rule === "function") {
|
|
9388
|
+
resultOfRule = rule(params);
|
|
9389
|
+
}
|
|
9390
|
+
forEachSingleClass(className, (singleClass) => {
|
|
9391
|
+
resultOfRule ? classesToApply[singleClass] = true : classesToRemove[singleClass] = true;
|
|
9392
|
+
});
|
|
9393
|
+
}
|
|
9394
|
+
}
|
|
9395
|
+
if (previousClassRules && onNotApplicableClass) {
|
|
9396
|
+
Object.keys(previousClassRules).forEach(
|
|
9397
|
+
(className) => forEachSingleClass(className, (singleClass) => {
|
|
9398
|
+
if (!classesToApply[singleClass]) {
|
|
9399
|
+
classesToRemove[singleClass] = true;
|
|
9400
|
+
}
|
|
9401
|
+
})
|
|
9402
|
+
);
|
|
9403
|
+
}
|
|
9404
|
+
if (onNotApplicableClass) {
|
|
9405
|
+
Object.keys(classesToRemove).forEach(onNotApplicableClass);
|
|
9406
|
+
}
|
|
9407
|
+
Object.keys(classesToApply).forEach(onApplicableClass);
|
|
9408
|
+
}
|
|
9349
9409
|
function calculateRowLevel(rowNode) {
|
|
9350
9410
|
if (rowNode.group) {
|
|
9351
9411
|
return rowNode.level;
|
|
@@ -14531,6 +14591,710 @@ var CheckboxCellRenderer = class extends Component {
|
|
|
14531
14591
|
}
|
|
14532
14592
|
}
|
|
14533
14593
|
};
|
|
14594
|
+
var PinnedRows = class {
|
|
14595
|
+
constructor(beans, floating) {
|
|
14596
|
+
this.beans = beans;
|
|
14597
|
+
this.floating = floating;
|
|
14598
|
+
this.all = /* @__PURE__ */ new Set();
|
|
14599
|
+
this.visible = /* @__PURE__ */ new Set();
|
|
14600
|
+
this.order = [];
|
|
14601
|
+
this.queued = /* @__PURE__ */ new Set();
|
|
14602
|
+
}
|
|
14603
|
+
size() {
|
|
14604
|
+
return this.visible.size;
|
|
14605
|
+
}
|
|
14606
|
+
add(node) {
|
|
14607
|
+
const { all, visible, order } = this;
|
|
14608
|
+
if (all.has(node))
|
|
14609
|
+
return;
|
|
14610
|
+
all.add(node);
|
|
14611
|
+
visible.add(node);
|
|
14612
|
+
order.push(node);
|
|
14613
|
+
this.sort();
|
|
14614
|
+
}
|
|
14615
|
+
delete(item) {
|
|
14616
|
+
this.all.delete(item);
|
|
14617
|
+
this.visible.delete(item);
|
|
14618
|
+
this.queued.delete(item.id);
|
|
14619
|
+
_removeFromArray(this.order, item);
|
|
14620
|
+
}
|
|
14621
|
+
has(item) {
|
|
14622
|
+
return this.visible.has(item);
|
|
14623
|
+
}
|
|
14624
|
+
forEach(fn) {
|
|
14625
|
+
this.order.forEach(fn);
|
|
14626
|
+
}
|
|
14627
|
+
getByIndex(i) {
|
|
14628
|
+
return this.order[i];
|
|
14629
|
+
}
|
|
14630
|
+
getById(id) {
|
|
14631
|
+
for (const node of this.visible) {
|
|
14632
|
+
if (node.id == id)
|
|
14633
|
+
return node;
|
|
14634
|
+
}
|
|
14635
|
+
}
|
|
14636
|
+
clear() {
|
|
14637
|
+
const { all, visible, order, queued } = this;
|
|
14638
|
+
all.clear();
|
|
14639
|
+
queued.clear();
|
|
14640
|
+
visible.clear();
|
|
14641
|
+
order.length = 0;
|
|
14642
|
+
}
|
|
14643
|
+
sort() {
|
|
14644
|
+
const { sortSvc, rowNodeSorter, gos } = this.beans;
|
|
14645
|
+
const sortOptions = sortSvc?.getSortOptions() ?? [];
|
|
14646
|
+
const grandTotalNode = _removeGrandTotalRow(this.order);
|
|
14647
|
+
this.order.sort((a, b) => (a.pinnedSibling?.rowIndex ?? 0) - (b.pinnedSibling?.rowIndex ?? 0));
|
|
14648
|
+
this.order = rowNodeSorter?.doFullSort(this.order, sortOptions) ?? this.order;
|
|
14649
|
+
if (!grandTotalNode)
|
|
14650
|
+
return;
|
|
14651
|
+
const grandTotalRow = _getGrandTotalRow(gos);
|
|
14652
|
+
if (grandTotalRow === "bottom" || grandTotalRow === "pinnedBottom") {
|
|
14653
|
+
this.order.push(grandTotalNode);
|
|
14654
|
+
} else {
|
|
14655
|
+
this.order.unshift(grandTotalNode);
|
|
14656
|
+
}
|
|
14657
|
+
}
|
|
14658
|
+
hide(shouldHide) {
|
|
14659
|
+
const { all, visible } = this;
|
|
14660
|
+
all.forEach((node) => shouldHide(node) ? visible.delete(node) : visible.add(node));
|
|
14661
|
+
this.order = Array.from(visible);
|
|
14662
|
+
this.sort();
|
|
14663
|
+
}
|
|
14664
|
+
queue(id) {
|
|
14665
|
+
this.queued.add(id);
|
|
14666
|
+
}
|
|
14667
|
+
unqueue(id) {
|
|
14668
|
+
this.queued.delete(id);
|
|
14669
|
+
}
|
|
14670
|
+
forEachQueued(fn) {
|
|
14671
|
+
this.queued.forEach(fn);
|
|
14672
|
+
}
|
|
14673
|
+
};
|
|
14674
|
+
function _isDisplayedAfterFilterCSRM(node) {
|
|
14675
|
+
if (node.level === -1)
|
|
14676
|
+
return true;
|
|
14677
|
+
const parent = node.parent;
|
|
14678
|
+
if (parent?.childrenAfterSort?.some((child) => child == node)) {
|
|
14679
|
+
return _isDisplayedAfterFilterCSRM(parent);
|
|
14680
|
+
}
|
|
14681
|
+
return false;
|
|
14682
|
+
}
|
|
14683
|
+
function _shouldHidePinnedRows(beans, node) {
|
|
14684
|
+
const { gos, rowModel, filterManager } = beans;
|
|
14685
|
+
if (_isServerSideRowModel(gos)) {
|
|
14686
|
+
return !rowModel.getRowNode(node.id);
|
|
14687
|
+
}
|
|
14688
|
+
if (filterManager?.isAnyFilterPresent()) {
|
|
14689
|
+
return !_isDisplayedAfterFilterCSRM(node);
|
|
14690
|
+
}
|
|
14691
|
+
if (gos.get("pivotMode")) {
|
|
14692
|
+
return !node.group;
|
|
14693
|
+
}
|
|
14694
|
+
return false;
|
|
14695
|
+
}
|
|
14696
|
+
function _isNodeGrandTotal(node) {
|
|
14697
|
+
return !!node.footer && node.level === -1;
|
|
14698
|
+
}
|
|
14699
|
+
function _isPinnedNodeGrandTotal(node) {
|
|
14700
|
+
return !!node.pinnedSibling && _isNodeGrandTotal(node.pinnedSibling);
|
|
14701
|
+
}
|
|
14702
|
+
function _removeGrandTotalRow(order) {
|
|
14703
|
+
const index = order.findIndex(_isPinnedNodeGrandTotal);
|
|
14704
|
+
if (index > -1) {
|
|
14705
|
+
return order.splice(index, 1)?.[0];
|
|
14706
|
+
}
|
|
14707
|
+
}
|
|
14708
|
+
var ManualPinnedRowModel = class extends BeanStub {
|
|
14709
|
+
postConstruct() {
|
|
14710
|
+
const { gos, beans } = this;
|
|
14711
|
+
this.top = new PinnedRows(beans, "top");
|
|
14712
|
+
this.bottom = new PinnedRows(beans, "bottom");
|
|
14713
|
+
const shouldHide = (node) => _shouldHidePinnedRows(beans, node.pinnedSibling);
|
|
14714
|
+
const runIsRowPinned = () => {
|
|
14715
|
+
const isRowPinned = gos.get("isRowPinned");
|
|
14716
|
+
if (isRowPinned && gos.get("enableRowPinning")) {
|
|
14717
|
+
beans.rowModel.forEachNode((node) => this.pinRow(node, isRowPinned(node)), true);
|
|
14718
|
+
}
|
|
14719
|
+
this.refreshRowPositions();
|
|
14720
|
+
this.dispatchRowPinnedEvents();
|
|
14721
|
+
};
|
|
14722
|
+
this.addManagedEventListeners({
|
|
14723
|
+
gridStylesChanged: this.onGridStylesChanges.bind(this),
|
|
14724
|
+
modelUpdated: ({ keepRenderedRows }) => {
|
|
14725
|
+
this.tryToEmptyQueues();
|
|
14726
|
+
this.pinGrandTotalRow();
|
|
14727
|
+
this.forContainers((container) => container.hide(shouldHide));
|
|
14728
|
+
this.refreshRowPositions();
|
|
14729
|
+
if (!keepRenderedRows) {
|
|
14730
|
+
this.dispatchRowPinnedEvents();
|
|
14731
|
+
}
|
|
14732
|
+
},
|
|
14733
|
+
columnRowGroupChanged: () => {
|
|
14734
|
+
this.forContainers(removeGroupRows);
|
|
14735
|
+
this.refreshRowPositions();
|
|
14736
|
+
},
|
|
14737
|
+
rowNodeDataChanged: ({ node }) => {
|
|
14738
|
+
const isRowPinnable = gos.get("isRowPinnable");
|
|
14739
|
+
const pinnable = isRowPinnable?.(node) ?? true;
|
|
14740
|
+
if (!pinnable) {
|
|
14741
|
+
this.pinRow(node, null);
|
|
14742
|
+
}
|
|
14743
|
+
},
|
|
14744
|
+
firstDataRendered: runIsRowPinned
|
|
14745
|
+
});
|
|
14746
|
+
this.addManagedPropertyListener("pivotMode", () => {
|
|
14747
|
+
this.forContainers((container) => container.hide(shouldHide));
|
|
14748
|
+
this.dispatchRowPinnedEvents();
|
|
14749
|
+
});
|
|
14750
|
+
this.addManagedPropertyListener("grandTotalRow", ({ currentValue }) => {
|
|
14751
|
+
this._grandTotalPinned = currentValue === "pinnedBottom" ? "bottom" : currentValue === "pinnedTop" ? "top" : null;
|
|
14752
|
+
});
|
|
14753
|
+
this.addManagedPropertyListener("isRowPinned", runIsRowPinned);
|
|
14754
|
+
}
|
|
14755
|
+
destroy() {
|
|
14756
|
+
this.reset(false);
|
|
14757
|
+
super.destroy();
|
|
14758
|
+
}
|
|
14759
|
+
reset(dispatch = true) {
|
|
14760
|
+
this.forContainers((container) => {
|
|
14761
|
+
const nodesToUnpin = [];
|
|
14762
|
+
container.forEach((n) => nodesToUnpin.push(n));
|
|
14763
|
+
nodesToUnpin.forEach((n) => this.pinRow(n, null));
|
|
14764
|
+
container.clear();
|
|
14765
|
+
});
|
|
14766
|
+
if (dispatch) {
|
|
14767
|
+
this.dispatchRowPinnedEvents();
|
|
14768
|
+
}
|
|
14769
|
+
}
|
|
14770
|
+
pinRow(rowNode, float, column) {
|
|
14771
|
+
if (rowNode.footer && rowNode.level > -1)
|
|
14772
|
+
return;
|
|
14773
|
+
if (rowNode.footer && rowNode.level === -1) {
|
|
14774
|
+
this._grandTotalPinned = float;
|
|
14775
|
+
refreshCSRM(this.beans);
|
|
14776
|
+
return;
|
|
14777
|
+
}
|
|
14778
|
+
const currentFloat = rowNode.rowPinned ?? rowNode.pinnedSibling?.rowPinned;
|
|
14779
|
+
const switching = currentFloat != null && float != null && float != currentFloat;
|
|
14780
|
+
if (switching) {
|
|
14781
|
+
const pinned = rowNode.rowPinned ? rowNode : rowNode.pinnedSibling;
|
|
14782
|
+
const source = rowNode.rowPinned ? rowNode.pinnedSibling : rowNode;
|
|
14783
|
+
this.pinRow(pinned, null, column);
|
|
14784
|
+
this.pinRow(source, float, column);
|
|
14785
|
+
return;
|
|
14786
|
+
}
|
|
14787
|
+
const spannedRows = column && getSpannedRows(this.beans, rowNode, column);
|
|
14788
|
+
if (spannedRows) {
|
|
14789
|
+
spannedRows.forEach((node) => this.pinRow(node, float));
|
|
14790
|
+
return;
|
|
14791
|
+
}
|
|
14792
|
+
if (float == null) {
|
|
14793
|
+
const node = rowNode.rowPinned ? rowNode : rowNode.pinnedSibling;
|
|
14794
|
+
const found = this.findPinnedRowNode(node);
|
|
14795
|
+
if (!found)
|
|
14796
|
+
return;
|
|
14797
|
+
found.delete(node);
|
|
14798
|
+
const source = node.pinnedSibling;
|
|
14799
|
+
_destroyRowNodeSibling(node);
|
|
14800
|
+
this.refreshRowPositions(float);
|
|
14801
|
+
this.dispatchRowPinnedEvents(source);
|
|
14802
|
+
} else {
|
|
14803
|
+
const sibling = _createPinnedSibling(this.beans, rowNode, float);
|
|
14804
|
+
const container = this.getContainer(float);
|
|
14805
|
+
container.add(sibling);
|
|
14806
|
+
if (_shouldHidePinnedRows(this.beans, rowNode)) {
|
|
14807
|
+
container.hide((node) => _shouldHidePinnedRows(this.beans, node.pinnedSibling));
|
|
14808
|
+
}
|
|
14809
|
+
this.refreshRowPositions(float);
|
|
14810
|
+
this.dispatchRowPinnedEvents(rowNode);
|
|
14811
|
+
}
|
|
14812
|
+
}
|
|
14813
|
+
isManual() {
|
|
14814
|
+
return true;
|
|
14815
|
+
}
|
|
14816
|
+
isEmpty(floating) {
|
|
14817
|
+
return this.getContainer(floating).size() === 0;
|
|
14818
|
+
}
|
|
14819
|
+
isRowsToRender(floating) {
|
|
14820
|
+
return !this.isEmpty(floating);
|
|
14821
|
+
}
|
|
14822
|
+
ensureRowHeightsValid() {
|
|
14823
|
+
let anyChange = false;
|
|
14824
|
+
let rowTop = 0;
|
|
14825
|
+
const updateRowHeight = (rowNode) => {
|
|
14826
|
+
if (rowNode.rowHeightEstimated) {
|
|
14827
|
+
const rowHeight = _getRowHeightForNode(this.beans, rowNode);
|
|
14828
|
+
rowNode.setRowTop(rowTop);
|
|
14829
|
+
rowNode.setRowHeight(rowHeight.height);
|
|
14830
|
+
rowTop += rowHeight.height;
|
|
14831
|
+
anyChange = true;
|
|
14832
|
+
}
|
|
14833
|
+
};
|
|
14834
|
+
this.bottom.forEach(updateRowHeight);
|
|
14835
|
+
rowTop = 0;
|
|
14836
|
+
this.top.forEach(updateRowHeight);
|
|
14837
|
+
this.eventSvc.dispatchEvent({
|
|
14838
|
+
type: "pinnedHeightChanged"
|
|
14839
|
+
});
|
|
14840
|
+
return anyChange;
|
|
14841
|
+
}
|
|
14842
|
+
getPinnedTopTotalHeight() {
|
|
14843
|
+
return getTotalHeight(this.top);
|
|
14844
|
+
}
|
|
14845
|
+
getPinnedBottomTotalHeight() {
|
|
14846
|
+
return getTotalHeight(this.bottom);
|
|
14847
|
+
}
|
|
14848
|
+
getPinnedTopRowCount() {
|
|
14849
|
+
return this.top.size();
|
|
14850
|
+
}
|
|
14851
|
+
getPinnedBottomRowCount() {
|
|
14852
|
+
return this.bottom.size();
|
|
14853
|
+
}
|
|
14854
|
+
getPinnedTopRow(index) {
|
|
14855
|
+
return this.top.getByIndex(index);
|
|
14856
|
+
}
|
|
14857
|
+
getPinnedBottomRow(index) {
|
|
14858
|
+
return this.bottom.getByIndex(index);
|
|
14859
|
+
}
|
|
14860
|
+
getPinnedRowById(id, floating) {
|
|
14861
|
+
return this.getContainer(floating).getById(id);
|
|
14862
|
+
}
|
|
14863
|
+
forEachPinnedRow(floating, callback) {
|
|
14864
|
+
this.getContainer(floating).forEach(callback);
|
|
14865
|
+
}
|
|
14866
|
+
getPinnedState() {
|
|
14867
|
+
const buildState = (floating) => {
|
|
14868
|
+
const list = [];
|
|
14869
|
+
this.forEachPinnedRow(floating, (node) => list.push(node.pinnedSibling.id));
|
|
14870
|
+
return list;
|
|
14871
|
+
};
|
|
14872
|
+
return {
|
|
14873
|
+
top: buildState("top"),
|
|
14874
|
+
bottom: buildState("bottom")
|
|
14875
|
+
};
|
|
14876
|
+
}
|
|
14877
|
+
setPinnedState(state) {
|
|
14878
|
+
this.forContainers((pinned, floating) => {
|
|
14879
|
+
for (const id of state[floating]) {
|
|
14880
|
+
const node = this.beans.rowModel.getRowNode(id);
|
|
14881
|
+
if (node) {
|
|
14882
|
+
this.pinRow(node, floating);
|
|
14883
|
+
} else {
|
|
14884
|
+
pinned.queue(id);
|
|
14885
|
+
}
|
|
14886
|
+
}
|
|
14887
|
+
});
|
|
14888
|
+
}
|
|
14889
|
+
getGrandTotalPinned() {
|
|
14890
|
+
return this._grandTotalPinned;
|
|
14891
|
+
}
|
|
14892
|
+
setGrandTotalPinned(value) {
|
|
14893
|
+
this._grandTotalPinned = value;
|
|
14894
|
+
}
|
|
14895
|
+
tryToEmptyQueues() {
|
|
14896
|
+
this.forContainers((pinned, container) => {
|
|
14897
|
+
const nodesToPin = /* @__PURE__ */ new Set();
|
|
14898
|
+
pinned.forEachQueued((id) => {
|
|
14899
|
+
const node = this.beans.rowModel.getRowNode(id);
|
|
14900
|
+
if (node) {
|
|
14901
|
+
nodesToPin.add(node);
|
|
14902
|
+
}
|
|
14903
|
+
});
|
|
14904
|
+
for (const node of nodesToPin) {
|
|
14905
|
+
pinned.unqueue(node.id);
|
|
14906
|
+
this.pinRow(node, container);
|
|
14907
|
+
}
|
|
14908
|
+
});
|
|
14909
|
+
}
|
|
14910
|
+
pinGrandTotalRow() {
|
|
14911
|
+
const { gos, beans, _grandTotalPinned: float } = this;
|
|
14912
|
+
const rowModel = beans.rowModel;
|
|
14913
|
+
if (!_isClientSideRowModel(gos))
|
|
14914
|
+
return;
|
|
14915
|
+
const sibling = rowModel.rootNode?.sibling;
|
|
14916
|
+
if (!sibling)
|
|
14917
|
+
return;
|
|
14918
|
+
const pinnedSibling = sibling.pinnedSibling;
|
|
14919
|
+
const container = pinnedSibling && this.findPinnedRowNode(pinnedSibling);
|
|
14920
|
+
if (!float) {
|
|
14921
|
+
if (!container)
|
|
14922
|
+
return;
|
|
14923
|
+
container.delete(pinnedSibling);
|
|
14924
|
+
_destroyRowNodeSibling(pinnedSibling);
|
|
14925
|
+
} else {
|
|
14926
|
+
if (container && container.floating !== float) {
|
|
14927
|
+
container.delete(pinnedSibling);
|
|
14928
|
+
_destroyRowNodeSibling(pinnedSibling);
|
|
14929
|
+
}
|
|
14930
|
+
if (!container || container.floating !== float) {
|
|
14931
|
+
const newPinnedSibling = _createPinnedSibling(beans, sibling, float);
|
|
14932
|
+
this.getContainer(float).add(newPinnedSibling);
|
|
14933
|
+
}
|
|
14934
|
+
}
|
|
14935
|
+
}
|
|
14936
|
+
onGridStylesChanges(e) {
|
|
14937
|
+
if (e.rowHeightChanged) {
|
|
14938
|
+
this.forContainers(
|
|
14939
|
+
(container) => container.forEach((rowNode) => rowNode.setRowHeight(rowNode.rowHeight, true))
|
|
14940
|
+
);
|
|
14941
|
+
}
|
|
14942
|
+
}
|
|
14943
|
+
getContainer(floating) {
|
|
14944
|
+
return floating === "top" ? this.top : this.bottom;
|
|
14945
|
+
}
|
|
14946
|
+
findPinnedRowNode(node) {
|
|
14947
|
+
if (this.top.has(node))
|
|
14948
|
+
return this.top;
|
|
14949
|
+
if (this.bottom.has(node))
|
|
14950
|
+
return this.bottom;
|
|
14951
|
+
}
|
|
14952
|
+
refreshRowPositions(floating) {
|
|
14953
|
+
const refreshAll = (pinned) => refreshRowPositions(this.beans, pinned);
|
|
14954
|
+
return floating == null ? this.forContainers(refreshAll) : refreshAll(this.getContainer(floating));
|
|
14955
|
+
}
|
|
14956
|
+
forContainers(fn) {
|
|
14957
|
+
fn(this.top, "top");
|
|
14958
|
+
fn(this.bottom, "bottom");
|
|
14959
|
+
}
|
|
14960
|
+
dispatchRowPinnedEvents(node) {
|
|
14961
|
+
this.eventSvc.dispatchEvent({ type: "pinnedRowsChanged" });
|
|
14962
|
+
node?.dispatchRowEvent("rowPinned");
|
|
14963
|
+
}
|
|
14964
|
+
};
|
|
14965
|
+
function refreshRowPositions(beans, container) {
|
|
14966
|
+
let rowTop = 0;
|
|
14967
|
+
container.forEach((node, index) => {
|
|
14968
|
+
node.setRowTop(rowTop);
|
|
14969
|
+
if (node.rowHeightEstimated || node.rowHeight == null) {
|
|
14970
|
+
node.setRowHeight(_getRowHeightForNode(beans, node).height);
|
|
14971
|
+
}
|
|
14972
|
+
node.setRowIndex(index);
|
|
14973
|
+
rowTop += node.rowHeight;
|
|
14974
|
+
});
|
|
14975
|
+
}
|
|
14976
|
+
function _createPinnedSibling(beans, rowNode, floating) {
|
|
14977
|
+
if (rowNode.pinnedSibling) {
|
|
14978
|
+
return rowNode.pinnedSibling;
|
|
14979
|
+
}
|
|
14980
|
+
const sibling = _createRowNodeSibling(rowNode, beans);
|
|
14981
|
+
sibling.setRowTop(null);
|
|
14982
|
+
sibling.setRowIndex(null);
|
|
14983
|
+
sibling.rowPinned = floating;
|
|
14984
|
+
const prefix = floating === "top" ? ROW_ID_PREFIX_TOP_PINNED : ROW_ID_PREFIX_BOTTOM_PINNED;
|
|
14985
|
+
sibling.id = `${prefix}${floating}-${rowNode.id}`;
|
|
14986
|
+
sibling.pinnedSibling = rowNode;
|
|
14987
|
+
rowNode.pinnedSibling = sibling;
|
|
14988
|
+
return sibling;
|
|
14989
|
+
}
|
|
14990
|
+
function _destroyRowNodeSibling(rowNode) {
|
|
14991
|
+
if (!rowNode.pinnedSibling) {
|
|
14992
|
+
return;
|
|
14993
|
+
}
|
|
14994
|
+
rowNode.rowPinned = null;
|
|
14995
|
+
rowNode.setRowTop(null);
|
|
14996
|
+
rowNode.setRowIndex(null);
|
|
14997
|
+
const mainNode = rowNode.pinnedSibling;
|
|
14998
|
+
rowNode.pinnedSibling = void 0;
|
|
14999
|
+
if (mainNode) {
|
|
15000
|
+
mainNode.pinnedSibling = void 0;
|
|
15001
|
+
mainNode.rowPinned = null;
|
|
15002
|
+
}
|
|
15003
|
+
}
|
|
15004
|
+
function removeGroupRows(set) {
|
|
15005
|
+
const rowsToRemove = /* @__PURE__ */ new Set();
|
|
15006
|
+
set.forEach((node) => {
|
|
15007
|
+
if (node.group) {
|
|
15008
|
+
rowsToRemove.add(node);
|
|
15009
|
+
}
|
|
15010
|
+
});
|
|
15011
|
+
rowsToRemove.forEach((node) => set.delete(node));
|
|
15012
|
+
}
|
|
15013
|
+
function getSpannedRows(beans, rowNode, column) {
|
|
15014
|
+
const { rowSpanSvc } = beans;
|
|
15015
|
+
const isCellSpanning = (column && rowSpanSvc?.isCellSpanning(column, rowNode)) ?? false;
|
|
15016
|
+
if (column && isCellSpanning) {
|
|
15017
|
+
return rowSpanSvc?.getCellSpan(column, rowNode)?.spannedNodes;
|
|
15018
|
+
}
|
|
15019
|
+
}
|
|
15020
|
+
function getTotalHeight(container) {
|
|
15021
|
+
const size = container.size();
|
|
15022
|
+
if (size === 0)
|
|
15023
|
+
return 0;
|
|
15024
|
+
const node = container.getByIndex(size - 1);
|
|
15025
|
+
if (node === void 0)
|
|
15026
|
+
return 0;
|
|
15027
|
+
return node.rowTop + node.rowHeight;
|
|
15028
|
+
}
|
|
15029
|
+
function refreshCSRM({ gos, rowModel }) {
|
|
15030
|
+
if (_isClientSideRowModel(gos)) {
|
|
15031
|
+
rowModel.refreshModel({ step: "map" });
|
|
15032
|
+
}
|
|
15033
|
+
}
|
|
15034
|
+
var StaticPinnedRowModel = class extends BeanStub {
|
|
15035
|
+
constructor() {
|
|
15036
|
+
super(...arguments);
|
|
15037
|
+
this.nextId = 0;
|
|
15038
|
+
this.pinnedTopRows = { cache: {}, order: [] };
|
|
15039
|
+
this.pinnedBottomRows = { cache: {}, order: [] };
|
|
15040
|
+
}
|
|
15041
|
+
postConstruct() {
|
|
15042
|
+
const gos = this.gos;
|
|
15043
|
+
this.setPinnedRowData(gos.get("pinnedTopRowData"), "top");
|
|
15044
|
+
this.setPinnedRowData(gos.get("pinnedBottomRowData"), "bottom");
|
|
15045
|
+
this.addManagedPropertyListener("pinnedTopRowData", (e) => this.setPinnedRowData(e.currentValue, "top"));
|
|
15046
|
+
this.addManagedPropertyListener("pinnedBottomRowData", (e) => this.setPinnedRowData(e.currentValue, "bottom"));
|
|
15047
|
+
this.addManagedEventListeners({ gridStylesChanged: this.onGridStylesChanges.bind(this) });
|
|
15048
|
+
}
|
|
15049
|
+
reset() {
|
|
15050
|
+
}
|
|
15051
|
+
isEmpty(floating) {
|
|
15052
|
+
return this.getCache(floating).order.length === 0;
|
|
15053
|
+
}
|
|
15054
|
+
isRowsToRender(floating) {
|
|
15055
|
+
return !this.isEmpty(floating);
|
|
15056
|
+
}
|
|
15057
|
+
isManual() {
|
|
15058
|
+
return false;
|
|
15059
|
+
}
|
|
15060
|
+
pinRow(_node, _container) {
|
|
15061
|
+
}
|
|
15062
|
+
onGridStylesChanges(e) {
|
|
15063
|
+
if (e.rowHeightChanged) {
|
|
15064
|
+
const estimateRowHeight = (rowNode) => {
|
|
15065
|
+
rowNode.setRowHeight(rowNode.rowHeight, true);
|
|
15066
|
+
};
|
|
15067
|
+
forEach(this.pinnedBottomRows, estimateRowHeight);
|
|
15068
|
+
forEach(this.pinnedTopRows, estimateRowHeight);
|
|
15069
|
+
}
|
|
15070
|
+
}
|
|
15071
|
+
ensureRowHeightsValid() {
|
|
15072
|
+
let anyChange = false;
|
|
15073
|
+
let rowTop = 0;
|
|
15074
|
+
const updateRowHeight = (rowNode) => {
|
|
15075
|
+
if (rowNode.rowHeightEstimated) {
|
|
15076
|
+
const rowHeight = _getRowHeightForNode(this.beans, rowNode);
|
|
15077
|
+
rowNode.setRowTop(rowTop);
|
|
15078
|
+
rowNode.setRowHeight(rowHeight.height);
|
|
15079
|
+
rowTop += rowHeight.height;
|
|
15080
|
+
anyChange = true;
|
|
15081
|
+
}
|
|
15082
|
+
};
|
|
15083
|
+
forEach(this.pinnedBottomRows, updateRowHeight);
|
|
15084
|
+
rowTop = 0;
|
|
15085
|
+
forEach(this.pinnedTopRows, updateRowHeight);
|
|
15086
|
+
this.eventSvc.dispatchEvent({
|
|
15087
|
+
type: "pinnedHeightChanged"
|
|
15088
|
+
});
|
|
15089
|
+
return anyChange;
|
|
15090
|
+
}
|
|
15091
|
+
setPinnedRowData(rowData, floating) {
|
|
15092
|
+
this.updateNodesFromRowData(rowData, floating);
|
|
15093
|
+
this.eventSvc.dispatchEvent({
|
|
15094
|
+
type: "pinnedRowDataChanged"
|
|
15095
|
+
});
|
|
15096
|
+
}
|
|
15097
|
+
/**
|
|
15098
|
+
* Updates existing RowNode instances and creates new ones if necessary
|
|
15099
|
+
*
|
|
15100
|
+
* Setting data as `undefined` will clear row nodes
|
|
15101
|
+
*/
|
|
15102
|
+
updateNodesFromRowData(allData, floating) {
|
|
15103
|
+
const nodes = this.getCache(floating);
|
|
15104
|
+
if (allData === void 0) {
|
|
15105
|
+
nodes.order.length = 0;
|
|
15106
|
+
nodes.cache = {};
|
|
15107
|
+
return;
|
|
15108
|
+
}
|
|
15109
|
+
const getRowId = _getRowIdCallback(this.gos);
|
|
15110
|
+
const idPrefix = floating === "top" ? ROW_ID_PREFIX_TOP_PINNED : ROW_ID_PREFIX_BOTTOM_PINNED;
|
|
15111
|
+
const nodesToRemove = new Set(nodes.order);
|
|
15112
|
+
const newOrder = [];
|
|
15113
|
+
const dataIds = /* @__PURE__ */ new Set();
|
|
15114
|
+
let nextRowTop = 0;
|
|
15115
|
+
let i = -1;
|
|
15116
|
+
for (const data of allData) {
|
|
15117
|
+
const id = getRowId?.({ data, level: 0, rowPinned: floating }) ?? idPrefix + this.nextId++;
|
|
15118
|
+
if (dataIds.has(id)) {
|
|
15119
|
+
_warn(96, { id, data });
|
|
15120
|
+
continue;
|
|
15121
|
+
}
|
|
15122
|
+
i++;
|
|
15123
|
+
dataIds.add(id);
|
|
15124
|
+
newOrder.push(id);
|
|
15125
|
+
const existingNode = getById(nodes, id);
|
|
15126
|
+
if (existingNode !== void 0) {
|
|
15127
|
+
if (existingNode.data !== data) {
|
|
15128
|
+
existingNode.updateData(data);
|
|
15129
|
+
}
|
|
15130
|
+
nextRowTop += this.setRowTopAndRowIndex(existingNode, nextRowTop, i);
|
|
15131
|
+
nodesToRemove.delete(id);
|
|
15132
|
+
} else {
|
|
15133
|
+
const rowNode = new RowNode(this.beans);
|
|
15134
|
+
rowNode.id = id;
|
|
15135
|
+
rowNode.data = data;
|
|
15136
|
+
rowNode.rowPinned = floating;
|
|
15137
|
+
nextRowTop += this.setRowTopAndRowIndex(rowNode, nextRowTop, i);
|
|
15138
|
+
nodes.cache[id] = rowNode;
|
|
15139
|
+
nodes.order.push(id);
|
|
15140
|
+
}
|
|
15141
|
+
}
|
|
15142
|
+
nodesToRemove.forEach((id) => {
|
|
15143
|
+
getById(nodes, id)?.clearRowTopAndRowIndex();
|
|
15144
|
+
delete nodes.cache[id];
|
|
15145
|
+
});
|
|
15146
|
+
nodes.order = newOrder;
|
|
15147
|
+
}
|
|
15148
|
+
setRowTopAndRowIndex(rowNode, rowTop, rowIndex) {
|
|
15149
|
+
rowNode.setRowTop(rowTop);
|
|
15150
|
+
rowNode.setRowHeight(_getRowHeightForNode(this.beans, rowNode).height);
|
|
15151
|
+
rowNode.setRowIndex(rowIndex);
|
|
15152
|
+
return rowNode.rowHeight;
|
|
15153
|
+
}
|
|
15154
|
+
getPinnedTopTotalHeight() {
|
|
15155
|
+
return getTotalHeight2(this.pinnedTopRows);
|
|
15156
|
+
}
|
|
15157
|
+
getPinnedBottomTotalHeight() {
|
|
15158
|
+
return getTotalHeight2(this.pinnedBottomRows);
|
|
15159
|
+
}
|
|
15160
|
+
getPinnedTopRowCount() {
|
|
15161
|
+
return getSize(this.pinnedTopRows);
|
|
15162
|
+
}
|
|
15163
|
+
getPinnedBottomRowCount() {
|
|
15164
|
+
return getSize(this.pinnedBottomRows);
|
|
15165
|
+
}
|
|
15166
|
+
getPinnedTopRow(index) {
|
|
15167
|
+
return getByIndex(this.pinnedTopRows, index);
|
|
15168
|
+
}
|
|
15169
|
+
getPinnedBottomRow(index) {
|
|
15170
|
+
return getByIndex(this.pinnedBottomRows, index);
|
|
15171
|
+
}
|
|
15172
|
+
getPinnedRowById(id, floating) {
|
|
15173
|
+
return getById(this.getCache(floating), id);
|
|
15174
|
+
}
|
|
15175
|
+
forEachPinnedRow(floating, callback) {
|
|
15176
|
+
return forEach(this.getCache(floating), callback);
|
|
15177
|
+
}
|
|
15178
|
+
getCache(floating) {
|
|
15179
|
+
return floating === "top" ? this.pinnedTopRows : this.pinnedBottomRows;
|
|
15180
|
+
}
|
|
15181
|
+
getPinnedState() {
|
|
15182
|
+
return { top: [], bottom: [] };
|
|
15183
|
+
}
|
|
15184
|
+
setPinnedState() {
|
|
15185
|
+
}
|
|
15186
|
+
getGrandTotalPinned() {
|
|
15187
|
+
return;
|
|
15188
|
+
}
|
|
15189
|
+
setGrandTotalPinned() {
|
|
15190
|
+
}
|
|
15191
|
+
};
|
|
15192
|
+
function getTotalHeight2(rowNodes) {
|
|
15193
|
+
const size = getSize(rowNodes);
|
|
15194
|
+
if (size === 0) {
|
|
15195
|
+
return 0;
|
|
15196
|
+
}
|
|
15197
|
+
const node = getByIndex(rowNodes, size - 1);
|
|
15198
|
+
if (node === void 0) {
|
|
15199
|
+
return 0;
|
|
15200
|
+
}
|
|
15201
|
+
return node.rowTop + node.rowHeight;
|
|
15202
|
+
}
|
|
15203
|
+
function getById(cache, id) {
|
|
15204
|
+
return cache.cache[id];
|
|
15205
|
+
}
|
|
15206
|
+
function getByIndex(cache, i) {
|
|
15207
|
+
return getById(cache, cache.order[i]);
|
|
15208
|
+
}
|
|
15209
|
+
function forEach(cache, callback) {
|
|
15210
|
+
cache.order.forEach((id, index) => {
|
|
15211
|
+
const node = getById(cache, id);
|
|
15212
|
+
node && callback(node, index);
|
|
15213
|
+
});
|
|
15214
|
+
}
|
|
15215
|
+
function getSize(cache) {
|
|
15216
|
+
return cache.order.length;
|
|
15217
|
+
}
|
|
15218
|
+
var PinnedRowModel = class extends BeanStub {
|
|
15219
|
+
constructor() {
|
|
15220
|
+
super(...arguments);
|
|
15221
|
+
this.beanName = "pinnedRowModel";
|
|
15222
|
+
}
|
|
15223
|
+
postConstruct() {
|
|
15224
|
+
const { gos } = this;
|
|
15225
|
+
const initialiseRowModel = () => {
|
|
15226
|
+
const enableRowPinning = gos.get("enableRowPinning");
|
|
15227
|
+
const grandTotalRow = _getGrandTotalRow(gos);
|
|
15228
|
+
const isGrandTotalRowPinned = grandTotalRow === "pinnedBottom" || grandTotalRow === "pinnedTop";
|
|
15229
|
+
const useManualPinnedRowModel = !!enableRowPinning || isGrandTotalRowPinned;
|
|
15230
|
+
const shouldDestroy = useManualPinnedRowModel ? this.inner instanceof StaticPinnedRowModel : this.inner instanceof ManualPinnedRowModel;
|
|
15231
|
+
if (this.inner && shouldDestroy) {
|
|
15232
|
+
this.destroyBean(this.inner);
|
|
15233
|
+
}
|
|
15234
|
+
if (shouldDestroy || !this.inner) {
|
|
15235
|
+
this.inner = this.createManagedBean(
|
|
15236
|
+
useManualPinnedRowModel ? new ManualPinnedRowModel() : new StaticPinnedRowModel()
|
|
15237
|
+
);
|
|
15238
|
+
}
|
|
15239
|
+
};
|
|
15240
|
+
this.addManagedPropertyListeners(["enableRowPinning", "grandTotalRow"], initialiseRowModel);
|
|
15241
|
+
initialiseRowModel();
|
|
15242
|
+
}
|
|
15243
|
+
reset() {
|
|
15244
|
+
return this.inner.reset();
|
|
15245
|
+
}
|
|
15246
|
+
isEmpty(container) {
|
|
15247
|
+
return this.inner.isEmpty(container);
|
|
15248
|
+
}
|
|
15249
|
+
isManual() {
|
|
15250
|
+
return this.inner.isManual();
|
|
15251
|
+
}
|
|
15252
|
+
isRowsToRender(container) {
|
|
15253
|
+
return this.inner.isRowsToRender(container);
|
|
15254
|
+
}
|
|
15255
|
+
pinRow(node, container, column) {
|
|
15256
|
+
return this.inner.pinRow(node, container, column);
|
|
15257
|
+
}
|
|
15258
|
+
ensureRowHeightsValid() {
|
|
15259
|
+
return this.inner.ensureRowHeightsValid();
|
|
15260
|
+
}
|
|
15261
|
+
getPinnedRowById(id, container) {
|
|
15262
|
+
return this.inner.getPinnedRowById(id, container);
|
|
15263
|
+
}
|
|
15264
|
+
getPinnedTopTotalHeight() {
|
|
15265
|
+
return this.inner.getPinnedTopTotalHeight();
|
|
15266
|
+
}
|
|
15267
|
+
getPinnedBottomTotalHeight() {
|
|
15268
|
+
return this.inner.getPinnedBottomTotalHeight();
|
|
15269
|
+
}
|
|
15270
|
+
getPinnedTopRowCount() {
|
|
15271
|
+
return this.inner.getPinnedTopRowCount();
|
|
15272
|
+
}
|
|
15273
|
+
getPinnedBottomRowCount() {
|
|
15274
|
+
return this.inner.getPinnedBottomRowCount();
|
|
15275
|
+
}
|
|
15276
|
+
getPinnedTopRow(index) {
|
|
15277
|
+
return this.inner.getPinnedTopRow(index);
|
|
15278
|
+
}
|
|
15279
|
+
getPinnedBottomRow(index) {
|
|
15280
|
+
return this.inner.getPinnedBottomRow(index);
|
|
15281
|
+
}
|
|
15282
|
+
forEachPinnedRow(container, callback) {
|
|
15283
|
+
return this.inner.forEachPinnedRow(container, callback);
|
|
15284
|
+
}
|
|
15285
|
+
getPinnedState() {
|
|
15286
|
+
return this.inner.getPinnedState();
|
|
15287
|
+
}
|
|
15288
|
+
setPinnedState(state) {
|
|
15289
|
+
return this.inner.setPinnedState(state);
|
|
15290
|
+
}
|
|
15291
|
+
setGrandTotalPinned(value) {
|
|
15292
|
+
return this.inner.setGrandTotalPinned(value);
|
|
15293
|
+
}
|
|
15294
|
+
getGrandTotalPinned() {
|
|
15295
|
+
return this.inner.getGrandTotalPinned();
|
|
15296
|
+
}
|
|
15297
|
+
};
|
|
14534
15298
|
var ROOT_NODE_ID = "ROOT_NODE_ID";
|
|
14535
15299
|
var AbstractClientSideNodeManager = class extends BeanStub {
|
|
14536
15300
|
constructor() {
|
|
@@ -35016,6 +35780,12 @@ var TextCellEditor = class extends SimpleCellEditor {
|
|
|
35016
35780
|
super(new TextCellEditorInput(() => this.getLocaleTextFunc()));
|
|
35017
35781
|
}
|
|
35018
35782
|
};
|
|
35783
|
+
function getVerticalPixelRange(beans) {
|
|
35784
|
+
return beans.ctrlsSvc.getScrollFeature().getVScrollPosition();
|
|
35785
|
+
}
|
|
35786
|
+
function getHorizontalPixelRange(beans) {
|
|
35787
|
+
return beans.ctrlsSvc.getScrollFeature().getHScrollPosition();
|
|
35788
|
+
}
|
|
35019
35789
|
function ensureColumnVisible(beans, key, position = "auto") {
|
|
35020
35790
|
beans.frameworkOverrides.wrapIncoming(
|
|
35021
35791
|
() => beans.ctrlsSvc.getScrollFeature().ensureColumnVisible(key, position),
|
|
@@ -35028,6 +35798,12 @@ function ensureIndexVisible(beans, index, position) {
|
|
|
35028
35798
|
"ensureVisible"
|
|
35029
35799
|
);
|
|
35030
35800
|
}
|
|
35801
|
+
function ensureNodeVisible(beans, nodeSelector, position = null) {
|
|
35802
|
+
beans.frameworkOverrides.wrapIncoming(
|
|
35803
|
+
() => beans.ctrlsSvc.getScrollFeature().ensureNodeVisible(nodeSelector, position),
|
|
35804
|
+
"ensureVisible"
|
|
35805
|
+
);
|
|
35806
|
+
}
|
|
35031
35807
|
function undoCellEditing(beans) {
|
|
35032
35808
|
beans.undoRedo?.undo("api");
|
|
35033
35809
|
}
|
|
@@ -36007,15 +36783,15 @@ var BaseEditStrategy = class extends BeanStub {
|
|
|
36007
36783
|
});
|
|
36008
36784
|
return true;
|
|
36009
36785
|
}
|
|
36010
|
-
const
|
|
36011
|
-
if (
|
|
36012
|
-
|
|
36786
|
+
const actions2 = this.processValidationResults(results);
|
|
36787
|
+
if (actions2.destroy.length > 0) {
|
|
36788
|
+
actions2.destroy.forEach((cell) => {
|
|
36013
36789
|
_destroyEditor(this.beans, cell, { event });
|
|
36014
36790
|
this.model.stop(cell);
|
|
36015
36791
|
});
|
|
36016
36792
|
}
|
|
36017
|
-
if (
|
|
36018
|
-
|
|
36793
|
+
if (actions2.keep.length > 0) {
|
|
36794
|
+
actions2.keep.forEach((cell) => {
|
|
36019
36795
|
const cellCtrl = _getCellCtrl(this.beans, cell);
|
|
36020
36796
|
if (!this.editSvc?.cellEditingInvalidCommitBlocks()) {
|
|
36021
36797
|
cellCtrl && this.editSvc.revertSingleCellEdit(cellCtrl);
|
|
@@ -38630,6 +39406,17 @@ var RowApiModule = {
|
|
|
38630
39406
|
getDisplayedRowCount
|
|
38631
39407
|
}
|
|
38632
39408
|
};
|
|
39409
|
+
var ScrollApiModule = {
|
|
39410
|
+
moduleName: "ScrollApi",
|
|
39411
|
+
version: VERSION,
|
|
39412
|
+
apiFunctions: {
|
|
39413
|
+
getVerticalPixelRange,
|
|
39414
|
+
getHorizontalPixelRange,
|
|
39415
|
+
ensureColumnVisible,
|
|
39416
|
+
ensureIndexVisible,
|
|
39417
|
+
ensureNodeVisible
|
|
39418
|
+
}
|
|
39419
|
+
};
|
|
38633
39420
|
function setGridAriaProperty(beans, property, value) {
|
|
38634
39421
|
if (!property) {
|
|
38635
39422
|
return;
|
|
@@ -39115,6 +39902,161 @@ var ColumnAutoSizeModule = {
|
|
|
39115
39902
|
},
|
|
39116
39903
|
dependsOn: [AutoWidthModule]
|
|
39117
39904
|
};
|
|
39905
|
+
var manualPinnedRowCSS = (
|
|
39906
|
+
/*css*/
|
|
39907
|
+
`.ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}`
|
|
39908
|
+
);
|
|
39909
|
+
function getPinnedTopRowCount(beans) {
|
|
39910
|
+
return beans.pinnedRowModel?.getPinnedTopRowCount() ?? 0;
|
|
39911
|
+
}
|
|
39912
|
+
function getPinnedBottomRowCount(beans) {
|
|
39913
|
+
return beans.pinnedRowModel?.getPinnedBottomRowCount() ?? 0;
|
|
39914
|
+
}
|
|
39915
|
+
function getPinnedTopRow(beans, index) {
|
|
39916
|
+
return beans.pinnedRowModel?.getPinnedTopRow(index);
|
|
39917
|
+
}
|
|
39918
|
+
function getPinnedBottomRow(beans, index) {
|
|
39919
|
+
return beans.pinnedRowModel?.getPinnedBottomRow(index);
|
|
39920
|
+
}
|
|
39921
|
+
function forEachPinnedRow(beans, floating, callback) {
|
|
39922
|
+
return beans.pinnedRowModel?.forEachPinnedRow(floating, callback);
|
|
39923
|
+
}
|
|
39924
|
+
var PinnedRowModule = {
|
|
39925
|
+
moduleName: "PinnedRow",
|
|
39926
|
+
version: VERSION,
|
|
39927
|
+
beans: [PinnedRowModel],
|
|
39928
|
+
css: [manualPinnedRowCSS],
|
|
39929
|
+
apiFunctions: {
|
|
39930
|
+
getPinnedTopRowCount,
|
|
39931
|
+
getPinnedBottomRowCount,
|
|
39932
|
+
getPinnedTopRow,
|
|
39933
|
+
getPinnedBottomRow,
|
|
39934
|
+
forEachPinnedRow
|
|
39935
|
+
},
|
|
39936
|
+
icons: {
|
|
39937
|
+
rowPin: "pin",
|
|
39938
|
+
rowPinTop: "pinned-top",
|
|
39939
|
+
rowPinBottom: "pinned-bottom",
|
|
39940
|
+
rowUnpin: "un-pin"
|
|
39941
|
+
}
|
|
39942
|
+
};
|
|
39943
|
+
var CellCustomStyleFeature = class extends BeanStub {
|
|
39944
|
+
constructor(cellCtrl, beans) {
|
|
39945
|
+
super();
|
|
39946
|
+
this.cellCtrl = cellCtrl;
|
|
39947
|
+
this.staticClasses = [];
|
|
39948
|
+
this.beans = beans;
|
|
39949
|
+
this.column = cellCtrl.column;
|
|
39950
|
+
}
|
|
39951
|
+
setComp(comp) {
|
|
39952
|
+
this.cellComp = comp;
|
|
39953
|
+
this.applyUserStyles();
|
|
39954
|
+
this.applyCellClassRules();
|
|
39955
|
+
this.applyClassesFromColDef();
|
|
39956
|
+
}
|
|
39957
|
+
applyCellClassRules() {
|
|
39958
|
+
const { column, cellComp } = this;
|
|
39959
|
+
const colDef = column.colDef;
|
|
39960
|
+
const cellClassRules = colDef.cellClassRules;
|
|
39961
|
+
const cellClassParams = this.getCellClassParams(column, colDef);
|
|
39962
|
+
processClassRules(
|
|
39963
|
+
this.beans.expressionSvc,
|
|
39964
|
+
// if current was previous, skip
|
|
39965
|
+
cellClassRules === this.cellClassRules ? void 0 : this.cellClassRules,
|
|
39966
|
+
cellClassRules,
|
|
39967
|
+
cellClassParams,
|
|
39968
|
+
(className) => cellComp.toggleCss(className, true),
|
|
39969
|
+
(className) => cellComp.toggleCss(className, false)
|
|
39970
|
+
);
|
|
39971
|
+
this.cellClassRules = cellClassRules;
|
|
39972
|
+
}
|
|
39973
|
+
applyUserStyles() {
|
|
39974
|
+
const column = this.column;
|
|
39975
|
+
const colDef = column.colDef;
|
|
39976
|
+
const cellStyle = colDef.cellStyle;
|
|
39977
|
+
if (!cellStyle) {
|
|
39978
|
+
return;
|
|
39979
|
+
}
|
|
39980
|
+
let styles;
|
|
39981
|
+
if (typeof cellStyle === "function") {
|
|
39982
|
+
const cellStyleParams = this.getCellClassParams(column, colDef);
|
|
39983
|
+
styles = cellStyle(cellStyleParams);
|
|
39984
|
+
} else {
|
|
39985
|
+
styles = cellStyle;
|
|
39986
|
+
}
|
|
39987
|
+
if (styles) {
|
|
39988
|
+
this.cellComp.setUserStyles(styles);
|
|
39989
|
+
}
|
|
39990
|
+
}
|
|
39991
|
+
applyClassesFromColDef() {
|
|
39992
|
+
const { column, cellComp } = this;
|
|
39993
|
+
const colDef = column.colDef;
|
|
39994
|
+
const cellClassParams = this.getCellClassParams(column, colDef);
|
|
39995
|
+
this.staticClasses.forEach((className) => cellComp.toggleCss(className, false));
|
|
39996
|
+
const newStaticClasses = this.beans.cellStyles.getStaticCellClasses(colDef, cellClassParams);
|
|
39997
|
+
this.staticClasses = newStaticClasses;
|
|
39998
|
+
newStaticClasses.forEach((className) => cellComp.toggleCss(className, true));
|
|
39999
|
+
}
|
|
40000
|
+
getCellClassParams(column, colDef) {
|
|
40001
|
+
const { value, rowNode } = this.cellCtrl;
|
|
40002
|
+
return _addGridCommonParams(this.beans.gos, {
|
|
40003
|
+
value,
|
|
40004
|
+
data: rowNode.data,
|
|
40005
|
+
node: rowNode,
|
|
40006
|
+
colDef,
|
|
40007
|
+
column,
|
|
40008
|
+
rowIndex: rowNode.rowIndex
|
|
40009
|
+
});
|
|
40010
|
+
}
|
|
40011
|
+
};
|
|
40012
|
+
var CellStyleService = class extends BeanStub {
|
|
40013
|
+
constructor() {
|
|
40014
|
+
super(...arguments);
|
|
40015
|
+
this.beanName = "cellStyles";
|
|
40016
|
+
}
|
|
40017
|
+
processAllCellClasses(colDef, params, onApplicableClass, onNotApplicableClass) {
|
|
40018
|
+
processClassRules(
|
|
40019
|
+
this.beans.expressionSvc,
|
|
40020
|
+
void 0,
|
|
40021
|
+
colDef.cellClassRules,
|
|
40022
|
+
params,
|
|
40023
|
+
onApplicableClass,
|
|
40024
|
+
onNotApplicableClass
|
|
40025
|
+
);
|
|
40026
|
+
this.processStaticCellClasses(colDef, params, onApplicableClass);
|
|
40027
|
+
}
|
|
40028
|
+
getStaticCellClasses(colDef, params) {
|
|
40029
|
+
const { cellClass } = colDef;
|
|
40030
|
+
if (!cellClass) {
|
|
40031
|
+
return [];
|
|
40032
|
+
}
|
|
40033
|
+
let classOrClasses;
|
|
40034
|
+
if (typeof cellClass === "function") {
|
|
40035
|
+
const cellClassFunc = cellClass;
|
|
40036
|
+
classOrClasses = cellClassFunc(params);
|
|
40037
|
+
} else {
|
|
40038
|
+
classOrClasses = cellClass;
|
|
40039
|
+
}
|
|
40040
|
+
if (typeof classOrClasses === "string") {
|
|
40041
|
+
classOrClasses = [classOrClasses];
|
|
40042
|
+
}
|
|
40043
|
+
return classOrClasses || [];
|
|
40044
|
+
}
|
|
40045
|
+
createCellCustomStyleFeature(ctrl, beans) {
|
|
40046
|
+
return new CellCustomStyleFeature(ctrl, beans);
|
|
40047
|
+
}
|
|
40048
|
+
processStaticCellClasses(colDef, params, onApplicableClass) {
|
|
40049
|
+
const classOrClasses = this.getStaticCellClasses(colDef, params);
|
|
40050
|
+
classOrClasses.forEach((cssClassItem) => {
|
|
40051
|
+
onApplicableClass(cssClassItem);
|
|
40052
|
+
});
|
|
40053
|
+
}
|
|
40054
|
+
};
|
|
40055
|
+
var CellStyleModule = {
|
|
40056
|
+
moduleName: "CellStyle",
|
|
40057
|
+
version: VERSION,
|
|
40058
|
+
beans: [CellStyleService]
|
|
40059
|
+
};
|
|
39118
40060
|
var W = Object.defineProperty;
|
|
39119
40061
|
var N = (r, d, e) => d in r ? W(r, d, { enumerable: true, configurable: true, writable: true, value: e }) : r[d] = e;
|
|
39120
40062
|
var C = (r, d, e) => N(r, typeof d != "symbol" ? d + "" : d, e);
|
|
@@ -40241,7 +41183,11 @@ const n8nTheme = themeQuartz.withPart(iconSetAlpine).withParams({
|
|
|
40241
41183
|
rowBorder: true,
|
|
40242
41184
|
rowVerticalPaddingScale: 0.8,
|
|
40243
41185
|
sidePanelBorder: true,
|
|
40244
|
-
wrapperBorder: true
|
|
41186
|
+
wrapperBorder: true,
|
|
41187
|
+
headerColumnBorder: { color: "var(--color-foreground-base)" },
|
|
41188
|
+
headerColumnBorderHeight: "100%",
|
|
41189
|
+
checkboxUncheckedBackgroundColor: "var(--color-background-light-base)",
|
|
41190
|
+
checkboxCheckedBackgroundColor: "var(--color-primary)"
|
|
40245
41191
|
});
|
|
40246
41192
|
const isDataStoreValue = (value) => {
|
|
40247
41193
|
return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value instanceof Date;
|
|
@@ -40293,11 +41239,144 @@ const useDataStoreTypes = () => {
|
|
|
40293
41239
|
getDefaultValueForType
|
|
40294
41240
|
};
|
|
40295
41241
|
};
|
|
40296
|
-
const
|
|
40297
|
-
|
|
40298
|
-
|
|
40299
|
-
|
|
40300
|
-
|
|
41242
|
+
const _hoisted_1$4 = { class: "data-store-column-header-icon-wrapper" };
|
|
41243
|
+
const _hoisted_2$2 = {
|
|
41244
|
+
class: "ag-header-cell-text",
|
|
41245
|
+
"data-test-id": "data-store-column-header-text"
|
|
41246
|
+
};
|
|
41247
|
+
const _hoisted_3$1 = {
|
|
41248
|
+
key: 1,
|
|
41249
|
+
class: "sort-indicator"
|
|
41250
|
+
};
|
|
41251
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
41252
|
+
__name: "ColumnHeader",
|
|
41253
|
+
props: {
|
|
41254
|
+
params: {}
|
|
41255
|
+
},
|
|
41256
|
+
setup(__props) {
|
|
41257
|
+
const props = __props;
|
|
41258
|
+
const { getIconForType, mapToDataStoreColumnType } = useDataStoreTypes();
|
|
41259
|
+
const i18n = useI18n();
|
|
41260
|
+
const isHovered = ref(false);
|
|
41261
|
+
const isDropdownOpen = ref(false);
|
|
41262
|
+
const dropdownRef = ref();
|
|
41263
|
+
const onItemClick = (action) => {
|
|
41264
|
+
if (action === "delete") {
|
|
41265
|
+
props.params.onDelete(props.params.column.getColId());
|
|
41266
|
+
}
|
|
41267
|
+
};
|
|
41268
|
+
const onMouseEnter = () => {
|
|
41269
|
+
isHovered.value = true;
|
|
41270
|
+
};
|
|
41271
|
+
const onMouseLeave = () => {
|
|
41272
|
+
isHovered.value = false;
|
|
41273
|
+
};
|
|
41274
|
+
const onDropdownVisibleChange = (visible) => {
|
|
41275
|
+
isDropdownOpen.value = visible;
|
|
41276
|
+
};
|
|
41277
|
+
const isDropdownVisible = computed(() => {
|
|
41278
|
+
return props.params.allowMenuActions && (isHovered.value || isDropdownOpen.value);
|
|
41279
|
+
});
|
|
41280
|
+
const typeIcon = computed(() => {
|
|
41281
|
+
const cellDataType = props.params.column.getColDef().cellDataType;
|
|
41282
|
+
if (!isAGGridCellType(cellDataType)) {
|
|
41283
|
+
return null;
|
|
41284
|
+
}
|
|
41285
|
+
return getIconForType(mapToDataStoreColumnType(cellDataType));
|
|
41286
|
+
});
|
|
41287
|
+
const columnActionItems = [
|
|
41288
|
+
{
|
|
41289
|
+
id: "delete",
|
|
41290
|
+
label: i18n.baseText("dataStore.deleteColumn.confirm.title"),
|
|
41291
|
+
icon: "trash-2",
|
|
41292
|
+
customClass: "data-store-column-header-action-item"
|
|
41293
|
+
}
|
|
41294
|
+
];
|
|
41295
|
+
const currentSort = computed(() => {
|
|
41296
|
+
return props.params.column.getSort();
|
|
41297
|
+
});
|
|
41298
|
+
const isSortable = computed(() => {
|
|
41299
|
+
return props.params.column.getColDef().sortable;
|
|
41300
|
+
});
|
|
41301
|
+
const showSortIndicator = computed(() => {
|
|
41302
|
+
return isSortable.value && Boolean(currentSort.value);
|
|
41303
|
+
});
|
|
41304
|
+
const onHeaderClick = (event) => {
|
|
41305
|
+
const target = event.target;
|
|
41306
|
+
if (dropdownRef.value?.$el?.contains(target)) {
|
|
41307
|
+
return;
|
|
41308
|
+
}
|
|
41309
|
+
if (isSortable.value) {
|
|
41310
|
+
const currentSortDirection = currentSort.value;
|
|
41311
|
+
let nextSort = null;
|
|
41312
|
+
if (!currentSortDirection) {
|
|
41313
|
+
nextSort = "asc";
|
|
41314
|
+
} else if (currentSortDirection === "asc") {
|
|
41315
|
+
nextSort = "desc";
|
|
41316
|
+
}
|
|
41317
|
+
props.params.setSort(nextSort, false);
|
|
41318
|
+
}
|
|
41319
|
+
};
|
|
41320
|
+
return (_ctx, _cache) => {
|
|
41321
|
+
const _component_N8nIcon = N8nIcon;
|
|
41322
|
+
return openBlock(), createElementBlock("div", {
|
|
41323
|
+
class: normalizeClass(["ag-header-cell-label", "data-store-column-header-wrapper", { sortable: isSortable.value }]),
|
|
41324
|
+
"data-test-id": "data-store-column-header",
|
|
41325
|
+
onMouseenter: onMouseEnter,
|
|
41326
|
+
onMouseleave: onMouseLeave,
|
|
41327
|
+
onClick: onHeaderClick
|
|
41328
|
+
}, [
|
|
41329
|
+
createBaseVNode("div", _hoisted_1$4, [
|
|
41330
|
+
typeIcon.value ? (openBlock(), createBlock(_component_N8nIcon, {
|
|
41331
|
+
key: 0,
|
|
41332
|
+
icon: typeIcon.value
|
|
41333
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
41334
|
+
createBaseVNode("span", _hoisted_2$2, toDisplayString(props.params.displayName), 1),
|
|
41335
|
+
showSortIndicator.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
41336
|
+
currentSort.value === "asc" ? (openBlock(), createBlock(_component_N8nIcon, {
|
|
41337
|
+
key: 0,
|
|
41338
|
+
icon: "arrow-up",
|
|
41339
|
+
class: "sort-icon-active"
|
|
41340
|
+
})) : currentSort.value === "desc" ? (openBlock(), createBlock(_component_N8nIcon, {
|
|
41341
|
+
key: 1,
|
|
41342
|
+
icon: "arrow-down",
|
|
41343
|
+
class: "sort-icon-active"
|
|
41344
|
+
})) : createCommentVNode("", true)
|
|
41345
|
+
])) : createCommentVNode("", true)
|
|
41346
|
+
]),
|
|
41347
|
+
withDirectives(createVNode(unref(N8nActionDropdown), {
|
|
41348
|
+
ref_key: "dropdownRef",
|
|
41349
|
+
ref: dropdownRef,
|
|
41350
|
+
"data-test-id": "data-store-column-header-actions",
|
|
41351
|
+
items: columnActionItems,
|
|
41352
|
+
placement: "bottom-start",
|
|
41353
|
+
"activator-icon": "ellipsis",
|
|
41354
|
+
onSelect: onItemClick,
|
|
41355
|
+
onVisibleChange: onDropdownVisibleChange
|
|
41356
|
+
}, null, 512), [
|
|
41357
|
+
[vShow, isDropdownVisible.value]
|
|
41358
|
+
])
|
|
41359
|
+
], 34);
|
|
41360
|
+
};
|
|
41361
|
+
}
|
|
41362
|
+
});
|
|
41363
|
+
const _hoisted_1$3 = { class: "add-column-header-component-wrapper" };
|
|
41364
|
+
const _hoisted_2$1 = { class: "add-ds-column-header-popover-content" };
|
|
41365
|
+
const _hoisted_3 = { class: "popover-body" };
|
|
41366
|
+
const _hoisted_4 = {
|
|
41367
|
+
key: 0,
|
|
41368
|
+
class: "error-message"
|
|
41369
|
+
};
|
|
41370
|
+
const _hoisted_5 = { class: "add-column-option-content" };
|
|
41371
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
41372
|
+
__name: "AddColumnButton",
|
|
41373
|
+
props: {
|
|
41374
|
+
params: {},
|
|
41375
|
+
popoverId: {},
|
|
41376
|
+
useTextTrigger: { type: Boolean }
|
|
41377
|
+
},
|
|
41378
|
+
setup(__props) {
|
|
41379
|
+
const props = __props;
|
|
40301
41380
|
const i18n = useI18n();
|
|
40302
41381
|
const { getIconForType } = useDataStoreTypes();
|
|
40303
41382
|
const { debounce } = useDebounce();
|
|
@@ -40308,16 +41387,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40308
41387
|
const error = ref(null);
|
|
40309
41388
|
const popoverOpen = ref(false);
|
|
40310
41389
|
const isSelectOpen = ref(false);
|
|
40311
|
-
const
|
|
40312
|
-
|
|
41390
|
+
const popoverId = computed(() => props.popoverId ?? "add-column-popover");
|
|
41391
|
+
const onAddButtonClicked = async () => {
|
|
41392
|
+
validateName();
|
|
41393
|
+
if (!columnName.value || !columnType.value || error.value) {
|
|
40313
41394
|
return;
|
|
40314
41395
|
}
|
|
40315
|
-
|
|
40316
|
-
|
|
40317
|
-
|
|
40318
|
-
type: columnType.value
|
|
40319
|
-
}
|
|
41396
|
+
const success = await props.params.onAddColumn({
|
|
41397
|
+
name: columnName.value,
|
|
41398
|
+
type: columnType.value
|
|
40320
41399
|
});
|
|
41400
|
+
if (!success) {
|
|
41401
|
+
return;
|
|
41402
|
+
}
|
|
40321
41403
|
columnName.value = "";
|
|
40322
41404
|
columnType.value = "string";
|
|
40323
41405
|
popoverOpen.value = false;
|
|
@@ -40343,15 +41425,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40343
41425
|
};
|
|
40344
41426
|
const onInput = debounce(validateName, { debounceTime: 100 });
|
|
40345
41427
|
return (_ctx, _cache) => {
|
|
40346
|
-
const
|
|
41428
|
+
const _component_N8nButton = N8nButton;
|
|
41429
|
+
const _component_N8nIconButton = _sfc_main$a;
|
|
40347
41430
|
const _component_N8nInput = N8nInput;
|
|
40348
41431
|
const _component_n8n_text = N8nText;
|
|
40349
41432
|
const _component_N8nIcon = N8nIcon;
|
|
40350
41433
|
const _component_N8nInputLabel = N8nInputLabel;
|
|
40351
41434
|
const _component_N8nText = N8nText;
|
|
40352
|
-
const _component_N8nOption = _sfc_main$
|
|
41435
|
+
const _component_N8nOption = _sfc_main$9;
|
|
40353
41436
|
const _component_N8nSelect = N8nSelect;
|
|
40354
|
-
const _component_N8nButton = N8nButton;
|
|
40355
41437
|
const _component_N8nPopoverReka = N8nPopoverReka;
|
|
40356
41438
|
const _component_N8nTooltip = Tooltip;
|
|
40357
41439
|
return openBlock(), createBlock(_component_N8nTooltip, {
|
|
@@ -40359,31 +41441,35 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40359
41441
|
content: unref(i18n).baseText("dataStore.addColumn.label")
|
|
40360
41442
|
}, {
|
|
40361
41443
|
default: withCtx(() => [
|
|
40362
|
-
createBaseVNode("div",
|
|
40363
|
-
class: normalizeClass(_ctx.$style.wrapper)
|
|
40364
|
-
}, [
|
|
41444
|
+
createBaseVNode("div", _hoisted_1$3, [
|
|
40365
41445
|
createVNode(_component_N8nPopoverReka, {
|
|
40366
|
-
id:
|
|
41446
|
+
id: popoverId.value,
|
|
40367
41447
|
open: popoverOpen.value,
|
|
40368
41448
|
"popper-options": { strategy: "fixed" },
|
|
40369
41449
|
"show-arrow": false,
|
|
40370
41450
|
"onUpdate:open": handlePopoverOpenChange
|
|
40371
41451
|
}, {
|
|
40372
41452
|
trigger: withCtx(() => [
|
|
40373
|
-
|
|
41453
|
+
props.useTextTrigger ? (openBlock(), createBlock(_component_N8nButton, {
|
|
41454
|
+
key: 0,
|
|
41455
|
+
"data-test-id": "data-store-add-column-trigger-button",
|
|
41456
|
+
type: "tertiary"
|
|
41457
|
+
}, {
|
|
41458
|
+
default: withCtx(() => [
|
|
41459
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("dataStore.addColumn.label")), 1)
|
|
41460
|
+
]),
|
|
41461
|
+
_: 1
|
|
41462
|
+
})) : (openBlock(), createBlock(_component_N8nIconButton, {
|
|
41463
|
+
key: 1,
|
|
40374
41464
|
"data-test-id": "data-store-add-column-trigger-button",
|
|
40375
41465
|
text: "",
|
|
40376
41466
|
icon: "plus",
|
|
40377
41467
|
type: "tertiary"
|
|
40378
|
-
})
|
|
41468
|
+
}))
|
|
40379
41469
|
]),
|
|
40380
41470
|
content: withCtx(() => [
|
|
40381
|
-
createBaseVNode("div",
|
|
40382
|
-
|
|
40383
|
-
}, [
|
|
40384
|
-
createBaseVNode("div", {
|
|
40385
|
-
class: normalizeClass(_ctx.$style["popover-body"])
|
|
40386
|
-
}, [
|
|
41471
|
+
createBaseVNode("div", _hoisted_2$1, [
|
|
41472
|
+
createBaseVNode("div", _hoisted_3, [
|
|
40387
41473
|
createVNode(_component_N8nInputLabel, {
|
|
40388
41474
|
label: unref(i18n).baseText("dataStore.addColumn.nameInput.label"),
|
|
40389
41475
|
required: true,
|
|
@@ -40400,10 +41486,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40400
41486
|
onKeyup: withKeys(onAddButtonClicked, ["enter"]),
|
|
40401
41487
|
onInput: unref(onInput)
|
|
40402
41488
|
}, null, 8, ["modelValue", "placeholder", "maxlength", "onInput"]),
|
|
40403
|
-
error.value ? (openBlock(), createElementBlock("div",
|
|
40404
|
-
key: 0,
|
|
40405
|
-
class: normalizeClass(_ctx.$style["error-message"])
|
|
40406
|
-
}, [
|
|
41489
|
+
error.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
40407
41490
|
createVNode(_component_n8n_text, {
|
|
40408
41491
|
size: "small",
|
|
40409
41492
|
color: "danger",
|
|
@@ -40421,27 +41504,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40421
41504
|
createVNode(_component_N8nIcon, {
|
|
40422
41505
|
icon: "circle-help",
|
|
40423
41506
|
size: "small",
|
|
40424
|
-
class:
|
|
41507
|
+
class: "error-tooltip",
|
|
40425
41508
|
color: "text-base",
|
|
40426
41509
|
"data-test-id": "add-column-error-help-icon"
|
|
40427
|
-
}
|
|
41510
|
+
})
|
|
40428
41511
|
]),
|
|
40429
41512
|
_: 1
|
|
40430
41513
|
}, 8, ["content"])
|
|
40431
|
-
]
|
|
41514
|
+
])) : createCommentVNode("", true)
|
|
40432
41515
|
]),
|
|
40433
41516
|
_: 1
|
|
40434
41517
|
}, 8, ["label", "class"]),
|
|
40435
41518
|
createVNode(_component_N8nInputLabel, {
|
|
40436
41519
|
label: unref(i18n).baseText("dataStore.addColumn.typeInput.label"),
|
|
40437
41520
|
required: true,
|
|
40438
|
-
class:
|
|
41521
|
+
class: "type-label"
|
|
40439
41522
|
}, {
|
|
40440
41523
|
default: withCtx(() => [
|
|
40441
41524
|
createVNode(_component_N8nSelect, {
|
|
40442
41525
|
modelValue: columnType.value,
|
|
40443
41526
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => columnType.value = $event),
|
|
40444
|
-
"append-to":
|
|
41527
|
+
"append-to": `#${popoverId.value}`,
|
|
40445
41528
|
onVisibleChange: _cache[2] || (_cache[2] = ($event) => isSelectOpen.value = $event)
|
|
40446
41529
|
}, {
|
|
40447
41530
|
default: withCtx(() => [
|
|
@@ -40451,9 +41534,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40451
41534
|
value: type
|
|
40452
41535
|
}, {
|
|
40453
41536
|
default: withCtx(() => [
|
|
40454
|
-
createBaseVNode("div",
|
|
40455
|
-
class: normalizeClass(_ctx.$style["option-content"])
|
|
40456
|
-
}, [
|
|
41537
|
+
createBaseVNode("div", _hoisted_5, [
|
|
40457
41538
|
createVNode(_component_N8nIcon, {
|
|
40458
41539
|
icon: unref(getIconForType)(type)
|
|
40459
41540
|
}, null, 8, ["icon"]),
|
|
@@ -40463,17 +41544,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40463
41544
|
]),
|
|
40464
41545
|
_: 2
|
|
40465
41546
|
}, 1024)
|
|
40466
|
-
]
|
|
41547
|
+
])
|
|
40467
41548
|
]),
|
|
40468
41549
|
_: 2
|
|
40469
41550
|
}, 1032, ["value"]);
|
|
40470
41551
|
}), 64))
|
|
40471
41552
|
]),
|
|
40472
41553
|
_: 1
|
|
40473
|
-
}, 8, ["modelValue"])
|
|
41554
|
+
}, 8, ["modelValue", "append-to"])
|
|
40474
41555
|
]),
|
|
40475
41556
|
_: 1
|
|
40476
|
-
}, 8, ["label"
|
|
41557
|
+
}, 8, ["label"]),
|
|
40477
41558
|
createVNode(_component_N8nButton, {
|
|
40478
41559
|
"data-test-id": "data-store-add-column-submit-button",
|
|
40479
41560
|
type: "primary",
|
|
@@ -40487,112 +41568,45 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
40487
41568
|
]),
|
|
40488
41569
|
_: 1
|
|
40489
41570
|
}, 8, ["disabled"])
|
|
40490
|
-
]
|
|
40491
|
-
]
|
|
41571
|
+
])
|
|
41572
|
+
])
|
|
40492
41573
|
]),
|
|
40493
41574
|
_: 1
|
|
40494
|
-
}, 8, ["open"])
|
|
40495
|
-
]
|
|
41575
|
+
}, 8, ["id", "open"])
|
|
41576
|
+
])
|
|
40496
41577
|
]),
|
|
40497
41578
|
_: 1
|
|
40498
41579
|
}, 8, ["disabled", "content"]);
|
|
40499
41580
|
};
|
|
40500
41581
|
}
|
|
40501
41582
|
});
|
|
40502
|
-
const
|
|
40503
|
-
|
|
40504
|
-
wrapper: wrapper$1,
|
|
40505
|
-
"popover-content": "_popover-content_1s3y8_133",
|
|
40506
|
-
"popover-header": "_popover-header_1s3y8_139",
|
|
40507
|
-
"popover-body": "_popover-body_1s3y8_144",
|
|
40508
|
-
"option-content": "_option-content_1s3y8_151",
|
|
40509
|
-
"error-message": "_error-message_1s3y8_157",
|
|
40510
|
-
"error-tooltip": "_error-tooltip_1s3y8_164"
|
|
40511
|
-
};
|
|
40512
|
-
const cssModules$2 = {
|
|
40513
|
-
"$style": style0$2
|
|
40514
|
-
};
|
|
40515
|
-
const AddColumnPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$2]]);
|
|
40516
|
-
const _hoisted_1$2 = { class: "data-store-column-header-icon-wrapper" };
|
|
40517
|
-
const _hoisted_2$1 = {
|
|
40518
|
-
class: "ag-header-cell-text",
|
|
40519
|
-
"data-test-id": "data-store-column-header-text"
|
|
40520
|
-
};
|
|
40521
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
40522
|
-
__name: "ColumnHeader",
|
|
41583
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
41584
|
+
__name: "AddRowButton",
|
|
40523
41585
|
props: {
|
|
40524
41586
|
params: {}
|
|
40525
41587
|
},
|
|
40526
41588
|
setup(__props) {
|
|
40527
|
-
const props = __props;
|
|
40528
|
-
const { getIconForType, mapToDataStoreColumnType } = useDataStoreTypes();
|
|
40529
41589
|
const i18n = useI18n();
|
|
40530
|
-
const
|
|
40531
|
-
const isDropdownOpen = ref(false);
|
|
40532
|
-
const onItemClick = (action) => {
|
|
40533
|
-
if (action === "delete") {
|
|
40534
|
-
props.params.onDelete(props.params.column.getColId());
|
|
40535
|
-
}
|
|
40536
|
-
};
|
|
40537
|
-
const onMouseEnter = () => {
|
|
40538
|
-
isHovered.value = true;
|
|
40539
|
-
};
|
|
40540
|
-
const onMouseLeave = () => {
|
|
40541
|
-
isHovered.value = false;
|
|
40542
|
-
};
|
|
40543
|
-
const onDropdownVisibleChange = (visible) => {
|
|
40544
|
-
isDropdownOpen.value = visible;
|
|
40545
|
-
};
|
|
40546
|
-
const isDropdownVisible = computed(() => {
|
|
40547
|
-
return isHovered.value || isDropdownOpen.value;
|
|
40548
|
-
});
|
|
40549
|
-
const typeIcon = computed(() => {
|
|
40550
|
-
const cellDataType = props.params.column.getColDef().cellDataType;
|
|
40551
|
-
if (!isAGGridCellType(cellDataType)) {
|
|
40552
|
-
return null;
|
|
40553
|
-
}
|
|
40554
|
-
return getIconForType(mapToDataStoreColumnType(cellDataType));
|
|
40555
|
-
});
|
|
40556
|
-
const columnActionItems = [
|
|
40557
|
-
{
|
|
40558
|
-
id: "delete",
|
|
40559
|
-
label: i18n.baseText("dataStore.deleteColumn.confirm.title"),
|
|
40560
|
-
icon: "trash-2",
|
|
40561
|
-
customClass: "data-store-column-header-action-item"
|
|
40562
|
-
}
|
|
40563
|
-
];
|
|
41590
|
+
const props = __props;
|
|
40564
41591
|
return (_ctx, _cache) => {
|
|
40565
|
-
|
|
40566
|
-
|
|
40567
|
-
|
|
40568
|
-
|
|
40569
|
-
|
|
40570
|
-
|
|
40571
|
-
|
|
40572
|
-
|
|
40573
|
-
|
|
40574
|
-
|
|
40575
|
-
key: 0,
|
|
40576
|
-
icon: typeIcon.value
|
|
40577
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true),
|
|
40578
|
-
createBaseVNode("span", _hoisted_2$1, toDisplayString(props.params.displayName), 1)
|
|
41592
|
+
return openBlock(), createBlock(unref(Tooltip), {
|
|
41593
|
+
content: unref(i18n).baseText("dataStore.addRow.label")
|
|
41594
|
+
}, {
|
|
41595
|
+
default: withCtx(() => [
|
|
41596
|
+
createVNode(unref(_sfc_main$a), {
|
|
41597
|
+
text: "",
|
|
41598
|
+
type: "tertiary",
|
|
41599
|
+
icon: "plus",
|
|
41600
|
+
onClick: props.params.onClick
|
|
41601
|
+
}, null, 8, ["onClick"])
|
|
40579
41602
|
]),
|
|
40580
|
-
|
|
40581
|
-
|
|
40582
|
-
items: columnActionItems,
|
|
40583
|
-
placement: "bottom-start",
|
|
40584
|
-
"activator-icon": "ellipsis",
|
|
40585
|
-
onSelect: onItemClick,
|
|
40586
|
-
onVisibleChange: onDropdownVisibleChange
|
|
40587
|
-
}, null, 512), [
|
|
40588
|
-
[vShow, isDropdownVisible.value]
|
|
40589
|
-
])
|
|
40590
|
-
], 32);
|
|
41603
|
+
_: 1
|
|
41604
|
+
}, 8, ["content"]);
|
|
40591
41605
|
};
|
|
40592
41606
|
}
|
|
40593
41607
|
});
|
|
40594
|
-
const _hoisted_1$
|
|
40595
|
-
const _sfc_main$
|
|
41608
|
+
const _hoisted_1$2 = { class: "n8n-empty-value" };
|
|
41609
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
40596
41610
|
__name: "NullEmptyCellRenderer",
|
|
40597
41611
|
props: {
|
|
40598
41612
|
params: {}
|
|
@@ -40600,7 +41614,81 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
40600
41614
|
setup(__props) {
|
|
40601
41615
|
const props = __props;
|
|
40602
41616
|
return (_ctx, _cache) => {
|
|
40603
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
41617
|
+
return openBlock(), createElementBlock("span", _hoisted_1$2, toDisplayString(props.params.value), 1);
|
|
41618
|
+
};
|
|
41619
|
+
}
|
|
41620
|
+
});
|
|
41621
|
+
const _hoisted_1$1 = { class: "datastore-datepicker-wrapper" };
|
|
41622
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
41623
|
+
__name: "ElDatePickerCellEditor",
|
|
41624
|
+
props: {
|
|
41625
|
+
params: {}
|
|
41626
|
+
},
|
|
41627
|
+
setup(__props, { expose: __expose }) {
|
|
41628
|
+
const props = __props;
|
|
41629
|
+
const pickerRef = ref(null);
|
|
41630
|
+
const dateValue = ref(null);
|
|
41631
|
+
const initialValue = ref(null);
|
|
41632
|
+
const inputWidth = ref(props.params.column.getActualWidth() - 4);
|
|
41633
|
+
onMounted(async () => {
|
|
41634
|
+
const initial = props.params.value;
|
|
41635
|
+
if (initial === null || initial === void 0) {
|
|
41636
|
+
dateValue.value = null;
|
|
41637
|
+
} else if (initial instanceof Date) {
|
|
41638
|
+
const dt = DateTime.fromJSDate(initial);
|
|
41639
|
+
dateValue.value = dt.minus({ minutes: dt.offset }).toJSDate();
|
|
41640
|
+
}
|
|
41641
|
+
initialValue.value = dateValue.value;
|
|
41642
|
+
await nextTick();
|
|
41643
|
+
try {
|
|
41644
|
+
pickerRef.value?.focus?.();
|
|
41645
|
+
} catch {
|
|
41646
|
+
}
|
|
41647
|
+
});
|
|
41648
|
+
function onChange() {
|
|
41649
|
+
props.params.stopEditing();
|
|
41650
|
+
}
|
|
41651
|
+
function onClear() {
|
|
41652
|
+
dateValue.value = null;
|
|
41653
|
+
props.params.stopEditing();
|
|
41654
|
+
}
|
|
41655
|
+
function onKeydown(e) {
|
|
41656
|
+
if (e.key === "Escape") {
|
|
41657
|
+
e.stopPropagation();
|
|
41658
|
+
dateValue.value = initialValue.value;
|
|
41659
|
+
props.params.stopEditing();
|
|
41660
|
+
} else if (e.key === "Enter") {
|
|
41661
|
+
e.stopPropagation();
|
|
41662
|
+
props.params.stopEditing();
|
|
41663
|
+
}
|
|
41664
|
+
}
|
|
41665
|
+
__expose({
|
|
41666
|
+
getValue: () => {
|
|
41667
|
+
if (dateValue.value === null) return null;
|
|
41668
|
+
const dt = DateTime.fromJSDate(dateValue.value);
|
|
41669
|
+
return dt.plus({ minutes: dt.offset }).toJSDate();
|
|
41670
|
+
},
|
|
41671
|
+
isPopup: () => true
|
|
41672
|
+
});
|
|
41673
|
+
return (_ctx, _cache) => {
|
|
41674
|
+
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
41675
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
41676
|
+
createVNode(_component_el_date_picker, {
|
|
41677
|
+
ref_key: "pickerRef",
|
|
41678
|
+
ref: pickerRef,
|
|
41679
|
+
modelValue: dateValue.value,
|
|
41680
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dateValue.value = $event),
|
|
41681
|
+
type: "datetime",
|
|
41682
|
+
style: normalizeStyle({ width: `${inputWidth.value}px` }),
|
|
41683
|
+
clearable: true,
|
|
41684
|
+
editable: false,
|
|
41685
|
+
teleported: false,
|
|
41686
|
+
placeholder: "",
|
|
41687
|
+
onChange,
|
|
41688
|
+
onClear,
|
|
41689
|
+
onKeydown
|
|
41690
|
+
}, null, 8, ["modelValue", "style"])
|
|
41691
|
+
]);
|
|
40604
41692
|
};
|
|
40605
41693
|
}
|
|
40606
41694
|
});
|
|
@@ -40610,7 +41698,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40610
41698
|
dataStore: {}
|
|
40611
41699
|
},
|
|
40612
41700
|
emits: ["toggleSave"],
|
|
40613
|
-
setup(__props, { emit: __emit }) {
|
|
41701
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
40614
41702
|
ModuleRegistry.registerModules([
|
|
40615
41703
|
ValidationModule,
|
|
40616
41704
|
// This module allows us to see AG Grid errors in browser console
|
|
@@ -40624,45 +41712,63 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40624
41712
|
RenderApiModule,
|
|
40625
41713
|
DateEditorModule,
|
|
40626
41714
|
ClientSideRowModelApiModule,
|
|
40627
|
-
UndoRedoEditModule
|
|
41715
|
+
UndoRedoEditModule,
|
|
41716
|
+
CellStyleModule,
|
|
41717
|
+
PinnedRowModule,
|
|
41718
|
+
ScrollApiModule
|
|
40628
41719
|
]);
|
|
40629
41720
|
const props = __props;
|
|
40630
41721
|
const emit = __emit;
|
|
40631
41722
|
const i18n = useI18n();
|
|
40632
41723
|
const toast = useToast();
|
|
40633
41724
|
const message = useMessage();
|
|
40634
|
-
const {
|
|
41725
|
+
const { mapToAGCellType } = useDataStoreTypes();
|
|
40635
41726
|
const dataStoreStore = useDataStoreStore();
|
|
41727
|
+
const { copy: copyToClipboard } = useClipboard({ onPaste: onClipboardPaste });
|
|
40636
41728
|
const gridApi = ref(null);
|
|
40637
41729
|
const colDefs = ref([]);
|
|
40638
41730
|
const rowData = ref([]);
|
|
40639
41731
|
const rowSelection = {
|
|
40640
41732
|
mode: "multiRow",
|
|
40641
41733
|
enableClickSelection: false,
|
|
40642
|
-
checkboxes:
|
|
41734
|
+
checkboxes: (params) => params.data?.id !== ADD_ROW_ROW_ID,
|
|
41735
|
+
isRowSelectable: (params) => params.data?.id !== ADD_ROW_ROW_ID
|
|
40643
41736
|
};
|
|
41737
|
+
const currentSortBy = ref(DEFAULT_ID_COLUMN_NAME);
|
|
41738
|
+
const currentSortOrder = ref("asc");
|
|
40644
41739
|
const contentLoading = ref(false);
|
|
40645
41740
|
const lastFocusedCell = ref(null);
|
|
40646
41741
|
const isTextEditorOpen = ref(false);
|
|
40647
41742
|
const gridContainer = useTemplateRef("gridContainer");
|
|
40648
|
-
const defaultColumnDef = {
|
|
40649
|
-
flex: 1,
|
|
40650
|
-
sortable: false,
|
|
40651
|
-
filter: false
|
|
40652
|
-
};
|
|
40653
41743
|
const pageSizeOptions = [10, 20, 50];
|
|
40654
41744
|
const currentPage = ref(1);
|
|
40655
41745
|
const pageSize = ref(20);
|
|
40656
41746
|
const totalItems = ref(0);
|
|
40657
41747
|
const rows = ref([]);
|
|
41748
|
+
const selectedRowIds = ref(/* @__PURE__ */ new Set());
|
|
41749
|
+
const selectedCount = computed(() => selectedRowIds.value.size);
|
|
41750
|
+
const hasRecords = computed(() => rowData.value.length > 0);
|
|
40658
41751
|
const onGridReady = (params) => {
|
|
40659
41752
|
gridApi.value = params.api;
|
|
41753
|
+
if (gridContainer?.value) {
|
|
41754
|
+
params.api.setGridOption("popupParent", gridContainer.value);
|
|
41755
|
+
}
|
|
40660
41756
|
};
|
|
40661
41757
|
const refreshGridData = () => {
|
|
40662
|
-
if (gridApi.value)
|
|
40663
|
-
|
|
40664
|
-
|
|
40665
|
-
}
|
|
41758
|
+
if (!gridApi.value) return;
|
|
41759
|
+
gridApi.value.setGridOption("columnDefs", colDefs.value);
|
|
41760
|
+
gridApi.value.setGridOption("rowData", rowData.value);
|
|
41761
|
+
gridApi.value.setGridOption("pinnedBottomRowData", [{ id: ADD_ROW_ROW_ID }]);
|
|
41762
|
+
};
|
|
41763
|
+
const focusFirstEditableCell = (rowId) => {
|
|
41764
|
+
if (!gridApi.value) return;
|
|
41765
|
+
const rowNode = gridApi.value.getRowNode(String(rowId));
|
|
41766
|
+
if (rowNode?.rowIndex === null) return;
|
|
41767
|
+
const firstEditableCol = colDefs.value[1];
|
|
41768
|
+
if (!firstEditableCol?.colId) return;
|
|
41769
|
+
gridApi.value.ensureIndexVisible(rowNode.rowIndex);
|
|
41770
|
+
gridApi.value.setFocusedCell(rowNode.rowIndex, firstEditableCol.colId);
|
|
41771
|
+
gridApi.value.startEditingCell({ rowIndex: rowNode.rowIndex, colKey: firstEditableCol.colId });
|
|
40666
41772
|
};
|
|
40667
41773
|
const setCurrentPage = async (page) => {
|
|
40668
41774
|
currentPage.value = page;
|
|
@@ -40711,7 +41817,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40711
41817
|
refreshGridData();
|
|
40712
41818
|
}
|
|
40713
41819
|
};
|
|
40714
|
-
const onAddColumn = async (
|
|
41820
|
+
const onAddColumn = async (column) => {
|
|
40715
41821
|
try {
|
|
40716
41822
|
const newColumn = await dataStoreStore.addDataStoreColumn(
|
|
40717
41823
|
props.dataStore.id,
|
|
@@ -40721,13 +41827,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40721
41827
|
if (!newColumn) {
|
|
40722
41828
|
throw new Error(i18n.baseText("generic.unknownError"));
|
|
40723
41829
|
}
|
|
40724
|
-
colDefs.value = [
|
|
41830
|
+
colDefs.value = [
|
|
41831
|
+
...colDefs.value.slice(0, -1),
|
|
41832
|
+
createColumnDef(newColumn),
|
|
41833
|
+
...colDefs.value.slice(-1)
|
|
41834
|
+
];
|
|
40725
41835
|
rowData.value = rowData.value.map((row) => {
|
|
40726
|
-
return { ...row, [newColumn.name]:
|
|
41836
|
+
return { ...row, [newColumn.name]: null };
|
|
40727
41837
|
});
|
|
40728
41838
|
refreshGridData();
|
|
41839
|
+
return true;
|
|
40729
41840
|
} catch (error) {
|
|
40730
41841
|
toast.showError(error, i18n.baseText("dataStore.addColumn.error"));
|
|
41842
|
+
return false;
|
|
40731
41843
|
}
|
|
40732
41844
|
};
|
|
40733
41845
|
const createColumnDef = (col, extraProps = {}) => {
|
|
@@ -40735,13 +41847,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40735
41847
|
colId: col.id,
|
|
40736
41848
|
field: col.name,
|
|
40737
41849
|
headerName: col.name,
|
|
40738
|
-
|
|
41850
|
+
sortable: true,
|
|
41851
|
+
flex: 1,
|
|
41852
|
+
editable: (params) => params.data?.id !== ADD_ROW_ROW_ID,
|
|
40739
41853
|
resizable: true,
|
|
40740
41854
|
lockPinned: true,
|
|
40741
|
-
headerComponent: _sfc_main$
|
|
41855
|
+
headerComponent: _sfc_main$6,
|
|
41856
|
+
headerComponentParams: { onDelete: onDeleteColumn, allowMenuActions: true },
|
|
40742
41857
|
cellEditorPopup: false,
|
|
40743
|
-
headerComponentParams: { onDelete: onDeleteColumn },
|
|
40744
41858
|
cellDataType: mapToAGCellType(col.type),
|
|
41859
|
+
cellClass: (params) => {
|
|
41860
|
+
if (params.data?.id === ADD_ROW_ROW_ID) {
|
|
41861
|
+
return "add-row-cell";
|
|
41862
|
+
}
|
|
41863
|
+
if (params.column.getUserProvidedColDef()?.cellDataType === "boolean") {
|
|
41864
|
+
return "boolean-cell";
|
|
41865
|
+
}
|
|
41866
|
+
return "";
|
|
41867
|
+
},
|
|
40745
41868
|
valueGetter: (params) => {
|
|
40746
41869
|
if (params.data?.[col.name] === null || params.data?.[col.name] === void 0) {
|
|
40747
41870
|
return null;
|
|
@@ -40755,23 +41878,30 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40755
41878
|
return params.data?.[col.name];
|
|
40756
41879
|
},
|
|
40757
41880
|
cellRendererSelector: (params) => {
|
|
41881
|
+
if (params.data?.id === ADD_ROW_ROW_ID || col.id === "add-column") {
|
|
41882
|
+
return {};
|
|
41883
|
+
}
|
|
40758
41884
|
let rowValue = params.data?.[col.name];
|
|
40759
41885
|
if (rowValue === void 0) {
|
|
40760
41886
|
rowValue = null;
|
|
40761
41887
|
}
|
|
40762
41888
|
if (rowValue === null) {
|
|
40763
|
-
return { component: _sfc_main$
|
|
41889
|
+
return { component: _sfc_main$3, params: { value: NULL_VALUE } };
|
|
40764
41890
|
}
|
|
40765
41891
|
if (rowValue === "") {
|
|
40766
|
-
return { component: _sfc_main$
|
|
41892
|
+
return { component: _sfc_main$3, params: { value: EMPTY_VALUE } };
|
|
40767
41893
|
}
|
|
40768
41894
|
return void 0;
|
|
40769
41895
|
}
|
|
40770
41896
|
};
|
|
40771
41897
|
if (col.type === "string") {
|
|
40772
41898
|
columnDef.cellEditor = "agLargeTextCellEditor";
|
|
41899
|
+
columnDef.cellEditorPopup = true;
|
|
41900
|
+
columnDef.cellEditorPopupPosition = "over";
|
|
40773
41901
|
columnDef.cellEditorParams = (params) => ({
|
|
40774
|
-
value: params.value ?? ""
|
|
41902
|
+
value: params.value ?? "",
|
|
41903
|
+
// Rely on the backend to limit the length of the value
|
|
41904
|
+
maxLength: 999999999
|
|
40775
41905
|
});
|
|
40776
41906
|
columnDef.valueSetter = (params) => {
|
|
40777
41907
|
let originalValue = params.data[col.name];
|
|
@@ -40793,8 +41923,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40793
41923
|
};
|
|
40794
41924
|
}
|
|
40795
41925
|
if (col.type === "date") {
|
|
40796
|
-
columnDef.
|
|
40797
|
-
|
|
41926
|
+
columnDef.cellEditorSelector = () => ({
|
|
41927
|
+
component: _sfc_main$2
|
|
41928
|
+
});
|
|
41929
|
+
columnDef.valueFormatter = (params) => {
|
|
41930
|
+
const value = params.value;
|
|
41931
|
+
if (value === null || value === void 0) return "";
|
|
41932
|
+
return value.toISOString();
|
|
41933
|
+
};
|
|
40798
41934
|
}
|
|
40799
41935
|
return {
|
|
40800
41936
|
...columnDef,
|
|
@@ -40811,8 +41947,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40811
41947
|
props.dataStore.id,
|
|
40812
41948
|
props.dataStore.projectId,
|
|
40813
41949
|
moveEvent.column.getColId(),
|
|
40814
|
-
moveEvent.toIndex -
|
|
41950
|
+
moveEvent.toIndex - 2
|
|
41951
|
+
// ag grid index start from 1 and also we need to account for the id column
|
|
40815
41952
|
);
|
|
41953
|
+
const fromIndex = oldIndex - 1;
|
|
41954
|
+
const toIndex = moveEvent.toIndex - 2;
|
|
41955
|
+
const middleWithIndex = colDefs.value.slice(1, -1).map((col, index) => ({ ...col, index }));
|
|
41956
|
+
const reorderedMiddle = reorderItem(middleWithIndex, fromIndex, toIndex).sort((a, b) => a.index - b.index).map(({ index, ...col }) => col);
|
|
41957
|
+
colDefs.value = [colDefs.value[0], ...reorderedMiddle, colDefs.value[colDefs.value.length - 1]];
|
|
41958
|
+
refreshGridData();
|
|
40816
41959
|
} catch (error) {
|
|
40817
41960
|
toast.showError(error, i18n.baseText("dataStore.moveColumn.error"));
|
|
40818
41961
|
gridApi.value?.moveColumnByIndex(moveEvent.toIndex, oldIndex);
|
|
@@ -40820,17 +41963,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40820
41963
|
};
|
|
40821
41964
|
const onAddRowClick = async () => {
|
|
40822
41965
|
try {
|
|
40823
|
-
if (currentPage.value * pageSize.value < totalItems.value) {
|
|
40824
|
-
await setCurrentPage(Math.ceil(totalItems.value / pageSize.value));
|
|
41966
|
+
if (currentPage.value * pageSize.value < totalItems.value + 1) {
|
|
41967
|
+
await setCurrentPage(Math.ceil((totalItems.value + 1) / pageSize.value));
|
|
40825
41968
|
}
|
|
40826
41969
|
contentLoading.value = true;
|
|
40827
41970
|
emit("toggleSave", true);
|
|
40828
|
-
const
|
|
40829
|
-
const newRow =
|
|
40830
|
-
|
|
40831
|
-
|
|
40832
|
-
|
|
40833
|
-
|
|
41971
|
+
const insertedRow = await dataStoreStore.insertEmptyRow(props.dataStore);
|
|
41972
|
+
const newRow = insertedRow;
|
|
41973
|
+
rowData.value.push(newRow);
|
|
41974
|
+
totalItems.value += 1;
|
|
41975
|
+
refreshGridData();
|
|
41976
|
+
await nextTick();
|
|
41977
|
+
focusFirstEditableCell(newRow.id);
|
|
40834
41978
|
} catch (error) {
|
|
40835
41979
|
toast.showError(error, i18n.baseText("dataStore.addRow.error"));
|
|
40836
41980
|
} finally {
|
|
@@ -40839,6 +41983,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40839
41983
|
}
|
|
40840
41984
|
};
|
|
40841
41985
|
const initColumnDefinitions = () => {
|
|
41986
|
+
const systemDateColumnOptions = {
|
|
41987
|
+
editable: false,
|
|
41988
|
+
suppressMovable: true,
|
|
41989
|
+
lockPinned: true,
|
|
41990
|
+
lockPosition: "right",
|
|
41991
|
+
headerComponentParams: {
|
|
41992
|
+
allowMenuActions: false
|
|
41993
|
+
}
|
|
41994
|
+
};
|
|
40842
41995
|
colDefs.value = [
|
|
40843
41996
|
// Always add the ID column, it's not returned by the back-end but all data stores have it
|
|
40844
41997
|
// We use it as a placeholder for new datastores
|
|
@@ -40850,13 +42003,62 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40850
42003
|
},
|
|
40851
42004
|
{
|
|
40852
42005
|
editable: false,
|
|
42006
|
+
sortable: false,
|
|
40853
42007
|
suppressMovable: true,
|
|
40854
42008
|
headerComponent: null,
|
|
40855
|
-
lockPosition: true
|
|
42009
|
+
lockPosition: true,
|
|
42010
|
+
minWidth: DATA_STORE_ID_COLUMN_WIDTH,
|
|
42011
|
+
maxWidth: DATA_STORE_ID_COLUMN_WIDTH,
|
|
42012
|
+
resizable: false,
|
|
42013
|
+
cellClass: (params) => params.data?.id === ADD_ROW_ROW_ID ? "add-row-cell" : "id-column",
|
|
42014
|
+
cellRendererSelector: (params) => {
|
|
42015
|
+
if (params.value === ADD_ROW_ROW_ID) {
|
|
42016
|
+
return {
|
|
42017
|
+
component: _sfc_main$4,
|
|
42018
|
+
params: { onClick: onAddRowClick }
|
|
42019
|
+
};
|
|
42020
|
+
}
|
|
42021
|
+
return void 0;
|
|
42022
|
+
}
|
|
40856
42023
|
}
|
|
40857
42024
|
),
|
|
40858
42025
|
// Append other columns
|
|
40859
|
-
...orderBy(props.dataStore.columns, "index").map((col) => createColumnDef(col))
|
|
42026
|
+
...orderBy(props.dataStore.columns, "index").map((col) => createColumnDef(col)),
|
|
42027
|
+
createColumnDef(
|
|
42028
|
+
{
|
|
42029
|
+
index: props.dataStore.columns.length + 1,
|
|
42030
|
+
id: "createdAt",
|
|
42031
|
+
name: "createdAt",
|
|
42032
|
+
type: "date"
|
|
42033
|
+
},
|
|
42034
|
+
systemDateColumnOptions
|
|
42035
|
+
),
|
|
42036
|
+
createColumnDef(
|
|
42037
|
+
{
|
|
42038
|
+
index: props.dataStore.columns.length + 2,
|
|
42039
|
+
id: "updatedAt",
|
|
42040
|
+
name: "updatedAt",
|
|
42041
|
+
type: "date"
|
|
42042
|
+
},
|
|
42043
|
+
systemDateColumnOptions
|
|
42044
|
+
),
|
|
42045
|
+
createColumnDef(
|
|
42046
|
+
{
|
|
42047
|
+
index: props.dataStore.columns.length + 3,
|
|
42048
|
+
id: "add-column",
|
|
42049
|
+
name: "Add Column",
|
|
42050
|
+
type: "string"
|
|
42051
|
+
},
|
|
42052
|
+
{
|
|
42053
|
+
editable: false,
|
|
42054
|
+
suppressMovable: true,
|
|
42055
|
+
lockPinned: true,
|
|
42056
|
+
lockPosition: "right",
|
|
42057
|
+
resizable: false,
|
|
42058
|
+
headerComponent: _sfc_main$5,
|
|
42059
|
+
headerComponentParams: { onAddColumn }
|
|
42060
|
+
}
|
|
42061
|
+
)
|
|
40860
42062
|
];
|
|
40861
42063
|
};
|
|
40862
42064
|
const onCellValueChanged = async (params) => {
|
|
@@ -40889,7 +42091,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40889
42091
|
const onCellClicked = (params) => {
|
|
40890
42092
|
const clickedCellColumn = params.column.getColId();
|
|
40891
42093
|
const clickedCellRow = params.rowIndex;
|
|
40892
|
-
if (clickedCellRow === null)
|
|
42094
|
+
if (clickedCellRow === null || params.api.isEditing({ rowIndex: clickedCellRow, column: params.column, rowPinned: null }))
|
|
42095
|
+
return;
|
|
40893
42096
|
const wasAlreadyFocused = lastFocusedCell.value && lastFocusedCell.value.rowIndex === clickedCellRow && lastFocusedCell.value.colId === clickedCellColumn;
|
|
40894
42097
|
if (wasAlreadyFocused && params.column.getColDef()?.editable) {
|
|
40895
42098
|
params.api.startEditingCell({
|
|
@@ -40909,11 +42112,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40909
42112
|
props.dataStore.id,
|
|
40910
42113
|
props.dataStore.projectId,
|
|
40911
42114
|
currentPage.value,
|
|
40912
|
-
pageSize.value
|
|
42115
|
+
pageSize.value,
|
|
42116
|
+
`${currentSortBy.value}:${currentSortOrder.value}`
|
|
40913
42117
|
);
|
|
40914
|
-
|
|
42118
|
+
rowData.value = fetchedRows.data;
|
|
40915
42119
|
totalItems.value = fetchedRows.count;
|
|
40916
|
-
|
|
42120
|
+
refreshGridData();
|
|
42121
|
+
handleClearSelection();
|
|
40917
42122
|
} catch (error) {
|
|
40918
42123
|
toast.showError(error, i18n.baseText("dataStore.fetchContent.error"));
|
|
40919
42124
|
} finally {
|
|
@@ -40925,7 +42130,34 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40925
42130
|
};
|
|
40926
42131
|
onClickOutside(gridContainer, () => {
|
|
40927
42132
|
resetLastFocusedCell();
|
|
42133
|
+
gridApi.value?.clearFocusedCell();
|
|
40928
42134
|
});
|
|
42135
|
+
function onClipboardPaste(data) {
|
|
42136
|
+
if (!gridApi.value) return;
|
|
42137
|
+
const focusedCell = gridApi.value.getFocusedCell();
|
|
42138
|
+
const isEditing2 = gridApi.value.getEditingCells().length > 0;
|
|
42139
|
+
if (!focusedCell || isEditing2) return;
|
|
42140
|
+
const row = gridApi.value.getDisplayedRowAtIndex(focusedCell.rowIndex);
|
|
42141
|
+
if (!row) return;
|
|
42142
|
+
const colDef = focusedCell.column.getColDef();
|
|
42143
|
+
if (colDef.cellDataType === "text") {
|
|
42144
|
+
row.setDataValue(focusedCell.column.getColId(), data);
|
|
42145
|
+
} else if (colDef.cellDataType === "number") {
|
|
42146
|
+
if (!Number.isNaN(Number(data))) {
|
|
42147
|
+
row.setDataValue(focusedCell.column.getColId(), Number(data));
|
|
42148
|
+
}
|
|
42149
|
+
} else if (colDef.cellDataType === "date") {
|
|
42150
|
+
if (!Number.isNaN(Date.parse(data))) {
|
|
42151
|
+
row.setDataValue(focusedCell.column.getColId(), new Date(data));
|
|
42152
|
+
}
|
|
42153
|
+
} else if (colDef.cellDataType === "boolean") {
|
|
42154
|
+
if (data === "true") {
|
|
42155
|
+
row.setDataValue(focusedCell.column.getColId(), true);
|
|
42156
|
+
} else if (data === "false") {
|
|
42157
|
+
row.setDataValue(focusedCell.column.getColId(), false);
|
|
42158
|
+
}
|
|
42159
|
+
}
|
|
42160
|
+
}
|
|
40929
42161
|
const resetLastFocusedCell = () => {
|
|
40930
42162
|
lastFocusedCell.value = null;
|
|
40931
42163
|
};
|
|
@@ -40933,6 +42165,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40933
42165
|
initColumnDefinitions();
|
|
40934
42166
|
await fetchDataStoreContent();
|
|
40935
42167
|
};
|
|
42168
|
+
const onSortChanged2 = async (event) => {
|
|
42169
|
+
const oldSortBy = currentSortBy.value;
|
|
42170
|
+
const oldSortOrder = currentSortOrder.value;
|
|
42171
|
+
const sortedColumn = event.columns?.filter((col) => col.getSort() !== null).pop() ?? null;
|
|
42172
|
+
if (sortedColumn) {
|
|
42173
|
+
const colId = sortedColumn.getColId();
|
|
42174
|
+
const columnDef = colDefs.value.find((col) => col.colId === colId);
|
|
42175
|
+
currentSortBy.value = columnDef?.field || colId;
|
|
42176
|
+
currentSortOrder.value = sortedColumn.getSort() ?? "asc";
|
|
42177
|
+
} else {
|
|
42178
|
+
currentSortBy.value = DEFAULT_ID_COLUMN_NAME;
|
|
42179
|
+
currentSortOrder.value = "asc";
|
|
42180
|
+
}
|
|
42181
|
+
if (oldSortBy !== currentSortBy.value || oldSortOrder !== currentSortOrder.value) {
|
|
42182
|
+
currentPage.value = 1;
|
|
42183
|
+
await fetchDataStoreContent();
|
|
42184
|
+
}
|
|
42185
|
+
};
|
|
40936
42186
|
onMounted(async () => {
|
|
40937
42187
|
await initialize();
|
|
40938
42188
|
});
|
|
@@ -40948,9 +42198,91 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40948
42198
|
isTextEditorOpen.value = false;
|
|
40949
42199
|
}
|
|
40950
42200
|
};
|
|
42201
|
+
const onSelectionChanged = () => {
|
|
42202
|
+
if (!gridApi.value) return;
|
|
42203
|
+
const selectedNodes = gridApi.value.getSelectedNodes();
|
|
42204
|
+
const newSelectedIds = /* @__PURE__ */ new Set();
|
|
42205
|
+
selectedNodes.forEach((node) => {
|
|
42206
|
+
if (typeof node.data?.id === "number") {
|
|
42207
|
+
newSelectedIds.add(node.data.id);
|
|
42208
|
+
}
|
|
42209
|
+
});
|
|
42210
|
+
selectedRowIds.value = newSelectedIds;
|
|
42211
|
+
};
|
|
42212
|
+
const onCellKeyDown = async (params) => {
|
|
42213
|
+
if (params.api.getEditingCells().length > 0) {
|
|
42214
|
+
return;
|
|
42215
|
+
}
|
|
42216
|
+
const event = params.event;
|
|
42217
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c") {
|
|
42218
|
+
event.preventDefault();
|
|
42219
|
+
await handleCopyFocusedCell(params);
|
|
42220
|
+
return;
|
|
42221
|
+
}
|
|
42222
|
+
if (event.key !== "Delete" && event.key !== "Backspace" || selectedRowIds.value.size === 0) {
|
|
42223
|
+
return;
|
|
42224
|
+
}
|
|
42225
|
+
event.preventDefault();
|
|
42226
|
+
await handleDeleteSelected();
|
|
42227
|
+
};
|
|
42228
|
+
const handleCopyFocusedCell = async (params) => {
|
|
42229
|
+
const focused = params.api.getFocusedCell();
|
|
42230
|
+
if (!focused) {
|
|
42231
|
+
return;
|
|
42232
|
+
}
|
|
42233
|
+
const row = params.api.getDisplayedRowAtIndex(focused.rowIndex);
|
|
42234
|
+
const colDef = focused.column.getColDef();
|
|
42235
|
+
if (row?.data && colDef.field) {
|
|
42236
|
+
const rawValue = row.data[colDef.field];
|
|
42237
|
+
const text = rawValue === null || rawValue === void 0 ? "" : String(rawValue);
|
|
42238
|
+
await copyToClipboard(text);
|
|
42239
|
+
}
|
|
42240
|
+
};
|
|
42241
|
+
const handleDeleteSelected = async () => {
|
|
42242
|
+
if (selectedRowIds.value.size === 0) return;
|
|
42243
|
+
const confirmResponse = await message.confirm(
|
|
42244
|
+
i18n.baseText("dataStore.deleteRows.confirmation", {
|
|
42245
|
+
adjustToNumber: selectedRowIds.value.size,
|
|
42246
|
+
interpolate: { count: selectedRowIds.value.size }
|
|
42247
|
+
}),
|
|
42248
|
+
i18n.baseText("dataStore.deleteRows.title"),
|
|
42249
|
+
{
|
|
42250
|
+
confirmButtonText: i18n.baseText("generic.delete"),
|
|
42251
|
+
cancelButtonText: i18n.baseText("generic.cancel")
|
|
42252
|
+
}
|
|
42253
|
+
);
|
|
42254
|
+
if (confirmResponse !== MODAL_CONFIRM) {
|
|
42255
|
+
return;
|
|
42256
|
+
}
|
|
42257
|
+
try {
|
|
42258
|
+
emit("toggleSave", true);
|
|
42259
|
+
const idsToDelete = Array.from(selectedRowIds.value);
|
|
42260
|
+
await dataStoreStore.deleteRows(props.dataStore.id, props.dataStore.projectId, idsToDelete);
|
|
42261
|
+
rows.value = rows.value.filter((row) => !selectedRowIds.value.has(row.id));
|
|
42262
|
+
rowData.value = rows.value;
|
|
42263
|
+
await fetchDataStoreContent();
|
|
42264
|
+
toast.showToast({
|
|
42265
|
+
title: i18n.baseText("dataStore.deleteRows.success"),
|
|
42266
|
+
message: "",
|
|
42267
|
+
type: "success"
|
|
42268
|
+
});
|
|
42269
|
+
} catch (error) {
|
|
42270
|
+
toast.showError(error, i18n.baseText("dataStore.deleteRows.error"));
|
|
42271
|
+
} finally {
|
|
42272
|
+
emit("toggleSave", false);
|
|
42273
|
+
}
|
|
42274
|
+
};
|
|
42275
|
+
const handleClearSelection = () => {
|
|
42276
|
+
selectedRowIds.value = /* @__PURE__ */ new Set();
|
|
42277
|
+
if (gridApi.value) {
|
|
42278
|
+
gridApi.value.deselectAll();
|
|
42279
|
+
}
|
|
42280
|
+
};
|
|
42281
|
+
__expose({
|
|
42282
|
+
addRow: onAddRowClick,
|
|
42283
|
+
addColumn: onAddColumn
|
|
42284
|
+
});
|
|
40951
42285
|
return (_ctx, _cache) => {
|
|
40952
|
-
const _component_n8n_icon_button = _sfc_main$8;
|
|
40953
|
-
const _component_n8n_tooltip = Tooltip;
|
|
40954
42286
|
const _component_el_pagination = resolveComponent("el-pagination");
|
|
40955
42287
|
return openBlock(), createElementBlock("div", {
|
|
40956
42288
|
class: normalizeClass(_ctx.$style.wrapper)
|
|
@@ -40958,17 +42290,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40958
42290
|
createBaseVNode("div", {
|
|
40959
42291
|
ref_key: "gridContainer",
|
|
40960
42292
|
ref: gridContainer,
|
|
40961
|
-
class: normalizeClass(_ctx.$style["grid-container"]),
|
|
42293
|
+
class: normalizeClass([_ctx.$style["grid-container"], { [_ctx.$style["has-records"]]: hasRecords.value }]),
|
|
40962
42294
|
"data-test-id": "data-store-grid"
|
|
40963
42295
|
}, [
|
|
40964
42296
|
createVNode(unref(Be), {
|
|
40965
42297
|
style: { "width": "100%" },
|
|
40966
|
-
"row-data": rowData.value,
|
|
40967
|
-
"column-defs": colDefs.value,
|
|
40968
|
-
"default-col-def": defaultColumnDef,
|
|
40969
42298
|
"dom-layout": "autoHeight",
|
|
40970
|
-
"row-height":
|
|
40971
|
-
"header-height":
|
|
42299
|
+
"row-height": unref(DATA_STORE_ROW_HEIGHT),
|
|
42300
|
+
"header-height": unref(DATA_STORE_HEADER_HEIGHT),
|
|
40972
42301
|
"animate-rows": false,
|
|
40973
42302
|
theme: unref(n8nTheme),
|
|
40974
42303
|
"suppress-drag-leave-hides-columns": true,
|
|
@@ -40977,6 +42306,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40977
42306
|
"get-row-id": (params) => String(params.data.id),
|
|
40978
42307
|
"stop-editing-when-cells-lose-focus": true,
|
|
40979
42308
|
"undo-redo-cell-editing": true,
|
|
42309
|
+
"suppress-multi-sort": true,
|
|
40980
42310
|
onGridReady,
|
|
40981
42311
|
onCellValueChanged,
|
|
40982
42312
|
onColumnMoved,
|
|
@@ -40984,31 +42314,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
40984
42314
|
onCellEditingStarted,
|
|
40985
42315
|
onCellEditingStopped,
|
|
40986
42316
|
onColumnHeaderClicked: resetLastFocusedCell,
|
|
40987
|
-
onSelectionChanged
|
|
40988
|
-
|
|
40989
|
-
|
|
40990
|
-
|
|
40991
|
-
class: normalizeClass(_ctx.$style["add-column-popover"]),
|
|
40992
|
-
onAddColumn
|
|
40993
|
-
}, null, 8, ["data-store", "class"])
|
|
42317
|
+
onSelectionChanged,
|
|
42318
|
+
onSortChanged: onSortChanged2,
|
|
42319
|
+
onCellKeyDown
|
|
42320
|
+
}, null, 8, ["row-height", "header-height", "theme", "loading", "get-row-id"])
|
|
40994
42321
|
], 2),
|
|
40995
42322
|
createBaseVNode("div", {
|
|
40996
42323
|
class: normalizeClass(_ctx.$style.footer)
|
|
40997
42324
|
}, [
|
|
40998
|
-
createVNode(_component_n8n_tooltip, {
|
|
40999
|
-
content: unref(i18n).baseText("dataStore.addRow.label")
|
|
41000
|
-
}, {
|
|
41001
|
-
default: withCtx(() => [
|
|
41002
|
-
createVNode(_component_n8n_icon_button, {
|
|
41003
|
-
"data-test-id": "data-store-add-row-button",
|
|
41004
|
-
icon: "plus",
|
|
41005
|
-
class: "mb-xl",
|
|
41006
|
-
type: "secondary",
|
|
41007
|
-
onClick: onAddRowClick
|
|
41008
|
-
})
|
|
41009
|
-
]),
|
|
41010
|
-
_: 1
|
|
41011
|
-
}, 8, ["content"]),
|
|
41012
42325
|
createVNode(_component_el_pagination, {
|
|
41013
42326
|
"current-page": currentPage.value,
|
|
41014
42327
|
"onUpdate:currentPage": [
|
|
@@ -41024,17 +42337,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
41024
42337
|
layout: "total, prev, pager, next, sizes",
|
|
41025
42338
|
onSizeChange: setPageSize
|
|
41026
42339
|
}, null, 8, ["current-page", "page-size", "total"])
|
|
41027
|
-
], 2)
|
|
42340
|
+
], 2),
|
|
42341
|
+
createVNode(SelectedItemsInfo, {
|
|
42342
|
+
"selected-count": selectedCount.value,
|
|
42343
|
+
onDeleteSelected: handleDeleteSelected,
|
|
42344
|
+
onClearSelection: handleClearSelection
|
|
42345
|
+
}, null, 8, ["selected-count"])
|
|
41028
42346
|
], 2);
|
|
41029
42347
|
};
|
|
41030
42348
|
}
|
|
41031
42349
|
});
|
|
41032
|
-
const wrapper = "
|
|
41033
|
-
const footer = "
|
|
42350
|
+
const wrapper = "_wrapper_1bnk4_123";
|
|
42351
|
+
const footer = "_footer_1bnk4_241";
|
|
41034
42352
|
const style0$1 = {
|
|
41035
42353
|
wrapper,
|
|
41036
|
-
"grid-container": "_grid-
|
|
41037
|
-
"
|
|
42354
|
+
"grid-container": "_grid-container_1bnk4_130",
|
|
42355
|
+
"has-records": "_has-records_1bnk4_234",
|
|
41038
42356
|
footer
|
|
41039
42357
|
};
|
|
41040
42358
|
const cssModules$1 = {
|
|
@@ -41062,6 +42380,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41062
42380
|
const loading = ref(false);
|
|
41063
42381
|
const saving2 = ref(false);
|
|
41064
42382
|
const dataStore = ref(null);
|
|
42383
|
+
const dataStoreTableRef = ref();
|
|
41065
42384
|
const { debounce } = useDebounce();
|
|
41066
42385
|
const showErrorAndGoBackToList = async (error) => {
|
|
41067
42386
|
if (!(error instanceof Error)) {
|
|
@@ -41105,14 +42424,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41105
42424
|
debouncedHideSaving();
|
|
41106
42425
|
}
|
|
41107
42426
|
};
|
|
42427
|
+
const onAddColumn = async (column) => {
|
|
42428
|
+
if (!dataStoreTableRef.value) {
|
|
42429
|
+
return false;
|
|
42430
|
+
}
|
|
42431
|
+
return await dataStoreTableRef.value.addColumn(column);
|
|
42432
|
+
};
|
|
41108
42433
|
onMounted(async () => {
|
|
41109
42434
|
documentTitle.set(i18n.baseText("dataStore.dataStores"));
|
|
41110
42435
|
await initialize();
|
|
41111
42436
|
});
|
|
41112
42437
|
return (_ctx, _cache) => {
|
|
41113
42438
|
const _component_n8n_loading = N8nLoading;
|
|
41114
|
-
const _component_n8n_spinner = _sfc_main$
|
|
42439
|
+
const _component_n8n_spinner = _sfc_main$b;
|
|
41115
42440
|
const _component_n8n_text = N8nText;
|
|
42441
|
+
const _component_n8n_button = N8nButton;
|
|
41116
42442
|
return openBlock(), createElementBlock("div", {
|
|
41117
42443
|
class: normalizeClass(_ctx.$style["data-store-details-view"])
|
|
41118
42444
|
}, [
|
|
@@ -41146,12 +42472,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41146
42472
|
]),
|
|
41147
42473
|
_: 1
|
|
41148
42474
|
})
|
|
41149
|
-
], 2)) : createCommentVNode("", true)
|
|
42475
|
+
], 2)) : createCommentVNode("", true),
|
|
42476
|
+
createBaseVNode("div", {
|
|
42477
|
+
class: normalizeClass(_ctx.$style.actions)
|
|
42478
|
+
}, [
|
|
42479
|
+
createVNode(_component_n8n_button, {
|
|
42480
|
+
onClick: dataStoreTableRef.value?.addRow
|
|
42481
|
+
}, {
|
|
42482
|
+
default: withCtx(() => [
|
|
42483
|
+
createTextVNode(toDisplayString(unref(i18n).baseText("dataStore.addRow.label")), 1)
|
|
42484
|
+
]),
|
|
42485
|
+
_: 1
|
|
42486
|
+
}, 8, ["onClick"]),
|
|
42487
|
+
createVNode(_sfc_main$5, {
|
|
42488
|
+
"use-text-trigger": true,
|
|
42489
|
+
"popover-id": "ds-details-add-column-popover",
|
|
42490
|
+
params: { onAddColumn }
|
|
42491
|
+
}, null, 8, ["params"])
|
|
42492
|
+
], 2)
|
|
41150
42493
|
], 2),
|
|
41151
42494
|
createBaseVNode("div", {
|
|
41152
42495
|
class: normalizeClass(_ctx.$style.content)
|
|
41153
42496
|
}, [
|
|
41154
42497
|
createVNode(DataStoreTable, {
|
|
42498
|
+
ref_key: "dataStoreTableRef",
|
|
42499
|
+
ref: dataStoreTableRef,
|
|
41155
42500
|
"data-store": dataStore.value,
|
|
41156
42501
|
onToggleSave
|
|
41157
42502
|
}, null, 8, ["data-store"])
|
|
@@ -41161,13 +42506,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41161
42506
|
};
|
|
41162
42507
|
}
|
|
41163
42508
|
});
|
|
41164
|
-
const header = "
|
|
41165
|
-
const saving = "
|
|
42509
|
+
const header = "_header_a2zz6_132";
|
|
42510
|
+
const saving = "_saving_a2zz6_147";
|
|
42511
|
+
const actions = "_actions_a2zz6_154";
|
|
41166
42512
|
const style0 = {
|
|
41167
|
-
"data-store-details-view": "_data-store-details-
|
|
41168
|
-
"header-loading": "_header-
|
|
42513
|
+
"data-store-details-view": "_data-store-details-view_a2zz6_123",
|
|
42514
|
+
"header-loading": "_header-loading_a2zz6_132",
|
|
41169
42515
|
header,
|
|
41170
|
-
saving
|
|
42516
|
+
saving,
|
|
42517
|
+
actions
|
|
41171
42518
|
};
|
|
41172
42519
|
const cssModules = {
|
|
41173
42520
|
"$style": style0
|