@pisell/private-materials 6.12.361 → 6.12.362

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 (33) 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/scanOrder/components/Check/index.js +95 -84
  10. package/es/components/scanOrder/locales.js +15 -0
  11. package/es/plus/skuOptionsSelection/utils/normalizeSelectorLayout.js +15 -0
  12. package/es/plus/skuOptionsSelection/utils/resolveCollectionLayout.js +2 -2
  13. package/es/plus/walletEditor/WalletEditor.js +19 -5
  14. package/es/plus/walletEditor/components/PassDisplayConfig/index.js +60 -0
  15. package/es/plus/walletEditor/components/PassDisplayConfig/index.less +27 -0
  16. package/es/plus/walletEditor/components/PassDisplayConfig/serve.js +18 -0
  17. package/es/plus/walletEditor/index.d.ts +1 -1
  18. package/es/plus/walletEditor/locales.js +40 -0
  19. package/es/plus/walletEditor/types.d.ts +8 -1
  20. package/es/plus/walletPassGallery/index.js +11 -6
  21. package/lib/components/scanOrder/components/Check/index.js +94 -83
  22. package/lib/components/scanOrder/locales.js +15 -0
  23. package/lib/plus/skuOptionsSelection/utils/normalizeSelectorLayout.js +15 -0
  24. package/lib/plus/skuOptionsSelection/utils/resolveCollectionLayout.js +2 -2
  25. package/lib/plus/walletEditor/WalletEditor.js +19 -5
  26. package/lib/plus/walletEditor/components/PassDisplayConfig/index.js +62 -0
  27. package/lib/plus/walletEditor/components/PassDisplayConfig/index.less +27 -0
  28. package/lib/plus/walletEditor/components/PassDisplayConfig/serve.js +18 -0
  29. package/lib/plus/walletEditor/index.d.ts +1 -1
  30. package/lib/plus/walletEditor/locales.js +40 -0
  31. package/lib/plus/walletEditor/types.d.ts +8 -1
  32. package/lib/plus/walletPassGallery/index.js +11 -6
  33. package/package.json +3 -3
@@ -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.362",
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/date-picker": "3.0.12",
79
78
  "@pisell/materials": "6.12.86",
80
- "@pisell/icon": "0.0.11"
79
+ "@pisell/icon": "0.0.11",
80
+ "@pisell/date-picker": "3.0.12"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "react": "^18.0.0",