@pisell/private-materials 6.12.119 → 6.12.121
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/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +3 -1
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +9 -1
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +8 -4
- package/es/plus/salesSdk/utils/runAddProductFlow.js +8 -4
- package/es/pro/skuDetailModal/index.less +12 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +3 -1
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +9 -1
- package/lib/plus/salesSdk/utils/addProductWithFlowDebounced.js +8 -4
- package/lib/plus/salesSdk/utils/runAddProductFlow.js +8 -4
- package/lib/pro/skuDetailModal/index.less +12 -0
- package/package.json +3 -3
|
@@ -1033,6 +1033,10 @@ const SalesSdkCartProvider = ({ children }) => {
|
|
|
1033
1033
|
return _ref13.apply(this, arguments);
|
|
1034
1034
|
};
|
|
1035
1035
|
}());
|
|
1036
|
+
const syncCommittedBookingSelection = useMemoizedFn(_asyncToGenerator(function* () {
|
|
1037
|
+
refreshAfterMutation();
|
|
1038
|
+
yield syncSummary();
|
|
1039
|
+
}));
|
|
1036
1040
|
/** 无防抖的加车编排(规格 / 资源弹窗链)。 */
|
|
1037
1041
|
const runAddProductFlowBase = useMemoizedFn(function() {
|
|
1038
1042
|
var _ref14 = _asyncToGenerator(function* (product, options) {
|
|
@@ -1041,7 +1045,10 @@ const SalesSdkCartProvider = ({ children }) => {
|
|
|
1041
1045
|
addProduct,
|
|
1042
1046
|
confirmDetail,
|
|
1043
1047
|
confirmBookingEdit
|
|
1044
|
-
}, uiHosts, product, _objectSpread2(_objectSpread2(_objectSpread2({}, options), getAddFlowContext()), {}, {
|
|
1048
|
+
}, uiHosts, product, _objectSpread2(_objectSpread2(_objectSpread2({}, options), getAddFlowContext()), {}, {
|
|
1049
|
+
holderOptions: holderOptionsForProduct,
|
|
1050
|
+
onBookingSelectionCommitted: syncCommittedBookingSelection
|
|
1051
|
+
}));
|
|
1045
1052
|
});
|
|
1046
1053
|
return function(_x14, _x15) {
|
|
1047
1054
|
return _ref14.apply(this, arguments);
|
|
@@ -1078,6 +1085,7 @@ const SalesSdkCartProvider = ({ children }) => {
|
|
|
1078
1085
|
var _uiHostsRef$current;
|
|
1079
1086
|
return (_uiHostsRef$current = uiHostsRef.current) === null || _uiHostsRef$current === void 0 ? void 0 : _uiHostsRef$current.openBookingSelectionFlow;
|
|
1080
1087
|
},
|
|
1088
|
+
onBookingSelectionCommitted: syncCommittedBookingSelection,
|
|
1081
1089
|
confirmBookingSelection: function() {
|
|
1082
1090
|
var _ref15 = _asyncToGenerator(function* (cacheItem, opts) {
|
|
1083
1091
|
const result = yield confirmBookingEditRef.current({
|
|
@@ -252,10 +252,14 @@ function createAddProductWithFlowDebounced(deps) {
|
|
|
252
252
|
customerId: (_deps$getCustomerId2 = (_deps$getCustomerId3 = deps.getCustomerId) === null || _deps$getCustomerId3 === void 0 ? void 0 : _deps$getCustomerId3.call(deps)) !== null && _deps$getCustomerId2 !== void 0 ? _deps$getCustomerId2 : void 0,
|
|
253
253
|
date: (_deps$getBookingDate = (_deps$getBookingDate2 = deps.getBookingDate) === null || _deps$getBookingDate2 === void 0 ? void 0 : _deps$getBookingDate2.call(deps)) !== null && _deps$getBookingDate !== void 0 ? _deps$getBookingDate : null
|
|
254
254
|
});
|
|
255
|
-
if (selectionResult.status === "committed")
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
if (selectionResult.status === "committed") {
|
|
256
|
+
var _deps$onBookingSelect;
|
|
257
|
+
yield (_deps$onBookingSelect = deps.onBookingSelectionCommitted) === null || _deps$onBookingSelect === void 0 ? void 0 : _deps$onBookingSelect.call(deps);
|
|
258
|
+
return {
|
|
259
|
+
status: "added",
|
|
260
|
+
products: selectionResult.products
|
|
261
|
+
};
|
|
262
|
+
}
|
|
259
263
|
if (selectionResult.status === "confirmed") {
|
|
260
264
|
if (!deps.confirmBookingSelection) throw new Error("[SalesSdk] Selection Flow 已确认但缺少预约提交入口。");
|
|
261
265
|
return deps.confirmBookingSelection(selectionResult.cacheItem, callOptions);
|
|
@@ -40,10 +40,14 @@ function _openBookingEditAfterEnrich() {
|
|
|
40
40
|
initialHolderIds: flowOptions.initialHolderIds
|
|
41
41
|
}));
|
|
42
42
|
if (selectionResult.status === "cancelled") return { status: "cancelled" };
|
|
43
|
-
if (selectionResult.status === "committed")
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
if (selectionResult.status === "committed") {
|
|
44
|
+
var _flowOptions$onBookin;
|
|
45
|
+
yield (_flowOptions$onBookin = flowOptions.onBookingSelectionCommitted) === null || _flowOptions$onBookin === void 0 ? void 0 : _flowOptions$onBookin.call(flowOptions);
|
|
46
|
+
return {
|
|
47
|
+
status: "added",
|
|
48
|
+
products: selectionResult.products
|
|
49
|
+
};
|
|
50
|
+
}
|
|
47
51
|
if (selectionResult.status === "confirmed") {
|
|
48
52
|
const { products } = yield cart.confirmBookingEdit({
|
|
49
53
|
cacheItem: selectionResult.cacheItem,
|
|
@@ -757,6 +757,8 @@
|
|
|
757
757
|
|
|
758
758
|
.pisell-procedure--modal .pisell-procedure-sidebar {
|
|
759
759
|
width: 100% !important;
|
|
760
|
+
min-width: 0 !important;
|
|
761
|
+
max-width: 100% !important;
|
|
760
762
|
height: unset !important;
|
|
761
763
|
}
|
|
762
764
|
|
|
@@ -890,6 +892,16 @@
|
|
|
890
892
|
}
|
|
891
893
|
}
|
|
892
894
|
|
|
895
|
+
// PisellProcedure 的小屏 Modal 规则在 low-code 产物中带有 #body 前缀,
|
|
896
|
+
// 会把竖排 Drawer 的 sidebar 重新限制为 290px;使用同一作用域覆盖固定宽度。
|
|
897
|
+
#body .pisell-sku-detail-drawer {
|
|
898
|
+
.pisell-procedure--modal .pisell-procedure-sidebar {
|
|
899
|
+
width: 100% !important;
|
|
900
|
+
min-width: 0 !important;
|
|
901
|
+
max-width: 100% !important;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
893
905
|
// 价格调整覆盖层样式 - 现在通过 Portal 渲染到 document.body
|
|
894
906
|
.pisell-price-adjust-overlay {
|
|
895
907
|
position: fixed;
|
|
@@ -1036,6 +1036,10 @@ const SalesSdkCartProvider = ({ children }) => {
|
|
|
1036
1036
|
return _ref13.apply(this, arguments);
|
|
1037
1037
|
};
|
|
1038
1038
|
}());
|
|
1039
|
+
const syncCommittedBookingSelection = (0, ahooks.useMemoizedFn)(require_asyncToGenerator._asyncToGenerator(function* () {
|
|
1040
|
+
refreshAfterMutation();
|
|
1041
|
+
yield syncSummary();
|
|
1042
|
+
}));
|
|
1039
1043
|
/** 无防抖的加车编排(规格 / 资源弹窗链)。 */
|
|
1040
1044
|
const runAddProductFlowBase = (0, ahooks.useMemoizedFn)(function() {
|
|
1041
1045
|
var _ref14 = require_asyncToGenerator._asyncToGenerator(function* (product, options) {
|
|
@@ -1044,7 +1048,10 @@ const SalesSdkCartProvider = ({ children }) => {
|
|
|
1044
1048
|
addProduct,
|
|
1045
1049
|
confirmDetail,
|
|
1046
1050
|
confirmBookingEdit
|
|
1047
|
-
}, uiHosts, product, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, options), getAddFlowContext()), {}, {
|
|
1051
|
+
}, uiHosts, product, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, options), getAddFlowContext()), {}, {
|
|
1052
|
+
holderOptions: holderOptionsForProduct,
|
|
1053
|
+
onBookingSelectionCommitted: syncCommittedBookingSelection
|
|
1054
|
+
}));
|
|
1048
1055
|
});
|
|
1049
1056
|
return function(_x14, _x15) {
|
|
1050
1057
|
return _ref14.apply(this, arguments);
|
|
@@ -1081,6 +1088,7 @@ const SalesSdkCartProvider = ({ children }) => {
|
|
|
1081
1088
|
var _uiHostsRef$current;
|
|
1082
1089
|
return (_uiHostsRef$current = uiHostsRef.current) === null || _uiHostsRef$current === void 0 ? void 0 : _uiHostsRef$current.openBookingSelectionFlow;
|
|
1083
1090
|
},
|
|
1091
|
+
onBookingSelectionCommitted: syncCommittedBookingSelection,
|
|
1084
1092
|
confirmBookingSelection: function() {
|
|
1085
1093
|
var _ref15 = require_asyncToGenerator._asyncToGenerator(function* (cacheItem, opts) {
|
|
1086
1094
|
const result = yield confirmBookingEditRef.current({
|
|
@@ -252,10 +252,14 @@ function createAddProductWithFlowDebounced(deps) {
|
|
|
252
252
|
customerId: (_deps$getCustomerId2 = (_deps$getCustomerId3 = deps.getCustomerId) === null || _deps$getCustomerId3 === void 0 ? void 0 : _deps$getCustomerId3.call(deps)) !== null && _deps$getCustomerId2 !== void 0 ? _deps$getCustomerId2 : void 0,
|
|
253
253
|
date: (_deps$getBookingDate = (_deps$getBookingDate2 = deps.getBookingDate) === null || _deps$getBookingDate2 === void 0 ? void 0 : _deps$getBookingDate2.call(deps)) !== null && _deps$getBookingDate !== void 0 ? _deps$getBookingDate : null
|
|
254
254
|
});
|
|
255
|
-
if (selectionResult.status === "committed")
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
if (selectionResult.status === "committed") {
|
|
256
|
+
var _deps$onBookingSelect;
|
|
257
|
+
yield (_deps$onBookingSelect = deps.onBookingSelectionCommitted) === null || _deps$onBookingSelect === void 0 ? void 0 : _deps$onBookingSelect.call(deps);
|
|
258
|
+
return {
|
|
259
|
+
status: "added",
|
|
260
|
+
products: selectionResult.products
|
|
261
|
+
};
|
|
262
|
+
}
|
|
259
263
|
if (selectionResult.status === "confirmed") {
|
|
260
264
|
if (!deps.confirmBookingSelection) throw new Error("[SalesSdk] Selection Flow 已确认但缺少预约提交入口。");
|
|
261
265
|
return deps.confirmBookingSelection(selectionResult.cacheItem, callOptions);
|
|
@@ -40,10 +40,14 @@ function _openBookingEditAfterEnrich() {
|
|
|
40
40
|
initialHolderIds: flowOptions.initialHolderIds
|
|
41
41
|
}));
|
|
42
42
|
if (selectionResult.status === "cancelled") return { status: "cancelled" };
|
|
43
|
-
if (selectionResult.status === "committed")
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
if (selectionResult.status === "committed") {
|
|
44
|
+
var _flowOptions$onBookin;
|
|
45
|
+
yield (_flowOptions$onBookin = flowOptions.onBookingSelectionCommitted) === null || _flowOptions$onBookin === void 0 ? void 0 : _flowOptions$onBookin.call(flowOptions);
|
|
46
|
+
return {
|
|
47
|
+
status: "added",
|
|
48
|
+
products: selectionResult.products
|
|
49
|
+
};
|
|
50
|
+
}
|
|
47
51
|
if (selectionResult.status === "confirmed") {
|
|
48
52
|
const { products } = yield cart.confirmBookingEdit({
|
|
49
53
|
cacheItem: selectionResult.cacheItem,
|
|
@@ -757,6 +757,8 @@
|
|
|
757
757
|
|
|
758
758
|
.pisell-procedure--modal .pisell-procedure-sidebar {
|
|
759
759
|
width: 100% !important;
|
|
760
|
+
min-width: 0 !important;
|
|
761
|
+
max-width: 100% !important;
|
|
760
762
|
height: unset !important;
|
|
761
763
|
}
|
|
762
764
|
|
|
@@ -890,6 +892,16 @@
|
|
|
890
892
|
}
|
|
891
893
|
}
|
|
892
894
|
|
|
895
|
+
// PisellProcedure 的小屏 Modal 规则在 low-code 产物中带有 #body 前缀,
|
|
896
|
+
// 会把竖排 Drawer 的 sidebar 重新限制为 290px;使用同一作用域覆盖固定宽度。
|
|
897
|
+
#body .pisell-sku-detail-drawer {
|
|
898
|
+
.pisell-procedure--modal .pisell-procedure-sidebar {
|
|
899
|
+
width: 100% !important;
|
|
900
|
+
min-width: 0 !important;
|
|
901
|
+
max-width: 100% !important;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
893
905
|
// 价格调整覆盖层样式 - 现在通过 Portal 渲染到 document.body
|
|
894
906
|
.pisell-price-adjust-overlay {
|
|
895
907
|
position: fixed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.121",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/utils": "3.0.4",
|
|
73
73
|
"@pisell/icon": "0.0.11",
|
|
74
|
-
"@pisell/
|
|
75
|
-
"@pisell/
|
|
74
|
+
"@pisell/materials": "6.12.30",
|
|
75
|
+
"@pisell/date-picker": "3.0.10"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": "^18.0.0",
|