diginet-core-ui 1.3.65 → 1.3.66
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/components/button/index.js +13 -14
- package/components/button/more.js +16 -16
- package/components/button/ripple-effect.js +2 -0
- package/components/card/card.js +30 -28
- package/components/card/index.js +1 -0
- package/components/chart/Pie/Circle.js +2 -1
- package/components/chart/Pie-v2/Circle.js +4 -5
- package/components/chart/Pie-v2/Sector.js +21 -27
- package/components/chart/Pie-v2/Sectors.js +16 -15
- package/components/chart/Pie-v2/index.js +141 -16
- package/components/chart/bar/Bar.js +20 -18
- package/components/chart/bar/Labels.js +20 -18
- package/components/chart/bar/index.js +3 -2
- package/components/chart/bar-v2/Bar.js +23 -21
- package/components/chart/bar-v2/Labels.js +21 -19
- package/components/chart/bar-v2/index.js +3 -2
- package/components/chart/line/Labels.js +21 -18
- package/components/chart/line/Path.js +7 -6
- package/components/chart/line/Point.js +2 -0
- package/components/chart/line/Title.js +1 -2
- package/components/chart/line/index.js +22 -1
- package/components/chart/line-v2/Labels.js +21 -18
- package/components/chart/line-v2/Path.js +15 -14
- package/components/chart/line-v2/Point.js +4 -2
- package/components/chart/line-v2/Title.js +1 -2
- package/components/chart/line-v2/index.js +8 -7
- package/components/check-text/index.js +22 -21
- package/components/chip/attach.js +8 -8
- package/components/form-control/calendar/index.js +17 -17
- package/components/form-control/calendar/range.js +33 -33
- package/components/form-control/dropdown/index.js +2 -1
- package/components/form-control/form/index.js +1 -0
- package/components/form-control/input-base/index.js +39 -30
- package/components/form-control/label/index.js +67 -43
- package/components/form-control/number-input/index.js +16 -29
- package/components/form-control/phone-input/index.js +20 -34
- package/components/form-control/text-input/index.js +9 -6
- package/components/form-control/time-picker/index.js +2 -1
- package/components/form-control/time-picker/swiper.js +80 -76
- package/components/form-view/helper-text.js +1 -0
- package/components/grid/Col.js +1 -1
- package/components/index.js +4 -1
- package/components/modal/index.js +1 -0
- package/components/others/extra/index.js +2 -0
- package/components/others/scrollbar/index.js +25 -26
- package/components/popover/body.js +74 -0
- package/components/popover/footer.js +76 -0
- package/components/popover/header.js +79 -0
- package/components/popover/index.js +119 -86
- package/components/popup/danger_popup.js +3 -1
- package/components/popup/index.js +2 -2
- package/components/popup/proposals_popup.js +1 -0
- package/components/progress/circular.js +14 -12
- package/components/status/index.js +92 -89
- package/components/tooltip/index.js +8 -3
- package/components/transfer/index.js +86 -94
- package/icons/effect.js +32 -34
- package/icons/general/clock/clock.js +1 -0
- package/icons/general/color-handler/background.js +1 -0
- package/icons/general/color-handler/text.js +1 -0
- package/icons/general/emoji/emoji.js +1 -0
- package/icons/general/font-properties/bold.js +1 -0
- package/icons/general/font-properties/font-family.js +1 -0
- package/icons/general/font-properties/font-size.js +1 -0
- package/icons/general/font-properties/italic.js +1 -0
- package/icons/general/font-properties/underline.js +1 -0
- package/icons/general/hyperlink/hyperlink.js +1 -0
- package/icons/general/indent/decrease.js +1 -0
- package/icons/general/indent/increase.js +1 -0
- package/icons/general/list/bullets.js +1 -0
- package/icons/general/list/numbering.js +1 -0
- package/icons/general/picture/picture.js +1 -0
- package/icons/general/steps/redo.js +1 -0
- package/icons/general/steps/undo.js +1 -0
- package/icons/general/text-align/center.js +1 -0
- package/icons/general/text-align/justify.js +1 -0
- package/icons/general/text-align/left.js +1 -0
- package/icons/general/text-align/right.js +1 -0
- package/icons/menu/dhr.js +2 -1
- package/icons/menu/erp.js +1 -0
- package/package.json +1 -1
- package/readme.md +15 -0
- package/styles/animation.js +2 -1
- package/styles/color-helper.js +108 -106
- package/styles/font.js +5 -4
- package/theme/index.js +1 -3
- package/theme/make-styles.js +25 -105
- package/theme/theme-provider.js +0 -9
- package/utils/console.js +0 -1
- package/utils/error/error.js +2 -3
- package/utils/index.js +0 -1
- package/utils/promisify.js +2 -1
- package/utils/renderIcon.js +13 -11
- package/styles/media-queries.js +0 -10
- package/theme/with-styles.js +0 -15
- package/theme/with-theme.js +0 -9
- package/utils/number.js +0 -63
package/utils/index.js
CHANGED
|
@@ -7,7 +7,6 @@ export * from './date';
|
|
|
7
7
|
export { default as date } from './date';
|
|
8
8
|
export { default as getFileType } from './getFileType';
|
|
9
9
|
export { default as mapParent } from './map-parent';
|
|
10
|
-
export { default as numberFormat } from './number';
|
|
11
10
|
export { default as parseTextToHTML } from './parseHTML';
|
|
12
11
|
export { default as promisify } from './promisify';
|
|
13
12
|
export { default as randomString } from './randomString';
|
package/utils/promisify.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
1
2
|
const slice = Array.prototype.slice;
|
|
2
3
|
let Promise;
|
|
3
4
|
|
|
@@ -19,7 +20,7 @@ function promisify(func) {
|
|
|
19
20
|
return func.apply(ctx, args);
|
|
20
21
|
} else {
|
|
21
22
|
return new Promise(function (resolve, reject) {
|
|
22
|
-
args.push(function (err
|
|
23
|
+
args.push(function (err) {
|
|
23
24
|
if (err) {
|
|
24
25
|
reject(err);
|
|
25
26
|
} else {
|
package/utils/renderIcon.js
CHANGED
|
@@ -5,25 +5,27 @@ import { jsx } from '@emotion/core';
|
|
|
5
5
|
import { ButtonIcon } from '../components';
|
|
6
6
|
import * as Icons from '../icons';
|
|
7
7
|
import { parseTextToHTML, capitalize } from './';
|
|
8
|
-
/**
|
|
9
|
-
* render icon form source (dynamic type)
|
|
10
|
-
* @param {String|jsx} source data of icon, maybe svg text | image link | name of icon in icons store or a jsx element
|
|
11
|
-
* @param {String} type text to parse text to HTML, img link to use img tag, name to use icon form icons store
|
|
12
|
-
* @param {Object} options properties of Icon component if us type is name {width, height, color, viewBox, ...}
|
|
8
|
+
/**
|
|
9
|
+
* render icon form source (dynamic type)
|
|
10
|
+
* @param {String|jsx} source data of icon, maybe svg text | image link | name of icon in icons store or a jsx element
|
|
11
|
+
* @param {String} type text to parse text to HTML, img link to use img tag, name to use icon form icons store
|
|
12
|
+
* @param {Object} options properties of Icon component if us type is name {width, height, color, viewBox, ...}
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
const renderIcon = (source, type, options = {}) => {
|
|
16
16
|
if (typeof source === 'string') {
|
|
17
17
|
switch (type) {
|
|
18
18
|
case 'name':
|
|
19
|
-
|
|
19
|
+
{
|
|
20
|
+
let IconComp = Icons[capitalize(source)];
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
if (IconComp) {
|
|
23
|
+
return jsx(IconComp, { ...options
|
|
24
|
+
});
|
|
25
|
+
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
27
29
|
|
|
28
30
|
case 'effect':
|
|
29
31
|
return jsx(ButtonIcon, {
|
package/styles/media-queries.js
DELETED
package/theme/with-styles.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import { jsx } from '@emotion/core';
|
|
5
|
-
import makeStyles from './make-styles';
|
|
6
|
-
|
|
7
|
-
const WithStyles = styles => Component => props => {
|
|
8
|
-
const useStyle = makeStyles(styles);
|
|
9
|
-
const classes = useStyle();
|
|
10
|
-
return jsx(Component, { ...props,
|
|
11
|
-
classes: classes
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default WithStyles;
|
package/theme/with-theme.js
DELETED
package/utils/number.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {String} value
|
|
4
|
-
* @param {String} format
|
|
5
|
-
*/
|
|
6
|
-
export default function numberFormat(value, format) {
|
|
7
|
-
let hashCount = 0;
|
|
8
|
-
let a = '';
|
|
9
|
-
|
|
10
|
-
for (let i = 0, ln = format.length; i < ln; i++) {
|
|
11
|
-
if (format[i] === '.') {
|
|
12
|
-
format1 = format.split('.');
|
|
13
|
-
console.log(format1);
|
|
14
|
-
|
|
15
|
-
if (format1 = format.split('.').length === 3) {
|
|
16
|
-
console.log('a');
|
|
17
|
-
} else {
|
|
18
|
-
hashCount = format1[1].length;
|
|
19
|
-
|
|
20
|
-
switch (hashCount) {
|
|
21
|
-
case 3:
|
|
22
|
-
a = value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
23
|
-
break;
|
|
24
|
-
|
|
25
|
-
case 2:
|
|
26
|
-
a = value.toString().replace(/\B(?=(\d{2})+(?!\d))/g, ',');
|
|
27
|
-
break;
|
|
28
|
-
|
|
29
|
-
default:
|
|
30
|
-
return 'Invalid format';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return a;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (format[i] === ' ') {
|
|
38
|
-
const formatArray = format.split('#').filter(str => str !== '');
|
|
39
|
-
let start = 0;
|
|
40
|
-
let numStr = '';
|
|
41
|
-
|
|
42
|
-
for (let i = 0, ln = format.length; i <= ln; i++) {
|
|
43
|
-
const part = formatArray[i] || ''; //if i is the last fragment take the index of end of the value
|
|
44
|
-
//For case like +1 (911) 911 91 91 having pattern +1 (###) ### ## ##
|
|
45
|
-
|
|
46
|
-
const index = i === ln ? value.length : value.indexOf(part, start);
|
|
47
|
-
/* in any case if we don't find the pattern part in the value assume the val as numeric string
|
|
48
|
-
This will be also in case if user has started typing, in any other case it will not be -1
|
|
49
|
-
unless wrong prop value is provided */
|
|
50
|
-
|
|
51
|
-
if (index === -1) {
|
|
52
|
-
numStr = value;
|
|
53
|
-
break;
|
|
54
|
-
} else {
|
|
55
|
-
numStr += val.substring(start, index);
|
|
56
|
-
start = index + part.length;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return (numStr.toString() || []).replace(/\B(?=(\d{4})+(?!\d))/g, ' ');
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|