@innoways/drip-form-theme-antd 8.0.18 → 9.0.0
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/CHANGELOG.md +21 -0
- package/dist/down-arrow.svg +1 -0
- package/dist/index.css +144 -0
- package/dist/index.js +432 -147
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- fixed datepicker field porps issue and style issues 8.0.20
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @innoways/hooks@9.0.0
|
|
13
|
+
- @innoways/utils@9.0.0
|
|
14
|
+
|
|
15
|
+
## 8.0.19
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Date component fix same as gima 8.0.19
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @innoways/hooks@8.0.19
|
|
22
|
+
- @innoways/utils@8.0.19
|
|
23
|
+
|
|
3
24
|
## 8.0.18
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
package/dist/index.css
CHANGED
|
@@ -95,6 +95,150 @@
|
|
|
95
95
|
color: #fff !important;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
.year-1 {
|
|
99
|
+
display: block !important;
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 34px;
|
|
102
|
+
right: 78px;
|
|
103
|
+
background-color: #fff;
|
|
104
|
+
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
|
|
105
|
+
border: 0.8px solid #ddd;
|
|
106
|
+
border-radius: 5px;
|
|
107
|
+
z-index: 9999;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.year-picker-list {
|
|
111
|
+
height: 258px;
|
|
112
|
+
padding: 0 6px;
|
|
113
|
+
overflow: auto;
|
|
114
|
+
margin-bottom: 5px;
|
|
115
|
+
margin-top: 5px;
|
|
116
|
+
list-style-type: none;
|
|
117
|
+
scrollbar-width: thin;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.year-picker-list li.selected {
|
|
121
|
+
background-color: var(
|
|
122
|
+
--ant-primary-color
|
|
123
|
+
); /* Change the background color of the selected year here */
|
|
124
|
+
color: #fff;
|
|
125
|
+
width: 100%;
|
|
126
|
+
padding: 0 5px;
|
|
127
|
+
border-radius: 20px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.year-picker-list li {
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
padding: 1px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.select_year {
|
|
136
|
+
border: none;
|
|
137
|
+
outline: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.numInputWrapper .icon-box {
|
|
141
|
+
background: url(./down-arrow.svg);
|
|
142
|
+
background-size: 16px 16px !important;
|
|
143
|
+
background-repeat: no-repeat !important;
|
|
144
|
+
cursor: pointer !important;
|
|
145
|
+
position: absolute;
|
|
146
|
+
width: 16px;
|
|
147
|
+
height: 16px;
|
|
148
|
+
top: 4px;
|
|
149
|
+
right: 0px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.numInputWrapper .icon-box.active {
|
|
153
|
+
background: url(./down-arrow.svg);
|
|
154
|
+
background-size: 16px 16px !important;
|
|
155
|
+
background-repeat: no-repeat !important;
|
|
156
|
+
cursor: pointer !important;
|
|
157
|
+
position: absolute;
|
|
158
|
+
width: 16px;
|
|
159
|
+
height: 16px;
|
|
160
|
+
top: 4px;
|
|
161
|
+
right: -17px;
|
|
162
|
+
transform: scaleX(1) scaleY(1);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.flatpickr-calendar.animate.active {
|
|
166
|
+
top: 1616.09px !important;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.icon-box::before {
|
|
170
|
+
content: '';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.numInputWrapper span {
|
|
174
|
+
opacity: 1 !important;
|
|
175
|
+
border: none !important;
|
|
176
|
+
}
|
|
177
|
+
.numInputWrapper span:hover {
|
|
178
|
+
background-color: none;
|
|
179
|
+
background: url(./down-arrow.svg);
|
|
180
|
+
background-size: 16px 16px !important;
|
|
181
|
+
background-repeat: no-repeat !important;
|
|
182
|
+
cursor: pointer !important;
|
|
183
|
+
position: absolute;
|
|
184
|
+
width: 16px;
|
|
185
|
+
height: 16px;
|
|
186
|
+
top: 4px;
|
|
187
|
+
right: 0px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (max-width: 768px) {
|
|
191
|
+
/* .flatpickr-calendar.animate.active {
|
|
192
|
+
top: 2100.09px !important
|
|
193
|
+
} */
|
|
194
|
+
|
|
195
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months span,
|
|
196
|
+
.flatpickr-current-month .numInputWrapper span {
|
|
197
|
+
display: block;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* date picker */
|
|
202
|
+
.custom-year-picker {
|
|
203
|
+
position: absolute;
|
|
204
|
+
top: -57px;
|
|
205
|
+
left: 0;
|
|
206
|
+
padding: 10px;
|
|
207
|
+
background-color: #fff;
|
|
208
|
+
border: 1px solid #ccc;
|
|
209
|
+
z-index: 9999;
|
|
210
|
+
display: block;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.custom-year-picker .year-option {
|
|
214
|
+
display: inline-block;
|
|
215
|
+
margin: 5px;
|
|
216
|
+
cursor: pointer;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.custom-year-display {
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.year-option:hover {
|
|
225
|
+
background: #ddd;
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.year-arrow {
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.custom-year-display .year-arrow {
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.flatpickr-current-month {
|
|
238
|
+
display: flex !important;
|
|
239
|
+
justify-content: center !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
98
242
|
.drip-form--colorpicker {
|
|
99
243
|
display: flex;
|
|
100
244
|
}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import 'antd/es/input/style';
|
|
5
5
|
import _Input from 'antd/es/input';
|
|
6
|
-
import React, { useState, memo, useEffect, useMemo, useCallback } from 'react';
|
|
6
|
+
import React, { useState, memo, useEffect, useMemo, useRef, useCallback } from 'react';
|
|
7
7
|
import { useField, useCountryStateCityOptions, usePrevious, useQuery, useEventCallback } from '@innoways/hooks';
|
|
8
8
|
import 'antd/es/modal/style';
|
|
9
9
|
import _Modal from 'antd/es/modal';
|
|
@@ -36,7 +36,7 @@ import 'antd/es/input-number/style';
|
|
|
36
36
|
import _InputNumber from 'antd/es/input-number';
|
|
37
37
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
38
38
|
import * as Icon from 'react-feather';
|
|
39
|
-
import { Edit, Delete, Search } from 'react-feather';
|
|
39
|
+
import { X, Edit, Delete, Search } from 'react-feather';
|
|
40
40
|
import 'antd/es/switch/style';
|
|
41
41
|
import _Switch from 'antd/es/switch';
|
|
42
42
|
import 'antd/es/slider/style';
|
|
@@ -45,7 +45,6 @@ import 'antd/es/time-picker/style';
|
|
|
45
45
|
import _TimePicker from 'antd/es/time-picker';
|
|
46
46
|
import moment from 'moment';
|
|
47
47
|
import locale from 'antd/es/date-picker/locale/en_US';
|
|
48
|
-
import _typeof from '@babel/runtime/helpers/typeof';
|
|
49
48
|
import 'antd/es/date-picker/style';
|
|
50
49
|
import _DatePicker from 'antd/es/date-picker';
|
|
51
50
|
import Flatpickr from 'react-flatpickr';
|
|
@@ -56,6 +55,7 @@ import _Checkbox from 'antd/es/checkbox';
|
|
|
56
55
|
import 'antd/es/upload/style';
|
|
57
56
|
import _Upload from 'antd/es/upload';
|
|
58
57
|
import { useImmer } from 'use-immer';
|
|
58
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
59
59
|
import 'antd/es/cascader/style';
|
|
60
60
|
import _Cascader from 'antd/es/cascader';
|
|
61
61
|
import 'antd/es/transfer/style';
|
|
@@ -63,9 +63,9 @@ import _Transfer from 'antd/es/transfer';
|
|
|
63
63
|
import 'antd/es/tree-select/style';
|
|
64
64
|
import _TreeSelect from 'antd/es/tree-select';
|
|
65
65
|
|
|
66
|
-
function ownKeys$
|
|
66
|
+
function ownKeys$h(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; }
|
|
67
67
|
|
|
68
|
-
function _objectSpread$
|
|
68
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
69
69
|
var searchTypes = [{
|
|
70
70
|
label: 'Google',
|
|
71
71
|
value: 'WGS84'
|
|
@@ -130,7 +130,7 @@ function GpsModal(_ref) {
|
|
|
130
130
|
form = _Form$useForm2[0];
|
|
131
131
|
|
|
132
132
|
var handleGpsDataChange = function handleGpsDataChange(value, name) {
|
|
133
|
-
setGpsData(_objectSpread$
|
|
133
|
+
setGpsData(_objectSpread$h(_objectSpread$h({}, gpsData), {}, _defineProperty({}, name, value)));
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
var handleResult = function handleResult(result1, type, addressFg) {
|
|
@@ -596,9 +596,9 @@ var config$l = {
|
|
|
596
596
|
|
|
597
597
|
var _excluded$m = ["multiline", "disabled", "onChange", "fieldData", "fieldKey", "dispatch", "disabled_input", "style", "asyncValidate", "getKey", "formMode", "autoSize", "type", "globalState", "searchUrl"];
|
|
598
598
|
|
|
599
|
-
function ownKeys$
|
|
599
|
+
function ownKeys$g(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; }
|
|
600
600
|
|
|
601
|
-
function _objectSpread$
|
|
601
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
602
602
|
_Input.TextArea;
|
|
603
603
|
|
|
604
604
|
var PlaceAutoCompleteField = function PlaceAutoCompleteField(_ref) {
|
|
@@ -619,7 +619,7 @@ var PlaceAutoCompleteField = function PlaceAutoCompleteField(_ref) {
|
|
|
619
619
|
searchUrl = _ref.searchUrl,
|
|
620
620
|
restProps = _objectWithoutProperties(_ref, _excluded$m);
|
|
621
621
|
|
|
622
|
-
var _onChange = useField(_objectSpread$
|
|
622
|
+
var _onChange = useField(_objectSpread$g({
|
|
623
623
|
fieldKey: fieldKey,
|
|
624
624
|
onChange: onChange,
|
|
625
625
|
asyncValidate: asyncValidate,
|
|
@@ -632,7 +632,7 @@ var PlaceAutoCompleteField = function PlaceAutoCompleteField(_ref) {
|
|
|
632
632
|
}), dispatch);
|
|
633
633
|
|
|
634
634
|
var handleIsGPSModalOpen = function handleIsGPSModalOpen(toggle) {
|
|
635
|
-
globalState.setGlobalState(_objectSpread$
|
|
635
|
+
globalState.setGlobalState(_objectSpread$g(_objectSpread$g({}, globalState), {}, {
|
|
636
636
|
webModalForPlaceAutoCompleteField: toggle ? fieldKey : null
|
|
637
637
|
}));
|
|
638
638
|
};
|
|
@@ -749,9 +749,9 @@ var config$k = {
|
|
|
749
749
|
|
|
750
750
|
var _excluded$l = ["multiline", "disabled", "onChange", "fieldData", "fieldKey", "dispatch", "disabled_input", "style", "asyncValidate", "getKey", "formMode", "autoSize", "type"];
|
|
751
751
|
|
|
752
|
-
function ownKeys$
|
|
752
|
+
function ownKeys$f(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; }
|
|
753
753
|
|
|
754
|
-
function _objectSpread$
|
|
754
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
755
755
|
var TextArea$1 = _Input.TextArea;
|
|
756
756
|
|
|
757
757
|
var TextField = function TextField(_ref) {
|
|
@@ -783,7 +783,7 @@ var TextField = function TextField(_ref) {
|
|
|
783
783
|
updatedType = _useState4[0],
|
|
784
784
|
setUpdatedType = _useState4[1];
|
|
785
785
|
|
|
786
|
-
var _onChange = useField(_objectSpread$
|
|
786
|
+
var _onChange = useField(_objectSpread$f({
|
|
787
787
|
fieldKey: fieldKey,
|
|
788
788
|
onChange: onChange,
|
|
789
789
|
asyncValidate: asyncValidate,
|
|
@@ -1865,9 +1865,9 @@ var config$j = {
|
|
|
1865
1865
|
var _excluded$k = ["fieldKey", "fieldData", "dispatch", "options", "buttonStyle", "onChange", "asyncValidate", "getKey", "formMode", "renderType", "style"],
|
|
1866
1866
|
_excluded2$2 = ["value", "label", "description"];
|
|
1867
1867
|
|
|
1868
|
-
function ownKeys$
|
|
1868
|
+
function ownKeys$e(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; }
|
|
1869
1869
|
|
|
1870
|
-
function _objectSpread$
|
|
1870
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1871
1871
|
var TextArea = _Input.TextArea;
|
|
1872
1872
|
|
|
1873
1873
|
var RadioField = function RadioField(_ref) {
|
|
@@ -1915,7 +1915,7 @@ var RadioField = function RadioField(_ref) {
|
|
|
1915
1915
|
}
|
|
1916
1916
|
|
|
1917
1917
|
var handleRadioTextChange = function handleRadioTextChange(value, key) {
|
|
1918
|
-
_onChange(_objectSpread$
|
|
1918
|
+
_onChange(_objectSpread$e(_objectSpread$e({}, fieldData), {}, _defineProperty({}, key, value)));
|
|
1919
1919
|
};
|
|
1920
1920
|
|
|
1921
1921
|
var renderRadioField = function renderRadioField() {
|
|
@@ -1933,7 +1933,7 @@ var RadioField = function RadioField(_ref) {
|
|
|
1933
1933
|
onChange: function onChange(e) {
|
|
1934
1934
|
return renderType === 'radioNumber' ? handleRadioTextChange(e.target.value, 'radio') : _onChange(e);
|
|
1935
1935
|
},
|
|
1936
|
-
style: _objectSpread$
|
|
1936
|
+
style: _objectSpread$e(_objectSpread$e({}, style), {}, {
|
|
1937
1937
|
width: renderType === 'radioNumber' ? '30%' : style === null || style === void 0 ? void 0 : style.width
|
|
1938
1938
|
})
|
|
1939
1939
|
}), options.map(function (item, idx) {
|
|
@@ -1955,7 +1955,7 @@ var RadioField = function RadioField(_ref) {
|
|
|
1955
1955
|
return handleRadioTextChange(e.target.value, 'text');
|
|
1956
1956
|
},
|
|
1957
1957
|
value: fieldData.text,
|
|
1958
|
-
style: _objectSpread$
|
|
1958
|
+
style: _objectSpread$e(_objectSpread$e({}, style), {}, {
|
|
1959
1959
|
margin: '0 10px 0 10px',
|
|
1960
1960
|
width: '34%',
|
|
1961
1961
|
minWidth: '300px'
|
|
@@ -19355,9 +19355,9 @@ var config$i = {
|
|
|
19355
19355
|
|
|
19356
19356
|
var _excluded$i = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "style", "asyncValidate", "getKey", "formMode", "renderType"];
|
|
19357
19357
|
|
|
19358
|
-
function ownKeys$
|
|
19358
|
+
function ownKeys$d(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; }
|
|
19359
19359
|
|
|
19360
|
-
function _objectSpread$
|
|
19360
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19361
19361
|
|
|
19362
19362
|
var NumberField = function NumberField(_ref) {
|
|
19363
19363
|
var disabled = _ref.disabled,
|
|
@@ -19391,7 +19391,7 @@ var NumberField = function NumberField(_ref) {
|
|
|
19391
19391
|
}, dispatch);
|
|
19392
19392
|
|
|
19393
19393
|
var onPhoneCodeChange = function onPhoneCodeChange(key, value) {
|
|
19394
|
-
setNumbers(_objectSpread$
|
|
19394
|
+
setNumbers(_objectSpread$d(_objectSpread$d({}, numbers), {}, _defineProperty({}, key, value)));
|
|
19395
19395
|
};
|
|
19396
19396
|
|
|
19397
19397
|
useEffect(function () {
|
|
@@ -19449,7 +19449,7 @@ var NumberField = function NumberField(_ref) {
|
|
|
19449
19449
|
return onPhoneCodeChange('country_id', e);
|
|
19450
19450
|
},
|
|
19451
19451
|
value: numbers.country_id,
|
|
19452
|
-
style: _objectSpread$
|
|
19452
|
+
style: _objectSpread$d(_objectSpread$d({}, style), {}, {
|
|
19453
19453
|
width: '20%',
|
|
19454
19454
|
marginRight: '5px'
|
|
19455
19455
|
})
|
|
@@ -19459,7 +19459,7 @@ var NumberField = function NumberField(_ref) {
|
|
|
19459
19459
|
return onPhoneCodeChange('city_id', e);
|
|
19460
19460
|
},
|
|
19461
19461
|
value: numbers.city_id,
|
|
19462
|
-
style: _objectSpread$
|
|
19462
|
+
style: _objectSpread$d(_objectSpread$d({}, style), {}, {
|
|
19463
19463
|
width: '20%',
|
|
19464
19464
|
marginRight: '5px'
|
|
19465
19465
|
})
|
|
@@ -19469,7 +19469,7 @@ var NumberField = function NumberField(_ref) {
|
|
|
19469
19469
|
return onPhoneCodeChange('phone', e);
|
|
19470
19470
|
},
|
|
19471
19471
|
value: numbers.phone,
|
|
19472
|
-
style: _objectSpread$
|
|
19472
|
+
style: _objectSpread$d(_objectSpread$d({}, style), {}, {
|
|
19473
19473
|
width: '60%'
|
|
19474
19474
|
})
|
|
19475
19475
|
}, restProps)));
|
|
@@ -19909,9 +19909,9 @@ var config$h = {
|
|
|
19909
19909
|
|
|
19910
19910
|
var _excluded$h = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "multiple", "options", "allowClear", "queryFunc", "asyncValidate", "requestCache", "style", "getKey", "queryConfigCountry", "token"];
|
|
19911
19911
|
|
|
19912
|
-
function ownKeys$
|
|
19912
|
+
function ownKeys$c(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; }
|
|
19913
19913
|
|
|
19914
|
-
function _objectSpread$
|
|
19914
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19915
19915
|
|
|
19916
19916
|
var SelectField$5 = function SelectField(_ref) {
|
|
19917
19917
|
var disabled = _ref.disabled,
|
|
@@ -19932,7 +19932,7 @@ var SelectField$5 = function SelectField(_ref) {
|
|
|
19932
19932
|
token = _ref$token === void 0 ? '' : _ref$token,
|
|
19933
19933
|
restProps = _objectWithoutProperties(_ref, _excluded$h);
|
|
19934
19934
|
|
|
19935
|
-
var _useCountryStateCityO = useCountryStateCityOptions(fieldData || '', _objectSpread$
|
|
19935
|
+
var _useCountryStateCityO = useCountryStateCityOptions(fieldData || '', _objectSpread$c(_objectSpread$c({}, queryConfigCountry), {}, {
|
|
19936
19936
|
token: token
|
|
19937
19937
|
})),
|
|
19938
19938
|
_useCountryStateCityO2 = _useCountryStateCityO.countryOption,
|
|
@@ -20095,9 +20095,9 @@ var config$g = {
|
|
|
20095
20095
|
|
|
20096
20096
|
var _excluded$g = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "multiple", "options", "allowClear", "queryFunc", "asyncValidate", "requestCache", "style", "getKey", "queryConfig", "queryConfigState", "formData", "token"];
|
|
20097
20097
|
|
|
20098
|
-
function ownKeys$
|
|
20098
|
+
function ownKeys$b(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; }
|
|
20099
20099
|
|
|
20100
|
-
function _objectSpread$
|
|
20100
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$b(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$b(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20101
20101
|
|
|
20102
20102
|
var SelectField$4 = function SelectField(_ref) {
|
|
20103
20103
|
var disabled = _ref.disabled,
|
|
@@ -20125,7 +20125,7 @@ var SelectField$4 = function SelectField(_ref) {
|
|
|
20125
20125
|
var _useCountryStateCityO = useCountryStateCityOptions({
|
|
20126
20126
|
country: queryConfig !== null && queryConfig !== void 0 && queryConfig.country ? formData[queryConfig.country] : '',
|
|
20127
20127
|
state: fieldData
|
|
20128
|
-
}, null, _objectSpread$
|
|
20128
|
+
}, null, _objectSpread$b(_objectSpread$b({}, queryConfigState), {}, {
|
|
20129
20129
|
token: token
|
|
20130
20130
|
})),
|
|
20131
20131
|
_useCountryStateCityO2 = _useCountryStateCityO.stateOption,
|
|
@@ -20316,9 +20316,9 @@ var config$f = {
|
|
|
20316
20316
|
|
|
20317
20317
|
var _excluded$f = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "multiple", "options", "allowClear", "queryFunc", "asyncValidate", "requestCache", "style", "getKey", "queryConfigState", "queryConfigCity", "queryConfig", "formData", "token"];
|
|
20318
20318
|
|
|
20319
|
-
function ownKeys$
|
|
20319
|
+
function ownKeys$a(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; }
|
|
20320
20320
|
|
|
20321
|
-
function _objectSpread$
|
|
20321
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$a(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20322
20322
|
|
|
20323
20323
|
var SelectField$3 = function SelectField(_ref) {
|
|
20324
20324
|
var disabled = _ref.disabled,
|
|
@@ -20347,9 +20347,9 @@ var SelectField$3 = function SelectField(_ref) {
|
|
|
20347
20347
|
var _useCountryStateCityO = useCountryStateCityOptions({
|
|
20348
20348
|
state: queryConfig !== null && queryConfig !== void 0 && queryConfig.state ? formData[queryConfig.state] : '',
|
|
20349
20349
|
city: fieldData
|
|
20350
|
-
}, null, _objectSpread$
|
|
20350
|
+
}, null, _objectSpread$a(_objectSpread$a({}, queryConfigState), {}, {
|
|
20351
20351
|
token: token
|
|
20352
|
-
}), _objectSpread$
|
|
20352
|
+
}), _objectSpread$a(_objectSpread$a({}, queryConfigCity), {}, {
|
|
20353
20353
|
token: token
|
|
20354
20354
|
})),
|
|
20355
20355
|
_useCountryStateCityO2 = _useCountryStateCityO.cityOption,
|
|
@@ -20527,9 +20527,9 @@ var config$e = {
|
|
|
20527
20527
|
|
|
20528
20528
|
var _excluded$e = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "multiple", "options", "allowClear", "queryFunc", "asyncValidate", "requestCache", "style", "getKey", "queryConfigCountry", "queryConfigCity", "queryConfig", "formData", "token"];
|
|
20529
20529
|
|
|
20530
|
-
function ownKeys$
|
|
20530
|
+
function ownKeys$9(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; }
|
|
20531
20531
|
|
|
20532
|
-
function _objectSpread$
|
|
20532
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$9(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20533
20533
|
|
|
20534
20534
|
var SelectField$2 = function SelectField(_ref) {
|
|
20535
20535
|
var disabled = _ref.disabled,
|
|
@@ -20558,9 +20558,9 @@ var SelectField$2 = function SelectField(_ref) {
|
|
|
20558
20558
|
var _useCountryStateCityO = useCountryStateCityOptions({
|
|
20559
20559
|
country: queryConfig !== null && queryConfig !== void 0 && queryConfig.country ? formData[queryConfig.country] : '',
|
|
20560
20560
|
city: fieldData
|
|
20561
|
-
}, _objectSpread$
|
|
20561
|
+
}, _objectSpread$9(_objectSpread$9({}, queryConfigCountry), {}, {
|
|
20562
20562
|
token: token
|
|
20563
|
-
}), null, _objectSpread$
|
|
20563
|
+
}), null, _objectSpread$9(_objectSpread$9({}, queryConfigCity), {}, {
|
|
20564
20564
|
token: token
|
|
20565
20565
|
})),
|
|
20566
20566
|
_useCountryStateCityO2 = _useCountryStateCityO.cityOption,
|
|
@@ -20646,9 +20646,9 @@ var getIconComponent = function getIconComponent(iconName) {
|
|
|
20646
20646
|
|
|
20647
20647
|
var _excluded$d = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "multiple", "options", "allowClear", "queryFunc", "asyncValidate", "requestCache", "style", "getKey", "renderType", "queryConfig", "renderOptionAsChildren"];
|
|
20648
20648
|
|
|
20649
|
-
function ownKeys$
|
|
20649
|
+
function ownKeys$8(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; }
|
|
20650
20650
|
|
|
20651
|
-
function _objectSpread$
|
|
20651
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$8(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20652
20652
|
var Option = _Select.Option;
|
|
20653
20653
|
|
|
20654
20654
|
var SelectField$1 = function SelectField(props) {
|
|
@@ -20711,7 +20711,7 @@ var SelectField$1 = function SelectField(props) {
|
|
|
20711
20711
|
}, dispatch);
|
|
20712
20712
|
|
|
20713
20713
|
var handleSelectNumberChange = function handleSelectNumberChange(value, key) {
|
|
20714
|
-
_onChange(_objectSpread$
|
|
20714
|
+
_onChange(_objectSpread$8(_objectSpread$8({}, fieldData), {}, _defineProperty({}, key, value)));
|
|
20715
20715
|
}; // 不管单选多选,均可搜索
|
|
20716
20716
|
|
|
20717
20717
|
|
|
@@ -20732,7 +20732,7 @@ var SelectField$1 = function SelectField(props) {
|
|
|
20732
20732
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
20733
20733
|
|
|
20734
20734
|
if (width) {
|
|
20735
|
-
style = _objectSpread$
|
|
20735
|
+
style = _objectSpread$8(_objectSpread$8({}, style), {}, {
|
|
20736
20736
|
width: width
|
|
20737
20737
|
});
|
|
20738
20738
|
}
|
|
@@ -20777,7 +20777,7 @@ var SelectField$1 = function SelectField(props) {
|
|
|
20777
20777
|
}, renderSelect(function (e) {
|
|
20778
20778
|
return handleSelectNumberChange(e, 'select1');
|
|
20779
20779
|
}, fieldData.select1, '50%', options), /*#__PURE__*/React.createElement(_InputNumber, {
|
|
20780
|
-
style: _objectSpread$
|
|
20780
|
+
style: _objectSpread$8(_objectSpread$8({
|
|
20781
20781
|
marginLeft: '10px'
|
|
20782
20782
|
}, style), {}, {
|
|
20783
20783
|
width: '50%'
|
|
@@ -20801,7 +20801,7 @@ var SelectField$1 = function SelectField(props) {
|
|
|
20801
20801
|
}, renderSelect(function (e) {
|
|
20802
20802
|
return handleSelectNumberChange(e, 'select1');
|
|
20803
20803
|
}, fieldData.select1, '33%', options), /*#__PURE__*/React.createElement(_InputNumber, {
|
|
20804
|
-
style: _objectSpread$
|
|
20804
|
+
style: _objectSpread$8(_objectSpread$8({}, style), {}, {
|
|
20805
20805
|
margin: '0 10px 0 10px',
|
|
20806
20806
|
width: '34%'
|
|
20807
20807
|
}),
|
|
@@ -20961,48 +20961,48 @@ var config$d = {
|
|
|
20961
20961
|
}
|
|
20962
20962
|
};
|
|
20963
20963
|
|
|
20964
|
-
function ownKeys$
|
|
20964
|
+
function ownKeys$7(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; }
|
|
20965
20965
|
|
|
20966
|
-
function _objectSpread$
|
|
20966
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20967
20967
|
|
|
20968
20968
|
var SelectField = function SelectField(props) {
|
|
20969
20969
|
var queryConfig = props.queryConfig;
|
|
20970
20970
|
|
|
20971
20971
|
if ((queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.optionsType) === 'country') {
|
|
20972
|
-
return /*#__PURE__*/React.createElement(select$5, _objectSpread$
|
|
20973
|
-
queryConfigCountry: _objectSpread$
|
|
20972
|
+
return /*#__PURE__*/React.createElement(select$5, _objectSpread$7(_objectSpread$7(_objectSpread$7({}, props), config$h.unitedSchema.ui), props.queryConfig.url ? {
|
|
20973
|
+
queryConfigCountry: _objectSpread$7(_objectSpread$7({}, config$h.unitedSchema.ui.queryConfigCountry), {}, {
|
|
20974
20974
|
url: props.queryConfig.url
|
|
20975
20975
|
})
|
|
20976
20976
|
} : {}));
|
|
20977
20977
|
}
|
|
20978
20978
|
|
|
20979
20979
|
if ((queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.optionsType) === 'state') {
|
|
20980
|
-
return /*#__PURE__*/React.createElement(select$4, _objectSpread$
|
|
20981
|
-
queryConfigState: _objectSpread$
|
|
20980
|
+
return /*#__PURE__*/React.createElement(select$4, _objectSpread$7(_objectSpread$7(_objectSpread$7({}, props), config$g.unitedSchema.ui), props.queryConfig.url ? {
|
|
20981
|
+
queryConfigState: _objectSpread$7(_objectSpread$7({}, config$g.unitedSchema.ui.queryConfigState), {}, {
|
|
20982
20982
|
url: props.queryConfig.url
|
|
20983
20983
|
})
|
|
20984
20984
|
} : {}));
|
|
20985
20985
|
}
|
|
20986
20986
|
|
|
20987
20987
|
if ((queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.optionsType) === 'city' && (queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.operationMethod) === 'stateCity') {
|
|
20988
|
-
return /*#__PURE__*/React.createElement(select$3, _objectSpread$
|
|
20989
|
-
queryConfigState: _objectSpread$
|
|
20988
|
+
return /*#__PURE__*/React.createElement(select$3, _objectSpread$7(_objectSpread$7(_objectSpread$7(_objectSpread$7({}, props), config$f.unitedSchema.ui), props.queryConfig.url ? {
|
|
20989
|
+
queryConfigState: _objectSpread$7(_objectSpread$7({}, config$f.unitedSchema.ui.queryConfigState), {}, {
|
|
20990
20990
|
url: props.queryConfig.url
|
|
20991
20991
|
})
|
|
20992
20992
|
} : {}), props.queryConfig.url ? {
|
|
20993
|
-
queryConfigCity: _objectSpread$
|
|
20993
|
+
queryConfigCity: _objectSpread$7(_objectSpread$7({}, config$f.unitedSchema.ui.queryConfigCity), {}, {
|
|
20994
20994
|
url: props.queryConfig.url
|
|
20995
20995
|
})
|
|
20996
20996
|
} : {}));
|
|
20997
20997
|
}
|
|
20998
20998
|
|
|
20999
20999
|
if ((queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.optionsType) === 'city' && (queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.operationMethod) === 'countryCity') {
|
|
21000
|
-
return /*#__PURE__*/React.createElement(select$2, _objectSpread$
|
|
21001
|
-
queryConfigCountry: _objectSpread$
|
|
21000
|
+
return /*#__PURE__*/React.createElement(select$2, _objectSpread$7(_objectSpread$7(_objectSpread$7(_objectSpread$7({}, props), config$e.unitedSchema.ui), props.queryConfig.url ? {
|
|
21001
|
+
queryConfigCountry: _objectSpread$7(_objectSpread$7({}, config$e.unitedSchema.ui.queryConfigCountry), {}, {
|
|
21002
21002
|
url: props.queryConfig.url
|
|
21003
21003
|
})
|
|
21004
21004
|
} : {}), props.queryConfig.url ? {
|
|
21005
|
-
queryConfigCity: _objectSpread$
|
|
21005
|
+
queryConfigCity: _objectSpread$7(_objectSpread$7({}, config$e.unitedSchema.ui.queryConfigCity), {}, {
|
|
21006
21006
|
url: props.queryConfig.url
|
|
21007
21007
|
})
|
|
21008
21008
|
} : {}));
|
|
@@ -21198,9 +21198,9 @@ var config$c = {
|
|
|
21198
21198
|
}
|
|
21199
21199
|
};
|
|
21200
21200
|
|
|
21201
|
-
function ownKeys$
|
|
21201
|
+
function ownKeys$6(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; }
|
|
21202
21202
|
|
|
21203
|
-
function _objectSpread$
|
|
21203
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$6(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21204
21204
|
var commonStyle = {
|
|
21205
21205
|
height: 40,
|
|
21206
21206
|
lineHeight: '40px',
|
|
@@ -21209,17 +21209,17 @@ var commonStyle = {
|
|
|
21209
21209
|
};
|
|
21210
21210
|
var styleTypeMap = {
|
|
21211
21211
|
none: null,
|
|
21212
|
-
success: _objectSpread$
|
|
21212
|
+
success: _objectSpread$6({
|
|
21213
21213
|
backgroundColor: '#F6FFED'
|
|
21214
21214
|
}, commonStyle),
|
|
21215
|
-
error: _objectSpread$
|
|
21215
|
+
error: _objectSpread$6({
|
|
21216
21216
|
backgroundColor: '#FFF2F0'
|
|
21217
21217
|
}, commonStyle),
|
|
21218
|
-
warning: _objectSpread$
|
|
21218
|
+
warning: _objectSpread$6({
|
|
21219
21219
|
backgroundColor: '#fff7e1',
|
|
21220
21220
|
color: '#feb00e'
|
|
21221
21221
|
}, commonStyle),
|
|
21222
|
-
info: _objectSpread$
|
|
21222
|
+
info: _objectSpread$6({
|
|
21223
21223
|
backgroundColor: '#E6F7FF'
|
|
21224
21224
|
}, commonStyle)
|
|
21225
21225
|
};
|
|
@@ -21237,7 +21237,7 @@ var NullField = function NullField(_ref) {
|
|
|
21237
21237
|
|
|
21238
21238
|
if (renderType === 'divider') {
|
|
21239
21239
|
return /*#__PURE__*/React.createElement("div", {
|
|
21240
|
-
style: _objectSpread$
|
|
21240
|
+
style: _objectSpread$6({
|
|
21241
21241
|
height: '1px',
|
|
21242
21242
|
border: 'none',
|
|
21243
21243
|
backgroundColor: 'grey'
|
|
@@ -21253,7 +21253,7 @@ var NullField = function NullField(_ref) {
|
|
|
21253
21253
|
|
|
21254
21254
|
headings.push( /*#__PURE__*/React.createElement("div", {
|
|
21255
21255
|
key: i,
|
|
21256
|
-
style: _objectSpread$
|
|
21256
|
+
style: _objectSpread$6(_objectSpread$6(_objectSpread$6({
|
|
21257
21257
|
wordBreak: 'break-all'
|
|
21258
21258
|
}, style), styleTypeMap[styleType]), {}, {
|
|
21259
21259
|
width: columnsWidth
|
|
@@ -21899,8 +21899,314 @@ var TimePickerField = function TimePickerField(_ref) {
|
|
|
21899
21899
|
|
|
21900
21900
|
var timePicker = /*#__PURE__*/memo(TimePickerField);
|
|
21901
21901
|
|
|
21902
|
+
function ownKeys$5(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; }
|
|
21903
|
+
|
|
21904
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$5(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21905
|
+
|
|
21906
|
+
var StyledFlatPicker = function StyledFlatPicker(props) {
|
|
21907
|
+
var value = props.value,
|
|
21908
|
+
_onChange = props.onChange,
|
|
21909
|
+
options = props.options,
|
|
21910
|
+
className = props.className,
|
|
21911
|
+
themeColor = props.themeColor,
|
|
21912
|
+
disabled = props.disabled,
|
|
21913
|
+
style = props.style,
|
|
21914
|
+
_props$allowClear = props.allowClear,
|
|
21915
|
+
allowClear = _props$allowClear === void 0 ? true : _props$allowClear;
|
|
21916
|
+
|
|
21917
|
+
var _useState = useState(Date.now()),
|
|
21918
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21919
|
+
key = _useState2[0],
|
|
21920
|
+
setKey = _useState2[1]; // Key to force remount
|
|
21921
|
+
|
|
21922
|
+
|
|
21923
|
+
var _useState3 = useState(!isEmpty(value)),
|
|
21924
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21925
|
+
showClear = _useState4[0],
|
|
21926
|
+
setShowClear = _useState4[1];
|
|
21927
|
+
|
|
21928
|
+
var fp = useRef(null);
|
|
21929
|
+
React.useEffect(function () {
|
|
21930
|
+
setShowClear(!isEmpty(value));
|
|
21931
|
+
}, [value]); // Force re-render when options change (especially enableTime)
|
|
21932
|
+
|
|
21933
|
+
React.useEffect(function () {
|
|
21934
|
+
setKey(Date.now());
|
|
21935
|
+
}, [options === null || options === void 0 ? void 0 : options.enableTime, options === null || options === void 0 ? void 0 : options.altFormat, options === null || options === void 0 ? void 0 : options.dateFormat]);
|
|
21936
|
+
|
|
21937
|
+
var dateFieldStyle = _objectSpread$5(_objectSpread$5({}, style), {}, {
|
|
21938
|
+
borderColor: themeColor
|
|
21939
|
+
});
|
|
21940
|
+
|
|
21941
|
+
var clearDatePicker = function clearDatePicker(e) {
|
|
21942
|
+
var _fp$current;
|
|
21943
|
+
|
|
21944
|
+
e.stopPropagation();
|
|
21945
|
+
e.preventDefault();
|
|
21946
|
+
setShowClear(false);
|
|
21947
|
+
|
|
21948
|
+
_onChange([], true);
|
|
21949
|
+
|
|
21950
|
+
if ((_fp$current = fp.current) !== null && _fp$current !== void 0 && _fp$current.flatpickr) {
|
|
21951
|
+
fp.current.flatpickr.clear();
|
|
21952
|
+
}
|
|
21953
|
+
};
|
|
21954
|
+
|
|
21955
|
+
var loadMonths = function loadMonths(instance, year) {
|
|
21956
|
+
if (options !== null && options !== void 0 && options.minDate || options !== null && options !== void 0 && options.maxDate) {
|
|
21957
|
+
var monthList = instance.l10n.months.longhand; // international all months list
|
|
21958
|
+
|
|
21959
|
+
var minDate = options !== null && options !== void 0 && options.minDate ? new Date(options.minDate) : null;
|
|
21960
|
+
var maxDate = options !== null && options !== void 0 && options.maxDate ? new Date(options.maxDate) : null;
|
|
21961
|
+
var _value = instance.latestSelectedDateObj; // get selected date on calendar
|
|
21962
|
+
|
|
21963
|
+
/**
|
|
21964
|
+
* Resets the month dropdown options based on the selected year.
|
|
21965
|
+
* @param {Array<string>} monthListParam - The list of month names.
|
|
21966
|
+
* @param {number} [selectedMonth] - The index of the initially selected month.
|
|
21967
|
+
*/
|
|
21968
|
+
|
|
21969
|
+
var setMonthList = function setMonthList(monthListParam) {
|
|
21970
|
+
var _instance$calendarCon;
|
|
21971
|
+
|
|
21972
|
+
var selectedMonth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
21973
|
+
var monthsDropdown = instance === null || instance === void 0 ? void 0 : (_instance$calendarCon = instance.calendarContainer) === null || _instance$calendarCon === void 0 ? void 0 : _instance$calendarCon.querySelector('.flatpickr-monthDropdown-months');
|
|
21974
|
+
|
|
21975
|
+
if (monthsDropdown) {
|
|
21976
|
+
monthsDropdown.id = 'month-dropdown';
|
|
21977
|
+
}
|
|
21978
|
+
|
|
21979
|
+
var flag = selectedMonth || 0;
|
|
21980
|
+
monthListParam.forEach(function (monthName, monthIndex) {
|
|
21981
|
+
var option = document.createElement('option');
|
|
21982
|
+
option.value = String(selectedMonth ? flag : monthIndex);
|
|
21983
|
+
option.textContent = monthName;
|
|
21984
|
+
option.selected = selectedMonth === monthIndex || (_value === null || _value === void 0 ? void 0 : _value.getMonth()) === monthIndex;
|
|
21985
|
+
option.tabIndex = monthsDropdown === null || monthsDropdown === void 0 ? void 0 : monthsDropdown.tabIndex;
|
|
21986
|
+
option.classList.add('flatpickr-monthDropdown-month');
|
|
21987
|
+
|
|
21988
|
+
if (monthIndex === 0) {
|
|
21989
|
+
monthsDropdown.replaceChildren(option); // first time replace all old months
|
|
21990
|
+
} else {
|
|
21991
|
+
monthsDropdown.appendChild(option); // append rest of the months
|
|
21992
|
+
}
|
|
21993
|
+
|
|
21994
|
+
if (selectedMonth) flag = flag + 1;
|
|
21995
|
+
});
|
|
21996
|
+
}; // Handle minDate constraint
|
|
21997
|
+
|
|
21998
|
+
|
|
21999
|
+
if (minDate && year === minDate.getFullYear()) {
|
|
22000
|
+
monthList = monthList.slice(minDate.getMonth());
|
|
22001
|
+
setMonthList(monthList, minDate.getMonth());
|
|
22002
|
+
} // Handle maxDate constraint
|
|
22003
|
+
else if (maxDate && year === maxDate.getFullYear()) {
|
|
22004
|
+
monthList = monthList.slice(0, maxDate.getMonth() + 1);
|
|
22005
|
+
setMonthList(monthList, 0);
|
|
22006
|
+
} // No constraint for this year
|
|
22007
|
+
else {
|
|
22008
|
+
setMonthList(monthList);
|
|
22009
|
+
}
|
|
22010
|
+
}
|
|
22011
|
+
};
|
|
22012
|
+
|
|
22013
|
+
var createYearItem = function createYearItem(instance, list, year, isSelected) {
|
|
22014
|
+
var listItem = document.createElement('li');
|
|
22015
|
+
listItem.textContent = String(year); // Check if year is disabled by minDate or maxDate
|
|
22016
|
+
|
|
22017
|
+
var minDate = options !== null && options !== void 0 && options.minDate ? new Date(options.minDate) : null;
|
|
22018
|
+
var maxDate = options !== null && options !== void 0 && options.maxDate ? new Date(options.maxDate) : null;
|
|
22019
|
+
var isDisabled = minDate && year < minDate.getFullYear() || maxDate && year > maxDate.getFullYear();
|
|
22020
|
+
|
|
22021
|
+
if (isDisabled) {
|
|
22022
|
+
listItem.style.opacity = '0.4';
|
|
22023
|
+
listItem.style.cursor = 'not-allowed';
|
|
22024
|
+
listItem.style.pointerEvents = 'none';
|
|
22025
|
+
}
|
|
22026
|
+
|
|
22027
|
+
if (isSelected) {
|
|
22028
|
+
listItem.classList.add('selected');
|
|
22029
|
+
var color = themeColor || 'var(--ant-primary-color)';
|
|
22030
|
+
listItem.style.setProperty('background-color', color, 'important');
|
|
22031
|
+
}
|
|
22032
|
+
|
|
22033
|
+
if (!isDisabled) {
|
|
22034
|
+
listItem.addEventListener('click', function () {
|
|
22035
|
+
var _instance$calendarCon2;
|
|
22036
|
+
|
|
22037
|
+
loadMonths(instance, year);
|
|
22038
|
+
fp.current.flatpickr.setDate(new Date(parseInt(this.textContent || '0'), 0, 1), true);
|
|
22039
|
+
list.querySelectorAll('li').forEach(function (item) {
|
|
22040
|
+
item.classList.remove('selected');
|
|
22041
|
+
item.style.removeProperty('background-color');
|
|
22042
|
+
});
|
|
22043
|
+
this.classList.add('selected');
|
|
22044
|
+
var color = themeColor || 'var(--ant-primary-color)';
|
|
22045
|
+
this.style.setProperty('background-color', color, 'important');
|
|
22046
|
+
list.innerHTML = '';
|
|
22047
|
+
loadYears(instance, list);
|
|
22048
|
+
(_instance$calendarCon2 = instance.calendarContainer.querySelector('.year-1')) === null || _instance$calendarCon2 === void 0 ? void 0 : _instance$calendarCon2.remove();
|
|
22049
|
+
});
|
|
22050
|
+
}
|
|
22051
|
+
|
|
22052
|
+
return listItem;
|
|
22053
|
+
};
|
|
22054
|
+
|
|
22055
|
+
function loadYears(instance, list) {
|
|
22056
|
+
var currentYear = instance.currentYear;
|
|
22057
|
+
var startYear = Math.floor(currentYear / 10) * 10 - 1;
|
|
22058
|
+
var endYear = startYear + 11;
|
|
22059
|
+
|
|
22060
|
+
for (var year = startYear; year <= endYear; year++) {
|
|
22061
|
+
list.appendChild(createYearItem(instance, list, year, year === currentYear));
|
|
22062
|
+
}
|
|
22063
|
+
}
|
|
22064
|
+
|
|
22065
|
+
function prependPreviousYears(instance, list) {
|
|
22066
|
+
var _list$firstElementChi;
|
|
22067
|
+
|
|
22068
|
+
var firstYear = parseInt(((_list$firstElementChi = list.firstElementChild) === null || _list$firstElementChi === void 0 ? void 0 : _list$firstElementChi.textContent) || '0');
|
|
22069
|
+
var startYear = firstYear - 10;
|
|
22070
|
+
var endYear = startYear + 11;
|
|
22071
|
+
|
|
22072
|
+
for (var year = endYear; year >= startYear; year--) {
|
|
22073
|
+
list.insertBefore(createYearItem(instance, list, year, false), list.firstElementChild);
|
|
22074
|
+
}
|
|
22075
|
+
|
|
22076
|
+
list.scrollTop = 240;
|
|
22077
|
+
}
|
|
22078
|
+
|
|
22079
|
+
function appendNextYears(instance, list) {
|
|
22080
|
+
var _list$lastElementChil;
|
|
22081
|
+
|
|
22082
|
+
var lastYear = parseInt(((_list$lastElementChil = list.lastElementChild) === null || _list$lastElementChil === void 0 ? void 0 : _list$lastElementChil.textContent) || '0');
|
|
22083
|
+
var startYear = lastYear + 1;
|
|
22084
|
+
var endYear = startYear + 11;
|
|
22085
|
+
|
|
22086
|
+
for (var year = startYear; year <= endYear; year++) {
|
|
22087
|
+
list.appendChild(createYearItem(instance, list, year, false));
|
|
22088
|
+
}
|
|
22089
|
+
}
|
|
22090
|
+
|
|
22091
|
+
function openYearPicker(instance) {
|
|
22092
|
+
var _instance$calendarCon3;
|
|
22093
|
+
|
|
22094
|
+
var yearPicker = document.createElement('div');
|
|
22095
|
+
yearPicker.classList.add('year-1');
|
|
22096
|
+
var list = document.createElement('ul');
|
|
22097
|
+
list.classList.add('year-picker-list');
|
|
22098
|
+
list.addEventListener('scroll', function () {
|
|
22099
|
+
if (list.scrollTop < 10) {
|
|
22100
|
+
prependPreviousYears(instance, list);
|
|
22101
|
+
} else if (list.scrollHeight - list.scrollTop <= list.clientHeight + 1) {
|
|
22102
|
+
appendNextYears(instance, list);
|
|
22103
|
+
}
|
|
22104
|
+
});
|
|
22105
|
+
yearPicker.appendChild(list);
|
|
22106
|
+
loadYears(instance, list);
|
|
22107
|
+
(_instance$calendarCon3 = instance.calendarContainer.querySelector('.year-1')) === null || _instance$calendarCon3 === void 0 ? void 0 : _instance$calendarCon3.remove();
|
|
22108
|
+
instance.calendarContainer.appendChild(yearPicker);
|
|
22109
|
+
list.scrollTop = 240;
|
|
22110
|
+
}
|
|
22111
|
+
|
|
22112
|
+
var toggleYearPicker = function toggleYearPicker(instance, e) {
|
|
22113
|
+
e.stopPropagation();
|
|
22114
|
+
var isOpen = instance.calendarContainer.querySelector('.year-1');
|
|
22115
|
+
instance.calendarContainer.querySelector('.icon-box');
|
|
22116
|
+
|
|
22117
|
+
if (isOpen) {
|
|
22118
|
+
isOpen.remove();
|
|
22119
|
+
} else {
|
|
22120
|
+
openYearPicker(instance);
|
|
22121
|
+
}
|
|
22122
|
+
};
|
|
22123
|
+
|
|
22124
|
+
var flatpickrOptions = _objectSpread$5(_objectSpread$5({}, options), {}, {
|
|
22125
|
+
onReady: function onReady(selectedDates, dateStr, instance) {
|
|
22126
|
+
if (!(instance !== null && instance !== void 0 && instance.calendarContainer)) return;
|
|
22127
|
+
var yearInput = instance.calendarContainer.querySelector('.cur-year');
|
|
22128
|
+
var numInputWrapper = instance.calendarContainer.querySelector('.numInputWrapper');
|
|
22129
|
+
var monthsDropdown = instance.calendarContainer.querySelector('.flatpickr-monthDropdown-months'); // Add id to month dropdown
|
|
22130
|
+
|
|
22131
|
+
if (monthsDropdown) {
|
|
22132
|
+
monthsDropdown.id = 'month-dropdown';
|
|
22133
|
+
}
|
|
22134
|
+
|
|
22135
|
+
if (yearInput && numInputWrapper) {
|
|
22136
|
+
var _numInputWrapper$quer, _numInputWrapper$quer2;
|
|
22137
|
+
|
|
22138
|
+
// Hide default arrows
|
|
22139
|
+
(_numInputWrapper$quer = numInputWrapper.querySelector('.arrowUp')) === null || _numInputWrapper$quer === void 0 ? void 0 : _numInputWrapper$quer.style.setProperty('display', 'none');
|
|
22140
|
+
(_numInputWrapper$quer2 = numInputWrapper.querySelector('.arrowDown')) === null || _numInputWrapper$quer2 === void 0 ? void 0 : _numInputWrapper$quer2.style.setProperty('display', 'none'); // Create dropdown arrow with CSS class
|
|
22141
|
+
|
|
22142
|
+
var dropdownArrow = document.createElement('span');
|
|
22143
|
+
dropdownArrow.className = 'icon-box';
|
|
22144
|
+
dropdownArrow.addEventListener('click', function (e) {
|
|
22145
|
+
return toggleYearPicker(instance, e);
|
|
22146
|
+
}); // Make year input readonly and clickable
|
|
22147
|
+
|
|
22148
|
+
var yearInputElement = yearInput;
|
|
22149
|
+
yearInputElement.id = 'year-input';
|
|
22150
|
+
yearInputElement.readOnly = true;
|
|
22151
|
+
yearInputElement.style.cursor = 'pointer';
|
|
22152
|
+
yearInput.addEventListener('click', function (e) {
|
|
22153
|
+
return toggleYearPicker(instance, e);
|
|
22154
|
+
});
|
|
22155
|
+
numInputWrapper.appendChild(dropdownArrow);
|
|
22156
|
+
}
|
|
22157
|
+
},
|
|
22158
|
+
onYearChange: function onYearChange() {
|
|
22159
|
+
var currentYearPicker = document.querySelector('.year-1');
|
|
22160
|
+
|
|
22161
|
+
if (currentYearPicker) {
|
|
22162
|
+
currentYearPicker.remove();
|
|
22163
|
+
}
|
|
22164
|
+
}
|
|
22165
|
+
});
|
|
22166
|
+
|
|
22167
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22168
|
+
className: "rounded custom-date-picker",
|
|
22169
|
+
style: _objectSpread$5(_objectSpread$5({}, dateFieldStyle), {}, {
|
|
22170
|
+
position: 'relative'
|
|
22171
|
+
})
|
|
22172
|
+
}, /*#__PURE__*/React.createElement(Flatpickr, {
|
|
22173
|
+
key: key,
|
|
22174
|
+
ref: fp,
|
|
22175
|
+
value: value,
|
|
22176
|
+
onChange: function onChange(selectedDates) {
|
|
22177
|
+
return _onChange(selectedDates);
|
|
22178
|
+
},
|
|
22179
|
+
options: flatpickrOptions,
|
|
22180
|
+
disabled: disabled,
|
|
22181
|
+
className: "".concat(className ? className : '', " form-control flat-date-picker")
|
|
22182
|
+
}), allowClear && showClear && /*#__PURE__*/React.createElement(X, {
|
|
22183
|
+
type: "button",
|
|
22184
|
+
className: "cross-padding",
|
|
22185
|
+
onClick: clearDatePicker,
|
|
22186
|
+
style: {
|
|
22187
|
+
cursor: 'pointer',
|
|
22188
|
+
color: '#999',
|
|
22189
|
+
width: '20px',
|
|
22190
|
+
height: '20px',
|
|
22191
|
+
position: 'absolute',
|
|
22192
|
+
right: '10px',
|
|
22193
|
+
top: '50%',
|
|
22194
|
+
transform: 'translateY(-50%)'
|
|
22195
|
+
}
|
|
22196
|
+
}));
|
|
22197
|
+
};
|
|
22198
|
+
|
|
22199
|
+
StyledFlatPicker.propTypes = {
|
|
22200
|
+
value: _pt.any,
|
|
22201
|
+
onChange: _pt.func.isRequired,
|
|
22202
|
+
className: _pt.string,
|
|
22203
|
+
themeColor: _pt.string,
|
|
22204
|
+
disabled: _pt.bool,
|
|
22205
|
+
allowClear: _pt.bool
|
|
22206
|
+
};
|
|
22207
|
+
|
|
21902
22208
|
var formatList = {
|
|
21903
|
-
date: '
|
|
22209
|
+
date: 'DD-MMM-YYYY HH:mm:ss',
|
|
21904
22210
|
week: 'YYYY-wo',
|
|
21905
22211
|
month: 'YYYY-MM',
|
|
21906
22212
|
quarter: 'YYYY-quarter',
|
|
@@ -21916,7 +22222,7 @@ var changeShowTime = function changeShowTime(_ref) {
|
|
|
21916
22222
|
dispatch({
|
|
21917
22223
|
type: 'setUi',
|
|
21918
22224
|
action: {
|
|
21919
|
-
set: (_set = {}, _defineProperty(_set, getKey('ui.default', 'uiSchema') + '.showTime', val), _defineProperty(_set, getKey('ui.default', 'uiSchema') + '.format', val ? '
|
|
22225
|
+
set: (_set = {}, _defineProperty(_set, getKey('ui.default', 'uiSchema') + '.showTime', val), _defineProperty(_set, getKey('ui.default', 'uiSchema') + '.format', val ? 'DD-MMM-YYYY HH:mm:ss' : 'DD-MMM-YYYY'), _defineProperty(_set, getKey('ui.default__range.0', 'uiSchema') + '.showTime', val), _defineProperty(_set, getKey('ui.default__range.1', 'uiSchema') + '.showTime', val), _defineProperty(_set, getKey('ui.default__range.0', 'uiSchema') + '.format', val ? 'DD-MMM-YYYY HH:mm:ss' : 'DD-MMM-YYYY'), _defineProperty(_set, getKey('ui.default__range.1', 'uiSchema') + '.format', val ? 'DD-MMM-YYYY HH:mm:ss' : 'DD-MMM-YYYY'), _set)
|
|
21920
22226
|
}
|
|
21921
22227
|
});
|
|
21922
22228
|
dispatch({
|
|
@@ -21931,7 +22237,7 @@ var changeShowTime = function changeShowTime(_ref) {
|
|
|
21931
22237
|
set: {
|
|
21932
22238
|
'ui.default': '',
|
|
21933
22239
|
'ui.default__range': [],
|
|
21934
|
-
'ui.format': val ? '
|
|
22240
|
+
'ui.format': val ? 'DD-MMM-YYYY HH:mm:ss' : 'DD-MMM-YYYY'
|
|
21935
22241
|
}
|
|
21936
22242
|
}
|
|
21937
22243
|
});
|
|
@@ -21979,7 +22285,11 @@ var config$8 = {
|
|
|
21979
22285
|
title: 'Date Selection Box',
|
|
21980
22286
|
ui: {
|
|
21981
22287
|
type: 'datePicker',
|
|
21982
|
-
showTime:
|
|
22288
|
+
showTime: false,
|
|
22289
|
+
allowClear: true,
|
|
22290
|
+
picker: 'date',
|
|
22291
|
+
format: 'DD-MMM-YYYY',
|
|
22292
|
+
flatpickrFormat: 'd-M-Y',
|
|
21983
22293
|
theme: 'antd',
|
|
21984
22294
|
style: {
|
|
21985
22295
|
width: '100%'
|
|
@@ -22033,7 +22343,7 @@ var config$8 = {
|
|
|
22033
22343
|
fieldKey: 'showTime',
|
|
22034
22344
|
type: 'boolean',
|
|
22035
22345
|
title: 'Is the time selection function enabled',
|
|
22036
|
-
"default":
|
|
22346
|
+
"default": false,
|
|
22037
22347
|
ui: {
|
|
22038
22348
|
type: 'switch',
|
|
22039
22349
|
onChange: changeShowTime,
|
|
@@ -22147,16 +22457,20 @@ var config$8 = {
|
|
|
22147
22457
|
fieldKey: 'format',
|
|
22148
22458
|
type: 'string',
|
|
22149
22459
|
title: 'Time format',
|
|
22150
|
-
"default": '
|
|
22460
|
+
"default": 'DD-MMM-YYYY',
|
|
22151
22461
|
ui: {
|
|
22152
22462
|
type: 'text',
|
|
22153
|
-
placeholder: '
|
|
22463
|
+
placeholder: 'DD-MMM-YYYY'
|
|
22154
22464
|
}
|
|
22155
22465
|
}]
|
|
22156
22466
|
}
|
|
22157
22467
|
};
|
|
22158
22468
|
|
|
22159
|
-
var _excluded$9 = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "style", "range", "format", "picker", "asyncValidate", "showTime", "getKey", "formMode", "showCurrentDate"];
|
|
22469
|
+
var _excluded$9 = ["disabled", "onChange", "fieldData", "fieldKey", "dispatch", "style", "range", "format", "flatpickrFormat", "picker", "asyncValidate", "showTime", "allowClear", "getKey", "formMode", "showCurrentDate", "themeColor", "options"];
|
|
22470
|
+
|
|
22471
|
+
function ownKeys$4(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; }
|
|
22472
|
+
|
|
22473
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$4(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22160
22474
|
_DatePicker.RangePicker;
|
|
22161
22475
|
|
|
22162
22476
|
var DatePickerField = function DatePickerField(_ref) {
|
|
@@ -22164,18 +22478,25 @@ var DatePickerField = function DatePickerField(_ref) {
|
|
|
22164
22478
|
onChange = _ref.onChange,
|
|
22165
22479
|
fieldData = _ref.fieldData,
|
|
22166
22480
|
fieldKey = _ref.fieldKey,
|
|
22167
|
-
dispatch = _ref.dispatch
|
|
22168
|
-
_ref.style
|
|
22169
|
-
|
|
22481
|
+
dispatch = _ref.dispatch,
|
|
22482
|
+
style = _ref.style,
|
|
22483
|
+
range = _ref.range,
|
|
22170
22484
|
_ref$format = _ref.format,
|
|
22171
|
-
format = _ref$format === void 0 ? '
|
|
22485
|
+
format = _ref$format === void 0 ? 'DD-MMM-YYYY' : _ref$format,
|
|
22486
|
+
_ref$flatpickrFormat = _ref.flatpickrFormat,
|
|
22487
|
+
flatpickrFormat = _ref$flatpickrFormat === void 0 ? 'd-M-Y' : _ref$flatpickrFormat;
|
|
22172
22488
|
_ref.picker;
|
|
22173
22489
|
var asyncValidate = _ref.asyncValidate,
|
|
22174
|
-
showTime = _ref.showTime,
|
|
22490
|
+
_ref$showTime = _ref.showTime,
|
|
22491
|
+
showTime = _ref$showTime === void 0 ? false : _ref$showTime,
|
|
22492
|
+
_ref$allowClear = _ref.allowClear,
|
|
22493
|
+
allowClear = _ref$allowClear === void 0 ? true : _ref$allowClear,
|
|
22175
22494
|
getKey = _ref.getKey,
|
|
22176
22495
|
formMode = _ref.formMode;
|
|
22177
22496
|
_ref.showCurrentDate;
|
|
22178
|
-
var
|
|
22497
|
+
var themeColor = _ref.themeColor,
|
|
22498
|
+
options = _ref.options;
|
|
22499
|
+
_objectWithoutProperties(_ref, _excluded$9);
|
|
22179
22500
|
|
|
22180
22501
|
/**
|
|
22181
22502
|
* 暂时不支持的DatePicker功能
|
|
@@ -22219,86 +22540,47 @@ var DatePickerField = function DatePickerField(_ref) {
|
|
|
22219
22540
|
if (formMode === 'view') return fieldData ? typeCheck(fieldData) === 'Array' ? fieldData.map(function (item) {
|
|
22220
22541
|
return moment(item).format(format);
|
|
22221
22542
|
}).join(' ~ ') : moment(fieldData).format(format) : null;
|
|
22222
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, range ? /*#__PURE__*/React.createElement(
|
|
22543
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, range ? /*#__PURE__*/React.createElement(StyledFlatPicker, {
|
|
22223
22544
|
id: "range-picker",
|
|
22224
22545
|
className: "form-control border-0",
|
|
22225
22546
|
value: fieldData ? [fieldData[0], fieldData[1]] : [],
|
|
22226
|
-
onChange:
|
|
22227
|
-
|
|
22547
|
+
onChange: function onChange(date, isCleared) {
|
|
22548
|
+
if (isCleared) {
|
|
22549
|
+
_onChange(null);
|
|
22550
|
+
} else {
|
|
22551
|
+
_onChange(date);
|
|
22552
|
+
}
|
|
22553
|
+
},
|
|
22554
|
+
themeColor: themeColor,
|
|
22555
|
+
style: style,
|
|
22556
|
+
allowClear: allowClear,
|
|
22557
|
+
options: _objectSpread$4({
|
|
22228
22558
|
mode: 'range',
|
|
22229
22559
|
allowInput: true
|
|
22230
|
-
}
|
|
22231
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
22232
|
-
type: "date",
|
|
22560
|
+
}, options)
|
|
22561
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledFlatPicker, {
|
|
22233
22562
|
disabled: disabled,
|
|
22234
|
-
value: fieldData ? [
|
|
22235
|
-
onChange: function onChange(date) {
|
|
22236
|
-
if (
|
|
22237
|
-
_onChange(
|
|
22238
|
-
} else {
|
|
22239
|
-
_onChange(
|
|
22563
|
+
value: fieldData ? [typeof fieldData === 'string' ? moment(fieldData, format).toDate() : moment(fieldData).toDate()] : [],
|
|
22564
|
+
onChange: function onChange(date, isCleared) {
|
|
22565
|
+
if (isCleared) {
|
|
22566
|
+
_onChange(null);
|
|
22567
|
+
} else if (date.length) {
|
|
22568
|
+
_onChange(moment(date[0]).format(format));
|
|
22240
22569
|
}
|
|
22241
22570
|
},
|
|
22242
22571
|
id: "default-picker",
|
|
22243
|
-
|
|
22244
|
-
|
|
22572
|
+
themeColor: themeColor,
|
|
22573
|
+
style: style,
|
|
22574
|
+
allowClear: allowClear,
|
|
22575
|
+
options: _objectSpread$4({
|
|
22576
|
+
enableTime: showTime,
|
|
22245
22577
|
altInput: true,
|
|
22246
22578
|
allowInput: false,
|
|
22247
|
-
altFormat:
|
|
22248
|
-
dateFormat:
|
|
22579
|
+
altFormat: showTime ? flatpickrFormat + ' H:i' : flatpickrFormat,
|
|
22580
|
+
dateFormat: showTime ? 'Y-m-d H:i' : 'Y-m-d',
|
|
22249
22581
|
altInputClass: disabled ? 'drip_date_picker_input_disabled' : 'drip_date_picker_input'
|
|
22250
|
-
}
|
|
22251
|
-
}
|
|
22252
|
-
// <RangePicker
|
|
22253
|
-
// picker={picker}
|
|
22254
|
-
// disabled={disabled}
|
|
22255
|
-
// {...(isValid
|
|
22256
|
-
// ? {
|
|
22257
|
-
// value: fieldData
|
|
22258
|
-
// ? [moment(fieldData[0], format), moment(fieldData[1], format)]
|
|
22259
|
-
// : undefined,
|
|
22260
|
-
// }
|
|
22261
|
-
// : null)}
|
|
22262
|
-
// onChange={_onChange}
|
|
22263
|
-
// format={format}
|
|
22264
|
-
// locale={locale}
|
|
22265
|
-
// showTime={
|
|
22266
|
-
// typeof showTime === 'object'
|
|
22267
|
-
// ? {
|
|
22268
|
-
// ...showTime,
|
|
22269
|
-
// defaultValue: [
|
|
22270
|
-
// moment(showTime.defaultValue, showTime.format),
|
|
22271
|
-
// moment(showTime.defaultValue, showTime.format),
|
|
22272
|
-
// ],
|
|
22273
|
-
// }
|
|
22274
|
-
// : showTime
|
|
22275
|
-
// }
|
|
22276
|
-
// {...restProps}
|
|
22277
|
-
// />
|
|
22278
|
-
// ) : (
|
|
22279
|
-
// <DatePicker
|
|
22280
|
-
// picker={picker}
|
|
22281
|
-
// {...(isValid
|
|
22282
|
-
// ? {
|
|
22283
|
-
// value: fieldData ? moment(fieldData) : null,
|
|
22284
|
-
// }
|
|
22285
|
-
// : null)}
|
|
22286
|
-
// format={format}
|
|
22287
|
-
// disabled={disabled}
|
|
22288
|
-
// onChange={_onChange}
|
|
22289
|
-
// locale={locale}
|
|
22290
|
-
// style={style}
|
|
22291
|
-
// showTime={
|
|
22292
|
-
// typeof showTime === 'object'
|
|
22293
|
-
// ? {
|
|
22294
|
-
// ...showTime,
|
|
22295
|
-
// defaultValue: moment(showTime.defaultValue, showTime.format),
|
|
22296
|
-
// }
|
|
22297
|
-
// : showTime
|
|
22298
|
-
// }
|
|
22299
|
-
// {...restProps}
|
|
22300
|
-
// />
|
|
22301
|
-
// )
|
|
22582
|
+
}, options)
|
|
22583
|
+
})));
|
|
22302
22584
|
};
|
|
22303
22585
|
|
|
22304
22586
|
DatePickerField.propTypes = {
|
|
@@ -22306,7 +22588,10 @@ DatePickerField.propTypes = {
|
|
|
22306
22588
|
showTime: _pt.oneOfType([_pt.bool, _pt.shape({
|
|
22307
22589
|
format: _pt.string,
|
|
22308
22590
|
defaultValue: _pt.string.isRequired
|
|
22309
|
-
})])
|
|
22591
|
+
})]),
|
|
22592
|
+
options: _pt.any,
|
|
22593
|
+
allowClear: _pt.bool,
|
|
22594
|
+
flatpickrFormat: _pt.string
|
|
22310
22595
|
};
|
|
22311
22596
|
var datePicker = /*#__PURE__*/memo(DatePickerField);
|
|
22312
22597
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@innoways/drip-form-theme-antd",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"author": "JDFED",
|
|
5
5
|
"description": "drip-form antd主题包",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ant-design/icons": "^4.7.0",
|
|
33
33
|
"@babel/runtime": "^7.10.2",
|
|
34
|
-
"@innoways/hooks": "^
|
|
35
|
-
"@innoways/utils": "^
|
|
34
|
+
"@innoways/hooks": "^9.0.0",
|
|
35
|
+
"@innoways/utils": "^9.0.0",
|
|
36
36
|
"antd": "^4.16.13",
|
|
37
37
|
"flatpickr": "^4.6.13",
|
|
38
38
|
"moment": "^2.26.0",
|