@ubnt/store.core 11.18.0-alpha.0 → 11.18.0-alpha.2
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/CHANGELOG.md +9 -0
- package/lib/assets/ai-dome.jpg +0 -0
- package/lib/assets/ai-dome2.jpg +0 -0
- package/lib/assets/ai-lpr.jpg +0 -0
- package/lib/assets/ai-lpr2.jpg +0 -0
- package/lib/assets/ai-theta.jpg +0 -0
- package/lib/assets/ai-theta2.jpg +0 -0
- package/lib/assets/compact.svg +1 -1
- package/lib/assets/compact2.svg +1 -1
- package/lib/assets/floodlight.svg +1 -1
- package/lib/assets/floodlight2.svg +1 -1
- package/lib/assets/g2-reader-pro.jpg +0 -0
- package/lib/assets/g2-reader-pro2.jpg +0 -0
- package/lib/assets/g2-reader.jpg +0 -0
- package/lib/assets/g2-reader2.jpg +0 -0
- package/lib/assets/g3-reader-flex.jpg +0 -0
- package/lib/assets/g3-reader-flex2.jpg +0 -0
- package/lib/assets/g5-bullet.jpg +0 -0
- package/lib/assets/g5-bullet2.jpg +0 -0
- package/lib/assets/g5-dome.jpg +0 -0
- package/lib/assets/g5-dome2.jpg +0 -0
- package/lib/assets/g5-ptz.jpg +0 -0
- package/lib/assets/g5-ptz2.jpg +0 -0
- package/lib/assets/globe.svg +1 -1
- package/lib/assets/globe2.svg +1 -1
- package/lib/assets/intercom.jpg +0 -0
- package/lib/assets/intercom2.jpg +0 -0
- package/lib/assets/minus.svg +1 -1
- package/lib/assets/minus2.svg +1 -1
- package/lib/assets/minus4.svg +1 -1
- package/lib/assets/minus5.svg +1 -1
- package/lib/assets/plus4.svg +1 -1
- package/lib/assets/plus5.svg +1 -1
- package/lib/assets/power.svg +1 -1
- package/lib/assets/power2.svg +1 -1
- package/lib/assets/rack.svg +1 -1
- package/lib/assets/rack2.svg +1 -1
- package/lib/components/Header/CartModalV2/Item/Item.js +3 -3
- package/lib/components/Header/CartModalV2/Item/Item.mjs +2 -2
- package/lib/components/Header/Header.js +1 -1
- package/lib/components/Header/Header.mjs +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.js +1 -1
- package/lib/components/MicrositeHeader/components/HeaderContent/HeaderContent.mjs +1 -1
- package/lib/components/MicrositeHeader/components/VisualTopology/VisualTopology.js +3 -3
- package/lib/components/MicrositeHeader/components/VisualTopology/VisualTopology.mjs +2 -2
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +1 -1
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.mjs +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/PropertyValueGridItem.js +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/PropertyValueGridItem.mjs +1 -1
- package/lib/components/ModelCompareV4/ModelCompareV4.types.d.ts +1 -0
- package/lib/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.d.ts +1 -1
- package/lib/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.js +40 -1
- package/lib/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.js.map +1 -1
- package/lib/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.mjs +40 -1
- package/lib/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.mjs.map +1 -1
- package/lib/components/ModelCompareV4/SideBySideCompare.d.ts +1 -1
- package/lib/components/ModelCompareV4/SideBySideCompare.js +13 -4
- package/lib/components/ModelCompareV4/SideBySideCompare.js.map +1 -1
- package/lib/components/ModelCompareV4/SideBySideCompare.mjs +13 -4
- package/lib/components/ModelCompareV4/SideBySideCompare.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/minus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/assets/plus.svg.mjs +2 -2
- package/lib/constants/icons/generic/index.js +3 -3
- package/lib/constants/icons/generic/index.mjs +1 -1
- package/lib/constants/icons/generic/minus.svg.js +5 -5
- package/lib/constants/icons/generic/minus.svg.mjs +2 -2
- package/lib/constants/icons/header/globe.svg.js +1 -1
- package/lib/constants/icons/header/globe.svg.mjs +2 -2
- package/lib/constants/icons/header/index.js +1 -1
- package/lib/constants/icons/header/index.mjs +1 -1
- package/lib/constants/icons/menu/floodlight.svg.js +5 -5
- package/lib/constants/icons/menu/floodlight.svg.mjs +2 -2
- package/lib/constants/icons/menu/index.js +9 -9
- package/lib/constants/icons/menu/index.mjs +3 -3
- package/lib/constants/icons/menu/power.svg.js +5 -5
- package/lib/constants/icons/menu/power.svg.mjs +2 -2
- package/lib/constants/icons/menu/rack.svg.js +5 -5
- package/lib/constants/icons/menu/rack.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/ai-lpr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/g5-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g2-reader.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/intercom.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Interior/ai-theta.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Interior/ai-theta.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/compact.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/compact.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/floodlight.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/floodlight.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/globe.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/globe.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/minus.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/minus.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/power.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/power.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/ai-lpr.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/bullet/g5-bullet.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-dome.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g2-reader.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/intercom.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/interior-design/ai-theta.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/interior-design/ai-theta.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g5-ptz.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/compact.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/compact.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/rack.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/rack.svg.mjs +2 -2
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Compact.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Compact.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/compact.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/compact.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/aiDome.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiDome.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiLpr.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiLpr.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g2Reader.js +2 -2
- package/lib/constants/modelCompareData/data/products/g2Reader.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g2ReaderPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g2ReaderPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderFlex.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderFlex.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Bullet.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Bullet.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Dome.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Dome.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/intercom.js +2 -2
- package/lib/constants/modelCompareData/data/products/intercom.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/theta.js +2 -2
- package/lib/constants/modelCompareData/data/products/theta.mjs +2 -2
- package/lib/constants/modelCompareData/data/properties/accessPowerMethod.js +1 -1
- package/lib/constants/modelCompareData/data/properties/accessPowerMethod.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/availability.js +1 -1
- package/lib/constants/modelCompareData/data/properties/availability.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/builtInFloodlight.js +1 -1
- package/lib/constants/modelCompareData/data/properties/builtInFloodlight.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/dcPowerOutput.js +1 -1
- package/lib/constants/modelCompareData/data/properties/dcPowerOutput.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/mounting.js +1 -1
- package/lib/constants/modelCompareData/data/properties/mounting.mjs +1 -1
- package/lib/constants/modelCompareData/data/properties/webMode.js +1 -1
- package/lib/constants/modelCompareData/data/properties/webMode.mjs +1 -1
- package/lib/constants/modelCompareData/types.d.ts +17 -1
- package/lib/constants/modelCompareData/types.js +16 -0
- package/lib/constants/modelCompareData/types.js.map +1 -1
- package/lib/constants/modelCompareData/types.mjs +16 -0
- package/lib/constants/modelCompareData/types.mjs.map +1 -1
- package/lib/contexts/MenuContext/mapping.js +3 -3
- package/lib/contexts/MenuContext/mapping.mjs +2 -2
- package/lib/contexts/MicrositeMenuContext/mapping.js +3 -3
- package/lib/contexts/MicrositeMenuContext/mapping.mjs +2 -2
- package/package.json +1 -1
|
@@ -2,8 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var ciscoCW9176I = require('../../../../constants/modelCompareData/data/products/ciscoCW9176I.js');
|
|
4
4
|
var ciscoCW9178I = require('../../../../constants/modelCompareData/data/products/ciscoCW9178I.js');
|
|
5
|
+
var doorHub = require('../../../../constants/modelCompareData/data/products/doorHub.js');
|
|
5
6
|
var dS3WAP622ESI = require('../../../../constants/modelCompareData/data/products/dS3WAP622ESI.js');
|
|
6
7
|
var dS3WAP622GSI = require('../../../../constants/modelCompareData/data/products/dS3WAP622GSI.js');
|
|
8
|
+
var e7 = require('../../../../constants/modelCompareData/data/products/e7.js');
|
|
9
|
+
var e7Campus = require('../../../../constants/modelCompareData/data/products/e7Campus.js');
|
|
10
|
+
var efg = require('../../../../constants/modelCompareData/data/products/efg.js');
|
|
11
|
+
var enterpriseCampus48PoE = require('../../../../constants/modelCompareData/data/products/enterpriseCampus48PoE.js');
|
|
12
|
+
var enterpriseCampusAggregation = require('../../../../constants/modelCompareData/data/products/enterpriseCampusAggregation.js');
|
|
13
|
+
var envr = require('../../../../constants/modelCompareData/data/products/envr.js');
|
|
14
|
+
var g6Dome = require('../../../../constants/modelCompareData/data/products/g6Dome.js');
|
|
15
|
+
var g6Turret = require('../../../../constants/modelCompareData/data/products/g6Turret.js');
|
|
16
|
+
var professional24PoE = require('../../../../constants/modelCompareData/data/products/professional24PoE.js');
|
|
17
|
+
var professional48PoE = require('../../../../constants/modelCompareData/data/products/professional48PoE.js');
|
|
18
|
+
var professionalHd24Poe = require('../../../../constants/modelCompareData/data/products/professionalHd24Poe.js');
|
|
19
|
+
var professionalMax16PoE = require('../../../../constants/modelCompareData/data/products/professionalMax16PoE.js');
|
|
7
20
|
var u7proMax = require('../../../../constants/modelCompareData/data/products/u7proMax.js');
|
|
8
21
|
var u7proXgs = require('../../../../constants/modelCompareData/data/products/u7proXgs.js');
|
|
9
22
|
var types = require('../../../../constants/modelCompareData/types.js');
|
|
@@ -12,10 +25,36 @@ var propertiesCollectionExport = require('./propertiesCollectionExport.js');
|
|
|
12
25
|
const productObjMatcher = {
|
|
13
26
|
[types.ProductId.U7proXgs]: u7proXgs.u7proXgs,
|
|
14
27
|
[types.ProductId.U7ProMax]: u7proMax.u7proMax,
|
|
28
|
+
[types.ProductId.Efg]: efg.efg,
|
|
29
|
+
[types.ProductId.EnterpriseCampusAggregation]: enterpriseCampusAggregation.enterpriseCampusAggregation,
|
|
30
|
+
[types.ProductId.EnterpriseCampus48PoE]: enterpriseCampus48PoE.enterpriseCampus48PoE,
|
|
31
|
+
[types.ProductId.Envr]: envr.envr,
|
|
32
|
+
[types.ProductId.E7]: e7.e7,
|
|
33
|
+
[types.ProductId.E7Campus]: e7Campus.e7Campus,
|
|
34
|
+
[types.ProductId.G6Dome]: g6Dome.g6Dome,
|
|
35
|
+
[types.ProductId.DoorHub]: doorHub.doorHub,
|
|
15
36
|
[types.ProductId.CiscoCW9178I]: ciscoCW9178I.ciscoCW9178I,
|
|
16
37
|
[types.ProductId.CiscoCW9176I]: ciscoCW9176I.ciscoCW9176I,
|
|
17
38
|
[types.ProductId.DS3WAP622GSI]: dS3WAP622GSI.dS3WAP622GSI,
|
|
18
|
-
[types.ProductId.DS3WAP622ESI]: dS3WAP622ESI.dS3WAP622ESI
|
|
39
|
+
[types.ProductId.DS3WAP622ESI]: dS3WAP622ESI.dS3WAP622ESI,
|
|
40
|
+
// External
|
|
41
|
+
// todo change these to actual products, for now test
|
|
42
|
+
[types.ProductId.CW9176d]: e7.e7,
|
|
43
|
+
[types.ProductId.CW9176l]: e7Campus.e7Campus,
|
|
44
|
+
[types.ProductId.UXM_M]: professional48PoE.professional48PoE,
|
|
45
|
+
[types.ProductId.MS425]: professional24PoE.professional24PoE,
|
|
46
|
+
[types.ProductId.MX450]: professionalHd24Poe.professionalHd24Poe,
|
|
47
|
+
[types.ProductId.CD63Dome]: g6Turret.g6Turret,
|
|
48
|
+
[types.ProductId.Ac12Ad64]: e7Campus.e7Campus,
|
|
49
|
+
[types.ProductId.ArubaEdgeConnect10150]: professional48PoE.professional48PoE,
|
|
50
|
+
[types.ProductId.Aruba6300m]: professional24PoE.professional24PoE,
|
|
51
|
+
[types.ProductId.ArubaCx8325]: professionalHd24Poe.professionalHd24Poe,
|
|
52
|
+
[types.ProductId.ArubaAp755]: e7.e7,
|
|
53
|
+
[types.ProductId.JuniperAp47]: e7Campus.e7Campus,
|
|
54
|
+
[types.ProductId.Fortigate400F]: professional48PoE.professional48PoE,
|
|
55
|
+
[types.ProductId.FortiSwitch624F]: professional24PoE.professional24PoE,
|
|
56
|
+
[types.ProductId.FortiSwitch2048F]: professionalMax16PoE.professionalMax16PoE,
|
|
57
|
+
[types.ProductId.FortiAp441k]: professionalHd24Poe.professionalHd24Poe
|
|
19
58
|
};
|
|
20
59
|
const ComparableProductMap = [{
|
|
21
60
|
label: "Cisco",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterCompetitorConfig.js","sources":["../../../../../src/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.tsx"],"sourcesContent":["import { ciscoCW9176I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9176I\";\nimport { ciscoCW9178I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9178I\";\nimport { dS3WAP622ESI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622ESI\";\nimport { dS3WAP622GSI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622GSI\";\nimport { u7proMax } from \"../../../../constants/modelCompareData/data/products/u7proMax\";\nimport { u7proXgs } from \"../../../../constants/modelCompareData/data/products/u7proXgs\";\nimport type {\n Product,\n Property,\n} from \"../../../../constants/modelCompareData/types\";\nimport { ProductId } from \"../../../../constants/modelCompareData/types\";\nimport { wifiProperties } from \"./propertiesCollectionExport\";\n\n/** Using this for now to organize:\n * Also We should maybe move this file down to constants model compare data\n * https://docs.google.com/spreadsheets/d/1pXA3dI56Kzn22B4a1wu7Dasc8Y-Icx0vKXs166S3fAM/edit?usp=sharing\n */\n\ntype MatchedComparableProduct = {\n uniFiProductId: ComparableProductId;\n label?: string;\n competitorProductId: ComparableProductId;\n properties: Property[];\n};\n\ntype SideBySideMap = {\n label: string;\n matches: MatchedComparableProduct[];\n};\n\nexport type ComparableProductId = Extract<\n ProductId,\n | \"u7proXgs\"\n | \"u7proMax\"\n | \"dS3WAP622GSI\"\n | \"dS3WAP622ESI\"\n | \"ciscoCW9178I\"\n | \"ciscoCW9176I\"\n>;\n\nexport const productObjMatcher: Record<ComparableProductId, Product> = {\n [ProductId.U7proXgs]: u7proXgs,\n [ProductId.U7ProMax]: u7proMax,\n [ProductId.CiscoCW9178I]: ciscoCW9178I,\n [ProductId.CiscoCW9176I]: ciscoCW9176I,\n [ProductId.DS3WAP622GSI]: dS3WAP622GSI,\n [ProductId.DS3WAP622ESI]: dS3WAP622ESI,\n};\n\nexport const ComparableProductMap: SideBySideMap[] = [\n {\n label: \"Cisco\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.CiscoCW9178I,\n label: \"Cisco Wireless 9178I Access Point (CW9178I)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.CiscoCW9176I,\n label: \"Cisco Wireless 9176I Access Point (CW9176I)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Juniper\",\n matches: [],\n },\n {\n label: \"Netgear\",\n matches: [],\n },\n {\n label: \"Hikvision\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.DS3WAP622GSI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622G-SI)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.DS3WAP622ESI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622E-SI)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Fortinet\",\n matches: [],\n },\n {\n label: \"Arista\",\n matches: [],\n },\n {\n label: \"Aruba\",\n matches: [],\n },\n {\n label: \"Bosch\",\n matches: [],\n },\n];\n"],"names":["productObjMatcher","ProductId","U7proXgs","u7proXgs","U7ProMax","u7proMax","CiscoCW9178I","ciscoCW9178I","CiscoCW9176I","ciscoCW9176I","DS3WAP622GSI","dS3WAP622GSI","DS3WAP622ESI","dS3WAP622ESI","ComparableProductMap","label","matches","uniFiProductId","competitorProductId","properties","wifiProperties"],"mappings":";;;;;;;;;;;AAwCO,MAAMA,iBAA0D,GAAA;EACrE,CAACC,KAAAA,CAAAA,SAAU,CAAAC,QAAQ,GAAGC,QAAA,CAAAA,QAAA;EACtB,CAACF,KAAAA,CAAAA,SAAU,CAAAG,QAAQ,GAAGC,QAAA,CAAAA,QAAA;EACtB,CAACJ,KAAAA,CAAAA,SAAU,CAAAK,YAAY,GAAGC,YAAA,CAAAA,YAAA;EAC1B,CAACN,KAAAA,CAAAA,SAAU,CAAAO,YAAY,GAAGC,YAAA,CAAAA,YAAA;EAC1B,CAACR,KAAAA,CAAAA,SAAU,CAAAS,YAAY,GAAGC,YAAA,CAAAA,YAAA;EAC1B,CAACV,KAAAA,CAAAA,SAAU,CAAAW,YAAY,GAAGC,YAAAA,CAAAA;AAC5B,CAAA;AAEO,MAAMC,oBAAwC,GAAA,CACnD;EACEC,KAAO,EAAA,OAAA;EACPC,OAAS,EAAA,CACP;IACEC,gBAAgBhB,KAAU,CAAAA,SAAA,CAAAC,QAAA;IAC1BgB,qBAAqBjB,KAAU,CAAAA,SAAA,CAAAK,YAAA;IAC/BS,KAAO,EAAA,6CAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EACd,CAAA,EACA;IACEH,gBAAgBhB,KAAU,CAAAA,SAAA,CAAAG,QAAA;IAC1Bc,qBAAqBjB,KAAU,CAAAA,SAAA,CAAAO,YAAA;IAC/BO,KAAO,EAAA,6CAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EAAA,CAAA;AAGlB,CAAA,EACA;EACEL,KAAO,EAAA,SAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,SAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,WAAA;EACPC,OAAS,EAAA,CACP;IACEC,gBAAgBhB,KAAU,CAAAA,SAAA,CAAAC,QAAA;IAC1BgB,qBAAqBjB,KAAU,CAAAA,SAAA,CAAAS,YAAA;IAC/BK,KAAO,EAAA,qDAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EACd,CAAA,EACA;IACEH,gBAAgBhB,KAAU,CAAAA,SAAA,CAAAG,QAAA;IAC1Bc,qBAAqBjB,KAAU,CAAAA,SAAA,CAAAW,YAAA;IAC/BG,KAAO,EAAA,qDAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EAAA,CAAA;AAGlB,CAAA,EACA;EACEL,KAAO,EAAA,UAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,QAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,OAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,OAAA;EACPC,SAAS;AAAC,CAAA,CAEd;;"}
|
|
1
|
+
{"version":3,"file":"masterCompetitorConfig.js","sources":["../../../../../src/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.tsx"],"sourcesContent":["import { ciscoCW9176I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9176I\";\nimport { ciscoCW9178I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9178I\";\nimport { doorHub } from \"../../../../constants/modelCompareData/data/products/doorHub\";\nimport { dS3WAP622ESI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622ESI\";\nimport { dS3WAP622GSI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622GSI\";\nimport { e7 } from \"../../../../constants/modelCompareData/data/products/e7\";\nimport { e7Campus } from \"../../../../constants/modelCompareData/data/products/e7Campus\";\nimport { efg } from \"../../../../constants/modelCompareData/data/products/efg\";\nimport { enterpriseCampus48PoE } from \"../../../../constants/modelCompareData/data/products/enterpriseCampus48PoE\";\nimport { enterpriseCampusAggregation } from \"../../../../constants/modelCompareData/data/products/enterpriseCampusAggregation\";\nimport { envr } from \"../../../../constants/modelCompareData/data/products/envr\";\nimport { g6Dome } from \"../../../../constants/modelCompareData/data/products/g6Dome\";\nimport { g6Turret } from \"../../../../constants/modelCompareData/data/products/g6Turret\";\nimport { professional24PoE } from \"../../../../constants/modelCompareData/data/products/professional24PoE\";\nimport { professional48PoE } from \"../../../../constants/modelCompareData/data/products/professional48PoE\";\nimport { professionalHd24Poe } from \"../../../../constants/modelCompareData/data/products/professionalHd24Poe\";\nimport { professionalMax16PoE } from \"../../../../constants/modelCompareData/data/products/professionalMax16PoE\";\nimport { u7proMax } from \"../../../../constants/modelCompareData/data/products/u7proMax\";\nimport { u7proXgs } from \"../../../../constants/modelCompareData/data/products/u7proXgs\";\nimport type {\n Product,\n Property,\n} from \"../../../../constants/modelCompareData/types\";\nimport { ProductId } from \"../../../../constants/modelCompareData/types\";\nimport { wifiProperties } from \"./propertiesCollectionExport\";\n\n/** Using this for now to organize:\n * Also We should maybe move this file down to constants model compare data\n * https://docs.google.com/spreadsheets/d/1pXA3dI56Kzn22B4a1wu7Dasc8Y-Icx0vKXs166S3fAM/edit?usp=sharing\n */\n\ntype MatchedComparableProduct = {\n uniFiProductId: ComparableProductId;\n label?: string;\n competitorProductId: ComparableProductId;\n properties: Property[];\n};\n\ntype SideBySideMap = {\n label: string;\n matches: MatchedComparableProduct[];\n};\n\nexport type ComparableProductId = Extract<\n ProductId,\n | \"u7proXgs\"\n | \"u7proMax\"\n | \"dS3WAP622GSI\"\n | \"dS3WAP622ESI\"\n | \"ciscoCW9178I\"\n | \"ciscoCW9176I\"\n // external list\n // unifi\n | \"efg\"\n | \"enterpriseCampusAggregation\"\n | \"enterpriseCampus48PoE\"\n | \"envr\"\n | \"e7\"\n | \"e7Campus\"\n | \"g6Dome\"\n | \"doorHub\"\n // cisco\n | \"cw9176l\"\n | \"cw9176d\"\n | \"48uxm-m\"\n | \"ms-425\"\n | \"mx-450\"\n // Verkada\n | \"cd63-dome\"\n | \"ac12-ad64\"\n // HPE/Aruba/Juniper\n | \"arubaEdgeConnect10150\"\n | \"aruba6300m\"\n | \"arubaCx8325\"\n | \"arubaAp755\"\n | \"juniperAp47\"\n // Fortinet\n | \"fortiGate400f\"\n | \"fortiSwitch624f\"\n | \"fortiSwitch2048f\"\n | \"fortiAp441k\"\n>;\n\nexport const productObjMatcher: Record<ComparableProductId, Product> = {\n [ProductId.U7proXgs]: u7proXgs,\n [ProductId.U7ProMax]: u7proMax,\n [ProductId.Efg]: efg,\n [ProductId.EnterpriseCampusAggregation]: enterpriseCampusAggregation,\n [ProductId.EnterpriseCampus48PoE]: enterpriseCampus48PoE,\n [ProductId.Envr]: envr,\n [ProductId.E7]: e7,\n [ProductId.E7Campus]: e7Campus,\n [ProductId.G6Dome]: g6Dome,\n [ProductId.DoorHub]: doorHub,\n [ProductId.CiscoCW9178I]: ciscoCW9178I,\n [ProductId.CiscoCW9176I]: ciscoCW9176I,\n [ProductId.DS3WAP622GSI]: dS3WAP622GSI,\n [ProductId.DS3WAP622ESI]: dS3WAP622ESI,\n // External\n // todo change these to actual products, for now test\n [ProductId.CW9176d]: e7,\n [ProductId.CW9176l]: e7Campus,\n [ProductId.UXM_M]: professional48PoE,\n [ProductId.MS425]: professional24PoE,\n [ProductId.MX450]: professionalHd24Poe,\n [ProductId.CD63Dome]: g6Turret,\n [ProductId.Ac12Ad64]: e7Campus,\n [ProductId.ArubaEdgeConnect10150]: professional48PoE,\n [ProductId.Aruba6300m]: professional24PoE,\n [ProductId.ArubaCx8325]: professionalHd24Poe,\n [ProductId.ArubaAp755]: e7,\n [ProductId.JuniperAp47]: e7Campus,\n [ProductId.Fortigate400F]: professional48PoE,\n [ProductId.FortiSwitch624F]: professional24PoE,\n [ProductId.FortiSwitch2048F]: professionalMax16PoE,\n [ProductId.FortiAp441k]: professionalHd24Poe,\n};\n\nexport const ComparableProductMap: SideBySideMap[] = [\n {\n label: \"Cisco\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.CiscoCW9178I,\n label: \"Cisco Wireless 9178I Access Point (CW9178I)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.CiscoCW9176I,\n label: \"Cisco Wireless 9176I Access Point (CW9176I)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Juniper\",\n matches: [],\n },\n {\n label: \"Netgear\",\n matches: [],\n },\n {\n label: \"Hikvision\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.DS3WAP622GSI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622G-SI)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.DS3WAP622ESI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622E-SI)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Fortinet\",\n matches: [],\n },\n {\n label: \"Arista\",\n matches: [],\n },\n {\n label: \"Aruba\",\n matches: [],\n },\n {\n label: \"Bosch\",\n matches: [],\n },\n];\n"],"names":["productObjMatcher","ProductId","U7proXgs","u7proXgs","U7ProMax","u7proMax","Efg","efg","EnterpriseCampusAggregation","enterpriseCampusAggregation","EnterpriseCampus48PoE","enterpriseCampus48PoE","Envr","envr","E7","e7","E7Campus","e7Campus","G6Dome","g6Dome","DoorHub","doorHub","CiscoCW9178I","ciscoCW9178I","CiscoCW9176I","ciscoCW9176I","DS3WAP622GSI","dS3WAP622GSI","DS3WAP622ESI","dS3WAP622ESI","CW9176d","CW9176l","UXM_M","professional48PoE","MS425","professional24PoE","MX450","professionalHd24Poe","CD63Dome","g6Turret","Ac12Ad64","ArubaEdgeConnect10150","Aruba6300m","ArubaCx8325","ArubaAp755","JuniperAp47","Fortigate400F","FortiSwitch624F","FortiSwitch2048F","professionalMax16PoE","FortiAp441k","ComparableProductMap","label","matches","uniFiProductId","competitorProductId","properties","wifiProperties"],"mappings":";;;;;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A,CAAAC,QAAA;IAC1BqD,qBAAqBtD,KAAU,CAAAA,SAAA,CAAAqB,YAAA;IAC/B8B,KAAO,EAAA,6CAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EACd,CAAA,EACA;IACEH,gBAAgBrD,KAAU,CAAAA,SAAA,CAAAG,QAAA;IAC1BmD,qBAAqBtD,KAAU,CAAAA,SAAA,CAAAuB,YAAA;IAC/B4B,KAAO,EAAA,6CAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EAAA,CAAA;AAGlB,CAAA,EACA;EACEL,KAAO,EAAA,SAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,SAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,WAAA;EACPC,OAAS,EAAA,CACP;IACEC,gBAAgBrD,KAAU,CAAAA,SAAA,CAAAC,QAAA;IAC1BqD,qBAAqBtD,KAAU,CAAAA,SAAA,CAAAyB,YAAA;IAC/B0B,KAAO,EAAA,qDAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EACd,CAAA,EACA;IACEH,gBAAgBrD,KAAU,CAAAA,SAAA,CAAAG,QAAA;IAC1BmD,qBAAqBtD,KAAU,CAAAA,SAAA,CAAA2B,YAAA;IAC/BwB,KAAO,EAAA,qDAAA;IACPI,UAAY,EAAAC,0BAAAA,CAAAA;EAAA,CAAA;AAGlB,CAAA,EACA;EACEL,KAAO,EAAA,UAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,QAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,OAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,OAAA;EACPC,SAAS;AAAC,CAAA,CAEd;;"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { ciscoCW9176I } from '../../../../constants/modelCompareData/data/products/ciscoCW9176I.mjs';
|
|
2
2
|
import { ciscoCW9178I } from '../../../../constants/modelCompareData/data/products/ciscoCW9178I.mjs';
|
|
3
|
+
import { doorHub } from '../../../../constants/modelCompareData/data/products/doorHub.mjs';
|
|
3
4
|
import { dS3WAP622ESI } from '../../../../constants/modelCompareData/data/products/dS3WAP622ESI.mjs';
|
|
4
5
|
import { dS3WAP622GSI } from '../../../../constants/modelCompareData/data/products/dS3WAP622GSI.mjs';
|
|
6
|
+
import { e7 } from '../../../../constants/modelCompareData/data/products/e7.mjs';
|
|
7
|
+
import { e7Campus } from '../../../../constants/modelCompareData/data/products/e7Campus.mjs';
|
|
8
|
+
import { efg } from '../../../../constants/modelCompareData/data/products/efg.mjs';
|
|
9
|
+
import { enterpriseCampus48PoE } from '../../../../constants/modelCompareData/data/products/enterpriseCampus48PoE.mjs';
|
|
10
|
+
import { enterpriseCampusAggregation } from '../../../../constants/modelCompareData/data/products/enterpriseCampusAggregation.mjs';
|
|
11
|
+
import { envr } from '../../../../constants/modelCompareData/data/products/envr.mjs';
|
|
12
|
+
import { g6Dome } from '../../../../constants/modelCompareData/data/products/g6Dome.mjs';
|
|
13
|
+
import { g6Turret } from '../../../../constants/modelCompareData/data/products/g6Turret.mjs';
|
|
14
|
+
import { professional24PoE } from '../../../../constants/modelCompareData/data/products/professional24PoE.mjs';
|
|
15
|
+
import { professional48PoE } from '../../../../constants/modelCompareData/data/products/professional48PoE.mjs';
|
|
16
|
+
import { professionalHd24Poe } from '../../../../constants/modelCompareData/data/products/professionalHd24Poe.mjs';
|
|
17
|
+
import { professionalMax16PoE } from '../../../../constants/modelCompareData/data/products/professionalMax16PoE.mjs';
|
|
5
18
|
import { u7proMax } from '../../../../constants/modelCompareData/data/products/u7proMax.mjs';
|
|
6
19
|
import { u7proXgs } from '../../../../constants/modelCompareData/data/products/u7proXgs.mjs';
|
|
7
20
|
import { ProductId } from '../../../../constants/modelCompareData/types.mjs';
|
|
@@ -10,10 +23,36 @@ import { wifiProperties } from './propertiesCollectionExport.mjs';
|
|
|
10
23
|
const productObjMatcher = {
|
|
11
24
|
[ProductId.U7proXgs]: u7proXgs,
|
|
12
25
|
[ProductId.U7ProMax]: u7proMax,
|
|
26
|
+
[ProductId.Efg]: efg,
|
|
27
|
+
[ProductId.EnterpriseCampusAggregation]: enterpriseCampusAggregation,
|
|
28
|
+
[ProductId.EnterpriseCampus48PoE]: enterpriseCampus48PoE,
|
|
29
|
+
[ProductId.Envr]: envr,
|
|
30
|
+
[ProductId.E7]: e7,
|
|
31
|
+
[ProductId.E7Campus]: e7Campus,
|
|
32
|
+
[ProductId.G6Dome]: g6Dome,
|
|
33
|
+
[ProductId.DoorHub]: doorHub,
|
|
13
34
|
[ProductId.CiscoCW9178I]: ciscoCW9178I,
|
|
14
35
|
[ProductId.CiscoCW9176I]: ciscoCW9176I,
|
|
15
36
|
[ProductId.DS3WAP622GSI]: dS3WAP622GSI,
|
|
16
|
-
[ProductId.DS3WAP622ESI]: dS3WAP622ESI
|
|
37
|
+
[ProductId.DS3WAP622ESI]: dS3WAP622ESI,
|
|
38
|
+
// External
|
|
39
|
+
// todo change these to actual products, for now test
|
|
40
|
+
[ProductId.CW9176d]: e7,
|
|
41
|
+
[ProductId.CW9176l]: e7Campus,
|
|
42
|
+
[ProductId.UXM_M]: professional48PoE,
|
|
43
|
+
[ProductId.MS425]: professional24PoE,
|
|
44
|
+
[ProductId.MX450]: professionalHd24Poe,
|
|
45
|
+
[ProductId.CD63Dome]: g6Turret,
|
|
46
|
+
[ProductId.Ac12Ad64]: e7Campus,
|
|
47
|
+
[ProductId.ArubaEdgeConnect10150]: professional48PoE,
|
|
48
|
+
[ProductId.Aruba6300m]: professional24PoE,
|
|
49
|
+
[ProductId.ArubaCx8325]: professionalHd24Poe,
|
|
50
|
+
[ProductId.ArubaAp755]: e7,
|
|
51
|
+
[ProductId.JuniperAp47]: e7Campus,
|
|
52
|
+
[ProductId.Fortigate400F]: professional48PoE,
|
|
53
|
+
[ProductId.FortiSwitch624F]: professional24PoE,
|
|
54
|
+
[ProductId.FortiSwitch2048F]: professionalMax16PoE,
|
|
55
|
+
[ProductId.FortiAp441k]: professionalHd24Poe
|
|
17
56
|
};
|
|
18
57
|
const ComparableProductMap = [{
|
|
19
58
|
label: "Cisco",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterCompetitorConfig.mjs","sources":["../../../../../src/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.tsx"],"sourcesContent":["import { ciscoCW9176I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9176I\";\nimport { ciscoCW9178I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9178I\";\nimport { dS3WAP622ESI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622ESI\";\nimport { dS3WAP622GSI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622GSI\";\nimport { u7proMax } from \"../../../../constants/modelCompareData/data/products/u7proMax\";\nimport { u7proXgs } from \"../../../../constants/modelCompareData/data/products/u7proXgs\";\nimport type {\n Product,\n Property,\n} from \"../../../../constants/modelCompareData/types\";\nimport { ProductId } from \"../../../../constants/modelCompareData/types\";\nimport { wifiProperties } from \"./propertiesCollectionExport\";\n\n/** Using this for now to organize:\n * Also We should maybe move this file down to constants model compare data\n * https://docs.google.com/spreadsheets/d/1pXA3dI56Kzn22B4a1wu7Dasc8Y-Icx0vKXs166S3fAM/edit?usp=sharing\n */\n\ntype MatchedComparableProduct = {\n uniFiProductId: ComparableProductId;\n label?: string;\n competitorProductId: ComparableProductId;\n properties: Property[];\n};\n\ntype SideBySideMap = {\n label: string;\n matches: MatchedComparableProduct[];\n};\n\nexport type ComparableProductId = Extract<\n ProductId,\n | \"u7proXgs\"\n | \"u7proMax\"\n | \"dS3WAP622GSI\"\n | \"dS3WAP622ESI\"\n | \"ciscoCW9178I\"\n | \"ciscoCW9176I\"\n>;\n\nexport const productObjMatcher: Record<ComparableProductId, Product> = {\n [ProductId.U7proXgs]: u7proXgs,\n [ProductId.U7ProMax]: u7proMax,\n [ProductId.CiscoCW9178I]: ciscoCW9178I,\n [ProductId.CiscoCW9176I]: ciscoCW9176I,\n [ProductId.DS3WAP622GSI]: dS3WAP622GSI,\n [ProductId.DS3WAP622ESI]: dS3WAP622ESI,\n};\n\nexport const ComparableProductMap: SideBySideMap[] = [\n {\n label: \"Cisco\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.CiscoCW9178I,\n label: \"Cisco Wireless 9178I Access Point (CW9178I)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.CiscoCW9176I,\n label: \"Cisco Wireless 9176I Access Point (CW9176I)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Juniper\",\n matches: [],\n },\n {\n label: \"Netgear\",\n matches: [],\n },\n {\n label: \"Hikvision\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.DS3WAP622GSI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622G-SI)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.DS3WAP622ESI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622E-SI)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Fortinet\",\n matches: [],\n },\n {\n label: \"Arista\",\n matches: [],\n },\n {\n label: \"Aruba\",\n matches: [],\n },\n {\n label: \"Bosch\",\n matches: [],\n },\n];\n"],"names":["productObjMatcher","ProductId","U7proXgs","u7proXgs","U7ProMax","u7proMax","CiscoCW9178I","ciscoCW9178I","CiscoCW9176I","ciscoCW9176I","DS3WAP622GSI","dS3WAP622GSI","DS3WAP622ESI","dS3WAP622ESI","ComparableProductMap","label","matches","uniFiProductId","competitorProductId","properties","wifiProperties"],"mappings":"
|
|
1
|
+
{"version":3,"file":"masterCompetitorConfig.mjs","sources":["../../../../../src/components/ModelCompareV4/SideBySide/configs/masterCompetitorConfig.tsx"],"sourcesContent":["import { ciscoCW9176I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9176I\";\nimport { ciscoCW9178I } from \"../../../../constants/modelCompareData/data/products/ciscoCW9178I\";\nimport { doorHub } from \"../../../../constants/modelCompareData/data/products/doorHub\";\nimport { dS3WAP622ESI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622ESI\";\nimport { dS3WAP622GSI } from \"../../../../constants/modelCompareData/data/products/dS3WAP622GSI\";\nimport { e7 } from \"../../../../constants/modelCompareData/data/products/e7\";\nimport { e7Campus } from \"../../../../constants/modelCompareData/data/products/e7Campus\";\nimport { efg } from \"../../../../constants/modelCompareData/data/products/efg\";\nimport { enterpriseCampus48PoE } from \"../../../../constants/modelCompareData/data/products/enterpriseCampus48PoE\";\nimport { enterpriseCampusAggregation } from \"../../../../constants/modelCompareData/data/products/enterpriseCampusAggregation\";\nimport { envr } from \"../../../../constants/modelCompareData/data/products/envr\";\nimport { g6Dome } from \"../../../../constants/modelCompareData/data/products/g6Dome\";\nimport { g6Turret } from \"../../../../constants/modelCompareData/data/products/g6Turret\";\nimport { professional24PoE } from \"../../../../constants/modelCompareData/data/products/professional24PoE\";\nimport { professional48PoE } from \"../../../../constants/modelCompareData/data/products/professional48PoE\";\nimport { professionalHd24Poe } from \"../../../../constants/modelCompareData/data/products/professionalHd24Poe\";\nimport { professionalMax16PoE } from \"../../../../constants/modelCompareData/data/products/professionalMax16PoE\";\nimport { u7proMax } from \"../../../../constants/modelCompareData/data/products/u7proMax\";\nimport { u7proXgs } from \"../../../../constants/modelCompareData/data/products/u7proXgs\";\nimport type {\n Product,\n Property,\n} from \"../../../../constants/modelCompareData/types\";\nimport { ProductId } from \"../../../../constants/modelCompareData/types\";\nimport { wifiProperties } from \"./propertiesCollectionExport\";\n\n/** Using this for now to organize:\n * Also We should maybe move this file down to constants model compare data\n * https://docs.google.com/spreadsheets/d/1pXA3dI56Kzn22B4a1wu7Dasc8Y-Icx0vKXs166S3fAM/edit?usp=sharing\n */\n\ntype MatchedComparableProduct = {\n uniFiProductId: ComparableProductId;\n label?: string;\n competitorProductId: ComparableProductId;\n properties: Property[];\n};\n\ntype SideBySideMap = {\n label: string;\n matches: MatchedComparableProduct[];\n};\n\nexport type ComparableProductId = Extract<\n ProductId,\n | \"u7proXgs\"\n | \"u7proMax\"\n | \"dS3WAP622GSI\"\n | \"dS3WAP622ESI\"\n | \"ciscoCW9178I\"\n | \"ciscoCW9176I\"\n // external list\n // unifi\n | \"efg\"\n | \"enterpriseCampusAggregation\"\n | \"enterpriseCampus48PoE\"\n | \"envr\"\n | \"e7\"\n | \"e7Campus\"\n | \"g6Dome\"\n | \"doorHub\"\n // cisco\n | \"cw9176l\"\n | \"cw9176d\"\n | \"48uxm-m\"\n | \"ms-425\"\n | \"mx-450\"\n // Verkada\n | \"cd63-dome\"\n | \"ac12-ad64\"\n // HPE/Aruba/Juniper\n | \"arubaEdgeConnect10150\"\n | \"aruba6300m\"\n | \"arubaCx8325\"\n | \"arubaAp755\"\n | \"juniperAp47\"\n // Fortinet\n | \"fortiGate400f\"\n | \"fortiSwitch624f\"\n | \"fortiSwitch2048f\"\n | \"fortiAp441k\"\n>;\n\nexport const productObjMatcher: Record<ComparableProductId, Product> = {\n [ProductId.U7proXgs]: u7proXgs,\n [ProductId.U7ProMax]: u7proMax,\n [ProductId.Efg]: efg,\n [ProductId.EnterpriseCampusAggregation]: enterpriseCampusAggregation,\n [ProductId.EnterpriseCampus48PoE]: enterpriseCampus48PoE,\n [ProductId.Envr]: envr,\n [ProductId.E7]: e7,\n [ProductId.E7Campus]: e7Campus,\n [ProductId.G6Dome]: g6Dome,\n [ProductId.DoorHub]: doorHub,\n [ProductId.CiscoCW9178I]: ciscoCW9178I,\n [ProductId.CiscoCW9176I]: ciscoCW9176I,\n [ProductId.DS3WAP622GSI]: dS3WAP622GSI,\n [ProductId.DS3WAP622ESI]: dS3WAP622ESI,\n // External\n // todo change these to actual products, for now test\n [ProductId.CW9176d]: e7,\n [ProductId.CW9176l]: e7Campus,\n [ProductId.UXM_M]: professional48PoE,\n [ProductId.MS425]: professional24PoE,\n [ProductId.MX450]: professionalHd24Poe,\n [ProductId.CD63Dome]: g6Turret,\n [ProductId.Ac12Ad64]: e7Campus,\n [ProductId.ArubaEdgeConnect10150]: professional48PoE,\n [ProductId.Aruba6300m]: professional24PoE,\n [ProductId.ArubaCx8325]: professionalHd24Poe,\n [ProductId.ArubaAp755]: e7,\n [ProductId.JuniperAp47]: e7Campus,\n [ProductId.Fortigate400F]: professional48PoE,\n [ProductId.FortiSwitch624F]: professional24PoE,\n [ProductId.FortiSwitch2048F]: professionalMax16PoE,\n [ProductId.FortiAp441k]: professionalHd24Poe,\n};\n\nexport const ComparableProductMap: SideBySideMap[] = [\n {\n label: \"Cisco\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.CiscoCW9178I,\n label: \"Cisco Wireless 9178I Access Point (CW9178I)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.CiscoCW9176I,\n label: \"Cisco Wireless 9176I Access Point (CW9176I)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Juniper\",\n matches: [],\n },\n {\n label: \"Netgear\",\n matches: [],\n },\n {\n label: \"Hikvision\",\n matches: [\n {\n uniFiProductId: ProductId.U7proXgs,\n competitorProductId: ProductId.DS3WAP622GSI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622G-SI)\",\n properties: wifiProperties,\n },\n {\n uniFiProductId: ProductId.U7ProMax,\n competitorProductId: ProductId.DS3WAP622ESI,\n label: \"Wi-Fi 6 1800M Ceiling Access Point (DS-3WAP622E-SI)\",\n properties: wifiProperties,\n },\n ],\n },\n {\n label: \"Fortinet\",\n matches: [],\n },\n {\n label: \"Arista\",\n matches: [],\n },\n {\n label: \"Aruba\",\n matches: [],\n },\n {\n label: \"Bosch\",\n matches: [],\n },\n];\n"],"names":["productObjMatcher","ProductId","U7proXgs","u7proXgs","U7ProMax","u7proMax","Efg","efg","EnterpriseCampusAggregation","enterpriseCampusAggregation","EnterpriseCampus48PoE","enterpriseCampus48PoE","Envr","envr","E7","e7","E7Campus","e7Campus","G6Dome","g6Dome","DoorHub","doorHub","CiscoCW9178I","ciscoCW9178I","CiscoCW9176I","ciscoCW9176I","DS3WAP622GSI","dS3WAP622GSI","DS3WAP622ESI","dS3WAP622ESI","CW9176d","CW9176l","UXM_M","professional48PoE","MS425","professional24PoE","MX450","professionalHd24Poe","CD63Dome","g6Turret","Ac12Ad64","ArubaEdgeConnect10150","Aruba6300m","ArubaCx8325","ArubaAp755","JuniperAp47","Fortigate400F","FortiSwitch624F","FortiSwitch2048F","professionalMax16PoE","FortiAp441k","ComparableProductMap","label","matches","uniFiProductId","competitorProductId","properties","wifiProperties"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmFO,MAAMA,iBAA0D,GAAA;EACrE,CAACC,SAAU,CAAAC,QAAQ,GAAGC,QAAA;EACtB,CAACF,SAAU,CAAAG,QAAQ,GAAGC,QAAA;EACtB,CAACJ,SAAU,CAAAK,GAAG,GAAGC,GAAA;EACjB,CAACN,SAAU,CAAAO,2BAA2B,GAAGC,2BAAA;EACzC,CAACR,SAAU,CAAAS,qBAAqB,GAAGC,qBAAA;EACnC,CAACV,SAAU,CAAAW,IAAI,GAAGC,IAAA;EAClB,CAACZ,SAAU,CAAAa,EAAE,GAAGC,EAAA;EAChB,CAACd,SAAU,CAAAe,QAAQ,GAAGC,QAAA;EACtB,CAAChB,SAAU,CAAAiB,MAAM,GAAGC,MAAA;EACpB,CAAClB,SAAU,CAAAmB,OAAO,GAAGC,OAAA;EACrB,CAACpB,SAAU,CAAAqB,YAAY,GAAGC,YAAA;EAC1B,CAACtB,SAAU,CAAAuB,YAAY,GAAGC,YAAA;EAC1B,CAACxB,SAAU,CAAAyB,YAAY,GAAGC,YAAA;EAC1B,CAAC1B,SAAU,CAAA2B,YAAY,GAAGC,YAAA;EAAA;EAAA;EAG1B,CAAC5B,SAAU,CAAA6B,OAA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ED,KAAO,EAAA,WAAA;EACPC,OAAS,EAAA,CACP;IACEC,gBAAgBrD,SAAU,CAAAC,QAAA;IAC1BqD,qBAAqBtD,SAAU,CAAAyB,YAAA;IAC/B0B,KAAO,EAAA,qDAAA;IACPI,UAAY,EAAAC;EACd,CAAA,EACA;IACEH,gBAAgBrD,SAAU,CAAAG,QAAA;IAC1BmD,qBAAqBtD,SAAU,CAAA2B,YAAA;IAC/BwB,KAAO,EAAA,qDAAA;IACPI,UAAY,EAAAC;EAAA,CAAA;AAGlB,CAAA,EACA;EACEL,KAAO,EAAA,UAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,QAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,OAAA;EACPC,SAAS;AACX,CAAA,EACA;EACED,KAAO,EAAA,OAAA;EACPC,SAAS;AAAC,CAAA,CAEd;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ModelCompareV4Props } from "./ModelCompareV4.types";
|
|
2
2
|
export declare const MODEL_COMPARE_V4_ANCHOR = "compare";
|
|
3
|
-
export declare const SideBySideCompare: ({ headerStickOffset, overlayTopOffset, showBuyButton, onLinkClick, linkToStoreTitleClick, isMigrationTable, additionalProductData, section, defaultSelectedProductsCount, selectedProducts: externalSelectedProducts, setSelectedProducts: setExternalSelectedProducts, }: ModelCompareV4Props) => JSX.Element;
|
|
3
|
+
export declare const SideBySideCompare: ({ headerStickOffset, overlayTopOffset, showBuyButton, onLinkClick, linkToStoreTitleClick, isMigrationTable, additionalProductData, section, defaultSelectedProductsCount, selectedProducts: externalSelectedProducts, setSelectedProducts: setExternalSelectedProducts, externalDynamicSection, }: ModelCompareV4Props) => JSX.Element;
|
|
@@ -22,9 +22,10 @@ const SideBySideCompare = ({
|
|
|
22
22
|
section,
|
|
23
23
|
defaultSelectedProductsCount = 2,
|
|
24
24
|
selectedProducts: externalSelectedProducts,
|
|
25
|
-
setSelectedProducts: setExternalSelectedProducts
|
|
25
|
+
setSelectedProducts: setExternalSelectedProducts,
|
|
26
|
+
externalDynamicSection = null
|
|
26
27
|
}) => {
|
|
27
|
-
const [dynamicMigrationSection, setDynamicMigrationSection] = React.useState(
|
|
28
|
+
const [dynamicMigrationSection, setDynamicMigrationSection] = React.useState(externalDynamicSection);
|
|
28
29
|
const hasProductList = React.useMemo(() => section.products.length > 5 && !section.isStaticTable, [section.products, section.isStaticTable]);
|
|
29
30
|
const intersectionObserverObjectRef = React.useRef(null);
|
|
30
31
|
const {
|
|
@@ -92,6 +93,14 @@ const SideBySideCompare = ({
|
|
|
92
93
|
productId: p.id
|
|
93
94
|
})));
|
|
94
95
|
}, [renderDynamicSection]);
|
|
96
|
+
React.useEffect(() => {
|
|
97
|
+
if (externalDynamicSection) {
|
|
98
|
+
setDynamicMigrationSection(externalDynamicSection);
|
|
99
|
+
setSelectedProducts(externalDynamicSection.products.map(p => ({
|
|
100
|
+
productId: p.id
|
|
101
|
+
})));
|
|
102
|
+
}
|
|
103
|
+
}, [externalDynamicSection]);
|
|
95
104
|
return /* @__PURE__ */jsxRuntime.jsxs(ModelCompareV4_styles.Container, {
|
|
96
105
|
children: [/* @__PURE__ */jsxRuntime.jsx(SideBySide.SideBySide, {
|
|
97
106
|
onProductSearchSelect
|
|
@@ -106,8 +115,8 @@ const SideBySideCompare = ({
|
|
|
106
115
|
isMigrationTable: !!isMigrationTable,
|
|
107
116
|
setSelectedProducts,
|
|
108
117
|
setExternalSelectedProducts,
|
|
109
|
-
section: dynamicMigrationSection
|
|
110
|
-
products:
|
|
118
|
+
section: dynamicMigrationSection,
|
|
119
|
+
products: dynamicMigrationSection.products,
|
|
111
120
|
hasBeenObserved: hasBeenObserved || userIsUnderneathIntersectionObserver,
|
|
112
121
|
selectedProductsLimit,
|
|
113
122
|
isOverviewPage: Boolean(section.isOverviewPage),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBySideCompare.js","sources":["../../../src/components/ModelCompareV4/SideBySideCompare.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useWindowScroll } from \"react-use\";\n\nimport type {\n ProductId,\n Section,\n SelectedProduct,\n} from \"../../constants/modelCompareData/types\";\nimport { CompareTable } from \"./CompareTable/CompareTable\";\nimport { SELECTED_PRODUCTS_LIMIT } from \"./constants\";\nimport * as S from \"./ModelCompareV4.styles\";\nimport type { ModelCompareV4Props } from \"./ModelCompareV4.types\";\nimport { productObjMatcher } from \"./SideBySide/configs/masterCompetitorConfig\";\nimport { SideBySide } from \"./SideBySide/SideBySide\";\nimport { type IProductOption } from \"./SideBySide/SideBySide.types\";\n\nexport const MODEL_COMPARE_V4_ANCHOR = \"compare\";\n\nconst INTERSECTION_OBSERVER_THRESHOLD = 0.35;\n\nexport const SideBySideCompare = ({\n headerStickOffset,\n overlayTopOffset,\n showBuyButton,\n onLinkClick,\n linkToStoreTitleClick,\n isMigrationTable,\n additionalProductData,\n section,\n defaultSelectedProductsCount = 2,\n selectedProducts: externalSelectedProducts,\n setSelectedProducts: setExternalSelectedProducts,\n}: ModelCompareV4Props) => {\n const [dynamicMigrationSection, setDynamicMigrationSection] =\n useState<Section | null>(null);\n\n const hasProductList = useMemo(\n () => section.products.length > 5 && !section.isStaticTable,\n [section.products, section.isStaticTable],\n );\n\n const intersectionObserverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const { y: scrollPositionY } = useWindowScroll();\n\n const userIsUnderneathIntersectionObserver = useMemo(() => {\n if (!intersectionObserverObjectRef.current) return false;\n\n return (\n intersectionObserverObjectRef.current.getBoundingClientRect().bottom <\n scrollPositionY\n );\n }, [scrollPositionY]);\n\n /**\n * TODO: Improve the name and logic of this variable and related code.\n * Currently, this variable is used whether ModelCompareV4 has a product list or not.\n * It should only be used if hasProductList is `true`. Why? Because if hasProductList\n * is `false` then selecting/deselecting products isn't possible. The gap between the\n * name of the variable and what it does can be confusing for future devs.\n */\n const defaultSelectedProducts = useMemo(\n () =>\n section.products\n .map((product) => ({ productId: product.id }))\n .slice(\n 0,\n hasProductList\n ? defaultSelectedProductsCount\n : section.products.length,\n ),\n [defaultSelectedProductsCount, hasProductList, section.products],\n );\n /**\n * TODO: rewrite the \"default selected products\" feature so we don't need to use a `useEffect`\n * to update the state of V4. We'll be able to remove this hackie `useRef` as a side-effect.\n */\n const defaultSelectedProductsRef = useRef(defaultSelectedProducts);\n\n const selectedProductsLimit = useMemo(() => {\n return section.products.length < SELECTED_PRODUCTS_LIMIT\n ? section.products.length\n : SELECTED_PRODUCTS_LIMIT;\n }, [section.products.length]);\n\n const [selectedProducts, setSelectedProducts] = useState<SelectedProduct[]>(\n [],\n );\n\n const [hasBeenObserved, setHasBeenObserved] = useState(false);\n\n // #############################################################################\n // Sets selectedProducts value\n // #############################################################################\n\n useEffect(() => {\n defaultSelectedProductsRef.current = defaultSelectedProducts;\n }, [defaultSelectedProducts]);\n\n useEffect(() => {\n setSelectedProducts(\n externalSelectedProducts ||\n (defaultSelectedProductsRef.current as SelectedProduct[]),\n );\n }, [section, externalSelectedProducts]);\n\n // #############################################################################\n // Intersection Observer Logic\n // #############################################################################\n const observerCallback = useCallback<IntersectionObserverCallback>(\n (entries) => {\n entries.forEach(\n (entry) =>\n entry.isIntersecting && !hasBeenObserved && setHasBeenObserved(true),\n );\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [setHasBeenObserved],\n );\n\n useEffect(() => {\n const observer = new IntersectionObserver(observerCallback, {\n threshold: hasProductList ? INTERSECTION_OBSERVER_THRESHOLD : 0,\n });\n\n const intersectionObserverObjectRefCurrent =\n intersectionObserverObjectRef.current;\n\n if (intersectionObserverObjectRefCurrent)\n observer.observe(intersectionObserverObjectRefCurrent);\n\n return () => {\n if (intersectionObserverObjectRefCurrent) {\n observer.unobserve(intersectionObserverObjectRefCurrent);\n observer.disconnect();\n }\n };\n }, [observerCallback, hasProductList]);\n\n const renderDynamicSection = useCallback(\n (match: IProductOption): Section => {\n const { competitorProductId, uniFiProductId, properties } = match;\n\n const unifiProduct = productObjMatcher[uniFiProductId];\n const competitorProduct = productObjMatcher[competitorProductId];\n\n return {\n ...section,\n products: [unifiProduct, competitorProduct],\n properties,\n showBadges: false,\n };\n },\n [section],\n );\n\n const onProductSearchSelect = useCallback(\n (match: IProductOption) => {\n const dynamicSection = renderDynamicSection(match);\n\n if (!dynamicSection) {\n return;\n }\n\n setDynamicMigrationSection(dynamicSection);\n setSelectedProducts(\n dynamicSection.products.map((p) => ({\n productId: p.id as ProductId,\n })),\n );\n },\n [renderDynamicSection],\n );\n\n return (\n <S.Container>\n <SideBySide onProductSearchSelect={onProductSearchSelect} />\n\n {!!dynamicMigrationSection && (\n <CompareTable\n headerStickOffset={headerStickOffset}\n overlayTopOffset={overlayTopOffset}\n showBuyButton={showBuyButton}\n onLinkClick={onLinkClick}\n linkToStoreTitleClick={linkToStoreTitleClick}\n additionalProductData={additionalProductData}\n selectedProducts={selectedProducts}\n isMigrationTable={!!isMigrationTable}\n setSelectedProducts={setSelectedProducts}\n setExternalSelectedProducts={setExternalSelectedProducts}\n section={dynamicMigrationSection || section}\n products={(dynamicMigrationSection || section).products}\n // TODO: rename this property now that `userIsUnderneathIntersectionObserver` has been added\n hasBeenObserved={\n hasBeenObserved || userIsUnderneathIntersectionObserver\n }\n selectedProductsLimit={selectedProductsLimit}\n isOverviewPage={Boolean(section.isOverviewPage)}\n isStaticTable={Boolean(section.isStaticTable)}\n />\n )}\n\n <S.InterSectionObserverObject ref={intersectionObserverObjectRef} />\n </S.Container>\n );\n};\n"],"names":["MODEL_COMPARE_V4_ANCHOR","INTERSECTION_OBSERVER_THRESHOLD","SideBySideCompare","headerStickOffset","overlayTopOffset","showBuyButton","onLinkClick","linkToStoreTitleClick","isMigrationTable","additionalProductData","section","defaultSelectedProductsCount","selectedProducts","externalSelectedProducts","setSelectedProducts","setExternalSelectedProducts","dynamicMigrationSection","setDynamicMigrationSection","useState","hasProductList","useMemo","products","length","isStaticTable","intersectionObserverObjectRef","useRef","y","scrollPositionY","useWindowScroll","userIsUnderneathIntersectionObserver","current","getBoundingClientRect","bottom","defaultSelectedProducts","map","product","productId","id","slice","defaultSelectedProductsRef","selectedProductsLimit","SELECTED_PRODUCTS_LIMIT","hasBeenObserved","setHasBeenObserved","useEffect","observerCallback","useCallback","entries","forEach","entry","isIntersecting","observer","IntersectionObserver","threshold","intersectionObserverObjectRefCurrent","observe","unobserve","disconnect","renderDynamicSection","match","competitorProductId","uniFiProductId","properties","unifiProduct","productObjMatcher","competitorProduct","showBadges","onProductSearchSelect","dynamicSection","p","jsxs","S.Container","children","jsx","SideBySide","CompareTable","isOverviewPage","Boolean","S.InterSectionObserverObject","InterSectionObserverObject","ref"],"mappings":";;;;;;;;;;;AAgBO,MAAMA,uBAA0B,GAAA,SAAA;AAEvC,MAAMC,+BAAkC,GAAA,IAAA;AAEjC,MAAMC,oBAAoBA,CAAC;EAChCC,iBAAA;EACAC,gBAAA;EACAC,aAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,OAAA;EACAC,4BAA+B,GAAA,CAAA;EAC/BC,gBAAkB,EAAAC,wBAAA;EAClBC,mBAAqB,EAAAC;AACvB,CAA2B,KAAA;EACzB,MAAM,CAACC,uBAAA,EAAyBC,0BAA0B,CAAA,GACxDC,KAAAA,CAAAA,SAAyB,IAAI,CAAA;EAE/B,MAAMC,cAAiB,GAAAC,KAAA,CAAAA,OAAA,CACrB,MAAMV,OAAQ,CAAAW,QAAA,CAASC,MAAS,GAAA,CAAA,IAAK,CAACZ,OAAQ,CAAAa,aAAA,EAC9C,CAACb,OAAA,CAAQW,QAAU,EAAAX,OAAA,CAAQa,aAAa,CAC1C,CAAA;EAEM,MAAAC,6BAAA,GAAgCC,aAA8B,IAAI,CAAA;EAExE,MAAM;IAAEC,CAAA,EAAGC;EAAgB,CAAA,GAAIC,wBAAgB,CAAA,CAAA;EAEzC,MAAAC,oCAAA,GAAuCT,KAAAA,CAAAA,QAAQ,MAAM;IACr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],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useWindowScroll } from \"react-use\";\n\nimport type {\n ProductId,\n Section,\n SelectedProduct,\n} from \"../../constants/modelCompareData/types\";\nimport { CompareTable } from \"./CompareTable/CompareTable\";\nimport { SELECTED_PRODUCTS_LIMIT } from \"./constants\";\nimport * as S from \"./ModelCompareV4.styles\";\nimport type { ModelCompareV4Props } from \"./ModelCompareV4.types\";\nimport { productObjMatcher } from \"./SideBySide/configs/masterCompetitorConfig\";\nimport { SideBySide } from \"./SideBySide/SideBySide\";\nimport { type IProductOption } from \"./SideBySide/SideBySide.types\";\n\nexport const MODEL_COMPARE_V4_ANCHOR = \"compare\";\n\nconst INTERSECTION_OBSERVER_THRESHOLD = 0.35;\n\nexport const SideBySideCompare = ({\n headerStickOffset,\n overlayTopOffset,\n showBuyButton,\n onLinkClick,\n linkToStoreTitleClick,\n isMigrationTable,\n additionalProductData,\n section,\n defaultSelectedProductsCount = 2,\n selectedProducts: externalSelectedProducts,\n setSelectedProducts: setExternalSelectedProducts,\n externalDynamicSection = null,\n}: ModelCompareV4Props) => {\n const [dynamicMigrationSection, setDynamicMigrationSection] =\n useState<Section | null>(externalDynamicSection);\n\n const hasProductList = useMemo(\n () => section.products.length > 5 && !section.isStaticTable,\n [section.products, section.isStaticTable],\n );\n\n const intersectionObserverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const { y: scrollPositionY } = useWindowScroll();\n\n const userIsUnderneathIntersectionObserver = useMemo(() => {\n if (!intersectionObserverObjectRef.current) return false;\n\n return (\n intersectionObserverObjectRef.current.getBoundingClientRect().bottom <\n scrollPositionY\n );\n }, [scrollPositionY]);\n\n /**\n * TODO: Improve the name and logic of this variable and related code.\n * Currently, this variable is used whether ModelCompareV4 has a product list or not.\n * It should only be used if hasProductList is `true`. Why? Because if hasProductList\n * is `false` then selecting/deselecting products isn't possible. The gap between the\n * name of the variable and what it does can be confusing for future devs.\n */\n const defaultSelectedProducts = useMemo(\n () =>\n section.products\n .map((product) => ({ productId: product.id }))\n .slice(\n 0,\n hasProductList\n ? defaultSelectedProductsCount\n : section.products.length,\n ),\n [defaultSelectedProductsCount, hasProductList, section.products],\n );\n /**\n * TODO: rewrite the \"default selected products\" feature so we don't need to use a `useEffect`\n * to update the state of V4. We'll be able to remove this hackie `useRef` as a side-effect.\n */\n const defaultSelectedProductsRef = useRef(defaultSelectedProducts);\n\n const selectedProductsLimit = useMemo(() => {\n return section.products.length < SELECTED_PRODUCTS_LIMIT\n ? section.products.length\n : SELECTED_PRODUCTS_LIMIT;\n }, [section.products.length]);\n\n const [selectedProducts, setSelectedProducts] = useState<SelectedProduct[]>(\n [],\n );\n\n const [hasBeenObserved, setHasBeenObserved] = useState(false);\n\n // #############################################################################\n // Sets selectedProducts value\n // #############################################################################\n\n useEffect(() => {\n defaultSelectedProductsRef.current = defaultSelectedProducts;\n }, [defaultSelectedProducts]);\n\n useEffect(() => {\n setSelectedProducts(\n externalSelectedProducts ||\n (defaultSelectedProductsRef.current as SelectedProduct[]),\n );\n }, [section, externalSelectedProducts]);\n\n // #############################################################################\n // Intersection Observer Logic\n // #############################################################################\n const observerCallback = useCallback<IntersectionObserverCallback>(\n (entries) => {\n entries.forEach(\n (entry) =>\n entry.isIntersecting && !hasBeenObserved && setHasBeenObserved(true),\n );\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [setHasBeenObserved],\n );\n\n useEffect(() => {\n const observer = new IntersectionObserver(observerCallback, {\n threshold: hasProductList ? INTERSECTION_OBSERVER_THRESHOLD : 0,\n });\n\n const intersectionObserverObjectRefCurrent =\n intersectionObserverObjectRef.current;\n\n if (intersectionObserverObjectRefCurrent)\n observer.observe(intersectionObserverObjectRefCurrent);\n\n return () => {\n if (intersectionObserverObjectRefCurrent) {\n observer.unobserve(intersectionObserverObjectRefCurrent);\n observer.disconnect();\n }\n };\n }, [observerCallback, hasProductList]);\n\n const renderDynamicSection = useCallback(\n (match: IProductOption): Section => {\n const { competitorProductId, uniFiProductId, properties } = match;\n\n const unifiProduct = productObjMatcher[uniFiProductId];\n const competitorProduct = productObjMatcher[competitorProductId];\n\n return {\n ...section,\n products: [unifiProduct, competitorProduct],\n properties,\n showBadges: false,\n };\n },\n [section],\n );\n\n const onProductSearchSelect = useCallback(\n (match: IProductOption) => {\n const dynamicSection = renderDynamicSection(match);\n\n if (!dynamicSection) {\n return;\n }\n\n setDynamicMigrationSection(dynamicSection);\n setSelectedProducts(\n dynamicSection.products.map((p) => ({\n productId: p.id as ProductId,\n })),\n );\n },\n [renderDynamicSection],\n );\n\n useEffect(() => {\n if (externalDynamicSection) {\n setDynamicMigrationSection(externalDynamicSection);\n setSelectedProducts(\n externalDynamicSection.products.map((p) => ({\n productId: p.id as ProductId,\n })),\n );\n }\n }, [externalDynamicSection]);\n\n return (\n <S.Container>\n <SideBySide onProductSearchSelect={onProductSearchSelect} />\n\n {!!dynamicMigrationSection && (\n <CompareTable\n headerStickOffset={headerStickOffset}\n overlayTopOffset={overlayTopOffset}\n showBuyButton={showBuyButton}\n onLinkClick={onLinkClick}\n linkToStoreTitleClick={linkToStoreTitleClick}\n additionalProductData={additionalProductData}\n selectedProducts={selectedProducts}\n isMigrationTable={!!isMigrationTable}\n setSelectedProducts={setSelectedProducts}\n setExternalSelectedProducts={setExternalSelectedProducts}\n section={dynamicMigrationSection}\n products={dynamicMigrationSection.products}\n // TODO: rename this property now that `userIsUnderneathIntersectionObserver` has been added\n hasBeenObserved={\n hasBeenObserved || userIsUnderneathIntersectionObserver\n }\n selectedProductsLimit={selectedProductsLimit}\n isOverviewPage={Boolean(section.isOverviewPage)}\n isStaticTable={Boolean(section.isStaticTable)}\n />\n )}\n\n <S.InterSectionObserverObject ref={intersectionObserverObjectRef} />\n </S.Container>\n );\n};\n"],"names":["MODEL_COMPARE_V4_ANCHOR","INTERSECTION_OBSERVER_THRESHOLD","SideBySideCompare","headerStickOffset","overlayTopOffset","showBuyButton","onLinkClick","linkToStoreTitleClick","isMigrationTable","additionalProductData","section","defaultSelectedProductsCount","selectedProducts","externalSelectedProducts","setSelectedProducts","setExternalSelectedProducts","externalDynamicSection","dynamicMigrationSection","setDynamicMigrationSection","useState","hasProductList","useMemo","products","length","isStaticTable","intersectionObserverObjectRef","useRef","y","scrollPositionY","useWindowScroll","userIsUnderneathIntersectionObserver","current","getBoundingClientRect","bottom","defaultSelectedProducts","map","product","productId","id","slice","defaultSelectedProductsRef","selectedProductsLimit","SELECTED_PRODUCTS_LIMIT","hasBeenObserved","setHasBeenObserved","useEffect","observerCallback","useCallback","entries","forEach","entry","isIntersecting","observer","IntersectionObserver","threshold","intersectionObserverObjectRefCurrent","observe","unobserve","disconnect","renderDynamicSection","match","competitorProductId","uniFiProductId","properties","unifiProduct","productObjMatcher","competitorProduct","showBadges","onProductSearchSelect","dynamicSection","p","jsxs","S.Container","children","jsx","SideBySide","CompareTable","isOverviewPage","Boolean","S.InterSectionObserverObject","InterSectionObserverObject","ref"],"mappings":";;;;;;;;;;;AAgBO,MAAMA,uBAA0B,GAAA,SAAA;AAEvC,MAAMC,+BAAkC,GAAA,IAAA;AAEjC,MAAMC,oBAAoBA,CAAC;EAChCC,iBAAA;EACAC,gBAAA;EACAC,aAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,OAAA;EACAC,4BAA+B,GAAA,CAAA;EAC/BC,gBAAkB,EAAAC,wBAAA;EAClBC,mBAAqB,EAAAC,2BAAA;EACrBC,sBAAyB,GAAA;AAC3B,CAA2B,KAAA;EACzB,MAAM,CAACC,uBAAA,EAAyBC,0BAA0B,CAAA,GACxDC,KAAAA,CAAAA,SAAyBH,sBAAsB,CAAA;EAEjD,MAAMI,cAAiB,GAAAC,KAAA,CAAAA,OAAA,CACrB,MAAMX,OAAQ,CAAAY,QAAA,CAASC,MAAS,GAAA,CAAA,IAAK,CAACb,OAAQ,CAAAc,aAAA,EAC9C,CAACd,OAAA,CAAQY,QAAU,EAAAZ,OAAA,CAAQc,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L,OAAS,EAAAO,uBAAA;MACTK,UAAUL,uBAAwB,CAAAK,QAAA;MAElCqB,iBACEA,eAAmB,IAAAb,oCAAA;MAErBW,qBAAA;MACAoC,cAAA,EAAgBC,OAAQ,CAAApE,OAAA,CAAQmE,cAAc,CAAA;MAC9CrD,aAAA,EAAesD,OAAQ,CAAApE,OAAA,CAAQc,aAAa;IAAA,CAC9C,CAAA,EAGDkD,eAAAA,UAAAA,CAAAA,GAAA,CAAAK,qBAAA,CAAAC,0BAAA,EAAA;MAA6BC,KAAKxD;IAA+B,CAAA,CAAA;GACpE,CAAA;AAEJ,CAAA;;"}
|
|
@@ -20,9 +20,10 @@ const SideBySideCompare = ({
|
|
|
20
20
|
section,
|
|
21
21
|
defaultSelectedProductsCount = 2,
|
|
22
22
|
selectedProducts: externalSelectedProducts,
|
|
23
|
-
setSelectedProducts: setExternalSelectedProducts
|
|
23
|
+
setSelectedProducts: setExternalSelectedProducts,
|
|
24
|
+
externalDynamicSection = null
|
|
24
25
|
}) => {
|
|
25
|
-
const [dynamicMigrationSection, setDynamicMigrationSection] = useState(
|
|
26
|
+
const [dynamicMigrationSection, setDynamicMigrationSection] = useState(externalDynamicSection);
|
|
26
27
|
const hasProductList = useMemo(() => section.products.length > 5 && !section.isStaticTable, [section.products, section.isStaticTable]);
|
|
27
28
|
const intersectionObserverObjectRef = useRef(null);
|
|
28
29
|
const {
|
|
@@ -90,6 +91,14 @@ const SideBySideCompare = ({
|
|
|
90
91
|
productId: p.id
|
|
91
92
|
})));
|
|
92
93
|
}, [renderDynamicSection]);
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (externalDynamicSection) {
|
|
96
|
+
setDynamicMigrationSection(externalDynamicSection);
|
|
97
|
+
setSelectedProducts(externalDynamicSection.products.map(p => ({
|
|
98
|
+
productId: p.id
|
|
99
|
+
})));
|
|
100
|
+
}
|
|
101
|
+
}, [externalDynamicSection]);
|
|
93
102
|
return /* @__PURE__ */jsxs(Container, {
|
|
94
103
|
children: [/* @__PURE__ */jsx(SideBySide, {
|
|
95
104
|
onProductSearchSelect
|
|
@@ -104,8 +113,8 @@ const SideBySideCompare = ({
|
|
|
104
113
|
isMigrationTable: !!isMigrationTable,
|
|
105
114
|
setSelectedProducts,
|
|
106
115
|
setExternalSelectedProducts,
|
|
107
|
-
section: dynamicMigrationSection
|
|
108
|
-
products:
|
|
116
|
+
section: dynamicMigrationSection,
|
|
117
|
+
products: dynamicMigrationSection.products,
|
|
109
118
|
hasBeenObserved: hasBeenObserved || userIsUnderneathIntersectionObserver,
|
|
110
119
|
selectedProductsLimit,
|
|
111
120
|
isOverviewPage: Boolean(section.isOverviewPage),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBySideCompare.mjs","sources":["../../../src/components/ModelCompareV4/SideBySideCompare.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useWindowScroll } from \"react-use\";\n\nimport type {\n ProductId,\n Section,\n SelectedProduct,\n} from \"../../constants/modelCompareData/types\";\nimport { CompareTable } from \"./CompareTable/CompareTable\";\nimport { SELECTED_PRODUCTS_LIMIT } from \"./constants\";\nimport * as S from \"./ModelCompareV4.styles\";\nimport type { ModelCompareV4Props } from \"./ModelCompareV4.types\";\nimport { productObjMatcher } from \"./SideBySide/configs/masterCompetitorConfig\";\nimport { SideBySide } from \"./SideBySide/SideBySide\";\nimport { type IProductOption } from \"./SideBySide/SideBySide.types\";\n\nexport const MODEL_COMPARE_V4_ANCHOR = \"compare\";\n\nconst INTERSECTION_OBSERVER_THRESHOLD = 0.35;\n\nexport const SideBySideCompare = ({\n headerStickOffset,\n overlayTopOffset,\n showBuyButton,\n onLinkClick,\n linkToStoreTitleClick,\n isMigrationTable,\n additionalProductData,\n section,\n defaultSelectedProductsCount = 2,\n selectedProducts: externalSelectedProducts,\n setSelectedProducts: setExternalSelectedProducts,\n}: ModelCompareV4Props) => {\n const [dynamicMigrationSection, setDynamicMigrationSection] =\n useState<Section | null>(null);\n\n const hasProductList = useMemo(\n () => section.products.length > 5 && !section.isStaticTable,\n [section.products, section.isStaticTable],\n );\n\n const intersectionObserverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const { y: scrollPositionY } = useWindowScroll();\n\n const userIsUnderneathIntersectionObserver = useMemo(() => {\n if (!intersectionObserverObjectRef.current) return false;\n\n return (\n intersectionObserverObjectRef.current.getBoundingClientRect().bottom <\n scrollPositionY\n );\n }, [scrollPositionY]);\n\n /**\n * TODO: Improve the name and logic of this variable and related code.\n * Currently, this variable is used whether ModelCompareV4 has a product list or not.\n * It should only be used if hasProductList is `true`. Why? Because if hasProductList\n * is `false` then selecting/deselecting products isn't possible. The gap between the\n * name of the variable and what it does can be confusing for future devs.\n */\n const defaultSelectedProducts = useMemo(\n () =>\n section.products\n .map((product) => ({ productId: product.id }))\n .slice(\n 0,\n hasProductList\n ? defaultSelectedProductsCount\n : section.products.length,\n ),\n [defaultSelectedProductsCount, hasProductList, section.products],\n );\n /**\n * TODO: rewrite the \"default selected products\" feature so we don't need to use a `useEffect`\n * to update the state of V4. We'll be able to remove this hackie `useRef` as a side-effect.\n */\n const defaultSelectedProductsRef = useRef(defaultSelectedProducts);\n\n const selectedProductsLimit = useMemo(() => {\n return section.products.length < SELECTED_PRODUCTS_LIMIT\n ? section.products.length\n : SELECTED_PRODUCTS_LIMIT;\n }, [section.products.length]);\n\n const [selectedProducts, setSelectedProducts] = useState<SelectedProduct[]>(\n [],\n );\n\n const [hasBeenObserved, setHasBeenObserved] = useState(false);\n\n // #############################################################################\n // Sets selectedProducts value\n // #############################################################################\n\n useEffect(() => {\n defaultSelectedProductsRef.current = defaultSelectedProducts;\n }, [defaultSelectedProducts]);\n\n useEffect(() => {\n setSelectedProducts(\n externalSelectedProducts ||\n (defaultSelectedProductsRef.current as SelectedProduct[]),\n );\n }, [section, externalSelectedProducts]);\n\n // #############################################################################\n // Intersection Observer Logic\n // #############################################################################\n const observerCallback = useCallback<IntersectionObserverCallback>(\n (entries) => {\n entries.forEach(\n (entry) =>\n entry.isIntersecting && !hasBeenObserved && setHasBeenObserved(true),\n );\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [setHasBeenObserved],\n );\n\n useEffect(() => {\n const observer = new IntersectionObserver(observerCallback, {\n threshold: hasProductList ? INTERSECTION_OBSERVER_THRESHOLD : 0,\n });\n\n const intersectionObserverObjectRefCurrent =\n intersectionObserverObjectRef.current;\n\n if (intersectionObserverObjectRefCurrent)\n observer.observe(intersectionObserverObjectRefCurrent);\n\n return () => {\n if (intersectionObserverObjectRefCurrent) {\n observer.unobserve(intersectionObserverObjectRefCurrent);\n observer.disconnect();\n }\n };\n }, [observerCallback, hasProductList]);\n\n const renderDynamicSection = useCallback(\n (match: IProductOption): Section => {\n const { competitorProductId, uniFiProductId, properties } = match;\n\n const unifiProduct = productObjMatcher[uniFiProductId];\n const competitorProduct = productObjMatcher[competitorProductId];\n\n return {\n ...section,\n products: [unifiProduct, competitorProduct],\n properties,\n showBadges: false,\n };\n },\n [section],\n );\n\n const onProductSearchSelect = useCallback(\n (match: IProductOption) => {\n const dynamicSection = renderDynamicSection(match);\n\n if (!dynamicSection) {\n return;\n }\n\n setDynamicMigrationSection(dynamicSection);\n setSelectedProducts(\n dynamicSection.products.map((p) => ({\n productId: p.id as ProductId,\n })),\n );\n },\n [renderDynamicSection],\n );\n\n return (\n <S.Container>\n <SideBySide onProductSearchSelect={onProductSearchSelect} />\n\n {!!dynamicMigrationSection && (\n <CompareTable\n headerStickOffset={headerStickOffset}\n overlayTopOffset={overlayTopOffset}\n showBuyButton={showBuyButton}\n onLinkClick={onLinkClick}\n linkToStoreTitleClick={linkToStoreTitleClick}\n additionalProductData={additionalProductData}\n selectedProducts={selectedProducts}\n isMigrationTable={!!isMigrationTable}\n setSelectedProducts={setSelectedProducts}\n setExternalSelectedProducts={setExternalSelectedProducts}\n section={dynamicMigrationSection || section}\n products={(dynamicMigrationSection || section).products}\n // TODO: rename this property now that `userIsUnderneathIntersectionObserver` has been added\n hasBeenObserved={\n hasBeenObserved || userIsUnderneathIntersectionObserver\n }\n selectedProductsLimit={selectedProductsLimit}\n isOverviewPage={Boolean(section.isOverviewPage)}\n isStaticTable={Boolean(section.isStaticTable)}\n />\n )}\n\n <S.InterSectionObserverObject ref={intersectionObserverObjectRef} />\n </S.Container>\n );\n};\n"],"names":["MODEL_COMPARE_V4_ANCHOR","INTERSECTION_OBSERVER_THRESHOLD","SideBySideCompare","headerStickOffset","overlayTopOffset","showBuyButton","onLinkClick","linkToStoreTitleClick","isMigrationTable","additionalProductData","section","defaultSelectedProductsCount","selectedProducts","externalSelectedProducts","setSelectedProducts","setExternalSelectedProducts","dynamicMigrationSection","setDynamicMigrationSection","useState","hasProductList","useMemo","products","length","isStaticTable","intersectionObserverObjectRef","useRef","y","scrollPositionY","useWindowScroll","userIsUnderneathIntersectionObserver","current","getBoundingClientRect","bottom","defaultSelectedProducts","map","product","productId","id","slice","defaultSelectedProductsRef","selectedProductsLimit","SELECTED_PRODUCTS_LIMIT","hasBeenObserved","setHasBeenObserved","useEffect","observerCallback","useCallback","entries","forEach","entry","isIntersecting","observer","IntersectionObserver","threshold","intersectionObserverObjectRefCurrent","observe","unobserve","disconnect","renderDynamicSection","match","competitorProductId","uniFiProductId","properties","unifiProduct","productObjMatcher","competitorProduct","showBadges","onProductSearchSelect","dynamicSection","p","jsxs","S.Container","children","jsx","SideBySide","CompareTable","isOverviewPage","Boolean","S.InterSectionObserverObject","ref"],"mappings":";;;;;;;;;AAgBO,MAAMA,uBAA0B,GAAA,SAAA;AAEvC,MAAMC,+BAAkC,GAAA,IAAA;AAEjC,MAAMC,oBAAoBA,CAAC;EAChCC,iBAAA;EACAC,gBAAA;EACAC,aAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,OAAA;EACAC,4BAA+B,GAAA,CAAA;EAC/BC,gBAAkB,EAAAC,wBAAA;EAClBC,mBAAqB,EAAAC;AACvB,CAA2B,KA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9C,CAAA,EAGD,eAAAkD,GAAA,CAAAK,0BAAA,EAAA;MAA6BC,KAAKvD;IAA+B,CAAA,CAAA;GACpE,CAAA;AAEJ,CAAA;"}
|
|
1
|
+
{"version":3,"file":"SideBySideCompare.mjs","sources":["../../../src/components/ModelCompareV4/SideBySideCompare.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useWindowScroll } from \"react-use\";\n\nimport type {\n ProductId,\n Section,\n SelectedProduct,\n} from \"../../constants/modelCompareData/types\";\nimport { CompareTable } from \"./CompareTable/CompareTable\";\nimport { SELECTED_PRODUCTS_LIMIT } from \"./constants\";\nimport * as S from \"./ModelCompareV4.styles\";\nimport type { ModelCompareV4Props } from \"./ModelCompareV4.types\";\nimport { productObjMatcher } from \"./SideBySide/configs/masterCompetitorConfig\";\nimport { SideBySide } from \"./SideBySide/SideBySide\";\nimport { type IProductOption } from \"./SideBySide/SideBySide.types\";\n\nexport const MODEL_COMPARE_V4_ANCHOR = \"compare\";\n\nconst INTERSECTION_OBSERVER_THRESHOLD = 0.35;\n\nexport const SideBySideCompare = ({\n headerStickOffset,\n overlayTopOffset,\n showBuyButton,\n onLinkClick,\n linkToStoreTitleClick,\n isMigrationTable,\n additionalProductData,\n section,\n defaultSelectedProductsCount = 2,\n selectedProducts: externalSelectedProducts,\n setSelectedProducts: setExternalSelectedProducts,\n externalDynamicSection = null,\n}: ModelCompareV4Props) => {\n const [dynamicMigrationSection, setDynamicMigrationSection] =\n useState<Section | null>(externalDynamicSection);\n\n const hasProductList = useMemo(\n () => section.products.length > 5 && !section.isStaticTable,\n [section.products, section.isStaticTable],\n );\n\n const intersectionObserverObjectRef = useRef<HTMLDivElement | null>(null);\n\n const { y: scrollPositionY } = useWindowScroll();\n\n const userIsUnderneathIntersectionObserver = useMemo(() => {\n if (!intersectionObserverObjectRef.current) return false;\n\n return (\n intersectionObserverObjectRef.current.getBoundingClientRect().bottom <\n scrollPositionY\n );\n }, [scrollPositionY]);\n\n /**\n * TODO: Improve the name and logic of this variable and related code.\n * Currently, this variable is used whether ModelCompareV4 has a product list or not.\n * It should only be used if hasProductList is `true`. Why? Because if hasProductList\n * is `false` then selecting/deselecting products isn't possible. The gap between the\n * name of the variable and what it does can be confusing for future devs.\n */\n const defaultSelectedProducts = useMemo(\n () =>\n section.products\n .map((product) => ({ productId: product.id }))\n .slice(\n 0,\n hasProductList\n ? defaultSelectedProductsCount\n : section.products.length,\n ),\n [defaultSelectedProductsCount, hasProductList, section.products],\n );\n /**\n * TODO: rewrite the \"default selected products\" feature so we don't need to use a `useEffect`\n * to update the state of V4. We'll be able to remove this hackie `useRef` as a side-effect.\n */\n const defaultSelectedProductsRef = useRef(defaultSelectedProducts);\n\n const selectedProductsLimit = useMemo(() => {\n return section.products.length < SELECTED_PRODUCTS_LIMIT\n ? section.products.length\n : SELECTED_PRODUCTS_LIMIT;\n }, [section.products.length]);\n\n const [selectedProducts, setSelectedProducts] = useState<SelectedProduct[]>(\n [],\n );\n\n const [hasBeenObserved, setHasBeenObserved] = useState(false);\n\n // #############################################################################\n // Sets selectedProducts value\n // #############################################################################\n\n useEffect(() => {\n defaultSelectedProductsRef.current = defaultSelectedProducts;\n }, [defaultSelectedProducts]);\n\n useEffect(() => {\n setSelectedProducts(\n externalSelectedProducts ||\n (defaultSelectedProductsRef.current as SelectedProduct[]),\n );\n }, [section, externalSelectedProducts]);\n\n // #############################################################################\n // Intersection Observer Logic\n // #############################################################################\n const observerCallback = useCallback<IntersectionObserverCallback>(\n (entries) => {\n entries.forEach(\n (entry) =>\n entry.isIntersecting && !hasBeenObserved && setHasBeenObserved(true),\n );\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [setHasBeenObserved],\n );\n\n useEffect(() => {\n const observer = new IntersectionObserver(observerCallback, {\n threshold: hasProductList ? INTERSECTION_OBSERVER_THRESHOLD : 0,\n });\n\n const intersectionObserverObjectRefCurrent =\n intersectionObserverObjectRef.current;\n\n if (intersectionObserverObjectRefCurrent)\n observer.observe(intersectionObserverObjectRefCurrent);\n\n return () => {\n if (intersectionObserverObjectRefCurrent) {\n observer.unobserve(intersectionObserverObjectRefCurrent);\n observer.disconnect();\n }\n };\n }, [observerCallback, hasProductList]);\n\n const renderDynamicSection = useCallback(\n (match: IProductOption): Section => {\n const { competitorProductId, uniFiProductId, properties } = match;\n\n const unifiProduct = productObjMatcher[uniFiProductId];\n const competitorProduct = productObjMatcher[competitorProductId];\n\n return {\n ...section,\n products: [unifiProduct, competitorProduct],\n properties,\n showBadges: false,\n };\n },\n [section],\n );\n\n const onProductSearchSelect = useCallback(\n (match: IProductOption) => {\n const dynamicSection = renderDynamicSection(match);\n\n if (!dynamicSection) {\n return;\n }\n\n setDynamicMigrationSection(dynamicSection);\n setSelectedProducts(\n dynamicSection.products.map((p) => ({\n productId: p.id as ProductId,\n })),\n );\n },\n [renderDynamicSection],\n );\n\n useEffect(() => {\n if (externalDynamicSection) {\n setDynamicMigrationSection(externalDynamicSection);\n setSelectedProducts(\n externalDynamicSection.products.map((p) => ({\n productId: p.id as ProductId,\n })),\n );\n }\n }, [externalDynamicSection]);\n\n return (\n <S.Container>\n <SideBySide onProductSearchSelect={onProductSearchSelect} />\n\n {!!dynamicMigrationSection && (\n <CompareTable\n headerStickOffset={headerStickOffset}\n overlayTopOffset={overlayTopOffset}\n showBuyButton={showBuyButton}\n onLinkClick={onLinkClick}\n linkToStoreTitleClick={linkToStoreTitleClick}\n additionalProductData={additionalProductData}\n selectedProducts={selectedProducts}\n isMigrationTable={!!isMigrationTable}\n setSelectedProducts={setSelectedProducts}\n setExternalSelectedProducts={setExternalSelectedProducts}\n section={dynamicMigrationSection}\n products={dynamicMigrationSection.products}\n // TODO: rename this property now that `userIsUnderneathIntersectionObserver` has been added\n hasBeenObserved={\n hasBeenObserved || userIsUnderneathIntersectionObserver\n }\n selectedProductsLimit={selectedProductsLimit}\n isOverviewPage={Boolean(section.isOverviewPage)}\n isStaticTable={Boolean(section.isStaticTable)}\n />\n )}\n\n <S.InterSectionObserverObject ref={intersectionObserverObjectRef} />\n </S.Container>\n );\n};\n"],"names":["MODEL_COMPARE_V4_ANCHOR","INTERSECTION_OBSERVER_THRESHOLD","SideBySideCompare","headerStickOffset","overlayTopOffset","showBuyButton","onLinkClick","linkToStoreTitleClick","isMigrationTable","additionalProductData","section","defaultSelectedProductsCount","selectedProducts","externalSelectedProducts","setSelectedProducts","setExternalSelectedProducts","externalDynamicSection","dynamicMigrationSection","setDynamicMigrationSection","useState","hasProductList","useMemo","products","length","isStaticTable","intersectionObserverObjectRef","useRef","y","scrollPositionY","useWindowScroll","userIsUnderneathIntersectionObserver","current","getBoundingClientRect","bottom","defaultSelectedProducts","map","product","productId","id","slice","defaultSelectedProductsRef","selectedProductsLimit","SELECTED_PRODUCTS_LIMIT","hasBeenObserved","setHasBeenObserved","useEffect","observerCallback","useCallback","entries","forEach","entry","isIntersecting","observer","IntersectionObserver","threshold","intersectionObserverObjectRefCurrent","observe","unobserve","disconnect","renderDynamicSection","match","competitorProductId","uniFiProductId","properties","unifiProduct","productObjMatcher","competitorProduct","showBadges","onProductSearchSelect","dynamicSection","p","jsxs","S.Container","children","jsx","SideBySide","CompareTable","isOverviewPage","Boolean","S.InterSectionObserverObject","ref"],"mappings":";;;;;;;;;AAgBO,MAAMA,uBAA0B,GAAA,SAAA;AAEvC,MAAMC,+BAAkC,GAAA,IAAA;AAEjC,MAAMC,oBAAoBA,CAAC;EAChCC,iBAAA;EACAC,gBAAA;EACAC,aAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,OAAA;EACAC,4BAA+B,GAAA,CAAA;EAC/BC,gBAAkB,EAAAC,wBAAA;EAClBC,mBAAqB,EAAAC,2BAAA;EACrBC,sBAAyB,GAAA;AAC3B,CAA2B,KAAA;EACzB,MAAM,CAACC,uBAAA,EAAyBC,0BAA0B,CAAA,GACxDC,SAAyBH,sBAAsB,CAAA;EAEjD,MAAMI,cAAiB,GAAAC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BW,qBAAA;MACAoC,cAAA,EAAgBC,OAAQ,CAAApE,OAAA,CAAQmE,cAAc,CAAA;MAC9CrD,aAAA,EAAesD,OAAQ,CAAApE,OAAA,CAAQc,aAAa;IAAA,CAC9C,CAAA,EAGD,eAAAkD,GAAA,CAAAK,0BAAA,EAAA;MAA6BC,KAAKvD;IAA+B,CAAA,CAAA;GACpE,CAAA;AAEJ,CAAA;"}
|
|
@@ -11,8 +11,8 @@ require('../assets/plus.svg.js');
|
|
|
11
11
|
var Layout_styles = require('./Layout.styles.js');
|
|
12
12
|
var CustomImage = require('../../../../../CustomImage/CustomImage.js');
|
|
13
13
|
var StyleableSvgImage = require('../../../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
14
|
-
var MinusIcon = require("../../../../../../assets/
|
|
15
|
-
var PlusIcon = require("../../../../../../assets/
|
|
14
|
+
var MinusIcon = require("../../../../../../assets/minus4.svg");
|
|
15
|
+
var PlusIcon = require("../../../../../../assets/plus4.svg");
|
|
16
16
|
function _interopDefault(e) {
|
|
17
17
|
return e && e.__esModule ? e : {
|
|
18
18
|
default: e
|
|
@@ -9,8 +9,8 @@ import '../assets/plus.svg.mjs';
|
|
|
9
9
|
import { InputWrapper, Label, InputFlexWrapper } from './Layout.styles.mjs';
|
|
10
10
|
import { CustomImage } from '../../../../../CustomImage/CustomImage.mjs';
|
|
11
11
|
import { StyleableSvgImage } from '../../../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
12
|
-
import MinusIcon__default from "../../../../../../assets/
|
|
13
|
-
import PlusIcon__default from "../../../../../../assets/
|
|
12
|
+
import MinusIcon__default from "../../../../../../assets/minus4.svg";
|
|
13
|
+
import PlusIcon__default from "../../../../../../assets/plus4.svg";
|
|
14
14
|
"use strict";
|
|
15
15
|
const CounterSection = ({
|
|
16
16
|
value,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var MinusIcon = require("../../../../../../assets/
|
|
6
|
+
var MinusIcon = require("../../../../../../assets/minus4.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/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/minus4.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/minus4.svg";
|
|
3
3
|
//# sourceMappingURL=minus.svg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var PlusIcon = require("../../../../../../assets/
|
|
6
|
+
var PlusIcon = require("../../../../../../assets/plus4.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/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/plus4.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/plus4.svg";
|
|
3
3
|
//# sourceMappingURL=plus.svg.mjs.map
|
|
@@ -19,8 +19,8 @@ var ComputeResourceCalculator_types = require('../../../../ComputeResourceCalcul
|
|
|
19
19
|
var CustomImage = require('../../../../../CustomImage/CustomImage.js');
|
|
20
20
|
var SearchIcon = require("../../../../../../assets/search2.svg");
|
|
21
21
|
var StyleableSvgImage = require('../../../../../StyleableSvgImage/StyleableSvgImage.js');
|
|
22
|
-
var MinusIcon = require("../../../../../../assets/
|
|
23
|
-
var PlusIcon = require("../../../../../../assets/
|
|
22
|
+
var MinusIcon = require("../../../../../../assets/minus5.svg");
|
|
23
|
+
var PlusIcon = require("../../../../../../assets/plus5.svg");
|
|
24
24
|
function _interopDefault(e) {
|
|
25
25
|
return e && e.__esModule ? e : {
|
|
26
26
|
default: e
|
|
@@ -17,8 +17,8 @@ import { isMessageFormatted } from '../../../../ComputeResourceCalculator/Comput
|
|
|
17
17
|
import { CustomImage } from '../../../../../CustomImage/CustomImage.mjs';
|
|
18
18
|
import SearchIcon__default from "../../../../../../assets/search2.svg";
|
|
19
19
|
import { StyleableSvgImage } from '../../../../../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
20
|
-
import MinusIcon__default from "../../../../../../assets/
|
|
21
|
-
import PlusIcon__default from "../../../../../../assets/
|
|
20
|
+
import MinusIcon__default from "../../../../../../assets/minus5.svg";
|
|
21
|
+
import PlusIcon__default from "../../../../../../assets/plus5.svg";
|
|
22
22
|
"use strict";
|
|
23
23
|
const NoopPlaceholder = () => /* @__PURE__ */jsx(Fragment, {});
|
|
24
24
|
const PoeConsumerSelectModal = ({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var MinusIcon = require("../../../../../../assets/
|
|
6
|
+
var MinusIcon = require("../../../../../../assets/minus5.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/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/minus5.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/minus5.svg";
|
|
3
3
|
//# sourceMappingURL=minus.svg.mjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var PlusIcon = require("../../../../../../assets/
|
|
6
|
+
var PlusIcon = require("../../../../../../assets/plus5.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/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/plus5.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/plus5.svg";
|
|
3
3
|
//# sourceMappingURL=plus.svg.mjs.map
|
|
@@ -19,7 +19,7 @@ var CloseIcon = require("../../../assets/close.svg");
|
|
|
19
19
|
var _externalAssets_DtGmfNK5 = require("../../../assets/closeLarge.svg");
|
|
20
20
|
var _externalAssets_BAXELvSy = require("../../../assets/collapseArrow.svg");
|
|
21
21
|
var _externalAssets_CzDCu21b = require("../../../assets/hamburger.svg");
|
|
22
|
-
var
|
|
22
|
+
var _externalAssets_BclepowY = require("../../../assets/minus.svg");
|
|
23
23
|
var _externalAssets_DSmVXVR0 = require("../../../assets/playCircle.svg");
|
|
24
24
|
var _externalAssets_DD$$IqcQ = require("../../../assets/plus.svg");
|
|
25
25
|
var _externalAssets_g50k1DIN = require("../../../assets/search.svg");
|
|
@@ -37,7 +37,7 @@ var CloseIcon__default = /*#__PURE__*/_interopDefault(CloseIcon);
|
|
|
37
37
|
var _externalAssets_DtGmfNK5__default = /*#__PURE__*/_interopDefault(_externalAssets_DtGmfNK5);
|
|
38
38
|
var _externalAssets_BAXELvSy__default = /*#__PURE__*/_interopDefault(_externalAssets_BAXELvSy);
|
|
39
39
|
var _externalAssets_CzDCu21b__default = /*#__PURE__*/_interopDefault(_externalAssets_CzDCu21b);
|
|
40
|
-
var
|
|
40
|
+
var _externalAssets_BclepowY__default = /*#__PURE__*/_interopDefault(_externalAssets_BclepowY);
|
|
41
41
|
var _externalAssets_DSmVXVR0__default = /*#__PURE__*/_interopDefault(_externalAssets_DSmVXVR0);
|
|
42
42
|
var _externalAssets_DD$$IqcQ__default = /*#__PURE__*/_interopDefault(_externalAssets_DD$$IqcQ);
|
|
43
43
|
var _externalAssets_g50k1DIN__default = /*#__PURE__*/_interopDefault(_externalAssets_g50k1DIN);
|
|
@@ -84,7 +84,7 @@ Object.defineProperty(exports, "hamburger", {
|
|
|
84
84
|
Object.defineProperty(exports, "minus", {
|
|
85
85
|
enumerable: true,
|
|
86
86
|
get: function () {
|
|
87
|
-
return
|
|
87
|
+
return _externalAssets_BclepowY__default["default"];
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "playCircle", {
|
|
@@ -17,7 +17,7 @@ export { default as close } from "../../../assets/close.svg";
|
|
|
17
17
|
export { default as closeLarge } from "../../../assets/closeLarge.svg";
|
|
18
18
|
export { default as collapseArrow } from "../../../assets/collapseArrow.svg";
|
|
19
19
|
export { default as hamburger } from "../../../assets/hamburger.svg";
|
|
20
|
-
export { default as minus } from "../../../assets/
|
|
20
|
+
export { default as minus } from "../../../assets/minus.svg";
|
|
21
21
|
export { default as playCircle } from "../../../assets/playCircle.svg";
|
|
22
22
|
export { default as plus } from "../../../assets/plus.svg";
|
|
23
23
|
export { default as search } from "../../../assets/search.svg";
|