@vtx/components 3.1.24 → 3.1.26
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/lib/_util/filterSpecialCharacters.js +54 -43
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +0 -3
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getUrlParam.js +0 -6
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +0 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +0 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +1 -10
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +0 -3
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +14 -32
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +0 -26
- package/lib/index.js.map +1 -1
- package/lib/vtx-color-picker/index.js +5 -21
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +0 -2
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +0 -2
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +34 -74
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +20 -45
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +0 -7
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +0 -7
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +3 -11
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +19 -44
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +2 -13
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +77 -142
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +5 -35
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +0 -10
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +0 -10
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +16 -46
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +6 -47
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +0 -5
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +0 -1
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +0 -1
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-editor/index.js +5 -23
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +0 -1
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +0 -1
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/index.js +6 -20
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +0 -1
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +0 -1
- package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
- package/lib/vtx-export/index.js +25 -58
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +0 -5
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +0 -5
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +5 -26
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +0 -8
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +8 -30
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +2 -7
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +0 -6
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +0 -2
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/index.js +8 -22
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +0 -7
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +0 -7
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-image/Image.js +56 -92
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +20 -51
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +11 -40
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +0 -6
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +0 -1
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-import/index.js +37 -72
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +7 -24
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +0 -3
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +0 -3
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-import2/CheckResult.js +0 -6
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +4 -25
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +0 -4
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +5 -11
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +0 -4
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +38 -92
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +0 -3
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +0 -3
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-input/TextArea.js +6 -22
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +11 -37
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +0 -1
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +0 -1
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/useLength.js +4 -16
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +1 -6
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +30 -70
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +0 -1
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +0 -1
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +2 -6
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +7 -19
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +2 -10
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +17 -47
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +3 -15
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +4 -34
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +0 -8
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-rps-frame/index.js +27 -45
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +19 -57
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-search/VtxCol.js +0 -21
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +6 -12
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +40 -93
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +0 -4
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +0 -4
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +42 -73
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +0 -2
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +0 -2
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +20 -65
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +0 -8
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +0 -8
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-signature/index.js +14 -28
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +0 -2
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +0 -2
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-split-pane/Pane.js +2 -14
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +9 -29
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +39 -94
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +0 -4
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +0 -3
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +0 -3
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-statistics-column/Back.js +1 -7
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +5 -22
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +5 -22
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +0 -2
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +0 -16
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-time-picker/index.js +3 -16
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +9 -28
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +67 -137
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +0 -5
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +0 -5
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/index.js +36 -66
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +0 -1
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +0 -1
- package/lib/vtx-wang-editor/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/wangEditorUtil.js +30 -88
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +49 -101
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +0 -1
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +0 -1
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/index.js +43 -99
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +0 -3
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +0 -3
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/package.json +126 -126
- package/CHANGELOG.md +0 -1248
|
@@ -4,26 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = filterSpecialCharacters;
|
|
7
|
-
|
|
8
7
|
var _lodash = _interopRequireDefault(require("lodash.difference"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
10
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
-
|
|
18
12
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
19
|
-
|
|
20
13
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
-
|
|
22
14
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
-
|
|
24
15
|
function isNotEmpty(value) {
|
|
25
16
|
return Array.isArray(value) && value.length > 0;
|
|
26
17
|
}
|
|
18
|
+
|
|
27
19
|
/**
|
|
28
20
|
* 过滤特殊字符
|
|
29
21
|
* @param {String} value 值
|
|
@@ -31,49 +23,68 @@ function isNotEmpty(value) {
|
|
|
31
23
|
* @param {Array} [option.include] 新增
|
|
32
24
|
* @param {Array} [option.exclude] 排除
|
|
33
25
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
26
|
function filterSpecialCharacters(value) {
|
|
37
27
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
_ref$include = _ref.include,
|
|
29
|
+
include = _ref$include === void 0 ? [] : _ref$include,
|
|
30
|
+
_ref$exclude = _ref.exclude,
|
|
31
|
+
exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
|
|
43
32
|
// 特殊符号,- _ 排除
|
|
44
|
-
var specialCharacter = [
|
|
45
|
-
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
'
|
|
51
|
-
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
'
|
|
57
|
-
|
|
58
|
-
'
|
|
59
|
-
|
|
60
|
-
'
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
'
|
|
65
|
-
|
|
66
|
-
'
|
|
67
|
-
|
|
33
|
+
var specialCharacter = [
|
|
34
|
+
// 小括号
|
|
35
|
+
'(', ')', '(', ')',
|
|
36
|
+
// 中括号
|
|
37
|
+
'\\[', '\\]', '[', ']',
|
|
38
|
+
// 大括号
|
|
39
|
+
'{', '}', '{', '}',
|
|
40
|
+
// 方头括号
|
|
41
|
+
'【', '】',
|
|
42
|
+
// 尖括号
|
|
43
|
+
'<', '>',
|
|
44
|
+
// 书名号
|
|
45
|
+
'《', '》',
|
|
46
|
+
// 斜杠
|
|
47
|
+
'/',
|
|
48
|
+
// 反斜杠
|
|
49
|
+
'\\\\',
|
|
50
|
+
// 逗号
|
|
51
|
+
',', ',',
|
|
52
|
+
// 句号
|
|
53
|
+
'.', '。',
|
|
54
|
+
// 冒号
|
|
55
|
+
':', ':',
|
|
56
|
+
// 分号
|
|
57
|
+
';', ';',
|
|
58
|
+
// 顿号
|
|
59
|
+
'、',
|
|
60
|
+
// 破折号
|
|
61
|
+
'——',
|
|
62
|
+
// 感叹号
|
|
63
|
+
'!', '!',
|
|
64
|
+
// 问号
|
|
65
|
+
'?', '?',
|
|
66
|
+
// 加减等于
|
|
67
|
+
'+', '=',
|
|
68
|
+
// 单引号
|
|
69
|
+
"'", '‘', '’',
|
|
70
|
+
// 双引号
|
|
71
|
+
'"', '“', '”',
|
|
72
|
+
// 金钱
|
|
73
|
+
'$', '¥',
|
|
74
|
+
// 百分号
|
|
75
|
+
'%', '%',
|
|
76
|
+
// 其它
|
|
77
|
+
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
78
|
+
|
|
79
|
+
// 新增
|
|
68
80
|
if (isNotEmpty(include)) {
|
|
69
81
|
specialCharacter = Array.from(new Set([].concat(_toConsumableArray(specialCharacter), _toConsumableArray(include))));
|
|
70
|
-
}
|
|
71
|
-
|
|
82
|
+
}
|
|
72
83
|
|
|
84
|
+
// 移除
|
|
73
85
|
if (isNotEmpty(exclude)) {
|
|
74
86
|
specialCharacter = (0, _lodash["default"])(specialCharacter, exclude);
|
|
75
87
|
}
|
|
76
|
-
|
|
77
88
|
return value.replace(new RegExp("[".concat(specialCharacter.join(''), "]"), 'g'), '');
|
|
78
89
|
}
|
|
79
90
|
//# sourceMappingURL=filterSpecialCharacters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterSpecialCharacters.js","names":["isNotEmpty","value","Array","isArray","length","filterSpecialCharacters","include","exclude","specialCharacter","from","Set","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\n\nfunction isNotEmpty(value) {\n return Array.isArray(value) && value.length > 0;\n}\n\n/**\n * 过滤特殊字符\n * @param {String} value 值\n * @param {Object} option\n * @param {Array} [option.include] 新增\n * @param {Array} [option.exclude] 排除\n */\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\n // 特殊符号,- _ 排除\n let specialCharacter = [\n // 小括号\n '(',\n ')',\n '(',\n ')',\n // 中括号\n '\\\\[',\n '\\\\]',\n '[',\n ']',\n // 大括号\n '{',\n '}',\n '{',\n '}',\n // 方头括号\n '【',\n '】',\n // 尖括号\n '<',\n '>',\n // 书名号\n '《',\n '》',\n // 斜杠\n '/',\n // 反斜杠\n '\\\\\\\\',\n // 逗号\n ',',\n ',',\n // 句号\n '.',\n '。',\n // 冒号\n ':',\n ':',\n // 分号\n ';',\n ';',\n // 顿号\n '、',\n // 破折号\n '——',\n // 感叹号\n '!',\n '!',\n // 问号\n '?',\n '?',\n // 加减等于\n '+',\n '=',\n // 单引号\n \"'\",\n '‘',\n '’',\n // 双引号\n '\"',\n '“',\n '”',\n // 金钱\n '$',\n '¥',\n // 百分号\n '%',\n '%',\n // 其它\n '@',\n '#',\n '`',\n '~',\n '*',\n '^',\n '……',\n '|',\n '&',\n ];\n\n // 新增\n if (isNotEmpty(include)) {\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\n }\n\n // 移除\n if (isNotEmpty(exclude)) {\n specialCharacter = difference(specialCharacter, exclude);\n }\n\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"filterSpecialCharacters.js","names":["isNotEmpty","value","Array","isArray","length","filterSpecialCharacters","include","exclude","specialCharacter","from","Set","difference","replace","RegExp","join"],"sources":["_util/filterSpecialCharacters.js"],"sourcesContent":["import difference from 'lodash.difference';\n\nfunction isNotEmpty(value) {\n return Array.isArray(value) && value.length > 0;\n}\n\n/**\n * 过滤特殊字符\n * @param {String} value 值\n * @param {Object} option\n * @param {Array} [option.include] 新增\n * @param {Array} [option.exclude] 排除\n */\nexport default function filterSpecialCharacters(value, { include = [], exclude = [] } = {}) {\n // 特殊符号,- _ 排除\n let specialCharacter = [\n // 小括号\n '(',\n ')',\n '(',\n ')',\n // 中括号\n '\\\\[',\n '\\\\]',\n '[',\n ']',\n // 大括号\n '{',\n '}',\n '{',\n '}',\n // 方头括号\n '【',\n '】',\n // 尖括号\n '<',\n '>',\n // 书名号\n '《',\n '》',\n // 斜杠\n '/',\n // 反斜杠\n '\\\\\\\\',\n // 逗号\n ',',\n ',',\n // 句号\n '.',\n '。',\n // 冒号\n ':',\n ':',\n // 分号\n ';',\n ';',\n // 顿号\n '、',\n // 破折号\n '——',\n // 感叹号\n '!',\n '!',\n // 问号\n '?',\n '?',\n // 加减等于\n '+',\n '=',\n // 单引号\n \"'\",\n '‘',\n '’',\n // 双引号\n '\"',\n '“',\n '”',\n // 金钱\n '$',\n '¥',\n // 百分号\n '%',\n '%',\n // 其它\n '@',\n '#',\n '`',\n '~',\n '*',\n '^',\n '……',\n '|',\n '&',\n ];\n\n // 新增\n if (isNotEmpty(include)) {\n specialCharacter = Array.from(new Set([...specialCharacter, ...include]));\n }\n\n // 移除\n if (isNotEmpty(exclude)) {\n specialCharacter = difference(specialCharacter, exclude);\n }\n\n return value.replace(new RegExp(`[${specialCharacter.join('')}]`, 'g'), '');\n}\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE3C,SAASA,UAAU,CAACC,KAAK,EAAE;EACvB,OAAOC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAIA,KAAK,CAACG,MAAM,GAAG,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,uBAAuB,CAACJ,KAAK,EAAuC;EAAA,+EAAJ,CAAC,CAAC;IAAA,oBAAjCK,OAAO;IAAPA,OAAO,6BAAG,EAAE;IAAA,oBAAEC,OAAO;IAAPA,OAAO,6BAAG,EAAE;EAC/E;EACA,IAAIC,gBAAgB,GAAG;EACnB;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,MAAM;EACN;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG;EACH;EACA,IAAI;EACJ;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG;EACH;EACA,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,GAAG,CACN;;EAED;EACA,IAAIR,UAAU,CAACM,OAAO,CAAC,EAAE;IACrBE,gBAAgB,GAAGN,KAAK,CAACO,IAAI,CAAC,IAAIC,GAAG,8BAAKF,gBAAgB,sBAAKF,OAAO,GAAE,CAAC;EAC7E;;EAEA;EACA,IAAIN,UAAU,CAACO,OAAO,CAAC,EAAE;IACrBC,gBAAgB,GAAG,IAAAG,kBAAU,EAACH,gBAAgB,EAAED,OAAO,CAAC;EAC5D;EAEA,OAAON,KAAK,CAACW,OAAO,CAAC,IAAIC,MAAM,YAAKL,gBAAgB,CAACM,IAAI,CAAC,EAAE,CAAC,QAAK,GAAG,CAAC,EAAE,EAAE,CAAC;AAC/E"}
|
|
@@ -4,14 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = getComponentProps;
|
|
7
|
-
|
|
8
7
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
9
|
-
|
|
10
8
|
function getComponentProps(prop) {
|
|
11
9
|
if (prop && _typeof(prop) === 'object') {
|
|
12
10
|
return prop;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
return {};
|
|
16
13
|
}
|
|
17
14
|
//# sourceMappingURL=getComponentProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getComponentProps.js","names":["getComponentProps","prop"],"sources":["_util/getComponentProps.js"],"sourcesContent":["export default function getComponentProps(prop) {\n if (prop && typeof prop === 'object') {\n return prop;\n }\n return {};\n}\n"],"mappings":";;;;;;;AAAe,SAASA,iBAAiB,CAACC,IAAI,EAAE;EAC5C,IAAIA,IAAI,IAAI,QAAOA,IAAI,MAAK,QAAQ,EAAE;IAClC,OAAOA,IAAI;EACf;EACA,OAAO,CAAC,CAAC;AACb"}
|
package/lib/_util/getUrlParam.js
CHANGED
|
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _querystring = _interopRequireDefault(require("querystring"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
var getUrlParam = function getUrlParam(key) {
|
|
13
10
|
var href = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href;
|
|
14
|
-
|
|
15
11
|
var params = _querystring["default"].parse(href.split('?')[1]);
|
|
16
|
-
|
|
17
12
|
return key ? params[key] : params;
|
|
18
13
|
};
|
|
19
|
-
|
|
20
14
|
var _default = getUrlParam;
|
|
21
15
|
exports["default"] = _default;
|
|
22
16
|
//# sourceMappingURL=getUrlParam.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUrlParam.js","names":["getUrlParam","key","href","window","location","params","qs","parse","split"],"sources":["_util/getUrlParam.js"],"sourcesContent":["import qs from 'querystring';\n\nconst getUrlParam = (key, href = window.location.href) => {\n const params = qs.parse(href.split('?')[1]);\n return key ? params[key] : params;\n};\n\nexport default getUrlParam;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getUrlParam.js","names":["getUrlParam","key","href","window","location","params","qs","parse","split"],"sources":["_util/getUrlParam.js"],"sourcesContent":["import qs from 'querystring';\n\nconst getUrlParam = (key, href = window.location.href) => {\n const params = qs.parse(href.split('?')[1]);\n return key ? params[key] : params;\n};\n\nexport default getUrlParam;\n"],"mappings":";;;;;;AAAA;AAA6B;AAE7B,IAAMA,WAAW,GAAG,SAAdA,WAAW,CAAIC,GAAG,EAAkC;EAAA,IAAhCC,IAAI,uEAAGC,MAAM,CAACC,QAAQ,CAACF,IAAI;EACjD,IAAMG,MAAM,GAAGC,uBAAE,CAACC,KAAK,CAACL,IAAI,CAACM,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;EAC3C,OAAOP,GAAG,GAAGI,MAAM,CAACJ,GAAG,CAAC,GAAGI,MAAM;AACrC,CAAC;AAAC,eAEaL,WAAW;AAAA"}
|
package/lib/_util/isFunction.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFunction.js","names":["isFunction","fn","Object","prototype","toString","call"],"sources":["_util/isFunction.js"],"sourcesContent":["export default function isFunction(fn) {\n return Object.prototype.toString.call(fn) === '[object Function]';\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isFunction.js","names":["isFunction","fn","Object","prototype","toString","call"],"sources":["_util/isFunction.js"],"sourcesContent":["export default function isFunction(fn) {\n return Object.prototype.toString.call(fn) === '[object Function]';\n}\n"],"mappings":";;;;;;AAAe,SAASA,UAAU,CAACC,EAAE,EAAE;EACnC,OAAOC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ,EAAE,CAAC,KAAK,mBAAmB;AACrE"}
|
package/lib/_util/isObject.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isObject.js","names":["isObject","x","Object","prototype","toString","call"],"sources":["_util/isObject.js"],"sourcesContent":["export default function isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isObject.js","names":["isObject","x","Object","prototype","toString","call"],"sources":["_util/isObject.js"],"sourcesContent":["export default function isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}\n"],"mappings":";;;;;;AAAe,SAASA,QAAQ,CAACC,CAAC,EAAE;EAChC,OAAOC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ,CAAC,CAAC,KAAK,iBAAiB;AAClE"}
|
package/lib/_util/useColSize.js
CHANGED
|
@@ -4,25 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _useSize = _interopRequireDefault(require("ahooks/lib/useSize"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
var COL_SIZE = {
|
|
13
10
|
lg: 'lg',
|
|
14
11
|
md: 'md',
|
|
15
12
|
sm: 'sm'
|
|
16
13
|
};
|
|
17
|
-
|
|
18
14
|
var _default = function _default(ref) {
|
|
19
15
|
var dom = (ref === null || ref === void 0 ? void 0 : ref.current) || document.querySelector('body');
|
|
20
|
-
|
|
21
16
|
var _ref = (0, _useSize["default"])(dom) || {},
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
width = _ref.width;
|
|
24
18
|
var size = COL_SIZE.lg;
|
|
25
|
-
|
|
26
19
|
if (width >= 1370) {
|
|
27
20
|
size = COL_SIZE.lg;
|
|
28
21
|
} else if (width >= 992) {
|
|
@@ -30,9 +23,7 @@ var _default = function _default(ref) {
|
|
|
30
23
|
} else {
|
|
31
24
|
size = COL_SIZE.sm;
|
|
32
25
|
}
|
|
33
|
-
|
|
34
26
|
return size;
|
|
35
27
|
};
|
|
36
|
-
|
|
37
28
|
exports["default"] = _default;
|
|
38
29
|
//# sourceMappingURL=useColSize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColSize.js","names":["COL_SIZE","lg","md","sm","ref","dom","current","document","querySelector","useSize","width","size"],"sources":["_util/useColSize.js"],"sourcesContent":["import useSize from 'ahooks/lib/useSize';\n\nconst COL_SIZE = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n};\n\nexport default ref => {\n const dom = ref?.current || document.querySelector('body');\n const { width } = useSize(dom) || {};\n let size = COL_SIZE.lg;\n if (width >= 1370) {\n size = COL_SIZE.lg;\n } else if (width >= 992) {\n size = COL_SIZE.md;\n } else {\n size = COL_SIZE.sm;\n }\n return size;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useColSize.js","names":["COL_SIZE","lg","md","sm","ref","dom","current","document","querySelector","useSize","width","size"],"sources":["_util/useColSize.js"],"sourcesContent":["import useSize from 'ahooks/lib/useSize';\n\nconst COL_SIZE = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n};\n\nexport default ref => {\n const dom = ref?.current || document.querySelector('body');\n const { width } = useSize(dom) || {};\n let size = COL_SIZE.lg;\n if (width >= 1370) {\n size = COL_SIZE.lg;\n } else if (width >= 992) {\n size = COL_SIZE.md;\n } else {\n size = COL_SIZE.sm;\n }\n return size;\n};\n"],"mappings":";;;;;;AAAA;AAAyC;AAEzC,IAAMA,QAAQ,GAAG;EACbC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACR,CAAC;AAAC,eAEa,kBAAAC,GAAG,EAAI;EAClB,IAAMC,GAAG,GAAG,CAAAD,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CAAEE,OAAO,KAAIC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;EAC1D,WAAkB,IAAAC,mBAAO,EAACJ,GAAG,CAAC,IAAI,CAAC,CAAC;IAA5BK,KAAK,QAALA,KAAK;EACb,IAAIC,IAAI,GAAGX,QAAQ,CAACC,EAAE;EACtB,IAAIS,KAAK,IAAI,IAAI,EAAE;IACfC,IAAI,GAAGX,QAAQ,CAACC,EAAE;EACtB,CAAC,MAAM,IAAIS,KAAK,IAAI,GAAG,EAAE;IACrBC,IAAI,GAAGX,QAAQ,CAACE,EAAE;EACtB,CAAC,MAAM;IACHS,IAAI,GAAGX,QAAQ,CAACG,EAAE;EACtB;EACA,OAAOQ,IAAI;AACf,CAAC;AAAA"}
|
package/lib/_util/useInterval.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = useInterval;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
function useInterval(callback, delay) {
|
|
11
9
|
(0, _react.useEffect)(function () {
|
|
12
10
|
if (delay !== null) {
|
|
@@ -15,7 +13,6 @@ function useInterval(callback, delay) {
|
|
|
15
13
|
return clearInterval(id);
|
|
16
14
|
};
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
return undefined;
|
|
20
17
|
}, [callback, delay]);
|
|
21
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInterval.js","names":["useInterval","callback","delay","useEffect","id","setInterval","clearInterval","undefined"],"sources":["_util/useInterval.js"],"sourcesContent":["import { useEffect } from 'react';\n\nexport default function useInterval(callback, delay) {\n useEffect(() => {\n if (delay !== null) {\n let id = setInterval(callback, delay);\n return () => clearInterval(id);\n }\n return undefined;\n }, [callback, delay]);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInterval.js","names":["useInterval","callback","delay","useEffect","id","setInterval","clearInterval","undefined"],"sources":["_util/useInterval.js"],"sourcesContent":["import { useEffect } from 'react';\n\nexport default function useInterval(callback, delay) {\n useEffect(() => {\n if (delay !== null) {\n let id = setInterval(callback, delay);\n return () => clearInterval(id);\n }\n return undefined;\n }, [callback, delay]);\n}\n"],"mappings":";;;;;;AAAA;AAEe,SAASA,WAAW,CAACC,QAAQ,EAAEC,KAAK,EAAE;EACjD,IAAAC,gBAAS,EAAC,YAAM;IACZ,IAAID,KAAK,KAAK,IAAI,EAAE;MAChB,IAAIE,EAAE,GAAGC,WAAW,CAACJ,QAAQ,EAAEC,KAAK,CAAC;MACrC,OAAO;QAAA,OAAMI,aAAa,CAACF,EAAE,CAAC;MAAA;IAClC;IACA,OAAOG,SAAS;EACpB,CAAC,EAAE,CAACN,QAAQ,EAAEC,KAAK,CAAC,CAAC;AACzB"}
|
package/lib/_util/useSet.js
CHANGED
|
@@ -4,57 +4,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
10
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
|
|
16
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
-
|
|
18
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
-
|
|
20
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
-
|
|
22
14
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
-
|
|
24
15
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
25
|
-
|
|
26
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
|
|
28
17
|
// 类似于class component的setState
|
|
29
18
|
var useSet = function useSet(initState) {
|
|
30
19
|
var _useReducer = (0, _react.useReducer)(function (state, newState) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (typeof newState === 'function') {
|
|
34
|
-
action = action(state);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (newState.action && newState.payload) {
|
|
38
|
-
action = newState.payload;
|
|
39
|
-
|
|
40
|
-
if (typeof action === 'function') {
|
|
20
|
+
var action = newState;
|
|
21
|
+
if (typeof newState === 'function') {
|
|
41
22
|
action = action(state);
|
|
42
23
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
24
|
+
if (newState.action && newState.payload) {
|
|
25
|
+
action = newState.payload;
|
|
26
|
+
if (typeof action === 'function') {
|
|
27
|
+
action = action(state);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
var result = _objectSpread(_objectSpread({}, state), action);
|
|
31
|
+
return result;
|
|
32
|
+
}, initState),
|
|
33
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
34
|
+
state = _useReducer2[0],
|
|
35
|
+
setState = _useReducer2[1];
|
|
53
36
|
return [state, function (state) {
|
|
54
37
|
setState(state);
|
|
55
38
|
}];
|
|
56
39
|
};
|
|
57
|
-
|
|
58
40
|
var _default = useSet;
|
|
59
41
|
exports["default"] = _default;
|
|
60
42
|
//# sourceMappingURL=useSet.js.map
|
package/lib/_util/useSet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSet.js","names":["useSet","initState","useReducer","state","newState","action","payload","result","setState"],"sources":["_util/useSet.js"],"sourcesContent":["import { useReducer } from 'react';\n\n// 类似于class component的setState\nconst useSet = initState => {\n const [state, setState] = useReducer((state, newState) => {\n let action = newState;\n if (typeof newState === 'function') {\n action = action(state);\n }\n if (newState.action && newState.payload) {\n action = newState.payload;\n if (typeof action === 'function') {\n action = action(state);\n }\n }\n const result = { ...state, ...action };\n return result;\n }, initState);\n return [\n state,\n state => {\n setState(state);\n },\n ];\n};\n\nexport default useSet;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSet.js","names":["useSet","initState","useReducer","state","newState","action","payload","result","setState"],"sources":["_util/useSet.js"],"sourcesContent":["import { useReducer } from 'react';\n\n// 类似于class component的setState\nconst useSet = initState => {\n const [state, setState] = useReducer((state, newState) => {\n let action = newState;\n if (typeof newState === 'function') {\n action = action(state);\n }\n if (newState.action && newState.payload) {\n action = newState.payload;\n if (typeof action === 'function') {\n action = action(state);\n }\n }\n const result = { ...state, ...action };\n return result;\n }, initState);\n return [\n state,\n state => {\n setState(state);\n },\n ];\n};\n\nexport default useSet;\n"],"mappings":";;;;;;AAAA;AAAmC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEnC;AACA,IAAMA,MAAM,GAAG,SAATA,MAAM,CAAGC,SAAS,EAAI;EACxB,kBAA0B,IAAAC,iBAAU,EAAC,UAACC,KAAK,EAAEC,QAAQ,EAAK;MACtD,IAAIC,MAAM,GAAGD,QAAQ;MACrB,IAAI,OAAOA,QAAQ,KAAK,UAAU,EAAE;QAChCC,MAAM,GAAGA,MAAM,CAACF,KAAK,CAAC;MAC1B;MACA,IAAIC,QAAQ,CAACC,MAAM,IAAID,QAAQ,CAACE,OAAO,EAAE;QACrCD,MAAM,GAAGD,QAAQ,CAACE,OAAO;QACzB,IAAI,OAAOD,MAAM,KAAK,UAAU,EAAE;UAC9BA,MAAM,GAAGA,MAAM,CAACF,KAAK,CAAC;QAC1B;MACJ;MACA,IAAMI,MAAM,mCAAQJ,KAAK,GAAKE,MAAM,CAAE;MACtC,OAAOE,MAAM;IACjB,CAAC,EAAEN,SAAS,CAAC;IAAA;IAbNE,KAAK;IAAEK,QAAQ;EActB,OAAO,CACHL,KAAK,EACL,UAAAA,KAAK,EAAI;IACLK,QAAQ,CAACL,KAAK,CAAC;EACnB,CAAC,CACJ;AACL,CAAC;AAAC,eAEaH,MAAM;AAAA"}
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","ztreeServer"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\n\nexport default {\n // ztree文件地址\n ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree',\n};\n"],"mappings":";;;;;;AAAA,IAAMA,SAAS,GAAGC,MAAM,CAACC,
|
|
1
|
+
{"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","ztreeServer"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\n\nexport default {\n // ztree文件地址\n ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree',\n};\n"],"mappings":";;;;;;AAAA,IAAMA,SAAS,GAAGC,MAAM,CAACC,uBAAuB,IAAI,CAAC,CAAC;AAAC,eAExC;EACX;EACAC,WAAW,EAAEH,SAAS,CAACG,WAAW,GAAGH,SAAS,CAACG,WAAW,GAAG;AACjE,CAAC;AAAA"}
|
package/lib/index.js
CHANGED
|
@@ -153,56 +153,30 @@ Object.defineProperty(exports, "VtxZtreeSelect", {
|
|
|
153
153
|
return _vtxZtreeSelect["default"];
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
|
|
157
156
|
var _vtxFormLayout = _interopRequireDefault(require("./vtx-form-layout"));
|
|
158
|
-
|
|
159
157
|
var _vtxPageLayout = _interopRequireDefault(require("./vtx-page-layout"));
|
|
160
|
-
|
|
161
158
|
var _vtxSearch = _interopRequireDefault(require("./vtx-search"));
|
|
162
|
-
|
|
163
159
|
var _vtxColorPicker = _interopRequireDefault(require("./vtx-color-picker"));
|
|
164
|
-
|
|
165
160
|
var _vtxCombogrid = _interopRequireDefault(require("./vtx-combogrid"));
|
|
166
|
-
|
|
167
161
|
var _vtxDatePicker = _interopRequireDefault(require("./vtx-date-picker"));
|
|
168
|
-
|
|
169
162
|
var _vtxEditor = _interopRequireDefault(require("./vtx-editor"));
|
|
170
|
-
|
|
171
163
|
var _vtxWangEditor = _interopRequireDefault(require("./vtx-wang-editor"));
|
|
172
|
-
|
|
173
164
|
var _vtxExport = _interopRequireDefault(require("./vtx-export"));
|
|
174
|
-
|
|
175
165
|
var _vtxImport = _interopRequireDefault(require("./vtx-import"));
|
|
176
|
-
|
|
177
166
|
var _vtxImport2 = _interopRequireDefault(require("./vtx-import2"));
|
|
178
|
-
|
|
179
167
|
var _vtxSearchMapInput = _interopRequireDefault(require("./vtx-search-map-input"));
|
|
180
|
-
|
|
181
168
|
var _vtxSelect = _interopRequireDefault(require("./vtx-select"));
|
|
182
|
-
|
|
183
169
|
var _vtxInput = _interopRequireDefault(require("./vtx-input"));
|
|
184
|
-
|
|
185
170
|
var _vtxTimePicker = _interopRequireDefault(require("./vtx-time-picker"));
|
|
186
|
-
|
|
187
171
|
var _vtxUpload = _interopRequireDefault(require("./vtx-upload"));
|
|
188
|
-
|
|
189
172
|
var _vtxZtreeSelect = _interopRequireDefault(require("./vtx-ztree-select"));
|
|
190
|
-
|
|
191
173
|
var _vtxDatagrid = _interopRequireDefault(require("./vtx-datagrid"));
|
|
192
|
-
|
|
193
174
|
var _vtxEllipsisText = _interopRequireDefault(require("./vtx-ellipsis-text"));
|
|
194
|
-
|
|
195
175
|
var _vtxImage = _interopRequireDefault(require("./vtx-image"));
|
|
196
|
-
|
|
197
176
|
var _vtxRpsFrame = _interopRequireDefault(require("./vtx-rps-frame"));
|
|
198
|
-
|
|
199
177
|
var _vtxStatisticsColumn = _interopRequireDefault(require("./vtx-statistics-column"));
|
|
200
|
-
|
|
201
178
|
var _vtxZtree = _interopRequireDefault(require("./vtx-ztree"));
|
|
202
|
-
|
|
203
179
|
var _vtxSplitPane = _interopRequireDefault(require("./vtx-split-pane"));
|
|
204
|
-
|
|
205
180
|
var _vtxModal = _interopRequireDefault(require("./vtx-modal"));
|
|
206
|
-
|
|
207
181
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
208
182
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["index.js"],"sourcesContent":["// layout\nexport { default as VtxFormLayout } from './vtx-form-layout';\nexport { default as VtxPageLayout } from './vtx-page-layout';\nexport { default as VtxSearch } from './vtx-search';\n\n// data entry\nexport { default as VtxColorPicker } from './vtx-color-picker';\nexport { default as VtxCombogrid } from './vtx-combogrid';\nexport { default as VtxDatePicker } from './vtx-date-picker';\nexport { default as VtxEditor } from './vtx-editor';\nexport { default as VtxWangEditor } from './vtx-wang-editor';\n\nexport { default as VtxExport } from './vtx-export';\nexport { default as VtxImport } from './vtx-import';\nexport { default as VtxImport2 } from './vtx-import2';\nexport { default as VtxSearchMapInput } from './vtx-search-map-input';\nexport { default as VtxSelect } from './vtx-select';\nexport { default as VtxInput } from './vtx-input';\nexport { default as VtxTimePicker } from './vtx-time-picker';\nexport { default as VtxUpload } from './vtx-upload';\nexport { default as VtxZtreeSelect } from './vtx-ztree-select';\n\n// data display\nexport { default as VtxDatagrid } from './vtx-datagrid';\nexport { default as VtxEllipsisText } from './vtx-ellipsis-text';\nexport { default as VtxImage } from './vtx-image';\nexport { default as VtxRpsFrame } from './vtx-rps-frame';\nexport { default as VtxStatisticsColumn } from './vtx-statistics-column';\nexport { default as VtxZtree } from './vtx-ztree';\nexport { default as VtxSplitPane } from './vtx-split-pane';\n\n// feedback\nexport { default as VtxModal } from './vtx-modal';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["index.js"],"sourcesContent":["// layout\nexport { default as VtxFormLayout } from './vtx-form-layout';\nexport { default as VtxPageLayout } from './vtx-page-layout';\nexport { default as VtxSearch } from './vtx-search';\n\n// data entry\nexport { default as VtxColorPicker } from './vtx-color-picker';\nexport { default as VtxCombogrid } from './vtx-combogrid';\nexport { default as VtxDatePicker } from './vtx-date-picker';\nexport { default as VtxEditor } from './vtx-editor';\nexport { default as VtxWangEditor } from './vtx-wang-editor';\n\nexport { default as VtxExport } from './vtx-export';\nexport { default as VtxImport } from './vtx-import';\nexport { default as VtxImport2 } from './vtx-import2';\nexport { default as VtxSearchMapInput } from './vtx-search-map-input';\nexport { default as VtxSelect } from './vtx-select';\nexport { default as VtxInput } from './vtx-input';\nexport { default as VtxTimePicker } from './vtx-time-picker';\nexport { default as VtxUpload } from './vtx-upload';\nexport { default as VtxZtreeSelect } from './vtx-ztree-select';\n\n// data display\nexport { default as VtxDatagrid } from './vtx-datagrid';\nexport { default as VtxEllipsisText } from './vtx-ellipsis-text';\nexport { default as VtxImage } from './vtx-image';\nexport { default as VtxRpsFrame } from './vtx-rps-frame';\nexport { default as VtxStatisticsColumn } from './vtx-statistics-column';\nexport { default as VtxZtree } from './vtx-ztree';\nexport { default as VtxSplitPane } from './vtx-split-pane';\n\n// feedback\nexport { default as VtxModal } from './vtx-modal';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAAkD"}
|
|
@@ -1,48 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _rcColorPicker = _interopRequireDefault(require("rc-color-picker"));
|
|
15
|
-
|
|
16
11
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
17
|
-
|
|
18
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
-
|
|
20
13
|
var _excluded = ["value", "onChange", "className", "style", "disabled"];
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
17
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
30
18
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
|
|
32
19
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
-
|
|
34
20
|
var VtxColorPicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
35
21
|
var value = props.value,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
onChange = props.onChange,
|
|
23
|
+
className = props.className,
|
|
24
|
+
style = props.style,
|
|
25
|
+
disabled = props.disabled,
|
|
26
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
42
27
|
var onPickerChange = function onPickerChange(e) {
|
|
43
28
|
onChange && onChange(e.color);
|
|
44
29
|
};
|
|
45
|
-
|
|
46
30
|
return /*#__PURE__*/_react["default"].createElement(_input["default"], {
|
|
47
31
|
ref: ref,
|
|
48
32
|
value: value,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["VtxColorPicker","forwardRef","props","ref","value","onChange","className","style","disabled","rest","onPickerChange","e","color","classnames","propTypes","PropTypes","string","func","bool","object"],"sources":["vtx-color-picker/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport ColorPicker from 'rc-color-picker';\nimport Input from 'antd/lib/input';\nimport classnames from 'classnames';\n\nconst VtxColorPicker = forwardRef((props, ref) => {\n const { value, onChange, className, style, disabled, ...rest } = props;\n\n const onPickerChange = e => {\n onChange && onChange(e.color);\n };\n\n return (\n <Input\n ref={ref}\n value={value}\n placeholder=\"请选择\"\n readOnly\n disabled={disabled}\n className={classnames('vtx-color-picker', className)}\n style={style}\n addonAfter={\n disabled ? null : (\n <ColorPicker\n defaultColor=\"#fff\"\n {...rest}\n animation=\"slide-up\"\n color={value}\n onChange={onPickerChange}\n />\n )\n }\n />\n );\n});\n\nVtxColorPicker.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n};\n\nexport default VtxColorPicker;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["VtxColorPicker","forwardRef","props","ref","value","onChange","className","style","disabled","rest","onPickerChange","e","color","classnames","propTypes","PropTypes","string","func","bool","object"],"sources":["vtx-color-picker/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport ColorPicker from 'rc-color-picker';\nimport Input from 'antd/lib/input';\nimport classnames from 'classnames';\n\nconst VtxColorPicker = forwardRef((props, ref) => {\n const { value, onChange, className, style, disabled, ...rest } = props;\n\n const onPickerChange = e => {\n onChange && onChange(e.color);\n };\n\n return (\n <Input\n ref={ref}\n value={value}\n placeholder=\"请选择\"\n readOnly\n disabled={disabled}\n className={classnames('vtx-color-picker', className)}\n style={style}\n addonAfter={\n disabled ? null : (\n <ColorPicker\n defaultColor=\"#fff\"\n {...rest}\n animation=\"slide-up\"\n color={value}\n onChange={onPickerChange}\n />\n )\n }\n />\n );\n});\n\nVtxColorPicker.propTypes = {\n value: PropTypes.string,\n onChange: PropTypes.func,\n disabled: PropTypes.bool,\n className: PropTypes.string,\n style: PropTypes.object,\n};\n\nexport default VtxColorPicker;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEpC,IAAMA,cAAc,gBAAG,IAAAC,iBAAU,EAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;EAC9C,IAAQC,KAAK,GAAoDF,KAAK,CAA9DE,KAAK;IAAEC,QAAQ,GAA0CH,KAAK,CAAvDG,QAAQ;IAAEC,SAAS,GAA+BJ,KAAK,CAA7CI,SAAS;IAAEC,KAAK,GAAwBL,KAAK,CAAlCK,KAAK;IAAEC,QAAQ,GAAcN,KAAK,CAA3BM,QAAQ;IAAKC,IAAI,4BAAKP,KAAK;EAEtE,IAAMQ,cAAc,GAAG,SAAjBA,cAAc,CAAGC,CAAC,EAAI;IACxBN,QAAQ,IAAIA,QAAQ,CAACM,CAAC,CAACC,KAAK,CAAC;EACjC,CAAC;EAED,oBACI,gCAAC,iBAAK;IACF,GAAG,EAAET,GAAI;IACT,KAAK,EAAEC,KAAM;IACb,WAAW,EAAC,oBAAK;IACjB,QAAQ;IACR,QAAQ,EAAEI,QAAS;IACnB,SAAS,EAAE,IAAAK,sBAAU,EAAC,kBAAkB,EAAEP,SAAS,CAAE;IACrD,KAAK,EAAEC,KAAM;IACb,UAAU,EACNC,QAAQ,GAAG,IAAI,gBACX,gCAAC,yBAAW;MACR,YAAY,EAAC;IAAM,GACfC,IAAI;MACR,SAAS,EAAC,UAAU;MACpB,KAAK,EAAEL,KAAM;MACb,QAAQ,EAAEM;IAAe;EAGpC,EACH;AAEV,CAAC,CAAC;AAEFV,cAAc,CAACc,SAAS,GAAG;EACvBV,KAAK,EAAEW,qBAAS,CAACC,MAAM;EACvBX,QAAQ,EAAEU,qBAAS,CAACE,IAAI;EACxBT,QAAQ,EAAEO,qBAAS,CAACG,IAAI;EACxBZ,SAAS,EAAES,qBAAS,CAACC,MAAM;EAC3BT,KAAK,EAAEQ,qBAAS,CAACI;AACrB,CAAC;AAAC,eAEanB,cAAc;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["vtx-color-picker/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-color-picker/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["vtx-color-picker/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-color-picker/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport 'rc-color-picker/assets/index.css';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA"}
|