@mirai/ui 1.0.65 → 1.0.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/build/components/Button/Button.js +17 -29
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.stories.js +4 -11
- package/build/components/Button/Button.stories.js.map +1 -1
- package/build/components/Button/index.js +0 -2
- package/build/components/Button/index.js.map +1 -1
- package/build/components/Calendar/Calendar.Month.js +22 -41
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js +36 -58
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js +0 -10
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.constants.js.map +1 -1
- package/build/components/Calendar/Calendar.js +45 -90
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.stories.js +4 -21
- package/build/components/Calendar/Calendar.stories.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js +0 -3
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js +0 -4
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDayOfWeek.js +0 -2
- package/build/components/Calendar/helpers/getFirstDayOfWeek.js.map +1 -1
- package/build/components/Calendar/helpers/getHeader.js +0 -3
- package/build/components/Calendar/helpers/getHeader.js.map +1 -1
- package/build/components/Calendar/helpers/getScrollTo.js +6 -19
- package/build/components/Calendar/helpers/getScrollTo.js.map +1 -1
- package/build/components/Calendar/helpers/getToday.js +0 -3
- package/build/components/Calendar/helpers/getToday.js.map +1 -1
- package/build/components/Calendar/helpers/getWeekDays.js +0 -5
- package/build/components/Calendar/helpers/getWeekDays.js.map +1 -1
- package/build/components/Calendar/helpers/getWeekNumber.js +0 -3
- package/build/components/Calendar/helpers/getWeekNumber.js.map +1 -1
- package/build/components/Calendar/helpers/index.js +0 -16
- package/build/components/Calendar/helpers/index.js.map +1 -1
- package/build/components/Calendar/index.js +0 -2
- package/build/components/Calendar/index.js.map +1 -1
- package/build/components/Form/Form.constants.js.map +1 -1
- package/build/components/Form/Form.js +39 -76
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/Form.stories.js +8 -16
- package/build/components/Form/Form.stories.js.map +1 -1
- package/build/components/Form/helpers/getChildrenErrors.js +10 -21
- package/build/components/Form/helpers/getChildrenErrors.js.map +1 -1
- package/build/components/Form/helpers/getChildrenValues.js +11 -25
- package/build/components/Form/helpers/getChildrenValues.js.map +1 -1
- package/build/components/Form/helpers/getField.js +2 -5
- package/build/components/Form/helpers/getField.js.map +1 -1
- package/build/components/Form/helpers/groupState.js +6 -9
- package/build/components/Form/helpers/groupState.js.map +1 -1
- package/build/components/Form/helpers/index.js +0 -8
- package/build/components/Form/helpers/index.js.map +1 -1
- package/build/components/Form/index.js +0 -2
- package/build/components/Form/index.js.map +1 -1
- package/build/components/InputDate/InputDate.js +35 -66
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/InputDate.stories.js +6 -20
- package/build/components/InputDate/InputDate.stories.js.map +1 -1
- package/build/components/InputDate/index.js +0 -2
- package/build/components/InputDate/index.js.map +1 -1
- package/build/components/InputNumber/InputNumber.js +16 -30
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/InputNumber.stories.js +4 -13
- package/build/components/InputNumber/InputNumber.stories.js.map +1 -1
- package/build/components/InputNumber/index.js +0 -2
- package/build/components/InputNumber/index.js.map +1 -1
- package/build/components/InputOption/InputOption.constants.js.map +1 -1
- package/build/components/InputOption/InputOption.js +14 -30
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/InputOption.stories.js +4 -14
- package/build/components/InputOption/InputOption.stories.js.map +1 -1
- package/build/components/InputOption/index.js +0 -4
- package/build/components/InputOption/index.js.map +1 -1
- package/build/components/InputSelect/InputSelect.js +20 -48
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/InputSelect.stories.js +4 -17
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +8 -8
- package/build/components/InputSelect/index.js +0 -2
- package/build/components/InputSelect/index.js.map +1 -1
- package/build/components/InputText/InputText.js +24 -52
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.module.css +4 -1
- package/build/components/InputText/InputText.stories.js +4 -25
- package/build/components/InputText/InputText.stories.js.map +1 -1
- package/build/components/InputText/index.js +0 -2
- package/build/components/InputText/index.js.map +1 -1
- package/build/components/Menu/Menu.Option.js +8 -21
- package/build/components/Menu/Menu.Option.js.map +1 -1
- package/build/components/Menu/Menu.js +11 -29
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/Menu.stories.js +4 -13
- package/build/components/Menu/Menu.stories.js.map +1 -1
- package/build/components/Menu/index.js +0 -2
- package/build/components/Menu/index.js.map +1 -1
- package/build/components/Modal/Modal.js +13 -29
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/Modal.stories.js +4 -11
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Modal/index.js +0 -2
- package/build/components/Modal/index.js.map +1 -1
- package/build/components/Notification/Notification.js +9 -22
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.stories.js +4 -11
- package/build/components/Notification/Notification.stories.js.map +1 -1
- package/build/components/Notification/index.js +0 -2
- package/build/components/Notification/index.js.map +1 -1
- package/build/components/Table/Table.Row.js +13 -26
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.js +17 -43
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/Table.stories.js +4 -12
- package/build/components/Table/Table.stories.js.map +1 -1
- package/build/components/Table/helpers/index.js +0 -2
- package/build/components/Table/helpers/index.js.map +1 -1
- package/build/components/Table/helpers/select.js +3 -7
- package/build/components/Table/helpers/select.js.map +1 -1
- package/build/components/Table/index.js +0 -2
- package/build/components/Table/index.js.map +1 -1
- package/build/components/Tooltip/Tooltip.js +11 -35
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/Tooltip.stories.js +4 -11
- package/build/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/build/components/Tooltip/index.js +0 -2
- package/build/components/Tooltip/index.js.map +1 -1
- package/build/components/index.js +0 -26
- package/build/components/index.js.map +1 -1
- package/build/helpers/getIconState.js +3 -7
- package/build/helpers/getIconState.js.map +1 -1
- package/build/helpers/getInputDateErrors.js +9 -13
- package/build/helpers/getInputDateErrors.js.map +1 -1
- package/build/helpers/getInputErrors.js +21 -30
- package/build/helpers/getInputErrors.js.map +1 -1
- package/build/helpers/index.js +11 -10
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/isJest.js +0 -3
- package/build/helpers/isJest.js.map +1 -1
- package/build/helpers/isValidDate.js +8 -28
- package/build/helpers/isValidDate.js.map +1 -1
- package/build/helpers/isValidEmail.js +0 -1
- package/build/helpers/isValidEmail.js.map +1 -1
- package/build/helpers/isValidPhone.js +3 -9
- package/build/helpers/isValidPhone.js.map +1 -1
- package/build/helpers/splitDate.js +16 -0
- package/build/helpers/splitDate.js.map +1 -0
- package/build/helpers/styles.js +0 -3
- package/build/helpers/styles.js.map +1 -1
- package/build/hooks/helpers/getNavigator.js +2 -5
- package/build/hooks/helpers/getNavigator.js.map +1 -1
- package/build/hooks/helpers/getResolution.js +4 -7
- package/build/hooks/helpers/getResolution.js.map +1 -1
- package/build/hooks/helpers/index.js +0 -4
- package/build/hooks/helpers/index.js.map +1 -1
- package/build/hooks/index.js +0 -2
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/useDevice.js +8 -20
- package/build/hooks/useDevice.js.map +1 -1
- package/build/hooks/useDevice.stories.js +3 -19
- package/build/hooks/useDevice.stories.js.map +1 -1
- package/build/index.js +0 -10
- package/build/index.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.js +8 -20
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.stories.js +4 -11
- package/build/primitives/Checkbox/Checkbox.stories.js.map +1 -1
- package/build/primitives/Checkbox/index.js +0 -2
- package/build/primitives/Checkbox/index.js.map +1 -1
- package/build/primitives/Icon/Icon.constants.js +0 -2
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Icon/Icon.js +11 -22
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/Icon.stories.js +7 -24
- package/build/primitives/Icon/Icon.stories.js.map +1 -1
- package/build/primitives/Icon/index.js +0 -3
- package/build/primitives/Icon/index.js.map +1 -1
- package/build/primitives/Input/Input.js +15 -28
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Input/Input.stories.js +4 -11
- package/build/primitives/Input/Input.stories.js.map +1 -1
- package/build/primitives/Input/helpers/index.js +0 -2
- package/build/primitives/Input/helpers/index.js.map +1 -1
- package/build/primitives/Input/helpers/parseValue.js +2 -5
- package/build/primitives/Input/helpers/parseValue.js.map +1 -1
- package/build/primitives/Input/index.js +0 -2
- package/build/primitives/Input/index.js.map +1 -1
- package/build/primitives/Layer/Layer.js +25 -55
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/Layer.stories.js +4 -13
- package/build/primitives/Layer/Layer.stories.js.map +1 -1
- package/build/primitives/Layer/LayerContent.js +0 -4
- package/build/primitives/Layer/LayerContent.js.map +1 -1
- package/build/primitives/Layer/helpers/getElementLayout.js +3 -5
- package/build/primitives/Layer/helpers/getElementLayout.js.map +1 -1
- package/build/primitives/Layer/helpers/getLayerPosition.js +18 -24
- package/build/primitives/Layer/helpers/getLayerPosition.js.map +1 -1
- package/build/primitives/Layer/helpers/index.js +0 -4
- package/build/primitives/Layer/helpers/index.js.map +1 -1
- package/build/primitives/Layer/index.js +0 -4
- package/build/primitives/Layer/index.js.map +1 -1
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
- package/build/primitives/Pressable/Pressable.js +14 -26
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/Pressable.module.css +1 -0
- package/build/primitives/Pressable/Pressable.stories.js +4 -11
- package/build/primitives/Pressable/Pressable.stories.js.map +1 -1
- package/build/primitives/Pressable/index.js +0 -2
- package/build/primitives/Pressable/index.js.map +1 -1
- package/build/primitives/Radio/Radio.js +7 -19
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/Radio.stories.js +4 -11
- package/build/primitives/Radio/Radio.stories.js.map +1 -1
- package/build/primitives/Radio/index.js +0 -2
- package/build/primitives/Radio/index.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.js +27 -45
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.stories.js +6 -16
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
- package/build/primitives/ScrollView/index.js +0 -2
- package/build/primitives/ScrollView/index.js.map +1 -1
- package/build/primitives/Select/Select.js +14 -31
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/Select.module.css +1 -0
- package/build/primitives/Select/Select.stories.js +4 -19
- package/build/primitives/Select/Select.stories.js.map +1 -1
- package/build/primitives/Select/index.js +0 -2
- package/build/primitives/Select/index.js.map +1 -1
- package/build/primitives/Switch/Switch.js +5 -18
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/Switch.stories.js +4 -11
- package/build/primitives/Switch/Switch.stories.js.map +1 -1
- package/build/primitives/Switch/index.js +0 -2
- package/build/primitives/Switch/index.js.map +1 -1
- package/build/primitives/Text/Text.js +14 -25
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.stories.js +4 -11
- package/build/primitives/Text/Text.stories.js.map +1 -1
- package/build/primitives/Text/index.js +0 -2
- package/build/primitives/Text/index.js.map +1 -1
- package/build/primitives/View/View.js +9 -20
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/View.stories.js +4 -11
- package/build/primitives/View/View.stories.js.map +1 -1
- package/build/primitives/View/index.js +0 -2
- package/build/primitives/View/index.js.map +1 -1
- package/build/primitives/index.js +0 -22
- package/build/primitives/index.js.map +1 -1
- package/build/theme/helpers/camelcase.js +0 -2
- package/build/theme/helpers/camelcase.js.map +1 -1
- package/build/theme/helpers/colorShade.js +0 -4
- package/build/theme/helpers/colorShade.js.map +1 -1
- package/build/theme/helpers/index.js +0 -4
- package/build/theme/helpers/index.js.map +1 -1
- package/build/theme/index.js +0 -2
- package/build/theme/index.js.map +1 -1
- package/build/theme/theme.js +1 -14
- package/build/theme/theme.js.map +1 -1
- package/package.json +14 -16
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _Button = require("./Button");
|
|
8
|
-
|
|
9
7
|
Object.keys(_Button).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _Button[key]) return;
|
|
@@ -16,9 +14,7 @@ Object.keys(_Button).forEach(function (key) {
|
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
var _Calendar = require("./Calendar");
|
|
21
|
-
|
|
22
18
|
Object.keys(_Calendar).forEach(function (key) {
|
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
|
24
20
|
if (key in exports && exports[key] === _Calendar[key]) return;
|
|
@@ -29,9 +25,7 @@ Object.keys(_Calendar).forEach(function (key) {
|
|
|
29
25
|
}
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
|
-
|
|
33
28
|
var _Form = require("./Form");
|
|
34
|
-
|
|
35
29
|
Object.keys(_Form).forEach(function (key) {
|
|
36
30
|
if (key === "default" || key === "__esModule") return;
|
|
37
31
|
if (key in exports && exports[key] === _Form[key]) return;
|
|
@@ -42,9 +36,7 @@ Object.keys(_Form).forEach(function (key) {
|
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
});
|
|
45
|
-
|
|
46
39
|
var _InputDate = require("./InputDate");
|
|
47
|
-
|
|
48
40
|
Object.keys(_InputDate).forEach(function (key) {
|
|
49
41
|
if (key === "default" || key === "__esModule") return;
|
|
50
42
|
if (key in exports && exports[key] === _InputDate[key]) return;
|
|
@@ -55,9 +47,7 @@ Object.keys(_InputDate).forEach(function (key) {
|
|
|
55
47
|
}
|
|
56
48
|
});
|
|
57
49
|
});
|
|
58
|
-
|
|
59
50
|
var _InputNumber = require("./InputNumber");
|
|
60
|
-
|
|
61
51
|
Object.keys(_InputNumber).forEach(function (key) {
|
|
62
52
|
if (key === "default" || key === "__esModule") return;
|
|
63
53
|
if (key in exports && exports[key] === _InputNumber[key]) return;
|
|
@@ -68,9 +58,7 @@ Object.keys(_InputNumber).forEach(function (key) {
|
|
|
68
58
|
}
|
|
69
59
|
});
|
|
70
60
|
});
|
|
71
|
-
|
|
72
61
|
var _InputOption = require("./InputOption");
|
|
73
|
-
|
|
74
62
|
Object.keys(_InputOption).forEach(function (key) {
|
|
75
63
|
if (key === "default" || key === "__esModule") return;
|
|
76
64
|
if (key in exports && exports[key] === _InputOption[key]) return;
|
|
@@ -81,9 +69,7 @@ Object.keys(_InputOption).forEach(function (key) {
|
|
|
81
69
|
}
|
|
82
70
|
});
|
|
83
71
|
});
|
|
84
|
-
|
|
85
72
|
var _InputSelect = require("./InputSelect");
|
|
86
|
-
|
|
87
73
|
Object.keys(_InputSelect).forEach(function (key) {
|
|
88
74
|
if (key === "default" || key === "__esModule") return;
|
|
89
75
|
if (key in exports && exports[key] === _InputSelect[key]) return;
|
|
@@ -94,9 +80,7 @@ Object.keys(_InputSelect).forEach(function (key) {
|
|
|
94
80
|
}
|
|
95
81
|
});
|
|
96
82
|
});
|
|
97
|
-
|
|
98
83
|
var _InputText = require("./InputText");
|
|
99
|
-
|
|
100
84
|
Object.keys(_InputText).forEach(function (key) {
|
|
101
85
|
if (key === "default" || key === "__esModule") return;
|
|
102
86
|
if (key in exports && exports[key] === _InputText[key]) return;
|
|
@@ -107,9 +91,7 @@ Object.keys(_InputText).forEach(function (key) {
|
|
|
107
91
|
}
|
|
108
92
|
});
|
|
109
93
|
});
|
|
110
|
-
|
|
111
94
|
var _Menu = require("./Menu");
|
|
112
|
-
|
|
113
95
|
Object.keys(_Menu).forEach(function (key) {
|
|
114
96
|
if (key === "default" || key === "__esModule") return;
|
|
115
97
|
if (key in exports && exports[key] === _Menu[key]) return;
|
|
@@ -120,9 +102,7 @@ Object.keys(_Menu).forEach(function (key) {
|
|
|
120
102
|
}
|
|
121
103
|
});
|
|
122
104
|
});
|
|
123
|
-
|
|
124
105
|
var _Modal = require("./Modal");
|
|
125
|
-
|
|
126
106
|
Object.keys(_Modal).forEach(function (key) {
|
|
127
107
|
if (key === "default" || key === "__esModule") return;
|
|
128
108
|
if (key in exports && exports[key] === _Modal[key]) return;
|
|
@@ -133,9 +113,7 @@ Object.keys(_Modal).forEach(function (key) {
|
|
|
133
113
|
}
|
|
134
114
|
});
|
|
135
115
|
});
|
|
136
|
-
|
|
137
116
|
var _Notification = require("./Notification");
|
|
138
|
-
|
|
139
117
|
Object.keys(_Notification).forEach(function (key) {
|
|
140
118
|
if (key === "default" || key === "__esModule") return;
|
|
141
119
|
if (key in exports && exports[key] === _Notification[key]) return;
|
|
@@ -146,9 +124,7 @@ Object.keys(_Notification).forEach(function (key) {
|
|
|
146
124
|
}
|
|
147
125
|
});
|
|
148
126
|
});
|
|
149
|
-
|
|
150
127
|
var _Table = require("./Table");
|
|
151
|
-
|
|
152
128
|
Object.keys(_Table).forEach(function (key) {
|
|
153
129
|
if (key === "default" || key === "__esModule") return;
|
|
154
130
|
if (key in exports && exports[key] === _Table[key]) return;
|
|
@@ -159,9 +135,7 @@ Object.keys(_Table).forEach(function (key) {
|
|
|
159
135
|
}
|
|
160
136
|
});
|
|
161
137
|
});
|
|
162
|
-
|
|
163
138
|
var _Tooltip = require("./Tooltip");
|
|
164
|
-
|
|
165
139
|
Object.keys(_Tooltip).forEach(function (key) {
|
|
166
140
|
if (key === "default" || key === "__esModule") return;
|
|
167
141
|
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.js"],"sourcesContent":["export * from './Button';\nexport * from './Calendar';\nexport * from './Form';\nexport * from './InputDate';\nexport * from './InputNumber';\nexport * from './InputOption';\nexport * from './InputSelect';\nexport * from './InputText';\nexport * from './Menu';\nexport * from './Modal';\nexport * from './Notification';\nexport * from './Table';\nexport * from './Tooltip';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.js"],"sourcesContent":["export * from './Button';\nexport * from './Calendar';\nexport * from './Form';\nexport * from './InputDate';\nexport * from './InputNumber';\nexport * from './InputOption';\nexport * from './InputSelect';\nexport * from './InputText';\nexport * from './Menu';\nexport * from './Modal';\nexport * from './Notification';\nexport * from './Table';\nexport * from './Tooltip';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getIconState = void 0;
|
|
7
|
-
|
|
8
7
|
var _primitives = require("../primitives");
|
|
9
|
-
|
|
10
8
|
var getIconState = function getIconState() {
|
|
11
9
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
error = _ref.error,
|
|
11
|
+
success = _ref.success,
|
|
12
|
+
warning = _ref.warning;
|
|
16
13
|
return error ? _primitives.ICON.ERROR : warning ? _primitives.ICON.WARNING : success ? _primitives.ICON.SUCCESS : _primitives.ICON.INFO;
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
exports.getIconState = getIconState;
|
|
20
16
|
//# sourceMappingURL=getIconState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIconState.js","names":["getIconState","error","success","warning","ICON","ERROR","WARNING","SUCCESS","INFO"],"sources":["../../src/helpers/getIconState.js"],"sourcesContent":["import { ICON } from '../primitives';\n\nexport const getIconState = ({ error, success, warning } = {}) =>\n error ? ICON.ERROR : warning ? ICON.WARNING : success ? ICON.SUCCESS : ICON.INFO;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getIconState.js","names":["getIconState","error","success","warning","ICON","ERROR","WARNING","SUCCESS","INFO"],"sources":["../../src/helpers/getIconState.js"],"sourcesContent":["import { ICON } from '../primitives';\n\nexport const getIconState = ({ error, success, warning } = {}) =>\n error ? ICON.ERROR : warning ? ICON.WARNING : success ? ICON.SUCCESS : ICON.INFO;\n"],"mappings":";;;;;;AAAA;AAEO,IAAMA,YAAY,GAAG,SAAfA,YAAY;EAAA,+EAAkC,CAAC,CAAC;IAA9BC,KAAK,QAALA,KAAK;IAAEC,OAAO,QAAPA,OAAO;IAAEC,OAAO,QAAPA,OAAO;EAAA,OACpDF,KAAK,GAAGG,gBAAI,CAACC,KAAK,GAAGF,OAAO,GAAGC,gBAAI,CAACE,OAAO,GAAGJ,OAAO,GAAGE,gBAAI,CAACG,OAAO,GAAGH,gBAAI,CAACI,IAAI;AAAA;AAAC"}
|
|
@@ -4,24 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getInputDateErrors = void 0;
|
|
7
|
-
|
|
8
7
|
var _locale = require("@mirai/locale");
|
|
9
|
-
|
|
8
|
+
var _splitDate = require("./splitDate");
|
|
10
9
|
var getInputDateErrors = function getInputDateErrors() {
|
|
11
10
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
_ref$format = _ref.format,
|
|
12
|
+
format = _ref$format === void 0 ? _locale.DEFAULT_DATE_FORMAT : _ref$format,
|
|
13
|
+
max = _ref.max,
|
|
14
|
+
min = _ref.min,
|
|
15
|
+
value = _ref.value;
|
|
18
16
|
var errors = {};
|
|
19
|
-
var values = (
|
|
17
|
+
var values = (0, _splitDate.splitDate)(value);
|
|
20
18
|
var filled = true;
|
|
21
|
-
|
|
19
|
+
(0, _splitDate.splitDate)(format).forEach(function (part, index) {
|
|
22
20
|
var _values$index;
|
|
23
|
-
|
|
24
|
-
if (!((_values$index = values[index]) !== null && _values$index !== void 0 && _values$index.length)) filled = false;else if (part.substring(0, 1) === 'Y' && values[index].length !== part.length) filled = false;
|
|
21
|
+
if (!((_values$index = values[index]) !== null && _values$index !== void 0 && _values$index.length) || parseInt(values[index]) === 0) filled = false;
|
|
25
22
|
});
|
|
26
23
|
var date = filled ? (0, _locale.parseDate)(value, format) : undefined;
|
|
27
24
|
if (!date) errors.format = true;
|
|
@@ -29,6 +26,5 @@ var getInputDateErrors = function getInputDateErrors() {
|
|
|
29
26
|
if (date && min && (0, _locale.dateDiff)(date, (0, _locale.parseDate)(min, format)).days > 0) errors.min = true;
|
|
30
27
|
return Object.keys(errors).length > 0 ? errors : undefined;
|
|
31
28
|
};
|
|
32
|
-
|
|
33
29
|
exports.getInputDateErrors = getInputDateErrors;
|
|
34
30
|
//# sourceMappingURL=getInputDateErrors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInputDateErrors.js","names":["getInputDateErrors","format","DEFAULT_DATE_FORMAT","max","min","value","errors","values","
|
|
1
|
+
{"version":3,"file":"getInputDateErrors.js","names":["getInputDateErrors","format","DEFAULT_DATE_FORMAT","max","min","value","errors","values","splitDate","filled","forEach","part","index","length","parseInt","date","parseDate","undefined","dateDiff","days","Object","keys"],"sources":["../../src/helpers/getInputDateErrors.js"],"sourcesContent":["import { DEFAULT_DATE_FORMAT, dateDiff, parseDate } from '@mirai/locale';\n\nimport { splitDate } from './splitDate';\n\nexport const getInputDateErrors = ({ format = DEFAULT_DATE_FORMAT, max, min, value } = {}) => {\n const errors = {};\n const values = splitDate(value);\n let filled = true;\n\n splitDate(format).forEach((part, index) => {\n if (!values[index]?.length || parseInt(values[index]) === 0) filled = false;\n });\n\n const date = filled ? parseDate(value, format) : undefined;\n\n if (!date) errors.format = true;\n if (date && max && dateDiff(date, parseDate(max, format)).days < 0) errors.max = true;\n if (date && min && dateDiff(date, parseDate(min, format)).days > 0) errors.min = true;\n\n return Object.keys(errors).length > 0 ? errors : undefined;\n};\n"],"mappings":";;;;;;AAAA;AAEA;AAEO,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkB,GAA+D;EAAA,+EAAP,CAAC,CAAC;IAAA,mBAApDC,MAAM;IAANA,MAAM,4BAAGC,2BAAmB;IAAEC,GAAG,QAAHA,GAAG;IAAEC,GAAG,QAAHA,GAAG;IAAEC,KAAK,QAALA,KAAK;EAChF,IAAMC,MAAM,GAAG,CAAC,CAAC;EACjB,IAAMC,MAAM,GAAG,IAAAC,oBAAS,EAACH,KAAK,CAAC;EAC/B,IAAII,MAAM,GAAG,IAAI;EAEjB,IAAAD,oBAAS,EAACP,MAAM,CAAC,CAACS,OAAO,CAAC,UAACC,IAAI,EAAEC,KAAK,EAAK;IAAA;IACzC,IAAI,mBAACL,MAAM,CAACK,KAAK,CAAC,0CAAb,cAAeC,MAAM,KAAIC,QAAQ,CAACP,MAAM,CAACK,KAAK,CAAC,CAAC,KAAK,CAAC,EAAEH,MAAM,GAAG,KAAK;EAC7E,CAAC,CAAC;EAEF,IAAMM,IAAI,GAAGN,MAAM,GAAG,IAAAO,iBAAS,EAACX,KAAK,EAAEJ,MAAM,CAAC,GAAGgB,SAAS;EAE1D,IAAI,CAACF,IAAI,EAAET,MAAM,CAACL,MAAM,GAAG,IAAI;EAC/B,IAAIc,IAAI,IAAIZ,GAAG,IAAI,IAAAe,gBAAQ,EAACH,IAAI,EAAE,IAAAC,iBAAS,EAACb,GAAG,EAAEF,MAAM,CAAC,CAAC,CAACkB,IAAI,GAAG,CAAC,EAAEb,MAAM,CAACH,GAAG,GAAG,IAAI;EACrF,IAAIY,IAAI,IAAIX,GAAG,IAAI,IAAAc,gBAAQ,EAACH,IAAI,EAAE,IAAAC,iBAAS,EAACZ,GAAG,EAAEH,MAAM,CAAC,CAAC,CAACkB,IAAI,GAAG,CAAC,EAAEb,MAAM,CAACF,GAAG,GAAG,IAAI;EAErF,OAAOgB,MAAM,CAACC,IAAI,CAACf,MAAM,CAAC,CAACO,MAAM,GAAG,CAAC,GAAGP,MAAM,GAAGW,SAAS;AAC5D,CAAC;AAAC"}
|
|
@@ -1,57 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.getInputErrors = void 0;
|
|
7
|
-
|
|
8
8
|
var _getInputDateErrors = require("./getInputDateErrors");
|
|
9
|
-
|
|
10
9
|
var _isValidDate = require("./isValidDate");
|
|
11
|
-
|
|
12
10
|
var _isValidEmail = require("./isValidEmail");
|
|
13
|
-
|
|
14
11
|
var _isValidPhone = require("./isValidPhone");
|
|
15
|
-
|
|
16
12
|
var _excluded = ["minLength", "regexp", "required", "test", "type", "value"];
|
|
17
|
-
|
|
18
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
|
-
|
|
26
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
27
|
-
|
|
28
20
|
var getInputErrors = function getInputErrors() {
|
|
29
21
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
22
|
+
_ref$minLength = _ref.minLength,
|
|
23
|
+
minLength = _ref$minLength === void 0 ? 0 : _ref$minLength,
|
|
24
|
+
regexp = _ref.regexp,
|
|
25
|
+
required = _ref.required,
|
|
26
|
+
test = _ref.test,
|
|
27
|
+
_ref$type = _ref.type,
|
|
28
|
+
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
29
|
+
_ref$value = _ref.value,
|
|
30
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
31
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var errors = {};
|
|
33
|
+
|
|
34
|
+
// Common
|
|
43
35
|
if (required && (value === undefined || value.length === 0)) errors.required = true;
|
|
44
36
|
if (minLength > 0 && value.length < minLength) errors.minLength = true;
|
|
45
37
|
if (regexp && regexp.exec && regexp.exec(value) === null) errors.regexp = true;
|
|
46
|
-
if (test && !test(value)) errors.test = true;
|
|
47
|
-
|
|
48
|
-
if (type === 'date' && !(0, _isValidDate.isValidDate)(value, others) || type === 'email' && !(0, _isValidEmail.isValidEmail)(value) || type === 'tel' && !(0, _isValidPhone.isValidPhone)(value)) errors.format = true;
|
|
49
|
-
|
|
38
|
+
if (test && !test(value)) errors.test = true;
|
|
39
|
+
// Email, Phone & Date format
|
|
40
|
+
if (type === 'date' && !(0, _isValidDate.isValidDate)(value, others) || type === 'email' && !(0, _isValidEmail.isValidEmail)(value) || type === 'tel' && !(0, _isValidPhone.isValidPhone)(value)) errors.format = true;
|
|
41
|
+
// Custom Inputs
|
|
50
42
|
if (type === 'inputDate') errors = _objectSpread(_objectSpread({}, errors), (0, _getInputDateErrors.getInputDateErrors)(_objectSpread(_objectSpread({}, others), {}, {
|
|
51
43
|
value: value
|
|
52
44
|
})));
|
|
53
45
|
return Object.keys(errors).length > 0 ? errors : undefined;
|
|
54
46
|
};
|
|
55
|
-
|
|
56
47
|
exports.getInputErrors = getInputErrors;
|
|
57
48
|
//# sourceMappingURL=getInputErrors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInputErrors.js","names":["getInputErrors","minLength","regexp","required","test","type","value","others","errors","undefined","length","exec","format","Object","keys"],"sources":["../../src/helpers/getInputErrors.js"],"sourcesContent":["import { getInputDateErrors } from './getInputDateErrors';\nimport { isValidDate } from './isValidDate';\nimport { isValidEmail } from './isValidEmail';\nimport { isValidPhone } from './isValidPhone';\n\nexport const getInputErrors = ({\n minLength = 0,\n regexp,\n required,\n test,\n type = 'text',\n value = '',\n ...others\n} = {}) => {\n let errors = {};\n\n // Common\n if (required && (value === undefined || value.length === 0)) errors.required = true;\n if (minLength > 0 && value.length < minLength) errors.minLength = true;\n if (regexp && regexp.exec && regexp.exec(value) === null) errors.regexp = true;\n if (test && !test(value)) errors.test = true;\n // Email, Phone & Date format\n if (\n (type === 'date' && !isValidDate(value, others)) ||\n (type === 'email' && !isValidEmail(value)) ||\n (type === 'tel' && !isValidPhone(value))\n )\n errors.format = true;\n // Custom Inputs\n if (type === 'inputDate') errors = { ...errors, ...getInputDateErrors({ ...others, value }) };\n\n return Object.keys(errors).length > 0 ? errors : undefined;\n};\n"],"mappings":";;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"getInputErrors.js","names":["getInputErrors","minLength","regexp","required","test","type","value","others","errors","undefined","length","exec","isValidDate","isValidEmail","isValidPhone","format","getInputDateErrors","Object","keys"],"sources":["../../src/helpers/getInputErrors.js"],"sourcesContent":["import { getInputDateErrors } from './getInputDateErrors';\nimport { isValidDate } from './isValidDate';\nimport { isValidEmail } from './isValidEmail';\nimport { isValidPhone } from './isValidPhone';\n\nexport const getInputErrors = ({\n minLength = 0,\n regexp,\n required,\n test,\n type = 'text',\n value = '',\n ...others\n} = {}) => {\n let errors = {};\n\n // Common\n if (required && (value === undefined || value.length === 0)) errors.required = true;\n if (minLength > 0 && value.length < minLength) errors.minLength = true;\n if (regexp && regexp.exec && regexp.exec(value) === null) errors.regexp = true;\n if (test && !test(value)) errors.test = true;\n // Email, Phone & Date format\n if (\n (type === 'date' && !isValidDate(value, others)) ||\n (type === 'email' && !isValidEmail(value)) ||\n (type === 'tel' && !isValidPhone(value))\n )\n errors.format = true;\n // Custom Inputs\n if (type === 'inputDate') errors = { ...errors, ...getInputDateErrors({ ...others, value }) };\n\n return Object.keys(errors).length > 0 ? errors : undefined;\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEvC,IAAMA,cAAc,GAAG,SAAjBA,cAAc,GAQhB;EAAA,+EAAP,CAAC,CAAC;IAAA,sBAPJC,SAAS;IAATA,SAAS,+BAAG,CAAC;IACbC,MAAM,QAANA,MAAM;IACNC,QAAQ,QAARA,QAAQ;IACRC,IAAI,QAAJA,IAAI;IAAA,iBACJC,IAAI;IAAJA,IAAI,0BAAG,MAAM;IAAA,kBACbC,KAAK;IAALA,KAAK,2BAAG,EAAE;IACPC,MAAM;EAET,IAAIC,MAAM,GAAG,CAAC,CAAC;;EAEf;EACA,IAAIL,QAAQ,KAAKG,KAAK,KAAKG,SAAS,IAAIH,KAAK,CAACI,MAAM,KAAK,CAAC,CAAC,EAAEF,MAAM,CAACL,QAAQ,GAAG,IAAI;EACnF,IAAIF,SAAS,GAAG,CAAC,IAAIK,KAAK,CAACI,MAAM,GAAGT,SAAS,EAAEO,MAAM,CAACP,SAAS,GAAG,IAAI;EACtE,IAAIC,MAAM,IAAIA,MAAM,CAACS,IAAI,IAAIT,MAAM,CAACS,IAAI,CAACL,KAAK,CAAC,KAAK,IAAI,EAAEE,MAAM,CAACN,MAAM,GAAG,IAAI;EAC9E,IAAIE,IAAI,IAAI,CAACA,IAAI,CAACE,KAAK,CAAC,EAAEE,MAAM,CAACJ,IAAI,GAAG,IAAI;EAC5C;EACA,IACGC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAAO,wBAAW,EAACN,KAAK,EAAEC,MAAM,CAAC,IAC9CF,IAAI,KAAK,OAAO,IAAI,CAAC,IAAAQ,0BAAY,EAACP,KAAK,CAAE,IACzCD,IAAI,KAAK,KAAK,IAAI,CAAC,IAAAS,0BAAY,EAACR,KAAK,CAAE,EAExCE,MAAM,CAACO,MAAM,GAAG,IAAI;EACtB;EACA,IAAIV,IAAI,KAAK,WAAW,EAAEG,MAAM,mCAAQA,MAAM,GAAK,IAAAQ,sCAAkB,kCAAMT,MAAM;IAAED,KAAK,EAALA;EAAK,GAAG,CAAE;EAE7F,OAAOW,MAAM,CAACC,IAAI,CAACV,MAAM,CAAC,CAACE,MAAM,GAAG,CAAC,GAAGF,MAAM,GAAGC,SAAS;AAC5D,CAAC;AAAC"}
|
package/build/helpers/index.js
CHANGED
|
@@ -3,9 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
6
|
+
var _splitDate = require("./splitDate");
|
|
7
|
+
Object.keys(_splitDate).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _splitDate[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _splitDate[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
7
17
|
var _getIconState = require("./getIconState");
|
|
8
|
-
|
|
9
18
|
Object.keys(_getIconState).forEach(function (key) {
|
|
10
19
|
if (key === "default" || key === "__esModule") return;
|
|
11
20
|
if (key in exports && exports[key] === _getIconState[key]) return;
|
|
@@ -16,9 +25,7 @@ Object.keys(_getIconState).forEach(function (key) {
|
|
|
16
25
|
}
|
|
17
26
|
});
|
|
18
27
|
});
|
|
19
|
-
|
|
20
28
|
var _getInputDateErrors = require("./getInputDateErrors");
|
|
21
|
-
|
|
22
29
|
Object.keys(_getInputDateErrors).forEach(function (key) {
|
|
23
30
|
if (key === "default" || key === "__esModule") return;
|
|
24
31
|
if (key in exports && exports[key] === _getInputDateErrors[key]) return;
|
|
@@ -29,9 +36,7 @@ Object.keys(_getInputDateErrors).forEach(function (key) {
|
|
|
29
36
|
}
|
|
30
37
|
});
|
|
31
38
|
});
|
|
32
|
-
|
|
33
39
|
var _getInputErrors = require("./getInputErrors");
|
|
34
|
-
|
|
35
40
|
Object.keys(_getInputErrors).forEach(function (key) {
|
|
36
41
|
if (key === "default" || key === "__esModule") return;
|
|
37
42
|
if (key in exports && exports[key] === _getInputErrors[key]) return;
|
|
@@ -42,9 +47,7 @@ Object.keys(_getInputErrors).forEach(function (key) {
|
|
|
42
47
|
}
|
|
43
48
|
});
|
|
44
49
|
});
|
|
45
|
-
|
|
46
50
|
var _isJest = require("./isJest");
|
|
47
|
-
|
|
48
51
|
Object.keys(_isJest).forEach(function (key) {
|
|
49
52
|
if (key === "default" || key === "__esModule") return;
|
|
50
53
|
if (key in exports && exports[key] === _isJest[key]) return;
|
|
@@ -55,9 +58,7 @@ Object.keys(_isJest).forEach(function (key) {
|
|
|
55
58
|
}
|
|
56
59
|
});
|
|
57
60
|
});
|
|
58
|
-
|
|
59
61
|
var _styles = require("./styles");
|
|
60
|
-
|
|
61
62
|
Object.keys(_styles).forEach(function (key) {
|
|
62
63
|
if (key === "default" || key === "__esModule") return;
|
|
63
64
|
if (key in exports && exports[key] === _styles[key]) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/helpers/index.js"],"sourcesContent":["export * from './getIconState';\nexport * from './getInputDateErrors';\nexport * from './getInputErrors';\nexport * from './isJest';\nexport * from './styles';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/helpers/index.js"],"sourcesContent":["export * from './splitDate';\nexport * from './getIconState';\nexport * from './getInputDateErrors';\nexport * from './getInputErrors';\nexport * from './isJest';\nexport * from './styles';\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/build/helpers/isJest.js
CHANGED
|
@@ -4,16 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.IS_JEST = void 0;
|
|
7
|
-
|
|
8
7
|
var IS_JEST = function () {
|
|
9
8
|
try {
|
|
10
9
|
var _process, _process$env;
|
|
11
|
-
|
|
12
10
|
return !!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env.JEST_WORKER_ID);
|
|
13
11
|
} catch (_unused) {
|
|
14
12
|
return false;
|
|
15
13
|
}
|
|
16
14
|
}();
|
|
17
|
-
|
|
18
15
|
exports.IS_JEST = IS_JEST;
|
|
19
16
|
//# sourceMappingURL=isJest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isJest.js","names":["IS_JEST","process","env","JEST_WORKER_ID"],"sources":["../../src/helpers/isJest.js"],"sourcesContent":["export const IS_JEST = (() => {\n try {\n return !!process?.env?.JEST_WORKER_ID;\n } catch {\n return false;\n }\n})();\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isJest.js","names":["IS_JEST","process","env","JEST_WORKER_ID"],"sources":["../../src/helpers/isJest.js"],"sourcesContent":["export const IS_JEST = (() => {\n try {\n return !!process?.env?.JEST_WORKER_ID;\n } catch {\n return false;\n }\n})();\n"],"mappings":";;;;;;AAAO,IAAMA,OAAO,GAAI,YAAM;EAC5B,IAAI;IAAA;IACF,OAAO,CAAC,cAACC,OAAO,qDAAP,SAASC,GAAG,yCAAZ,aAAcC,cAAc;EACvC,CAAC,CAAC,gBAAM;IACN,OAAO,KAAK;EACd;AACF,CAAC,EAAG;AAAC"}
|
|
@@ -4,29 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isValidDate = void 0;
|
|
7
|
-
|
|
8
7
|
var _locale = require("@mirai/locale");
|
|
9
|
-
|
|
10
8
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
-
|
|
12
9
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
|
|
14
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
-
|
|
16
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
|
-
|
|
18
12
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
|
-
|
|
20
13
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
-
|
|
22
14
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
23
|
-
|
|
24
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
25
|
-
|
|
26
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
27
|
-
|
|
16
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
28
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
|
-
|
|
30
18
|
var getDateProps = function getDateProps() {
|
|
31
19
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
32
20
|
var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';
|
|
@@ -34,30 +22,24 @@ var getDateProps = function getDateProps() {
|
|
|
34
22
|
return part ? parseInt(part, 10) : undefined;
|
|
35
23
|
});
|
|
36
24
|
};
|
|
37
|
-
|
|
38
25
|
var createDate = function createDate(year, month, day) {
|
|
39
26
|
return (0, _locale.UTC)(new Date(year, month - 1, day, 12, 0, 0));
|
|
40
27
|
};
|
|
41
|
-
|
|
42
28
|
var isValidDate = function isValidDate() {
|
|
43
29
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
44
|
-
|
|
45
30
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
31
|
+
delimiter = _ref.delimiter,
|
|
32
|
+
min = _ref.min,
|
|
33
|
+
max = _ref.max;
|
|
50
34
|
var _getDateProps = getDateProps(value, delimiter),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
_getDateProps2 = _slicedToArray(_getDateProps, 3),
|
|
36
|
+
year = _getDateProps2[0],
|
|
37
|
+
month = _getDateProps2[1],
|
|
38
|
+
day = _getDateProps2[2];
|
|
56
39
|
if (!year || !month || !day) return false;
|
|
57
40
|
var date = createDate(year, month, day);
|
|
58
41
|
var isValid = parseInt(year, 10) === date.getFullYear() && parseInt(month, 10) === date.getMonth() + 1 && parseInt(day, 10) === date.getDate();
|
|
59
42
|
var inRange = true;
|
|
60
|
-
|
|
61
43
|
if (min || max) {
|
|
62
44
|
var minTs = min ? (0, _locale.UTC)(new Date(createDate.apply(void 0, _toConsumableArray(getDateProps(min, delimiter))))) : undefined;
|
|
63
45
|
var maxTs = max ? (0, _locale.UTC)(new Date(createDate.apply(void 0, _toConsumableArray(getDateProps(max, delimiter))))) : undefined;
|
|
@@ -66,9 +48,7 @@ var isValidDate = function isValidDate() {
|
|
|
66
48
|
var inMaxRange = maxTs ? dateTs <= maxTs : true;
|
|
67
49
|
inRange = inMinRange && inMaxRange;
|
|
68
50
|
}
|
|
69
|
-
|
|
70
51
|
return isValid && inRange;
|
|
71
52
|
};
|
|
72
|
-
|
|
73
53
|
exports.isValidDate = isValidDate;
|
|
74
54
|
//# sourceMappingURL=isValidDate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidDate.js","names":["getDateProps","value","delimiter","split","map","part","parseInt","undefined","createDate","year","month","day","Date","isValidDate","min","max","date","isValid","getFullYear","getMonth","getDate","inRange","minTs","maxTs","dateTs","getTime","inMinRange","inMaxRange"],"sources":["../../src/helpers/isValidDate.js"],"sourcesContent":["import { UTC } from '@mirai/locale';\n\nconst getDateProps = (value = '', delimiter = '-') =>\n value.split(delimiter).map((part) => (part ? parseInt(part, 10) : undefined));\n\nconst createDate = (year, month, day) => UTC(new Date(year, month - 1, day, 12, 0, 0));\n\nexport const isValidDate = (value = '', { delimiter, min, max } = {}) => {\n const [year, month, day] = getDateProps(value, delimiter);\n if (!year || !month || !day) return false;\n\n const date = createDate(year, month, day);\n\n const isValid =\n parseInt(year, 10) === date.getFullYear() &&\n parseInt(month, 10) === date.getMonth() + 1 &&\n parseInt(day, 10) === date.getDate();\n\n let inRange = true;\n if (min || max) {\n const minTs = min ? UTC(new Date(createDate(...getDateProps(min, delimiter)))) : undefined;\n const maxTs = max ? UTC(new Date(createDate(...getDateProps(max, delimiter)))) : undefined;\n const dateTs = date.getTime();\n\n const inMinRange = minTs ? dateTs >= minTs : true;\n const inMaxRange = maxTs ? dateTs <= maxTs : true;\n\n inRange = inMinRange && inMaxRange;\n }\n\n return isValid && inRange;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isValidDate.js","names":["getDateProps","value","delimiter","split","map","part","parseInt","undefined","createDate","year","month","day","UTC","Date","isValidDate","min","max","date","isValid","getFullYear","getMonth","getDate","inRange","minTs","maxTs","dateTs","getTime","inMinRange","inMaxRange"],"sources":["../../src/helpers/isValidDate.js"],"sourcesContent":["import { UTC } from '@mirai/locale';\n\nconst getDateProps = (value = '', delimiter = '-') =>\n value.split(delimiter).map((part) => (part ? parseInt(part, 10) : undefined));\n\nconst createDate = (year, month, day) => UTC(new Date(year, month - 1, day, 12, 0, 0));\n\nexport const isValidDate = (value = '', { delimiter, min, max } = {}) => {\n const [year, month, day] = getDateProps(value, delimiter);\n if (!year || !month || !day) return false;\n\n const date = createDate(year, month, day);\n\n const isValid =\n parseInt(year, 10) === date.getFullYear() &&\n parseInt(month, 10) === date.getMonth() + 1 &&\n parseInt(day, 10) === date.getDate();\n\n let inRange = true;\n if (min || max) {\n const minTs = min ? UTC(new Date(createDate(...getDateProps(min, delimiter)))) : undefined;\n const maxTs = max ? UTC(new Date(createDate(...getDateProps(max, delimiter)))) : undefined;\n const dateTs = date.getTime();\n\n const inMinRange = minTs ? dateTs >= minTs : true;\n const inMaxRange = maxTs ? dateTs <= maxTs : true;\n\n inRange = inMinRange && inMaxRange;\n }\n\n return isValid && inRange;\n};\n"],"mappings":";;;;;;AAAA;AAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEpC,IAAMA,YAAY,GAAG,SAAfA,YAAY;EAAA,IAAIC,KAAK,uEAAG,EAAE;EAAA,IAAEC,SAAS,uEAAG,GAAG;EAAA,OAC/CD,KAAK,CAACE,KAAK,CAACD,SAAS,CAAC,CAACE,GAAG,CAAC,UAACC,IAAI;IAAA,OAAMA,IAAI,GAAGC,QAAQ,CAACD,IAAI,EAAE,EAAE,CAAC,GAAGE,SAAS;EAAA,CAAC,CAAC;AAAA;AAE/E,IAAMC,UAAU,GAAG,SAAbA,UAAU,CAAIC,IAAI,EAAEC,KAAK,EAAEC,GAAG;EAAA,OAAK,IAAAC,WAAG,EAAC,IAAIC,IAAI,CAACJ,IAAI,EAAEC,KAAK,GAAG,CAAC,EAAEC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAAA;AAE/E,IAAMG,WAAW,GAAG,SAAdA,WAAW,GAAiD;EAAA,IAA7Cb,KAAK,uEAAG,EAAE;EAAA,+EAA4B,CAAC,CAAC;IAA1BC,SAAS,QAATA,SAAS;IAAEa,GAAG,QAAHA,GAAG;IAAEC,GAAG,QAAHA,GAAG;EAC3D,oBAA2BhB,YAAY,CAACC,KAAK,EAAEC,SAAS,CAAC;IAAA;IAAlDO,IAAI;IAAEC,KAAK;IAAEC,GAAG;EACvB,IAAI,CAACF,IAAI,IAAI,CAACC,KAAK,IAAI,CAACC,GAAG,EAAE,OAAO,KAAK;EAEzC,IAAMM,IAAI,GAAGT,UAAU,CAACC,IAAI,EAAEC,KAAK,EAAEC,GAAG,CAAC;EAEzC,IAAMO,OAAO,GACXZ,QAAQ,CAACG,IAAI,EAAE,EAAE,CAAC,KAAKQ,IAAI,CAACE,WAAW,EAAE,IACzCb,QAAQ,CAACI,KAAK,EAAE,EAAE,CAAC,KAAKO,IAAI,CAACG,QAAQ,EAAE,GAAG,CAAC,IAC3Cd,QAAQ,CAACK,GAAG,EAAE,EAAE,CAAC,KAAKM,IAAI,CAACI,OAAO,EAAE;EAEtC,IAAIC,OAAO,GAAG,IAAI;EAClB,IAAIP,GAAG,IAAIC,GAAG,EAAE;IACd,IAAMO,KAAK,GAAGR,GAAG,GAAG,IAAAH,WAAG,EAAC,IAAIC,IAAI,CAACL,UAAU,kCAAIR,YAAY,CAACe,GAAG,EAAEb,SAAS,CAAC,EAAC,CAAC,CAAC,GAAGK,SAAS;IAC1F,IAAMiB,KAAK,GAAGR,GAAG,GAAG,IAAAJ,WAAG,EAAC,IAAIC,IAAI,CAACL,UAAU,kCAAIR,YAAY,CAACgB,GAAG,EAAEd,SAAS,CAAC,EAAC,CAAC,CAAC,GAAGK,SAAS;IAC1F,IAAMkB,MAAM,GAAGR,IAAI,CAACS,OAAO,EAAE;IAE7B,IAAMC,UAAU,GAAGJ,KAAK,GAAGE,MAAM,IAAIF,KAAK,GAAG,IAAI;IACjD,IAAMK,UAAU,GAAGJ,KAAK,GAAGC,MAAM,IAAID,KAAK,GAAG,IAAI;IAEjDF,OAAO,GAAGK,UAAU,IAAIC,UAAU;EACpC;EAEA,OAAOV,OAAO,IAAII,OAAO;AAC3B,CAAC;AAAC"}
|
|
@@ -10,6 +10,5 @@ var isValidEmail = function isValidEmail() {
|
|
|
10
10
|
var email = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11
11
|
return email !== '' ? REGEXP.test(email) : true;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
13
|
exports.isValidEmail = isValidEmail;
|
|
15
14
|
//# sourceMappingURL=isValidEmail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidEmail.js","names":["REGEXP","isValidEmail","email","test"],"sources":["../../src/helpers/isValidEmail.js"],"sourcesContent":["const REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/; // eslint-disable-line\n\nexport const isValidEmail = (email = '') => (email !== '' ? REGEXP.test(email) : true);\n"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"isValidEmail.js","names":["REGEXP","isValidEmail","email","test"],"sources":["../../src/helpers/isValidEmail.js"],"sourcesContent":["const REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/; // eslint-disable-line\n\nexport const isValidEmail = (email = '') => (email !== '' ? REGEXP.test(email) : true);\n"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG,yJAAyJ,CAAC,CAAC;;AAEnK,IAAMC,YAAY,GAAG,SAAfA,YAAY;EAAA,IAAIC,KAAK,uEAAG,EAAE;EAAA,OAAMA,KAAK,KAAK,EAAE,GAAGF,MAAM,CAACG,IAAI,CAACD,KAAK,CAAC,GAAG,IAAI;AAAA,CAAC;AAAC"}
|
|
@@ -4,22 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isValidPhone = void 0;
|
|
7
|
-
|
|
8
7
|
var isValidPhone = function isValidPhone() {
|
|
9
8
|
var phone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
10
|
-
|
|
11
9
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
_ref$countryCode = _ref.countryCode,
|
|
11
|
+
countryCode = _ref$countryCode === void 0 ? false : _ref$countryCode;
|
|
15
12
|
if (phone === '') return true;
|
|
16
13
|
var minLength = countryCode ? 10 : 8;
|
|
17
|
-
|
|
18
14
|
var _phone$replace = phone.replace(/\D/g, ''),
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
length = _phone$replace.length;
|
|
21
16
|
return length >= minLength && length <= 15;
|
|
22
17
|
};
|
|
23
|
-
|
|
24
18
|
exports.isValidPhone = isValidPhone;
|
|
25
19
|
//# sourceMappingURL=isValidPhone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isValidPhone.js","names":["isValidPhone","phone","countryCode","minLength","replace","length"],"sources":["../../src/helpers/isValidPhone.js"],"sourcesContent":["export const isValidPhone = (phone = '', { countryCode = false } = {}) => {\n if (phone === '') return true;\n const minLength = countryCode ? 10 : 8;\n\n const { length } = phone.replace(/\\D/g, '');\n return length >= minLength && length <= 15;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isValidPhone.js","names":["isValidPhone","phone","countryCode","minLength","replace","length"],"sources":["../../src/helpers/isValidPhone.js"],"sourcesContent":["export const isValidPhone = (phone = '', { countryCode = false } = {}) => {\n if (phone === '') return true;\n const minLength = countryCode ? 10 : 8;\n\n const { length } = phone.replace(/\\D/g, '');\n return length >= minLength && length <= 15;\n};\n"],"mappings":";;;;;;AAAO,IAAMA,YAAY,GAAG,SAAfA,YAAY,GAAiD;EAAA,IAA7CC,KAAK,uEAAG,EAAE;EAAA,+EAA4B,CAAC,CAAC;IAAA,wBAA1BC,WAAW;IAAXA,WAAW,iCAAG,KAAK;EAC5D,IAAID,KAAK,KAAK,EAAE,EAAE,OAAO,IAAI;EAC7B,IAAME,SAAS,GAAGD,WAAW,GAAG,EAAE,GAAG,CAAC;EAEtC,qBAAmBD,KAAK,CAACG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;IAAnCC,MAAM,kBAANA,MAAM;EACd,OAAOA,MAAM,IAAIF,SAAS,IAAIE,MAAM,IAAI,EAAE;AAC5C,CAAC;AAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.splitDate = void 0;
|
|
7
|
+
var DELIMITERS = ['/', '.', '-'];
|
|
8
|
+
var splitDate = function splitDate() {
|
|
9
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
10
|
+
if (typeof value !== 'string') return;
|
|
11
|
+
return value.split(DELIMITERS.find(function (item) {
|
|
12
|
+
return value.includes(item);
|
|
13
|
+
}) || DELIMITERS[0]);
|
|
14
|
+
};
|
|
15
|
+
exports.splitDate = splitDate;
|
|
16
|
+
//# sourceMappingURL=splitDate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitDate.js","names":["DELIMITERS","splitDate","value","split","find","item","includes"],"sources":["../../src/helpers/splitDate.js"],"sourcesContent":["const DELIMITERS = ['/', '.', '-'];\n\nexport const splitDate = (value = '') => {\n if (typeof value !== 'string') return;\n\n return value.split(DELIMITERS.find((item) => value.includes(item)) || DELIMITERS[0]);\n};\n"],"mappings":";;;;;;AAAA,IAAMA,UAAU,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAE3B,IAAMC,SAAS,GAAG,SAAZA,SAAS,GAAmB;EAAA,IAAfC,KAAK,uEAAG,EAAE;EAClC,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;EAE/B,OAAOA,KAAK,CAACC,KAAK,CAACH,UAAU,CAACI,IAAI,CAAC,UAACC,IAAI;IAAA,OAAKH,KAAK,CAACI,QAAQ,CAACD,IAAI,CAAC;EAAA,EAAC,IAAIL,UAAU,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC;AAAC"}
|
package/build/helpers/styles.js
CHANGED
|
@@ -4,18 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.styles = void 0;
|
|
7
|
-
|
|
8
7
|
var styles = function styles() {
|
|
9
8
|
for (var _len = arguments.length, stylesheets = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10
9
|
stylesheets[_key] = arguments[_key];
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return stylesheets.flat(Infinity).filter(function (value) {
|
|
14
12
|
return value !== false;
|
|
15
13
|
}).filter(function (value) {
|
|
16
14
|
return value !== undefined && value !== null;
|
|
17
15
|
}).join(' ').trim();
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
exports.styles = styles;
|
|
21
18
|
//# sourceMappingURL=styles.js.map
|