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.
Files changed (35) hide show
  1. package/assets/index.css +10 -0
  2. package/assets/index.scss +15 -0
  3. package/es/grid-component/ContextMenu.js +4 -1
  4. package/es/grid-component/EditableCell.js +60 -18
  5. package/es/grid-component/TableGrid.js +1 -7
  6. package/es/grid-component/hooks/columns/index.js +13 -17
  7. package/es/grid-component/hooks/useColumns.js +2 -1
  8. package/es/grid-component/hooks/utils.d.ts +13 -0
  9. package/es/grid-component/hooks/utils.js +136 -4
  10. package/es/grid-component/number/index.d.ts +10 -0
  11. package/es/grid-component/number/index.js +39 -0
  12. package/es/grid-component/number-range/index.d.ts +2 -1
  13. package/es/grid-component/number-range/index.js +21 -17
  14. package/es/grid-component/styles.scss +15 -0
  15. package/es/grid-component/table/GridEdit.js +577 -205
  16. package/es/grid-component/table/Group.js +8 -0
  17. package/es/grid-component/type.d.ts +3 -0
  18. package/es/grid-component/useContext.d.ts +2 -0
  19. package/lib/grid-component/ContextMenu.js +4 -1
  20. package/lib/grid-component/EditableCell.js +61 -18
  21. package/lib/grid-component/TableGrid.js +1 -7
  22. package/lib/grid-component/hooks/columns/index.js +12 -16
  23. package/lib/grid-component/hooks/useColumns.js +2 -1
  24. package/lib/grid-component/hooks/utils.d.ts +13 -0
  25. package/lib/grid-component/hooks/utils.js +150 -7
  26. package/lib/grid-component/number/index.d.ts +10 -0
  27. package/lib/grid-component/number/index.js +47 -0
  28. package/lib/grid-component/number-range/index.d.ts +2 -1
  29. package/lib/grid-component/number-range/index.js +21 -17
  30. package/lib/grid-component/styles.scss +15 -0
  31. package/lib/grid-component/table/GridEdit.js +565 -201
  32. package/lib/grid-component/table/Group.js +8 -0
  33. package/lib/grid-component/type.d.ts +3 -0
  34. package/lib/grid-component/useContext.d.ts +2 -0
  35. package/package.json +109 -109
@@ -1,11 +1,13 @@
1
1
  import React, { Fragment } from "react";
2
2
  import { NumericFormat } from "react-numeric-component";
3
3
  import { Input } from "rc-master-ui";
4
+ import { checkDecimalSeparator, checkThousandSeparator } from "../hooks";
4
5
  const NumberRange = props => {
5
6
  const {
6
7
  t,
7
8
  max,
8
9
  min,
10
+ format,
9
11
  onChange
10
12
  } = props;
11
13
  const values = React.useMemo(() => [min, max], [min, max]);
@@ -17,43 +19,45 @@ const NumberRange = props => {
17
19
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
18
20
  className: '',
19
21
  style: {
20
- display: 'flex'
22
+ display: 'flex',
23
+ alignItems: 'center',
24
+ columnGap: 5
21
25
  }
22
- }, /*#__PURE__*/React.createElement("div", {
23
- style: {
24
- marginBottom: 8
25
- }
26
- }, /*#__PURE__*/React.createElement(NumericFormat, {
26
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NumericFormat, {
27
27
  value: values[0] ?? ''
28
28
  // value={min}
29
- // thousandSeparator={checkThousandSeparator(thousandSeparator, decimalSeparator)}
30
- // decimalSeparator={checkDecimalSeparator(thousandSeparator, decimalSeparator)}
31
29
  ,
30
+ thousandSeparator: checkThousandSeparator(format?.thousandSeparator, format?.decimalSeparator),
31
+ decimalSeparator: checkDecimalSeparator(format?.thousandSeparator, format?.decimalSeparator),
32
32
  allowNegative: true,
33
33
  customInput: Input,
34
- className: ' rounded-0 input-element form-control',
34
+ className: ' rounded-0 input-element',
35
35
  onValueChange: vals => {
36
36
  // onChangeValueFilter(type, values.floatValue, 'min')
37
37
 
38
38
  // setValues([vals.floatValue, values[1]])
39
39
  onChange?.([vals.floatValue, max]);
40
- },
41
- placeholder: t ? t('Min') : 'Min',
40
+ }
41
+ // placeholder={t ? t('Min') : 'Min'}
42
+ ,
43
+ placeholder: t ? t('From') : 'From',
42
44
  autoFocus: true
43
- })), /*#__PURE__*/React.createElement("span", null, "-"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NumericFormat, {
45
+ })), /*#__PURE__*/React.createElement("span", null, " - "), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(NumericFormat, {
44
46
  value: values[1] ?? ''
45
47
  // value={max}
46
- // thousandSeparator={checkThousandSeparator(thousandSeparator, decimalSeparator)}
47
- // decimalSeparator={checkDecimalSeparator(thousandSeparator, decimalSeparator)}
48
48
  ,
49
+ thousandSeparator: checkThousandSeparator(format?.thousandSeparator, format?.decimalSeparator),
50
+ decimalSeparator: checkDecimalSeparator(format?.thousandSeparator, format?.decimalSeparator),
49
51
  allowNegative: true,
50
52
  customInput: Input,
51
- className: ' rounded-0 input-element form-control',
53
+ className: ' rounded-0 input-element',
52
54
  onValueChange: vals => {
53
55
  // setValues([values[0], vals.floatValue])
54
56
  onChange?.([min, vals.floatValue]);
55
- },
56
- placeholder: t ? t('Max') : 'Max'
57
+ }
58
+ // placeholder={t ? t('Max') : 'Max'}
59
+ ,
60
+ placeholder: t ? t('To') : 'To'
57
61
  }))));
58
62
  };
59
63
  export 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