@noah-libjs/components 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/ArrayInput/components.d.ts +787 -4
  2. package/dist/LazyAntd/ColorPicker/index.d.ts +1 -1
  3. package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +3 -1
  4. package/dist/LazyAntd/DatePicker/Base/index.d.ts +6 -2
  5. package/dist/LazyAntd/DatePicker/RangePicker.d.ts +3 -1
  6. package/dist/LazyAntd/Tree/Inner.d.ts +2 -1
  7. package/dist/LazyAntd/Tree/index.d.ts +3 -2
  8. package/dist/MyAutoComplete/types.d.ts +4 -1
  9. package/dist/MyButton/index.d.ts +10 -0
  10. package/dist/MyCheckbox/components.d.ts +807 -24
  11. package/dist/MyCheckbox/types.d.ts +3 -1
  12. package/dist/MyDatePicker/Display.d.ts +1 -1
  13. package/dist/MyIconSelect/index.d.ts +7 -0
  14. package/dist/MyIconSelect/types.d.ts +16 -0
  15. package/dist/MyInput/index.d.ts +1 -1
  16. package/dist/MyRangeDate/Inner.d.ts +3 -5
  17. package/dist/MyRangeDate/index.d.ts +6 -7
  18. package/dist/MyRangeDate/utils.d.ts +32 -30
  19. package/dist/MySelect/components.d.ts +787 -4
  20. package/dist/MySelect/types.d.ts +1 -1
  21. package/dist/MySwitch/types.d.ts +5 -2
  22. package/dist/a_chunks/index.js +561 -91
  23. package/dist/a_chunks/index.module.js +1 -24
  24. package/dist/a_chunks/root.17.js +2 -2
  25. package/dist/a_chunks/root.18.js +5 -5
  26. package/dist/a_chunks/root.19.js +2 -1
  27. package/dist/a_chunks/root.20.js +2 -1
  28. package/dist/a_chunks/root.21.js +2 -1
  29. package/dist/a_chunks/root.22.js +54 -196
  30. package/dist/a_chunks/root.23.js +198 -95
  31. package/dist/a_chunks/root.24.js +118 -5
  32. package/dist/a_chunks/root.25.js +4 -3
  33. package/dist/a_chunks/root.26.js +4 -0
  34. package/dist/a_chunks/root.8.js +7 -5
  35. package/dist/index.js +2 -1
  36. package/dist/packs.d.ts +788 -0
  37. package/dist/util-types/fd/InputType.d.ts +1 -1
  38. package/dist/util-types/fd/index.d.ts +33 -10
  39. package/dist/utils/getInputStyle.d.ts +3 -2
  40. package/dist/utils/msmc.d.ts +8 -2
  41. package/dist/utils/new.d.ts +12 -0
  42. package/package.json +4 -4
@@ -4,25 +4,32 @@ import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
5
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
6
  import _createClass from "@babel/runtime/helpers/createClass";
7
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
7
8
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
8
9
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
9
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- var _excluded = ["value", "onChange", "placeholder", "warning", "disabled"],
11
- _excluded2 = ["width", "style", "placeholder", "name", "warning", "form", "value", "onChange", "type"],
12
- _excluded3 = ["storeKey", "cb"],
13
- _excluded4 = ["storeKey", "cb"];
11
+ var _excluded = ["placeholder"],
12
+ _excluded2 = ["placeholder"],
13
+ _excluded3 = ["value", "onChange", "placeholder", "warning", "disabled"],
14
+ _excluded4 = ["width", "style", "placeholder", "name", "warning", "form", "value", "onChange", "type"],
15
+ _excluded5 = ["icon_type", "value", "onChange", "form"],
16
+ _excluded6 = ["btn_text", "defaultIcon", "onClick", "form", "children", "icon", "loading", "primary", "hidden", "on_btn_click"],
17
+ _excluded7 = ["storeKey", "cb"],
18
+ _excluded8 = ["storeKey", "cb"];
14
19
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
16
22
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
23
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
24
  import * as React from 'react';
19
- import React__default, { lazy, useState, useEffect, forwardRef, Suspense, Component } from 'react';
20
- import { CloseOutlined, CheckOutlined } from '@ant-design/icons';
21
- import { getMomentRange, isString, get, isEmpty, safe_fetch_options, safe_json_parse_arr, numberLikeCompare, isNumber, isBoolean, getPresetOptions, getDictionariesEnumerations, isFunction, isArray, getDualModeOptions, formatDateTimeNoSecond, formatDate, getMomentObj, EMPTY_PLACEHOLDER, isNil } from '@noah-libjs/utils';
22
- import { Space, Button as Button$1, InputNumber, Checkbox, Input, Skeleton, Modal } from 'antd';
25
+ import React__default, { lazy, forwardRef, useRef, useState, useEffect, Suspense, Component } from 'react';
26
+ import { CloseOutlined, CheckOutlined, LoadingOutlined } from '@ant-design/icons';
27
+ import { getMomentRange, isString, get, isEmpty, numberLikeCompare, isNumber, isBoolean, isNull, getPresetOptions, getDictionariesEnumerations, isFunction, isArray, getDualModeOptions, safe_json_parse_arr, safe_json_parse, isNil, formatDateTimeNoSecond, formatDate, getMomentObj, EMPTY_PLACEHOLDER, safe_json_stringify, safe_async_call, sleep } from '@noah-libjs/utils';
28
+ import { Space, Button as Button$1, InputNumber, Checkbox, Input, Card, List, Skeleton, Modal } from 'antd';
23
29
  import dayjs from 'dayjs';
24
30
  import { Option } from 'rc-select';
25
- import { TreeNode } from 'rc-tree';
31
+ import RCTree, { TreeNode } from 'rc-tree';
32
+ import { safe_fetch_options } from '@noah-libjs/request';
26
33
  var ArrayInput = /*#__PURE__*/lazy(function () {
27
34
  return import('./root.20.js');
28
35
  });
@@ -30,7 +37,7 @@ ArrayInput.DisplayFC = /*#__PURE__*/lazy(function () {
30
37
  return import('./root.21.js');
31
38
  });
32
39
  var MyAutoComplete = /*#__PURE__*/lazy(function () {
33
- return import('./root.22.js');
40
+ return import('./root.23.js');
34
41
  });
35
42
  MyAutoComplete.DisplayFC = function (props) {
36
43
  return /*#__PURE__*/React__default.createElement("span", null, props.value);
@@ -43,35 +50,35 @@ var MyCheckbox_Display = /*#__PURE__*/lazy(function () {
43
50
  });
44
51
  MyCheckbox.DisplayFC = MyCheckbox_Display;
45
52
  var DatePickerInner = /*#__PURE__*/lazy(function () {
46
- return import('./root.24.js').then(function (r) {
53
+ return import('./root.25.js').then(function (r) {
47
54
  return {
48
55
  "default": r.DatePicker
49
56
  };
50
57
  });
51
58
  });
52
59
  var RangePickerInner = /*#__PURE__*/lazy(function () {
53
- return import('./root.24.js').then(function (r) {
60
+ return import('./root.25.js').then(function (r) {
54
61
  return {
55
62
  "default": r.DatePicker.RangePicker
56
63
  };
57
64
  });
58
65
  });
59
66
  var MonthPickerInner = /*#__PURE__*/lazy(function () {
60
- return import('./root.24.js').then(function (r) {
67
+ return import('./root.25.js').then(function (r) {
61
68
  return {
62
69
  "default": r.DatePicker.MonthPicker
63
70
  };
64
71
  });
65
72
  });
66
73
  var TimePickerInner = /*#__PURE__*/lazy(function () {
67
- return import('./root.24.js').then(function (r) {
74
+ return import('./root.25.js').then(function (r) {
68
75
  return {
69
76
  "default": r.DatePicker.TimePicker
70
77
  };
71
78
  });
72
79
  });
73
80
  var CalendarInner = /*#__PURE__*/lazy(function () {
74
- return import('./root.25.js');
81
+ return import('./root.26.js');
75
82
  });
76
83
  var DatePicker_L = /*#__PURE__*/React.forwardRef(function (props, ref) {
77
84
  return /*#__PURE__*/React.createElement(DatePickerInner, _objectSpread(_objectSpread({}, props), {}, {
@@ -90,7 +97,7 @@ var MonthPicker_L = /*#__PURE__*/React.forwardRef(function (props, ref) {
90
97
  ref: ref
91
98
  }));
92
99
  });
93
- MonthPicker_L.displayName = 'TimePicker';
100
+ MonthPicker_L.displayName = 'MonthPicker';
94
101
  var RangePicker_L = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
95
102
  return /*#__PURE__*/React__default.createElement(RangePickerInner, _objectSpread(_objectSpread({
96
103
  ranges: getMomentRange()
@@ -171,19 +178,20 @@ var Inner$5 = /*#__PURE__*/React__default.lazy(function () {
171
178
  var DirectoryTreeInner = /*#__PURE__*/React__default.lazy(function () {
172
179
  return import('./root.9.js');
173
180
  });
174
- function Tree_(props) {
175
- return /*#__PURE__*/React__default.createElement(Inner$5, _objectSpread({}, props));
176
- }
181
+ var Tree_ = /*#__PURE__*/forwardRef(function Tree_(props, ref) {
182
+ return /*#__PURE__*/React__default.createElement(Inner$5, _objectSpread(_objectSpread({}, props), {}, {
183
+ ref: ref
184
+ }));
185
+ });
177
186
  function DirectoryTree(props) {
178
187
  return /*#__PURE__*/React__default.createElement(DirectoryTreeInner, _objectSpread({}, props));
179
188
  }
189
+ //@ts-ignore
180
190
  var Tree_L = Object.assign(Tree_, {
181
191
  TreeNode: TreeNode,
182
- DirectoryTree: DirectoryTree
192
+ DirectoryTree: DirectoryTree,
193
+ RCTree: RCTree
183
194
  });
184
- function aa() {
185
- return /*#__PURE__*/React__default.createElement(Tree_L, null);
186
- }
187
195
  var Inner$4 = /*#__PURE__*/React__default.lazy(function () {
188
196
  return import('./root.10.js');
189
197
  });
@@ -250,23 +258,58 @@ MyColor.DisplayFC = function (props) {
250
258
  }
251
259
  });
252
260
  };
261
+ function styleInject(css, ref) {
262
+ if (ref === void 0) ref = {};
263
+ var insertAt = ref.insertAt;
264
+ if (!css || typeof document === 'undefined') {
265
+ return;
266
+ }
267
+ var head = document.head || document.getElementsByTagName('head')[0];
268
+ var style = document.createElement('style');
269
+ style.type = 'text/css';
270
+ if (insertAt === 'top') {
271
+ if (head.firstChild) {
272
+ head.insertBefore(style, head.firstChild);
273
+ } else {
274
+ head.appendChild(style);
275
+ }
276
+ } else {
277
+ head.appendChild(style);
278
+ }
279
+ if (style.styleSheet) {
280
+ style.styleSheet.cssText = css;
281
+ } else {
282
+ style.appendChild(document.createTextNode(css));
283
+ }
284
+ }
285
+ var css_248z = ".theme_warning__83Ww2 {\n color: orange !important;\n}\n.theme_warning__83Ww2 input {\n color: orange !important;\n}\n.theme_error__i4RPC {\n color: red !important;\n}\n.theme_error__i4RPC input {\n color: red !important;\n}\n";
286
+ var theme = {
287
+ "warning": "theme_warning__83Ww2",
288
+ "error": "theme_error__i4RPC"
289
+ };
290
+ styleInject(css_248z);
291
+ function get_status_cls(status) {
292
+ if (status === 'error') return theme['error'];
293
+ if (status === 'warning') return theme['warning'];
294
+ }
253
295
  function getInputStyle() {
254
296
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
255
297
  var _props$style = props.style,
256
298
  style = _props$style === void 0 ? {} : _props$style,
257
299
  width = props.width,
258
300
  inputWidth = props.inputWidth,
259
- warning = props.warning,
260
- warn = props.warn;
301
+ status = props.status;
261
302
  if (width) {
262
303
  style.width = style.width || width;
263
304
  }
264
305
  if (inputWidth) {
265
306
  style.minWidth = style.minWidth || inputWidth;
266
307
  }
267
- if (warning || warn) {
268
- style.border = '1px solid red';
269
- style.color = 'red';
308
+ if (status === 'error') {
309
+ style.color = 'red !important';
310
+ }
311
+ if (status === 'warning') {
312
+ style.color = 'yellow !important';
270
313
  }
271
314
  // if (isInt(popupMatchSelectWidth))
272
315
  // style.width = style.width || (popupMatchSelectWidth / 2)
@@ -344,28 +387,93 @@ function handle_form_error(error, form) {
344
387
  }
345
388
  return null;
346
389
  }
390
+ function form_validate(form) {
391
+ return new Promise(function (res, rej) {
392
+ if (!form) {
393
+ rej({
394
+ text: 'form 不存在'
395
+ });
396
+ return;
397
+ }
398
+ form.validateFields().then(function () {
399
+ var formData = form.getFieldsValue();
400
+ res(formData);
401
+ })["catch"](function (error) {
402
+ var first_err = handle_form_error(error, form);
403
+ rej(first_err);
404
+ });
405
+ });
406
+ }
407
+ function fuck_focus(props) {
408
+ var onBlur = props.onBlur;
409
+ var forcusInfo = useRef({});
410
+ function child_focus() {
411
+ var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
412
+ forcusInfo.current = {
413
+ index: index,
414
+ type: 'child'
415
+ };
416
+ }
417
+ function child_blur() {
418
+ var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
419
+ forcusInfo.current = {
420
+ index: undefined,
421
+ type: undefined
422
+ };
423
+ }
424
+ function parent_blur(e) {
425
+ var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
426
+ setTimeout(function () {
427
+ if (forcusInfo.current.index === index && forcusInfo.current.type === 'child') return;
428
+ forcusInfo.current = {
429
+ index: undefined,
430
+ type: undefined
431
+ };
432
+ onBlur === null || onBlur === void 0 || onBlur(e);
433
+ }, 10);
434
+ }
435
+ function parent_focus() {
436
+ var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
437
+ } // setTimeout(() => {
438
+ // forcusInfo.current = { index, type: 'parent' }
439
+ // }, 10);
440
+ return {
441
+ child_blur: child_blur,
442
+ child_focus: child_focus,
443
+ parent_blur: parent_blur,
444
+ parent_focus: parent_focus
445
+ };
446
+ }
347
447
  function get_check_invert_values(configs) {
348
448
  if (!Array.isArray(configs)) return {};
349
449
  var children = configs.filter(function (_) {
350
- return ['MC', 'MA', 'MS'].includes(_ === null || _ === void 0 ? void 0 : _.inputType) || Array.isArray(_ === null || _ === void 0 ? void 0 : _.children);
450
+ return ['MC', 'MA', 'MS', 'MSW'].includes(_ === null || _ === void 0 ? void 0 : _.inputType) || Array.isArray(_ === null || _ === void 0 ? void 0 : _.children);
351
451
  });
352
452
  var check_invert_values = children.filter(function (_) {
353
453
  return !(_ !== null && _ !== void 0 && _.disabled_check);
354
454
  }).reduce(function (a, item, idx) {
355
- var _ref, _item$name, _item$inputProps;
356
455
  // const name = SMchc_FormDescriptions.get_form_item_name_raw(item)
357
- var name = (_ref = (_item$name = item === null || item === void 0 ? void 0 : item.name) !== null && _item$name !== void 0 ? _item$name : item === null || item === void 0 ? void 0 : item.key) !== null && _ref !== void 0 ? _ref : item === null || item === void 0 ? void 0 : item.dataIndex;
358
- var props = _objectSpread(_objectSpread({}, (_item$inputProps = item === null || item === void 0 ? void 0 : item.inputProps) !== null && _item$inputProps !== void 0 ? _item$inputProps : {}), {}, {
359
- config: item
360
- });
361
- var options = parse_MC_option(props);
362
- var firstOption = options[0];
363
456
  var cArr = item === null || item === void 0 ? void 0 : item.children;
364
- var cObj = {};
365
457
  if (Array.isArray(cArr)) {
458
+ var cObj = {};
366
459
  cObj = get_check_invert_values(cArr);
367
460
  return _objectSpread(_objectSpread({}, a), cObj);
368
461
  } else {
462
+ var _item$inputProps, _ref, _item$name;
463
+ var props = _objectSpread(_objectSpread({}, (_item$inputProps = item === null || item === void 0 ? void 0 : item.inputProps) !== null && _item$inputProps !== void 0 ? _item$inputProps : {}), {}, {
464
+ config: item
465
+ });
466
+ var name = (_ref = (_item$name = item === null || item === void 0 ? void 0 : item.name) !== null && _item$name !== void 0 ? _item$name : item === null || item === void 0 ? void 0 : item.key) !== null && _ref !== void 0 ? _ref : item === null || item === void 0 ? void 0 : item.dataIndex;
467
+ var inputType = item === null || item === void 0 ? void 0 : item.inputType;
468
+ var options = parse_MC_option(props);
469
+ if (inputType === 'MSW') {
470
+ var _props$checked_value, _props$unchecked_valu;
471
+ return _objectSpread(_objectSpread({}, a), {}, _defineProperty({}, "".concat(name), [(_props$checked_value = props.checked_value) !== null && _props$checked_value !== void 0 ? _props$checked_value : true, (_props$unchecked_valu = props.unchecked_value) !== null && _props$unchecked_valu !== void 0 ? _props$unchecked_valu : false]));
472
+ }
473
+ if (inputType === 'MA' && isEmpty(options)) {
474
+ return a;
475
+ }
476
+ var firstOption = options[0];
369
477
  return _objectSpread(_objectSpread({}, a), {}, _defineProperty({}, "".concat(name), [parse_MC_value(props, [firstOption]), null, {
370
478
  props: props,
371
479
  options: options
@@ -389,14 +497,19 @@ function getMarshal(props) {
389
497
  }
390
498
  function parse_MC_value(props, changedValue) {
391
499
  var _props$config, _changedValue$, _changedValue$2;
500
+ var _props$linker = props.linker,
501
+ linker = _props$linker === void 0 ? ',' : _props$linker;
392
502
  if (((_props$config = props.config) === null || _props$config === void 0 ? void 0 : _props$config.inputType) === 'MA') return changedValue === null || changedValue === void 0 || (_changedValue$ = changedValue[0]) === null || _changedValue$ === void 0 ? void 0 : _changedValue$.value;
393
503
  var marshal = getMarshal(props);
394
504
  var type = get_mode(props);
395
505
  if (!changedValue.length) return null;
396
- if (marshal) return marshal === 2 ? changedValue : JSON.stringify(changedValue);
506
+ if (marshal) {
507
+ var frugal_value = process_frugal_local(props, changedValue);
508
+ return marshal === 2 ? frugal_value : JSON.stringify(frugal_value);
509
+ }
397
510
  if (type === 'multiple' || type === 'tags') return changedValue.map(function (_) {
398
511
  return _.value;
399
- }).join(',');
512
+ }).join(linker);
400
513
  return (_changedValue$2 = changedValue[0]) === null || _changedValue$2 === void 0 ? void 0 : _changedValue$2.value;
401
514
  }
402
515
  function check_multiple(props) {
@@ -412,7 +525,12 @@ function use_options(props) {
412
525
  var fetch_options = props.fetch_options,
413
526
  optionKey = props.optionKey,
414
527
  _options = props.options,
415
- uniqueKey = props.uniqueKey;
528
+ uniqueKey = props.uniqueKey,
529
+ form = props.form,
530
+ _props$linker2 = props.linker,
531
+ linker = _props$linker2 === void 0 ? ',' : _props$linker2,
532
+ frugal = props.frugal,
533
+ display_linker = props.display_linker;
416
534
  var _useState = useState([]),
417
535
  _useState2 = _slicedToArray(_useState, 2),
418
536
  options = _useState2[0],
@@ -429,24 +547,27 @@ function use_options(props) {
429
547
  var marshal = getMarshal(props);
430
548
  var type = get_mode(props);
431
549
  useEffect(function () {
432
- var safeData = getData(value, options, marshal, type);
550
+ var safeData = getData(value, options, marshal, type, linker, frugal);
433
551
  setData(safeData);
434
552
  }, [value, options]);
435
553
  useEffect(function () {
436
554
  if (fetch_options) {
437
555
  setLoading(true);
438
- safe_fetch_options(fetch_options).then(set_options)["finally"](function () {
556
+ safe_fetch_options(fetch_options, form).then(set_options)["finally"](function () {
439
557
  return setLoading(false);
440
558
  });
441
- } else {
559
+ }
560
+ }, []);
561
+ useEffect(function () {
562
+ if (!fetch_options) {
442
563
  set_options(parse_MC_option(props));
443
564
  }
444
- }, [fetch_options, optionKey, _options, uniqueKey]);
565
+ }, [optionKey, _options, uniqueKey]);
445
566
  var is_multiple = check_multiple(props);
446
567
  // mchcLogger.log('MySelect', { data, options, props })
447
568
  var label = is_multiple ? data.map(function (_) {
448
569
  return _.label;
449
- }).join(',') : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.label;
570
+ }).join(display_linker !== null && display_linker !== void 0 ? display_linker : linker) : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.label;
450
571
  var safe_node = label !== null && label !== void 0 ? label : '';
451
572
  var display_node = /*#__PURE__*/React__default.createElement("span", {
452
573
  title: safe_node
@@ -459,10 +580,25 @@ function use_options(props) {
459
580
  display_node: display_node
460
581
  };
461
582
  }
583
+ function process_frugal_local(props, changedValue) {
584
+ var frugal = props.frugal;
585
+ if (!frugal) return changedValue;
586
+ console.log('frugal_value local', changedValue[0]);
587
+ return changedValue[0];
588
+ }
589
+ function process_frugal_remote(value, frugal) {
590
+ if (!frugal) return safe_json_parse_arr(value, value);
591
+ var frugal_value = safe_json_parse(value);
592
+ console.log('frugal_value remote', frugal_value);
593
+ if (isNil(frugal_value === null || frugal_value === void 0 ? void 0 : frugal_value.value)) return [];
594
+ return [frugal_value];
595
+ }
462
596
  function getData(value, options, marshal, type) {
463
- var unMarshalData = safe_json_parse_arr(value, value);
597
+ var l = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ',';
598
+ var frugal = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
599
+ var unMarshalData = process_frugal_remote(value, frugal);
464
600
  var splitValue = function splitValue() {
465
- return isString(value) ? value.split(',').filter(function (_) {
601
+ return isString(value) ? value.split(l).filter(function (_) {
466
602
  return _;
467
603
  }) : [];
468
604
  };
@@ -475,7 +611,7 @@ function getData(value, options, marshal, type) {
475
611
  label: value
476
612
  };
477
613
  }) : value;
478
- var safeData = Array.isArray(v) ? v : isNumber(v) || isString(v) || isBoolean(v)
614
+ var safeData = Array.isArray(v) ? v : isNumber(v) || isString(v) || isBoolean(v) || isNull(v)
479
615
  // ? options.filter(_ => _.value === v)
480
616
  ? options.filter(function (_) {
481
617
  return numberLikeCompare(_.value, v);
@@ -540,7 +676,8 @@ function parse_MC_string_options(props) {
540
676
  });
541
677
  return input_type === 'MA' ? options[1] : options[0];
542
678
  }
543
- function displayValue(_options, value, isMul) {
679
+ function displayValue(_options, value) {
680
+ var l = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ',';
544
681
  var _value = _options.filter(function (o) {
545
682
  return value.find(function (v) {
546
683
  return v.value == o.value;
@@ -548,7 +685,7 @@ function displayValue(_options, value, isMul) {
548
685
  });
549
686
  return _value.map(function (_) {
550
687
  return _.label;
551
- }).join(',');
688
+ }).join(l);
552
689
  }
553
690
  function get_unknown_conf(props) {
554
691
  var showUnknown = props.showUnknown,
@@ -556,31 +693,31 @@ function get_unknown_conf(props) {
556
693
  return showUnknown || unknown;
557
694
  }
558
695
  var defaultOptions = [];
559
- var defaultGetPopupContainer = function defaultGetPopupContainer() {
696
+ var defaultGetPopupContainer$1 = function defaultGetPopupContainer$1() {
560
697
  return document.body;
561
698
  };
562
699
  var UNKNOWN_TIME_SYMBOL = '1970-01-01 00:00:00';
563
700
  function formatDatePickerProps(props) {
564
701
  var _data$getPopupContain;
565
702
  var data = _objectSpread({}, props);
566
- if (!data.format) {
703
+ if (data.format === undefined) {
567
704
  if (props.time_only) {
568
705
  data.format = 'HH:mm';
569
706
  } else {
570
707
  data.format = data.showTime ? formatDateTimeNoSecond.format : formatDate.format;
571
708
  }
572
709
  }
573
- data.getPopupContainer = (_data$getPopupContain = data.getPopupContainer) !== null && _data$getPopupContain !== void 0 ? _data$getPopupContain : defaultGetPopupContainer;
710
+ data.getPopupContainer = (_data$getPopupContain = data.getPopupContainer) !== null && _data$getPopupContain !== void 0 ? _data$getPopupContain : defaultGetPopupContainer$1;
574
711
  return data;
575
712
  }
576
713
  function getIsUnknown(props) {
577
714
  var value = props.value;
578
- var symbolValue = handleChangeValue(props, UNKNOWN_TIME_SYMBOL);
579
- var _value = handleChangeValue(props, value);
715
+ var symbolValue = handleChangeValue$1(props, UNKNOWN_TIME_SYMBOL);
716
+ var _value = handleChangeValue$1(props, value);
580
717
  var isUnknown = _value === symbolValue && get_unknown_conf(props);
581
718
  return isUnknown;
582
719
  }
583
- var handleChangeValue = function handleChangeValue(_ref4, date) {
720
+ var handleChangeValue$1 = function handleChangeValue$1(_ref4, date) {
584
721
  var valueType = _ref4.valueType,
585
722
  format = _ref4.format;
586
723
  var result = date;
@@ -592,18 +729,123 @@ var handleChangeValue = function handleChangeValue(_ref4, date) {
592
729
  }
593
730
  return result;
594
731
  };
595
- var DisplayFC$2 = function DisplayFC$2(_props) {
732
+ var DisplayFC$3 = function DisplayFC$3(_props) {
596
733
  var props = formatDatePickerProps(_props);
597
734
  var value = props.value,
598
735
  format = props.format;
736
+ if (!value) return null;
599
737
  var isUnknown = getIsUnknown(props);
600
738
  var m = getMomentObj(value);
601
739
  return /*#__PURE__*/React__default.createElement("span", null, isUnknown ? '不详' : m.isValid() ? m.format(format) : EMPTY_PLACEHOLDER);
602
740
  };
603
741
  var MyDatePicker = /*#__PURE__*/lazy(function () {
604
- return import('./root.23.js');
742
+ return import('./root.24.js');
743
+ });
744
+ MyDatePicker.DisplayFC = DisplayFC$3;
745
+ var defaultGetPopupContainer = function defaultGetPopupContainer() {
746
+ return document.body;
747
+ };
748
+ function areEqual(prevProps, nextProps) {
749
+ if (prevProps.value !== nextProps.value) {
750
+ return false;
751
+ }
752
+ return true;
753
+ }
754
+ function process_value_remote(value, marshal, linker) {
755
+ var _value = value;
756
+ var safeValue = [];
757
+ if (isArray(_value)) return _value;
758
+ switch (marshal) {
759
+ case 0:
760
+ if (isString(_value)) safeValue = _value.split(linker);
761
+ break;
762
+ case 1:
763
+ if (isString(_value)) safeValue = safe_json_parse_arr(_value);
764
+ break;
765
+ default:
766
+ if (isArray(_value)) safeValue = _value;
767
+ break;
768
+ }
769
+ return Array.isArray(safeValue) ? safeValue : [];
770
+ }
771
+ function format_range_props(props) {
772
+ var _data$format, _data$marshal, _data$linker, _data$getPopupContain2;
773
+ var data = _objectSpread({}, props);
774
+ data.format = (_data$format = data.format) !== null && _data$format !== void 0 ? _data$format : 'YYYY-MM-DD';
775
+ data.marshal = (_data$marshal = data.marshal) !== null && _data$marshal !== void 0 ? _data$marshal : 1;
776
+ data.linker = (_data$linker = data.linker) !== null && _data$linker !== void 0 ? _data$linker : ',';
777
+ var _value = props.value;
778
+ var safeValue = process_value_remote(_value, data.marshal, data.linker);
779
+ data.value = safeValue.map(function (_) {
780
+ return dayjs(_, data.format);
781
+ });
782
+ data.display_value = safeValue;
783
+ data.getPopupContainer = (_data$getPopupContain2 = data.getPopupContainer) !== null && _data$getPopupContain2 !== void 0 ? _data$getPopupContain2 : defaultGetPopupContainer;
784
+ return data;
785
+ }
786
+ var handleChangeValue = function handleChangeValue(_ref5, date) {
787
+ var format = _ref5.format,
788
+ marshal = _ref5.marshal,
789
+ linker = _ref5.linker;
790
+ if (!date) return null;
791
+ var format_date = date.map(function (_) {
792
+ var _$format;
793
+ return (_$format = _ === null || _ === void 0 ? void 0 : _.format(format)) !== null && _$format !== void 0 ? _$format : null;
794
+ });
795
+ console.log('format change', {
796
+ marshal: marshal,
797
+ format_date: format_date
798
+ });
799
+ switch (marshal) {
800
+ case 0:
801
+ return format_date.join(linker);
802
+ case 1:
803
+ return safe_json_stringify(format_date);
804
+ default:
805
+ return format_date;
806
+ }
807
+ };
808
+ var DisplayFC$2 = function DisplayFC$2(_props) {
809
+ var props = format_range_props(_props);
810
+ var linker = props.linker;
811
+ var disPlay_value = props.display_value;
812
+ return disPlay_value.join(linker);
813
+ };
814
+ var MyRangePicker = /*#__PURE__*/lazy(function () {
815
+ return import('./root.22.js');
605
816
  });
606
- MyDatePicker.DisplayFC = DisplayFC$2;
817
+ var MyRangeDate = function MyRangeDate(props) {
818
+ var placeholder = props.placeholder,
819
+ rest = _objectWithoutProperties(props, _excluded);
820
+ return /*#__PURE__*/React__default.createElement(MyRangePicker
821
+ // ranges={getMomentRange(dayjs) as any}
822
+ , _objectSpread({
823
+ // ranges={getMomentRange(dayjs) as any}
824
+ format: "YYYY-MM-DD",
825
+ style: {
826
+ width: 230
827
+ }
828
+ }, rest));
829
+ };
830
+ var MyRangeDateTime = function MyRangeDateTime(props) {
831
+ var placeholder = props.placeholder,
832
+ rest = _objectWithoutProperties(props, _excluded2);
833
+ return /*#__PURE__*/React__default.createElement(MyRangePicker
834
+ // ranges={getMomentRange(dayjs) as any}
835
+ , _objectSpread({
836
+ // ranges={getMomentRange(dayjs) as any}
837
+ showTime: {
838
+ defaultValue: [dayjs('00:00', 'HH:mm'), dayjs('23:59', 'HH:mm')]
839
+ },
840
+ format: "YYYY-MM-DD HH:mm",
841
+ style: {
842
+ width: 320
843
+ }
844
+ }, rest));
845
+ };
846
+ MyRangeDate.DisplayFC = DisplayFC$2;
847
+ MyRangeDateTime.DisplayFC = DisplayFC$2;
848
+ MyRangePicker.DisplayFC = DisplayFC$2;
607
849
 
608
850
  // .ant-input-affix-wrapper-borderless
609
851
  var UNKNOWN_NUMBER_SYMBOL = 2147483647;
@@ -613,7 +855,7 @@ var MyInputNumber = function MyInputNumber_(props) {
613
855
  placeholder = props.placeholder,
614
856
  warning = props.warning,
615
857
  disabled = props.disabled,
616
- others = _objectWithoutProperties(props, _excluded);
858
+ others = _objectWithoutProperties(props, _excluded3);
617
859
  var _style = getInputStyle(props);
618
860
  var unkown_conf = get_unknown_conf(props);
619
861
  var isUnkown = unkown_conf && value === UNKNOWN_NUMBER_SYMBOL;
@@ -621,7 +863,10 @@ var MyInputNumber = function MyInputNumber_(props) {
621
863
  _style.flex = 1;
622
864
  }
623
865
  // const node = <Input disabled={disabled} {...others} placeholder={placeholder ?? '请输入数值'} allowClear style={_style} type='number' value={isUnkown ? undefined : value!} onChange={e => onChange?.(e.target.value)} />
624
- var node = /*#__PURE__*/React__default.createElement(InputNumber, _objectSpread(_objectSpread({}, others), {}, {
866
+ var node = /*#__PURE__*/React__default.createElement(InputNumber, _objectSpread(_objectSpread({
867
+ className: get_status_cls(props.status),
868
+ controls: false
869
+ }, others), {}, {
625
870
  disabled: disabled,
626
871
  placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : '请输入',
627
872
  style: _objectSpread({
@@ -678,7 +923,7 @@ var MyInput = /*#__PURE__*/forwardRef(function (props, myRef) {
678
923
  value = props.value,
679
924
  _onChange3 = props.onChange,
680
925
  type = props.type,
681
- others = _objectWithoutProperties(props, _excluded2);
926
+ others = _objectWithoutProperties(props, _excluded4);
682
927
  if (type === 'number') return /*#__PURE__*/React__default.createElement(MyInputNumber, _objectSpread({}, props));
683
928
  var _useState7 = useState(value),
684
929
  _useState8 = _slicedToArray(_useState7, 2),
@@ -689,7 +934,6 @@ var MyInput = /*#__PURE__*/forwardRef(function (props, myRef) {
689
934
  }, [value]);
690
935
  var _style = getInputStyle(props);
691
936
  return /*#__PURE__*/React__default.createElement(Input, _objectSpread(_objectSpread({
692
- title: JSON.stringify(_style),
693
937
  ref: myRef,
694
938
  value: _value,
695
939
  onChange: function onChange(e) {
@@ -697,10 +941,12 @@ var MyInput = /*#__PURE__*/forwardRef(function (props, myRef) {
697
941
  set_value(v);
698
942
  _onChange3 === null || _onChange3 === void 0 || _onChange3(v);
699
943
  },
944
+ classNames: {
945
+ input: get_status_cls(props.status)
946
+ },
700
947
  style: _style
701
948
  }, others), {}, {
702
- // placeholder={placeholder ?? '请输入'}
703
- placeholder: '请输入'
949
+ placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : '请输入'
704
950
  }));
705
951
  });
706
952
  MyInput.DisplayFC = function (props) {
@@ -720,19 +966,229 @@ var MySelect = Object.assign(Inner, {
720
966
  DisplayFC: DisplayFC
721
967
  });
722
968
  var MySwitch = function MySwitch(props) {
723
- return /*#__PURE__*/React__default.createElement(Switch_L, _objectSpread({}, props));
969
+ var _props$checked_value2 = props.checked_value,
970
+ checked_value = _props$checked_value2 === void 0 ? true : _props$checked_value2,
971
+ _props$unchecked_valu2 = props.unchecked_value,
972
+ unchecked_value = _props$unchecked_valu2 === void 0 ? false : _props$unchecked_valu2,
973
+ _onChange4 = props.onChange,
974
+ value = props.value;
975
+ if (props.switch_type === 'checkbox') return /*#__PURE__*/React__default.createElement(MyCheckbox, _objectSpread(_objectSpread({}, props), {}, {
976
+ options: [{
977
+ value: checked_value
978
+ }],
979
+ marshal: 0,
980
+ value: value === checked_value ? checked_value : null,
981
+ onChange: function onChange(v) {
982
+ console.log('switch', v);
983
+ _onChange4 === null || _onChange4 === void 0 || _onChange4(v === null ? unchecked_value : checked_value);
984
+ }
985
+ }));
986
+ return /*#__PURE__*/React__default.createElement(Switch_L, _objectSpread(_objectSpread({}, props), {}, {
987
+ value: value === checked_value,
988
+ onChange: function onChange(v) {
989
+ _onChange4 === null || _onChange4 === void 0 || _onChange4(v !== true ? unchecked_value : checked_value);
990
+ }
991
+ }));
724
992
  };
725
- MySwitch.DisplayFC = function (_ref5) {
726
- var _ref6, _ref7;
727
- var value = _ref5.value,
728
- checkedChildren = _ref5.checkedChildren,
729
- checkedText = _ref5.checkedText,
730
- unCheckedChildren = _ref5.unCheckedChildren,
731
- uncheckedText = _ref5.uncheckedText;
993
+ MySwitch.DisplayFC = function (_ref6) {
994
+ var _ref7, _ref8;
995
+ var value = _ref6.value,
996
+ checkedChildren = _ref6.checkedChildren,
997
+ checked_text = _ref6.checked_text,
998
+ unCheckedChildren = _ref6.unCheckedChildren,
999
+ unchecked_text = _ref6.unchecked_text;
732
1000
  if (isNil(value)) return '';
733
- return value ? (_ref6 = checkedChildren !== null && checkedChildren !== void 0 ? checkedChildren : checkedText) !== null && _ref6 !== void 0 ? _ref6 : /*#__PURE__*/React__default.createElement(CheckOutlined, null) : (_ref7 = unCheckedChildren !== null && unCheckedChildren !== void 0 ? unCheckedChildren : uncheckedText) !== null && _ref7 !== void 0 ? _ref7 : /*#__PURE__*/React__default.createElement(CloseOutlined, null);
1001
+ return value ? (_ref7 = checkedChildren !== null && checkedChildren !== void 0 ? checkedChildren : checked_text) !== null && _ref7 !== void 0 ? _ref7 : /*#__PURE__*/React__default.createElement(CheckOutlined, null) : (_ref8 = unCheckedChildren !== null && unCheckedChildren !== void 0 ? unCheckedChildren : unchecked_text) !== null && _ref8 !== void 0 ? _ref8 : /*#__PURE__*/React__default.createElement(CloseOutlined, null);
734
1002
  };
1003
+ function use_icon(props) {
1004
+ var _props$icon_type = props.icon_type,
1005
+ icon_type = _props$icon_type === void 0 ? '' : _props$icon_type,
1006
+ value = props.value,
1007
+ onChange = props.onChange,
1008
+ form = props.form,
1009
+ others = _objectWithoutProperties(props, _excluded5);
1010
+ var _useState9 = useState({}),
1011
+ _useState10 = _slicedToArray(_useState9, 2),
1012
+ all_icons = _useState10[0],
1013
+ set_all_icons = _useState10[1];
1014
+ var _useState11 = useState([]),
1015
+ _useState12 = _slicedToArray(_useState11, 2),
1016
+ all_keys = _useState12[0],
1017
+ set_all_keys = _useState12[1];
1018
+ var QuestionOutlined = all_icons['QuestionOutlined'] || function () {
1019
+ return /*#__PURE__*/React__default.createElement("span", null, "?");
1020
+ };
1021
+ function render_Icon(t) {
1022
+ var _all_icons$default, _all_icons$default2;
1023
+ var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1024
+ if (!((_all_icons$default = all_icons["default"]) !== null && _all_icons$default !== void 0 && _all_icons$default.render)) return null;
1025
+ var R = (_all_icons$default2 = all_icons["default"]) === null || _all_icons$default2 === void 0 ? void 0 : _all_icons$default2.render;
1026
+ if (!t) return null;
1027
+ if (!all_keys.includes(t)) return /*#__PURE__*/React__default.createElement(R, _objectSpread(_objectSpread({
1028
+ title: t,
1029
+ component: QuestionOutlined
1030
+ }, p), others));
1031
+ var C = all_icons[t];
1032
+ return /*#__PURE__*/React__default.createElement(R, _objectSpread(_objectSpread({
1033
+ title: t,
1034
+ component: C
1035
+ }, p), others));
1036
+ }
1037
+ useEffect(function () {
1038
+ import('@ant-design/icons').then(function (mod) {
1039
+ /*#__PURE__*/React__default.createElement(mod["default"], null);
1040
+ set_all_icons(mod);
1041
+ var keys = Object.keys(mod).filter(function (_) {
1042
+ return ['Outlined'].some(function (limit) {
1043
+ return _.includes(limit);
1044
+ });
1045
+ });
1046
+ set_all_keys(keys);
1047
+ });
1048
+ }, []);
1049
+ return {
1050
+ all_keys: all_keys,
1051
+ render_Icon: render_Icon
1052
+ };
1053
+ }
1054
+ var MyIconSelect = /*#__PURE__*/forwardRef(function (props, myRef) {
1055
+ var value = props.value,
1056
+ onChange = props.onChange;
1057
+ var _use_icon = use_icon(props),
1058
+ all_keys = _use_icon.all_keys,
1059
+ render_Icon = _use_icon.render_Icon;
1060
+ return /*#__PURE__*/React__default.createElement(Dropdown_L, {
1061
+ arrow: true,
1062
+ trigger: ['click'],
1063
+ popupRender: function popupRender(node) {
1064
+ return /*#__PURE__*/React__default.createElement(Card, {
1065
+ size: 'small',
1066
+ styles: {
1067
+ body: {
1068
+ width: 580,
1069
+ height: 360,
1070
+ overflowY: 'auto'
1071
+ }
1072
+ }
1073
+ }, /*#__PURE__*/React__default.createElement(List, {
1074
+ style: {},
1075
+ grid: {
1076
+ column: 12
1077
+ },
1078
+ dataSource: all_keys,
1079
+ renderItem: function renderItem(key) {
1080
+ return /*#__PURE__*/React__default.createElement(List.Item, {
1081
+ style: {
1082
+ cursor: 'pointer',
1083
+ background: key === value ? '#aaa' : '',
1084
+ padding: 12,
1085
+ display: 'flex',
1086
+ alignItems: 'center',
1087
+ justifyContent: 'center'
1088
+ },
1089
+ key: key,
1090
+ onClick: function onClick() {
1091
+ return onChange === null || onChange === void 0 ? void 0 : onChange(key);
1092
+ }
1093
+ }, render_Icon(key, {
1094
+ style: {
1095
+ fontSize: 20
1096
+ }
1097
+ }), node);
1098
+ }
1099
+ }));
1100
+ }
1101
+ }, /*#__PURE__*/React__default.createElement(MyInput, {
1102
+ addonBefore: render_Icon(value),
1103
+ placeholder: '请选择',
1104
+ value: value,
1105
+ allowClear: true,
1106
+ onChange: onChange,
1107
+ onClear: function onClear() {
1108
+ return onChange === null || onChange === void 0 ? void 0 : onChange('');
1109
+ }
1110
+ }));
1111
+ });
1112
+ function MyIcon(props) {
1113
+ var _use_icon2 = use_icon(props),
1114
+ render_Icon = _use_icon2.render_Icon;
1115
+ return render_Icon(props.value);
1116
+ }
1117
+ MyIconSelect.DisplayFC = MyIcon;
1118
+ function MyButton(props) {
1119
+ var btn_text = props.btn_text,
1120
+ defaultIcon = props.defaultIcon,
1121
+ onClick = props.onClick,
1122
+ form = props.form,
1123
+ children = props.children,
1124
+ icon = props.icon,
1125
+ loading = props.loading,
1126
+ primary = props.primary,
1127
+ hidden = props.hidden,
1128
+ on_btn_click = props.on_btn_click,
1129
+ others = _objectWithoutProperties(props, _excluded6);
1130
+ if (hidden) return null;
1131
+ var type = props.type;
1132
+ var _useState13 = useState(false),
1133
+ _useState14 = _slicedToArray(_useState13, 2),
1134
+ visible = _useState14[0],
1135
+ setVisible = _useState14[1];
1136
+ var _icon = visible ? defaultIcon !== null && defaultIcon !== void 0 ? defaultIcon : /*#__PURE__*/React__default.createElement(LoadingOutlined, null) : icon;
1137
+ if (primary) {
1138
+ type = 'primary';
1139
+ }
1140
+ useEffect(function () {
1141
+ if (loading) setVisible(false);
1142
+ }, [loading]);
1143
+ function on_click_call(_x) {
1144
+ return _on_click_call.apply(this, arguments);
1145
+ }
1146
+ function _on_click_call() {
1147
+ _on_click_call = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(e) {
1148
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
1149
+ while (1) switch (_context2.prev = _context2.next) {
1150
+ case 0:
1151
+ _context2.next = 2;
1152
+ return safe_async_call(onClick, e);
1153
+ case 2:
1154
+ _context2.next = 4;
1155
+ return safe_async_call(on_btn_click, e, form);
1156
+ case 4:
1157
+ case "end":
1158
+ return _context2.stop();
1159
+ }
1160
+ }, _callee2);
1161
+ }));
1162
+ return _on_click_call.apply(this, arguments);
1163
+ }
1164
+ function on_click(e) {
1165
+ if (visible) return;
1166
+ setVisible(true);
1167
+ safe_async_call(on_click_call, e)["finally"](/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
1168
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
1169
+ while (1) switch (_context.prev = _context.next) {
1170
+ case 0:
1171
+ _context.next = 2;
1172
+ return sleep(200);
1173
+ case 2:
1174
+ setVisible(false);
1175
+ case 3:
1176
+ case "end":
1177
+ return _context.stop();
1178
+ }
1179
+ }, _callee);
1180
+ })));
1181
+ }
1182
+ // const node = (visible) ? tip : (text ?? children)
1183
+ return /*#__PURE__*/React__default.createElement(Button$1, _objectSpread(_objectSpread({}, others), {}, {
1184
+ title: btn_text,
1185
+ icon: _icon,
1186
+ type: type,
1187
+ onClick: on_click
1188
+ }), btn_text !== null && btn_text !== void 0 ? btn_text : children);
1189
+ }
735
1190
  var packs = {
1191
+ MyIconSelect: MyIconSelect,
736
1192
  MI: MyInput,
737
1193
  input: MyInput,
738
1194
  Input: MyInput,
@@ -746,10 +1202,23 @@ var packs = {
746
1202
  single_date_picker: MyDatePicker,
747
1203
  CusDatePicker: MyDatePicker,
748
1204
  date: MyDatePicker,
1205
+ MyRangePicker: MyRangePicker,
1206
+ RangePicker: MyRangePicker,
1207
+ rangePicker: MyRangePicker,
1208
+ range_picker: MyRangePicker,
1209
+ MyRangeDate: MyRangeDate,
1210
+ RangeDate: MyRangeDate,
1211
+ rangeDate: MyRangeDate,
1212
+ range_date: MyRangeDate,
1213
+ MyRangeDateTime: MyRangeDateTime,
1214
+ RangeDateTime: MyRangeDateTime,
1215
+ rangeDateTime: MyRangeDateTime,
1216
+ range_date_time: MyRangeDateTime,
749
1217
  MyColor: MyColor,
750
1218
  MySwitch: MySwitch,
751
1219
  "switch": MySwitch,
752
1220
  Switch: MySwitch,
1221
+ MSW: MySwitch,
753
1222
  ArrayInput: ArrayInput,
754
1223
  MArr: ArrayInput,
755
1224
  MySelect: MySelect,
@@ -761,6 +1230,7 @@ var packs = {
761
1230
  MC: MyCheckbox,
762
1231
  checkbox: MyCheckbox,
763
1232
  // CheckboxWithInput: MyCheckbox,
1233
+ MyButton: MyButton,
764
1234
  MyAutoComplete: MyAutoComplete,
765
1235
  MA: MyAutoComplete,
766
1236
  AutoComplete: MyAutoComplete,
@@ -800,10 +1270,10 @@ var GlobalModal_ = /*#__PURE__*/function () {
800
1270
  }
801
1271
  return _createClass(GlobalModal_, [{
802
1272
  key: "confirmOnce",
803
- value: function confirmOnce(_ref8) {
804
- var storeKey = _ref8.storeKey,
805
- cb = _ref8.cb,
806
- others = _objectWithoutProperties(_ref8, _excluded3);
1273
+ value: function confirmOnce(_ref10) {
1274
+ var storeKey = _ref10.storeKey,
1275
+ cb = _ref10.cb,
1276
+ others = _objectWithoutProperties(_ref10, _excluded7);
807
1277
  var isAllow = localStorage.get(storeKey);
808
1278
  if (isNil(isAllow)) {
809
1279
  Modal.confirm(_objectSpread(_objectSpread({}, others), {}, {
@@ -901,10 +1371,10 @@ var GlobalModal = /*#__PURE__*/function () {
901
1371
  }
902
1372
  }, {
903
1373
  key: "confirmOnce",
904
- value: function confirmOnce(_ref9) {
905
- var storeKey = _ref9.storeKey,
906
- cb = _ref9.cb,
907
- others = _objectWithoutProperties(_ref9, _excluded4);
1374
+ value: function confirmOnce(_ref11) {
1375
+ var storeKey = _ref11.storeKey,
1376
+ cb = _ref11.cb,
1377
+ others = _objectWithoutProperties(_ref11, _excluded8);
908
1378
  var isAllow = localStorage.get(storeKey);
909
1379
  if (isNil(isAllow)) {
910
1380
  Modal.confirm(_objectSpread(_objectSpread({}, others), {}, {
@@ -926,10 +1396,10 @@ function MountGlobalModal(props) {
926
1396
  var meta = props.meta,
927
1397
  globalModal = props.globalModal;
928
1398
  // useNotification()
929
- var _useState9 = useState([]),
930
- _useState10 = _slicedToArray(_useState9, 2),
931
- modalQueue = _useState10[0],
932
- setModalQueue = _useState10[1];
1399
+ var _useState15 = useState([]),
1400
+ _useState16 = _slicedToArray(_useState15, 2),
1401
+ modalQueue = _useState16[0],
1402
+ setModalQueue = _useState16[1];
933
1403
  useEffect(function () {
934
1404
  globalModal.init(modalQueue, setModalQueue);
935
1405
  }, [modalQueue]);
@@ -938,10 +1408,10 @@ function MountGlobalModal(props) {
938
1408
  }
939
1409
  return /*#__PURE__*/React__default.createElement(Suspense, {
940
1410
  fallback: /*#__PURE__*/React__default.createElement("div", null, "loading MountGlobalModal ...")
941
- }, modalQueue.map(function (_ref10) {
942
- var name = _ref10.name,
943
- data = _ref10.data,
944
- id = _ref10.id;
1411
+ }, modalQueue.map(function (_ref12) {
1412
+ var name = _ref12.name,
1413
+ data = _ref12.data,
1414
+ id = _ref12.id;
945
1415
  var C = meta[name] || function () {
946
1416
  return null;
947
1417
  };
@@ -1007,4 +1477,4 @@ var ContainerDimensions = /*#__PURE__*/function (_Component) {
1007
1477
  }
1008
1478
  }]);
1009
1479
  }(Component);
1010
- export { ArrayInput as A, handle_form_error as B, Checkbox_L as C, DatePicker_L as D, get_check_invert_values as E, displayValue as F, GlobalModal_ as G, Calendar_L as H, AutoComplete_L as I, ColorPicker_L as J, Form_L as K, Dropdown_L as L, MonthPicker_L as M, Table_L as N, Tree_L as O, aa as P, Modal_L as Q, RangePicker_L as R, Select_L as S, TimePicker_L as T, UNKNOWN_TIME_SYMBOL as U, Pagination_L as V, SelectOption_L as W, TreeSelect_L as X, QRCode_L as Y, Switch_L as Z, ContainerDimensions as _, getMarshal as a, get_mode as b, check_multiple as c, parse_MC_value as d, parse_MC_dict_options as e, parse_MC_option as f, getInputStyle as g, formatDatePickerProps as h, getIsUnknown as i, get_unknown_conf as j, handleChangeValue as k, MyInput as l, MySelect as m, MyCheckbox_Display as n, MyCheckbox as o, packs as p, MyColor as q, MountGlobalModal as r, GlobalModal as s, MyMonaco as t, use_options as u, MyLazyComponent as v, isUrl as w, getArray as x, getFormat as y, getParamByName as z };
1480
+ export { AutoComplete_L as $, ArrayInput as A, MyIconSelect as B, Checkbox_L as C, DatePicker_L as D, MyAutoComplete as E, MyButton as F, MountGlobalModal as G, GlobalModal_ as H, GlobalModal as I, MyMonaco as J, MyLazyComponent as K, isUrl as L, MonthPicker_L as M, getArray as N, getFormat as O, getParamByName as P, handle_form_error as Q, RangePicker_L as R, Select_L as S, TimePicker_L as T, UNKNOWN_TIME_SYMBOL as U, form_validate as V, fuck_focus as W, get_check_invert_values as X, parse_MC_dict_options as Y, displayValue as Z, Calendar_L as _, getMarshal as a, ColorPicker_L as a0, Form_L as a1, Dropdown_L as a2, Table_L as a3, Tree_L as a4, Modal_L as a5, Pagination_L as a6, SelectOption_L as a7, TreeSelect_L as a8, QRCode_L as a9, Switch_L as aa, ContainerDimensions as ab, get_mode as b, check_multiple as c, parse_MC_value as d, areEqual as e, format_range_props as f, getInputStyle as g, handleChangeValue as h, parse_MC_option as i, get_status_cls as j, formatDatePickerProps as k, getIsUnknown as l, get_unknown_conf as m, handleChangeValue$1 as n, MyInput as o, packs as p, MySelect as q, MyCheckbox_Display as r, styleInject as s, MyCheckbox as t, use_options as u, MyRangePicker as v, MyRangeDate as w, MyRangeDateTime as x, MyColor as y, MyIcon as z };