@pisell/pisellos 0.0.549 → 0.0.551

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.
@@ -1,5 +1,6 @@
1
1
  import { OrderModule, ProductList, SalesSummaryModule, ScanOrderLogInput, ScanOrderLoggerModule, ScanOrderLoggerProviderConfig, ScanOrderLoggerProviderType, DateModule, ScheduleModule, QuotationModule, OpenDataModule } from '../../modules';
2
2
  import type { QuantityCheckResult, QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
3
+ import { HolderModule } from '../../modules/Holder';
3
4
  export type { ScanOrderOrderProductIdentity, ScanOrderOrderProduct, ScanOrderSubmitProduct, ScanOrderSummary, ScanOrderTempOrder, ScanOrderSubmitPayload, } from '../ScanOrder/types';
4
5
  export declare enum VenueBookingHooks {
5
6
  onInited = "venueBooking:onInited",
@@ -145,6 +146,7 @@ export interface VenueBookingState {
145
146
  passed: boolean | null;
146
147
  failures: QuantityCheckResult[];
147
148
  };
149
+ holder?: HolderModule;
148
150
  }
149
151
  export interface VenueBookingLoggerRuntimeConfig {
150
152
  provider?: ScanOrderLoggerProviderType;
@@ -6,6 +6,7 @@ export interface Plugin {
6
6
  version: string;
7
7
  initialize: () => Promise<void> | void;
8
8
  destroy?: () => Promise<void> | void;
9
+ getLocalStorage?: (key: string) => string | null;
9
10
  }
10
11
  export interface PluginOptions {
11
12
  dependencies?: string[];
@@ -57,6 +57,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
57
57
  private getTempOrderStorageKey;
58
58
  private restoreTempOrderFromStorage;
59
59
  persistTempOrder(): void;
60
+ notifyTempOrderChanged(): void;
60
61
  private createDefaultTempOrderInstance;
61
62
  ensureTempOrder(): ScanOrderTempOrder;
62
63
  restoreOrder(): ScanOrderTempOrder;
@@ -328,6 +328,16 @@ var OrderModule = class extends import_BaseModule.BaseModule {
328
328
  return;
329
329
  this.window.localStorage.setItem(key, JSON.stringify(this.store.tempOrder));
330
330
  }
331
+ notifyTempOrderChanged() {
332
+ if (!this.store.tempOrder)
333
+ return;
334
+ this.store.tempOrder = {
335
+ ...this.store.tempOrder,
336
+ products: [...this.store.tempOrder.products],
337
+ bookings: this.store.tempOrder.bookings ? [...this.store.tempOrder.bookings] : []
338
+ };
339
+ this.persistTempOrder();
340
+ }
331
341
  // ─── TempOrder: 创建 & 获取 ───
332
342
  createDefaultTempOrderInstance() {
333
343
  return (0, import_utils.createDefaultTempOrder)({
@@ -605,6 +615,7 @@ var OrderModule = class extends import_BaseModule.BaseModule {
605
615
  }
606
616
  const discountList = (0, import_utils.getAllDiscountList)(item);
607
617
  item._origin.product.discount_list = discountList;
618
+ (0, import_utils.ensureCartItemOriginHolder)(item);
608
619
  if ((0, import_utils2.isNormalProduct)(item._origin)) {
609
620
  order.relation_products.push(item._origin.product);
610
621
  const relationForms = item._origin.relation_forms || [];
@@ -235,6 +235,8 @@ export interface OrderModuleAPI {
235
235
  updateProductInOrder: (params: UpdateProductInOrderParams) => Promise<ScanOrderOrderProduct[]>;
236
236
  removeProductFromOrder: (identity: ScanOrderOrderProductIdentity) => Promise<ScanOrderOrderProduct[]>;
237
237
  persistTempOrder: () => void;
238
+ /** 提交 tempOrder 变更并触发 `{moduleName}:changed` 事件 */
239
+ notifyTempOrderChanged: () => void;
238
240
  submitTempOrder: <T = any>(params?: {
239
241
  cacheId?: string;
240
242
  platform?: string;
@@ -86,6 +86,15 @@ export declare const mergeRelationForms: (relationForms: {
86
86
  form_id: number;
87
87
  form_record_ids: number[];
88
88
  }[];
89
+ export interface CartOrderHolder {
90
+ customer_id?: number;
91
+ form_id: number | string;
92
+ form_record: (number | string)[] | null;
93
+ }
94
+ /**
95
+ * 为购物车行补齐订单所需的 holder 信息(与 cartAccount 结构保持一致)
96
+ */
97
+ export declare function ensureCartItemOriginHolder(cartItem: CartItem): void;
89
98
  export declare const getAllDiscountList: (cartItem: CartItem) => any;
90
99
  export declare function createUuidV4(): string;
91
100
  export declare function isTempOrder(data: any): data is ScanOrderTempOrder;
@@ -33,8 +33,9 @@ __export(utils_exports, {
33
33
  composeLinePrice: () => composeLinePrice,
34
34
  createDefaultOrderRulesHooks: () => createDefaultOrderRulesHooks,
35
35
  createDefaultTempOrder: () => createDefaultTempOrder,
36
- createEmptySummary: () => import_utils2.createEmptySummary,
36
+ createEmptySummary: () => import_utils3.createEmptySummary,
37
37
  createUuidV4: () => createUuidV4,
38
+ ensureCartItemOriginHolder: () => ensureCartItemOriginHolder,
38
39
  filterProductsForScanOrderMore: () => filterProductsForScanOrderMore,
39
40
  formatDateTime: () => formatDateTime,
40
41
  formatV1Product: () => formatV1Product,
@@ -50,8 +51,9 @@ __export(utils_exports, {
50
51
  module.exports = __toCommonJS(utils_exports);
51
52
  var import_dayjs = __toESM(require("dayjs"));
52
53
  var import_decimal = __toESM(require("decimal.js"));
53
- var import_utils = require("../../solution/ScanOrder/utils");
54
+ var import_utils = require("../Holder/utils");
54
55
  var import_utils2 = require("../../solution/ScanOrder/utils");
56
+ var import_utils3 = require("../../solution/ScanOrder/utils");
55
57
  function composeLinePrice(params) {
56
58
  const { mainPrice, bundle, useOriginalBundle } = params;
57
59
  let total = new import_decimal.default(Number(mainPrice) || 0);
@@ -113,7 +115,7 @@ function createDefaultOrderRulesHooks() {
113
115
  // 否则同 SKU 不同小料会在 calcDiscount 重组时互相覆盖。
114
116
  // 不透明 identity 契约下,normalizeOrderProduct / restoreTempOrderFromStorage 已保证 identity_key 必存在;
115
117
  // 留 fingerprint 分支仅作 Rules 单测里直接传裸 product 时的兜底。
116
- _id: product.identity_key ? `${product.product_id}_${product.product_variant_id}_${product.identity_key}` : `${product.product_id}_${product.product_variant_id}_${(0, import_utils.buildProductLineFingerprint)(
118
+ _id: product.identity_key ? `${product.product_id}_${product.product_variant_id}_${product.identity_key}` : `${product.product_id}_${product.product_variant_id}_${(0, import_utils2.buildProductLineFingerprint)(
117
119
  product.product_option_item,
118
120
  product.product_bundle
119
121
  )}`,
@@ -196,6 +198,30 @@ var mergeRelationForms = (relationForms) => {
196
198
  }, {})
197
199
  ).filter((item) => item.form_record_ids.length > 0);
198
200
  };
201
+ function resolveCartItemHolderCustomerId(cartItem) {
202
+ var _a, _b, _c;
203
+ const origin = cartItem._origin;
204
+ const account = (_a = origin == null ? void 0 : origin.metadata) == null ? void 0 : _a.account;
205
+ return ((_b = origin == null ? void 0 : origin.holder) == null ? void 0 : _b.customer_id) ?? ((_c = account == null ? void 0 : account._origin) == null ? void 0 : _c.customer_id) ?? (account == null ? void 0 : account.customer_id);
206
+ }
207
+ function ensureCartItemOriginHolder(cartItem) {
208
+ var _a;
209
+ if ((_a = cartItem == null ? void 0 : cartItem._origin) == null ? void 0 : _a.holder) {
210
+ return;
211
+ }
212
+ const holderConfig = (0, import_utils.getProductHolderConfig)(
213
+ (cartItem == null ? void 0 : cartItem._productInit) ?? (cartItem == null ? void 0 : cartItem._productOrigin)
214
+ );
215
+ const formRecordId = cartItem == null ? void 0 : cartItem.holder_id;
216
+ if (!(holderConfig == null ? void 0 : holderConfig.resource_id) || formRecordId == null) {
217
+ return;
218
+ }
219
+ cartItem._origin.holder = {
220
+ customer_id: resolveCartItemHolderCustomerId(cartItem),
221
+ form_id: holderConfig.resource_id,
222
+ form_record: [formRecordId]
223
+ };
224
+ }
199
225
  var getAllDiscountList = (cartItem) => {
200
226
  var _a, _b, _c, _d;
201
227
  let discountList = ((_b = (_a = cartItem == null ? void 0 : cartItem._origin) == null ? void 0 : _a.product) == null ? void 0 : _b.discount_list) || [];
@@ -378,7 +404,7 @@ function resolveSubmitCollectPax(tempOrder) {
378
404
  return normalizeSubmitCollectPaxValue((_a = tempOrder.metadata) == null ? void 0 : _a.collect_pax);
379
405
  }
380
406
  function createDefaultTempOrder(params) {
381
- const summary = params.summary || (0, import_utils.createEmptySummary)();
407
+ const summary = params.summary || (0, import_utils2.createEmptySummary)();
382
408
  return {
383
409
  order_id: null,
384
410
  relation_id: void 0,
@@ -437,7 +463,7 @@ function buildSubmitPayload(params) {
437
463
  enhance
438
464
  } = params;
439
465
  const scheduleDate = tempOrder.schedule_date || tempOrder.created_at || formatDateTime(now);
440
- const summary = tempOrder.summary || (0, import_utils.createEmptySummary)();
466
+ const summary = tempOrder.summary || (0, import_utils2.createEmptySummary)();
441
467
  const relationId = tempOrder.relation_id;
442
468
  const tableFormId = tempOrder.table_form_id;
443
469
  const bookingUuid = createUuidV4();
@@ -540,6 +566,7 @@ function formatV1Product(products) {
540
566
  createDefaultTempOrder,
541
567
  createEmptySummary,
542
568
  createUuidV4,
569
+ ensureCartItemOriginHolder,
543
570
  filterProductsForScanOrderMore,
544
571
  formatDateTime,
545
572
  formatV1Product,
@@ -16,6 +16,7 @@ export interface WindowPlugin extends Plugin {
16
16
  history: History;
17
17
  interaction?: any;
18
18
  getWalletPassEvaluator?: () => WalletPassEvaluator;
19
+ getLocalStorage?: (key: string) => string | null;
19
20
  }
20
21
  /**
21
22
  * 简单的 Storage 接口实现
@@ -367,7 +367,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
367
367
  };
368
368
  setOtherData(key: string, value: any): void;
369
369
  getOtherData(key: string): any;
370
- getProductTypeById(id: number): Promise<"normal" | "duration" | "session">;
370
+ getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
371
371
  /**
372
372
  * 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
373
373
  *
@@ -612,6 +612,7 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
612
612
  date,
613
613
  account
614
614
  }) {
615
+ var _a, _b;
615
616
  const {
616
617
  bundle,
617
618
  options,
@@ -644,12 +645,15 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
644
645
  }
645
646
  }
646
647
  try {
647
- this.store.holder.ensureFormByProduct({
648
- product: productData,
649
- customer_id: (account == null ? void 0 : account.id) ? Number(account.id) : 16121,
650
- shop_id: (productData == null ? void 0 : productData.shop_id) || "",
651
- useCache: true
652
- });
648
+ const customer = JSON.parse(((_b = (_a = this.window) == null ? void 0 : _a.getLocalStorage) == null ? void 0 : _b.call(_a, "customer")) || "{}");
649
+ if (customer == null ? void 0 : customer.id) {
650
+ this.store.holder.ensureFormByProduct({
651
+ product: productData,
652
+ customer_id: Number(customer.id),
653
+ shop_id: (productData == null ? void 0 : productData.shop_id) || "",
654
+ useCache: true
655
+ });
656
+ }
653
657
  } catch (error) {
654
658
  console.error("[BookingByStep] 加载 holder 表单失败", error);
655
659
  }
@@ -7,6 +7,7 @@ import type { OpenDataAvailabilityResult } from '../../modules/OpenData';
7
7
  import type { ProductData } from '../../modules/Product/types';
8
8
  import { type CartItemSummary, type PaxInfo, type QuantityCheckResult, type QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
9
9
  import type { StrategyConfig } from '../../model/strategy/type';
10
+ import type { IAppendFormRecordParams } from '../../modules/Holder/types';
10
11
  export * from './types';
11
12
  interface VenueBookingItemRuleRuntimeConfig {
12
13
  strategyConfigs?: StrategyConfig[];
@@ -52,6 +53,13 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
52
53
  constructor(name?: string, version?: string);
53
54
  private normalizeCustomerId;
54
55
  private resolveCustomerIdFromLoginPayload;
56
+ private resolveHolderCustomerId;
57
+ private ensureProductHolderForm;
58
+ /**
59
+ * 按商品 holder_config 预加载表单数据到 holderMap。
60
+ * appointment_booking 在加购时触发;venueBooking 在商品加载后预加载,避免 getHolderFormMap 为空。
61
+ */
62
+ private preloadHolderForms;
55
63
  private clearLoginEffectListeners;
56
64
  private registerLoginEffect;
57
65
  private registerCustomerLoginListeners;
@@ -193,6 +201,15 @@ export declare class VenueBookingImpl extends BaseModule implements Module {
193
201
  setUIState(key: string, value: any): void;
194
202
  getUIState<T = any>(key: string): T | undefined;
195
203
  deleteUIState(key: string): void;
204
+ setBookingHolder(bookingUid: string, holder: any): void;
205
+ /**
206
+ * 获取 holder 表单 map
207
+ */
208
+ getHolderFormMap(): import("../../modules/Holder").HolderFormMap;
209
+ /**
210
+ * 添加表单记录
211
+ */
212
+ appendFormRecord(params: IAppendFormRecordParams): import("../../modules/Holder").IFormRecord;
196
213
  checkOpenDataAvailability(): Promise<OpenDataAvailabilityResult>;
197
214
  setOtherParams(params: Record<string, any>, { cover }?: {
198
215
  cover?: boolean;
@@ -54,6 +54,8 @@ var import_utils3 = require("../../modules/Order/utils");
54
54
  var import_Order = require("../../modules/Order");
55
55
  var import_types4 = require("../RegisterAndLogin/types");
56
56
  var import_decimal = __toESM(require("decimal.js"));
57
+ var import_Holder = require("../../modules/Holder");
58
+ var import_utils4 = require("../../modules/Holder/utils");
57
59
  __reExport(VenueBooking_exports, require("./types"), module.exports);
58
60
  var OPEN_DATA_SECTION_CODES = [
59
61
  "basic",
@@ -253,6 +255,46 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
253
255
  }
254
256
  return null;
255
257
  }
258
+ resolveHolderCustomerId() {
259
+ var _a, _b;
260
+ const customer = JSON.parse(((_b = (_a = this.window) == null ? void 0 : _a.getLocalStorage) == null ? void 0 : _b.call(_a, "customer")) || "{}");
261
+ if (customer == null ? void 0 : customer.id)
262
+ return Number(customer.id);
263
+ return void 0;
264
+ }
265
+ async ensureProductHolderForm(product) {
266
+ if (!product)
267
+ return;
268
+ await this.preloadHolderForms([product]);
269
+ }
270
+ /**
271
+ * 按商品 holder_config 预加载表单数据到 holderMap。
272
+ * appointment_booking 在加购时触发;venueBooking 在商品加载后预加载,避免 getHolderFormMap 为空。
273
+ */
274
+ async preloadHolderForms(products) {
275
+ if (!this.store.holder || !products.length)
276
+ return;
277
+ const seenFormIds = /* @__PURE__ */ new Set();
278
+ for (const product of products) {
279
+ const holderConfig = (0, import_utils4.getProductHolderConfig)(product);
280
+ if (!holderConfig)
281
+ continue;
282
+ const formId = (0, import_utils4.getFormIdFromHolderConfig)(holderConfig);
283
+ if (seenFormIds.has(formId))
284
+ continue;
285
+ seenFormIds.add(formId);
286
+ try {
287
+ await this.store.holder.ensureFormByProduct({
288
+ product,
289
+ customer_id: this.resolveHolderCustomerId(),
290
+ shop_id: product.shop_id,
291
+ useCache: true
292
+ });
293
+ } catch (error) {
294
+ console.error("[VenueBooking] 预加载 holder 表单失败", { formId, error });
295
+ }
296
+ }
297
+ }
256
298
  clearLoginEffectListeners() {
257
299
  for (const dispose of this.loginEffectDisposers) {
258
300
  dispose();
@@ -326,7 +368,7 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
326
368
  }
327
369
  }
328
370
  async initialize(core, options = {}) {
329
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
371
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
330
372
  this.logMethodStart("initialize");
331
373
  this.core = core;
332
374
  this.initializeOptions = options || {};
@@ -451,20 +493,42 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
451
493
  cacheId: (_g = this.otherParams) == null ? void 0 : _g.cacheId
452
494
  }
453
495
  });
496
+ let holderCacheState;
497
+ if ((_h = this.otherParams) == null ? void 0 : _h.cacheId) {
498
+ const sessionData = this.window.sessionStorage.getItem(this.name);
499
+ if (sessionData) {
500
+ try {
501
+ const data = JSON.parse(sessionData);
502
+ holderCacheState = (_i = data[this.otherParams.cacheId]) == null ? void 0 : _i[`${this.name}_holder`];
503
+ } catch {
504
+ }
505
+ }
506
+ }
507
+ const holderModule = new import_Holder.HolderModule(`${this.name}_holder`);
508
+ this.store.holder = holderModule;
509
+ this.core.registerModule(holderModule, {
510
+ initialState: holderCacheState,
511
+ otherParams: {
512
+ ...this.otherParams,
513
+ fatherModule: this.name,
514
+ openCache: !!((_j = this.otherParams) == null ? void 0 : _j.cacheId),
515
+ cacheId: (_k = this.otherParams) == null ? void 0 : _k.cacheId
516
+ }
517
+ });
454
518
  if (this.store.scanOrderLogger) {
455
519
  this.store.scanOrderLogger.setContext(this.getLoggerContext());
456
520
  }
457
521
  this.registerCustomerLoginListeners();
458
522
  console.log("[VenueBooking] 初始化开始");
459
523
  try {
460
- await ((_h = this.store.order) == null ? void 0 : _h.recalculateSummary({ createIfMissing: false }));
461
- (_i = this.store.order) == null ? void 0 : _i.persistTempOrder();
524
+ await ((_l = this.store.order) == null ? void 0 : _l.recalculateSummary({ createIfMissing: false }));
525
+ (_m = this.store.order) == null ? void 0 : _m.persistTempOrder();
462
526
  await this.loadRuntimeConfigs();
463
527
  if (this.store.schedule) {
464
528
  await this.store.schedule.loadAllSchedule();
465
529
  this.injectScheduleResolverToQuotation();
466
- (_k = this.store.quotation) == null ? void 0 : _k.loadQuotations({
467
- channel: (_j = this.otherParams) == null ? void 0 : _j.channel
530
+ (_o = this.store.quotation) == null ? void 0 : _o.loadQuotations({
531
+ channel: (_n = this.otherParams) == null ? void 0 : _n.channel
468
532
  });
469
533
  }
470
534
  await this.refreshItemRuleQuantityLimits();
@@ -580,6 +644,7 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
580
644
  }
581
645
  this.store.addonProducts.addProduct(addonList);
582
646
  this.resourceProductMap = (0, import_resource.buildResourceProductMap)(venueList);
647
+ await this.preloadHolderForms(venueList);
583
648
  this.productsLoaded = true;
584
649
  this.logMethodSuccess("loadAllProducts", {
585
650
  total: list.length,
@@ -1009,6 +1074,7 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
1009
1074
  const childRawResources = this.getCombinedChildRawResources(rawResource);
1010
1075
  const venueProduct = this.getVenueProducts().find((p) => p.id === mapping.productId);
1011
1076
  tempOrder.bookings = tempOrder.bookings || [];
1077
+ await this.ensureProductHolderForm(venueProduct);
1012
1078
  for (let i = 0; i < merged.length; i++) {
1013
1079
  const group = merged[i];
1014
1080
  const identityKey = (0, import_slotMerge.buildVenueIdentityKey)(resourceId, i);
@@ -1080,7 +1146,9 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
1080
1146
  product_option_item: [],
1081
1147
  discount_list: [],
1082
1148
  custom_deposit_data: customDepositData,
1083
- metadata: {}
1149
+ metadata: {},
1150
+ holder_config: venueProduct == null ? void 0 : venueProduct.holder_config,
1151
+ bookingUuid
1084
1152
  },
1085
1153
  sub_type: "minutes",
1086
1154
  duration,
@@ -1896,6 +1964,46 @@ var _VenueBookingImpl = class extends import_BaseModule.BaseModule {
1896
1964
  this.writeUIStateBucket(bucket);
1897
1965
  }
1898
1966
  }
1967
+ setBookingHolder(bookingUid, holder) {
1968
+ var _a, _b, _c, _d;
1969
+ if (!this.store.order)
1970
+ return;
1971
+ const tempOrder = this.store.order.ensureTempOrder();
1972
+ const booking = (_a = tempOrder.bookings) == null ? void 0 : _a.find(
1973
+ (b) => {
1974
+ var _a2;
1975
+ return ((_a2 = b.metadata) == null ? void 0 : _a2.unique_identification_number) === bookingUid;
1976
+ }
1977
+ );
1978
+ if (booking) {
1979
+ booking.holder = holder;
1980
+ }
1981
+ for (const product of tempOrder.products) {
1982
+ const productBookingUid = ((_b = product.metadata) == null ? void 0 : _b.booking_uid) ?? ((_d = (_c = product._origin) == null ? void 0 : _c.product) == null ? void 0 : _d.bookingUuid);
1983
+ if (String(productBookingUid) !== String(bookingUid))
1984
+ continue;
1985
+ const origin = product._origin && typeof product._origin === "object" ? product._origin : {};
1986
+ origin.holder = holder;
1987
+ product._origin = origin;
1988
+ }
1989
+ this.store.order.notifyTempOrderChanged();
1990
+ }
1991
+ /**
1992
+ * 获取 holder 表单 map
1993
+ */
1994
+ getHolderFormMap() {
1995
+ if (!this.store.holder)
1996
+ throw new Error("[VenueBooking] holder 模块未初始化");
1997
+ return this.store.holder.getHolderFormMap();
1998
+ }
1999
+ /**
2000
+ * 添加表单记录
2001
+ */
2002
+ appendFormRecord(params) {
2003
+ if (!this.store.holder)
2004
+ throw new Error("[VenueBooking] holder 模块未初始化");
2005
+ return this.store.holder.appendFormRecord(params);
2006
+ }
1899
2007
  // ─── OpenData 可用性 ───
1900
2008
  async checkOpenDataAvailability() {
1901
2009
  if (!this.store.openData)
@@ -1,5 +1,6 @@
1
1
  import { OrderModule, ProductList, SalesSummaryModule, ScanOrderLogInput, ScanOrderLoggerModule, ScanOrderLoggerProviderConfig, ScanOrderLoggerProviderType, DateModule, ScheduleModule, QuotationModule, OpenDataModule } from '../../modules';
2
2
  import type { QuantityCheckResult, QuantityLimitResult } from '../../model/strategy/adapter/itemRule';
3
+ import { HolderModule } from '../../modules/Holder';
3
4
  export type { ScanOrderOrderProductIdentity, ScanOrderOrderProduct, ScanOrderSubmitProduct, ScanOrderSummary, ScanOrderTempOrder, ScanOrderSubmitPayload, } from '../ScanOrder/types';
4
5
  export declare enum VenueBookingHooks {
5
6
  onInited = "venueBooking:onInited",
@@ -145,6 +146,7 @@ export interface VenueBookingState {
145
146
  passed: boolean | null;
146
147
  failures: QuantityCheckResult[];
147
148
  };
149
+ holder?: HolderModule;
148
150
  }
149
151
  export interface VenueBookingLoggerRuntimeConfig {
150
152
  provider?: ScanOrderLoggerProviderType;
@@ -6,6 +6,7 @@ export interface Plugin {
6
6
  version: string;
7
7
  initialize: () => Promise<void> | void;
8
8
  destroy?: () => Promise<void> | void;
9
+ getLocalStorage?: (key: string) => string | null;
9
10
  }
10
11
  export interface PluginOptions {
11
12
  dependencies?: string[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.549",
4
+ "version": "0.0.551",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,md}\"",
19
19
  "changeset": "changeset",
20
20
  "version": "changeset version",
21
- "release": "changeset publish --registry=https://registry.npmjs.com/ && npm run sync && git push",
21
+ "release": "changeset publish && npm run sync && git push",
22
22
  "example": "npx parcel-bundler examples/index.html",
23
23
  "docs": "typedoc --out docs src/index.ts",
24
24
  "sync": "node sync.js",