vap1 0.2.2 → 0.2.4
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/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.d.ts +10 -2
- package/components/_common/DateRange.js +65 -69
- 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 +116 -79
- 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 +160 -124
- package/components/_setup/UForm/UFormInput.js +113 -72
- 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 +116 -86
- 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 +65 -18
- 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 +43 -26
- 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.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 +30 -19
- 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/utils/Convert.js +137 -94
- package/uform/utils/SchemaConvert.js +43 -68
- package/uform/utils/arr.js +103 -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.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 +82 -29
- package/widget/index.js +4 -4
|
@@ -27,17 +27,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.MonthRange = void 0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(0, react_1.useLayoutEffect)(()
|
|
30
|
+
var react_1 = __importStar(require("react"));
|
|
31
|
+
var dayjs_1 = __importDefault(require("dayjs"));
|
|
32
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
33
|
+
var antd_1 = require("antd");
|
|
34
|
+
var hooks_1 = require("../../hooks");
|
|
35
|
+
var utils_1 = require("../../utils");
|
|
36
|
+
var Const_1 = require("../_setup/Const");
|
|
37
|
+
var MonthRange = function (props) {
|
|
38
|
+
var update = (0, hooks_1.useUpdate)();
|
|
39
|
+
var state = (0, react_1.useRef)({ startOpen: false, endOpen: false });
|
|
40
|
+
(0, react_1.useLayoutEffect)(function () {
|
|
41
41
|
if (lodash_1.default.has(props, 'defaultStart'))
|
|
42
42
|
state.current.start = (0, dayjs_1.default)(props.defaultStart);
|
|
43
43
|
if (lodash_1.default.has(props, 'defaultEnd'))
|
|
@@ -45,13 +45,13 @@ const MonthRange = (props) => {
|
|
|
45
45
|
if (state.current.start || state.current.end)
|
|
46
46
|
update();
|
|
47
47
|
}, []);
|
|
48
|
-
|
|
48
|
+
var disabledStartDate = function (startValue) {
|
|
49
49
|
if (props.minDate) {
|
|
50
50
|
if (startValue > props.minDate) {
|
|
51
51
|
return true;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
var endValue = state.current.end;
|
|
55
55
|
if (!startValue || !endValue) {
|
|
56
56
|
if (props.minDate) {
|
|
57
57
|
return startValue.valueOf() > props.minDate.valueOf();
|
|
@@ -60,13 +60,13 @@ const MonthRange = (props) => {
|
|
|
60
60
|
}
|
|
61
61
|
return startValue.valueOf() > endValue.valueOf();
|
|
62
62
|
};
|
|
63
|
-
|
|
63
|
+
var disabledEndDate = function (endValue) {
|
|
64
64
|
if (props.maxDate) {
|
|
65
65
|
if (endValue > props.maxDate) {
|
|
66
66
|
return true;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
var startValue = state.current.start;
|
|
70
70
|
if (!startValue) {
|
|
71
71
|
if (props.maxDate) {
|
|
72
72
|
return endValue < props.maxDate;
|
|
@@ -75,10 +75,10 @@ const MonthRange = (props) => {
|
|
|
75
75
|
}
|
|
76
76
|
return endValue <= startValue;
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
var callback = function () {
|
|
79
79
|
// let
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
var startFormat = 'YYYY-MM';
|
|
81
|
+
var endFormat = 'YYYY-MM';
|
|
82
82
|
if (props.format) {
|
|
83
83
|
startFormat = props.format;
|
|
84
84
|
endFormat = props.format;
|
|
@@ -99,32 +99,32 @@ const MonthRange = (props) => {
|
|
|
99
99
|
state.current.end ? state.current.end : null,
|
|
100
100
|
]);
|
|
101
101
|
};
|
|
102
|
-
|
|
102
|
+
var onStartChange = function (value) {
|
|
103
103
|
state.current.start = value;
|
|
104
104
|
callback();
|
|
105
105
|
update();
|
|
106
106
|
};
|
|
107
|
-
|
|
107
|
+
var onEndChange = function (value) {
|
|
108
108
|
state.current.end = value;
|
|
109
109
|
callback();
|
|
110
110
|
update();
|
|
111
111
|
};
|
|
112
|
-
|
|
112
|
+
var handleStartOpenChange = function (open) {
|
|
113
113
|
state.current.startOpen = open;
|
|
114
114
|
state.current.endOpen = !open;
|
|
115
115
|
update();
|
|
116
116
|
};
|
|
117
|
-
|
|
117
|
+
var handleEndOpenChange = function (open) {
|
|
118
118
|
state.current.startOpen = false;
|
|
119
119
|
state.current.endOpen = open;
|
|
120
120
|
update();
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
var style = {};
|
|
123
123
|
if (props.width)
|
|
124
124
|
style.width = props.width;
|
|
125
|
-
|
|
125
|
+
var FORMAT = 'YYYY-MM';
|
|
126
126
|
return react_1.default.createElement("div", { className: utils_1.StringUtil.className(['c-daterange'], props.className), style: style },
|
|
127
|
-
react_1.default.createElement(antd_1.DatePicker.MonthPicker, { value: state.current.start, allowClear: props.allowClear, disabled: props.disabled, disabledDate: val
|
|
128
|
-
react_1.default.createElement(antd_1.DatePicker.MonthPicker, { value: state.current.end, allowClear: props.allowClear, disabled: props.disabled, disabledDate: val
|
|
127
|
+
react_1.default.createElement(antd_1.DatePicker.MonthPicker, { value: state.current.start, allowClear: props.allowClear, disabled: props.disabled, disabledDate: function (val) { return disabledStartDate(val); }, format: FORMAT, placeholder: utils_1.i18n.getText(Const_1.V.DATE_MONTH_START), onChange: onStartChange, onOpenChange: function (open) { return handleStartOpenChange(open); }, open: state.current.startOpen }),
|
|
128
|
+
react_1.default.createElement(antd_1.DatePicker.MonthPicker, { value: state.current.end, allowClear: props.allowClear, disabled: props.disabled, disabledDate: function (val) { return disabledEndDate(val); }, format: FORMAT, placeholder: utils_1.i18n.getText(Const_1.V.DATE_MONTH_END), onChange: function (val) { return onEndChange(val); }, open: state.current.endOpen, onOpenChange: handleEndOpenChange }));
|
|
129
129
|
};
|
|
130
130
|
exports.MonthRange = MonthRange;
|
|
@@ -8,27 +8,80 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
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;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
39
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
40
|
+
if (!m) return o;
|
|
41
|
+
var i = m.call(o), r, ar = [], e;
|
|
42
|
+
try {
|
|
43
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
44
|
+
}
|
|
45
|
+
catch (error) { e = { error: error }; }
|
|
46
|
+
finally {
|
|
47
|
+
try {
|
|
48
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
49
|
+
}
|
|
50
|
+
finally { if (e) throw e.error; }
|
|
51
|
+
}
|
|
52
|
+
return ar;
|
|
53
|
+
};
|
|
11
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
55
|
exports.PromiseLabel = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
56
|
+
var react_1 = require("react");
|
|
57
|
+
var hooks_1 = require("../../hooks");
|
|
58
|
+
var utils_1 = require("../../utils");
|
|
16
59
|
/**
|
|
17
60
|
* 根据一个值,动态获取字段后,显示一个名称
|
|
18
61
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(0, hooks_1.useEffectFunction)(()
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
62
|
+
var PromiseLabel = function (props) {
|
|
63
|
+
var _a = __read((0, react_1.useState)(utils_1.Const.NONE), 2), name = _a[0], setName = _a[1];
|
|
64
|
+
(0, hooks_1.useEffectFunction)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
+
var resp, e_1;
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
_a.trys.push([0, 2, , 3]);
|
|
70
|
+
return [4 /*yield*/, props.fetcher(props.value)];
|
|
71
|
+
case 1:
|
|
72
|
+
resp = _a.sent();
|
|
73
|
+
setName(resp);
|
|
74
|
+
return [3 /*break*/, 3];
|
|
75
|
+
case 2:
|
|
76
|
+
e_1 = _a.sent();
|
|
77
|
+
if (props.showKey) {
|
|
78
|
+
setName(props.value + '');
|
|
79
|
+
}
|
|
80
|
+
return [3 /*break*/, 3];
|
|
81
|
+
case 3: return [2 /*return*/];
|
|
29
82
|
}
|
|
30
|
-
}
|
|
31
|
-
}));
|
|
83
|
+
});
|
|
84
|
+
}); });
|
|
32
85
|
return name;
|
|
33
86
|
};
|
|
34
87
|
exports.PromiseLabel = PromiseLabel;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Role = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
var utils_1 = require("../../utils");
|
|
5
|
+
var Role = function (props) {
|
|
6
6
|
if (!utils_1.PageUtil.hasRole(props.code))
|
|
7
7
|
return utils_1.Const.NONE;
|
|
8
8
|
return props.children;
|
|
@@ -1,24 +1,35 @@
|
|
|
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
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
17
|
exports.UPagination = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var Pagination_1 = require("../_adapt/Pagination");
|
|
20
|
+
var utils_1 = require("../../utils");
|
|
21
|
+
var i18n_1 = require("../../utils/i18n");
|
|
22
|
+
var TXT = (0, i18n_1.fastRegister)({
|
|
12
23
|
// zh-cn
|
|
13
|
-
STYLE1: (total, totalAcc)
|
|
24
|
+
STYLE1: function (total, totalAcc) { return react_1.default.createElement("span", null,
|
|
14
25
|
"\u5171",
|
|
15
26
|
react_1.default.createElement("b", null, totalAcc || total),
|
|
16
|
-
"\u6761"),
|
|
17
|
-
STYLE1_RANGE: (start, end)
|
|
27
|
+
"\u6761"); },
|
|
28
|
+
STYLE1_RANGE: function (start, end) { return react_1.default.createElement("small", null,
|
|
18
29
|
react_1.default.createElement("span", null, start),
|
|
19
30
|
" - ",
|
|
20
|
-
react_1.default.createElement("span", null, end)),
|
|
21
|
-
STYLE2: (total, cost)
|
|
31
|
+
react_1.default.createElement("span", null, end)); },
|
|
32
|
+
STYLE2: function (total, cost) { return react_1.default.createElement("span", null,
|
|
22
33
|
"\u4E3A\u60A8\u627E\u5230\u76F8\u5173\u7ED3\u679C",
|
|
23
34
|
react_1.default.createElement("b", null, total),
|
|
24
35
|
"\u6761",
|
|
@@ -26,14 +37,14 @@ const TXT = (0, i18n_1.fastRegister)({
|
|
|
26
37
|
", \u5171\u8017\u65F6 ",
|
|
27
38
|
react_1.default.createElement("span", null,
|
|
28
39
|
utils_1.Format.formatNumber(cost / 1000, 2),
|
|
29
|
-
" \u79D2"))),
|
|
40
|
+
" \u79D2"))); },
|
|
30
41
|
}, {
|
|
31
42
|
// en-us
|
|
32
|
-
STYLE1: (total, totalAcc)
|
|
43
|
+
STYLE1: function (total, totalAcc) { return react_1.default.createElement("span", null,
|
|
33
44
|
" Total : ",
|
|
34
|
-
react_1.default.createElement("b", null, totalAcc || total)),
|
|
45
|
+
react_1.default.createElement("b", null, totalAcc || total)); },
|
|
35
46
|
// STYLE1_RANGE: (start, end) => <span></span>,
|
|
36
|
-
STYLE2: (total, cost)
|
|
47
|
+
STYLE2: function (total, cost) { return react_1.default.createElement("span", null,
|
|
37
48
|
"Find ",
|
|
38
49
|
react_1.default.createElement("b", null, total),
|
|
39
50
|
" result for you",
|
|
@@ -41,15 +52,15 @@ const TXT = (0, i18n_1.fastRegister)({
|
|
|
41
52
|
", Cost ",
|
|
42
53
|
react_1.default.createElement("span", null,
|
|
43
54
|
utils_1.Format.formatNumber(cost / 1000, 2),
|
|
44
|
-
" Second"))),
|
|
55
|
+
" Second"))); },
|
|
45
56
|
}, {
|
|
46
57
|
// zh-hk
|
|
47
|
-
STYLE1: (total, totalAcc)
|
|
58
|
+
STYLE1: function (total, totalAcc) { return react_1.default.createElement("span", null,
|
|
48
59
|
" \u5171 ",
|
|
49
60
|
react_1.default.createElement("b", null, totalAcc || total),
|
|
50
|
-
" \u689D"),
|
|
61
|
+
" \u689D"); },
|
|
51
62
|
// STYLE1_RANGE: (start, end) => <span></span>,
|
|
52
|
-
STYLE2: (total, cost)
|
|
63
|
+
STYLE2: function (total, cost) { return react_1.default.createElement("span", null,
|
|
53
64
|
"\u70BA\u60A8\u627E\u5230\u76F8\u95DC\u7D50\u679C",
|
|
54
65
|
react_1.default.createElement("b", null, total),
|
|
55
66
|
"\u689D",
|
|
@@ -57,24 +68,24 @@ const TXT = (0, i18n_1.fastRegister)({
|
|
|
57
68
|
", \u5171\u8017\u65F6 ",
|
|
58
69
|
react_1.default.createElement("span", null,
|
|
59
70
|
utils_1.Format.formatNumber(cost / 1000, 2),
|
|
60
|
-
" \u79D2"))),
|
|
71
|
+
" \u79D2"))); },
|
|
61
72
|
});
|
|
62
|
-
|
|
73
|
+
var TOTAL1 = function (total, range, totalAcc) {
|
|
63
74
|
return react_1.default.createElement("span", { className: "c-pagination-info" },
|
|
64
75
|
(0, i18n_1.node)(TXT.STYLE1, total + '', totalAcc + ''),
|
|
65
76
|
react_1.default.createElement("span", { className: "c-pagination-range" }, (0, i18n_1.node)(TXT.STYLE1_RANGE, range[0], range[1])));
|
|
66
77
|
};
|
|
67
|
-
|
|
78
|
+
var TOTAL2 = function (total, range, totalAcc, cost) {
|
|
68
79
|
return react_1.default.createElement("span", { className: "c-pagination-info" }, (0, i18n_1.node)(TXT.STYLE2, totalAcc || total, cost));
|
|
69
80
|
};
|
|
70
|
-
|
|
81
|
+
var TOTAL3 = function (total, range, totalAcc) {
|
|
71
82
|
return react_1.default.createElement("span", { className: "c-pagination-info" }, (0, i18n_1.node)(TXT.STYLE1, total + '', totalAcc + ''));
|
|
72
83
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
84
|
+
var getConfig = function (total, totalAcc, cost) {
|
|
85
|
+
var _a = utils_1.GLOBAL.CONFIG.PAGINATION, THEME = _a.THEME, OPTIONS = _a.OPTIONS, SIZE_DEFAULT = _a.SIZE_DEFAULT, SIZE = _a.SIZE;
|
|
86
|
+
var conf = {
|
|
76
87
|
pageSize: SIZE_DEFAULT,
|
|
77
|
-
pageSizeOptions: OPTIONS.map(item
|
|
88
|
+
pageSizeOptions: OPTIONS.map(function (item) { return "".concat(item); }),
|
|
78
89
|
showQuickJumper: true,
|
|
79
90
|
showSizeChanger: true,
|
|
80
91
|
hideOnSinglePage: false,
|
|
@@ -82,25 +93,25 @@ const getConfig = (total, totalAcc, cost) => {
|
|
|
82
93
|
};
|
|
83
94
|
switch (THEME) {
|
|
84
95
|
case 0:
|
|
85
|
-
conf.showTotal = ()
|
|
96
|
+
conf.showTotal = function () { return utils_1.Const.NONE; };
|
|
86
97
|
break;
|
|
87
98
|
case 1:
|
|
88
|
-
conf.showTotal = (total, range)
|
|
99
|
+
conf.showTotal = function (total, range) { return TOTAL1(total, range, totalAcc || total); };
|
|
89
100
|
break;
|
|
90
101
|
case 2:
|
|
91
|
-
conf.showTotal = (total, range)
|
|
102
|
+
conf.showTotal = function (total, range) { return TOTAL2(total, range, totalAcc || total, cost); };
|
|
92
103
|
break;
|
|
93
104
|
case 3:
|
|
94
|
-
conf.showTotal = (total, range)
|
|
105
|
+
conf.showTotal = function (total, range) { return TOTAL3(total, range, totalAcc || total); };
|
|
95
106
|
break;
|
|
96
107
|
default:
|
|
97
|
-
conf.showTotal = (total, range)
|
|
108
|
+
conf.showTotal = function (total, range) { return TOTAL1(total, range, totalAcc || total); };
|
|
98
109
|
break;
|
|
99
110
|
}
|
|
100
111
|
return conf;
|
|
101
112
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return react_1.default.createElement(Pagination_1.Pagination,
|
|
113
|
+
var UPagination = function (props) {
|
|
114
|
+
var conf = getConfig(props.total, props.totalAcc, props.cost);
|
|
115
|
+
return react_1.default.createElement(Pagination_1.Pagination, __assign({}, conf, props, { className: utils_1.StringUtil.className(['c-pagination', 'c-pagination-style' + (props.mode || utils_1.GLOBAL.CONFIG.PAGINATION.THEME || 1)], props.className) }));
|
|
105
116
|
};
|
|
106
117
|
exports.UPagination = UPagination;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.V = exports.TXT = exports.NAMESPACE = void 0;
|
|
7
|
-
|
|
7
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
exports.NAMESPACE = '_V_INNER';
|
|
9
9
|
exports.TXT = {
|
|
10
10
|
INPUT_TEXT: 'INPUT_TEXT',
|
|
@@ -109,4 +109,4 @@ exports.TXT = {
|
|
|
109
109
|
UPLOAD_MODAL_TIP: 'UPLOAD_MODAL_TIP',
|
|
110
110
|
};
|
|
111
111
|
exports.V = {};
|
|
112
|
-
lodash_1.default.keys(exports.TXT).map(key
|
|
112
|
+
lodash_1.default.keys(exports.TXT).map(function (key) { return exports.V[key] = exports.NAMESPACE + '.' + exports.TXT[key]; });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var zhCN_1 = require("./zhCN");
|
|
4
|
+
var i18n_1 = require("../../../utils/i18n");
|
|
5
5
|
(0, zhCN_1.register)(i18n_1.Language.EN_US, {
|
|
6
6
|
INPUT_TEXT: 'Please Input ',
|
|
7
7
|
INPUT_SELECT: 'Please Select ',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
var i18n_1 = require("../../../utils/i18n");
|
|
5
|
+
var Const_1 = require("../Const");
|
|
6
|
+
var register = function (lang, resource) { return (0, i18n_1.register)(lang, Const_1.NAMESPACE, resource); };
|
|
7
7
|
exports.register = register;
|
|
8
8
|
(0, exports.register)(i18n_1.Language.ZH_CN, {
|
|
9
9
|
INPUT_TEXT: '请输入',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var zhCN_1 = require("./zhCN");
|
|
4
|
+
var i18n_1 = require("../../../utils/i18n");
|
|
5
5
|
// http://www.ku51.net/
|
|
6
6
|
(0, zhCN_1.register)(i18n_1.Language.ZH_HK, {
|
|
7
7
|
INPUT_TEXT: '請輸入',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
var utils_1 = require("../../../utils");
|
|
4
4
|
var c2u = [["menu-promission", "e600"], ["audit-task-status-finish", "e601"], ["audit-task-status-doing", "e602"], ["audit-task-status-waiting", "e603"], ["audit-task-status-error", "e604"], ["audit-kpi-novir", "e605"], ["audit-risk-red", "e606"], ["audit-risk-danger", "e607"], ["audit-risk-game", "e608"], ["audit-risk-wg", "e609"], ["audit-risk-hot", "e60a"], ["audit-risk-concet", "e60b"], ["audit-kpi-installed", "e60c"], ["audit-kpi-outrage", "e60d"], ["audit-kpi-trust", "e60e"], ["audit-kpi-unusual", "e60f"], ["audit-kpi-outline", "e610"], ["symbol-date", "e611"], ["symbol-string", "e612"], ["symbol-number", "e613"], ["chart-duijitiaoxingtu", "e614"], ["chart-shuzi", "e615"], ["chart-10juxingshutu", "e616"], ["chart-ciyuntu", "e617"], ["chart-biaoge", "e618"], ["chart-striptype", "e619"], ["chart-zhuzhuangtu", "e61a"], ["chart-duijizhuzhuangtu", "e61b"], ["chart-loudoutu", "e61c"], ["chart-pie-graph", "e61d"], ["chart-wenben", "e61e"], ["chart-mianjitu", "e61f"], ["chart-duibitiaoxingtu", "e620"], ["chart-leidatu", "e621"], ["chart-zhexiantu", "e622"], ["chart-kongjianshutu", "e623"], ["chart-sangjitu", "e624"], ["chart-chinamap", "e625"], ["chart-sandiantu", "e626"], ["chart-yibiaopan", "e627"], ["chart-relitu", "e628"], ["symbol-check-off", "e629"], ["symbol-check-on", "e62a"], ["symbol-arrow-right", "e62b"], ["symbol-user", "e62c"], ["symbol-arrow-left", "e62d"], ["symbol-device", "e62e"], ["symbol-app", "e62f"], ["symbol-process", "e630"], ["audit-app", "e631"], ["audit-device", "e632"], ["audit-threaten", "e633"], ["audit-virus", "e634"], ["audit-netflow", "e635"], ["audit-attack", "e636"], ["device-personal", "e638"], ["device-server", "e639"], ["device-stream", "e63a"], ["device-network", "e63b"], ["device-safe", "e63c"], ["device-other", "e63d"], ["device-storage", "e63e"], ["menu-fullscreen", "e640"], ["menu-theme", "e641"], ["menu-ruby", "e642"], ["menu-fullscreen2", "e643"], ["alarm-explore", "e637"], ["alarm-monitor", "e63f"], ["alarm-statistics", "e644"], ["alarm-logs", "e645"], ["alarm-reports", "e646"], ["alarm-safe-trend", "e647"], ["alarm-leak-scan", "e648"], ["alarm-analysis", "e649"], ["alarm-expert", "e64a"], ["alarm-app-desk", "e64b"], ["alarm-attacked", "e64c"], ["alarm-apps", "e64d"], ["alarm-tag", "e64e"], ["alarm-safety", "e64f"], ["alarm-manager", "e650"], ["alarm-net-traffic", "e651"], ["alarm-setting", "e652"], ["menu-tag-manager", "e684"], ["menu-monitor-center", "e685"], ["menu-app-situation", "e686"], ["menu-report-center", "e687"], ["menu-summary-situation", "e688"], ["menu-terminal-evidence", "e689"], ["menu-workbench", "e68a"], ["menu-leak-situation", "e68b"], ["menu-work-order", "e68c"], ["menu-asset-manager", "e68d"], ["menu-asset-situation", "e68e"], ["menu-expert", "e68f"], ["menu-alarm-center", "e690"], ["menu-search-img", "e691"], ["menu-data-search", "e692"], ["menu-data-dashboard", "e693"], ["menu-attack-situation", "e694"], ["symbol-search", "e695"], ["symbol-bigscreen", "e696"], ["symbol-alarm", "e697"], ["symbol-fullscreen", "e698"], ["symbol-message", "e699"], ["symbol-apps", "e69a"], ["symbol-theme", "e69b"], ["chart-dashboard-add", "e69c"], ["menu-toggle-hide", "e69d"], ["menu-toggle-expand", "e69e"], ["symbol-avatar", "e69f"], ["radius-upleft", "e7c7"], ["Console-SQL", "e9c7"], ["radius-upright", "e7c8"], ["icon-test", "e9c8"], ["radius-setting", "e7c9"], ["aim", "e9c9"], ["user-add", "e7ca"], ["compress", "e9ca"], ["usergroup-delete", "e7cb"], ["expend", "e9cb"], ["user-delete", "e7cc"], ["folder-view", "e9cc"], ["usergroup-add", "e7cd"], ["file-gif", "e9cd"], ["user", "e7ce"], ["group", "e9ce"], ["team", "e7cf"], ["send", "e9cf"], ["area-chart", "e7d0"], ["Report", "e9d0"], ["line-chart", "e7d1"], ["View", "e9d1"], ["bar-chart", "e7d2"], ["shortcut", "e9d2"], ["dot-chart", "e7d3"], ["ungroup", "e9d3"], ["container", "e7d4"], ["database", "e7d5"], ["sever", "e7d6"], ["mobile", "e7d7"], ["tablet", "e7d8"], ["red-envelope", "e7d9"], ["book", "e7da"], ["file-done", "e7db"], ["reconciliation", "e7dc"], ["exception", "e7dd"], ["file-sync", "e7de"], ["file-search", "e7df"], ["solution", "e7e0"], ["file-protect", "e7e1"], ["file-add", "e7e2"], ["file-excel", "e7e3"], ["file-exclamation", "e7e4"], ["file-pdf", "e7e5"], ["file-image", "e7e6"], ["file-markdown", "e7e7"], ["file-unknown", "e7e8"], ["file-ppt", "e7e9"], ["file-word", "e7ea"], ["file", "e7eb"], ["file-zip", "e7ec"], ["file-text", "e7ed"], ["copy", "e7ee"], ["snippets", "e7ef"], ["audit", "e7f0"], ["diff", "e7f1"], ["switcher", "e7f2"], ["security-scan", "e7f3"], ["property-safety", "e7f4"], ["safety-certificate", "e7f5"], ["insurance", "e7f6"], ["alert", "e7f7"], ["delete", "e7f8"], ["hourglass", "e7f9"], ["bulb", "e7fa"], ["experiment", "e7fb"], ["bell", "e7fc"], ["trophy", "e7fd"], ["rest", "e7fe"], ["usb", "e7ff"], ["skin", "e800"], ["home", "e801"], ["bank", "e802"], ["filter", "e803"], ["funnel-plot", "e804"], ["like", "e805"], ["dislike", "e806"], ["unlock", "e807"], ["lock", "e808"], ["customer-service", "e809"], ["flag", "e80a"], ["money-collect", "e80b"], ["medicine-box", "e80c"], ["shop", "e80d"], ["rocket", "e80e"], ["shopping-cart", "e80f"], ["folder", "e810"], ["folder-open", "e811"], ["folder-add", "e812"], ["deploymentunit", "e813"], ["account-book", "e814"], ["contacts", "e815"], ["carry-out", "e816"], ["calendar-check", "e817"], ["calendar", "e818"], ["scan", "e819"], ["select", "e81a"], ["box-plot", "e81b"], ["build", "e81c"], ["sliders", "e81d"], ["laptop", "e81e"], ["barcode", "e81f"], ["camera", "e820"], ["cluster", "e821"], ["gateway", "e822"], ["car", "e823"], ["printer", "e824"], ["read", "e825"], ["cloud-server", "e826"], ["cloud-upload", "e827"], ["cloud", "e828"], ["cloud-download", "e829"], ["alibaba", "e929"], ["cloud-sync", "e82a"], ["antdesign", "e92a"], ["video", "e82b"], ["ant-cloud", "e92b"], ["notification", "e82c"], ["behance", "e92c"], ["sound", "e82d"], ["googleplus", "e92d"], ["radar-chart", "e82e"], ["medium", "e92e"], ["qrcode", "e82f"], ["google", "e92f"], ["fund", "e830"], ["ie", "e930"], ["picture", "e831"], ["amazon", "e931"], ["mail", "e832"], ["slack", "e932"], ["table", "e833"], ["alipay", "e933"], ["idcard", "e834"], ["taobao", "e934"], ["credit-card", "e835"], ["zhihu", "e935"], ["heart", "e836"], ["html5", "e936"], ["block", "e837"], ["linkedin", "e937"], ["error", "e838"], ["yahoo", "e938"], ["star", "e839"], ["facebook", "e939"], ["gold", "e83a"], ["skype", "e93a"], ["heat-map", "e83b"], ["codesandbox", "e93b"], ["wifi", "e83c"], ["chrome", "e93c"], ["attachment", "e83d"], ["codepen", "e93d"], ["edit", "e83e"], ["aliwangwang", "e93e"], ["key", "e83f"], ["apple", "e93f"], ["api", "e840"], ["android", "e940"], ["disconnect", "e841"], ["sketch", "e941"], ["highlight", "e842"], ["gitlab", "e942"], ["monitor", "e843"], ["dribbble", "e943"], ["link", "e844"], ["instagram", "e944"], ["man", "e845"], ["reddit", "e945"], ["percentage", "e846"], ["windows", "e946"], ["pushpin", "e847"], ["yuque", "e947"], ["phone", "e848"], ["Youtube", "e948"], ["shake", "e849"], ["tag", "e84a"], ["dropbox", "e94a"], ["wrench", "e84b"], ["dingtalk", "e94b"], ["tags", "e84c"], ["scissor", "e84d"], ["mr", "e84e"], ["share", "e84f"], ["branches", "e850"], ["qq", "e950"], ["fork", "e851"], ["twitter", "e951"], ["shrink", "e852"], ["arrawsalt", "e853"], ["weibo", "e953"], ["vertical-right", "e854"], ["vertical-left", "e855"], ["right", "e856"], ["left", "e857"], ["up", "e858"], ["down", "e859"], ["fullscreen", "e85a"], ["fullscreen-exit", "e85b"], ["double-left", "e85c"], ["double-right", "e85d"], ["arrow-right", "e85e"], ["arrow-up", "e85f"], ["arrow-left", "e860"], ["arrow-down", "e861"], ["upload", "e862"], ["colum-height", "e863"], ["vertical-align-bottom", "e864"], ["vertical-align-middle", "e865"], ["to-top", "e866"], ["vertical-align-top", "e867"], ["download", "e868"], ["sort-descending", "e869"], ["sort-ascending", "e86a"], ["fall", "e86b"], ["swap", "e86c"], ["stock", "e86d"], ["rise", "e86e"], ["indent", "e86f"], ["outdent", "e870"], ["menu", "e871"], ["unordered-list", "e872"], ["ordered-list", "e873"], ["align-right", "e874"], ["align-center", "e875"], ["align-left", "e876"], ["pic-center", "e877"], ["pic-right", "e878"], ["pic-left", "e879"], ["bold", "e87a"], ["font-colors", "e87b"], ["exclaimination", "e87c"], ["check-circle", "e77d"], ["font-size", "e87d"], ["ci", "e77e"], ["info", "e87e"], ["dollar", "e77f"], ["line-height", "e87f"], ["compass", "e780"], ["strikethrough", "e880"], ["close-circle", "e781"], ["underline", "e881"], ["frown", "e782"], ["number", "e882"], ["info-circle", "e783"], ["italic", "e883"], ["left-circle", "e784"], ["code", "e884"], ["down-circle", "e785"], ["column-width", "e885"], ["euro", "e786"], ["check", "e886"], ["zoom-out", "e986"], ["copyright", "e787"], ["ellipsis", "e887"], ["apartment", "e987"], ["minus-circle", "e788"], ["dash", "e888"], ["audio", "e988"], ["meh", "e789"], ["close", "e889"], ["plus-circle", "e78a"], ["enter", "e88a"], ["robot", "e98a"], ["play-circle", "e78b"], ["line", "e88b"], ["zoom-in", "e98b"], ["question-circle", "e78c"], ["minus", "e88c"], ["pound", "e78d"], ["question", "e88d"], ["right-circle", "e78e"], ["rollback", "e88e"], ["bug", "e98e"], ["smile", "e78f"], ["small-dash", "e88f"], ["audiostatic", "e98f"], ["trademark", "e790"], ["pause", "e890"], ["comment", "e990"], ["time-circle", "e791"], ["bg-colors", "e891"], ["signal", "e991"], ["timeout", "e792"], ["crown", "e892"], ["verified", "e992"], ["global", "e793"], ["drag", "e893"], ["yuan", "e794"], ["desktop", "e894"], ["video-camera", "e994"], ["up-circle", "e795"], ["gift", "e895"], ["switchuser", "e995"], ["warning-circle", "e796"], ["stop", "e896"], ["whatsapp", "e996"], ["sync", "e797"], ["fire", "e897"], ["appstoreadd", "e997"], ["transaction", "e798"], ["thunderbolt", "e898"], ["caret-down", "e998"], ["undo", "e799"], ["backward", "e999"], ["redo", "e79a"], ["caret-up", "e99a"], ["reload", "e79b"], ["caret-right", "e99b"], ["reloadtime", "e79c"], ["caret-left", "e99c"], ["message", "e79d"], ["fast-backward", "e99d"], ["dashboard", "e79e"], ["forward", "e99e"], ["issuesclose", "e79f"], ["fast-forward", "e99f"], ["poweroff", "e7a0"], ["search", "e9a0"], ["logout", "e7a1"], ["retweet", "e9a1"], ["pie-chart", "e7a2"], ["login", "e9a2"], ["setting", "e7a3"], ["step-backward", "e9a3"], ["eye", "e7a4"], ["step-forward", "e9a4"], ["location", "e7a5"], ["swap-right", "e9a5"], ["edit-square", "e7a6"], ["swap-left", "e9a6"], ["export", "e7a7"], ["woman", "e9a7"], ["save", "e7a8"], ["plus", "e9a8"], ["import", "e7a9"], ["appstore", "e7aa"], ["eye-invisible", "e9aa"], ["close-square", "e7ab"], ["clear", "e9ab"], ["down-square", "e7ac"], ["collapse", "e9ac"], ["layout", "e7ad"], ["expand", "e9ad"], ["left-square", "e7ae"], ["deletecolumn", "e9ae"], ["play-square", "e7af"], ["merge-cells", "e9af"], ["control", "e7b0"], ["subnode", "e9b0"], ["codelibrary", "e7b1"], ["rotate-left", "e9b1"], ["profile", "e7b2"], ["rotate-right", "e9b2"], ["minus-square", "e7b3"], ["insertrowbelow", "e9b3"], ["plus-square", "e7b4"], ["insertrowabove", "e9b4"], ["right-square", "e7b5"], ["table1", "e9b5"], ["project", "e7b6"], ["solit-cells", "e9b6"], ["wallet", "e7b7"], ["formatpainter", "e9b7"], ["up-square", "e7b8"], ["insertrowright", "e9b8"], ["calculator", "e7b9"], ["interaction", "e7ba"], ["insertrowleft", "e9ba"], ["check-square", "e7bb"], ["translate", "e9bb"], ["border", "e7bc"], ["deleterow", "e9bc"], ["border-outer", "e7bd"], ["sisternode", "e9bd"], ["border-top", "e7be"], ["field-number", "e9be"], ["border-bottom", "e7bf"], ["field-string", "e9bf"], ["border-left", "e7c0"], ["function", "e9c0"], ["border-right", "e7c1"], ["field-time", "e9c1"], ["border-inner", "e7c2"], ["gif", "e9c2"], ["border-verticle", "e7c3"], ["partition", "e9c3"], ["border-horizontal", "e7c4"], ["index", "e9c4"], ["radius-bottomleft", "e7c5"], ["storedprocedure", "e9c5"], ["radius-bottomright", "e7c6"], ["field-binary", "e9c6"]];
|
|
5
5
|
utils_1.GLOBAL.SET({
|
|
6
6
|
ICONS: {
|
|
7
|
-
CLAZZ: c2u.map(item
|
|
7
|
+
CLAZZ: c2u.map(function (item) { return item[0]; }),
|
|
8
8
|
MAP: new Map(c2u),
|
|
9
9
|
}
|
|
10
10
|
});
|
|
@@ -1,22 +1,33 @@
|
|
|
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
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(0, _register_1.registerSearchField)('autocomplete', (props)
|
|
12
|
-
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
19
|
+
var _register_1 = require("../../SearchBar/_register");
|
|
20
|
+
var AutoComplete_1 = require("../../_common/AutoComplete");
|
|
21
|
+
var SearchFieldInput_1 = require("./SearchFieldInput");
|
|
22
|
+
(0, _register_1.registerSearchField)('autocomplete', function (props) {
|
|
23
|
+
var field = props.field, onChange = props.onChange, width = props.width, data = props.data;
|
|
13
24
|
if (!lodash_1.default.has(field.config, 'api')) {
|
|
14
25
|
console.error('field type : autocomplete must have a api');
|
|
15
|
-
return react_1.default.createElement(SearchFieldInput_1.TEXT,
|
|
26
|
+
return react_1.default.createElement(SearchFieldInput_1.TEXT, __assign({}, props));
|
|
16
27
|
}
|
|
17
|
-
|
|
28
|
+
var param = {
|
|
18
29
|
allowClear: true,
|
|
19
|
-
placeholder: lodash_1.default.has(field.config, 'placeholder') ? field.config.placeholder : null || field.placeholder ||
|
|
30
|
+
placeholder: lodash_1.default.has(field.config, 'placeholder') ? field.config.placeholder : null || field.placeholder || "\u8BF7\u9009\u62E9".concat(field.label),
|
|
20
31
|
};
|
|
21
32
|
if (field.allowClear === false)
|
|
22
33
|
param.allowClear = false;
|
|
@@ -24,7 +35,7 @@ const SearchFieldInput_1 = require("./SearchFieldInput");
|
|
|
24
35
|
param.value = data[field.field];
|
|
25
36
|
if (width)
|
|
26
37
|
param.style = { width: props.width };
|
|
27
|
-
return react_1.default.createElement(AutoComplete_1.IAutoComplete,
|
|
38
|
+
return react_1.default.createElement(AutoComplete_1.IAutoComplete, __assign({}, param, field.config, { onChange: onChange }));
|
|
28
39
|
});
|
|
29
40
|
// { field: 'd', label: 'inputsearch', type: 'inputsearch' },
|
|
30
41
|
// registerSearchField('inputsearch', (props: TableSelectFieldProps) => {
|