@pisell/materials 3.3.40 → 3.3.41
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/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.js +10 -10
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/div/index.d.ts +19 -0
- package/es/components/icon/index.js +5 -5
- package/es/components/list/index.js +6 -6
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +9 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +24 -0
- package/es/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
- package/es/components/pisellDraggable/index.d.ts +35 -0
- package/es/components/pisellDropSort/PisellDropSort.d.ts +5 -0
- package/es/components/pisellDropSort/components/SortableItem/index.d.ts +26 -0
- package/es/components/pisellDropSort/types.d.ts +58 -0
- package/es/components/pisellGoodPassCard/index.d.ts +49 -0
- package/es/components/pisellMenu/PisellMenu.d.ts +11 -0
- package/es/components/pisellMenu/types.d.ts +27 -0
- package/es/components/pisellNavigationMenu/types.d.ts +85 -0
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/utils.js +8 -6
- package/es/components/qrcode/index.js +1 -1
- package/es/components/sort/components/InlineMenu/index.js +1 -1
- package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
- package/es/components/table/Header/Buttons/index.js +5 -5
- package/es/components/table/Table/AddFieldModal/index.js +6 -6
- package/es/components/table/Table/SelectField/index.js +4 -4
- package/es/components/table/Table/fields/date/Edit/index.js +1 -1
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/translation/index.d.ts +4 -3
- package/es/components/translation/index.js +24 -22
- package/es/components/translation/utils.js +5 -5
- package/es/hooks/useResponsive.js +2 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/div/index.d.ts +19 -0
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +9 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +24 -0
- package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
- package/lib/components/pisellDraggable/index.d.ts +35 -0
- package/lib/components/pisellDropSort/PisellDropSort.d.ts +5 -0
- package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +26 -0
- package/lib/components/pisellDropSort/types.d.ts +58 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +49 -0
- package/lib/components/pisellMenu/PisellMenu.d.ts +11 -0
- package/lib/components/pisellMenu/types.d.ts +27 -0
- package/lib/components/pisellNavigationMenu/types.d.ts +85 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/utils.js +7 -6
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/utils/index.js +1 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/translation/index.d.ts +4 -3
- package/lib/components/translation/index.js +1 -0
- package/lib/hooks/useResponsive.js +3 -6
- package/package.json +3 -3
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellAdjustPrice/index.d.ts +0 -9
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -83
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/types.d.ts +0 -251
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -22
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -9
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -83
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/types.d.ts +0 -251
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -22
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -11
|
@@ -14,38 +14,38 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
|
-
import React, { useEffect, useMemo, useState } from
|
|
18
|
-
import { Input, Modal, Form } from
|
|
19
|
-
import { isString } from
|
|
20
|
-
import { GlobalOutlined } from
|
|
21
|
-
import classNames from
|
|
17
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
18
|
+
import { Input, Modal, Form } from 'antd';
|
|
19
|
+
import { isString } from '@pisell/utils';
|
|
20
|
+
import { GlobalOutlined } from '@ant-design/icons';
|
|
21
|
+
import classNames from 'classnames';
|
|
22
22
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
23
23
|
import { checkIfAllValuesAreEqual, createTranslationText, locales } from "./utils";
|
|
24
24
|
import "./index.less";
|
|
25
25
|
var defaultGlobal = {
|
|
26
26
|
shopLanguages: {
|
|
27
|
-
primary:
|
|
27
|
+
primary: 'en',
|
|
28
28
|
list: [{
|
|
29
29
|
id: 1,
|
|
30
|
-
code:
|
|
31
|
-
text:
|
|
30
|
+
code: 'zh-CN',
|
|
31
|
+
text: '简体中文',
|
|
32
32
|
primary: 1,
|
|
33
|
-
status:
|
|
33
|
+
status: 'published'
|
|
34
34
|
}, {
|
|
35
35
|
id: 2,
|
|
36
|
-
code:
|
|
37
|
-
text:
|
|
36
|
+
code: 'en',
|
|
37
|
+
text: 'English',
|
|
38
38
|
primary: 0,
|
|
39
|
-
status:
|
|
39
|
+
status: 'published'
|
|
40
40
|
}, {
|
|
41
41
|
id: 3,
|
|
42
|
-
code:
|
|
43
|
-
text:
|
|
42
|
+
code: 'zh-HK',
|
|
43
|
+
text: '繁體中文',
|
|
44
44
|
primary: 0,
|
|
45
|
-
status:
|
|
45
|
+
status: 'published'
|
|
46
46
|
}]
|
|
47
47
|
},
|
|
48
|
-
primary_locale:
|
|
48
|
+
primary_locale: 'en'
|
|
49
49
|
};
|
|
50
50
|
var defaultObj = {};
|
|
51
51
|
var Translation = function Translation(props) {
|
|
@@ -88,7 +88,7 @@ var Translation = function Translation(props) {
|
|
|
88
88
|
var defaultValue = useMemo(function () {
|
|
89
89
|
var obj = {};
|
|
90
90
|
for (var item in locales) {
|
|
91
|
-
obj[item] =
|
|
91
|
+
obj[item] = '';
|
|
92
92
|
}
|
|
93
93
|
return obj;
|
|
94
94
|
}, []);
|
|
@@ -96,10 +96,10 @@ var Translation = function Translation(props) {
|
|
|
96
96
|
var newValue = _objectSpread(_objectSpread({}, defaultValue), value || {});
|
|
97
97
|
if (checkIfAllValuesAreEqual(newValue)) {
|
|
98
98
|
for (var key in newValue) {
|
|
99
|
-
newValue[key] = e ||
|
|
99
|
+
newValue[key] = e || '';
|
|
100
100
|
}
|
|
101
101
|
} else {
|
|
102
|
-
newValue[currentLocale] = e ||
|
|
102
|
+
newValue[currentLocale] = e || '';
|
|
103
103
|
}
|
|
104
104
|
onChange === null || onChange === void 0 || onChange(newValue);
|
|
105
105
|
};
|
|
@@ -122,7 +122,7 @@ var Translation = function Translation(props) {
|
|
|
122
122
|
return allChange(e.target.value);
|
|
123
123
|
},
|
|
124
124
|
suffix: /*#__PURE__*/React.createElement(GlobalOutlined, {
|
|
125
|
-
className: classNames(
|
|
125
|
+
className: classNames('pisell-lowcode-translation-icon', {
|
|
126
126
|
active: isActive
|
|
127
127
|
}),
|
|
128
128
|
onClick: function onClick() {
|
|
@@ -145,12 +145,14 @@ var Translation = function Translation(props) {
|
|
|
145
145
|
span: 24
|
|
146
146
|
},
|
|
147
147
|
key: d.code
|
|
148
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
148
|
+
}, /*#__PURE__*/React.createElement(Input, _extends({}, typeof others.maxLength === 'number' ? {
|
|
149
|
+
maxLength: others.maxLength
|
|
150
|
+
} : {}, {
|
|
149
151
|
value: _value[d.code],
|
|
150
152
|
onChange: function onChange(e) {
|
|
151
153
|
set_value(_objectSpread(_objectSpread({}, _value), {}, _defineProperty({}, d.code, e.target.value)));
|
|
152
154
|
}
|
|
153
|
-
}));
|
|
155
|
+
})));
|
|
154
156
|
}))));
|
|
155
157
|
};
|
|
156
158
|
export default Translation;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
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
|
+
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; }
|
|
3
|
+
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; }
|
|
4
4
|
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; }
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
7
|
export var locales = {
|
|
8
8
|
en: "",
|
|
9
9
|
"zh-CN": "",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
2
|
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."); }
|
|
3
|
-
function _iterableToArrayLimit(
|
|
3
|
+
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; } }
|
|
4
4
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(
|
|
5
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
6
|
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); }
|
|
7
7
|
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; }
|
|
8
8
|
import { useEffect, useState, useMemo } from 'react';
|
package/es/utils/hoc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
function _typeof(
|
|
2
|
+
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); }
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { get, set, has } from 'lodash';
|
|
5
5
|
import dayjs from "dayjs";
|
package/es/utils/miniRedux.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
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
2
|
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); }
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
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
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(
|
|
7
|
-
function _toPrimitive(
|
|
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
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
9
|
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."); }
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
|
-
function _iterableToArrayLimit(
|
|
12
|
+
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; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
import React, { createContext, useCallback, useReducer } from 'react';
|
|
15
15
|
export default (function (_ref2) {
|
|
@@ -23,7 +23,6 @@ export default (function (_ref2) {
|
|
|
23
23
|
var Context = /*#__PURE__*/createContext({});
|
|
24
24
|
var Provider = function Provider(ComponentUi) {
|
|
25
25
|
var Components = function Components(props, ref) {
|
|
26
|
-
var _objectSpread2, _ref5;
|
|
27
26
|
var _useReducer = useReducer(function (state, _ref3) {
|
|
28
27
|
var type = _ref3.type,
|
|
29
28
|
payload = _ref3.payload;
|
|
@@ -48,14 +47,14 @@ export default (function (_ref2) {
|
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
49
|
}, []);
|
|
51
|
-
var _props = _objectSpread(_objectSpread({}, props), {}, (
|
|
50
|
+
var _props = _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch));
|
|
52
51
|
var _ref = ref;
|
|
53
52
|
// if (_props.forwardedRef) {
|
|
54
53
|
// _ref = _props.forwardedRef;
|
|
55
54
|
// delete _props.forwardedRef;
|
|
56
55
|
// }
|
|
57
56
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
58
|
-
value: (
|
|
57
|
+
value: _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch)
|
|
59
58
|
}, /*#__PURE__*/React.createElement(ComponentUi, _extends({}, _props, {
|
|
60
59
|
ref: _ref
|
|
61
60
|
})));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellMenuProps } from '../../pisellMenu/types';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 数据源表单组件
|
|
5
|
+
* @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
|
|
6
|
+
*/
|
|
7
|
+
declare const DataSourceMenu: React.ForwardRefExoticComponent<PisellMenuProps & React.RefAttributes<any>>;
|
|
8
|
+
export default DataSourceMenu;
|
|
@@ -59,13 +59,11 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
65
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
69
67
|
JSON: import("react").FC<any>;
|
|
70
68
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
69
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -85,7 +83,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
85
83
|
name?: string | undefined;
|
|
86
84
|
fieldKey?: string | undefined;
|
|
87
85
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) |
|
|
86
|
+
}) | (import("react").FC<{}> & {
|
|
89
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
88
|
} & {
|
|
91
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -97,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<
|
|
98
|
+
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DivProps {
|
|
3
|
+
/** 基础类名,默认为 'div' */
|
|
4
|
+
baseClassName?: string;
|
|
5
|
+
/** 自定义类名,会与 baseClassName 合并 */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** 渲染函数,优先级高于 children */
|
|
8
|
+
render?: () => React.ReactNode;
|
|
9
|
+
/** 子元素 */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** 内联样式 */
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
/** 收集其他需要传递给 div 的 props */
|
|
14
|
+
others?: any;
|
|
15
|
+
/** 其他自定义属性 */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.NamedExoticComponent<DivProps>;
|
|
19
|
+
export default _default;
|
|
@@ -41,8 +41,7 @@ var LowCodePage = (props) => {
|
|
|
41
41
|
const context = (0, import_useEngineContext.default)();
|
|
42
42
|
const { RenderLowCodeByKey, getRenderLowCodeByKey } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
43
43
|
const Com = (0, import_utils.isFunction)(getRenderLowCodeByKey) ? getRenderLowCodeByKey() : RenderLowCodeByKey;
|
|
44
|
-
if (!Com)
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
|
|
44
|
+
if (!Com) return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
|
|
46
45
|
return /* @__PURE__ */ import_react.default.createElement(Com, { ...others, id, key: id });
|
|
47
46
|
};
|
|
48
47
|
var lowCodePage_default = LowCodePage;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UniqueIdentifier } from '@dnd-kit/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Props as TreeItemProps } from './TreeItem';
|
|
4
|
+
interface Props extends TreeItemProps {
|
|
5
|
+
id: UniqueIdentifier;
|
|
6
|
+
__designMode?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ id, depth, ...props }: Props) => JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import type { TreeItem as TreeItemType } from '../../types';
|
|
3
|
+
import './TreeItem.less';
|
|
4
|
+
export interface Props extends Omit<HTMLAttributes<HTMLLIElement>, 'id'> {
|
|
5
|
+
childCount?: number;
|
|
6
|
+
clone?: boolean;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
depth: number;
|
|
9
|
+
disableInteraction?: boolean;
|
|
10
|
+
disableSelection?: boolean;
|
|
11
|
+
ghost?: boolean;
|
|
12
|
+
handleProps?: any;
|
|
13
|
+
indicator?: boolean;
|
|
14
|
+
indentationWidth: number;
|
|
15
|
+
onCollapse?(): void;
|
|
16
|
+
onRemove?(): void;
|
|
17
|
+
wrapperRef?(node: HTMLLIElement): void;
|
|
18
|
+
item: TreeItemType;
|
|
19
|
+
renderItem?(item: Props, ref: React.ForwardedRef<HTMLDivElement>): React.ReactNode;
|
|
20
|
+
__designMode?: string;
|
|
21
|
+
isBlocked?: boolean;
|
|
22
|
+
isError?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const TreeItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 可拖拽树形组件
|
|
3
|
+
* 基于@dnd-kit库实现,支持拖拽排序、展开折叠、删除等功能
|
|
4
|
+
*/
|
|
5
|
+
import { UniqueIdentifier } from '@dnd-kit/core';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { FlattenedItem, TreeItem, TreeItems } from './types';
|
|
8
|
+
import type { Props as TreeItemProps } from './components/TreeItem/TreeItem';
|
|
9
|
+
interface Props {
|
|
10
|
+
/** 是否支持折叠功能 */
|
|
11
|
+
collapsible?: boolean;
|
|
12
|
+
/** 初始树形数据,默认使用 initialItems */
|
|
13
|
+
value?: TreeItems;
|
|
14
|
+
/** 缩进宽度,控制子节点的缩进距离 */
|
|
15
|
+
indentationWidth?: number;
|
|
16
|
+
/** 是否显示拖拽指示器 */
|
|
17
|
+
indicator?: boolean;
|
|
18
|
+
/** 是否支持删除节点功能 */
|
|
19
|
+
removable?: boolean;
|
|
20
|
+
/** 自定义渲染树节点 */
|
|
21
|
+
renderItem?: (item: TreeItemProps, ref: React.RefObject<HTMLDivElement>) => React.ReactNode;
|
|
22
|
+
/** 树形数据变化回调 */
|
|
23
|
+
onChange?: (items: TreeItems) => void;
|
|
24
|
+
/** 删除节点前 */
|
|
25
|
+
onRemoveBefore?: (item: TreeItem) => Promise<boolean>;
|
|
26
|
+
/** 设计模式 */
|
|
27
|
+
__designMode?: string;
|
|
28
|
+
/** 最大层级 */
|
|
29
|
+
maxLevel?: number;
|
|
30
|
+
/** 自定义拖拽判断函数,返回false时阻止拖拽 */
|
|
31
|
+
canDrop?: (dragItem: FlattenedItem, dropTarget: FlattenedItem, parentId: UniqueIdentifier | null, parentNode: any) => boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function SortableTree({ collapsible, value, indicator, indentationWidth, removable, renderItem, onChange, onRemoveBefore, __designMode, maxLevel, canDrop, }: Props): JSX.Element;
|
|
34
|
+
declare const Demo: (props: Props) => JSX.Element;
|
|
35
|
+
export default Demo;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Props as TreeItem } from '../../../pisellDraggable/components/TreeItem/TreeItem';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface SortableItemProps {
|
|
5
|
+
itemProps: TreeItem;
|
|
6
|
+
render?: (itemProps: TreeItem) => React.ReactNode;
|
|
7
|
+
domRef: React.RefObject<HTMLDivElement>;
|
|
8
|
+
allowAddChild?: boolean;
|
|
9
|
+
allowDelete?: boolean;
|
|
10
|
+
allowIsShow?: boolean;
|
|
11
|
+
allowDrag?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onAdd?: (itemProps: TreeItem) => void;
|
|
14
|
+
onDelete?: (itemProps: TreeItem) => void;
|
|
15
|
+
showBorder?: boolean;
|
|
16
|
+
spacing?: number;
|
|
17
|
+
maxLevel?: number;
|
|
18
|
+
/** 设计模式 */
|
|
19
|
+
__designMode?: string;
|
|
20
|
+
/** 是否自定义操作 */
|
|
21
|
+
isCustomAction?: boolean;
|
|
22
|
+
/** 获取item样式 */
|
|
23
|
+
getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
declare const SortableItem: (props: SortableItemProps) => JSX.Element;
|
|
26
|
+
export default SortableItem;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import type { Props as TreeItem } from '../pisellDraggable/components/TreeItem/TreeItem';
|
|
3
|
+
import type { TreeItem as TreeItemType } from '../pisellDraggable/types';
|
|
4
|
+
export interface DropSortItem extends TreeItemType {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface PisellDropSortProps {
|
|
8
|
+
/** value */
|
|
9
|
+
value: DropSortItem[];
|
|
10
|
+
/** 允许拖拽 */
|
|
11
|
+
allowDrag?: boolean;
|
|
12
|
+
/** 允许删除 */
|
|
13
|
+
allowDelete?: boolean;
|
|
14
|
+
/** 允许添加子节点 */
|
|
15
|
+
allowAddChild?: boolean;
|
|
16
|
+
/** 允许添加根节点 */
|
|
17
|
+
allowAddRoot?: boolean;
|
|
18
|
+
/** 是否允许显示隐藏 */
|
|
19
|
+
allowIsShow?: boolean;
|
|
20
|
+
/** 是否禁用 */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** 节点间距 */
|
|
23
|
+
spacing?: number;
|
|
24
|
+
/** 最大层级数 */
|
|
25
|
+
maxLevel?: number;
|
|
26
|
+
/** 是否显示边框 */
|
|
27
|
+
showBorder?: boolean;
|
|
28
|
+
/** 样式 */
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
/** 类名 */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** 数据源变化回调 */
|
|
33
|
+
onChange?: (items: DropSortItem[]) => void;
|
|
34
|
+
/** 删除节点回调 */
|
|
35
|
+
onDelete?: (itemProps: TreeItem) => void;
|
|
36
|
+
/** 添加节点回调 */
|
|
37
|
+
onAdd?: (itemProps: TreeItem) => void;
|
|
38
|
+
/** 自定义渲染节点 */
|
|
39
|
+
renderItem?: (itemProps: TreeItem) => React.ReactNode;
|
|
40
|
+
/** 添加根节点回调 */
|
|
41
|
+
onAddRoot?: () => void;
|
|
42
|
+
/** 左侧自定义内容 */
|
|
43
|
+
leftContent?: React.ReactNode;
|
|
44
|
+
/** 右侧自定义内容 */
|
|
45
|
+
rightContent?: React.ReactNode;
|
|
46
|
+
/** 空状态自定义内容 */
|
|
47
|
+
emptyContent?: React.ReactNode;
|
|
48
|
+
/** 设计模式 */
|
|
49
|
+
__designMode?: string;
|
|
50
|
+
/** 是否自定义操作 */
|
|
51
|
+
isCustomAction?: boolean;
|
|
52
|
+
/** 获取item样式 */
|
|
53
|
+
getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
|
|
54
|
+
/** 自定义拖拽判断函数,返回false时阻止拖拽 */
|
|
55
|
+
canDrop?: (dragItem: DropSortItem, dropTarget: DropSortItem, parentId: string | number | null) => boolean;
|
|
56
|
+
/** 节点缩进宽度 */
|
|
57
|
+
indentationWidth?: number;
|
|
58
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ApplicableProductDetails {
|
|
4
|
+
amount: string;
|
|
5
|
+
type: string;
|
|
6
|
+
resource_id: number;
|
|
7
|
+
title: string;
|
|
8
|
+
original_amount: string;
|
|
9
|
+
}
|
|
10
|
+
interface Discount {
|
|
11
|
+
id: number;
|
|
12
|
+
product_name: string;
|
|
13
|
+
encoded: string;
|
|
14
|
+
code: string;
|
|
15
|
+
tag: string;
|
|
16
|
+
expire_time?: string;
|
|
17
|
+
product_id: number;
|
|
18
|
+
relation_type: string;
|
|
19
|
+
par_value: string;
|
|
20
|
+
used_par_value: string;
|
|
21
|
+
limit_status: string;
|
|
22
|
+
limited_relation_product_data: any;
|
|
23
|
+
balance: string;
|
|
24
|
+
format_title: any;
|
|
25
|
+
product: any;
|
|
26
|
+
savedAmount: number;
|
|
27
|
+
isDisabled: boolean;
|
|
28
|
+
isSelected?: boolean;
|
|
29
|
+
isAvailable?: boolean;
|
|
30
|
+
isUsed?: boolean;
|
|
31
|
+
applicableProductIds?: number[];
|
|
32
|
+
applicableProductDetails: ApplicableProductDetails[];
|
|
33
|
+
appliedProductDetails: any[];
|
|
34
|
+
}
|
|
35
|
+
export interface PisellGoodPassCardProps {
|
|
36
|
+
/**数据源 */
|
|
37
|
+
dataSource: Array<Discount>;
|
|
38
|
+
/**事件 */
|
|
39
|
+
onChange?: (current: {
|
|
40
|
+
id: string | number;
|
|
41
|
+
isSelected: boolean;
|
|
42
|
+
}) => void;
|
|
43
|
+
/**样式 */
|
|
44
|
+
style: React.CSSProperties;
|
|
45
|
+
/**快捷展示排序 */
|
|
46
|
+
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
|
+
}
|
|
48
|
+
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
49
|
+
export default index;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Menu as AntdMenu } from 'antd';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './PisellMenu.less';
|
|
4
|
+
import type { PisellMenuProps } from './types';
|
|
5
|
+
declare type PisellMenuComponent = React.FC<PisellMenuProps> & {
|
|
6
|
+
Item: typeof AntdMenu.Item;
|
|
7
|
+
SubMenu: typeof AntdMenu.SubMenu;
|
|
8
|
+
ItemGroup: typeof AntdMenu.ItemGroup;
|
|
9
|
+
};
|
|
10
|
+
declare const PisellMenu: PisellMenuComponent;
|
|
11
|
+
export default PisellMenu;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MenuProps } from 'antd';
|
|
3
|
+
export interface PisellMenuProps extends Omit<MenuProps, 'items'> {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
mode?: 'vertical' | 'horizontal' | 'inline';
|
|
7
|
+
theme?: 'light' | 'dark';
|
|
8
|
+
defaultOpenKeys?: string[];
|
|
9
|
+
defaultSelectedKeys?: string[];
|
|
10
|
+
inlineCollapsed?: boolean;
|
|
11
|
+
openKeys?: string[];
|
|
12
|
+
selectedKeys?: string[];
|
|
13
|
+
onOpenChange?: (openKeys: string[]) => void;
|
|
14
|
+
dataSource?: any;
|
|
15
|
+
__designMode?: string;
|
|
16
|
+
other?: PisellMenuProps;
|
|
17
|
+
}
|
|
18
|
+
export interface MenuItemType {
|
|
19
|
+
key: string;
|
|
20
|
+
label: string;
|
|
21
|
+
path: string;
|
|
22
|
+
children?: MenuItemType[];
|
|
23
|
+
icon?: string | React.ReactNode;
|
|
24
|
+
hide?: boolean;
|
|
25
|
+
type?: 'group' | 'divider';
|
|
26
|
+
isGroup?: boolean;
|
|
27
|
+
}
|