@thryveai/theme-interfaces 1.4.8-beta4 → 1.4.8-beta5

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.
@@ -1,10 +1,17 @@
1
1
  import { IDefaultCounty, IValidationType } from "./retailer-settings.interfaces";
2
+ export declare type IAdminTemplateInputTypes = {
3
+ [key in IAdminControlType]: IAdminControlType;
4
+ };
2
5
  export interface IAdminSettingsTemplate {
6
+ accountPage: IAdminControl;
3
7
  addressValidationTypes: IAdminControl;
4
8
  allowInStorePurchases: IAdminControl;
5
9
  allowPastPurchases: IAdminControl;
10
+ cacheTimeMins: IAdminControl;
6
11
  checkoutV1: IAdminControl;
7
12
  defaultCountry: IAdminControl;
13
+ defaultShoppingMode: IAdminControl;
14
+ defaultStoreLocation: IAdminControl;
8
15
  disableTprPrice: IAdminControl;
9
16
  documentTitle: IAdminControl;
10
17
  enable3dSecure: IAdminControl;
@@ -13,6 +20,7 @@ export interface IAdminSettingsTemplate {
13
20
  enableNotifications?: IAdminControl;
14
21
  favoritesV1: IAdminControl;
15
22
  flipp: IAdminControl;
23
+ gtmId: IAdminControl;
16
24
  hideTaxOnSummary: IAdminControl;
17
25
  houseAccountRegExValidation: IAdminControl;
18
26
  isPlanningOnly: IAdminControl;
@@ -20,14 +28,17 @@ export interface IAdminSettingsTemplate {
20
28
  mainHeaderHeight: IAdminControl;
21
29
  mapZoom: IAdminControl;
22
30
  minimumCreditCardAmount: IAdminControl;
31
+ nutritionZone: IAdminControl;
23
32
  productCardTitleHeight: IAdminControl;
24
33
  productCardv2: IAdminControl;
25
34
  promoTemplateVersion: IAdminControl;
26
35
  retailerCountry: IAdminControl;
27
36
  retailerName: IAdminControl;
37
+ searchPreview: IAdminControl;
28
38
  showCheckoutPromoCode: IAdminControl;
29
39
  showImgOnOrder: IAdminControl;
30
40
  subHeaderHeight: IAdminControl;
41
+ timeslotModalSettings: IAdminControl;
31
42
  useAddressValidation: IAdminControl;
32
43
  }
33
44
  export interface IAdminControl {
@@ -40,4 +51,4 @@ export interface IAdminControl {
40
51
  [key: string]: IAdminControl;
41
52
  };
42
53
  }
43
- export declare type IAdminControlType = "checkbox" | "dropdown" | "inputChar" | "inputNumber" | "multiDropdown" | "nullObject" | "object";
54
+ export declare type IAdminControlType = "checkbox" | "collapsableObject" | "color" | "dropdown" | "inputChar" | "inputNumber" | "multiDropdown" | "nullObject" | "object" | "string";
@@ -1,7 +1,74 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdminSettingsTemplate = void 0;
4
+ var admin_theme_template_1 = require("./admin-theme-template");
5
+ var addressValidationDescription = "Sets the validation types for user addresses";
6
+ var validationTypes = [
7
+ "luhnValidation",
8
+ "alphaNumeric",
9
+ "alphaOnly",
10
+ "numericOnly",
11
+ "anyPhone",
12
+ "email",
13
+ "password",
14
+ "required",
15
+ "usPhone",
16
+ "usMobileNumber",
17
+ "caPhone",
18
+ "auPhone",
19
+ "iePhone",
20
+ "caProvince",
21
+ "usState",
22
+ "auState",
23
+ "ieCounty",
24
+ "caPostCode",
25
+ "usPostCode",
26
+ "auPostCode",
27
+ "iePostCode",
28
+ "noSpecialChar",
29
+ "correctDate",
30
+ ];
4
31
  exports.AdminSettingsTemplate = {
32
+ accountPage: {
33
+ title: "Account Page",
34
+ description: "Account page settings",
35
+ type: admin_theme_template_1.AdminTemplateInputTypes.object,
36
+ value: {
37
+ loyaltyTab: {
38
+ title: "Loyalty Tab",
39
+ description: "Set up Loyalty Tab on account page",
40
+ type: admin_theme_template_1.AdminTemplateInputTypes.object,
41
+ value: {
42
+ enabled: {
43
+ title: "Enable Loyalty Tab",
44
+ description: "Enable Loyalty tab section within My Account page",
45
+ type: admin_theme_template_1.AdminTemplateInputTypes.checkbox
46
+ },
47
+ disabledEdit: {
48
+ title: "Disable Loyalty edit",
49
+ description: "Prevent users to change their loyalty number",
50
+ type: admin_theme_template_1.AdminTemplateInputTypes.checkbox
51
+ },
52
+ loyaltyNumberLength: {
53
+ title: "Loyalty Number Length",
54
+ description: "Control the loyalty number length",
55
+ type: "inputNumber",
56
+ },
57
+ loyaltyNumberPrefix: {
58
+ title: "Loyalty Number Prefix",
59
+ description: "Add hardcoded prefix for loyalty numbers (this will affect the length)",
60
+ type: "inputChar",
61
+ },
62
+ loyaltyValidationType: {
63
+ title: "Loyalty Number Validation",
64
+ description: "Select loyalty validation types",
65
+ type: "multiDropdown",
66
+ options: validationTypes,
67
+ },
68
+ },
69
+ },
70
+ },
71
+ },
5
72
  // accountPage: {
6
73
  // loyaltyTab: {
7
74
  // disabledEdit: {
@@ -66,148 +133,115 @@ exports.AdminSettingsTemplate = {
66
133
  // },
67
134
  // },
68
135
  // },
69
- // advertSettings:{},
136
+ // advertSettings: {},
70
137
  // addresses:{}
71
138
  // addressIntegration
72
139
  // TODO: fix required validation
140
+ allowInStorePurchases: {
141
+ title: "InStore Purchases",
142
+ description: "Show the purchases made in store in the order history (requires integration).",
143
+ helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
144
+ type: "checkbox",
145
+ },
146
+ allowPastPurchases: {
147
+ title: "Display PastPurchases",
148
+ description: "Enable displaying past purchases functionality",
149
+ helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
150
+ type: "checkbox",
151
+ },
152
+ // buildNumber: string;
153
+ cacheTimeMins: {
154
+ title: "Production Cache time",
155
+ description: "How long data will be cached to make the site faster. (1 = 1minute)",
156
+ type: "inputNumber",
157
+ },
73
158
  addressValidationTypes: {
74
- title: "Address Validation Types",
75
- description: "Types of address validation",
159
+ title: "Address Validation",
160
+ description: "User address validation settings.",
161
+ helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/3178627073/Storefront+Address+Validation+in-progress",
76
162
  type: "object",
77
163
  value: {
78
- addressLine1: {
79
- title: "addressLine1",
80
- description: "addressLine1",
164
+ firstName: {
165
+ title: "User's first name",
166
+ description: addressValidationDescription,
81
167
  type: "multiDropdown",
82
- options: [
83
- "alphaNumeric",
84
- "alphaOnly",
85
- "usState",
86
- "usPhone",
87
- "usPostCode",
88
- "required",
89
- ],
168
+ options: ["alphaNumeric", "alphaOnly", "required"],
90
169
  },
91
- addressLine2: {
92
- title: "addressLine2",
93
- description: "addressLine2",
170
+ familyName: {
171
+ title: "User's Surname",
172
+ description: addressValidationDescription,
94
173
  type: "multiDropdown",
95
- options: [
96
- "alphaNumeric",
97
- "alphaOnly",
98
- "usState",
99
- "usPhone",
100
- "usPostCode",
101
- "required",
102
- ],
174
+ options: ["alphaNumeric", "alphaOnly", "required"],
103
175
  },
104
- city: {
105
- title: "city",
106
- description: "city",
176
+ addressLine1: {
177
+ title: "Address Line 1",
178
+ description: addressValidationDescription,
107
179
  type: "multiDropdown",
108
- options: [
109
- "alphaNumeric",
110
- "alphaOnly",
111
- "usState",
112
- "usPhone",
113
- "required",
114
- "usPostCode",
115
- "required",
116
- ],
180
+ options: ["alphaNumeric", "alphaOnly", "numericOnly", "required"],
117
181
  },
118
- countyProvinceState: {
119
- title: "countyProvinceState",
120
- description: "countyProvinceState",
182
+ addressLine2: {
183
+ title: "Address Line 2",
184
+ description: addressValidationDescription,
121
185
  type: "multiDropdown",
122
- options: [
123
- "alphaNumeric",
124
- "alphaOnly",
125
- "usState",
126
- "usPhone",
127
- "usPostCode",
128
- "required",
129
- ],
186
+ options: ["alphaNumeric", "alphaOnly", "numericOnly", "required"],
130
187
  },
131
- familyName: {
132
- title: "familyName",
133
- description: "familyName",
188
+ city: {
189
+ title: "City",
190
+ description: addressValidationDescription,
134
191
  type: "multiDropdown",
135
- options: [
136
- "alphaNumeric",
137
- "alphaOnly",
138
- "usState",
139
- "usPhone",
140
- "usPostCode",
141
- "required",
142
- ],
192
+ options: ["alphaNumeric", "alphaOnly", "required"],
143
193
  },
144
- firstName: {
145
- title: "firstName",
146
- description: "firstName",
194
+ countyProvinceState: {
195
+ title: "County/Province/State",
196
+ description: addressValidationDescription,
147
197
  type: "multiDropdown",
148
198
  options: [
149
199
  "alphaNumeric",
150
200
  "alphaOnly",
201
+ "auState",
202
+ "ieCounty",
151
203
  "usState",
152
- "usPhone",
153
- "usPostCode",
204
+ "caProvince",
154
205
  "required",
155
206
  ],
156
207
  },
157
208
  instructions: {
158
- title: "instructions",
159
- description: "instructions",
209
+ title: "User Instructions Fields",
210
+ description: "Validation for the input fields for user instructions",
160
211
  type: "multiDropdown",
161
- options: [
162
- "alphaNumeric",
163
- "alphaOnly",
164
- "usState",
165
- "usPhone",
166
- "usPostCode",
167
- ],
212
+ options: ["alphaNumeric", "alphaOnly", "required", "numericOnly"],
168
213
  },
169
214
  phoneNumber: {
170
- title: "phoneNumber",
171
- description: "phoneNumber",
215
+ title: "Phone Number",
216
+ description: "The number to be used to contact the user",
172
217
  type: "multiDropdown",
173
218
  options: [
174
- "alphaNumeric",
175
- "alphaOnly",
176
- "usState",
177
219
  "usPhone",
178
- "usPostCode",
220
+ "usMobileNumber",
221
+ "numericOnly",
222
+ "auPhone",
223
+ "caPhone",
224
+ "iePhone",
225
+ "anyPhone",
179
226
  "required",
180
227
  ],
181
228
  },
182
229
  postCode: {
183
- title: "postCode",
184
- description: "postCode",
230
+ title: "Post / zip code",
231
+ description: addressValidationDescription,
185
232
  type: "multiDropdown",
186
233
  options: [
187
234
  "alphaNumeric",
188
- "alphaOnly",
189
- "usState",
190
- "usPhone",
235
+ "auPostCode",
236
+ "caPostCode",
237
+ "iePostCode",
191
238
  "usPostCode",
239
+ "numericOnly",
192
240
  "required",
193
241
  ],
194
242
  },
195
243
  },
196
244
  },
197
- allowInStorePurchases: {
198
- title: "Allow InStore Purchases",
199
- description: "Allow purchases made in store",
200
- helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
201
- type: "checkbox",
202
- },
203
- allowPastPurchases: {
204
- title: "Display PastPurchases",
205
- description: "Enable displaying past purchases functionality",
206
- helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
207
- type: "checkbox",
208
- },
209
- // buildNumber: string;
210
- // cacheTimeMins?: number;
211
245
  // canadianAddressCompleteKey?: string | undefined;
212
246
  // checkout?: IGlobalCheckoutProps;
213
247
  checkoutV1: {
@@ -221,13 +255,35 @@ exports.AdminSettingsTemplate = {
221
255
  // daysToRemainSignedIn?: number;
222
256
  defaultCountry: {
223
257
  title: "Default Country",
224
- description: "Set the default country",
258
+ description: "Used for address, phone validation & ui formating.",
225
259
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
226
260
  type: "dropdown",
227
261
  options: ["USA", "Canada", "Ireland", "Australia"],
228
262
  },
229
263
  // defaultSearchParams?: IDefaultSearchParams;
230
- // defaultShoppingMode?: "pickup" | "planning" | "delivery";
264
+ defaultShoppingMode: {
265
+ title: "Default Shopping Mode",
266
+ description: "Shopping mode the site defaults to when a user lands and has not registered.",
267
+ type: "dropdown",
268
+ options: ["pickup", "planning", "delivery"],
269
+ },
270
+ defaultStoreLocation: {
271
+ title: "Default Store Location",
272
+ description: "Used to center the store selector map to the retailers region. Without setting this, the map defaults to central Africa.",
273
+ type: "object",
274
+ value: {
275
+ latitude: {
276
+ title: "Latitude",
277
+ description: "",
278
+ type: "inputNumber",
279
+ },
280
+ longitude: {
281
+ title: "Longitude",
282
+ description: "",
283
+ type: "inputNumber",
284
+ },
285
+ },
286
+ },
231
287
  // defaultStoreLocation?: IDefaultStoreLocation;
232
288
  disableTprPrice: {
233
289
  title: "Disable TPR Price",
@@ -237,7 +293,7 @@ exports.AdminSettingsTemplate = {
237
293
  },
238
294
  documentTitle: {
239
295
  title: "Document Title",
240
- description: "Set the document title",
296
+ description: "Fallback browser page Title if no SEO details are added to the page via the CMS.",
241
297
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
242
298
  type: "inputChar",
243
299
  },
@@ -268,7 +324,12 @@ exports.AdminSettingsTemplate = {
268
324
  },
269
325
  // errorLoggingLevel?: ILoggingLevel;
270
326
  // externalApps?: IExternalApps;
271
- // externalStoreSelectorUrl?: string | undefined;
327
+ // externalStoreSelectorUrl: {
328
+ // title: "External Store Selector Url",
329
+ // description:
330
+ // "Shows a link back to previous shoping platform, seen on store selection modal.This is generally used for an existing site that has not migrated all their stores to WynShop.",
331
+ // type: "inputChar",
332
+ // },
272
333
  favoritesV1: {
273
334
  title: "Favorites Version1",
274
335
  description: "Enable version 1 of favorites functionality",
@@ -304,7 +365,11 @@ exports.AdminSettingsTemplate = {
304
365
  },
305
366
  // globalAnimations?: IGlobalAnimations;
306
367
  // googleAutocompleteSettings?: IGoogleAutocompleteSettings;
307
- // gtmId?: undefined | string;
368
+ gtmId: {
369
+ title: "GTM ID",
370
+ description: "Google Tag Manager ID",
371
+ type: "inputChar",
372
+ },
308
373
  hideTaxOnSummary: {
309
374
  title: "Hide Summary Tax",
310
375
  description: "Hide the tax displayed on the summary box",
@@ -318,7 +383,12 @@ exports.AdminSettingsTemplate = {
318
383
  type: "inputChar",
319
384
  },
320
385
  // idpTarget?: "_self" | "_blank";
321
- // idpUrl?: undefined | string;
386
+ // idpUrl: {
387
+ // title: 'External IDP url',
388
+ // description: 'Is the user using ther own IDP or will they be using the Mi9 My Account functionality for Sign-In / Register and managing the customer account. If Null then Mi9 My Account funcationality will be used.',
389
+ // type: "nullObject",
390
+ // value: {}
391
+ // },
322
392
  // instacartUrl?: string | undefined;
323
393
  isPlanningOnly: {
324
394
  title: "Planning Only",
@@ -353,7 +423,12 @@ exports.AdminSettingsTemplate = {
353
423
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
354
424
  type: "checkbox",
355
425
  },
356
- // nutritionZone?: INutritionZone;
426
+ nutritionZone: {
427
+ title: "Nutrition Template",
428
+ description: "Show the correct nutrition format for the correct zone.",
429
+ type: "dropdown",
430
+ options: ["us", "eu", "au", "ca"],
431
+ },
357
432
  // paymentCards?: IPaymentCards;
358
433
  // pdpDetailsLayout?: IPdpDetailsLayout;
359
434
  productCardTitleHeight: {
@@ -387,11 +462,51 @@ exports.AdminSettingsTemplate = {
387
462
  },
388
463
  retailerName: {
389
464
  title: "Retailer Name",
390
- description: "Sets the retailer name",
465
+ description: "Retailers short code e.g the code used for the retailers environment.",
391
466
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
392
467
  type: "inputChar",
393
468
  },
394
- // searchPreview?: ISearchPreviewVisibility;
469
+ searchPreview: {
470
+ title: "Search Previews",
471
+ description: "Toggle Products/Suggestions to appear on search preview",
472
+ type: "object",
473
+ value: {
474
+ desktop: {
475
+ title: "Desktop",
476
+ description: "",
477
+ type: "object",
478
+ value: {
479
+ products: {
480
+ title: "Show Products",
481
+ description: "",
482
+ type: "checkbox",
483
+ },
484
+ suggestions: {
485
+ title: "Snow Suggestions",
486
+ description: "",
487
+ type: "checkbox",
488
+ },
489
+ },
490
+ },
491
+ mobile: {
492
+ title: "Mobile",
493
+ description: "",
494
+ type: "object",
495
+ value: {
496
+ products: {
497
+ title: "Show Products",
498
+ description: "",
499
+ type: "checkbox",
500
+ },
501
+ suggestions: {
502
+ title: "Snow Suggestions",
503
+ description: "",
504
+ type: "checkbox",
505
+ },
506
+ },
507
+ },
508
+ },
509
+ },
395
510
  // secondTierAuthorization?: ISecondTierAuthorization;
396
511
  showCheckoutPromoCode: {
397
512
  title: "Show Checkout Promo",
@@ -412,18 +527,33 @@ exports.AdminSettingsTemplate = {
412
527
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
413
528
  type: "inputNumber",
414
529
  },
415
- // TimeslotModalSettings: {},
530
+ timeslotModalSettings: {
531
+ title: "Timeslot Modal Settings",
532
+ description: "Force timeslot selection",
533
+ type: "object",
534
+ value: {
535
+ showOnAddToCart: {
536
+ title: "Timeslot on Add To Cart",
537
+ description: "Show timeslot popup when user clicks on AddToCart",
538
+ type: "checkbox",
539
+ },
540
+ timeslotRequiredToAddToCart: {
541
+ title: "Force Timeslot on Add To Cart",
542
+ description: "Force a timeslot selection in order to add item in cart",
543
+ type: "checkbox",
544
+ },
545
+ timeslotRequiredToViewCartReview: {
546
+ title: "Force Timeslot on Cart Page",
547
+ description: "Force a timeslot selection in order to view cart page",
548
+ type: "checkbox",
549
+ },
550
+ },
551
+ },
416
552
  useAddressValidation: {
417
553
  title: "Use Address Validation",
418
554
  description: "Use to enable address validation",
419
555
  helpLink: "https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo",
420
556
  type: "checkbox",
421
557
  },
422
- // footerType: {
423
- // title: "Footer Version",
424
- // description: "Change your version of the checkout shown to users",
425
- // type: "radio",
426
- // options: [1, 2, 3, 4, 5],
427
- // },
428
558
  };
429
559
  exports.default = exports.AdminSettingsTemplate;