slickgrid-vue 9.3.0 → 9.5.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/README.md CHANGED
@@ -74,7 +74,7 @@ const gridOptions = ref<GridOption>({ /*...*/ }); // optional grid options
74
74
  ### Like it? ⭐ it
75
75
  You like **Slickgrid-Vue**? Be sure to upvote ⭐ the project, and perhaps support me with caffeine [☕](https://ko-fi.com/ghiscoding) or sponsor me on GitHub. Any contributions are also very welcome. Thanks
76
76
 
77
- <a href='https://ko-fi.com/ghiscoding' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi3.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
77
+ <a href='https://ko-fi.com/ghiscoding' target='_blank'><img height='36' width='140' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi3.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
78
78
 
79
79
  ## Latest News & Releases
80
80
  Check out the [Releases](https://github.com/ghiscoding/slickgrid-universal/releases) section for all latest News & Releases.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { EventPubSubService as ze } from "@slickgrid-universal/event-pub-sub";
2
- import { EventPubSubService as kn } from "@slickgrid-universal/event-pub-sub";
3
- import { unsubscribeAll as xt, createDomElement as He, SlickRowSelectionModel as kt, SlickEventData as Pt, DelimiterType as Tt, EventNamingStyle as we, Filters as Ft, SlickgridConfig as Vt, SlickEventHandler as _t, BackendUtilityService as Mt, GridEventService as Bt, SharedService as Gt, CollectionService as zt, ExtensionUtility as Ht, FilterFactory as Lt, FilterService as Nt, ResizerService as Wt, SortService as Kt, TreeDataService as Le, PaginationService as Ut, ExtensionService as $t, GridService as Ne, GridStateService as We, HeaderGroupingService as Ke, SlickGroupItemMetadataProvider as qt, SlickDataView as jt, autoAddEditorFormatterToColumnsWithEditor as Ue, SlickGrid as Yt, emptyElement as Jt, collectionObserver as Xt, ExtensionName as $e, isColumnDateType as Qt } from "@slickgrid-universal/common";
2
+ import { EventPubSubService as Pn } from "@slickgrid-universal/event-pub-sub";
3
+ import { unsubscribeAll as It, createDomElement as He, SlickRowSelectionModel as xt, SlickEventData as kt, DelimiterType as Pt, EventNamingStyle as we, Filters as Tt, SlickgridConfig as Ft, SlickEventHandler as Vt, BackendUtilityService as _t, GridEventService as Mt, SharedService as Bt, CollectionService as Gt, ExtensionUtility as zt, FilterFactory as Ht, FilterService as Lt, ResizerService as Nt, SortService as Wt, TreeDataService as Le, PaginationService as Kt, ExtensionService as Ut, GridService as Ne, GridStateService as We, HeaderGroupingService as Ke, SlickGroupItemMetadataProvider as $t, SlickDataView as qt, autoAddEditorFormatterToColumnsWithEditor as Ue, SlickGrid as jt, emptyElement as Yt, collectionObserver as Jt, ExtensionName as $e, isColumnDateType as Xt } from "@slickgrid-universal/common";
4
4
  export * from "@slickgrid-universal/common";
5
- import { Aggregators as Fn, Enums as Vn, Formatters as _n, GroupTotalFormatters as Mn, SortComparers as Bn, Utilities as Gn } from "@slickgrid-universal/common";
6
- import { createApp as Se, defineComponent as Zt, mergeModels as en, useAttrs as tn, ref as L, computed as qe, useModel as oe, watch as le, onBeforeUnmount as nn, onMounted as on, inject as an, nextTick as rn, createElementBlock as sn, openBlock as ln, renderSlot as je, createElementVNode as dn } from "vue";
7
- import { SlickFooterComponent as cn } from "@slickgrid-universal/custom-footer-component";
5
+ import { Aggregators as Vn, Enums as _n, Formatters as Mn, GroupTotalFormatters as Bn, SortComparers as Gn, Utilities as zn } from "@slickgrid-universal/common";
6
+ import { createApp as Se, defineComponent as Qt, mergeModels as Zt, useAttrs as en, ref as L, computed as qe, useModel as oe, watch as le, onBeforeUnmount as tn, onMounted as nn, inject as on, nextTick as an, createElementBlock as rn, openBlock as sn, renderSlot as je, createElementVNode as ln } from "vue";
7
+ import { SlickFooterComponent as dn } from "@slickgrid-universal/custom-footer-component";
8
8
  import { SlickEmptyWarningComponent as Ye } from "@slickgrid-universal/empty-warning-component";
9
- import { SlickPaginationComponent as un } from "@slickgrid-universal/pagination-component";
10
- import { extend as Je } from "@slickgrid-universal/utils";
11
- import { SlickRowDetailView as fn } from "@slickgrid-universal/row-detail-view-plugin";
12
- var Xe = Object.prototype.hasOwnProperty;
9
+ import { SlickPaginationComponent as cn } from "@slickgrid-universal/pagination-component";
10
+ import { deepCopy as un, extend as fn } from "@slickgrid-universal/utils";
11
+ import { SlickRowDetailView as mn } from "@slickgrid-universal/row-detail-view-plugin";
12
+ var Je = Object.prototype.hasOwnProperty;
13
13
  function ce(u, o) {
14
14
  var a, s;
15
15
  if (u === o) return !0;
@@ -24,14 +24,14 @@ function ce(u, o) {
24
24
  if (!a || typeof u == "object") {
25
25
  s = 0;
26
26
  for (a in u)
27
- if (Xe.call(u, a) && ++s && !Xe.call(o, a) || !(a in o) || !ce(u[a], o[a])) return !1;
27
+ if (Je.call(u, a) && ++s && !Je.call(o, a) || !(a in o) || !ce(u[a], o[a])) return !1;
28
28
  return Object.keys(o).length === s;
29
29
  }
30
30
  }
31
31
  return u !== u && o !== o;
32
32
  }
33
- const de = "container_", Qe = "container_loading";
34
- class Ze extends fn {
33
+ const de = "container_", Xe = "container_loading";
34
+ class Qe extends mn {
35
35
  constructor(o) {
36
36
  super(o), this.eventPubSubService = o;
37
37
  }
@@ -56,7 +56,7 @@ class Ze extends fn {
56
56
  }
57
57
  /** Dispose of the RowDetailView Extension */
58
58
  dispose() {
59
- this.disposeAllViewComponents(), xt(this._subscriptions), super.dispose();
59
+ this.disposeAllViewComponents(), It(this._subscriptions), super.dispose();
60
60
  }
61
61
  /** Dispose of all the opened Row Detail Panels Components */
62
62
  disposeAllViewComponents() {
@@ -85,7 +85,7 @@ class Ze extends fn {
85
85
  this._userProcessFn = this.gridOptions.rowDetailView.process, this.addonOptions.process = (a) => this.onProcessing(a);
86
86
  else
87
87
  throw new Error('[Slickgrid-Vue] You need to provide a "process" function for the Row Detail Extension to work properly');
88
- return this._grid && this.gridOptions?.rowDetailView && (this.gridOptions.rowDetailView.preTemplate || (this._preloadComponent = this.gridOptions?.rowDetailView?.preloadComponent, this.addonOptions.preTemplate = () => He("div", { className: `${Qe}` })), this.gridOptions.rowDetailView.postTemplate || (this._component = this.gridOptions?.rowDetailView?.viewComponent, this.addonOptions.postTemplate = (a) => He("div", { className: `${de}${a[this.datasetIdPropName]}` })), this._grid && this.gridOptions && ((!o || !this._grid.getSelectionModel()) && (o = new kt(this.gridOptions.rowSelectionOptions || { selectActiveRow: !0 }), this._grid.setSelectionModel(o)), this._grid && this.rowDetailViewOptions && (this.rowDetailViewOptions.onExtensionRegistered && this.rowDetailViewOptions.onExtensionRegistered(this), this._eventHandler.subscribe(this.onAsyncResponse, (a, s) => {
88
+ return this._grid && this.gridOptions?.rowDetailView && (this.gridOptions.rowDetailView.preTemplate || (this._preloadComponent = this.gridOptions?.rowDetailView?.preloadComponent, this.addonOptions.preTemplate = () => He("div", { className: `${Xe}` })), this.gridOptions.rowDetailView.postTemplate || (this._component = this.gridOptions?.rowDetailView?.viewComponent, this.addonOptions.postTemplate = (a) => He("div", { className: `${de}${a[this.datasetIdPropName]}` })), this._grid && this.gridOptions && ((!o || !this._grid.getSelectionModel()) && (o = new xt(this.gridOptions.rowSelectionOptions || { selectActiveRow: !0 }), this._grid.setSelectionModel(o)), this._grid && this.rowDetailViewOptions && (this.rowDetailViewOptions.onExtensionRegistered && this.rowDetailViewOptions.onExtensionRegistered(this), this._eventHandler.subscribe(this.onAsyncResponse, (a, s) => {
89
89
  typeof this.rowDetailViewOptions?.onAsyncResponse == "function" && this.rowDetailViewOptions.onAsyncResponse(a, s);
90
90
  }), this._eventHandler.subscribe(this.onAsyncEndUpdate, async (a, s) => {
91
91
  this._preloadApp?.unmount(), queueMicrotask(async () => {
@@ -130,7 +130,7 @@ class Ze extends fn {
130
130
  }
131
131
  /** Render (or re-render) the View Component (Row Detail) */
132
132
  renderPreloadView(o) {
133
- const a = this.gridContainerElement.querySelector(`.${Qe}`);
133
+ const a = this.gridContainerElement.querySelector(`.${Xe}`);
134
134
  if (this._preloadComponent && a) {
135
135
  const s = this._views.find((x) => x.id === o[this.datasetIdPropName]), p = {
136
136
  model: o,
@@ -209,7 +209,7 @@ class Ze extends fn {
209
209
  * @param item
210
210
  */
211
211
  notifyTemplate(o) {
212
- this.onAsyncResponse.notify({ item: o }, new Pt(), this);
212
+ this.onAsyncResponse.notify({ item: o }, new kt(), this);
213
213
  }
214
214
  /**
215
215
  * On Processing, we will notify the plugin with the new item detail once backend server call completes
@@ -227,7 +227,7 @@ class Ze extends fn {
227
227
  }
228
228
  }
229
229
  }
230
- const et = {
230
+ const Ze = {
231
231
  alwaysShowVerticalScroll: !0,
232
232
  autoEdit: !1,
233
233
  asyncEditorLoading: !1,
@@ -258,7 +258,7 @@ const et = {
258
258
  columnPicker: {
259
259
  hideForceFitButton: !1,
260
260
  hideSyncResizeButton: !0,
261
- headerColumnValueExtractor: tt
261
+ headerColumnValueExtractor: et
262
262
  },
263
263
  compositeEditorOptions: {
264
264
  labels: {
@@ -325,7 +325,7 @@ const et = {
325
325
  // but disable it when using backend services
326
326
  },
327
327
  datasetIdPropertyName: "id",
328
- defaultFilter: Ft.input,
328
+ defaultFilter: Tt.input,
329
329
  defaultBackendServiceFilterTypingDebounce: 500,
330
330
  defaultColumnSortFieldId: "id",
331
331
  defaultFilterPlaceholder: "🔎︎",
@@ -376,7 +376,7 @@ const et = {
376
376
  sanitizeDataExport: !1
377
377
  },
378
378
  textExportOptions: {
379
- delimiter: Tt.comma,
379
+ delimiter: Pt.comma,
380
380
  exportWithFormatter: !1,
381
381
  filename: "export",
382
382
  format: "csv",
@@ -427,7 +427,7 @@ const et = {
427
427
  iconTogglePreHeaderCommand: "mdi mdi-flip-vertical",
428
428
  menuWidth: 16,
429
429
  resizeOnShowHeaderRow: !0,
430
- headerColumnValueExtractor: tt
430
+ headerColumnValueExtractor: et
431
431
  },
432
432
  headerMenu: {
433
433
  autoAlign: !0,
@@ -436,6 +436,7 @@ const et = {
436
436
  iconClearFilterCommand: "mdi mdi-filter-remove-outline",
437
437
  iconClearSortCommand: "mdi mdi-sort-variant-off",
438
438
  iconFreezeColumns: "mdi mdi-pin-outline",
439
+ iconUnfreezeColumns: "mdi mdi-pin-off-outline",
439
440
  iconSortAscCommand: "mdi mdi-sort-ascending",
440
441
  iconSortDescCommand: "mdi mdi-sort-descending",
441
442
  iconColumnHideCommand: "mdi mdi-close",
@@ -490,13 +491,13 @@ const et = {
490
491
  exportIndentationLeadingChar: "͏͏͏͏͏͏͏͏͏·"
491
492
  }
492
493
  };
493
- function tt(u, o) {
494
+ function et(u, o) {
494
495
  let a = u?.columnPickerLabel ?? u?.name ?? "";
495
496
  (a instanceof HTMLElement || a instanceof DocumentFragment) && (a = a.textContent || "");
496
497
  const s = u?.columnGroup || "", p = o?.columnGroupSeparator ?? " - ";
497
498
  return s ? s + p + a : a;
498
499
  }
499
- class mn {
500
+ class pn {
500
501
  container = {};
501
502
  get(o) {
502
503
  return this.container[o];
@@ -505,7 +506,7 @@ class mn {
505
506
  this.container[o] = a;
506
507
  }
507
508
  }
508
- class pn {
509
+ class hn {
509
510
  i18n;
510
511
  /** I18Next instance setter */
511
512
  set i18nInstance(o) {
@@ -535,7 +536,7 @@ class pn {
535
536
  return this.i18n?.t(o) || "";
536
537
  }
537
538
  }
538
- function hn(u) {
539
+ function gn(u) {
539
540
  if (Array.isArray(u))
540
541
  for (; u.length > 0; ) {
541
542
  const o = u.pop();
@@ -543,9 +544,9 @@ function hn(u) {
543
544
  }
544
545
  return u;
545
546
  }
546
- const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
547
+ const Cn = ["id"], vn = ["id"], wn = 1e4, In = /* @__PURE__ */ Qt({
547
548
  __name: "SlickgridVue",
548
- props: /* @__PURE__ */ en({
549
+ props: /* @__PURE__ */ Zt({
549
550
  header: {},
550
551
  footer: {},
551
552
  extensions: {},
@@ -682,11 +683,11 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
682
683
  }),
683
684
  emits: ["update:options", "update:pagination", "update:columns", "update:data", "update:hierarchical"],
684
685
  setup(u) {
685
- const o = tn(), a = u, s = L(), p = L(), I = L(null), n = L({}), x = L(0), nt = qe(() => `slickGridContainer-${a.gridId}`), be = qe(() => Oe.value?.backendServiceApi?.service);
686
+ const o = en(), a = u, s = L(), p = L(), I = L(null), n = L({}), x = L(0), tt = qe(() => `slickGridContainer-${a.gridId}`), be = qe(() => Oe.value?.backendServiceApi?.service);
686
687
  let N = 0, m = null, l, ye = [], j, Y = !1, B, J = !1, ue = !1, ae = !1, fe = !1, W = !1, K = !0, Ae, h = [], me = !1, X = !1, U = [], re, Q, F, Z, G, k;
687
- const it = new Vt(), z = new _t(), f = new ze();
688
+ const nt = new Ft(), z = new Vt(), f = new ze();
688
689
  f.eventNamingStyle = we.camelCaseWithExtraOnPrefix;
689
- const C = new mn(), P = new pn(), E = new Mt(), $ = new Bt(), c = new Gt(), pe = new zt(P), he = new Ht(c, E, P), Re = new Lt(it, P, pe), w = new Nt(Re, f, c, E), O = new Wt(f), y = new Kt(pe, c, f, E), T = new Le(f, c, y), D = new Ut(f, c, E), A = new $t(
690
+ const C = new pn(), P = new hn(), E = new _t(), $ = new Mt(), c = new Bt(), pe = new Gt(P), he = new zt(c, E, P), Re = new Ht(nt, P, pe), w = new Lt(Re, f, c, E), O = new Nt(f), y = new Wt(pe, c, f, E), T = new Le(f, c, y), D = new Kt(f, c, E), A = new Ut(
690
691
  he,
691
692
  w,
692
693
  f,
@@ -725,9 +726,9 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
725
726
  ];
726
727
  C.registerInstance("PubSubService", f), C.registerInstance("EventPubSubService", f), C.registerInstance("ExtensionUtility", he), C.registerInstance("FilterService", w), C.registerInstance("CollectionService", pe), C.registerInstance("ExtensionService", A), C.registerInstance("GridEventService", $), C.registerInstance("GridService", ee), C.registerInstance("GridStateService", V), C.registerInstance("HeaderGroupingService", te), C.registerInstance("PaginationService", D), C.registerInstance("ResizerService", O), C.registerInstance("SharedService", c), C.registerInstance("SortService", y), C.registerInstance("TranslaterService", P), C.registerInstance("TreeDataService", T);
727
728
  const Oe = oe(u, "options");
728
- n.value = { ...et, ...Oe.value };
729
- const R = L(), ot = oe(u, "pagination");
730
- le(ot, (e) => gt(e));
729
+ n.value = { ...Ze, ...Oe.value };
730
+ const R = L(), it = oe(u, "pagination");
731
+ le(it, (e) => ht(e));
731
732
  const g = L([]), _ = oe(u, "columns");
732
733
  le(_, (e) => De(e), { immediate: !0 });
733
734
  const M = oe(u, "data");
@@ -735,7 +736,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
735
736
  M,
736
737
  (e) => {
737
738
  const t = N, i = ce(e, M.value || []);
738
- let d = !!n.value?.enableDeepCopyDatasetOnPageLoad ? Je(!0, [], e) : e;
739
+ let d = !!n.value?.enableDeepCopyDatasetOnPageLoad ? un(e) : e;
739
740
  l && n.value?.enableTreeData && Array.isArray(e) && (e.length > 0 || e.length !== t || !i) && (fe = !1, d = Be(e, !i)), xe(d || []), N = (e || []).length, l && n.value?.autoFitColumnsOnFirstLoad && t === 0 && !J && (l.autosizeColumns(), J = !0);
740
741
  },
741
742
  { immediate: !0 }
@@ -751,9 +752,9 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
751
752
  }), fe = !0);
752
753
  },
753
754
  { immediate: !0 }
754
- ), Y = n.value?.showHeaderRow === !1, nn(() => {
755
+ ), Y = n.value?.showHeaderRow === !1, tn(() => {
755
756
  Ie();
756
- }), on(() => {
757
+ }), nn(() => {
757
758
  if (!_.value)
758
759
  throw new Error(
759
760
  "Using `<Slickgrid-Vue>` requires `v-model:columns` props, it seems that you might have forgot to provide the missing bindable model."
@@ -774,47 +775,47 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
774
775
  }
775
776
  }
776
777
  }
777
- if (at(), ue = !0, ne() || (n.value.enablePagination = !!(n.value.backendServiceApi && n.value.enablePagination === void 0 || n.value.enablePagination)), !W && !q.value && n.value?.enablePagination && K && (X = !0, Ve(M.value)), n.value?.enableEmptyDataWarningMessage) {
778
+ if (ot(), ue = !0, ne() || (n.value.enablePagination = !!(n.value.backendServiceApi && n.value.enablePagination === void 0 || n.value.enablePagination)), !W && !q.value && n.value?.enablePagination && K && (X = !0, Ve(M.value)), n.value?.enableEmptyDataWarningMessage) {
778
779
  const e = M.value || [];
779
780
  if (Array.isArray(e)) {
780
781
  const t = e.length;
781
782
  ge(t < 1);
782
783
  }
783
784
  }
784
- n.value.darkMode && Pe(!0), q.value && (c.hierarchicalDataset = q.value || []), It(), wt();
785
+ n.value.darkMode && Pe(!0), q.value && (c.hierarchicalDataset = q.value || []), Dt(), vt();
785
786
  });
786
787
  function De(e) {
787
- e && (g.value = e), ue && vt(g.value), g.value.length > 0 && St(g.value);
788
+ e && (g.value = e), ue && Ct(g.value), g.value.length > 0 && wt(g.value);
788
789
  }
789
- function at() {
790
+ function ot() {
790
791
  if (!n.value || !_.value)
791
792
  throw new Error(
792
793
  'Using `<Slickgrid-Vue>` requires `v-model:columns="columnDefinitions"` and `v-model:options="gridOptions.value"`, it seems that you might have forgot to provide them since at least of them is undefined.'
793
794
  );
794
- if (n.value.translater = P, J = !1, n.value && (n.value.frozenRow !== void 0 && n.value.frozenRow >= 0 || n.value.frozenColumn !== void 0 && n.value.frozenColumn >= 0) && n.value.enableMouseWheelScrollHandler === void 0 && (n.value.enableMouseWheelScrollHandler = !0), f.eventNamingStyle = n.value?.eventNamingStyle ?? we.camelCaseWithExtraOnPrefix, f.publish("onBeforeGridCreate", !0), N = M.value?.length || 0, n.value = At(n.value), R.value = n.value?.pagination, G = n.value?.backendServiceApi, K = !G, n.value?.enableTranslate || n.value?.i18n)
795
- if (B = an("i18next", null), B)
795
+ if (n.value.translater = P, J = !1, n.value && (n.value.frozenRow !== void 0 && n.value.frozenRow >= 0 || n.value.frozenColumn !== void 0 && n.value.frozenColumn >= 0) && n.value.enableMouseWheelScrollHandler === void 0 && (n.value.enableMouseWheelScrollHandler = !0), f.eventNamingStyle = n.value?.eventNamingStyle ?? we.camelCaseWithExtraOnPrefix, f.publish("onBeforeGridCreate", !0), N = M.value?.length || 0, n.value = yt(n.value), R.value = n.value?.pagination, G = n.value?.backendServiceApi, K = !G, n.value?.enableTranslate || n.value?.i18n)
796
+ if (B = on("i18next", null), B)
796
797
  P.i18nInstance = B;
797
798
  else
798
799
  throw new Error(
799
800
  "[Slickgrid-Vue] Enabling translation requires you to provide I18Next in your App, for example: `provide('i18next', useTranslation().i18next)`."
800
801
  );
801
- n.value?.backendServiceApi && !n.value.backendServiceApi?.disableInternalPostProcess && dt(n.value);
802
+ n.value?.backendServiceApi && !n.value.backendServiceApi?.disableInternalPostProcess && lt(n.value);
802
803
  const e = n.value?.dataView && n.value.dataView.inlineFilters || !1;
803
804
  let t = {
804
805
  ...n.value.dataView,
805
806
  inlineFilters: e
806
807
  };
807
- (n.value?.draggableGrouping || n.value?.enableGrouping) && (j = new qt(), c.groupItemMetadataProvider = j, t = { ...t, groupItemMetadataProvider: j }), m = new jt(t, f), f.publish("onDataviewCreated", m), Et(), g.value = Ge(_.value || []), n.value?.autoAddCustomEditorFormatter && Ue(g.value, n.value?.autoAddCustomEditorFormatter), c.allColumns = g.value, c.visibleColumns = g.value, A.createExtensionsBeforeGridCreation(g.value, n.value), n.value?.presets?.pinning && (n.value = { ...n.value, ...n.value.presets.pinning }), l = new Yt(
808
+ (n.value?.draggableGrouping || n.value?.enableGrouping) && (j = new $t(), c.groupItemMetadataProvider = j, t = { ...t, groupItemMetadataProvider: j }), m = new qt(t, f), f.publish("onDataviewCreated", m), Rt(), g.value = Ge(_.value || []), n.value?.autoAddCustomEditorFormatter && Ue(g.value, n.value?.autoAddCustomEditorFormatter), c.allColumns = g.value, c.visibleColumns = g.value, A.createExtensionsBeforeGridCreation(g.value, n.value), n.value?.presets?.pinning && (n.value = { ...n.value, ...n.value.presets.pinning }), l = new jt(
808
809
  `#${a.gridId}`,
809
810
  m,
810
811
  g.value,
811
812
  n.value,
812
813
  f
813
- ), c.dataView = m, c.slickGrid = l, c.gridContainerElement = s.value, j && l.registerPlugin(j), A.bindDifferentExtensions(), ct(l, n.value, m);
814
+ ), c.dataView = m, c.slickGrid = l, c.gridContainerElement = s.value, j && l.registerPlugin(j), A.bindDifferentExtensions(), dt(l, n.value, m);
814
815
  const i = n.value?.frozenColumn ?? -1;
815
- i >= 0 && i <= g.value.length && g.value.length > 0 && (c.frozenVisibleColumnId = g.value[i]?.id ?? ""), Ot(), l.init();
816
+ i >= 0 && i <= g.value.length && g.value.length > 0 && (c.frozenVisibleColumnId = g.value[i]?.id ?? ""), Et(), l.init();
816
817
  const r = s.value;
817
- if (r && O.init(l, r), !n.value?.enablePagination && n.value?.showCustomFooter && n.value?.customFooterOptions && r && (Q = new cn(l, n.value?.customFooterOptions, f, P), Q.renderFooter(r)), m) {
818
+ if (r && O.init(l, r), !n.value?.enablePagination && n.value?.showCustomFooter && n.value?.customFooterOptions && r && (Q = new dn(l, n.value?.customFooterOptions, f, P), Q.renderFooter(r)), m) {
818
819
  const v = n.value?.enableTreeData ? Be(M.value || []) : M.value;
819
820
  if (Array.isArray(v) && m.setItems(v, n.value.datasetIdPropertyName ?? "id"), l?.getSelectionModel() && n.value?.dataView && "syncGridSelection" in n.value.dataView) {
820
821
  let S = !1;
@@ -827,14 +828,14 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
827
828
  }
828
829
  M.value?.length && (!ae && (n.value.enableCheckboxSelector || n.value.enableRowSelection) && _e(), ve(), ae = !0);
829
830
  }
830
- Y && (Ct(!1), c.hideHeaderRowAfterPageLoad = Y), f.publish("onGridCreated", l), pt(l, n.value), mt(l, n.value), n.value?.backendServiceApi && ut(n.value);
831
+ Y && (gt(!1), c.hideHeaderRowAfterPageLoad = Y), f.publish("onGridCreated", l), mt(l, n.value), ft(l, n.value), n.value?.backendServiceApi && ct(n.value);
831
832
  const d = {
832
833
  element: s.value,
833
834
  // Slick Grid & DataView objects
834
835
  dataView: m,
835
836
  slickGrid: l,
836
837
  // public methods
837
- dispose: rt,
838
+ dispose: at,
838
839
  // return all available Services (non-singleton)
839
840
  backendService: be.value,
840
841
  eventPubSubService: f,
@@ -853,9 +854,9 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
853
854
  p.value = A?.extensionList, I.value = d, f.publish("onVueGridCreated", d);
854
855
  }
855
856
  function Ie(e = !1) {
856
- if (f.publish("onBeforeGridDestroy", l), z?.unsubscribeAll(), typeof B?.off == "function" && B.off("languageChanged"), e && lt(), ye.forEach((t) => t?.disconnect()), f.publish("onAfterGridDestroyed", !0), Ee.forEach((t) => {
857
+ if (f.publish("onBeforeGridDestroy", l), z?.unsubscribeAll(), typeof B?.off == "function" && B.off("languageChanged"), e && st(), ye.forEach((t) => t?.disconnect()), f.publish("onAfterGridDestroyed", !0), Ee.forEach((t) => {
857
858
  t?.dispose && t.dispose();
858
- }), Ee = [], be.value?.dispose?.(), st(), re?.dispose(), Q?.dispose(), F?.dispose(), m && (m.setItems && m.setItems([]), m.destroy && m.destroy()), l?.destroy && l.destroy(e), U = hn(U), G) {
859
+ }), Ee = [], be.value?.dispose?.(), rt(), re?.dispose(), Q?.dispose(), F?.dispose(), m && (m.setItems && m.setItems([]), m.destroy && m.destroy()), l?.destroy && l.destroy(e), U = gn(U), G) {
859
860
  for (const t of Object.keys(G))
860
861
  G[t] = null;
861
862
  G = void 0;
@@ -865,10 +866,10 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
865
866
  for (const t of Object.keys(c))
866
867
  c[t] = null;
867
868
  }
868
- function rt(e = !1) {
869
+ function at(e = !1) {
869
870
  Ie(e);
870
871
  }
871
- function st() {
872
+ function rt() {
872
873
  if (Array.isArray(h))
873
874
  for (; h.length > 0; ) {
874
875
  const e = h.pop();
@@ -876,11 +877,11 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
876
877
  }
877
878
  h = [];
878
879
  }
879
- function lt() {
880
+ function st() {
880
881
  const e = n.value?.gridContainerId ?? "grid1", t = document.querySelector(`#${e}`);
881
- Jt(t);
882
+ Yt(t);
882
883
  }
883
- function dt(e) {
884
+ function lt(e) {
884
885
  const t = e?.backendServiceApi;
885
886
  if (t?.service) {
886
887
  const i = t.service;
@@ -893,7 +894,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
893
894
  });
894
895
  }
895
896
  }
896
- function ct(e, t, i) {
897
+ function dt(e, t, i) {
897
898
  if (t.enableTranslate && A.translateAllExtensions(), typeof B?.on == "function" && B.on("languageChanged", (r) => {
898
899
  f.publish("onLanguageChange"), t.enableTranslate && (A.translateAllExtensions(r), (t.createPreHeaderPanel && t.createTopHeaderPanel || t.createPreHeaderPanel && !t.enableDraggableGrouping) && te.translateHeaderGrouping());
899
900
  }), t.backendServiceApi) {
@@ -904,7 +905,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
904
905
  c.hasColumnsReordered = !0, c.visibleColumns = d.impactedColumns;
905
906
  }), z.subscribe(e.onSetOptions, (r, d) => {
906
907
  d.optionsBefore.darkMode !== d.optionsAfter.darkMode && c.gridContainerElement && Pe(d.optionsAfter.darkMode);
907
- }), yt(), ve(), z.subscribe(i.onRowCountChanged, (r, d) => {
908
+ }), bt(), ve(), z.subscribe(i.onRowCountChanged, (r, d) => {
908
909
  !t.enableRowDetailView || !Array.isArray(d.changedRows) || d.changedRows.length === d.itemCount ? e.invalidate() : (e.invalidateRows(d.changedRows), e.render()), Te(i.getFilteredItemCount() || 0, i.getItemCount() || 0);
909
910
  }), z.subscribe(i.onSetItemsCalled, (r, d) => {
910
911
  c.isItemsDateParsed = !1, Te(i.getFilteredItemCount() || 0, d.itemCount), d.itemCount > 0 && (t.autosizeColumnsByCellContentOnFirstLoad || t.enableAutoResizeColumnsByCellContent) && O.resizeColumnsByCellContent(!t?.resizeByContentOnlyOnFirstLoad);
@@ -915,7 +916,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
915
916
  }
916
917
  })));
917
918
  }
918
- function ut(e) {
919
+ function ct(e) {
919
920
  const t = e.backendServiceApi, i = t?.service, r = i?.options || {}, d = r ? r && "executeProcessCommandOnInit" in r ? r.executeProcessCommandOnInit : !0 : !1;
920
921
  if (i) {
921
922
  if (e?.presets) {
@@ -947,10 +948,10 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
947
948
  );
948
949
  });
949
950
  }
950
- t.service.options?.infiniteScroll && ft();
951
+ t.service.options?.infiniteScroll && ut();
951
952
  }
952
953
  }
953
- function ft() {
954
+ function ut() {
954
955
  if (l && n.value.backendServiceApi && ne() && !n.value.backendServiceApi?.onScrollEnd) {
955
956
  const e = () => {
956
957
  E.setInfiniteScrollBottomHit(!0), D.goToNextPage().then((i) => {
@@ -967,20 +968,20 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
967
968
  };
968
969
  }
969
970
  }
970
- function mt(e, t) {
971
+ function ft(e, t) {
971
972
  if (t.autoFitColumnsOnFirstLoad && t.autosizeColumnsByCellContentOnFirstLoad || t.enableAutoSizeColumns && t.enableAutoResizeColumnsByCellContent)
972
973
  throw new Error(
973
974
  '[Slickgrid-Vue] You cannot enable both autosize/fit viewport & resize by content, you must choose which resize technique to use. You can enable these 2 options ("autoFitColumnsOnFirstLoad" and "enableAutoSizeColumns") OR these other 2 options ("autosizeColumnsByCellContentOnFirstLoad" and "enableAutoResizeColumnsByCellContent").'
974
975
  );
975
976
  t.gridHeight || t.gridWidth ? O.resizeGrid(0, { height: t.gridHeight, width: t.gridWidth }) : O.resizeGrid(), e && t?.enableAutoResize && t.autoFitColumnsOnFirstLoad && t.enableAutoSizeColumns && !J && (e.autosizeColumns(), J = !0);
976
977
  }
977
- function pt(e, t) {
978
+ function mt(e, t) {
978
979
  if (t.enableSorting && t.presets && Array.isArray(t.presets.sorters)) {
979
980
  const i = n.value.multiColumnSort ? t.presets.sorters : t.presets.sorters.slice(0, 1);
980
981
  y.loadGridSorters(i);
981
982
  }
982
983
  }
983
- function ht(e) {
984
+ function pt(e) {
984
985
  const t = V?.needToPreserveRowSelection() ?? !1;
985
986
  l && !t && n.value?.backendServiceApi && (n.value.enableRowSelection || n.value.enableCheckboxSelector) && l.setSelectedRows([]);
986
987
  const { pageNumber: i, pageSize: r } = e;
@@ -989,7 +990,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
989
990
  gridState: V.getCurrentGridState()
990
991
  });
991
992
  }
992
- function gt(e) {
993
+ function ht(e) {
993
994
  e && R.value ? R.value = { ...R.value, ...e } : R.value = e, n.value && (n.value.pagination = R.value, D.updateTotalItems(e?.totalItems ?? 0, !0));
994
995
  }
995
996
  function xe(e, t) {
@@ -1011,7 +1012,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1011
1012
  }
1012
1013
  }
1013
1014
  }
1014
- function Ct(e = !0) {
1015
+ function gt(e = !0) {
1015
1016
  return l?.setHeaderRowVisibility(e), e === !0 && ue && l?.setColumns(_.value), e;
1016
1017
  }
1017
1018
  function ke(e, t) {
@@ -1020,13 +1021,13 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1020
1021
  function Pe(e = !1) {
1021
1022
  e ? c.gridContainerElement?.classList.add("slick-dark-mode") : c.gridContainerElement?.classList.remove("slick-dark-mode");
1022
1023
  }
1023
- function vt(e) {
1024
+ function Ct(e) {
1024
1025
  e && (e = Ge(e), n.value.autoAddCustomEditorFormatter && Ue(e, n.value.autoAddCustomEditorFormatter), n.value.enableTranslate ? A.translateColumnHeaders(void 0, e) : A.renderColumnHeaders(e, !0), n.value?.enableAutoSizeColumns ? l?.autosizeColumns() : n.value?.enableAutoResizeColumnsByCellContent && O?.resizeColumnsByCellContent && O.resizeColumnsByCellContent());
1025
1026
  }
1026
- function wt() {
1027
- ye.push(Xt(_.value, De));
1027
+ function vt() {
1028
+ ye.push(Jt(_.value, De));
1028
1029
  }
1029
- function St(e) {
1030
+ function wt(e) {
1030
1031
  e.forEach((t) => t.originalWidth = t.width);
1031
1032
  }
1032
1033
  function ge(e = !0) {
@@ -1042,13 +1043,13 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1042
1043
  }
1043
1044
  function Fe(e) {
1044
1045
  n.value && (D.totalItems = x.value, D.init(l, e, G), U.push(
1045
- f.subscribe("onPaginationChanged", (t) => ht(t)),
1046
+ f.subscribe("onPaginationChanged", (t) => pt(t)),
1046
1047
  f.subscribe("onPaginationVisibilityChanged", (t) => {
1047
1048
  X = t?.visible ?? !1, n.value?.backendServiceApi && E?.refreshBackendDataset(n.value), Me(X);
1048
1049
  })
1049
1050
  ), Me(), W = !0);
1050
1051
  }
1051
- function bt(e) {
1052
+ function St(e) {
1052
1053
  if (e?.editor) {
1053
1054
  const t = e.editor.collectionAsync;
1054
1055
  e.editor.disabled = !0, t instanceof Promise ? t.then((i) => {
@@ -1071,7 +1072,7 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1071
1072
  }
1072
1073
  }
1073
1074
  }
1074
- function yt() {
1075
+ function bt() {
1075
1076
  if (n.value.presets && Array.isArray(n.value.presets.columns) && n.value.presets.columns.length > 0) {
1076
1077
  const e = V.getAssociatedGridColumns(l, n.value.presets.columns);
1077
1078
  if (e && Array.isArray(e) && e.length > 0 && Array.isArray(g.value)) {
@@ -1120,29 +1121,29 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1120
1121
  function ne(e) {
1121
1122
  return !!(e || n.value).backendServiceApi?.service.options?.infiniteScroll;
1122
1123
  }
1123
- function At(e) {
1124
+ function yt(e) {
1124
1125
  e.gridId = a.gridId, e.gridContainerId = `slickGridContainer-${a.gridId}`;
1125
- const t = Je(!0, {}, et, e);
1126
+ const t = fn(!0, {}, Ze, e);
1126
1127
  return ne(e) || (e.enablePagination = !!(e.backendServiceApi && e.enablePagination === void 0 || e.enablePagination)), t?.pagination && (e.enablePagination || e.backendServiceApi) && e.pagination && Array.isArray(e.pagination.pageSizes) && (t.pagination.pageSizes = e.pagination.pageSizes), Y = t.showHeaderRow === !1, t.enableFiltering && !t.showHeaderRow && (t.showHeaderRow = t.enableFiltering), t && !t.enableFiltering && t.enablePagination && K && (t.enableFiltering = !0, t.showHeaderRow = !1, Y = !0, c && (c.hideHeaderRowAfterPageLoad = !0)), t;
1127
1128
  }
1128
- function Rt(e) {
1129
+ function At(e) {
1129
1130
  if (Array.isArray(e))
1130
1131
  for (const t of e)
1131
1132
  l && typeof t.init == "function" && t.init(l, C);
1132
1133
  }
1133
- function Et() {
1134
+ function Rt() {
1134
1135
  if (h = n.value?.externalResources || [], Array.isArray(h))
1135
1136
  for (const e of h)
1136
- e?.className === "RxJsResource" && Dt(e);
1137
- n.value.enableRowDetailView && !h.some((e) => e instanceof Ze) && (Z = new Ze(f), Z.create(g.value, n.value), A.addExtensionToList($e.rowDetailView, {
1137
+ e?.className === "RxJsResource" && Ot(e);
1138
+ n.value.enableRowDetailView && !h.some((e) => e instanceof Qe) && (Z = new Qe(f), Z.create(g.value, n.value), A.addExtensionToList($e.rowDetailView, {
1138
1139
  name: $e.rowDetailView,
1139
1140
  instance: Z
1140
1141
  }));
1141
1142
  }
1142
- function Ot() {
1143
- Array.isArray(h) && (c.externalRegisteredResources = h), h.some((e) => e instanceof Ne) || h.push(ee), h.some((e) => e instanceof We) || h.push(V), (n.value.createPreHeaderPanel && n.value.createTopHeaderPanel || n.value.createPreHeaderPanel && !n.value.enableDraggableGrouping) && !h.some((e) => e instanceof Ke) && h.push(te), n.value.enableTreeData && !h.some((e) => e instanceof Le) && h.push(T), n.value.enableTranslate && A.translateColumnHeaders(), h.some((e) => e instanceof Ye) || (re = new Ye(), h.push(re)), Rt(h), n.value.enableRowDetailView && Z && Z.init(l);
1143
+ function Et() {
1144
+ Array.isArray(h) && (c.externalRegisteredResources = h), h.some((e) => e instanceof Ne) || h.push(ee), h.some((e) => e instanceof We) || h.push(V), (n.value.createPreHeaderPanel && n.value.createTopHeaderPanel || n.value.createPreHeaderPanel && !n.value.enableDraggableGrouping) && !h.some((e) => e instanceof Ke) && h.push(te), n.value.enableTreeData && !h.some((e) => e instanceof Le) && h.push(T), n.value.enableTranslate && A.translateColumnHeaders(), h.some((e) => e instanceof Ye) || (re = new Ye(), h.push(re)), At(h), n.value.enableRowDetailView && Z && Z.init(l);
1144
1145
  }
1145
- function Dt(e) {
1146
+ function Ot(e) {
1146
1147
  k = e, E.addRxJsResource(k), Re.addRxJsResource(k), w.addRxJsResource(k), y.addRxJsResource(k), D.addRxJsResource(k), C.registerInstance("RxJsResource", k);
1147
1148
  }
1148
1149
  async function Me(e = !0) {
@@ -1153,8 +1154,8 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1153
1154
  );
1154
1155
  s.value.appendChild(i.$el), F = i;
1155
1156
  } else
1156
- F = new un();
1157
- rn(() => {
1157
+ F = new cn();
1158
+ an(() => {
1158
1159
  F && (F.init(l, D, f, P), F.renderPagination(s.value), W = !0);
1159
1160
  });
1160
1161
  } else e || (F?.dispose(), W = !1);
@@ -1169,12 +1170,12 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1169
1170
  ), c.hierarchicalDataset = r.hierarchical, d = r.flat), e.length > 0 && (t || e.length !== i) && w.refreshTreeDataFilters(d), d;
1170
1171
  }
1171
1172
  function Ge(e) {
1172
- return e.some((t) => `${t.id}`.includes(".")) && console.error(
1173
+ return e.some((t) => `${t.id}`.includes(".")) && console.warn(
1173
1174
  '[Slickgrid-Vue] Make sure that none of your Column Definition "id" property includes a dot in its name because that will cause some problems with the Editors. For example if your column definition "field" property is "user.firstName" then use "firstName" as the column "id".'
1174
- ), e.map((t) => (t.editor?.collectionAsync && bt(t), { ...t, editorClass: t.editor?.model }));
1175
+ ), e.map((t) => (t.editor?.collectionAsync && St(t), { ...t, editorClass: t.editor?.model }));
1175
1176
  }
1176
- function It() {
1177
- m.getItemCount() > vn && !n.value.silenceWarnings && !n.value.preParseDateColumns && l?.getColumns().some((e) => Qt(e.type)) && console.warn(
1177
+ function Dt() {
1178
+ m.getItemCount() > wn && !n.value.silenceWarnings && !n.value.preParseDateColumns && l?.getColumns().some((e) => Xt(e.type)) && console.warn(
1178
1179
  "[Slickgrid-Universal] For getting better perf, we suggest you enable the `preParseDateColumns` grid option, for more info visit => https://ghiscoding.gitbook.io/slickgrid-vue/column-functionalities/sorting#pre-parse-date-columns-for-better-perf"
1179
1180
  );
1180
1181
  }
@@ -1185,32 +1186,32 @@ const gn = ["id"], Cn = ["id"], vn = 1e4, Dn = /* @__PURE__ */ Zt({
1185
1186
  i?.disable && i?.renderDomElement && (i.destroy(), i.disable(!1), i.renderDomElement(t));
1186
1187
  }
1187
1188
  }
1188
- return (e, t) => (ln(), sn("div", {
1189
- id: nt.value,
1189
+ return (e, t) => (sn(), rn("div", {
1190
+ id: tt.value,
1190
1191
  ref_key: "elm",
1191
1192
  ref: s,
1192
1193
  class: "grid-pane"
1193
1194
  }, [
1194
1195
  je(e.$slots, "header"),
1195
- dn("div", {
1196
+ ln("div", {
1196
1197
  id: e.gridId,
1197
1198
  class: "slickgrid-container"
1198
- }, null, 8, Cn),
1199
+ }, null, 8, vn),
1199
1200
  je(e.$slots, "footer")
1200
- ], 8, gn));
1201
+ ], 8, Cn));
1201
1202
  }
1202
1203
  });
1203
1204
  export {
1204
- Fn as Aggregators,
1205
- Vn as Enums,
1206
- kn as EventPubSubService,
1207
- _n as Formatters,
1208
- Mn as GroupTotalFormatters,
1209
- Ze as SlickRowDetailView,
1210
- Dn as SlickgridVue,
1211
- Bn as SortComparers,
1212
- pn as TranslaterI18NextService,
1213
- Gn as Utilities,
1214
- hn as disposeAllSubscriptions
1205
+ Vn as Aggregators,
1206
+ _n as Enums,
1207
+ Pn as EventPubSubService,
1208
+ Mn as Formatters,
1209
+ Bn as GroupTotalFormatters,
1210
+ Qe as SlickRowDetailView,
1211
+ In as SlickgridVue,
1212
+ Gn as SortComparers,
1213
+ hn as TranslaterI18NextService,
1214
+ zn as Utilities,
1215
+ gn as disposeAllSubscriptions
1215
1216
  };
1216
1217
  //# sourceMappingURL=index.js.map