@pisell/private-materials 6.12.361 → 6.12.363

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.
Files changed (68) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +6 -6
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +6 -6
  9. package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
  10. package/es/components/bigSale/components/ProductList/index.js +1 -0
  11. package/es/components/bigSale/components/TimeBar/index.js +1 -0
  12. package/es/components/bigSale/dialog.js +1 -0
  13. package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
  14. package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
  15. package/es/components/bigSale/index.js +1 -0
  16. package/es/components/bigSale/templates/Kiosk/index.js +1 -0
  17. package/es/components/scanOrder/components/Check/index.js +95 -84
  18. package/es/components/scanOrder/locales.js +15 -0
  19. package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
  20. package/es/index.js +2 -0
  21. package/es/plus/multiCurrencySettlement/index.js +1 -1
  22. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  23. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  24. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  25. package/es/plus/pisellReservation/index.js +17 -0
  26. package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
  27. package/es/plus/saleDetail/Base.js +1 -0
  28. package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
  29. package/es/plus/saleDetail/components/DetailActions/PrintAction.js +1 -0
  30. package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
  31. package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
  32. package/es/plus/saleDetail/index.js +1 -0
  33. package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
  34. package/es/plus/saleDetail/tmpl/B/index.js +1 -0
  35. package/es/plus/salesSdk/bookingEditService/BookingEditHolderField.js +66 -27
  36. package/es/plus/salesSdk/index.js +54 -0
  37. package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
  38. package/es/plus/salesSdk/utils/bookingDate.js +1 -1
  39. package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
  40. package/es/plus/skuOptionsSelection/utils/normalizeSelectorLayout.js +15 -0
  41. package/es/plus/skuOptionsSelection/utils/resolveCollectionLayout.js +2 -2
  42. package/es/plus/walletEditor/WalletEditor.js +19 -5
  43. package/es/plus/walletEditor/components/PassDisplayConfig/index.js +60 -0
  44. package/es/plus/walletEditor/components/PassDisplayConfig/index.less +27 -0
  45. package/es/plus/walletEditor/components/PassDisplayConfig/serve.js +18 -0
  46. package/es/plus/walletEditor/index.d.ts +1 -1
  47. package/es/plus/walletEditor/locales.js +40 -0
  48. package/es/plus/walletEditor/types.d.ts +8 -1
  49. package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
  50. package/es/plus/walletPassGallery/index.js +11 -6
  51. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  52. package/es/pro/Login2.0/index.d.ts +2 -2
  53. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  54. package/lib/components/scanOrder/components/Check/index.js +94 -83
  55. package/lib/components/scanOrder/locales.js +15 -0
  56. package/lib/plus/salesSdk/bookingEditService/BookingEditHolderField.js +65 -26
  57. package/lib/plus/skuOptionsSelection/utils/normalizeSelectorLayout.js +15 -0
  58. package/lib/plus/skuOptionsSelection/utils/resolveCollectionLayout.js +2 -2
  59. package/lib/plus/walletEditor/WalletEditor.js +19 -5
  60. package/lib/plus/walletEditor/components/PassDisplayConfig/index.js +62 -0
  61. package/lib/plus/walletEditor/components/PassDisplayConfig/index.less +27 -0
  62. package/lib/plus/walletEditor/components/PassDisplayConfig/serve.js +18 -0
  63. package/lib/plus/walletEditor/index.d.ts +1 -1
  64. package/lib/plus/walletEditor/locales.js +40 -0
  65. package/lib/plus/walletEditor/types.d.ts +8 -1
  66. package/lib/plus/walletPassGallery/index.js +11 -6
  67. package/package.json +3 -3
  68. package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
@@ -11,6 +11,7 @@ const require_index$3 = require("./components/sortableWalletPassTypes/index.js")
11
11
  const require_index$4 = require("./components/ValidityPeriodSelector/index.js");
12
12
  const require_index$5 = require("./components/relationProduct/index.js");
13
13
  const require_index$6 = require("./components/MobileWalletTemplate/index.js");
14
+ const require_index$7 = require("./components/PassDisplayConfig/index.js");
14
15
  let react = require("react");
15
16
  react = require_runtime.__toESM(react);
16
17
  let antd = require("antd");
@@ -19,13 +20,14 @@ let _pisell_materials = require("@pisell/materials");
19
20
  require("./WalletEditor.less");
20
21
  //#region src/plus/walletEditor/WalletEditor.tsx
21
22
  const WalletEditor = (0, react.forwardRef)((props, ref) => {
22
- var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _context$appHelper$ut6, _store$global;
23
+ var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5, _context$appHelper$ut6, _store$global, _context$appHelper2, _context$appHelper2$g;
23
24
  const { value, onChange, disabled = false, className, style } = props;
24
25
  const context = require_useEngineContext.default();
25
26
  if ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.request) require_index.request.setRequest(context.appHelper.utils.request);
26
27
  _pisell_utils.locales.init(require_locales.default, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get("umi_locale")) || "en");
27
28
  const amountSymbol = ((_context$appHelper$ut2 = (_context$appHelper$ut3 = context.appHelper.utils).getData) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.call(_context$appHelper$ut3, "shop_symbol")) || "";
28
29
  const shopName = ((_store$global = (((_context$appHelper$ut4 = (_context$appHelper$ut5 = context.appHelper.utils).getStore) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.call(_context$appHelper$ut5)) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut6 = _context$appHelper$ut4.getState) === null || _context$appHelper$ut6 === void 0 ? void 0 : _context$appHelper$ut6.call(_context$appHelper$ut4)) || {}).global) === null || _store$global === void 0 || (_store$global = _store$global.shopDetail) === null || _store$global === void 0 ? void 0 : _store$global.name) || "";
30
+ const hasFranchisor = Boolean((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.businessUtils) === null || _context$appHelper2 === void 0 || (_context$appHelper2$g = _context$appHelper2.getAppByModal) === null || _context$appHelper2$g === void 0 ? void 0 : _context$appHelper2$g.call(_context$appHelper2, "franchisor"));
29
31
  const [sendConfigVisible, setSendConfigVisible] = (0, react.useState)(true);
30
32
  const [previewVisible, setPreviewVisible] = (0, react.useState)(false);
31
33
  const [form] = antd.Form.useForm();
@@ -120,7 +122,19 @@ const WalletEditor = (0, react.forwardRef)((props, ref) => {
120
122
  }, /* @__PURE__ */ react.default.createElement(_pisell_materials.Translation, null)), /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
121
123
  label: _pisell_utils.locales.getText("validityPeriod"),
122
124
  name: "valid_for"
123
- }, /* @__PURE__ */ react.default.createElement(require_index$4.default, null)), /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
125
+ }, /* @__PURE__ */ react.default.createElement(require_index$4.default, null)), hasFranchisor && /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
126
+ label: _pisell_utils.locales.getText("passesShownInWallet"),
127
+ name: ["metadata", "pass_visibility"],
128
+ rules: [{ validator: function() {
129
+ var _ref2 = require_asyncToGenerator._asyncToGenerator(function* (_, value) {
130
+ var _value$shop_ids;
131
+ if ((value === null || value === void 0 ? void 0 : value.type) === "selected_franchisees" && !((_value$shop_ids = value.shop_ids) === null || _value$shop_ids === void 0 ? void 0 : _value$shop_ids.length)) throw new Error(_pisell_utils.locales.getText("passIssuerShopsRequired"));
132
+ });
133
+ return function validator(_x3, _x4) {
134
+ return _ref2.apply(this, arguments);
135
+ };
136
+ }() }]
137
+ }, /* @__PURE__ */ react.default.createElement(require_index$7.default, { disabled })), /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
124
138
  label: _pisell_utils.locales.getText("linkedPasses"),
125
139
  name: "relation_id",
126
140
  initialValue: []
@@ -129,7 +143,7 @@ const WalletEditor = (0, react.forwardRef)((props, ref) => {
129
143
  name: ["metadata", "holder"],
130
144
  initialValue: { type: "customer" },
131
145
  rules: [{ validator: function() {
132
- var _ref2 = require_asyncToGenerator._asyncToGenerator(function* (_, value) {
146
+ var _ref3 = require_asyncToGenerator._asyncToGenerator(function* (_, value) {
133
147
  if ((value === null || value === void 0 ? void 0 : value.type) === "custom") {
134
148
  var _value$custom, _holderSelectorRef$cu, _holderSelectorRef$cu2;
135
149
  if (!(value === null || value === void 0 || (_value$custom = value.custom) === null || _value$custom === void 0 ? void 0 : _value$custom.custom_id)) return Promise.reject(new Error(_pisell_utils.locales.getText("pisell2.wallet-editor.holder.required")));
@@ -141,8 +155,8 @@ const WalletEditor = (0, react.forwardRef)((props, ref) => {
141
155
  }
142
156
  return Promise.resolve();
143
157
  });
144
- return function validator(_x3, _x4) {
145
- return _ref2.apply(this, arguments);
158
+ return function validator(_x5, _x6) {
159
+ return _ref3.apply(this, arguments);
146
160
  };
147
161
  }() }]
148
162
  }, /* @__PURE__ */ react.default.createElement(HolderSelector, { ref: holderSelectorRef })), /* @__PURE__ */ react.default.createElement(antd.Form.Item, {
@@ -0,0 +1,62 @@
1
+ const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
2
+ const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
3
+ const require_serve = require("./serve.js");
4
+ let react = require("react");
5
+ react = require_runtime.__toESM(react);
6
+ let antd = require("antd");
7
+ let _pisell_utils = require("@pisell/utils");
8
+ let ahooks = require("ahooks");
9
+ require("./index.less");
10
+ //#region src/plus/walletEditor/components/PassDisplayConfig/index.tsx
11
+ const PassDisplayConfig = ({ id, value = {
12
+ type: "self",
13
+ shop_ids: []
14
+ }, onChange, disabled = false }) => {
15
+ const { data: shops = [], loading, error, refresh } = (0, ahooks.useRequest)(require_serve.getFranchiseeShops, { ready: value.type === "selected_franchisees" });
16
+ return /* @__PURE__ */ react.default.createElement("div", {
17
+ id,
18
+ className: "wallet-pass-display-config"
19
+ }, /* @__PURE__ */ react.default.createElement("div", { className: "wallet-pass-display-config__label" }, _pisell_utils.locales.getText("showPassesIssuedBy")), /* @__PURE__ */ react.default.createElement("div", {
20
+ role: "radiogroup",
21
+ "aria-label": _pisell_utils.locales.getText("showPassesIssuedBy")
22
+ }, /* @__PURE__ */ react.default.createElement(antd.Radio.Group, {
23
+ className: "wallet-pass-display-config__scope",
24
+ value: value.type,
25
+ onChange: (event) => onChange === null || onChange === void 0 ? void 0 : onChange(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, value), {}, { type: event.target.value })),
26
+ disabled
27
+ }, /* @__PURE__ */ react.default.createElement(antd.Radio, {
28
+ value: "self",
29
+ className: "wallet-pass-display-config__option"
30
+ }, _pisell_utils.locales.getText("passIssuerCurrentShop")), /* @__PURE__ */ react.default.createElement(antd.Radio, {
31
+ value: "all_franchisees",
32
+ className: "wallet-pass-display-config__option"
33
+ }, _pisell_utils.locales.getText("passIssuerAllShops")), /* @__PURE__ */ react.default.createElement(antd.Radio, {
34
+ value: "selected_franchisees",
35
+ className: "wallet-pass-display-config__option"
36
+ }, _pisell_utils.locales.getText("passIssuerSpecifiedShops")))), value.type === "selected_franchisees" && /* @__PURE__ */ react.default.createElement("div", { className: "wallet-pass-display-config__shops" }, /* @__PURE__ */ react.default.createElement(antd.Select, {
37
+ className: "wallet-pass-display-config__shop-select",
38
+ mode: "multiple",
39
+ allowClear: true,
40
+ showSearch: true,
41
+ optionFilterProp: "name",
42
+ maxTagCount: "responsive",
43
+ placeholder: _pisell_utils.locales.getText("passIssuerSelectShops"),
44
+ "aria-label": _pisell_utils.locales.getText("passIssuerSelectShops"),
45
+ options: shops,
46
+ fieldNames: {
47
+ value: "source_shop_id",
48
+ label: "name"
49
+ },
50
+ loading,
51
+ notFoundContent: error && !loading ? /* @__PURE__ */ react.default.createElement(antd.Button, {
52
+ type: "link",
53
+ size: "small",
54
+ onClick: refresh
55
+ }, _pisell_utils.locales.getText("passIssuerLoadFailedRetry")) : void 0,
56
+ value: value.shop_ids,
57
+ onChange: (shop_ids) => onChange === null || onChange === void 0 ? void 0 : onChange(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, value), {}, { shop_ids })),
58
+ disabled
59
+ })));
60
+ };
61
+ //#endregion
62
+ exports.default = PassDisplayConfig;
@@ -0,0 +1,27 @@
1
+ .wallet-pass-display-config {
2
+ &__label {
3
+ margin-bottom: 8px;
4
+ color: var(--Gray-600, #475467);
5
+ font-size: 14px;
6
+ line-height: 22px;
7
+ }
8
+
9
+ [role='radiogroup'] .wallet-pass-display-config__scope {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 8px;
13
+
14
+ .wallet-pass-display-config__option {
15
+ margin: 0;
16
+ }
17
+ }
18
+
19
+ &__shops {
20
+ margin-top: 12px;
21
+ padding-left: 24px;
22
+
23
+ .wallet-pass-display-config__shop-select {
24
+ width: 100%;
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,18 @@
1
+ const require_asyncToGenerator = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js");
2
+ const require_index = require("../../../../utils/index.js");
3
+ //#region src/plus/walletEditor/components/PassDisplayConfig/serve.ts
4
+ const getFranchiseeShops = function() {
5
+ var _ref = require_asyncToGenerator._asyncToGenerator(function* () {
6
+ const { data } = yield require_index.request.getRequest().get("/shop/franchisor/shop", {
7
+ skip: 1,
8
+ num: 199,
9
+ status: "approved"
10
+ }, { isShopApi: true });
11
+ return data.list;
12
+ });
13
+ return function getFranchiseeShops() {
14
+ return _ref.apply(this, arguments);
15
+ };
16
+ }();
17
+ //#endregion
18
+ exports.getFranchiseeShops = getFranchiseeShops;
@@ -1,2 +1,2 @@
1
- import { MultiLanguageTitle, SendConfig, ShowcaseWalletPassItem, ValidForConfig, WalletEditorProps, WalletEditorRef, WalletEditorValue, WalletMetadata, WalletPassType } from "./types.js";
1
+ import { MultiLanguageTitle, PassDisplayConfigValue, SendConfig, ShowcaseWalletPassItem, ValidForConfig, WalletEditorProps, WalletEditorRef, WalletEditorValue, WalletMetadata, WalletPassType } from "./types.js";
2
2
  import { WalletEditor } from "./WalletEditor.js";
@@ -3,6 +3,14 @@ var locales_default = {
3
3
  en: {
4
4
  walletName: "Wallet name",
5
5
  validityPeriod: "Validity Period",
6
+ passesShownInWallet: "Passes shown in this Wallet:",
7
+ showPassesIssuedBy: "Show passes issued by:",
8
+ passIssuerCurrentShop: "Current store",
9
+ passIssuerAllShops: "All stores in the chain",
10
+ passIssuerSpecifiedShops: "Specified stores",
11
+ passIssuerSelectShops: "Select stores",
12
+ passIssuerShopsRequired: "Please select at least one store",
13
+ passIssuerLoadFailedRetry: "Failed to load stores. Click to retry.",
6
14
  linkedPasses: "Linked passes",
7
15
  linkedPassesDesc: "Select the passes that will be available in this Wallet.",
8
16
  sort: "Sort",
@@ -54,6 +62,14 @@ var locales_default = {
54
62
  "zh-CN": {
55
63
  walletName: "钱包名称",
56
64
  validityPeriod: "有效期",
65
+ passesShownInWallet: "此钱包中显示的卡券:",
66
+ showPassesIssuedBy: "显示由以下门店发放的卡券:",
67
+ passIssuerCurrentShop: "当前门店",
68
+ passIssuerAllShops: "连锁内所有门店",
69
+ passIssuerSpecifiedShops: "指定门店",
70
+ passIssuerSelectShops: "选择门店",
71
+ passIssuerShopsRequired: "请至少选择一个门店",
72
+ passIssuerLoadFailedRetry: "门店加载失败,点击重试",
57
73
  linkedPasses: "包含的卡券",
58
74
  linkedPassesDesc: "选择此 Wallet 中可展示与使用的卡券。",
59
75
  sort: "排序",
@@ -105,6 +121,14 @@ var locales_default = {
105
121
  "zh-HK": {
106
122
  walletName: "錢包名稱",
107
123
  validityPeriod: "有效期",
124
+ passesShownInWallet: "此錢包中顯示的卡券:",
125
+ showPassesIssuedBy: "顯示由以下門店發放的卡券:",
126
+ passIssuerCurrentShop: "目前門店",
127
+ passIssuerAllShops: "連鎖內所有門店",
128
+ passIssuerSpecifiedShops: "指定門店",
129
+ passIssuerSelectShops: "選擇門店",
130
+ passIssuerShopsRequired: "請至少選擇一個門店",
131
+ passIssuerLoadFailedRetry: "門店載入失敗,點擊重試",
108
132
  linkedPasses: "包含的卡券",
109
133
  linkedPassesDesc: "選擇此 Wallet 中可展示與使用的卡券。",
110
134
  sort: "排序",
@@ -156,6 +180,14 @@ var locales_default = {
156
180
  ja: {
157
181
  walletName: "ウォレット名",
158
182
  validityPeriod: "有効期間",
183
+ passesShownInWallet: "このウォレットに表示するパス:",
184
+ showPassesIssuedBy: "次の店舗が発行したパスを表示:",
185
+ passIssuerCurrentShop: "現在の店舗",
186
+ passIssuerAllShops: "チェーン内のすべての店舗",
187
+ passIssuerSpecifiedShops: "指定した店舗",
188
+ passIssuerSelectShops: "店舗を選択",
189
+ passIssuerShopsRequired: "店舗を1つ以上選択してください",
190
+ passIssuerLoadFailedRetry: "店舗を読み込めませんでした。クリックして再試行。",
159
191
  linkedPasses: "リンクされたパス",
160
192
  linkedPassesDesc: "このウォレットで利用可能なパスを選択します。",
161
193
  sort: "並び替え",
@@ -207,6 +239,14 @@ var locales_default = {
207
239
  pt: {
208
240
  walletName: "Nome da carteira",
209
241
  validityPeriod: "Período de Validade",
242
+ passesShownInWallet: "Passes exibidos nesta carteira:",
243
+ showPassesIssuedBy: "Mostrar passes emitidos por:",
244
+ passIssuerCurrentShop: "Loja atual",
245
+ passIssuerAllShops: "Todas as lojas da rede",
246
+ passIssuerSpecifiedShops: "Lojas específicas",
247
+ passIssuerSelectShops: "Selecionar lojas",
248
+ passIssuerShopsRequired: "Selecione pelo menos uma loja",
249
+ passIssuerLoadFailedRetry: "Falha ao carregar lojas. Clique para tentar novamente.",
210
250
  linkedPasses: "Passes vinculados",
211
251
  linkedPassesDesc: "Selecione os passes que estarão disponíveis nesta Carteira.",
212
252
  sort: "Ordenar",
@@ -27,6 +27,12 @@ interface SendConfig {
27
27
  type: string;
28
28
  [key: string]: any;
29
29
  }
30
+ /** 在原展示范围上追加子店卡券的配置。 */
31
+ interface PassDisplayConfigValue {
32
+ type: 'self' | 'all_franchisees' | 'selected_franchisees';
33
+ /** 仅 selected_franchisees 使用,其他模式忽略。 */
34
+ shop_ids?: number[];
35
+ }
30
36
  interface WalletMetadata {
31
37
  mobile_wallet_id?: string | number;
32
38
  showcaseWalletPass?: string[];
@@ -35,6 +41,7 @@ interface WalletMetadata {
35
41
  customerName?: string;
36
42
  coverImage?: string;
37
43
  send_config?: SendConfig;
44
+ pass_visibility?: PassDisplayConfigValue;
38
45
  }
39
46
  interface WalletEditorValue {
40
47
  name?: MultiLanguageTitle;
@@ -56,4 +63,4 @@ interface WalletEditorProps {
56
63
  style?: React.CSSProperties;
57
64
  }
58
65
  //#endregion
59
- export { MultiLanguageTitle, SendConfig, ShowcaseWalletPassItem, ValidForConfig, WalletEditorProps, WalletEditorRef, WalletEditorValue, WalletMetadata, WalletPassType };
66
+ export { MultiLanguageTitle, PassDisplayConfigValue, SendConfig, ShowcaseWalletPassItem, ValidForConfig, WalletEditorProps, WalletEditorRef, WalletEditorValue, WalletMetadata, WalletPassType };
@@ -45,7 +45,7 @@ const KEYS = {
45
45
  const ARow = antd.Row;
46
46
  const ACol = antd.Col;
47
47
  const WalletPassGallery = (props) => {
48
- var _context$appHelper, _context$appHelper2, _context$engine, _utils$translation, _getWalletDetail$data;
48
+ var _context$appHelper, _context$appHelper2, _utils$businessUtils, _utils$businessUtils$, _context$engine, _utils$translation, _getWalletDetail$data;
49
49
  const { hideAddButton, hideTitle, customer, platform: platformProp } = props;
50
50
  const [activeKey, setActiveKey] = (0, react.useState)("available");
51
51
  const [currentItemId, setCurrentItemId] = (0, react.useState)(void 0);
@@ -56,6 +56,7 @@ const WalletPassGallery = (props) => {
56
56
  const context = require_useEngineContext.default();
57
57
  const utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
58
58
  const { apiPrefix } = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.constants) || { apiPrefix: "/h5" };
59
+ const includeFranchiseePasses = Boolean((_utils$businessUtils = utils.businessUtils) === null || _utils$businessUtils === void 0 || (_utils$businessUtils$ = _utils$businessUtils.getAppByModal) === null || _utils$businessUtils$ === void 0 ? void 0 : _utils$businessUtils$.call(_utils$businessUtils, "franchisor"));
59
60
  const { isTerminal, isApp, interaction, action, isWebPos } = utils;
60
61
  const isTerminalEnv = (typeof isTerminal === "function" ? isTerminal() : !!isTerminal) || (isApp === null || isApp === void 0 ? void 0 : isApp());
61
62
  const platform = (0, react.useMemo)(() => {
@@ -72,7 +73,7 @@ const WalletPassGallery = (props) => {
72
73
  const _searchParams = new URLSearchParams(window.location.search);
73
74
  const walletId = _searchParams.get("id");
74
75
  const holderId = _searchParams.get("holder_id");
75
- const res = yield require_serve.getWalletPassList(require_objectSpread2._objectSpread2({
76
+ const res = yield require_serve.getWalletPassList(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
76
77
  available: 1,
77
78
  num: 20,
78
79
  skip: (d === null || d === void 0 ? void 0 : d.nextId) || 1,
@@ -86,7 +87,7 @@ const WalletPassGallery = (props) => {
86
87
  ],
87
88
  customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
88
89
  limit_status: "enable"
89
- }, isWebPos ? { with_franchisor_data: true } : {}), { apiPrefix });
90
+ }, isWebPos ? { with_franchisor_data: true } : {}), {}, { include_franchisee_passes: includeFranchiseePasses ? 1 : void 0 }), { apiPrefix });
90
91
  return {
91
92
  list: (res === null || res === void 0 ? void 0 : res.list) || [],
92
93
  count: (res === null || res === void 0 ? void 0 : res.count) || 0,
@@ -109,7 +110,7 @@ const WalletPassGallery = (props) => {
109
110
  const _searchParams = new URLSearchParams(window.location.search);
110
111
  const walletId = _searchParams.get("id");
111
112
  const holderId = _searchParams.get("holder_id");
112
- const res = yield require_serve.getWalletPassList(require_objectSpread2._objectSpread2({
113
+ const res = yield require_serve.getWalletPassList(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
113
114
  available: 0,
114
115
  num: 20,
115
116
  skip: (d === null || d === void 0 ? void 0 : d.nextId) || 1,
@@ -123,7 +124,7 @@ const WalletPassGallery = (props) => {
123
124
  ],
124
125
  customer_id: customer === null || customer === void 0 ? void 0 : customer.id,
125
126
  limit_status: "enable"
126
- }, isWebPos ? { with_franchisor_data: true } : {}), { apiPrefix });
127
+ }, isWebPos ? { with_franchisor_data: true } : {}), {}, { include_franchisee_passes: includeFranchiseePasses ? 1 : void 0 }), { apiPrefix });
127
128
  return {
128
129
  list: (res === null || res === void 0 ? void 0 : res.list) || [],
129
130
  count: (res === null || res === void 0 ? void 0 : res.count) || 0,
@@ -202,7 +203,11 @@ const WalletPassGallery = (props) => {
202
203
  }
203
204
  }
204
205
  });
205
- }, [customer]);
206
+ }, [
207
+ customer,
208
+ apiPrefix,
209
+ includeFranchiseePasses
210
+ ]);
206
211
  (0, react.useEffect)(() => {
207
212
  var _interaction$utils, _interaction$utils$mo;
208
213
  interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 || _interaction$utils$mo.call(_interaction$utils, "customer", "new", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.12.361",
3
+ "version": "6.12.363",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -75,9 +75,9 @@
75
75
  "use-sync-external-store": "^1.6.0",
76
76
  "@pisell/pi-payment-sdk": "0.0.4",
77
77
  "@pisell/utils": "3.0.7",
78
+ "@pisell/icon": "0.0.11",
78
79
  "@pisell/date-picker": "3.0.12",
79
- "@pisell/materials": "6.12.86",
80
- "@pisell/icon": "0.0.11"
80
+ "@pisell/materials": "6.12.86"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "react": "^18.0.0",
@@ -1 +0,0 @@
1
- export { };