@react-fabric/data 1.0.0-beta.60 → 1.0.0-beta.61
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/dist/cjs/checklist/CheckList.js +4 -4
- package/dist/cjs/histogram/Histogram.js +2 -2
- package/dist/cjs/json/JsonViewer.js +3 -3
- package/dist/cjs/pagination/Pagination.js +4 -4
- package/dist/cjs/table/AddColumn.js +2 -2
- package/dist/cjs/table/BodyCell.js +11 -4
- package/dist/cjs/table/BodyRow.js +2 -2
- package/dist/cjs/table/CheckboxCell.js +1 -1
- package/dist/cjs/table/HeaderCell.js +4 -4
- package/dist/cjs/table/Table.js +17 -14
- package/dist/cjs/tree/TreeNode.js +4 -4
- package/dist/cjs/tree/TreePanel.js +7 -8
- package/dist/cjs/virtual/Scroller.js +4 -4
- package/dist/esm/checklist/CheckList.js +5 -5
- package/dist/esm/histogram/Histogram.js +3 -3
- package/dist/esm/json/JsonViewer.js +4 -4
- package/dist/esm/pagination/Pagination.js +5 -5
- package/dist/esm/table/AddColumn.js +3 -3
- package/dist/esm/table/BodyCell.js +12 -5
- package/dist/esm/table/BodyRow.js +2 -2
- package/dist/esm/table/CheckboxCell.js +2 -2
- package/dist/esm/table/HeaderCell.js +5 -5
- package/dist/esm/table/Table.js +18 -15
- package/dist/esm/tree/TreeNode.js +6 -6
- package/dist/esm/tree/TreePanel.js +8 -9
- package/dist/esm/virtual/Scroller.js +5 -5
- package/dist/types/table/types.d.ts +5 -5
- package/dist/types/tree/TreePanel.d.ts +2 -2
- package/dist/types/tree/types.d.ts +0 -2
- package/package.json +6 -6
- package/src/checklist/CheckList.tsx +17 -7
- package/src/histogram/Histogram.tsx +3 -9
- package/src/json/JsonViewer.tsx +7 -4
- package/src/pagination/Pagination.tsx +5 -5
- package/src/table/AddColumn.tsx +3 -3
- package/src/table/BodyCell.tsx +18 -3
- package/src/table/BodyRow.tsx +4 -2
- package/src/table/CheckboxCell.tsx +4 -4
- package/src/table/HeaderCell.tsx +4 -5
- package/src/table/Table.tsx +24 -17
- package/src/table/types.ts +5 -4
- package/src/tree/TreeNode.tsx +7 -13
- package/src/tree/TreePanel.tsx +13 -18
- package/src/tree/types.ts +0 -5
- package/src/virtual/Scroller.tsx +13 -5
- package/dist/cjs/tree/types.js +0 -30
- package/dist/esm/tree/types.js +0 -29
|
@@ -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 ?
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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:
|
|
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:
|
|
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);
|
|
@@ -133,7 +133,7 @@ var JsonEntry = function JsonEntry(_ref3) {
|
|
|
133
133
|
color: "danger",
|
|
134
134
|
size: "xs",
|
|
135
135
|
variant: "link",
|
|
136
|
-
icon:
|
|
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:
|
|
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 ?
|
|
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"),
|
|
@@ -69,7 +69,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
69
69
|
},
|
|
70
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"),
|
|
71
71
|
children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
|
|
72
|
-
icon:
|
|
72
|
+
icon: "icon-[mdi--chevron-double-left]",
|
|
73
73
|
rtlFlip: true
|
|
74
74
|
})
|
|
75
75
|
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
@@ -78,7 +78,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
78
78
|
},
|
|
79
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"),
|
|
80
80
|
children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
|
|
81
|
-
icon:
|
|
81
|
+
icon: "icon-[mdi--chevron-left]",
|
|
82
82
|
rtlFlip: true
|
|
83
83
|
})
|
|
84
84
|
}), !minimal && pageBody, minimal && /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
@@ -90,7 +90,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
90
90
|
},
|
|
91
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"),
|
|
92
92
|
children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
|
|
93
|
-
icon:
|
|
93
|
+
icon: "icon-[mdi--chevron-right]",
|
|
94
94
|
rtlFlip: true
|
|
95
95
|
})
|
|
96
96
|
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
@@ -99,7 +99,7 @@ var Pagination = /*#__PURE__*/react.memo(function (_ref) {
|
|
|
99
99
|
},
|
|
100
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"),
|
|
101
101
|
children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
|
|
102
|
-
icon:
|
|
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:
|
|
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 ?
|
|
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$
|
|
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": "
|
|
55
|
+
"false": "No"
|
|
56
56
|
};
|
|
57
57
|
return map["".concat(utilities.isTrue(value) ? "true" : "false")];
|
|
58
58
|
}
|
|
59
59
|
if (column.valueMap != null) {
|
|
60
|
-
|
|
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$
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
}
|
package/dist/cjs/table/Table.js
CHANGED
|
@@ -168,7 +168,7 @@ var Table = function Table(_ref) {
|
|
|
168
168
|
})
|
|
169
169
|
})]
|
|
170
170
|
})]
|
|
171
|
-
}), loading && /*#__PURE__*/jsxRuntime.jsx(core.
|
|
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.
|
|
186
|
+
return "__GROUP__" in data ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
187
187
|
ref: measureElement,
|
|
188
188
|
"data-index": index,
|
|
189
|
-
className: classNames("
|
|
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:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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
|
|
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:
|
|
76
|
-
className: "
|
|
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 ?
|
|
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 [
|
|
85
|
-
if (expander === "chevron") return [
|
|
86
|
-
if (expander === "folder") return [
|
|
87
|
-
return [
|
|
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:
|
|
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:
|
|
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:
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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,
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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 ?
|
|
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
|
|
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:
|
|
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:
|
|
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);
|
|
@@ -4,7 +4,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
5
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
6
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
7
|
-
import { EmptyContent, Text, Meter, Button,
|
|
7
|
+
import { EmptyContent, Text, Meter, Button, Icon, Copy } from '@react-fabric/core';
|
|
8
8
|
import { isEmpty, isArray, isObject, isNil, Format, isBoolean, isTrue } from '@react-fabric/utilities';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { useMemo, useState, Fragment } from 'react';
|
|
@@ -133,7 +133,7 @@ var JsonEntry = function JsonEntry(_ref3) {
|
|
|
133
133
|
color: "danger",
|
|
134
134
|
size: "xs",
|
|
135
135
|
variant: "link",
|
|
136
|
-
icon:
|
|
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:
|
|
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__*/jsx(Icon, {
|
|
170
170
|
rtlFlip: true,
|
|
171
|
-
icon: expanded ?
|
|
171
|
+
icon: expanded ? "icon-[mdi--chevron-down]" : "icon-[mdi--chevron-right]"
|
|
172
172
|
}), labelDisplay]
|
|
173
173
|
}), display && /*#__PURE__*/jsxs("div", {
|
|
174
174
|
className: classNames("px-2 flex flex-nowrap overflow-hidden", inline && "flex-1"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
|
-
import { Icon
|
|
4
|
+
import { Icon } from '@react-fabric/core';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { memo, useMemo, Fragment } from 'react';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -69,7 +69,7 @@ var Pagination = /*#__PURE__*/memo(function (_ref) {
|
|
|
69
69
|
},
|
|
70
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"),
|
|
71
71
|
children: /*#__PURE__*/jsx(Icon, {
|
|
72
|
-
icon:
|
|
72
|
+
icon: "icon-[mdi--chevron-double-left]",
|
|
73
73
|
rtlFlip: true
|
|
74
74
|
})
|
|
75
75
|
}), /*#__PURE__*/jsx("button", {
|
|
@@ -78,7 +78,7 @@ var Pagination = /*#__PURE__*/memo(function (_ref) {
|
|
|
78
78
|
},
|
|
79
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"),
|
|
80
80
|
children: /*#__PURE__*/jsx(Icon, {
|
|
81
|
-
icon:
|
|
81
|
+
icon: "icon-[mdi--chevron-left]",
|
|
82
82
|
rtlFlip: true
|
|
83
83
|
})
|
|
84
84
|
}), !minimal && pageBody, minimal && /*#__PURE__*/jsxs("label", {
|
|
@@ -90,7 +90,7 @@ var Pagination = /*#__PURE__*/memo(function (_ref) {
|
|
|
90
90
|
},
|
|
91
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"),
|
|
92
92
|
children: /*#__PURE__*/jsx(Icon, {
|
|
93
|
-
icon:
|
|
93
|
+
icon: "icon-[mdi--chevron-right]",
|
|
94
94
|
rtlFlip: true
|
|
95
95
|
})
|
|
96
96
|
}), /*#__PURE__*/jsx("button", {
|
|
@@ -99,7 +99,7 @@ var Pagination = /*#__PURE__*/memo(function (_ref) {
|
|
|
99
99
|
},
|
|
100
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"),
|
|
101
101
|
children: /*#__PURE__*/jsx(Icon, {
|
|
102
|
-
icon:
|
|
102
|
+
icon: "icon-[mdi--chevron-double-right]",
|
|
103
103
|
rtlFlip: true
|
|
104
104
|
})
|
|
105
105
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { Dropdown, Icon,
|
|
3
|
+
import { Dropdown, Icon, Menu, MenuItem } from '@react-fabric/core';
|
|
4
4
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -34,7 +34,7 @@ var AddColumn = function AddColumn(_ref) {
|
|
|
34
34
|
children: /*#__PURE__*/jsxs(Dropdown, {
|
|
35
35
|
placement: "bottom-end",
|
|
36
36
|
children: [/*#__PURE__*/jsx(Icon, {
|
|
37
|
-
icon:
|
|
37
|
+
icon: "icon-[mdi--plus-circle-outline]",
|
|
38
38
|
className: "p-1 rounded-t rounded-b-none hover:outline"
|
|
39
39
|
}), /*#__PURE__*/jsx(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 ?
|
|
48
|
+
icon: !col.hidden ? "icon-[mdi--check]" : ""
|
|
49
49
|
}, String(col.id));
|
|
50
50
|
})
|
|
51
51
|
})]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { DateDisplay } from '@react-fabric/date';
|
|
4
|
-
import { getByPath, isTrue, Format } from '@react-fabric/utilities';
|
|
4
|
+
import { getByPath, isTrue, Format, isObject, isArray } from '@react-fabric/utilities';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
7
|
import { useTableContext } from './Context.js';
|
|
@@ -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 = useMemo(function () {
|
|
46
|
-
var _column$
|
|
46
|
+
var _column$dataType2;
|
|
47
47
|
var value = 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": "
|
|
55
|
+
"false": "No"
|
|
56
56
|
};
|
|
57
57
|
return map["".concat(isTrue(value) ? "true" : "false")];
|
|
58
58
|
}
|
|
59
59
|
if (column.valueMap != null) {
|
|
60
|
-
|
|
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$
|
|
65
|
+
if (["date", "time", "datetime"].includes((_column$dataType2 = column.dataType) !== null && _column$dataType2 !== void 0 ? _column$dataType2 : "")) {
|
|
65
66
|
return /*#__PURE__*/jsx(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 Format.number(value, column.format);
|
|
72
73
|
}
|
|
74
|
+
if (isObject(value)) {
|
|
75
|
+
return JSON.stringify(value);
|
|
76
|
+
}
|
|
77
|
+
if (isArray(value)) {
|
|
78
|
+
return value.join(", ");
|
|
79
|
+
}
|
|
73
80
|
return value !== null && value !== void 0 ? value : "";
|
|
74
81
|
}, [item, column]);
|
|
75
82
|
return /*#__PURE__*/jsx("div", {
|