@appdirect/sfb-toolkit 4.0.24 → 5.0.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.
Files changed (55) hide show
  1. package/bin/index.js +4 -4
  2. package/coverage/clover.xml +89 -80
  3. package/coverage/coverage-final.json +3 -3
  4. package/coverage/lcov-report/constants/customUserAttributesMock.js.html +1 -1
  5. package/coverage/lcov-report/constants/index.html +1 -1
  6. package/coverage/lcov-report/constants/pageUrls.js.html +1 -1
  7. package/coverage/lcov-report/constants/userMock.js.html +1 -1
  8. package/coverage/lcov-report/controllers/controllers-utils/assetsUtils.js.html +1 -1
  9. package/coverage/lcov-report/controllers/controllers-utils/index.html +1 -1
  10. package/coverage/lcov-report/controllers/data-filters/bootstrap-data-filter.js.html +1 -1
  11. package/coverage/lcov-report/controllers/data-filters/call-to-actions-filter.js.html +1 -1
  12. package/coverage/lcov-report/controllers/data-filters/index.html +1 -1
  13. package/coverage/lcov-report/controllers/index.html +15 -15
  14. package/coverage/lcov-report/controllers/index.js.html +15 -12
  15. package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +1 -1
  16. package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +1 -1
  17. package/coverage/lcov-report/front-end-utils/src/components/base/index.html +1 -1
  18. package/coverage/lcov-report/front-end-utils/src/components/base/item.js.html +1 -1
  19. package/coverage/lcov-report/front-end-utils/src/components/container.js.html +1 -1
  20. package/coverage/lcov-report/front-end-utils/src/components/data-view.js.html +1 -1
  21. package/coverage/lcov-report/front-end-utils/src/components/header-view.js.html +125 -71
  22. package/coverage/lcov-report/front-end-utils/src/components/index.html +14 -14
  23. package/coverage/lcov-report/front-end-utils/src/components/search.js.html +1 -1
  24. package/coverage/lcov-report/front-end-utils/src/constants/index.html +5 -5
  25. package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +12 -6
  26. package/coverage/lcov-report/front-end-utils/src/constants/roleType.js.html +1 -1
  27. package/coverage/lcov-report/front-end-utils/src/constants/searchType.js.html +1 -1
  28. package/coverage/lcov-report/front-end-utils/src/utils/debounce.js.html +1 -1
  29. package/coverage/lcov-report/front-end-utils/src/utils/index.html +1 -1
  30. package/coverage/lcov-report/index.html +25 -25
  31. package/coverage/lcov-report/middlewares/config.js.html +1 -1
  32. package/coverage/lcov-report/middlewares/index.html +1 -1
  33. package/coverage/lcov-report/tools/index.html +1 -1
  34. package/coverage/lcov-report/tools/proxy-fetch.js.html +1 -1
  35. package/coverage/lcov.info +160 -144
  36. package/index.js +2 -0
  37. package/mockPages/admin/admin.html +4 -1
  38. package/mockPages/login/css/theme-index.css +353 -0
  39. package/mockPages/login/images/login.png +0 -0
  40. package/mockPages/login/login.html +43 -0
  41. package/npm-shrinkwrap.json +2 -2
  42. package/package.json +1 -1
  43. package/readme.md +16 -174
  44. package/src/api/cors.js +5 -2
  45. package/src/controllers/index.js +2 -1
  46. package/src/front-end-utils/dist/toolbar.bundle.js +1 -1
  47. package/src/front-end-utils/src/components/header-view.js +80 -62
  48. package/src/front-end-utils/src/constants/pageUrl.js +2 -1
  49. package/src/routes/cors.js +55 -31
  50. package/src/routes/index.js +45 -41
  51. package/src/routes/mockRoutes/marketplaceManager/bootstrapContext.js +109 -499
  52. package/src/routes/mockRoutes/user/bootstrapContext.js +26 -432
  53. package/src/tools/prompt-questions.js +16 -3
  54. package/src/tools/toolkit-components-add.js +1 -4
  55. package/src/tools/toolkit-import.js +1 -1
@@ -0,0 +1,353 @@
1
+ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
2
+ /* Document
3
+ ========================================================================== */
4
+ /**
5
+ * 1. Correct the line height in all browsers.
6
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
7
+ */
8
+ html {
9
+ line-height: 1.15;
10
+ /* 1 */
11
+ -webkit-text-size-adjust: 100%;
12
+ /* 2 */ }
13
+
14
+ /* Sections
15
+ ========================================================================== */
16
+ /**
17
+ * Remove the margin in all browsers.
18
+ */
19
+ body {
20
+ margin: 0; }
21
+
22
+ /**
23
+ * Render the `main` element consistently in IE.
24
+ */
25
+ main {
26
+ display: block; }
27
+
28
+ /**
29
+ * Correct the font size and margin on `h1` elements within `section` and
30
+ * `article` contexts in Chrome, Firefox, and Safari.
31
+ */
32
+ h1 {
33
+ font-size: 2em;
34
+ margin: 0.67em 0; }
35
+
36
+ /* Grouping content
37
+ ========================================================================== */
38
+ /**
39
+ * 1. Add the correct box sizing in Firefox.
40
+ * 2. Show the overflow in Edge and IE.
41
+ */
42
+ hr {
43
+ box-sizing: content-box;
44
+ /* 1 */
45
+ height: 0;
46
+ /* 1 */
47
+ overflow: visible;
48
+ /* 2 */ }
49
+
50
+ /**
51
+ * 1. Correct the inheritance and scaling of font size in all browsers.
52
+ * 2. Correct the odd `em` font sizing in all browsers.
53
+ */
54
+ pre {
55
+ font-family: monospace, monospace;
56
+ /* 1 */
57
+ font-size: 1em;
58
+ /* 2 */ }
59
+
60
+ /* Text-level semantics
61
+ ========================================================================== */
62
+ /**
63
+ * Remove the gray background on active links in IE 10.
64
+ */
65
+ a {
66
+ background-color: transparent;
67
+ color: var(--linkText, #009abf); }
68
+
69
+ /**
70
+ * 1. Remove the bottom border in Chrome 57-
71
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
72
+ */
73
+ abbr[title] {
74
+ border-bottom: none;
75
+ /* 1 */
76
+ text-decoration: underline;
77
+ /* 2 */
78
+ text-decoration: underline dotted;
79
+ /* 2 */ }
80
+
81
+ /**
82
+ * Add the correct font weight in Chrome, Edge, and Safari.
83
+ */
84
+ b,
85
+ strong {
86
+ font-weight: bolder; }
87
+
88
+ /**
89
+ * 1. Correct the inheritance and scaling of font size in all browsers.
90
+ * 2. Correct the odd `em` font sizing in all browsers.
91
+ */
92
+ code,
93
+ kbd,
94
+ samp {
95
+ font-family: monospace, monospace;
96
+ /* 1 */
97
+ font-size: 1em;
98
+ /* 2 */ }
99
+
100
+ /**
101
+ * Add the correct font size in all browsers.
102
+ */
103
+ small {
104
+ font-size: 80%; }
105
+
106
+ /**
107
+ * Prevent `sub` and `sup` elements from affecting the line height in
108
+ * all browsers.
109
+ */
110
+ sub,
111
+ sup {
112
+ font-size: 75%;
113
+ line-height: 0;
114
+ position: relative;
115
+ vertical-align: baseline; }
116
+
117
+ sub {
118
+ bottom: -0.25em; }
119
+
120
+ sup {
121
+ top: -0.5em; }
122
+
123
+ /* Embedded content
124
+ ========================================================================== */
125
+ /**
126
+ * Remove the border on images inside links in IE 10.
127
+ */
128
+ img {
129
+ border-style: none; }
130
+
131
+ /* Forms
132
+ ========================================================================== */
133
+ /**
134
+ * 1. Change the font styles in all browsers.
135
+ * 2. Remove the margin in Firefox and Safari.
136
+ */
137
+ button,
138
+ input,
139
+ optgroup,
140
+ select,
141
+ textarea {
142
+ font-family: inherit;
143
+ /* 1 */
144
+ font-size: 100%;
145
+ /* 1 */
146
+ line-height: 1.15;
147
+ /* 1 */
148
+ margin: 0;
149
+ /* 2 */ }
150
+
151
+ /**
152
+ * Show the overflow in IE.
153
+ * 1. Show the overflow in Edge.
154
+ */
155
+ button,
156
+ input {
157
+ /* 1 */
158
+ overflow: visible; }
159
+
160
+ /**
161
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
162
+ * 1. Remove the inheritance of text transform in Firefox.
163
+ */
164
+ button,
165
+ select {
166
+ /* 1 */
167
+ text-transform: none; }
168
+
169
+ /**
170
+ * Correct the inability to style clickable types in iOS and Safari.
171
+ */
172
+ button,
173
+ [type="button"],
174
+ [type="reset"],
175
+ [type="submit"] {
176
+ -webkit-appearance: button; }
177
+
178
+ /**
179
+ * Remove the inner border and padding in Firefox.
180
+ */
181
+ button::-moz-focus-inner,
182
+ [type="button"]::-moz-focus-inner,
183
+ [type="reset"]::-moz-focus-inner,
184
+ [type="submit"]::-moz-focus-inner {
185
+ border-style: none;
186
+ padding: 0; }
187
+
188
+ /**
189
+ * Restore the focus styles unset by the previous rule.
190
+ */
191
+ button:-moz-focusring,
192
+ [type="button"]:-moz-focusring,
193
+ [type="reset"]:-moz-focusring,
194
+ [type="submit"]:-moz-focusring {
195
+ outline: 1px dotted ButtonText; }
196
+
197
+ /**
198
+ * Correct the padding in Firefox.
199
+ */
200
+ fieldset {
201
+ padding: 0.35em 0.75em 0.625em; }
202
+
203
+ /**
204
+ * 1. Correct the text wrapping in Edge and IE.
205
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
206
+ * 3. Remove the padding so developers are not caught out when they zero out
207
+ * `fieldset` elements in all browsers.
208
+ */
209
+ legend {
210
+ box-sizing: border-box;
211
+ /* 1 */
212
+ color: inherit;
213
+ /* 2 */
214
+ display: table;
215
+ /* 1 */
216
+ max-width: 100%;
217
+ /* 1 */
218
+ padding: 0;
219
+ /* 3 */
220
+ white-space: normal;
221
+ /* 1 */ }
222
+
223
+ /**
224
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
225
+ */
226
+ progress {
227
+ vertical-align: baseline; }
228
+
229
+ /**
230
+ * Remove the default vertical scrollbar in IE 10+.
231
+ */
232
+ textarea {
233
+ overflow: auto; }
234
+
235
+ /**
236
+ * 1. Add the correct box sizing in IE 10.
237
+ * 2. Remove the padding in IE 10.
238
+ */
239
+ [type="checkbox"],
240
+ [type="radio"] {
241
+ box-sizing: border-box;
242
+ /* 1 */
243
+ padding: 0;
244
+ /* 2 */ }
245
+
246
+ /**
247
+ * Correct the cursor style of increment and decrement buttons in Chrome.
248
+ */
249
+ [type="number"]::-webkit-inner-spin-button,
250
+ [type="number"]::-webkit-outer-spin-button {
251
+ height: auto; }
252
+
253
+ /**
254
+ * 1. Correct the odd appearance in Chrome and Safari.
255
+ * 2. Correct the outline style in Safari.
256
+ */
257
+ [type="search"] {
258
+ -webkit-appearance: textfield;
259
+ /* 1 */
260
+ outline-offset: -2px;
261
+ /* 2 */ }
262
+
263
+ /**
264
+ * Remove the inner padding in Chrome and Safari on macOS.
265
+ */
266
+ [type="search"]::-webkit-search-decoration {
267
+ -webkit-appearance: none; }
268
+
269
+ /**
270
+ * 1. Correct the inability to style clickable types in iOS and Safari.
271
+ * 2. Change font properties to `inherit` in Safari.
272
+ */
273
+ ::-webkit-file-upload-button {
274
+ -webkit-appearance: button;
275
+ /* 1 */
276
+ font: inherit;
277
+ /* 2 */ }
278
+
279
+ /* Interactive
280
+ ========================================================================== */
281
+ /*
282
+ * Add the correct display in Edge, IE 10+, and Firefox.
283
+ */
284
+ details {
285
+ display: block; }
286
+
287
+ /*
288
+ * Add the correct display in all browsers.
289
+ */
290
+ summary {
291
+ display: list-item; }
292
+
293
+ /* Misc
294
+ ========================================================================== */
295
+ /**
296
+ * Add the correct display in IE 10+.
297
+ */
298
+ template {
299
+ display: none; }
300
+
301
+ /**
302
+ * Add the correct display in IE 10.
303
+ */
304
+ [hidden] {
305
+ display: none; }
306
+
307
+ .container {
308
+ width: 100%;
309
+ padding-right: 14px;
310
+ padding-left: 14px;
311
+ margin-right: auto;
312
+ margin-left: auto; }
313
+ @media (min-width: 576px) {
314
+ .container {
315
+ max-width: 540px; } }
316
+ @media (min-width: 768px) {
317
+ .container {
318
+ max-width: 720px; } }
319
+ @media (min-width: 992px) {
320
+ .container {
321
+ max-width: 960px; } }
322
+ @media (min-width: 1330px) {
323
+ .container {
324
+ max-width: 1320px; } }
325
+
326
+ ul, li {
327
+ list-style: none;
328
+ margin-bottom: 0;
329
+ padding: 0; }
330
+
331
+ .mock-content {
332
+ padding-top: 10%;
333
+ padding-bottom: 11rem;
334
+ height: 85vh;
335
+ }
336
+
337
+ .mock-content > img {
338
+ margin-left: auto;
339
+ margin-right: auto;
340
+ display: block;
341
+ padding-left: 13px;
342
+ max-width: 100%;
343
+ }
344
+
345
+ body {
346
+ background: #f5f6f5;
347
+ }
348
+
349
+ html {
350
+ font: 16px/1.4em "Helvetica Neue", Helvetica, Arial, sans-serif;}
351
+
352
+ *, ::after, ::before {
353
+ box-sizing: border-box; }
Binary file
@@ -0,0 +1,43 @@
1
+ <!doctype html>
2
+
3
+ <html lang="{{ config.locale.code }}">
4
+ <head>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ {% block meta_title %}<title>{{ meta.title }}</title>{% endblock %}
7
+ {% block meta_description %}<meta name="description" content="{{ meta.description }}">{% endblock %}
8
+ {% block meta_keywords %}<meta name="keywords" content="{{ meta.keywords }}">{% endblock %}
9
+ {% block meta_author %}<meta name="author" content="{{ meta.author }}">{% endblock %}
10
+ {% block other_meta %}
11
+
12
+ {% endblock %}
13
+ {% block meta_opengraph %}
14
+ <meta property="og:url" content="{{ meta.url }}" />
15
+ <meta property="og:type" content="{{ meta.type }}" />
16
+ <meta property="og:title" content="{{ meta.title }}" />
17
+ <meta property="og:description" content="{{ meta.description }}" />
18
+ <meta property="og:image" content="{{ meta.image }}" />
19
+ {% endblock %}
20
+
21
+ {% block meta_twitter %}
22
+ <meta property="twitter:card" content="{{ meta.card }}" />
23
+ <meta property="twitter:site" content="" />
24
+ <meta property="twitter:creator" content="" />
25
+ {% endblock %}
26
+
27
+ <link rel="shortcut icon" href="{{ config.channelSettings.customFavicon }}" type="image/x-icon">
28
+ <link rel="stylesheet" type="text/css" href="theme-index.css">
29
+ <script src="{{ r("/assets/js/jquery-3.4.1.slim.min.js") }}"></script>
30
+ </head>
31
+
32
+ <body data-page="{% block dataPage %}{% endblock %}" style="background-color: #f5f6f5;">
33
+ {% block header %}
34
+ <div id="header-universal" role="heading" aria-level="1"></div>
35
+ {% endblock %}
36
+ <div class="mock-content" style="height:83vh; padding-top: 100px">
37
+ <img width="478" src="login.png" alt="My Apps">
38
+ </div>
39
+ {% block footer %}
40
+ <div id="footer-universal" role="contentinfo"></div>
41
+ {% endblock %}
42
+ </body>
43
+ </html>
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@appdirect/sfb-toolkit",
3
- "version": "4.0.24",
3
+ "version": "5.0.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@appdirect/sfb-toolkit",
9
- "version": "4.0.24",
9
+ "version": "5.0.0",
10
10
  "license": "SEE LICENSE IN https://help.appdirect.com/sfb-eula.pdf",
11
11
  "dependencies": {
12
12
  "@appdirect/public-custom-app-ui": "^0.0.23",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appdirect/sfb-toolkit",
3
- "version": "4.0.24",
3
+ "version": "5.0.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/readme.md CHANGED
@@ -6,179 +6,16 @@ It can be easily mixed with eg. HTML, CSS, JavaScript, jQuery, SASS.
6
6
 
7
7
  ### Requirements
8
8
  * Node 10.x or 12.x for versions 1.x.x to 3.0.6
9
- * Node 16.x or 18.x for versions 4.x.x
9
+ * Node 16.x or 18.x for versions 4.x.x or newer
10
10
 
11
11
  ### Release Notes:
12
12
 
13
- **4.0.23**
14
- - Removed `Classic` option when creating theme
15
- - Updated `sfb-theme-components` library to version [0.0.352](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.352)
16
- - `[DEPRECATED]` `sfb-toolkit storybook` command
17
- - `[BETA]` added `sfb-toolkit import` command
18
- - `[BETA]` added `sfb-toolkit components-add` command
19
- - `[BETA]` added `sfb-toolkit components-copy` command
20
- - `[BETA]` added `sfb-toolkit components-delete` command
21
-
22
- **4.0.20**
23
- - Updated internal packages
24
-
25
- **4.0.19**
26
- - Updated internal packages
27
-
28
- **4.0.18**
29
- - Updated documentation links
30
-
31
- **4.0.17**
32
- - Bug fix: fixed issue when executing `sfb-toolkit start` on Windows
33
- - Updated `sfb-theme-components` library to version [0.0.342](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.342)
34
-
35
- **4.0.14**
36
- - Bug fix: fixed error message showing when executing `sfb-toolkit setup`
37
-
38
- **4.0.13**
39
- - Added new command `sfb-toolkit components-info`
40
- - shows which custom components could override our internal UI library (`sfb-theme-components`)
41
- - Updated warning prompt for `sfb-toolkit install @appdirect/sfb-theme-components`
42
- - includes the current version of `sfb-theme-components` used
43
- - indicates which custom components should potentially be tested when updating the `sfb-theme-components` version
44
-
45
- **4.0.12**
46
- - Bug fix: fixed proxy issue
47
-
48
- **4.0.11**
49
- - Added warning prompt to `sfb-toolkit components` command
50
- - Added warning prompt to `sfb-toolkit install @appdirect/sfb-theme-components` command
51
- - Bug fix: fixed node_modules issue
52
-
53
- **4.0.10**
54
- - Add Node 18 support
55
- - Add prompts when enabling custom components and updating sfb-theme-component version
56
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.76 ([sfb-theme-mp2@0.0.75](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.76))
57
- - Add default translations for all supported languages
58
- - Update `sfb-theme-components` library to version [0.0.340](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.340)
59
- - Add Node 18 support
60
- - Update `storefront-utils` library to version [0.0.125](https://www.npmjs.com/package/@appdirect/storefront-utils/v/0.0.125)
61
-
62
- **4.0.8**
63
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.64 ([sfb-theme-mp2@0.0.75](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.75))
64
- - Update `@appdirect/sfb-theme-classic` to version 0.0.27 ([sfb-theme-classic@0.0.27](https://www.npmjs.com/package/@appdirect/sfb-theme-classic/v/0.0.27))
65
- - Update `sfb-theme-components` library to version [0.0.338](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.338)
66
-
67
- **4.0.4**
68
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.64 ([sfb-theme-mp2@0.0.64](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.64))
69
- - Update `sfb-theme-components` library to version [0.0.321](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.321)
70
-
71
- **4.0.2**
72
- - `sfb-components` bundles are split by storefront page to improve LCP performance.
73
- - Bug fix: Fix custom components with sfb-toolkit@4 on Windows.
74
- - Bug fix: Fix favicon not showing in the Plaza theme.
75
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.59 ([sfb-theme-mp2@0.0.59](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.59))
76
- - Update `sfb-theme-components` library to version [0.0.315](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.315)
77
-
78
- **4.0.1**
79
- - Toolkit is now able to work on Node 16.
80
- - Remove deprecated `node-sass` to compile SASS files in favour of `sass` aka Dart Sass.
81
- - Update `sfb-theme-components` library to version [0.0.293](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.293)
82
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.57 ([sfb-theme-mp2@0.0.57](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.57))
83
- - Update `@appdirect/sfb-theme-classic` to version 0.0.26 ([sfb-theme-classic@0.0.26](https://www.npmjs.com/package/@appdirect/sfb-theme-classic/v/0.0.26))
84
-
85
- **3.0.6**
86
- - Update `sfb-theme-components` library to version [0.0.282](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.282)
87
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.55 ([sfb-theme-mp2@0.0.55](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.55))
88
- - Update `@appdirect/sfb-theme-classic` to version 0.0.24 ([sfb-theme-classic@0.0.24](https://www.npmjs.com/package/@appdirect/sfb-theme-classic/v/0.0.24))
89
-
90
- **3.0.5**
91
- - Update `sfb-theme-components` library to version [0.0.272](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.272)
92
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.53 ([sfb-theme-mp2@0.0.53](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.53))
93
-
94
- **3.0.4**
95
- - Update `sfb-theme-components` library to version [0.0.262](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.262)
96
- - Update custom components section in the Storybook documentation
97
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.50 ([sfb-theme-mp2@0.0.47](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.50))
98
-
99
- **3.0.3**
100
- - Bug fix: Fix `PRODUCTS_LIST` schema type not working on a custom page
101
- - Update `sfb-toolkit package` command to minify `sfb-components.js` bundle
102
- - Update `sfb-theme-components` library to version [0.0.245](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.245)
103
- - Update custom components section in the Storybook documentation
104
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.47 ([sfb-theme-mp2@0.0.47](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.47))
105
- - Add product variants template
106
- - Add `enableProductVariant` theme setting
107
-
108
- **3.0.0**
109
- - Add new storefront Header & Footer components
110
- - Add new menu manager in the Visual Editor
111
- - Update `sfb-theme-components` library to version [0.0.237](https://www.npmjs.com/package/@appdirect/sfb-theme-components/v/0.0.237) and the Plaza theme to meet WCAG 2.1 level AA for accessibility
112
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.45 ([sfb-theme-mp2@0.0.45](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.45))
113
-
114
- **2.0.15**
115
- - Add new domain cross-selling page in Plaza theme. ([See Documentation](https://help.appdirect.com/products/Default.htm#StorefrontBuilder/sfb-configure-domain-x-sell.htm))
116
- - Read `crossSellingEnabled` setting from theme to optionally disable cross-selling
117
- - Update `@appdirect/sfb-theme-plaza` to version 0.0.44 ([sfb-theme-mp2@0.0.44](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.44))
118
-
119
- **2.0.14**
120
- - Fix npm security vulnerabilities when running `sfb-toolkit storybook` and `sfb-toolkit components` commands
121
-
122
- **2.0.13**
123
- - Customize CTA labels and `i18n` object in the theme ([See Documentation](https://help.appdirect.com/platform/Default.htm#StorefrontBuilder/sfb-override-labels.htm%3FTocPath%3DCustomize%2520the%2520storefront%7CWork%2520with%2520the%2520Storefront%2520Toolkit%7C_____10))
124
-
125
- **2.0.10**
126
- - Bug fix: `sfb-toolkit storybook` command throws an error
127
-
128
- **2.0.9**
129
- - Update storefront-utils library
130
-
131
- **2.0.8**
132
- - Improve the toolbar header view:
133
- - to preview the header as a regular user or a marketplace manager without a user token
134
- - to preview the header in the admin portal
135
- - The theme header-footer section can use assets (images, fonts) in the theme assets folder
136
-
137
- **2.0.7**
138
- - Bug fix: Default props should be passed properly to custom components
139
- - Bug fix: Custom components do not work in Classic theme
140
- - Bug fix: Removing a null file when `customComponents` folder is created
141
-
142
- **2.0.6**
143
- - Updating Classic and Plaza theme
144
-
145
- **2.0.5**
146
- - Add new toolkit commands: `storybook` and `components` to build new custom components in your Plaza theme
147
- - Update `setup` and `create` commands to choose between a `Classic` or a `Plaza` theme
148
-
149
- **2.0.4**
150
- - Update Classic theme, small fix in leads form
151
- - Update Plaza theme with product domains and bundles page
152
-
153
- **2.0.3**
154
- - Add pricing content to add to cart mock
155
- - Add Support for Storefront Builder Components rendering
156
- - Bug fix: Fix Microsoft subscription upgraded rendering
157
-
158
- **2.0.2**
159
- - Added Support for both SASS and SCSS styling file compilation
160
- - Bug fix: Hanging prompt on setup command on Windows
161
-
162
- **2.0.1**
163
- - Documentation links updated
164
- - Bug fix: Footer custom JS script parsing
165
-
166
- **2.0.0**
167
- - Classic Theme with new Checkout and Cart integration is now available ([See Documentation](https://help.appdirect.com/platform/Default.htm#StorefrontBuilder/sfb-checkout-intro.htm))
168
- - Added Product Configuration page
169
- - Added Cart Preview
170
- - Added window function to add to cart `AD_addToCart()`
171
- - Standalone Domains now supports new Checkout
172
- - Bug fix: Windows CRLF now supported
173
-
174
- **1.1.0**
175
- - Dynamic SASS compilation to work with Node 12
176
-
177
- **1.1.0**
178
- - Toolkit is now ready and able to work on Node 12
179
-
180
- **1.0.0**
181
- - Initial release
13
+ **5.0.0**
14
+ - Added `sfb-toolkit import` command
15
+ - Added `sfb-toolkit components-add` command
16
+ - Added `sfb-toolkit components-copy` command
17
+ - Added `sfb-toolkit components-delete` command
18
+ - Updated `@appdirect/sfb-theme-plaza` to version 0.0.82 ([sfb-theme-plaza@0.0.82](https://www.npmjs.com/package/@appdirect/sfb-theme-plaza/v/0.0.82))
182
19
 
183
20
  ### How to use
184
21
  The idea behind Toolkit CLI is similar to how `git` CLI has been made.
@@ -194,9 +31,14 @@ Developers can have multiple themes in a single environment.
194
31
  |`sfb-toolkit update`|Update current theme's configuration|
195
32
  |`sfb-toolkit start`|Starts local server with current theme on `https://localhost:3555/en-US/home`|
196
33
  |`sfb-toolkit package`|Creates a .zip file with current theme files|
197
- |`sfb-toolkit storybook`|Start storybook for the currently selected theme
198
- |`sfb-toolkit install [module]`|Installs npm module in the currently selected theme
199
- |`sfb-toolkit components`|Setup custom components
34
+ |`sfb-toolkit storybook`|[**Deprecated**] Start storybook for the currently selected theme|
35
+ |`sfb-toolkit install [module]`|Installs npm module in the currently selected theme|
36
+ |`sfb-toolkit components`|Setup custom components|
37
+ |`sfb-toolkit components-info`|Custom components information|
38
+ |`sfb-toolkit components-copy`|Copy UI library custom components|
39
+ |`sfb-toolkit components-delete`|Delete copied UI library components|
40
+ |`sfb-toolkit components-add`|Add a new custom components|
41
+ |`sfb-toolkit import [themePath] [marketplacePath] [themeName]`|Imports a theme|
200
42
  |`sfb-toolkit version`|Shows version of sfb-toolkit|
201
43
 
202
44
 
@@ -208,4 +50,4 @@ Developers can have multiple themes in a single environment.
208
50
  - [Contact Support](mailto:storefrontbuilder@appdirect.com)
209
51
 
210
52
 
211
- This Repository is owned and maintained by Storefront Builder Team @ AppDirect Inc.
53
+ This Repository is owned and maintained by UI Platform team @ AppDirect Inc.
package/src/api/cors.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const fetch = require("../tools/proxy-fetch");
2
2
 
3
3
  const cors = {
4
- async callApi(req, res, requestType = "get") {
4
+ async callApi(req, res, requestType = "get", overrides = {}) {
5
5
  const options = {
6
6
  method: requestType,
7
7
  redirect: "follow",
@@ -25,7 +25,10 @@ const cors = {
25
25
  options
26
26
  );
27
27
  const data = await response.json();
28
- res.send(data);
28
+ res.send({
29
+ ...data,
30
+ ...overrides,
31
+ });
29
32
  } catch (error) {
30
33
  console.log(error);
31
34
  res.sendStatus(500);
@@ -124,7 +124,7 @@ class Pages {
124
124
  getData(pageSettings) {
125
125
  return new Promise(resolve => {
126
126
  let { page, locale, currency } = this
127
- if (page === "admin") {
127
+ if (page === "admin" || page === "login") {
128
128
  page = "home"
129
129
  }
130
130
  const apiURL = API_PATHS[page](
@@ -333,6 +333,7 @@ class Pages {
333
333
  const mockedPageObject = {}
334
334
  const mockedPagesPath = `${__dirname}/../../mockPages`
335
335
  mockedPages.forEach(folder => {
336
+ console.log(folder)
336
337
  try {
337
338
  const htmlContent = fs.readFileSync(
338
339
  `${mockedPagesPath}/${folder}/${folder}.html`,