@react-fabric/data 1.0.0-beta.60 → 1.0.0-beta.62

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 (64) hide show
  1. package/dist/cjs/checklist/CheckList.js +4 -4
  2. package/dist/cjs/histogram/Histogram.js +2 -2
  3. package/dist/cjs/i18n/index.js +4 -4
  4. package/dist/cjs/index.js +2 -0
  5. package/dist/cjs/json/JsonViewer.js +3 -3
  6. package/dist/cjs/pagination/Pagination.js +11 -11
  7. package/dist/cjs/table/AddColumn.js +2 -2
  8. package/dist/cjs/table/BodyCell.js +11 -4
  9. package/dist/cjs/table/BodyRow.js +2 -2
  10. package/dist/cjs/table/CheckboxCell.js +1 -1
  11. package/dist/cjs/table/HeaderCell.js +4 -4
  12. package/dist/cjs/table/HtmlTable.js +78 -0
  13. package/dist/cjs/table/Table.js +17 -14
  14. package/dist/cjs/tree/TreeNode.js +4 -4
  15. package/dist/cjs/tree/TreePanel.js +7 -8
  16. package/dist/cjs/virtual/Scroller.js +4 -4
  17. package/dist/esm/checklist/CheckList.js +5 -5
  18. package/dist/esm/histogram/Histogram.js +3 -3
  19. package/dist/esm/i18n/index.js +2 -2
  20. package/dist/esm/index.js +1 -0
  21. package/dist/esm/json/JsonViewer.js +4 -4
  22. package/dist/esm/pagination/Pagination.js +12 -12
  23. package/dist/esm/table/AddColumn.js +3 -3
  24. package/dist/esm/table/BodyCell.js +12 -5
  25. package/dist/esm/table/BodyRow.js +2 -2
  26. package/dist/esm/table/CheckboxCell.js +2 -2
  27. package/dist/esm/table/HeaderCell.js +5 -5
  28. package/dist/esm/table/HtmlTable.js +78 -0
  29. package/dist/esm/table/Table.js +18 -15
  30. package/dist/esm/tree/TreeNode.js +6 -6
  31. package/dist/esm/tree/TreePanel.js +8 -9
  32. package/dist/esm/virtual/Scroller.js +5 -5
  33. package/dist/types/index.d.ts +1 -0
  34. package/dist/types/table/HtmlTable.d.ts +21 -0
  35. package/dist/types/table/types.d.ts +5 -5
  36. package/dist/types/tree/TreePanel.d.ts +2 -2
  37. package/dist/types/tree/types.d.ts +0 -2
  38. package/package.json +6 -6
  39. package/src/checklist/CheckList.tsx +17 -7
  40. package/src/histogram/Histogram.tsx +3 -9
  41. package/src/i18n/index.ts +2 -2
  42. package/src/index.ts +1 -0
  43. package/src/json/JsonViewer.tsx +7 -4
  44. package/src/pagination/Pagination.tsx +12 -12
  45. package/src/table/AddColumn.tsx +3 -3
  46. package/src/table/BodyCell.tsx +18 -3
  47. package/src/table/BodyRow.tsx +4 -2
  48. package/src/table/CheckboxCell.tsx +4 -4
  49. package/src/table/HeaderCell.tsx +4 -5
  50. package/src/table/HtmlTable.tsx +128 -0
  51. package/src/table/Table.tsx +24 -17
  52. package/src/table/types.ts +5 -4
  53. package/src/tree/TreeNode.tsx +7 -13
  54. package/src/tree/TreePanel.tsx +13 -18
  55. package/src/tree/types.ts +0 -5
  56. package/src/virtual/Scroller.tsx +13 -5
  57. package/dist/cjs/tree/types.js +0 -30
  58. package/dist/esm/tree/types.js +0 -29
  59. /package/dist/cjs/i18n/{ar.json.js → ar/data.json.js} +0 -0
  60. /package/dist/cjs/i18n/{en.json.js → en/data.json.js} +0 -0
  61. /package/dist/esm/i18n/{ar.json.js → ar/data.json.js} +0 -0
  62. /package/dist/esm/i18n/{en.json.js → en/data.json.js} +0 -0
  63. /package/src/i18n/{ar.json → ar/data.json} +0 -0
  64. /package/src/i18n/{en.json → en/data.json} +0 -0
@@ -40,12 +40,12 @@ var CheckItem = function CheckItem(_ref) {
40
40
  "data-type": "checkbox",
41
41
  className: "ax-checkList__checkbox",
42
42
  "data-selected": selected === 1,
43
- icon: selected ? core.CoreIcons.checkboxInt : core.CoreIcons.checkboxOff
43
+ icon: selected ? "icon-[mdi--checkbox-marked]" : "icon-[mdi--checkbox-blank-outline]"
44
44
  }), allowNegative && /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
45
45
  children: [/*#__PURE__*/jsxRuntime.jsx(core.Icon, {
46
46
  "data-type": "multiple",
47
47
  className: "ax-checkList__checkbox",
48
- icon: selected === 1 ? core.CoreIcons.expand : selected === -1 ? core.CoreIcons.collapse : core.CoreIcons.checkboxOff,
48
+ icon: selected === 1 ? "icon-[mdi--plus-box-outline]" : selected === -1 ? "icon-[mdi--minus-box-outline]" : "icon-[mdi--checkbox-blank-outline]",
49
49
  "data-selected": selected
50
50
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
51
51
  className: "ax-checkList__checkbox",
@@ -54,14 +54,14 @@ var CheckItem = function CheckItem(_ref) {
54
54
  onClick: function onClick(e) {
55
55
  return [(_onClick(id, false), e.stopPropagation())];
56
56
  },
57
- icon: selected === 1 ? core.CoreIcons.expandActive : core.CoreIcons.expand,
57
+ icon: selected === 1 ? "icon-[mdi--plus-box]" : "icon-[mdi--plus-box-outline]",
58
58
  "data-selected": selected === 1
59
59
  }), /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
60
60
  "data-type": "negative",
61
61
  onClick: function onClick(e) {
62
62
  return [(_onClick(id, true), e.stopPropagation())];
63
63
  },
64
- icon: selected === -1 ? core.CoreIcons.collapseActive : core.CoreIcons.collapse,
64
+ icon: selected === -1 ? "icon-[mdi--minus-box]" : "icon-[mdi--minus-box-outline]",
65
65
  "data-selected": selected === -1
66
66
  })]
67
67
  })]
@@ -99,7 +99,7 @@ var Histogram = function Histogram(_ref) {
99
99
  color: "danger",
100
100
  size: "sm",
101
101
  stopPropagation: true,
102
- icon: core.CoreIcons.funnelMinus,
102
+ icon: "icon-[mdi--filter-minus]",
103
103
  "aria-label": "Filter Negative",
104
104
  onClick: function onClick() {
105
105
  return _onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id, true);
@@ -108,7 +108,7 @@ var Histogram = function Histogram(_ref) {
108
108
  color: "primary",
109
109
  size: "sm",
110
110
  stopPropagation: true,
111
- icon: core.CoreIcons.funnelPlus,
111
+ icon: "icon-[mdi--filter-plus]",
112
112
  "aria-label": "Filter",
113
113
  onClick: function onClick() {
114
114
  return _onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id);
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var core = require('@react-fabric/core');
4
- var ar = require('./ar.json.js');
5
- var en = require('./en.json.js');
4
+ var data$1 = require('./ar/data.json.js');
5
+ var data = require('./en/data.json.js');
6
6
 
7
7
  /*
8
8
  * React Fabric
@@ -28,6 +28,6 @@ var en = require('./en.json.js');
28
28
  */
29
29
 
30
30
  core.addTranslationBundle("data", {
31
- en: en.default,
32
- ar: ar.default
31
+ en: data.default,
32
+ ar: data$1.default
33
33
  });
package/dist/cjs/index.js CHANGED
@@ -5,6 +5,7 @@ var CheckList = require('./checklist/CheckList.js');
5
5
  var Histogram = require('./histogram/Histogram.js');
6
6
  var JsonViewer = require('./json/JsonViewer.js');
7
7
  var Pagination = require('./pagination/Pagination.js');
8
+ var HtmlTable = require('./table/HtmlTable.js');
8
9
  var Table = require('./table/Table.js');
9
10
  var TreePanel = require('./tree/TreePanel.js');
10
11
  var Gallery = require('./virtual/Gallery.js');
@@ -18,6 +19,7 @@ exports.CheckList = CheckList.CheckList;
18
19
  exports.Histogram = Histogram.Histogram;
19
20
  exports.JsonViewer = JsonViewer.JsonViewer;
20
21
  exports.Pagination = Pagination.Pagination;
22
+ exports.HtmlTable = HtmlTable.HtmlTable;
21
23
  exports.Table = Table.Table;
22
24
  exports.TreePanel = TreePanel.TreePanel;
23
25
  exports.VirtualGallery = Gallery.VirtualGallery;
@@ -133,7 +133,7 @@ var JsonEntry = function JsonEntry(_ref3) {
133
133
  color: "danger",
134
134
  size: "xs",
135
135
  variant: "link",
136
- icon: core.CoreIcons.funnelMinus,
136
+ icon: "icon-[mdi--filter-minus]",
137
137
  "aria-label": "Filter Negative",
138
138
  onClick: function onClick() {
139
139
  return onFilter === null || onFilter === void 0 ? void 0 : onFilter(pathWithoutOrdinal, actualValue, true);
@@ -142,7 +142,7 @@ var JsonEntry = function JsonEntry(_ref3) {
142
142
  color: "primary",
143
143
  size: "xs",
144
144
  variant: "link",
145
- icon: core.CoreIcons.funnelPlus,
145
+ icon: "icon-[mdi--filter-plus]",
146
146
  "aria-label": "Filter",
147
147
  onClick: function onClick() {
148
148
  return onFilter === null || onFilter === void 0 ? void 0 : onFilter(pathWithoutOrdinal, actualValue);
@@ -168,7 +168,7 @@ var JsonEntry = function JsonEntry(_ref3) {
168
168
  },
169
169
  children: [canExpand && /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
170
170
  rtlFlip: true,
171
- icon: expanded ? core.CoreIcons.chevronDown : core.CoreIcons.chevronRight
171
+ icon: expanded ? "icon-[mdi--chevron-down]" : "icon-[mdi--chevron-right]"
172
172
  }), labelDisplay]
173
173
  }), display && /*#__PURE__*/jsxRuntime.jsxs("div", {
174
174
  className: classNames("px-2 flex flex-nowrap overflow-hidden", inline && "flex-1"),
@@ -33,7 +33,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
33
33
  onClick: function onClick() {
34
34
  return onPageChange(pg);
35
35
  },
36
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page === pg && "bg-primary-500 text-white pointer-events-none"),
36
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page === pg && "bg-primary-500 text-white pointer-events-none"),
37
37
  children: pg + 1
38
38
  }, pg);
39
39
  }), mid && /*#__PURE__*/jsxRuntime.jsx("span", {
@@ -44,7 +44,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
44
44
  onClick: function onClick() {
45
45
  return onPageChange(pg);
46
46
  },
47
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page === pg && "bg-primary-500 text-white pointer-events-none"),
47
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page === pg && "bg-primary-500 text-white pointer-events-none"),
48
48
  children: pg + 1
49
49
  }, pg);
50
50
  }), last && /*#__PURE__*/jsxRuntime.jsx("span", {
@@ -55,7 +55,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
55
55
  onClick: function onClick() {
56
56
  return onPageChange(pg);
57
57
  },
58
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page === pg && "bg-primary-500 text-white pointer-events-none"),
58
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page === pg && "bg-primary-500 text-white pointer-events-none"),
59
59
  children: pg + 1
60
60
  }, pg);
61
61
  })]
@@ -67,18 +67,18 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
67
67
  onClick: function onClick() {
68
68
  return onPageChange(0);
69
69
  },
70
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page === 0 && "pointer-events-none text-tint-300"),
70
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page === 0 && "pointer-events-none text-tint-300"),
71
71
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
72
- icon: core.CoreIcons.chevronsLeft,
72
+ icon: "icon-[mdi--chevron-double-left]",
73
73
  rtlFlip: true
74
74
  })
75
75
  }), /*#__PURE__*/jsxRuntime.jsx("button", {
76
76
  onClick: function onClick() {
77
77
  return onPageChange(page - 1);
78
78
  },
79
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page === 0 && "pointer-events-none text-tint-300"),
79
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page === 0 && "pointer-events-none text-tint-300"),
80
80
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
81
- icon: core.CoreIcons.chevronLeft,
81
+ icon: "icon-[mdi--chevron-left]",
82
82
  rtlFlip: true
83
83
  })
84
84
  }), !minimal && pageBody, minimal && /*#__PURE__*/jsxRuntime.jsxs("label", {
@@ -88,18 +88,18 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
88
88
  onClick: function onClick() {
89
89
  return onPageChange(page + 1);
90
90
  },
91
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page + 1 >= totalPages && "pointer-events-none text-tint-300"),
91
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page + 1 >= totalPages && "pointer-events-none text-tint-300"),
92
92
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
93
- icon: core.CoreIcons.chevronRight,
93
+ icon: "icon-[mdi--chevron-right]",
94
94
  rtlFlip: true
95
95
  })
96
96
  }), /*#__PURE__*/jsxRuntime.jsx("button", {
97
97
  onClick: function onClick() {
98
98
  return onPageChange(totalPages - 1);
99
99
  },
100
- className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full", page + 1 >= totalPages && "pointer-events-none text-tint-300"),
100
+ className: classNames("leading-none text-sm hover:bg-primary-200 w-8 h-6 rounded-full cursor-pointer", page + 1 >= totalPages && "pointer-events-none text-tint-300"),
101
101
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
102
- icon: core.CoreIcons.chevronsRight,
102
+ icon: "icon-[mdi--chevron-double-right]",
103
103
  rtlFlip: true
104
104
  })
105
105
  })]
@@ -34,7 +34,7 @@ var AddColumn = function AddColumn(_ref) {
34
34
  children: /*#__PURE__*/jsxRuntime.jsxs(core.Dropdown, {
35
35
  placement: "bottom-end",
36
36
  children: [/*#__PURE__*/jsxRuntime.jsx(core.Icon, {
37
- icon: core.CoreIcons.insert,
37
+ icon: "icon-[mdi--plus-circle-outline]",
38
38
  className: "p-1 rounded-t rounded-b-none hover:outline"
39
39
  }), /*#__PURE__*/jsxRuntime.jsx(core.Menu, {
40
40
  className: "text-sm",
@@ -45,7 +45,7 @@ var AddColumn = function AddColumn(_ref) {
45
45
  id: String(col.id),
46
46
  "data-dropdown-dismiss": "false",
47
47
  label: "".concat((_col$label = col.label) !== null && _col$label !== void 0 ? _col$label : String(col.id)),
48
- icon: !col.hidden ? core.CoreIcons.tick : ""
48
+ icon: !col.hidden ? "icon-[mdi--check]" : ""
49
49
  }, String(col.id));
50
50
  })
51
51
  })]
@@ -43,7 +43,7 @@ var BodyCell = function BodyCell(_ref) {
43
43
  return (_widths$get = widths.get(column.id.toString())) !== null && _widths$get !== void 0 ? _widths$get : column.width;
44
44
  }, [widths, column]);
45
45
  var content = react.useMemo(function () {
46
- var _column$dataType;
46
+ var _column$dataType2;
47
47
  var value = utilities.getByPath(item, column.id.toString());
48
48
  if (column.renderer != null) {
49
49
  return column.renderer(value, item, index);
@@ -52,16 +52,17 @@ var BodyCell = function BodyCell(_ref) {
52
52
  var _column$valueMap;
53
53
  var map = (_column$valueMap = column.valueMap) !== null && _column$valueMap !== void 0 ? _column$valueMap : {
54
54
  "true": "Yes",
55
- "false": "no"
55
+ "false": "No"
56
56
  };
57
57
  return map["".concat(utilities.isTrue(value) ? "true" : "false")];
58
58
  }
59
59
  if (column.valueMap != null) {
60
- if (column.dataType === "string" && value in column.valueMap) {
60
+ var _column$dataType;
61
+ if (["number", "string"].includes((_column$dataType = column.dataType) !== null && _column$dataType !== void 0 ? _column$dataType : "string") && value in column.valueMap) {
61
62
  return column.valueMap[value];
62
63
  }
63
64
  }
64
- if (["date", "time", "datetime"].includes((_column$dataType = column.dataType) !== null && _column$dataType !== void 0 ? _column$dataType : "")) {
65
+ if (["date", "time", "datetime"].includes((_column$dataType2 = column.dataType) !== null && _column$dataType2 !== void 0 ? _column$dataType2 : "")) {
65
66
  return /*#__PURE__*/jsxRuntime.jsx(date.DateDisplay, {
66
67
  date: value,
67
68
  format: column.format
@@ -70,6 +71,12 @@ var BodyCell = function BodyCell(_ref) {
70
71
  if (column.dataType === "number") {
71
72
  return utilities.Format.number(value, column.format);
72
73
  }
74
+ if (utilities.isObject(value)) {
75
+ return JSON.stringify(value);
76
+ }
77
+ if (utilities.isArray(value)) {
78
+ return value.join(", ");
79
+ }
73
80
  return value !== null && value !== void 0 ? value : "";
74
81
  }, [item, column]);
75
82
  return /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ var core = require('@react-fabric/core');
3
4
  var classNames = require('classnames');
4
5
  var BodyCell = require('./BodyCell.js');
5
6
  var CheckboxCell = require('./CheckboxCell.js');
6
- var core = require('@react-fabric/core');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
 
9
9
  /*
@@ -65,7 +65,7 @@ var BodyRow = function BodyRow(_ref) {
65
65
  className: classNames("group font-medium w-6 flex flex-nowrap text-start py-1", !canExpand(data) && "pointer-events-none opacity-35"),
66
66
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
67
67
  className: "p-1 text-tint-700 hover:text-primary-600",
68
- icon: expanded ? core.CoreIcons.collapse : core.CoreIcons.expand,
68
+ icon: expanded ? "icon-[mdi--minus-box]" : "icon-[mdi--plus-box]",
69
69
  onClick: function onClick(e) {
70
70
  return [keyProperty && toggleExpand(data[keyProperty]), e.stopPropagation()];
71
71
  }
@@ -32,7 +32,7 @@ var CheckboxCell = function CheckboxCell(_ref) {
32
32
  return /*#__PURE__*/jsxRuntime.jsx("div", {
33
33
  className: "group font-medium border-e w-6 flex flex-nowrap text-start py-1",
34
34
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
35
- icon: state === 2 ? core.CoreIcons.checkboxInt : state === 1 ? core.CoreIcons.checkboxOn : core.CoreIcons.checkboxOff,
35
+ icon: state === 2 ? "icon-[mdi--checkbox-intermediate]" : state === 1 ? "icon-[mdi--checkbox-marked]" : "icon-[mdi--checkbox-blank-outline]",
36
36
  className: "p-1 text-tint-700 hover:text-primary-600",
37
37
  onClick: function onClick(e) {
38
38
  return [_onClick === null || _onClick === void 0 ? void 0 : _onClick(), e.stopPropagation()];
@@ -50,7 +50,7 @@ var HeaderCell = function HeaderCell(_ref) {
50
50
  if (filterable && (dataType !== null && dataType !== void 0 ? dataType : filterOptions)) {
51
51
  ret.push( /*#__PURE__*/jsxRuntime.jsx(core.Menu, {
52
52
  label: "Filter",
53
- icon: filter ? core.CoreIcons.tick : "",
53
+ icon: filter ? "icon-[mdi--check]" : "",
54
54
  trigger: "click",
55
55
  children: /*#__PURE__*/jsxRuntime.jsx(ColumnFilters.ColumnFilters, {
56
56
  type: dataType,
@@ -65,13 +65,13 @@ var HeaderCell = function HeaderCell(_ref) {
65
65
  if (sortable) {
66
66
  ret.push( /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
67
67
  label: "Sort ascending",
68
- icon: core.CoreIcons.sortAsc,
68
+ icon: "icon-[mdi--sort-ascending]",
69
69
  onClick: function onClick() {
70
70
  return handleSort("asc");
71
71
  }
72
72
  }, "sort-asc"), /*#__PURE__*/jsxRuntime.jsx(core.MenuItem, {
73
73
  label: "Sort descending",
74
- icon: core.CoreIcons.sortDesc,
74
+ icon: "icon-[mdi--sort-descending]",
75
75
  onClick: function onClick() {
76
76
  return handleSort("desc");
77
77
  }
@@ -136,7 +136,7 @@ var HeaderCell = function HeaderCell(_ref) {
136
136
  variant: "link",
137
137
  "aria-label": "clear filter",
138
138
  stopPropagation: true,
139
- icon: core.CoreIcons.funnelRemove,
139
+ icon: "icon-[mdi--filter-remove]",
140
140
  onClick: function onClick() {
141
141
  return _onFilter === null || _onFilter === void 0 ? void 0 : _onFilter(id);
142
142
  }
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var core = require('@react-fabric/core');
5
+ var utilities = require('@react-fabric/utilities');
6
+ var classNames = require('classnames');
7
+ var react = require('react');
8
+ var usePagination = require('../hooks/usePagination.js');
9
+ var Pagination = require('../pagination/Pagination.js');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+
12
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
+ var HtmlTable = function HtmlTable(_ref) {
15
+ var data = _ref.data,
16
+ columns = _ref.columns,
17
+ _ref$paginationSize = _ref.paginationSize,
18
+ paginationSize = _ref$paginationSize === void 0 ? 25 : _ref$paginationSize,
19
+ className = _ref.className;
20
+ var paginator = usePagination.usePagination({
21
+ totalRecords: data.length,
22
+ perPage: paginationSize
23
+ });
24
+ var startIndex = react.useMemo(function () {
25
+ return paginator.page * paginationSize;
26
+ }, [paginator.page, paginationSize]);
27
+ var dataPage = react.useMemo(function () {
28
+ return paginationSize > 0 ? data.slice(startIndex, startIndex + paginationSize) : data;
29
+ }, [data, paginationSize, startIndex]);
30
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
31
+ className: className,
32
+ children: [/*#__PURE__*/jsxRuntime.jsxs("table", {
33
+ className: "table-fixed border-spacing-1 border-separate w-full text-sm",
34
+ children: [/*#__PURE__*/jsxRuntime.jsx("thead", {
35
+ className: "sticky top-0 z-1",
36
+ children: /*#__PURE__*/jsxRuntime.jsx("tr", {
37
+ children: columns.map(function (col, idx) {
38
+ var _ref2, _col$headRenderer;
39
+ return /*#__PURE__*/jsxRuntime.jsx("th", {
40
+ className: "text-start truncate bg-accent-100 px-2 py-1 font-medium text-accent-800",
41
+ style: {
42
+ width: col.width,
43
+ maxWidth: col.maxWidth
44
+ },
45
+ children: (_ref2 = (_col$headRenderer = col.headRenderer) !== null && _col$headRenderer !== void 0 ? _col$headRenderer : col.label) !== null && _ref2 !== void 0 ? _ref2 : " "
46
+ }, idx);
47
+ })
48
+ })
49
+ }), /*#__PURE__*/jsxRuntime.jsx("tbody", {
50
+ className: "bg-alternate",
51
+ children: dataPage.map(function (row, idx) {
52
+ return /*#__PURE__*/jsxRuntime.jsx("tr", {
53
+ children: columns.map(function (col, cidx) {
54
+ var _col$renderer, _col$renderer2;
55
+ return /*#__PURE__*/jsxRuntime.jsx("td", {
56
+ className: classNames("px-2 py-1 truncate", col.align === "center" && "text-center", col.align === "end" && "text-end", col.className),
57
+ style: {
58
+ width: col.width,
59
+ maxWidth: col.maxWidth
60
+ },
61
+ children: (_col$renderer = (_col$renderer2 = col.renderer) === null || _col$renderer2 === void 0 ? void 0 : _col$renderer2.call(col, utilities.getByPath(row, col.id.toString()), row, startIndex + idx)) !== null && _col$renderer !== void 0 ? _col$renderer : utilities.getByPath(row, col.id.toString())
62
+ }, "".concat(idx, "-").concat(cidx));
63
+ })
64
+ }, idx);
65
+ })
66
+ })]
67
+ }), paginationSize > 0 && /*#__PURE__*/jsxRuntime.jsx(core.Footer, {
68
+ flex: true,
69
+ justify: "end",
70
+ className: "px-2 py-1 sticky bottom-0 bg-tint-50",
71
+ children: /*#__PURE__*/jsxRuntime.jsx(Pagination.Pagination, _objectSpread({
72
+ minimal: true
73
+ }, paginator))
74
+ })]
75
+ });
76
+ };
77
+
78
+ exports.HtmlTable = HtmlTable;
@@ -168,7 +168,7 @@ var Table = function Table(_ref) {
168
168
  })
169
169
  })]
170
170
  })]
171
- }), loading && /*#__PURE__*/jsxRuntime.jsx(core.Loading, {}), data.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
171
+ }), loading && /*#__PURE__*/jsxRuntime.jsx(core.LoadingLine, {}), data.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
172
172
  className: "area-content flex flex-col flex-nowrap min-h-full",
173
173
  style: {
174
174
  height: totalSize()
@@ -183,26 +183,29 @@ var Table = function Table(_ref) {
183
183
  var index = _ref2.index,
184
184
  key = _ref2.key;
185
185
  var data = getData(index);
186
- return "__GROUP__" in data ? /*#__PURE__*/jsxRuntime.jsxs("div", {
186
+ return "__GROUP__" in data ? /*#__PURE__*/jsxRuntime.jsx("div", {
187
187
  ref: measureElement,
188
188
  "data-index": index,
189
- className: classNames("px-2 py-1 text-md bg-base border-y border-tint-100 cursor-pointer flex items-center gap-1 z-2", isActiveSticky(index) && "sticky top-8"),
189
+ className: classNames("text-md bg-base border-y border-tint-100 border-t-0 cursor-pointer flex items-center justify-start gap-1 z-2", isActiveSticky(index) && "sticky top-8"),
190
190
  role: "none",
191
191
  onClick: function onClick() {
192
192
  return toggleGroupExpand(data.key);
193
193
  },
194
- children: [/*#__PURE__*/jsxRuntime.jsx(core.Icon, {
195
- rtlFlip: true,
196
- icon: data.open ? core.CoreIcons.chevronDown : core.CoreIcons.chevronRight
197
- }), (_groupRenderer = groupRenderer === null || groupRenderer === void 0 ? void 0 : groupRenderer(data)) !== null && _groupRenderer !== void 0 ? _groupRenderer : /*#__PURE__*/jsxRuntime.jsxs("div", {
198
- className: "flex gap-1 items-center",
199
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
200
- children: data.key
201
- }), /*#__PURE__*/jsxRuntime.jsxs("span", {
202
- className: "text-sm",
203
- children: ["(", data.itemCount, ")"]
194
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
195
+ className: classNames("px-2 py-1 flex items-center gap-1 z-2 sticky start-0"),
196
+ children: [/*#__PURE__*/jsxRuntime.jsx(core.Icon, {
197
+ rtlFlip: true,
198
+ icon: data.open ? "icon-[mdi--chevron-down]" : "icon-[mdi--chevron-right]"
199
+ }), (_groupRenderer = groupRenderer === null || groupRenderer === void 0 ? void 0 : groupRenderer(data)) !== null && _groupRenderer !== void 0 ? _groupRenderer : /*#__PURE__*/jsxRuntime.jsxs("div", {
200
+ className: "flex gap-1 items-center",
201
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
202
+ children: data.key
203
+ }), /*#__PURE__*/jsxRuntime.jsxs("span", {
204
+ className: "text-sm",
205
+ children: ["(", data.itemCount, ")"]
206
+ })]
204
207
  })]
205
- })]
208
+ })
206
209
  }, key) : /*#__PURE__*/jsxRuntime.jsx(BodyRow.BodyRow, {
207
210
  rowKey: key.toString(),
208
211
  index: index,
@@ -57,7 +57,7 @@ var TreeNode = function TreeNode(_ref) {
57
57
  };
58
58
  }, [defaultLeafIcon, defaultNodeIcon, node.icon]);
59
59
  var canCheck = react.useMemo(function () {
60
- return checkable === true || checkable === "leafOnly" && node.leaf;
60
+ return utilities.isTrue(checkable) || checkable === "leafOnly" && node.leaf;
61
61
  }, [node.leaf, checkable]);
62
62
  var canSelect = react.useMemo(function () {
63
63
  return !node.disabled && (selectable === true || selectable === "leafOnly" && node.leaf);
@@ -72,8 +72,8 @@ var TreeNode = function TreeNode(_ref) {
72
72
  children: [filler, node.loading && /*#__PURE__*/jsxRuntime.jsx("div", {
73
73
  className: "flex-initial w-6",
74
74
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
75
- icon: core.CoreIcons.spinner,
76
- className: "animate-spin text-muted"
75
+ icon: "icon-[svg-spinners--eclipse]",
76
+ className: "text-muted"
77
77
  })
78
78
  }), !node.leaf && !node.childFiltered && !node.loading && /*#__PURE__*/jsxRuntime.jsx("div", {
79
79
  className: "flex-initial w-6",
@@ -91,7 +91,7 @@ var TreeNode = function TreeNode(_ref) {
91
91
  onClick: function onClick() {
92
92
  return !node.disabled && onChecked(node.id);
93
93
  },
94
- icon: node.checked === 2 ? core.CoreIcons.checkboxInt : node.checked === 1 ? core.CoreIcons.checkboxOn : core.CoreIcons.checkboxOff,
94
+ icon: node.checked === 2 ? "icon-[mdi--checkbox-intermediate]" : node.checked === 1 ? "icon-[mdi--checkbox-marked]" : "icon-[mdi--checkbox-blank-outline]",
95
95
  className: classNames(node.disabled ? "text-muted" : "text-primary-500 hover:text-primary-600")
96
96
  })
97
97
  }), !node.empty && /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -7,7 +7,6 @@ var form = require('@react-fabric/form');
7
7
  var reactVirtual = require('@tanstack/react-virtual');
8
8
  var react = require('react');
9
9
  var TreeNode = require('./TreeNode.js');
10
- var types = require('./types.js');
11
10
  var useTree = require('./useTree.js');
12
11
  var jsxRuntime = require('react/jsx-runtime');
13
12
 
@@ -81,10 +80,10 @@ var TreePanel = function TreePanel(_ref) {
81
80
  });
82
81
  var virtualItems = virtualizer.getVirtualItems();
83
82
  var expanders = react.useMemo(function () {
84
- if (expander === "caret") return [core.CoreIcons.caretRight, core.CoreIcons.caretDown];
85
- if (expander === "chevron") return [core.CoreIcons.chevronRight, core.CoreIcons.chevronDown];
86
- if (expander === "folder") return [core.CoreIcons.folderClosed, core.CoreIcons.folderOpen];
87
- return [core.CoreIcons.expand, core.CoreIcons.collapse];
83
+ if (expander === "caret") return ["icon-[mdi--menu-right]", "icon-[mdi--menu-down]"];
84
+ if (expander === "chevron") return ["icon-[mdi--chevron-right]", "icon-[mdi--chevron-down]"];
85
+ if (expander === "folder") return ["icon-[mdi--folder-outline]", "icon-[mdi--folder-open-outline]"];
86
+ return ["icon-[mdi--plus-box-outline]", "icon-[mdi--minus-box-outline]"];
88
87
  }, [expander]);
89
88
  react.useImperativeHandle(ref, function () {
90
89
  return {
@@ -118,7 +117,7 @@ var TreePanel = function TreePanel(_ref) {
118
117
  placeholder: filterPlaceholder,
119
118
  noBorder: true,
120
119
  decorateStart: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
121
- icon: core.CoreIcons.filter,
120
+ icon: "icon-[mdi--filter-variant]",
122
121
  className: "p-1"
123
122
  })
124
123
  }), /*#__PURE__*/jsxRuntime.jsxs(core.ButtonGroup, {
@@ -127,12 +126,12 @@ var TreePanel = function TreePanel(_ref) {
127
126
  children: [/*#__PURE__*/jsxRuntime.jsx(core.Button, {
128
127
  size: "sm",
129
128
  "aria-label": "expand all",
130
- icon: types.iconExpandAll,
129
+ icon: "icon-[mdi--arrow-expand-vertical]",
131
130
  onClick: expandAll
132
131
  }), /*#__PURE__*/jsxRuntime.jsx(core.Button, {
133
132
  size: "sm",
134
133
  "aria-label": "collapse all",
135
- icon: types.iconCollapseAll,
134
+ icon: "icon-[mdi--arrow-collapse-vertical]",
136
135
  onClick: collapseAll
137
136
  })]
138
137
  })]
@@ -43,7 +43,7 @@ var Scroller = function Scroller(_ref) {
43
43
  variant: "link",
44
44
  "aria-label": "scroll to top",
45
45
  icon: {
46
- icon: vertical ? core.CoreIcons.chevronsUp : core.CoreIcons.chevronsLeft,
46
+ icon: vertical ? "icon-[mdi--chevron-double-up]" : "icon-[mdi--chevron-double-left]",
47
47
  rtlFlip: true
48
48
  },
49
49
  disabled: (scrollActive & 2) === 0,
@@ -53,7 +53,7 @@ var Scroller = function Scroller(_ref) {
53
53
  variant: "link",
54
54
  "aria-label": "scroll up",
55
55
  icon: {
56
- icon: vertical ? core.CoreIcons.chevronUp : core.CoreIcons.chevronLeft,
56
+ icon: vertical ? "icon-[mdi--chevron-up]" : "icon-[mdi--chevron-left]",
57
57
  rtlFlip: true
58
58
  },
59
59
  disabled: (scrollActive & 2) === 0,
@@ -63,7 +63,7 @@ var Scroller = function Scroller(_ref) {
63
63
  variant: "link",
64
64
  "aria-label": "scroll down",
65
65
  icon: {
66
- icon: vertical ? core.CoreIcons.chevronDown : core.CoreIcons.chevronRight,
66
+ icon: vertical ? "icon-[mdi--chevron-down]" : "icon-[mdi--chevron-right]",
67
67
  rtlFlip: true
68
68
  },
69
69
  disabled: scrollActive % 2 === 0,
@@ -73,7 +73,7 @@ var Scroller = function Scroller(_ref) {
73
73
  variant: "link",
74
74
  "aria-label": "scroll to bottom",
75
75
  icon: {
76
- icon: vertical ? core.CoreIcons.chevronsDown : core.CoreIcons.chevronsRight,
76
+ icon: vertical ? "icon-[mdi--chevron-double-down]" : "icon-[mdi--chevron-double-right]",
77
77
  rtlFlip: true
78
78
  },
79
79
  disabled: scrollActive % 2 === 0,
@@ -4,7 +4,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
5
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
6
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
7
- import { EmptyContent, Icon, CoreIcons, Badge } from '@react-fabric/core';
7
+ import { EmptyContent, Icon, Badge } from '@react-fabric/core';
8
8
  import { isString } from '@react-fabric/utilities';
9
9
  import { useState, useEffect, useMemo, createElement, Fragment, isValidElement } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
@@ -40,12 +40,12 @@ var CheckItem = function CheckItem(_ref) {
40
40
  "data-type": "checkbox",
41
41
  className: "ax-checkList__checkbox",
42
42
  "data-selected": selected === 1,
43
- icon: selected ? CoreIcons.checkboxInt : CoreIcons.checkboxOff
43
+ icon: selected ? "icon-[mdi--checkbox-marked]" : "icon-[mdi--checkbox-blank-outline]"
44
44
  }), allowNegative && /*#__PURE__*/jsxs(Fragment, {
45
45
  children: [/*#__PURE__*/jsx(Icon, {
46
46
  "data-type": "multiple",
47
47
  className: "ax-checkList__checkbox",
48
- icon: selected === 1 ? CoreIcons.expand : selected === -1 ? CoreIcons.collapse : CoreIcons.checkboxOff,
48
+ icon: selected === 1 ? "icon-[mdi--plus-box-outline]" : selected === -1 ? "icon-[mdi--minus-box-outline]" : "icon-[mdi--checkbox-blank-outline]",
49
49
  "data-selected": selected
50
50
  }), /*#__PURE__*/jsxs("div", {
51
51
  className: "ax-checkList__checkbox",
@@ -54,14 +54,14 @@ var CheckItem = function CheckItem(_ref) {
54
54
  onClick: function onClick(e) {
55
55
  return [(_onClick(id, false), e.stopPropagation())];
56
56
  },
57
- icon: selected === 1 ? CoreIcons.expandActive : CoreIcons.expand,
57
+ icon: selected === 1 ? "icon-[mdi--plus-box]" : "icon-[mdi--plus-box-outline]",
58
58
  "data-selected": selected === 1
59
59
  }), /*#__PURE__*/jsx(Icon, {
60
60
  "data-type": "negative",
61
61
  onClick: function onClick(e) {
62
62
  return [(_onClick(id, true), e.stopPropagation())];
63
63
  },
64
- icon: selected === -1 ? CoreIcons.collapseActive : CoreIcons.collapse,
64
+ icon: selected === -1 ? "icon-[mdi--minus-box]" : "icon-[mdi--minus-box-outline]",
65
65
  "data-selected": selected === -1
66
66
  })]
67
67
  })]
@@ -3,7 +3,7 @@
3
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
5
5
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
6
- import { EmptyContent, Icon, ActionLabel, Button, CoreIcons } from '@react-fabric/core';
6
+ import { EmptyContent, Icon, ActionLabel, Button } from '@react-fabric/core';
7
7
  import { compareValues, isColor, Format } from '@react-fabric/utilities';
8
8
  import classNames from 'classnames';
9
9
  import { useMemo } from 'react';
@@ -99,7 +99,7 @@ var Histogram = function Histogram(_ref) {
99
99
  color: "danger",
100
100
  size: "sm",
101
101
  stopPropagation: true,
102
- icon: CoreIcons.funnelMinus,
102
+ icon: "icon-[mdi--filter-minus]",
103
103
  "aria-label": "Filter Negative",
104
104
  onClick: function onClick() {
105
105
  return _onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id, true);
@@ -108,7 +108,7 @@ var Histogram = function Histogram(_ref) {
108
108
  color: "primary",
109
109
  size: "sm",
110
110
  stopPropagation: true,
111
- icon: CoreIcons.funnelPlus,
111
+ icon: "icon-[mdi--filter-plus]",
112
112
  "aria-label": "Filter",
113
113
  onClick: function onClick() {
114
114
  return _onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id);