@pisell/materials 6.12.52 → 6.12.53
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 +3 -3
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +48 -48
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +48 -48
- 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/PisellSelectionFlow/PisellSelectionFlow.js +7 -1
- package/es/components/PisellSelectionFlow/hooks/useFlowNavigation.js +104 -3
- package/es/components/PisellSelectionFlow/index.d.ts +1 -1
- package/es/components/PisellSelectionFlow/types.d.ts +20 -1
- package/es/components/appVersionControl/types.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/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/types.d.ts +1 -0
- package/es/components/filter/components/FilterButton/types.d.ts +1 -0
- package/es/components/input/index.d.ts +1 -0
- package/es/components/pisell-config-provider/context.d.ts +1 -0
- package/es/components/pisellDatePicker/index.d.ts +1 -0
- package/es/components/pisellGridPro/ToolBar/type.d.ts +1 -0
- package/es/components/pisellMenu/types.d.ts +1 -0
- package/es/components/pisellQuickFilter/type.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +1 -1
- package/es/components/productCard/cartSkuCard/index.js +3 -33
- package/es/components/productCard/cartSkuCard/index.less +0 -19
- package/es/components/productCard/lineItem/index.js +11 -42
- package/es/components/productCard/types.d.ts +1 -4
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/section-footers/index.d.ts +1 -0
- package/es/components/skeleton/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/Amount/types.d.ts +1 -0
- package/es/index.d.ts +2 -3
- 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/PisellSelectionFlow/PisellSelectionFlow.js +7 -1
- package/lib/components/PisellSelectionFlow/hooks/useFlowNavigation.js +104 -3
- package/lib/components/PisellSelectionFlow/index.d.ts +1 -1
- package/lib/components/PisellSelectionFlow/types.d.ts +20 -1
- package/lib/components/appVersionControl/types.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/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/types.d.ts +1 -0
- package/lib/components/filter/components/FilterButton/types.d.ts +1 -0
- package/lib/components/input/index.d.ts +1 -0
- package/lib/components/pisell-config-provider/context.d.ts +1 -0
- package/lib/components/pisellDatePicker/index.d.ts +1 -0
- package/lib/components/pisellGridPro/ToolBar/type.d.ts +1 -0
- package/lib/components/pisellMenu/types.d.ts +1 -0
- package/lib/components/pisellQuickFilter/type.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +1 -1
- package/lib/components/productCard/cartSkuCard/index.js +3 -33
- package/lib/components/productCard/cartSkuCard/index.less +0 -19
- package/lib/components/productCard/lineItem/index.js +11 -42
- package/lib/components/productCard/types.d.ts +1 -4
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/section-footers/index.d.ts +1 -0
- package/lib/components/skeleton/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/Amount/types.d.ts +1 -0
- package/lib/index.d.ts +2 -3
- package/package.json +3 -3
- package/es/components/productCard/cartSkuCard/types.d.ts +0 -56
- package/es/components/productCard/cartSkuCard/variants/A12/index.js +0 -126
- package/es/components/productCard/cartSkuCard/variants/A12/index.less +0 -279
- package/lib/components/productCard/cartSkuCard/types.d.ts +0 -56
- package/lib/components/productCard/cartSkuCard/variants/A12/index.js +0 -129
- package/lib/components/productCard/cartSkuCard/variants/A12/index.less +0 -279
|
@@ -34,7 +34,6 @@ const _excluded = [
|
|
|
34
34
|
"holderOptions",
|
|
35
35
|
"onBookingStatusChange",
|
|
36
36
|
"onAddTimeProductCard",
|
|
37
|
-
"a12UnsupportedFallback",
|
|
38
37
|
"onAction",
|
|
39
38
|
"onDelete",
|
|
40
39
|
"onNote",
|
|
@@ -46,7 +45,6 @@ const isBookingItem = (dataSource) => {
|
|
|
46
45
|
var _dataSource$_extend;
|
|
47
46
|
return Boolean((dataSource === null || dataSource === void 0 || (_dataSource$_extend = dataSource._extend) === null || _dataSource$_extend === void 0 ? void 0 : _dataSource$_extend.product) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.booking_id) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.appointment_status) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.start_date));
|
|
48
47
|
};
|
|
49
|
-
const resolveLineItemType = ({ requestedType, itemKind, hasBundle, fallback = "a9" }) => requestedType === "a12" && (itemKind === "booking" || hasBundle) ? fallback : requestedType;
|
|
50
48
|
const translateText = (text, translationOriginal) => {
|
|
51
49
|
if (typeof text === "string") return text;
|
|
52
50
|
if (!text) return "";
|
|
@@ -125,36 +123,14 @@ const mapLineItemOptions = (options, translationOriginal) => options.map((option
|
|
|
125
123
|
num: (_ref2 = (_option$num2 = option.num) !== null && _option$num2 !== void 0 ? _option$num2 : option.quantity) !== null && _ref2 !== void 0 ? _ref2 : 1
|
|
126
124
|
});
|
|
127
125
|
});
|
|
128
|
-
const getFirstDisplayText = (candidates, translationOriginal) => {
|
|
129
|
-
for (const candidate of candidates) {
|
|
130
|
-
const translated = translateText(candidate, translationOriginal).trim();
|
|
131
|
-
if (translated) return translated;
|
|
132
|
-
}
|
|
133
|
-
return "";
|
|
134
|
-
};
|
|
135
|
-
const resolveA12Eyebrow = (product, translationOriginal) => {
|
|
136
|
-
var _product$a, _product$metadata2, _product$metadata3, _categories$find, _categories$;
|
|
137
|
-
const categories = Array.isArray(product === null || product === void 0 ? void 0 : product.categories) ? product.categories : Array.isArray(product === null || product === void 0 ? void 0 : product.product_categories) ? product.product_categories : [];
|
|
138
|
-
return getFirstDisplayText([
|
|
139
|
-
product === null || product === void 0 || (_product$a = product.a12) === null || _product$a === void 0 ? void 0 : _product$a.eyebrow,
|
|
140
|
-
product === null || product === void 0 ? void 0 : product.category_name,
|
|
141
|
-
product === null || product === void 0 ? void 0 : product.product_category_name,
|
|
142
|
-
product === null || product === void 0 ? void 0 : product.product_type_name,
|
|
143
|
-
product === null || product === void 0 || (_product$metadata2 = product.metadata) === null || _product$metadata2 === void 0 ? void 0 : _product$metadata2.category_name,
|
|
144
|
-
product === null || product === void 0 || (_product$metadata3 = product.metadata) === null || _product$metadata3 === void 0 ? void 0 : _product$metadata3.product_category_name,
|
|
145
|
-
(_categories$find = categories.find((category) => category === null || category === void 0 ? void 0 : category.direct)) === null || _categories$find === void 0 ? void 0 : _categories$find.name,
|
|
146
|
-
(_categories$ = categories[0]) === null || _categories$ === void 0 ? void 0 : _categories$.name
|
|
147
|
-
], translationOriginal);
|
|
148
|
-
};
|
|
149
126
|
const convertProductToLineItemProduct = (product, translationOriginal, symbol) => {
|
|
150
|
-
var _product$
|
|
127
|
+
var _product$metadata2, _ref3, _product$num, _ref4, _product$num2, _product$metadata3, _product$metadata4, _product$discount_lis, _product$discount_lis2, _product$metadata5, _product$metadata6, _ref5, _product$num3;
|
|
151
128
|
const title = translateText(product.product_title || product.title, translationOriginal);
|
|
152
129
|
const bundle = (product.product_bundle || []).map((bundleItem) => convertBundle(bundleItem, translationOriginal));
|
|
153
130
|
const lineOriginTotal = resolveLineOriginTotal(product);
|
|
154
131
|
const lineOptions = mapLineItemOptions(resolveLineItemOptions(product), translationOriginal);
|
|
155
|
-
const a12Eyebrow = resolveA12Eyebrow(product, translationOriginal);
|
|
156
132
|
return {
|
|
157
|
-
_id: ((_product$
|
|
133
|
+
_id: ((_product$metadata2 = product.metadata) === null || _product$metadata2 === void 0 ? void 0 : _product$metadata2.unique_identification_number) || product.order_detail_id || product.product_id,
|
|
158
134
|
id: product.product_id,
|
|
159
135
|
product_id: product.product_id,
|
|
160
136
|
product_variant_id: product.product_variant_id,
|
|
@@ -165,11 +141,11 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol) =
|
|
|
165
141
|
image: product.cover,
|
|
166
142
|
num: (_ref3 = (_product$num = product.num) !== null && _product$num !== void 0 ? _product$num : product.product_quantity) !== null && _ref3 !== void 0 ? _ref3 : 1,
|
|
167
143
|
quantity: (_ref4 = (_product$num2 = product.num) !== null && _product$num2 !== void 0 ? _product$num2 : product.product_quantity) !== null && _ref4 !== void 0 ? _ref4 : 1,
|
|
168
|
-
price: (_product$
|
|
144
|
+
price: (_product$metadata3 = product.metadata) === null || _product$metadata3 === void 0 ? void 0 : _product$metadata3.source_product_price,
|
|
169
145
|
total: product.selling_price,
|
|
170
146
|
origin_total: lineOriginTotal,
|
|
171
147
|
original_total: lineOriginTotal,
|
|
172
|
-
source_product_price: (_product$
|
|
148
|
+
source_product_price: (_product$metadata4 = product.metadata) === null || _product$metadata4 === void 0 ? void 0 : _product$metadata4.source_product_price,
|
|
173
149
|
selling_price: product.selling_price,
|
|
174
150
|
payment_price: product.payment_price,
|
|
175
151
|
tax_fee: product.tax_fee,
|
|
@@ -178,13 +154,12 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol) =
|
|
|
178
154
|
product_sku: product.product_sku,
|
|
179
155
|
product_bundle: bundle,
|
|
180
156
|
bundle,
|
|
181
|
-
product_option_string:
|
|
157
|
+
product_option_string: product.product_option_string,
|
|
182
158
|
options: lineOptions,
|
|
183
|
-
a12: _objectSpread2(_objectSpread2({}, product.a12 || {}), a12Eyebrow ? { eyebrow: a12Eyebrow } : {}),
|
|
184
159
|
discount_list: product.discount_list,
|
|
185
160
|
promotions: product.promotions,
|
|
186
|
-
discount_reason: (_product$discount_lis = (_product$discount_lis2 = product.discount_list) === null || _product$discount_lis2 === void 0 || (_product$discount_lis2 = _product$discount_lis2.find((d) => (d === null || d === void 0 ? void 0 : d.type) === "product")) === null || _product$discount_lis2 === void 0 || (_product$discount_lis2 = _product$discount_lis2.discount) === null || _product$discount_lis2 === void 0 ? void 0 : _product$discount_lis2.message) !== null && _product$discount_lis !== void 0 ? _product$discount_lis : (_product$
|
|
187
|
-
isGift: Boolean(product.gift_card || product.isGift || product._isGiftPromotion || ((_product$
|
|
161
|
+
discount_reason: (_product$discount_lis = (_product$discount_lis2 = product.discount_list) === null || _product$discount_lis2 === void 0 || (_product$discount_lis2 = _product$discount_lis2.find((d) => (d === null || d === void 0 ? void 0 : d.type) === "product")) === null || _product$discount_lis2 === void 0 || (_product$discount_lis2 = _product$discount_lis2.discount) === null || _product$discount_lis2 === void 0 ? void 0 : _product$discount_lis2.message) !== null && _product$discount_lis !== void 0 ? _product$discount_lis : (_product$metadata5 = product.metadata) === null || _product$metadata5 === void 0 ? void 0 : _product$metadata5.product_discount_reason,
|
|
162
|
+
isGift: Boolean(product.gift_card || product.isGift || product._isGiftPromotion || ((_product$metadata6 = product.metadata) === null || _product$metadata6 === void 0 ? void 0 : _product$metadata6._giftInfo) || product._giftInfo),
|
|
188
163
|
giftData: product.giftData,
|
|
189
164
|
_origin: product,
|
|
190
165
|
_extend: {
|
|
@@ -204,7 +179,7 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol) =
|
|
|
204
179
|
};
|
|
205
180
|
const LineItem = (props) => {
|
|
206
181
|
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _dataSource$_extend2, _dataSource$_extend4;
|
|
207
|
-
const { dataSource = defaultValue.dataSource, itemType, type = "a9", isShowBookingHeader, rightActions = [], rightActionsDisplay = "swipe", escapeDom, isShowImage = defaultValue.isShowImage, isShowDelete = defaultValue.isShowDelete, isShowInlineDelete = isShowDelete, isShowNote = defaultValue.isShowNote, isShowAmountFooter = defaultValue.isShowAmountFooter, disabledClick = defaultValue.disabledClick, disabledEdit = defaultValue.disabledEdit, disabledNoteEdit = disabledEdit, statusOptions = [], statusLoading = false, statusDisabled = false, isShowRelatedProduct = true, holderOptions, onBookingStatusChange, onAddTimeProductCard,
|
|
182
|
+
const { dataSource = defaultValue.dataSource, itemType, type = "a9", isShowBookingHeader, rightActions = [], rightActionsDisplay = "swipe", escapeDom, isShowImage = defaultValue.isShowImage, isShowDelete = defaultValue.isShowDelete, isShowInlineDelete = isShowDelete, isShowNote = defaultValue.isShowNote, isShowAmountFooter = defaultValue.isShowAmountFooter, disabledClick = defaultValue.disabledClick, disabledEdit = defaultValue.disabledEdit, disabledNoteEdit = disabledEdit, statusOptions = [], statusLoading = false, statusDisabled = false, isShowRelatedProduct = true, holderOptions, onBookingStatusChange, onAddTimeProductCard, onAction, onDelete, onNote, onCard, onPromotion, onGift } = props, other = _objectWithoutProperties(props, _excluded);
|
|
208
183
|
const itemKind = itemType || (isBookingItem(dataSource) ? "booking" : "product");
|
|
209
184
|
const context = useEngineContext();
|
|
210
185
|
const translationOriginal = useTranslationOriginal();
|
|
@@ -235,15 +210,9 @@ const LineItem = (props) => {
|
|
|
235
210
|
symbol,
|
|
236
211
|
translationOriginal
|
|
237
212
|
]);
|
|
238
|
-
const resolvedType = resolveLineItemType({
|
|
239
|
-
requestedType: type,
|
|
240
|
-
itemKind,
|
|
241
|
-
hasBundle: Boolean(Array.isArray(dataSource === null || dataSource === void 0 ? void 0 : dataSource.product_bundle) && dataSource.product_bundle.length || Array.isArray(dataSource === null || dataSource === void 0 ? void 0 : dataSource.bundle) && dataSource.bundle.length),
|
|
242
|
-
fallback: a12UnsupportedFallback
|
|
243
|
-
});
|
|
244
213
|
if (itemKind === "product") return /* @__PURE__ */ React.createElement(CartSkuCard, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
245
214
|
dataSource: productDataSource,
|
|
246
|
-
type
|
|
215
|
+
type,
|
|
247
216
|
rightActions,
|
|
248
217
|
rightActionsDisplay,
|
|
249
218
|
escapeDom,
|
|
@@ -264,8 +233,8 @@ const LineItem = (props) => {
|
|
|
264
233
|
}));
|
|
265
234
|
return /* @__PURE__ */ React.createElement(BookingLineItem, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
266
235
|
dataSource,
|
|
267
|
-
type
|
|
268
|
-
cartSkuType:
|
|
236
|
+
type,
|
|
237
|
+
cartSkuType: type,
|
|
269
238
|
isShowBookingHeader,
|
|
270
239
|
relatedProductDataSource,
|
|
271
240
|
addTimeProductDataSources,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { CartSkuCardA12Display } from "./cartSkuCard/types.js";
|
|
2
|
-
|
|
3
1
|
//#region src/components/productCard/types.d.ts
|
|
4
2
|
type bundleType = {
|
|
5
3
|
id: number;
|
|
@@ -61,8 +59,7 @@ type productType = {
|
|
|
61
59
|
is_show_week?: boolean;
|
|
62
60
|
promotions?: any[];
|
|
63
61
|
isGift?: boolean;
|
|
64
|
-
giftData?: any;
|
|
65
|
-
a12?: CartSkuCardA12Display;
|
|
62
|
+
giftData?: any;
|
|
66
63
|
};
|
|
67
64
|
/**
|
|
68
65
|
* 排序总配置
|
package/es/index.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ import { Provider as Provider$4 } from "./components/PisellCards/components/Text
|
|
|
79
79
|
import { PisellStepItem, PisellStepsProps } from "./components/PisellSteps/types.js";
|
|
80
80
|
import { PisellProcedureProps, PisellProcedureRef, ProcedureBodyProps, ProcedureFooterProps, ProcedureHeaderProps as ProcedureHeaderProps$1 } from "./components/PisellProcedure/types.js";
|
|
81
81
|
import { PisellProcedure } from "./components/PisellProcedure/PisellProcedure.js";
|
|
82
|
-
import { CompiledSelectionFlowModuleConfig, CompiledSelectionFlowStep, FlowModuleBeforeLeaveResult, FlowModuleBeforeLeaveReturn, FlowModuleDataMap, FlowModuleHandle, FlowModuleState, FlowModuleStateMap, FlowModuleStatus, FlowModuleValidationResult, FlowModuleValidationReturn, PisellSelectionFlowController, PisellSelectionFlowProps, SelectionFlowCompileError, SelectionFlowCompileIssue, SelectionFlowCompileIssueCode, SelectionFlowContextValue, SelectionFlowDraftAdapter, SelectionFlowDraftChange, SelectionFlowDraftUpdateMeta, SelectionFlowMessageCode, SelectionFlowMetadata, SelectionFlowModuleAdapter, SelectionFlowModuleConfig, SelectionFlowModuleInput, SelectionFlowModuleRegistry, SelectionFlowRef, SelectionFlowRuntimeIssue, SelectionFlowSnapshot, SelectionFlowStepConfig, SelectionFlowValidationFeedback } from "./components/PisellSelectionFlow/types.js";
|
|
82
|
+
import { CompiledSelectionFlowModuleConfig, CompiledSelectionFlowStep, FlowModuleBeforeLeaveResult, FlowModuleBeforeLeaveReturn, FlowModuleDataMap, FlowModuleHandle, FlowModuleState, FlowModuleStateMap, FlowModuleStatus, FlowModuleValidationResult, FlowModuleValidationReturn, PisellSelectionFlowController, PisellSelectionFlowProps, SelectionFlowCompileError, SelectionFlowCompileIssue, SelectionFlowCompileIssueCode, SelectionFlowContextValue, SelectionFlowDraftAdapter, SelectionFlowDraftChange, SelectionFlowDraftUpdateMeta, SelectionFlowMessageCode, SelectionFlowMetadata, SelectionFlowModuleAdapter, SelectionFlowModuleConfig, SelectionFlowModuleInput, SelectionFlowModuleRegistry, SelectionFlowPrepareStepsOptions, SelectionFlowPrepareStepsResult, SelectionFlowRef, SelectionFlowRuntimeIssue, SelectionFlowSnapshot, SelectionFlowStepConfig, SelectionFlowValidationFeedback } from "./components/PisellSelectionFlow/types.js";
|
|
83
83
|
import { _default as _default$15 } from "./components/PisellSelectionFlow/PisellSelectionFlow.js";
|
|
84
84
|
import { useSelectionFlowContext, useTypedSelectionFlowContext } from "./components/PisellSelectionFlow/context.js";
|
|
85
85
|
import { compileSelectionFlow, compileSelectionFlowSteps, hasSelectionDraftFieldValue, isSelectionModuleType, resolveFlowModuleAdapter } from "./components/PisellSelectionFlow/compiler.js";
|
|
@@ -253,7 +253,6 @@ import { PisellSort } from "./components/pisellSort/index.js";
|
|
|
253
253
|
import { useToast } from "./components/pisellToast/squareToast/index.js";
|
|
254
254
|
import { PisellToast } from "./components/pisellToast/index.js";
|
|
255
255
|
import { PisellTooltip } from "./components/pisellTooltip/index.js";
|
|
256
|
-
import { CartSkuCardA12Display, CartSkuCardA12Presentation, CartSkuCardA12Slots, CartSkuCardVariant } from "./components/productCard/cartSkuCard/types.js";
|
|
257
256
|
import { ProductCard } from "./components/productCard/index.js";
|
|
258
257
|
import { ProfileMenu } from "./components/profileMenu/index.js";
|
|
259
258
|
import { QRCode } from "./components/qrcode/index.js";
|
|
@@ -279,4 +278,4 @@ import { Number } from "./components/virtual-keyboard/Number/index.js";
|
|
|
279
278
|
import { VirtualInput } from "./components/virtualInput/index.js";
|
|
280
279
|
import { WalletCard } from "./components/walletCard/index.js";
|
|
281
280
|
import { Affix, Alert, Anchor, Avatar, Breadcrumb, Card, Carousel, Col, ColorPicker, Descriptions, Divider, Empty, Grid, InputNumber as InputNumber$1, Mentions, Menu, Pagination, Popconfirm, Popover, Progress, Rate, Result, Row, Space, Spin, Statistic, Steps, Switch as Switch$1, Tag, Timeline, Tooltip, Transfer, Tree, message, notification, version } from "antd";
|
|
282
|
-
export { type AdaptColumnsForPhoneLayoutOptions, Affix, Alert, Anchor, AppVersionControl, AutoComplete, AutoCompleteNumber, AutoResizeText, Avatar, Badge, type BadgeConfig, Translation as BaseTranslation, type BatchActionBarPosition, type BatchActionConfirmConfig, type BatchActionItem, BatchEditor, Breadcrumb, Button, _default as ButtonGroupEdit, _default$1 as ButtonGroupPreview, Calendar, type CalendarPersistContextValue, type CalendarPersistKind, CalendarPersistProvider, Card, CardMetricItem, type PisellStatisticProps as CardMetricItemProps, _default$2 as CardPro, Carousel, type CartSkuCardA12Display, type CartSkuCardA12Presentation, type CartSkuCardA12Slots, type CartSkuCardVariant, Cascader, Checkbox, ClassicLayout, Col, Collapse, ColorPicker, type CompiledSelectionFlowModuleConfig, type CompiledSelectionFlowStep, Component, type CompoundedComponent, ConfigProvider, type CountryCode, type CreateShopFloorPlanClientOptions, CropPhoto, type CursorMode, CustomSelect, DEFAULT_CALENDAR_SLOT_STEP_MINUTES, DEFAULT_RESOURCE_WALL_FILTER_FIELD_KEY, DEFAULT_RESOURCE_WALL_LAYOUT_PERSIST, type DataSourceContainerProps, _default$3 as DataSourceForm, DataSourceImage, DataSourceMenu, DataSourceQRCode, DataSourceSubForm, type DataSourceSubFormProps, _default$4 as DataSourceTable, DataSourceTypography, DataSourceWrapper, DatePicker, type DefaultActionsConfig, Descriptions, _default$5 as Div, Divider, DragSortTree, Drawer, Dropdown, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, Empty, type EnsureShopFloorPlanByCodeOptions, FIND_FALLBACK_SCANNER_COUNT_KEY, FLOOR_MAP_BUILTIN_SHAPES, FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND, FLOOR_MAP_IMAGE_ELEMENT_KIND, FLOOR_MAP_SELECTION_ZONE_ELEMENT_KIND, FLOOR_MAP_STAGE_ELEMENT_KIND, Filter, type FloorMapBindingPlaceholderReason, FloorMapBuiltinShapeElement, type FloorMapCanvasNameI18n, type FloorMapDataSourceRow, type FloorMapDataSources, type FloorMapEdge, type FloorMapEdgeAnchor, type FloorMapEdgeStatus, type FloorMapElementKindCategory, type FloorMapElementKindConfig, type FloorMapFullscreenMode, FloorMapImageElement, type FloorMapItemBase, type FloorMapLayoutContextValue, FloorMapLayoutProvider, type FloorMapLayoutProviderProps, type FloorMapMergedItem, type FloorMapRenderOptions, type FloorMapResourcePickerRecord, type FloorMapResourcePickerSlotProps, type FloorMapSceneElement, FloorMapSelectionZoneElement, type FloorMapViewConfig, type FloorMapViewportOverlayRenderArgs, type FlowModuleBeforeLeaveResult, type FlowModuleBeforeLeaveReturn, type FlowModuleDataMap, type FlowModuleHandle, type FlowModuleState, type FlowModuleStateMap, type FlowModuleStatus, type FlowModuleValidationResult, type FlowModuleValidationReturn, _default$6 as Form, FormGroup, Checkbox$1 as FormItemCheckbox, ColorPicker$1 as FormItemColorPicker, DatePicker$1 as FormItemDatePicker, IconSelect as FormItemIconSelect, Input as FormItemInput, InputNumber as FormItemInputNumber, Radio as FormItemRadio, RecordListWrapperWithDataSource as FormItemRecordListWrapper, SelectWithDataSource as FormItemSelect, Switch as FormItemSwitch, FormItemTabs, TimePicker as FormItemTimePicker, Translation$1 as FormItemTranslation, Upload as FormItemUpload, Provider as GraphicTextCard, type GraphicTextCardProps, type GraphicTextCardSize, type GraphicTextCardVariant, Grid, type GridProProps, type GridViewProps, type GroupBlocks, type GroupModel, type GroupViewVariant, PREFIX_CLS as HIERARCHICAL_SUMMARY_LIST_PREFIX_CLS, _default$7 as Icon, IconSelect$1 as IconSelect, IconFont as Iconfont, Image, type ImageDataSource, type ImageFillMode, Input$1 as Input, InputNumber$1 as InputNumber, InputNumberRange, type ItemContext, type ItemLayout, JsonWrapperProvider as JsonWrapper, _default$8 as Keyboard, type LevelType, List, type LookupInputRenderContext, LowCodePage, type MailtoOptions, Mentions, Menu, Modal, Provider$1 as MultilevelCard, type MultilevelCardProps, type MultipleSelectRef, NAME_AS_TITLE_EXT_KEY, OrganizationTenantSwitcher, Page, PageHeader, Pagination, PisellAdjustPrice, PisellAdjustPriceInputNumber, PisellAlert, PisellAnchor, PisellAppCard, type PisellAppCardProps, PisellAvatar, type PisellBasicCardProps, MemoizedPisellBasicGrid as PisellBasicGrid, type PisellBasicGridProps, PisellBatchActionBar, type PisellBatchActionBarProps, PisellCard, _default$9 as PisellCardList, type PisellCardPickerCardMeta, type PisellCardPickerCategoryConfig, type PisellCardPickerCategoryLevelConfig, type PisellCardPickerCategoryMode, type PisellCardPickerCategoryPath, type PisellCardPickerItem, type PisellCardPickerMode, PisellCards, PisellCheckboxGroup, PisellConfigProvider, PisellContainer, PisellContent, PisellContext, PisellCountdown, MemoizedPisellCurrency as PisellCurrency, type PisellCurrencyProps, PisellCustomCheckboxGroup, PisellDataSourceContainer, PisellDatePicker, _default$10 as PisellDateTimeDisplay, type PisellDateTimeDisplayProps, Demo as PisellDraggable, PisellDropSort, PisellDropdown, _default$11 as PisellEmail, type PisellEmailProps, PisellEmpty, PisellFields, PisellFilter, type PisellFilterProps, PisellFind, type PisellFindProps, type PisellFindRef, PisellFloatingPanel, PisellFloorMapLayout, type PisellFloorMapLayoutProps, type PisellFloorMapLayoutRef, PisellFooter, index as PisellGoodPassCard, PisellGridPro, GridView as PisellGridView, MemoizedPisellGroupView as PisellGroupView, type PisellGroupViewProps, PisellHeader, PisellHeaderProgressBar, PisellHierarchicalSummaryList, type PisellHierarchicalSummaryListAggregateConfig, type PisellHierarchicalSummaryListAggregateMode, type PisellHierarchicalSummaryListItem, type PisellHierarchicalSummaryListKey, type PisellHierarchicalSummaryListLevelConfig, type PisellHierarchicalSummaryListProps, Provider$2 as PisellImageCard, type PisellImageCardProps, PisellImageCarousels, PisellInformationEntry, PisellInput, PisellLayout, type PisellLayoutProps, PisellLayouts, PisellList01, PisellLoading, _default$12 as PisellLongText, type PisellLongTextProps, PisellLookup, type PisellLookupProps, type PisellLookupRef, PisellMenu, type PisellMenuProps, PisellMetricCard, type PisellMetricCardProps, PisellMetrics, PisellMobileDateRangePicker, type PisellMobileDateRangePickerProps, PisellModal, PisellMultipleSelect, type PisellMultipleSelectProps, PisellNavigationMenu, MemoizedPisellNumber as PisellNumber, Number as PisellNumberKeyboard, type PisellNumberProps, MemoizedPisellPercent as PisellPercent, type PisellPercentProps, _default$13 as PisellPhone, type PisellPhoneProps, Amount as PisellPriceKeyboard, PisellProcedure, ProcedureHeader as PisellProcedureHeader, type ProcedureHeaderProps as PisellProcedureHeaderProps, type PisellProcedureProps, type PisellProcedureRef, PisellQRScanner, type PisellQRScannerProps, PisellQrcode, pisellQuickFilter as PisellQuickFilter, type PisellQuickFilterProps, _default$14 as PisellRating, type PisellRatingProps, PisellRecordBoard, PisellRecordBoardCalendarView, type PisellRecordBoardCalendarViewProps, PisellRecordBoardResourceWallView, PisellReservationSchedule, PisellReservationScheduleBand, type PisellReservationScheduleBandProps, type PisellReservationScheduleProps, PisellRow, type PisellRowProps, PisellScan, PisellScrollView, type PisellScrollViewProps, PisellSectionHeaders, _default$15 as PisellSelectionFlow, type PisellSelectionFlowController, type PisellSelectionFlowProps, PisellShellFrame, type PisellShellFrameConfig, type PisellShellFrameProps, type PisellShellFrameScrollConfig, PisellSider, _default$16 as PisellSingleLineText, type PisellSingleLineTextProps, PisellSingleSelect, type PisellSingleSelectProps, PisellSort, type PisellSortProps, PisellStatisticList, type PisellStatisticListProps, type PisellStatisticProps, type PisellStepItem, PisellSteps, type PisellStepsProps, _default$17 as PisellSuperTabs, type PisellSuperTabsProps, PisellTabbar, PisellTabbar$1 as PisellTabbar2, type PisellTabbarProps, _default$18 as PisellTabbarTemplate1, type PisellTabbarTemplate1Direction, type PisellTabbarTemplate1Props, PisellTags, type PisellTagsProps, PisellText, PisellTimeNavigator, type PisellTimeNavigatorProps, PisellTimeRangeDisplay, type PisellTimeRangeDisplayProps, PisellToast, Toolbar as PisellToolBar, PisellTooltip, PisellUpload, _default$19 as PisellUrl, type PisellUrlProps, PisellViewGrid, PisellWalletPassCard, type PisellWalletPassCardProps, Popconfirm, Popover, type PostShopFloorPlanBody, type ProcedureBodyProps, type ProcedureFooterProps, type ProcedureHeaderProps$1 as ProcedureHeaderProps, ProductCard, ProfileMenu, Progress, PublishVersionModal, type PutShopFloorPlanBody, QRCode, RECORD_BOARD_PHONE_GRID_CLASS, Radio$1 as Radio, Rate, type RecordBoardBlockedTimeMergedRange, type RecordBoardBlockedTimePanelPayload, type RecordBoardBodyView, type RecordBoardBookingMoveDraft, type RecordBoardCalendarBlockedTimePayload, type RecordBoardCalendarBookingLike, type RecordBoardCalendarBookingRenderArgs, type RecordBoardCalendarDayOverlayBooking, type RecordBoardCalendarProps, type RecordBoardCalendarResource, type RecordBoardCalendarResourceRenderArgs, type RecordBoardCalendarSelectedFreeSlot, type RecordBoardCalendarTimelineHeaderGroup, type RecordBoardCalendarTimelineHeaderRenderContext, type RecordBoardChildComponentProps, type RecordBoardColumnFilterConfig, type RecordBoardColumnType, type RecordBoardContextValue, type RecordBoardCreateBookingDayGroup, type RecordBoardCreateBookingFromSelectionPayload, type RecordBoardFieldType, type RecordBoardFloorMapProps, type RecordBoardGetOptions, type RecordBoardGridProps, type RecordBoardLayoutType, type RecordBoardLayoutVariant, type RecordBoardOptionItem, type RecordBoardProps, type RecordBoardResourceWallCardModel, type RecordBoardResourceWallLayoutPersist, type RecordBoardResourceWallProps, type RecordBoardToolBarProps, _default$20 as RecordView, type ReservationScheduleBandValue, type ReservationScheduleValue, Result, Row, SHOP_FLOOR_PLAN_DUPLICATE_CODE, SafeAreaTop, SectionFooters, Segmented, Select, SelectTime, SelectionFlowCompileError, type SelectionFlowCompileIssue, type SelectionFlowCompileIssueCode, type SelectionFlowContextValue, type SelectionFlowDraftAdapter, type SelectionFlowDraftChange, type SelectionFlowDraftUpdateMeta, type SelectionFlowMessageCode, type SelectionFlowMetadata, type SelectionFlowModuleAdapter, type SelectionFlowModuleConfig, type SelectionFlowModuleInput, type SelectionFlowModuleRegistry, type SelectionFlowRef, type SelectionFlowRuntimeIssue, type SelectionFlowSnapshot, type SelectionFlowStepConfig, type SelectionFlowValidationFeedback, type ShopFloorPlanByCodeRequestOptions, type ShopFloorPlanDetail, type ShopFloorPlanHttpAdapter, type ShopFloorPlanLayoutItem, type SingleSelectRef, Skeleton, SliderOuter as Slider, Sort, SortableList, Space, Spin, Statistic, Steps, SubmitButton, Switch$1 as Switch, Provider$3 as TabCard, type TabCardProps, type TabDataItem, type TabbarActionItem, type TabbarDataSource, _default$21 as Table, Tabs, Tag, Provider$4 as TextCard, type TimeNavigatorOrientation, type TimeNavigatorPassthroughProps, type TimeNavigatorValue, TimePicker$1 as TimePicker, type TimeRangeOption, Timeline, type ToolBarProps, Tooltip, Transfer, Translation$2 as Translation, Tree, TreeSelect, Typography, Upload$1 as Upload, type VenueWallAppearanceSlot, type VenueWallAppearanceTheme, type VenueWallStatusKey, type VenueWallStatusTone, type VenueWallStatusToneOverrides, VirtualInput, VirtualKeyboard, VirtualKeyboardTime, WalletCard, type WrapFloorMapOnSaveWithRemotePersistParams, adaptColumnsForPhoneLayout, buildCalendarHourSlotsFromRange, buildCalendarTimelineSlotStartsFromRange, buildFloorPlanPutBody, buildNameAsTitleExtensionsPatch, compileSelectionFlow, compileSelectionFlowSteps, computeSelectionZoneMemberIds, createShopFloorPlanClient, diffVenueWallStatusToneOverrides, findFloorMapRowByDataBinding, _default$22 as floorMapLayoutLocales, floorMapResourcePickerRecordSearchText, floorMapSavedConfigToRemotePatch, formatScheduleAtLabel, getBankCardTypeImg, getFigmaTableCardFromMerged, getFloorMapBindingPlaceholderReason, getFloorMapBuiltinShapeDef, getFloorMapCardPickerCategoryConfig, getFloorMapDisplayLocale, getFloorMapResourcePickerCardMeta, getHorizontalAxisSlotCount, getRangeBounds, getRenderItemByKindRoundTable, getRenderItemByKindTable, getVenueWallStatusToneMap, globalConfig, hasSelectionDraftFieldValue, inferCanvasSizeFromScene, initFloorMapLayoutLocales, isElementNameAsTitleEnabled, isFloorMapBuiltinShapeElementKind, isFloorMapImageElementKind, isFloorPlanDuplicateCodeError, isHttpNotFoundError, isSelectionModuleType, isSelectionZoneItem, isShopFloorPlanNotFoundResponse, loginAndRegister, mergeFloorMapLayoutPropsFromContext, mergeFloorPlanViewRemote, message, notification, parseLayoutFieldToViewConfigPatch, parseNestedPathSegments, pickFloorPlanDetail, pickReferenceDateContainingNow, _default$23 as pisellTimeNavigatorLocales, renderFigmaStyleRoundTableCard, renderFigmaStyleTableCard, renderFloorMapFallbackPlaceholder, resolveFlowModuleAdapter, resolveSceneElementDisplayTitle, sceneElementsToShopLayout, shopLayoutToSceneElements, useFloorMapLayoutContext, usePisellConfig, useRecordBoardContext, useRecordBoardShellBodyMeta, useSelectionFlowContext, useShopFloorPlanSubscription, useToast, useTypedSelectionFlowContext, version, viewConfigToLayoutPayload, wrapFloorMapOnSaveWithRemotePersist };
|
|
281
|
+
export { type AdaptColumnsForPhoneLayoutOptions, Affix, Alert, Anchor, AppVersionControl, AutoComplete, AutoCompleteNumber, AutoResizeText, Avatar, Badge, type BadgeConfig, Translation as BaseTranslation, type BatchActionBarPosition, type BatchActionConfirmConfig, type BatchActionItem, BatchEditor, Breadcrumb, Button, _default as ButtonGroupEdit, _default$1 as ButtonGroupPreview, Calendar, type CalendarPersistContextValue, type CalendarPersistKind, CalendarPersistProvider, Card, CardMetricItem, type PisellStatisticProps as CardMetricItemProps, _default$2 as CardPro, Carousel, Cascader, Checkbox, ClassicLayout, Col, Collapse, ColorPicker, type CompiledSelectionFlowModuleConfig, type CompiledSelectionFlowStep, Component, type CompoundedComponent, ConfigProvider, type CountryCode, type CreateShopFloorPlanClientOptions, CropPhoto, type CursorMode, CustomSelect, DEFAULT_CALENDAR_SLOT_STEP_MINUTES, DEFAULT_RESOURCE_WALL_FILTER_FIELD_KEY, DEFAULT_RESOURCE_WALL_LAYOUT_PERSIST, type DataSourceContainerProps, _default$3 as DataSourceForm, DataSourceImage, DataSourceMenu, DataSourceQRCode, DataSourceSubForm, type DataSourceSubFormProps, _default$4 as DataSourceTable, DataSourceTypography, DataSourceWrapper, DatePicker, type DefaultActionsConfig, Descriptions, _default$5 as Div, Divider, DragSortTree, Drawer, Dropdown, EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, Empty, type EnsureShopFloorPlanByCodeOptions, FIND_FALLBACK_SCANNER_COUNT_KEY, FLOOR_MAP_BUILTIN_SHAPES, FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND, FLOOR_MAP_IMAGE_ELEMENT_KIND, FLOOR_MAP_SELECTION_ZONE_ELEMENT_KIND, FLOOR_MAP_STAGE_ELEMENT_KIND, Filter, type FloorMapBindingPlaceholderReason, FloorMapBuiltinShapeElement, type FloorMapCanvasNameI18n, type FloorMapDataSourceRow, type FloorMapDataSources, type FloorMapEdge, type FloorMapEdgeAnchor, type FloorMapEdgeStatus, type FloorMapElementKindCategory, type FloorMapElementKindConfig, type FloorMapFullscreenMode, FloorMapImageElement, type FloorMapItemBase, type FloorMapLayoutContextValue, FloorMapLayoutProvider, type FloorMapLayoutProviderProps, type FloorMapMergedItem, type FloorMapRenderOptions, type FloorMapResourcePickerRecord, type FloorMapResourcePickerSlotProps, type FloorMapSceneElement, FloorMapSelectionZoneElement, type FloorMapViewConfig, type FloorMapViewportOverlayRenderArgs, type FlowModuleBeforeLeaveResult, type FlowModuleBeforeLeaveReturn, type FlowModuleDataMap, type FlowModuleHandle, type FlowModuleState, type FlowModuleStateMap, type FlowModuleStatus, type FlowModuleValidationResult, type FlowModuleValidationReturn, _default$6 as Form, FormGroup, Checkbox$1 as FormItemCheckbox, ColorPicker$1 as FormItemColorPicker, DatePicker$1 as FormItemDatePicker, IconSelect as FormItemIconSelect, Input as FormItemInput, InputNumber as FormItemInputNumber, Radio as FormItemRadio, RecordListWrapperWithDataSource as FormItemRecordListWrapper, SelectWithDataSource as FormItemSelect, Switch as FormItemSwitch, FormItemTabs, TimePicker as FormItemTimePicker, Translation$1 as FormItemTranslation, Upload as FormItemUpload, Provider as GraphicTextCard, type GraphicTextCardProps, type GraphicTextCardSize, type GraphicTextCardVariant, Grid, type GridProProps, type GridViewProps, type GroupBlocks, type GroupModel, type GroupViewVariant, PREFIX_CLS as HIERARCHICAL_SUMMARY_LIST_PREFIX_CLS, _default$7 as Icon, IconSelect$1 as IconSelect, IconFont as Iconfont, Image, type ImageDataSource, type ImageFillMode, Input$1 as Input, InputNumber$1 as InputNumber, InputNumberRange, type ItemContext, type ItemLayout, JsonWrapperProvider as JsonWrapper, _default$8 as Keyboard, type LevelType, List, type LookupInputRenderContext, LowCodePage, type MailtoOptions, Mentions, Menu, Modal, Provider$1 as MultilevelCard, type MultilevelCardProps, type MultipleSelectRef, NAME_AS_TITLE_EXT_KEY, OrganizationTenantSwitcher, Page, PageHeader, Pagination, PisellAdjustPrice, PisellAdjustPriceInputNumber, PisellAlert, PisellAnchor, PisellAppCard, type PisellAppCardProps, PisellAvatar, type PisellBasicCardProps, MemoizedPisellBasicGrid as PisellBasicGrid, type PisellBasicGridProps, PisellBatchActionBar, type PisellBatchActionBarProps, PisellCard, _default$9 as PisellCardList, type PisellCardPickerCardMeta, type PisellCardPickerCategoryConfig, type PisellCardPickerCategoryLevelConfig, type PisellCardPickerCategoryMode, type PisellCardPickerCategoryPath, type PisellCardPickerItem, type PisellCardPickerMode, PisellCards, PisellCheckboxGroup, PisellConfigProvider, PisellContainer, PisellContent, PisellContext, PisellCountdown, MemoizedPisellCurrency as PisellCurrency, type PisellCurrencyProps, PisellCustomCheckboxGroup, PisellDataSourceContainer, PisellDatePicker, _default$10 as PisellDateTimeDisplay, type PisellDateTimeDisplayProps, Demo as PisellDraggable, PisellDropSort, PisellDropdown, _default$11 as PisellEmail, type PisellEmailProps, PisellEmpty, PisellFields, PisellFilter, type PisellFilterProps, PisellFind, type PisellFindProps, type PisellFindRef, PisellFloatingPanel, PisellFloorMapLayout, type PisellFloorMapLayoutProps, type PisellFloorMapLayoutRef, PisellFooter, index as PisellGoodPassCard, PisellGridPro, GridView as PisellGridView, MemoizedPisellGroupView as PisellGroupView, type PisellGroupViewProps, PisellHeader, PisellHeaderProgressBar, PisellHierarchicalSummaryList, type PisellHierarchicalSummaryListAggregateConfig, type PisellHierarchicalSummaryListAggregateMode, type PisellHierarchicalSummaryListItem, type PisellHierarchicalSummaryListKey, type PisellHierarchicalSummaryListLevelConfig, type PisellHierarchicalSummaryListProps, Provider$2 as PisellImageCard, type PisellImageCardProps, PisellImageCarousels, PisellInformationEntry, PisellInput, PisellLayout, type PisellLayoutProps, PisellLayouts, PisellList01, PisellLoading, _default$12 as PisellLongText, type PisellLongTextProps, PisellLookup, type PisellLookupProps, type PisellLookupRef, PisellMenu, type PisellMenuProps, PisellMetricCard, type PisellMetricCardProps, PisellMetrics, PisellMobileDateRangePicker, type PisellMobileDateRangePickerProps, PisellModal, PisellMultipleSelect, type PisellMultipleSelectProps, PisellNavigationMenu, MemoizedPisellNumber as PisellNumber, Number as PisellNumberKeyboard, type PisellNumberProps, MemoizedPisellPercent as PisellPercent, type PisellPercentProps, _default$13 as PisellPhone, type PisellPhoneProps, Amount as PisellPriceKeyboard, PisellProcedure, ProcedureHeader as PisellProcedureHeader, type ProcedureHeaderProps as PisellProcedureHeaderProps, type PisellProcedureProps, type PisellProcedureRef, PisellQRScanner, type PisellQRScannerProps, PisellQrcode, pisellQuickFilter as PisellQuickFilter, type PisellQuickFilterProps, _default$14 as PisellRating, type PisellRatingProps, PisellRecordBoard, PisellRecordBoardCalendarView, type PisellRecordBoardCalendarViewProps, PisellRecordBoardResourceWallView, PisellReservationSchedule, PisellReservationScheduleBand, type PisellReservationScheduleBandProps, type PisellReservationScheduleProps, PisellRow, type PisellRowProps, PisellScan, PisellScrollView, type PisellScrollViewProps, PisellSectionHeaders, _default$15 as PisellSelectionFlow, type PisellSelectionFlowController, type PisellSelectionFlowProps, PisellShellFrame, type PisellShellFrameConfig, type PisellShellFrameProps, type PisellShellFrameScrollConfig, PisellSider, _default$16 as PisellSingleLineText, type PisellSingleLineTextProps, PisellSingleSelect, type PisellSingleSelectProps, PisellSort, type PisellSortProps, PisellStatisticList, type PisellStatisticListProps, type PisellStatisticProps, type PisellStepItem, PisellSteps, type PisellStepsProps, _default$17 as PisellSuperTabs, type PisellSuperTabsProps, PisellTabbar, PisellTabbar$1 as PisellTabbar2, type PisellTabbarProps, _default$18 as PisellTabbarTemplate1, type PisellTabbarTemplate1Direction, type PisellTabbarTemplate1Props, PisellTags, type PisellTagsProps, PisellText, PisellTimeNavigator, type PisellTimeNavigatorProps, PisellTimeRangeDisplay, type PisellTimeRangeDisplayProps, PisellToast, Toolbar as PisellToolBar, PisellTooltip, PisellUpload, _default$19 as PisellUrl, type PisellUrlProps, PisellViewGrid, PisellWalletPassCard, type PisellWalletPassCardProps, Popconfirm, Popover, type PostShopFloorPlanBody, type ProcedureBodyProps, type ProcedureFooterProps, type ProcedureHeaderProps$1 as ProcedureHeaderProps, ProductCard, ProfileMenu, Progress, PublishVersionModal, type PutShopFloorPlanBody, QRCode, RECORD_BOARD_PHONE_GRID_CLASS, Radio$1 as Radio, Rate, type RecordBoardBlockedTimeMergedRange, type RecordBoardBlockedTimePanelPayload, type RecordBoardBodyView, type RecordBoardBookingMoveDraft, type RecordBoardCalendarBlockedTimePayload, type RecordBoardCalendarBookingLike, type RecordBoardCalendarBookingRenderArgs, type RecordBoardCalendarDayOverlayBooking, type RecordBoardCalendarProps, type RecordBoardCalendarResource, type RecordBoardCalendarResourceRenderArgs, type RecordBoardCalendarSelectedFreeSlot, type RecordBoardCalendarTimelineHeaderGroup, type RecordBoardCalendarTimelineHeaderRenderContext, type RecordBoardChildComponentProps, type RecordBoardColumnFilterConfig, type RecordBoardColumnType, type RecordBoardContextValue, type RecordBoardCreateBookingDayGroup, type RecordBoardCreateBookingFromSelectionPayload, type RecordBoardFieldType, type RecordBoardFloorMapProps, type RecordBoardGetOptions, type RecordBoardGridProps, type RecordBoardLayoutType, type RecordBoardLayoutVariant, type RecordBoardOptionItem, type RecordBoardProps, type RecordBoardResourceWallCardModel, type RecordBoardResourceWallLayoutPersist, type RecordBoardResourceWallProps, type RecordBoardToolBarProps, _default$20 as RecordView, type ReservationScheduleBandValue, type ReservationScheduleValue, Result, Row, SHOP_FLOOR_PLAN_DUPLICATE_CODE, SafeAreaTop, SectionFooters, Segmented, Select, SelectTime, SelectionFlowCompileError, type SelectionFlowCompileIssue, type SelectionFlowCompileIssueCode, type SelectionFlowContextValue, type SelectionFlowDraftAdapter, type SelectionFlowDraftChange, type SelectionFlowDraftUpdateMeta, type SelectionFlowMessageCode, type SelectionFlowMetadata, type SelectionFlowModuleAdapter, type SelectionFlowModuleConfig, type SelectionFlowModuleInput, type SelectionFlowModuleRegistry, type SelectionFlowPrepareStepsOptions, type SelectionFlowPrepareStepsResult, type SelectionFlowRef, type SelectionFlowRuntimeIssue, type SelectionFlowSnapshot, type SelectionFlowStepConfig, type SelectionFlowValidationFeedback, type ShopFloorPlanByCodeRequestOptions, type ShopFloorPlanDetail, type ShopFloorPlanHttpAdapter, type ShopFloorPlanLayoutItem, type SingleSelectRef, Skeleton, SliderOuter as Slider, Sort, SortableList, Space, Spin, Statistic, Steps, SubmitButton, Switch$1 as Switch, Provider$3 as TabCard, type TabCardProps, type TabDataItem, type TabbarActionItem, type TabbarDataSource, _default$21 as Table, Tabs, Tag, Provider$4 as TextCard, type TimeNavigatorOrientation, type TimeNavigatorPassthroughProps, type TimeNavigatorValue, TimePicker$1 as TimePicker, type TimeRangeOption, Timeline, type ToolBarProps, Tooltip, Transfer, Translation$2 as Translation, Tree, TreeSelect, Typography, Upload$1 as Upload, type VenueWallAppearanceSlot, type VenueWallAppearanceTheme, type VenueWallStatusKey, type VenueWallStatusTone, type VenueWallStatusToneOverrides, VirtualInput, VirtualKeyboard, VirtualKeyboardTime, WalletCard, type WrapFloorMapOnSaveWithRemotePersistParams, adaptColumnsForPhoneLayout, buildCalendarHourSlotsFromRange, buildCalendarTimelineSlotStartsFromRange, buildFloorPlanPutBody, buildNameAsTitleExtensionsPatch, compileSelectionFlow, compileSelectionFlowSteps, computeSelectionZoneMemberIds, createShopFloorPlanClient, diffVenueWallStatusToneOverrides, findFloorMapRowByDataBinding, _default$22 as floorMapLayoutLocales, floorMapResourcePickerRecordSearchText, floorMapSavedConfigToRemotePatch, formatScheduleAtLabel, getBankCardTypeImg, getFigmaTableCardFromMerged, getFloorMapBindingPlaceholderReason, getFloorMapBuiltinShapeDef, getFloorMapCardPickerCategoryConfig, getFloorMapDisplayLocale, getFloorMapResourcePickerCardMeta, getHorizontalAxisSlotCount, getRangeBounds, getRenderItemByKindRoundTable, getRenderItemByKindTable, getVenueWallStatusToneMap, globalConfig, hasSelectionDraftFieldValue, inferCanvasSizeFromScene, initFloorMapLayoutLocales, isElementNameAsTitleEnabled, isFloorMapBuiltinShapeElementKind, isFloorMapImageElementKind, isFloorPlanDuplicateCodeError, isHttpNotFoundError, isSelectionModuleType, isSelectionZoneItem, isShopFloorPlanNotFoundResponse, loginAndRegister, mergeFloorMapLayoutPropsFromContext, mergeFloorPlanViewRemote, message, notification, parseLayoutFieldToViewConfigPatch, parseNestedPathSegments, pickFloorPlanDetail, pickReferenceDateContainingNow, _default$23 as pisellTimeNavigatorLocales, renderFigmaStyleRoundTableCard, renderFigmaStyleTableCard, renderFloorMapFallbackPlaceholder, resolveFlowModuleAdapter, resolveSceneElementDisplayTitle, sceneElementsToShopLayout, shopLayoutToSceneElements, useFloorMapLayoutContext, usePisellConfig, useRecordBoardContext, useRecordBoardShellBodyMeta, useSelectionFlowContext, useShopFloorPlanSubscription, useToast, useTypedSelectionFlowContext, version, viewConfigToLayoutPayload, wrapFloorMapOnSaveWithRemotePersist };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PisellBasicCardProps } from "./types.js";
|
|
2
3
|
import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
|
|
3
4
|
import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
|
|
2
3
|
import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
|
|
3
4
|
import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
|
|
@@ -21,6 +21,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
21
21
|
const flowGenerationRef = (0, react.useRef)(0);
|
|
22
22
|
const draftRevisionRef = (0, react.useRef)(0);
|
|
23
23
|
const navigationRevisionRef = (0, react.useRef)(0);
|
|
24
|
+
const preparationRevisionRef = (0, react.useRef)(0);
|
|
24
25
|
const transitionPendingRef = (0, react.useRef)(false);
|
|
25
26
|
const processDraftChangeRef = (0, react.useRef)(() => void 0);
|
|
26
27
|
const onDraftChangeRef = (0, react.useRef)(onDraftChange);
|
|
@@ -84,6 +85,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
84
85
|
mountedRef.current = false;
|
|
85
86
|
if (flowGenerationRef.current === generation) flowGenerationRef.current += 1;
|
|
86
87
|
navigationRevisionRef.current += 1;
|
|
88
|
+
preparationRevisionRef.current += 1;
|
|
87
89
|
moduleInitializationRef.current.clear();
|
|
88
90
|
moduleDependencyLifecycleRef.current.clear();
|
|
89
91
|
pendingModuleChangeRef.current.clear();
|
|
@@ -299,7 +301,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
299
301
|
draft,
|
|
300
302
|
moduleState
|
|
301
303
|
});
|
|
302
|
-
const { validateCurrentStep, complete, next, back } = require_useFlowNavigation.useFlowNavigation({
|
|
304
|
+
const { validateCurrentStep, prepareSteps, complete, next, back } = require_useFlowNavigation.useFlowNavigation({
|
|
303
305
|
registry,
|
|
304
306
|
draftAdapter,
|
|
305
307
|
createRuntimeIssue,
|
|
@@ -315,6 +317,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
315
317
|
currentStepKeyRef,
|
|
316
318
|
validatedCompletionRef,
|
|
317
319
|
navigationRevisionRef,
|
|
320
|
+
preparationRevisionRef,
|
|
318
321
|
transitionPendingRef,
|
|
319
322
|
completedRef,
|
|
320
323
|
completionPromiseRef,
|
|
@@ -349,6 +352,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
349
352
|
back,
|
|
350
353
|
updateDraft,
|
|
351
354
|
validateCurrentStep,
|
|
355
|
+
prepareSteps,
|
|
352
356
|
complete,
|
|
353
357
|
getState
|
|
354
358
|
}), [
|
|
@@ -356,6 +360,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
356
360
|
complete,
|
|
357
361
|
getState,
|
|
358
362
|
next,
|
|
363
|
+
prepareSteps,
|
|
359
364
|
updateDraft,
|
|
360
365
|
validateCurrentStep
|
|
361
366
|
]);
|
|
@@ -379,6 +384,7 @@ const SelectionFlow = ({ registry, draftAdapter, steps, initialDraft, initialSte
|
|
|
379
384
|
context: contextValue,
|
|
380
385
|
updateDraft,
|
|
381
386
|
validateCurrentStep,
|
|
387
|
+
prepareSteps,
|
|
382
388
|
complete,
|
|
383
389
|
next,
|
|
384
390
|
back,
|
|
@@ -6,7 +6,7 @@ const require_utils = require("../utils.js");
|
|
|
6
6
|
let react = require("react");
|
|
7
7
|
//#region src/components/PisellSelectionFlow/hooks/useFlowNavigation.ts
|
|
8
8
|
/** 导航、校验与提交门禁独立于模块加载生命周期。 */
|
|
9
|
-
const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mountedRef, moduleStateRef, moduleRevisionRef, draftRevisionRef, flowGenerationRef, moduleHandlesRef, configurationErrorRef, compiledStepsRef, currentStepIndexRef, currentStepKeyRef, validatedCompletionRef, navigationRevisionRef, transitionPendingRef, completedRef, completionPromiseRef, isCompletingRef, draftRef, onCompleteRef, ensureModuleReady, commitModuleState, getFreshContext, onValidationFailed, setCurrentStepIndex, setCompletionError, setCompletionReason, setIsCompleting }) => {
|
|
9
|
+
const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mountedRef, moduleStateRef, moduleRevisionRef, draftRevisionRef, flowGenerationRef, moduleHandlesRef, configurationErrorRef, compiledStepsRef, currentStepIndexRef, currentStepKeyRef, validatedCompletionRef, navigationRevisionRef, preparationRevisionRef, transitionPendingRef, completedRef, completionPromiseRef, isCompletingRef, draftRef, onCompleteRef, ensureModuleReady, commitModuleState, getFreshContext, onValidationFailed, setCurrentStepIndex, setCompletionError, setCompletionReason, setIsCompleting }) => {
|
|
10
10
|
const validateModule = (0, react.useCallback)(function() {
|
|
11
11
|
var _ref = require_asyncToGenerator._asyncToGenerator(function* (module) {
|
|
12
12
|
const adapter = require_compiler.resolveFlowModuleAdapter(registry, module.type);
|
|
@@ -105,6 +105,106 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
105
105
|
for (const module of step.modules) if (!(yield validateModule(module))) return false;
|
|
106
106
|
return true;
|
|
107
107
|
}), [validateModule]);
|
|
108
|
+
const prepareSteps = (0, react.useCallback)(require_asyncToGenerator._asyncToGenerator(function* (options = {}) {
|
|
109
|
+
var _options$fromStepInde;
|
|
110
|
+
if (!mountedRef.current || configurationErrorRef.current) return {
|
|
111
|
+
prepared: false,
|
|
112
|
+
cancelled: !mountedRef.current
|
|
113
|
+
};
|
|
114
|
+
const preparationRevision = preparationRevisionRef.current + 1;
|
|
115
|
+
preparationRevisionRef.current = preparationRevision;
|
|
116
|
+
const navigationRevision = navigationRevisionRef.current;
|
|
117
|
+
const flowGeneration = flowGenerationRef.current;
|
|
118
|
+
const compiledFingerprint = require_utils.getCompiledStepsFingerprint(compiledStepsRef.current);
|
|
119
|
+
const fromStepIndex = Math.max(0, (_options$fromStepInde = options.fromStepIndex) !== null && _options$fromStepInde !== void 0 ? _options$fromStepInde : currentStepIndexRef.current + 1);
|
|
120
|
+
const isCurrentPreparation = () => mountedRef.current && preparationRevisionRef.current === preparationRevision && navigationRevisionRef.current === navigationRevision && flowGenerationRef.current === flowGeneration && require_utils.getCompiledStepsFingerprint(compiledStepsRef.current) === compiledFingerprint;
|
|
121
|
+
const targetModules = compiledStepsRef.current.filter((step) => step.index >= fromStepIndex).flatMap((step) => step.modules.map((module) => ({
|
|
122
|
+
step,
|
|
123
|
+
module
|
|
124
|
+
})));
|
|
125
|
+
for (let pass = 0; pass <= targetModules.length; pass += 1) {
|
|
126
|
+
for (const { step, module } of targetModules) {
|
|
127
|
+
if (!isCurrentPreparation()) return {
|
|
128
|
+
prepared: false,
|
|
129
|
+
cancelled: true
|
|
130
|
+
};
|
|
131
|
+
const adapter = require_compiler.resolveFlowModuleAdapter(registry, module.type);
|
|
132
|
+
if (!(adapter === null || adapter === void 0 ? void 0 : adapter.validateAutoResolution)) return {
|
|
133
|
+
prepared: false,
|
|
134
|
+
firstUnresolvedStepIndex: step.index,
|
|
135
|
+
moduleKey: module.key
|
|
136
|
+
};
|
|
137
|
+
if (!(yield ensureModuleReady(module))) {
|
|
138
|
+
const state = moduleStateRef.current[module.key];
|
|
139
|
+
return isCurrentPreparation() ? {
|
|
140
|
+
prepared: false,
|
|
141
|
+
firstUnresolvedStepIndex: step.index,
|
|
142
|
+
moduleKey: module.key,
|
|
143
|
+
message: state === null || state === void 0 ? void 0 : state.message
|
|
144
|
+
} : {
|
|
145
|
+
prepared: false,
|
|
146
|
+
cancelled: true
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
if (!isCurrentPreparation()) return {
|
|
150
|
+
prepared: false,
|
|
151
|
+
cancelled: true
|
|
152
|
+
};
|
|
153
|
+
const validationDraftRevision = draftRevisionRef.current;
|
|
154
|
+
try {
|
|
155
|
+
const context = getFreshContext();
|
|
156
|
+
if (!context) return {
|
|
157
|
+
prepared: false,
|
|
158
|
+
cancelled: true
|
|
159
|
+
};
|
|
160
|
+
const result = require_utils.normalizeFlowValidationResult(yield adapter.validateAutoResolution(context, module));
|
|
161
|
+
if (!isCurrentPreparation() || draftRevisionRef.current !== validationDraftRevision) return {
|
|
162
|
+
prepared: false,
|
|
163
|
+
cancelled: true
|
|
164
|
+
};
|
|
165
|
+
if (!result.valid) return {
|
|
166
|
+
prepared: false,
|
|
167
|
+
firstUnresolvedStepIndex: step.index,
|
|
168
|
+
moduleKey: module.key,
|
|
169
|
+
message: result.message
|
|
170
|
+
};
|
|
171
|
+
} catch (error) {
|
|
172
|
+
return isCurrentPreparation() ? {
|
|
173
|
+
prepared: false,
|
|
174
|
+
firstUnresolvedStepIndex: step.index,
|
|
175
|
+
moduleKey: module.key,
|
|
176
|
+
message: require_utils.getSelectionFlowErrorMessage(error)
|
|
177
|
+
} : {
|
|
178
|
+
prepared: false,
|
|
179
|
+
cancelled: true
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (!targetModules.find(({ module }) => {
|
|
184
|
+
var _moduleStateRef$curre;
|
|
185
|
+
return ((_moduleStateRef$curre = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre === void 0 ? void 0 : _moduleStateRef$curre.status) !== "ready";
|
|
186
|
+
})) return isCurrentPreparation() ? { prepared: true } : {
|
|
187
|
+
prepared: false,
|
|
188
|
+
cancelled: true
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
const unresolved = targetModules.find(({ module }) => {
|
|
192
|
+
var _moduleStateRef$curre2;
|
|
193
|
+
return ((_moduleStateRef$curre2 = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre2 === void 0 ? void 0 : _moduleStateRef$curre2.status) !== "ready";
|
|
194
|
+
});
|
|
195
|
+
return unresolved ? {
|
|
196
|
+
prepared: false,
|
|
197
|
+
firstUnresolvedStepIndex: unresolved.step.index,
|
|
198
|
+
moduleKey: unresolved.module.key
|
|
199
|
+
} : {
|
|
200
|
+
prepared: false,
|
|
201
|
+
cancelled: true
|
|
202
|
+
};
|
|
203
|
+
}), [
|
|
204
|
+
ensureModuleReady,
|
|
205
|
+
getFreshContext,
|
|
206
|
+
registry
|
|
207
|
+
]);
|
|
108
208
|
const runBeforeLeaveForCurrentStep = (0, react.useCallback)(require_asyncToGenerator._asyncToGenerator(function* () {
|
|
109
209
|
if (configurationErrorRef.current) return false;
|
|
110
210
|
const stepIndex = currentStepIndexRef.current;
|
|
@@ -189,8 +289,8 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
189
289
|
const latestRevisionFingerprint = latestSteps.flatMap((step) => step.modules).map((module) => `${module.key}:${moduleRevisionRef.current.get(module.key) || 0}`).join("|");
|
|
190
290
|
if (compiledFingerprint !== latestCompiledFingerprint || revisionFingerprint !== latestRevisionFingerprint || draftRevision !== draftRevisionRef.current) {
|
|
191
291
|
const targetStep = latestSteps.find((step) => step.modules.some((module) => {
|
|
192
|
-
var _moduleStateRef$
|
|
193
|
-
return ((_moduleStateRef$
|
|
292
|
+
var _moduleStateRef$curre3;
|
|
293
|
+
return ((_moduleStateRef$curre3 = moduleStateRef.current[module.key]) === null || _moduleStateRef$curre3 === void 0 ? void 0 : _moduleStateRef$curre3.status) !== "ready";
|
|
194
294
|
})) || latestSteps[0];
|
|
195
295
|
const targetModule = targetStep === null || targetStep === void 0 ? void 0 : targetStep.modules[0];
|
|
196
296
|
if (targetStep && targetModule) {
|
|
@@ -275,6 +375,7 @@ const useFlowNavigation = ({ registry, draftAdapter, createRuntimeIssue, mounted
|
|
|
275
375
|
]);
|
|
276
376
|
return {
|
|
277
377
|
validateCurrentStep,
|
|
378
|
+
prepareSteps,
|
|
278
379
|
runBeforeLeaveForCurrentStep,
|
|
279
380
|
complete,
|
|
280
381
|
next: (0, react.useCallback)(require_asyncToGenerator._asyncToGenerator(function* () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompiledSelectionFlowModuleConfig, CompiledSelectionFlowStep, FlowModuleBeforeLeaveResult, FlowModuleBeforeLeaveReturn, FlowModuleDataMap, FlowModuleHandle, FlowModuleState, FlowModuleStateMap, FlowModuleStatus, FlowModuleValidationResult, FlowModuleValidationReturn, PisellSelectionFlowController, PisellSelectionFlowProps, SelectionFlowCompileError, SelectionFlowCompileIssue, SelectionFlowCompileIssueCode, SelectionFlowContextValue, SelectionFlowDraftAdapter, SelectionFlowDraftChange, SelectionFlowDraftUpdateMeta, SelectionFlowMessageCode, SelectionFlowMetadata, SelectionFlowModuleAdapter, SelectionFlowModuleConfig, SelectionFlowModuleInput, SelectionFlowModuleRegistry, SelectionFlowRef, SelectionFlowRuntimeIssue, SelectionFlowSnapshot, SelectionFlowStepConfig, SelectionFlowValidationFeedback } from "./types.js";
|
|
1
|
+
import { CompiledSelectionFlowModuleConfig, CompiledSelectionFlowStep, FlowModuleBeforeLeaveResult, FlowModuleBeforeLeaveReturn, FlowModuleDataMap, FlowModuleHandle, FlowModuleState, FlowModuleStateMap, FlowModuleStatus, FlowModuleValidationResult, FlowModuleValidationReturn, PisellSelectionFlowController, PisellSelectionFlowProps, SelectionFlowCompileError, SelectionFlowCompileIssue, SelectionFlowCompileIssueCode, SelectionFlowContextValue, SelectionFlowDraftAdapter, SelectionFlowDraftChange, SelectionFlowDraftUpdateMeta, SelectionFlowMessageCode, SelectionFlowMetadata, SelectionFlowModuleAdapter, SelectionFlowModuleConfig, SelectionFlowModuleInput, SelectionFlowModuleRegistry, SelectionFlowPrepareStepsOptions, SelectionFlowPrepareStepsResult, SelectionFlowRef, SelectionFlowRuntimeIssue, SelectionFlowSnapshot, SelectionFlowStepConfig, SelectionFlowValidationFeedback } from "./types.js";
|
|
2
2
|
import { _default } from "./PisellSelectionFlow.js";
|
|
3
3
|
import { useSelectionFlowContext, useTypedSelectionFlowContext } from "./context.js";
|
|
4
4
|
import { compileSelectionFlow, compileSelectionFlowSteps, hasSelectionDraftFieldValue, isSelectionModuleType, resolveFlowModuleAdapter } from "./compiler.js";
|
|
@@ -57,6 +57,18 @@ type FlowModuleValidationResult = boolean | {
|
|
|
57
57
|
message?: string;
|
|
58
58
|
};
|
|
59
59
|
type FlowModuleValidationReturn = FlowModuleValidationResult | Promise<FlowModuleValidationResult>;
|
|
60
|
+
interface SelectionFlowPrepareStepsOptions {
|
|
61
|
+
/** 从哪个已编译步骤开始准备;默认从当前步骤的下一步开始。 */
|
|
62
|
+
fromStepIndex?: number;
|
|
63
|
+
}
|
|
64
|
+
interface SelectionFlowPrepareStepsResult {
|
|
65
|
+
prepared: boolean;
|
|
66
|
+
/** 新一轮准备、导航、重新编译或卸载使本轮结果失效。 */
|
|
67
|
+
cancelled?: boolean;
|
|
68
|
+
firstUnresolvedStepIndex?: number;
|
|
69
|
+
moduleKey?: string;
|
|
70
|
+
message?: string;
|
|
71
|
+
}
|
|
60
72
|
type FlowModuleBeforeLeaveResult = boolean | {
|
|
61
73
|
allowed: boolean;
|
|
62
74
|
message?: string;
|
|
@@ -98,6 +110,11 @@ interface SelectionFlowModuleAdapter<TDraft, TDraftUpdate, TField extends string
|
|
|
98
110
|
reconcile?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>, change: SelectionFlowDraftChange<TDraft, TField, TModuleType>, module: CompiledSelectionFlowModuleConfig<TModuleType>) => void | Promise<void>;
|
|
99
111
|
clearDependencies?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>, change: SelectionFlowDraftChange<TDraft, TField, TModuleType>, module: CompiledSelectionFlowModuleConfig<TModuleType>) => void | Promise<void>;
|
|
100
112
|
validate?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>, handle: FlowModuleHandle | null, module: CompiledSelectionFlowModuleConfig<TModuleType>) => FlowModuleValidationReturn;
|
|
113
|
+
/**
|
|
114
|
+
* 模块完成 refresh 后,判断当前值能否在无界面的情况下安全采用。
|
|
115
|
+
* 不提供即表示该模块必须由用户进入步骤确认。
|
|
116
|
+
*/
|
|
117
|
+
validateAutoResolution?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>, module: CompiledSelectionFlowModuleConfig<TModuleType>) => FlowModuleValidationReturn;
|
|
101
118
|
beforeLeave?: (context: SelectionFlowContextValue<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>, handle: FlowModuleHandle | null, module: CompiledSelectionFlowModuleConfig<TModuleType>) => FlowModuleBeforeLeaveReturn;
|
|
102
119
|
}
|
|
103
120
|
type SelectionFlowModuleRegistry<TDraft, TDraftUpdate, TField extends string, TModuleType extends string, TServices = unknown, THostContext = unknown> = Record<TModuleType, SelectionFlowModuleAdapter<TDraft, TDraftUpdate, TField, TModuleType, TServices, THostContext>>;
|
|
@@ -117,6 +134,7 @@ interface SelectionFlowRef<TDraft, TDraftUpdate, TField extends string = string,
|
|
|
117
134
|
back: () => boolean;
|
|
118
135
|
updateDraft: (update: TDraftUpdate, meta: SelectionFlowDraftUpdateMeta<TField, TModuleType>) => void;
|
|
119
136
|
validateCurrentStep: () => Promise<boolean>;
|
|
137
|
+
prepareSteps: (options?: SelectionFlowPrepareStepsOptions) => Promise<SelectionFlowPrepareStepsResult>;
|
|
120
138
|
complete: () => Promise<boolean>;
|
|
121
139
|
getState: () => SelectionFlowSnapshot<TDraft, TModuleType>;
|
|
122
140
|
}
|
|
@@ -139,6 +157,7 @@ interface PisellSelectionFlowController<TDraft, TDraftUpdate, TField extends str
|
|
|
139
157
|
completionReason?: SelectionFlowRuntimeIssue;
|
|
140
158
|
updateDraft: (update: TDraftUpdate, meta: SelectionFlowDraftUpdateMeta<TField, TModuleType>) => void;
|
|
141
159
|
validateCurrentStep: () => Promise<boolean>;
|
|
160
|
+
prepareSteps: (options?: SelectionFlowPrepareStepsOptions) => Promise<SelectionFlowPrepareStepsResult>;
|
|
142
161
|
complete: () => Promise<boolean>;
|
|
143
162
|
next: () => Promise<boolean>;
|
|
144
163
|
back: () => boolean;
|
|
@@ -176,4 +195,4 @@ declare class SelectionFlowCompileError extends Error {
|
|
|
176
195
|
constructor(issues: readonly SelectionFlowCompileIssue[]);
|
|
177
196
|
}
|
|
178
197
|
//#endregion
|
|
179
|
-
export { CompiledSelectionFlowModuleConfig, CompiledSelectionFlowStep, FlowModuleBeforeLeaveResult, FlowModuleBeforeLeaveReturn, FlowModuleDataMap, FlowModuleHandle, FlowModuleState, FlowModuleStateMap, FlowModuleStatus, FlowModuleValidationResult, FlowModuleValidationReturn, PisellSelectionFlowController, PisellSelectionFlowProps, SelectionFlowCompileError, SelectionFlowCompileIssue, SelectionFlowCompileIssueCode, SelectionFlowContextValue, SelectionFlowDraftAdapter, SelectionFlowDraftChange, SelectionFlowDraftUpdateMeta, SelectionFlowMessageCode, SelectionFlowMetadata, SelectionFlowModuleAdapter, SelectionFlowModuleConfig, SelectionFlowModuleInput, SelectionFlowModuleRegistry, SelectionFlowRef, SelectionFlowRuntimeIssue, SelectionFlowSnapshot, SelectionFlowStepConfig, SelectionFlowValidationFeedback };
|
|
198
|
+
export { CompiledSelectionFlowModuleConfig, CompiledSelectionFlowStep, FlowModuleBeforeLeaveResult, FlowModuleBeforeLeaveReturn, FlowModuleDataMap, FlowModuleHandle, FlowModuleState, FlowModuleStateMap, FlowModuleStatus, FlowModuleValidationResult, FlowModuleValidationReturn, PisellSelectionFlowController, PisellSelectionFlowProps, SelectionFlowCompileError, SelectionFlowCompileIssue, SelectionFlowCompileIssueCode, SelectionFlowContextValue, SelectionFlowDraftAdapter, SelectionFlowDraftChange, SelectionFlowDraftUpdateMeta, SelectionFlowMessageCode, SelectionFlowMetadata, SelectionFlowModuleAdapter, SelectionFlowModuleConfig, SelectionFlowModuleInput, SelectionFlowModuleRegistry, SelectionFlowPrepareStepsOptions, SelectionFlowPrepareStepsResult, SelectionFlowRef, SelectionFlowRuntimeIssue, SelectionFlowSnapshot, SelectionFlowStepConfig, SelectionFlowValidationFeedback };
|