@ubnt/store.core 11.9.3-alpha.22 → 11.9.3-alpha.23
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 +4 -0
- package/lib/assets/ai-360.jpg +0 -0
- package/lib/assets/ai-3602.jpg +0 -0
- package/lib/assets/ai-theta.jpg +0 -0
- package/lib/assets/ai-theta2.jpg +0 -0
- package/lib/assets/ai-turret.jpg +0 -0
- package/lib/assets/ai-turret2.jpg +0 -0
- package/lib/assets/bullet2.svg +4 -2
- package/lib/assets/bullet3.svg +2 -4
- package/lib/assets/compact.svg +2 -2
- package/lib/assets/compact2.svg +2 -2
- package/lib/assets/door-hub-mini.jpg +0 -0
- package/lib/assets/door-hub-mini2.jpg +0 -0
- package/lib/assets/door-hub.jpg +0 -0
- package/lib/assets/door-hub2.jpg +0 -0
- package/lib/assets/floodlight.svg +2 -9
- package/lib/assets/floodlight2.svg +9 -2
- package/lib/assets/g2-reader.jpg +0 -0
- package/lib/assets/g2-reader2.jpg +0 -0
- package/lib/assets/g3-reader-pro.jpg +0 -0
- package/lib/assets/g3-reader-pro2.jpg +0 -0
- package/lib/assets/g3-starter-kit.jpg +0 -0
- package/lib/assets/g3-starter-kit2.jpg +0 -0
- package/lib/assets/g4-ptz.jpg +0 -0
- package/lib/assets/g4-ptz2.jpg +0 -0
- package/lib/assets/g5-flex.jpg +0 -0
- package/lib/assets/g5-flex2.jpg +0 -0
- package/lib/assets/g5-ptz.jpg +0 -0
- package/lib/assets/g5-ptz2.jpg +0 -0
- package/lib/assets/g5-turret-ultra.jpg +0 -0
- package/lib/assets/g5-turret-ultra2.jpg +0 -0
- package/lib/assets/globe.svg +2 -9
- package/lib/assets/globe2.svg +9 -2
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus4.svg +9 -9
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/power.svg +1 -4
- package/lib/assets/power2.svg +4 -1
- package/lib/assets/ptz2.svg +2 -2
- package/lib/assets/ptz3.svg +2 -2
- package/lib/assets/rack.svg +1 -4
- package/lib/assets/rack2.svg +4 -1
- 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/ModelCompareV4/CompareTable/CompareTable.styles.d.ts +0 -4
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.js +0 -16
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.mjs +1 -16
- package/lib/components/ModelCompareV4/CompareTable/CompareTable.styles.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.js +181 -182
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.mjs +182 -183
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.mjs.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.d.ts +2 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.js +6 -2
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.js.map +1 -1
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.mjs +6 -2
- package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/components/StickyGrid/StickyGridHeader.mjs.map +1 -1
- package/lib/components/ModelCompareV4/ModelCompareV4.js +17 -22
- package/lib/components/ModelCompareV4/ModelCompareV4.js.map +1 -1
- package/lib/components/ModelCompareV4/ModelCompareV4.mjs +17 -22
- package/lib/components/ModelCompareV4/ModelCompareV4.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/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/bullet.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/Bullet/bullet.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/Compact/g5-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/Compact/g5-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/ai-turret.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DomeTurret/g5-turret-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/door-hub-mini.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/door-hub.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/door-hub.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-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/DoorAccess/g3-starter-kit.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/g4-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/PTZ/g4-ptz.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/power.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/power.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/bullet.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g5-flex.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/compact/g5-flex.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-360.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/ai-turret.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-turret-ultra.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/dome-and-turret/g5-turret-ultra.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub-mini.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/door-hub.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-pro.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-reader-pro.jpg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/door-access/g3-starter-kit.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/g4-ptz.jpg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/cameras/ptz/g4-ptz.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/product-list-assets/ptz.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/product-list-assets/ptz.svg.mjs +2 -2
- package/lib/constants/modelCompareData/assets/ptz.svg.js +1 -1
- package/lib/constants/modelCompareData/assets/ptz.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/Bullet.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Bullet.mjs +1 -1
- 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-groups/cameraSecurity/Ptz.js +1 -1
- package/lib/constants/modelCompareData/data/product-groups/cameraSecurity/Ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/bullet.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/bullet.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/product-list-groups/ptz.js +1 -1
- package/lib/constants/modelCompareData/data/product-list-groups/ptz.mjs +1 -1
- package/lib/constants/modelCompareData/data/products/ai360.js +2 -2
- package/lib/constants/modelCompareData/data/products/ai360.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/aiTurret.js +2 -2
- package/lib/constants/modelCompareData/data/products/aiTurret.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/doorHub.js +2 -2
- package/lib/constants/modelCompareData/data/products/doorHub.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/doorHubMini.js +2 -2
- package/lib/constants/modelCompareData/data/products/doorHubMini.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/g3ReaderPro.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3ReaderPro.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKit.js +2 -2
- package/lib/constants/modelCompareData/data/products/g3StarterKit.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g4Ptz.js +2 -2
- package/lib/constants/modelCompareData/data/products/g4Ptz.mjs +2 -2
- package/lib/constants/modelCompareData/data/products/g5Flex.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5Flex.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/g5TurretUltra.js +2 -2
- package/lib/constants/modelCompareData/data/products/g5TurretUltra.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/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
|
@@ -157,201 +157,200 @@ const CompareTableMarkup = ({
|
|
|
157
157
|
}
|
|
158
158
|
return () => {};
|
|
159
159
|
}, [isMigrationTable, isSmallScreen, isMigrationTableMobileVersion]);
|
|
160
|
+
const greatestProductHeaderHeight = Math.max(...productHeaderRefs.current.map(header => header?.getBoundingClientRect().height).filter(height => typeof height === "number"));
|
|
161
|
+
console.log(greatestProductHeaderHeight);
|
|
160
162
|
return (
|
|
161
163
|
// APPLY left to right override in all cases rather than redo the model compare for Arabic
|
|
162
164
|
/* @__PURE__ */
|
|
163
165
|
jsxRuntime.jsx("section", {
|
|
164
166
|
dir: utils.LanguageDirectionType.ltr,
|
|
165
|
-
children: /* @__PURE__ */jsxRuntime.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
grid: {
|
|
176
|
-
isAtMinX
|
|
177
|
-
},
|
|
178
|
-
isStuck
|
|
179
|
-
}) => {
|
|
180
|
-
if (!isMigrationTable) return /* @__PURE__ */jsxRuntime.jsx(HeaderShadow.HeaderShadow, {
|
|
181
|
-
leftColumnWidth,
|
|
182
|
-
shadowLeftColumn: isAtMinX,
|
|
183
|
-
show: isStuck
|
|
184
|
-
});
|
|
185
|
-
return null;
|
|
167
|
+
children: /* @__PURE__ */jsxRuntime.jsxs(StickyGrid.StickyGrid, {
|
|
168
|
+
templateColumns,
|
|
169
|
+
children: [/* @__PURE__ */jsxRuntime.jsxs(StickyGridHeader.StickyGridHeader, {
|
|
170
|
+
removePositionSticky: isMigrationTable,
|
|
171
|
+
stickOffset,
|
|
172
|
+
greatestHeaderHeight: greatestProductHeaderHeight,
|
|
173
|
+
onStickyStateChange: setHeaderItemsAreSticking,
|
|
174
|
+
nonScrollChildren: ({
|
|
175
|
+
grid: {
|
|
176
|
+
isAtMinX
|
|
186
177
|
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
})
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
isSmallScreen: isSmallScreen || isMigrationTableMobileVersion,
|
|
241
|
-
onLinkClick,
|
|
242
|
-
showBadges,
|
|
243
|
-
isMigrationTable
|
|
244
|
-
}, `${product.id}-${index}`)]
|
|
245
|
-
}, `${product.id}-${index}`) : /* @__PURE__ */jsxRuntime.jsx(EmptyColumnHeader.EmptyColumnHeader, {
|
|
178
|
+
isStuck
|
|
179
|
+
}) => {
|
|
180
|
+
if (!isMigrationTable) return /* @__PURE__ */jsxRuntime.jsx(HeaderShadow.HeaderShadow, {
|
|
181
|
+
leftColumnWidth,
|
|
182
|
+
shadowLeftColumn: isAtMinX,
|
|
183
|
+
show: isStuck
|
|
184
|
+
});
|
|
185
|
+
return null;
|
|
186
|
+
},
|
|
187
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PlaceholderGridItem, {
|
|
188
|
+
stickX: !isMigrationTable
|
|
189
|
+
}), products.map((product, index) => {
|
|
190
|
+
const headerElement = productHeaderRefs.current[index];
|
|
191
|
+
const gridBodyElement = gridBodyRef.current;
|
|
192
|
+
const headerRect = headerElement?.getBoundingClientRect();
|
|
193
|
+
const gridBodyRect = gridBodyElement?.getBoundingClientRect();
|
|
194
|
+
const greatestProductHeaderHeight2 = Math.max(...productHeaderRefs.current.map(header => header?.getBoundingClientRect().height).filter(height => typeof height === "number"));
|
|
195
|
+
const sharedSpotlightValues = {
|
|
196
|
+
$isSmallScreen: isMigrationTableMobileVersion,
|
|
197
|
+
$coverWidth: (document.documentElement.clientWidth - (headerRect?.width ?? 0)) / 2,
|
|
198
|
+
$columnCoordinates: {
|
|
199
|
+
x: columnPositions[index]?.left ?? 0,
|
|
200
|
+
y: columnPositions[index]?.top ?? 0
|
|
201
|
+
},
|
|
202
|
+
$spotlightDimensions: {
|
|
203
|
+
width: headerRect?.width ?? 0,
|
|
204
|
+
height: greatestProductHeaderHeight2 + (gridBodyRect?.height ?? 0)
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
return product.propertyValues.length ? /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.Container, {
|
|
208
|
+
$isMigrationTable: isMigrationTable,
|
|
209
|
+
children: [isMigrationTable && /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.CompanyLogoWrapper, {
|
|
210
|
+
children: /* @__PURE__ */jsxRuntime.jsx(CompanyLogo.CompanyLogo, {
|
|
211
|
+
company: product.competitorCompany
|
|
212
|
+
})
|
|
213
|
+
}), isMigrationTable && reactDom.createPortal(headerElement && gridBodyElement && product.isSpotlit ? /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
214
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.SpotlightCover, {
|
|
215
|
+
...sharedSpotlightValues
|
|
216
|
+
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.SpotlightCover, {
|
|
217
|
+
$isRightCover: true,
|
|
218
|
+
...sharedSpotlightValues
|
|
219
|
+
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.NDAABadge, {
|
|
220
|
+
src: ndaaBadge__default["default"],
|
|
221
|
+
alt: `The ${formatMessage(product.title)} is NDAA Compliant`,
|
|
222
|
+
$columnCoordinates: sharedSpotlightValues.$columnCoordinates,
|
|
223
|
+
$spotlightWidth: sharedSpotlightValues.$spotlightDimensions.width
|
|
224
|
+
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.Spotlight, {
|
|
225
|
+
$spotlightDimensions: sharedSpotlightValues.$spotlightDimensions,
|
|
226
|
+
$columnCoordinates: sharedSpotlightValues.$columnCoordinates
|
|
227
|
+
})]
|
|
228
|
+
}) : null, document.body), /* @__PURE__ */jsxRuntime.jsx(ProductHeader.ProductHeader, {
|
|
229
|
+
ref: el => productHeaderRefs.current[index] = el,
|
|
230
|
+
isStaticProduct: isStaticTable || !isOverviewPage && index === 0,
|
|
246
231
|
product,
|
|
232
|
+
setSelectedProducts,
|
|
247
233
|
index,
|
|
234
|
+
setExternalState,
|
|
235
|
+
selectedProducts,
|
|
236
|
+
linkToStoreTitleClick,
|
|
248
237
|
hasBeenObserved,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
stickX: !isMigrationTable,
|
|
258
|
-
children: !!leftColumnWidth && /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.PropertyTitleGridItemContent, {
|
|
259
|
-
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyIcon, {
|
|
260
|
-
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
261
|
-
width: 30,
|
|
262
|
-
height: 30,
|
|
263
|
-
src: property.icon
|
|
264
|
-
})
|
|
265
|
-
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTitle, {
|
|
266
|
-
children: property.title.split("\n").map((part, i, arr) => /* @__PURE__ */jsxRuntime.jsxs(React.Fragment, {
|
|
267
|
-
children: [part, i < arr.length - 1 && /* @__PURE__ */jsxRuntime.jsx("br", {})]
|
|
268
|
-
}, i))
|
|
269
|
-
}), property.tooltip && /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.PropertyTooltip, {
|
|
270
|
-
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.TooltipStyles, {
|
|
271
|
-
maxWidth: property.tooltipWidth
|
|
272
|
-
}), /* @__PURE__ */jsxRuntime.jsxs(Tooltip.Tooltip, {
|
|
273
|
-
tooltipClassName: CompareTable_styles.TOOLTIP_CLASS_NAME,
|
|
274
|
-
description: /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTooltipContent, {
|
|
275
|
-
dangerouslySetInnerHTML: {
|
|
276
|
-
__html: property.tooltip
|
|
277
|
-
}
|
|
278
|
-
}),
|
|
279
|
-
portal: true,
|
|
280
|
-
motif: "dark",
|
|
281
|
-
isInteractive: true,
|
|
282
|
-
position: "right",
|
|
283
|
-
width: property.tooltipWidth,
|
|
284
|
-
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTooltipHoverArea, {}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.TooltipIcon, {
|
|
285
|
-
width: 20,
|
|
286
|
-
height: 20,
|
|
287
|
-
src: tooltipIcon__default["default"]
|
|
288
|
-
})]
|
|
289
|
-
})]
|
|
290
|
-
})]
|
|
291
|
-
})
|
|
292
|
-
}), products.map((product, index) => {
|
|
293
|
-
const isLastProduct = index === products.length - 1;
|
|
294
|
-
const productProperty = product.propertyValues?.find(product2 => product2.propertyId === property.id);
|
|
295
|
-
return /* @__PURE__ */jsxRuntime.jsx(PropertyValueGridItem.PropertyValueGridItem, {
|
|
296
|
-
isLastProduct,
|
|
297
|
-
productProperty,
|
|
298
|
-
property,
|
|
299
|
-
includeProperty: isSmallScreen || isMigrationTableMobileVersion,
|
|
300
|
-
index,
|
|
301
|
-
isMigrationTable,
|
|
302
|
-
isSpotlightProduct: !!product.isSpotlit
|
|
303
|
-
}, `${product.id}-${index}`);
|
|
304
|
-
})]
|
|
305
|
-
}, property.id)), hasNotes && /* @__PURE__ */jsxRuntime.jsx(Notes.Notes, {
|
|
306
|
-
products
|
|
307
|
-
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.EmptyPropertyTitleGridItem, {
|
|
308
|
-
stickX: true
|
|
309
|
-
}), products.map((product, index) => renderButton({
|
|
238
|
+
isLessThanOrEqualToFiveProducts,
|
|
239
|
+
hasMultipleProductsSelected,
|
|
240
|
+
isSmallScreen: isSmallScreen || isMigrationTableMobileVersion,
|
|
241
|
+
onLinkClick,
|
|
242
|
+
showBadges,
|
|
243
|
+
isMigrationTable
|
|
244
|
+
}, `${product.id}-${index}`)]
|
|
245
|
+
}, `${product.id}-${index}`) : /* @__PURE__ */jsxRuntime.jsx(EmptyColumnHeader.EmptyColumnHeader, {
|
|
310
246
|
product,
|
|
311
247
|
index,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
|
|
248
|
+
hasBeenObserved,
|
|
249
|
+
maxImageHeight,
|
|
250
|
+
headerItemsAreSticking
|
|
251
|
+
}, `${product.id}-${index}`);
|
|
252
|
+
})]
|
|
253
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(StickyGridBody.StickyGridBody, {
|
|
254
|
+
ref: gridBodyRef,
|
|
255
|
+
children: [properties.map(property => /* @__PURE__ */jsxRuntime.jsxs(React.Fragment, {
|
|
256
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTitleGridItem, {
|
|
257
|
+
stickX: !isMigrationTable,
|
|
258
|
+
children: !!leftColumnWidth && /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.PropertyTitleGridItemContent, {
|
|
259
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyIcon, {
|
|
260
|
+
children: /* @__PURE__ */jsxRuntime.jsx(StyleableSvgImage.StyleableSvgImage, {
|
|
261
|
+
width: 30,
|
|
262
|
+
height: 30,
|
|
263
|
+
src: property.icon
|
|
264
|
+
})
|
|
265
|
+
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTitle, {
|
|
266
|
+
children: property.title.split("\n").map((part, i, arr) => /* @__PURE__ */jsxRuntime.jsxs(React.Fragment, {
|
|
267
|
+
children: [part, i < arr.length - 1 && /* @__PURE__ */jsxRuntime.jsx("br", {})]
|
|
268
|
+
}, i))
|
|
269
|
+
}), property.tooltip && /* @__PURE__ */jsxRuntime.jsxs(CompareTable_styles.PropertyTooltip, {
|
|
270
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.TooltipStyles, {
|
|
271
|
+
maxWidth: property.tooltipWidth
|
|
272
|
+
}), /* @__PURE__ */jsxRuntime.jsxs(Tooltip.Tooltip, {
|
|
273
|
+
tooltipClassName: CompareTable_styles.TOOLTIP_CLASS_NAME,
|
|
274
|
+
description: /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTooltipContent, {
|
|
275
|
+
dangerouslySetInnerHTML: {
|
|
276
|
+
__html: property.tooltip
|
|
277
|
+
}
|
|
278
|
+
}),
|
|
279
|
+
portal: true,
|
|
280
|
+
motif: "dark",
|
|
281
|
+
isInteractive: true,
|
|
282
|
+
position: "right",
|
|
283
|
+
width: property.tooltipWidth,
|
|
284
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.PropertyTooltipHoverArea, {}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.TooltipIcon, {
|
|
285
|
+
width: 20,
|
|
286
|
+
height: 20,
|
|
287
|
+
src: tooltipIcon__default["default"]
|
|
288
|
+
})]
|
|
289
|
+
})]
|
|
290
|
+
})]
|
|
291
|
+
})
|
|
292
|
+
}), products.map((product, index) => {
|
|
293
|
+
const isLastProduct = index === products.length - 1;
|
|
294
|
+
const productProperty = product.propertyValues?.find(product2 => product2.propertyId === property.id);
|
|
295
|
+
return /* @__PURE__ */jsxRuntime.jsx(PropertyValueGridItem.PropertyValueGridItem, {
|
|
296
|
+
isLastProduct,
|
|
297
|
+
productProperty,
|
|
298
|
+
property,
|
|
299
|
+
includeProperty: isSmallScreen || isMigrationTableMobileVersion,
|
|
300
|
+
index,
|
|
301
|
+
isMigrationTable,
|
|
302
|
+
isSpotlightProduct: !!product.isSpotlit
|
|
303
|
+
}, `${product.id}-${index}`);
|
|
317
304
|
})]
|
|
318
|
-
}), /* @__PURE__ */jsxRuntime.jsx(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
totalColumns: products.length,
|
|
331
|
-
totalDeadSpace: leftColumnWidth,
|
|
332
|
-
isSmallScreen: isSmallScreen || isMigrationTableMobileVersion,
|
|
333
|
-
isMigrationTable
|
|
334
|
-
})
|
|
335
|
-
}), /* @__PURE__ */jsxRuntime.jsx(StickyGridOverlay.StickyGridOverlay, {
|
|
336
|
-
style: {
|
|
337
|
-
right: 0
|
|
338
|
-
},
|
|
339
|
-
topOffset: overlayTopOffset,
|
|
340
|
-
children: ({
|
|
341
|
-
isAtMaxX
|
|
342
|
-
}) => /* @__PURE__ */jsxRuntime.jsx(CompareTableOverflowScrollButton.ModelCompareOverflowScrollButton, {
|
|
343
|
-
isLeftButton: false,
|
|
344
|
-
isVisible: !isAtMaxX,
|
|
345
|
-
color: "white",
|
|
346
|
-
rotationDegrees: 0,
|
|
347
|
-
onClickColumnDiff: 1,
|
|
348
|
-
totalColumns: products.length,
|
|
349
|
-
totalDeadSpace: leftColumnWidth,
|
|
350
|
-
isSmallScreen: isSmallScreen || isMigrationTable,
|
|
351
|
-
isMigrationTable
|
|
352
|
-
})
|
|
305
|
+
}, property.id)), hasNotes && /* @__PURE__ */jsxRuntime.jsx(Notes.Notes, {
|
|
306
|
+
products
|
|
307
|
+
}), /* @__PURE__ */jsxRuntime.jsx(CompareTable_styles.EmptyPropertyTitleGridItem, {
|
|
308
|
+
stickX: true
|
|
309
|
+
}), products.map((product, index) => renderButton({
|
|
310
|
+
product,
|
|
311
|
+
index,
|
|
312
|
+
getComingSoonButtonText,
|
|
313
|
+
showBuyButton,
|
|
314
|
+
onLinkClick
|
|
315
|
+
})), hasFootnotes && /* @__PURE__ */jsxRuntime.jsx(FootNotes.FootNotes, {
|
|
316
|
+
products
|
|
353
317
|
})]
|
|
354
|
-
})
|
|
318
|
+
}), /* @__PURE__ */jsxRuntime.jsx(StickyGridOverlay.StickyGridOverlay, {
|
|
319
|
+
style: {
|
|
320
|
+
left: `${leftColumnWidth}px`
|
|
321
|
+
},
|
|
322
|
+
topOffset: overlayTopOffset,
|
|
323
|
+
children: ({
|
|
324
|
+
isAtMinX
|
|
325
|
+
}) => /* @__PURE__ */jsxRuntime.jsx(CompareTableOverflowScrollButton.ModelCompareOverflowScrollButton, {
|
|
326
|
+
isVisible: !isAtMinX,
|
|
327
|
+
color: leftColumnWidth > 0 ? "rgb(23 49 73 / 0.1)" : "white",
|
|
328
|
+
rotationDegrees: 180,
|
|
329
|
+
onClickColumnDiff: -1,
|
|
330
|
+
totalColumns: products.length,
|
|
331
|
+
totalDeadSpace: leftColumnWidth,
|
|
332
|
+
isSmallScreen: isSmallScreen || isMigrationTableMobileVersion,
|
|
333
|
+
isMigrationTable
|
|
334
|
+
})
|
|
335
|
+
}), /* @__PURE__ */jsxRuntime.jsx(StickyGridOverlay.StickyGridOverlay, {
|
|
336
|
+
style: {
|
|
337
|
+
right: 0
|
|
338
|
+
},
|
|
339
|
+
topOffset: overlayTopOffset,
|
|
340
|
+
children: ({
|
|
341
|
+
isAtMaxX
|
|
342
|
+
}) => /* @__PURE__ */jsxRuntime.jsx(CompareTableOverflowScrollButton.ModelCompareOverflowScrollButton, {
|
|
343
|
+
isLeftButton: false,
|
|
344
|
+
isVisible: !isAtMaxX,
|
|
345
|
+
color: "white",
|
|
346
|
+
rotationDegrees: 0,
|
|
347
|
+
onClickColumnDiff: 1,
|
|
348
|
+
totalColumns: products.length,
|
|
349
|
+
totalDeadSpace: leftColumnWidth,
|
|
350
|
+
isSmallScreen: isSmallScreen || isMigrationTable,
|
|
351
|
+
isMigrationTable
|
|
352
|
+
})
|
|
353
|
+
})]
|
|
355
354
|
})
|
|
356
355
|
})
|
|
357
356
|
);
|
package/lib/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompareTableMarkup.js","sources":["../../../../../src/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.tsx"],"sourcesContent":["import { Tooltip } from \"@ubnt/ui-components/Tooltip\";\nimport {\n Fragment,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useWindowSize } from \"react-use\";\n\nimport { CONTAINER_WIDTH } from \"../../../../constants/layout\";\nimport ndaaBadge from \"../../../../constants/modelCompareData/assets/ndaa-compliant.png\";\nimport tooltipIcon from \"../../../../constants/modelCompareData/assets/tooltip-info.svg\";\nimport { emptyColumn } from \"../../../../constants/modelCompareData/data/products/emptyColumn\";\nimport { useModelCompareTranslation } from \"../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport type { MutatedProduct } from \"../../../../constants/modelCompareData/types\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { LanguageDirectionType } from \"../../../../contexts/MenuContext/utils\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport * as S from \"../CompareTable.styles\";\nimport {\n OpacityTransitionContainer,\n TOOLTIP_CLASS_NAME,\n} from \"../CompareTable.styles\";\nimport { getNumberOfColumns } from \"../helpers/getNumberOfColumns\";\nimport { useButtonRenderer } from \"../helpers/RenderButton\";\nimport type { Position } from \"../helpers/useTrackColumnPositions\";\nimport { useTrackColumnPositions } from \"../helpers/useTrackColumnPositions\";\nimport type { CompareTableMarkupProps } from \"./CompareTableMarkup.types\";\nimport { CompanyLogo } from \"./components/CompanyLogo/CompanyLogo\";\nimport { ModelCompareOverflowScrollButton } from \"./components/CompareTableOverflowScrollButton\";\nimport { EmptyColumnHeader } from \"./components/EmptyColumnHeader/EmptyColumnHeader\";\nimport { FootNotes } from \"./components/FootNotes/FootNotes\";\nimport { HeaderShadow } from \"./components/HeaderShadow\";\nimport { Notes } from \"./components/Notes/Notes\";\nimport { ProductHeader } from \"./components/ProductHeader/ProductHeader\";\nimport { PropertyValueGridItem } from \"./components/PropertyValueGridItem\";\nimport {\n StickyGrid,\n StickyGridBody,\n StickyGridHeader,\n StickyGridOverlay,\n} from \"./components/StickyGrid\";\n\nconst SMOOTH_SIZE_REDUCTION = 4;\nexport const MIGRATION_TABLE_BREAKPOINT = 800;\n\nexport const CompareTableMarkup = ({\n products,\n properties,\n columnWidth = 338,\n propertyColumnWidth = 230,\n headerStickOffset,\n overlayTopOffset,\n showBuyButton,\n onLinkClick,\n linkToStoreTitleClick,\n showBadges,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n setExternalState,\n selectedProducts,\n currAvailableProducts,\n isOverviewPage,\n isStaticTable,\n isMigrationTable,\n}: CompareTableMarkupProps) => {\n const { storeId } = useMenu();\n const { formatMessage } = useModelCompareTranslation();\n const renderButton = useButtonRenderer();\n const { width: screenWidth } = useWindowSize();\n const isLessThanOrEqualToFiveProducts = currAvailableProducts.length <= 5;\n const [headerItemsAreSticking, setHeaderItemsAreSticking] = useState(false);\n const [columnPositions, setColumnPositions] = useState<Position[]>([]);\n const [, triggerRender] = useState(0);\n\n const gridBodyRef = useRef<HTMLDivElement | null>(null);\n const productHeaderRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n // #############################################################################\n // Grid calculations\n // #############################################################################\n const isSmallScreen = useMemo(\n () => screenWidth < S.MOBILE_BREAKPOINT,\n [screenWidth],\n );\n\n const isMigrationTableMobileVersion = useMemo(\n () => screenWidth < MIGRATION_TABLE_BREAKPOINT && isMigrationTable,\n [screenWidth, isMigrationTable],\n );\n\n const isGreaterThanDesktopWidth = useMemo(\n () => screenWidth > CONTAINER_WIDTH.DESKTOP,\n [screenWidth],\n );\n\n const leftColumnWidth = useMemo(\n () =>\n isSmallScreen || isMigrationTableMobileVersion\n ? 0\n : Math.min(screenWidth / SMOOTH_SIZE_REDUCTION, propertyColumnWidth),\n [\n isSmallScreen,\n propertyColumnWidth,\n screenWidth,\n isMigrationTableMobileVersion,\n ],\n );\n\n const maxImageHeight = useMemo(\n () => Math.max(...products.map(({ image }) => image.height)),\n [products],\n );\n\n const stickOffset = useMemo(\n () => (headerStickOffset ? headerStickOffset({ maxImageHeight }) : 0),\n [headerStickOffset, maxImageHeight],\n );\n\n const numberOfColumns = useMemo(\n () =>\n isStaticTable\n ? products.length\n : getNumberOfColumns({\n selectedProducts,\n selectedProductsLimit,\n products,\n }),\n [selectedProducts, selectedProductsLimit, products, isStaticTable],\n );\n\n const templateColumnWidth = useMemo(() => {\n const isMigrationDesktop =\n isMigrationTable && !isMigrationTableMobileVersion;\n\n if (isMigrationDesktop) return \"1fr\";\n if (isMigrationTableMobileVersion || isSmallScreen) return \"100%\";\n if (isGreaterThanDesktopWidth) return \"1fr\";\n\n return `${columnWidth}px`;\n }, [\n isSmallScreen,\n columnWidth,\n isGreaterThanDesktopWidth,\n isMigrationTable,\n isMigrationTableMobileVersion,\n ]);\n\n /**\n * 1 sticky left column\n * N non-sticky product columns\n */\n const templateColumns = useMemo(\n () =>\n `${leftColumnWidth}px repeat(${numberOfColumns}, ${templateColumnWidth})`,\n [leftColumnWidth, numberOfColumns, templateColumnWidth],\n );\n\n const hasNotes = useMemo(() => {\n return products.some(({ notes }) => !!notes?.length);\n }, [products]);\n\n const hasFootnotes = useMemo(() => {\n return products.some(({ footnotes }) => footnotes?.length);\n }, [products]);\n\n // #############################################################################\n // Column button\n // #############################################################################\n const getComingSoonButtonText = useCallback(\n (product: MutatedProduct) => {\n const buttonText = product.comingSoonButtonText;\n\n if (typeof buttonText === \"string\") {\n return formatMessage(buttonText);\n }\n\n if (typeof buttonText === \"function\" && !!buttonText(storeId)) {\n const foundKey = buttonText(storeId);\n\n if (foundKey) {\n return formatMessage(foundKey);\n }\n }\n\n return formatMessage(\"Coming Soon\");\n },\n [formatMessage, storeId],\n );\n\n const hasMultipleProductsSelected = useMemo(\n () => products.filter(({ id }) => id !== emptyColumn.id).length > 1,\n [products],\n );\n\n // #############################################################################\n // Sets position of columns for spotlight\n // #############################################################################\n\n useTrackColumnPositions(\n productHeaderRefs,\n useCallback((positions) => {\n setColumnPositions(positions);\n }, []),\n isMigrationTable,\n );\n\n useEffect(() => {\n if (!isMigrationTable) return;\n\n const handleResize = () => {\n triggerRender((n) => n + 1);\n };\n\n window.addEventListener(\"resize\", handleResize);\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [isMigrationTable]);\n\n // #############################################################################\n // Removes overflowX of `body` so spotlights don't cause horizontal scrolling\n // #############################################################################\n\n const originalOverflowXRef = useRef<string | null>(null);\n\n useEffect(() => {\n if (isMigrationTableMobileVersion) {\n if (originalOverflowXRef.current === null) {\n originalOverflowXRef.current = document.body.style.overflowX;\n }\n\n document.body.style.overflowX = \"hidden\";\n\n return () => {\n if (originalOverflowXRef.current !== null) {\n document.body.style.overflowX = originalOverflowXRef.current;\n originalOverflowXRef.current = null;\n }\n };\n }\n\n return () => {};\n }, [isMigrationTable, isSmallScreen, isMigrationTableMobileVersion]);\n\n return (\n // APPLY left to right override in all cases rather than redo the model compare for Arabic\n <section dir={LanguageDirectionType.ltr}>\n <OpacityTransitionContainer\n $hasBeenObserved={hasBeenObserved}\n $isStaticTable={isStaticTable}\n >\n <StickyGrid templateColumns={templateColumns}>\n <StickyGridHeader\n removePositionSticky={isMigrationTable}\n stickOffset={stickOffset}\n onStickyStateChange={setHeaderItemsAreSticking}\n nonScrollChildren={({ grid: { isAtMinX }, isStuck }) => {\n if (!isMigrationTable)\n return (\n <HeaderShadow\n leftColumnWidth={leftColumnWidth}\n shadowLeftColumn={isAtMinX}\n show={isStuck}\n />\n );\n return null;\n }}\n >\n <S.PlaceholderGridItem stickX={!isMigrationTable} />\n {products.map((product, index) => {\n const headerElement = productHeaderRefs.current[index];\n const gridBodyElement = gridBodyRef.current;\n const headerRect = headerElement?.getBoundingClientRect();\n const gridBodyRect = gridBodyElement?.getBoundingClientRect();\n const greatestProductHeaderHeight = Math.max(\n ...productHeaderRefs.current\n .map((header) => header?.getBoundingClientRect().height)\n .filter(\n (height): height is number => typeof height === \"number\",\n ),\n );\n\n const sharedSpotlightValues = {\n $isSmallScreen: isMigrationTableMobileVersion,\n $coverWidth:\n (document.documentElement.clientWidth -\n (headerRect?.width ?? 0)) /\n 2,\n $columnCoordinates: {\n x: columnPositions[index]?.left ?? 0,\n y: columnPositions[index]?.top ?? 0,\n },\n $spotlightDimensions: {\n width: headerRect?.width ?? 0,\n height:\n greatestProductHeaderHeight + (gridBodyRect?.height ?? 0),\n },\n };\n\n return product.propertyValues.length ? (\n <S.Container\n key={`${product.id}-${index}`}\n $isMigrationTable={isMigrationTable}\n >\n {isMigrationTable && (\n <S.CompanyLogoWrapper>\n <CompanyLogo company={product.competitorCompany} />\n </S.CompanyLogoWrapper>\n )}\n {isMigrationTable &&\n createPortal(\n headerElement && gridBodyElement && product.isSpotlit ? (\n <>\n <S.SpotlightCover {...sharedSpotlightValues} />\n <S.SpotlightCover\n $isRightCover\n {...sharedSpotlightValues}\n />\n\n <S.NDAABadge\n src={ndaaBadge as string}\n alt={`The ${formatMessage(product.title)} is NDAA Compliant`}\n $columnCoordinates={\n sharedSpotlightValues.$columnCoordinates\n }\n $spotlightWidth={\n sharedSpotlightValues.$spotlightDimensions.width\n }\n />\n <S.Spotlight\n $spotlightDimensions={\n sharedSpotlightValues.$spotlightDimensions\n }\n $columnCoordinates={\n sharedSpotlightValues.$columnCoordinates\n }\n />\n </>\n ) : null,\n document.body,\n )}\n\n <ProductHeader\n ref={(el) => (productHeaderRefs.current[index] = el)}\n key={`${product.id}-${index}`}\n isStaticProduct={\n isStaticTable || (!isOverviewPage && index === 0)\n }\n product={product}\n setSelectedProducts={setSelectedProducts}\n index={index}\n setExternalState={setExternalState}\n selectedProducts={selectedProducts}\n linkToStoreTitleClick={linkToStoreTitleClick}\n hasBeenObserved={hasBeenObserved}\n isLessThanOrEqualToFiveProducts={\n isLessThanOrEqualToFiveProducts\n }\n hasMultipleProductsSelected={hasMultipleProductsSelected}\n isSmallScreen={\n isSmallScreen || isMigrationTableMobileVersion\n }\n onLinkClick={onLinkClick}\n showBadges={showBadges}\n isMigrationTable={isMigrationTable}\n />\n </S.Container>\n ) : (\n <EmptyColumnHeader\n key={`${product.id}-${index}`}\n product={product}\n index={index}\n hasBeenObserved={hasBeenObserved}\n maxImageHeight={maxImageHeight}\n headerItemsAreSticking={headerItemsAreSticking}\n />\n );\n })}\n </StickyGridHeader>\n\n <StickyGridBody ref={gridBodyRef}>\n {properties.map((property) => (\n <Fragment key={property.id}>\n <S.PropertyTitleGridItem stickX={!isMigrationTable}>\n {!!leftColumnWidth && (\n <S.PropertyTitleGridItemContent>\n <S.PropertyIcon>\n <StyleableSvgImage\n width={30}\n height={30}\n src={property.icon}\n />\n </S.PropertyIcon>\n <S.PropertyTitle>\n {property.title.split(\"\\n\").map((part, i, arr) => (\n <Fragment key={i}>\n {part}\n {i < arr.length - 1 && <br />}\n </Fragment>\n ))}\n </S.PropertyTitle>\n {property.tooltip && (\n <S.PropertyTooltip>\n <S.TooltipStyles maxWidth={property.tooltipWidth} />\n <Tooltip\n tooltipClassName={TOOLTIP_CLASS_NAME}\n description={\n <S.PropertyTooltipContent\n dangerouslySetInnerHTML={{\n __html: property.tooltip,\n }}\n />\n }\n portal\n motif=\"dark\"\n isInteractive\n position=\"right\"\n width={property.tooltipWidth}\n >\n <S.PropertyTooltipHoverArea />\n <S.TooltipIcon\n width={20}\n height={20}\n src={tooltipIcon}\n />\n </Tooltip>\n </S.PropertyTooltip>\n )}\n </S.PropertyTitleGridItemContent>\n )}\n </S.PropertyTitleGridItem>\n\n {products.map((product, index) => {\n const isLastProduct = index === products.length - 1;\n const productProperty = product.propertyValues?.find(\n (product) => product.propertyId === property.id,\n );\n\n return (\n <PropertyValueGridItem\n isLastProduct={isLastProduct}\n key={`${product.id}-${index}`}\n productProperty={productProperty}\n property={property}\n includeProperty={\n isSmallScreen || isMigrationTableMobileVersion\n }\n index={index}\n isMigrationTable={isMigrationTable}\n isSpotlightProduct={!!product.isSpotlit}\n />\n );\n })}\n </Fragment>\n ))}\n\n {/**\n * Notes\n */}\n {hasNotes && <Notes products={products} />}\n\n {/**\n * Buy button\n */}\n <S.EmptyPropertyTitleGridItem stickX />\n {products.map((product, index) =>\n renderButton({\n product,\n index,\n getComingSoonButtonText,\n showBuyButton,\n onLinkClick,\n }),\n )}\n\n {/**\n * Footnotes\n */}\n {hasFootnotes && <FootNotes products={products} />}\n </StickyGridBody>\n\n <StickyGridOverlay\n style={{ left: `${leftColumnWidth}px` }}\n topOffset={overlayTopOffset}\n >\n {({ isAtMinX }) => (\n <ModelCompareOverflowScrollButton\n isVisible={!isAtMinX}\n color={leftColumnWidth > 0 ? \"rgb(23 49 73 / 0.1)\" : \"white\"}\n rotationDegrees={180}\n onClickColumnDiff={-1}\n totalColumns={products.length}\n totalDeadSpace={leftColumnWidth}\n isSmallScreen={isSmallScreen || isMigrationTableMobileVersion}\n isMigrationTable={isMigrationTable}\n />\n )}\n </StickyGridOverlay>\n\n <StickyGridOverlay style={{ right: 0 }} topOffset={overlayTopOffset}>\n {({ isAtMaxX }) => (\n <ModelCompareOverflowScrollButton\n isLeftButton={false}\n isVisible={!isAtMaxX}\n color=\"white\"\n rotationDegrees={0}\n onClickColumnDiff={1}\n totalColumns={products.length}\n totalDeadSpace={leftColumnWidth}\n isSmallScreen={isSmallScreen || isMigrationTable}\n isMigrationTable={isMigrationTable}\n />\n )}\n </StickyGridOverlay>\n </StickyGrid>\n </OpacityTransitionContainer>\n </section>\n );\n};\n"],"names":["SMOOTH_SIZE_REDUCTION","MIGRATION_TABLE_BREAKPOINT","CompareTableMarkup","products","properties","columnWidth","propertyColumnWidth","headerStickOffset","overlayTopOffset","showBuyButton","onLinkClick","linkToStoreTitleClick","showBadges","setSelectedProducts","hasBeenObserved","selectedProductsLimit","setExternalState","selectedProducts","currAvailableProducts","isOverviewPage","isStaticTable","isMigrationTable","storeId","useMenu","formatMessage","useModelCompareTranslation","renderButton","useButtonRenderer","width","screenWidth","useWindowSize","isLessThanOrEqualToFiveProducts","length","headerItemsAreSticking","setHeaderItemsAreSticking","useState","columnPositions","setColumnPositions","triggerRender","gridBodyRef","useRef","productHeaderRefs","isSmallScreen","useMemo","S.MOBILE_BREAKPOINT","MOBILE_BREAKPOINT","isMigrationTableMobileVersion","isGreaterThanDesktopWidth","CONTAINER_WIDTH","DESKTOP","leftColumnWidth","Math","min","maxImageHeight","max","map","image","height","stickOffset","numberOfColumns","getNumberOfColumns","templateColumnWidth","isMigrationDesktop","templateColumns","hasNotes","some","notes","hasFootnotes","footnotes","getComingSoonButtonText","useCallback","product","buttonText","comingSoonButtonText","foundKey","hasMultipleProductsSelected","filter","id","emptyColumn","useTrackColumnPositions","positions","useEffect","handleResize","n","window","addEventListener","removeEventListener","originalOverflowXRef","current","document","body","style","overflowX","jsx","dir","LanguageDirectionType","ltr","children","OpacityTransitionContainer","$hasBeenObserved","$isStaticTable","jsxs","StickyGrid","StickyGridHeader","removePositionSticky","onStickyStateChange","nonScrollChildren","grid","isAtMinX","isStuck","HeaderShadow","shadowLeftColumn","show","S.PlaceholderGridItem","stickX","index","headerElement","gridBodyElement","headerRect","getBoundingClientRect","gridBodyRect","greatestProductHeaderHeight","header","sharedSpotlightValues","$isSmallScreen","$coverWidth","documentElement","clientWidth","$columnCoordinates","x","left","y","top","$spotlightDimensions","propertyValues","S.Container","Container","$isMigrationTable","S.CompanyLogoWrapper","CompanyLogo","company","competitorCompany","createPortal","isSpotlit","Fragment","S.SpotlightCover","SpotlightCover","$isRightCover","S.NDAABadge","NDAABadge","src","ndaaBadge","alt","title","$spotlightWidth","S.Spotlight","Spotlight","ProductHeader","ref","el","isStaticProduct","EmptyColumnHeader","StickyGridBody","property","S.PropertyTitleGridItem","PropertyTitleGridItem","S.PropertyTitleGridItemContent","PropertyTitleGridItemContent","S.PropertyIcon","StyleableSvgImage","icon","S.PropertyTitle","PropertyTitle","split","part","i","arr","tooltip","S.PropertyTooltip","S.TooltipStyles","maxWidth","tooltipWidth","Tooltip","tooltipClassName","TOOLTIP_CLASS_NAME","description","S.PropertyTooltipContent","PropertyTooltipContent","dangerouslySetInnerHTML","__html","portal","motif","isInteractive","position","S.PropertyTooltipHoverArea","S.TooltipIcon","TooltipIcon","tooltipIcon","isLastProduct","productProperty","find","propertyId","PropertyValueGridItem","includeProperty","isSpotlightProduct","Notes","S.EmptyPropertyTitleGridItem","EmptyPropertyTitleGridItem","FootNotes","StickyGridOverlay","topOffset","ModelCompareOverflowScrollButton","isVisible","color","rotationDegrees","onClickColumnDiff","totalColumns","totalDeadSpace","right","isAtMaxX","isLeftButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAMA,qBAAwB,GAAA,CAAA;AACvB,MAAMC,0BAA6B,GAAA,GAAA;AAEnC,MAAMC,qBAAqBA,CAAC;EACjCC,QAAA;EACAC,UAAA;EACAC,WAAc,GAAA,GAAA;EACdC,mBAAsB,GAAA,GAAA;EACtBC,iBAAA;EACAC,gBAAA;EACAC,aAAA;EACAC,WAAA;EACAC,qBAAA;EACAC,UAAA;EACAC,mBAAA;EACAC,eAAA;EACAC,qBAAA;EACAC,gBAAA;EACAC,gBAAA;EACAC,qBAAA;EACAC,cAAA;EACAC,aAAA;EACAC;AACF,CAA+B,KAAA;EACvB,MAAA;IAAEC;EAAQ,CAAA,GAAIC,eAAQ,CAAA,CAAA;EACtB,MAAA;IAAEC;EAAc,CAAA,GAAIC,qDAA2B,CAAA,CAAA;EAC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A,CAAA;cACnBC,cAAcrN,QAAS,CAAA6B,MAAA;cACvByL,cAAgB,EAAAvK,eAAA;cAChBR,eAAeA,aAAiB,IAAAI,6BAAA;cAChCzB;YAAA,CAAA;UACF,CAEJ,CAAA,EAECwE,eAAAA,UAAAA,CAAAA,GAAA,CAAAoH,iBAAAA,CAAAA,iBAAA,EAAA;YAAkBtH,KAAO,EAAA;cAAE+H,KAAO,EAAA;YAAA,CAAK;YAAAR,SAAA,EAAW1M,gBAChD;YAAAyF,QAAA,EAAAA,CAAC;cAAE0H;YACF,CAAA,KAAA,eAAA9H,UAAA,CAAAA,GAAA,CAACsH,gCAAA,CAAAA,gCAAA,EAAA;cACCS,YAAc,EAAA,KAAA;cACdR,WAAW,CAACO,QAAA;cACZN,KAAM,EAAA,OAAA;cACNC,eAAiB,EAAA,CAAA;cACjBC,iBAAmB,EAAA,CAAA;cACnBC,cAAcrN,QAAS,CAAA6B,MAAA;cACvByL,cAAgB,EAAAvK,eAAA;cAChBR,eAAeA,aAAiB,IAAArB,gBAAA;cAChCA;YAAA,CAAA;UAGN,CAAA,CAAA;QACF,CAAA;MAAA,CAAA;IAEJ,CAAA;EAAA;AAEJ,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"CompareTableMarkup.js","sources":["../../../../../src/components/ModelCompareV4/CompareTable/CompareTableMarkup/CompareTableMarkup.tsx"],"sourcesContent":["import { Tooltip } from \"@ubnt/ui-components/Tooltip\";\nimport {\n Fragment,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useWindowSize } from \"react-use\";\n\nimport { CONTAINER_WIDTH } from \"../../../../constants/layout\";\nimport ndaaBadge from \"../../../../constants/modelCompareData/assets/ndaa-compliant.png\";\nimport tooltipIcon from \"../../../../constants/modelCompareData/assets/tooltip-info.svg\";\nimport { emptyColumn } from \"../../../../constants/modelCompareData/data/products/emptyColumn\";\nimport { useModelCompareTranslation } from \"../../../../constants/modelCompareData/translations/useModelCompareTranslation\";\nimport type { MutatedProduct } from \"../../../../constants/modelCompareData/types\";\nimport { useMenu } from \"../../../../contexts/MenuContext\";\nimport { LanguageDirectionType } from \"../../../../contexts/MenuContext/utils\";\nimport { StyleableSvgImage } from \"../../../StyleableSvgImage\";\nimport * as S from \"../CompareTable.styles\";\nimport { TOOLTIP_CLASS_NAME } from \"../CompareTable.styles\";\nimport { getNumberOfColumns } from \"../helpers/getNumberOfColumns\";\nimport { useButtonRenderer } from \"../helpers/RenderButton\";\nimport type { Position } from \"../helpers/useTrackColumnPositions\";\nimport { useTrackColumnPositions } from \"../helpers/useTrackColumnPositions\";\nimport type { CompareTableMarkupProps } from \"./CompareTableMarkup.types\";\nimport { CompanyLogo } from \"./components/CompanyLogo/CompanyLogo\";\nimport { ModelCompareOverflowScrollButton } from \"./components/CompareTableOverflowScrollButton\";\nimport { EmptyColumnHeader } from \"./components/EmptyColumnHeader/EmptyColumnHeader\";\nimport { FootNotes } from \"./components/FootNotes/FootNotes\";\nimport { HeaderShadow } from \"./components/HeaderShadow\";\nimport { Notes } from \"./components/Notes/Notes\";\nimport { ProductHeader } from \"./components/ProductHeader/ProductHeader\";\nimport { PropertyValueGridItem } from \"./components/PropertyValueGridItem\";\nimport {\n StickyGrid,\n StickyGridBody,\n StickyGridHeader,\n StickyGridOverlay,\n} from \"./components/StickyGrid\";\n\nconst SMOOTH_SIZE_REDUCTION = 4;\nexport const MIGRATION_TABLE_BREAKPOINT = 800;\n\nexport const CompareTableMarkup = ({\n products,\n properties,\n columnWidth = 338,\n propertyColumnWidth = 230,\n headerStickOffset,\n overlayTopOffset,\n showBuyButton,\n onLinkClick,\n linkToStoreTitleClick,\n showBadges,\n setSelectedProducts,\n hasBeenObserved,\n selectedProductsLimit,\n setExternalState,\n selectedProducts,\n currAvailableProducts,\n isOverviewPage,\n isStaticTable,\n isMigrationTable,\n}: CompareTableMarkupProps) => {\n const { storeId } = useMenu();\n const { formatMessage } = useModelCompareTranslation();\n const renderButton = useButtonRenderer();\n const { width: screenWidth } = useWindowSize();\n const isLessThanOrEqualToFiveProducts = currAvailableProducts.length <= 5;\n const [headerItemsAreSticking, setHeaderItemsAreSticking] = useState(false);\n const [columnPositions, setColumnPositions] = useState<Position[]>([]);\n const [, triggerRender] = useState(0);\n\n const gridBodyRef = useRef<HTMLDivElement | null>(null);\n const productHeaderRefs = useRef<(HTMLDivElement | null)[]>([]);\n\n // #############################################################################\n // Grid calculations\n // #############################################################################\n const isSmallScreen = useMemo(\n () => screenWidth < S.MOBILE_BREAKPOINT,\n [screenWidth],\n );\n\n const isMigrationTableMobileVersion = useMemo(\n () => screenWidth < MIGRATION_TABLE_BREAKPOINT && isMigrationTable,\n [screenWidth, isMigrationTable],\n );\n\n const isGreaterThanDesktopWidth = useMemo(\n () => screenWidth > CONTAINER_WIDTH.DESKTOP,\n [screenWidth],\n );\n\n const leftColumnWidth = useMemo(\n () =>\n isSmallScreen || isMigrationTableMobileVersion\n ? 0\n : Math.min(screenWidth / SMOOTH_SIZE_REDUCTION, propertyColumnWidth),\n [\n isSmallScreen,\n propertyColumnWidth,\n screenWidth,\n isMigrationTableMobileVersion,\n ],\n );\n\n const maxImageHeight = useMemo(\n () => Math.max(...products.map(({ image }) => image.height)),\n [products],\n );\n\n const stickOffset = useMemo(\n () => (headerStickOffset ? headerStickOffset({ maxImageHeight }) : 0),\n [headerStickOffset, maxImageHeight],\n );\n\n const numberOfColumns = useMemo(\n () =>\n isStaticTable\n ? products.length\n : getNumberOfColumns({\n selectedProducts,\n selectedProductsLimit,\n products,\n }),\n [selectedProducts, selectedProductsLimit, products, isStaticTable],\n );\n\n const templateColumnWidth = useMemo(() => {\n const isMigrationDesktop =\n isMigrationTable && !isMigrationTableMobileVersion;\n\n if (isMigrationDesktop) return \"1fr\";\n if (isMigrationTableMobileVersion || isSmallScreen) return \"100%\";\n if (isGreaterThanDesktopWidth) return \"1fr\";\n\n return `${columnWidth}px`;\n }, [\n isSmallScreen,\n columnWidth,\n isGreaterThanDesktopWidth,\n isMigrationTable,\n isMigrationTableMobileVersion,\n ]);\n\n /**\n * 1 sticky left column\n * N non-sticky product columns\n */\n const templateColumns = useMemo(\n () =>\n `${leftColumnWidth}px repeat(${numberOfColumns}, ${templateColumnWidth})`,\n [leftColumnWidth, numberOfColumns, templateColumnWidth],\n );\n\n const hasNotes = useMemo(() => {\n return products.some(({ notes }) => !!notes?.length);\n }, [products]);\n\n const hasFootnotes = useMemo(() => {\n return products.some(({ footnotes }) => footnotes?.length);\n }, [products]);\n\n // #############################################################################\n // Column button\n // #############################################################################\n const getComingSoonButtonText = useCallback(\n (product: MutatedProduct) => {\n const buttonText = product.comingSoonButtonText;\n\n if (typeof buttonText === \"string\") {\n return formatMessage(buttonText);\n }\n\n if (typeof buttonText === \"function\" && !!buttonText(storeId)) {\n const foundKey = buttonText(storeId);\n\n if (foundKey) {\n return formatMessage(foundKey);\n }\n }\n\n return formatMessage(\"Coming Soon\");\n },\n [formatMessage, storeId],\n );\n\n const hasMultipleProductsSelected = useMemo(\n () => products.filter(({ id }) => id !== emptyColumn.id).length > 1,\n [products],\n );\n\n // #############################################################################\n // Sets position of columns for spotlight\n // #############################################################################\n\n useTrackColumnPositions(\n productHeaderRefs,\n useCallback((positions) => {\n setColumnPositions(positions);\n }, []),\n isMigrationTable,\n );\n\n useEffect(() => {\n if (!isMigrationTable) return;\n\n const handleResize = () => {\n triggerRender((n) => n + 1);\n };\n\n window.addEventListener(\"resize\", handleResize);\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [isMigrationTable]);\n\n // #############################################################################\n // Removes overflowX of `body` so spotlights don't cause horizontal scrolling\n // #############################################################################\n\n const originalOverflowXRef = useRef<string | null>(null);\n\n useEffect(() => {\n if (isMigrationTableMobileVersion) {\n if (originalOverflowXRef.current === null) {\n originalOverflowXRef.current = document.body.style.overflowX;\n }\n\n document.body.style.overflowX = \"hidden\";\n\n return () => {\n if (originalOverflowXRef.current !== null) {\n document.body.style.overflowX = originalOverflowXRef.current;\n originalOverflowXRef.current = null;\n }\n };\n }\n\n return () => {};\n }, [isMigrationTable, isSmallScreen, isMigrationTableMobileVersion]);\n\n const greatestProductHeaderHeight = Math.max(\n ...productHeaderRefs.current\n .map((header) => header?.getBoundingClientRect().height)\n .filter((height): height is number => typeof height === \"number\"),\n );\n\n console.log(greatestProductHeaderHeight);\n\n return (\n // APPLY left to right override in all cases rather than redo the model compare for Arabic\n <section dir={LanguageDirectionType.ltr}>\n <StickyGrid templateColumns={templateColumns}>\n <StickyGridHeader\n removePositionSticky={isMigrationTable}\n stickOffset={stickOffset}\n greatestHeaderHeight={greatestProductHeaderHeight}\n onStickyStateChange={setHeaderItemsAreSticking}\n nonScrollChildren={({ grid: { isAtMinX }, isStuck }) => {\n if (!isMigrationTable)\n return (\n <HeaderShadow\n leftColumnWidth={leftColumnWidth}\n shadowLeftColumn={isAtMinX}\n show={isStuck}\n />\n );\n return null;\n }}\n >\n <S.PlaceholderGridItem stickX={!isMigrationTable} />\n {products.map((product, index) => {\n const headerElement = productHeaderRefs.current[index];\n const gridBodyElement = gridBodyRef.current;\n const headerRect = headerElement?.getBoundingClientRect();\n const gridBodyRect = gridBodyElement?.getBoundingClientRect();\n const greatestProductHeaderHeight = Math.max(\n ...productHeaderRefs.current\n .map((header) => header?.getBoundingClientRect().height)\n .filter(\n (height): height is number => typeof height === \"number\",\n ),\n );\n\n const sharedSpotlightValues = {\n $isSmallScreen: isMigrationTableMobileVersion,\n $coverWidth:\n (document.documentElement.clientWidth -\n (headerRect?.width ?? 0)) /\n 2,\n $columnCoordinates: {\n x: columnPositions[index]?.left ?? 0,\n y: columnPositions[index]?.top ?? 0,\n },\n $spotlightDimensions: {\n width: headerRect?.width ?? 0,\n height:\n greatestProductHeaderHeight + (gridBodyRect?.height ?? 0),\n },\n };\n\n return product.propertyValues.length ? (\n <S.Container\n key={`${product.id}-${index}`}\n $isMigrationTable={isMigrationTable}\n >\n {isMigrationTable && (\n <S.CompanyLogoWrapper>\n <CompanyLogo company={product.competitorCompany} />\n </S.CompanyLogoWrapper>\n )}\n {isMigrationTable &&\n createPortal(\n headerElement && gridBodyElement && product.isSpotlit ? (\n <>\n <S.SpotlightCover {...sharedSpotlightValues} />\n <S.SpotlightCover\n $isRightCover\n {...sharedSpotlightValues}\n />\n\n <S.NDAABadge\n src={ndaaBadge as string}\n alt={`The ${formatMessage(product.title)} is NDAA Compliant`}\n $columnCoordinates={\n sharedSpotlightValues.$columnCoordinates\n }\n $spotlightWidth={\n sharedSpotlightValues.$spotlightDimensions.width\n }\n />\n <S.Spotlight\n $spotlightDimensions={\n sharedSpotlightValues.$spotlightDimensions\n }\n $columnCoordinates={\n sharedSpotlightValues.$columnCoordinates\n }\n />\n </>\n ) : null,\n document.body,\n )}\n\n <ProductHeader\n ref={(el) => (productHeaderRefs.current[index] = el)}\n key={`${product.id}-${index}`}\n isStaticProduct={\n isStaticTable || (!isOverviewPage && index === 0)\n }\n product={product}\n setSelectedProducts={setSelectedProducts}\n index={index}\n setExternalState={setExternalState}\n selectedProducts={selectedProducts}\n linkToStoreTitleClick={linkToStoreTitleClick}\n hasBeenObserved={hasBeenObserved}\n isLessThanOrEqualToFiveProducts={\n isLessThanOrEqualToFiveProducts\n }\n hasMultipleProductsSelected={hasMultipleProductsSelected}\n isSmallScreen={isSmallScreen || isMigrationTableMobileVersion}\n onLinkClick={onLinkClick}\n showBadges={showBadges}\n isMigrationTable={isMigrationTable}\n />\n </S.Container>\n ) : (\n <EmptyColumnHeader\n key={`${product.id}-${index}`}\n product={product}\n index={index}\n hasBeenObserved={hasBeenObserved}\n maxImageHeight={maxImageHeight}\n headerItemsAreSticking={headerItemsAreSticking}\n />\n );\n })}\n </StickyGridHeader>\n\n <StickyGridBody ref={gridBodyRef}>\n {properties.map((property) => (\n <Fragment key={property.id}>\n <S.PropertyTitleGridItem stickX={!isMigrationTable}>\n {!!leftColumnWidth && (\n <S.PropertyTitleGridItemContent>\n <S.PropertyIcon>\n <StyleableSvgImage\n width={30}\n height={30}\n src={property.icon}\n />\n </S.PropertyIcon>\n <S.PropertyTitle>\n {property.title.split(\"\\n\").map((part, i, arr) => (\n <Fragment key={i}>\n {part}\n {i < arr.length - 1 && <br />}\n </Fragment>\n ))}\n </S.PropertyTitle>\n {property.tooltip && (\n <S.PropertyTooltip>\n <S.TooltipStyles maxWidth={property.tooltipWidth} />\n <Tooltip\n tooltipClassName={TOOLTIP_CLASS_NAME}\n description={\n <S.PropertyTooltipContent\n dangerouslySetInnerHTML={{\n __html: property.tooltip,\n }}\n />\n }\n portal\n motif=\"dark\"\n isInteractive\n position=\"right\"\n width={property.tooltipWidth}\n >\n <S.PropertyTooltipHoverArea />\n <S.TooltipIcon\n width={20}\n height={20}\n src={tooltipIcon}\n />\n </Tooltip>\n </S.PropertyTooltip>\n )}\n </S.PropertyTitleGridItemContent>\n )}\n </S.PropertyTitleGridItem>\n\n {products.map((product, index) => {\n const isLastProduct = index === products.length - 1;\n const productProperty = product.propertyValues?.find(\n (product) => product.propertyId === property.id,\n );\n\n return (\n <PropertyValueGridItem\n isLastProduct={isLastProduct}\n key={`${product.id}-${index}`}\n productProperty={productProperty}\n property={property}\n includeProperty={\n isSmallScreen || isMigrationTableMobileVersion\n }\n index={index}\n isMigrationTable={isMigrationTable}\n isSpotlightProduct={!!product.isSpotlit}\n />\n );\n })}\n </Fragment>\n ))}\n\n {/**\n * Notes\n */}\n {hasNotes && <Notes products={products} />}\n\n {/**\n * Buy button\n */}\n <S.EmptyPropertyTitleGridItem stickX />\n {products.map((product, index) =>\n renderButton({\n product,\n index,\n getComingSoonButtonText,\n showBuyButton,\n onLinkClick,\n }),\n )}\n\n {/**\n * Footnotes\n */}\n {hasFootnotes && <FootNotes products={products} />}\n </StickyGridBody>\n\n <StickyGridOverlay\n style={{ left: `${leftColumnWidth}px` }}\n topOffset={overlayTopOffset}\n >\n {({ isAtMinX }) => (\n <ModelCompareOverflowScrollButton\n isVisible={!isAtMinX}\n color={leftColumnWidth > 0 ? \"rgb(23 49 73 / 0.1)\" : \"white\"}\n rotationDegrees={180}\n onClickColumnDiff={-1}\n totalColumns={products.length}\n totalDeadSpace={leftColumnWidth}\n isSmallScreen={isSmallScreen || isMigrationTableMobileVersion}\n isMigrationTable={isMigrationTable}\n />\n )}\n </StickyGridOverlay>\n\n <StickyGridOverlay style={{ right: 0 }} topOffset={overlayTopOffset}>\n {({ isAtMaxX }) => (\n <ModelCompareOverflowScrollButton\n isLeftButton={false}\n isVisible={!isAtMaxX}\n color=\"white\"\n rotationDegrees={0}\n onClickColumnDiff={1}\n totalColumns={products.length}\n totalDeadSpace={leftColumnWidth}\n isSmallScreen={isSmallScreen || isMigrationTable}\n isMigrationTable={isMigrationTable}\n />\n )}\n </StickyGridOverlay>\n </StickyGrid>\n </section>\n );\n};\n"],"names":["SMOOTH_SIZE_REDUCTION","MIGRATION_TABLE_BREAKPOINT","CompareTableMarkup","products","properties","columnWidth","propertyColumnWidth","headerStickOffset","overlayTopOffset","showBuyButton","onLinkClick","linkToStoreTitleClick","showBadges","setSelectedProducts","hasBeenObserved","selectedProductsLimit","setExternalState","selectedProducts","currAvailableProducts","isOverviewPage","isStaticTable","isMigrationTable","storeId","useMenu","formatMessage","useModelCompareTranslation","renderButton","useButtonRenderer","width","screenWidth","useWindowSize","isLessThanOrEqualToFiveProducts","length","headerItemsAreSticking","setHeaderItemsAreSticking","useState","columnPositions","setColumnPositions","triggerRender","gridBodyRef","useRef","productHeaderRefs","isSmallScreen","useMemo","S.MOBILE_BREAKPOINT","MOBILE_BREAKPOINT","isMigrationTableMobileVersion","isGreaterThanDesktopWidth","CONTAINER_WIDTH","DESKTOP","leftColumnWidth","Math","min","maxImageHeight","max","map","image","height","stickOffset","numberOfColumns","getNumberOfColumns","templateColumnWidth","isMigrationDesktop","templateColumns","hasNotes","some","notes","hasFootnotes","footnotes","getComingSoonButtonText","useCallback","product","buttonText","comingSoonButtonText","foundKey","hasMultipleProductsSelected","filter","id","emptyColumn","useTrackColumnPositions","positions","useEffect","handleResize","n","window","addEventListener","removeEventListener","originalOverflowXRef","current","document","body","style","overflowX","greatestProductHeaderHeight","header","getBoundingClientRect","console","log","dir","LanguageDirectionType","ltr","children","jsxs","StickyGrid","StickyGridHeader","removePositionSticky","greatestHeaderHeight","onStickyStateChange","nonScrollChildren","grid","isAtMinX","isStuck","jsx","HeaderShadow","shadowLeftColumn","show","S.PlaceholderGridItem","stickX","index","headerElement","gridBodyElement","headerRect","gridBodyRect","sharedSpotlightValues","$isSmallScreen","$coverWidth","documentElement","clientWidth","$columnCoordinates","x","left","y","top","$spotlightDimensions","propertyValues","S.Container","Container","$isMigrationTable","S.CompanyLogoWrapper","CompanyLogo","company","competitorCompany","createPortal","isSpotlit","Fragment","S.SpotlightCover","SpotlightCover","$isRightCover","S.NDAABadge","NDAABadge","src","ndaaBadge","alt","title","$spotlightWidth","S.Spotlight","Spotlight","ProductHeader","ref","el","isStaticProduct","EmptyColumnHeader","StickyGridBody","property","S.PropertyTitleGridItem","PropertyTitleGridItem","S.PropertyTitleGridItemContent","PropertyTitleGridItemContent","S.PropertyIcon","StyleableSvgImage","icon","S.PropertyTitle","PropertyTitle","split","part","i","arr","tooltip","S.PropertyTooltip","S.TooltipStyles","maxWidth","tooltipWidth","Tooltip","tooltipClassName","TOOLTIP_CLASS_NAME","description","S.PropertyTooltipContent","PropertyTooltipContent","dangerouslySetInnerHTML","__html","portal","motif","isInteractive","position","S.PropertyTooltipHoverArea","S.TooltipIcon","TooltipIcon","tooltipIcon","isLastProduct","productProperty","find","propertyId","PropertyValueGridItem","includeProperty","isSpotlightProduct","Notes","S.EmptyPropertyTitleGridItem","EmptyPropertyTitleGridItem","FootNotes","StickyGridOverlay","topOffset","ModelCompareOverflowScrollButton","isVisible","color","rotationDegrees","onClickColumnDiff","totalColumns","totalDeadSpace","right","isAtMaxX","isLeftButton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAMA,qBAAwB,GAAA,CA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