@pisell/materials 6.11.100 → 6.11.101
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 +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/components/MultilevelCard/hooks/useMultilevelCardExpand.d.ts +1 -0
- package/es/components/PisellCards/components/PisellImageCard/hooks/useImageLoad.d.ts +1 -0
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellLayouts/index.d.ts +1 -0
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/PisellScrollView/PisellScrollView.d.ts +5 -0
- package/es/components/PisellScrollView/components/Actions/index.d.ts +18 -0
- package/es/components/PisellScrollView/types.d.ts +203 -0
- package/es/components/batch-editor/fields/index.d.ts +1 -0
- package/es/components/calendar/index.d.ts +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +27 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/components/Pagination/index.d.ts +6 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/pisellDatePicker/index.d.ts +1 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +29 -0
- package/es/components/pisellFloorMapLayout/components/EdgeLayer.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +66 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.d.ts +16 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +26 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +44 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapZoneElement.d.ts +9 -0
- package/es/components/pisellFloorMapLayout/components/NodePortMarkers.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +61 -0
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +28 -0
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEdgeEditing.d.ts +61 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEdgeViewModel.d.ts +15 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +79 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +91 -0
- package/es/components/pisellFloorMapLayout/hooks/useShopFloorPlanSubscription.d.ts +19 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +37 -0
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +184 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +184 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +969 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +778 -0
- package/es/components/pisellFloorMapLayout/utils/alignSnap.d.ts +64 -0
- package/es/components/pisellFloorMapLayout/utils/batchScenePlacementLayout.d.ts +45 -0
- package/es/components/pisellFloorMapLayout/utils/edgeRouting.d.ts +267 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +35 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.d.ts +44 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +109 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.d.ts +34 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +2 -2
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +5 -7
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +15 -2
- package/es/components/productCard/lineItem/BookingLineItem.js +24 -14
- package/es/components/productCard/lineItem/components/TimeRange/index.d.ts +12 -0
- package/es/components/productCard/lineItem/index.less +22 -0
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/skeleton/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/time-picker/index.d.ts +1 -0
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/lib/components/PisellCards/components/MultilevelCard/hooks/useMultilevelCardExpand.d.ts +1 -0
- package/lib/components/PisellCards/components/PisellImageCard/hooks/useImageLoad.d.ts +1 -0
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellLayouts/index.d.ts +1 -0
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +5 -0
- package/lib/components/PisellScrollView/components/Actions/index.d.ts +18 -0
- package/lib/components/PisellScrollView/types.d.ts +203 -0
- package/lib/components/batch-editor/fields/index.d.ts +1 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +27 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/components/Pagination/index.d.ts +6 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/pisellDatePicker/index.d.ts +1 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +29 -0
- package/lib/components/pisellFloorMapLayout/components/EdgeLayer.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +66 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.d.ts +16 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +26 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +44 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapZoneElement.d.ts +9 -0
- package/lib/components/pisellFloorMapLayout/components/NodePortMarkers.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +61 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +28 -0
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +5 -0
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEdgeEditing.d.ts +61 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEdgeViewModel.d.ts +15 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +79 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +91 -0
- package/lib/components/pisellFloorMapLayout/hooks/useShopFloorPlanSubscription.d.ts +19 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +37 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +184 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +184 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +969 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +778 -0
- package/lib/components/pisellFloorMapLayout/utils/alignSnap.d.ts +64 -0
- package/lib/components/pisellFloorMapLayout/utils/batchScenePlacementLayout.d.ts +45 -0
- package/lib/components/pisellFloorMapLayout/utils/edgeRouting.d.ts +267 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +35 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.d.ts +44 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +109 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.d.ts +34 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +2 -2
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +14 -7
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +15 -2
- package/lib/components/productCard/lineItem/BookingLineItem.js +32 -21
- package/lib/components/productCard/lineItem/components/TimeRange/index.d.ts +12 -0
- package/lib/components/productCard/lineItem/index.less +22 -0
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -31,20 +31,18 @@ var Weighing = function Weighing(props) {
|
|
|
31
31
|
var tareValue = Number((tare === null || tare === void 0 ? void 0 : tare.value) || 0);
|
|
32
32
|
var isManualWeight = mode === 'manual';
|
|
33
33
|
var grossLabel = locales.getText('pisell2.cart.sku-card.weighing.gross');
|
|
34
|
-
var manualLabel = locales.getText('pisell2.cart.sku-card.weighing.manual');
|
|
35
34
|
var tareLabel = locales.getText('pisell2.cart.sku-card.weighing.tare');
|
|
36
35
|
var netLabel = locales.getText('pisell2.cart.sku-card.weighing.net');
|
|
37
36
|
var unitPriceText = "".concat(symbol || '').concat(unit_price !== null && unit_price !== void 0 ? unit_price : '0.00');
|
|
37
|
+
var manualPrefix = isManualWeight ? '(M) ' : '';
|
|
38
38
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
39
|
className: "".concat(PREFIX, "__weighing")
|
|
40
|
-
},
|
|
41
|
-
className: "".concat(PREFIX, "__weighing-row")
|
|
42
|
-
}, /*#__PURE__*/React.createElement("span", null, manualLabel)) : null, tareValue > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
}, tareValue > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
43
41
|
className: "".concat(PREFIX, "__weighing-row ").concat(PREFIX, "__weighing-row--large")
|
|
44
|
-
}, /*#__PURE__*/React.createElement("span", null, grossLabel, ":")
|
|
42
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(manualPrefix).concat(grossLabel, ": ").concat(formatWeight(weight, unit)))) : null, tareValue > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
45
43
|
className: "".concat(PREFIX, "__weighing-row ").concat(PREFIX, "__weighing-row--large")
|
|
46
|
-
}, /*#__PURE__*/React.createElement("span", null, tareLabel, ":")
|
|
44
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(tareLabel, ": ").concat(formatWeight(tare === null || tare === void 0 ? void 0 : tare.value, (tare === null || tare === void 0 ? void 0 : tare.unit) || unit)))) : null, /*#__PURE__*/React.createElement("div", {
|
|
47
45
|
className: "".concat(PREFIX, "__weighing-row ").concat(PREFIX, "__weighing-row--large")
|
|
48
|
-
}, /*#__PURE__*/React.createElement("span", null, "".concat(formatWeight(net_weight, unit), " ").concat(netLabel, " @ ").concat(unitPriceText, "/").concat(unitLabel))));
|
|
46
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(tareValue > 0 ? '' : manualPrefix).concat(formatWeight(net_weight, unit), " ").concat(netLabel, " @ ").concat(unitPriceText, "/").concat(unitLabel))));
|
|
49
47
|
};
|
|
50
48
|
export default Weighing;
|
|
@@ -23,8 +23,21 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&--large {
|
|
26
|
-
font-size:
|
|
27
|
-
line-height:
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
line-height: 20px;
|
|
28
|
+
align-items: flex-start;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
overflow: visible;
|
|
31
|
+
white-space: normal;
|
|
32
|
+
text-overflow: clip;
|
|
33
|
+
|
|
34
|
+
> span {
|
|
35
|
+
overflow: visible;
|
|
36
|
+
white-space: normal;
|
|
37
|
+
text-overflow: clip;
|
|
38
|
+
word-break: normal;
|
|
39
|
+
overflow-wrap: normal;
|
|
40
|
+
}
|
|
28
41
|
}
|
|
29
42
|
}
|
|
30
43
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
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); }
|
|
1
2
|
var _excluded = ["dataSource", "type", "cartSkuType", "relatedProductDataSource", "rightActions", "escapeDom", "isShowImage", "isFormSubject", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
2
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 _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(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); }
|
|
3
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
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."); }
|
|
5
9
|
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); }
|
|
@@ -137,8 +141,22 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
137
141
|
var resolvedHolderOptions = (_ref = (_ref2 = holderOptions !== null && holderOptions !== void 0 ? holderOptions : dataSource === null || dataSource === void 0 ? void 0 : dataSource.holderOptions) !== null && _ref2 !== void 0 ? _ref2 : dataSource === null || dataSource === void 0 ? void 0 : dataSource.holders) !== null && _ref !== void 0 ? _ref : [];
|
|
138
142
|
var resolvedIsFormSubject = isFormSubject !== null && isFormSubject !== void 0 ? isFormSubject : dataSource === null || dataSource === void 0 ? void 0 : dataSource.isFormSubject;
|
|
139
143
|
var bookingTitle = String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.booking_id) || '');
|
|
144
|
+
var hasBookingTitle = Boolean(bookingTitle);
|
|
140
145
|
var bookingTime = formatBookingTime(dataSource, locale);
|
|
141
146
|
var resourceName = getResourceName(dataSource, translationOriginal) || '-';
|
|
147
|
+
var renderDeleteButton = function renderDeleteButton() {
|
|
148
|
+
return isShowDelete ? /*#__PURE__*/React.createElement("button", {
|
|
149
|
+
className: "".concat(PREFIX, "__delete-btn"),
|
|
150
|
+
type: "button",
|
|
151
|
+
onClick: function onClick(e) {
|
|
152
|
+
e.preventDefault();
|
|
153
|
+
e.stopPropagation();
|
|
154
|
+
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
155
|
+
}
|
|
156
|
+
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
157
|
+
type: "pisell2-trash-01"
|
|
158
|
+
})) : null;
|
|
159
|
+
};
|
|
142
160
|
var renderStatusButton = function renderStatusButton() {
|
|
143
161
|
return /*#__PURE__*/React.createElement(Button, {
|
|
144
162
|
className: "".concat(PREFIX, "__status"),
|
|
@@ -175,7 +193,7 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
175
193
|
e.stopPropagation();
|
|
176
194
|
onCard === null || onCard === void 0 || onCard(dataSource);
|
|
177
195
|
}
|
|
178
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
}, hasBookingTitle ? /*#__PURE__*/React.createElement("div", {
|
|
179
197
|
className: "".concat(PREFIX, "__booking-header"),
|
|
180
198
|
style: {
|
|
181
199
|
'--pisell-line-item-header-color': currentStatus.color || DEFAULT_STATUS_COLOR
|
|
@@ -195,18 +213,10 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
195
213
|
}
|
|
196
214
|
},
|
|
197
215
|
trigger: ['click']
|
|
198
|
-
}, renderStatusButton()) : renderStatusButton(),
|
|
199
|
-
className: "".concat(PREFIX, "
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
e.preventDefault();
|
|
203
|
-
e.stopPropagation();
|
|
204
|
-
onDelete === null || onDelete === void 0 || onDelete(dataSource);
|
|
205
|
-
}
|
|
206
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
207
|
-
type: "pisell2-trash-01"
|
|
208
|
-
})) : null))), /*#__PURE__*/React.createElement("div", {
|
|
209
|
-
className: "".concat(PREFIX, "__booking-detail")
|
|
216
|
+
}, renderStatusButton()) : renderStatusButton(), renderDeleteButton()))) : null, /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
className: classNames("".concat(PREFIX, "__booking-detail"), _defineProperty({}, "".concat(PREFIX, "__booking-detail--with-delete"), !hasBookingTitle && isShowDelete))
|
|
218
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
219
|
+
className: "".concat(PREFIX, "__booking-detail-content")
|
|
210
220
|
}, /*#__PURE__*/React.createElement(Resources, {
|
|
211
221
|
dataSource: dataSource
|
|
212
222
|
}), /*#__PURE__*/React.createElement(TimeRange, {
|
|
@@ -215,7 +225,7 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
215
225
|
dataSource: dataSource,
|
|
216
226
|
holderOptions: resolvedHolderOptions,
|
|
217
227
|
isFormSubject: resolvedIsFormSubject
|
|
218
|
-
}) : null), isShowRelatedProduct && relatedProductDataSource ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
228
|
+
}) : null), !hasBookingTitle ? renderDeleteButton() : null), isShowRelatedProduct && relatedProductDataSource ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
|
|
219
229
|
style: {
|
|
220
230
|
margin: 0
|
|
221
231
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'dayjs/locale/zh-cn';
|
|
3
|
+
import 'dayjs/locale/en';
|
|
4
|
+
import 'dayjs/locale/zh-tw';
|
|
5
|
+
import 'dayjs/locale/ja';
|
|
6
|
+
import 'dayjs/locale/pt';
|
|
7
|
+
import '../../../cartSkuCard/components/timeRange/index.less';
|
|
8
|
+
interface LineItemTimeRangeProps {
|
|
9
|
+
dataSource?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const LineItemTimeRange: (props: LineItemTimeRangeProps) => React.JSX.Element | null;
|
|
12
|
+
export default LineItemTimeRange;
|
|
@@ -148,6 +148,28 @@
|
|
|
148
148
|
padding: 8px;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
&__booking-detail--with-delete {
|
|
152
|
+
position: relative;
|
|
153
|
+
|
|
154
|
+
.pisell-line-item__booking-detail-content {
|
|
155
|
+
padding-right: 42px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.pisell-line-item__delete-btn {
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: 8px;
|
|
161
|
+
right: 8px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__booking-detail-content {
|
|
166
|
+
min-width: 0;
|
|
167
|
+
flex: 1;
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
gap: 4px;
|
|
171
|
+
}
|
|
172
|
+
|
|
151
173
|
&__booking-field {
|
|
152
174
|
min-width: 0;
|
|
153
175
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* <PisellFields.Number value={123} viewMode="readonly" />
|
|
10
10
|
* <PisellFields.Currency value={1000} currencySymbol="$" />
|
|
11
11
|
*/
|
|
12
|
+
/// <reference types="react" />
|
|
12
13
|
declare const PisellFields: {
|
|
13
14
|
SingleLineText: import("react").NamedExoticComponent<import("../pisellSingleLineText").PisellSingleLineTextProps>;
|
|
14
15
|
LongText: import("react").NamedExoticComponent<import("../pisellLongText").PisellLongTextProps>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* <Content />
|
|
14
14
|
* </PisellLayouts.ScrollView>
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
declare const PisellLayouts: {
|
|
17
18
|
BasicGrid: <T>(props: import("../PisellBasicGrid").PisellBasicGridProps<T>) => import("react").JSX.Element;
|
|
18
19
|
ScrollView: import("react").ForwardRefExoticComponent<Omit<import("../PisellScrollView").PisellScrollViewProps, "ref"> & import("react").RefAttributes<import("../PisellScrollView").PisellScrollViewRef>>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* />
|
|
14
14
|
* <PisellMetrics.StatisticList data={[...]} />
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" />
|
|
16
17
|
declare const PisellMetrics: {
|
|
17
18
|
MetricCard: import("react").FC<import("../pisellMetricCard").PisellMetricCardProps>;
|
|
18
19
|
StatisticList: (props: import("../pisellStatisticList").PisellStatisticListProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellScrollViewProps, PisellScrollViewRef } from './types';
|
|
3
|
+
import './PisellScrollView.less';
|
|
4
|
+
declare const PisellScrollView: React.ForwardRefExoticComponent<Omit<PisellScrollViewProps, "ref"> & React.RefAttributes<PisellScrollViewRef>>;
|
|
5
|
+
export default PisellScrollView;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ScrollEventData, PisellScrollViewProps, ScrollActionsConfig } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface ActionsContainerProps {
|
|
5
|
+
scrollState: ScrollEventData;
|
|
6
|
+
overflow: PisellScrollViewProps['overflow'];
|
|
7
|
+
scrollActionsConfig: ScrollActionsConfig;
|
|
8
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
9
|
+
onClick: (direction: 'left' | 'right' | 'top' | 'bottom') => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* ActionsContainer 根据 scrollActionsConfig 渲染滚动辅助操作。
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <ActionsContainer scrollActionsConfig={{ show: true, type: 'indicator' }} />
|
|
16
|
+
*/
|
|
17
|
+
declare const ActionsContainer: ({ containerRef, scrollState, overflow, scrollActionsConfig, onClick, }: ActionsContainerProps) => React.JSX.Element | null;
|
|
18
|
+
export default ActionsContainer;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 滚动位置配置
|
|
4
|
+
*/
|
|
5
|
+
export interface ScrollPosition {
|
|
6
|
+
/** 竖向滚动位置(像素) */
|
|
7
|
+
scrollTop?: number;
|
|
8
|
+
/** 横向滚动位置(像素) */
|
|
9
|
+
scrollLeft?: number;
|
|
10
|
+
/** 滚动行为 */
|
|
11
|
+
behavior?: 'auto' | 'smooth';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 滚动到元素配置
|
|
15
|
+
*/
|
|
16
|
+
export interface ScrollToElementConfig {
|
|
17
|
+
/** 目标元素 ID */
|
|
18
|
+
targetId: string;
|
|
19
|
+
/** 对齐方式 */
|
|
20
|
+
align?: 'start' | 'center' | 'end' | 'nearest';
|
|
21
|
+
/** 滚动行为 */
|
|
22
|
+
behavior?: 'auto' | 'smooth';
|
|
23
|
+
/** 偏移量 */
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 滚动百分比配置
|
|
28
|
+
*/
|
|
29
|
+
export interface ScrollPercentage {
|
|
30
|
+
/** 竖向滚动百分比 (0-100) */
|
|
31
|
+
percentY?: number;
|
|
32
|
+
/** 横向滚动百分比 (0-100) */
|
|
33
|
+
percentX?: number;
|
|
34
|
+
/** 滚动行为 */
|
|
35
|
+
behavior?: 'auto' | 'smooth';
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 滚动按钮配置
|
|
39
|
+
*/
|
|
40
|
+
export interface ScrollActionsConfig {
|
|
41
|
+
show?: boolean;
|
|
42
|
+
/** 按钮类型 */
|
|
43
|
+
type: "backTop" | "rArrows" | "lrArrows" | "tbArrows" | "indicator" | "custom";
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
scrollDistance?: number;
|
|
46
|
+
/** 按钮配置 根据type不同,配置不同 */
|
|
47
|
+
config?: any;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 滚动事件数据
|
|
51
|
+
*/
|
|
52
|
+
export interface ScrollEventData {
|
|
53
|
+
/** 当前滚动位置 */
|
|
54
|
+
scrollTop: number;
|
|
55
|
+
scrollLeft: number;
|
|
56
|
+
/** 滚动百分比 */
|
|
57
|
+
percentY: number;
|
|
58
|
+
percentX: number;
|
|
59
|
+
/** 可滚动高度/宽度 */
|
|
60
|
+
scrollHeight: number;
|
|
61
|
+
scrollWidth: number;
|
|
62
|
+
/** 容器尺寸 */
|
|
63
|
+
clientHeight: number;
|
|
64
|
+
clientWidth: number;
|
|
65
|
+
/** 滚动方向 */
|
|
66
|
+
direction: 'up' | 'down' | 'left' | 'right' | null;
|
|
67
|
+
/** 是否滚动到顶部 */
|
|
68
|
+
isScrollToTop: boolean;
|
|
69
|
+
/** 是否滚动到底部 */
|
|
70
|
+
isScrollToBottom: boolean;
|
|
71
|
+
/** 是否滚动到左边 */
|
|
72
|
+
isScrollToLeft: boolean;
|
|
73
|
+
/** 是否滚动到右边 */
|
|
74
|
+
isScrollToRight: boolean;
|
|
75
|
+
/** 是否已经产生滚动条 */
|
|
76
|
+
isOverflows: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 视图监听配置
|
|
80
|
+
*/
|
|
81
|
+
export interface IntersectionConfig {
|
|
82
|
+
/** 是否启用视图监听 */
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
/** 交叉阈值 (0-1) */
|
|
85
|
+
threshold?: number | number[];
|
|
86
|
+
/** 根边距 */
|
|
87
|
+
rootMargin?: string;
|
|
88
|
+
/** 元素进入视图回调 */
|
|
89
|
+
onEnterViewport?: (entry: IntersectionObserverEntry, element: Element) => void;
|
|
90
|
+
/** 元素离开视图回调 */
|
|
91
|
+
onLeaveViewport?: (entry: IntersectionObserverEntry, element: Element) => void;
|
|
92
|
+
/** 可见度变化回调 */
|
|
93
|
+
onVisibilityChange?: (entry: IntersectionObserverEntry, element: Element) => void;
|
|
94
|
+
/** 需要监听的元素选择器 */
|
|
95
|
+
targetSelector?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* 吸附滚动配置
|
|
99
|
+
*/
|
|
100
|
+
export interface SnapScrollConfig {
|
|
101
|
+
/** 是否启用吸附滚动 */
|
|
102
|
+
enabled?: boolean;
|
|
103
|
+
/** 吸附类型 */
|
|
104
|
+
type?: 'mandatory' | 'proximity';
|
|
105
|
+
/** 吸附对齐方式 */
|
|
106
|
+
align?: 'start' | 'center' | 'end';
|
|
107
|
+
/** 吸附开始回调 */
|
|
108
|
+
onSnapStart?: (targetIndex: number, targetPosition: number) => void;
|
|
109
|
+
/** 吸附结束回调 */
|
|
110
|
+
onSnapEnd?: (currentIndex: number, currentPosition: number) => void;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* PisellScrollView 组件 Props
|
|
114
|
+
*/
|
|
115
|
+
export interface PisellScrollViewProps {
|
|
116
|
+
/** 子元素 */
|
|
117
|
+
children?: ReactNode;
|
|
118
|
+
/** 自定义类名 */
|
|
119
|
+
className?: string;
|
|
120
|
+
/** 自定义样式 */
|
|
121
|
+
style?: CSSProperties;
|
|
122
|
+
/** 滚动方向 */
|
|
123
|
+
overflow?: 'auto' | 'scroll' | 'hidden' | 'x' | 'y' | 'both';
|
|
124
|
+
/** 滚动条样式 */
|
|
125
|
+
scrollbarStyle?: 'default' | 'thin' | 'minimal' | 'rounded' | 'overlay' | 'custom' | 'none';
|
|
126
|
+
/** 自定义滚动条类名(当 scrollbarStyle 为 'custom' 时使用) */
|
|
127
|
+
scrollbarClassName?: string;
|
|
128
|
+
/** 是否显示滚动按钮 */
|
|
129
|
+
showScrollButtons?: boolean;
|
|
130
|
+
/** 箭头操作 */
|
|
131
|
+
scrollActionsConfig?: ScrollActionsConfig;
|
|
132
|
+
/** 滚动时触发 */
|
|
133
|
+
onScroll?: (data: ScrollEventData) => void;
|
|
134
|
+
/** 开始滚动时触发 */
|
|
135
|
+
onScrollStart?: (data: ScrollEventData) => void;
|
|
136
|
+
/** 滚动结束时触发(防抖延迟,默认 150ms) */
|
|
137
|
+
onScrollEnd?: (data: ScrollEventData) => void;
|
|
138
|
+
/** 滚动结束防抖延迟时间(ms) */
|
|
139
|
+
scrollEndDelay?: number;
|
|
140
|
+
/** 到达顶部时触发 */
|
|
141
|
+
onReachTop?: (data: ScrollEventData) => void;
|
|
142
|
+
/** 到达底部时触发 */
|
|
143
|
+
onReachBottom?: (data: ScrollEventData) => void;
|
|
144
|
+
/** 到达左边时触发 */
|
|
145
|
+
onReachLeft?: (data: ScrollEventData) => void;
|
|
146
|
+
/** 到达右边时触发 */
|
|
147
|
+
onReachRight?: (data: ScrollEventData) => void;
|
|
148
|
+
/** 边界阈值(到达边界的像素阈值) */
|
|
149
|
+
reachThreshold?: number;
|
|
150
|
+
/** IntersectionObserver 配置 */
|
|
151
|
+
intersection?: IntersectionConfig;
|
|
152
|
+
/** 吸附滚动配置 */
|
|
153
|
+
snapScroll?: SnapScrollConfig;
|
|
154
|
+
/** 容器宽度 */
|
|
155
|
+
width?: number | string;
|
|
156
|
+
/** 容器高度 */
|
|
157
|
+
height?: number | string;
|
|
158
|
+
/** 最大宽度 */
|
|
159
|
+
maxWidth?: number | string;
|
|
160
|
+
/** 最大高度 */
|
|
161
|
+
maxHeight?: number | string;
|
|
162
|
+
/** 最小宽度 */
|
|
163
|
+
minWidth?: number | string;
|
|
164
|
+
/** 最小高度 */
|
|
165
|
+
minHeight?: number | string;
|
|
166
|
+
/** Ref 引用 */
|
|
167
|
+
ref?: React.Ref<PisellScrollViewRef>;
|
|
168
|
+
/** 设计模式 */
|
|
169
|
+
__designMode?: boolean;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 组件暴露的方法
|
|
173
|
+
*/
|
|
174
|
+
export interface PisellScrollViewRef {
|
|
175
|
+
/** 滚动到指定位置 */
|
|
176
|
+
scrollTo: (position: ScrollPosition) => void;
|
|
177
|
+
/** 滚动到指定元素 */
|
|
178
|
+
scrollToElement: (config: ScrollToElementConfig) => void;
|
|
179
|
+
/** 滚动到百分比位置 */
|
|
180
|
+
scrollToPercentage: (percentage: ScrollPercentage) => void;
|
|
181
|
+
/** 滚动到顶部 */
|
|
182
|
+
scrollToTop: (behavior?: 'auto' | 'smooth') => void;
|
|
183
|
+
/** 滚动到底部 */
|
|
184
|
+
scrollToBottom: (behavior?: 'auto' | 'smooth') => void;
|
|
185
|
+
/** 滚动到最左侧 */
|
|
186
|
+
scrollToLeft: (behavior?: 'auto' | 'smooth') => void;
|
|
187
|
+
/** 滚动到最右侧 */
|
|
188
|
+
scrollToRight: (behavior?: 'auto' | 'smooth') => void;
|
|
189
|
+
/** 获取当前滚动信息 */
|
|
190
|
+
getScrollData: () => ScrollEventData;
|
|
191
|
+
/** 获取滚动容器 DOM 元素 */
|
|
192
|
+
getScrollContainer: () => HTMLElement | null;
|
|
193
|
+
/** 滚动到指定吸附点(索引) */
|
|
194
|
+
scrollToSnapPoint: (index: number, behavior?: 'auto' | 'smooth') => void;
|
|
195
|
+
/** 获取所有吸附点位置 */
|
|
196
|
+
getSnapPoints: () => number[];
|
|
197
|
+
/** 获取当前吸附点索引 */
|
|
198
|
+
getCurrentSnapIndex: () => number;
|
|
199
|
+
/** 滚动到下一个吸附点 */
|
|
200
|
+
scrollToNextSnap: (behavior?: 'auto' | 'smooth') => void;
|
|
201
|
+
/** 滚动到上一个吸附点 */
|
|
202
|
+
scrollToPrevSnap: (behavior?: 'auto' | 'smooth') => void;
|
|
203
|
+
}
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|