@anker-in/ui 0.3.1 → 0.3.2

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/dist/index.d.mts CHANGED
@@ -698,6 +698,7 @@ interface BookingSuccessPageData {
698
698
  QRCodeSubTitle?: string;
699
699
  /** 添加到钱包按钮文案 */
700
700
  btnToWallet?: string;
701
+ QRCodeUrl?: string;
701
702
  /** 打印按钮文案 */
702
703
  btnToPrint?: string;
703
704
  };
@@ -744,6 +745,7 @@ declare const BookingFormO2O: React.FC<BookingFormO2OProps>;
744
745
  interface BookingSuccessO2OProps {
745
746
  bookingData?: Booking;
746
747
  token?: string;
748
+ isStoreUser?: string;
747
749
  apiConfig?: DemoRoomApiConfig;
748
750
  onScheduleAgain?: (demoRoomCode: string) => void;
749
751
  onCancelSuccess?: (booking: Booking) => void;
package/dist/index.d.ts CHANGED
@@ -698,6 +698,7 @@ interface BookingSuccessPageData {
698
698
  QRCodeSubTitle?: string;
699
699
  /** 添加到钱包按钮文案 */
700
700
  btnToWallet?: string;
701
+ QRCodeUrl?: string;
701
702
  /** 打印按钮文案 */
702
703
  btnToPrint?: string;
703
704
  };
@@ -744,6 +745,7 @@ declare const BookingFormO2O: React.FC<BookingFormO2OProps>;
744
745
  interface BookingSuccessO2OProps {
745
746
  bookingData?: Booking;
746
747
  token?: string;
748
+ isStoreUser?: string;
747
749
  apiConfig?: DemoRoomApiConfig;
748
750
  onScheduleAgain?: (demoRoomCode: string) => void;
749
751
  onCancelSuccess?: (booking: Booking) => void;
package/dist/index.js CHANGED
@@ -12136,7 +12136,9 @@ var DemoRoomDetail2 = ({
12136
12136
  if (demoRoom?.latitude && demoRoom?.longitude) {
12137
12137
  return `https://www.google.com/maps/search/?api=1&query=${demoRoom.latitude},${demoRoom.longitude}`;
12138
12138
  } else if (address) {
12139
- return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(address)}`;
12139
+ return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(
12140
+ address
12141
+ )}`;
12140
12142
  }
12141
12143
  return "#";
12142
12144
  })();
@@ -12157,129 +12159,133 @@ var DemoRoomDetail2 = ({
12157
12159
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", children: error.message })
12158
12160
  ] }) });
12159
12161
  }
12160
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
12161
- "gap-[80px] l:gap-[40px] l:flex l:flex-col-reverse items-start py-[24px] l:pb-[64px]",
12162
- images.length > 0 ? "grid grid-cols-2" : "flex"
12163
- ), children: [
12164
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
12165
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[48px] l:text-[32px] font-bold text-gray-900 leading-tight", children: title }),
12166
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[20px]", children: descriptions?.map((desc, index) => /* @__PURE__ */ jsxRuntime.jsx(
12167
- "p",
12168
- {
12169
- className: "text-base text-gray-600 leading-relaxed",
12170
- children: desc
12171
- },
12172
- index
12173
- )) }),
12174
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
12175
- /* @__PURE__ */ jsxRuntime.jsxs(
12176
- "svg",
12177
- {
12178
- width: "24",
12179
- height: "24",
12180
- viewBox: "0 0 24 24",
12181
- fill: "none",
12182
- xmlns: "http://www.w3.org/2000/svg",
12183
- className: "flex-shrink-0 mt-0.5",
12184
- children: [
12185
- /* @__PURE__ */ jsxRuntime.jsx(
12186
- "path",
12187
- {
12188
- d: "M14.4643 7.4929H9.65565M3.16391 18.7132H20.8171C22.0122 18.7132 22.981 17.7563 22.981 16.576L23 13.8348L22.981 6.42431C22.981 5.24396 22.0122 4.28711 20.8171 4.28711H3.16391C1.96882 4.28711 1 5.24396 1 6.42431V16.576C1 17.7563 1.96882 18.7132 3.16391 18.7132Z",
12189
- stroke: "currentColor",
12190
- strokeWidth: "2",
12191
- strokeLinecap: "round",
12192
- strokeLinejoin: "round"
12193
- }
12194
- ),
12195
- /* @__PURE__ */ jsxRuntime.jsx(
12196
- "path",
12197
- {
12198
- d: "M5.32812 18.2325V14.4238C5.32812 13.8715 5.77584 13.4238 6.32813 13.4238H17.7925C18.3447 13.4238 18.7925 13.8715 18.7925 14.4238V18.2325",
12199
- stroke: "currentColor",
12200
- strokeWidth: "2",
12201
- strokeLinecap: "round",
12202
- strokeLinejoin: "round"
12203
- }
12204
- )
12205
- ]
12206
- }
12207
- ),
12208
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base text-gray-900", children: devices })
12209
- ] }),
12210
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
12211
- /* @__PURE__ */ jsxRuntime.jsxs(
12212
- "svg",
12213
- {
12214
- width: "24",
12215
- height: "24",
12216
- viewBox: "0 0 24 24",
12217
- fill: "none",
12218
- xmlns: "http://www.w3.org/2000/svg",
12219
- className: "flex-shrink-0 mt-0.5",
12220
- children: [
12221
- /* @__PURE__ */ jsxRuntime.jsx(
12222
- "path",
12223
- {
12224
- d: "M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2Z",
12225
- stroke: "currentColor",
12226
- strokeWidth: "2",
12227
- strokeLinecap: "round",
12228
- strokeLinejoin: "round"
12229
- }
12230
- ),
12231
- /* @__PURE__ */ jsxRuntime.jsx(
12232
- "circle",
12233
- {
12234
- cx: "12",
12235
- cy: "9",
12236
- r: "2.5",
12237
- stroke: "currentColor",
12238
- strokeWidth: "2"
12239
- }
12240
- )
12241
- ]
12242
- }
12243
- ),
12244
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
12245
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-gray-900", children: address }),
12246
- /* @__PURE__ */ jsxRuntime.jsxs(
12247
- "a",
12162
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
12163
+ "div",
12164
+ {
12165
+ className: cn(
12166
+ "gap-[80px] l:gap-[40px] l:flex l:flex-col-reverse items-start py-[24px] l:pb-[64px]",
12167
+ images.length > 0 ? "grid grid-cols-2" : "flex"
12168
+ ),
12169
+ children: [
12170
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
12171
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[48px] l:text-[32px] font-bold text-gray-900 leading-tight", children: title }),
12172
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[20px]", children: descriptions?.map((desc, index) => /* @__PURE__ */ jsxRuntime.jsx(
12173
+ "p",
12248
12174
  {
12249
- href: googleMapsLink,
12250
- target: "_blank",
12251
- rel: "noopener noreferrer",
12252
- className: "inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-700 mt-1 underline",
12253
- children: [
12254
- pageData.openInGoogleMaps,
12255
- /* @__PURE__ */ jsxRuntime.jsx(
12256
- "svg",
12257
- {
12258
- width: "12",
12259
- height: "12",
12260
- viewBox: "0 0 12 12",
12261
- fill: "none",
12262
- xmlns: "http://www.w3.org/2000/svg",
12263
- children: /* @__PURE__ */ jsxRuntime.jsx(
12264
- "path",
12175
+ className: "text-base text-gray-600 leading-relaxed",
12176
+ children: desc
12177
+ },
12178
+ index
12179
+ )) }),
12180
+ !!devices && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
12181
+ /* @__PURE__ */ jsxRuntime.jsxs(
12182
+ "svg",
12183
+ {
12184
+ width: "24",
12185
+ height: "24",
12186
+ viewBox: "0 0 24 24",
12187
+ fill: "none",
12188
+ xmlns: "http://www.w3.org/2000/svg",
12189
+ className: "flex-shrink-0 mt-0.5",
12190
+ children: [
12191
+ /* @__PURE__ */ jsxRuntime.jsx(
12192
+ "path",
12193
+ {
12194
+ d: "M14.4643 7.4929H9.65565M3.16391 18.7132H20.8171C22.0122 18.7132 22.981 17.7563 22.981 16.576L23 13.8348L22.981 6.42431C22.981 5.24396 22.0122 4.28711 20.8171 4.28711H3.16391C1.96882 4.28711 1 5.24396 1 6.42431V16.576C1 17.7563 1.96882 18.7132 3.16391 18.7132Z",
12195
+ stroke: "currentColor",
12196
+ strokeWidth: "2",
12197
+ strokeLinecap: "round",
12198
+ strokeLinejoin: "round"
12199
+ }
12200
+ ),
12201
+ /* @__PURE__ */ jsxRuntime.jsx(
12202
+ "path",
12203
+ {
12204
+ d: "M5.32812 18.2325V14.4238C5.32812 13.8715 5.77584 13.4238 6.32813 13.4238H17.7925C18.3447 13.4238 18.7925 13.8715 18.7925 14.4238V18.2325",
12205
+ stroke: "currentColor",
12206
+ strokeWidth: "2",
12207
+ strokeLinecap: "round",
12208
+ strokeLinejoin: "round"
12209
+ }
12210
+ )
12211
+ ]
12212
+ }
12213
+ ),
12214
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base text-gray-900", children: devices })
12215
+ ] }),
12216
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
12217
+ /* @__PURE__ */ jsxRuntime.jsxs(
12218
+ "svg",
12219
+ {
12220
+ width: "24",
12221
+ height: "24",
12222
+ viewBox: "0 0 24 24",
12223
+ fill: "none",
12224
+ xmlns: "http://www.w3.org/2000/svg",
12225
+ className: "flex-shrink-0 mt-0.5",
12226
+ children: [
12227
+ /* @__PURE__ */ jsxRuntime.jsx(
12228
+ "path",
12229
+ {
12230
+ d: "M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2Z",
12231
+ stroke: "currentColor",
12232
+ strokeWidth: "2",
12233
+ strokeLinecap: "round",
12234
+ strokeLinejoin: "round"
12235
+ }
12236
+ ),
12237
+ /* @__PURE__ */ jsxRuntime.jsx(
12238
+ "circle",
12239
+ {
12240
+ cx: "12",
12241
+ cy: "9",
12242
+ r: "2.5",
12243
+ stroke: "currentColor",
12244
+ strokeWidth: "2"
12245
+ }
12246
+ )
12247
+ ]
12248
+ }
12249
+ ),
12250
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
12251
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-gray-900", children: address }),
12252
+ /* @__PURE__ */ jsxRuntime.jsxs(
12253
+ "a",
12254
+ {
12255
+ href: googleMapsLink,
12256
+ target: "_blank",
12257
+ rel: "noopener noreferrer",
12258
+ className: "inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-700 mt-1 underline",
12259
+ children: [
12260
+ pageData.openInGoogleMaps,
12261
+ /* @__PURE__ */ jsxRuntime.jsx(
12262
+ "svg",
12265
12263
  {
12266
- d: "M3 9L9 3M9 3H3M9 3V9",
12267
- stroke: "currentColor",
12268
- strokeWidth: "1.5",
12269
- strokeLinecap: "round",
12270
- strokeLinejoin: "round"
12264
+ width: "12",
12265
+ height: "12",
12266
+ viewBox: "0 0 12 12",
12267
+ fill: "none",
12268
+ xmlns: "http://www.w3.org/2000/svg",
12269
+ children: /* @__PURE__ */ jsxRuntime.jsx(
12270
+ "path",
12271
+ {
12272
+ d: "M3 9L9 3M9 3H3M9 3V9",
12273
+ stroke: "currentColor",
12274
+ strokeWidth: "1.5",
12275
+ strokeLinecap: "round",
12276
+ strokeLinejoin: "round"
12277
+ }
12278
+ )
12271
12279
  }
12272
12280
  )
12273
- }
12274
- )
12275
- ]
12276
- }
12277
- )
12278
- ] })
12279
- ] })
12280
- ] }),
12281
- images.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative l:w-full min-l:h-[400px] rounded-2xl overflow-hidden demo-room-swiper", children: [
12282
- /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
12281
+ ]
12282
+ }
12283
+ )
12284
+ ] })
12285
+ ] })
12286
+ ] }),
12287
+ images.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative l:w-full min-l:h-[400px] rounded-2xl overflow-hidden demo-room-swiper", children: [
12288
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
12283
12289
  .demo-room-swiper .swiper-pagination-bullet {
12284
12290
  background-color: rgba(255, 255, 255, 0.5);
12285
12291
  }
@@ -12309,32 +12315,34 @@ var DemoRoomDetail2 = ({
12309
12315
  right: 16px !important;
12310
12316
  }
12311
12317
  ` }),
12312
- /* @__PURE__ */ jsxRuntime.jsx(
12313
- Swiper2,
12314
- {
12315
- modules: [Navigation, Pagination, Autoplay],
12316
- spaceBetween: 0,
12317
- slidesPerView: 1,
12318
- navigation: images.length > 1,
12319
- pagination: images.length > 1 ? { clickable: true } : false,
12320
- autoplay: images.length > 1 ? {
12321
- delay: 3e3,
12322
- disableOnInteraction: false
12323
- } : false,
12324
- loop: images.length > 1,
12325
- className: "h-full rounded-2xl",
12326
- children: images.map((img, index) => /* @__PURE__ */ jsxRuntime.jsx(SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full bg-gray-100", children: /* @__PURE__ */ jsxRuntime.jsx(
12327
- "img",
12318
+ /* @__PURE__ */ jsxRuntime.jsx(
12319
+ Swiper2,
12328
12320
  {
12329
- src: img,
12330
- alt: `Demo room view ${index + 1}`,
12331
- className: "w-full h-full object-cover"
12321
+ modules: [Navigation, Pagination, Autoplay],
12322
+ spaceBetween: 0,
12323
+ slidesPerView: 1,
12324
+ navigation: images.length > 1,
12325
+ pagination: images.length > 1 ? { clickable: true } : false,
12326
+ autoplay: images.length > 1 ? {
12327
+ delay: 3e3,
12328
+ disableOnInteraction: false
12329
+ } : false,
12330
+ loop: images.length > 1,
12331
+ className: "h-full rounded-2xl",
12332
+ children: images.map((img, index) => /* @__PURE__ */ jsxRuntime.jsx(SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full bg-gray-100", children: /* @__PURE__ */ jsxRuntime.jsx(
12333
+ "img",
12334
+ {
12335
+ src: img,
12336
+ alt: `Demo room view ${index + 1}`,
12337
+ className: "w-full h-full object-cover"
12338
+ }
12339
+ ) }) }, index))
12332
12340
  }
12333
- ) }) }, index))
12334
- }
12335
- )
12336
- ] })
12337
- ] }) });
12341
+ )
12342
+ ] })
12343
+ ]
12344
+ }
12345
+ ) });
12338
12346
  };
12339
12347
  DemoRoomDetail2.displayName = "DemoRoomDetail";
12340
12348
 
@@ -12538,9 +12546,7 @@ var BookingFormO2O = ({
12538
12546
  const selectedPodButtonLink = React15.useMemo(() => {
12539
12547
  if (isPodButtonDisabled) return void 0;
12540
12548
  if (isPodDesignEditMode) {
12541
- const editBaseUrl = getSafePageDataUrl(
12542
- selectedPodContent?.buttonEditLink
12543
- );
12549
+ const editBaseUrl = getSafePageDataUrl(selectedPodContent?.buttonEditLink);
12544
12550
  if (!editBaseUrl || !effectiveStoreManagerId || !effectiveMirSessionId) {
12545
12551
  return void 0;
12546
12552
  }
@@ -12612,7 +12618,11 @@ var BookingFormO2O = ({
12612
12618
  onChange: (event2) => {
12613
12619
  setSelectedPurposeType(event2.target.value);
12614
12620
  },
12615
- className: "h-[48px] w-full appearance-none rounded-[8px] border border-[#D9DCE1] bg-white px-[16px] pr-[48px] text-[16px] font-medium text-[#2A2C32] outline-none transition-colors focus:border-[#080A0F] focus:ring-2 focus:ring-[#3ADB67]/30 l:text-[14px]",
12621
+ disabled: !!token,
12622
+ className: cn(
12623
+ "h-[48px] w-full appearance-none rounded-[8px] border border-[#D9DCE1] bg-white px-[16px] pr-[48px] text-[16px] font-medium text-[#2A2C32] outline-none transition-colors focus:border-[#080A0F] focus:ring-2 focus:ring-[#3ADB67]/30 l:text-[14px]",
12624
+ token && "pointer-events-none cursor-not-allowed opacity-50"
12625
+ ),
12616
12626
  children: purposeOptions.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
12617
12627
  "option",
12618
12628
  {
@@ -12683,7 +12693,7 @@ var BookingFormO2O = ({
12683
12693
  onQuestionnaireSubmit,
12684
12694
  pageData: dateTimePickerPageData,
12685
12695
  selectedPurposeType: selectedPurpose?.type,
12686
- podDesignId
12696
+ podDesignId: mirSessionId
12687
12697
  }
12688
12698
  ) })
12689
12699
  ] })
@@ -12693,6 +12703,7 @@ BookingFormO2O.displayName = "BookingFormO2O";
12693
12703
  var BookingSuccessO2O = ({
12694
12704
  bookingData: initialBookingData,
12695
12705
  token,
12706
+ isStoreUser,
12696
12707
  apiConfig,
12697
12708
  onScheduleAgain,
12698
12709
  onCancelSuccess,
@@ -12812,7 +12823,9 @@ var BookingSuccessO2O = ({
12812
12823
  const fetchBookingDesign = async () => {
12813
12824
  try {
12814
12825
  const apiClient = createDemoRoomApi(apiConfig);
12815
- const design = await apiClient.getBookingDesign({ booking_token: token });
12826
+ const design = await apiClient.getBookingDesign({
12827
+ booking_token: token
12828
+ });
12816
12829
  setBookingDesign(design);
12817
12830
  } catch (err) {
12818
12831
  console.error("Failed to fetch booking design:", err);
@@ -12874,9 +12887,7 @@ var BookingSuccessO2O = ({
12874
12887
  }
12875
12888
  const podDesignName = bookingDesign?.material;
12876
12889
  const podDesignImage = bookingDesign?.thumb_url;
12877
- const podOrderCode = bookingDesign?.order_code;
12878
- console.log(bookingDesign);
12879
- console.log(bookingData);
12890
+ bookingDesign?.order_code;
12880
12891
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `min-h-screen l:py-0 l:px-0 py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto", children: [
12881
12892
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[48px] xxl:text-[32px] font-bold text-[#080A0F] mb-8 print:hidden", children: pageData.yourAppointment }),
12882
12893
  isCancelled && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-[16px] l:items-start p-6 mb-4 l:gap-2 flex l:flex-col items-center justify-between print:hidden", children: [
@@ -12992,15 +13003,14 @@ var BookingSuccessO2O = ({
12992
13003
  " ",
12993
13004
  podDesignName
12994
13005
  ] }),
12995
- bookingData?.status && pageData.podData?.status?.[bookingData.status] && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-[#4A4C56]", children: pageData.podData.status[bookingData.status] }),
12996
- podOrderCode && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-[#4A4C56]", children: podOrderCode })
13006
+ bookingData?.status && pageData.podData?.status?.[bookingData.status] && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-[#4A4C56]", children: pageData.podData.status[bookingData.status] })
12997
13007
  ] }),
12998
13008
  podDesignImage && /* @__PURE__ */ jsxRuntime.jsx(
12999
- "img",
13009
+ antd.Image,
13000
13010
  {
13001
13011
  src: podDesignImage,
13002
13012
  alt: podDesignName,
13003
- className: "w-[88px] h-[88px] rounded-[8px] object-cover shrink-0"
13013
+ className: "!w-[88px] !h-[88px] rounded-[8px] !object-cover"
13004
13014
  }
13005
13015
  )
13006
13016
  ] })
@@ -13017,7 +13027,7 @@ var BookingSuccessO2O = ({
13017
13027
  children: /* @__PURE__ */ jsxRuntime.jsx(
13018
13028
  antd.QRCode,
13019
13029
  {
13020
- value: "https://www.eufymake.com/?type=qrcode",
13030
+ value: `${pageData.podData?.QRCodeUrl}${token}&isStoreUser=true` || "",
13021
13031
  size: 200
13022
13032
  }
13023
13033
  )