@appdirect/sfb-toolkit 4.0.22 → 4.0.24

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 (70) hide show
  1. package/bin/index.js +92 -14
  2. package/coverage/clover.xml +32 -32
  3. package/coverage/coverage-final.json +4 -4
  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 +1 -1
  14. package/coverage/lcov-report/controllers/index.js.html +1 -1
  15. package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +7 -7
  16. package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +3 -3
  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 +11 -11
  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 +1 -1
  22. package/coverage/lcov-report/front-end-utils/src/components/index.html +1 -1
  23. package/coverage/lcov-report/front-end-utils/src/components/search.js.html +13 -13
  24. package/coverage/lcov-report/front-end-utils/src/constants/index.html +1 -1
  25. package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +1 -1
  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 +1 -1
  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 +81 -81
  36. package/customComponents/index.js +10 -2
  37. package/npm-shrinkwrap.json +144 -20
  38. package/package.json +4 -4
  39. package/readme.md +9 -0
  40. package/src/boilerplates/AddComponent/AddComponent.jsx +234 -0
  41. package/src/boilerplates/AddComponent/styles/AddComponent.scss +47 -0
  42. package/src/tools/prompt-questions.js +109 -14
  43. package/src/tools/toolkit-common-fun.js +30 -15
  44. package/src/tools/toolkit-common-vars-namespace.js +106 -0
  45. package/src/tools/toolkit-common-vars.js +1 -1
  46. package/src/tools/toolkit-components-add.js +334 -0
  47. package/src/tools/toolkit-components-copy.js +78 -46
  48. package/src/tools/toolkit-components-delete.js +370 -0
  49. package/src/tools/toolkit-components-fun.js +126 -7
  50. package/src/tools/toolkit-components-info.js +6 -4
  51. package/src/tools/toolkit-components-vars.js +50 -0
  52. package/src/tools/toolkit-components.js +1 -1
  53. package/src/tools/toolkit-create.js +2 -3
  54. package/src/tools/toolkit-import.js +182 -0
  55. package/src/tools/toolkit-install.js +6 -5
  56. package/src/tools/toolkit-package.js +3 -0
  57. package/src/tools/toolkit-setup.js +1 -1
  58. package/src/tools/toolkit-start.js +4 -1
  59. package/src/tools/toolkit-storybook.js +136 -48
  60. package/src/tools/toolkit-zip-utils.js +35 -0
  61. package/src/tools/zip-theme.js +62 -50
  62. package/themes-config.json +0 -7
  63. package/customComponents/atoms/label/Label.jsx +0 -20
  64. package/customComponents/atoms/label/stories/Label.story.mdx +0 -20
  65. package/customComponents/atoms/label/styles/Label.scss +0 -4
  66. package/customComponents/components/atoms-showcase-custom/AtomsShowcaseCustom.jsx +0 -8
  67. package/customComponents/components/atoms-showcase-custom/stories/AtomsShowcaseCustom.story.mdx +0 -17
  68. package/customComponents/components/atoms-showcase-modules/AtomsShowcaseModules.jsx +0 -223
  69. package/customComponents/components/atoms-showcase-modules/stories/AtomsShowcaseModules.story.mdx +0 -49
  70. package/customComponents/components/index.js +0 -2
@@ -1,2 +1,10 @@
1
- export * from './components';
2
- export * from '@appdirect/sfb-theme-components/src/index';
1
+ /*
2
+ THIS IS A REQUIRED FILE, PLEASE DO NOT DELETE IT!
3
+
4
+ This file contains the list of custom components that will be used by your theme. If you created a custom component
5
+ manually (without using "sfb-toolkit components-add" or "sfb-toolkit components-copy" commands) you will need
6
+ to add the component to this file (see example below) for it to be recognized by the theme.
7
+ i.e: export { default as yourComponentName } from 'path/to/custom/component'
8
+ */
9
+
10
+ export * from '@appdirect/sfb-theme-components/src/index';
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@appdirect/sfb-toolkit",
3
- "version": "4.0.22",
3
+ "version": "4.0.24",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@appdirect/sfb-toolkit",
9
- "version": "4.0.22",
9
+ "version": "4.0.24",
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",
13
- "@appdirect/sfb-theme-classic": "0.0.27",
14
- "@appdirect/sfb-theme-plaza": "0.0.79",
13
+ "@appdirect/sfb-theme-plaza": "0.0.82",
15
14
  "@appdirect/storefront-utils": "latest",
16
15
  "@babel/core": "^7.19.1",
17
16
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -37,6 +36,7 @@
37
36
  "css-loader": "^6.7.1",
38
37
  "directory-tree": "^3.3.1",
39
38
  "express": "^4.18.1",
39
+ "extract-zip": "^2.0.1",
40
40
  "fs-extra": "^10.1.0",
41
41
  "glob": "^8.0.3",
42
42
  "gulp": "^4.0.2",
@@ -19448,15 +19448,10 @@
19448
19448
  "node": ">= 10"
19449
19449
  }
19450
19450
  },
19451
- "node_modules/@appdirect/sfb-theme-classic": {
19452
- "version": "0.0.27",
19453
- "resolved": "https://registry.npmjs.org/@appdirect/sfb-theme-classic/-/sfb-theme-classic-0.0.27.tgz",
19454
- "integrity": "sha512-pmpAJwxaqMSUVTudBq/BXlD4MEEFsGkulR/v+baJYZ44lzvH0ZxlFakAXcZyxAwuM+S3YUNkdHqbC3fGyxYvDw=="
19455
- },
19456
19451
  "node_modules/@appdirect/sfb-theme-plaza": {
19457
- "version": "0.0.79",
19458
- "resolved": "https://registry.npmjs.org/@appdirect/sfb-theme-plaza/-/sfb-theme-plaza-0.0.79.tgz",
19459
- "integrity": "sha512-opEtBGEZ8XMu4yxVMH9jBRwZTDf6X8DD0RoeKujA115njVlyOq2yylmGUif4y2UccUPHGeqLqOkxNumt6lJa5g=="
19452
+ "version": "0.0.82",
19453
+ "resolved": "https://registry.npmjs.org/@appdirect/sfb-theme-plaza/-/sfb-theme-plaza-0.0.82.tgz",
19454
+ "integrity": "sha512-T/Sj7j0xE0h8nxUd147dQ0yEqvuKKPDZGX3609sKW2qTFwqqZRPTInRSqFZ5CCxS3C0d94YLiNT7LQPc1UROGg=="
19460
19455
  },
19461
19456
  "node_modules/@appdirect/storefront-utils": {
19462
19457
  "version": "0.0.125",
@@ -22718,6 +22713,15 @@
22718
22713
  "integrity": "sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==",
22719
22714
  "dev": true
22720
22715
  },
22716
+ "node_modules/@types/yauzl": {
22717
+ "version": "2.10.3",
22718
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
22719
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
22720
+ "optional": true,
22721
+ "dependencies": {
22722
+ "@types/node": "*"
22723
+ }
22724
+ },
22721
22725
  "node_modules/@webassemblyjs/ast": {
22722
22726
  "version": "1.11.6",
22723
22727
  "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
@@ -28028,6 +28032,48 @@
28028
28032
  "node": ">=0.10.0"
28029
28033
  }
28030
28034
  },
28035
+ "node_modules/extract-zip": {
28036
+ "version": "2.0.1",
28037
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
28038
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
28039
+ "dependencies": {
28040
+ "debug": "^4.1.1",
28041
+ "get-stream": "^5.1.0",
28042
+ "yauzl": "^2.10.0"
28043
+ },
28044
+ "bin": {
28045
+ "extract-zip": "cli.js"
28046
+ },
28047
+ "engines": {
28048
+ "node": ">= 10.17.0"
28049
+ },
28050
+ "optionalDependencies": {
28051
+ "@types/yauzl": "^2.9.1"
28052
+ }
28053
+ },
28054
+ "node_modules/extract-zip/node_modules/get-stream": {
28055
+ "version": "5.2.0",
28056
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
28057
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
28058
+ "dependencies": {
28059
+ "pump": "^3.0.0"
28060
+ },
28061
+ "engines": {
28062
+ "node": ">=8"
28063
+ },
28064
+ "funding": {
28065
+ "url": "https://github.com/sponsors/sindresorhus"
28066
+ }
28067
+ },
28068
+ "node_modules/extract-zip/node_modules/pump": {
28069
+ "version": "3.0.0",
28070
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
28071
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
28072
+ "dependencies": {
28073
+ "end-of-stream": "^1.1.0",
28074
+ "once": "^1.3.1"
28075
+ }
28076
+ },
28031
28077
  "node_modules/fancy-log": {
28032
28078
  "version": "1.3.3",
28033
28079
  "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
@@ -28167,6 +28213,14 @@
28167
28213
  "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz",
28168
28214
  "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ=="
28169
28215
  },
28216
+ "node_modules/fd-slicer": {
28217
+ "version": "1.1.0",
28218
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
28219
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
28220
+ "dependencies": {
28221
+ "pend": "~1.2.0"
28222
+ }
28223
+ },
28170
28224
  "node_modules/figures": {
28171
28225
  "version": "3.2.0",
28172
28226
  "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
@@ -34672,6 +34726,11 @@
34672
34726
  "node": ">=8"
34673
34727
  }
34674
34728
  },
34729
+ "node_modules/pend": {
34730
+ "version": "1.2.0",
34731
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
34732
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="
34733
+ },
34675
34734
  "node_modules/performance-now": {
34676
34735
  "version": "2.1.0",
34677
34736
  "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@@ -39825,6 +39884,15 @@
39825
39884
  "node": "6.* || 8.* || >= 10.*"
39826
39885
  }
39827
39886
  },
39887
+ "node_modules/yauzl": {
39888
+ "version": "2.10.0",
39889
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
39890
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
39891
+ "dependencies": {
39892
+ "buffer-crc32": "~0.2.3",
39893
+ "fd-slicer": "~1.1.0"
39894
+ }
39895
+ },
39828
39896
  "node_modules/yocto-queue": {
39829
39897
  "version": "0.1.0",
39830
39898
  "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
@@ -54318,15 +54386,10 @@
54318
54386
  }
54319
54387
  }
54320
54388
  },
54321
- "@appdirect/sfb-theme-classic": {
54322
- "version": "0.0.27",
54323
- "resolved": "https://registry.npmjs.org/@appdirect/sfb-theme-classic/-/sfb-theme-classic-0.0.27.tgz",
54324
- "integrity": "sha512-pmpAJwxaqMSUVTudBq/BXlD4MEEFsGkulR/v+baJYZ44lzvH0ZxlFakAXcZyxAwuM+S3YUNkdHqbC3fGyxYvDw=="
54325
- },
54326
54389
  "@appdirect/sfb-theme-plaza": {
54327
- "version": "0.0.79",
54328
- "resolved": "https://registry.npmjs.org/@appdirect/sfb-theme-plaza/-/sfb-theme-plaza-0.0.79.tgz",
54329
- "integrity": "sha512-opEtBGEZ8XMu4yxVMH9jBRwZTDf6X8DD0RoeKujA115njVlyOq2yylmGUif4y2UccUPHGeqLqOkxNumt6lJa5g=="
54390
+ "version": "0.0.82",
54391
+ "resolved": "https://registry.npmjs.org/@appdirect/sfb-theme-plaza/-/sfb-theme-plaza-0.0.82.tgz",
54392
+ "integrity": "sha512-T/Sj7j0xE0h8nxUd147dQ0yEqvuKKPDZGX3609sKW2qTFwqqZRPTInRSqFZ5CCxS3C0d94YLiNT7LQPc1UROGg=="
54330
54393
  },
54331
54394
  "@appdirect/storefront-utils": {
54332
54395
  "version": "0.0.125",
@@ -56781,6 +56844,15 @@
56781
56844
  "integrity": "sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==",
56782
56845
  "dev": true
56783
56846
  },
56847
+ "@types/yauzl": {
56848
+ "version": "2.10.3",
56849
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
56850
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
56851
+ "optional": true,
56852
+ "requires": {
56853
+ "@types/node": "*"
56854
+ }
56855
+ },
56784
56856
  "@webassemblyjs/ast": {
56785
56857
  "version": "1.11.6",
56786
56858
  "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
@@ -60912,6 +60984,36 @@
60912
60984
  }
60913
60985
  }
60914
60986
  },
60987
+ "extract-zip": {
60988
+ "version": "2.0.1",
60989
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
60990
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
60991
+ "requires": {
60992
+ "@types/yauzl": "^2.9.1",
60993
+ "debug": "^4.1.1",
60994
+ "get-stream": "^5.1.0",
60995
+ "yauzl": "^2.10.0"
60996
+ },
60997
+ "dependencies": {
60998
+ "get-stream": {
60999
+ "version": "5.2.0",
61000
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
61001
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
61002
+ "requires": {
61003
+ "pump": "^3.0.0"
61004
+ }
61005
+ },
61006
+ "pump": {
61007
+ "version": "3.0.0",
61008
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
61009
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
61010
+ "requires": {
61011
+ "end-of-stream": "^1.1.0",
61012
+ "once": "^1.3.1"
61013
+ }
61014
+ }
61015
+ }
61016
+ },
60915
61017
  "fancy-log": {
60916
61018
  "version": "1.3.3",
60917
61019
  "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
@@ -61039,6 +61141,14 @@
61039
61141
  "resolved": "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz",
61040
61142
  "integrity": "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ=="
61041
61143
  },
61144
+ "fd-slicer": {
61145
+ "version": "1.1.0",
61146
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
61147
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
61148
+ "requires": {
61149
+ "pend": "~1.2.0"
61150
+ }
61151
+ },
61042
61152
  "figures": {
61043
61153
  "version": "3.2.0",
61044
61154
  "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
@@ -65996,6 +66106,11 @@
65996
66106
  "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
65997
66107
  "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
65998
66108
  },
66109
+ "pend": {
66110
+ "version": "1.2.0",
66111
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
66112
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="
66113
+ },
65999
66114
  "performance-now": {
66000
66115
  "version": "2.1.0",
66001
66116
  "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@@ -69885,6 +70000,15 @@
69885
70000
  "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
69886
70001
  "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="
69887
70002
  },
70003
+ "yauzl": {
70004
+ "version": "2.10.0",
70005
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
70006
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
70007
+ "requires": {
70008
+ "buffer-crc32": "~0.2.3",
70009
+ "fd-slicer": "~1.1.0"
70010
+ }
70011
+ },
69888
70012
  "yocto-queue": {
69889
70013
  "version": "0.1.0",
69890
70014
  "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appdirect/sfb-toolkit",
3
- "version": "4.0.22",
3
+ "version": "4.0.24",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@appdirect/public-custom-app-ui": "^0.0.23",
59
- "@appdirect/sfb-theme-plaza": "0.0.79",
59
+ "@appdirect/sfb-theme-plaza": "0.0.82",
60
60
  "@appdirect/storefront-utils": "latest",
61
61
  "@babel/core": "^7.19.1",
62
62
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -82,6 +82,7 @@
82
82
  "css-loader": "^6.7.1",
83
83
  "directory-tree": "^3.3.1",
84
84
  "express": "^4.18.1",
85
+ "extract-zip": "^2.0.1",
85
86
  "fs-extra": "^10.1.0",
86
87
  "glob": "^8.0.3",
87
88
  "gulp": "^4.0.2",
@@ -124,8 +125,7 @@
124
125
  "webpack": "^5.74.0",
125
126
  "webpack-cli": "^4.10.0",
126
127
  "webpack-dev-middleware": "^5.3.3",
127
- "webpack-hot-middleware": "^2.25.2",
128
- "@appdirect/sfb-theme-classic": "0.0.27"
128
+ "webpack-hot-middleware": "^2.25.2"
129
129
  },
130
130
  "devDependencies": {
131
131
  "@babel/plugin-transform-modules-commonjs": "^7.18.6",
package/readme.md CHANGED
@@ -10,6 +10,15 @@ It can be easily mixed with eg. HTML, CSS, JavaScript, jQuery, SASS.
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
+
13
22
  **4.0.20**
14
23
  - Updated internal packages
15
24
 
@@ -0,0 +1,234 @@
1
+ import React from "react"
2
+ import "./styles/{{COMPONENT_NAME_PASCAL_CASE}}.scss"
3
+ import PropTypes from "prop-types"
4
+ import withListener from "@appdirect/sfb-theme-components/src/components/withListener"
5
+ import { createNamespace } from "@appdirect/sfb-theme-components/src/tools/namingTools"
6
+ {{COMPONENT_ORDERABLE_NAMESPACE_IMPORT}}
7
+ import {
8
+ INPUT,
9
+ TOGGLE,
10
+ TEXTAREA,
11
+ COLORPICKER,
12
+ DROPDOWN,
13
+ RADIO,
14
+ CHECKBOX,
15
+ SLIDER,
16
+ GROUP_HEADER,
17
+ } from "@appdirect/sfb-theme-components/src/constants/schemaComponentTypes"
18
+
19
+ const n = createNamespace("{{COMPONENT_NAME_PASCAL_CASE}}")
20
+
21
+ export function {{COMPONENT_NAME_PASCAL_CASE}}(props) {
22
+ const { settings = {} } = props
23
+ const {
24
+ title,
25
+ description,
26
+ isDescriptionVisible,
27
+ backgroundColor,
28
+ headerType,
29
+ descriptionSize,
30
+ textStyling,
31
+ textOpacity,
32
+ } = settings
33
+
34
+ const modifiers = [descriptionSize]
35
+
36
+ if (textStyling && textStyling.length) {
37
+ modifiers.push(...textStyling)
38
+ }
39
+ const styleProps = {
40
+ ...(textOpacity && {
41
+ style: { opacity: textOpacity },
42
+ }),
43
+ }
44
+
45
+ const containerVariables = {
46
+ "background-color": backgroundColor,
47
+ }
48
+
49
+ return (
50
+ <div
51
+ {...n("container").withTestId().withVariables(containerVariables).props}
52
+ >
53
+ <div {...n("row").props}>
54
+ {headerType === "header1" && <h1>{title}</h1>}
55
+ {headerType === "header2" && <h2>{title}</h2>}
56
+ {headerType === "header3" && <h3>{title}</h3>}
57
+ {!headerType && <span>{title}</span>}
58
+ </div>
59
+
60
+ <div {...n("row").props}>
61
+ {isDescriptionVisible && (
62
+ <p
63
+ {...n("description", modifiers).withTestId().props}
64
+ {...styleProps}
65
+ >
66
+ {description}
67
+ </p>
68
+ )}
69
+ </div>
70
+ </div>
71
+ )
72
+ }
73
+
74
+ const HEADER_TYPE_OPTIONS = [
75
+ {
76
+ value: "header1",
77
+ label: "Header1",
78
+ caption: "Sample caption",
79
+ },
80
+ {
81
+ value: "header2",
82
+ label: "Header2",
83
+ caption: "Sample caption",
84
+ },
85
+ {
86
+ value: "header3",
87
+ label: "Header3",
88
+ caption: "Sample caption",
89
+ },
90
+ ]
91
+
92
+ const DESCRIPTION_SIZE_OPTIONS = [
93
+ {
94
+ value: "bigger",
95
+ label: "Bigger",
96
+ caption: "Sample caption",
97
+ },
98
+ {
99
+ value: "standard",
100
+ label: "Standard",
101
+ caption: "Sample caption",
102
+ },
103
+ {
104
+ value: "smaller",
105
+ label: "Smaller",
106
+ caption: "Sample caption",
107
+ },
108
+ ]
109
+
110
+ const TEXT_STYLING_OPTIONS = [
111
+ {
112
+ value: "bold",
113
+ label: "Bold",
114
+ },
115
+ {
116
+ value: "italic",
117
+ label: "Italic",
118
+ },
119
+ {
120
+ value: "strikethrough",
121
+ label: "Strikethrough",
122
+ },
123
+ {
124
+ value: "underline",
125
+ label: "Underline",
126
+ },
127
+ ]
128
+
129
+ {{COMPONENT_NAME_PASCAL_CASE}}.schema = () => ({
130
+ name: "{{COMPONENT_NAME_PASCAL_CASE}}",
131
+ title: "{{COMPONENT_NAME_SENTENCE_CASE}}",
132
+ iconName: "carousel",{{COMPONENT_ORDERABLE_SECTION}}
133
+ form: {
134
+ title: {
135
+ title: "Title",
136
+ placeholder: "Type here ...",
137
+ defaultValue: "My new component: {{COMPONENT_NAME_PASCAL_CASE}}",
138
+ type: INPUT,
139
+ required: true,
140
+ },
141
+ backgroundColor: {
142
+ title: "Background color",
143
+ defaultValue: "#F4F4F4",
144
+ type: COLORPICKER,
145
+ },
146
+ headerType: {
147
+ title: "Header type",
148
+ type: DROPDOWN,
149
+ required: true,
150
+ defaultValue: HEADER_TYPE_OPTIONS[1].value,
151
+ options: HEADER_TYPE_OPTIONS,
152
+ },
153
+ descriptionHeader: {
154
+ type: GROUP_HEADER,
155
+ title: "Description settings",
156
+ symbol: "description-settings",
157
+ },
158
+ isDescriptionVisible: {
159
+ labelOn: "Toggle description",
160
+ labelOff: "Toggle description",
161
+ defaultValue: true,
162
+ type: TOGGLE,
163
+ },
164
+ description: {
165
+ title: "Component description",
166
+ defaultValue: "This is a new component created using sfb-toolkit components-add command.",
167
+ type: TEXTAREA,
168
+ required: true,
169
+ validation: {
170
+ pattern: /^[^!"#$%&']*$/gm,
171
+ message: "This field is invalid",
172
+ },
173
+ },
174
+ descriptionSize: {
175
+ title: "Text size",
176
+ type: RADIO,
177
+ required: true,
178
+ defaultValue: DESCRIPTION_SIZE_OPTIONS[1].value,
179
+ options: DESCRIPTION_SIZE_OPTIONS,
180
+ },
181
+ textStyling: {
182
+ title: "Text styling",
183
+ type: CHECKBOX,
184
+ required: false,
185
+ defaultValue: [TEXT_STYLING_OPTIONS[0].value],
186
+ options: TEXT_STYLING_OPTIONS,
187
+ },
188
+ textOpacity: {
189
+ title: "Text opacity",
190
+ type: SLIDER,
191
+ required: false,
192
+ defaultValue: 1,
193
+ options: {
194
+ step: 0.1,
195
+ min: 0.1,
196
+ max: 1,
197
+ },
198
+ },
199
+ },
200
+ })
201
+
202
+ const SETTINGS = {{COMPONENT_NAME_PASCAL_CASE}}.schema().form
203
+
204
+ {{COMPONENT_NAME_PASCAL_CASE}}.propTypes = {
205
+ settings: PropTypes.shape({
206
+ title: PropTypes.string,
207
+ description: PropTypes.string,
208
+ isDescriptionVisible: PropTypes.bool,
209
+ backgroundColor: PropTypes.string,
210
+ headerType: PropTypes.oneOf(HEADER_TYPE_OPTIONS.map(({ value }) => value)),
211
+ descriptionSize: PropTypes.oneOf(
212
+ DESCRIPTION_SIZE_OPTIONS.map(({ value }) => value)
213
+ ),
214
+ textStyling: PropTypes.oneOf(
215
+ TEXT_STYLING_OPTIONS.map(({ value }) => value)
216
+ ),
217
+ textOpacity: PropTypes.number,
218
+ }),
219
+ }
220
+
221
+ {{COMPONENT_NAME_PASCAL_CASE}}.defaultProps = {
222
+ settings: {
223
+ title: SETTINGS.title.defaultValue,
224
+ description: SETTINGS.description.defaultValue,
225
+ isDescriptionVisible: SETTINGS.isDescriptionVisible.defaultValue,
226
+ backgroundColor: SETTINGS.backgroundColor.defaultValue,
227
+ headerType: SETTINGS.headerType.defaultValue,
228
+ descriptionSize: SETTINGS.descriptionSize.defaultValue,
229
+ textStyling: SETTINGS.textStyling.defaultValue,
230
+ textOpacity: SETTINGS.textOpacity.defaultValue,
231
+ },
232
+ }
233
+
234
+ export default withListener({{COMPONENT_NAME_PASCAL_CASE}})
@@ -0,0 +1,47 @@
1
+ .{{COMPONENT_NAME_CAMEL_CASE}} {
2
+ display: flex;
3
+ width: 100%;
4
+
5
+ &_container {
6
+ color: var(--text-color, #474747);
7
+ background-color: var(--background-color, #F5F5F5);
8
+
9
+ display: flex;
10
+ flex-direction: column;
11
+ margin-top: 20px;
12
+ margin-bottom: 20px;
13
+ padding: 10px 25px 25px 25px;
14
+ }
15
+
16
+ &_description {
17
+ &--bigger {
18
+ font-size: 130%;
19
+ }
20
+ &--standard {
21
+ font-size: 100%;
22
+ }
23
+ &--smaller {
24
+ font-size: 70%;
25
+ }
26
+ &--bold {
27
+ font-weight: bold;
28
+ }
29
+ &--italic {
30
+ font-style: italic;
31
+ }
32
+ &--strikethrough {
33
+ text-decoration: line-through;
34
+ }
35
+ &--underline {
36
+ text-decoration: underline;
37
+ }
38
+ }
39
+
40
+ &_row {
41
+ display: flex;
42
+ flex-direction: row;
43
+ flex-grow: 1;
44
+ justify-content: flex-start;
45
+ align-items: center;
46
+ }
47
+ }