@ubnt/store.core 9.29.0-alpha.10 → 9.29.0-alpha.11

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 (91) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/assets/close.svg +4 -1
  3. package/lib/assets/close2.svg +2 -3
  4. package/lib/assets/close3.svg +1 -3
  5. package/lib/assets/icons/wizard/plus.svg.js +1 -1
  6. package/lib/assets/icons/wizard/plus.svg.mjs +2 -2
  7. package/lib/assets/pause.svg +3 -3
  8. package/lib/assets/pause2.svg +3 -3
  9. package/lib/assets/plus.svg +4 -22
  10. package/lib/assets/plus2.svg +22 -4
  11. package/lib/assets/udmPro.jpg +0 -0
  12. package/lib/assets/udmPro2.jpg +0 -0
  13. package/lib/assets/udmProMax.jpg +0 -0
  14. package/lib/assets/udmProMax2.jpg +0 -0
  15. package/lib/assets/udmProSpecial.jpg +0 -0
  16. package/lib/assets/udmProSpecial2.jpg +0 -0
  17. package/lib/components/CustomImage/CustomImage.js +1 -1
  18. package/lib/components/CustomImage/CustomImage.mjs +1 -1
  19. package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.js +1 -1
  20. package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.mjs +1 -1
  21. package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
  22. package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
  23. package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
  24. package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
  25. package/lib/components/FeaturesSection_deprecated/assets/plus.svg.js +1 -1
  26. package/lib/components/FeaturesSection_deprecated/assets/plus.svg.mjs +2 -2
  27. package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
  28. package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
  29. package/lib/components/Header/CartModalV2/CartModal.js +1 -1
  30. package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
  31. package/lib/components/Header/Header.js +1 -1
  32. package/lib/components/Header/Header.mjs +1 -1
  33. package/lib/components/LandingPageSidebar/LandingPageSidebar.js +1 -1
  34. package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +1 -1
  35. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
  36. package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
  37. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
  38. package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
  39. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
  40. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
  41. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
  42. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
  43. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
  44. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
  45. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
  46. package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
  47. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
  48. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
  49. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
  50. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
  51. package/lib/components/ModelCompareV3/data/CloudGateways.js +9 -9
  52. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +6 -6
  53. package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
  54. package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
  55. package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
  56. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
  57. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
  58. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
  59. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js +17 -22
  60. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.js.map +1 -1
  61. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs +17 -22
  62. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.mjs.map +1 -1
  63. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.d.ts +1 -2
  64. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js +7 -9
  65. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.js.map +1 -1
  66. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs +7 -9
  67. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.styles.mjs.map +1 -1
  68. package/lib/components/ProductTechSpecsV2/ProductTechSpecs.types.d.ts +4 -9
  69. package/lib/components/ProductWizard/ProductWizard.js +1 -1
  70. package/lib/components/ProductWizard/ProductWizard.mjs +1 -1
  71. package/lib/components/QuantityInput/QuantityInput.js +1 -1
  72. package/lib/components/QuantityInput/QuantityInput.mjs +1 -1
  73. package/lib/components/Search/Input/Input.js +1 -1
  74. package/lib/components/Search/Input/Input.mjs +1 -1
  75. package/lib/components/VideoPlayerNew/VideoPlayer.js +2 -2
  76. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +2 -2
  77. package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
  78. package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
  79. package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
  80. package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
  81. package/lib/constants/icons/generic/close.svg.js +1 -1
  82. package/lib/constants/icons/generic/close.svg.mjs +2 -2
  83. package/lib/constants/icons/generic/index.js +1 -1
  84. package/lib/constants/icons/generic/index.mjs +1 -1
  85. package/lib/constants/icons/options/colors/black.svg.js +5 -5
  86. package/lib/constants/icons/options/colors/index.js +3 -3
  87. package/lib/constants/icons/options/styles/black.svg.js +5 -5
  88. package/lib/constants/icons/options/styles/index.js +3 -3
  89. package/lib/constants/optionIcons.js +6 -6
  90. package/lib/constants/optionIcons.mjs +4 -4
  91. package/package.json +1 -1
@@ -20,9 +20,9 @@ import { throughput } from './properties/throughput.mjs';
20
20
  import { unifiAppSuite } from './properties/unifiAppSuite.mjs';
21
21
  import { unifiDevices } from './properties/unifiDevices.mjs';
22
22
  import { wanPorts } from './properties/wanPorts.mjs';
23
- import _externalAssets_CMbJW0VT__default from "../../../assets/udmProMax2.jpg";
24
- import _externalAssets_CCo8CEpV__default from "../../../assets/udmPro2.jpg";
25
- import _externalAssets_CBGnWxM$__default from "../../../assets/udmProSpecial2.jpg";
23
+ import _externalAssets_CmLfPohF__default from "../../../assets/udmProMax.jpg";
24
+ import _externalAssets_pESvYnSE__default from "../../../assets/udmPro.jpg";
25
+ import _externalAssets_BUotdZNw__default from "../../../assets/udmProSpecial.jpg";
26
26
  import image__default from "../../../assets/udw2.jpg";
27
27
  import _externalAssets_ReJhRoVe__default from "../../../assets/ucgMax2.jpg";
28
28
  import _externalAssets_sWF40Ihh__default from "../../../assets/ucgUltra2.jpg";
@@ -41,18 +41,18 @@ const efg = {
41
41
  const udmProMax = {
42
42
  ...udmProMax$1,
43
43
  description: "udmProMax.customDescription",
44
- image: getImage(_externalAssets_CMbJW0VT__default)
44
+ image: getImage(_externalAssets_CmLfPohF__default)
45
45
  };
46
46
  const udmPro = {
47
47
  ...udmPro$1,
48
48
  description: "udmPro.customDescription",
49
- image: getImage(_externalAssets_CCo8CEpV__default)
49
+ image: getImage(_externalAssets_pESvYnSE__default)
50
50
  };
51
51
  const udmProSpecial = {
52
52
  ...udmProSpecial$1,
53
53
  title: "udmProSpecial.customTitle",
54
54
  description: "udmProSpecial.customDescription",
55
- image: getImage(_externalAssets_CBGnWxM$__default)
55
+ image: getImage(_externalAssets_BUotdZNw__default)
56
56
  };
57
57
  const udw = {
58
58
  ...udw$1,
@@ -20,7 +20,7 @@ var unifiDevices = require('../properties/unifiDevices.js');
20
20
  var unifiPowerBackup = require('../properties/unifiPowerBackup.js');
21
21
  var wanPorts = require('../properties/wanPorts.js');
22
22
  var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
23
- var image = require("../../../../assets/udmPro.jpg");
23
+ var image = require("../../../../assets/udmPro2.jpg");
24
24
  var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
25
25
  var applications = require("../../../../assets/applications.svg");
26
26
  var nextAiInspection = require('../properties/nextAiInspection.js');
@@ -18,7 +18,7 @@ import { unifiDevices } from '../properties/unifiDevices.mjs';
18
18
  import { unifiPowerBackup } from '../properties/unifiPowerBackup.mjs';
19
19
  import { wanPorts } from '../properties/wanPorts.mjs';
20
20
  import { UniFiCategoryId, UniFiCategorySlug } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
21
- import image__default from "../../../../assets/udmPro.jpg";
21
+ import image__default from "../../../../assets/udmPro2.jpg";
22
22
  import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
23
23
  import applications__default from "../../../../assets/applications.svg";
24
24
  import { nextAiInspection } from '../properties/nextAiInspection.mjs';
@@ -8,7 +8,7 @@ require('../../assets/applications.svg.js');
8
8
  require('../../assets/Consoles/udmProMax.jpg.js');
9
9
  require('../properties/index.js');
10
10
  var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
11
- var image = require("../../../../assets/udmProMax.jpg");
11
+ var image = require("../../../../assets/udmProMax2.jpg");
12
12
  var unifiAppSuite = require('../properties/unifiAppSuite.js');
13
13
  var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
14
14
  var applications = require("../../../../assets/applications.svg");
@@ -6,7 +6,7 @@ import '../../assets/applications.svg.mjs';
6
6
  import '../../assets/Consoles/udmProMax.jpg.mjs';
7
7
  import '../properties/index.mjs';
8
8
  import { UniFiCategoryId, UniFiCategorySlug } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
9
- import image__default from "../../../../assets/udmProMax.jpg";
9
+ import image__default from "../../../../assets/udmProMax2.jpg";
10
10
  import { unifiAppSuite } from '../properties/unifiAppSuite.mjs';
11
11
  import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
12
12
  import applications__default from "../../../../assets/applications.svg";
@@ -20,7 +20,7 @@ var unifiDevices = require('../properties/unifiDevices.js');
20
20
  var unifiPowerBackup = require('../properties/unifiPowerBackup.js');
21
21
  var wanPorts = require('../properties/wanPorts.js');
22
22
  var unifi = require('../../../../constants/proStoreCategories/mapping/unifi.js');
23
- var image = require("../../../../assets/udmProSpecial.jpg");
23
+ var image = require("../../../../assets/udmProSpecial2.jpg");
24
24
  var StyleableSvgImage = require('../../../StyleableSvgImage/StyleableSvgImage.js');
25
25
  var applications = require("../../../../assets/applications.svg");
26
26
  var nextAiInspection = require('../properties/nextAiInspection.js');
@@ -18,7 +18,7 @@ import { unifiDevices } from '../properties/unifiDevices.mjs';
18
18
  import { unifiPowerBackup } from '../properties/unifiPowerBackup.mjs';
19
19
  import { wanPorts } from '../properties/wanPorts.mjs';
20
20
  import { UniFiCategoryId, UniFiCategorySlug } from '../../../../constants/proStoreCategories/mapping/unifi.mjs';
21
- import image__default from "../../../../assets/udmProSpecial.jpg";
21
+ import image__default from "../../../../assets/udmProSpecial2.jpg";
22
22
  import { StyleableSvgImage } from '../../../StyleableSvgImage/StyleableSvgImage.mjs';
23
23
  import applications__default from "../../../../assets/applications.svg";
24
24
  import { nextAiInspection } from '../properties/nextAiInspection.mjs';
@@ -13,48 +13,45 @@ var React__default = /*#__PURE__*/_interopDefault(React);
13
13
  const ProductTechSpecs = ({
14
14
  sections
15
15
  }) => {
16
- console.log(sections);
17
16
  const renderFeatureValue = React.useCallback(value => {
18
17
  const lines = value.split("\n");
19
18
  return /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Cell, {
20
- $type: "value",
21
19
  children: lines.map((line, i) => /* @__PURE__ */jsxRuntime.jsxs(React__default["default"].Fragment, {
22
20
  children: [i > 0 && /* @__PURE__ */jsxRuntime.jsx("br", {}), line]
23
21
  }, i))
24
22
  });
25
23
  }, []);
26
- console.log("sections", sections);
27
24
  const parsedSections = React.useMemo(() => {
28
25
  return sections.map(section => {
29
26
  const {
30
27
  withParentId,
31
28
  withoutParentId
32
- } = section.features.reduce((acc, item) => {
33
- if (item.feature.parentId === null) {
34
- acc.withoutParentId.push(item);
29
+ } = section.features.reduce((acc, feature) => {
30
+ if (feature.parentId === null) {
31
+ acc.withoutParentId.push(feature);
35
32
  } else {
36
- acc.withParentId.push(item);
33
+ acc.withParentId.push(feature);
37
34
  }
38
35
  return acc;
39
36
  }, {
40
37
  withParentId: [],
41
38
  withoutParentId: []
42
39
  });
43
- const features = withoutParentId.map(parentItem => {
44
- const children = withParentId.filter(childItem => childItem.feature.parentId === parentItem.feature.id);
40
+ const features = withoutParentId.map(parentFeature => {
41
+ const children = withParentId.filter(childFeature => childFeature.parentId === parentFeature.id);
45
42
  return {
46
- ...parentItem,
43
+ ...parentFeature,
47
44
  children
48
45
  };
49
46
  });
50
47
  return {
51
- id: section.section.id,
52
- label: section.section.label,
48
+ id: section.id,
49
+ label: section.label,
53
50
  features
54
51
  };
55
52
  });
56
53
  }, [sections]);
57
- console.log("parsedSections", parsedSections);
54
+ console.log(parsedSections);
58
55
  return /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Wrap, {
59
56
  children: parsedSections.map((section, i) => /* @__PURE__ */jsxRuntime.jsxs(React__default["default"].Fragment, {
60
57
  children: [i > 0 && /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.SectionDivider, {}), /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Row, {
@@ -64,19 +61,17 @@ const ProductTechSpecs = ({
64
61
  }), section.features.map(feature => /* @__PURE__ */jsxRuntime.jsxs(React__default["default"].Fragment, {
65
62
  children: [/* @__PURE__ */jsxRuntime.jsxs(ProductTechSpecs_styles.Row, {
66
63
  children: [/* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Cell, {
67
- $type: "key",
68
- children: feature.feature.label
64
+ children: feature.label
69
65
  }), feature.value && renderFeatureValue(feature.value)]
70
- }, feature.feature.id), feature.children.length > 0 && feature.children.map((child, i2) => /* @__PURE__ */jsxRuntime.jsxs(ProductTechSpecs_styles.Row, {
66
+ }, feature.id), feature.children.length > 0 && feature.children.map((childFeature, i2) => /* @__PURE__ */jsxRuntime.jsxs(ProductTechSpecs_styles.Row, {
71
67
  children: [/* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Tree, {
72
68
  $isLast: i2 === feature.children.length - 1
73
69
  }), /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Branch, {}), /* @__PURE__ */jsxRuntime.jsx(ProductTechSpecs_styles.Cell, {
74
- $type: "key",
75
- $isChildCell: true,
76
- children: child.feature.label
77
- }), child.value && renderFeatureValue(child.value)]
78
- }, child.feature.id))]
79
- }, feature.feature.id))]
70
+ $isChildRowFirstCell: true,
71
+ children: childFeature.label
72
+ }), childFeature.value && renderFeatureValue(childFeature.value)]
73
+ }, childFeature.id))]
74
+ }, feature.id))]
80
75
  }, section.id))
81
76
  });
82
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductTechSpecs.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport * as S from \"./ProductTechSpecs.styles\";\nimport type { ProductTechSpecsProps } from \"./ProductTechSpecs.types\";\n\nexport const ProductTechSpecs = ({\n sections,\n}: ProductTechSpecsProps): JSX.Element => {\n console.log(sections);\n /**\n * Break value into lines\n */\n const renderFeatureValue = useCallback((value: string): JSX.Element => {\n const lines = value.split(\"\\n\");\n return (\n <S.Cell $type=\"value\">\n {lines.map((line, i) => (\n <React.Fragment key={i}>\n {i > 0 && <br />}\n {line}\n </React.Fragment>\n ))}\n </S.Cell>\n );\n }, []);\n\n console.log(\"sections\", sections);\n const parsedSections = useMemo(() => {\n return sections.map((section) => {\n const { withParentId, withoutParentId } = section.features.reduce<{\n withParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n withoutParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n }>(\n (acc, item) => {\n if (item.feature.parentId === null) {\n acc.withoutParentId.push(item);\n } else {\n acc.withParentId.push(item);\n }\n return acc;\n },\n { withParentId: [], withoutParentId: [] },\n );\n\n const features = withoutParentId.map((parentItem) => {\n const children = withParentId.filter(\n (childItem) => childItem.feature.parentId === parentItem.feature.id,\n );\n return {\n ...parentItem,\n children,\n };\n });\n\n return {\n id: section.section.id,\n label: section.section.label,\n features,\n };\n });\n }, [sections]);\n\n console.log(\"parsedSections\", parsedSections);\n\n return (\n <S.Wrap>\n {parsedSections.map((section, i) => (\n <React.Fragment key={section.id}>\n {i > 0 && <S.SectionDivider />}\n {/* Section heading */}\n <S.Row>\n <S.Heading>{section.label}</S.Heading>\n </S.Row>\n\n {/* Section feature key value pairs */}\n {section.features.map((feature) => (\n <React.Fragment key={feature.feature.id}>\n <S.Row key={feature.feature.id}>\n <S.Cell $type=\"key\">{feature.feature.label}</S.Cell>\n {feature.value && renderFeatureValue(feature.value)}\n </S.Row>\n\n {/* Child features */}\n {feature.children.length > 0 &&\n feature.children.map((child, i) => (\n <S.Row key={child.feature.id}>\n <S.Tree $isLast={i === feature.children.length - 1} />\n <S.Branch />\n\n <S.Cell $type=\"key\" $isChildCell>\n {child.feature.label}\n </S.Cell>\n {child.value && renderFeatureValue(child.value)}\n </S.Row>\n ))}\n </React.Fragment>\n ))}\n </React.Fragment>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["ProductTechSpecs","sections","console","log","renderFeatureValue","useCallback","value","lines","split","jsx","S.Cell","$type","children","map","line","i","jsxs","React","Fragment","parsedSections","useMemo","section","withParentId","withoutParentId","features","reduce","acc","item","feature","parentId","push","parentItem","filter","childItem","id","label","S.Wrap","Wrap","S.SectionDivider","S.Row","Row","S.Heading","length","child","S.Tree","$isLast","S.Branch","Branch","Cell","$isChildCell"],"mappings":";;;;;;;;;;;;AAKO,MAAMA,mBAAmBA,CAAC;EAC/BC;AACF,CAA0C,KAAA;EACxCC,OAAA,CAAQC,IAAIF,QAAQ,CAAA;EAId,MAAAG,kBAAA,GAAqBC,iBAAY,CAACC,KAA+B,IAAA;IAC/D,MAAAC,KAAA,GAAQD,KAAM,CAAAE,KAAA,CAAM,IAAI,CAAA;IAC9B,OACGC,eAAAA,UAAAA,CAAAA,GAAA,CAAAC,uBAAAA,CAAAA,IAAA,EAAA;MAAOC,OAAM,OACX;MAAAC,QAAA,EAAAL,KAAA,CAAMM,GAAI,CAAA,CAACC,IAAM,EAAAC,CAAA,KACfC,eAAAA,UAAAA,CAAAA,IAAA,CAAAC,cAAAA,CAAAA,SAAAA,CAAA,CAAMC,UAAN;QACEN,QAAA,EAAA,CAAIG,CAAA,GAAA,CAAA,IAAA,8BAAM,IAAG,EAAA,CAAA,CAAA,CAAA,EACbD,IAAA;OAFkB,EAAAC,CAGrB,CACD;IACH,CAAA,CAAA;EAEJ,CAAA,EAAG,EAAE,CAAA;EAEGb,OAAA,CAAAC,GAAA,CAAI,YAAYF,QAAQ,CAAA;EAC1B,MAAAkB,cAAA,GAAiBC,KAAAA,CAAAA,QAAQ,MAAM;IAC5B,OAAAnB,QAAA,CAASY,GAAI,CAACQ,OAAY,IAAA;MAC/B,MAAM;QAAEC,YAAA;QAAcC;MAAgB,CAAA,GAAIF,QAAQG,QAAS,CAAAC,MAAA,CAIzD,CAACC,KAAKC,IAAS,KAAA;QACT,IAAAA,IAAA,CAAKC,OAAQ,CA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qC,KAAA,CAAMf,OAAQ,CAAAM,EAQ1B,CACD,CAAA;MAlBgB,CAAA,EAAAN,OAAA,CAAQA,OAAQ,CAAAM,EAmBrC,CACD,CAAA;IA7BkB,CAAA,EAAAb,OAAA,CAAQa,EA8B7B,CACD;EACH,CAAA,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"ProductTechSpecs.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport * as S from \"./ProductTechSpecs.styles\";\nimport type { ProductTechSpecsProps } from \"./ProductTechSpecs.types\";\n\nexport const ProductTechSpecs = ({\n sections,\n}: ProductTechSpecsProps): JSX.Element => {\n /**\n * Break value into lines\n */\n const renderFeatureValue = useCallback((value: string): JSX.Element => {\n const lines = value.split(\"\\n\");\n return (\n <S.Cell>\n {lines.map((line, i) => (\n <React.Fragment key={i}>\n {i > 0 && <br />}\n {line}\n </React.Fragment>\n ))}\n </S.Cell>\n );\n }, []);\n\n const parsedSections = useMemo(() => {\n return sections.map((section) => {\n const { withParentId, withoutParentId } = section.features.reduce<{\n withParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n withoutParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n }>(\n (acc, feature) => {\n if (feature.parentId === null) {\n acc.withoutParentId.push(feature);\n } else {\n acc.withParentId.push(feature);\n }\n return acc;\n },\n { withParentId: [], withoutParentId: [] },\n );\n\n const features = withoutParentId.map((parentFeature) => {\n const children = withParentId.filter(\n (childFeature) => childFeature.parentId === parentFeature.id,\n );\n return {\n ...parentFeature,\n children,\n };\n });\n\n return {\n id: section.id,\n label: section.label,\n features,\n };\n });\n }, [sections]);\n\n console.log(parsedSections);\n\n return (\n <S.Wrap>\n {parsedSections.map((section, i) => (\n <React.Fragment key={section.id}>\n {i > 0 && <S.SectionDivider />}\n {/* Section heading */}\n <S.Row>\n <S.Heading>{section.label}</S.Heading>\n </S.Row>\n\n {/* Section feature key value pairs */}\n {section.features.map((feature) => (\n <React.Fragment key={feature.id}>\n <S.Row key={feature.id}>\n <S.Cell>{feature.label}</S.Cell>\n {feature.value && renderFeatureValue(feature.value)}\n </S.Row>\n\n {/* Child features */}\n {feature.children.length > 0 &&\n feature.children.map((childFeature, i) => (\n <S.Row key={childFeature.id}>\n <S.Tree $isLast={i === feature.children.length - 1} />\n <S.Branch />\n\n <S.Cell $isChildRowFirstCell>{childFeature.label}</S.Cell>\n {childFeature.value &&\n renderFeatureValue(childFeature.value)}\n </S.Row>\n ))}\n </React.Fragment>\n ))}\n </React.Fragment>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["ProductTechSpecs","sections","renderFeatureValue","useCallback","value","lines","split","jsx","S.Cell","Cell","children","map","line","i","jsxs","React","Fragment","parsedSections","useMemo","section","withParentId","withoutParentId","features","reduce","acc","feature","parentId","push","parentFeature","filter","childFeature","id","label","console","log","S.Wrap","Wrap","S.SectionDivider","S.Row","Row","S.Heading","length","S.Tree","$isLast","S.Branch","Branch","$isChildRowFirstCell"],"mappings":";;;;;;;;;;;;AAKO,MAAMA,mBAAmBA,CAAC;EAC/BC;AACF,CAA0C,KAAA;EAIlC,MAAAC,kBAAA,GAAqBC,iBAAY,CAACC,KAA+B,IAAA;IAC/D,MAAAC,KAAA,GAAQD,KAAM,CAAAE,KAAA,CAAM,IAAI,CAAA;IAC9B,OAAA,eACGC,UAAA,CAAAA,GAAA,CAAAC,uBAAA,CAAAC,IAAA,EAAA;MACEC,QAAM,EAAAL,KAAA,CAAAM,GAAA,CAAI,CAACC,IAAA,EAAMC,CAChB,KAAA,eAAAC,UAAA,CAAAA,IAAA,CAACC,cAAM,CAAA,SAAA,CAAA,CAAAC,QAAA,EAAN;QACEN,QAAA,EAAA,CAAIG,CAAA,GAAA,CAAA,IAAA,8BAAM,IAAG,EAAA,CAAA,CAAA,CAAA,EACbD,IAAA;OAFkB,EAAAC,CAGrB,CACD;IACH,CAAA,CAAA;EAEJ,CAAA,EA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AAa,CAAA1B,KAAA,IACZF,kBAAmB,CAAA4B,YAAA,CAAa1B,KAAK,CAAA;SAN7B,EAAA0B,YAAA,CAAaC,EAOzB,CACD,CAAA;OAjBgB,EAAAN,OAAA,CAAQM,EAkB7B,CACD,CAAA;IA5BkB,CAAA,EAAAZ,OAAA,CAAQY,EA6B7B,CACD;EACH,CAAA,CAAA;AAEJ,CAAA;"}
@@ -5,48 +5,45 @@ import { Cell, Wrap, SectionDivider, Row, Heading, Tree, Branch } from './Produc
5
5
  const ProductTechSpecs = ({
6
6
  sections
7
7
  }) => {
8
- console.log(sections);
9
8
  const renderFeatureValue = useCallback(value => {
10
9
  const lines = value.split("\n");
11
10
  return /* @__PURE__ */jsx(Cell, {
12
- $type: "value",
13
11
  children: lines.map((line, i) => /* @__PURE__ */jsxs(React.Fragment, {
14
12
  children: [i > 0 && /* @__PURE__ */jsx("br", {}), line]
15
13
  }, i))
16
14
  });
17
15
  }, []);
18
- console.log("sections", sections);
19
16
  const parsedSections = useMemo(() => {
20
17
  return sections.map(section => {
21
18
  const {
22
19
  withParentId,
23
20
  withoutParentId
24
- } = section.features.reduce((acc, item) => {
25
- if (item.feature.parentId === null) {
26
- acc.withoutParentId.push(item);
21
+ } = section.features.reduce((acc, feature) => {
22
+ if (feature.parentId === null) {
23
+ acc.withoutParentId.push(feature);
27
24
  } else {
28
- acc.withParentId.push(item);
25
+ acc.withParentId.push(feature);
29
26
  }
30
27
  return acc;
31
28
  }, {
32
29
  withParentId: [],
33
30
  withoutParentId: []
34
31
  });
35
- const features = withoutParentId.map(parentItem => {
36
- const children = withParentId.filter(childItem => childItem.feature.parentId === parentItem.feature.id);
32
+ const features = withoutParentId.map(parentFeature => {
33
+ const children = withParentId.filter(childFeature => childFeature.parentId === parentFeature.id);
37
34
  return {
38
- ...parentItem,
35
+ ...parentFeature,
39
36
  children
40
37
  };
41
38
  });
42
39
  return {
43
- id: section.section.id,
44
- label: section.section.label,
40
+ id: section.id,
41
+ label: section.label,
45
42
  features
46
43
  };
47
44
  });
48
45
  }, [sections]);
49
- console.log("parsedSections", parsedSections);
46
+ console.log(parsedSections);
50
47
  return /* @__PURE__ */jsx(Wrap, {
51
48
  children: parsedSections.map((section, i) => /* @__PURE__ */jsxs(React.Fragment, {
52
49
  children: [i > 0 && /* @__PURE__ */jsx(SectionDivider, {}), /* @__PURE__ */jsx(Row, {
@@ -56,19 +53,17 @@ const ProductTechSpecs = ({
56
53
  }), section.features.map(feature => /* @__PURE__ */jsxs(React.Fragment, {
57
54
  children: [/* @__PURE__ */jsxs(Row, {
58
55
  children: [/* @__PURE__ */jsx(Cell, {
59
- $type: "key",
60
- children: feature.feature.label
56
+ children: feature.label
61
57
  }), feature.value && renderFeatureValue(feature.value)]
62
- }, feature.feature.id), feature.children.length > 0 && feature.children.map((child, i2) => /* @__PURE__ */jsxs(Row, {
58
+ }, feature.id), feature.children.length > 0 && feature.children.map((childFeature, i2) => /* @__PURE__ */jsxs(Row, {
63
59
  children: [/* @__PURE__ */jsx(Tree, {
64
60
  $isLast: i2 === feature.children.length - 1
65
61
  }), /* @__PURE__ */jsx(Branch, {}), /* @__PURE__ */jsx(Cell, {
66
- $type: "key",
67
- $isChildCell: true,
68
- children: child.feature.label
69
- }), child.value && renderFeatureValue(child.value)]
70
- }, child.feature.id))]
71
- }, feature.feature.id))]
62
+ $isChildRowFirstCell: true,
63
+ children: childFeature.label
64
+ }), childFeature.value && renderFeatureValue(childFeature.value)]
65
+ }, childFeature.id))]
66
+ }, feature.id))]
72
67
  }, section.id))
73
68
  });
74
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductTechSpecs.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport * as S from \"./ProductTechSpecs.styles\";\nimport type { ProductTechSpecsProps } from \"./ProductTechSpecs.types\";\n\nexport const ProductTechSpecs = ({\n sections,\n}: ProductTechSpecsProps): JSX.Element => {\n console.log(sections);\n /**\n * Break value into lines\n */\n const renderFeatureValue = useCallback((value: string): JSX.Element => {\n const lines = value.split(\"\\n\");\n return (\n <S.Cell $type=\"value\">\n {lines.map((line, i) => (\n <React.Fragment key={i}>\n {i > 0 && <br />}\n {line}\n </React.Fragment>\n ))}\n </S.Cell>\n );\n }, []);\n\n console.log(\"sections\", sections);\n const parsedSections = useMemo(() => {\n return sections.map((section) => {\n const { withParentId, withoutParentId } = section.features.reduce<{\n withParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n withoutParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n }>(\n (acc, item) => {\n if (item.feature.parentId === null) {\n acc.withoutParentId.push(item);\n } else {\n acc.withParentId.push(item);\n }\n return acc;\n },\n { withParentId: [], withoutParentId: [] },\n );\n\n const features = withoutParentId.map((parentItem) => {\n const children = withParentId.filter(\n (childItem) => childItem.feature.parentId === parentItem.feature.id,\n );\n return {\n ...parentItem,\n children,\n };\n });\n\n return {\n id: section.section.id,\n label: section.section.label,\n features,\n };\n });\n }, [sections]);\n\n console.log(\"parsedSections\", parsedSections);\n\n return (\n <S.Wrap>\n {parsedSections.map((section, i) => (\n <React.Fragment key={section.id}>\n {i > 0 && <S.SectionDivider />}\n {/* Section heading */}\n <S.Row>\n <S.Heading>{section.label}</S.Heading>\n </S.Row>\n\n {/* Section feature key value pairs */}\n {section.features.map((feature) => (\n <React.Fragment key={feature.feature.id}>\n <S.Row key={feature.feature.id}>\n <S.Cell $type=\"key\">{feature.feature.label}</S.Cell>\n {feature.value && renderFeatureValue(feature.value)}\n </S.Row>\n\n {/* Child features */}\n {feature.children.length > 0 &&\n feature.children.map((child, i) => (\n <S.Row key={child.feature.id}>\n <S.Tree $isLast={i === feature.children.length - 1} />\n <S.Branch />\n\n <S.Cell $type=\"key\" $isChildCell>\n {child.feature.label}\n </S.Cell>\n {child.value && renderFeatureValue(child.value)}\n </S.Row>\n ))}\n </React.Fragment>\n ))}\n </React.Fragment>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["ProductTechSpecs","sections","console","log","renderFeatureValue","useCallback","value","lines","split","jsx","S.Cell","$type","children","map","line","i","jsxs","React","Fragment","parsedSections","useMemo","section","withParentId","withoutParentId","features","reduce","acc","item","feature","parentId","push","parentItem","filter","childItem","id","label","S.Wrap","S.SectionDivider","S.Row","S.Heading","length","child","S.Tree","$isLast","S.Branch","$isChildCell"],"mappings":";;;;AAKO,MAAMA,mBAAmBA,CAAC;EAC/BC;AACF,CAA0C,KAAA;EACxCC,OAAA,CAAQC,IAAIF,QAAQ,CAAA;EAId,MAAAG,kBAAA,GAAqBC,WAAY,CAACC,KAA+B,IAAA;IAC/D,MAAAC,KAAA,GAAQD,KAAM,CAAAE,KAAA,CAAM,IAAI,CAAA;IAC9B,OACG,eAAAC,GAAA,CAAAC,IAAA,EAAA;MAAOC,OAAM,OACX;MAAAC,QAAA,EAAAL,KAAA,CAAMM,GAAI,CAAA,CAACC,IAAM,EAAAC,CAAA,KACf,eAAAC,IAAA,CAAAC,KAAA,CAAMC,UAAN;QACEN,QAAA,EAAA,CAAIG,CAAA,GAAA,CAAA,IAAA,mBAAM,IAAG,EAAA,CAAA,CAAA,CAAA,EACbD,IAAA;OAFkB,EAAAC,CAGrB,CACD;IACH,CAAA,CAAA;EAEJ,CAAA,EAAG,EAAE,CAAA;EAEGb,OAAA,CAAAC,GAAA,CAAI,YAAYF,QAAQ,CAAA;EAC1B,MAAAkB,cAAA,GAAiBC,QAAQ,MAAM;IAC5B,OAAAnB,QAAA,CAASY,GAAI,CAACQ,OAAY,IAAA;MAC/B,MAAM;QAAEC,YAAA;QAAcC;MAAgB,CAAA,GAAIF,QAAQG,QAAS,CAAAC,MAAA,CAIzD,CAACC,KAAKC,IAAS,KAAA;QACT,IAAAA,IAAA,CAAKC,OAAQ,CAAAC,QAAA,KAAa,IAAM,EAAA;UAC9BH,GAAA,CAAAH,eAAA,CAAgBO,KAAKH,IAAI,CAAA;QAAA,CACxB,MAAA;UACDD,GA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AA,EAAA,CAAA,eAAAH,GAAA,CAACC,IAAA,EAAA;YAAOC,OAAM,KAAO;YAAAC,QAAA,EAAAgB,OAAA,CAAQA,QAAQO;WAAM,CAAA,EAC1CP,OAAQ,CAAAtB,KAAA,IAASF,kBAAmB,CAAAwB,OAAA,CAAQtB,KAAK,CAAA;SAFxC,EAAAsB,OAAA,CAAQA,QAAQM,EAG5B,CAAA,EAGCN,OAAQ,CAAAhB,QAAA,CAAS4B,MAAS,GAAA,CAAA,IACzBZ,OAAQ,CAAAhB,QAAA,CAASC,GAAI,CAAA,CAAC4B,KAAO1B,EAAAA,EAAAA,KAAAA,eAC1BC,IAAA,CAAAsB,KAAA;UACC1B,QAAA,EAAA,CAAA,eAACH,GAAA,CAAAiC,MAAA;YAAOC,OAAA,EAAS5B,OAAMa,OAAQ,CAAAhB,QAAA,CAAS4B,SAAS;WAAG,CAAA,EAAA,eACpD/B,GAAA,CAACmC,MAAE,EAAF,EAAS,CAAA,EAEV,eAAAnC,GAAA,CAACC,IAAE,EAAF;YAAOC,KAAA,EAAM;YAAMkC,YAAY,EAAA,IAAA;YAC7BjC,QAAM,EAAA6B,KAAA,CAAAb,OAAA,CAAQO;UACjB,CAAA,CAAA,EACCM,KAAM,CAAAnC,KAAA,IAASF,kBAAmB,CAAAqC,KAAA,CAAMnC,KAAK,CAAA;QAPpC,CAAA,EAAAmC,KAAA,CAAMb,OAAQ,CAAAM,EAQ1B,CACD,CAAA;MAlBgB,CAAA,EAAAN,OAAA,CAAQA,OAAQ,CAAAM,EAmBrC,CACD,CAAA;IA7BkB,CAAA,EAAAb,OAAA,CAAQa,EA8B7B,CACD;EACH,CAAA,CAAA;AAEJ,CAAA;"}
1
+ {"version":3,"file":"ProductTechSpecs.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\n\nimport * as S from \"./ProductTechSpecs.styles\";\nimport type { ProductTechSpecsProps } from \"./ProductTechSpecs.types\";\n\nexport const ProductTechSpecs = ({\n sections,\n}: ProductTechSpecsProps): JSX.Element => {\n /**\n * Break value into lines\n */\n const renderFeatureValue = useCallback((value: string): JSX.Element => {\n const lines = value.split(\"\\n\");\n return (\n <S.Cell>\n {lines.map((line, i) => (\n <React.Fragment key={i}>\n {i > 0 && <br />}\n {line}\n </React.Fragment>\n ))}\n </S.Cell>\n );\n }, []);\n\n const parsedSections = useMemo(() => {\n return sections.map((section) => {\n const { withParentId, withoutParentId } = section.features.reduce<{\n withParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n withoutParentId: ProductTechSpecsProps[\"sections\"][number][\"features\"];\n }>(\n (acc, feature) => {\n if (feature.parentId === null) {\n acc.withoutParentId.push(feature);\n } else {\n acc.withParentId.push(feature);\n }\n return acc;\n },\n { withParentId: [], withoutParentId: [] },\n );\n\n const features = withoutParentId.map((parentFeature) => {\n const children = withParentId.filter(\n (childFeature) => childFeature.parentId === parentFeature.id,\n );\n return {\n ...parentFeature,\n children,\n };\n });\n\n return {\n id: section.id,\n label: section.label,\n features,\n };\n });\n }, [sections]);\n\n console.log(parsedSections);\n\n return (\n <S.Wrap>\n {parsedSections.map((section, i) => (\n <React.Fragment key={section.id}>\n {i > 0 && <S.SectionDivider />}\n {/* Section heading */}\n <S.Row>\n <S.Heading>{section.label}</S.Heading>\n </S.Row>\n\n {/* Section feature key value pairs */}\n {section.features.map((feature) => (\n <React.Fragment key={feature.id}>\n <S.Row key={feature.id}>\n <S.Cell>{feature.label}</S.Cell>\n {feature.value && renderFeatureValue(feature.value)}\n </S.Row>\n\n {/* Child features */}\n {feature.children.length > 0 &&\n feature.children.map((childFeature, i) => (\n <S.Row key={childFeature.id}>\n <S.Tree $isLast={i === feature.children.length - 1} />\n <S.Branch />\n\n <S.Cell $isChildRowFirstCell>{childFeature.label}</S.Cell>\n {childFeature.value &&\n renderFeatureValue(childFeature.value)}\n </S.Row>\n ))}\n </React.Fragment>\n ))}\n </React.Fragment>\n ))}\n </S.Wrap>\n );\n};\n"],"names":["ProductTechSpecs","sections","renderFeatureValue","useCallback","value","lines","split","jsx","S.Cell","children","map","line","i","jsxs","React","Fragment","parsedSections","useMemo","section","withParentId","withoutParentId","features","reduce","acc","feature","parentId","push","parentFeature","filter","childFeature","id","label","console","log","S.Wrap","S.SectionDivider","S.Row","S.Heading","length","S.Tree","$isLast","S.Branch","$isChildRowFirstCell"],"mappings":";;;;AAKO,MAAMA,mBAAmBA,CAAC;EAC/BC;AACF,CAA0C,KAAA;EAIlC,MAAAC,kBAAA,GAAqBC,WAAY,CAACC,KAA+B,IAAA;IAC/D,MAAAC,KAAA,GAAQD,KAAM,CAAAE,KAAA,CAAM,IAAI,CAAA;IAC9B,OAAA,eACGC,GAAA,CAAAC,IAAA,EAAA;MACEC,QAAM,EAAAJ,KAAA,CAAAK,GAAA,CAAI,CAACC,IAAA,EAAMC,CAChB,KAAA,eAAAC,IAAA,CAACC,KAAM,CAAAC,QAAA,EAAN;QACEN,QAAA,EAAA,CAAIG,CAAA,GAAA,CAAA,IAAA,mBAAM,IAAG,EAAA,CAAA,CAAA,CAAA,EACbD,IAAA;OAFkB,EAAAC,CAGrB,CACD;IACH,CAAA,CAAA;EAEJ,CAAA,EAAG,EAAE,CAAA;EAEC,MAAAI,cAAA,GAAiBC,QAAQ,MAAM;IAC5B,OAAAhB,QAAA,CAASS,GAAI,CAACQ,OAAY,IAAA;MAC/B,MAAM;QAAEC,YAAA;QAAcC;MAAgB,CAAA,GAAIF,QAAQG,QAAS,CAAAC,MAAA,CAIzD,CAACC,KAAKC,OAAY,KAAA;QACZ,IAAAA,OAAA,CAAQC,aAAa,IAAM,EAAA;UACzBF,GAAA,CAAAH,eAAA,CAAgBM,KAAKF,OAAO,CAAA;QAAA,CAC3B,MAAA;UACDD,GAAA,CAAAJ,YAAA,CAAaO,KAAKF,OAAO,CAAA;QAC/B;QACO,OAAAD,GAAA;MACT,CAAA,EACA;QAAEJ,YAAc,EAAA,EAAI;QAAAC,eA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,CAAA,EAFxCoB,QAAQM,EAGpB,CAAA,EAGCN,OAAQ,CAAAf,QAAA,CAAS6B,MAAS,GAAA,CAAA,IACzBd,OAAQ,CAAAf,QAAA,CAASC,GAAI,CAAA,CAACmB,YAAcjB,EAAAA,EAAAA,KAAAA,eACjCC,IAAA,CAAAuB,KAAA;UACC3B,QAAA,EAAA,CAAA,eAACF,GAAA,CAAAgC,MAAA;YAAOC,OAAA,EAAS5B,OAAMY,OAAQ,CAAAf,QAAA,CAAS6B,SAAS;WAAG,CAAA,EAAA,eACpD/B,GAAA,CAACkC,MAAE,EAAF,EAAS,CAAA,EAAA,mBAETjC,IAAE,EAAF;YAAOkC,oBAAoB,EAAA,IAAA;YAAEjC,uBAAasB;WAAM,CAAA,EAChDF,YAAa,CAAAzB,KAAA,IACZF,kBAAmB,CAAA2B,YAAA,CAAazB,KAAK,CAAA;SAN7B,EAAAyB,YAAA,CAAaC,EAOzB,CACD,CAAA;OAjBgB,EAAAN,OAAA,CAAQM,EAkB7B,CACD,CAAA;IA5BkB,CAAA,EAAAZ,OAAA,CAAQY,EA6B7B,CACD;EACH,CAAA,CAAA;AAEJ,CAAA;"}
@@ -3,8 +3,7 @@ export declare const Row: import("styled-components").StyledComponent<"div", imp
3
3
  export declare const Heading: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
4
  export declare const SectionDivider: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
5
  export declare const Cell: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
6
- $type: "key" | "value";
7
- $isChildCell?: boolean;
6
+ $isChildRowFirstCell?: boolean;
8
7
  }, never>;
9
8
  export declare const Tree: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
10
9
  $isLast: boolean;
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var styled = require('styled-components');
4
+ var layout = require('../../constants/layout.js');
4
5
  function _interopDefault(e) {
5
6
  return e && e.__esModule ? e : {
6
7
  default: e
@@ -19,6 +20,10 @@ const Row = styled__default["default"].div`
19
20
  background-color: #f9f9f9;
20
21
  }
21
22
  padding-left: ${TABLE_LEFT_MARGIN};
23
+
24
+ @media ${layout.BREAKPOINTS.MOBILE_AND_DOWN} {
25
+ grid-template-columns: 170px 1fr;
26
+ }
22
27
  `;
23
28
  const Heading = styled__default["default"].div`
24
29
  font-size: 20px;
@@ -39,16 +44,9 @@ const Cell = styled__default["default"].div`
39
44
  font-size: 14px;
40
45
  line-height: 20px;
41
46
  color: #50565e;
42
-
43
- ${({
44
- $type
45
- }) => $type === "key" && "width: 300px"};
46
47
  ${({
47
- $isChildCell,
48
- $type
49
- }) => $isChildCell && $type === "key" && `
50
- margin-left: 24px;
51
- `};
48
+ $isChildRowFirstCell
49
+ }) => $isChildRowFirstCell && "margin-left: 24px;"}
52
50
  `;
53
51
  const Tree = styled__default["default"].div`
54
52
  ${({
@@ -1 +1 @@
1
- {"version":3,"file":"ProductTechSpecs.styles.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n &:hover: {\n background-color: #f9f9f9;\n }\n padding-left: ${TABLE_LEFT_MARGIN};\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n $type: \"key\" | \"value\";\n $isChildCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n\n ${({ $type }) => $type === \"key\" && \"width: 300px\"};\n ${({ $isChildCell, $type }) =>\n $isChildCell &&\n $type === \"key\" &&\n `\n margin-left: 24px;\n `};\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) => ($isLast ? \"height: 18px\" : \"height: 100%\")};\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","Heading","SectionDivider","Cell","$type","$isChildCell","Tree","$isLast","Branch"],"mappings":";;;;;;;;;;AAEA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,eAAAA,CAAAA,SAAAA,CAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAORJ,iBAAiB;AAAA,CAAA;AAG5B,MAAMM,UAAUH,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMG,iBAAiBJ,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMI,OAAOL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASvB,CAAC;EAAEK;AAAA,CAAY,KAAAA,KAAA,KAAU,SAAS,cAAc;AAAA,IAChD,CAAC;EAAEC,YAAA;EAAcD;CACjB,KAAAC,YAAA,IACAD,UAAU,KACV,IAAA;AAAA;AAAA,GAED;AAAA,CAAA;AAGI,MAAME,OAAOR,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAEQ;AAAA,CAAe,KAAAA,OAAA,GAAU,iBAAiB,cAAe;AAAA;AAAA;AAAA,eAGjDZ,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMY,SAASV,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,eAEdJ,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;;;;"}
1
+ {"version":3,"file":"ProductTechSpecs.styles.js","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n &:hover: {\n background-color: #f9f9f9;\n }\n padding-left: ${TABLE_LEFT_MARGIN};\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n grid-template-columns: 170px 1fr;\n }\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n // Cell is a child and its the first item on the row.\n $isChildRowFirstCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n ${({ $isChildRowFirstCell }) => $isChildRowFirstCell && \"margin-left: 24px;\"}\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) => ($isLast ? \"height: 18px\" : \"height: 100%\")};\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","BREAKPOINTS","MOBILE_AND_DOWN","Heading","SectionDivider","Cell","$isChildRowFirstCell","Tree","$isLast","Branch"],"mappings":";;;;;;;;;;;AAIA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,eAAAA,CAAAA,SAAAA,CAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAORJ,iBAAiB;AAAA;AAAA,WAExBM,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,UAAUL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMK,iBAAiBN,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMM,OAAOP,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvB,CAAC;EAAEO;CAAqB,KAAMA,wBAAwB,oBAAoB;AAAA,CAAA;AAGvE,MAAMC,OAAOT,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAES;AAAA,CAAe,KAAAA,OAAA,GAAU,iBAAiB,cAAe;AAAA;AAAA;AAAA,eAGjDb,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMa,SAASX,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,eAEdJ,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;;;;;"}
@@ -1,4 +1,5 @@
1
1
  import styled from 'styled-components';
2
+ import { BREAKPOINTS } from '../../constants/layout.mjs';
2
3
  "use strict";
3
4
  const TABLE_LEFT_MARGIN = "0px";
4
5
  const TREE_LEFT_MARGIN = "8px";
@@ -11,6 +12,10 @@ const Row = styled.div`
11
12
  background-color: #f9f9f9;
12
13
  }
13
14
  padding-left: ${TABLE_LEFT_MARGIN};
15
+
16
+ @media ${BREAKPOINTS.MOBILE_AND_DOWN} {
17
+ grid-template-columns: 170px 1fr;
18
+ }
14
19
  `;
15
20
  const Heading = styled.div`
16
21
  font-size: 20px;
@@ -31,16 +36,9 @@ const Cell = styled.div`
31
36
  font-size: 14px;
32
37
  line-height: 20px;
33
38
  color: #50565e;
34
-
35
- ${({
36
- $type
37
- }) => $type === "key" && "width: 300px"};
38
39
  ${({
39
- $isChildCell,
40
- $type
41
- }) => $isChildCell && $type === "key" && `
42
- margin-left: 24px;
43
- `};
40
+ $isChildRowFirstCell
41
+ }) => $isChildRowFirstCell && "margin-left: 24px;"}
44
42
  `;
45
43
  const Tree = styled.div`
46
44
  ${({
@@ -1 +1 @@
1
- {"version":3,"file":"ProductTechSpecs.styles.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n &:hover: {\n background-color: #f9f9f9;\n }\n padding-left: ${TABLE_LEFT_MARGIN};\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n $type: \"key\" | \"value\";\n $isChildCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n\n ${({ $type }) => $type === \"key\" && \"width: 300px\"};\n ${({ $isChildCell, $type }) =>\n $isChildCell &&\n $type === \"key\" &&\n `\n margin-left: 24px;\n `};\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) => ($isLast ? \"height: 18px\" : \"height: 100%\")};\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","Heading","SectionDivider","Cell","$type","$isChildCell","Tree","$isLast","Branch"],"mappings":";;AAEA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,MAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAORJ,iBAAiB;AAAA,CAAA;AAG5B,MAAMM,UAAUH,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMG,iBAAiBJ,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMI,OAAOL,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASvB,CAAC;EAAEK;AAAA,CAAY,KAAAA,KAAA,KAAU,SAAS,cAAc;AAAA,IAChD,CAAC;EAAEC,YAAA;EAAcD;CACjB,KAAAC,YAAA,IACAD,UAAU,KACV,IAAA;AAAA;AAAA,GAED;AAAA,CAAA;AAGI,MAAME,OAAOR,MAAO,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAEQ;AAAA,CAAe,KAAAA,OAAA,GAAU,iBAAiB,cAAe;AAAA;AAAA;AAAA,eAGjDZ,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMY,SAASV,MAAO,CAAAC,GAAA;AAAA;AAAA,eAEdJ,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
1
+ {"version":3,"file":"ProductTechSpecs.styles.mjs","sources":["../../../src/components/ProductTechSpecsV2/ProductTechSpecs.styles.tsx"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\n\nconst TABLE_LEFT_MARGIN = \"0px\";\nconst TREE_LEFT_MARGIN = \"8px\";\n\nexport const Wrap = styled.div``;\n\nexport const Row = styled.div`\n display: grid;\n grid-template-columns: 300px 1fr;\n position: relative;\n &:hover: {\n background-color: #f9f9f9;\n }\n padding-left: ${TABLE_LEFT_MARGIN};\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n grid-template-columns: 170px 1fr;\n }\n`;\n\nexport const Heading = styled.div`\n font-size: 20px;\n line-height: 24px;\n font-weight: 700;\n color: #212427;\n margin-bottom: 16px;\n grid-column: 1 / 3;\n`;\n\nexport const SectionDivider = styled.div`\n height: 1px;\n background-color: #dbdce1;\n margin: 16px 0;\n grid-column: 1 / 3;\n`;\n\nexport const Cell = styled.div<{\n // Cell is a child and its the first item on the row.\n $isChildRowFirstCell?: boolean;\n}>`\n padding: 8px 28px 8px 0;\n font-size: 14px;\n line-height: 20px;\n color: #50565e;\n ${({ $isChildRowFirstCell }) => $isChildRowFirstCell && \"margin-left: 24px;\"}\n`;\n\nexport const Tree = styled.div<{\n $isLast: boolean;\n}>`\n ${({ $isLast }) => ($isLast ? \"height: 18px\" : \"height: 100%\")};\n position: absolute;\n top: 0;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n width: 1px;\n background-color: #c5c5c5;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n`;\n\nexport const Branch = styled.div`\n position: absolute;\n left: calc(${TABLE_LEFT_MARGIN} + ${TREE_LEFT_MARGIN});\n top: 17px;\n width: 11px;\n height: 1px;\n background-color: #c5c5c5;\n`;\n"],"names":["TABLE_LEFT_MARGIN","TREE_LEFT_MARGIN","Wrap","styled","div","Row","BREAKPOINTS","MOBILE_AND_DOWN","Heading","SectionDivider","Cell","$isChildRowFirstCell","Tree","$isLast","Branch"],"mappings":";;;AAIA,MAAMA,iBAAoB,GAAA,KAAA;AAC1B,MAAMC,gBAAmB,GAAA,KAAA;AAElB,MAAMC,OAAOC,MAAO,CAAAC,GAAA,EAAA;AAEpB,MAAMC,MAAMF,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAORJ,iBAAiB;AAAA;AAAA,WAExBM,YAAYC,eAAe;AAAA;AAAA;AAAA,CAAA;AAK/B,MAAMC,UAAUL,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASvB,MAAMK,iBAAiBN,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAO9B,MAAMM,OAAOP,MAAO,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvB,CAAC;EAAEO;CAAqB,KAAMA,wBAAwB,oBAAoB;AAAA,CAAA;AAGvE,MAAMC,OAAOT,MAAO,CAAAC,GAAA;AAAA,IAGvB,CAAC;EAAES;AAAA,CAAe,KAAAA,OAAA,GAAU,iBAAiB,cAAe;AAAA;AAAA;AAAA,eAGjDb,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAS/C,MAAMa,SAASX,MAAO,CAAAC,GAAA;AAAA;AAAA,eAEdJ,uBAAuBC,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
@@ -1,17 +1,12 @@
1
1
  export type ProductTechSpecsProps = {
2
2
  sections: Array<{
3
3
  id: string;
4
- section: {
5
- id: string;
6
- label: string;
7
- };
4
+ label: string;
8
5
  features: Array<{
6
+ id: string;
9
7
  value?: string;
10
- feature: {
11
- id: string;
12
- label: string;
13
- parentId: string | null;
14
- };
8
+ label: string;
9
+ parentId: string | null;
15
10
  }>;
16
11
  }>;
17
12
  };
@@ -10,7 +10,7 @@ var ProductWizard_styles = require('./ProductWizard.styles.js');
10
10
  var Options = require('./Options/Options.js');
11
11
  var NormalisedImage = require('../NormalisedImage/NormalisedImage.js');
12
12
  var minus = require("../../assets/minus.svg");
13
- var plus = require("../../assets/plus.svg");
13
+ var plus = require("../../assets/plus2.svg");
14
14
  var ProductWizardFootnotes = require('../ProductWizardFootnotes/ProductWizardFootnotes.js');
15
15
  function _interopDefault(e) {
16
16
  return e && e.__esModule ? e : {
@@ -8,7 +8,7 @@ import { WizardContainer, AddToCartContainer, QuantityAdjustWrap, MinusAdjustBut
8
8
  import { ProductWizardOptions } from './Options/Options.mjs';
9
9
  import { NormalisedImage } from '../NormalisedImage/NormalisedImage.mjs';
10
10
  import minus__default from "../../assets/minus.svg";
11
- import plus__default from "../../assets/plus.svg";
11
+ import plus__default from "../../assets/plus2.svg";
12
12
  import { ProductWizardFootnotes } from '../ProductWizardFootnotes/ProductWizardFootnotes.mjs';
13
13
  "use strict";
14
14
  const ProductWizard = function ProductWizard2({
@@ -6,7 +6,7 @@ require('../StyleableSvgImage/index.js');
6
6
  var QuantityInput_styles = require('./QuantityInput.styles.js');
7
7
  var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
8
8
  var minus = require("../../assets/minus.svg");
9
- var plus = require("../../assets/plus.svg");
9
+ var plus = require("../../assets/plus2.svg");
10
10
  function _interopDefault(e) {
11
11
  return e && e.__esModule ? e : {
12
12
  default: e
@@ -4,7 +4,7 @@ import '../StyleableSvgImage/index.mjs';
4
4
  import { Container, Label, QuantityAdjustWrap, MinusAdjustButton, QuantityInput as QuantityInput$1, PlusAdjustButton } from './QuantityInput.styles.mjs';
5
5
  import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
6
6
  import minus__default from "../../assets/minus.svg";
7
- import plus__default from "../../assets/plus.svg";
7
+ import plus__default from "../../assets/plus2.svg";
8
8
  "use strict";
9
9
  const QuantityInput = ({
10
10
  quantity,
@@ -10,7 +10,7 @@ var Input_styles = require('./Input.styles.js');
10
10
  var StyleableSvgImage = require('../../StyleableSvgImage/StyleableSvgImage.js');
11
11
  var _externalAssets_g50k1DIN = require("../../../assets/search.svg");
12
12
  var Spinner = require('../../Loader/Spinner/Spinner.js');
13
- var CloseIcon = require("../../../assets/close.svg");
13
+ var CloseIcon = require("../../../assets/close3.svg");
14
14
  function _interopDefault(e) {
15
15
  return e && e.__esModule ? e : {
16
16
  default: e
@@ -8,7 +8,7 @@ import { SearchInputContainer, InputWrap, IconWrap, Input, IconAfterWrap, Cancel
8
8
  import { StyleableSvgImage } from '../../StyleableSvgImage/StyleableSvgImage.mjs';
9
9
  import _externalAssets_g50k1DIN__default from "../../../assets/search.svg";
10
10
  import { Spinner } from '../../Loader/Spinner/Spinner.mjs';
11
- import CloseIcon__default from "../../../assets/close.svg";
11
+ import CloseIcon__default from "../../../assets/close3.svg";
12
12
  "use strict";
13
13
  const MAX_CHARACTERS = 250;
14
14
  const SearchInput = function SearchInput2({
@@ -12,9 +12,9 @@ require('./assets/play.svg.js');
12
12
  require('./assets/volume-off.svg.js');
13
13
  require('./assets/volume-on.svg.js');
14
14
  var VideoPlayer_styles = require('./VideoPlayer.styles.js');
15
- var CloseIcon = require("../../assets/close3.svg");
15
+ var CloseIcon = require("../../assets/close2.svg");
16
16
  var BackIcon = require("../../assets/back.svg");
17
- var PauseIcon = require("../../assets/pause.svg");
17
+ var PauseIcon = require("../../assets/pause2.svg");
18
18
  var PlayIcon = require("../../assets/play.svg");
19
19
  var VolumeOffIcon = require("../../assets/volume-off.svg");
20
20
  var VolumeOnIcon = require("../../assets/volume-on.svg");
@@ -10,9 +10,9 @@ import './assets/play.svg.mjs';
10
10
  import './assets/volume-off.svg.mjs';
11
11
  import './assets/volume-on.svg.mjs';
12
12
  import { Wrap, IconWrap, Icon, Video, ControlWrap, TimelineWrap, Timeline, Controls, LeftSide, IconButton, VolumeWrap, VolumeSliderWrap, VolumeSlider, Time, Center, RightSide } from './VideoPlayer.styles.mjs';
13
- import CloseIcon__default from "../../assets/close3.svg";
13
+ import CloseIcon__default from "../../assets/close2.svg";
14
14
  import BackIcon__default from "../../assets/back.svg";
15
- import PauseIcon__default from "../../assets/pause.svg";
15
+ import PauseIcon__default from "../../assets/pause2.svg";
16
16
  import PlayIcon__default from "../../assets/play.svg";
17
17
  import VolumeOffIcon__default from "../../assets/volume-off.svg";
18
18
  import VolumeOnIcon__default from "../../assets/volume-on.svg";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', {
4
4
  value: true
5
5
  });
6
- var CloseIcon = require("../../../assets/close3.svg");
6
+ var CloseIcon = require("../../../assets/close2.svg");
7
7
  function _interopDefault(e) {
8
8
  return e && e.__esModule ? e : {
9
9
  default: e
@@ -1,3 +1,3 @@
1
- export * from "../../../assets/close3.svg";
2
- export { default } from "../../../assets/close3.svg";
1
+ export * from "../../../assets/close2.svg";
2
+ export { default } from "../../../assets/close2.svg";
3
3
  //# sourceMappingURL=close.svg.mjs.map