a176c2970e87dd11fe21b0e516b05fe0a5162510a67e480947bafa2b19fa122570e69e4a9d516bcc88352bd1a64a54b0b3baaea4fd91c91a762b6ef39e4bc7 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. var vue = require('vue');
  4. var tokens = require('../tokens.js');
  5. function useMapState() {
  6. const table = vue.inject(tokens.TABLE_INJECTION_KEY);
  7. const store = table == null ? void 0 : table.store;
  8. const leftFixedLeafCount = vue.computed(() => {
  9. var _a;
  10. return (_a = store == null ? void 0 : store.states.fixedLeafColumnsLength.value) != null ? _a : 0;
  11. });
  12. const rightFixedLeafCount = vue.computed(() => {
  13. var _a;
  14. return (_a = store == null ? void 0 : store.states.rightFixedColumns.value.length) != null ? _a : 0;
  15. });
  16. const columnsCount = vue.computed(() => {
  17. var _a;
  18. return (_a = store == null ? void 0 : store.states.columns.value.length) != null ? _a : 0;
  19. });
  20. const leftFixedCount = vue.computed(() => {
  21. var _a;
  22. return (_a = store == null ? void 0 : store.states.fixedColumns.value.length) != null ? _a : 0;
  23. });
  24. const rightFixedCount = vue.computed(() => {
  25. var _a;
  26. return (_a = store == null ? void 0 : store.states.rightFixedColumns.value.length) != null ? _a : 0;
  27. });
  28. return {
  29. leftFixedLeafCount,
  30. rightFixedLeafCount,
  31. columnsCount,
  32. leftFixedCount,
  33. rightFixedCount,
  34. columns: vue.computed(() => {
  35. var _a;
  36. return (_a = store == null ? void 0 : store.states.columns.value) != null ? _a : [];
  37. })
  38. };
  39. }
  40. exports["default"] = useMapState;
  41. //# sourceMappingURL=mapState-helper.js.map