@thryveai/theme-interfaces 2.4.19 → 2.4.20

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 CHANGED
@@ -1,29 +1,29 @@
1
- #V8 Theme Interfaces
2
-
3
- interfaces for all MI9 Retailer Themes.
4
-
5
- ###icons.interfaces
6
- List of all icons used inside the ui projects.
7
-
8
- ###retailer-settings.interfaces
9
- more info here
10
- https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo
11
- ###theme.interfaces
12
- The interface for each theme, colors, fonts, sizes and other css properties.
13
-
14
- #To Build Project
15
-
16
- ```
17
- npm install
18
- npm run build
19
- ```
20
-
21
- #To Publish npm package
22
- ```
23
- npm login
24
- npm publish
25
- ```
26
- or
27
- ```
28
- npm run push
29
- ```
1
+ #V8 Theme Interfaces
2
+
3
+ interfaces for all MI9 Retailer Themes.
4
+
5
+ ###icons.interfaces
6
+ List of all icons used inside the ui projects.
7
+
8
+ ###retailer-settings.interfaces
9
+ more info here
10
+ https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo
11
+ ###theme.interfaces
12
+ The interface for each theme, colors, fonts, sizes and other css properties.
13
+
14
+ #To Build Project
15
+
16
+ ```
17
+ npm install
18
+ npm run build
19
+ ```
20
+
21
+ #To Publish npm package
22
+ ```
23
+ npm login
24
+ npm publish
25
+ ```
26
+ or
27
+ ```
28
+ npm run push
29
+ ```
@@ -478,6 +478,7 @@ export interface IGlobalCheckoutProps {
478
478
  export interface IShoppingRuleControl {
479
479
  modal: boolean;
480
480
  pdp: boolean;
481
+ productCard: boolean;
481
482
  }
482
483
  export interface IAddressIntegration {
483
484
  enabled: boolean;
@@ -0,0 +1,4 @@
1
+ declare const originalJsonObject: {
2
+ [key: string]: any;
3
+ };
4
+ export default originalJsonObject;
@@ -0,0 +1,659 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var originalJsonObject = {
4
+ usa: {
5
+ adminPanelOnly: {
6
+ bannerName: "Wynshop New Retailer",
7
+ logoUrl: "https://wynshop.com/wp-content/uploads/2021/08/xWynshop_Font_logo_150x39.png.pagespeed.ic.3j0jIxPBvP.webp 1x",
8
+ },
9
+ advertSettings: {
10
+ page_homepage: {
11
+ leaderboards: {
12
+ "1": {
13
+ desktop: "Search",
14
+ tablet: "Search",
15
+ mobile: "Home_Page_Mobile",
16
+ },
17
+ },
18
+ },
19
+ "page_product-categories": {
20
+ leaderboards: {
21
+ "0": {
22
+ desktop: "Category_Header_1000x40",
23
+ tablet: "Category_Header_728x40",
24
+ mobile: "Category_Header_300x40",
25
+ },
26
+ "1": {
27
+ desktop: "Search",
28
+ tablet: "Search",
29
+ mobile: "Search",
30
+ },
31
+ },
32
+ productCardBanners: {
33
+ "2": {
34
+ desktop: "Single_Tile",
35
+ },
36
+ "5": {
37
+ desktop: "Single_Tile",
38
+ mobile: "Single_Tile",
39
+ },
40
+ },
41
+ },
42
+ "page_product-listing": {
43
+ leaderboards: {
44
+ "0": {
45
+ desktop: "Category_Header_1000x40",
46
+ tablet: "Category_Header_728x40",
47
+ mobile: "Category_Header_300x40",
48
+ },
49
+ },
50
+ productGrid: {
51
+ leaderboards: {
52
+ "0": {
53
+ desktop: "Leaderboard_728x90_Position_1",
54
+ tablet: "Leaderboard_728x90_Position_1",
55
+ mobile: "Mobile_Banner_320x50_Position_1",
56
+ },
57
+ "2": {
58
+ desktop: "Leaderboard_728x90_Position_2",
59
+ tablet: "Leaderboard_728x90_Position_2",
60
+ mobile: "Mobile_Banner_320x50_Position_2",
61
+ },
62
+ "5": {
63
+ desktop: "Leaderboard_728x90_Position_3",
64
+ tablet: "Leaderboard_728x90_Position_3",
65
+ mobile: "Mobile_Banner_320x50_Position_3",
66
+ },
67
+ },
68
+ productCardBanners: {
69
+ "5": {
70
+ desktop: "Single_Tile",
71
+ mobile: "Single_Tile",
72
+ },
73
+ "12": {
74
+ desktop: "Double_Tile",
75
+ mobile: "Single_Tile",
76
+ },
77
+ },
78
+ },
79
+ skyscrapers: {
80
+ desktop: "Wide_Skyscraper_160x600",
81
+ },
82
+ },
83
+ page_search: {
84
+ leaderboards: {
85
+ "0": {
86
+ desktop: "Search",
87
+ tablet: "Search",
88
+ mobile: "Search-Mobile",
89
+ },
90
+ },
91
+ productGrid: {
92
+ leaderboards: {
93
+ "0": {
94
+ desktop: "Leaderboard_728x90_Position_1",
95
+ tablet: "Leaderboard_728x90_Position_1",
96
+ mobile: "Mobile_Banner_320x50_Position_1",
97
+ },
98
+ "2": {
99
+ desktop: "Leaderboard_728x90_Position_2",
100
+ tablet: "Leaderboard_728x90_Position_2",
101
+ mobile: "Mobile_Banner_320x50_Position_2",
102
+ },
103
+ "5": {
104
+ desktop: "Leaderboard_728x90_Position_3",
105
+ tablet: "Leaderboard_728x90_Position_3",
106
+ mobile: "Mobile_Banner_320x50_Position_3",
107
+ },
108
+ },
109
+ productCardBanners: {
110
+ "5": {
111
+ desktop: "Single_Tile",
112
+ mobile: "Single_Tile",
113
+ },
114
+ "12": {
115
+ desktop: "Double_Tile",
116
+ mobile: "Double_Tile",
117
+ },
118
+ },
119
+ },
120
+ skyscrapers: {
121
+ desktop: "Wide_Skyscraper_160x600",
122
+ },
123
+ },
124
+ },
125
+ timeslotModalSettings: {
126
+ showOnAddToCart: false,
127
+ timeslotRequiredToAddToCart: false,
128
+ timeslotRequiredToViewCartReview: false,
129
+ },
130
+ accountPage: {
131
+ loyaltyTab: {
132
+ disabledEdit: false,
133
+ enabled: true,
134
+ loyaltyNumberLength: 18,
135
+ loyaltyNumberPrefix: "",
136
+ loyaltyValidationType: [
137
+ {
138
+ multiLength: [10, 11, 18],
139
+ _type: "multi",
140
+ },
141
+ "numericOnly",
142
+ ],
143
+ },
144
+ idp: {
145
+ enabled: false,
146
+ target: "_self",
147
+ url: "",
148
+ },
149
+ },
150
+ addresses: {
151
+ addressValidationTypes: {
152
+ addressLine1: ["alphaNumeric", "required"],
153
+ addressLine2: ["alphaNumeric"],
154
+ city: ["alphaNumeric", "required"],
155
+ countyProvinceState: ["usState", "required"],
156
+ familyName: ["alphaOnly", "required"],
157
+ firstName: ["alphaOnly", "required"],
158
+ instructions: ["alphaNumeric"],
159
+ phoneNumber: ["usPhone", "required"],
160
+ postCode: ["usPostCode", "required"],
161
+ },
162
+ integration: {},
163
+ useAddressValidation: true,
164
+ },
165
+ addressValidationTypes: {
166
+ addressLine1: ["alphaNumeric", "required"],
167
+ addressLine2: ["alphaNumeric"],
168
+ city: ["alphaNumeric", "required"],
169
+ countyProvinceState: ["usState", "required"],
170
+ familyName: ["alphaOnly", "required"],
171
+ firstName: ["alphaOnly", "required"],
172
+ instructions: ["alphaNumeric"],
173
+ phoneNumber: ["usPhone", "required"],
174
+ postCode: ["usPostCode", "required"],
175
+ },
176
+ addressIntegration: {
177
+ enabled: false,
178
+ addressFinderType: "IE",
179
+ getAddressesUrl: "https://api.autoaddress.ie/2.0/autocomplete?key={IE_ADDRESS_SERVICE_KEY}&address={searchQuery}&addressProfileName=MusgraveDefault",
180
+ getLocationUrl: "https://api.autoaddress.ie/2.0/FindAddress?key={IE_ADDRESS_SERVICE_KEY}&addressId={id}&addressProfileName=MusgraveDefault",
181
+ getCoordinatesUrl: "https://api.autoaddress.ie/2.0/GetEcadData?key={IE_ADDRESS_SERVICE_KEY}&ecadid={id}&addressProfileName=MusgraveDefault",
182
+ },
183
+ allowInStorePurchases: true,
184
+ allowPastPurchases: true,
185
+ buildNumber: "{{buildNumber}}",
186
+ cacheTimeMins: 1,
187
+ checkoutV1: false,
188
+ disableAddressOnDelivery: false,
189
+ favoritesV1: false,
190
+ checkout: {
191
+ numericPhonePayload: true,
192
+ houseAccountRegExValidation: ".",
193
+ minimumCreditCardAmount: 1,
194
+ paymentCards: {
195
+ AmExpCard: true,
196
+ DiscoverCard: true,
197
+ MasterCard: true,
198
+ VisaCard: true,
199
+ },
200
+ checkoutValidation: {
201
+ instructions: ["alphaNumeric", "notWhiteSpacesOnly"],
202
+ phoneNumber: ["usPhone10Digits", "required"],
203
+ smsNumber: ["iePhone", "required"],
204
+ },
205
+ },
206
+ checkoutValidation: {
207
+ instructions: ["alphaNumeric", "notWhiteSpacesOnly"],
208
+ phoneNumber: ["usPhone10Digits", "required"],
209
+ smsNumber: ["iePhone", "required"],
210
+ },
211
+ ctaButtons: null,
212
+ defaultCountry: "USA",
213
+ defaultSearchParams: {
214
+ page: "1",
215
+ q: "*",
216
+ skip: "0",
217
+ take: "36",
218
+ },
219
+ defaultShoppingMode: "pickup",
220
+ defaultStoreLocation: {
221
+ latitude: 0,
222
+ longitude: 0,
223
+ },
224
+ disableTprPrice: false,
225
+ documentTitle: "ThryveAi Commerce",
226
+ enable3dSecure: false,
227
+ enableGoogleTranslate: false,
228
+ enableNewsletterSignup: true,
229
+ enableNotifications: true,
230
+ errorLoggingLevel: "error",
231
+ flipp: {
232
+ retailer: "saveonfoods",
233
+ merchantId: "2062",
234
+ accessToken: "fc8eefe7fad1af13cbece4e248a6c7e6",
235
+ version: 2,
236
+ },
237
+ gtmId: "GTM-K5DXFNB",
238
+ hideTaxOnSummary: false,
239
+ houseAccountRegExValidation: ".",
240
+ idpTarget: "_self",
241
+ isPlanningOnly: false,
242
+ layout: {
243
+ footerVersion: "default",
244
+ },
245
+ limitProductCardTitleHeight: true,
246
+ loggingLevelClient: "error",
247
+ loggingLevelServer: "error",
248
+ mainHeaderHeight: 119,
249
+ mapZoom: 8,
250
+ minimumCreditCardAmount: 1,
251
+ nutritionZone: "us",
252
+ paymentCards: {
253
+ AmExpCard: true,
254
+ DiscoverCard: true,
255
+ MasterCard: true,
256
+ VisaCard: true,
257
+ },
258
+ pdpDetailsLayout: {
259
+ desktop: {
260
+ left: [
261
+ "productDescription",
262
+ "brandBankTest",
263
+ "enhancedProductMarketing",
264
+ "healthClaims",
265
+ "_nutStatement",
266
+ "productSalesInfo",
267
+ "productIngredients",
268
+ "sodiumWarning",
269
+ "alcohol_restricted",
270
+ "allergy_text",
271
+ "brand_marketing",
272
+ "product_marketing",
273
+ "_lower_age_limit_Statutory",
274
+ "_lower_age_limit_Advisory",
275
+ "_storeage_type",
276
+ "_storageConditions",
277
+ "productNutrition",
278
+ "_alcohol_info",
279
+ "productNumber",
280
+ ],
281
+ right: ["recommendations", "feeding_instructions"],
282
+ },
283
+ mobile: {
284
+ left: [
285
+ "healthClaims",
286
+ "_nutStatement",
287
+ "enhancedProductMarketing",
288
+ "productSalesInfo",
289
+ "productDescription",
290
+ "sodiumWarning",
291
+ "productNumber",
292
+ "recommendations",
293
+ ],
294
+ right: [
295
+ "brandBankTest",
296
+ "feeding_instructions",
297
+ "productIngredients",
298
+ "productNutrition",
299
+ "productNumber",
300
+ "recommendations",
301
+ ],
302
+ },
303
+ },
304
+ productCardTitleHeight: 40,
305
+ registrationFields: [
306
+ {
307
+ name: "phone",
308
+ label: "registrationPageStep2.fields.phoneNumber.label",
309
+ designVersion: "default",
310
+ placeholder: "registrationPageStep2.fields.phoneNumber.placeholder",
311
+ validationTypes: ["usPhone", "required"],
312
+ },
313
+ {
314
+ name: "loyaltyId",
315
+ label: "registrationPageStep2.fields.loyaltyId.label",
316
+ designVersion: "default",
317
+ placeholder: "registrationPageStep2.fields.loyaltyId.placeholder",
318
+ validationTypes: [
319
+ {
320
+ multiLength: [10, 11, 18],
321
+ _type: "multi",
322
+ },
323
+ "numericOnly",
324
+ ],
325
+ },
326
+ ],
327
+ retailerCountry: "us",
328
+ retailerName: "mi9",
329
+ daysToRemainSignedIn: 30,
330
+ searchPreview: {
331
+ desktop: {
332
+ products: true,
333
+ suggestions: true,
334
+ },
335
+ mobile: {
336
+ products: true,
337
+ suggestions: true,
338
+ },
339
+ },
340
+ showCheckoutPromoCode: true,
341
+ showImgOnOrder: false,
342
+ smsNotifications: {
343
+ enabled: false,
344
+ getEnrollmentUrl: "",
345
+ postEnrollmentUrl: "",
346
+ },
347
+ subHeaderHeight: 30,
348
+ promoTemplateVersion: 1,
349
+ useAddressValidation: true,
350
+ restrictMapPlacesResults: {
351
+ fetchNearStoresSettings: {
352
+ kmRange: 20,
353
+ totalTake: 30,
354
+ },
355
+ },
356
+ globalAnimations: {
357
+ confetti: {
358
+ enableConfettiAnimation: true,
359
+ },
360
+ },
361
+ googleAutocompleteSettings: {
362
+ types: "geocode",
363
+ },
364
+ features: {
365
+ additionalCharges: true,
366
+ clientCache: false,
367
+ giftCards: {
368
+ enabled: true,
369
+ gitfCardInputValidation: "^[0-9]{17}$",
370
+ pinInputValidation: "^[0-9]{4}$",
371
+ reCaptcha: true,
372
+ giftCardInputValidation: "^[0-9]{17}$",
373
+ },
374
+ vouchers: {
375
+ enabled: true,
376
+ reCaptcha: true,
377
+ },
378
+ smartbanner: {
379
+ enabled: true,
380
+ author: "Wynshop",
381
+ button: "OPEN",
382
+ buttonUrlApple: "https://apps.apple.com/ie/app/facebook/id284882215:",
383
+ buttonUrlGoogle: "http://play.google.com/store/apps/details?id=com.facebook.katana",
384
+ closeLabel: "X",
385
+ iconApple: "https://storage.googleapis.com/dam-mi9-qat-abe316d.mi9.qat.v8.commerce.mi9cloud.com/Images/AppleIcon.png",
386
+ iconGoogle: "https://storage.googleapis.com/dam-mi9-qat-abe316d.mi9.qat.v8.commerce.mi9cloud.com/Images/GooglePlayIcon.png",
387
+ price: "$2.99",
388
+ priceSuffixApple: " - on App Store",
389
+ priceSuffixGoogle: " - on Play Store",
390
+ title: "Storefront App",
391
+ },
392
+ entryModalVersion: "entry",
393
+ allowInStorePurchases: false,
394
+ allowPastPurchases: true,
395
+ advertSettings: {},
396
+ enableGoogleTranslate: false,
397
+ enableNewsletterSignup: false,
398
+ enableNotifications: false,
399
+ externalStoreSelectorUrl: {
400
+ enabled: false,
401
+ url: "",
402
+ },
403
+ favoritesV1: false,
404
+ flipp: null,
405
+ globalAnimations: {
406
+ confetti: {
407
+ enableConfettiAnimation: true,
408
+ },
409
+ },
410
+ instacart: {
411
+ enabled: false,
412
+ url: "",
413
+ },
414
+ registrationFields: [],
415
+ showCheckoutPromoCode: true,
416
+ showImgOnOrder: false,
417
+ smsNotifications: {
418
+ enabled: false,
419
+ getEnrollmentUrl: "",
420
+ postEnrollmentUrl: "",
421
+ },
422
+ specialRequestItems: false,
423
+ couponGallery: {
424
+ enabled: false,
425
+ galleryIsIframe: false,
426
+ },
427
+ instacartUrl: {
428
+ enabled: false,
429
+ },
430
+ },
431
+ siteSettings: {
432
+ anonymousCart: true,
433
+ defaultCountry: "USA",
434
+ defaultShoppingMode: "pickup",
435
+ daysToRemainSignedIn: 30,
436
+ defaultSearchParams: {
437
+ page: "1",
438
+ q: "*",
439
+ skip: "0",
440
+ take: "36",
441
+ },
442
+ defaultStoreLocation: {
443
+ latitude: 0,
444
+ longitude: 0,
445
+ },
446
+ googleAutocompleteSettings: {
447
+ types: "geocode",
448
+ },
449
+ restrictMapPlacesResults: {
450
+ fetchNearStoresSettings: {
451
+ kmRange: 20,
452
+ totalTake: 30,
453
+ },
454
+ },
455
+ gtmId: "GTM-K5DXFNB",
456
+ isPlanningOnly: false,
457
+ mapZoom: 8,
458
+ promoTemplateVersion: 2,
459
+ retailerCountry: "us",
460
+ retailerName: "mi9",
461
+ searchPreview: {
462
+ desktop: {
463
+ products: true,
464
+ suggestions: true,
465
+ },
466
+ mobile: {
467
+ products: true,
468
+ suggestions: true,
469
+ },
470
+ },
471
+ subHeaderHeight: 30,
472
+ disableTprPrice: false,
473
+ footerVersion: "default",
474
+ timeslotModalSettings: {
475
+ showOnAddToCart: false,
476
+ timeslotRequiredToAddToCart: false,
477
+ timeslotRequiredToViewCartReview: false,
478
+ },
479
+ ctaButtons: null,
480
+ mainHeaderHeight: 119,
481
+ },
482
+ specialRequestItems: true,
483
+ sodiumWarning: {
484
+ isEnabled: true,
485
+ threshold: 10,
486
+ },
487
+ productCards: {
488
+ gridRowLength: {
489
+ tablet: 4,
490
+ desktop: 5,
491
+ mobile: 1,
492
+ },
493
+ carouselsRowLength: {
494
+ desktop: 5,
495
+ tablet: 3,
496
+ mobile: 1,
497
+ },
498
+ productCard: {
499
+ enabled: false,
500
+ layouts: {
501
+ ContainersGrid: "default",
502
+ ContainersCarousel: "default",
503
+ ProductGrids: "default",
504
+ },
505
+ },
506
+ },
507
+ layouts: {
508
+ cartSummary: {
509
+ showTaxTotal: true,
510
+ showTaxGroups: true,
511
+ },
512
+ couponGallery: {
513
+ enabled: true,
514
+ galleryIsIframe: true,
515
+ },
516
+ },
517
+ productCardv2: false,
518
+ addressSettings: {
519
+ addressValidationTypes: {
520
+ addressLine1: ["alphaNumeric", "required"],
521
+ addressLine2: ["alphaNumeric"],
522
+ city: ["alphaNumeric", "required"],
523
+ countyProvinceState: ["usState", "required"],
524
+ familyName: ["alphaOnly", "required"],
525
+ firstName: ["alphaOnly", "required"],
526
+ instructions: ["alphaNumeric"],
527
+ phoneNumber: ["usPhone", "required"],
528
+ postCode: ["usPostCode", "required"],
529
+ smsNumber: ["iePhone", "required"],
530
+ },
531
+ eircode: {
532
+ enabled: false,
533
+ url: "",
534
+ },
535
+ integration: {
536
+ enabled: false,
537
+ addressFinderType: "AUS",
538
+ addNewAddressUrl: "",
539
+ deleteAddressUrl: "",
540
+ editAddressUrl: "",
541
+ getAddressesUrl: "",
542
+ getLocationUrl: "",
543
+ },
544
+ useAddressValidation: true,
545
+ disableAddressOnDelivery: false,
546
+ },
547
+ productCard: {
548
+ limitProductCardTitleHeight: true,
549
+ productCardTitleHeight: 40,
550
+ productCards: {
551
+ gridRowLength: {
552
+ tablet: 4,
553
+ desktop: 5,
554
+ mobile: 1,
555
+ },
556
+ carouselsRowLength: {
557
+ desktop: 5,
558
+ tablet: 3,
559
+ mobile: 1,
560
+ },
561
+ productCard: {
562
+ enabled: false,
563
+ layouts: {
564
+ ContainersGrid: "default",
565
+ ContainersCarousel: "default",
566
+ ProductGrids: "default",
567
+ },
568
+ },
569
+ },
570
+ },
571
+ pdpSettings: {
572
+ nutritionZone: "us",
573
+ pdpDetailsLayout: {
574
+ desktop: {
575
+ left: [
576
+ "productDescription",
577
+ "brandBankTest",
578
+ "enhancedProductMarketing",
579
+ "healthClaims",
580
+ "_nutStatement",
581
+ "productSalesInfo",
582
+ "productIngredients",
583
+ "sodiumWarning",
584
+ "alcohol_restricted",
585
+ "allergy_text",
586
+ "brand_marketing",
587
+ "product_marketing",
588
+ "_lower_age_limit_Statutory",
589
+ "_lower_age_limit_Advisory",
590
+ "_storeage_type",
591
+ "_storageConditions",
592
+ "productNutrition",
593
+ "_alcohol_info",
594
+ "productNumber",
595
+ ],
596
+ right: ["recommendations", "feeding_instructions"],
597
+ },
598
+ mobile: {
599
+ left: [
600
+ "healthClaims",
601
+ "_nutStatement",
602
+ "enhancedProductMarketing",
603
+ "productSalesInfo",
604
+ "productDescription",
605
+ "sodiumWarning",
606
+ "productNumber",
607
+ "recommendations",
608
+ ],
609
+ right: [
610
+ "brandBankTest",
611
+ "feeding_instructions",
612
+ "productIngredients",
613
+ "productNutrition",
614
+ "productNumber",
615
+ "recommendations",
616
+ ],
617
+ },
618
+ },
619
+ sodiumWarning: {
620
+ isEnabled: true,
621
+ threshold: 10,
622
+ },
623
+ },
624
+ cartSummary: {
625
+ hideTaxOnSummary: false,
626
+ showTaxTotal: true,
627
+ showTaxGroups: true,
628
+ },
629
+ addressIntegration1: {
630
+ enabled: true,
631
+ addressFinderType: "IE",
632
+ getAddressesUrl: "https://api.autoaddress.ie/2.0/autocomplete?key={IE_ADDRESS_SERVICE_KEY}&address={searchQuery}",
633
+ getLocationUrl: "https://api.autoaddress.ie/2.0/GetEcadData?key={IE_ADDRESS_SERVICE_KEY}&ecadid={id}",
634
+ },
635
+ "addressIntegration-DO NOT REMOVE (DAVER)": {
636
+ enabled: false,
637
+ addressFinderType: "IE",
638
+ getAddressesUrl: "https://api.autoaddress.ie/2.0/autocomplete?key={IE_ADDRESS_SERVICE_KEY}&address={searchQuery}",
639
+ getLocationUrl: "https://api.autoaddress.ie/2.0/GetEcadData?key={IE_ADDRESS_SERVICE_KEY}&ecadid={id}",
640
+ },
641
+ enableVouchers: true,
642
+ smartbanner: {
643
+ enabled: true,
644
+ author: "Wynshop",
645
+ button: "OPEN",
646
+ buttonUrlApple: "https://apps.apple.com/ie/app/facebook/id284882215:",
647
+ buttonUrlGoogle: "http://play.google.com/store/apps/details?id=com.facebook.katana",
648
+ closeLabel: "X",
649
+ iconApple: "https://storage.googleapis.com/dam-mi9-qat-abe316d.mi9.qat.v8.commerce.mi9cloud.com/Images/AppleIcon.png",
650
+ iconGoogle: "https://storage.googleapis.com/dam-mi9-qat-abe316d.mi9.qat.v8.commerce.mi9cloud.com/Images/GooglePlayIcon.png",
651
+ price: "$2.99",
652
+ priceSuffixApple: " - on App Store",
653
+ priceSuffixGoogle: " - on Play Store",
654
+ title: "Storefront App",
655
+ },
656
+ additionalCharges: true,
657
+ },
658
+ };
659
+ exports.default = originalJsonObject;
@@ -0,0 +1,6 @@
1
+ import { IDefaultRetailerSettings } from "../interfaces/default-settings.interfaces";
2
+ interface AllSettingsV1 {
3
+ [key: string]: IDefaultRetailerSettings;
4
+ }
5
+ export declare const migrator: (AllBannerSettings: AllSettingsV1, storeFile?: boolean) => Promise<string | undefined>;
6
+ export {};
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (_) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.migrator = void 0;
51
+ var input_1 = require("./input");
52
+ var fs_1 = require("fs");
53
+ // @ts-ignore
54
+ var migrator = function (AllBannerSettings, storeFile) {
55
+ if (storeFile === void 0) { storeFile = false; }
56
+ return __awaiter(void 0, void 0, void 0, function () {
57
+ var NewAllBannerSettings_1, JSON_SETTINGS, location_1, e_1;
58
+ return __generator(this, function (_a) {
59
+ switch (_a.label) {
60
+ case 0:
61
+ _a.trys.push([0, 3, , 4]);
62
+ NewAllBannerSettings_1 = {};
63
+ Object.keys(AllBannerSettings).forEach(function (bannerName) {
64
+ NewAllBannerSettings_1[bannerName] = settingsMapper(AllBannerSettings[bannerName]);
65
+ });
66
+ JSON_SETTINGS = JSON.stringify(NewAllBannerSettings_1);
67
+ if (!storeFile) return [3 /*break*/, 2];
68
+ location_1 = "./scripts/newSettings.json";
69
+ return [4 /*yield*/, fs_1.promises.writeFile(location_1, JSON_SETTINGS)];
70
+ case 1:
71
+ _a.sent();
72
+ console.log("Successfully merged settings to ".concat(location_1));
73
+ return [2 /*return*/];
74
+ case 2: return [2 /*return*/, JSON_SETTINGS];
75
+ case 3:
76
+ e_1 = _a.sent();
77
+ console.error("Error mapping settings", e_1);
78
+ return [2 /*return*/, "An Error Occurred"];
79
+ case 4: return [2 /*return*/];
80
+ }
81
+ });
82
+ });
83
+ };
84
+ exports.migrator = migrator;
85
+ var settingsMapper = function (oldSettings) {
86
+ return __assign(__assign({}, oldSettings), { adminPanelOnly: {
87
+ bannerName: oldSettings.adminPanelOnly.bannerName,
88
+ logoUrl: oldSettings.adminPanelOnly.logoUrl,
89
+ }, siteSettings: {
90
+ defaultCountry: oldSettings.defaultCountry,
91
+ defaultShoppingMode: oldSettings.defaultShoppingMode,
92
+ anonymousCart: oldSettings.siteSettings.anonymousCart,
93
+ daysToRemainSignedIn: oldSettings.daysToRemainSignedIn,
94
+ defaultSearchParams: oldSettings.defaultSearchParams,
95
+ defaultStoreLocation: oldSettings.defaultStoreLocation,
96
+ googleAutocompleteSettings: oldSettings.googleAutocompleteSettings,
97
+ restrictMapPlacesResults: oldSettings.restrictMapPlacesResults,
98
+ gtmId: !!oldSettings.gtmId ? oldSettings.gtmId : "",
99
+ isPlanningOnly: oldSettings.isPlanningOnly,
100
+ mapZoom: oldSettings.mapZoom,
101
+ promoTemplateVersion: oldSettings.promoTemplateVersion,
102
+ retailerCountry: oldSettings.retailerCountry,
103
+ retailerName: oldSettings.retailerName,
104
+ searchPreview: oldSettings.searchPreview,
105
+ subHeaderHeight: oldSettings.subHeaderHeight,
106
+ disableTprPrice: oldSettings.disableTprPrice,
107
+ footerVersion: oldSettings.layout.footerVersion,
108
+ timeslotModalSettings: oldSettings.timeslotModalSettings,
109
+ ctaButtons: oldSettings.ctaButtons,
110
+ mainHeaderHeight: oldSettings.mainHeaderHeight,
111
+ }, features: {
112
+ additionalCharges: !!oldSettings.features.additionalCharges,
113
+ clientCache: !!oldSettings.features.clientCache,
114
+ vouchers: oldSettings.features.vouchers,
115
+ giftCards: oldSettings.features.giftCards,
116
+ smartbanner: oldSettings.features.smartbanner,
117
+ entryModalVersion: oldSettings.features.entryModalVersion,
118
+ allowInStorePurchases: !!oldSettings.allowInStorePurchases,
119
+ allowPastPurchases: !!oldSettings.allowPastPurchases,
120
+ advertSettings: oldSettings.advertSettings,
121
+ enableGoogleTranslate: !!oldSettings.enableGoogleTranslate,
122
+ enableNewsletterSignup: !!oldSettings.enableNewsletterSignup,
123
+ enableNotifications: !!oldSettings.enableNotifications,
124
+ externalStoreSelectorUrl: {
125
+ enabled: !!oldSettings.externalStoreSelectorUrl,
126
+ url: !!oldSettings.externalStoreSelectorUrl
127
+ ? oldSettings.externalStoreSelectorUrl
128
+ : "",
129
+ },
130
+ favoritesV1: !!oldSettings.favoritesV1,
131
+ flipp: oldSettings.flipp,
132
+ globalAnimations: oldSettings.globalAnimations,
133
+ instacart: {
134
+ enabled: !!oldSettings.instacartUrl,
135
+ url: !!oldSettings.instacartUrl ? oldSettings.instacartUrl : "",
136
+ },
137
+ registrationFields: oldSettings.registrationFields,
138
+ secondTierAuthorization: oldSettings.secondTierAuthorization,
139
+ showCheckoutPromoCode: !!oldSettings.showCheckoutPromoCode,
140
+ showImgOnOrder: !!oldSettings.showImgOnOrder,
141
+ smsNotifications: oldSettings.smsNotifications,
142
+ specialRequestItems: !!oldSettings.specialRequestItems,
143
+ couponGallery: oldSettings.layouts.couponGallery,
144
+ }, addressSettings: {
145
+ // todo need to be fixed
146
+ addressValidationTypes: {
147
+ addressLine1: oldSettings.addressValidationTypes.addressLine1,
148
+ addressLine2: oldSettings.addressValidationTypes.addressLine2,
149
+ city: oldSettings.addressValidationTypes.city,
150
+ countyProvinceState: oldSettings.addressValidationTypes.countyProvinceState,
151
+ familyName: oldSettings.addressValidationTypes.familyName,
152
+ firstName: oldSettings.addressValidationTypes.firstName,
153
+ instructions: oldSettings.addressValidationTypes.instructions,
154
+ phoneNumber: oldSettings.addressValidationTypes.phoneNumber,
155
+ postCode: oldSettings.addressValidationTypes.postCode,
156
+ smsNumber: oldSettings.checkoutValidation.smsNumber,
157
+ },
158
+ eircode: {
159
+ enabled: !!oldSettings.eircode,
160
+ url: !!oldSettings.eircode ? oldSettings.eircode : "",
161
+ },
162
+ integration: {
163
+ addressFinderType: oldSettings.addressIntegration.addressFinderType,
164
+ enabled: oldSettings.addressIntegration.enabled,
165
+ useForNewAddresses: oldSettings.addressIntegration.useForNewAddresses,
166
+ addNewAddressUrl: oldSettings.addresses.integration.addNewAddressUrl,
167
+ editAddressUrl: oldSettings.addresses.integration.editAddressUrl,
168
+ deleteAddressUrl: oldSettings.addresses.integration.deleteAddressUrl,
169
+ },
170
+ useAddressValidation: oldSettings.useAddressValidation,
171
+ disableAddressOnDelivery: false,
172
+ }, accountPage: {
173
+ loyaltyTab: {
174
+ disabledEdit: !!oldSettings.accountPage.loyaltyTab.disabledEdit,
175
+ enabled: !!oldSettings.accountPage.loyaltyTab.enabled,
176
+ loyaltyNumberLength: oldSettings.accountPage.loyaltyTab.loyaltyNumberLength,
177
+ loyaltyNumberPrefix: oldSettings.accountPage.loyaltyTab.loyaltyNumberPrefix,
178
+ loyaltyValidationType: oldSettings.accountPage.loyaltyTab.loyaltyValidationType,
179
+ },
180
+ idp: {
181
+ enabled: !!oldSettings.idpUrl,
182
+ target: oldSettings.idpTarget,
183
+ url: !!oldSettings.idpUrl ? oldSettings.idpUrl : "",
184
+ },
185
+ }, productCard: {
186
+ limitProductCardTitleHeight: oldSettings.limitProductCardTitleHeight,
187
+ productCardTitleHeight: oldSettings.productCardTitleHeight,
188
+ productCards: oldSettings.productCards,
189
+ }, checkout: {
190
+ numericPhonePayload: oldSettings.checkout.numericPhonePayload,
191
+ houseAccountRegExValidation: oldSettings.houseAccountRegExValidation,
192
+ minimumCreditCardAmount: oldSettings.minimumCreditCardAmount,
193
+ paymentCards: oldSettings.paymentCards,
194
+ checkoutValidation: oldSettings.checkoutValidation,
195
+ }, pdpSettings: {
196
+ nutritionZone: oldSettings.nutritionZone,
197
+ pdpDetailsLayout: oldSettings.pdpDetailsLayout,
198
+ sodiumWarning: oldSettings.sodiumWarning,
199
+ }, cartSummary: {
200
+ hideTaxOnSummary: !!oldSettings.hideTaxOnSummary,
201
+ showTaxTotal: !!oldSettings.layouts.cartSummary.showTaxTotal,
202
+ showTaxGroups: !!oldSettings.layouts.cartSummary.showTaxGroups,
203
+ } });
204
+ };
205
+ (0, exports.migrator)(input_1.default, true);
@@ -172,6 +172,12 @@ var FeatureSettingsChildren = {
172
172
  type: exports.AdminTemplateInputTypes.checkbox,
173
173
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/3344302081/Hide+Alcohol+Rule",
174
174
  },
175
+ productCard: {
176
+ title: "Disable shopping rule label",
177
+ description: "Disable alchohol rule label in Product Cards.",
178
+ type: exports.AdminTemplateInputTypes.checkbox,
179
+ helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/3344302081/Hide+Alcohol+Rule",
180
+ },
175
181
  },
176
182
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/3344302081/Hide+Alcohol+Rule",
177
183
  },
@@ -109,6 +109,7 @@ var DefaultConfigSFUI = {
109
109
  hideAlcoholRule: {
110
110
  modal: false,
111
111
  pdp: false,
112
+ productCard: false,
112
113
  },
113
114
  instacart: {
114
115
  enabled: false,
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
- {
2
- "name": "@thryveai/theme-interfaces",
3
- "version": "2.4.19",
4
- "description": "Shared interfaces and defaults for all Wynshop themed apps.",
5
- "scripts": {
6
- "build": "tsc",
7
- "push": "npm run build && npm publish",
8
- "merge-settings": "ts-node ./scripts/sfui-settings-migrator.ts"
9
- },
10
- "author": "Wynshop",
11
- "license": "ISC",
12
- "main": "dist",
13
- "files": [
14
- "dist"
15
- ],
16
- "devDependencies": {
17
- "@types/node": "^17.0.42",
18
- "ts-node": "^10.8.1",
19
- "typescript": "4.6.3"
20
- }
21
- }
1
+ {
2
+ "name": "@thryveai/theme-interfaces",
3
+ "version": "2.4.20",
4
+ "description": "Shared interfaces and defaults for all Wynshop themed apps.",
5
+ "scripts": {
6
+ "build": "tsc",
7
+ "push": "npm run build && npm publish",
8
+ "merge-settings": "ts-node ./scripts/sfui-settings-migrator.ts"
9
+ },
10
+ "author": "Wynshop",
11
+ "license": "ISC",
12
+ "main": "dist",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "devDependencies": {
17
+ "@types/node": "^17.0.42",
18
+ "ts-node": "^10.8.1",
19
+ "typescript": "4.6.3"
20
+ }
21
+ }