create-brainerce-store 1.68.0 → 1.72.0
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/README.md +31 -10
- package/dist/index.js +197 -105
- package/messages/en.json +63 -3
- package/messages/he.json +63 -3
- package/package.json +1 -1
- package/templates/nextjs/base/TRANSLATIONS.md +14 -7
- package/templates/nextjs/base/src/app/checkout/page.tsx +1074 -1017
- package/templates/nextjs/base/src/app/order-confirmation/page.tsx +21 -2
- package/templates/nextjs/base/src/app/products/[slug]/page.tsx +1 -1
- package/templates/nextjs/base/src/app/register/page.tsx +67 -64
- package/templates/nextjs/base/src/components/account/order-history.tsx +25 -39
- package/templates/nextjs/base/src/components/account/order-status-timeline.tsx +30 -11
- package/templates/nextjs/base/src/components/account/profile-section.tsx +303 -226
- package/templates/nextjs/base/src/components/auth/register-form.tsx +326 -245
- package/templates/nextjs/base/src/components/checkout/custom-fields-step.tsx +306 -294
- package/templates/nextjs/base/src/components/checkout/date-picker.tsx +13 -1
- package/templates/nextjs/base/src/components/checkout/datetime-picker.tsx +61 -21
- package/templates/nextjs/base/src/components/shared/birthday-picker.tsx +258 -0
- package/templates/nextjs/base/src/core/hooks/use-cart-page.ts +71 -2
- package/templates/nextjs/base/src/core/lib/auth.ts +155 -154
- package/templates/nextjs/base/src/core/lib/birthday.ts +74 -0
- package/templates/nextjs/base/src/core/lib/brainerce.ts.ejs +5 -16
- package/templates/nextjs/base/src/core/lib/store-info.ts +10 -0
- package/templates/nextjs/base/src/core/providers/store-provider.tsx.ejs +3 -6
- package/templates/nextjs/base/src/ui/cart/cart-item.tsx +19 -1
- package/templates/nextjs/base/src/ui/cart/cart-view.tsx +42 -6
- package/templates/nextjs/base/src/ui/cart/reservation-countdown.tsx +52 -10
- package/templates/nextjs/base/src/ui/layout/newsletter-signup.tsx +143 -0
- package/templates/nextjs/base/src/ui/layout/site-footer.tsx.ejs +18 -2
- package/templates/nextjs/base/src/ui/product/back-in-stock-form.tsx +173 -0
- package/templates/nextjs/base/src/ui/product/product-client-section.tsx +484 -455
- package/templates/nextjs/base/src/ui/product/review-form.tsx +136 -12
- package/templates/nextjs/base/src/ui/product/reviews-section.tsx.ejs +139 -108
- package/templates/nextjs/designs/atelier/ui/cart/cart-drawer.tsx +21 -3
- package/templates/nextjs/designs/atelier/ui/cart/cart-item.tsx +19 -1
- package/templates/nextjs/designs/atelier/ui/cart/cart-view.tsx +44 -7
- package/templates/nextjs/designs/atelier/ui/cart/reservation-countdown.tsx +52 -10
- package/templates/nextjs/designs/atelier/ui/layout/site-footer.tsx.ejs +155 -142
- package/templates/nextjs/designs/atelier/ui/product/product-client-section.tsx +500 -477
- package/templates/nextjs/designs/atelier/ui/product/review-form.tsx +135 -11
- package/templates/nextjs/designs/atelier/ui/product/reviews-section.tsx.ejs +179 -148
- package/templates/nextjs/ui-canvas/cart/cart-item.tsx +15 -1
- package/templates/nextjs/ui-canvas/cart/cart-view.tsx +38 -4
- package/templates/nextjs/ui-canvas/cart/reservation-countdown.tsx +54 -11
- package/templates/nextjs/ui-canvas/layout/newsletter-signup.tsx +122 -0
- package/templates/nextjs/ui-canvas/layout/site-footer.tsx.ejs +87 -83
- package/templates/nextjs/ui-canvas/product/back-in-stock-form.tsx +151 -0
- package/templates/nextjs/ui-canvas/product/product-client-section.tsx +373 -352
- package/templates/nextjs/ui-canvas/product/review-form.tsx +129 -11
- package/templates/nextjs/ui-canvas/product/reviews-section.tsx.ejs +127 -96
package/messages/he.json
CHANGED
|
@@ -38,7 +38,28 @@
|
|
|
38
38
|
"allRightsReserved": "כל הזכויות שמורות.",
|
|
39
39
|
"store": "חנות",
|
|
40
40
|
"save": "שמירה",
|
|
41
|
-
"cancel": "ביטול"
|
|
41
|
+
"cancel": "ביטול",
|
|
42
|
+
"birthday": "יום הולדת",
|
|
43
|
+
"birthdayMonth": "חודש",
|
|
44
|
+
"birthdayDay": "יום",
|
|
45
|
+
"birthdayGiftNote": "הוסיפו את יום ההולדת ותקבלו מתנה במייל ביום עצמו.",
|
|
46
|
+
"birthdayIncomplete": "בחרו גם חודש וגם יום, או השאירו את שניהם ריקים.",
|
|
47
|
+
"birthdayRequired": "בחרו את חודש ויום ההולדת כדי להמשיך.",
|
|
48
|
+
"birthdayPlaceholder": "בחרו את יום ההולדת",
|
|
49
|
+
"birthdayClear": "ניקוי",
|
|
50
|
+
"birthdayDisplay": "{day} ב{month}",
|
|
51
|
+
"monthJanuary": "ינואר",
|
|
52
|
+
"monthFebruary": "פברואר",
|
|
53
|
+
"monthMarch": "מרץ",
|
|
54
|
+
"monthApril": "אפריל",
|
|
55
|
+
"monthMay": "מאי",
|
|
56
|
+
"monthJune": "יוני",
|
|
57
|
+
"monthJuly": "יולי",
|
|
58
|
+
"monthAugust": "אוגוסט",
|
|
59
|
+
"monthSeptember": "ספטמבר",
|
|
60
|
+
"monthOctober": "אוקטובר",
|
|
61
|
+
"monthNovember": "נובמבר",
|
|
62
|
+
"monthDecember": "דצמבר"
|
|
42
63
|
},
|
|
43
64
|
"nav": {
|
|
44
65
|
"products": "מוצרים",
|
|
@@ -130,7 +151,13 @@
|
|
|
130
151
|
"saving": "שומר…",
|
|
131
152
|
"submittingBtn": "שולח…",
|
|
132
153
|
"saveChanges": "שמירת שינויים",
|
|
133
|
-
"submitReview": "שליחת ביקורת"
|
|
154
|
+
"submitReview": "שליחת ביקורת",
|
|
155
|
+
"addPhotos": "הוספת תמונות",
|
|
156
|
+
"removePhoto": "הסרת תמונה",
|
|
157
|
+
"photoUploading": "מעלה...",
|
|
158
|
+
"photoTooLarge": "התמונה הזו גדולה מדי. בחרו תמונה קטנה יותר.",
|
|
159
|
+
"photoUploadFailed": "לא הצלחנו להעלות את התמונה. נסו תמונה אחרת.",
|
|
160
|
+
"photosNeedApproval": "התמונות נבדקות לפני שהן מופיעות, כך שייתכן שהתמונה שלכם לא תוצג מיד."
|
|
134
161
|
},
|
|
135
162
|
"customization": {
|
|
136
163
|
"title": "התאמה אישית של המוצר",
|
|
@@ -161,7 +188,8 @@
|
|
|
161
188
|
"addBundleItem": "הוסף וחסוך",
|
|
162
189
|
"addingBundle": "מוסיף...",
|
|
163
190
|
"selectOptions": "בחר אפשרויות",
|
|
164
|
-
"outOfStock": "אזל מהמלאי"
|
|
191
|
+
"outOfStock": "אזל מהמלאי",
|
|
192
|
+
"unavailableItemsHint": "הסירו את המוצרים שמסומנים כאזלו מהמלאי או כלא זמינים כדי להמשיך לתשלום."
|
|
165
193
|
},
|
|
166
194
|
"checkout": {
|
|
167
195
|
"pageTitle": "תשלום",
|
|
@@ -258,6 +286,8 @@
|
|
|
258
286
|
"customFieldsDateNextMonth": "חודש הבא",
|
|
259
287
|
"customFieldsTimeLabel": "שעה",
|
|
260
288
|
"customFieldsTimeClosed": "אין שעות משלוח זמינות בתאריך הזה.",
|
|
289
|
+
"customFieldsTimeNoneLeft": "כל השעות בתאריך הזה כבר עברו. בחרו תאריך מאוחר יותר.",
|
|
290
|
+
"customFieldsTimeTo": "עד",
|
|
261
291
|
"changeOptions": "שנה אפשרויות",
|
|
262
292
|
"surcharges": "תוספות"
|
|
263
293
|
},
|
|
@@ -390,12 +420,18 @@
|
|
|
390
420
|
"memberSince": "חבר מאז",
|
|
391
421
|
"orderPrefix": "הזמנה",
|
|
392
422
|
"productFallback": "מוצר",
|
|
423
|
+
"statusDraft": "טיוטה",
|
|
393
424
|
"statusPending": "ממתין",
|
|
394
425
|
"statusProcessing": "בטיפול",
|
|
426
|
+
"statusOnHold": "מושהה",
|
|
427
|
+
"statusPaid": "שולם",
|
|
395
428
|
"statusShipped": "נשלח",
|
|
396
429
|
"statusDelivered": "נמסר",
|
|
430
|
+
"statusCompleted": "הושלם",
|
|
431
|
+
"statusFulfilled": "סופק",
|
|
397
432
|
"statusCancelled": "בוטל",
|
|
398
433
|
"statusRefunded": "הוחזר",
|
|
434
|
+
"statusPartiallyRefunded": "הוחזר חלקית",
|
|
399
435
|
"editProfile": "עריכת פרופיל",
|
|
400
436
|
"firstName": "שם פרטי",
|
|
401
437
|
"lastName": "שם משפחה",
|
|
@@ -472,6 +508,9 @@
|
|
|
472
508
|
},
|
|
473
509
|
"reservation": {
|
|
474
510
|
"expired": "השריון פג. ייתכן שהמוצרים כבר לא זמינים.",
|
|
511
|
+
"expiredHint": "רעננו עבורכם את העגלה. כדאי לבדוק אותה לפני שממשיכים.",
|
|
512
|
+
"expiredCheckout": "השריון על המלאי שוחרר, ולכן התשלום מושהה. חזרו לעגלה ובדקו אותה.",
|
|
513
|
+
"backToCart": "חזרה לעגלה",
|
|
475
514
|
"hurry": "מהרו!",
|
|
476
515
|
"reservedFor": "המוצרים שמורים למשך"
|
|
477
516
|
},
|
|
@@ -496,6 +535,27 @@
|
|
|
496
535
|
"genericError": "משהו השתבש. אנא נסה שוב.",
|
|
497
536
|
"fieldRequired": "השדה {label} הוא חובה"
|
|
498
537
|
},
|
|
538
|
+
"backInStock": {
|
|
539
|
+
"title": "עדכנו אותי כשחוזר למלאי",
|
|
540
|
+
"subtitle": "הודעה אחת על הפריט הזה, ותו לא. אפשר לבטל בכל רגע.",
|
|
541
|
+
"placeholder": "your@email.com",
|
|
542
|
+
"submit": "עדכנו אותי",
|
|
543
|
+
"submitting": "שולח...",
|
|
544
|
+
"doneTitle": "נעדכן אותך כשהפריט יחזור",
|
|
545
|
+
"doneBody": "הכמות מוגבלת, אז ייתכן שהפריט ייגמר מהר.",
|
|
546
|
+
"genericError": "משהו השתבש. אפשר לנסות שוב."
|
|
547
|
+
},
|
|
548
|
+
"newsletter": {
|
|
549
|
+
"title": "הצטרפו לניוזלטר",
|
|
550
|
+
"subtitle": "מבצעים ומוצרים חדשים, ישירות למייל.",
|
|
551
|
+
"placeholder": "your@email.com",
|
|
552
|
+
"submit": "הרשמה",
|
|
553
|
+
"submitting": "שולח...",
|
|
554
|
+
"checkEmailTitle": "כמעט סיימנו — בדקו את המייל",
|
|
555
|
+
"checkEmailBody": "שלחנו לכם קישור לאישור. בדקו גם בתיקיית הספאם; עותק נוסף לא יישלח ב-24 השעות הקרובות.",
|
|
556
|
+
"discountCode": "הקוד שלכם: {code}",
|
|
557
|
+
"genericError": "משהו השתבש. נסו שוב."
|
|
558
|
+
},
|
|
499
559
|
"content": {
|
|
500
560
|
"faqTitle": "שאלות נפוצות",
|
|
501
561
|
"faqEmptyTitle": "השאלות הנפוצות בדרך",
|
package/package.json
CHANGED
|
@@ -157,22 +157,29 @@ return {
|
|
|
157
157
|
|
|
158
158
|
## Promotional surfaces: bundles, bumps, discount banners
|
|
159
159
|
|
|
160
|
-
The same overlay applies to every promotional surface
|
|
160
|
+
The same overlay applies to every promotional surface, so you don't need locale-aware code:
|
|
161
161
|
|
|
162
162
|
```tsx
|
|
163
|
-
// Cart bundles (cross-sell)
|
|
163
|
+
// Cart bundles (cross-sell), locale-aware automatically:
|
|
164
164
|
const cart = await client.getCart(cartId);
|
|
165
165
|
cart.bundles[0].name; // "ארוחת צהריים" (bundle's own label)
|
|
166
166
|
cart.bundles[0].offeredProducts[0].name; // "פיצה גבינה" (each offered product)
|
|
167
167
|
|
|
168
|
-
// Order bumps at checkout:
|
|
169
|
-
const { bumps } = await client.
|
|
168
|
+
// Order bumps at checkout. `getCheckoutBumps` takes a CHECKOUT id, not a cart id:
|
|
169
|
+
const { bumps } = await client.getCheckoutBumps(checkoutId);
|
|
170
170
|
bumps[0].title; // translated bump headline (or merchant override)
|
|
171
171
|
bumps[0].bumpProduct.name; // translated product name
|
|
172
172
|
|
|
173
|
-
//
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
// Adding or removing a bump takes the CART id plus the bump config id
|
|
174
|
+
// (bumps[i].id). Pass a variantId when bumps[i].requiresVariantSelection:
|
|
175
|
+
await client.addOrderBump(cartId, bumps[0].id, selectedVariantId);
|
|
176
|
+
await client.removeOrderBump(cartId, bumps[0].id);
|
|
177
|
+
|
|
178
|
+
// Discount-rule banners. The API returns ready-to-render banner text, not the
|
|
179
|
+
// rule object: DiscountBanner is { ruleId, text, type }, so there is no `name`
|
|
180
|
+
// and no `displayConfig` to compose yourself.
|
|
181
|
+
const banners = await client.getDiscountBanners();
|
|
182
|
+
banners[0].text; // translated banner copy
|
|
176
183
|
```
|
|
177
184
|
|
|
178
185
|
## How merchants populate translations
|