ns-base-module 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChooseModal/index.d.ts +21 -0
- package/dist/ChooseModal/index.d.ts.map +1 -0
- package/dist/ChooseModal/index.js +164 -0
- package/dist/FilterPopover/Filter.d.ts.map +1 -1
- package/dist/FilterPopover/Filter.js +23 -15
- package/dist/FilterPopover/FilterClearIcon.d.ts +4 -4
- package/dist/FilterPopover/FilterClearIcon.d.ts.map +1 -1
- package/dist/FilterPopover/FilterClearIcon.js +1 -1
- package/dist/IconTools/index.d.ts +13 -0
- package/dist/IconTools/index.d.ts.map +1 -0
- package/dist/IconTools/index.js +125 -0
- package/dist/IconTools/utils.d.ts +15 -0
- package/dist/IconTools/utils.d.ts.map +1 -0
- package/dist/IconTools/utils.js +171 -0
- package/dist/SubtotalsModal/Increment.d.ts +18 -0
- package/dist/SubtotalsModal/Increment.d.ts.map +1 -0
- package/dist/SubtotalsModal/Increment.js +144 -0
- package/dist/SubtotalsModal/addSubtotals.d.ts +19 -0
- package/dist/SubtotalsModal/addSubtotals.d.ts.map +1 -0
- package/dist/SubtotalsModal/addSubtotals.js +129 -0
- package/dist/SubtotalsModal/dndQuota.d.ts +20 -0
- package/dist/SubtotalsModal/dndQuota.d.ts.map +1 -0
- package/dist/SubtotalsModal/dndQuota.js +384 -0
- package/dist/SubtotalsModal/index.d.ts +19 -0
- package/dist/SubtotalsModal/index.d.ts.map +1 -0
- package/dist/SubtotalsModal/index.js +192 -0
- package/dist/SubtotalsModal/subtotalTemplate.d.ts +20 -0
- package/dist/SubtotalsModal/subtotalTemplate.d.ts.map +1 -0
- package/dist/SubtotalsModal/subtotalTemplate.js +238 -0
- package/dist/SubtotalsModal/util.d.ts +3 -0
- package/dist/SubtotalsModal/util.d.ts.map +1 -0
- package/dist/SubtotalsModal/util.js +28 -0
- package/dist/SubtotalsModal/viewSubtotals.d.ts +10 -0
- package/dist/SubtotalsModal/viewSubtotals.d.ts.map +1 -0
- package/dist/SubtotalsModal/viewSubtotals.js +243 -0
- package/dist/TableHeaderConfigPopover/Dustbin.d.ts +5 -0
- package/dist/TableHeaderConfigPopover/Dustbin.d.ts.map +1 -0
- package/dist/TableHeaderConfigPopover/Dustbin.js +108 -0
- package/dist/TableHeaderConfigPopover/index.d.ts +19 -0
- package/dist/TableHeaderConfigPopover/index.d.ts.map +1 -0
- package/dist/TableHeaderConfigPopover/index.js +1031 -0
- package/dist/TableHeaderConfigPopover/utils.d.ts +3 -0
- package/dist/TableHeaderConfigPopover/utils.d.ts.map +1 -0
- package/dist/TableHeaderConfigPopover/utils.js +41 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/umd/ns-base-module.min.css +1 -1
- package/dist/umd/ns-base-module.min.js +1 -1
- package/dist/utils/language.d.ts +232 -231
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +234 -233
- package/dist/utils/request.d.ts +0 -14
- package/dist/utils/request.d.ts.map +1 -1
- package/dist/utils/request.js +181 -173
- package/dist/utils/services/global.d.ts +128 -0
- package/dist/utils/services/global.d.ts.map +1 -0
- package/dist/utils/services/global.js +406 -0
- package/package.json +3 -1
- package/style/components/SubtotalsModal.scss +293 -0
- package/style/components/TableHeaderConfigPopover.scss +105 -0
- package/style/components/index.scss +2 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["onChange", "showArrows"];
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import { HolderOutlined, VerticalAlignBottomOutlined, VerticalAlignMiddleOutlined, VerticalAlignTopOutlined } from "@ant-design/icons";
|
|
17
|
+
import { Slider, Tooltip } from "antd";
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { useDrag, useDrop } from "react-dnd";
|
|
20
|
+
import "../../style/components/TableHeaderConfigPopover.scss";
|
|
21
|
+
|
|
22
|
+
// 拖拽点
|
|
23
|
+
var Box = function Box(_ref) {
|
|
24
|
+
var item = _ref.item;
|
|
25
|
+
var _useDrag = useDrag({
|
|
26
|
+
type: "Box",
|
|
27
|
+
item: item
|
|
28
|
+
// end: (_item, monitor) => {
|
|
29
|
+
// console.log('item', _item, monitor)
|
|
30
|
+
// },
|
|
31
|
+
}),
|
|
32
|
+
_useDrag2 = _slicedToArray(_useDrag, 2),
|
|
33
|
+
drager = _useDrag2[1];
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
ref: drager
|
|
36
|
+
}, /*#__PURE__*/React.createElement(HolderOutlined, null));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// 存放点
|
|
40
|
+
var Dustbin = function Dustbin(_ref2) {
|
|
41
|
+
var _onChange = _ref2.onChange,
|
|
42
|
+
showArrows = _ref2.showArrows,
|
|
43
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
44
|
+
var item = props.item;
|
|
45
|
+
var _useDrop = useDrop({
|
|
46
|
+
accept: "Box",
|
|
47
|
+
collect: function collect(minoter) {
|
|
48
|
+
return {
|
|
49
|
+
isOver: minoter.isOver()
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
drop: function drop(_item) {
|
|
53
|
+
var _props$onDrop;
|
|
54
|
+
(_props$onDrop = props.onDrop) === null || _props$onDrop === void 0 || _props$onDrop.call(props, {
|
|
55
|
+
dragNode: _objectSpread(_objectSpread({}, _item), {}, {
|
|
56
|
+
key: _item.dataIndex
|
|
57
|
+
}),
|
|
58
|
+
node: _objectSpread(_objectSpread({}, item), {}, {
|
|
59
|
+
key: item.dataIndex
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
_useDrop2 = _slicedToArray(_useDrop, 2),
|
|
65
|
+
collectProps = _useDrop2[0],
|
|
66
|
+
droper = _useDrop2[1];
|
|
67
|
+
var borderBottom = collectProps.isOver ? "3px solid #0273b0" : "";
|
|
68
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
ref: droper,
|
|
70
|
+
style: {
|
|
71
|
+
borderBottom: borderBottom
|
|
72
|
+
},
|
|
73
|
+
className: "columns-tree-main"
|
|
74
|
+
}, !!props.onDrop && /*#__PURE__*/React.createElement(Box, props), /*#__PURE__*/React.createElement(Tooltip, {
|
|
75
|
+
placement: "top",
|
|
76
|
+
title: item.title
|
|
77
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
className: "drag-title"
|
|
79
|
+
}, item.title)), /*#__PURE__*/React.createElement(Slider, {
|
|
80
|
+
min: 50,
|
|
81
|
+
max: 400,
|
|
82
|
+
style: {
|
|
83
|
+
flex: 1
|
|
84
|
+
},
|
|
85
|
+
onChange: function onChange(e) {
|
|
86
|
+
return _onChange(e, item);
|
|
87
|
+
},
|
|
88
|
+
value: typeof item.width === "number" ? item.width : 0
|
|
89
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
90
|
+
className: "columns-tree-icon"
|
|
91
|
+
}, (showArrows === null || showArrows === void 0 ? void 0 : showArrows.includes("up")) && /*#__PURE__*/React.createElement(VerticalAlignTopOutlined, {
|
|
92
|
+
className: "item",
|
|
93
|
+
onClick: function onClick(e) {
|
|
94
|
+
return props.onFixed(item.dataIndex, "left", e);
|
|
95
|
+
}
|
|
96
|
+
}), (showArrows === null || showArrows === void 0 ? void 0 : showArrows.includes("center")) && /*#__PURE__*/React.createElement(VerticalAlignMiddleOutlined, {
|
|
97
|
+
className: "item",
|
|
98
|
+
onClick: function onClick(e) {
|
|
99
|
+
var _props$onFixed;
|
|
100
|
+
return (_props$onFixed = props.onFixed) === null || _props$onFixed === void 0 ? void 0 : _props$onFixed.call(props, item.dataIndex, "center", e);
|
|
101
|
+
}
|
|
102
|
+
}), (showArrows === null || showArrows === void 0 ? void 0 : showArrows.includes("down")) && /*#__PURE__*/React.createElement(VerticalAlignBottomOutlined, {
|
|
103
|
+
onClick: function onClick(e) {
|
|
104
|
+
return props.onFixed(item.dataIndex, "right", e);
|
|
105
|
+
}
|
|
106
|
+
})));
|
|
107
|
+
};
|
|
108
|
+
export default Dustbin;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "../../style/components/TableHeaderConfigPopover.scss";
|
|
3
|
+
interface Icolumns {
|
|
4
|
+
columns: any;
|
|
5
|
+
formTemplateCode: string | undefined;
|
|
6
|
+
menuCode: string;
|
|
7
|
+
editItem?: Record<string, any> | null;
|
|
8
|
+
updateColumns: (columnsTree: Record<string, any>[]) => void;
|
|
9
|
+
handleBack?: () => void;
|
|
10
|
+
handleSaveCallback?: () => void;
|
|
11
|
+
newColumns?: any;
|
|
12
|
+
crossQuery?: Boolean;
|
|
13
|
+
}
|
|
14
|
+
interface IProps extends Icolumns {
|
|
15
|
+
menuCode: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Index: React.FC<IProps>;
|
|
18
|
+
export default Index;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,sDAAsD,CAAC;AAK9D,UAAU,QAAQ;IAChB,OAAO,EAAE,GAAG,CAAC;IACb,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACtC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AACD,UAAU,MAAO,SAAQ,QAAQ;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAm6BD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAc3B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|