vap1 0.2.3 → 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.
- package/components/Box/Box.js +75 -42
- package/components/Box/SelectBar.js +51 -24
- package/components/Box/_register.d.ts +4 -0
- package/components/Box/_register.js +10 -8
- package/components/Box/index.js +1 -1
- package/components/Lists/SList.js +76 -48
- package/components/SearchBar/ActionButtons.js +75 -42
- package/components/SearchBar/ByField.js +80 -52
- package/components/SearchBar/ByKeyword.js +44 -17
- package/components/SearchBar/SearchField.js +8 -8
- package/components/SearchBar/SearchTags.js +4 -4
- package/components/SearchBar/_register.js +9 -8
- package/components/SearchBar/index.js +22 -11
- package/components/Tables/ApiTable.d.ts +1 -1
- package/components/Tables/ApiTable.js +19 -8
- package/components/Tables/ApiTableModal.d.ts +1 -1
- package/components/Tables/ApiTableModal.js +40 -13
- package/components/Tables/Components/ActionBar.js +53 -26
- package/components/Tables/Components/Actions.js +40 -29
- package/components/Tables/Components/Summary.js +2 -2
- package/components/Tables/Components/index.js +3 -3
- package/components/Tables/STable.js +21 -10
- package/components/Tables/TopTable.d.ts +3 -2
- package/components/Tables/TopTable.js +64 -37
- package/components/Tables/TopTableModal.js +21 -10
- package/components/Tables/Util.d.ts +2 -2
- package/components/Tables/Util.js +11 -9
- package/components/Tables/VTable.d.ts +2 -2
- package/components/Tables/VTable.js +137 -65
- package/components/Tables/index.d.ts +7 -2
- package/components/Tables/index.js +5 -5
- package/components/TreeSelect/BaseTreeSelect.js +81 -45
- package/components/TreeSelect/DTreeSelect.js +191 -66
- package/components/TreeSelect/FTreeSelect.js +67 -20
- package/components/TreeSelect/STreeSelect.js +22 -11
- package/components/Trees/ActionTree.js +562 -431
- package/components/Trees/BaseTree.js +85 -38
- package/components/Trees/COTree/COButton.js +48 -21
- package/components/Trees/COTree/COSelect.js +31 -20
- package/components/Trees/COTree/COTree.js +223 -107
- package/components/Trees/COTree/COTreeUtil.js +160 -115
- package/components/Trees/DTree.js +139 -68
- package/components/Trees/FTree.js +76 -29
- package/components/Trees/STree.js +59 -23
- package/components/UForm/FormWrapper.js +70 -53
- package/components/UForm/UDescriptions.js +38 -38
- package/components/UForm/UForm.js +240 -135
- package/components/UForm/UFormModal.js +99 -44
- package/components/UForm/UInfo.js +33 -22
- package/components/UForm/UInfoModal.js +31 -20
- package/components/UForm/UModal.js +40 -13
- package/components/UForm/_FormUtils.js +29 -18
- package/components/UForm/_input.js +75 -39
- package/components/UForm/_register.js +11 -9
- package/components/UForm/index.d.ts +5 -0
- package/components/Upload/UploadFile.js +38 -11
- package/components/Upload/UploadImage.js +50 -23
- package/components/Upload/UploadModal.js +149 -84
- package/components/Upload/useUpload.js +35 -19
- package/components/_RegisterUtil.js +20 -8
- package/components/_adapt/Alert.js +20 -9
- package/components/_adapt/Breadcrumb.js +18 -7
- package/components/_adapt/Button.js +24 -13
- package/components/_adapt/Col.js +34 -23
- package/components/_adapt/Collapse.js +21 -10
- package/components/_adapt/ColorPicker.js +55 -28
- package/components/_adapt/ConfigProvider.js +14 -3
- package/components/_adapt/Drawer.js +18 -7
- package/components/_adapt/Dropdown.js +23 -12
- package/components/_adapt/FloatButton.js +21 -10
- package/components/_adapt/Icon.js +18 -7
- package/components/_adapt/Input.js +17 -6
- package/components/_adapt/InputNumber.js +16 -5
- package/components/_adapt/Layout.js +84 -28
- package/components/_adapt/Menu.js +28 -17
- package/components/_adapt/Modal.js +72 -25
- package/components/_adapt/Pagination.js +14 -3
- package/components/_adapt/Popconfirm.js +17 -6
- package/components/_adapt/Popover.js +17 -6
- package/components/_adapt/Progress.js +42 -11
- package/components/_adapt/Radio.js +21 -10
- package/components/_adapt/Row.js +18 -7
- package/components/_adapt/Select.js +54 -43
- package/components/_adapt/Slider.js +1 -1
- package/components/_adapt/Space.js +2 -2
- package/components/_adapt/Table.js +16 -5
- package/components/_adapt/Tabs.js +17 -6
- package/components/_adapt/Tag.js +19 -8
- package/components/_adapt/Tooltip.js +15 -4
- package/components/_adapt/TreeSelect.js +18 -7
- package/components/_adapt/notification.js +1 -1
- package/components/_adapt/todo/Image.js +2 -2
- package/components/_adapt/todo/NotEffectOnV15.js +1 -1
- package/components/_adapt/todo/Segmented.js +2 -2
- package/components/_adapt/utils.js +28 -8
- package/components/_common/AutoComplete.js +101 -34
- package/components/_common/CountUp.js +30 -14
- package/components/_common/DateRange.js +36 -20
- package/components/_common/HighLight.js +22 -6
- package/components/_common/I18N.js +27 -2
- package/components/_common/Loading.js +25 -9
- package/components/_common/MonthRange.js +26 -26
- package/components/_common/PromiseLabel.js +68 -15
- package/components/_common/Role.js +2 -2
- package/components/_common/Upagination.js +45 -34
- package/components/_setup/Const.js +2 -2
- package/components/_setup/I18N/enUS.js +2 -2
- package/components/_setup/I18N/zhCN.js +3 -3
- package/components/_setup/I18N/zhHK.js +2 -2
- package/components/_setup/ICON/IconTypes.js +2 -2
- package/components/_setup/SearchField/SearchFieldAdvance.js +22 -11
- package/components/_setup/SearchField/SearchFieldDate.js +114 -77
- package/components/_setup/SearchField/SearchFieldInput.js +21 -10
- package/components/_setup/SearchField/SearchFieldSelect.js +55 -44
- package/components/_setup/SearchField/SearchFieldTree.js +63 -52
- package/components/_setup/SelectBar/SelectList.js +21 -10
- package/components/_setup/SelectBar/SelectTree.js +17 -6
- package/components/_setup/UForm/UFormAdvanceInput.js +105 -78
- package/components/_setup/UForm/UFormCOTree.js +21 -10
- package/components/_setup/UForm/UFormCrontab.js +51 -35
- package/components/_setup/UForm/UFormDate.js +158 -122
- package/components/_setup/UForm/UFormInput.js +110 -73
- package/components/_setup/UForm/UFormJSON.js +95 -57
- package/components/_setup/UForm/UFormJSONTable.js +79 -41
- package/components/_setup/UForm/UFormOrg.js +112 -48
- package/components/_setup/UForm/UFormRole.js +31 -20
- package/components/_setup/UForm/UFormSelect.js +106 -79
- package/components/_setup/UForm/UFormTree.js +52 -41
- package/components/_setup/UForm/UFormUpload.js +62 -34
- package/components/_setup/UForm/_utils.js +9 -9
- package/deps/JsonView.js +18 -7
- package/deps/SpringBoot.js +1 -1
- package/deps/SpringCloud.js +4 -4
- package/deps/_editor/advance/_Image.js +33 -20
- package/deps/_editor/base/Element.js +28 -17
- package/deps/_editor/base/Leaf.js +18 -7
- package/deps/_editor/base/Support.js +4 -4
- package/deps/_editor/i18n.js +1 -1
- package/deps/_editor/tools/Button.js +31 -19
- package/deps/_editor/tools/ToolBar.js +3 -3
- package/deps/_editor/tools/_BlockButton.js +49 -27
- package/deps/_editor/tools/_InsertButton.js +32 -28
- package/deps/_editor/tools/_MarkButton.js +15 -14
- package/deps/_editor/tools/_TxtButton.js +90 -58
- package/deps/api-audit.js +1 -1
- package/deps/echarts.js +58 -17
- package/deps/editor.js +52 -26
- package/deps/registerEditor.js +18 -7
- package/hooks/_list.js +1 -1
- package/hooks/useAjax.js +43 -19
- package/hooks/useAjaxAction.js +57 -20
- package/hooks/useAjaxQuery.js +121 -51
- package/hooks/useApi.js +35 -8
- package/hooks/useApiBase.js +291 -184
- package/hooks/useApiGlobal.js +40 -13
- package/hooks/useApp.js +4 -4
- package/hooks/useArray.js +114 -52
- package/hooks/useDefault.js +19 -3
- package/hooks/useDoLoad.js +25 -9
- package/hooks/useEffectFunction.js +4 -3
- package/hooks/useEffectOnce.js +5 -5
- package/hooks/useError.js +21 -5
- package/hooks/useFirstMountState.js +3 -3
- package/hooks/useGenkey.js +7 -7
- package/hooks/useGetSet.js +9 -9
- package/hooks/useGlobal.js +58 -29
- package/hooks/useHover.js +25 -9
- package/hooks/useMemoPromise.js +62 -22
- package/hooks/useModals.js +71 -36
- package/hooks/useMountedState.js +6 -6
- package/hooks/useOpenState.js +26 -10
- package/hooks/usePromise.js +15 -13
- package/hooks/useQueue.js +35 -8
- package/hooks/useSetState.js +25 -8
- package/hooks/useStateList.js +30 -18
- package/hooks/useSyncExternalStore.js +31 -15
- package/hooks/useToggle.js +6 -3
- package/hooks/useUnmountPromise.js +11 -11
- package/hooks/useUpdate.js +20 -4
- package/hooks/useUpdateEffect.js +5 -5
- package/login/Base65.js +15 -14
- package/login/Password.js +91 -38
- package/login/SM4.js +50 -49
- package/login/cems/index.js +2 -2
- package/login/jit/index.js +16 -71
- package/login/jit/pnxclient.js +6 -4
- package/login/vap/index.js +1 -1
- package/login/xrtx/index.js +2 -2
- package/package.json +1 -1
- package/screen/Comment.js +16 -5
- package/screen/Page.js +14 -14
- package/screen/render.js +2 -2
- package/uform/FormEditor.js +44 -27
- package/uform/FormViewer.js +30 -19
- package/uform/hooks/useEditor.js +83 -47
- package/uform/hooks/useForm.js +2 -2
- package/uform/index.js +10 -10
- package/uform/inputs/_advance.js +12 -12
- package/uform/inputs/_date.js +63 -52
- package/uform/inputs/_input.js +49 -38
- package/uform/inputs/_select.js +53 -42
- package/uform/inputs/_specific.js +33 -22
- package/uform/inputs/index.js +5 -5
- package/uform/inputs/register.d.ts +8 -0
- package/uform/inputs/register.js +14 -14
- package/uform/panel/Editor/GroupEditor.js +31 -31
- package/uform/panel/Editor/ListEditor.js +22 -22
- package/uform/panel/Editor/_FieldItems.js +16 -16
- package/uform/panel/Editor/_GroupCollapse.js +9 -9
- package/uform/panel/Editor/_GroupDefault.js +9 -9
- package/uform/panel/Editor/_GroupStep.js +18 -18
- package/uform/panel/Editor/_GroupTab.js +16 -16
- package/uform/panel/Editor/index.js +17 -17
- package/uform/panel/Items/index.js +22 -11
- package/uform/panel/Propreties/CanvasProperties.js +14 -14
- package/uform/panel/Propreties/Component/FieldPlugin.js +5 -5
- package/uform/panel/Propreties/Component/LinkAsyncFunction.js +22 -47
- package/uform/panel/Propreties/Component/LinkSyncFunction.js +20 -43
- package/uform/panel/Propreties/Component/Links.js +40 -29
- package/uform/panel/Propreties/Component/OptionTable.js +97 -52
- package/uform/panel/Propreties/Component/RegexpModal.js +11 -11
- package/uform/panel/Propreties/Component/Validate.js +35 -24
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +13 -24
- package/uform/panel/Propreties/Component/ValidateSyncFunction.js +15 -38
- package/uform/panel/Propreties/FieldOptions.js +78 -44
- package/uform/panel/Propreties/FieldProperties.js +47 -20
- package/uform/panel/Propreties/GroupProperties.js +9 -9
- package/uform/panel/Propreties/_ItemAdvance.js +37 -26
- package/uform/panel/Propreties/_ItemBase.js +72 -21
- package/uform/panel/Propreties/_ItemLink.js +20 -9
- package/uform/panel/Propreties/_ItemValidate.js +33 -22
- package/uform/plugins/index.js +7 -7
- package/uform/schema.d.ts +6 -1
- package/uform/utils/Convert.js +137 -94
- package/uform/utils/SchemaConvert.js +43 -68
- package/uform/utils/arr.js +106 -75
- package/utils/Ajax.d.ts +1 -11
- package/utils/Ajax.js +154 -68
- package/utils/ArrayUtil.js +14 -12
- package/utils/CacheUtil.js +19 -13
- package/utils/Const.js +13 -13
- package/utils/CustomApp.js +15 -10
- package/utils/EventUtil.js +78 -14
- package/utils/Format.js +59 -38
- package/utils/Global.js +8 -8
- package/utils/Logger.js +56 -11
- package/utils/PageUtil.d.ts +12 -6
- package/utils/PageUtil.js +105 -35
- package/utils/Renders/ApiGetRender.js +187 -100
- package/utils/Renders/ApiPostRender.js +123 -69
- package/utils/Renders/DateRender.js +9 -9
- package/utils/Renders/DictRender.js +82 -55
- package/utils/Renders/FileRender.js +34 -12
- package/utils/Renders/ListRender.js +21 -21
- package/utils/Renders/NumberRender.js +14 -13
- package/utils/Renders/StatusRender.js +20 -20
- package/utils/Renders/StringRender.js +17 -17
- package/utils/Renders/_define.d.ts +2 -2
- package/utils/Renders/_define.js +7 -7
- package/utils/StringUtil.js +98 -67
- package/utils/TreeUtil.js +71 -20
- package/utils/VAP.js +14 -14
- package/utils/XHR.js +27 -11
- package/utils/_AjaxUtil.d.ts +10 -0
- package/utils/_AjaxUtil.js +35 -12
- package/utils/_Support.d.ts +2 -2
- package/utils/_Support.js +26 -26
- package/utils/i18n.js +78 -44
- package/utils/index.d.ts +9 -1
- package/utils/index.js +34 -5
- package/utils/screenful.js +84 -31
- package/widget/index.js +4 -4
package/utils/Format.js
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
2
18
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
19
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
20
|
};
|
|
5
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
22
|
exports.maskEmail = exports.maskPhone = exports.maskIdCard = exports.formatDateTime = exports.formatDate = exports.getFormater = exports.formatChinese = exports.formatIntFixed = exports.formatInt = exports.formatNumber = exports.formatSize = exports.formatPercent = exports.formatUSD = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
23
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
24
|
+
var StringUtil_1 = require("./StringUtil");
|
|
25
|
+
var dayjs_1 = __importDefault(require("dayjs"));
|
|
26
|
+
var MAX_FIX = [
|
|
11
27
|
0,
|
|
12
28
|
9,
|
|
13
29
|
99,
|
|
@@ -29,18 +45,20 @@ const MAX_FIX = [
|
|
|
29
45
|
* 123456 -> '123,456'
|
|
30
46
|
* 1234567 -> '1,234,567'
|
|
31
47
|
*/
|
|
32
|
-
|
|
48
|
+
var formatUSD = function (num, digital) {
|
|
49
|
+
if (digital === void 0) { digital = false; }
|
|
33
50
|
if (digital == false || digital == 0)
|
|
34
51
|
return Math.floor(num).toLocaleString();
|
|
35
|
-
|
|
52
|
+
var fixed = lodash_1.default.isNumber(digital) ? digital : 2;
|
|
36
53
|
return num.toLocaleString('en-US', { minimumFractionDigits: fixed, maximumFractionDigits: fixed });
|
|
37
54
|
};
|
|
38
55
|
exports.formatUSD = formatUSD;
|
|
39
|
-
|
|
56
|
+
var formatPercent = function (num, basic) {
|
|
57
|
+
if (basic === void 0) { basic = 1; }
|
|
40
58
|
return (0, exports.formatNumber)(num / basic) + '%';
|
|
41
59
|
};
|
|
42
60
|
exports.formatPercent = formatPercent;
|
|
43
|
-
|
|
61
|
+
var formatSize = function (byteSize) {
|
|
44
62
|
if (byteSize < 1024) {
|
|
45
63
|
return (0, exports.formatNumber)(byteSize) + 'b';
|
|
46
64
|
}
|
|
@@ -67,38 +85,41 @@ exports.formatSize = formatSize;
|
|
|
67
85
|
/**
|
|
68
86
|
* pos : 小数点后面位数,最多20
|
|
69
87
|
*/
|
|
70
|
-
|
|
88
|
+
var formatNumber = function (num, fractionDigits) {
|
|
89
|
+
if (fractionDigits === void 0) { fractionDigits = 2; }
|
|
71
90
|
if (fractionDigits == false || fractionDigits == 0)
|
|
72
91
|
return Math.floor(num).toString();
|
|
73
|
-
|
|
92
|
+
var digital = lodash_1.default.isNumber(fractionDigits) ? fractionDigits : 2;
|
|
74
93
|
return num.toFixed(digital);
|
|
75
94
|
};
|
|
76
95
|
exports.formatNumber = formatNumber;
|
|
77
96
|
function formatInt(num, returnString) {
|
|
78
|
-
|
|
97
|
+
var result = Math.round(num);
|
|
79
98
|
if (returnString) {
|
|
80
99
|
return result.toString();
|
|
81
100
|
}
|
|
82
101
|
return result;
|
|
83
102
|
}
|
|
84
103
|
exports.formatInt = formatInt;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
104
|
+
var formatIntFixed = function (num, fractionDigits) {
|
|
105
|
+
if (fractionDigits === void 0) { fractionDigits = 5; }
|
|
106
|
+
var pos = lodash_1.default.isNumber(fractionDigits) ? fractionDigits : 5;
|
|
107
|
+
var idx = (pos <= 0 || pos > 15) ? 5 : pos;
|
|
88
108
|
if (num > MAX_FIX[idx])
|
|
89
109
|
return MAX_FIX[idx].toString();
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
for (
|
|
110
|
+
var val = Math.round(num).toString();
|
|
111
|
+
var zeroCount = idx - val.length;
|
|
112
|
+
var prefix = '';
|
|
113
|
+
for (var i = 0; i < zeroCount; i++) {
|
|
94
114
|
prefix += '0';
|
|
95
115
|
}
|
|
96
116
|
return prefix + val;
|
|
97
117
|
};
|
|
98
118
|
exports.formatIntFixed = formatIntFixed;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
119
|
+
var formatChinese = function (num, digital) {
|
|
120
|
+
if (digital === void 0) { digital = 2; }
|
|
121
|
+
var result;
|
|
122
|
+
var unit;
|
|
102
123
|
if (num >= 100000000) {
|
|
103
124
|
result = (0, exports.formatNumber)(num / 100000000, digital);
|
|
104
125
|
unit = '亿';
|
|
@@ -122,17 +143,17 @@ const formatChinese = (num, digital = 2) => {
|
|
|
122
143
|
return result + unit;
|
|
123
144
|
};
|
|
124
145
|
exports.formatChinese = formatChinese;
|
|
125
|
-
|
|
146
|
+
var getFormater = function (type, fix) {
|
|
126
147
|
switch (type) {
|
|
127
148
|
case 'number':
|
|
128
149
|
if (fix)
|
|
129
|
-
return (num)
|
|
150
|
+
return function (num) { return (0, exports.formatNumber)(num, fix); };
|
|
130
151
|
return exports.formatNumber;
|
|
131
152
|
case 'int':
|
|
132
|
-
return (num)
|
|
153
|
+
return function (num) { return formatInt(num, true); };
|
|
133
154
|
case 'int-fixed':
|
|
134
|
-
|
|
135
|
-
return (num)
|
|
155
|
+
var pos_1 = fix === undefined ? 5 : fix;
|
|
156
|
+
return function (num) { return (0, exports.formatIntFixed)(num, pos_1); };
|
|
136
157
|
case 'usd':
|
|
137
158
|
return exports.formatUSD;
|
|
138
159
|
case 'size':
|
|
@@ -143,26 +164,26 @@ const getFormater = (type, fix) => {
|
|
|
143
164
|
return exports.formatPercent;
|
|
144
165
|
default:
|
|
145
166
|
if (fix)
|
|
146
|
-
return (num)
|
|
167
|
+
return function (num) { return (0, exports.formatNumber)(num, fix); };
|
|
147
168
|
return exports.formatNumber;
|
|
148
169
|
}
|
|
149
170
|
};
|
|
150
171
|
exports.getFormater = getFormater;
|
|
151
|
-
|
|
152
|
-
|
|
172
|
+
var formatDate = function (str) {
|
|
173
|
+
var date = (0, dayjs_1.default)(str);
|
|
153
174
|
if (date.isValid())
|
|
154
175
|
return date.format('YYYY-MM-DD');
|
|
155
176
|
return '';
|
|
156
177
|
};
|
|
157
178
|
exports.formatDate = formatDate;
|
|
158
|
-
|
|
159
|
-
|
|
179
|
+
var formatDateTime = function (str) {
|
|
180
|
+
var date = (0, dayjs_1.default)(str);
|
|
160
181
|
if (date.isValid())
|
|
161
182
|
return date.format('YYYY-MM-DD HH:mm:ss');
|
|
162
183
|
return '';
|
|
163
184
|
};
|
|
164
185
|
exports.formatDateTime = formatDateTime;
|
|
165
|
-
|
|
186
|
+
var maskIdCard = function (str) {
|
|
166
187
|
if (!lodash_1.default.isString(str) || str == null)
|
|
167
188
|
return '';
|
|
168
189
|
if (str.length < 15)
|
|
@@ -170,24 +191,24 @@ const maskIdCard = (str) => {
|
|
|
170
191
|
return str.substring(0, 5) + '*******' + str.substring(str.length - 3);
|
|
171
192
|
};
|
|
172
193
|
exports.maskIdCard = maskIdCard;
|
|
173
|
-
|
|
194
|
+
var maskPhone = function (str) {
|
|
174
195
|
if (!lodash_1.default.isString(str) || str == null)
|
|
175
196
|
return '';
|
|
176
197
|
if (str.length < 10)
|
|
177
198
|
return str;
|
|
178
|
-
|
|
199
|
+
var fixIdx = str.indexOf('-');
|
|
179
200
|
if (fixIdx > 0)
|
|
180
201
|
return str.substring(0, fixIdx) + '***' + str.substring(str.length - 3);
|
|
181
202
|
return str.substring(0, 3) + '****' + str.substring(str.length - 4);
|
|
182
203
|
};
|
|
183
204
|
exports.maskPhone = maskPhone;
|
|
184
|
-
|
|
205
|
+
var maskEmail = function (str) {
|
|
185
206
|
if (!lodash_1.default.isString(str) || str == null)
|
|
186
207
|
return '';
|
|
187
208
|
if (!(0, StringUtil_1.isEmail)(str))
|
|
188
209
|
return str;
|
|
189
|
-
|
|
190
|
-
|
|
210
|
+
var email = [];
|
|
211
|
+
var _a = __read(str.split('@'), 2), account = _a[0], domain = _a[1];
|
|
191
212
|
if (account.length <= 2) {
|
|
192
213
|
email.push(account);
|
|
193
214
|
}
|
|
@@ -196,7 +217,7 @@ const maskEmail = (str) => {
|
|
|
196
217
|
email.push('*'.repeat(account.length - 2));
|
|
197
218
|
}
|
|
198
219
|
email.push('@');
|
|
199
|
-
|
|
220
|
+
var idx = lodash_1.default.lastIndexOf(domain, '.');
|
|
200
221
|
if (idx >= 0) {
|
|
201
222
|
email.push('*'.repeat(idx));
|
|
202
223
|
email.push(domain.substring(idx));
|
package/utils/Global.js
CHANGED
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SET = exports.CONFIG = exports.LOG_LEVEL = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
var _Support_1 = require("./_Support");
|
|
9
9
|
/**
|
|
10
10
|
* 全局定义
|
|
11
11
|
*/
|
|
@@ -17,7 +17,7 @@ var LOG_LEVEL;
|
|
|
17
17
|
LOG_LEVEL[LOG_LEVEL["WARN"] = 3] = "WARN";
|
|
18
18
|
LOG_LEVEL[LOG_LEVEL["ERROR"] = 4] = "ERROR";
|
|
19
19
|
})(LOG_LEVEL || (exports.LOG_LEVEL = LOG_LEVEL = {}));
|
|
20
|
-
|
|
20
|
+
var DEFAULT = {
|
|
21
21
|
APP: {
|
|
22
22
|
LANG: _Support_1.Language.ZH_CN,
|
|
23
23
|
USER_MENU_HOMEPAGE: true,
|
|
@@ -113,15 +113,15 @@ const DEFAULT = {
|
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
exports.CONFIG = (0, _Support_1.globalDefault)('_V_GLOBAL', DEFAULT);
|
|
116
|
-
|
|
116
|
+
var reset = function (api, prefix) {
|
|
117
117
|
if (lodash_1.default.startsWith(api, prefix))
|
|
118
118
|
return api;
|
|
119
|
-
|
|
119
|
+
var idx = api.indexOf('/', 1);
|
|
120
120
|
if (idx > 0)
|
|
121
121
|
return prefix + api.substring(idx);
|
|
122
122
|
return api;
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
var API_RESET = function (prefix) {
|
|
125
125
|
exports.CONFIG.BASIC.SYSTEM = reset(exports.CONFIG.BASIC.SYSTEM, prefix);
|
|
126
126
|
exports.CONFIG.BASIC.MENU = reset(exports.CONFIG.BASIC.MENU, prefix);
|
|
127
127
|
exports.CONFIG.BASIC.RULES = reset(exports.CONFIG.BASIC.RULES, prefix);
|
|
@@ -148,13 +148,13 @@ const API_RESET = (prefix) => {
|
|
|
148
148
|
exports.CONFIG.UPLOAD.API = reset(exports.CONFIG.UPLOAD.API, prefix);
|
|
149
149
|
exports.CONFIG.UPLOAD.PREVIEW = reset(exports.CONFIG.UPLOAD.PREVIEW, prefix);
|
|
150
150
|
};
|
|
151
|
-
|
|
151
|
+
var SET = function (config) {
|
|
152
152
|
// CONFIG = _.merge(CONFIG, config);
|
|
153
153
|
if (config && config.BASIC && config.BASIC.PREFIX) {
|
|
154
154
|
exports.CONFIG.BASIC.PREFIX = config.BASIC.PREFIX;
|
|
155
155
|
API_RESET(exports.CONFIG.BASIC.PREFIX);
|
|
156
156
|
}
|
|
157
|
-
for (
|
|
157
|
+
for (var key in config) {
|
|
158
158
|
// if(_.isPlainObject(CONFIG[key])){
|
|
159
159
|
// // _.extend(CONFIG[key], config[key])
|
|
160
160
|
// }else{
|
package/utils/Logger.js
CHANGED
|
@@ -1,32 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
+
if (ar || !(i in from)) {
|
|
21
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
+
ar[i] = from[i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
+
};
|
|
2
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
28
|
exports.error = exports.warn = exports.info = exports.log = exports.debug = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
29
|
+
var Global_1 = require("./Global");
|
|
30
|
+
var debug = function () {
|
|
31
|
+
var args = [];
|
|
32
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
33
|
+
args[_i] = arguments[_i];
|
|
34
|
+
}
|
|
6
35
|
if (Global_1.CONFIG.LOG.LEVEL <= Global_1.LOG_LEVEL.DEBUG) {
|
|
7
|
-
console.debug('debug : ',
|
|
36
|
+
console.debug.apply(console, __spreadArray(['debug : '], __read(args), false));
|
|
8
37
|
}
|
|
9
38
|
};
|
|
10
39
|
exports.debug = debug;
|
|
11
|
-
|
|
40
|
+
var log = function () {
|
|
41
|
+
var args = [];
|
|
42
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
43
|
+
args[_i] = arguments[_i];
|
|
44
|
+
}
|
|
12
45
|
if (Global_1.CONFIG.LOG.LEVEL <= Global_1.LOG_LEVEL.LOG) {
|
|
13
|
-
console.log(' log : ',
|
|
46
|
+
console.log.apply(console, __spreadArray([' log : '], __read(args), false));
|
|
14
47
|
}
|
|
15
48
|
};
|
|
16
49
|
exports.log = log;
|
|
17
|
-
|
|
50
|
+
var info = function () {
|
|
51
|
+
var args = [];
|
|
52
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
53
|
+
args[_i] = arguments[_i];
|
|
54
|
+
}
|
|
18
55
|
if (Global_1.CONFIG.LOG.LEVEL <= Global_1.LOG_LEVEL.INFO) {
|
|
19
|
-
console.info(' info : ',
|
|
56
|
+
console.info.apply(console, __spreadArray([' info : '], __read(args), false));
|
|
20
57
|
}
|
|
21
58
|
};
|
|
22
59
|
exports.info = info;
|
|
23
|
-
|
|
60
|
+
var warn = function () {
|
|
61
|
+
var args = [];
|
|
62
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
63
|
+
args[_i] = arguments[_i];
|
|
64
|
+
}
|
|
24
65
|
if (Global_1.CONFIG.LOG.LEVEL <= Global_1.LOG_LEVEL.WARN) {
|
|
25
|
-
console.warn(' warn : ',
|
|
66
|
+
console.warn.apply(console, __spreadArray([' warn : '], __read(args), false));
|
|
26
67
|
}
|
|
27
68
|
};
|
|
28
69
|
exports.warn = warn;
|
|
29
|
-
|
|
30
|
-
|
|
70
|
+
var error = function () {
|
|
71
|
+
var args = [];
|
|
72
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
73
|
+
args[_i] = arguments[_i];
|
|
74
|
+
}
|
|
75
|
+
console.error.apply(console, __spreadArray(['error : '], __read(args), false));
|
|
31
76
|
};
|
|
32
77
|
exports.error = error;
|
package/utils/PageUtil.d.ts
CHANGED
|
@@ -12,17 +12,18 @@ export declare const paramToUri: (param: PlainObject, baseUrl?: string) => strin
|
|
|
12
12
|
*/
|
|
13
13
|
export declare const IpToInt: (ip: string) => number;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* 判断是否有权限
|
|
16
16
|
*/
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const hasRole: (roleCode: string) => boolean;
|
|
18
|
+
type ResolveURL = (url: string) => string;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* 兼容二级目录-转化URL
|
|
20
21
|
*/
|
|
21
|
-
export declare const
|
|
22
|
+
export declare const resolveURL: ResolveURL;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* 兼容二级目录-恢复URL
|
|
24
25
|
*/
|
|
25
|
-
export declare const
|
|
26
|
+
export declare const clearURL: ResolveURL;
|
|
26
27
|
/**
|
|
27
28
|
* 获取当前 APP 名称
|
|
28
29
|
*/
|
|
@@ -34,3 +35,8 @@ export declare const currentApp: (root?: string) => string;
|
|
|
34
35
|
* 2. 将label 转换为 国际化后的 label
|
|
35
36
|
*/
|
|
36
37
|
export declare const getOptions: (items: BaseOption[]) => BaseOption[];
|
|
38
|
+
/**
|
|
39
|
+
* 等待一个方法返回 true
|
|
40
|
+
*/
|
|
41
|
+
export declare const waitFor: (assert: () => boolean, delay?: number) => Promise<void>;
|
|
42
|
+
export {};
|
package/utils/PageUtil.js
CHANGED
|
@@ -1,18 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
2
49
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
50
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
51
|
};
|
|
5
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
53
|
+
exports.waitFor = exports.getOptions = exports.currentApp = exports.clearURL = exports.resolveURL = exports.hasRole = exports.IpToInt = exports.paramToUri = exports.stopEvent = void 0;
|
|
54
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
55
|
+
var StringUtil_1 = require("./StringUtil");
|
|
56
|
+
var _Support_1 = require("./_Support");
|
|
57
|
+
var _AjaxUtil_1 = require("./_AjaxUtil");
|
|
58
|
+
var i18n_1 = require("./i18n");
|
|
59
|
+
var Global_1 = require("./Global");
|
|
60
|
+
var len = window.APP_ROOT ? window.APP_ROOT.length : 0;
|
|
12
61
|
/**
|
|
13
62
|
* 阻止事件简单封装
|
|
14
63
|
*/
|
|
15
|
-
|
|
64
|
+
var stopEvent = function (evt, callback) {
|
|
16
65
|
if (lodash_1.default.isFunction(evt === null || evt === void 0 ? void 0 : evt.preventDefault)) {
|
|
17
66
|
evt.preventDefault();
|
|
18
67
|
evt.stopPropagation();
|
|
@@ -25,10 +74,10 @@ exports.stopEvent = stopEvent;
|
|
|
25
74
|
/**
|
|
26
75
|
* 将一个参数对象转换为 url Pattern 形式
|
|
27
76
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
lodash_1.default.keys(param).map(key
|
|
31
|
-
|
|
77
|
+
var paramToUri = function (param, baseUrl) {
|
|
78
|
+
var patterns = [];
|
|
79
|
+
lodash_1.default.keys(param).map(function (key) { return patterns.push("".concat(key, "=").concat(encodeURIComponent(param[key]))); });
|
|
80
|
+
var pattern = patterns.join('&');
|
|
32
81
|
if (baseUrl == null)
|
|
33
82
|
return pattern;
|
|
34
83
|
if (baseUrl.indexOf('?') >= 0)
|
|
@@ -39,56 +88,57 @@ exports.paramToUri = paramToUri;
|
|
|
39
88
|
/**
|
|
40
89
|
* 将一个ip4地址转换成数字
|
|
41
90
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
91
|
+
var IpToInt = function (ip) {
|
|
92
|
+
var ipNum = 0;
|
|
44
93
|
if (!(0, StringUtil_1.isIP)(ip, '4'))
|
|
45
94
|
return ipNum;
|
|
46
|
-
return ip.split('.').reduce((ipInt, octet)
|
|
95
|
+
return ip.split('.').reduce(function (ipInt, octet) {
|
|
96
|
+
return (ipInt << 8) + parseInt(octet, 10);
|
|
97
|
+
}, 0) >>> 0;
|
|
47
98
|
};
|
|
48
99
|
exports.IpToInt = IpToInt;
|
|
100
|
+
/**
|
|
101
|
+
* 判断是否有权限
|
|
102
|
+
*/
|
|
103
|
+
var hasRole = function (roleCode) {
|
|
104
|
+
return Global_1.CONFIG.PROMISSION.ROLE.has(roleCode) || Global_1.CONFIG.PROMISSION.ROLE.has((0, StringUtil_1.trimLower)(roleCode));
|
|
105
|
+
};
|
|
106
|
+
exports.hasRole = hasRole;
|
|
107
|
+
var DEFAULT_RESOLVER = function (url) { return url; };
|
|
49
108
|
/**
|
|
50
109
|
* 兼容二级目录-转化URL
|
|
51
110
|
*/
|
|
52
|
-
exports.resolveURL =
|
|
111
|
+
exports.resolveURL = len == 0 ? DEFAULT_RESOLVER : function (url) {
|
|
53
112
|
if (!url.startsWith('/'))
|
|
54
113
|
return url;
|
|
55
114
|
if (url.startsWith(window.APP_ROOT))
|
|
56
115
|
return url;
|
|
57
116
|
return window.APP_ROOT + url;
|
|
58
117
|
};
|
|
59
|
-
const len = window.APP_ROOT ? window.APP_ROOT.length : 0;
|
|
60
118
|
/**
|
|
61
119
|
* 兼容二级目录-恢复URL
|
|
62
120
|
*/
|
|
63
|
-
exports.clearURL =
|
|
121
|
+
exports.clearURL = len == 0 ? DEFAULT_RESOLVER : function (url) {
|
|
64
122
|
if (!url.startsWith(window.APP_ROOT))
|
|
65
123
|
return url;
|
|
66
124
|
return url.substring(len);
|
|
67
125
|
};
|
|
68
|
-
|
|
69
|
-
* 判断是否有权限
|
|
70
|
-
*/
|
|
71
|
-
const hasRole = (roleCode) => {
|
|
72
|
-
return Global_1.CONFIG.PROMISSION.ROLE.has(roleCode) || Global_1.CONFIG.PROMISSION.ROLE.has((0, StringUtil_1.trimLower)(roleCode));
|
|
73
|
-
};
|
|
74
|
-
exports.hasRole = hasRole;
|
|
75
|
-
// export const hasRole = (roleCode: string): boolean => true; // 测试中,总返回有权限
|
|
76
|
-
const GLOBAL_APPS = new Map();
|
|
126
|
+
var GLOBAL_APPS = new Map();
|
|
77
127
|
/**
|
|
78
128
|
* 获取当前 APP 名称
|
|
79
129
|
*/
|
|
80
|
-
|
|
81
|
-
|
|
130
|
+
var currentApp = function (root) {
|
|
131
|
+
var pathname = root ? root : location.pathname;
|
|
82
132
|
if (GLOBAL_APPS.has(pathname))
|
|
83
133
|
return GLOBAL_APPS.get(pathname);
|
|
84
|
-
|
|
134
|
+
var path = pathname;
|
|
85
135
|
if (lodash_1.default.startsWith(path, _Support_1.APP_ROOT))
|
|
86
136
|
path = path.substring(_Support_1.APP_ROOT.length);
|
|
87
137
|
if (lodash_1.default.endsWith(path, '/'))
|
|
88
138
|
path = path.substring(0, path.length - 1);
|
|
89
139
|
if (lodash_1.default.startsWith(path, '/'))
|
|
90
140
|
path = path.substring(1);
|
|
91
|
-
|
|
141
|
+
var appName = 'app-' + path.split('/').join('-');
|
|
92
142
|
GLOBAL_APPS.set(pathname, appName);
|
|
93
143
|
return appName;
|
|
94
144
|
};
|
|
@@ -99,19 +149,19 @@ exports.currentApp = currentApp;
|
|
|
99
149
|
* 1. 过滤掉 没有roleCode的项目
|
|
100
150
|
* 2. 将label 转换为 国际化后的 label
|
|
101
151
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
items.map(item
|
|
152
|
+
var getOptions = function (items) {
|
|
153
|
+
var options = [];
|
|
154
|
+
items.map(function (item) {
|
|
105
155
|
if (item.roleCode) {
|
|
106
156
|
if (!(0, exports.hasRole)(item.roleCode)) {
|
|
107
157
|
return;
|
|
108
158
|
}
|
|
109
159
|
}
|
|
110
|
-
|
|
160
|
+
var label = item.label;
|
|
111
161
|
if (item.ik && (0, i18n_1.hasKey)(item.ik)) {
|
|
112
162
|
label = (0, i18n_1.txt)(item.ik);
|
|
113
163
|
}
|
|
114
|
-
|
|
164
|
+
var node = __assign(__assign({}, item), { label: label });
|
|
115
165
|
if (lodash_1.default.isArray(item.children) && item.children.length) {
|
|
116
166
|
node.children = (0, exports.getOptions)(item.children);
|
|
117
167
|
}
|
|
@@ -120,3 +170,23 @@ const getOptions = (items) => {
|
|
|
120
170
|
return items;
|
|
121
171
|
};
|
|
122
172
|
exports.getOptions = getOptions;
|
|
173
|
+
/**
|
|
174
|
+
* 等待一个方法返回 true
|
|
175
|
+
*/
|
|
176
|
+
var waitFor = function (assert, delay) {
|
|
177
|
+
if (delay === void 0) { delay = 33; }
|
|
178
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
179
|
+
return __generator(this, function (_a) {
|
|
180
|
+
switch (_a.label) {
|
|
181
|
+
case 0:
|
|
182
|
+
if (!!assert()) return [3 /*break*/, 2];
|
|
183
|
+
return [4 /*yield*/, (0, _AjaxUtil_1.WAIT)(delay)];
|
|
184
|
+
case 1:
|
|
185
|
+
_a.sent();
|
|
186
|
+
return [3 /*break*/, 0];
|
|
187
|
+
case 2: return [2 /*return*/];
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
exports.waitFor = waitFor;
|