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.
- package/dist/assets/SwatchesModule.css +1 -0
- package/dist/components/SwatchesModule.js +23440 -24
- package/dist/components/Test.js +5 -0
- package/dist/lib/components/Test.d.ts +1 -0
- package/dist/main.js +0 -1
- package/dist/{src/shared/constants/props.js → rootReducer-BqfJd5QI.js} +1913 -3
- package/dist/store/LibraryProvider.js +3 -4
- package/dist/store/rootReducer.js +2 -10
- package/dist/store/store.js +5 -15
- package/dist/store-BZ_1BK_I.js +382 -0
- package/package.json +1 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/index.js +0 -7
- package/dist/_virtual/index2.js +0 -7
- package/dist/_virtual/index3.js +0 -4
- package/dist/_virtual/use-sync-external-store-with-selector.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-with-selector.production.js +0 -4
- package/dist/_virtual/utilities.js +0 -4
- package/dist/_virtual/with-selector.js +0 -5
- package/dist/_virtual/with-selector2.js +0 -4
- package/dist/assets/src/shared/ui/CustomSidebar/CustomSidebar.module.css +0 -1
- package/dist/assets/src/shared/ui/Markdown/MDWithAccordion.module.css +0 -1
- package/dist/assets/styles/index.css +0 -0
- package/dist/main.d.ts +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -527
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -402
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -208
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -136
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -130
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -251
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -68
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -256
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -13
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -231
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -219
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -36
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -52
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -8
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -27
- package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +0 -877
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +0 -35
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +0 -497
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +0 -52
- package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +0 -62
- package/dist/node_modules/@ungap/structured-clone/esm/index.js +0 -11
- package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +0 -106
- package/dist/node_modules/@ungap/structured-clone/esm/types.js +0 -13
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
- package/dist/node_modules/bail/index.js +0 -7
- package/dist/node_modules/clsx/dist/clsx.js +0 -17
- package/dist/node_modules/comma-separated-tokens/index.js +0 -20
- package/dist/node_modules/decode-named-character-reference/index.dom.js +0 -14
- package/dist/node_modules/devlop/lib/default.js +0 -8
- package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +0 -7
- package/dist/node_modules/extend/index.js +0 -43
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -7
- package/dist/node_modules/hast-util-from-parse5/lib/index.js +0 -145
- package/dist/node_modules/hast-util-parse-selector/lib/index.js +0 -20
- package/dist/node_modules/hast-util-raw/lib/index.js +0 -217
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +0 -302
- package/dist/node_modules/hast-util-to-parse5/lib/index.js +0 -118
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.js +0 -12
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.js +0 -61
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.js +0 -33
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.js +0 -368
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.js +0 -6
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.js +0 -566
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.js +0 -22
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.js +0 -27
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.js +0 -23
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.js +0 -11
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.js +0 -17
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.js +0 -14
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.js +0 -19
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.js +0 -11
- package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.js +0 -11
- package/dist/node_modules/hast-util-whitespace/lib/index.js +0 -10
- package/dist/node_modules/hastscript/lib/create-h.js +0 -112
- package/dist/node_modules/hastscript/lib/index.js +0 -8
- package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +0 -44
- package/dist/node_modules/html-url-attributes/lib/index.js +0 -26
- package/dist/node_modules/html-void-elements/index.js +0 -25
- package/dist/node_modules/immer/dist/immer.js +0 -467
- package/dist/node_modules/inline-style-parser/index.js +0 -93
- package/dist/node_modules/is-plain-obj/index.js +0 -9
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -40
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -27
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -20
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +0 -12
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -12
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +0 -15
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -19
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +0 -581
- package/dist/node_modules/mdast-util-to-hast/lib/footer.js +0 -90
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +0 -8
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +0 -15
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +0 -28
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +0 -9
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +0 -14
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +0 -10
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +0 -58
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +0 -14
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +0 -19
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +0 -15
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +0 -42
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +0 -21
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +0 -7
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +0 -13
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +0 -21
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +0 -32
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +0 -8
- package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +0 -12
- package/dist/node_modules/mdast-util-to-hast/lib/index.js +0 -10
- package/dist/node_modules/mdast-util-to-hast/lib/revert.js +0 -13
- package/dist/node_modules/mdast-util-to-hast/lib/state.js +0 -104
- package/dist/node_modules/mdast-util-to-string/lib/index.js +0 -29
- package/dist/node_modules/micromark/lib/constructs.js +0 -85
- package/dist/node_modules/micromark/lib/create-tokenizer.js +0 -223
- package/dist/node_modules/micromark/lib/initialize/content.js +0 -37
- package/dist/node_modules/micromark/lib/initialize/document.js +0 -126
- package/dist/node_modules/micromark/lib/initialize/flow.js +0 -33
- package/dist/node_modules/micromark/lib/initialize/text.js +0 -95
- package/dist/node_modules/micromark/lib/parse.js +0 -32
- package/dist/node_modules/micromark/lib/postprocess.js +0 -9
- package/dist/node_modules/micromark/lib/preprocess.js +0 -39
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +0 -83
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +0 -43
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +0 -18
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +0 -42
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +0 -17
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +0 -30
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +0 -94
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +0 -43
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +0 -45
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +0 -50
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +0 -80
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +0 -17
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +0 -46
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +0 -144
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +0 -102
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +0 -152
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +0 -22
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +0 -19
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +0 -14
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +0 -90
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +0 -57
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +0 -25
- package/dist/node_modules/micromark-factory-destination/index.js +0 -31
- package/dist/node_modules/micromark-factory-label/index.js +0 -28
- package/dist/node_modules/micromark-factory-space/index.js +0 -15
- package/dist/node_modules/micromark-factory-title/index.js +0 -26
- package/dist/node_modules/micromark-factory-whitespace/index.js +0 -12
- package/dist/node_modules/micromark-util-character/index.js +0 -39
- package/dist/node_modules/micromark-util-chunked/index.js +0 -16
- package/dist/node_modules/micromark-util-classify-character/index.js +0 -10
- package/dist/node_modules/micromark-util-combine-extensions/index.js +0 -36
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +0 -16
- package/dist/node_modules/micromark-util-decode-string/index.js +0 -18
- package/dist/node_modules/micromark-util-html-tag-name/index.js +0 -68
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +0 -6
- package/dist/node_modules/micromark-util-resolve-all/index.js +0 -12
- package/dist/node_modules/micromark-util-sanitize-uri/index.js +0 -23
- package/dist/node_modules/micromark-util-subtokenize/index.js +0 -55
- package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +0 -175
- package/dist/node_modules/parse5/dist/common/doctype.js +0 -98
- package/dist/node_modules/parse5/dist/common/error-codes.js +0 -7
- package/dist/node_modules/parse5/dist/common/foreign-content.js +0 -210
- package/dist/node_modules/parse5/dist/common/html.js +0 -250
- package/dist/node_modules/parse5/dist/common/token.js +0 -14
- package/dist/node_modules/parse5/dist/common/unicode.js +0 -73
- package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +0 -84
- package/dist/node_modules/parse5/dist/parser/index.js +0 -2271
- package/dist/node_modules/parse5/dist/parser/open-element-stack.js +0 -240
- package/dist/node_modules/parse5/dist/serializer/index.js +0 -2
- package/dist/node_modules/parse5/dist/tokenizer/index.js +0 -1940
- package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -88
- package/dist/node_modules/parse5/dist/tree-adapters/default.js +0 -162
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +0 -38
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.js +0 -245
- package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -7
- package/dist/node_modules/property-information/index.js +0 -12
- package/dist/node_modules/property-information/lib/aria.js +0 -61
- package/dist/node_modules/property-information/lib/find.js +0 -33
- package/dist/node_modules/property-information/lib/hast-to-react.js +0 -22
- package/dist/node_modules/property-information/lib/html.js +0 -368
- package/dist/node_modules/property-information/lib/normalize.js +0 -6
- package/dist/node_modules/property-information/lib/svg.js +0 -566
- package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
- package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
- package/dist/node_modules/property-information/lib/util/create.js +0 -19
- package/dist/node_modules/property-information/lib/util/defined-info.js +0 -36
- package/dist/node_modules/property-information/lib/util/info.js +0 -28
- package/dist/node_modules/property-information/lib/util/merge.js +0 -10
- package/dist/node_modules/property-information/lib/util/schema.js +0 -21
- package/dist/node_modules/property-information/lib/util/types.js +0 -14
- package/dist/node_modules/property-information/lib/xlink.js +0 -19
- package/dist/node_modules/property-information/lib/xml.js +0 -11
- package/dist/node_modules/property-information/lib/xmlns.js +0 -11
- package/dist/node_modules/react-markdown/lib/index.js +0 -102
- package/dist/node_modules/react-redux/dist/react-redux.js +0 -246
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -68
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -71
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -25
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -30
- package/dist/node_modules/redux/dist/redux.js +0 -258
- package/dist/node_modules/redux-thunk/dist/redux-thunk.js +0 -8
- package/dist/node_modules/rehype-raw/lib/index.js +0 -12
- package/dist/node_modules/remark-parse/lib/index.js +0 -19
- package/dist/node_modules/remark-rehype/lib/index.js +0 -18
- package/dist/node_modules/reselect/dist/reselect.js +0 -244
- package/dist/node_modules/space-separated-tokens/index.js +0 -11
- package/dist/node_modules/style-to-js/cjs/index.js +0 -20
- package/dist/node_modules/style-to-js/cjs/utilities.js +0 -19
- package/dist/node_modules/style-to-object/cjs/index.js +0 -28
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2731
- package/dist/node_modules/trim-lines/index.js +0 -28
- package/dist/node_modules/trough/lib/index.js +0 -60
- package/dist/node_modules/tslib/tslib.es6.js +0 -27
- package/dist/node_modules/unified/lib/callable-instance.js +0 -25
- package/dist/node_modules/unified/lib/index.js +0 -529
- package/dist/node_modules/unist-util-is/lib/index.js +0 -84
- package/dist/node_modules/unist-util-position/lib/index.js +0 -23
- package/dist/node_modules/unist-util-stringify-position/lib/index.js +0 -15
- package/dist/node_modules/unist-util-visit/lib/index.js +0 -16
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +0 -6
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +0 -56
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -6
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -26
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -25
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -18
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -67
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -66
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -65
- package/dist/node_modules/use-sync-external-store/with-selector.js +0 -10
- package/dist/node_modules/vfile/lib/index.js +0 -406
- package/dist/node_modules/vfile/lib/minpath.browser.js +0 -112
- package/dist/node_modules/vfile/lib/minproc.browser.js +0 -7
- package/dist/node_modules/vfile/lib/minurl.browser.js +0 -41
- package/dist/node_modules/vfile/lib/minurl.shared.js +0 -7
- package/dist/node_modules/vfile-location/lib/index.js +0 -42
- package/dist/node_modules/vfile-message/lib/index.js +0 -91
- package/dist/node_modules/web-namespaces/index.js +0 -11
- package/dist/node_modules/zwitch/index.js +0 -18
- package/dist/src/app/assets/images/product_thumb.png.js +0 -4
- package/dist/src/app/assets/svg/ArrowIconSVG.js +0 -25
- package/dist/src/app/assets/svg/CheckMarkIconSVG.js +0 -25
- package/dist/src/app/assets/svg/CloseIconSVG.js +0 -25
- package/dist/src/app/assets/svg/MinusIconSVG.js +0 -24
- package/dist/src/app/assets/svg/PlusIconSVG.js +0 -24
- package/dist/src/app/assets/svg/SearchIconSVG.js +0 -37
- package/dist/src/app/assets/svg/TrashIconSVG.js +0 -24
- package/dist/src/app/store/rootReducer.js +0 -12
- package/dist/src/app/store/store.js +0 -14
- package/dist/src/features/Cart/lib/CartCervices.js +0 -8
- package/dist/src/features/Cart/model/cartSlice.js +0 -58
- package/dist/src/features/Cart/model/selectors.js +0 -18
- package/dist/src/features/Cart/ui/CartHeader/CartHeader.js +0 -53
- package/dist/src/features/Cart/ui/CartList/CartList.js +0 -29
- package/dist/src/features/Cart/ui/CartListItem/CartListItem.js +0 -41
- package/dist/src/features/Cart/ui/CartPrice/CartPrice.js +0 -23
- package/dist/src/features/Cart/ui/CartWrapper/CartWrapper.js +0 -38
- package/dist/src/features/Cart/ui/Counter/Counter.js +0 -46
- package/dist/src/features/DataAdapter/lib/DataAdapterServices.js +0 -102
- package/dist/src/features/DataAdapter/utils/types.js +0 -8
- package/dist/src/features/MultiProduct/lib/MultiProductCartServices.js +0 -34
- package/dist/src/features/MultiProduct/model/API/api.js +0 -18
- package/dist/src/features/MultiProduct/model/multiProductCartSlice.js +0 -83
- package/dist/src/features/MultiProduct/model/selectors.js +0 -7
- package/dist/src/features/MultiProduct/ui/CartSelectedProductList/CartSelectedProductList.js +0 -21
- package/dist/src/features/MultiProduct/ui/CustomModal/CustomModal.js +0 -28
- package/dist/src/features/MultiProduct/ui/FiltersSelectedProductItem/FiltersSelectedProductItem.js +0 -27
- package/dist/src/features/MultiProduct/ui/MultiProductCartHeader/MultiProductCartHeader.js +0 -60
- package/dist/src/features/MultiProduct/ui/MultiProductItemCart/MultiProductItemCart.js +0 -71
- package/dist/src/features/MultiProduct/ui/MultiProductWrapper/MultiProductWrapper.js +0 -19
- package/dist/src/features/MultiProduct/ui/ProductList/ProductList.js +0 -138
- package/dist/src/features/MultiProduct/ui/ProductListItem/ProductListItem.js +0 -51
- package/dist/src/features/MultiProduct/ui/SelectedProductItem/SelectedProductItem.js +0 -55
- package/dist/src/features/MultiProduct/ui/SwatchContentContainer/SwatchContentContainer.js +0 -46
- package/dist/src/features/MultiProduct/utils/constants.js +0 -16
- package/dist/src/features/MultiProduct/utils/randomList.js +0 -41
- package/dist/src/features/swatches/lib/AttributeHelper.js +0 -21
- package/dist/src/features/swatches/lib/SwatchesServices.js +0 -54
- package/dist/src/features/swatches/model/selectors.js +0 -12
- package/dist/src/features/swatches/model/swatchesSlice.js +0 -108
- package/dist/src/features/swatches/model/thunks.js +0 -22
- package/dist/src/features/swatches/model/types.js +0 -6
- package/dist/src/features/swatches/ui/Filters/ColorsFilter.js +0 -45
- package/dist/src/features/swatches/ui/Filters/LooksFilter.js +0 -45
- package/dist/src/features/swatches/ui/Filters/MaterialsFilter.js +0 -47
- package/dist/src/features/swatches/ui/Filters/index.js +0 -12
- package/dist/src/features/swatches/ui/HexGridZoom/HexGridZoom.js +0 -50
- package/dist/src/features/swatches/ui/ImageGridZoom/ImageGridZoom.js +0 -45
- package/dist/src/features/swatches/ui/MaterialList/index.js +0 -39
- package/dist/src/features/swatches/ui/MaterialListItem/MaterialListItem.js +0 -51
- package/dist/src/features/swatches/ui/ProductElement/index.js +0 -65
- package/dist/src/features/swatches/ui/SwatchWrapper/SwatchWrapper.js +0 -62
- package/dist/src/features/swatches/ui/Swatches.js +0 -51
- package/dist/src/features/swatches/ui/SwatchesList/SwatchesList.js +0 -67
- package/dist/src/features/swatches/utils/constants.js +0 -8
- package/dist/src/shared/constants/selectedMaterials.js +0 -4
- package/dist/src/shared/types/activeTab.js +0 -7
- package/dist/src/shared/ui/Checkbox/Checkbox.js +0 -31
- package/dist/src/shared/ui/CustomButton/CustomButton.js +0 -16
- package/dist/src/shared/ui/CustomSidebar/CustomSidebar.js +0 -59
- package/dist/src/shared/ui/CustomSidebar/CustomSidebar.module.scss.js +0 -13
- package/dist/src/shared/ui/Dialog/Dialog.js +0 -81
- package/dist/src/shared/ui/Label/Label.js +0 -27
- package/dist/src/shared/ui/Markdown/MDWithAccordion.js +0 -36
- package/dist/src/shared/ui/Markdown/MDWithAccordion.module.scss.js +0 -9
- package/dist/src/shared/ui/MaterialItem/MaterialItem.js +0 -36
- package/dist/src/shared/ui/MultiSelect/MultiSelect.js +0 -150
- package/dist/src/shared/ui/PopoverTooltip/InfoIcon.js +0 -35
- package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.js +0 -37
- package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.module.scss.js +0 -4
- package/dist/src/shared/ui/Slider/Slider.js +0 -117
- package/dist/src/shared/utils/cn.js +0 -8
- package/dist/src/shared/utils/uniqueList.js +0 -4
- /package/dist/{components → lib/components}/SwatchesModule.d.ts +0 -0
- /package/dist/{store → lib/store}/LibraryProvider.d.ts +0 -0
- /package/dist/{store → lib/store}/rootReducer.d.ts +0 -0
- /package/dist/{store → lib/store}/store.d.ts +0 -0
- /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,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
|
-
};
|