xrk-components 2.0.0-beta.2 → 2.0.0-beta.3

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/lib/index.esm.js CHANGED
@@ -74662,24 +74662,24 @@ var XrkSearch = script$4;
74662
74662
  */
74663
74663
  var useTableSetup = function () {
74664
74664
  var info = reactive({
74665
- selectionIds: [],
74666
74665
  selectionRows: new Map()
74667
74666
  });
74667
+ var selectionIds = ref([]);
74668
74668
  return {
74669
- selectionIds: info.selectionIds,
74669
+ selectionIds: selectionIds,
74670
74670
  selectionRows: info.selectionRows,
74671
74671
  hasSelectionRow: function (rowId) {
74672
- return info.selectionIds.includes(rowId);
74672
+ return selectionIds.value.includes(rowId);
74673
74673
  },
74674
74674
  addSelectionRow: function (rowId, row) {
74675
- if (!info.selectionIds.includes(rowId))
74676
- info.selectionIds.push(rowId);
74675
+ if (!selectionIds.value.includes(rowId))
74676
+ selectionIds.value.push(rowId);
74677
74677
  info.selectionRows.set(rowId, row);
74678
74678
  },
74679
74679
  removeSelectionRow: function (rowId, _row) {
74680
- var index = info.selectionIds.findIndex(function (id) { return id === rowId; });
74680
+ var index = selectionIds.value.findIndex(function (id) { return id === rowId; });
74681
74681
  if (index !== -1)
74682
- info.selectionIds.splice(index, 1);
74682
+ selectionIds.value.splice(index, 1);
74683
74683
  info.selectionRows.delete(rowId);
74684
74684
  },
74685
74685
  getSelectionRows: function () {
@@ -74690,7 +74690,7 @@ var useTableSetup = function () {
74690
74690
  return arr;
74691
74691
  },
74692
74692
  clearSelectionRows: function () {
74693
- info.selectionIds = [];
74693
+ selectionIds.value = [];
74694
74694
  info.selectionRows.clear();
74695
74695
  }
74696
74696
  };
package/lib/index.umd.js CHANGED
@@ -74665,24 +74665,24 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74665
74665
  */
74666
74666
  var useTableSetup = function () {
74667
74667
  var info = vue.reactive({
74668
- selectionIds: [],
74669
74668
  selectionRows: new Map()
74670
74669
  });
74670
+ var selectionIds = vue.ref([]);
74671
74671
  return {
74672
- selectionIds: info.selectionIds,
74672
+ selectionIds: selectionIds,
74673
74673
  selectionRows: info.selectionRows,
74674
74674
  hasSelectionRow: function (rowId) {
74675
- return info.selectionIds.includes(rowId);
74675
+ return selectionIds.value.includes(rowId);
74676
74676
  },
74677
74677
  addSelectionRow: function (rowId, row) {
74678
- if (!info.selectionIds.includes(rowId))
74679
- info.selectionIds.push(rowId);
74678
+ if (!selectionIds.value.includes(rowId))
74679
+ selectionIds.value.push(rowId);
74680
74680
  info.selectionRows.set(rowId, row);
74681
74681
  },
74682
74682
  removeSelectionRow: function (rowId, _row) {
74683
- var index = info.selectionIds.findIndex(function (id) { return id === rowId; });
74683
+ var index = selectionIds.value.findIndex(function (id) { return id === rowId; });
74684
74684
  if (index !== -1)
74685
- info.selectionIds.splice(index, 1);
74685
+ selectionIds.value.splice(index, 1);
74686
74686
  info.selectionRows.delete(rowId);
74687
74687
  },
74688
74688
  getSelectionRows: function () {
@@ -74693,7 +74693,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
74693
74693
  return arr;
74694
74694
  },
74695
74695
  clearSelectionRows: function () {
74696
- info.selectionIds = [];
74696
+ selectionIds.value = [];
74697
74697
  info.selectionRows.clear();
74698
74698
  }
74699
74699
  };
@@ -1,5 +1,5 @@
1
1
  export declare const useTableSetup: () => {
2
- selectionIds: (string | number)[];
2
+ selectionIds: import("vue").Ref<(string | number)[]>;
3
3
  selectionRows: Map<string | number, any>;
4
4
  hasSelectionRow: (rowId: number | string) => boolean;
5
5
  addSelectionRow: (rowId: number | string, row: any) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xrk-components",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "",
5
5
  "main": "lib/index.esm.js",
6
6
  "typings": "lib/packages/index.d.ts",