@pisell/materials 3.2.31 → 3.3.0
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/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +147 -167
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +25 -39
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -39
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/classicLayout/index.js +5 -4
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +97 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/date-picker/datePickerCpt.d.ts +0 -1
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/icon/index.js +5 -5
- package/es/components/list/index.d.ts +0 -1
- package/es/components/list/index.js +6 -6
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisell-config-provider/index.js +3 -1
- package/es/components/pisellAdjustPrice/index.d.ts +0 -1
- package/es/components/pisellCardList/index.d.ts +43 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +34 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/es/components/pisellInformationEntry/index.d.ts +31 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/pisellWalletPassCard/index.d.ts +55 -0
- package/es/components/productCard/components/Time/components/Like/index.js +16 -12
- package/es/components/productCard/components/Time/components/Like/index.less +25 -4
- package/es/components/productCard/components/Time/components/SelectHolder/index.js +54 -12
- package/es/components/productCard/components/Time/components/SelectHolder/index.less +28 -3
- package/es/components/productCard/components/Time/components/SelectResource/index.js +60 -12
- package/es/components/productCard/components/Time/components/SelectResource/index.less +20 -0
- package/es/components/productCard/components/Time/index.js +45 -22
- package/es/components/productCard/components/Time/index.less +1 -21
- package/es/components/productCard/index.js +4 -2
- package/es/components/productCard/locales.d.ts +9 -0
- package/es/components/productCard/locales.js +30 -3
- package/es/components/productCard/utils.js +43 -0
- package/es/components/qrcode/index.js +1 -1
- package/es/components/select-time/index.d.ts +0 -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/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +5 -4
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Gallery/index.d.ts +5 -0
- 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.d.ts +0 -1
- 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/date/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/filterUtil/index.js +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +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 +161 -0
- package/es/components/table/View/index.d.ts +0 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +2 -1
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/table/types.d.ts +251 -0
- package/es/components/translation/index.js +10 -10
- package/es/components/translation/utils.js +5 -5
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/locales/en-US.d.ts +266 -0
- package/es/locales/zh-CN.d.ts +261 -0
- package/es/locales/zh-TW.d.ts +261 -0
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +9 -8
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +97 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -1
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/lowCodePage/index.js +2 -1
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/index.js +3 -1
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -1
- package/lib/components/pisellCardList/index.d.ts +43 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +34 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +0 -1
- package/lib/components/pisellInformationEntry/index.d.ts +31 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +55 -0
- package/lib/components/productCard/components/Time/components/Like/index.js +21 -13
- package/lib/components/productCard/components/Time/components/Like/index.less +25 -4
- package/lib/components/productCard/components/Time/components/SelectHolder/index.js +90 -29
- package/lib/components/productCard/components/Time/components/SelectHolder/index.less +28 -3
- package/lib/components/productCard/components/Time/components/SelectResource/index.js +71 -12
- package/lib/components/productCard/components/Time/components/SelectResource/index.less +20 -0
- package/lib/components/productCard/components/Time/index.js +61 -27
- package/lib/components/productCard/components/Time/index.less +1 -21
- package/lib/components/productCard/index.js +4 -2
- package/lib/components/productCard/locales.d.ts +9 -0
- package/lib/components/productCard/locales.js +12 -3
- package/lib/components/productCard/utils.js +35 -0
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Gallery/index.d.ts +5 -0
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/filterUtil/index.js +6 -3
- package/lib/components/table/Table/fields/date/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +8 -4
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/utils/index.js +2 -1
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +161 -0
- package/lib/components/table/View/index.d.ts +0 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/hooks/useResponsive.js +6 -3
- package/lib/locales/en-US.d.ts +266 -0
- package/lib/locales/zh-CN.d.ts +261 -0
- package/lib/locales/zh-TW.d.ts +261 -0
- package/package.json +1 -1
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/productCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -2
- package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -9
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -2
- package/es/components/productCard/components/Time/index.d.ts +0 -3
- package/es/components/productCard/types.d.ts +0 -83
- package/es/components/tabs/index.d.ts +0 -16
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/productCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -2
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -9
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -2
- package/lib/components/productCard/components/Time/index.d.ts +0 -3
- package/lib/components/productCard/types.d.ts +0 -83
- package/lib/components/tabs/index.d.ts +0 -16
|
@@ -1,4 +1,5 @@
|
|
|
1
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 _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
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; }
|
|
3
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; }
|
|
4
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; }
|
|
@@ -22,7 +23,9 @@ var Time = function Time(_ref) {
|
|
|
22
23
|
isShowChangeHolder = _ref.isShowChangeHolder,
|
|
23
24
|
holderMode = _ref.holderMode,
|
|
24
25
|
onAddHolder = _ref.onAddHolder,
|
|
25
|
-
isShowAddHolderButton = _ref.isShowAddHolderButton
|
|
26
|
+
isShowAddHolderButton = _ref.isShowAddHolderButton,
|
|
27
|
+
onClearHolder = _ref.onClearHolder,
|
|
28
|
+
onClearResource = _ref.onClearResource;
|
|
26
29
|
var start_date = item.start_date,
|
|
27
30
|
end_date = item.end_date,
|
|
28
31
|
holder_title = item.holder_title,
|
|
@@ -33,7 +36,14 @@ var Time = function Time(_ref) {
|
|
|
33
36
|
is_hide_like = item.is_hide_like,
|
|
34
37
|
holder_id = item.holder_id,
|
|
35
38
|
holders = item.holders,
|
|
36
|
-
multiResources = item.multiResources
|
|
39
|
+
multiResources = item.multiResources,
|
|
40
|
+
addHolderButtonText = item.addHolderButtonText,
|
|
41
|
+
isErrorHolder = item.isErrorHolder,
|
|
42
|
+
allowClearHolder = item.allowClearHolder,
|
|
43
|
+
allowClearResource = item.allowClearResource,
|
|
44
|
+
isErrorResource = item.isErrorResource,
|
|
45
|
+
resourceErrorText = item.resourceErrorText,
|
|
46
|
+
isMultipleResource = item.isMultipleResource;
|
|
37
47
|
var holderCom = useMemo(function () {
|
|
38
48
|
if (!isShowHolder) return null;
|
|
39
49
|
|
|
@@ -45,7 +55,11 @@ var Time = function Time(_ref) {
|
|
|
45
55
|
onChange: changeHolder,
|
|
46
56
|
holderMode: holderMode,
|
|
47
57
|
isShowAddHolderButton: isShowAddHolderButton,
|
|
48
|
-
onAddHolder: onAddHolder
|
|
58
|
+
onAddHolder: onAddHolder,
|
|
59
|
+
addHolderButtonText: addHolderButtonText,
|
|
60
|
+
onClearHolder: onClearHolder,
|
|
61
|
+
isErrorHolder: isErrorHolder,
|
|
62
|
+
allowClear: allowClearHolder
|
|
49
63
|
});
|
|
50
64
|
}
|
|
51
65
|
if (holder_title) {
|
|
@@ -53,9 +67,10 @@ var Time = function Time(_ref) {
|
|
|
53
67
|
className: "".concat(prefix, "product-holder-wrap")
|
|
54
68
|
}, holder_title);
|
|
55
69
|
}
|
|
56
|
-
}, [isShowHolder, holder_id, holder_title, holderMode, holders, isShowAddHolderButton]);
|
|
70
|
+
}, [isShowHolder, holder_id, holder_title, holderMode, holders, isShowAddHolderButton, isShowChangeHolder, isErrorHolder, addHolderButtonText, allowClearHolder]);
|
|
57
71
|
var likeCom = useCallback(function (status, item) {
|
|
58
72
|
return /*#__PURE__*/React.createElement(Like, {
|
|
73
|
+
isShowChangeResource: isShowChangeResource,
|
|
59
74
|
style: {
|
|
60
75
|
marginRight: 4
|
|
61
76
|
},
|
|
@@ -66,35 +81,43 @@ var Time = function Time(_ref) {
|
|
|
66
81
|
}));
|
|
67
82
|
}
|
|
68
83
|
});
|
|
69
|
-
}, []);
|
|
84
|
+
}, [isShowChangeResource]);
|
|
70
85
|
var resourceCom = useCallback(function (item) {
|
|
71
86
|
if (!isShowChangeResource) {
|
|
72
87
|
return item === null || item === void 0 ? void 0 : item.name;
|
|
73
88
|
}
|
|
74
|
-
return /*#__PURE__*/React.createElement(SelectResource, {
|
|
89
|
+
return /*#__PURE__*/React.createElement(SelectResource, _extends({}, item, {
|
|
75
90
|
lists: item === null || item === void 0 ? void 0 : item.lists,
|
|
76
91
|
value: item === null || item === void 0 ? void 0 : item.id,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
onChange: changeResource,
|
|
93
|
+
onClearResource: onClearResource,
|
|
94
|
+
allowClear: item === null || item === void 0 ? void 0 : item.allowClearResource,
|
|
95
|
+
isErrorResource: item === null || item === void 0 ? void 0 : item.isErrorResource,
|
|
96
|
+
resourceErrorText: item === null || item === void 0 ? void 0 : item.resourceErrorText,
|
|
97
|
+
resourceMode: item.resourceMode,
|
|
98
|
+
maxLength: item.maxLength
|
|
99
|
+
}));
|
|
80
100
|
}, [isShowChangeResource]);
|
|
81
101
|
var likeAndResourceCom = useMemo(function () {
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}
|
|
102
|
+
if (isMultipleResource) {
|
|
103
|
+
if ((multiResources === null || multiResources === void 0 ? void 0 : multiResources.length) > 0) {
|
|
104
|
+
return multiResources.map(function (resourceItem) {
|
|
105
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
key: (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.id) + (resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem._id)
|
|
107
|
+
}, resourceItem !== null && resourceItem !== void 0 && resourceItem.id && !is_hide_like && !resourceItem.is_hide_like ? likeCom(resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.status, resourceItem) : null, resourceCom(resourceItem));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
90
111
|
}
|
|
91
|
-
|
|
92
|
-
className: "".concat(prefix, "product-card-like-wrap")
|
|
93
|
-
}, likeCom(like_status, item)) : null, resourceCom({
|
|
112
|
+
var _resourceCom = resourceCom({
|
|
94
113
|
name: relation_form_name,
|
|
95
114
|
id: resource_id,
|
|
96
|
-
lists: resources
|
|
97
|
-
|
|
115
|
+
lists: resources,
|
|
116
|
+
allowClearResource: allowClearResource,
|
|
117
|
+
isErrorResource: isErrorResource,
|
|
118
|
+
resourceErrorText: resourceErrorText
|
|
119
|
+
});
|
|
120
|
+
return resource_id && !is_hide_like || _resourceCom ? /*#__PURE__*/React.createElement(React.Fragment, null, resource_id && !is_hide_like ? likeCom(like_status, item) : null, _resourceCom) : null;
|
|
98
121
|
}, [multiResources, resource_id, resources, relation_form_name, is_hide_like]);
|
|
99
122
|
var isShow = useMemo(function () {
|
|
100
123
|
return start_date && end_date || holderCom || likeAndResourceCom;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
&-multi-resources {
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
align-items: start !important;
|
|
39
|
+
gap: 6px;
|
|
39
40
|
> div {
|
|
40
41
|
flex: 1;
|
|
41
42
|
display: flex;
|
|
@@ -45,12 +46,6 @@
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
&-product-card-like-wrap {
|
|
49
|
-
display: flex;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
align-items: center;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
49
|
&-change-resource {
|
|
55
50
|
display: flex;
|
|
56
51
|
align-items: center;
|
|
@@ -58,19 +53,4 @@
|
|
|
58
53
|
flex: 1 0 0;
|
|
59
54
|
align-self: stretch;
|
|
60
55
|
}
|
|
61
|
-
|
|
62
|
-
&-change-resource &-product-card-like-wrap {
|
|
63
|
-
display: flex;
|
|
64
|
-
width: 44px;
|
|
65
|
-
height: 44px;
|
|
66
|
-
padding: 10px 14px;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
align-items: center;
|
|
69
|
-
border-radius: 8px;
|
|
70
|
-
border: 1px solid var(--Gray-300, #d0d5dd);
|
|
71
|
-
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
72
|
-
.like-icon {
|
|
73
|
-
margin-right: 0 !important;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
56
|
}
|
|
@@ -54,7 +54,7 @@ var ProductCard = function ProductCard(props) {
|
|
|
54
54
|
var useOpenNoteRef = useRef();
|
|
55
55
|
var locale = (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || localStorage.getItem('umi_locale');
|
|
56
56
|
locales.init(localeTexts, locale || 'en');
|
|
57
|
-
console.log(dataSource, isShowImage, isShowNote,
|
|
57
|
+
console.log(dataSource, isShowImage, isShowNote, 'dataSource');
|
|
58
58
|
var image = dataSource.image,
|
|
59
59
|
bundle = dataSource.bundle,
|
|
60
60
|
relation_products = dataSource.relation_products,
|
|
@@ -124,7 +124,9 @@ var ProductCard = function ProductCard(props) {
|
|
|
124
124
|
changeResource: onChangeResource,
|
|
125
125
|
changeHolder: onChangeHolder,
|
|
126
126
|
onAddHolder: other === null || other === void 0 ? void 0 : other.onAddHolder,
|
|
127
|
-
isShowAddHolderButton: other === null || other === void 0 ? void 0 : other.isShowAddHolderButton
|
|
127
|
+
isShowAddHolderButton: other === null || other === void 0 ? void 0 : other.isShowAddHolderButton,
|
|
128
|
+
onClearResource: other === null || other === void 0 ? void 0 : other.onClearResource,
|
|
129
|
+
onClearHolder: other === null || other === void 0 ? void 0 : other.onClearHolder
|
|
128
130
|
}), /*#__PURE__*/React.createElement(Packages, {
|
|
129
131
|
item: dataSource,
|
|
130
132
|
isShowPackageNote: isShowPackageNote
|
|
@@ -13,6 +13,9 @@ declare const _default: {
|
|
|
13
13
|
'pisell2.product.card.items.package': string;
|
|
14
14
|
'pisell2.product.card.view-all': string;
|
|
15
15
|
'pisell2.product.card.view-less': string;
|
|
16
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
17
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
18
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
16
19
|
};
|
|
17
20
|
'zh-CN': {
|
|
18
21
|
'pisell2.product.card.day': (val: number) => string;
|
|
@@ -28,6 +31,9 @@ declare const _default: {
|
|
|
28
31
|
'pisell2.product.card.items.package': string;
|
|
29
32
|
'pisell2.product.card.view-all': string;
|
|
30
33
|
'pisell2.product.card.view-less': string;
|
|
34
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
35
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
36
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
31
37
|
};
|
|
32
38
|
'zh-HK': {
|
|
33
39
|
'pisell2.product.card.day': (val: number) => string;
|
|
@@ -43,6 +49,9 @@ declare const _default: {
|
|
|
43
49
|
'pisell2.product.card.items.package': string;
|
|
44
50
|
'pisell2.product.card.view-all': string;
|
|
45
51
|
'pisell2.product.card.view-less': string;
|
|
52
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
53
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
54
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
46
55
|
};
|
|
47
56
|
};
|
|
48
57
|
export default _default;
|
|
@@ -18,7 +18,16 @@ export default {
|
|
|
18
18
|
'pisell2.product.card.note.pla': 'Please enter the note',
|
|
19
19
|
'pisell2.product.card.items.package': 'Items in package',
|
|
20
20
|
'pisell2.product.card.view-all': 'View all',
|
|
21
|
-
'pisell2.product.card.view-less': 'View less'
|
|
21
|
+
'pisell2.product.card.view-less': 'View less',
|
|
22
|
+
'pisell2.product.card.add.holder.button.text': function pisell2ProductCardAddHolderButtonText(val) {
|
|
23
|
+
return "Add ".concat(val || '');
|
|
24
|
+
},
|
|
25
|
+
'pisell2.product.card.add.holder.placeholder': function pisell2ProductCardAddHolderPlaceholder(val) {
|
|
26
|
+
return "Please select ".concat(val || '');
|
|
27
|
+
},
|
|
28
|
+
'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
|
|
29
|
+
return "".concat(hour > 0 ? "".concat(hour, "h") : '').concat(hour > 0 && minute > 0 ? ' ' : '').concat(minute > 0 ? "".concat(minute, "min") : '');
|
|
30
|
+
}
|
|
22
31
|
},
|
|
23
32
|
'zh-CN': {
|
|
24
33
|
'pisell2.product.card.day': function pisell2ProductCardDay(val) {
|
|
@@ -39,7 +48,16 @@ export default {
|
|
|
39
48
|
'pisell2.product.card.note.pla': '请输入备注',
|
|
40
49
|
'pisell2.product.card.items.package': '包含的商品',
|
|
41
50
|
'pisell2.product.card.view-all': '查看全部',
|
|
42
|
-
'pisell2.product.card.view-less': '收起'
|
|
51
|
+
'pisell2.product.card.view-less': '收起',
|
|
52
|
+
'pisell2.product.card.add.holder.button.text': function pisell2ProductCardAddHolderButtonText(val) {
|
|
53
|
+
return "\u6DFB\u52A0".concat(val || '');
|
|
54
|
+
},
|
|
55
|
+
'pisell2.product.card.add.holder.placeholder': function pisell2ProductCardAddHolderPlaceholder(val) {
|
|
56
|
+
return "\u8BF7\u9009\u62E9".concat(val || '');
|
|
57
|
+
},
|
|
58
|
+
'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
|
|
59
|
+
return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u65F6") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u949F") : '');
|
|
60
|
+
}
|
|
43
61
|
},
|
|
44
62
|
'zh-HK': {
|
|
45
63
|
'pisell2.product.card.day': function pisell2ProductCardDay(val) {
|
|
@@ -60,6 +78,15 @@ export default {
|
|
|
60
78
|
'pisell2.product.card.note.pla': '請輸入備註',
|
|
61
79
|
'pisell2.product.card.items.package': '包含的商品',
|
|
62
80
|
'pisell2.product.card.view-all': '查看全部',
|
|
63
|
-
'pisell2.product.card.view-less': '收起'
|
|
81
|
+
'pisell2.product.card.view-less': '收起',
|
|
82
|
+
'pisell2.product.card.add.holder.button.text': function pisell2ProductCardAddHolderButtonText(val) {
|
|
83
|
+
return "\u6DFB\u52A0".concat(val || '');
|
|
84
|
+
},
|
|
85
|
+
'pisell2.product.card.add.holder.placeholder': function pisell2ProductCardAddHolderPlaceholder(val) {
|
|
86
|
+
return "\u8ACB\u9078\u64C7".concat(val || '');
|
|
87
|
+
},
|
|
88
|
+
'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
|
|
89
|
+
return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u6642") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u9418") : '');
|
|
90
|
+
}
|
|
64
91
|
}
|
|
65
92
|
};
|
|
@@ -69,6 +69,49 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
|
|
|
69
69
|
var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
|
|
70
70
|
var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
|
|
71
71
|
var diffInDays = (item === null || item === void 0 ? void 0 : item.custom_day_count) || endDate.diff(startDate, 'day');
|
|
72
|
+
|
|
73
|
+
// 1.2时间格式, 同天显示 年月日 开始 - 结束, 不同天 年月日 开始 - 年月日 结束
|
|
74
|
+
if (item !== null && item !== void 0 && item.duration_type) {
|
|
75
|
+
var sameDay = startDate.isSame(endDate, 'day');
|
|
76
|
+
var dateFormat = isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
|
|
77
|
+
var timeFormat = 'HH:mm';
|
|
78
|
+
var startTime = (item === null || item === void 0 ? void 0 : item.start_time) || startDate.format(timeFormat);
|
|
79
|
+
var endTime = (item === null || item === void 0 ? void 0 : item.end_time) || endDate.format(timeFormat);
|
|
80
|
+
var dateTime = '';
|
|
81
|
+
if (sameDay) {
|
|
82
|
+
if (isEn) {
|
|
83
|
+
// 英文:开始时间 - 结束时间 年月日
|
|
84
|
+
dateTime = "".concat(startTime, " ~ ").concat(endTime, " ").concat(startDate.format(dateFormat));
|
|
85
|
+
} else {
|
|
86
|
+
// 中文:年月日 开始时间 - 结束时间
|
|
87
|
+
dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endTime);
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
// 不同天
|
|
91
|
+
if (isEn) {
|
|
92
|
+
// 英文:开始时间 年月日 - 结束时间 年月日
|
|
93
|
+
dateTime = "".concat(startTime, " ").concat(startDate.format(dateFormat), " ~ ").concat(endTime, " ").concat(endDate.format(dateFormat));
|
|
94
|
+
} else {
|
|
95
|
+
// 中文:年月日 开始时间 - 年月日 结束时间
|
|
96
|
+
dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endDate.format(dateFormat), " ").concat(endTime);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
|
|
100
|
+
var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
|
|
101
|
+
var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), item === null || item === void 0 ? void 0 : item.duration_type);
|
|
102
|
+
var durationText = '';
|
|
103
|
+
if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
|
|
104
|
+
// 转为小时+分钟
|
|
105
|
+
var hours = Math.floor(_duration / 60);
|
|
106
|
+
var minutes = _duration % 60;
|
|
107
|
+
durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
|
|
108
|
+
} else if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'days') {
|
|
109
|
+
durationText = locales.getText('pisell2.product.card.day')(_duration);
|
|
110
|
+
} else {
|
|
111
|
+
durationText = "".concat(_duration);
|
|
112
|
+
}
|
|
113
|
+
return "".concat(dateTime, " (").concat(durationText, ")");
|
|
114
|
+
}
|
|
72
115
|
var _format = isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
|
|
73
116
|
|
|
74
117
|
// 是否自定义格式
|
|
@@ -3,7 +3,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
3
3
|
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."); }
|
|
4
4
|
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); }
|
|
5
5
|
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; }
|
|
6
|
-
function _iterableToArrayLimit(
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
import React, { useMemo } from "react";
|
|
9
9
|
import { QRCode as AntQRCode, Modal } from "antd";
|
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
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
3
|
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); }
|
|
4
4
|
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; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useMemo } from "react";
|
|
8
8
|
import { Menu, Divider } from "antd";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
2
2
|
var _excluded = ["children", "isActive"];
|
|
3
3
|
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); }
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
6
|
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; }
|
|
7
|
-
function _toPropertyKey(
|
|
8
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
9
|
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; }
|
|
10
10
|
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; }
|
|
11
11
|
import React, { Children, isValidElement, cloneElement } from "react";
|
|
@@ -30,7 +30,7 @@ var ViewMode = function ViewMode(props) {
|
|
|
30
30
|
});
|
|
31
31
|
}, [modeList]);
|
|
32
32
|
var handleClick = function handleClick(e) {
|
|
33
|
-
onChange === null || onChange === void 0
|
|
33
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.key);
|
|
34
34
|
};
|
|
35
35
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
36
36
|
menu: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
2
2
|
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; }
|
|
3
|
-
function _toPropertyKey(
|
|
4
|
-
function _toPrimitive(
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
5
|
import React, { useMemo } from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { Tooltip } from "antd";
|
|
@@ -10,6 +10,7 @@ import { getValueByKeys } from "../../../../../Table/fields/utils";
|
|
|
10
10
|
import "./index.less";
|
|
11
11
|
var prefix = "pisell-lowcode-";
|
|
12
12
|
var RenderFields = function RenderFields(props) {
|
|
13
|
+
var _classNames;
|
|
13
14
|
var fields = props.fields,
|
|
14
15
|
columnsMap = props.columnsMap,
|
|
15
16
|
showMode = props.showMode,
|
|
@@ -39,7 +40,7 @@ var RenderFields = function RenderFields(props) {
|
|
|
39
40
|
return fieldsList;
|
|
40
41
|
}, [fields, columnsMap, record, isShowLabel]);
|
|
41
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: classNames("".concat(prefix, "gallery-render-fields-wrap"),
|
|
43
|
+
className: classNames("".concat(prefix, "gallery-render-fields-wrap"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "gallery-render-fields-wrap-inline"), showMode === "inline"), _defineProperty(_classNames, "".concat(prefix, "gallery-render-fields-wrap-block"), showMode === "block"), _classNames))
|
|
43
44
|
}, fieldContent);
|
|
44
45
|
};
|
|
45
46
|
export default RenderFields;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { GallerySettingType, GallerySettingValueType } from "../../../types";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
declare type GalleryItemProps = {
|
|
5
|
+
record: Record<string, any>;
|
|
6
|
+
gallery: GallerySettingType;
|
|
7
|
+
columnsMap: Map<string, Record<string, any>>;
|
|
8
|
+
index: number;
|
|
9
|
+
gallerySetting: GallerySettingValueType;
|
|
10
|
+
columns: Record<string, any>[];
|
|
11
|
+
onClick: React.MouseEventHandler<HTMLDivElement>;
|
|
12
|
+
};
|
|
13
|
+
declare const GalleryItem: (props: GalleryItemProps) => JSX.Element;
|
|
14
|
+
export default GalleryItem;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
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(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; }
|
|
4
|
+
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; }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { Button } from "antd";
|
|
10
10
|
import "./index.less";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -12,7 +12,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
12
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
14
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
-
function _iterableToArrayLimit(
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
import IconFont from "../../../iconfont";
|
|
18
18
|
import { Form, Input, Popover, message } from "antd";
|