hasting-swatchcart-module 0.0.7 → 0.0.9

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 (351) hide show
  1. package/dist/assets/SwatchesModule.css +1 -0
  2. package/dist/components/SwatchesModule.js +23440 -24
  3. package/dist/components/Test.js +5 -0
  4. package/dist/lib/components/Test.d.ts +1 -0
  5. package/dist/main.js +0 -1
  6. package/dist/{src/shared/constants/props.js → rootReducer-BqfJd5QI.js} +1913 -3
  7. package/dist/store/LibraryProvider.js +3 -4
  8. package/dist/store/rootReducer.js +2 -10
  9. package/dist/store/store.js +5 -15
  10. package/dist/store-BZ_1BK_I.js +382 -0
  11. package/package.json +1 -1
  12. package/dist/_virtual/_commonjsHelpers.js +0 -6
  13. package/dist/_virtual/index.js +0 -7
  14. package/dist/_virtual/index2.js +0 -7
  15. package/dist/_virtual/index3.js +0 -4
  16. package/dist/_virtual/use-sync-external-store-with-selector.development.js +0 -4
  17. package/dist/_virtual/use-sync-external-store-with-selector.production.js +0 -4
  18. package/dist/_virtual/utilities.js +0 -4
  19. package/dist/_virtual/with-selector.js +0 -5
  20. package/dist/_virtual/with-selector2.js +0 -4
  21. package/dist/assets/src/shared/ui/CustomSidebar/CustomSidebar.module.css +0 -1
  22. package/dist/assets/src/shared/ui/Markdown/MDWithAccordion.module.css +0 -1
  23. package/dist/assets/styles/index.css +0 -0
  24. package/dist/main.d.ts +0 -1
  25. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -527
  26. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -402
  27. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -208
  28. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -136
  29. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -130
  30. package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -9
  31. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
  32. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -251
  33. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
  34. package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -68
  35. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -256
  36. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
  37. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
  38. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
  39. package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -13
  40. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -231
  41. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -219
  42. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
  43. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
  44. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -36
  45. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -49
  46. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
  47. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -52
  48. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
  49. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
  50. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -8
  51. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -27
  52. package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +0 -877
  53. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +0 -35
  54. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +0 -497
  55. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +0 -52
  56. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +0 -62
  57. package/dist/node_modules/@ungap/structured-clone/esm/index.js +0 -11
  58. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +0 -106
  59. package/dist/node_modules/@ungap/structured-clone/esm/types.js +0 -13
  60. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  61. package/dist/node_modules/bail/index.js +0 -7
  62. package/dist/node_modules/clsx/dist/clsx.js +0 -17
  63. package/dist/node_modules/comma-separated-tokens/index.js +0 -20
  64. package/dist/node_modules/decode-named-character-reference/index.dom.js +0 -14
  65. package/dist/node_modules/devlop/lib/default.js +0 -8
  66. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +0 -7
  67. package/dist/node_modules/extend/index.js +0 -43
  68. package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -7
  69. package/dist/node_modules/hast-util-from-parse5/lib/index.js +0 -145
  70. package/dist/node_modules/hast-util-parse-selector/lib/index.js +0 -20
  71. package/dist/node_modules/hast-util-raw/lib/index.js +0 -217
  72. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +0 -302
  73. package/dist/node_modules/hast-util-to-parse5/lib/index.js +0 -118
  74. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.js +0 -12
  75. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.js +0 -61
  76. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.js +0 -33
  77. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.js +0 -368
  78. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.js +0 -6
  79. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.js +0 -566
  80. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
  81. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
  82. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.js +0 -22
  83. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.js +0 -27
  84. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.js +0 -23
  85. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.js +0 -11
  86. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.js +0 -17
  87. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.js +0 -14
  88. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.js +0 -19
  89. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.js +0 -11
  90. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.js +0 -11
  91. package/dist/node_modules/hast-util-whitespace/lib/index.js +0 -10
  92. package/dist/node_modules/hastscript/lib/create-h.js +0 -112
  93. package/dist/node_modules/hastscript/lib/index.js +0 -8
  94. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +0 -44
  95. package/dist/node_modules/html-url-attributes/lib/index.js +0 -26
  96. package/dist/node_modules/html-void-elements/index.js +0 -25
  97. package/dist/node_modules/immer/dist/immer.js +0 -467
  98. package/dist/node_modules/inline-style-parser/index.js +0 -93
  99. package/dist/node_modules/is-plain-obj/index.js +0 -9
  100. package/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -40
  101. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -27
  102. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -20
  103. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +0 -12
  104. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -12
  105. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +0 -15
  106. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -19
  107. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +0 -581
  108. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +0 -90
  109. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +0 -12
  110. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +0 -8
  111. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +0 -15
  112. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +0 -12
  113. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +0 -12
  114. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +0 -28
  115. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +0 -12
  116. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +0 -9
  117. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +0 -14
  118. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +0 -10
  119. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +0 -58
  120. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +0 -14
  121. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +0 -19
  122. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +0 -15
  123. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +0 -42
  124. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +0 -21
  125. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +0 -12
  126. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +0 -7
  127. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +0 -12
  128. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +0 -13
  129. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +0 -21
  130. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +0 -32
  131. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +0 -8
  132. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +0 -12
  133. package/dist/node_modules/mdast-util-to-hast/lib/index.js +0 -10
  134. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +0 -13
  135. package/dist/node_modules/mdast-util-to-hast/lib/state.js +0 -104
  136. package/dist/node_modules/mdast-util-to-string/lib/index.js +0 -29
  137. package/dist/node_modules/micromark/lib/constructs.js +0 -85
  138. package/dist/node_modules/micromark/lib/create-tokenizer.js +0 -223
  139. package/dist/node_modules/micromark/lib/initialize/content.js +0 -37
  140. package/dist/node_modules/micromark/lib/initialize/document.js +0 -126
  141. package/dist/node_modules/micromark/lib/initialize/flow.js +0 -33
  142. package/dist/node_modules/micromark/lib/initialize/text.js +0 -95
  143. package/dist/node_modules/micromark/lib/parse.js +0 -32
  144. package/dist/node_modules/micromark/lib/postprocess.js +0 -9
  145. package/dist/node_modules/micromark/lib/preprocess.js +0 -39
  146. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +0 -83
  147. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +0 -43
  148. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +0 -18
  149. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +0 -42
  150. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +0 -17
  151. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +0 -30
  152. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +0 -94
  153. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +0 -43
  154. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +0 -45
  155. package/dist/node_modules/micromark-core-commonmark/lib/content.js +0 -50
  156. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +0 -80
  157. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +0 -17
  158. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +0 -46
  159. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +0 -144
  160. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +0 -102
  161. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +0 -152
  162. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +0 -22
  163. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +0 -19
  164. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +0 -14
  165. package/dist/node_modules/micromark-core-commonmark/lib/list.js +0 -90
  166. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +0 -57
  167. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +0 -25
  168. package/dist/node_modules/micromark-factory-destination/index.js +0 -31
  169. package/dist/node_modules/micromark-factory-label/index.js +0 -28
  170. package/dist/node_modules/micromark-factory-space/index.js +0 -15
  171. package/dist/node_modules/micromark-factory-title/index.js +0 -26
  172. package/dist/node_modules/micromark-factory-whitespace/index.js +0 -12
  173. package/dist/node_modules/micromark-util-character/index.js +0 -39
  174. package/dist/node_modules/micromark-util-chunked/index.js +0 -16
  175. package/dist/node_modules/micromark-util-classify-character/index.js +0 -10
  176. package/dist/node_modules/micromark-util-combine-extensions/index.js +0 -36
  177. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +0 -16
  178. package/dist/node_modules/micromark-util-decode-string/index.js +0 -18
  179. package/dist/node_modules/micromark-util-html-tag-name/index.js +0 -68
  180. package/dist/node_modules/micromark-util-normalize-identifier/index.js +0 -6
  181. package/dist/node_modules/micromark-util-resolve-all/index.js +0 -12
  182. package/dist/node_modules/micromark-util-sanitize-uri/index.js +0 -23
  183. package/dist/node_modules/micromark-util-subtokenize/index.js +0 -55
  184. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +0 -175
  185. package/dist/node_modules/parse5/dist/common/doctype.js +0 -98
  186. package/dist/node_modules/parse5/dist/common/error-codes.js +0 -7
  187. package/dist/node_modules/parse5/dist/common/foreign-content.js +0 -210
  188. package/dist/node_modules/parse5/dist/common/html.js +0 -250
  189. package/dist/node_modules/parse5/dist/common/token.js +0 -14
  190. package/dist/node_modules/parse5/dist/common/unicode.js +0 -73
  191. package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +0 -84
  192. package/dist/node_modules/parse5/dist/parser/index.js +0 -2271
  193. package/dist/node_modules/parse5/dist/parser/open-element-stack.js +0 -240
  194. package/dist/node_modules/parse5/dist/serializer/index.js +0 -2
  195. package/dist/node_modules/parse5/dist/tokenizer/index.js +0 -1940
  196. package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -88
  197. package/dist/node_modules/parse5/dist/tree-adapters/default.js +0 -162
  198. package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +0 -38
  199. package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.js +0 -245
  200. package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -7
  201. package/dist/node_modules/property-information/index.js +0 -12
  202. package/dist/node_modules/property-information/lib/aria.js +0 -61
  203. package/dist/node_modules/property-information/lib/find.js +0 -33
  204. package/dist/node_modules/property-information/lib/hast-to-react.js +0 -22
  205. package/dist/node_modules/property-information/lib/html.js +0 -368
  206. package/dist/node_modules/property-information/lib/normalize.js +0 -6
  207. package/dist/node_modules/property-information/lib/svg.js +0 -566
  208. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
  209. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
  210. package/dist/node_modules/property-information/lib/util/create.js +0 -19
  211. package/dist/node_modules/property-information/lib/util/defined-info.js +0 -36
  212. package/dist/node_modules/property-information/lib/util/info.js +0 -28
  213. package/dist/node_modules/property-information/lib/util/merge.js +0 -10
  214. package/dist/node_modules/property-information/lib/util/schema.js +0 -21
  215. package/dist/node_modules/property-information/lib/util/types.js +0 -14
  216. package/dist/node_modules/property-information/lib/xlink.js +0 -19
  217. package/dist/node_modules/property-information/lib/xml.js +0 -11
  218. package/dist/node_modules/property-information/lib/xmlns.js +0 -11
  219. package/dist/node_modules/react-markdown/lib/index.js +0 -102
  220. package/dist/node_modules/react-redux/dist/react-redux.js +0 -246
  221. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
  222. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
  223. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
  224. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
  225. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -68
  226. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  227. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  228. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -71
  229. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
  230. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -25
  231. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
  232. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
  233. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -30
  234. package/dist/node_modules/redux/dist/redux.js +0 -258
  235. package/dist/node_modules/redux-thunk/dist/redux-thunk.js +0 -8
  236. package/dist/node_modules/rehype-raw/lib/index.js +0 -12
  237. package/dist/node_modules/remark-parse/lib/index.js +0 -19
  238. package/dist/node_modules/remark-rehype/lib/index.js +0 -18
  239. package/dist/node_modules/reselect/dist/reselect.js +0 -244
  240. package/dist/node_modules/space-separated-tokens/index.js +0 -11
  241. package/dist/node_modules/style-to-js/cjs/index.js +0 -20
  242. package/dist/node_modules/style-to-js/cjs/utilities.js +0 -19
  243. package/dist/node_modules/style-to-object/cjs/index.js +0 -28
  244. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2731
  245. package/dist/node_modules/trim-lines/index.js +0 -28
  246. package/dist/node_modules/trough/lib/index.js +0 -60
  247. package/dist/node_modules/tslib/tslib.es6.js +0 -27
  248. package/dist/node_modules/unified/lib/callable-instance.js +0 -25
  249. package/dist/node_modules/unified/lib/index.js +0 -529
  250. package/dist/node_modules/unist-util-is/lib/index.js +0 -84
  251. package/dist/node_modules/unist-util-position/lib/index.js +0 -23
  252. package/dist/node_modules/unist-util-stringify-position/lib/index.js +0 -15
  253. package/dist/node_modules/unist-util-visit/lib/index.js +0 -16
  254. package/dist/node_modules/unist-util-visit-parents/lib/color.js +0 -6
  255. package/dist/node_modules/unist-util-visit-parents/lib/index.js +0 -56
  256. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -6
  257. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -26
  258. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -25
  259. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -18
  260. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -67
  261. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -66
  262. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -65
  263. package/dist/node_modules/use-sync-external-store/with-selector.js +0 -10
  264. package/dist/node_modules/vfile/lib/index.js +0 -406
  265. package/dist/node_modules/vfile/lib/minpath.browser.js +0 -112
  266. package/dist/node_modules/vfile/lib/minproc.browser.js +0 -7
  267. package/dist/node_modules/vfile/lib/minurl.browser.js +0 -41
  268. package/dist/node_modules/vfile/lib/minurl.shared.js +0 -7
  269. package/dist/node_modules/vfile-location/lib/index.js +0 -42
  270. package/dist/node_modules/vfile-message/lib/index.js +0 -91
  271. package/dist/node_modules/web-namespaces/index.js +0 -11
  272. package/dist/node_modules/zwitch/index.js +0 -18
  273. package/dist/src/app/assets/images/product_thumb.png.js +0 -4
  274. package/dist/src/app/assets/svg/ArrowIconSVG.js +0 -25
  275. package/dist/src/app/assets/svg/CheckMarkIconSVG.js +0 -25
  276. package/dist/src/app/assets/svg/CloseIconSVG.js +0 -25
  277. package/dist/src/app/assets/svg/MinusIconSVG.js +0 -24
  278. package/dist/src/app/assets/svg/PlusIconSVG.js +0 -24
  279. package/dist/src/app/assets/svg/SearchIconSVG.js +0 -37
  280. package/dist/src/app/assets/svg/TrashIconSVG.js +0 -24
  281. package/dist/src/app/store/rootReducer.js +0 -12
  282. package/dist/src/app/store/store.js +0 -14
  283. package/dist/src/features/Cart/lib/CartCervices.js +0 -8
  284. package/dist/src/features/Cart/model/cartSlice.js +0 -58
  285. package/dist/src/features/Cart/model/selectors.js +0 -18
  286. package/dist/src/features/Cart/ui/CartHeader/CartHeader.js +0 -53
  287. package/dist/src/features/Cart/ui/CartList/CartList.js +0 -29
  288. package/dist/src/features/Cart/ui/CartListItem/CartListItem.js +0 -41
  289. package/dist/src/features/Cart/ui/CartPrice/CartPrice.js +0 -23
  290. package/dist/src/features/Cart/ui/CartWrapper/CartWrapper.js +0 -38
  291. package/dist/src/features/Cart/ui/Counter/Counter.js +0 -46
  292. package/dist/src/features/DataAdapter/lib/DataAdapterServices.js +0 -102
  293. package/dist/src/features/DataAdapter/utils/types.js +0 -8
  294. package/dist/src/features/MultiProduct/lib/MultiProductCartServices.js +0 -34
  295. package/dist/src/features/MultiProduct/model/API/api.js +0 -18
  296. package/dist/src/features/MultiProduct/model/multiProductCartSlice.js +0 -83
  297. package/dist/src/features/MultiProduct/model/selectors.js +0 -7
  298. package/dist/src/features/MultiProduct/ui/CartSelectedProductList/CartSelectedProductList.js +0 -21
  299. package/dist/src/features/MultiProduct/ui/CustomModal/CustomModal.js +0 -28
  300. package/dist/src/features/MultiProduct/ui/FiltersSelectedProductItem/FiltersSelectedProductItem.js +0 -27
  301. package/dist/src/features/MultiProduct/ui/MultiProductCartHeader/MultiProductCartHeader.js +0 -60
  302. package/dist/src/features/MultiProduct/ui/MultiProductItemCart/MultiProductItemCart.js +0 -71
  303. package/dist/src/features/MultiProduct/ui/MultiProductWrapper/MultiProductWrapper.js +0 -19
  304. package/dist/src/features/MultiProduct/ui/ProductList/ProductList.js +0 -138
  305. package/dist/src/features/MultiProduct/ui/ProductListItem/ProductListItem.js +0 -51
  306. package/dist/src/features/MultiProduct/ui/SelectedProductItem/SelectedProductItem.js +0 -55
  307. package/dist/src/features/MultiProduct/ui/SwatchContentContainer/SwatchContentContainer.js +0 -46
  308. package/dist/src/features/MultiProduct/utils/constants.js +0 -16
  309. package/dist/src/features/MultiProduct/utils/randomList.js +0 -41
  310. package/dist/src/features/swatches/lib/AttributeHelper.js +0 -21
  311. package/dist/src/features/swatches/lib/SwatchesServices.js +0 -54
  312. package/dist/src/features/swatches/model/selectors.js +0 -12
  313. package/dist/src/features/swatches/model/swatchesSlice.js +0 -108
  314. package/dist/src/features/swatches/model/thunks.js +0 -22
  315. package/dist/src/features/swatches/model/types.js +0 -6
  316. package/dist/src/features/swatches/ui/Filters/ColorsFilter.js +0 -45
  317. package/dist/src/features/swatches/ui/Filters/LooksFilter.js +0 -45
  318. package/dist/src/features/swatches/ui/Filters/MaterialsFilter.js +0 -47
  319. package/dist/src/features/swatches/ui/Filters/index.js +0 -12
  320. package/dist/src/features/swatches/ui/HexGridZoom/HexGridZoom.js +0 -50
  321. package/dist/src/features/swatches/ui/ImageGridZoom/ImageGridZoom.js +0 -45
  322. package/dist/src/features/swatches/ui/MaterialList/index.js +0 -39
  323. package/dist/src/features/swatches/ui/MaterialListItem/MaterialListItem.js +0 -51
  324. package/dist/src/features/swatches/ui/ProductElement/index.js +0 -65
  325. package/dist/src/features/swatches/ui/SwatchWrapper/SwatchWrapper.js +0 -62
  326. package/dist/src/features/swatches/ui/Swatches.js +0 -51
  327. package/dist/src/features/swatches/ui/SwatchesList/SwatchesList.js +0 -67
  328. package/dist/src/features/swatches/utils/constants.js +0 -8
  329. package/dist/src/shared/constants/selectedMaterials.js +0 -4
  330. package/dist/src/shared/types/activeTab.js +0 -7
  331. package/dist/src/shared/ui/Checkbox/Checkbox.js +0 -31
  332. package/dist/src/shared/ui/CustomButton/CustomButton.js +0 -16
  333. package/dist/src/shared/ui/CustomSidebar/CustomSidebar.js +0 -59
  334. package/dist/src/shared/ui/CustomSidebar/CustomSidebar.module.scss.js +0 -13
  335. package/dist/src/shared/ui/Dialog/Dialog.js +0 -81
  336. package/dist/src/shared/ui/Label/Label.js +0 -27
  337. package/dist/src/shared/ui/Markdown/MDWithAccordion.js +0 -36
  338. package/dist/src/shared/ui/Markdown/MDWithAccordion.module.scss.js +0 -9
  339. package/dist/src/shared/ui/MaterialItem/MaterialItem.js +0 -36
  340. package/dist/src/shared/ui/MultiSelect/MultiSelect.js +0 -150
  341. package/dist/src/shared/ui/PopoverTooltip/InfoIcon.js +0 -35
  342. package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.js +0 -37
  343. package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.module.scss.js +0 -4
  344. package/dist/src/shared/ui/Slider/Slider.js +0 -117
  345. package/dist/src/shared/utils/cn.js +0 -8
  346. package/dist/src/shared/utils/uniqueList.js +0 -4
  347. /package/dist/{components → lib/components}/SwatchesModule.d.ts +0 -0
  348. /package/dist/{store → lib/store}/LibraryProvider.d.ts +0 -0
  349. /package/dist/{store → lib/store}/rootReducer.d.ts +0 -0
  350. /package/dist/{store → lib/store}/store.d.ts +0 -0
  351. /package/dist/{store → lib/store}/withStore.d.ts +0 -0
@@ -1,138 +0,0 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import { useState as c, useEffect as h, useMemo as f } from "react";
3
- import { CloseIconSVG as C } from "../../../../app/assets/svg/CloseIconSVG.js";
4
- import { SearchIconSVG as y } from "../../../../app/assets/svg/SearchIconSVG.js";
5
- import { useAppDispatch as I, useAppSelector as v } from "../../../../app/store/store.js";
6
- import { MultiSelect as P } from "../../../../shared/ui/MultiSelect/MultiSelect.js";
7
- import { getProductListThunk as _ } from "../../../swatches/model/thunks.js";
8
- import { getIsLoadingProductList as k, getProductLIst as j } from "../../../swatches/model/selectors.js";
9
- import { ProductListItem as M } from "../ProductListItem/ProductListItem.js";
10
- import { MultiProductCartService as T } from "../../lib/MultiProductCartServices.js";
11
- import { Slider as g } from "../../../../shared/ui/Slider/Slider.js";
12
- import { MOCK_ALL_CATEGORY_SLIDER_ITEM as A } from "../../utils/constants.js";
13
- const E = [
14
- { value: "opt", label: "opt" },
15
- { value: "opt1", label: "opt1" },
16
- { value: "opt2", label: "opt2" }
17
- ], F = ({ onSidebarToggle: x }) => {
18
- const d = I(), b = v(k), [o, m] = c(A), [i, w] = c(""), [l, S] = c("");
19
- h(() => {
20
- const e = setTimeout(() => {
21
- S(i.trim().toLowerCase());
22
- }, 300);
23
- return () => clearTimeout(e);
24
- }, [i]);
25
- const a = v(j), u = f(() => T.getUniqueCategories(a), [a]), n = (e) => e.toLowerCase(), p = f(() => {
26
- let e = a;
27
- if (o?.value) {
28
- const s = n(o.value);
29
- e = e.filter(
30
- (N) => N.categories.some((L) => n(L) === s)
31
- );
32
- }
33
- return l && (e = e.filter(
34
- (s) => n(s.name).includes(l)
35
- )), e;
36
- }, [a, o, l]);
37
- return h(() => {
38
- d(_());
39
- }, [d]), /* @__PURE__ */ t("div", { className: "flex h-full flex-col", children: [
40
- /* @__PURE__ */ t("header", { className: "flex items-center justify-between p-[var(--sm-padding)] border-b border-[var(--border)]", children: [
41
- /* @__PURE__ */ r("span", { className: "text-base font-medium", children: "Swatches List" }),
42
- /* @__PURE__ */ r(
43
- "button",
44
- {
45
- onClick: x,
46
- className: `flex h-[30px] w-[30px] items-center justify-center rounded-full bg-[var(--background-grey)]\r
47
- [&_svg_path]:stroke-[var(--svg-dark)]`,
48
- children: /* @__PURE__ */ r(C, { width: 10, height: 10 })
49
- }
50
- )
51
- ] }),
52
- /* @__PURE__ */ t("div", { className: "flex min-h-0 flex-1 flex-col", children: [
53
- /* @__PURE__ */ t("div", { className: "flex justify-between items-center gap-4 h-[64px] p-[var(--sm-padding)] border-b border-[var(--border)] sm:justify-start", children: [
54
- /* @__PURE__ */ t("div", { className: "relative w-full max-w-[180px] h-[36px] sm:max-w-[240px]", children: [
55
- /* @__PURE__ */ r(
56
- "input",
57
- {
58
- type: "text",
59
- placeholder: "Search",
60
- value: i,
61
- onChange: (e) => w(e.target.value),
62
- className: `\r
63
- h-full w-full pr-8 pl-4 rounded-2xl border border-[var(--border)]\r
64
- text-sm text-[var(--grey-text-color)] placeholder-[var(--text-muted)]\r
65
- focus:outline-none focus:border-[var(--main-accent-color)]\r
66
- bg-[var(--background)] transition\r
67
- `
68
- }
69
- ),
70
- /* @__PURE__ */ r(
71
- "div",
72
- {
73
- className: `\r
74
- absolute right-2 top-1/2 -translate-y-1/2\r
75
- pointer-events-none\r
76
- [&_svg_path]:stroke-[var(--svg-dark)]\r
77
- `,
78
- children: /* @__PURE__ */ r(y, { width: 16, height: 16 })
79
- }
80
- )
81
- ] }),
82
- /* @__PURE__ */ r(
83
- P,
84
- {
85
- options: E,
86
- values: ["opt"],
87
- onValueChange: (e) => console.log("value", e),
88
- className: "max-w-[100px] sm:max-w-[auto] sm:min-w-[160px]",
89
- dropdownWidth: "w-80"
90
- }
91
- ),
92
- /* @__PURE__ */ r(
93
- g,
94
- {
95
- items: u,
96
- activeId: o?.productId,
97
- className: "hidden sm:max-w-[680px] sm:overflow-hidden sm:flex",
98
- onSelect: (e) => m(e)
99
- }
100
- )
101
- ] }),
102
- /* @__PURE__ */ r(
103
- g,
104
- {
105
- items: u,
106
- activeId: o?.productId,
107
- className: "h-[64px] p-[var(--sm-padding)] border-b border-[var(--border)] sm:hidden sm:max-w-[680px] sm:overflow-hidden",
108
- onSelect: (e) => m(e)
109
- }
110
- ),
111
- b ? /* @__PURE__ */ r("div", { className: "w-full flex justify-center items-center flex-1 min-h-0", children: "loading..." }) : /* @__PURE__ */ t("div", { className: "flex-1 min-h-0 overflow-y-auto p-[var(--sm-padding)]", children: [
112
- /* @__PURE__ */ r("div", { className: "mb-4", children: "Select Product" }),
113
- /* @__PURE__ */ r(
114
- "ul",
115
- {
116
- className: `\r
117
- grid grid-cols-2 gap-4\r
118
- sm:grid-cols-6\r
119
- `,
120
- children: p.length ? p.map((e) => {
121
- const { name: s } = e;
122
- return /* @__PURE__ */ r(
123
- M,
124
- {
125
- productListItem: e
126
- },
127
- s
128
- );
129
- }) : null
130
- }
131
- )
132
- ] })
133
- ] })
134
- ] });
135
- };
136
- export {
137
- F as ProductList
138
- };
@@ -1,51 +0,0 @@
1
- import { jsxs as n, jsx as m } from "react/jsx-runtime";
2
- import d from "../../../../app/assets/images/product_thumb.png.js";
3
- import { useAppDispatch as l } from "../../../../app/store/store.js";
4
- import { getSelectedProductThunk as p } from "../../../swatches/model/thunks.js";
5
- import { setSelectedProduct as u, resetSelectedMaterials as f, setAllMaterialsOptions as h } from "../../../swatches/model/swatchesSlice.js";
6
- import { DataAdapterServices as S } from "../../../DataAdapter/lib/DataAdapterServices.js";
7
- import { EDataInputType as w } from "../../../DataAdapter/utils/types.js";
8
- const v = ({ productListItem: r }) => {
9
- const t = l(), { name: i } = r;
10
- return /* @__PURE__ */ n(
11
- "li",
12
- {
13
- className: "min-w-0 cursor-pointer",
14
- tabIndex: 0,
15
- onClick: async () => {
16
- const { productId: a, name: s } = r;
17
- if (a && s) {
18
- const e = await t(
19
- p({ productId: a, productName: s })
20
- ).unwrap();
21
- if (e) {
22
- const o = e.attributes;
23
- if (t(u(e)), o?.length) {
24
- const c = S.getTransformedData({
25
- dataType: w.UI,
26
- data: o
27
- });
28
- c && (t(f()), t(h(c)));
29
- }
30
- }
31
- }
32
- },
33
- children: [
34
- /* @__PURE__ */ m("div", { className: "mb-3 aspect-[16/9] w-ful sm:w-full", children: /* @__PURE__ */ m(
35
- "img",
36
- {
37
- src: d,
38
- alt: "product-list-item",
39
- className: `w-30 h-30 object-cover rounded-sm\r
40
- sm:w-40 sm:h-40\r
41
- `
42
- }
43
- ) }),
44
- i
45
- ]
46
- }
47
- );
48
- };
49
- export {
50
- v as ProductListItem
51
- };
@@ -1,55 +0,0 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { ArrowIconSVG as l } from "../../../../app/assets/svg/ArrowIconSVG.js";
3
- import { CloseIconSVG as s } from "../../../../app/assets/svg/CloseIconSVG.js";
4
- import { useAppDispatch as i, useAppSelector as a } from "../../../../app/store/store.js";
5
- import { getSelectedProduct as n } from "../../../swatches/model/selectors.js";
6
- import { deleteSelectedProduct as d } from "../../../swatches/model/swatchesSlice.js";
7
- import { MaterialList as m } from "../../../swatches/ui/MaterialList/index.js";
8
- import { FiltersSelectedProductItem as p } from "../FiltersSelectedProductItem/FiltersSelectedProductItem.js";
9
- import { SwatchContentContainer as f } from "../SwatchContentContainer/SwatchContentContainer.js";
10
- const w = ({
11
- onSidebarToggle: t
12
- }) => {
13
- const o = i(), c = a(n);
14
- return /* @__PURE__ */ r("div", { className: "flex h-full flex-col", children: [
15
- /* @__PURE__ */ r("header", { className: "flex items-center justify-between p-[var(--sm-padding)] border-b border-[var(--border)]", children: [
16
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
17
- /* @__PURE__ */ e(
18
- "button",
19
- {
20
- className: "[&_svg_path]:stroke-[var(--main-accent-color)] cursor-pointer",
21
- onClick: () => {
22
- o(d());
23
- },
24
- children: /* @__PURE__ */ e(l, {})
25
- }
26
- ),
27
- /* @__PURE__ */ e("h2", { className: "m-0 text-base leading-[1.6] font-medium ", children: c?.name })
28
- ] }),
29
- /* @__PURE__ */ e(
30
- "button",
31
- {
32
- onClick: t,
33
- className: `flex h-[30px] w-[30px] items-center justify-center rounded-full bg-[var(--background-grey)]\r
34
- [&_svg_path]:stroke-[var(--svg-dark)]`,
35
- children: /* @__PURE__ */ e(s, { width: 10, height: 10 })
36
- }
37
- )
38
- ] }),
39
- /* @__PURE__ */ r("div", { className: "flex min-h-0 flex-1 flex-col", children: [
40
- /* @__PURE__ */ e(p, {}),
41
- /* @__PURE__ */ e(
42
- m,
43
- {
44
- containerStyles: "flex-1 min-h-0 overflow-y-auto p-[var(--sm-padding)]",
45
- gridStyles: "grid grid-cols-2 gap-4 sm:grid-cols-6",
46
- desktopColumnsCount: 6
47
- }
48
- ),
49
- /* @__PURE__ */ e(f, {})
50
- ] })
51
- ] });
52
- };
53
- export {
54
- w as SelectedProductItem
55
- };
@@ -1,46 +0,0 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { useAppDispatch as i, useAppSelector as o } from "../../../../app/store/store.js";
3
- import { CustomButton as n } from "../../../../shared/ui/CustomButton/CustomButton.js";
4
- import { getSelectedMaterials as l, getSelectedProduct as p } from "../../../swatches/model/selectors.js";
5
- import { setIsOpenMultiProductCart as u } from "../../../swatches/model/swatchesSlice.js";
6
- import { SwatchesList as f } from "../../../swatches/ui/SwatchesList/SwatchesList.js";
7
- import { MultiProductCartService as C } from "../../lib/MultiProductCartServices.js";
8
- import { setCartItems as b, setActiveMultiCartProduct as h } from "../../model/multiProductCartSlice.js";
9
- import { getCartItems as v } from "../../model/selectors.js";
10
- const j = () => {
11
- const t = i(), c = o(l) ?? [], r = o(p), a = o(v);
12
- return /* @__PURE__ */ d(
13
- "div",
14
- {
15
- className: `flex flex-col border-t border-[var(--border)]\r
16
- sm:flex-row\r
17
- `,
18
- children: [
19
- /* @__PURE__ */ e(f, { containerStyles: "flex flex-col p-[var(--sm-padding)] shrink-0 sm:w-[50%] sm:border-r sm:border-[var(--border)]" }),
20
- /* @__PURE__ */ e("div", { className: "flex p-[var(--sm-padding)] border-t border-[var(--border)] sm:border-none sm:w-[50%] sm:justify-center sm:items-center", children: /* @__PURE__ */ e(
21
- n,
22
- {
23
- onClick: () => {
24
- const m = C.getCartPreparedOption(
25
- c,
26
- a
27
- );
28
- if (r) {
29
- const s = {
30
- productId: r.productId,
31
- name: r.name,
32
- items: m
33
- };
34
- t(b(s)), t(u(!0)), t(h(s));
35
- }
36
- },
37
- children: "ADD SWATCHES TO CART"
38
- }
39
- ) })
40
- ]
41
- }
42
- );
43
- };
44
- export {
45
- j as SwatchContentContainer
46
- };
@@ -1,16 +0,0 @@
1
- import { MOCK_ROW_PROPS_ATTRIBUTES as t } from "../../../shared/constants/props.js";
2
- const _ = {
3
- name: "mock_product",
4
- categories: [],
5
- productId: 999,
6
- attributes: t
7
- }, e = {
8
- name: "All",
9
- value: "",
10
- productId: 0,
11
- items: []
12
- };
13
- export {
14
- e as MOCK_ALL_CATEGORY_SLIDER_ITEM,
15
- _ as MOCK_SELECTED_PRODUCT
16
- };
@@ -1,41 +0,0 @@
1
- import { MOCK_ROW_PROPS_ATTRIBUTES as s } from "../../../shared/constants/props.js";
2
- const t = [
3
- "Kitchen",
4
- "Bathroom",
5
- "Outdoor",
6
- "Office",
7
- "Furniture",
8
- "Lighting",
9
- "Decor",
10
- "Electronics",
11
- "Appliances",
12
- "Storage",
13
- "Garden",
14
- "Bedroom",
15
- "Living Room",
16
- "Tools",
17
- "Accessories",
18
- "Hardware",
19
- "Flooring",
20
- "Paint",
21
- "Home Decor",
22
- "Smart Home"
23
- ], m = (e = 100) => {
24
- const r = [];
25
- for (let o = 1; o <= e; o++) {
26
- const n = Math.floor(Math.random() * 4) + 1, a = Array.from(
27
- { length: n },
28
- () => t[Math.floor(Math.random() * t.length)]
29
- ), c = Array.from(new Set(a));
30
- r.push({
31
- name: `product-${o}`,
32
- categories: c,
33
- productId: o,
34
- attributes: s
35
- });
36
- }
37
- return r;
38
- };
39
- export {
40
- m as generateRandomProducts
41
- };
@@ -1,21 +0,0 @@
1
- class o {
2
- static getImage(a) {
3
- const t = a?.metadata?.Image || a?.metadata?.image;
4
- return t ? `https://preview.threekit.com${t}` : void 0;
5
- }
6
- static getValueLabel(a) {
7
- return a?.metadata?.label || a?.metadata?.Label || a?.name || "Unnamed";
8
- }
9
- static getZoomIconColor(a) {
10
- return a?.metadata?.zoomIconColor || a?.metadata?.zoomIconColor || null;
11
- }
12
- static getHexColor(a) {
13
- return a?.metadata?.hex || a?.metadata?.Hex || null;
14
- }
15
- static getAttributeLabel(a) {
16
- return a?.metadata?.label || a?.metadata?.Label || a?.name || "Unnamed";
17
- }
18
- }
19
- export {
20
- o as AttributeHelper
21
- };
@@ -1,54 +0,0 @@
1
- import { FILTER_TO_VALUE_KEY as d } from "../utils/constants.js";
2
- const A = (o, r) => o.toLowerCase() === r.toLowerCase();
3
- class v {
4
- static getMaterialsValuesFromOptions(r) {
5
- if (r.length)
6
- return r.reduce((t, e) => {
7
- if (Array.isArray(e.values) && e.values.length) {
8
- const a = e.metadata?.Name ?? e.metadata?.Label ?? "without_name", s = e.values.map((n) => ({
9
- ...n,
10
- parentName: a
11
- }));
12
- t.push(...s);
13
- }
14
- return t;
15
- }, []).sort((t, e) => {
16
- const a = t.name?.toLowerCase() ?? "", s = e.name?.toLowerCase() ?? "";
17
- return a.localeCompare(s);
18
- });
19
- }
20
- static getUniqueByAssetId(r) {
21
- const t = /* @__PURE__ */ new Set();
22
- return r.filter((e) => t.has(e.assetId) ? !1 : (t.add(e.assetId), !0));
23
- }
24
- static normalizeToArray(r, t = !0) {
25
- return r ? Array.isArray(r) ? r.map((e) => e.trim()).filter(Boolean) : (t ? r.split(",") : [r]).map((e) => e.trim()).filter(Boolean) : [];
26
- }
27
- // Get all selected filters and their count
28
- static mapFiltersFromValues(r, t) {
29
- return Object.keys(t).map((e) => {
30
- const a = d[e], n = t[e].map((l) => {
31
- let i = 0;
32
- for (const u of r) {
33
- const m = Array.isArray(u.values) ? u.values : [];
34
- for (const c of m) {
35
- const f = this.normalizeToArray(c.metadata?.[a]);
36
- i += f.filter((y) => A(y, l)).length;
37
- }
38
- }
39
- return { filterKey: l, filterCount: i };
40
- });
41
- return { filterType: e, filters: n };
42
- });
43
- }
44
- // Get filters with a positive count
45
- static getPositiveSelectedFilers(r) {
46
- return r.map((t) => ({
47
- filterName: t.filterType,
48
- filterKeys: t.filters.filter((e) => e.filterCount !== 0).map((e) => e.filterKey)
49
- })).filter((t) => t.filterKeys.length > 0);
50
- }
51
- }
52
- export {
53
- v as SwatchesServices
54
- };
@@ -1,12 +0,0 @@
1
- const e = (t) => t.swatches.isOpenSidebar, s = (t) => t.swatches.allMaterialsValues, c = (t) => t.swatches.materialSelectState, a = (t) => t.swatches.productElementOptions, l = (t) => t.swatches.selectedMaterials, o = (t) => t.swatches.productList, i = (t) => t.swatches.isLoadingProductList, r = (t) => t.swatches.selectedProduct, n = (t) => t.swatches.isOpenMultiProductCart;
2
- export {
3
- s as getAllMaterialValues,
4
- i as getIsLoadingProductList,
5
- n as getIsOpenMultiCart,
6
- e as getIsOpenSidebar,
7
- c as getMaterialSelectStateFilters,
8
- a as getProductElementOptions,
9
- o as getProductLIst,
10
- l as getSelectedMaterials,
11
- r as getSelectedProduct
12
- };
@@ -1,108 +0,0 @@
1
- import { createSlice as o } from "../../../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js";
2
- import { SwatchesServices as c } from "../lib/SwatchesServices.js";
3
- import { uniqueList as n } from "../../../shared/utils/uniqueList.js";
4
- import { getProductListThunk as i } from "./thunks.js";
5
- import { current as u } from "../../../../node_modules/immer/dist/immer.js";
6
- const p = {
7
- isOpenSidebar: !0,
8
- listAttributes: [],
9
- productElementOptions: [],
10
- materialSelectState: { Finish: [], Color: [], Look: [] },
11
- allMaterialsValues: [],
12
- selectedMaterials: [],
13
- productList: [],
14
- isLoadingProductList: !1,
15
- selectedProduct: null,
16
- isLoadingSelectedProduct: !1,
17
- isOpenMultiProductCart: !1
18
- }, d = o({
19
- name: "swatches",
20
- initialState: p,
21
- reducers: {
22
- toggleSidebar: (e) => {
23
- e.isOpenSidebar = !e.isOpenSidebar;
24
- },
25
- setMaterialSelect(e, t) {
26
- const { filterName: l, values: a } = t.payload;
27
- if (a.length === 0) {
28
- e.materialSelectState[l] = [];
29
- return;
30
- }
31
- e.materialSelectState[l] = n(a);
32
- },
33
- setPanelFilter(e, t) {
34
- const l = t.payload.attributes;
35
- if (l.length) {
36
- const a = c.getMaterialsValuesFromOptions(l);
37
- a?.length && (e.allMaterialsValues = c.getUniqueByAssetId(
38
- a
39
- ));
40
- }
41
- },
42
- clearMaterialFilter: (e, t) => {
43
- e.materialSelectState[t.payload] = [];
44
- },
45
- clearAllMaterialFilters: (e) => {
46
- e.materialSelectState = { Finish: [], Color: [], Look: [] };
47
- },
48
- setAllMaterialsOptions: (e, t) => {
49
- const { allMaterialValues: l, productElementOptions: a } = t.payload;
50
- l?.length && (e.allMaterialsValues = l), a?.length && (e.productElementOptions = a);
51
- },
52
- setSelectedMaterials(e, t) {
53
- const { selectedMaterial: l } = t.payload;
54
- if (!l) return;
55
- const a = u(e.selectedMaterials), r = (s) => s.metadata?.label === l.metadata?.label && s.parentName === l.parentName;
56
- a.some(r) ? e.selectedMaterials = a.filter((s) => !r(s)) : a.length < 5 && (e.selectedMaterials = [...a, l]);
57
- },
58
- resetSelectedMaterials(e) {
59
- e.selectedMaterials = [];
60
- },
61
- setSelectedProduct(e, t) {
62
- e.selectedProduct = t.payload;
63
- },
64
- deleteSelectedProduct(e) {
65
- e.selectedProduct = null;
66
- },
67
- setIsOpenMultiProductCart(e, t) {
68
- e.isOpenMultiProductCart = t.payload;
69
- }
70
- },
71
- extraReducers: (e) => {
72
- e.addCase(i.pending, (t) => {
73
- t.isLoadingProductList = !0;
74
- }).addCase(i.fulfilled, (t, l) => {
75
- t.productList = l.payload, t.isLoadingProductList = !1;
76
- }).addCase(i.rejected, (t) => {
77
- t.isLoadingProductList = !1;
78
- });
79
- }
80
- }), L = d.reducer, {
81
- // setListAttributes,
82
- setMaterialSelect: h,
83
- setAllMaterialsOptions: O,
84
- setPanelFilter: b,
85
- setSelectedMaterials: y,
86
- toggleSidebar: C,
87
- clearMaterialFilter: F,
88
- clearAllMaterialFilters: A,
89
- setSelectedProduct: V,
90
- deleteSelectedProduct: w,
91
- setIsOpenMultiProductCart: x,
92
- resetSelectedMaterials: k
93
- } = d.actions;
94
- export {
95
- A as clearAllMaterialFilters,
96
- F as clearMaterialFilter,
97
- w as deleteSelectedProduct,
98
- k as resetSelectedMaterials,
99
- O as setAllMaterialsOptions,
100
- x as setIsOpenMultiProductCart,
101
- h as setMaterialSelect,
102
- b as setPanelFilter,
103
- y as setSelectedMaterials,
104
- V as setSelectedProduct,
105
- L as swatchesReducer,
106
- d as swatchesSlice,
107
- C as toggleSidebar
108
- };
@@ -1,22 +0,0 @@
1
- import { createAsyncThunk as o } from "../../../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js";
2
- import { getProductListAPI as c, getSelectedProductAPI as n } from "../../MultiProduct/model/API/api.js";
3
- const d = o("multiProducts/getProductListThunk", async (s, { rejectWithValue: t }) => {
4
- try {
5
- return await c();
6
- } catch (e) {
7
- return console.error(e.message), t(e.message);
8
- }
9
- }), g = o(
10
- "multiProducts/getSelectedProductThunk",
11
- async ({ productId: s, productName: t }, { rejectWithValue: e }) => {
12
- try {
13
- return await n({ productId: s, productName: t });
14
- } catch (r) {
15
- return console.error(r.message), e(r.message);
16
- }
17
- }
18
- );
19
- export {
20
- d as getProductListThunk,
21
- g as getSelectedProductThunk
22
- };
@@ -1,6 +0,0 @@
1
- const e = {
2
- MATERIAL: "material"
3
- };
4
- export {
5
- e as ETypeComponent
6
- };
@@ -1,45 +0,0 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useState as u, useEffect as d } from "react";
3
- import { useAppDispatch as h, useAppSelector as r } from "../../../../app/store/store.js";
4
- import { MultiSelect as C } from "../../../../shared/ui/MultiSelect/MultiSelect.js";
5
- import { getMaterialSelectStateFilters as g, getAllMaterialValues as S } from "../../model/selectors.js";
6
- import { setMaterialSelect as w } from "../../model/swatchesSlice.js";
7
- const v = () => {
8
- const s = h(), i = r(g), o = r(S), [m, p] = u([]);
9
- d(() => {
10
- if (o?.length) {
11
- const e = [
12
- ...new Set(
13
- o.map((t) => t?.metadata?.Color).filter(Boolean).map((t) => t.split(",").map((l) => l.trim())).flat()
14
- )
15
- ].map((t) => {
16
- const l = o.filter(
17
- (a) => a.metadata?.Color && a.metadata?.Color.split(",").map((c) => c.trim()).includes(t)
18
- ).length;
19
- return {
20
- value: t,
21
- label: t,
22
- count: l
23
- };
24
- });
25
- e?.length && p(e);
26
- }
27
- }, [o]);
28
- const n = (e, t) => {
29
- s(w({ filterName: e, values: t }));
30
- };
31
- return /* @__PURE__ */ f(
32
- C,
33
- {
34
- options: m,
35
- values: i.Color,
36
- onValueChange: (e) => n("Color", e),
37
- placeholder: "Color",
38
- className: "max-w-[100px] sm:max-w-[auto] sm:min-w-[160px]",
39
- dropdownWidth: "w-80"
40
- }
41
- );
42
- };
43
- export {
44
- v as ColorsFilter
45
- };
@@ -1,45 +0,0 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useState as u, useEffect as d } from "react";
3
- import { useAppDispatch as h, useAppSelector as s } from "../../../../app/store/store.js";
4
- import { MultiSelect as k } from "../../../../shared/ui/MultiSelect/MultiSelect.js";
5
- import { getMaterialSelectStateFilters as L, getAllMaterialValues as g } from "../../model/selectors.js";
6
- import { setMaterialSelect as S } from "../../model/swatchesSlice.js";
7
- const V = () => {
8
- const r = h(), i = s(L), o = s(g), [m, p] = u([]);
9
- d(() => {
10
- if (o?.length) {
11
- const e = [
12
- ...new Set(
13
- o.map((t) => t?.metadata?.Look).filter(Boolean).map((t) => t.split(",").map((a) => a.trim())).flat()
14
- )
15
- ].map((t) => {
16
- const a = o.filter(
17
- (l) => l.metadata?.Look && l.metadata?.Look.split(",").map((c) => c.trim()).includes(t)
18
- ).length;
19
- return {
20
- value: t,
21
- label: t,
22
- count: a
23
- };
24
- });
25
- e?.length && p(e);
26
- }
27
- }, [o]);
28
- const n = (e, t) => {
29
- r(S({ filterName: e, values: t }));
30
- };
31
- return /* @__PURE__ */ f(
32
- k,
33
- {
34
- options: m,
35
- values: i.Look,
36
- onValueChange: (e) => n("Look", e),
37
- placeholder: "Look",
38
- className: "max-w-[100px] sm:max-w-[auto] sm:min-w-[160px]",
39
- dropdownWidth: "w-80"
40
- }
41
- );
42
- };
43
- export {
44
- V as LooksFilter
45
- };