@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.
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminThemeTemplate = exports.AdminTemplateInputTypes = void 0;
4
+ exports.AdminTemplateInputTypes = {
5
+ checkbox: 'checkbox',
6
+ collapsableObject: 'collapsableObject',
7
+ color: 'color',
8
+ dropdown: 'dropdown',
9
+ inputChar: 'inputChar',
10
+ inputNumber: 'inputChar',
11
+ multiDropdown: 'multiDropdown',
12
+ nullObject: 'nullObject',
13
+ object: 'object',
14
+ string: 'string'
15
+ };
16
+ var buttonGenerator = function (buttonName) { return ({
17
+ title: buttonName + " Button",
18
+ description: "Settings for the " + buttonName + " button",
19
+ type: exports.AdminTemplateInputTypes.collapsableObject,
20
+ value: {
21
+ borderRadius: {
22
+ title: 'Border Radius',
23
+ locationInTheme: "data.buttons." + buttonName + ".borderRadius",
24
+ type: exports.AdminTemplateInputTypes.string
25
+ },
26
+ fontWeight: {
27
+ title: 'Font Weight',
28
+ locationInTheme: "data.buttons." + buttonName + ".fontWeight",
29
+ type: exports.AdminTemplateInputTypes.string
30
+ },
31
+ textTransform: {
32
+ title: 'Text Transform',
33
+ locationInTheme: "data.buttons." + buttonName + ".textTransform",
34
+ type: exports.AdminTemplateInputTypes.string
35
+ },
36
+ static: buttonStateGenerator('static', "data.buttons." + buttonName),
37
+ hover: buttonStateGenerator('hover', "data.buttons." + buttonName),
38
+ clicked: buttonStateGenerator('clicked', "data.buttons." + buttonName),
39
+ disabled: buttonStateGenerator('disabled', "data.buttons." + buttonName),
40
+ }
41
+ }); };
42
+ var buttonStateGenerator = function (stateName, buttonLocation) { return ({
43
+ title: stateName + " Colors",
44
+ description: "How the button will look in " + stateName + " state",
45
+ type: exports.AdminTemplateInputTypes.collapsableObject,
46
+ value: {
47
+ bgColor: {
48
+ title: 'Background',
49
+ locationInTheme: buttonLocation + "." + stateName + ".bgColor",
50
+ type: exports.AdminTemplateInputTypes.color,
51
+ },
52
+ borderColor: {
53
+ title: 'Border Color',
54
+ locationInTheme: buttonLocation + "." + stateName + ".borderColor",
55
+ type: exports.AdminTemplateInputTypes.color,
56
+ },
57
+ color: {
58
+ title: 'Text Color',
59
+ locationInTheme: buttonLocation + "." + stateName + ".color",
60
+ type: exports.AdminTemplateInputTypes.color,
61
+ },
62
+ iconColor: {
63
+ title: 'Icon Color (if any)',
64
+ locationInTheme: buttonLocation + "." + stateName + ".iconColor",
65
+ type: exports.AdminTemplateInputTypes.color,
66
+ },
67
+ }
68
+ }); };
69
+ var colorGenerator = function (colorName, colorLocation) { return ({
70
+ title: colorName,
71
+ locationInTheme: colorLocation + "." + colorName,
72
+ type: exports.AdminTemplateInputTypes.color,
73
+ }); };
74
+ exports.AdminThemeTemplate = {
75
+ colors: {
76
+ title: 'Colors',
77
+ description: 'Change your themes colors',
78
+ helpLink: 'https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo',
79
+ type: exports.AdminTemplateInputTypes.collapsableObject,
80
+ value: {
81
+ brandColors: {
82
+ title: 'Brand Colors',
83
+ description: 'Change your themes colors',
84
+ type: exports.AdminTemplateInputTypes.collapsableObject,
85
+ value: {
86
+ primary1: colorGenerator('primary1', 'data.colors.brandColors'),
87
+ primary2: colorGenerator('primary2', 'data.colors.brandColors'),
88
+ primary3: colorGenerator('primary3', 'data.colors.brandColors'),
89
+ primary4: colorGenerator('primary4', 'data.colors.brandColors'),
90
+ primary5: colorGenerator('primary5', 'data.colors.brandColors'),
91
+ secondary1: colorGenerator('secondary1', 'data.colors.brandColors'),
92
+ secondary2: colorGenerator('secondary2', 'data.colors.brandColors'),
93
+ secondary3: colorGenerator('secondary3', 'data.colors.brandColors'),
94
+ secondary4: colorGenerator('secondary4', 'data.colors.brandColors'),
95
+ secondary5: colorGenerator('secondary5', 'data.colors.brandColors'),
96
+ tertiary1: colorGenerator('tertiary1', 'data.colors.brandColors'),
97
+ tertiary2: colorGenerator('tertiary2', 'data.colors.brandColors'),
98
+ tertiary3: colorGenerator('tertiary3', 'data.colors.brandColors'),
99
+ tertiary4: colorGenerator('tertiary4', 'data.colors.brandColors'),
100
+ tertiary5: colorGenerator('tertiary5', 'data.colors.brandColors'),
101
+ }
102
+ },
103
+ uiColors: {
104
+ title: 'UI Colors',
105
+ description: 'Change your themes colors',
106
+ type: exports.AdminTemplateInputTypes.collapsableObject,
107
+ value: {
108
+ success: colorGenerator('success', 'data.colors.uiColors'),
109
+ successDark: colorGenerator('successDark', 'data.colors.uiColors'),
110
+ successLight: colorGenerator('successLight', 'data.colors.uiColors'),
111
+ warn: colorGenerator('warn', 'data.colors.uiColors'),
112
+ warnDark: colorGenerator('warnDark', 'data.colors.uiColors'),
113
+ warnLight: colorGenerator('warnLight', 'data.colors.uiColors'),
114
+ alert: colorGenerator('alert', 'data.colors.uiColors'),
115
+ alertDark: colorGenerator('alertDark', 'data.colors.uiColors'),
116
+ alertLight: colorGenerator('alertLight', 'data.colors.uiColors'),
117
+ greyscale1: colorGenerator('greyscale1', 'data.colors.uiColors'),
118
+ greyscale2: colorGenerator('greyscale2', 'data.colors.uiColors'),
119
+ greyscale3: colorGenerator('greyscale3', 'data.colors.uiColors'),
120
+ greyscale4: colorGenerator('greyscale4', 'data.colors.uiColors'),
121
+ greyscale5: colorGenerator('greyscale5', 'data.colors.uiColors'),
122
+ greyscale6: colorGenerator('greyscale6', 'data.colors.uiColors'),
123
+ greyscale7: colorGenerator('greyscale7', 'data.colors.uiColors'),
124
+ promotion1: colorGenerator('promotion1', 'data.colors.uiColors'),
125
+ promotion2: colorGenerator('promotion2', 'data.colors.uiColors'),
126
+ }
127
+ }
128
+ }
129
+ },
130
+ buttons: {
131
+ title: 'Buttons',
132
+ description: 'Change your themes buttons',
133
+ helpLink: 'https://mi9retail.atlassian.net/wiki/spaces/FDS/pages/1594065051/Storefront+configuration+-+from+theme+repo',
134
+ type: exports.AdminTemplateInputTypes.collapsableObject,
135
+ value: {
136
+ globalThemeBorderRadius: {
137
+ title: 'Global Theme Border Radius',
138
+ description: 'The br for the whole site',
139
+ locationInTheme: 'data.buttons.globalThemeBorderRadius',
140
+ type: exports.AdminTemplateInputTypes.string,
141
+ },
142
+ globalThemeFontWeight: {
143
+ title: 'Global Theme Font Weight',
144
+ description: 'The font weight for the whole site',
145
+ locationInTheme: 'data.buttons.globalThemeFontWeight',
146
+ type: exports.AdminTemplateInputTypes.string,
147
+ },
148
+ globalThemeFontFamily: {
149
+ title: 'Global Theme Font Family',
150
+ description: 'The font family for the whole site',
151
+ locationInTheme: 'data.buttons.globalThemeFontFamily',
152
+ type: exports.AdminTemplateInputTypes.string,
153
+ },
154
+ iconPosition: {
155
+ title: 'Button Icon Position',
156
+ description: 'Which side of the button should the icon appear',
157
+ locationInTheme: 'data.buttons.iconPosition',
158
+ type: exports.AdminTemplateInputTypes.dropdown,
159
+ options: ['left', 'right']
160
+ },
161
+ primary: buttonGenerator('primary'),
162
+ primaryLight: buttonGenerator('primaryLight'),
163
+ secondary: buttonGenerator('secondary'),
164
+ secondaryLight: buttonGenerator('secondaryLight'),
165
+ checkout: buttonGenerator('checkout'),
166
+ filterSort: {
167
+ title: 'Filter Sort',
168
+ description: 'Colors for the filter sort buttons',
169
+ type: exports.AdminTemplateInputTypes.collapsableObject,
170
+ value: {
171
+ color: colorGenerator('color', 'data.buttons.filterSort'),
172
+ hoverColor: colorGenerator('hoverColor', 'data.buttons.filterSort')
173
+ }
174
+ },
175
+ }
176
+ }
177
+ };
178
+ exports.default = exports.AdminThemeTemplate;
package/index.d.ts CHANGED
@@ -3,9 +3,10 @@ import { IIconsObject, PaymentTypesLogos, PaymentCards, IconNames, IconNamesToFi
3
3
  import { ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource } from "./theme.interfaces";
4
4
  import { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource } from "./default-theme.interface";
5
5
  import AdminSettingsTemplate from "./admin-settings-template";
6
+ import AdminThemeTemplate, { AdminTemplateInputTypes } from "./admin-theme-template";
6
7
  import defaultConfig from "./default.config";
7
8
  export { IDefaultTheme, IDefaultThemeScripts, IDefaultThemeImages, IDefaultThemeMetadata, IDefaultThemeFavicons, IDefaultThemeLogoPosition, IDefaultThemeLogoHeightsProps, IDefaultThemeLogoHeights, ISTSDefaultThemeInterface, IDefaultThemeFavicon, IDefaultThemeMetadataItem, IDefaultThemeInterface, IGlobalDefaultTheme, IDefaultColors, IInitializedEmptyDefaultTheme, IDefaultThemeAnimationConfettiPlaces, IDefaultThemeGlobalAnimations, IDefaultThemeAnimationsConfettiPlacesTypes, IDefaultThemeAnimationsConfettiProps, IDefaultEmbeddedFont, IDefaultEmbeddedFontSource, ITheme, IThemeScripts, IThemeImages, IThemeMetadata, IThemeFavicons, IThemeLogoPosition, IThemeLogoHeightsProps, IThemeLogoHeights, ISTSThemeInterface, IThemeFavicon, IThemeMetadataItem, IThemeInterface, IGlobalTheme, IColors, IInitializedEmptyTheme, IThemeAnimationConfettiPlaces, IThemeGlobalAnimations, IThemeAnimationsConfettiPlacesTypes, IThemeAnimationsConfettiProps, IEmbeddedFont, IEmbeddedFontSource, };
8
9
  export { IIconsObject, PaymentTypesLogos, PaymentCards, IconNames, IconNamesToFiles, };
9
10
  export { IRetailerSettings, ISecondTierAuthorization, IFlippConfig, IFlippConfigV2, IFlippScriptUrls, IAllSettings, ISMSConfig, IDefaultRetailerSettings, ICtaButtons, IAddressesSettings, IAccountPageSettings, ILayoutSettings, ILoggingLevel, IDefaultSearchParams, IDefaultStoreLocation, IDefaultCounty, IRetailerCountry, IRestrictMapPlaces, IValidationType, INutritionZone, IFooterTypes, IRegistrationFieldTypes, IRegistrationFieldNames, IValidateLength, IValidateDateRange, IRegistrationField, ICheckoutValidation, ISearchPreviewVisibility, IPaymentCards, IGlobalAnimations, ILayoutAnimationsConfetti, IGlobalCheckoutProps, IAddressIntegration, IAddressFinderType, };
10
- export { AdminSettingsTemplate };
11
+ export { AdminSettingsTemplate, AdminThemeTemplate, AdminTemplateInputTypes };
11
12
  export { defaultConfig };
package/index.js CHANGED
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultConfig = exports.AdminSettingsTemplate = exports.IconNamesToFiles = void 0;
3
+ exports.defaultConfig = exports.AdminTemplateInputTypes = exports.AdminThemeTemplate = exports.AdminSettingsTemplate = exports.IconNamesToFiles = void 0;
4
4
  var icons_interfaces_1 = require("./icons.interfaces");
5
5
  Object.defineProperty(exports, "IconNamesToFiles", { enumerable: true, get: function () { return icons_interfaces_1.IconNamesToFiles; } });
6
6
  var admin_settings_template_1 = require("./admin-settings-template");
7
7
  exports.AdminSettingsTemplate = admin_settings_template_1.default;
8
+ var admin_theme_template_1 = require("./admin-theme-template");
9
+ exports.AdminThemeTemplate = admin_theme_template_1.default;
10
+ Object.defineProperty(exports, "AdminTemplateInputTypes", { enumerable: true, get: function () { return admin_theme_template_1.AdminTemplateInputTypes; } });
8
11
  var default_config_1 = require("./default.config");
9
12
  exports.defaultConfig = default_config_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thryveai/theme-interfaces",
3
- "version": "1.4.8-beta4",
3
+ "version": "1.4.8-beta5",
4
4
  "description": "Shared Interfaces for all ThryveAi storefront retailer themes.",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -11,4 +11,4 @@
11
11
  "devDependencies": {
12
12
  "typescript": "4.3.5"
13
13
  }
14
- }
14
+ }