@lm_fe/components 0.1.201 → 0.2.5

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 (187) hide show
  1. package/README.md +1 -1
  2. package/dist/keep-alive/common.d.ts +46 -0
  3. package/dist/keep-alive/components/AsyncComponent.d.ts +27 -0
  4. package/dist/keep-alive/components/Comment.d.ts +18 -0
  5. package/dist/keep-alive/components/Consumer.d.ts +20 -0
  6. package/dist/keep-alive/components/keepAlive.d.ts +4 -0
  7. package/dist/keep-alive/components/provider.d.ts +31 -0
  8. package/dist/keep-alive/contexts/IdentificationContext.d.ts +12 -0
  9. package/dist/keep-alive/contexts/KeepAliveContext.d.ts +5 -0
  10. package/dist/keep-alive/index.d.ts +7 -0
  11. package/dist/keep-alive/index.js +1901 -0
  12. package/dist/keep-alive/utils/bindLifecycle.d.ts +3 -0
  13. package/dist/keep-alive/utils/changePositionByComment.d.ts +1 -0
  14. package/dist/keep-alive/utils/createEventEmitter.d.ts +11 -0
  15. package/dist/keep-alive/utils/createStoreElement.d.ts +1 -0
  16. package/dist/keep-alive/utils/createUniqueIdentification.d.ts +8 -0
  17. package/dist/keep-alive/utils/debug.d.ts +3 -0
  18. package/dist/keep-alive/utils/getDisplayName.d.ts +2 -0
  19. package/dist/keep-alive/utils/getKeepAlive.d.ts +3 -0
  20. package/dist/keep-alive/utils/getKeyByFiberNode.d.ts +1 -0
  21. package/dist/keep-alive/utils/isRegExp.d.ts +1 -0
  22. package/dist/keep-alive/utils/keepAliveDecorator.d.ts +17 -0
  23. package/dist/keep-alive/utils/md5.d.ts +1 -0
  24. package/dist/keep-alive/utils/noop.d.ts +2 -0
  25. package/dist/keep-alive/utils/shallowEqual.d.ts +2 -0
  26. package/dist/keep-alive/utils/useKeepAliveEffect.d.ts +2 -0
  27. package/dist/keep-alive/utils/withIdentificationContextConsumer.d.ts +10 -0
  28. package/dist/keep-alive/utils/withKeepAliveContextConsumer.d.ts +10 -0
  29. package/dist/src/ArraySingle/Inner.d.ts +3 -0
  30. package/dist/src/ArraySingle/index.d.ts +2 -0
  31. package/dist/src/CaseTempleteEdit/Inner.d.ts +4 -0
  32. package/dist/src/CaseTempleteEdit/config.d.ts +20 -0
  33. package/dist/src/CaseTempleteEdit/index.d.ts +4 -0
  34. package/dist/src/CaseTempleteEdit/types.d.ts +19 -0
  35. package/dist/src/CaseTempleteEdit/utils.d.ts +2 -0
  36. package/dist/src/CaseTempleteEditEmr/Inner.d.ts +3 -0
  37. package/dist/src/CaseTempleteEditEmr/demo_text.d.ts +1 -0
  38. package/dist/src/CaseTempleteEditEmr/index.d.ts +2 -0
  39. package/dist/src/CaseTempleteEditEmr/types.d.ts +6 -0
  40. package/dist/src/CaseTempleteEditEmr/utils.d.ts +3 -0
  41. package/dist/{GlobalModal → src/GlobalModal}/index.d.ts +2 -1
  42. package/dist/src/LazyAntd/index.d.ts +17 -0
  43. package/dist/{Monaco → src/Monaco}/Inner.d.ts +1 -1
  44. package/dist/src/MyAddress/Inner.d.ts +3 -0
  45. package/dist/{MyImageEditor → src/MyImageEditor}/Inner.d.ts +1 -1
  46. package/dist/{MyImageEditor → src/MyImageEditor}/utils.d.ts +1 -1
  47. package/dist/{MyInput → src/MyInput}/index.d.ts +2 -2
  48. package/dist/{PDF_Frame_View → src/PDF_Frame_View}/utils.d.ts +1 -1
  49. package/dist/src/PatientSelect/Inner.d.ts +16 -0
  50. package/dist/src/PatientSelect/index.d.ts +3 -0
  51. package/dist/src/SimpleForm/Inner.d.ts +5 -0
  52. package/dist/{SimpleForm → src/SimpleForm}/components/TabForm/index.d.ts +3 -2
  53. package/dist/{SimpleForm → src/SimpleForm}/components/extra/Custom.d.ts +2 -1
  54. package/dist/{SimpleForm → src/SimpleForm}/components/index.d.ts +3 -6
  55. package/dist/src/SimpleForm/index.d.ts +17 -0
  56. package/dist/{SimpleForm/index.d.ts → src/SimpleForm/types.d.ts} +0 -14
  57. package/dist/src/a_chunks/ArraySingle.Inner.js +19 -0
  58. package/dist/src/a_chunks/CaseTempleteEdit.Inner.js +622 -0
  59. package/dist/src/a_chunks/CaseTempleteEditEmr.Inner.js +235 -0
  60. package/dist/{a_chunks/.root6.js → src/a_chunks/MyAddress.Inner.js} +38 -89
  61. package/dist/{a_chunks/.root4.js → src/a_chunks/MyImageEditor.Inner.js} +128 -179
  62. package/dist/{a_chunks/.root5.js → src/a_chunks/Old.InnerOld.js} +20 -59
  63. package/dist/{a_chunks/.root2.js → src/a_chunks/PDF_Frame_View.Inner.js} +11 -51
  64. package/dist/src/a_chunks/PatientSelect.Inner.js +281 -0
  65. package/dist/src/a_chunks/SimpleForm.Inner.js +318 -0
  66. package/dist/src/a_chunks/index.js +550 -0
  67. package/dist/src/a_chunks/style-inject.es.js +25 -0
  68. package/dist/src/config.d.ts +1 -0
  69. package/dist/{hooks → src/hooks}/index.d.ts +1 -0
  70. package/dist/src/hooks/use_fuck.d.ts +5 -0
  71. package/dist/src/index.d.ts +11 -0
  72. package/dist/src/index.js +10 -0
  73. package/dist/src/pack_components.d.ts +213 -0
  74. package/dist/src/utils/getInputStyle.d.ts +1 -0
  75. package/dist/src/utils/index.d.ts +1 -0
  76. package/dist/src/utils/other.d.ts +3 -0
  77. package/package.json +30 -26
  78. package/dist/ContainerDimensions2/index.d.ts +0 -10
  79. package/dist/LazyAntd/AutoComplete/Inner.d.ts +0 -4
  80. package/dist/LazyAntd/AutoComplete/index.d.ts +0 -4
  81. package/dist/LazyAntd/DatePicker/Base/Calendar.d.ts +0 -3
  82. package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +0 -11
  83. package/dist/LazyAntd/DatePicker/Base/index.d.ts +0 -12
  84. package/dist/LazyAntd/DatePicker/Base/props.d.ts +0 -14
  85. package/dist/LazyAntd/DatePicker/Calendar.d.ts +0 -4
  86. package/dist/LazyAntd/DatePicker/DatePicker.d.ts +0 -4
  87. package/dist/LazyAntd/DatePicker/MonthPicker.d.ts +0 -4
  88. package/dist/LazyAntd/DatePicker/RangePicker.d.ts +0 -4
  89. package/dist/LazyAntd/DatePicker/TimePicker.d.ts +0 -4
  90. package/dist/LazyAntd/DatePicker/index.d.ts +0 -5
  91. package/dist/LazyAntd/Dropdown/Button.d.ts +0 -2
  92. package/dist/LazyAntd/Dropdown/Inner.d.ts +0 -3
  93. package/dist/LazyAntd/Dropdown/index.d.ts +0 -10
  94. package/dist/LazyAntd/Form/FormItemInner.d.ts +0 -2
  95. package/dist/LazyAntd/Form/Inner.d.ts +0 -3
  96. package/dist/LazyAntd/Form/index.d.ts +0 -9
  97. package/dist/LazyAntd/Modal/Inner.d.ts +0 -4
  98. package/dist/LazyAntd/Modal/index.d.ts +0 -3
  99. package/dist/LazyAntd/Pagination/Inner.d.ts +0 -3
  100. package/dist/LazyAntd/Pagination/index.d.ts +0 -3
  101. package/dist/LazyAntd/Select/Inner.d.ts +0 -3
  102. package/dist/LazyAntd/Select/OptionInner.d.ts +0 -2
  103. package/dist/LazyAntd/Select/index.d.ts +0 -10
  104. package/dist/LazyAntd/Table/Inner.d.ts +0 -3
  105. package/dist/LazyAntd/Table/index.d.ts +0 -3
  106. package/dist/LazyAntd/Tree/DirectoryTreeInner.d.ts +0 -3
  107. package/dist/LazyAntd/Tree/Inner.d.ts +0 -3
  108. package/dist/LazyAntd/Tree/TreeNodeInner.d.ts +0 -4
  109. package/dist/LazyAntd/Tree/index.d.ts +0 -12
  110. package/dist/LazyAntd/TreeSelect/Inner.d.ts +0 -3
  111. package/dist/LazyAntd/TreeSelect/index.d.ts +0 -3
  112. package/dist/LazyAntd/index.d.ts +0 -25
  113. package/dist/MyAddress/Inner.d.ts +0 -3
  114. package/dist/QRCode/Inner.d.ts +0 -3
  115. package/dist/QRCode/index.d.ts +0 -2
  116. package/dist/QRCode/types.d.ts +0 -68
  117. package/dist/a_chunks/.root.js +0 -805
  118. package/dist/a_chunks/.root.js.map +0 -1
  119. package/dist/a_chunks/.root10.js +0 -8
  120. package/dist/a_chunks/.root10.js.map +0 -1
  121. package/dist/a_chunks/.root11.js +0 -7
  122. package/dist/a_chunks/.root11.js.map +0 -1
  123. package/dist/a_chunks/.root12.js +0 -8
  124. package/dist/a_chunks/.root12.js.map +0 -1
  125. package/dist/a_chunks/.root13.js +0 -4
  126. package/dist/a_chunks/.root13.js.map +0 -1
  127. package/dist/a_chunks/.root14.js +0 -8
  128. package/dist/a_chunks/.root14.js.map +0 -1
  129. package/dist/a_chunks/.root15.js +0 -7
  130. package/dist/a_chunks/.root15.js.map +0 -1
  131. package/dist/a_chunks/.root16.js +0 -8
  132. package/dist/a_chunks/.root16.js.map +0 -1
  133. package/dist/a_chunks/.root17.js +0 -8
  134. package/dist/a_chunks/.root17.js.map +0 -1
  135. package/dist/a_chunks/.root18.js +0 -8
  136. package/dist/a_chunks/.root18.js.map +0 -1
  137. package/dist/a_chunks/.root19.js +0 -8
  138. package/dist/a_chunks/.root19.js.map +0 -1
  139. package/dist/a_chunks/.root2.js.map +0 -1
  140. package/dist/a_chunks/.root20.js +0 -6
  141. package/dist/a_chunks/.root20.js.map +0 -1
  142. package/dist/a_chunks/.root21.js +0 -5
  143. package/dist/a_chunks/.root21.js.map +0 -1
  144. package/dist/a_chunks/.root3.js +0 -7
  145. package/dist/a_chunks/.root3.js.map +0 -1
  146. package/dist/a_chunks/.root4.js.map +0 -1
  147. package/dist/a_chunks/.root5.js.map +0 -1
  148. package/dist/a_chunks/.root6.js.map +0 -1
  149. package/dist/a_chunks/.root7.js +0 -8
  150. package/dist/a_chunks/.root7.js.map +0 -1
  151. package/dist/a_chunks/.root8.js +0 -8
  152. package/dist/a_chunks/.root8.js.map +0 -1
  153. package/dist/a_chunks/.root9.js +0 -7
  154. package/dist/a_chunks/.root9.js.map +0 -1
  155. package/dist/a_chunks/index.js +0 -1238
  156. package/dist/a_chunks/index.js.map +0 -1
  157. package/dist/index.d.ts +0 -11
  158. package/dist/index.js +0 -45
  159. package/dist/index.js.map +0 -1
  160. package/dist/pack_components.d.ts +0 -17
  161. package/dist/utils/getInputStyle.d.ts +0 -11
  162. package/dist/utils/index.d.ts +0 -2
  163. package/dist/utils/other.d.ts +0 -4
  164. /package/dist/{ContainerDimensions → src/ContainerDimensions}/index.d.ts +0 -0
  165. /package/dist/{GlobalModal → src/GlobalModal}/utils.d.ts +0 -0
  166. /package/dist/{Monaco → src/Monaco}/index.d.ts +0 -0
  167. /package/dist/{MyAddress → src/MyAddress}/Old/InnerOld.d.ts +0 -0
  168. /package/dist/{MyAddress → src/MyAddress}/Old/index.d.ts +0 -0
  169. /package/dist/{MyAddress → src/MyAddress}/Old/options.d.ts +0 -0
  170. /package/dist/{MyAddress → src/MyAddress}/index.d.ts +0 -0
  171. /package/dist/{MyAddress → src/MyAddress}/type.d.ts +0 -0
  172. /package/dist/{MyAddress → src/MyAddress}/utils.d.ts +0 -0
  173. /package/dist/{MyImageEditor → src/MyImageEditor}/index.d.ts +0 -0
  174. /package/dist/{MyImageEditor → src/MyImageEditor}/init_delete_control.d.ts +0 -0
  175. /package/dist/{MyInput → src/MyInput}/types.d.ts +0 -0
  176. /package/dist/{MyLazyComponent → src/MyLazyComponent}/index.d.ts +0 -0
  177. /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/Inner.d.ts +0 -0
  178. /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/index.d.ts +0 -0
  179. /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/types.d.ts +0 -0
  180. /package/dist/{SimpleForm → src/SimpleForm}/components/extra/MultiInput.d.ts +0 -0
  181. /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SimpleSelect.d.ts +0 -0
  182. /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SwitchSelect.d.ts +0 -0
  183. /package/dist/{SimpleForm → src/SimpleForm}/types/help.d.ts +0 -0
  184. /package/dist/{SimpleForm → src/SimpleForm}/types/metaTypes.d.ts +0 -0
  185. /package/dist/{hooks → src/hooks}/useMchcDriverStatus.d.ts +0 -0
  186. /package/dist/{hooks → src/hooks}/useMyEffect.d.ts +0 -0
  187. /package/dist/{style → src/style}/index.d.ts +0 -0
@@ -1,1238 +0,0 @@
1
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
2
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
- import _createClass from "@babel/runtime/helpers/createClass";
7
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
8
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
9
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
10
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
- var _fabric$fabric;
12
- var _excluded = ["width", "style", "placeholder", "name", "warn", "form", "onBlur", "onFocus", "value", "onChange"],
13
- _excluded2 = ["storeKey", "cb"],
14
- _excluded3 = ["storeKey", "cb"],
15
- _excluded4 = ["optionsArr", "type"],
16
- _excluded5 = ["optionsArr", "value", "onChange"],
17
- _excluded6 = ["CustomedComponent", "value", "onChange"],
18
- _excluded7 = ["value", "formSchema", "onChange", "title", "style"];
19
- import _regeneratorRuntime from "@babel/runtime/regenerator";
20
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
21
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
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; }
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; }
24
- import 'antd/es/input/style';
25
- import _Input from 'antd/es/input';
26
- import * as React$1 from 'react';
27
- import React__default, { forwardRef, useState, useEffect, Suspense, lazy, useImperativeHandle, Component } from 'react';
28
- import { mchcEvent, mchcEnv, address_options, mchcDriver } from '@lm_fe/env';
29
- import 'antd/es/skeleton/style';
30
- import _Skeleton from 'antd/es/skeleton';
31
- import _fabric from 'fabric';
32
- import _map from 'lodash/map';
33
- import _get from 'lodash/get';
34
- import 'antd/es/modal/style';
35
- import _Modal from 'antd/es/modal';
36
- import _isNil from 'lodash/isNil';
37
- import 'antd/es/row/style';
38
- import _Row from 'antd/es/row';
39
- import 'antd/es/col/style';
40
- import _Col from 'antd/es/col';
41
- import 'antd/es/form/style';
42
- import _Form from 'antd/es/form';
43
- import 'antd/es/divider/style';
44
- import _Divider from 'antd/es/divider';
45
- import 'antd/es/slider/style';
46
- import _Slider from 'antd/es/slider';
47
- import 'antd/es/rate/style';
48
- import _Rate from 'antd/es/rate';
49
- import 'antd/es/switch/style';
50
- import _Switch from 'antd/es/switch';
51
- import 'antd/es/time-picker/style';
52
- import _TimePicker from 'antd/es/time-picker';
53
- import 'antd/es/checkbox/style';
54
- import _Checkbox from 'antd/es/checkbox';
55
- import 'antd/es/input-number/style';
56
- import _InputNumber from 'antd/es/input-number';
57
- import 'antd/es/radio/style';
58
- import _Radio from 'antd/es/radio';
59
- import 'antd/es/date-picker/style';
60
- import _DatePicker from 'antd/es/date-picker';
61
- import { getMomentRange } from '@lm_fe/utils';
62
- import TreeNode from 'rc-tree/es/TreeNode';
63
- import 'antd/es/tabs/style';
64
- import _Tabs from 'antd/es/tabs';
65
- import { lm_pdfjs_info } from '@lm_fe/static';
66
- import { SLocal_SystemConfig } from '@lm_fe/service';
67
- import { useKeepAliveEffect } from 'react-keep-alive-pro';
68
- function _extends() {
69
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
70
- for (var e = 1; e < arguments.length; e++) {
71
- var t = arguments[e];
72
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
73
- }
74
- return n;
75
- }, _extends.apply(null, arguments);
76
- }
77
- function getInputStyle() {
78
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
79
- var _props$style = props.style,
80
- style = _props$style === void 0 ? {} : _props$style,
81
- width = props.width,
82
- inputWidth = props.inputWidth,
83
- disabled = props.disabled;
84
- if (width) {
85
- style.width = width;
86
- }
87
- return _objectSpread({}, style);
88
- }
89
- function isUrl(string) {
90
- var protocolRE = /^(?:\w+:)?\/\/(\S+)$/;
91
- // const domainRE = /^[^\s\.]+\.\S{2,}$/;
92
- if (typeof string !== 'string') return false;
93
- return protocolRE.test(string);
94
- }
95
- var getArray = function getArray(arr) {
96
- var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
97
- if (Array.isArray(arr)) return arr;
98
- return defaultValue;
99
- };
100
- function getFormat(format) {
101
- var dateFormat;
102
- switch (format) {
103
- case 'date':
104
- dateFormat = 'YYYY-MM-DD';
105
- break;
106
- case 'time':
107
- dateFormat = 'HH:mm:ss';
108
- break;
109
- case 'dateTime':
110
- dateFormat = 'YYYY-MM-DD HH:mm:ss';
111
- break;
112
- case 'week':
113
- dateFormat = 'YYYY-w';
114
- break;
115
- case 'year':
116
- dateFormat = 'YYYY';
117
- break;
118
- case 'quarter':
119
- dateFormat = 'YYYY-Q';
120
- break;
121
- case 'month':
122
- dateFormat = 'YYYY-MM';
123
- break;
124
- default:
125
- // dateTime
126
- if (typeof format === 'string') {
127
- dateFormat = format;
128
- } else {
129
- dateFormat = 'YYYY-MM-DD';
130
- }
131
- }
132
- return dateFormat;
133
- }
134
- function getParamByName(name) {
135
- var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
136
- name = name.replace(/[\[\]]/g, '\\$&');
137
- var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
138
- results = regex.exec(url);
139
- if (!results) return null;
140
- if (!results[2]) return '';
141
- return decodeURIComponent(results[2].replace(/\+/g, ' '));
142
- }
143
- var MyInput = /*#__PURE__*/forwardRef(function (props, myRef) {
144
- var width = props.width,
145
- _props$style2 = props.style,
146
- style = _props$style2 === void 0 ? {} : _props$style2,
147
- placeholder = props.placeholder,
148
- name = props.name,
149
- _props$warn = props.warn,
150
- warn = _props$warn === void 0 ? false : _props$warn,
151
- form = props.form,
152
- _onBlur = props.onBlur,
153
- _onFocus = props.onFocus,
154
- value = props.value,
155
- _onChange = props.onChange,
156
- others = _objectWithoutProperties(props, _excluded);
157
- var _useState = useState(value),
158
- _useState2 = _slicedToArray(_useState, 2),
159
- _value = _useState2[0],
160
- set_value = _useState2[1];
161
- useEffect(function () {
162
- set_value(value);
163
- }, [value]);
164
- var _style = getInputStyle(props);
165
- if (warn) {
166
- _style.color = 'red';
167
- }
168
- return /*#__PURE__*/React__default.createElement(_Input, _extends({
169
- title: JSON.stringify(_style),
170
- ref: myRef,
171
- value: _value,
172
- onChange: function onChange(e) {
173
- var v = e.target.value;
174
- set_value(v);
175
- _onChange === null || _onChange === void 0 || _onChange(v);
176
- },
177
- onBlur: function onBlur(e) {
178
- _onBlur === null || _onBlur === void 0 || _onBlur(e);
179
- mchcEvent.emit('my_form', {
180
- type: 'onBlur',
181
- name: name,
182
- value: value,
183
- form: form
184
- });
185
- },
186
- onFocus: function onFocus(e) {
187
- _onFocus === null || _onFocus === void 0 || _onFocus(e);
188
- mchcEvent.emit('my_form', {
189
- type: 'onFocus',
190
- name: name,
191
- value: value,
192
- form: form
193
- });
194
- },
195
- style: _style
196
- }, others, {
197
- // placeholder={placeholder ?? '请输入'}
198
- placeholder: '请输入'
199
- }));
200
- });
201
- var MyLazyComponent = function MyLazyComponent(props) {
202
- var children = props.children,
203
- fallback = props.fallback,
204
- _props$size = props.size,
205
- size = _props$size === void 0 ? 'small' : _props$size;
206
- var m = {
207
- tiny: 2,
208
- small: 4,
209
- middle: 8,
210
- large: 16
211
- };
212
- var rows = m[size];
213
- return /*#__PURE__*/React__default.createElement(Suspense, {
214
- fallback: fallback !== null && fallback !== void 0 ? fallback : /*#__PURE__*/React__default.createElement("div", {
215
- style: {
216
- padding: 24
217
- }
218
- }, /*#__PURE__*/React__default.createElement(_Skeleton, {
219
- paragraph: {
220
- rows: rows
221
- }
222
- }))
223
- }, children);
224
- };
225
- var real_fabric = (_fabric$fabric = _fabric.fabric) !== null && _fabric$fabric !== void 0 ? _fabric$fabric : _fabric;
226
- var default_legends = [{
227
- img: mchcEnv.gs(function (_) {
228
- return _.lm_imgs.mie['img1.png'];
229
- }),
230
- width: 331,
231
- height: 144,
232
- label: '女性外生殖器'
233
- }, {
234
- img: mchcEnv.gs(function (_) {
235
- return _.lm_imgs.mie['img2.png'];
236
- }),
237
- width: 305,
238
- height: 213,
239
- label: '子宫'
240
- }, {
241
- img: mchcEnv.gs(function (_) {
242
- return _.lm_imgs.mie['img3.png'];
243
- }),
244
- width: 68,
245
- height: 67,
246
- label: '细菌'
247
- }, {
248
- img: mchcEnv.gs(function (_) {
249
- return _.lm_imgs.mie['img4.png'];
250
- }),
251
- width: 52,
252
- height: 59,
253
- label: '宫颈癌病毒'
254
- }, {
255
- img: mchcEnv.gs(function (_) {
256
- return _.lm_imgs.mie['img5.png'];
257
- }),
258
- width: 70,
259
- height: 70,
260
- label: '阴道滴虫'
261
- }];
262
- var MyImageEditorEvents = {
263
- save: 'mie:save',
264
- create: 'mie:create'
265
- };
266
- function event_process(con, __events) {
267
- con.on('drop', __events.drop).on('mouse:down', __events['mouse:down']).on('mouse:move', __events['mouse:move']).on('mouse:up', __events['mouse:up']).on('mouse:over', __events['mouse:over']).on('mouse:out', __events['mouse:out']).on('object:added', __events['object:added']);
268
- return function () {
269
- con.off('drop', __events.drop).off('mouse:down', __events['mouse:down']).off('mouse:move', __events['mouse:move']).off('mouse:up', __events['mouse:up']).off('mouse:over', __events['mouse:over']).off('mouse:out', __events['mouse:out']).off('object:added', __events['object:added']);
270
- };
271
- }
272
- var GynaecologyImageEditorInner = /*#__PURE__*/lazy(function () {
273
- return import('./.root4.js');
274
- });
275
- function MyImageEditor__(props) {
276
- return /*#__PURE__*/React__default.createElement(MyLazyComponent, null, /*#__PURE__*/React__default.createElement(GynaecologyImageEditorInner, props));
277
- }
278
- var MyImageEditor = Object.assign(MyImageEditor__, {
279
- events: MyImageEditorEvents
280
- });
281
- var GynaecologyImageEditor = MyImageEditor;
282
- function get_address_options_base() {
283
- return _get_address_options_base.apply(this, arguments);
284
- }
285
- function _get_address_options_base() {
286
- _get_address_options_base = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
287
- var MAINLAND, OVERSEA, HKMOTW, STREETS, _mainland, _hkmotw, _oversea;
288
- return _regeneratorRuntime.wrap(function _callee$(_context) {
289
- while (1) switch (_context.prev = _context.next) {
290
- case 0:
291
- _context.next = 2;
292
- return address_options.MAINLAND();
293
- case 2:
294
- MAINLAND = _context.sent;
295
- _context.next = 5;
296
- return address_options.OVERSEA();
297
- case 5:
298
- OVERSEA = _context.sent;
299
- _context.next = 8;
300
- return address_options.HKMOTW();
301
- case 8:
302
- HKMOTW = _context.sent;
303
- _context.next = 11;
304
- return address_options.STREETS();
305
- case 11:
306
- STREETS = _context.sent;
307
- _mainland = Object.keys(MAINLAND).map(function (provinceName) {
308
- var provinceItem = MAINLAND[provinceName];
309
- return {
310
- label: provinceName,
311
- value: provinceName,
312
- children: Object.keys(provinceItem).map(function (cityName) {
313
- var cityItem = provinceItem[cityName];
314
- return {
315
- label: cityName,
316
- value: cityName,
317
- children: cityItem.map(function (area) {
318
- var areaItem = STREETS[provinceName] && STREETS[provinceName][cityName] && STREETS[provinceName][cityName][area];
319
- return {
320
- label: area,
321
- value: area,
322
- children: areaItem && Object.keys(areaItem).map(function (streetName) {
323
- var streetItem = areaItem[streetName];
324
- return {
325
- label: streetName,
326
- value: streetName,
327
- children: streetItem.map(function (village) {
328
- return {
329
- label: village,
330
- value: village
331
- };
332
- })
333
- };
334
- })
335
- };
336
- })
337
- };
338
- })
339
- };
340
- });
341
- _hkmotw = Object.keys(HKMOTW).map(function (provinceName) {
342
- var provinceItem = HKMOTW[provinceName];
343
- return {
344
- label: provinceName,
345
- value: provinceName,
346
- children: Object.keys(provinceItem).map(function (cityName) {
347
- var cityItem = provinceItem[cityName];
348
- return {
349
- label: cityName,
350
- value: cityName,
351
- children: cityItem.map(function (area) {
352
- return {
353
- label: area,
354
- value: area
355
- };
356
- })
357
- };
358
- })
359
- };
360
- });
361
- _oversea = Object.keys(OVERSEA).map(function (provinceName) {
362
- var provinceItem = OVERSEA[provinceName];
363
- return {
364
- label: provinceName,
365
- value: provinceName,
366
- children: Object.keys(provinceItem).map(function (cityName) {
367
- var cityItem = provinceItem[cityName];
368
- return {
369
- label: cityItem,
370
- value: cityItem
371
- };
372
- })
373
- };
374
- });
375
- return _context.abrupt("return", [_mainland, _hkmotw, _oversea]);
376
- case 16:
377
- case "end":
378
- return _context.stop();
379
- }
380
- }, _callee);
381
- }));
382
- return _get_address_options_base.apply(this, arguments);
383
- }
384
- function get_options_without_street() {
385
- return _get_options_without_street.apply(this, arguments);
386
- }
387
- function _get_options_without_street() {
388
- _get_options_without_street = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
389
- var all, newOptions;
390
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
391
- while (1) switch (_context2.prev = _context2.next) {
392
- case 0:
393
- _context2.next = 2;
394
- return get_address_options_base();
395
- case 2:
396
- all = _context2.sent;
397
- newOptions = _map(all, function (option) {
398
- if (_get(option, 'value') === '广东省') {
399
- return {
400
- children: _map(_get(option, 'children'), function (item) {
401
- return {
402
- label: _get(item, 'label'),
403
- value: _get(item, 'value'),
404
- children: _map(_get(item, 'children'), function (city) {
405
- return {
406
- label: _get(city, 'label'),
407
- value: _get(city, 'value')
408
- };
409
- })
410
- };
411
- }),
412
- label: _get(option, 'label'),
413
- value: _get(option, 'value')
414
- };
415
- }
416
- return option;
417
- });
418
- return _context2.abrupt("return", newOptions);
419
- case 5:
420
- case "end":
421
- return _context2.stop();
422
- }
423
- }, _callee2);
424
- }));
425
- return _get_options_without_street.apply(this, arguments);
426
- }
427
- function get_old_address_options() {
428
- return _get_old_address_options.apply(this, arguments);
429
- }
430
- function _get_old_address_options() {
431
- _get_old_address_options = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
432
- var street,
433
- _args3 = arguments;
434
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
435
- while (1) switch (_context3.prev = _context3.next) {
436
- case 0:
437
- street = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : true;
438
- return _context3.abrupt("return", street ? get_address_options_base() : get_options_without_street());
439
- case 2:
440
- case "end":
441
- return _context3.stop();
442
- }
443
- }, _callee3);
444
- }));
445
- return _get_old_address_options.apply(this, arguments);
446
- }
447
- var MyAddressOld = /*#__PURE__*/lazy(function () {
448
- return import('./.root5.js');
449
- });
450
- var MyAddressNew_ = /*#__PURE__*/lazy(function () {
451
- return import('./.root6.js');
452
- });
453
- function MyAddress(props) {
454
- if (mchcEnv["in"](['建瓯', '广三', '郫都', '广州市八', '南医附属'])) {
455
- return /*#__PURE__*/React__default.createElement(MyAddressNew_, props);
456
- }
457
- return /*#__PURE__*/React__default.createElement(MyAddressOld, props);
458
- }
459
- function MyAddressNew(props) {
460
- return /*#__PURE__*/React__default.createElement(MyAddressNew_, props);
461
- }
462
- var pack_components = {
463
- MI: MyInput,
464
- input: MyInput,
465
- Input: MyInput,
466
- MyInput: MyInput,
467
- MyAddress: MyAddress,
468
- MyImageEditor: MyImageEditor
469
- };
470
- var GlobalModal_ = /*#__PURE__*/function () {
471
- function GlobalModal_() {
472
- _classCallCheck(this, GlobalModal_);
473
- _defineProperty(this, "open", void 0);
474
- _defineProperty(this, "openOne", void 0);
475
- _defineProperty(this, "pop", void 0);
476
- _defineProperty(this, "destroyAll", void 0);
477
- }
478
- return _createClass(GlobalModal_, [{
479
- key: "confirmOnce",
480
- value: function confirmOnce(_ref) {
481
- var storeKey = _ref.storeKey,
482
- cb = _ref.cb,
483
- others = _objectWithoutProperties(_ref, _excluded2);
484
- var isAllow = store.get(storeKey);
485
- if (_isNil(isAllow)) {
486
- _Modal.confirm(_objectSpread(_objectSpread({}, others), {}, {
487
- onOk: function onOk() {
488
- store.set(storeKey, true);
489
- cb();
490
- },
491
- onCancel: function onCancel() {
492
- store.set(storeKey, false);
493
- }
494
- }));
495
- } else if (isAllow) {
496
- cb();
497
- }
498
- }
499
- }]);
500
- }();
501
- var GlobalModal = /*#__PURE__*/function () {
502
- function GlobalModal() {
503
- var _this = this;
504
- _classCallCheck(this, GlobalModal);
505
- _defineProperty(this, "stack", []);
506
- _defineProperty(this, "setStack", function (a) {
507
- _this.stack = a;
508
- });
509
- }
510
- return _createClass(GlobalModal, [{
511
- key: "init",
512
- value: function init(stack, setStack) {
513
- this.stack = stack;
514
- this.setStack = setStack;
515
- }
516
- }, {
517
- key: "open",
518
- value: function open(name, data) {
519
- var id = +new Date();
520
- this.stack.push({
521
- name: name,
522
- data: data,
523
- id: id
524
- });
525
- this.setStack(_toConsumableArray(this.stack));
526
- return id;
527
- }
528
- }, {
529
- key: "openOne",
530
- value: function openOne(id, name, data) {
531
- var _id = id > 0 ? id : +new Date();
532
- var idx = this.stack.findIndex(function (_) {
533
- return _.id === _id;
534
- });
535
- if (idx === -1) {
536
- this.stack.push({
537
- name: name,
538
- data: data,
539
- id: _id
540
- });
541
- } else {
542
- this.stack.splice(idx, 1, _objectSpread(_objectSpread({}, this.stack[idx]), {}, {
543
- name: name,
544
- data: data
545
- }));
546
- }
547
- this.setStack(_toConsumableArray(this.stack));
548
- return _id;
549
- }
550
- }, {
551
- key: "pop",
552
- value: function pop(status, e) {
553
- var last = this.stack.pop();
554
- this.clear_one(last, status, e);
555
- this.setStack(_toConsumableArray(this.stack));
556
- }
557
- }, {
558
- key: "clear_one",
559
- value: function clear_one(item, status, e) {
560
- var config = item === null || item === void 0 ? void 0 : item.data;
561
- if (config) {
562
- var _config$onClose;
563
- if (status) {
564
- var _config$onOk;
565
- (_config$onOk = config.onOk) === null || _config$onOk === void 0 || _config$onOk.call(config, e);
566
- } else {
567
- var _config$onCancel;
568
- (_config$onCancel = config.onCancel) === null || _config$onCancel === void 0 || _config$onCancel.call(config, e);
569
- }
570
- (_config$onClose = config.onClose) === null || _config$onClose === void 0 || _config$onClose.call(config, status);
571
- }
572
- }
573
- }, {
574
- key: "destroyAll",
575
- value: function destroyAll() {
576
- var _this2 = this;
577
- this.stack.forEach(function (_) {
578
- return _this2.clear_one(_, false, undefined);
579
- });
580
- this.setStack([]);
581
- }
582
- }, {
583
- key: "confirmOnce",
584
- value: function confirmOnce(_ref2) {
585
- var storeKey = _ref2.storeKey,
586
- cb = _ref2.cb,
587
- others = _objectWithoutProperties(_ref2, _excluded3);
588
- var isAllow = store.get(storeKey);
589
- console.log('isAllow', isAllow);
590
- if (_isNil(isAllow)) {
591
- _Modal.confirm(_objectSpread(_objectSpread({}, others), {}, {
592
- onOk: function onOk() {
593
- store.set(storeKey, true);
594
- cb();
595
- },
596
- onCancel: function onCancel() {
597
- store.set(storeKey, false);
598
- }
599
- }));
600
- } else if (isAllow) {
601
- cb();
602
- }
603
- }
604
- }]);
605
- }();
606
- function MountGlobalModal(props) {
607
- var meta = props.meta,
608
- globalModal = props.globalModal;
609
- // useNotification()
610
- var _useState3 = useState([]),
611
- _useState4 = _slicedToArray(_useState3, 2),
612
- modalQueue = _useState4[0],
613
- setModalQueue = _useState4[1];
614
- useEffect(function () {
615
- globalModal.init(modalQueue, setModalQueue);
616
- }, [modalQueue]);
617
- function do_pop(status, e) {
618
- globalModal.pop(status, e);
619
- }
620
- return /*#__PURE__*/React__default.createElement(Suspense, {
621
- fallback: /*#__PURE__*/React__default.createElement("div", null, "loading MountGlobalModal ...")
622
- }, modalQueue.map(function (_ref3) {
623
- var name = _ref3.name,
624
- data = _ref3.data,
625
- id = _ref3.id;
626
- var C = meta[name] || function () {
627
- return null;
628
- };
629
- return /*#__PURE__*/React__default.createElement(MyLazyComponent, {
630
- fallback: ""
631
- }, /*#__PURE__*/React__default.createElement(C, _extends({
632
- maskClosable: false,
633
- key: id,
634
- visible: true,
635
- centered: true
636
- }, data, {
637
- close: do_pop,
638
- onOk: function onOk(e) {
639
- do_pop(true, e);
640
- },
641
- onCancel: function onCancel(e) {
642
- do_pop(false, e);
643
- }
644
- })));
645
- }));
646
- }
647
- var Inner$8 = /*#__PURE__*/React__default.lazy(function () {
648
- return import('./.root14.js');
649
- });
650
- var OptionInner = /*#__PURE__*/React__default.lazy(function () {
651
- return import('./.root15.js');
652
- });
653
- function Select_(props) {
654
- return /*#__PURE__*/React__default.createElement(Inner$8, props);
655
- }
656
- function SelectOption(props) {
657
- return /*#__PURE__*/React__default.createElement(OptionInner, props);
658
- }
659
- var Select$2 = Object.assign(Select_, {
660
- Option: SelectOption
661
- });
662
- function SimpleSelect(props) {
663
- var optionsArr = props.optionsArr,
664
- _props$type = props.type,
665
- type = _props$type === void 0 ? 'Select' : _props$type,
666
- others = _objectWithoutProperties(props, _excluded4);
667
- if (type === 'Select') return /*#__PURE__*/React__default.createElement(Select$2, _extends({}, others, {
668
- options: optionsArr.map(function (label, value) {
669
- return {
670
- label: label,
671
- value: value
672
- };
673
- })
674
- }));
675
- //@ts-ignore
676
- return /*#__PURE__*/React__default.createElement(_Radio.Group, _extends({}, others, {
677
- options: optionsArr.map(function (label, value) {
678
- return {
679
- label: label,
680
- value: value
681
- };
682
- })
683
- }));
684
- }
685
- var DatePickerInner = /*#__PURE__*/lazy(function () {
686
- return import('./.root20.js').then(function (r) {
687
- return {
688
- "default": r.DatePicker
689
- };
690
- });
691
- });
692
- var RangePickerInner = /*#__PURE__*/lazy(function () {
693
- return import('./.root20.js').then(function (r) {
694
- return {
695
- "default": r.DatePicker.RangePicker
696
- };
697
- });
698
- });
699
- var MonthPickerInner = /*#__PURE__*/lazy(function () {
700
- return import('./.root20.js').then(function (r) {
701
- return {
702
- "default": r.DatePicker.MonthPicker
703
- };
704
- });
705
- });
706
- var TimePickerInner = /*#__PURE__*/lazy(function () {
707
- return import('./.root20.js').then(function (r) {
708
- return {
709
- "default": r.DatePicker.TimePicker
710
- };
711
- });
712
- });
713
- var CalendarInner = /*#__PURE__*/lazy(function () {
714
- return import('./.root21.js');
715
- });
716
- var DatePicker_L = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
717
- return /*#__PURE__*/React$1.createElement(DatePickerInner, _extends({}, props, {
718
- ref: ref
719
- }));
720
- });
721
- DatePicker_L.displayName = 'TimePicker';
722
- var TimePicker_L = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
723
- return /*#__PURE__*/React$1.createElement(TimePickerInner, _extends({}, props, {
724
- ref: ref
725
- }));
726
- });
727
- TimePicker_L.displayName = 'TimePicker';
728
- var MonthPicker_L = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
729
- return /*#__PURE__*/React$1.createElement(MonthPickerInner, _extends({}, props, {
730
- ref: ref
731
- }));
732
- });
733
- MonthPicker_L.displayName = 'TimePicker';
734
- var RangePicker_L = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
735
- return /*#__PURE__*/React__default.createElement(RangePickerInner, _extends({
736
- ranges: getMomentRange()
737
- }, props, {
738
- ref: ref
739
- }));
740
- });
741
- RangePicker_L.displayName = 'RangePicker';
742
- var Calendar_L = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
743
- return /*#__PURE__*/React$1.createElement(CalendarInner, props);
744
- });
745
- Calendar_L.displayName = 'TimePicker';
746
- var Inner$7 = /*#__PURE__*/React$1.lazy(function () {
747
- return import('./.root7.js');
748
- });
749
- var AutoComplete_L = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
750
- return /*#__PURE__*/React$1.createElement(Inner$7, props);
751
- });
752
- AutoComplete_L.displayName = 'AutoComplete';
753
- var Inner$6 = /*#__PURE__*/React__default.lazy(function () {
754
- return import('./.root8.js');
755
- });
756
- var ButtonInner = /*#__PURE__*/React__default.lazy(function () {
757
- return import('./.root9.js');
758
- });
759
- var Dropdown_ = function Dropdown_(props) {
760
- return /*#__PURE__*/React__default.createElement(Inner$6, props);
761
- };
762
- function Button(props) {
763
- return /*#__PURE__*/React__default.createElement(ButtonInner, props);
764
- }
765
- var Dropdown$2 = Object.assign(Dropdown_, {
766
- Button: Button
767
- });
768
- var Inner$5 = /*#__PURE__*/React__default.lazy(function () {
769
- return import('./.root10.js');
770
- });
771
- var FormItemInner = /*#__PURE__*/React__default.lazy(function () {
772
- return import('./.root11.js');
773
- });
774
- function Form_(props) {
775
- return /*#__PURE__*/React__default.createElement(Inner$5, props);
776
- }
777
- var Form = Object.assign(Form_, {
778
- Item: FormItemInner
779
- });
780
- var Inner$4 = /*#__PURE__*/React__default.lazy(function () {
781
- return import('./.root12.js');
782
- });
783
- function Modal(props) {
784
- return /*#__PURE__*/React__default.createElement(Inner$4, props);
785
- }
786
- var Inner$3 = /*#__PURE__*/React__default.lazy(function () {
787
- return import('./.root13.js');
788
- });
789
- function Pagination$2(props) {
790
- return /*#__PURE__*/React__default.createElement(Inner$3, props);
791
- }
792
- var Inner$2 = /*#__PURE__*/React__default.lazy(function () {
793
- return import('./.root16.js');
794
- });
795
- function Table$2(props) {
796
- return /*#__PURE__*/React__default.createElement(Inner$2, props);
797
- }
798
- var Inner$1 = /*#__PURE__*/React__default.lazy(function () {
799
- return import('./.root17.js');
800
- });
801
- var DirectoryTreeInner = /*#__PURE__*/React__default.lazy(function () {
802
- return import('./.root18.js');
803
- });
804
- function Tree_(props) {
805
- return /*#__PURE__*/React__default.createElement(Inner$1, props);
806
- }
807
- function DirectoryTree(props) {
808
- return /*#__PURE__*/React__default.createElement(DirectoryTreeInner, props);
809
- }
810
- var Tree$2 = Object.assign(Tree_, {
811
- TreeNode: TreeNode,
812
- DirectoryTree: DirectoryTree
813
- });
814
- var Inner = /*#__PURE__*/React__default.lazy(function () {
815
- return import('./.root19.js');
816
- });
817
- function TreeSelect$2(props) {
818
- return /*#__PURE__*/React__default.createElement(Inner, props);
819
- }
820
-
821
- // import { DatePicker_L, RangePicker_L, TimePicker_L } from "./DatePicker";
822
- var LazyAntd = {
823
- Table: Table$2,
824
- Tree: Tree$2,
825
- TreeSelect: TreeSelect$2,
826
- Select: Select$2,
827
- Dropdown: Dropdown$2,
828
- Pagination: Pagination$2,
829
- Modal: Modal,
830
- Form: Form
831
- };
832
- var Tree$1 = LazyAntd.Tree,
833
- TreeSelect$1 = LazyAntd.TreeSelect,
834
- Select$1 = LazyAntd.Select,
835
- Table$1 = LazyAntd.Table,
836
- Dropdown$1 = LazyAntd.Dropdown,
837
- Pagination$1 = LazyAntd.Pagination;
838
- function MultiInput(props) {
839
- var optionsArr = props.optionsArr,
840
- _props$value = props.value,
841
- value = _props$value === void 0 ? "" : _props$value,
842
- _onChange2 = props.onChange,
843
- others = _objectWithoutProperties(props, _excluded5);
844
- var _value = value ? value.split(',').filter(function (_) {
845
- return _;
846
- }) : [];
847
- return /*#__PURE__*/React__default.createElement(Select$1, _extends({
848
- mode: "tags",
849
- value: _value,
850
- onChange: function onChange(v) {
851
- return _onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2.call(null, v.join(','), []);
852
- }
853
- }, others));
854
- }
855
- function Custom(props) {
856
- var CustomedComponent = props.CustomedComponent,
857
- value = props.value,
858
- onChange = props.onChange,
859
- others = _objectWithoutProperties(props, _excluded6);
860
- //@ts-ignore
861
- return /*#__PURE__*/React.createElement(CustomedComponent, _extends({
862
- value: value,
863
- onChange: onChange
864
- }, others));
865
- }
866
- function SwitchSelect(props) {
867
- var value = props.value;
868
- return /*#__PURE__*/React__default.createElement(Select$2, _extends({}, props, {
869
- value: typeof value === 'undefined' ? value : +value,
870
- options: ['否', '是'].map(function (_, idx) {
871
- return {
872
- label: _,
873
- value: idx
874
- };
875
- }),
876
- onChange: function onChange(a, b) {
877
- var _props$onChange;
878
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, typeof a === 'undefined' ? a : !!a, b);
879
- }
880
- }));
881
- }
882
- function TabForm(_ref4) {
883
- var _ref4$value = _ref4.value,
884
- value = _ref4$value === void 0 ? [] : _ref4$value,
885
- formSchema = _ref4.formSchema,
886
- onChange = _ref4.onChange,
887
- title = _ref4.title,
888
- style = _ref4.style,
889
- others = _objectWithoutProperties(_ref4, _excluded7);
890
- var actions = {
891
- add: function add(e) {
892
- onChange === null || onChange === void 0 || onChange([].concat(_toConsumableArray(value), [{
893
- _id: +new Date()
894
- }]));
895
- },
896
- remove: function remove(_id) {
897
- var index = value.findIndex(function (_) {
898
- return _._id == _id;
899
- });
900
- if (index > -1) {
901
- var isOk = confirm('确定删除吗?');
902
- if (!isOk) return;
903
- value.splice(index, 1);
904
- onChange === null || onChange === void 0 || onChange(_toConsumableArray(value));
905
- }
906
- }
907
- };
908
- return /*#__PURE__*/React.createElement(_Tabs, _extends({
909
- size: "small",
910
- type: "editable-card",
911
- onEdit: function onEdit(e, action) {
912
- return actions[action](e);
913
- },
914
- style: _objectSpread({
915
- background: '#fff',
916
- border: '1px dashed #ccc',
917
- padding: 12
918
- }, style)
919
- }, others), value.map(function (_, idx) {
920
- return /*#__PURE__*/React.createElement(_Tabs.TabPane, {
921
- key: _._id,
922
- tab: title + (idx + 1)
923
- }, /*#__PURE__*/React.createElement(SimpleForm, _extends({}, formSchema, {
924
- onValuesChange: function onValuesChange(a, values) {
925
- value.splice(idx, 1, Object.assign(value[idx], values));
926
- onChange === null || onChange === void 0 || onChange(_toConsumableArray(value));
927
- }
928
- })));
929
- }));
930
- }
931
- var Tree = LazyAntd.Tree,
932
- TreeSelect = LazyAntd.TreeSelect,
933
- Select = LazyAntd.Select,
934
- Table = LazyAntd.Table,
935
- Dropdown = LazyAntd.Dropdown,
936
- Pagination = LazyAntd.Pagination;
937
- var RangePicker = _DatePicker.RangePicker;
938
- var ComponentMapping = {
939
- Input: _Input,
940
- Select: Select,
941
- Radio: _Radio,
942
- InputNumber: _InputNumber,
943
- Checkbox: _Checkbox,
944
- TimePicker: _TimePicker,
945
- DatePicker: _DatePicker,
946
- Switch: _Switch,
947
- Rate: _Rate,
948
- Slider: _Slider,
949
- Color: _Input,
950
- TextArea: _Input.TextArea,
951
- CheckboxGroup: _Checkbox.Group,
952
- Grid: _Row,
953
- Text: Text,
954
- Divider: _Divider,
955
- // HospitalTreeSelect,
956
- SwitchSelect: SwitchSelect,
957
- SimpleSelect: SimpleSelect,
958
- Custom: Custom,
959
- TabForm: TabForm,
960
- MultiInput: MultiInput,
961
- RangePicker: RangePicker
962
- };
963
- var FormItem = _Form.Item;
964
- var targetLayoutType = 2;
965
- function calcLabelCol(n) {
966
- return 24 * targetLayoutType / n;
967
- }
968
- function FormItemsInRow(props) {
969
- var _items$filter;
970
- var items = props.itemsInRow,
971
- _props$layoutType = props.layoutType,
972
- layoutType = _props$layoutType === void 0 ? 8 : _props$layoutType,
973
- disabled = props.disabled;
974
- return /*#__PURE__*/React.createElement(_Row, {
975
- className: "fuck_row"
976
- }, items === null || items === void 0 || (_items$filter = items.filter(function (_) {
977
- return !!_;
978
- })) === null || _items$filter === void 0 ? void 0 : _items$filter.map(function (item) {
979
- if (!item) return null;
980
- var _item$outerOptions = item.outerOptions,
981
- outerOptions = _item$outerOptions === void 0 ? {} : _item$outerOptions,
982
- _item$type = item.type,
983
- type = _item$type === void 0 ? '' : _item$type,
984
- _item$innerOptions = item.innerOptions,
985
- innerOptions = _item$innerOptions === void 0 ? {} : _item$innerOptions,
986
- customNode = item.customNode,
987
- required = item.required;
988
- var options = innerOptions;
989
- var C = ComponentMapping[type];
990
- var hasCustomNode = customNode !== undefined;
991
- if (!C && !hasCustomNode) return /*#__PURE__*/React.createElement(_Form.Item, {
992
- style: {
993
- margin: 0
994
- }
995
- }, 'type error:' + type);
996
- var _layoutType = item.layoutType || layoutType;
997
- return /*#__PURE__*/React.createElement(_Col, {
998
- className: "fuck_col",
999
- span: _layoutType
1000
- }, /*#__PURE__*/React.createElement(FormItem, _extends({
1001
- className: "fuck_FormItem",
1002
- rules: required ? SimpleForm.requiredRules : []
1003
- }, outerOptions, {
1004
- labelCol: {
1005
- span: calcLabelCol(_layoutType)
1006
- }
1007
- }), hasCustomNode ? customNode : /*#__PURE__*/React.createElement(C, _extends({
1008
- disabled: disabled,
1009
- allowClear: true,
1010
- style: {},
1011
- placeholder: "\u8BF7\u8F93\u5165".concat(outerOptions === null || outerOptions === void 0 ? void 0 : outerOptions['label'])
1012
- }, options))));
1013
- }));
1014
- }
1015
- function FormItemCommon(props) {
1016
- var _items$filter2;
1017
- var items = props.formItems,
1018
- disabled = props.disabled;
1019
- return /*#__PURE__*/React.createElement(React.Fragment, null, (items === null || items === void 0 || (_items$filter2 = items.filter(function (_) {
1020
- return !!_;
1021
- })) === null || _items$filter2 === void 0 ? void 0 : _items$filter2.map(function (item, itemIndex) {
1022
- if (!item) return null;
1023
- var _item$outerOptions2 = item.outerOptions,
1024
- outerOptions = _item$outerOptions2 === void 0 ? {} : _item$outerOptions2,
1025
- _item$type2 = item.type,
1026
- type = _item$type2 === void 0 ? '' : _item$type2,
1027
- _item$innerOptions2 = item.innerOptions,
1028
- innerOptions = _item$innerOptions2 === void 0 ? {} : _item$innerOptions2,
1029
- customNode = item.customNode,
1030
- required = item.required;
1031
- var options = innerOptions;
1032
- var C = ComponentMapping[type];
1033
- var key = "".concat(itemIndex, "_").concat(type);
1034
- var innerStyle = options['stlyle'] || {};
1035
- var hasCustomNode = customNode !== undefined;
1036
- if (!C && !hasCustomNode) return /*#__PURE__*/React.createElement(_Form.Item, {
1037
- key: key,
1038
- style: {
1039
- margin: 0
1040
- }
1041
- }, 'type error:' + type);
1042
- return /*#__PURE__*/React.createElement(FormItem, _extends({
1043
- key: key,
1044
- className: "fuck_FormItem",
1045
- style: _objectSpread({
1046
- marginBottom: 6
1047
- }, innerStyle),
1048
- rules: required ? SimpleForm.requiredRules : []
1049
- }, outerOptions), hasCustomNode ? customNode : /*#__PURE__*/React.createElement(C, _extends({
1050
- disabled: disabled,
1051
- allowClear: true,
1052
- style: {},
1053
- placeholder: "\u8BF7\u8F93\u5165".concat(outerOptions === null || outerOptions === void 0 ? void 0 : outerOptions['label'])
1054
- }, options)));
1055
- })) || null);
1056
- }
1057
- var SimpleFormInner = /*#__PURE__*/forwardRef(function SimpleFormRender(_ref5, ref) {
1058
- var blocks = _ref5.blocks,
1059
- formItems = _ref5.formItems,
1060
- disabled = _ref5.disabled,
1061
- form = _ref5.form,
1062
- onValuesChange = _ref5.onValuesChange,
1063
- _ref5$formProps = _ref5.formProps,
1064
- formProps = _ref5$formProps === void 0 ? {} : _ref5$formProps;
1065
- var _Form$useForm = _Form.useForm(),
1066
- _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
1067
- innerForm = _Form$useForm2[0];
1068
- useImperativeHandle(ref, function () {
1069
- return form || innerForm;
1070
- }, []);
1071
- return /*#__PURE__*/React.createElement(_Form, _extends({
1072
- form: form || innerForm,
1073
- onValuesChange: onValuesChange
1074
- }, formProps), (blocks === null || blocks === void 0 ? void 0 : blocks.map(function (_ref6, blockIndex) {
1075
- var rows = _ref6.rows,
1076
- title = _ref6.title;
1077
- var blockNode = rows.map(function (rowData, rowIndex) {
1078
- return /*#__PURE__*/React.createElement(FormItemsInRow, _extends({
1079
- key: "".concat(rowIndex, "_").concat(rowData.label),
1080
- disabled: disabled
1081
- }, rowData));
1082
- });
1083
- return title ? /*#__PURE__*/React.createElement("fieldset", {
1084
- key: "".concat(blockIndex, "_").concat(title),
1085
- style: {
1086
- border: '1px solid #ccc',
1087
- padding: '12px 12px 0 12px',
1088
- borderRadius: 2
1089
- }
1090
- }, /*#__PURE__*/React.createElement("legend", {
1091
- style: {
1092
- padding: '0 12px',
1093
- margin: 0,
1094
- marginLeft: 12,
1095
- border: 0,
1096
- width: 'auto',
1097
- display: 'inline-block',
1098
- background: 'transparent',
1099
- fontSize: 16,
1100
- color: '#150f55',
1101
- fontWeight: 'bold'
1102
- }
1103
- }, title), blockNode) : blockNode;
1104
- })) || null, /*#__PURE__*/React.createElement(FormItemCommon, {
1105
- formItems: formItems,
1106
- disabled: disabled
1107
- }));
1108
- });
1109
- //@ts-ignore
1110
- var SimpleForm = SimpleFormInner;
1111
- SimpleForm.getPresetRules = function (name, required) {
1112
- return [_objectSpread({
1113
- required: required
1114
- }, basicRules[name])];
1115
- };
1116
- SimpleForm.requiredRules = [{
1117
- required: true,
1118
- message: ''
1119
- }];
1120
- var basicRules = {
1121
- telephone: {
1122
- validator: function validator(_, value) {
1123
- return /^1([0-9][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/.test(value) ? Promise.resolve() : Promise.reject();
1124
- },
1125
- message: '请输入手机号'
1126
- }
1127
- };
1128
- var a = /*#__PURE__*/lazy(function () {
1129
- return import('./.root.js');
1130
- });
1131
- var MyMonaco = a;
1132
- function convertDataURIToBinary(dataURI) {
1133
- var raw = window.atob(dataURI);
1134
- var rawLength = raw.length;
1135
- var array = new Uint8Array(new ArrayBuffer(rawLength));
1136
- for (var i = 0; i < rawLength; i++) {
1137
- array[i] = raw.charCodeAt(i);
1138
- }
1139
- return array;
1140
- }
1141
- var metaHead = 'data:application/pdf;base64,';
1142
- function handlePrintData(printData) {
1143
- var noHeadData = printData.startsWith(metaHead) ? printData.slice(metaHead.length) : printData;
1144
- return convertDataURIToBinary(noHeadData);
1145
- }
1146
- function handleRes(res) {
1147
- var _resData$filepath;
1148
- var resData;
1149
- if (!res) return {};
1150
- if (typeof res.code === 'number') {
1151
- resData = res.data;
1152
- } else {
1153
- resData = res;
1154
- }
1155
- if (!resData) return {};
1156
- var _resData = resData,
1157
- pdfdata = _resData.pdfdata,
1158
- filepath = _resData.filepath,
1159
- imagesData = _resData.imagesData;
1160
- resData.filepath = filepath && "".concat(location.origin).concat(filepath);
1161
- resData.pdfdata = pdfdata && handlePrintData(pdfdata);
1162
- resData.imagesData = imagesData !== null && imagesData !== void 0 ? imagesData : [];
1163
- // .map(_ => `data:image/png;base64,${_}`)
1164
- return {
1165
- pdf: (_resData$filepath = resData.filepath) !== null && _resData$filepath !== void 0 ? _resData$filepath : resData.pdfdata,
1166
- images: resData.imagesData
1167
- };
1168
- }
1169
- function get_PdfFrameView_version() {
1170
- return SLocal_SystemConfig.get('PDF预览组件版本') || lm_pdfjs_info.dirs['3.11.174'];
1171
- }
1172
- var PdfFrameViewInner = /*#__PURE__*/lazy(function () {
1173
- return import('./.root2.js');
1174
- });
1175
- function PdfFrameView(props) {
1176
- return /*#__PURE__*/React__default.createElement(Suspense, {
1177
- fallback: "\u52A0\u8F7D\u4E2D..."
1178
- }, /*#__PURE__*/React__default.createElement(PdfFrameViewInner, props));
1179
- }
1180
- var useMyEffect = mchcEnv.isSp ? useEffect : useKeepAliveEffect;
1181
- var useMyEffectSafe = function useMyEffectSafe(props) {
1182
- if (mchcEnv.is_single || props.is_modal) {
1183
- return useEffect;
1184
- }
1185
- return mchcEnv.isSp ? useEffect : useKeepAliveEffect;
1186
- };
1187
- function useMchcDriverStatus() {
1188
- var _useState5 = useState(false),
1189
- _useState6 = _slicedToArray(_useState5, 2),
1190
- isOpen = _useState6[0],
1191
- setIsOpen = _useState6[1];
1192
- useEffect(function () {
1193
- var id = setInterval(function () {
1194
- setIsOpen(mchcDriver.isOpen);
1195
- }, 2000);
1196
- return function () {
1197
- clearInterval(id);
1198
- };
1199
- }, []);
1200
- return {
1201
- isOpen: isOpen
1202
- };
1203
- }
1204
- var ContainerDimensions = /*#__PURE__*/function (_Component) {
1205
- // const[Comp, setComp] = useState<FC<ContainerDimensionsProps>>()
1206
- function ContainerDimensions(props) {
1207
- var _this3;
1208
- _classCallCheck(this, ContainerDimensions);
1209
- _this3 = _callSuper(this, ContainerDimensions, [props]);
1210
- _this3.state = {
1211
- Comp: null
1212
- };
1213
- return _this3;
1214
- }
1215
- _inherits(ContainerDimensions, _Component);
1216
- return _createClass(ContainerDimensions, [{
1217
- key: "componentDidMount",
1218
- value: function componentDidMount() {
1219
- var _this4 = this;
1220
- import('react-container-dimensions').then(function (res) {
1221
- _this4.setState({
1222
- Comp: res["default"]
1223
- });
1224
- });
1225
- }
1226
- }, {
1227
- key: "render",
1228
- value: function render() {
1229
- var Comp = this.state.Comp;
1230
- return Comp ? /*#__PURE__*/React__default.createElement(Comp, this.props) : /*#__PURE__*/React__default.createElement("span", null, "loading ContainerDimensions ...");
1231
- }
1232
- }]);
1233
- }(Component);
1234
- var QRCode = /*#__PURE__*/lazy(function () {
1235
- return import('./.root3.js');
1236
- });
1237
- export { MonthPicker_L as A, AutoComplete_L as B, Calendar_L as C, DatePicker_L as D, ContainerDimensions as E, GynaecologyImageEditor as G, LazyAntd as L, MyImageEditorEvents as M, PdfFrameView as P, QRCode as Q, RangePicker_L as R, SimpleForm as S, TimePicker_L as T, _extends as _, handleRes as a, get_old_address_options as b, MyInput as c, default_legends as d, event_process as e, MyImageEditor as f, get_PdfFrameView_version as g, handlePrintData as h, MyAddress as i, MyAddressNew as j, MyAddressOld as k, MountGlobalModal as l, GlobalModal_ as m, GlobalModal as n, MyMonaco as o, pack_components as p, MyLazyComponent as q, real_fabric as r, useMyEffectSafe as s, useMchcDriverStatus as t, useMyEffect as u, getInputStyle as v, isUrl as w, getArray as x, getFormat as y, getParamByName as z };
1238
- //# sourceMappingURL=index.js.map