@vtx/components 3.1.30 → 3.1.32
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/CHANGELOG.md +1325 -0
- package/lib/_util/filterSpecialCharacters.js +43 -54
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +3 -0
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getUrlParam.js +6 -0
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +1 -0
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +1 -0
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +10 -1
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +3 -0
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +32 -14
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -1
- package/lib/vtx-color-picker/index.js +21 -5
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +2 -0
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +2 -0
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +74 -34
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +45 -20
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +7 -0
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +7 -0
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +11 -3
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +44 -19
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +13 -2
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +142 -77
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +35 -5
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +10 -0
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.css +0 -3
- package/lib/vtx-datagrid/style/index.js +10 -0
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/style/index.less +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +46 -16
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +47 -6
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +5 -0
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +1 -0
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +1 -0
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-editor/index.js +23 -5
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +1 -0
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +1 -0
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/index.js +20 -6
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +1 -0
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +1 -0
- package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
- package/lib/vtx-export/index.js +58 -25
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +5 -0
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +5 -0
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +26 -5
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +8 -0
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +30 -8
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +7 -2
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +6 -0
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +2 -0
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/index.js +22 -8
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +7 -0
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +7 -0
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-image/Image.js +98 -59
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +51 -20
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +40 -11
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +6 -0
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +1 -0
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.css +19 -0
- package/lib/vtx-image/style/index.js +1 -0
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-image/style/index.less +76 -63
- package/lib/vtx-import/index.js +72 -37
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +24 -7
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +3 -0
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +3 -0
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-import2/CheckResult.js +6 -0
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +25 -4
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +4 -0
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +11 -5
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +4 -0
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +92 -38
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +3 -0
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +3 -0
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-input/TextArea.js +22 -6
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +37 -11
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +1 -0
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +1 -0
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/useLength.js +16 -4
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +6 -1
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +70 -30
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +1 -0
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +1 -0
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +6 -2
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +19 -7
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +10 -2
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +47 -17
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +15 -3
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +34 -4
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +8 -0
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-rps-frame/index.js +44 -21
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +57 -19
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-search/VtxCol.js +21 -0
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +12 -6
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +93 -40
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +4 -0
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +4 -0
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +73 -42
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +2 -0
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +2 -0
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +65 -20
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +8 -0
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +8 -0
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-signature/index.js +28 -14
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +2 -0
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +2 -0
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-split-pane/Pane.js +14 -2
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +29 -9
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +94 -39
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +4 -0
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +3 -0
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +3 -0
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-statistics-column/Back.js +7 -1
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +22 -5
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +22 -5
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +2 -0
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +16 -0
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-time-picker/index.js +16 -3
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +28 -9
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +138 -67
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +5 -0
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +5 -0
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/index.js +66 -27
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +1 -0
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +1 -0
- package/lib/vtx-wang-editor/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/wangEditorUtil.js +88 -30
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +101 -49
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +1 -0
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +1 -0
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/index.js +99 -43
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +3 -0
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +3 -0
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/package.json +126 -126
|
@@ -1,43 +1,64 @@
|
|
|
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
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = exports.StoreCtx = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
10
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
11
16
|
var _useEventEmitter = _interopRequireDefault(require("ahooks/es/useEventEmitter"));
|
|
17
|
+
|
|
12
18
|
var _container = _interopRequireDefault(require("./container"));
|
|
19
|
+
|
|
13
20
|
var _Basic = _interopRequireDefault(require("./Basic"));
|
|
21
|
+
|
|
14
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
15
24
|
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
|
+
|
|
16
26
|
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
|
+
|
|
17
28
|
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; }
|
|
29
|
+
|
|
18
30
|
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; }
|
|
31
|
+
|
|
19
32
|
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; }
|
|
33
|
+
|
|
20
34
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
21
36
|
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."); }
|
|
37
|
+
|
|
22
38
|
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); }
|
|
39
|
+
|
|
23
40
|
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; }
|
|
41
|
+
|
|
24
42
|
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; }
|
|
43
|
+
|
|
25
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
26
46
|
var StoreCtx = /*#__PURE__*/(0, _react.createContext)({});
|
|
27
47
|
exports.StoreCtx = StoreCtx;
|
|
28
48
|
var pagePaddingTop = 16;
|
|
29
|
-
var searchMarginBottom = 16;
|
|
49
|
+
var searchMarginBottom = 16; // eslint-disable-next-line valid-jsdoc
|
|
30
50
|
|
|
31
|
-
// eslint-disable-next-line valid-jsdoc
|
|
32
51
|
/**
|
|
33
52
|
* 页面
|
|
34
53
|
* @param {*} props
|
|
35
54
|
*/
|
|
55
|
+
|
|
36
56
|
var Page = function Page(props) {
|
|
37
57
|
var _useState = (0, _react.useState)(64),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
searchHeight = _useState2[0],
|
|
60
|
+
setSearchHeight = _useState2[1];
|
|
61
|
+
|
|
41
62
|
var onSearchCollapse = props.onSearchCollapse;
|
|
42
63
|
var searchCollapseEvent$ = (0, _useEventEmitter["default"])();
|
|
43
64
|
var store = {
|
|
@@ -56,32 +77,35 @@ var Page = function Page(props) {
|
|
|
56
77
|
style: props.style
|
|
57
78
|
}, props.children));
|
|
58
79
|
};
|
|
80
|
+
|
|
59
81
|
Page.propTypes = {
|
|
60
82
|
style: _propTypes["default"].object,
|
|
61
83
|
className: _propTypes["default"].string,
|
|
62
84
|
children: _propTypes["default"].node,
|
|
63
85
|
onSearchCollapse: _propTypes["default"].func
|
|
64
86
|
};
|
|
65
|
-
|
|
66
87
|
/**
|
|
67
88
|
* 搜索
|
|
68
89
|
*/
|
|
90
|
+
|
|
69
91
|
var Search = (0, _container["default"])({
|
|
70
92
|
componentClass: 'vtx-table-search'
|
|
71
|
-
})(_Basic["default"]);
|
|
93
|
+
})(_Basic["default"]); // eslint-disable-next-line valid-jsdoc
|
|
72
94
|
|
|
73
|
-
// eslint-disable-next-line valid-jsdoc
|
|
74
95
|
/**
|
|
75
96
|
* 内容
|
|
76
97
|
* @param {*} props
|
|
77
98
|
*/
|
|
99
|
+
|
|
78
100
|
var Content = function Content(props) {
|
|
79
101
|
var className = props.className,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
102
|
+
style = props.style,
|
|
103
|
+
_props$plusTop = props.plusTop,
|
|
104
|
+
plusTop = _props$plusTop === void 0 ? 0 : _props$plusTop;
|
|
105
|
+
|
|
83
106
|
var _useContext = (0, _react.useContext)(StoreCtx),
|
|
84
|
-
|
|
107
|
+
searchHeight = _useContext.searchHeight;
|
|
108
|
+
|
|
85
109
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
110
|
className: (0, _classnames["default"])('vtx-table-content', className),
|
|
87
111
|
style: _objectSpread({
|
|
@@ -89,22 +113,25 @@ var Content = function Content(props) {
|
|
|
89
113
|
}, style)
|
|
90
114
|
}, props.children);
|
|
91
115
|
};
|
|
116
|
+
|
|
92
117
|
Content.propTypes = {
|
|
93
118
|
style: _propTypes["default"].object,
|
|
94
119
|
className: _propTypes["default"].string,
|
|
95
120
|
children: _propTypes["default"].node,
|
|
96
121
|
plusTop: _propTypes["default"].number
|
|
97
|
-
};
|
|
122
|
+
}; // eslint-disable-next-line valid-jsdoc
|
|
98
123
|
|
|
99
|
-
// eslint-disable-next-line valid-jsdoc
|
|
100
124
|
/**
|
|
101
125
|
* 表格布局
|
|
102
126
|
*/
|
|
127
|
+
|
|
103
128
|
var Table = function Table(props) {
|
|
104
129
|
var className = props.className,
|
|
105
|
-
|
|
130
|
+
style = props.style;
|
|
131
|
+
|
|
106
132
|
var _useContext2 = (0, _react.useContext)(StoreCtx),
|
|
107
|
-
|
|
133
|
+
searchCollapseEvent$ = _useContext2.searchCollapseEvent$;
|
|
134
|
+
|
|
108
135
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
109
136
|
className: (0, _classnames["default"])('vtx-table-wrap', className),
|
|
110
137
|
style: style
|
|
@@ -112,19 +139,22 @@ var Table = function Table(props) {
|
|
|
112
139
|
searchCollapseEvent$: searchCollapseEvent$
|
|
113
140
|
})));
|
|
114
141
|
};
|
|
142
|
+
|
|
115
143
|
Table.propTypes = {
|
|
116
144
|
style: _propTypes["default"].object,
|
|
117
145
|
className: _propTypes["default"].string,
|
|
118
146
|
children: _propTypes["default"].node
|
|
119
147
|
};
|
|
148
|
+
|
|
120
149
|
var Card = function Card(props) {
|
|
121
150
|
var className = props.className,
|
|
122
|
-
|
|
151
|
+
style = props.style;
|
|
123
152
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
153
|
style: style,
|
|
125
154
|
className: (0, _classnames["default"])('vtx-table-card', className)
|
|
126
155
|
}, props.children);
|
|
127
156
|
};
|
|
157
|
+
|
|
128
158
|
Card.propTypes = {
|
|
129
159
|
style: _propTypes["default"].object,
|
|
130
160
|
className: _propTypes["default"].string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableLayout.js","names":["StoreCtx","createContext","pagePaddingTop","searchMarginBottom","Page","props","useState","searchHeight","setSearchHeight","onSearchCollapse","searchCollapseEvent$","useEventEmitter","store","onCollapse","height","emit","classsnames","className","style","children","propTypes","PropTypes","object","string","node","func","Search","container","componentClass","Basic","Content","plusTop","useContext","top","number","Table","React","cloneElement","Card"],"sources":["vtx-page-layout/TableLayout.jsx"],"sourcesContent":["import React, { useState, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classsnames from 'classnames';\nimport { createContext } from 'react';\nimport useEventEmitter from 'ahooks/es/useEventEmitter';\nimport container from './container';\nimport Basic from './Basic';\nexport const StoreCtx = createContext({});\n\nconst pagePaddingTop = 16;\nconst searchMarginBottom = 16;\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 页面\n * @param {*} props\n */\nconst Page = props => {\n const [searchHeight, setSearchHeight] = useState(64);\n const { onSearchCollapse } = props;\n const searchCollapseEvent$ = useEventEmitter();\n const store = {\n searchHeight,\n searchCollapseEvent$,\n onCollapse(height) {\n setSearchHeight(height);\n onSearchCollapse && onSearchCollapse(height);\n searchCollapseEvent$.emit();\n },\n };\n return (\n <StoreCtx.Provider value={store}>\n <div className={classsnames('vtx-page--table', props.className)} style={props.style}>\n {props.children}\n </div>\n </StoreCtx.Provider>\n );\n};\n\nPage.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n onSearchCollapse: PropTypes.func,\n};\n\n/**\n * 搜索\n */\nconst Search = container({ componentClass: 'vtx-table-search' })(Basic);\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 内容\n * @param {*} props\n */\nconst Content = props => {\n const { className, style, plusTop=0 } = props;\n const { searchHeight } = useContext(StoreCtx);\n return (\n <div\n className={classsnames('vtx-table-content', className)}\n style={{\n top: pagePaddingTop + searchMarginBottom + searchHeight + plusTop,\n ...style,\n }}\n >\n {props.children}\n </div>\n );\n};\n\nContent.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n plusTop: PropTypes.number,\n};\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 表格布局\n */\nconst Table = props => {\n const { className, style } = props;\n const { searchCollapseEvent$ } = useContext(StoreCtx);\n\n return (\n <div className={classsnames('vtx-table-wrap', className)} style={style}>\n {React.cloneElement(props.children, {\n ...props.children.props,\n searchCollapseEvent$,\n })}\n </div>\n );\n};\n\nTable.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n};\n\nconst Card = props => {\n const { className, style } = props;\n\n return (\n <div style={style} className={classsnames('vtx-table-card', className)}>\n {props.children}\n </div>\n );\n};\n\nCard.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n};\n\nexport default { Page, Search, Content, Table: container()(Table), Card };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableLayout.js","names":["StoreCtx","createContext","pagePaddingTop","searchMarginBottom","Page","props","useState","searchHeight","setSearchHeight","onSearchCollapse","searchCollapseEvent$","useEventEmitter","store","onCollapse","height","emit","classsnames","className","style","children","propTypes","PropTypes","object","string","node","func","Search","container","componentClass","Basic","Content","plusTop","useContext","top","number","Table","React","cloneElement","Card"],"sources":["vtx-page-layout/TableLayout.jsx"],"sourcesContent":["import React, { useState, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport classsnames from 'classnames';\nimport { createContext } from 'react';\nimport useEventEmitter from 'ahooks/es/useEventEmitter';\nimport container from './container';\nimport Basic from './Basic';\nexport const StoreCtx = createContext({});\n\nconst pagePaddingTop = 16;\nconst searchMarginBottom = 16;\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 页面\n * @param {*} props\n */\nconst Page = props => {\n const [searchHeight, setSearchHeight] = useState(64);\n const { onSearchCollapse } = props;\n const searchCollapseEvent$ = useEventEmitter();\n const store = {\n searchHeight,\n searchCollapseEvent$,\n onCollapse(height) {\n setSearchHeight(height);\n onSearchCollapse && onSearchCollapse(height);\n searchCollapseEvent$.emit();\n },\n };\n return (\n <StoreCtx.Provider value={store}>\n <div className={classsnames('vtx-page--table', props.className)} style={props.style}>\n {props.children}\n </div>\n </StoreCtx.Provider>\n );\n};\n\nPage.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n onSearchCollapse: PropTypes.func,\n};\n\n/**\n * 搜索\n */\nconst Search = container({ componentClass: 'vtx-table-search' })(Basic);\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 内容\n * @param {*} props\n */\nconst Content = props => {\n const { className, style, plusTop=0 } = props;\n const { searchHeight } = useContext(StoreCtx);\n return (\n <div\n className={classsnames('vtx-table-content', className)}\n style={{\n top: pagePaddingTop + searchMarginBottom + searchHeight + plusTop,\n ...style,\n }}\n >\n {props.children}\n </div>\n );\n};\n\nContent.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n plusTop: PropTypes.number,\n};\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * 表格布局\n */\nconst Table = props => {\n const { className, style } = props;\n const { searchCollapseEvent$ } = useContext(StoreCtx);\n\n return (\n <div className={classsnames('vtx-table-wrap', className)} style={style}>\n {React.cloneElement(props.children, {\n ...props.children.props,\n searchCollapseEvent$,\n })}\n </div>\n );\n};\n\nTable.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n};\n\nconst Card = props => {\n const { className, style } = props;\n\n return (\n <div style={style} className={classsnames('vtx-table-card', className)}>\n {props.children}\n </div>\n );\n};\n\nCard.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n children: PropTypes.node,\n};\n\nexport default { Page, Search, Content, Table: container()(Table), Card };\n"],"mappings":"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"}
|
|
@@ -4,31 +4,43 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
9
12
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
11
16
|
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; }
|
|
17
|
+
|
|
12
18
|
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; }
|
|
19
|
+
|
|
13
20
|
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; }
|
|
21
|
+
|
|
14
22
|
function TableWrap(props) {
|
|
15
23
|
var _classnames;
|
|
24
|
+
|
|
16
25
|
var relative = props.relative,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
height = props.height,
|
|
27
|
+
style = props.style,
|
|
28
|
+
className = props.className;
|
|
20
29
|
var tableClass = (0, _classnames2["default"])((_classnames = {}, _defineProperty(_classnames, 'vtx-table-wrapper-absolute', !relative), _defineProperty(_classnames, 'vtx-table-wrapper-relative', relative), _classnames), className);
|
|
21
30
|
var newStyle = style;
|
|
31
|
+
|
|
22
32
|
if (relative && 'height' in props) {
|
|
23
33
|
newStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
24
34
|
height: height
|
|
25
35
|
});
|
|
26
36
|
}
|
|
37
|
+
|
|
27
38
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
39
|
className: tableClass,
|
|
29
40
|
style: newStyle
|
|
30
41
|
}, props.children);
|
|
31
42
|
}
|
|
43
|
+
|
|
32
44
|
var _default = TableWrap;
|
|
33
45
|
exports["default"] = _default;
|
|
34
46
|
TableWrap.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableWrap.js","names":["TableWrap","props","relative","height","style","className","tableClass","classnames","newStyle","children","propTypes","PropTypes","object","string","bool","number","node"],"sources":["vtx-page-layout/TableWrap.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction TableWrap(props) {\n const { relative, height, style, className } = props;\n\n const tableClass = classnames(\n {\n ['vtx-table-wrapper-absolute']: !relative,\n ['vtx-table-wrapper-relative']: relative,\n },\n className,\n );\n\n let newStyle = style;\n if (relative && 'height' in props) {\n newStyle = {\n ...style,\n height: height,\n };\n }\n\n return (\n <div className={tableClass} style={newStyle}>\n {props.children}\n </div>\n );\n}\n\nexport default TableWrap;\n\nTableWrap.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n relative: PropTypes.bool,\n height: PropTypes.number,\n children: PropTypes.node,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableWrap.js","names":["TableWrap","props","relative","height","style","className","tableClass","classnames","newStyle","children","propTypes","PropTypes","object","string","bool","number","node"],"sources":["vtx-page-layout/TableWrap.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction TableWrap(props) {\n const { relative, height, style, className } = props;\n\n const tableClass = classnames(\n {\n ['vtx-table-wrapper-absolute']: !relative,\n ['vtx-table-wrapper-relative']: relative,\n },\n className,\n );\n\n let newStyle = style;\n if (relative && 'height' in props) {\n newStyle = {\n ...style,\n height: height,\n };\n }\n\n return (\n <div className={tableClass} style={newStyle}>\n {props.children}\n </div>\n );\n}\n\nexport default TableWrap;\n\nTableWrap.propTypes = {\n style: PropTypes.object,\n className: PropTypes.string,\n relative: PropTypes.bool,\n height: PropTypes.number,\n children: PropTypes.node,\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAEA,SAASA,SAAT,CAAmBC,KAAnB,EAA0B;EAAA;;EACtB,IAAQC,QAAR,GAA+CD,KAA/C,CAAQC,QAAR;EAAA,IAAkBC,MAAlB,GAA+CF,KAA/C,CAAkBE,MAAlB;EAAA,IAA0BC,KAA1B,GAA+CH,KAA/C,CAA0BG,KAA1B;EAAA,IAAiCC,SAAjC,GAA+CJ,KAA/C,CAAiCI,SAAjC;EAEA,IAAMC,UAAU,GAAG,IAAAC,uBAAA,kDAEV,4BAFU,EAEqB,CAACL,QAFtB,gCAGV,4BAHU,EAGqBA,QAHrB,iBAKfG,SALe,CAAnB;EAQA,IAAIG,QAAQ,GAAGJ,KAAf;;EACA,IAAIF,QAAQ,IAAI,YAAYD,KAA5B,EAAmC;IAC/BO,QAAQ,mCACDJ,KADC;MAEJD,MAAM,EAAEA;IAFJ,EAAR;EAIH;;EAED,oBACI;IAAK,SAAS,EAAEG,UAAhB;IAA4B,KAAK,EAAEE;EAAnC,GACKP,KAAK,CAACQ,QADX,CADJ;AAKH;;eAEcT,S;;AAEfA,SAAS,CAACU,SAAV,GAAsB;EAClBN,KAAK,EAAEO,qBAAA,CAAUC,MADC;EAElBP,SAAS,EAAEM,qBAAA,CAAUE,MAFH;EAGlBX,QAAQ,EAAES,qBAAA,CAAUG,IAHF;EAIlBX,MAAM,EAAEQ,qBAAA,CAAUI,MAJA;EAKlBN,QAAQ,EAAEE,qBAAA,CAAUK;AALF,CAAtB"}
|
|
@@ -1,56 +1,84 @@
|
|
|
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
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
10
14
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
11
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
12
18
|
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); }
|
|
19
|
+
|
|
13
20
|
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; }
|
|
21
|
+
|
|
14
22
|
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; }
|
|
23
|
+
|
|
15
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
+
|
|
16
26
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
27
|
+
|
|
17
28
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
+
|
|
18
30
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
31
|
+
|
|
19
32
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
+
|
|
20
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
35
|
+
|
|
21
36
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
37
|
+
|
|
22
38
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
+
|
|
23
40
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
+
|
|
24
42
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
+
|
|
25
44
|
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; }
|
|
45
|
+
|
|
26
46
|
function getDisplayName(WrappedComponend) {
|
|
27
47
|
return WrappedComponend.displayName || WrappedComponend.name || 'Component';
|
|
28
48
|
}
|
|
49
|
+
|
|
29
50
|
function Container() {
|
|
30
51
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
31
52
|
var componentClass = params.componentClass;
|
|
32
53
|
return function HOCFactory(WrappedComponend) {
|
|
33
54
|
var _class;
|
|
55
|
+
|
|
34
56
|
return _class = /*#__PURE__*/function (_React$Component) {
|
|
35
57
|
_inherits(HOC, _React$Component);
|
|
58
|
+
|
|
36
59
|
var _super = _createSuper(HOC);
|
|
60
|
+
|
|
37
61
|
function HOC() {
|
|
38
62
|
_classCallCheck(this, HOC);
|
|
63
|
+
|
|
39
64
|
return _super.apply(this, arguments);
|
|
40
65
|
}
|
|
66
|
+
|
|
41
67
|
_createClass(HOC, [{
|
|
42
68
|
key: "render",
|
|
43
69
|
value: function render() {
|
|
44
70
|
var _this$props = this.props,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
71
|
+
style = _this$props.style,
|
|
72
|
+
className = _this$props.className,
|
|
73
|
+
top = _this$props.top,
|
|
74
|
+
space = _this$props.space;
|
|
49
75
|
var wrapClass = (0, _classnames2["default"])(_defineProperty({}, componentClass, true), className);
|
|
76
|
+
|
|
50
77
|
var newStyle = _objectSpread({
|
|
51
78
|
top: top,
|
|
52
79
|
padding: space
|
|
53
80
|
}, style);
|
|
81
|
+
|
|
54
82
|
var newProps = {
|
|
55
83
|
className: wrapClass,
|
|
56
84
|
style: newStyle
|
|
@@ -58,6 +86,7 @@ function Container() {
|
|
|
58
86
|
return /*#__PURE__*/_react["default"].createElement(WrappedComponend, _extends({}, this.props, newProps));
|
|
59
87
|
}
|
|
60
88
|
}]);
|
|
89
|
+
|
|
61
90
|
return HOC;
|
|
62
91
|
}(_react["default"].Component), _defineProperty(_class, "displayName", "HOC(".concat(getDisplayName(WrappedComponend), ")")), _defineProperty(_class, "propTypes", {
|
|
63
92
|
top: _propTypes["default"].number,
|
|
@@ -67,6 +96,7 @@ function Container() {
|
|
|
67
96
|
}), _class;
|
|
68
97
|
};
|
|
69
98
|
}
|
|
99
|
+
|
|
70
100
|
var _default = Container;
|
|
71
101
|
exports["default"] = _default;
|
|
72
102
|
//# sourceMappingURL=container.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","names":["getDisplayName","WrappedComponend","displayName","name","Container","params","componentClass","HOCFactory","props","style","className","top","space","wrapClass","classnames","newStyle","padding","newProps","React","Component","PropTypes","number","string","object"],"sources":["vtx-page-layout/container.jsx"],"sourcesContent":["/**\n * 高阶组件\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction getDisplayName(WrappedComponend) {\n return WrappedComponend.displayName || WrappedComponend.name || 'Component';\n}\n\nfunction Container(params = {}) {\n const { componentClass } = params;\n\n return function HOCFactory(WrappedComponend) {\n return class HOC extends React.Component {\n static displayName = `HOC(${getDisplayName(WrappedComponend)})`;\n\n static propTypes = {\n top: PropTypes.number,\n space: PropTypes.number || PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n };\n\n render() {\n const { style, className, top, space } = this.props;\n\n const wrapClass = classnames(\n {\n [componentClass]: true,\n },\n className,\n );\n\n const newStyle = {\n top,\n padding: space,\n ...style,\n };\n\n const newProps = {\n className: wrapClass,\n style: newStyle,\n };\n return <WrappedComponend {...this.props} {...newProps} />;\n }\n };\n };\n}\n\nexport default Container;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.js","names":["getDisplayName","WrappedComponend","displayName","name","Container","params","componentClass","HOCFactory","props","style","className","top","space","wrapClass","classnames","newStyle","padding","newProps","React","Component","PropTypes","number","string","object"],"sources":["vtx-page-layout/container.jsx"],"sourcesContent":["/**\n * 高阶组件\n */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nfunction getDisplayName(WrappedComponend) {\n return WrappedComponend.displayName || WrappedComponend.name || 'Component';\n}\n\nfunction Container(params = {}) {\n const { componentClass } = params;\n\n return function HOCFactory(WrappedComponend) {\n return class HOC extends React.Component {\n static displayName = `HOC(${getDisplayName(WrappedComponend)})`;\n\n static propTypes = {\n top: PropTypes.number,\n space: PropTypes.number || PropTypes.string,\n style: PropTypes.object,\n className: PropTypes.string,\n };\n\n render() {\n const { style, className, top, space } = this.props;\n\n const wrapClass = classnames(\n {\n [componentClass]: true,\n },\n className,\n );\n\n const newStyle = {\n top,\n padding: space,\n ...style,\n };\n\n const newProps = {\n className: wrapClass,\n style: newStyle,\n };\n return <WrappedComponend {...this.props} {...newProps} />;\n }\n };\n };\n}\n\nexport default Container;\n"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAASA,cAAT,CAAwBC,gBAAxB,EAA0C;EACtC,OAAOA,gBAAgB,CAACC,WAAjB,IAAgCD,gBAAgB,CAACE,IAAjD,IAAyD,WAAhE;AACH;;AAED,SAASC,SAAT,GAAgC;EAAA,IAAbC,MAAa,uEAAJ,EAAI;EAC5B,IAAQC,cAAR,GAA2BD,MAA3B,CAAQC,cAAR;EAEA,OAAO,SAASC,UAAT,CAAoBN,gBAApB,EAAsC;IAAA;;IACzC;MAAA;;MAAA;;MAAA;QAAA;;QAAA;MAAA;;MAAA;QAAA;QAAA,OAUI,kBAAS;UACL,kBAAyC,KAAKO,KAA9C;UAAA,IAAQC,KAAR,eAAQA,KAAR;UAAA,IAAeC,SAAf,eAAeA,SAAf;UAAA,IAA0BC,GAA1B,eAA0BA,GAA1B;UAAA,IAA+BC,KAA/B,eAA+BA,KAA/B;UAEA,IAAMC,SAAS,GAAG,IAAAC,uBAAA,sBAETR,cAFS,EAEQ,IAFR,GAIdI,SAJc,CAAlB;;UAOA,IAAMK,QAAQ;YACVJ,GAAG,EAAHA,GADU;YAEVK,OAAO,EAAEJ;UAFC,GAGPH,KAHO,CAAd;;UAMA,IAAMQ,QAAQ,GAAG;YACbP,SAAS,EAAEG,SADE;YAEbJ,KAAK,EAAEM;UAFM,CAAjB;UAIA,oBAAO,gCAAC,gBAAD,eAAsB,KAAKP,KAA3B,EAAsCS,QAAtC,EAAP;QACH;MA/BL;;MAAA;IAAA,EAAyBC,iBAAA,CAAMC,SAA/B,wDACgCnB,cAAc,CAACC,gBAAD,CAD9C,8CAGuB;MACfU,GAAG,EAAES,qBAAA,CAAUC,MADA;MAEfT,KAAK,EAAEQ,qBAAA,CAAUC,MAAV,IAAoBD,qBAAA,CAAUE,MAFtB;MAGfb,KAAK,EAAEW,qBAAA,CAAUG,MAHF;MAIfb,SAAS,EAAEU,qBAAA,CAAUE;IAJN,CAHvB;EAiCH,CAlCD;AAmCH;;eAEclB,S"}
|
|
@@ -4,13 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _container = _interopRequireDefault(require("./container"));
|
|
9
|
+
|
|
8
10
|
var _Basic = _interopRequireDefault(require("./Basic"));
|
|
11
|
+
|
|
9
12
|
var _Content = _interopRequireDefault(require("./Content"));
|
|
13
|
+
|
|
10
14
|
var _TableWrap = _interopRequireDefault(require("./TableWrap"));
|
|
15
|
+
|
|
11
16
|
var _TableLayout = _interopRequireDefault(require("./TableLayout"));
|
|
17
|
+
|
|
12
18
|
var _Pane = _interopRequireDefault(require("./Pane"));
|
|
19
|
+
|
|
13
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
14
22
|
var Page = (0, _container["default"])({
|
|
15
23
|
componentClass: 'vtx-page'
|
|
16
24
|
})(_Basic["default"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Page","container","componentClass","Basic","ButtonWrap","TableLayout","Pane","Content","TableWrap"],"sources":["vtx-page-layout/index.jsx"],"sourcesContent":["import container from './container';\nimport Basic from './Basic';\nimport Content from './Content';\nimport TableWrap from './TableWrap';\nimport TableLayout from './TableLayout';\nimport Pane from './Pane';\n\nconst Page = container({ componentClass: 'vtx-page' })(Basic);\nconst ButtonWrap = container({ componentClass: 'vtx-button-wrap' })(Basic);\n\nexport default {\n TableLayout,\n Page,\n ButtonWrap,\n Pane,\n Content: container()(Content),\n TableWrap: container()(TableWrap),\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["Page","container","componentClass","Basic","ButtonWrap","TableLayout","Pane","Content","TableWrap"],"sources":["vtx-page-layout/index.jsx"],"sourcesContent":["import container from './container';\nimport Basic from './Basic';\nimport Content from './Content';\nimport TableWrap from './TableWrap';\nimport TableLayout from './TableLayout';\nimport Pane from './Pane';\n\nconst Page = container({ componentClass: 'vtx-page' })(Basic);\nconst ButtonWrap = container({ componentClass: 'vtx-button-wrap' })(Basic);\n\nexport default {\n TableLayout,\n Page,\n ButtonWrap,\n Pane,\n Content: container()(Content),\n TableWrap: container()(TableWrap),\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,IAAI,GAAG,IAAAC,qBAAA,EAAU;EAAEC,cAAc,EAAE;AAAlB,CAAV,EAA0CC,iBAA1C,CAAb;AACA,IAAMC,UAAU,GAAG,IAAAH,qBAAA,EAAU;EAAEC,cAAc,EAAE;AAAlB,CAAV,EAAiDC,iBAAjD,CAAnB;eAEe;EACXE,WAAW,EAAXA,uBADW;EAEXL,IAAI,EAAJA,IAFW;EAGXI,UAAU,EAAVA,UAHW;EAIXE,IAAI,EAAJA,gBAJW;EAKXC,OAAO,EAAE,IAAAN,qBAAA,IAAYM,mBAAZ,CALE;EAMXC,SAAS,EAAE,IAAAP,qBAAA,IAAYO,qBAAZ;AANA,C"}
|
|
@@ -1,49 +1,61 @@
|
|
|
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
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _axios = _interopRequireDefault(require("axios"));
|
|
13
|
+
|
|
10
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
11
16
|
var _getUrlParam = _interopRequireDefault(require("@vtx/utils/lib/getUrlParam"));
|
|
17
|
+
|
|
12
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
13
20
|
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); }
|
|
21
|
+
|
|
14
22
|
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; }
|
|
23
|
+
|
|
15
24
|
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; }
|
|
25
|
+
|
|
16
26
|
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; }
|
|
27
|
+
|
|
17
28
|
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; }
|
|
29
|
+
|
|
18
30
|
var initReportParamUrl = '/cloud/management/rest/np/param/getByParamTypeCode';
|
|
19
31
|
var initReportInfoUrl = '/cloud/rps/api/np/v101/report/getReportInfoByCode.smvc';
|
|
20
32
|
var initReportServerUrl = '/ReportServer';
|
|
33
|
+
|
|
21
34
|
function VtxRpsFrame(props) {
|
|
22
|
-
var iframeName = (0, _react.useRef)(Math.random() + new Date().getTime());
|
|
35
|
+
var iframeName = (0, _react.useRef)(Math.random() + new Date().getTime()); // flag改变,重新渲染报表
|
|
23
36
|
|
|
24
|
-
// flag改变,重新渲染报表
|
|
25
37
|
(0, _react.useEffect)(function () {
|
|
26
38
|
getReportInfoByCode();
|
|
27
39
|
}, [props.flag]);
|
|
40
|
+
|
|
28
41
|
var getReportInfoByCode = function getReportInfoByCode() {
|
|
29
42
|
var report_param = props.report_param,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var paramCode = paramTypeCode || 'param_report_constant';
|
|
42
|
-
|
|
43
|
+
data_param = props.data_param,
|
|
44
|
+
paramTypeCode = props.paramTypeCode,
|
|
45
|
+
tenantId = props.tenantId,
|
|
46
|
+
_props$isParamEncode = props.isParamEncode,
|
|
47
|
+
isParamEncode = _props$isParamEncode === void 0 ? false : _props$isParamEncode,
|
|
48
|
+
_props$reportParamUrl = props.reportParamUrl,
|
|
49
|
+
reportParamUrl = _props$reportParamUrl === void 0 ? initReportParamUrl : _props$reportParamUrl,
|
|
50
|
+
_props$reportInfoUrl = props.reportInfoUrl,
|
|
51
|
+
reportInfoUrl = _props$reportInfoUrl === void 0 ? initReportInfoUrl : _props$reportInfoUrl,
|
|
52
|
+
_props$reportServerUr = props.reportServerUrl,
|
|
53
|
+
reportServerUrl = _props$reportServerUr === void 0 ? initReportServerUrl : _props$reportServerUr;
|
|
54
|
+
var paramCode = paramTypeCode || 'param_report_constant'; // report_code 可配置,如果地址栏有report_code,则优先,否则根据props的report_code
|
|
55
|
+
|
|
43
56
|
var report_code = (0, _getUrlParam["default"])().report_code ? (0, _getUrlParam["default"])().report_code : props.report_code;
|
|
44
|
-
var access_token = (0, _getUrlParam["default"])()['token'] || (0, _getUrlParam["default"])()['access_token'];
|
|
57
|
+
var access_token = (0, _getUrlParam["default"])()['token'] || (0, _getUrlParam["default"])()['access_token']; // 获取公共参数
|
|
45
58
|
|
|
46
|
-
// 获取公共参数
|
|
47
59
|
function commonParam() {
|
|
48
60
|
return (0, _axios["default"])({
|
|
49
61
|
method: 'get',
|
|
@@ -53,15 +65,16 @@ function VtxRpsFrame(props) {
|
|
|
53
65
|
Authorization: "Bearer ".concat(access_token)
|
|
54
66
|
}
|
|
55
67
|
});
|
|
56
|
-
}
|
|
68
|
+
} // 获取报表code
|
|
69
|
+
|
|
57
70
|
|
|
58
|
-
// 获取报表code
|
|
59
71
|
var param = {
|
|
60
72
|
report_code: report_code,
|
|
61
73
|
timestamp: new Date().valueOf(),
|
|
62
74
|
reqMethod: 0
|
|
63
75
|
};
|
|
64
76
|
var formData = isParamEncode ? encodeURI(JSON.stringify(param)) : JSON.stringify(param);
|
|
77
|
+
|
|
65
78
|
function getReportInfoByCode() {
|
|
66
79
|
return (0, _axios["default"])({
|
|
67
80
|
method: 'get',
|
|
@@ -72,6 +85,7 @@ function VtxRpsFrame(props) {
|
|
|
72
85
|
}
|
|
73
86
|
});
|
|
74
87
|
}
|
|
88
|
+
|
|
75
89
|
_axios["default"].all([commonParam(), getReportInfoByCode()]).then(_axios["default"].spread(function (commonParamResult, reportInfoByCodeResult) {
|
|
76
90
|
if (!commonParamResult.data.result && !reportInfoByCodeResult.data.result) {
|
|
77
91
|
// 报表公共参数
|
|
@@ -81,20 +95,22 @@ function VtxRpsFrame(props) {
|
|
|
81
95
|
obj[d.parmCode] = d.parmName;
|
|
82
96
|
});
|
|
83
97
|
var reportInfoByCodeData = reportInfoByCodeResult.data.data;
|
|
98
|
+
|
|
84
99
|
var _param = _objectSpread(_objectSpread(_objectSpread({
|
|
85
100
|
data_url: reportInfoByCodeData.data_url,
|
|
86
101
|
data_param: JSON.stringify(data_param)
|
|
87
102
|
}, report_param), obj), {}, {
|
|
88
103
|
reqMethod: 0
|
|
89
104
|
});
|
|
105
|
+
|
|
90
106
|
createForm("".concat(window.rpsPrefix || '').concat(reportServerUrl, "?report_code=").concat(report_code, "&reportlet=").concat(reportInfoByCodeData.reportlet, "&fr_locale=zh_CN×tamp=").concat(new Date().valueOf()), _param, "".concat(iframeName.current));
|
|
91
107
|
}
|
|
92
|
-
}))
|
|
93
|
-
// eslint-disable-next-line no-console
|
|
108
|
+
})) // eslint-disable-next-line no-console
|
|
94
109
|
["catch"](function (err) {
|
|
95
110
|
return console.log(err);
|
|
96
111
|
});
|
|
97
112
|
};
|
|
113
|
+
|
|
98
114
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
115
|
className: "vtx-rps-frame"
|
|
100
116
|
}, /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
@@ -104,6 +120,7 @@ function VtxRpsFrame(props) {
|
|
|
104
120
|
name: "".concat(iframeName.current)
|
|
105
121
|
}));
|
|
106
122
|
}
|
|
123
|
+
|
|
107
124
|
VtxRpsFrame.propTypes = {
|
|
108
125
|
flag: _propTypes["default"].number,
|
|
109
126
|
report_code: _propTypes["default"].string,
|
|
@@ -118,6 +135,7 @@ VtxRpsFrame.propTypes = {
|
|
|
118
135
|
};
|
|
119
136
|
var _default = VtxRpsFrame;
|
|
120
137
|
exports["default"] = _default;
|
|
138
|
+
|
|
121
139
|
var createForm = function createForm(reqURL, param, iframeName) {
|
|
122
140
|
// 定义一个form表单
|
|
123
141
|
var formDom = document.createElement('form');
|
|
@@ -126,6 +144,7 @@ var createForm = function createForm(reqURL, param, iframeName) {
|
|
|
126
144
|
formDom.action = reqURL;
|
|
127
145
|
formDom.style = 'display:none';
|
|
128
146
|
var inputArray = [];
|
|
147
|
+
|
|
129
148
|
for (var k in param) {
|
|
130
149
|
if (Object.prototype.hasOwnProperty.call(param, k)) {
|
|
131
150
|
var input1 = document.createElement('input');
|
|
@@ -135,11 +154,15 @@ var createForm = function createForm(reqURL, param, iframeName) {
|
|
|
135
154
|
inputArray.push(input1);
|
|
136
155
|
}
|
|
137
156
|
}
|
|
157
|
+
|
|
138
158
|
document.body.appendChild(formDom); // 将表单放置在web中
|
|
159
|
+
|
|
139
160
|
for (var i = 0, len = inputArray.length; i < len; i++) {
|
|
140
161
|
formDom.append(inputArray[i]);
|
|
141
162
|
}
|
|
163
|
+
|
|
142
164
|
formDom.submit(); // 表单提交
|
|
165
|
+
|
|
143
166
|
formDom.remove();
|
|
144
167
|
};
|
|
145
168
|
//# sourceMappingURL=index.js.map
|