es-grid-template 1.3.2 → 1.3.4
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/assets/index.css +10 -0
- package/assets/index.scss +15 -0
- package/es/grid-component/ContextMenu.js +4 -1
- package/es/grid-component/EditableCell.js +60 -18
- package/es/grid-component/TableGrid.js +1 -7
- package/es/grid-component/hooks/columns/index.js +13 -17
- package/es/grid-component/hooks/useColumns.js +2 -1
- package/es/grid-component/hooks/utils.d.ts +13 -0
- package/es/grid-component/hooks/utils.js +136 -4
- package/es/grid-component/number/index.d.ts +10 -0
- package/es/grid-component/number/index.js +39 -0
- package/es/grid-component/number-range/index.d.ts +2 -1
- package/es/grid-component/number-range/index.js +21 -17
- package/es/grid-component/styles.scss +15 -0
- package/es/grid-component/table/GridEdit.js +577 -205
- package/es/grid-component/table/Group.js +8 -0
- package/es/grid-component/type.d.ts +3 -0
- package/es/grid-component/useContext.d.ts +2 -0
- package/lib/grid-component/ContextMenu.js +4 -1
- package/lib/grid-component/EditableCell.js +61 -18
- package/lib/grid-component/TableGrid.js +1 -7
- package/lib/grid-component/hooks/columns/index.js +12 -16
- package/lib/grid-component/hooks/useColumns.js +2 -1
- package/lib/grid-component/hooks/utils.d.ts +13 -0
- package/lib/grid-component/hooks/utils.js +150 -7
- package/lib/grid-component/number/index.d.ts +10 -0
- package/lib/grid-component/number/index.js +47 -0
- package/lib/grid-component/number-range/index.d.ts +2 -1
- package/lib/grid-component/number-range/index.js +21 -17
- package/lib/grid-component/styles.scss +15 -0
- package/lib/grid-component/table/GridEdit.js +565 -201
- package/lib/grid-component/table/Group.js +8 -0
- package/lib/grid-component/type.d.ts +3 -0
- package/lib/grid-component/useContext.d.ts +2 -0
- package/package.json +109 -109
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNumericComponent = require("react-numeric-component");
|
|
9
9
|
var _rcMasterUi = require("rc-master-ui");
|
|
10
|
+
var _hooks = require("../hooks");
|
|
10
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
13
|
const NumberRange = props => {
|
|
@@ -14,6 +15,7 @@ const NumberRange = props => {
|
|
|
14
15
|
t,
|
|
15
16
|
max,
|
|
16
17
|
min,
|
|
18
|
+
format,
|
|
17
19
|
onChange
|
|
18
20
|
} = props;
|
|
19
21
|
const values = _react.default.useMemo(() => [min, max], [min, max]);
|
|
@@ -25,43 +27,45 @@ const NumberRange = props => {
|
|
|
25
27
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
26
28
|
className: '',
|
|
27
29
|
style: {
|
|
28
|
-
display: 'flex'
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
columnGap: 5
|
|
29
33
|
}
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
-
style: {
|
|
32
|
-
marginBottom: 8
|
|
33
|
-
}
|
|
34
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNumericComponent.NumericFormat, {
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactNumericComponent.NumericFormat, {
|
|
35
35
|
value: values[0] ?? ''
|
|
36
36
|
// value={min}
|
|
37
|
-
// thousandSeparator={checkThousandSeparator(thousandSeparator, decimalSeparator)}
|
|
38
|
-
// decimalSeparator={checkDecimalSeparator(thousandSeparator, decimalSeparator)}
|
|
39
37
|
,
|
|
38
|
+
thousandSeparator: (0, _hooks.checkThousandSeparator)(format?.thousandSeparator, format?.decimalSeparator),
|
|
39
|
+
decimalSeparator: (0, _hooks.checkDecimalSeparator)(format?.thousandSeparator, format?.decimalSeparator),
|
|
40
40
|
allowNegative: true,
|
|
41
41
|
customInput: _rcMasterUi.Input,
|
|
42
|
-
className: ' rounded-0 input-element
|
|
42
|
+
className: ' rounded-0 input-element',
|
|
43
43
|
onValueChange: vals => {
|
|
44
44
|
// onChangeValueFilter(type, values.floatValue, 'min')
|
|
45
45
|
|
|
46
46
|
// setValues([vals.floatValue, values[1]])
|
|
47
47
|
onChange?.([vals.floatValue, max]);
|
|
48
|
-
}
|
|
49
|
-
placeholder
|
|
48
|
+
}
|
|
49
|
+
// placeholder={t ? t('Min') : 'Min'}
|
|
50
|
+
,
|
|
51
|
+
placeholder: t ? t('From') : 'From',
|
|
50
52
|
autoFocus: true
|
|
51
|
-
})), /*#__PURE__*/_react.default.createElement("span", null, "-"), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactNumericComponent.NumericFormat, {
|
|
53
|
+
})), /*#__PURE__*/_react.default.createElement("span", null, " - "), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactNumericComponent.NumericFormat, {
|
|
52
54
|
value: values[1] ?? ''
|
|
53
55
|
// value={max}
|
|
54
|
-
// thousandSeparator={checkThousandSeparator(thousandSeparator, decimalSeparator)}
|
|
55
|
-
// decimalSeparator={checkDecimalSeparator(thousandSeparator, decimalSeparator)}
|
|
56
56
|
,
|
|
57
|
+
thousandSeparator: (0, _hooks.checkThousandSeparator)(format?.thousandSeparator, format?.decimalSeparator),
|
|
58
|
+
decimalSeparator: (0, _hooks.checkDecimalSeparator)(format?.thousandSeparator, format?.decimalSeparator),
|
|
57
59
|
allowNegative: true,
|
|
58
60
|
customInput: _rcMasterUi.Input,
|
|
59
|
-
className: ' rounded-0 input-element
|
|
61
|
+
className: ' rounded-0 input-element',
|
|
60
62
|
onValueChange: vals => {
|
|
61
63
|
// setValues([values[0], vals.floatValue])
|
|
62
64
|
onChange?.([min, vals.floatValue]);
|
|
63
|
-
}
|
|
64
|
-
placeholder
|
|
65
|
+
}
|
|
66
|
+
// placeholder={t ? t('Max') : 'Max'}
|
|
67
|
+
,
|
|
68
|
+
placeholder: t ? t('To') : 'To'
|
|
65
69
|
}))));
|
|
66
70
|
};
|
|
67
71
|
var _default = exports.default = NumberRange;
|
|
@@ -26,6 +26,14 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
26
26
|
|
|
27
27
|
.popup-context-menu {
|
|
28
28
|
min-width: 200px;
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
.ant-dropdown-menu.popup-context-menu {
|
|
32
|
+
.ant-dropdown-menu-submenu {
|
|
33
|
+
.ant-dropdown-menu-submenu-title {
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
// -------------- Table -------------
|
|
@@ -239,6 +247,13 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
239
247
|
.#{$prefix}-table-column-title {
|
|
240
248
|
//display: flex;
|
|
241
249
|
}
|
|
250
|
+
|
|
251
|
+
&.head-align-center {
|
|
252
|
+
text-align: center;
|
|
253
|
+
}
|
|
254
|
+
&.head-align-right {
|
|
255
|
+
text-align: right;
|
|
256
|
+
}
|
|
242
257
|
}
|
|
243
258
|
}
|
|
244
259
|
|