@pisell/private-materials 6.12.376 → 6.12.378
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/HDLKiosk/locales.js +10 -0
- package/es/components/HDLKiosk/slices/customization/PrimaryProductSelection/assets/order-background.svg +24 -0
- package/es/components/HDLKiosk/slices/customization/PrimaryProductSelection/index.js +55 -34
- package/es/components/HDLKiosk/slices/customization/PrimaryProductSelection/index.less +175 -125
- package/es/components/HDLKiosk/slices/customization/Screen/index.js +2 -2
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
- package/es/components/bigSale/components/ProductList/index.js +0 -1
- package/es/components/bigSale/components/TimeBar/index.js +0 -1
- package/es/components/bigSale/dialog.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleProductListConfig.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +0 -1
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/es/index.js +0 -2
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/PrintAction.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
- package/es/plus/saleDetail/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/index.js +0 -1
- package/es/plus/salesSdk/context/SalesSdkProvider.js +3 -0
- package/es/plus/salesSdk/giftSelect/buildGiftOrderProducts.js +2 -2
- package/es/plus/salesSdk/giftSelect/createOpenGiftSelectHost.js +2 -2
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/components/HDLKiosk/locales.js +10 -0
- package/lib/components/HDLKiosk/slices/customization/PrimaryProductSelection/assets/order-background.svg +24 -0
- package/lib/components/HDLKiosk/slices/customization/PrimaryProductSelection/index.js +54 -33
- package/lib/components/HDLKiosk/slices/customization/PrimaryProductSelection/index.less +175 -125
- package/lib/components/HDLKiosk/slices/customization/Screen/index.js +1 -1
- package/lib/plus/salesSdk/context/SalesSdkProvider.js +3 -0
- package/lib/plus/salesSdk/giftSelect/buildGiftOrderProducts.js +2 -2
- package/lib/plus/salesSdk/giftSelect/createOpenGiftSelectHost.js +2 -2
- package/package.json +4 -4
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -54
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const localeTexts = {
|
|
4
4
|
en: {
|
|
5
5
|
"pisell2.hdl-kiosk.primary-select": "Choose your item",
|
|
6
|
+
"pisell2.hdl-kiosk.primary-weighted-zone": "Build your bowl",
|
|
7
|
+
"pisell2.hdl-kiosk.primary-standard-zone": "Set meals",
|
|
6
8
|
"pisell2.hdl-kiosk.primary-select-description": "Tap an item to continue ordering",
|
|
7
9
|
"pisell2.hdl-kiosk.primary-select-close": "Close item selection",
|
|
8
10
|
"pisell2.hdl-kiosk.primary-image-unavailable": "No product image",
|
|
@@ -254,6 +256,8 @@ const localeTexts = {
|
|
|
254
256
|
},
|
|
255
257
|
"zh-CN": {
|
|
256
258
|
"pisell2.hdl-kiosk.primary-select": "请选择商品",
|
|
259
|
+
"pisell2.hdl-kiosk.primary-weighted-zone": "自选称重",
|
|
260
|
+
"pisell2.hdl-kiosk.primary-standard-zone": "套餐",
|
|
257
261
|
"pisell2.hdl-kiosk.primary-select-description": "点击商品,继续点单",
|
|
258
262
|
"pisell2.hdl-kiosk.primary-select-close": "关闭商品选择",
|
|
259
263
|
"pisell2.hdl-kiosk.primary-image-unavailable": "暂无商品图片",
|
|
@@ -505,6 +509,8 @@ const localeTexts = {
|
|
|
505
509
|
},
|
|
506
510
|
"zh-HK": {
|
|
507
511
|
"pisell2.hdl-kiosk.primary-select": "請選擇商品",
|
|
512
|
+
"pisell2.hdl-kiosk.primary-weighted-zone": "自選稱重",
|
|
513
|
+
"pisell2.hdl-kiosk.primary-standard-zone": "套餐",
|
|
508
514
|
"pisell2.hdl-kiosk.primary-select-description": "點擊商品,繼續點單",
|
|
509
515
|
"pisell2.hdl-kiosk.primary-select-close": "關閉商品選擇",
|
|
510
516
|
"pisell2.hdl-kiosk.primary-image-unavailable": "暫無商品圖片",
|
|
@@ -756,6 +762,8 @@ const localeTexts = {
|
|
|
756
762
|
},
|
|
757
763
|
ja: {
|
|
758
764
|
"pisell2.hdl-kiosk.primary-select": "商品を選んでください",
|
|
765
|
+
"pisell2.hdl-kiosk.primary-weighted-zone": "量り売り",
|
|
766
|
+
"pisell2.hdl-kiosk.primary-standard-zone": "セットメニュー",
|
|
759
767
|
"pisell2.hdl-kiosk.primary-select-description": "商品をタップして注文を続ける",
|
|
760
768
|
"pisell2.hdl-kiosk.primary-select-close": "商品選択を閉じる",
|
|
761
769
|
"pisell2.hdl-kiosk.primary-image-unavailable": "商品画像がありません",
|
|
@@ -1007,6 +1015,8 @@ const localeTexts = {
|
|
|
1007
1015
|
},
|
|
1008
1016
|
pt: {
|
|
1009
1017
|
"pisell2.hdl-kiosk.primary-select": "Escolha o produto",
|
|
1018
|
+
"pisell2.hdl-kiosk.primary-weighted-zone": "Escolha por peso",
|
|
1019
|
+
"pisell2.hdl-kiosk.primary-standard-zone": "Menus de conjunto",
|
|
1010
1020
|
"pisell2.hdl-kiosk.primary-select-description": "Toque num produto para continuar o pedido",
|
|
1011
1021
|
"pisell2.hdl-kiosk.primary-select-close": "Fechar seleção de produto",
|
|
1012
1022
|
"pisell2.hdl-kiosk.primary-image-unavailable": "Sem imagem do produto",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1080" height="1920" viewBox="0 0 1080 1920" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<pattern id="linen" width="12" height="12" patternUnits="userSpaceOnUse">
|
|
4
|
+
<path d="M0 3h12M0 9h12M3 0v12M9 0v12" stroke="#bba68c" stroke-width=".6" opacity=".07"/>
|
|
5
|
+
<path d="M0 4h12M0 10h12M4 0v12M10 0v12" stroke="#fffdf6" stroke-width=".6" opacity=".25"/>
|
|
6
|
+
</pattern>
|
|
7
|
+
<pattern id="cloth-edge" width="28" height="28" patternUnits="userSpaceOnUse">
|
|
8
|
+
<path d="m-7 7 28-28M0 28 28 0m-7 49 28-28" stroke="#9b4050" stroke-width="2" opacity=".06"/>
|
|
9
|
+
</pattern>
|
|
10
|
+
</defs>
|
|
11
|
+
<path fill="#eee8dc" d="M0 0h1080v1920H0z"/>
|
|
12
|
+
<path fill="url(#linen)" d="M0 0h1080v1920H0z"/>
|
|
13
|
+
<path fill="url(#cloth-edge)" d="M0 0h32v1920H0zm1048 0h32v1920h-32z"/>
|
|
14
|
+
<g stroke="#a88570" stroke-width="2" opacity=".2">
|
|
15
|
+
<ellipse cx="1080" cy="320" rx="184" ry="66"/>
|
|
16
|
+
<ellipse cx="1080" cy="320" rx="159" ry="47"/>
|
|
17
|
+
<path d="M900 332c29 117 84 164 180 164s151-47 180-164m-290 150h220"/>
|
|
18
|
+
<path d="m-32 730 143-320m-124 327L133 421" stroke-width="5" stroke-linecap="round"/>
|
|
19
|
+
<ellipse cx="-30" cy="1235" rx="170" ry="61"/>
|
|
20
|
+
<ellipse cx="-30" cy="1235" rx="146" ry="43"/>
|
|
21
|
+
<path d="M-196 1246c26 107 76 150 166 150s140-43 166-150"/>
|
|
22
|
+
<path d="m992 1530 128-296m-109 304 130-293" stroke-width="5" stroke-linecap="round"/>
|
|
23
|
+
</g>
|
|
24
|
+
</svg>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import useStableInstanceId from "../../../../../hooks/useStableInstanceId.js";
|
|
1
2
|
import { useHDLKioskBottomBar, useHDLKioskBottomBarController } from "../../../components/shell/HDLKioskBottomBarHost/index.js";
|
|
2
3
|
import { HDLKioskOrderSummary } from "../../../components/shell/HDLKioskOrderSummary/index.js";
|
|
3
4
|
import { resolveHDLPrimaryProduct, resolveHDLProductText } from "../../../product.js";
|
|
@@ -5,17 +6,18 @@ import { useHDLScaleSnapshot } from "../../../ui/scale.js";
|
|
|
5
6
|
import { BackIcon } from "../Screen/artwork.js";
|
|
6
7
|
import { formatMoney } from "../Screen/model.js";
|
|
7
8
|
import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
8
|
-
import { locales } from "@pisell/utils";
|
|
9
|
+
import { image, locales } from "@pisell/utils";
|
|
9
10
|
import Decimal from "decimal.js";
|
|
10
11
|
//#region src/components/HDLKiosk/slices/customization/PrimaryProductSelection/index.tsx
|
|
11
|
-
function ProductImage({ src }) {
|
|
12
|
+
function ProductImage({ src, name }) {
|
|
12
13
|
const [failed, setFailed] = useState(false);
|
|
13
14
|
return /* @__PURE__ */ React.createElement("span", {
|
|
14
15
|
className: "hdl-ps-product-image",
|
|
15
16
|
"aria-hidden": "true"
|
|
16
|
-
}, failed || !src ? /* @__PURE__ */ React.createElement("span", { className: "hdl-ps-image-fallback" }, locales.getText("pisell2.hdl-kiosk.primary-image-unavailable")) : /* @__PURE__ */ React.createElement("img", {
|
|
17
|
-
src,
|
|
17
|
+
}, failed || !src ? /* @__PURE__ */ React.createElement("span", { className: "hdl-ps-image-fallback" }, /* @__PURE__ */ React.createElement("strong", null, name), /* @__PURE__ */ React.createElement("span", null, locales.getText("pisell2.hdl-kiosk.primary-image-unavailable"))) : /* @__PURE__ */ React.createElement("img", {
|
|
18
|
+
src: image.ali(src, 750),
|
|
18
19
|
alt: "",
|
|
20
|
+
draggable: false,
|
|
19
21
|
onError: () => setFailed(true)
|
|
20
22
|
}));
|
|
21
23
|
}
|
|
@@ -23,6 +25,8 @@ function PrimaryProductSelection({ products, configuredCount, orderBar, capabili
|
|
|
23
25
|
const scale = useHDLScaleSnapshot();
|
|
24
26
|
const delivered = useRef(false);
|
|
25
27
|
const heading = useRef(null);
|
|
28
|
+
const selectionId = useStableInstanceId("hdl-primary-selection");
|
|
29
|
+
const headingId = `${selectionId}-title`;
|
|
26
30
|
const { currencySymbol } = orderBar;
|
|
27
31
|
const items = [...products].sort((left, right) => {
|
|
28
32
|
const leftSort = Number(left.sort);
|
|
@@ -35,11 +39,22 @@ function PrimaryProductSelection({ products, configuredCount, orderBar, capabili
|
|
|
35
39
|
return {
|
|
36
40
|
product,
|
|
37
41
|
facts,
|
|
42
|
+
name: (facts === null || facts === void 0 ? void 0 : facts.name) || resolveHDLProductText(product.title) || String(product.id),
|
|
43
|
+
imageUrl: typeof product.cover === "string" ? product.cover : void 0,
|
|
38
44
|
subtitle: resolveHDLProductText(product.subtitle),
|
|
39
45
|
disabled: unavailable || scaleUnavailable,
|
|
40
46
|
reason: locales.getText(scaleUnavailable ? "pisell2.hdl-kiosk.entry-scale-unavailable" : "pisell2.hdl-kiosk.primary-unavailable")
|
|
41
47
|
};
|
|
42
48
|
});
|
|
49
|
+
const groups = ["weighted", "standard"].map((kind) => ({
|
|
50
|
+
kind,
|
|
51
|
+
title: locales.getText(kind === "weighted" ? "pisell2.hdl-kiosk.primary-weighted-zone" : "pisell2.hdl-kiosk.primary-standard-zone"),
|
|
52
|
+
items: items.filter((item) => {
|
|
53
|
+
var _item$product$variant, _item$facts;
|
|
54
|
+
const variants = (_item$product$variant = item.product.variant) !== null && _item$product$variant !== void 0 ? _item$product$variant : item.product.variants;
|
|
55
|
+
return (((_item$facts = item.facts) === null || _item$facts === void 0 ? void 0 : _item$facts.kind) === "weighted" || Number(item.product.open_sold_weight) === 1 || Array.isArray(variants) && variants.some((variant) => Number(variant === null || variant === void 0 ? void 0 : variant.open_sold_weight) === 1)) === (kind === "weighted");
|
|
56
|
+
})
|
|
57
|
+
})).filter((group) => group.items.length > 0);
|
|
43
58
|
const select = (item) => {
|
|
44
59
|
if (busy || item.disabled || !item.facts || delivered.current) return;
|
|
45
60
|
delivered.current = true;
|
|
@@ -90,45 +105,51 @@ function PrimaryProductSelection({ products, configuredCount, orderBar, capabili
|
|
|
90
105
|
]));
|
|
91
106
|
return /* @__PURE__ */ React.createElement("section", {
|
|
92
107
|
className: "hdl-primary-selection",
|
|
93
|
-
"aria-labelledby":
|
|
94
|
-
}, /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-dialog" }, /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-content" }, /* @__PURE__ */ React.createElement("
|
|
95
|
-
|
|
108
|
+
"aria-labelledby": headingId
|
|
109
|
+
}, /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-dialog" }, /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-content" }, /* @__PURE__ */ React.createElement("h2", {
|
|
110
|
+
className: "hdl-ps-sr-only",
|
|
111
|
+
id: headingId,
|
|
96
112
|
ref: heading,
|
|
97
113
|
tabIndex: -1
|
|
98
|
-
}, title), /* @__PURE__ */ React.createElement("
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
}, title), /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-choices" }, groups.map((group) => /* @__PURE__ */ React.createElement("div", {
|
|
115
|
+
className: "hdl-ps-group",
|
|
116
|
+
key: group.kind,
|
|
117
|
+
"data-zone": group.kind,
|
|
118
|
+
role: "group",
|
|
119
|
+
"aria-labelledby": `${selectionId}-${group.kind}`
|
|
120
|
+
}, /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-marker" }, /* @__PURE__ */ React.createElement("h3", { id: `${selectionId}-${group.kind}` }, group.title), /* @__PURE__ */ React.createElement("span", {
|
|
121
|
+
className: "hdl-ps-marker-line",
|
|
122
|
+
"aria-hidden": "true"
|
|
123
|
+
})), /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-products" }, group.items.map((item) => /* @__PURE__ */ React.createElement("div", {
|
|
124
|
+
className: "hdl-ps-image-area",
|
|
125
|
+
key: String(item.product.id)
|
|
126
|
+
}, /* @__PURE__ */ React.createElement("div", { className: "hdl-ps-poster-area" }, /* @__PURE__ */ React.createElement("button", {
|
|
127
|
+
className: "hdl-ps-product",
|
|
128
|
+
type: "button",
|
|
129
|
+
"aria-label": item.name,
|
|
130
|
+
"aria-describedby": item.disabled ? `${selectionId}-${item.product.id}-unavailable` : void 0,
|
|
131
|
+
disabled: busy || item.disabled,
|
|
132
|
+
onClick: () => select(item)
|
|
133
|
+
}, /* @__PURE__ */ React.createElement(ProductImage, {
|
|
134
|
+
key: item.imageUrl,
|
|
135
|
+
src: item.imageUrl,
|
|
136
|
+
name: item.name
|
|
137
|
+
}), item.subtitle ? /* @__PURE__ */ React.createElement("span", { className: "hdl-ps-sr-only" }, item.subtitle) : null)), item.disabled ? /* @__PURE__ */ React.createElement("small", {
|
|
138
|
+
className: "hdl-ps-unavailable",
|
|
139
|
+
id: `${selectionId}-${item.product.id}-unavailable`
|
|
140
|
+
}, item.reason) : null))))), !items.length ? /* @__PURE__ */ React.createElement("p", {
|
|
141
|
+
className: "hdl-ps-empty",
|
|
142
|
+
role: "status"
|
|
143
|
+
}, locales.getText("pisell2.hdl-kiosk.primary-unavailable")) : null), /* @__PURE__ */ React.createElement("button", {
|
|
123
144
|
type: "button",
|
|
124
|
-
className: "hdl-
|
|
145
|
+
className: "hdl-ps-skip",
|
|
125
146
|
disabled: busy,
|
|
126
147
|
onClick: () => {
|
|
127
148
|
if (busy || delivered.current) return;
|
|
128
149
|
delivered.current = true;
|
|
129
150
|
if (onCancel() === false) delivered.current = false;
|
|
130
151
|
}
|
|
131
|
-
}, locales.getText("pisell2.hdl-kiosk.customization-skip"))
|
|
152
|
+
}, locales.getText("pisell2.hdl-kiosk.customization-skip")))));
|
|
132
153
|
}
|
|
133
154
|
//#endregion
|
|
134
155
|
export { PrimaryProductSelection };
|
|
@@ -1,110 +1,140 @@
|
|
|
1
|
-
//
|
|
1
|
+
// The shell owns the header and floating cart bar; fill the space between them.
|
|
2
2
|
.pisell-hdl-kiosk .hdl-primary-selection {
|
|
3
|
+
container-type: inline-size;
|
|
3
4
|
display: flex;
|
|
5
|
+
flex: 1;
|
|
4
6
|
width: 100%;
|
|
5
7
|
min-width: 0;
|
|
6
8
|
min-height: 0;
|
|
7
|
-
flex: 1;
|
|
8
|
-
overflow: hidden;
|
|
9
9
|
padding-bottom: var(--hdl-bottom-bar-clearance);
|
|
10
|
-
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
background: #eee8dc url('./assets/order-background.svg') center top /
|
|
12
|
+
max(100%, 1080px) auto;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
.hdl-ps-dialog {
|
|
14
|
-
--hdl-ps-red: #b20d12;
|
|
15
|
-
--hdl-ps-ink: #292523;
|
|
16
|
-
--hdl-ps-muted: #736b65;
|
|
17
16
|
display: flex;
|
|
18
|
-
|
|
17
|
+
flex: 1;
|
|
19
18
|
min-width: 0;
|
|
20
19
|
min-height: 0;
|
|
21
|
-
|
|
22
|
-
padding: 24px;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
color: var(--hdl-ps-ink);
|
|
25
|
-
font-size: 16px;
|
|
26
|
-
line-height: 1.5;
|
|
20
|
+
color: #252323;
|
|
27
21
|
text-align: left;
|
|
28
|
-
animation: hdl-ps-dialog-enter 180ms ease-out both;
|
|
29
22
|
}
|
|
30
23
|
.hdl-ps-dialog button {
|
|
31
|
-
|
|
24
|
+
appearance: none;
|
|
25
|
+
font-family: inherit;
|
|
32
26
|
cursor: pointer;
|
|
33
27
|
touch-action: manipulation;
|
|
34
28
|
-webkit-tap-highlight-color: transparent;
|
|
35
29
|
}
|
|
36
|
-
.hdl-ps-dialog button:focus-visible {
|
|
37
|
-
outline: 3px solid #2563eb;
|
|
38
|
-
outline-offset: 4px;
|
|
39
|
-
}
|
|
40
30
|
.hdl-ps-content {
|
|
41
31
|
display: flex;
|
|
32
|
+
flex: 1;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: clamp(12px, 1.85cqw, 20px);
|
|
35
|
+
min-width: 0;
|
|
42
36
|
min-height: 0;
|
|
37
|
+
padding: clamp(12px, 1.67cqw, 18px) clamp(24px, 4.9cqw, 53px);
|
|
38
|
+
}
|
|
39
|
+
.hdl-ps-choices {
|
|
40
|
+
--hdl-ps-gap: clamp(24px, 3.7cqw, 40px);
|
|
41
|
+
display: flex;
|
|
43
42
|
flex: 1;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--hdl-ps-gap);
|
|
45
|
+
min-height: 0;
|
|
44
46
|
overflow: auto;
|
|
45
47
|
overscroll-behavior: contain;
|
|
46
|
-
|
|
48
|
+
// Leave room for keyboard focus inside the scroll region.
|
|
49
|
+
padding: 4px;
|
|
50
|
+
margin: -4px;
|
|
47
51
|
}
|
|
48
|
-
.hdl-ps-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
.hdl-ps-group {
|
|
53
|
+
--hdl-ps-zone-ink: #963047;
|
|
54
|
+
--hdl-ps-zone-line: #d5bfa5;
|
|
55
|
+
position: relative;
|
|
56
|
+
display: flex;
|
|
57
|
+
// Every product keeps its own height; additional products scroll instead of shrinking.
|
|
51
58
|
flex: none;
|
|
52
|
-
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: clamp(4px, 0.74cqw, 8px);
|
|
61
|
+
min-width: 0;
|
|
62
|
+
padding: clamp(8px, 1.4cqw, 15px);
|
|
63
|
+
border: 1px solid #cfbda5;
|
|
64
|
+
border-radius: clamp(18px, 2.8cqw, 30px);
|
|
65
|
+
background: #faf4e8;
|
|
66
|
+
}
|
|
67
|
+
.hdl-ps-group[data-zone='standard'] {
|
|
68
|
+
--hdl-ps-zone-ink: #3f4b45;
|
|
69
|
+
--hdl-ps-zone-line: #c1c7bd;
|
|
70
|
+
border-color: #bfc6bc;
|
|
71
|
+
background: #f2f4ee;
|
|
72
|
+
}
|
|
73
|
+
.hdl-ps-group + .hdl-ps-group::before {
|
|
74
|
+
position: absolute;
|
|
75
|
+
inset: calc(var(--hdl-ps-gap) / -2) 0 auto;
|
|
76
|
+
height: 1px;
|
|
77
|
+
background: #cbbba6;
|
|
78
|
+
content: '';
|
|
79
|
+
pointer-events: none;
|
|
53
80
|
}
|
|
54
|
-
.hdl-ps-
|
|
55
|
-
|
|
56
|
-
|
|
81
|
+
.hdl-ps-marker {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex: none;
|
|
84
|
+
align-items: center;
|
|
85
|
+
gap: clamp(12px, 1.8cqw, 20px);
|
|
86
|
+
min-height: clamp(26px, 3.9cqw, 42px);
|
|
87
|
+
padding-inline: clamp(4px, 0.74cqw, 8px);
|
|
57
88
|
}
|
|
58
|
-
.hdl-ps-
|
|
89
|
+
.hdl-ps-marker h3 {
|
|
90
|
+
flex: none;
|
|
59
91
|
margin: 0;
|
|
60
|
-
|
|
61
|
-
font-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
outline: none;
|
|
92
|
+
color: var(--hdl-ps-zone-ink);
|
|
93
|
+
font-size: clamp(18px, 3.15cqw, 34px);
|
|
94
|
+
font-weight: 650;
|
|
95
|
+
line-height: 1.2;
|
|
65
96
|
}
|
|
66
|
-
.hdl-ps-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
97
|
+
.hdl-ps-marker-line {
|
|
98
|
+
flex: 1;
|
|
99
|
+
height: 1px;
|
|
100
|
+
background: var(--hdl-ps-zone-line);
|
|
70
101
|
}
|
|
71
102
|
.hdl-ps-products {
|
|
72
|
-
--hdl-ps-product-height: 250px;
|
|
73
103
|
display: grid;
|
|
74
|
-
grid-template-columns:
|
|
75
|
-
gap: 20px;
|
|
104
|
+
grid-template-columns: minmax(0, 1fr);
|
|
105
|
+
gap: clamp(12px, 1.85cqw, 20px);
|
|
106
|
+
min-width: 0;
|
|
76
107
|
}
|
|
77
|
-
.hdl-ps-
|
|
78
|
-
|
|
79
|
-
|
|
108
|
+
.hdl-ps-image-area {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
min-width: 0;
|
|
112
|
+
min-height: 0;
|
|
113
|
+
padding: 4px;
|
|
80
114
|
}
|
|
81
|
-
.hdl-ps-
|
|
82
|
-
|
|
83
|
-
grid-template-columns: minmax(0, 24%) minmax(0, 1fr) auto;
|
|
84
|
-
align-items: center;
|
|
115
|
+
.hdl-ps-poster-area {
|
|
116
|
+
width: 100%;
|
|
85
117
|
min-width: 0;
|
|
86
|
-
min-height:
|
|
87
|
-
padding: 12px;
|
|
88
|
-
border: 1.5px solid #d8d1ca;
|
|
89
|
-
border-radius: 24px;
|
|
90
|
-
color: var(--hdl-ps-ink);
|
|
91
|
-
background: #fff;
|
|
92
|
-
text-align: left;
|
|
93
|
-
transition: border-color 160ms, background 160ms, box-shadow 160ms;
|
|
118
|
+
min-height: 0;
|
|
94
119
|
}
|
|
95
|
-
.hdl-ps-dialog .hdl-ps-
|
|
96
|
-
|
|
120
|
+
.hdl-ps-dialog .hdl-ps-product {
|
|
121
|
+
display: block;
|
|
122
|
+
width: 100%;
|
|
123
|
+
max-width: 100%;
|
|
124
|
+
margin: 0;
|
|
125
|
+
padding: 0;
|
|
126
|
+
border: 0;
|
|
127
|
+
border-radius: clamp(10px, 1.6cqw, 18px);
|
|
128
|
+
background: transparent;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
transition: transform 160ms ease, filter 160ms ease;
|
|
97
131
|
}
|
|
98
132
|
.hdl-ps-product-image {
|
|
99
133
|
position: relative;
|
|
100
|
-
display:
|
|
101
|
-
place-items: center;
|
|
134
|
+
display: block;
|
|
102
135
|
width: 100%;
|
|
103
|
-
|
|
104
|
-
aspect-ratio:
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
border-radius: 14px;
|
|
107
|
-
background: #f1ece6;
|
|
136
|
+
// Keep every poster at the same display ratio, including square source images.
|
|
137
|
+
aspect-ratio: 16 / 10;
|
|
108
138
|
}
|
|
109
139
|
.hdl-ps-product-image img {
|
|
110
140
|
position: absolute;
|
|
@@ -113,86 +143,106 @@
|
|
|
113
143
|
width: 100%;
|
|
114
144
|
height: 100%;
|
|
115
145
|
object-fit: cover;
|
|
146
|
+
object-position: center;
|
|
147
|
+
user-select: none;
|
|
148
|
+
-webkit-user-drag: none;
|
|
116
149
|
}
|
|
117
150
|
.hdl-ps-image-fallback {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
text-align: center;
|
|
121
|
-
}
|
|
122
|
-
.hdl-ps-product-details {
|
|
151
|
+
position: absolute;
|
|
152
|
+
inset: 0;
|
|
123
153
|
display: flex;
|
|
124
|
-
min-width: 0;
|
|
125
154
|
align-self: stretch;
|
|
126
|
-
|
|
155
|
+
align-items: center;
|
|
127
156
|
justify-content: center;
|
|
128
|
-
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
gap: 12px;
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
padding: 16px;
|
|
162
|
+
background: #ebe5da;
|
|
163
|
+
color: #645b52;
|
|
164
|
+
font-size: clamp(16px, 2.2cqw, 24px);
|
|
165
|
+
text-align: center;
|
|
129
166
|
}
|
|
130
|
-
.hdl-ps-
|
|
131
|
-
|
|
132
|
-
font-size: 32px;
|
|
133
|
-
font-weight: 800;
|
|
134
|
-
line-height: 1.3;
|
|
167
|
+
.hdl-ps-image-fallback strong {
|
|
168
|
+
color: #252323;
|
|
169
|
+
font-size: clamp(20px, 3cqw, 32px);
|
|
135
170
|
}
|
|
136
|
-
.hdl-ps-
|
|
137
|
-
|
|
171
|
+
.hdl-ps-unavailable {
|
|
172
|
+
flex: none;
|
|
138
173
|
margin-top: 8px;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
174
|
+
color: #645b52;
|
|
175
|
+
font-size: clamp(14px, 1.85cqw, 20px);
|
|
176
|
+
line-height: 1.4;
|
|
177
|
+
text-align: center;
|
|
142
178
|
}
|
|
143
|
-
.hdl-ps-
|
|
144
|
-
display:
|
|
145
|
-
|
|
146
|
-
width:
|
|
147
|
-
height: 64px;
|
|
148
|
-
margin
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
179
|
+
.hdl-ps-dialog .hdl-ps-skip {
|
|
180
|
+
display: block;
|
|
181
|
+
flex: none;
|
|
182
|
+
width: 100%;
|
|
183
|
+
min-height: clamp(64px, 10cqw, 108px);
|
|
184
|
+
margin: 0;
|
|
185
|
+
padding: 12px 20px;
|
|
186
|
+
border: 1px solid #cdbbb1;
|
|
187
|
+
border-radius: clamp(8px, 1.6cqw, 18px);
|
|
188
|
+
background: #faf7ef;
|
|
189
|
+
color: #b80020;
|
|
190
|
+
font-size: clamp(16px, 2.65cqw, 29px);
|
|
191
|
+
font-weight: 650;
|
|
192
|
+
line-height: 1.3;
|
|
193
|
+
text-align: center;
|
|
194
|
+
transition: background-color 160ms ease;
|
|
156
195
|
}
|
|
157
196
|
.hdl-ps-dialog .hdl-ps-product:not(:disabled):active {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
box-shadow: inset 0 0 0 1px var(--hdl-ps-red);
|
|
197
|
+
transform: scale(0.975);
|
|
198
|
+
filter: brightness(0.92);
|
|
161
199
|
}
|
|
162
200
|
@media (hover: hover) {
|
|
163
|
-
.hdl-ps-
|
|
164
|
-
|
|
165
|
-
|
|
201
|
+
.hdl-ps-product:not(:disabled):hover {
|
|
202
|
+
filter: brightness(0.97);
|
|
203
|
+
}
|
|
204
|
+
.hdl-ps-skip:not(:disabled):hover {
|
|
205
|
+
background: #f8eeee;
|
|
166
206
|
}
|
|
167
207
|
}
|
|
168
|
-
.hdl-ps-
|
|
169
|
-
|
|
170
|
-
color: var(--hdl-ps-muted);
|
|
171
|
-
font-size: 18px;
|
|
172
|
-
line-height: 1.5;
|
|
208
|
+
.hdl-ps-dialog .hdl-ps-skip:not(:disabled):active {
|
|
209
|
+
filter: brightness(0.96);
|
|
173
210
|
}
|
|
174
|
-
.hdl-ps-dialog
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
margin-top: 24px;
|
|
211
|
+
.hdl-ps-dialog button:focus-visible {
|
|
212
|
+
outline: 3px solid #b80020;
|
|
213
|
+
outline-offset: 4px;
|
|
178
214
|
}
|
|
179
|
-
.
|
|
180
|
-
background: #ebe6e1;
|
|
181
|
-
color: #847b75;
|
|
215
|
+
.hdl-ps-dialog button:disabled {
|
|
182
216
|
cursor: not-allowed;
|
|
183
217
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
218
|
+
.hdl-ps-dialog .hdl-ps-product:disabled {
|
|
219
|
+
filter: grayscale(0.65);
|
|
220
|
+
}
|
|
221
|
+
.hdl-ps-dialog .hdl-ps-skip:disabled {
|
|
222
|
+
color: #645b52;
|
|
223
|
+
}
|
|
224
|
+
.hdl-ps-empty {
|
|
225
|
+
margin: auto;
|
|
226
|
+
color: #645b52;
|
|
227
|
+
font-size: clamp(18px, 2.2cqw, 24px);
|
|
228
|
+
text-align: center;
|
|
229
|
+
}
|
|
230
|
+
.hdl-ps-sr-only {
|
|
231
|
+
position: absolute;
|
|
232
|
+
width: 1px;
|
|
233
|
+
height: 1px;
|
|
234
|
+
margin: -1px;
|
|
235
|
+
padding: 0;
|
|
236
|
+
border: 0;
|
|
237
|
+
overflow: hidden;
|
|
238
|
+
clip: rect(0, 0, 0, 0);
|
|
239
|
+
white-space: nowrap;
|
|
191
240
|
}
|
|
192
241
|
@media (prefers-reduced-motion: reduce) {
|
|
193
|
-
.hdl-ps-dialog
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
242
|
+
.hdl-ps-dialog button {
|
|
243
|
+
transition: none;
|
|
244
|
+
}
|
|
245
|
+
.hdl-ps-dialog .hdl-ps-product:not(:disabled):active {
|
|
246
|
+
transform: none;
|
|
197
247
|
}
|
|
198
248
|
}
|
|
@@ -12,7 +12,7 @@ import { formatMoney, formatWeight, getScaleStatusText, initialSkuValue, resolve
|
|
|
12
12
|
import { NextBowlModal } from "../NextBowlModal/NextBowlModal.js";
|
|
13
13
|
import { TooLightDialog } from "../TooLightDialog/index.js";
|
|
14
14
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
15
|
-
import { STANDARD_WEIGHT_UNIT, getWeightUnitSymbol, locales } from "@pisell/utils";
|
|
15
|
+
import { STANDARD_WEIGHT_UNIT, getWeightUnitSymbol, image, locales } from "@pisell/utils";
|
|
16
16
|
import Decimal from "decimal.js";
|
|
17
17
|
import { useToast } from "@pisell/materials";
|
|
18
18
|
//#region src/components/HDLKiosk/slices/customization/Screen/index.tsx
|
|
@@ -443,7 +443,7 @@ function CustomizationScreen({ product, loading, errorReference, errorMessage, b
|
|
|
443
443
|
});
|
|
444
444
|
}
|
|
445
445
|
}) : null, /* @__PURE__ */ React.createElement("div", { className: "hdl-customization-hero" }, /* @__PURE__ */ React.createElement("article", { className: "hdl-customization-product" }, /* @__PURE__ */ React.createElement("div", { className: "hdl-customization-product__media" }, (productFacts === null || productFacts === void 0 ? void 0 : productFacts.imageUrl) ? /* @__PURE__ */ React.createElement("img", {
|
|
446
|
-
src: productFacts.imageUrl,
|
|
446
|
+
src: image.ali(productFacts.imageUrl, 540),
|
|
447
447
|
alt: ""
|
|
448
448
|
}) : /* @__PURE__ */ React.createElement(ProductFallback, null)), /* @__PURE__ */ React.createElement("div", { className: "hdl-customization-product__copy" }, /* @__PURE__ */ React.createElement("p", null, locales.getText("pisell2.hdl-kiosk.customization-product-eyebrow")), /* @__PURE__ */ React.createElement("h1", { id: "hdl-customization-title" }, (productFacts === null || productFacts === void 0 ? void 0 : productFacts.name) || locales.getText("pisell2.hdl-kiosk.primary-product-loading"), " ", /* @__PURE__ */ React.createElement("span", { className: "hdl-customization-product__price" }, productFacts ? formatMoney(unitPricePerStandardWeight, orderBar.currencySymbol) : "—", /* @__PURE__ */ React.createElement("small", null, "/", standardProduct ? locales.getText("pisell2.hdl-kiosk.primary-per-item") : STANDARD_WEIGHT_UNIT_LABEL))))), standardProduct ? /* @__PURE__ */ React.createElement("aside", { className: "hdl-customization-weight hdl-customization-description" }, /* @__PURE__ */ React.createElement("div", { className: "hdl-customization-description__content" }, productFacts.description ? /* @__PURE__ */ React.createElement("div", {
|
|
449
449
|
className: "hdl-customization-description__body",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
-
import "../../../../plus/salesSdk/index.js";
|
|
4
3
|
import dayjs from "dayjs";
|
|
5
4
|
import { useCallback, useEffect, useState } from "react";
|
|
6
5
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -18,7 +18,6 @@ import { showAddToCartToast } from "../../../../plus/salesSdk/components/showAdd
|
|
|
18
18
|
import { mergeBookingsForDisplay } from "../../../../plus/salesSdk/utils/mergeBookingsForDisplay.js";
|
|
19
19
|
import useSalesSdkGlobalScanHandler from "../../../../plus/salesSdk/hooks/useSalesSdkGlobalScanHandler.js";
|
|
20
20
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
21
|
-
import "../../../../plus/salesSdk/index.js";
|
|
22
21
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
23
22
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
24
23
|
import { showSalesGuardErrorToast } from "../../../../plus/salesSdk/utils/salesGuard.js";
|
|
@@ -5,7 +5,6 @@ import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { setBookingTimeSelectionIntent } from "../../../../plus/salesSdk/utils/bookingTimeSelection.js";
|
|
7
7
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
-
import "../../../../plus/salesSdk/index.js";
|
|
9
8
|
import locales_default from "../../locales/index.js";
|
|
10
9
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
11
10
|
import dayjs from "dayjs";
|
|
@@ -6,7 +6,6 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
6
6
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
7
7
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
8
8
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
9
|
-
import "../../plus/salesSdk/index.js";
|
|
10
9
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
11
10
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
12
11
|
import BigSale from "./index.js";
|
|
@@ -4,7 +4,6 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
|
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
6
|
import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
|
|
7
|
-
import "../../../plus/salesSdk/index.js";
|
|
8
7
|
import { useMemo } from "react";
|
|
9
8
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
10
9
|
/**
|