diginet-core-ui 1.4.32 → 1.4.34-beta.1
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_1765_74)">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M31.5 7H24.5V3.5C24.5 1.6 22.9 0 21 0H14C12.1 0 10.5 1.6 10.5 3.5V7H3.5C1.6 7 0 8.6 0 10.5V17.2C0.1 18.2 1 19 2 19H13V18C13 16.9 13.9 16 15 16H20C21.1 16 22 16.9 22 18V19H25.8C27.3 17.7 29.3 16.9 31.4 16.9C32.6 16.9 33.8 17.2 34.8 17.6C35 17.4 35 17.2 35 17V10.5C35 8.6 33.4 7 31.5 7ZM21 7H14V3.5H21V7ZM15 18V22H20V18H15ZM24.1 21H22V22C22 23.1 21.1 24 20 24H15C13.9 24 13 23.1 13 22V21H2C1.3 21 0.6 20.8 0 20.5V29.8C0 31.7 1.6 33.3 3.5 33.3H25.5C24 30.8 22.8 28 22.8 25.6C22.8 23.9 23.3 22.3 24.1 21Z" fill="#2680EB"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.8999 25.5C23.8999 21.3 27.2999 18 31.3999 18C35.4999 18 38.8999 21.4 38.8999 25.5C38.8999 30.1 33.9999 36.4 32.0999 38.6C31.6999 39.1 30.9999 39.1 30.5999 38.6C28.7999 36.4 23.8999 30.1 23.8999 25.5ZM27.5999 24.5C26.8999 27.5 29.4999 30.1 32.4999 29.4C33.8999 29.1 35.0999 27.9 35.3999 26.5C36.0999 23.5 33.4999 20.9 30.4999 21.6C29.0999 22 27.8999 23.1 27.5999 24.5Z" fill="#FF8C00"/>
|
|
5
|
+
</g>
|
|
6
|
+
<defs>
|
|
7
|
+
<clipPath id="clip0_1765_74">
|
|
8
|
+
<rect width="39" height="39" fill="white"/>
|
|
9
|
+
</clipPath>
|
|
10
|
+
</defs>
|
|
11
|
+
</svg>
|
|
@@ -652,7 +652,7 @@ const renderNavigator = (className, refs, dbLeftFn, leftFn, rightFn, dbRightFn,
|
|
|
652
652
|
color: 'primary',
|
|
653
653
|
type: 'h3',
|
|
654
654
|
ref: refs.content,
|
|
655
|
-
format: ['
|
|
655
|
+
format: ['sentence']
|
|
656
656
|
}))), jsx("div", {
|
|
657
657
|
className: className.navigator.around
|
|
658
658
|
}, jsx(ButtonIcon, {
|
|
@@ -59,8 +59,8 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* START REFERENCE
|
|
62
|
+
/**
|
|
63
|
+
* START REFERENCE
|
|
64
64
|
*/
|
|
65
65
|
const ref = useRef(null);
|
|
66
66
|
const tableRef = useRef(null);
|
|
@@ -91,12 +91,12 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
91
91
|
currentRef.instance = _instance;
|
|
92
92
|
return currentRef;
|
|
93
93
|
});
|
|
94
|
-
/**
|
|
95
|
-
* END REFERENCE
|
|
94
|
+
/**
|
|
95
|
+
* END REFERENCE
|
|
96
96
|
*/
|
|
97
97
|
|
|
98
|
-
/**
|
|
99
|
-
* START FUNCTION
|
|
98
|
+
/**
|
|
99
|
+
* START FUNCTION
|
|
100
100
|
*/
|
|
101
101
|
const onUpdateNavigatorValue = useCallback(value => {
|
|
102
102
|
navigatorValue.current = value;
|
|
@@ -218,15 +218,15 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
|
|
221
|
-
/**
|
|
222
|
-
* END FUNCTION
|
|
221
|
+
/**
|
|
222
|
+
* END FUNCTION
|
|
223
223
|
*/
|
|
224
224
|
|
|
225
|
-
/**
|
|
226
|
-
* START EFFECT
|
|
225
|
+
/**
|
|
226
|
+
* START EFFECT
|
|
227
227
|
*/
|
|
228
228
|
useEffect(() => {
|
|
229
|
-
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue)) {
|
|
229
|
+
if (defaultValue && defaultValue !== '' && isValidDate(defaultValue) && !value) {
|
|
230
230
|
if (isBeforeLimit(min, defaultValue)) {
|
|
231
231
|
onUpdate(min);
|
|
232
232
|
} else if (isAfterLimit(max, defaultValue)) {
|
|
@@ -262,12 +262,12 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
262
262
|
onUpdate(activeValue.current);
|
|
263
263
|
}
|
|
264
264
|
}, [onClick, min, max, currentZoomLevel, minZoom, maxZoom]);
|
|
265
|
-
/**
|
|
266
|
-
* END FUNCTION
|
|
265
|
+
/**
|
|
266
|
+
* END FUNCTION
|
|
267
267
|
*/
|
|
268
268
|
|
|
269
|
-
/**
|
|
270
|
-
* START COMPONENT
|
|
269
|
+
/**
|
|
270
|
+
* START COMPONENT
|
|
271
271
|
*/
|
|
272
272
|
const tableMemo = jsx("div", {
|
|
273
273
|
className: unique.table.container
|
|
@@ -275,8 +275,8 @@ const Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
275
275
|
className: unique.table.table,
|
|
276
276
|
ref: tableRef
|
|
277
277
|
}, renderHeader(unique, currentZoomLevel), jsx("tbody", null)));
|
|
278
|
-
/**
|
|
279
|
-
* END COMPONENT
|
|
278
|
+
/**
|
|
279
|
+
* END COMPONENT
|
|
280
280
|
*/
|
|
281
281
|
return jsx("div", {
|
|
282
282
|
...other,
|
|
@@ -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({});
|
package/package.json
CHANGED
|
@@ -1,44 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "diginet-core-ui",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "
|
|
5
|
-
"homepage": "https://diginet.com.vn",
|
|
3
|
+
"version": "1.4.34-beta.1",
|
|
4
|
+
"description": "",
|
|
6
5
|
"main": "index.js",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start
|
|
9
|
-
"start": "
|
|
10
|
-
"build": "
|
|
11
|
-
"
|
|
12
|
-
"
|
|
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"
|
|
13
30
|
},
|
|
14
31
|
"dependencies": {
|
|
15
32
|
"@emotion/core": "^10.0.35",
|
|
16
|
-
"prop-types": "^15.7.2",
|
|
17
33
|
"@emotion/css": "^11.11.0",
|
|
18
|
-
"@emotion/react": "^11.10.6"
|
|
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"
|
|
19
38
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"*/**/*.{js,jsx,json}": [
|
|
41
|
+
"prettier --write",
|
|
42
|
+
"git add"
|
|
43
|
+
]
|
|
23
44
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
+
}
|
|
44
78
|
}
|