diginet-core-ui 1.4.64 → 1.4.65-beta.2

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 (37) hide show
  1. package/assets/images/menu/dhr/MHRM09N1404.svg +18 -0
  2. package/assets/images/menu/dhr/MHRP25N0010.svg +16 -0
  3. package/assets/images/menu/eo/WEO53APP01.svg +16 -0
  4. package/assets/images/menu/eo/WEO53TR001.svg +15 -0
  5. package/assets/images/menu/invoice/D06-2.svg +11 -0
  6. package/assets/images/menu/invoice/D06-4.svg +5 -0
  7. package/assets/images/menu/invoice/D95F3090.svg +13 -0
  8. package/assets/images/menu/invoice/D95F3093.svg +11 -0
  9. package/assets/images/menu/invoice/D95F3094.svg +11 -0
  10. package/assets/images/menu/invoice/W102F1000.svg +11 -0
  11. package/assets/images/menu/invoice/W103F1000.svg +15 -0
  12. package/assets/images/menu/invoice/W104F1000.svg +13 -0
  13. package/assets/images/menu/invoice/W105F1000.svg +12 -0
  14. package/assets/images/menu/invoice/W106F1000.svg +15 -0
  15. package/assets/images/menu/invoice/W107F1000.svg +11 -0
  16. package/assets/images/menu/invoice/W108F1000.svg +6 -0
  17. package/assets/images/menu/invoice/W109F1000.svg +12 -0
  18. package/assets/images/menu/invoice/W110F1000.svg +10 -0
  19. package/components/button/more.js +28 -14
  20. package/components/form-control/calendar/function.js +1 -1
  21. package/components/form-control/calendar/index.js +1 -1
  22. package/components/form-control/date-input/DateField.js +2 -2
  23. package/components/form-control/date-input/utils.js +3 -3
  24. package/components/form-control/date-picker/index.js +1 -1
  25. package/components/form-control/date-range-picker/index.js +36 -18
  26. package/components/form-control/dropdown/index.js +3 -3
  27. package/components/form-control/dropdown-box/index.js +63 -21
  28. package/components/form-control/money-input/index.js +14 -8
  29. package/components/form-control/number-input/index2.js +4 -1
  30. package/components/popup/v2/index.js +9 -5
  31. package/global/index.js +2 -1
  32. package/icons/basic.js +66 -0
  33. package/icons/menu/v2/index.js +2 -2
  34. package/package.json +78 -44
  35. package/readme.md +13 -0
  36. package/theme/settings.js +1 -1
  37. package/utils/date.js +56 -56
@@ -1,13 +1,15 @@
1
1
  /** @jsxRuntime classic */
2
2
  /** @jsx jsx */
3
3
  import { css, jsx } from '@emotion/core';
4
- import { ButtonIcon, InputBase, Label, Popover, PopoverBody } from "../..";
4
+ import { ButtonIcon, InputBase, Label, Popover, PopoverBody, HelperText } from "../..";
5
5
  import PropTypes from 'prop-types';
6
- import { Fragment, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
6
+ import { Fragment, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState, useMemo } from 'react';
7
7
  import { animation, borderColor, displayBlock, overflowHidden, parseHeight, parseMinWidth, positionRelative, scaleX } from "../../../styles/general";
8
8
  import { useTheme } from "../../../theme";
9
9
  import useThemeProps from "../../../theme/utils/useThemeProps";
10
10
  import { classNames, getProp } from "../../../utils";
11
+ const regexBetween = /[^{}]+(?=})/g;
12
+ const regexInclude = /{|}/g;
11
13
  const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) => {
12
14
  if (!reference) reference = useRef(null);
13
15
  const theme = useTheme();
@@ -22,10 +24,14 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
22
24
  });
23
25
  const {
24
26
  action = {},
27
+ allowInput,
25
28
  bgColor: bgColorProp,
26
29
  children,
27
30
  className,
28
31
  delayOnInput,
32
+ disabled,
33
+ displayExpr: displayExprProp,
34
+ error,
29
35
  endIcon,
30
36
  inputProps,
31
37
  inputRef,
@@ -39,10 +45,19 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
39
45
  placeholder,
40
46
  startIcon,
41
47
  style,
42
- value,
43
- viewType
48
+ value: valueProps,
49
+ valueExpr,
50
+ viewType,
51
+ helperTextProps
44
52
  } = props;
53
+ let displayExpr = displayExprProp;
45
54
  const bgColor = typeof bgColorProp === 'string' ? getProp(colors, bgColorProp, bgColorProp) : bgColorProp;
55
+ const ErrorView = useMemo(() => {
56
+ return error ? jsx(HelperText, {
57
+ ...helperTextProps,
58
+ disabled: disabled
59
+ }, error) : null;
60
+ }, [disabled, error, helperTextProps]);
46
61
  const ref = useRef(null);
47
62
  const dropdownBoxRef = useRef(null);
48
63
  const timer = useRef(null);
@@ -85,6 +100,28 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
85
100
  onClosed === null || onClosed === void 0 ? void 0 : onClosed();
86
101
  }
87
102
  };
103
+
104
+ /**
105
+ * Chuyển đổi data thành giá trị cần hiện thị dựa vào displayExpr [string, string object {field} - {field}], renderSelectedItem, displayExpr, valueExpr
106
+ * @param data {object} rowData of dataSource
107
+ * @return {string}
108
+ */
109
+ const displayValue = data => {
110
+ let text = '';
111
+ if (data || data === 0) {
112
+ displayExpr = displayExpr || valueExpr;
113
+ let mask = data === null || data === void 0 ? void 0 : data[displayExpr];
114
+ // convert {id} - {name} to {<data[id]>} - {<data[name]>}
115
+ if (!mask && regexBetween.test(displayExpr)) {
116
+ var _displayExpr;
117
+ mask = (_displayExpr = displayExpr) === null || _displayExpr === void 0 ? void 0 : _displayExpr.replace(regexBetween, _ => (data === null || data === void 0 ? void 0 : data[_]) || '');
118
+ } else if (!mask) {
119
+ mask = typeof data !== 'object' ? data : '';
120
+ }
121
+ text = mask.toString().replace(regexInclude, '');
122
+ }
123
+ return text;
124
+ };
88
125
  useLayoutEffect(() => {
89
126
  if (ref.current) {
90
127
  const {
@@ -130,15 +167,17 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
130
167
  onClick: openOnClickAt === 'icon' ? onTriggerDropdown : null
131
168
  }) : null;
132
169
  };
170
+ const value = displayValue(valueProps);
133
171
  return jsx(Fragment, null, jsx("div", {
134
172
  ref: ref,
135
173
  css: _DropdownBoxRootCSS,
136
- className: classNames('DGN-UI-Dropdown-Box', className),
174
+ className: classNames('DGN-UI-Dropdown-Box', className, error && 'error'),
137
175
  style: style
138
176
  }, label ? jsx(Label, {
139
177
  ...labelProps
140
178
  }, label) : null, jsx(InputBase, {
141
179
  ...inputProps,
180
+ readOnly: !allowInput,
142
181
  style: inputStyle,
143
182
  viewType: viewType,
144
183
  inputRef: inputRef,
@@ -157,7 +196,7 @@ const DropdownBox = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referen
157
196
  anchor: ref.current,
158
197
  width: popoverWidth,
159
198
  onClose: closeDropdownBox
160
- }, jsx(PopoverBody, null, children)));
199
+ }, jsx(PopoverBody, null, children)), ErrorView);
161
200
  }));
162
201
  const DropdownBoxRootCSS = (bgColorProp, {
163
202
  colors
@@ -166,6 +205,17 @@ const DropdownBoxRootCSS = (bgColorProp, {
166
205
  ${positionRelative};
167
206
  ${parseMinWidth(150)};
168
207
  ${parseHeight('max-content')};
208
+ &.error {
209
+ .DGN-UI-InputBase {
210
+ ${borderColor(getProp(colors, 'semantic/danger'))};
211
+ &::before {
212
+ ${borderColor(getProp(colors, 'semantic/danger'))};
213
+ }
214
+ &::after {
215
+ ${borderColor(getProp(colors, 'semantic/danger'))};
216
+ }
217
+ }
218
+ }
169
219
  .DGN-UI-InputBase {
170
220
  background: ${bgColorProp ? bgColorProp === true ? getProp(colors, 'fill/disabled') : bgColorProp : 'inherit'} !important;
171
221
  ${openState && css`
@@ -183,20 +233,6 @@ const DropdownBoxCSS = ({
183
233
  margin-top: ${spacing([1])};
184
234
  ${overflowHidden};
185
235
  `;
186
-
187
- // DropdownBox.defaultProps = {
188
- // className: '',
189
- // label: '',
190
- // placeholder: '',
191
- // startIcon: 'Search',
192
- // endIcon: 'ArrowDown',
193
- // openOnClickAt: 'icon',
194
- // viewType: 'underlined',
195
- // inputProps: {},
196
- // delayOnInput: 700,
197
- // zIndex: zIndexCORE(1),
198
- // };
199
-
200
236
  DropdownBox.propTypes = {
201
237
  /** class for dropdown */
202
238
  className: PropTypes.string,
@@ -233,6 +269,12 @@ DropdownBox.propTypes = {
233
269
  /** the function will run after open */
234
270
  onOpened: PropTypes.func,
235
271
  /** the function will run after close */
236
- onClosed: PropTypes.func
272
+ onClosed: PropTypes.func,
273
+ /** Error message displayed below the input. */
274
+ error: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
275
+ /** If `true`, the component is disabled. */
276
+ disabled: PropTypes.bool,
277
+ /** If `true`, the input is enable. */
278
+ allowInput: PropTypes.bool
237
279
  };
238
280
  export default DropdownBox;
@@ -404,13 +404,7 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referenc
404
404
  }
405
405
  const v = getValueWithDecimal(number.toString().replace('.', decimalSymbol));
406
406
  if (convertToWords && !decimalDigit && (disabled || readOnly)) {
407
- let valueConverted = getGlobal('helperInvalid');
408
- if (Number.isInteger(number)) {
409
- const currentLocale = locale.get();
410
- const converter = converters[currentLocale] || num2WordsVi; // fallback VN
411
- valueConverted = converter.convert(number);
412
- }
413
- inputRef.current.value = parseValueWithFix(valueConverted);
407
+ inputRef.current.value = convertNumToWords(value);
414
408
  } else {
415
409
  inputRef.current.value = parseValueWithFix(thousandSeparator ? getThousandSeparator(v) : v);
416
410
  }
@@ -427,13 +421,23 @@ const MoneyInput = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referenc
427
421
  useImperativeHandle(reference, () => {
428
422
  const currentRef = ref.current || {};
429
423
  const _instance = {
430
- getThousandSeparator: getThousandSeparator
424
+ getThousandSeparator: getThousandSeparator,
425
+ convertNumToWords
431
426
  }; // methods
432
427
  _instance.__proto__ = {}; // hidden methods
433
428
  currentRef.instance = _instance;
434
429
  currentRef.getThousandSeparator = getThousandSeparator;
435
430
  return currentRef;
436
431
  });
432
+ const convertNumToWords = number => {
433
+ let valueConverted = getGlobal('helperInvalid');
434
+ if (Number.isInteger(number)) {
435
+ const currentLocale = locale.get();
436
+ const converter = converters[currentLocale] || num2WordsVi; // fallback VN
437
+ valueConverted = Object.hasOwn(converter, 'convert') ? converter.convert(number) : converter(number);
438
+ }
439
+ return valueConverted;
440
+ };
437
441
  const validateResult = validates && onValidate(value, validates, true);
438
442
  return jsx("div", {
439
443
  ref: ref,
@@ -543,6 +547,8 @@ MoneyInput.propTypes = {
543
547
  required: PropTypes.bool,
544
548
  /** Convert money from number to words when readOnly || disabled */
545
549
  convertToWords: PropTypes.bool,
550
+ /** Convert number to words function */
551
+ convertNumToWords: PropTypes.number,
546
552
  /** Add a string to first of value when convertToWords. */
547
553
  prefix: PropTypes.string,
548
554
  /** Add a string to last of value when convertToWords. */
@@ -49,7 +49,7 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
49
49
  labelProps,
50
50
  max: maxProp,
51
51
  maxDigit,
52
- min,
52
+ min: minProp,
53
53
  nonStyle,
54
54
  onBlur,
55
55
  onChange,
@@ -69,9 +69,12 @@ const NumberInput = /*#__PURE__*/forwardRef((inProps, reference) => {
69
69
  viewType
70
70
  } = props;
71
71
  let max = maxProp;
72
+ let min = minProp;
72
73
  let thousandSymbol = thousandSeparator;
73
74
  let decimalSymbol = decimalSymbolProp;
74
75
  let valueProps = valueProp;
76
+ if (!min && min !== 0) min = -Infinity;
77
+ if (!max && max !== 0) max = Infinity;
75
78
  const pos = useRef(null);
76
79
  const ref = useRef(null);
77
80
  const globalRef = useRef({});
@@ -36,6 +36,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
36
36
  type,
37
37
  width,
38
38
  yesText,
39
+ showFullContent,
39
40
  ...props
40
41
  }, reference) => {
41
42
  if (!reference) reference = useRef(null);
@@ -43,7 +44,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
43
44
  const statusAction = useRef('');
44
45
  const [openState, setOpenState] = useState(open);
45
46
  const [custom, setCustom] = useState(null);
46
- const [showMoreDescription, setShowMoreDescription] = useState(false);
47
+ const [showMoreDescription, setShowMoreDescription] = useState(!showFullContent);
47
48
  const [descriptionLines, setDescriptionLines] = useState(0);
48
49
  const showPopup = useDelayUnmount(openState, 200);
49
50
  const theme = useTheme();
@@ -100,7 +101,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
100
101
  const onRefChange = useCallback(node => {
101
102
  if (node) {
102
103
  setDescriptionLines(Math.round((node === null || node === void 0 ? void 0 : node.offsetHeight) / 18)); //18 is line-height of Typography p2
103
- setShowMoreDescription(false);
104
+ setShowMoreDescription(!showFullContent);
104
105
  }
105
106
  }, []);
106
107
  useEffect(() => {
@@ -175,7 +176,7 @@ const Popup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
175
176
  ref: onRefChange,
176
177
  type: 'p2',
177
178
  className: 'DGN-UI-Popup-Body-Detail'
178
- }, description), subtitle && descriptionLines > 1 || descriptionLines > 3 ? jsx("span", {
179
+ }, description), (subtitle && descriptionLines > 1 || descriptionLines > 3) && showFullContent ? jsx("span", {
179
180
  className: 'DGN-More-Action',
180
181
  onClick: () => setShowMoreDescription(!showMoreDescription)
181
182
  }, getGlobal(showMoreDescription ? 'showLess' : 'showMore')) : null)));
@@ -343,7 +344,8 @@ Popup.defaultProps = {
343
344
  style: {},
344
345
  top: 56,
345
346
  type: 'info',
346
- width: 480
347
+ width: 480,
348
+ showFullContent: true
347
349
  };
348
350
  Popup.propTypes = {
349
351
  /** If `true`, the component is shown. */
@@ -379,7 +381,9 @@ Popup.propTypes = {
379
381
  /** Width of the component. */
380
382
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
381
383
  /** Label of confirm button. */
382
- yesText: PropTypes.string
384
+ yesText: PropTypes.string,
385
+ /** If `true`, show full content in popup */
386
+ showFullContent: PropTypes.bool
383
387
  /**
384
388
  * ref methods
385
389
  *
package/global/index.js CHANGED
@@ -245,7 +245,8 @@ const globalObject = {
245
245
  dropdownPlaceholder: '请选择'
246
246
  },
247
247
  //Global variable
248
- delayOnInput: 1200,
248
+ delayOnInput: 500,
249
+ delayOnSearchInput: 1200,
249
250
  maxSizeUpload: Infinity
250
251
  };
251
252
  export const getGlobal = (key, language = locale.get()) => {
package/icons/basic.js CHANGED
@@ -4679,6 +4679,34 @@ export const OneSquare = /*#__PURE__*/memo(({
4679
4679
  fill: fillColor(color)
4680
4680
  }));
4681
4681
  });
4682
+ export const OpenNew = /*#__PURE__*/memo(({
4683
+ width,
4684
+ height,
4685
+ color = 'system/rest',
4686
+ viewBox = false
4687
+ }) => {
4688
+ return viewBox ? /*#__PURE__*/React.createElement("svg", {
4689
+ width: width || 24,
4690
+ height: height || 24,
4691
+ viewBox: "0 0 24 24",
4692
+ fill: "none"
4693
+ }, /*#__PURE__*/React.createElement("path", {
4694
+ fillRule: "evenodd",
4695
+ clipRule: "evenodd",
4696
+ d: "M12 3V5H5V19H19V12H21V19C21 20.1 20.1 21 19 21H5C3.89 21 3 20.1 3 19V5C3 3.9 3.89 3 5 3H12ZM21 3V10H19V6.41016L9.16992 16.2402L7.75977 14.8301L17.5898 5H14V3H21Z",
4697
+ fill: fillColor(color)
4698
+ })) : /*#__PURE__*/React.createElement("svg", {
4699
+ width: width || 18,
4700
+ height: height || 18,
4701
+ viewBox: "0 0 18 18",
4702
+ fill: "none"
4703
+ }, /*#__PURE__*/React.createElement("path", {
4704
+ fillRule: "evenodd",
4705
+ clipRule: "evenodd",
4706
+ d: "M9 0V2H2V16H16V9H18V16C18 17.1 17.1 18 16 18H2C0.89 18 0 17.1 0 16V2C0 0.9 0.89 0 2 0H9ZM18 0V7H16V3.41016L6.16992 13.2402L4.75977 11.8301L14.5898 2H11V0H18Z",
4707
+ fill: fillColor(color)
4708
+ }));
4709
+ });
4682
4710
  export const Undo = /*#__PURE__*/memo(({
4683
4711
  width,
4684
4712
  height,
@@ -7284,6 +7312,44 @@ export const Inheritance = /*#__PURE__*/memo(({
7284
7312
  fill: fillColor(color)
7285
7313
  }));
7286
7314
  });
7315
+ export const Import = /*#__PURE__*/memo(({
7316
+ width,
7317
+ height,
7318
+ color = 'system/rest',
7319
+ viewBox = false
7320
+ }) => {
7321
+ return viewBox ? /*#__PURE__*/React.createElement("svg", {
7322
+ width: width || 24,
7323
+ height: height || 24,
7324
+ viewBox: "0 0 24 24",
7325
+ fill: "none"
7326
+ }, /*#__PURE__*/React.createElement("path", {
7327
+ fillRule: "evenodd",
7328
+ clipRule: "evenodd",
7329
+ d: "M13 8.62059L8.28283 3.2307V6.41849L7.94949 6.39752L7.47475 6.36606C6.12121 6.28217 4.9697 5.97807 3.94949 5.43279C2.89899 4.87703 2 4.08008 1.23232 3L1 3.09438C1.41414 5.03432 2.24242 7.18398 3.85859 8.75691C4.81818 9.70067 6.07071 10.4452 7.68687 10.8122L7.86869 10.8541L8.28283 10.9485V14L13 8.62059Z",
7330
+ fill: fillColor(color)
7331
+ }), /*#__PURE__*/React.createElement("path", {
7332
+ fillRule: "evenodd",
7333
+ clipRule: "evenodd",
7334
+ d: "M5 11.4316V19C5 20.1046 5.89543 21 7 21H19C20.1046 21 21 20.1046 21 19V7C21 5.89543 20.1046 5 19 5H11.9165L13.6738 7H19V19H7V12.2796C6.54269 12.2796 5 11.5 5 11.4316Z",
7335
+ fill: fillColor(color)
7336
+ })) : /*#__PURE__*/React.createElement("svg", {
7337
+ width: width || 20,
7338
+ height: height || 18,
7339
+ viewBox: "0 0 20 18",
7340
+ fill: "none"
7341
+ }, /*#__PURE__*/React.createElement("path", {
7342
+ fillRule: "evenodd",
7343
+ clipRule: "evenodd",
7344
+ d: "M12 5.62059L7.28283 0.230696V3.41849L6.94949 3.39752L6.47475 3.36606C5.12121 3.28217 3.9697 2.97807 2.94949 2.43279C1.89899 1.87703 1 1.08008 0.232323 0L0 0.0943766C0.414141 2.03432 1.24242 4.18398 2.85859 5.75691C3.81818 6.70067 5.07071 7.44519 6.68687 7.8122L6.86869 7.85415L7.28283 7.94852V11L12 5.62059Z",
7345
+ fill: fillColor(color)
7346
+ }), /*#__PURE__*/React.createElement("path", {
7347
+ fillRule: "evenodd",
7348
+ clipRule: "evenodd",
7349
+ d: "M4 8.43156V16C4 17.1046 4.89543 18 6 18H18C19.1046 18 20 17.1046 20 16V4C20 2.89543 19.1046 2 18 2H10.9165L12.6738 4H18V16H6V9.27963C5.54269 9.27963 4 8.5 4 8.43156Z",
7350
+ fill: fillColor(color)
7351
+ }));
7352
+ });
7287
7353
  export const Warning = /*#__PURE__*/memo(({
7288
7354
  width,
7289
7355
  height,
@@ -61,8 +61,8 @@ IconMenu.propTypes = {
61
61
  height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
62
62
  /** Name of icon. */
63
63
  name: PropTypes.string,
64
- /** Menu type (DHR || ERP || BEM). */
65
- type: PropTypes.oneOf(['dhr', 'erp', 'bem', 'eo']),
64
+ /** Menu type (DHR || ERP || BEM || INVOICE). */
65
+ type: PropTypes.oneOf(['dhr', 'erp', 'bem', 'eo', 'invoice']),
66
66
  /** Width of icon. */
67
67
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
68
68
  /** Style inline of component. */
package/package.json CHANGED
@@ -1,44 +1,78 @@
1
- {
2
- "name": "diginet-core-ui",
3
- "version": "1.4.64",
4
- "description": "The DigiNet core ui",
5
- "homepage": "https://diginet.com.vn",
6
- "main": "index.js",
7
- "scripts": {
8
- "start-js": "react-scripts start --max_old_space_size=4096",
9
- "start": "npx npm-run-all -p start-js",
10
- "build": "GENERATE_SOURCEMAP=false && react-scripts build --env=production --max_old_space_size=8192",
11
- "eject": "react-scripts eject",
12
- "test": "echo \"Error: no test specified\" && exit 1"
13
- },
14
- "dependencies": {
15
- "@emotion/core": "^10.0.35",
16
- "prop-types": "^15.7.2",
17
- "@emotion/css": "^11.11.0",
18
- "@emotion/react": "^11.10.6"
19
- },
20
- "repository": {
21
- "type": "git",
22
- "url": "git+https://diginetvn@bitbucket.org/diginetvn/diginet-core-ui.git"
23
- },
24
- "keywords": [
25
- "core ui",
26
- "diginet"
27
- ],
28
- "author": "rocachien",
29
- "contributors": [
30
- {
31
- "name": "Chien Do",
32
- "email": "rocachien@gmail.com"
33
- },
34
- {
35
- "name": "Nhat Tran",
36
- "email": "tranminhnhat1005@gmail.com"
37
- },
38
- {
39
- "name": "Thuan Nguyen",
40
- "email": "nt.thuan.hutech@gmail.com"
41
- }
42
- ],
43
- "license": "MIT"
44
- }
1
+ {
2
+ "name": "diginet-core-ui",
3
+ "version": "1.4.65-beta.2",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "license": "UNLICENSED",
7
+ "scripts": {
8
+ "start": "npm-run-all --parallel start-sb eslint-test",
9
+ "start-sb": "start-storybook -p 9050",
10
+ "build-storybook": "build-storybook -c .storybook -s src",
11
+ "build": "run-script-os",
12
+ "build:windows": "rimraf dist && mkdirp dist/components && npm run compile && sass --style=compressed src/scss:dist/css && xcopy src\\\\assets dist\\\\assets\\ /e /y",
13
+ "build:darwin:linux:default": "rm -rf dist && npm run compile && sass --style=compressed src/scss:dist/css && cp -rf src/assets dist/assets",
14
+ "compile": "babel src --out-dir dist --ignore **/*.stories.js",
15
+ "pack": "npm run build && cp *.md dist/ && npm run version:bump --silent && npm run version:add --silent && cd dist && npm pack",
16
+ "production-keep-version": "npm run build && cp *.md dist/ && cp package.json dist/ && cd dist && npm publish",
17
+ "beta": "npm run build && cp *.md dist/ && cp package.json dist/ && cd dist && npm publish --tag beta",
18
+ "production": "npm run build && cp *.md dist/ && npm run version:bump --silent && npm run version:add --silent && cd dist && npm publish",
19
+ "version:add": "run-script-os",
20
+ "version:add:windows": "cat package.json.tmp | sed \"s/0.0.0/%npm_package_version%/g\" > dist/package.json",
21
+ "version:add:darwin:linux:default": "VERSION=$(npm run version:extract --silent) && cat package.json.tmp | sed \"s/0.0.0/${VERSION}/g\" > dist/package.json",
22
+ "version:bump": "npm version patch --no-git-tag-version --silent",
23
+ "version:extract": "cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]'",
24
+ "test": "echo \"Error: no test specified\" && exit 1",
25
+ "lint": "eslint --fix --config .eslintrc.js \"**/*.js\"",
26
+ "eslint-test": "onchange \"src/**/*.{js,jsx,json}\" -- eslint . --fix",
27
+ "freshtall": "npm cache clean --force && rm -rf node_modules && rm -f package-lock.json && npm install",
28
+ "test-storybook": "test-storybook --url http://localhost:9050",
29
+ "preinstall": "echo {} > package-lock.json"
30
+ },
31
+ "dependencies": {
32
+ "@emotion/core": "^10.0.35",
33
+ "@emotion/css": "^11.11.0",
34
+ "@emotion/react": "^11.10.6",
35
+ "babel-plugin-module-resolver": "^4.1.0",
36
+ "date-fns": "^2.30.0",
37
+ "prop-types": "^15.7.2"
38
+ },
39
+ "lint-staged": {
40
+ "*/**/*.{js,jsx,json}": [
41
+ "prettier --write",
42
+ "git add"
43
+ ]
44
+ },
45
+ "devDependencies": {
46
+ "@babel/cli": "^7.14.3",
47
+ "@babel/plugin-proposal-class-properties": "^7.13.0",
48
+ "@babel/plugin-proposal-logical-assignment-operators": "^7.16.0",
49
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
50
+ "@babel/plugin-proposal-optional-chaining": "^7.14.2",
51
+ "@babel/plugin-proposal-private-methods": "^7.18.6",
52
+ "@babel/plugin-proposal-private-property-in-object": "^7.18.6",
53
+ "@babel/preset-react": "^7.13.13",
54
+ "@storybook/addon-actions": "6.2.9",
55
+ "@storybook/addon-essentials": "6.2.9",
56
+ "@storybook/addon-links": "6.2.9",
57
+ "@storybook/addon-postcss": "^2.0.0",
58
+ "@storybook/react": "6.2.9",
59
+ "@storybook/test-runner": "^0.7.1",
60
+ "autoprefixer": "^10.3.1",
61
+ "babel-loader": "^8.2.2",
62
+ "eslint": "^8.4.1",
63
+ "eslint-plugin-react": "^7.27.1",
64
+ "eslint-plugin-regex": "^1.10.0",
65
+ "husky": "^7.0.4",
66
+ "jest": "^27.5.1",
67
+ "lint-staged": "^12.1.2",
68
+ "mkdirp": "^1.0.4",
69
+ "npm-run-all": "^4.1.5",
70
+ "onchange": "^7.1.0",
71
+ "postcss-flexbugs-fixes": "^5.0.2",
72
+ "react": "^17.0.1",
73
+ "react-dom": "^17.0.1",
74
+ "rimraf": "^3.0.2",
75
+ "run-script-os": "^1.1.6",
76
+ "sass": "1.58.3"
77
+ }
78
+ }
package/readme.md CHANGED
@@ -41,6 +41,19 @@ npm test
41
41
  ```
42
42
 
43
43
  ## Changelog
44
+ ## 1.4.65
45
+ - \[Added\]: Icon – Add Icon OpenNew
46
+ - \[Added\]: Icon – Add IconMenu WEO53TR001, WEO53APP01
47
+ - \[Added\]: Icon – Add IconMenu MHRM09N1404
48
+ - \[Added\]: Icon – Add IconMenu MHRP25N0010
49
+ - \[Added\]: Icon – Add IconMenu D95F3090, D95F3093, D06-2, D06-4, D95F3094, W102F1000, W103F1000, W104F1000, W105F1000, W106F1000, W107F1000, W108F1000
50
+ - \[Changed\]: ButtonMore - Allow custom ButtonMore
51
+ - \[Changed\]: Setting - Adjust the debounce/wait time when entering employee search information from 0.7s to 1.2s
52
+ - \[Changed\]: DatePicker, Dropdown - Adjust the behavior so that when DatePicker or Dropdown is in ReadOnly or Disabled state, the "Select" placeholder text and the clear (X) icon are still displayed
53
+ - \[Fixed\]: DateRangePicker - Display a popup for DateRangePicker
54
+ - \[Changed\]: MoneyInput - Add support for converting numbers into currency words/text in MoneyInput
55
+ - \[Changed\]: Popup - Add the showFullContent prop for Popup
56
+
44
57
  ## 1.4.64
45
58
  - \[Added\]: Icon – Add Icon BloodMinus
46
59
  - \[Changed\]: DatePicker - Allow manual input for the DatePicker (default value shows "Invalid Date" when typing) + add a "delayOnChange" prop.
package/theme/settings.js CHANGED
@@ -436,7 +436,7 @@ const settings = {
436
436
  openOnClickAt: 'icon',
437
437
  viewType: 'underlined',
438
438
  inputProps: {},
439
- delayOnInput: 1200
439
+ delayOnInput: 700
440
440
  }
441
441
  },
442
442
  Grid: {