slick-table 1.1.79 → 1.1.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/README.md +5 -3
  2. package/dist/index.cjs.js +44 -18
  3. package/dist/index.es.js +198 -147
  4. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.d.ts +5 -3
  5. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.d.ts.map +1 -1
  6. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/lib/applyHtmlToDocument.d.ts +3 -0
  7. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/lib/applyHtmlToDocument.d.ts.map +1 -0
  8. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/lib/index.d.ts +2 -0
  9. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/lib/index.d.ts.map +1 -0
  10. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.d.ts +1 -1
  11. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.d.ts.map +1 -1
  12. package/dist/types/shared/model/types/IHtmlDocElements.d.ts +8 -0
  13. package/dist/types/shared/model/types/IHtmlDocElements.d.ts.map +1 -0
  14. package/dist/types/shared/model/types/IPrinter.d.ts +6 -3
  15. package/dist/types/shared/model/types/IPrinter.d.ts.map +1 -1
  16. package/dist/types/shared/model/types/index.d.ts +1 -0
  17. package/dist/types/shared/model/types/index.d.ts.map +1 -1
  18. package/package.json +1 -1
  19. package/src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts +68 -25
  20. package/src/shared/lib/slickgrid/model/SlickTable/printer/lib/applyHtmlToDocument.ts +7 -0
  21. package/src/shared/lib/slickgrid/model/SlickTable/printer/lib/index.ts +1 -0
  22. package/src/shared/lib/slickgrid/model/SlickTable/printer/model/consts/cssStyles.ts +7 -9
  23. package/src/shared/model/types/IHtmlDocElements.ts +7 -0
  24. package/src/shared/model/types/IPrinter.ts +6 -3
  25. package/src/shared/model/types/index.ts +1 -0
package/dist/index.es.js CHANGED
@@ -21191,7 +21191,7 @@ const _D = ie(oh)({
21191
21191
  borderRadius: "10px"
21192
21192
  }), xD = {
21193
21193
  Skeleton: _D
21194
- }, MB = ({ height: e = "calc(100% - 1em)" }) => /* @__PURE__ */ k.jsx(xD.Skeleton, { variant: "rectangular", height: e });
21194
+ }, IB = ({ height: e = "calc(100% - 1em)" }) => /* @__PURE__ */ k.jsx(xD.Skeleton, { variant: "rectangular", height: e });
21195
21195
  var Be = /* @__PURE__ */ ((e) => (e[e.Boolean = 1] = "Boolean", e[e.DateBetween = 2] = "DateBetween", e[e.DateEqual = 3] = "DateEqual", e[e.DateFrom = 4] = "DateFrom", e[e.DateTo = 5] = "DateTo", e[e.MultipleSelect = 6] = "MultipleSelect", e[e.NumberBetween = 7] = "NumberBetween", e[e.NumberEqual = 8] = "NumberEqual", e[e.NumberFrom = 9] = "NumberFrom", e[e.NumberTo = 10] = "NumberTo", e[e.TextContain = 11] = "TextContain", e[e.TextEqual = 12] = "TextEqual", e[e.TextNotContain = 13] = "TextNotContain", e[e.TextNotEqual = 14] = "TextNotEqual", e))(Be || {}), gn = /* @__PURE__ */ ((e) => (e.Boolean = "Boolean", e.Date = "Date", e.MultipleSelect = "MultipleSelect", e.Number = "Number", e.NumberFormatted = "NumberFormatted", e.Text = "Text", e))(gn || {}), Zr = /* @__PURE__ */ ((e) => (e.db = "YYYY-MM-DD", e.ui = "MM/DD/YY", e))(Zr || {}), Wr = /* @__PURE__ */ ((e) => (e.ArrowDown = "ArrowDown", e.ArrowLeft = "ArrowLeft", e.ArrowRight = "ArrowRight", e.ArrowUp = "ArrowUp", e.Control = "Control", e.Enter = "Enter", e.Tab = "Tab", e))(Wr || {}), ns = /* @__PURE__ */ ((e) => (e[e.KeyB = 66] = "KeyB", e[e.KeyDel = 46] = "KeyDel", e[e.KeyEnter = 13] = "KeyEnter", e[e.KeyR = 82] = "KeyR", e[e.KeyS = 83] = "KeyS", e[e.KeyY = 89] = "KeyY", e[e.KeyZ = 90] = "KeyZ", e))(ns || {}), Zo = /* @__PURE__ */ ((e) => (e[e.DATE = 1] = "DATE", e[e.NUMBER = 2] = "NUMBER", e[e.NUMBER_FORMATTED = 3] = "NUMBER_FORMATTED", e[e.TEXT_NUMERIC = 4] = "TEXT_NUMERIC", e[e.TEXT = 5] = "TEXT", e))(Zo || {});
21196
21196
  const mm = (e) => (t) => {
21197
21197
  t.keyCode === ns.KeyEnter && (t.stopImmediatePropagation(), e.navigateNext());
@@ -21272,7 +21272,7 @@ class MD {
21272
21272
  }
21273
21273
  }
21274
21274
  const yo = new MD();
21275
- class NB {
21275
+ class AB {
21276
21276
  constructor() {
21277
21277
  this._initialColumns = [], this._hiddenColumnIds = [], this._tableId = "";
21278
21278
  }
@@ -21326,7 +21326,7 @@ class ND {
21326
21326
  }
21327
21327
  getCSVBody(t) {
21328
21328
  const n = t.getData(), r = t.getColumns().filter((i) => i.forPrint);
21329
- return xB(t).reduce((i, a) => {
21329
+ return RB(t).reduce((i, a) => {
21330
21330
  const l = n.getItemMetadata(a), d = n.getItem(a), u = d.__group, f = d.__groupTotals;
21331
21331
  let p = "";
21332
21332
  if (u) {
@@ -21356,7 +21356,7 @@ class ND {
21356
21356
  `;
21357
21357
  }
21358
21358
  }
21359
- class AB {
21359
+ class FB {
21360
21360
  constructor() {
21361
21361
  this.externalVariables = {}, this.commandQueue = [], this.queueIndex = -1;
21362
21362
  }
@@ -21372,9 +21372,9 @@ class AB {
21372
21372
  if (!o || !o.getOptions().editable) return;
21373
21373
  const r = o.getData();
21374
21374
  if (Ob(t)) {
21375
- if (t.preventDefault(), t.stopImmediatePropagation(), nB(o)) return;
21376
- oB(o), o.invalidate(), this.pushToCommandQueue(o), n.isEdited = !0;
21377
- } else if (eB(t)) {
21375
+ if (t.preventDefault(), t.stopImmediatePropagation(), oB(o)) return;
21376
+ rB(o), o.invalidate(), this.pushToCommandQueue(o), n.isEdited = !0;
21377
+ } else if (tB(t)) {
21378
21378
  t.preventDefault(), t.stopImmediatePropagation();
21379
21379
  const i = o.getSelectedRows();
21380
21380
  if (!i.length) return;
@@ -21448,17 +21448,17 @@ class rh {
21448
21448
  return this.hotKeysBehaviour.getExternalVariables();
21449
21449
  }
21450
21450
  }
21451
- class FB extends rh {
21451
+ class LB extends rh {
21452
21452
  handleKeyboardEvent(t, n) {
21453
21453
  n.isActive && (Ob(t) || super.handleKeyboardEvent.call(this, t, n));
21454
21454
  }
21455
21455
  }
21456
- class LB extends rh {
21456
+ class $B extends rh {
21457
21457
  handleKeyboardEvent(t, n) {
21458
21458
  n.isActive && (Mb(t) || Ib(t)) && super.handleKeyboardEvent.call(this, t, n);
21459
21459
  }
21460
21460
  }
21461
- const du = "checkboxSelector", $B = "wink", VB = "bold";
21461
+ const du = "checkboxSelector", VB = "wink", jB = "bold";
21462
21462
  //! moment.js
21463
21463
  //! version : 2.30.1
21464
21464
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
@@ -24058,10 +24058,10 @@ ie(oy)({
24058
24058
  fill: "white"
24059
24059
  }
24060
24060
  });
24061
- class jB extends rh {
24061
+ class WB extends rh {
24062
24062
  handleKeyboardEvent(t, n) {
24063
24063
  if (n.isActive)
24064
- if (tB(t)) {
24064
+ if (nB(t)) {
24065
24065
  if (!n.summaryColumnIds.length) return;
24066
24066
  const o = n.grid;
24067
24067
  if (!o || o.getSelectedRows().length < 2) return;
@@ -24112,7 +24112,7 @@ let $N = class {
24112
24112
  return this._tableId;
24113
24113
  }
24114
24114
  };
24115
- class BB extends $N {
24115
+ class HB extends $N {
24116
24116
  getFilterFn() {
24117
24117
  return (t) => !t?.isDeleted;
24118
24118
  }
@@ -24188,7 +24188,7 @@ class jN {
24188
24188
  return this.filter.tableId;
24189
24189
  }
24190
24190
  }
24191
- function HB(e) {
24191
+ function zB(e) {
24192
24192
  return {
24193
24193
  tooltip: "Apply column filter",
24194
24194
  command: e
@@ -41100,7 +41100,7 @@ const OW = (e) => (t, { grid: n, item: o }) => {
41100
41100
  MW(n, o), n.updateRowCount(), n.invalidate(), e.isEdited = !0, e.hotKeysBehavior.pushToCommandQueue(n);
41101
41101
  }, MW = (e, t) => {
41102
41102
  const n = e.getData(), o = n.getIdPropertyName(), i = {
41103
- ...JW(n),
41103
+ ...eB(n),
41104
41104
  ...t,
41105
41105
  [o]: Uh(e),
41106
41106
  isEdited: !0,
@@ -41112,7 +41112,7 @@ function IW({
41112
41112
  SlickDataView: e = _W,
41113
41113
  applyCellCssStyles: t,
41114
41114
  assignIds: n = !1,
41115
- columnSorter: o = PB,
41115
+ columnSorter: o = DB,
41116
41116
  columns: r,
41117
41117
  getItemMetadata: i,
41118
41118
  groups: a,
@@ -41140,7 +41140,7 @@ function IW({
41140
41140
  ), W.registerPlugin(O), W.registerPlugin(C), i && (F.getItemMetadata = i(W)), F.setItems(
41141
41141
  n ? d.map(($, K) => ({ ...$, [l]: ++K })) : d.map(($) => ({ ...$ })),
41142
41142
  l
41143
- ), W.invalidate(), F.onRowCountChanged.subscribe(P(S)), F.onRowsChanged.subscribe(TD(W)), W.onAddNewRow.subscribe(u), W.onCellChange.subscribe(p), m && W.onMouseEnter.subscribe(m), v && W.onMouseLeave.subscribe(v), D && W.onSelectedRowsChanged.subscribe(D), f && W.onBeforeEditCell.subscribe(f), y && W.onClick.subscribe(y), w && W.onDblClick.subscribe(w), W.onSort.subscribe(o.getSortFunction(S.id)), W.onColumnsResized.subscribe(DW(S.id)), W.onContextMenu.subscribe(sB(S)), S.columnPicker && W.onHeaderContextMenu.subscribe(iB(S));
41143
+ ), W.invalidate(), F.onRowCountChanged.subscribe(P(S)), F.onRowsChanged.subscribe(TD(W)), W.onAddNewRow.subscribe(u), W.onCellChange.subscribe(p), m && W.onMouseEnter.subscribe(m), v && W.onMouseLeave.subscribe(v), D && W.onSelectedRowsChanged.subscribe(D), f && W.onBeforeEditCell.subscribe(f), y && W.onClick.subscribe(y), w && W.onDblClick.subscribe(w), W.onSort.subscribe(o.getSortFunction(S.id)), W.onColumnsResized.subscribe(DW(S.id)), W.onContextMenu.subscribe(iB(S)), S.columnPicker && W.onHeaderContextMenu.subscribe(aB(S));
41144
41144
  const R = HN(S);
41145
41145
  return O.onCommand.subscribe(R), b && (A.onCommand.subscribe(b), W.registerPlugin(A)), a && (S.grouping = {
41146
41146
  groups: a,
@@ -41351,7 +41351,7 @@ const Zm = Ks`
41351
41351
  onSelectedRowsChanged: D,
41352
41352
  options: x,
41353
41353
  table: S
41354
- }), lB(S), uB(S), dB(S), /* @__PURE__ */ k.jsx(
41354
+ }), cB(S), hB(S), uB(S), /* @__PURE__ */ k.jsx(
41355
41355
  FW.Container,
41356
41356
  {
41357
41357
  id: S.id,
@@ -41364,7 +41364,7 @@ const Zm = Ks`
41364
41364
  borderRadius: "10px",
41365
41365
  height: "100%",
41366
41366
  width: "100%"
41367
- }), Qm = { Skeleton: VW, Wrapper: $W }, zB = ({
41367
+ }), Qm = { Skeleton: VW, Wrapper: $W }, YB = ({
41368
41368
  SlickDataView: e,
41369
41369
  applyCellCssStyles: t,
41370
41370
  assignIds: n,
@@ -41418,7 +41418,7 @@ const Zm = Ks`
41418
41418
  /* @__PURE__ */ k.jsx(ij, { tableId: C.id }),
41419
41419
  /* @__PURE__ */ k.jsx(_j, { tableId: C.id }),
41420
41420
  /* @__PURE__ */ k.jsx(lA, { tableId: C.id })
41421
- ] }), YB = {
41421
+ ] }), UB = {
41422
41422
  cssClass: "text-center",
41423
41423
  id: du,
41424
41424
  field: du
@@ -41426,7 +41426,7 @@ const Zm = Ks`
41426
41426
  function jW(e, t, n) {
41427
41427
  return n ? "<span>&#9998;</span>" : "";
41428
41428
  }
41429
- const UB = {
41429
+ const qB = {
41430
41430
  id: "isEdited",
41431
41431
  name: "&#9998;",
41432
41432
  field: "isEdited",
@@ -41516,7 +41516,7 @@ const BW = new WW(), HW = [
41516
41516
  gn.Boolean,
41517
41517
  gn.Number
41518
41518
  ];
41519
- class qB extends jN {
41519
+ class GB extends jN {
41520
41520
  filterFn(t, n) {
41521
41521
  if (!n.columnFilters) return !0;
41522
41522
  const o = this.grid;
@@ -43820,9 +43820,15 @@ Arguments: ` + Array.prototype.slice.call(_).join("") + `
43820
43820
  }(xl)), xl.exports;
43821
43821
  }
43822
43822
  UW();
43823
- const qW = `
43823
+ function qW(e, t) {
43824
+ const n = new DOMParser().parseFromString(t, "text/html");
43825
+ e.documentElement.replaceWith(
43826
+ e.importNode(n.documentElement, !0)
43827
+ );
43828
+ }
43829
+ const GW = `
43824
43830
  html body {
43825
- font-family: "Courier", "sans-serif";
43831
+ font-family: Carlito, Calibri, Arial, Helvetica, sans-serif;
43826
43832
  font-size: 12px;
43827
43833
  }
43828
43834
  body table {
@@ -43831,7 +43837,7 @@ const qW = `
43831
43837
  font-size: 12px;
43832
43838
  }
43833
43839
  table thead {
43834
- border-bottom: 2px solid gray;
43840
+ border-bottom: 1px solid gray;
43835
43841
  }
43836
43842
  table th,
43837
43843
  table td {
@@ -43847,55 +43853,87 @@ const qW = `
43847
43853
  .heading {
43848
43854
  height: 30px;
43849
43855
  }
43850
- .heading .table_name {
43856
+ .heading .table-name {
43851
43857
  text-align: left;
43852
- padding-bottom: 20px;
43853
43858
  }
43854
- .heading .date_stamp {
43859
+ .heading .date-stamp {
43855
43860
  text-align: right;
43856
- padding-bottom: 20px;
43857
43861
  }
43858
- .column_name {
43862
+ .column-name {
43859
43863
  padding-top: 1em;
43860
43864
  font-weight: bold;
43861
43865
  }
43862
- .align_right {
43866
+ .align-right {
43863
43867
  text-align: right;
43864
43868
  }
43865
- .align_left {
43869
+ .align-left {
43866
43870
  text-align: left;
43867
43871
  }
43868
43872
  `;
43869
- class GW {
43873
+ class KW {
43870
43874
  constructor() {
43871
- this.clientId = 0, this.clientName = "", this.cssStyles = qW;
43875
+ this.clientId = 0, this.clientName = "", this.cssStyles = GW;
43872
43876
  }
43873
43877
  getClientName() {
43874
43878
  const t = document.createElement("tr"), n = document.createElement("th");
43875
- return n.classList.add("align_left"), n.setAttribute("colspan", "100%"), n.innerText = `${this.clientName} [${this.clientId}]`, t.append(n), t;
43879
+ return n.classList.add("align-left"), n.setAttribute("colspan", "100%"), n.innerText = `${this.clientName} [${this.clientId}]`, t.append(n), t;
43880
+ }
43881
+ getHtmlTemplate(t) {
43882
+ const {
43883
+ body: n = "",
43884
+ footer: o = "",
43885
+ header: r = "",
43886
+ styles: i = "",
43887
+ title: a = ""
43888
+ } = t;
43889
+ return `
43890
+ <!doctype html>
43891
+ <html lang="en">
43892
+ <head>
43893
+ <meta charset="UTF-8">
43894
+ <meta name="viewport"
43895
+ content="width=device-width, initial-scale=1.0">
43896
+ <link rel="preconnect" href="https://fonts.googleapis.com">
43897
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
43898
+ <link href="https://fonts.googleapis.com/css2?family=Carlito:ital,wght@0,400;0,700;1,400;1,700&display=swap"
43899
+ rel="stylesheet">
43900
+ <title>${a}</title>
43901
+ <style>${i}</style>
43902
+ </head>
43903
+ <body>
43904
+ <table>
43905
+ ${r}
43906
+ <tbody>
43907
+ <tr>
43908
+ <td>
43909
+ ${n}
43910
+ </td>
43911
+ </tr>
43912
+ </tbody>
43913
+ ${o}
43914
+ </table>
43915
+ </body>
43916
+ </html>
43917
+ `;
43876
43918
  }
43877
43919
  columnNames(t) {
43878
43920
  const n = document.createElement("tr");
43879
43921
  return (t.grid?.getColumns() || []).filter((a) => a.forPrint).forEach(({ name: a }) => {
43880
43922
  const l = document.createElement("th");
43881
- l.classList.add("column_name"), typeof a == "string" ? l.innerText = a : l.innerText = " ", n.append(l);
43923
+ l.classList.add("column-name"), typeof a == "string" ? l.innerText = a : l.innerText = " ", n.append(l);
43882
43924
  }), n;
43883
43925
  }
43884
43926
  tableNameAndTime(t) {
43885
43927
  const n = document.createElement("tr");
43886
43928
  n.classList.add("heading");
43887
43929
  const o = document.createElement("th");
43888
- o.setAttribute("colspan", "2"), o.classList.add("table_name"), o.innerText = t.name || t.id, n.append(o);
43930
+ o.setAttribute("colspan", "2"), o.classList.add("table-name"), o.innerText = t.name || t.id, n.append(o);
43889
43931
  const r = document.createElement("th");
43890
- return r.setAttribute("colspan", "100%"), r.classList.add("date_stamp"), r.innerText = xe().format("MM/DD/YYYY h:mm A"), n.append(r), n;
43891
- }
43892
- createStyleElement() {
43893
- const t = document.createElement("style");
43894
- return t.innerHTML = this.cssStyles, t;
43932
+ return r.setAttribute("colspan", "100%"), r.classList.add("date-stamp"), r.innerText = xe().format("MM/DD/YYYY h:mm A"), n.append(r), n;
43895
43933
  }
43896
43934
  createTableElement(t) {
43897
43935
  const n = document.createElement("table");
43898
- return n.append(this.createThead(t)), n.append(this.createTbody(t)), n;
43936
+ return n.append(this.createColumnNames(t)), n.append(this.createTbody(t)), n;
43899
43937
  }
43900
43938
  createTbody(t) {
43901
43939
  const n = document.createElement("tbody"), o = t.grid;
@@ -43912,7 +43950,7 @@ class GW {
43912
43950
  const o = t.filter.print(t);
43913
43951
  if (o.length) {
43914
43952
  const r = document.createElement("tr"), i = document.createElement("th");
43915
- i.setAttribute("colspan", "100%"), i.classList.add("align_left"), i.innerText = "Applied filters", r.append(i), n.push(r);
43953
+ i.setAttribute("colspan", "100%"), i.classList.add("align-left"), i.innerText = "Applied filters", r.append(i), n.push(r);
43916
43954
  }
43917
43955
  o.forEach((r) => {
43918
43956
  n.push(r);
@@ -43924,9 +43962,13 @@ class GW {
43924
43962
  totals(t) {
43925
43963
  return [];
43926
43964
  }
43927
- createThead(t) {
43965
+ createHeader(t) {
43966
+ const n = document.createElement("thead");
43967
+ return n.append(this.getClientName()), n.append(this.tableNameAndTime(t)), n.append(...this.filters(t)), n;
43968
+ }
43969
+ createColumnNames(t) {
43928
43970
  const n = document.createElement("thead");
43929
- return n.append(this.getClientName()), n.append(this.tableNameAndTime(t)), n.append(...this.filters(t)), n.append(this.columnNames(t)), n;
43971
+ return n.append(this.columnNames(t)), n;
43930
43972
  }
43931
43973
  createTr(t, n, o) {
43932
43974
  const r = document.createElement("tr"), i = o.getData(), a = i.getItem(n), l = a.__group, d = a.__groupTotals;
@@ -43948,22 +43990,31 @@ class GW {
43948
43990
  return r;
43949
43991
  }
43950
43992
  print(t, n, o) {
43951
- this.clientId = n, this.clientName = o;
43952
- const r = window.open(), i = document.createElement("title");
43953
- i.innerText = t.name || t.id;
43954
- const a = r.document.querySelector("head");
43955
- a.append(i), a.append(this.createStyleElement()), r.document.querySelector("body").append(this.createTableElement(t)), r.print();
43993
+ const r = window.open();
43994
+ r && (this.clientId = n, this.clientName = o, qW(
43995
+ r.document,
43996
+ this.getHtmlTemplate({
43997
+ title: t.name || t.id,
43998
+ styles: this.cssStyles,
43999
+ header: this.createHeader(t).outerHTML,
44000
+ body: this.createTableElement(t).outerHTML,
44001
+ footer: this.createFooter().outerHTML
44002
+ })
44003
+ ), r.print());
44004
+ }
44005
+ createFooter() {
44006
+ return document.createElement("tfoot");
43956
44007
  }
43957
44008
  }
43958
- function KW(e) {
44009
+ function XW(e) {
43959
44010
  const t = document.querySelector(e);
43960
44011
  if (!t) return !0;
43961
44012
  const { scrollHeight: n, scrollWidth: o } = document.documentElement, { bottom: r, left: i, right: a, top: l } = t.getBoundingClientRect();
43962
44013
  return r <= 0 || i >= o || a <= 0 || l >= n;
43963
44014
  }
43964
- class GB {
44015
+ class KB {
43965
44016
  constructor(t) {
43966
- this.columnPicker = null, this.copiedRows = [], this.downloadManager = new ND(), this.filter = new VN(), this.hotKeysBehavior = new AD(), this.summaryColumnIds = [], this._grid = null, this._grouping = {}, this._isActive = !1, this._isEdited = !1, this._lastActiveCell = { row: 0, cell: 0 }, this._observers = [], this._printer = new GW();
44017
+ this.columnPicker = null, this.copiedRows = [], this.downloadManager = new ND(), this.filter = new VN(), this.hotKeysBehavior = new AD(), this.summaryColumnIds = [], this._grid = null, this._grouping = {}, this._isActive = !1, this._isEdited = !1, this._lastActiveCell = { row: 0, cell: 0 }, this._observers = [], this._printer = new KW();
43967
44018
  const {
43968
44019
  columnPicker: n,
43969
44020
  downloadManager: o,
@@ -43985,7 +44036,7 @@ class GB {
43985
44036
  return this.grid = r, r.onKeyDown.subscribe(mm(r)), this.filter.register(r, this.id), this.grid;
43986
44037
  }
43987
44038
  handleKeyboardEvent(t) {
43988
- KW(`#${this.id}`) || this.hotKeysBehavior.handleKeyboardEvent(t, this);
44039
+ XW(`#${this.id}`) || this.hotKeysBehavior.handleKeyboardEvent(t, this);
43989
44040
  }
43990
44041
  get grid() {
43991
44042
  return this._grid;
@@ -44043,19 +44094,19 @@ class GB {
44043
44094
  this.grid?.onKeyDown.unsubscribe(mm(this.grid)), this.grid?.getSelectionModel() && this.grid.setSelectedRows([]), this.hotKeysBehavior.resetQueue(), this.isEdited = !1, this.isActive = !1, this.grid = null;
44044
44095
  }
44045
44096
  }
44046
- class XW extends ka {
44097
+ class ZW extends ka {
44047
44098
  constructor() {
44048
44099
  super(...arguments), this.clientId = 0, this.clientName = "", this.x = 0, this.y = 0;
44049
44100
  }
44050
44101
  }
44051
- const sn = new XW();
44052
- class ZW extends ka {
44102
+ const sn = new ZW();
44103
+ class QW extends ka {
44053
44104
  constructor() {
44054
44105
  super(...arguments), this.x = 0, this.y = 0;
44055
44106
  }
44056
44107
  }
44057
- const po = new ZW();
44058
- class QW extends ka {
44108
+ const po = new QW();
44109
+ class JW extends ka {
44059
44110
  constructor() {
44060
44111
  super(...arguments), this._open = !1, this.x = 0, this.y = 0;
44061
44112
  }
@@ -44072,7 +44123,7 @@ class QW extends ka {
44072
44123
  this._table = t;
44073
44124
  }
44074
44125
  }
44075
- const Wn = new QW(), JW = (e) => {
44126
+ const Wn = new JW(), eB = (e) => {
44076
44127
  const t = e.getLength() - 1;
44077
44128
  return e.getItem(t);
44078
44129
  }, Uh = (e) => {
@@ -44090,10 +44141,10 @@ function qh(e) {
44090
44141
  function Ob(e) {
44091
44142
  return qh(e) && e.keyCode === ns.KeyB;
44092
44143
  }
44093
- function eB(e) {
44144
+ function tB(e) {
44094
44145
  return e.shiftKey && e.keyCode === ns.KeyDel;
44095
44146
  }
44096
- function tB(e) {
44147
+ function nB(e) {
44097
44148
  return e.altKey && e.keyCode === ns.KeyS;
44098
44149
  }
44099
44150
  function Mb(e) {
@@ -44102,12 +44153,12 @@ function Mb(e) {
44102
44153
  function Ib(e) {
44103
44154
  return qh(e) && e.keyCode === ns.KeyZ;
44104
44155
  }
44105
- function nB(e) {
44156
+ function oB(e) {
44106
44157
  const t = e.getActiveCell();
44107
44158
  return !e.getSelectedRows().length && !t;
44108
44159
  }
44109
44160
  function Nb(e) {
44110
- const t = rB(e), o = e.getData().getItems(), r = o.findIndex((a) => a.id === t) + 1, i = o.length;
44161
+ const t = sB(e), o = e.getData().getItems(), r = o.findIndex((a) => a.id === t) + 1, i = o.length;
44111
44162
  return r || i;
44112
44163
  }
44113
44164
  const Gh = (e) => {
@@ -44115,7 +44166,7 @@ const Gh = (e) => {
44115
44166
  for (let n = 0; n < e.getLength(); n++)
44116
44167
  t.push(e.getItem(n));
44117
44168
  return t;
44118
- }, oB = (e) => {
44169
+ }, rB = (e) => {
44119
44170
  const t = e.getSelectedRows(), n = e.getData(), o = Gh(n), r = n.getItems(), i = [], a = n.getIdPropertyName();
44120
44171
  let l = Uh(e);
44121
44172
  t.length ? t.forEach((d) => {
@@ -44130,21 +44181,21 @@ const Gh = (e) => {
44130
44181
  isEdited: !0,
44131
44182
  isNew: !0
44132
44183
  }), r.splice(Nb(e), 0, ...i), n.setItems(r), e.setSelectedRows([]), e.invalidate();
44133
- }, rB = (e) => {
44184
+ }, sB = (e) => {
44134
44185
  const t = e.getData(), n = Gh(t), o = e.getActiveCell()?.row;
44135
44186
  return o !== void 0 ? (n[o] || n[n.length - 1])?.id : 0;
44136
44187
  };
44137
- function sB(e) {
44188
+ function iB(e) {
44138
44189
  return function(t) {
44139
44190
  t.preventDefault(), Db(), sn.table = e, sn.x = t.pageX || 0, sn.y = t.pageY || 0, sn.notify();
44140
44191
  };
44141
44192
  }
44142
- function iB(e) {
44193
+ function aB(e) {
44143
44194
  return function(t) {
44144
44195
  t.preventDefault(), Db(), po.table = e, po.x = t.pageX || 0, po.y = t.pageY || 0, po.notify();
44145
44196
  };
44146
44197
  }
44147
- class aB extends ka {
44198
+ class lB extends ka {
44148
44199
  constructor() {
44149
44200
  super(...arguments), this._activeTable = null;
44150
44201
  }
@@ -44155,7 +44206,7 @@ class aB extends ka {
44155
44206
  this._activeTable = t;
44156
44207
  }
44157
44208
  }
44158
- const Oi = new aB(), lB = (e) => {
44209
+ const Oi = new lB(), cB = (e) => {
44159
44210
  function t() {
44160
44211
  if (e.id !== Oi.activeTable?.id) {
44161
44212
  e.isActive = !1;
@@ -44178,9 +44229,9 @@ const Oi = new aB(), lB = (e) => {
44178
44229
  ), o.removeEventListener("click", n, !0);
44179
44230
  };
44180
44231
  }, []);
44181
- }, KB = (e) => {
44232
+ }, XB = (e) => {
44182
44233
  const [t, n] = mo(
44183
- cB(e)
44234
+ dB(e)
44184
44235
  );
44185
44236
  return On(() => {
44186
44237
  const o = (r) => {
@@ -44198,13 +44249,13 @@ const Oi = new aB(), lB = (e) => {
44198
44249
  };
44199
44250
  }, []), Object.values(t).some((o) => o);
44200
44251
  };
44201
- function cB(e) {
44252
+ function dB(e) {
44202
44253
  const t = {};
44203
44254
  for (const n of e)
44204
44255
  t[n.id] = n.isEdited;
44205
44256
  return t;
44206
44257
  }
44207
- function dB(e) {
44258
+ function uB(e) {
44208
44259
  On(() => {
44209
44260
  function t() {
44210
44261
  e.grid?.resizeCanvas();
@@ -44215,7 +44266,7 @@ function dB(e) {
44215
44266
  };
44216
44267
  }, []);
44217
44268
  }
44218
- const uB = (e) => {
44269
+ const hB = (e) => {
44219
44270
  On(() => {
44220
44271
  function t(n) {
44221
44272
  const o = n.grid;
@@ -44225,7 +44276,7 @@ const uB = (e) => {
44225
44276
  e.deleteObserver(t);
44226
44277
  };
44227
44278
  }, []);
44228
- }, hB = (e) => {
44279
+ }, fB = (e) => {
44229
44280
  if (!e) return 0;
44230
44281
  if (typeof e == "number") return e;
44231
44282
  const t = e.replace(/\$|,|\s/g, ""), n = t.replace(/\(|\)/g, "");
@@ -44708,9 +44759,9 @@ typeof require < "u" && typeof exports < "u" && (exports.parser = zr, exports.Pa
44708
44759
  return zr.parse.apply(zr, arguments);
44709
44760
  });
44710
44761
  const Ab = 2;
44711
- class fB extends Ym {
44762
+ class pB extends Ym {
44712
44763
  isValueChanged() {
44713
- const t = hB(this.defaultValue);
44764
+ const t = fB(this.defaultValue);
44714
44765
  let n = 0;
44715
44766
  try {
44716
44767
  n = zr.parse(this.input.value || "0");
@@ -44752,8 +44803,8 @@ class fB extends Ym {
44752
44803
  };
44753
44804
  }
44754
44805
  }
44755
- fB.DefaultDecimalPlaces = Ab;
44756
- class pB {
44806
+ pB.DefaultDecimalPlaces = Ab;
44807
+ class mB {
44757
44808
  constructor() {
44758
44809
  this.currentFocus = -1, this.defaultValue = "", this.id = "slick-table-autocomplete", this.input = document.createElement("input"), this.keyCaptureList = [Ao.UP, Ao.DOWN, Ao.ENTER];
44759
44810
  }
@@ -44851,10 +44902,10 @@ class pB {
44851
44902
  };
44852
44903
  }
44853
44904
  }
44854
- function mB(e) {
44905
+ function gB(e) {
44855
44906
  return e.replace(/[.*+?^${}()|[\]\\]/g, (t) => `\\${t}`);
44856
44907
  }
44857
- class XB extends pB {
44908
+ class ZB extends mB {
44858
44909
  constructor(t) {
44859
44910
  super(), this.args = t;
44860
44911
  const n = this.args.column, o = n.optionsList;
@@ -44878,7 +44929,7 @@ class XB extends pB {
44878
44929
  }
44879
44930
  showOptions(t) {
44880
44931
  this.createList(), this.suggestionsList.forEach((n) => {
44881
- const o = n.match(new RegExp(mB(t), "i"));
44932
+ const o = n.match(new RegExp(gB(t), "i"));
44882
44933
  if (o) {
44883
44934
  const r = o[0], i = document.createElement("div");
44884
44935
  i.innerHTML = `${n.replaceAll(r, `<strong>${r}</strong>`)}`, i.innerHTML += `<input type="hidden" value="${n}">`, i.addEventListener("click", this.onClick.bind(this)), this.list?.appendChild(i);
@@ -44887,25 +44938,25 @@ class XB extends pB {
44887
44938
  }
44888
44939
  }
44889
44940
  var Rl = { exports: {} };
44890
- const gB = /* @__PURE__ */ p0(FN);
44941
+ const yB = /* @__PURE__ */ p0(FN);
44891
44942
  /*!
44892
44943
  * Pikaday
44893
44944
  *
44894
44945
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
44895
44946
  */
44896
- var yB = Rl.exports, eg;
44897
- function vB() {
44947
+ var vB = Rl.exports, eg;
44948
+ function bB() {
44898
44949
  return eg || (eg = 1, function(e, t) {
44899
44950
  (function(n, o) {
44900
44951
  var r;
44901
44952
  {
44902
44953
  try {
44903
- r = gB;
44954
+ r = yB;
44904
44955
  } catch {
44905
44956
  }
44906
44957
  e.exports = o(r);
44907
44958
  }
44908
- })(yB, function(n) {
44959
+ })(vB, function(n) {
44909
44960
  var o = typeof n == "function", r = !!window.addEventListener, i = window.document, a = window.setTimeout, l = function(N, M, L, B) {
44910
44961
  r ? N.addEventListener(M, L, !!B) : N.attachEvent("on" + M, L);
44911
44962
  }, d = function(N, M, L, B) {
@@ -45353,13 +45404,13 @@ function vB() {
45353
45404
  });
45354
45405
  }(Rl)), Rl.exports;
45355
45406
  }
45356
- vB();
45357
- class bB {
45407
+ bB();
45408
+ class wB {
45358
45409
  constructor(t) {
45359
45410
  this.args = t, this.defaultOptions = { Yes: "Yes", No: "No" }, this.defaultValue = "", this.keyCaptureList = [Ao.UP, Ao.DOWN, Ao.ENTER], this.select = document.createElement("select"), this.init();
45360
45411
  }
45361
45412
  init() {
45362
- this.select.classList.add("editor-yesno"), this.select.setAttribute("tabIndex", "0"), this.select.append(...wB(this.htmlOptionElements())), this.args.container.append(this.select), this.select.focus();
45413
+ this.select.classList.add("editor-yesno"), this.select.setAttribute("tabIndex", "0"), this.select.append(...CB(this.htmlOptionElements())), this.args.container.append(this.select), this.select.focus();
45363
45414
  }
45364
45415
  htmlOptionElements() {
45365
45416
  const n = this.args.column.selectOptions || this.defaultOptions, o = [];
@@ -45391,24 +45442,24 @@ class bB {
45391
45442
  return this.args.column.validator ? this.args.column.validator(this.select.value, this.args) : { valid: !0 };
45392
45443
  }
45393
45444
  }
45394
- function wB(e) {
45445
+ function CB(e) {
45395
45446
  return e.sort((t, n) => t.innerText.toLowerCase() > n.innerText.toLowerCase() ? 1 : t.innerText.toLowerCase() < n.innerText.toLowerCase() ? -1 : 0);
45396
45447
  }
45397
- class ZB extends bB {
45448
+ class QB extends wB {
45398
45449
  applyValue(t, n) {
45399
45450
  t[this.args.column.field] = Number(n);
45400
45451
  }
45401
45452
  }
45402
- const QB = (e, t, n) => n === "0" ? "" : n ? "<span class='sgi sgi-check green'></span>" : "";
45403
- function CB(e) {
45453
+ const JB = (e, t, n) => n === "0" ? "" : n ? "<span class='sgi sgi-check green'></span>" : "";
45454
+ function SB(e) {
45404
45455
  return function(n, o, r) {
45405
45456
  return Eh(r, e);
45406
45457
  };
45407
45458
  }
45408
- const JB = CB().name, e2 = (e, t) => {
45459
+ const e2 = SB().name, t2 = (e, t) => {
45409
45460
  const n = e.sum && e.sum[t.field];
45410
45461
  return n !== null ? `${e.group.level ? "total" : "TOTAL"}: ${Eh(n)}` : "";
45411
- }, t2 = (e, t, n) => {
45462
+ }, n2 = (e, t, n) => {
45412
45463
  const r = e.getData().getRowById(t);
45413
45464
  if (r === void 0) return;
45414
45465
  const i = e.getColumnIndex(n);
@@ -45420,26 +45471,26 @@ const JB = CB().name, e2 = (e, t) => {
45420
45471
  e.removeCellCssStyles(`${r}`);
45421
45472
  }, 1500);
45422
45473
  };
45423
- function SB(e) {
45474
+ function _B(e) {
45424
45475
  return e.reduce((t, n) => (t[n] = "wink", t), {});
45425
45476
  }
45426
- function n2(e, t) {
45427
- const o = e.getData().getLength(), r = _B(o, t);
45477
+ function o2(e, t) {
45478
+ const o = e.getData().getLength(), r = xB(o, t);
45428
45479
  e.setCellCssStyles("wink", r), setTimeout(() => {
45429
45480
  e.removeCellCssStyles("wink");
45430
45481
  }, 1500);
45431
45482
  }
45432
- function _B(e, t) {
45433
- const n = SB(t), o = {};
45483
+ function xB(e, t) {
45484
+ const n = _B(t), o = {};
45434
45485
  let r = 0;
45435
45486
  for (; r < e; )
45436
45487
  o[r] = n, r++;
45437
45488
  return o;
45438
45489
  }
45439
- function o2(e, t, n) {
45490
+ function r2(e, t, n) {
45440
45491
  return n === "0" ? "" : n ? "Yes" : "";
45441
45492
  }
45442
- function xB(e) {
45493
+ function RB(e) {
45443
45494
  if (!e.getSelectionModel()) return tg(e);
45444
45495
  let t = e.getSelectedRows();
45445
45496
  return t.sort((n, o) => n - o), t.length === 0 && (t = tg(e)), t;
@@ -45459,19 +45510,19 @@ function Lb(e, t, n) {
45459
45510
  n === ql ? i[t.id] = i[t.field] : i[n] = i[t.field], delete i[t.field];
45460
45511
  });
45461
45512
  }
45462
- function RB(e, t, n, o) {
45513
+ function TB(e, t, n, o) {
45463
45514
  const i = e.getColumns().find(
45464
45515
  (a) => a.field === n && a.id !== t.id
45465
45516
  );
45466
45517
  i && (Lb(e, i, ql), Fb(e, i, ql, o));
45467
45518
  }
45468
- function r2(e, t) {
45519
+ function s2(e, t) {
45469
45520
  return function(o, r) {
45470
45521
  const i = r.grid, a = r.column, l = r.command;
45471
- RB(i, a, l, e), Lb(i, a, l), Fb(i, a, l, e), i.invalidate(), t.hotKeysBehavior.resetQueue(), t.hotKeysBehavior.pushToCommandQueue(i);
45522
+ TB(i, a, l, e), Lb(i, a, l), Fb(i, a, l, e), i.invalidate(), t.hotKeysBehavior.resetQueue(), t.hotKeysBehavior.pushToCommandQueue(i);
45472
45523
  };
45473
45524
  }
45474
- class TB {
45525
+ class kB {
45475
45526
  constructor() {
45476
45527
  this.emptyValue = "1/1/1970";
45477
45528
  }
@@ -45493,10 +45544,10 @@ class TB {
45493
45544
  return Number((n || "0").match(/^\d+/g)?.[0] || 0) - o;
45494
45545
  }
45495
45546
  }
45496
- const kB = new TB();
45497
- class EB {
45547
+ const EB = new kB();
45548
+ class PB {
45498
45549
  constructor() {
45499
- this.sort = kB, this.withFormatter = [Zo.TEXT, Zo.NUMBER_FORMATTED];
45550
+ this.sort = EB, this.withFormatter = [Zo.TEXT, Zo.NUMBER_FORMATTED];
45500
45551
  }
45501
45552
  getSortFunction(t) {
45502
45553
  let n = "", o = !1, r;
@@ -45582,8 +45633,8 @@ class EB {
45582
45633
  }
45583
45634
  }
45584
45635
  }
45585
- const PB = new EB();
45586
- class s2 {
45636
+ const DB = new PB();
45637
+ class i2 {
45587
45638
  constructor(t, n) {
45588
45639
  this.columnsWithTitle = t, this.columnsWithValue = n;
45589
45640
  }
@@ -45616,55 +45667,55 @@ class s2 {
45616
45667
  }
45617
45668
  }
45618
45669
  export {
45619
- pB as Autocomplete,
45620
- VB as BOLD,
45621
- NB as ColumnPicker,
45622
- EB as ColumnSorter,
45623
- qB as DecoratorColumnFilter,
45670
+ mB as Autocomplete,
45671
+ jB as BOLD,
45672
+ AB as ColumnPicker,
45673
+ PB as ColumnSorter,
45674
+ GB as DecoratorColumnFilter,
45624
45675
  jN as DecoratorFilter,
45625
- AB as DefaultHotKeys,
45626
- GW as DefaultPrinter,
45627
- BB as DeletedRowsFilter,
45676
+ FB as DefaultHotKeys,
45677
+ KW as DefaultPrinter,
45678
+ HB as DeletedRowsFilter,
45628
45679
  Be as EColumnFilter,
45629
45680
  gn as EColumnFiltersGroup,
45630
45681
  Zo as ESortType,
45631
- XB as EditorAutocomplete,
45632
- ZB as EditorSelectNumber,
45633
- bB as EditorSelectString,
45634
- JB as FORMATTER_NUMBER,
45682
+ ZB as EditorAutocomplete,
45683
+ QB as EditorSelectNumber,
45684
+ wB as EditorSelectString,
45685
+ e2 as FORMATTER_NUMBER,
45635
45686
  $N as Filter,
45636
45687
  rh as HotKeysDecorator,
45637
45688
  ql as IGNORE,
45638
- FB as PreventCopying,
45639
- LB as RedoUndoOnly,
45640
- MB as Skeleton,
45641
- GB as SlickTable,
45642
- zB as SlickgridTable,
45643
- s2 as TotalCalculator,
45644
- $B as WINK,
45645
- jB as WithSummary,
45689
+ LB as PreventCopying,
45690
+ $B as RedoUndoOnly,
45691
+ IB as Skeleton,
45692
+ KB as SlickTable,
45693
+ YB as SlickgridTable,
45694
+ i2 as TotalCalculator,
45695
+ VB as WINK,
45696
+ WB as WithSummary,
45646
45697
  AD as WithoutHotKeys,
45647
- YB as columnCheckboxSelector,
45648
- UB as columnIsEdited,
45698
+ UB as columnCheckboxSelector,
45699
+ qB as columnIsEdited,
45649
45700
  Db as commitCurrentEdit,
45650
- oB as copySelectedRows,
45701
+ rB as copySelectedRows,
45651
45702
  sn as eventContextMenu,
45652
45703
  Eh as formatNumber,
45653
- QB as formatterCheckMark,
45654
- e2 as formatterGroupTotals,
45704
+ JB as formatterCheckMark,
45705
+ t2 as formatterGroupTotals,
45655
45706
  Gh as getDisplayedRows,
45656
- CB as getFormatterNumber,
45707
+ SB as getFormatterNumber,
45657
45708
  Uh as getNextId,
45658
- r2 as getOnHeaderMenuCommand,
45709
+ s2 as getOnHeaderMenuCommand,
45659
45710
  HN as handleHeaderButtons,
45660
45711
  cr as headerButtons,
45661
- t2 as highlightCell,
45662
- n2 as highlightColumns,
45712
+ n2 as highlightCell,
45713
+ o2 as highlightColumns,
45663
45714
  Ob as hotKeysCopy,
45664
- eB as hotKeysDelete,
45715
+ tB as hotKeysDelete,
45665
45716
  Mb as hotKeysRedo,
45666
45717
  Ib as hotKeysUndo,
45667
- HB as openColumnFilter,
45668
- o2 as printerCheckMark,
45669
- KB as useListenIfTablesWereEdited
45718
+ zB as openColumnFilter,
45719
+ r2 as printerCheckMark,
45720
+ XB as useListenIfTablesWereEdited
45670
45721
  };