@ubnt/store.core 9.54.1-imgc.1 → 9.54.2-beta.0
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 +523 -3
- package/lib/_virtual/_virtual_multi-entry.js +15 -2
- package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
- package/lib/_virtual/_virtual_multi-entry.mjs +2 -0
- package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
- package/lib/assets/attention.svg +5 -5
- package/lib/assets/attention2.svg +5 -5
- package/lib/assets/crestron.svg +3 -0
- package/lib/assets/icons/wizard/plus.svg.js +1 -1
- package/lib/assets/icons/wizard/plus.svg.mjs +2 -2
- package/lib/assets/minus4.svg +8 -8
- package/lib/assets/minus5.svg +8 -8
- package/lib/assets/plus.svg +22 -4
- package/lib/assets/plus2.svg +4 -22
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/components/BackInStock/BackInStock.types.d.ts +1 -0
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.d.ts +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js +16 -4
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs +17 -5
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.d.ts +5 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js +82 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.js.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs +82 -17
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.styles.mjs.map +1 -1
- package/lib/components/ButtonGroupBasic/ButtonGroupBasic.types.d.ts +4 -0
- package/lib/components/Explore/ExploreData.js +12 -12
- package/lib/components/Explore/ExploreData.js.map +1 -1
- package/lib/components/Explore/ExploreData.mjs +12 -12
- package/lib/components/Explore/ExploreData.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.js +1 -1
- package/lib/components/FeaturesSection_deprecated/AllFeaturesButton/AllFeaturesButton.mjs +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/plus.svg.mjs +2 -2
- package/lib/components/Header/Header.js +3 -3
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mjs +3 -3
- package/lib/components/Header/Header.mjs.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.js +5 -4
- package/lib/components/ImageCarousel/ImageCarousel.js.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.mjs +5 -4
- package/lib/components/ImageCarousel/ImageCarousel.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +1 -0
- package/lib/components/ModelCompareV3/assets/crestron.svg.js +27 -0
- package/lib/components/ModelCompareV3/assets/crestron.svg.js.map +1 -0
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs +3 -0
- package/lib/components/ModelCompareV3/assets/crestron.svg.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js +3 -2
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs +3 -2
- package/lib/components/ModelCompareV3/data/EnterpriseSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js +10 -3
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs +10 -3
- package/lib/components/ModelCompareV3/data/ProfessionalMaxSwitching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.js +3 -2
- package/lib/components/ModelCompareV3/data/Switching.js.map +1 -1
- package/lib/components/ModelCompareV3/data/Switching.mjs +3 -2
- package/lib/components/ModelCompareV3/data/Switching.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.js +7 -0
- package/lib/components/ModelCompareV3/data/products/aggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/aggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js +4 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs +2 -2
- package/lib/components/ModelCompareV3/data/products/cloudKeyG2Plus.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js +7 -0
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/enterpriseAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js +7 -0
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js +7 -0
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/enterpriseCampus48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.js +3 -3
- package/lib/components/ModelCompareV3/data/products/express.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/express.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/express.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLite.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayLite.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs +4 -2
- package/lib/components/ModelCompareV3/data/products/gatewayProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js +7 -0
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/highCapacityAggregation.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.js +7 -0
- package/lib/components/ModelCompareV3/data/products/missionCritical.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/missionCritical.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js +3 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs +3 -1
- package/lib/components/ModelCompareV3/data/products/officialUniFiHosting.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalHd24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalHd24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalHd24Poe.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax16.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax16.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax16PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax24.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax24.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax24PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax48.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax48.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/professionalMax48PoE.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js +8 -0
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs +8 -0
- package/lib/components/ModelCompareV3/data/products/switchesEnterprise.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js +7 -0
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/switchesProfessional.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js +7 -0
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalHd.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js +10 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs +10 -1
- package/lib/components/ModelCompareV3/data/products/switchesProfessionalMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js +7 -0
- package/lib/components/ModelCompareV3/data/products/switchesStandard.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs +7 -0
- package/lib/components/ModelCompareV3/data/products/switchesStandard.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.js +5 -41
- package/lib/components/ModelCompareV3/data/products/udr.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udr.mjs +5 -21
- package/lib/components/ModelCompareV3/data/products/udr.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.js +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
- package/lib/components/ModelCompareV3/data/products/udw.mjs +3 -3
- package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.d.ts +2 -0
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js +18 -0
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.js.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs +10 -0
- package/lib/components/ModelCompareV3/data/properties/crestronNaxNvxCertified.mjs.map +1 -0
- package/lib/components/ModelCompareV3/data/properties/index.d.ts +1 -0
- package/lib/components/ModelCompareV3/data/properties/index.js +2 -0
- package/lib/components/ModelCompareV3/data/properties/index.js.map +1 -1
- package/lib/components/ModelCompareV3/data/properties/index.mjs +1 -0
- package/lib/components/ModelCompareV3/data/properties/index.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.js +2 -0
- package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
- package/lib/components/ModelCompareV3/translations/en.json.mjs +2 -0
- package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
- package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
- package/lib/components/ProductWizard/ProductWizard.js +1 -1
- package/lib/components/ProductWizard/ProductWizard.mjs +1 -1
- package/lib/components/QuantityInput/QuantityInput.js +1 -1
- package/lib/components/QuantityInput/QuantityInput.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +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/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/attention.svg.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/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/ProgressBarChart.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/ProgressBarChart/assets/attention.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/proStoreCategories/mapping/index.d.ts +3 -2
- package/lib/constants/proStoreCategories/mapping/index.js +36 -46
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +35 -44
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.js +18 -3
- package/lib/constants/proStoreCategories/mapping/redirects.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/redirects.mjs +18 -3
- package/lib/constants/proStoreCategories/mapping/redirects.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/uisp.d.ts +1 -0
- package/lib/constants/proStoreCategories/mapping/uisp.js +1 -0
- package/lib/constants/proStoreCategories/mapping/uisp.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/uisp.mjs +1 -0
- package/lib/constants/proStoreCategories/mapping/uisp.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +7 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js +7 -9
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +7 -9
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/ar.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/ar.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/de.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/de.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/el.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/el.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +3 -2
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +3 -2
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/es.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/es.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +3 -2
- package/lib/constants/proStoreCategories/translations/fr.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +3 -2
- package/lib/constants/proStoreCategories/translations/fr.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/it.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/it.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/ja.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/ja.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +6 -2
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +6 -3
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +3 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +3 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +3 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +3 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs.map +1 -1
- package/lib/constants/proStoreFilters/mapping.d.ts +17 -1
- package/lib/constants/proStoreFilters/mapping.js +16 -0
- package/lib/constants/proStoreFilters/mapping.js.map +1 -1
- package/lib/constants/proStoreFilters/mapping.mjs +16 -0
- package/lib/constants/proStoreFilters/mapping.mjs.map +1 -1
- package/lib/contexts/MenuContext/presets.d.ts +1 -1
- package/lib/contexts/MenuContext/presets.js +4 -2
- package/lib/contexts/MenuContext/presets.js.map +1 -1
- package/lib/contexts/MenuContext/presets.mjs +4 -2
- package/lib/contexts/MenuContext/presets.mjs.map +1 -1
- package/lib/helpers/index.d.ts +1 -0
- package/lib/helpers/index.js +11 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/helpers/index.mjs +1 -0
- package/lib/helpers/index.mjs.map +1 -1
- package/lib/helpers/product.d.ts +87 -0
- package/lib/helpers/product.js +346 -0
- package/lib/helpers/product.js.map +1 -0
- package/lib/helpers/product.mjs +335 -0
- package/lib/helpers/product.mjs.map +1 -0
- package/lib/helpers/product.test.d.ts +1 -0
- package/lib/types/generated.d.ts +1 -1
- package/lib/types/generated.js.map +1 -1
- package/lib/types/generated.mjs.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/index.mjs +1 -0
- package/lib/types/index.mjs.map +1 -1
- package/lib/types/product.d.ts +87 -0
- package/lib/types/product.js +14 -0
- package/lib/types/product.js.map +1 -0
- package/lib/types/product.mjs +13 -0
- package/lib/types/product.mjs.map +1 -0
- package/lib/utils/address.d.ts +278 -62
- package/lib/utils/address.js +11 -8
- package/lib/utils/address.js.map +1 -1
- package/lib/utils/address.mjs +11 -8
- package/lib/utils/address.mjs.map +1 -1
- package/lib/utils/array.d.ts +4 -0
- package/lib/utils/array.js +10 -0
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/array.mjs +10 -1
- package/lib/utils/array.mjs.map +1 -1
- package/lib/utils/productSort.d.ts +41 -0
- package/lib/utils/productSort.js +67 -0
- package/lib/utils/productSort.js.map +1 -0
- package/lib/utils/productSort.mjs +60 -0
- package/lib/utils/productSort.mjs.map +1 -0
- package/lib/utils/validations/lastNameSuperRefinement.d.ts +11 -0
- package/lib/utils/validations/lastNameSuperRefinement.js +25 -0
- package/lib/utils/validations/lastNameSuperRefinement.js.map +1 -0
- package/lib/utils/validations/lastNameSuperRefinement.mjs +21 -0
- package/lib/utils/validations/lastNameSuperRefinement.mjs.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.mjs","sources":["../../../src/contexts/MenuContext/presets.ts"],"sourcesContent":["/* eslint-disable sonarjs/no-duplicate-string */\nimport { Language, StoreId } from \"../../types\";\nimport type {\n DeployedLanguages,\n DeployedLanguagesMapping,\n MicrositeRootUrlMapping,\n StoreRootUrlMapping,\n} from \"./mapping\";\n\n// #############################################################################\n// Navigation store ID base URL presets\n// !!! EXPLICITLY SEPARATE FILE OTHERWISE WE GET CJS REQUIRE ISSUES !!!\n// #############################################################################\n\nexport const STORE_ROOT_URLS_LOCAL = {\n br: \"https://store.local.ui.com:4400/br\",\n ca: \"https://store.local.ui.com:4400/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://store.local.ui.com:4400/eu\",\n in: \"https://store.local.ui.com:4400/in\",\n jp: \"https://store.local.ui.com:4400/jp\",\n me: \"https://store.local.ui.com:4400/me\",\n mx: \"https://store.local.ui.com:4400/mx\",\n ph: \"https://store.local.ui.com:4400/ph\",\n sg: \"https://store.local.ui.com:4400/sg\",\n tw: \"https://store.local.ui.com:4400/tw\",\n uk: \"https://store.local.ui.com:4400/uk\",\n us: \"https://store.local.ui.com:4400/us\",\n za: \"https://store.local.ui.com:4400/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_PROTO = {\n br: \"https://ecomm.dev.ui.com/br\",\n ca: \"https://ecomm.dev.ui.com/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://ecomm.dev.ui.com/eu\",\n in: \"https://ecomm.dev.ui.com/in\",\n jp: \"https://ecomm.dev.ui.com/jp\",\n me: \"https://ecomm.dev.ui.com/me\",\n mx: \"https://ecomm.dev.ui.com/mx\",\n ph: \"https://ecomm.dev.ui.com/ph\",\n sg: \"https://ecomm.dev.ui.com/sg\",\n tw: \"https://ecomm.dev.ui.com/tw\",\n uk: \"https://ecomm.dev.ui.com/uk\",\n us: \"https://ecomm.dev.ui.com/us\",\n za: \"https://ecomm.dev.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_HONEYPOT = {\n br: \"https://ecomm.honeypot.dev.ui.com/br\",\n ca: \"https://ecomm.honeypot.dev.ui.com/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://ecomm.honeypot.dev.ui.com/eu\",\n in: \"https://ecomm.honeypot.dev.ui.com/in\",\n jp: \"https://ecomm.honeypot.dev.ui.com/jp\",\n me: \"https://ecomm.honeypot.dev.ui.com/me\",\n mx: \"https://ecomm.honeypot.dev.ui.com/mx\",\n ph: \"https://ecomm.honeypot.dev.ui.com/ph\",\n sg: \"https://ecomm.honeypot.dev.ui.com/sg\",\n tw: \"https://ecomm.honeypot.dev.ui.com/tw\",\n uk: \"https://ecomm.honeypot.dev.ui.com/uk\",\n us: \"https://ecomm.honeypot.dev.ui.com/us\",\n za: \"https://ecomm.honeypot.dev.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_QA = {\n br: \"https://ecomm.stg.ui.com/br\",\n ca: \"https://ecomm.stg.ui.com/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://ecomm.stg.ui.com/eu\",\n in: \"https://ecomm.stg.ui.com/in\",\n jp: \"https://ecomm.stg.ui.com/jp\",\n me: \"https://ecomm.stg.ui.com/me\",\n mx: \"https://ecomm.stg.ui.com/mx\",\n ph: \"https://ecomm.stg.ui.com/ph\",\n sg: \"https://ecomm.stg.ui.com/sg\",\n tw: \"https://ecomm.stg.ui.com/tw\",\n uk: \"https://ecomm.stg.ui.com/uk\",\n us: \"https://ecomm.stg.ui.com/us\",\n za: \"https://ecomm.stg.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_PROD = {\n br: \"https://br.store.ui.com/br\",\n ca: \"https://ca.store.ui.com/ca\",\n cn: \"https://store.ui.com.cn\", // Isn't launched yet on new platform\n eu: \"https://eu.store.ui.com/eu\",\n in: \"https://in.store.ui.com/in\",\n jp: \"https://jp.store.ui.com/jp\",\n me: \"https://me.store.ui.com/me\",\n mx: \"https://mx.store.ui.com/mx\",\n ph: \"https://ph.store.ui.com/ph\", // Isn't launched yet on new platform (new store in general)\n sg: \"https://sg.store.ui.com/sg\",\n tw: \"https://tw.store.ui.com/tw\",\n uk: \"https://uk.store.ui.com/uk\",\n us: \"https://store.ui.com/us\",\n za: \"https://za.store.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\n// #############################################################################\n// Microsite base url presets\n// #############################################################################\n\nexport const MICROSITE_ROOT_URLS_LOCAL = {\n ui: \"https://dev.ui.com\",\n uisp: \"https://dev.uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.dev.ui.com\",\n expertsUi: \"https://experts.dev.ui.com\",\n expertsUisp: \"https://experts.dev.uisp.com\",\n uwc: \"https://uwc.dev.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\nexport const MICROSITE_ROOT_URLS_PROTO = {\n ui: \"https://dev.ui.com\",\n uisp: \"https://dev.uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.dev.ui.com\",\n expertsUi: \"https://experts.dev.ui.com\",\n expertsUisp: \"https://experts.dev.uisp.com\",\n uwc: \"https://uwc.dev.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\nexport const MICROSITE_ROOT_URLS_QA = {\n ui: \"https://stg.ui.com\",\n uisp: \"https://stg.uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.stg.ui.com\",\n expertsUi: \"https://experts.stg.ui.com\",\n expertsUisp: \"https://experts.stg.uisp.com\",\n uwc: \"https://uwc.stg.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\nexport const MICROSITE_ROOT_URLS_PROD = {\n ui: \"https://ui.com\",\n uisp: \"https://uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.ui.com\",\n expertsUi: \"https://experts.ui.com\",\n expertsUisp: \"https://experts.uisp.com\",\n uwc: \"https://uwc.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\n// #############################################################################\n// Language presets\n// #############################################################################\n/**\n * ui.com languages\n */\nconst ALL_UI_COM_LANGUAGES: DeployedLanguages = [\n Language.En,\n Language.Ar,\n Language.De,\n Language.El,\n Language.Es,\n Language.Fr,\n Language.It,\n Language.Ja,\n Language.Pt,\n Language.Zh,\n];\n\nexport const UI_COM_DEPLOYED_LANGUAGES_PROD = {\n [StoreId.Us]: ALL_UI_COM_LANGUAGES,\n [StoreId.Ca]: ALL_UI_COM_LANGUAGES,\n [StoreId.Cn]: ALL_UI_COM_LANGUAGES,\n [StoreId.Uk]: ALL_UI_COM_LANGUAGES,\n [StoreId.Eu]: ALL_UI_COM_LANGUAGES,\n [StoreId.Jp]: ALL_UI_COM_LANGUAGES,\n [StoreId.Br]: ALL_UI_COM_LANGUAGES,\n [StoreId.In]: ALL_UI_COM_LANGUAGES,\n [StoreId.Me]: ALL_UI_COM_LANGUAGES,\n [StoreId.Za]: ALL_UI_COM_LANGUAGES,\n [StoreId.Tw]: ALL_UI_COM_LANGUAGES,\n [StoreId.Sg]: ALL_UI_COM_LANGUAGES,\n [StoreId.Mx]: ALL_UI_COM_LANGUAGES,\n [StoreId.Ph]: ALL_UI_COM_LANGUAGES,\n} satisfies DeployedLanguagesMapping;\n\n// NOTE: Currently enabled languages are the same for all environments\nexport const UI_COM_DEPLOYED_LANGUAGES_LOCAL =\n UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguagesMapping;\n\nexport const UI_COM_DEPLOYED_LANGUAGES_PROTO =\n UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguagesMapping;\n\nexport const UI_COM_DEPLOYED_LANGUAGES_QA =\n UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguagesMapping;\n\n/**\n * uwc.ui.com languages\n */\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_PROD: DeployedLanguages = [\n Language.En,\n Language.Ar,\n Language.De,\n Language.El,\n Language.Es,\n Language.Fr,\n Language.It,\n Language.Ja,\n Language.Pt,\n Language.Zh,\n];\n\n// NOTE: Currently enabled languages are the same for all environments\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_LOCAL =\n UWC_UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguages;\n\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_PROTO =\n UWC_UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguages;\n\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_QA =\n UWC_UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguages;\n\n/**\n * Store mapping\n */\nexport const STORE_DEPLOYED_LANGUAGES_LOCAL = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: [Language.Zh, Language.En],\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n\nexport const STORE_DEPLOYED_LANGUAGES_PROTO = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: [Language.Zh, Language.En],\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n\nexport const STORE_DEPLOYED_LANGUAGES_QA = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: [Language.Zh, Language.En],\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n\nexport const STORE_DEPLOYED_LANGUAGES_PROD = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: null, // Not yet launched\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n"],"names":["STORE_ROOT_URLS_LOCAL","br","ca","cn","eu","in","jp","me","mx","ph","sg","tw","uk","us","za","STORE_ROOT_URLS_PROTO","STORE_ROOT_URLS_HONEYPOT","STORE_ROOT_URLS_QA","STORE_ROOT_URLS_PROD","MICROSITE_ROOT_URLS_LOCAL","ui","uisp","amplifi","techSpecs","expertsUi","expertsUisp","uwc","MICROSITE_ROOT_URLS_PROTO","MICROSITE_ROOT_URLS_QA","MICROSITE_ROOT_URLS_PROD","ALL_UI_COM_LANGUAGES","Language","En","Ar","De","El","Es","Fr","It","Ja","Pt","Zh","UI_COM_DEPLOYED_LANGUAGES_PROD","StoreId","Us","Ca","Cn","Uk","Eu","Jp","Br","In","Me","Za","Tw","Sg","Mx","Ph","UI_COM_DEPLOYED_LANGUAGES_LOCAL","UI_COM_DEPLOYED_LANGUAGES_PROTO","UI_COM_DEPLOYED_LANGUAGES_QA","UWC_UI_COM_DEPLOYED_LANGUAGES_PROD","UWC_UI_COM_DEPLOYED_LANGUAGES_LOCAL","UWC_UI_COM_DEPLOYED_LANGUAGES_PROTO","UWC_UI_COM_DEPLOYED_LANGUAGES_QA","STORE_DEPLOYED_LANGUAGES_LOCAL","STORE_DEPLOYED_LANGUAGES_PROTO","STORE_DEPLOYED_LANGUAGES_QA","STORE_DEPLOYED_LANGUAGES_PROD"],"mappings":";;;;AAcO,MAAMA,qBAAwB,GAAA;EACnCC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,0CAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;E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,QAAQM,EAAE,GAAG,CAAClB,QAAS,CAAAQ,EAAA,EAAIR,SAASC,EAAE,CAAA;EACvC,CAACW,QAAQO,EAAE,GAAG,CAACnB,QAAS,CAAAS,EAAA,EAAIT,SAASC,EAAE,CAAA;EACvC,CAACW,OAAQ,CAAAQ,EAAE,GAAG,CAACpB,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAS,EAAE,GAAG,CAACrB,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAU,EAAE,GAAG,CAACtB,SAASC,EAAE,CAAA;EAC1B,CAACW,QAAQW,EAAE,GAAG,CAACvB,QAAS,CAAAuB,EAAA,EAAIvB,SAASC,EAAE,CAAA;EACvC,CAACW,OAAQ,CAAAY,EAAE,GAAG,CAACxB,SAASC,EAAE,CAAA;EAC1B,CAACW,QAAQa,EAAE,GAAG,CAACzB,QAAS,CAAAK,EAAA,EAAIL,SAASC,EAAE,CAAA;EACvC,CAACW,OAAQ,CAAAc,EAAE,GAAG,CAAC1B,SAASC,EAAE;AAC5B,CAAA;"}
|
|
1
|
+
{"version":3,"file":"presets.mjs","sources":["../../../src/contexts/MenuContext/presets.ts"],"sourcesContent":["/* eslint-disable sonarjs/no-duplicate-string */\nimport { Language, StoreId } from \"../../types\";\nimport type {\n DeployedLanguages,\n DeployedLanguagesMapping,\n MicrositeRootUrlMapping,\n StoreRootUrlMapping,\n} from \"./mapping\";\n\n// #############################################################################\n// Navigation store ID base URL presets\n// !!! EXPLICITLY SEPARATE FILE OTHERWISE WE GET CJS REQUIRE ISSUES !!!\n// #############################################################################\n\nexport const STORE_ROOT_URLS_LOCAL = {\n br: \"https://store.local.ui.com:4400/br\",\n ca: \"https://store.local.ui.com:4400/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://store.local.ui.com:4400/eu\",\n in: \"https://store.local.ui.com:4400/in\",\n jp: \"https://store.local.ui.com:4400/jp\",\n me: \"https://store.local.ui.com:4400/me\",\n mx: \"https://store.local.ui.com:4400/mx\",\n ph: \"https://store.local.ui.com:4400/ph\",\n sg: \"https://store.local.ui.com:4400/sg\",\n tw: \"https://store.local.ui.com:4400/tw\",\n uk: \"https://store.local.ui.com:4400/uk\",\n us: \"https://store.local.ui.com:4400/us\",\n za: \"https://store.local.ui.com:4400/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_PROTO = {\n br: \"https://ecomm.dev.ui.com/br\",\n ca: \"https://ecomm.dev.ui.com/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://ecomm.dev.ui.com/eu\",\n in: \"https://ecomm.dev.ui.com/in\",\n jp: \"https://ecomm.dev.ui.com/jp\",\n me: \"https://ecomm.dev.ui.com/me\",\n mx: \"https://ecomm.dev.ui.com/mx\",\n ph: \"https://ecomm.dev.ui.com/ph\",\n sg: \"https://ecomm.dev.ui.com/sg\",\n tw: \"https://ecomm.dev.ui.com/tw\",\n uk: \"https://ecomm.dev.ui.com/uk\",\n us: \"https://ecomm.dev.ui.com/us\",\n za: \"https://ecomm.dev.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_HONEYPOT = {\n br: \"https://ecomm.honeypot.dev.ui.com/br\",\n ca: \"https://ecomm.honeypot.dev.ui.com/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://ecomm.honeypot.dev.ui.com/eu\",\n in: \"https://ecomm.honeypot.dev.ui.com/in\",\n jp: \"https://ecomm.honeypot.dev.ui.com/jp\",\n me: \"https://ecomm.honeypot.dev.ui.com/me\",\n mx: \"https://ecomm.honeypot.dev.ui.com/mx\",\n ph: \"https://ecomm.honeypot.dev.ui.com/ph\",\n sg: \"https://ecomm.honeypot.dev.ui.com/sg\",\n tw: \"https://ecomm.honeypot.dev.ui.com/tw\",\n uk: \"https://ecomm.honeypot.dev.ui.com/uk\",\n us: \"https://ecomm.honeypot.dev.ui.com/us\",\n za: \"https://ecomm.honeypot.dev.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_QA = {\n br: \"https://ecomm.stg.ui.com/br\",\n ca: \"https://ecomm.stg.ui.com/ca\",\n cn: \"https://dev-store-ui-china.myshopify.com\",\n eu: \"https://ecomm.stg.ui.com/eu\",\n in: \"https://ecomm.stg.ui.com/in\",\n jp: \"https://ecomm.stg.ui.com/jp\",\n me: \"https://ecomm.stg.ui.com/me\",\n mx: \"https://ecomm.stg.ui.com/mx\",\n ph: \"https://ecomm.stg.ui.com/ph\",\n sg: \"https://ecomm.stg.ui.com/sg\",\n tw: \"https://ecomm.stg.ui.com/tw\",\n uk: \"https://ecomm.stg.ui.com/uk\",\n us: \"https://ecomm.stg.ui.com/us\",\n za: \"https://ecomm.stg.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\nexport const STORE_ROOT_URLS_PROD = {\n br: \"https://br.store.ui.com/br\",\n ca: \"https://ca.store.ui.com/ca\",\n cn: \"https://store.ui.com.cn\", // Isn't launched yet on new platform\n eu: \"https://eu.store.ui.com/eu\",\n in: \"https://in.store.ui.com/in\",\n jp: \"https://jp.store.ui.com/jp\",\n me: \"https://me.store.ui.com/me\",\n mx: \"https://mx.store.ui.com\", // Isn't launched yet on new platform\n ph: \"https://ph.store.ui.com/ph\", // Isn't launched yet on new platform (new store in general)\n sg: \"https://sg.store.ui.com/sg\",\n tw: \"https://tw.store.ui.com/tw\",\n uk: \"https://uk.store.ui.com/uk\",\n us: \"https://store.ui.com/us\",\n za: \"https://za.store.ui.com/za\",\n} satisfies StoreRootUrlMapping;\n\n// #############################################################################\n// Microsite base url presets\n// #############################################################################\n\nexport const MICROSITE_ROOT_URLS_LOCAL = {\n ui: \"https://dev.ui.com\",\n uisp: \"https://dev.uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.dev.ui.com\",\n expertsUi: \"https://experts.dev.ui.com\",\n expertsUisp: \"https://experts.dev.uisp.com\",\n uwc: \"https://uwc.dev.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\nexport const MICROSITE_ROOT_URLS_PROTO = {\n ui: \"https://dev.ui.com\",\n uisp: \"https://dev.uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.dev.ui.com\",\n expertsUi: \"https://experts.dev.ui.com\",\n expertsUisp: \"https://experts.dev.uisp.com\",\n uwc: \"https://uwc.dev.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\nexport const MICROSITE_ROOT_URLS_QA = {\n ui: \"https://stg.ui.com\",\n uisp: \"https://stg.uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.stg.ui.com\",\n expertsUi: \"https://experts.stg.ui.com\",\n expertsUisp: \"https://experts.stg.uisp.com\",\n uwc: \"https://uwc.stg.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\nexport const MICROSITE_ROOT_URLS_PROD = {\n ui: \"https://ui.com\",\n uisp: \"https://uisp.com\",\n amplifi: \"https://amplifi.com\",\n techSpecs: \"https://techspecs.ui.com\",\n expertsUi: \"https://experts.ui.com\",\n expertsUisp: \"https://experts.uisp.com\",\n uwc: \"https://uwc.ui.com\",\n} satisfies MicrositeRootUrlMapping;\n\n// #############################################################################\n// Language presets\n// #############################################################################\n/**\n * ui.com languages\n */\nconst ALL_UI_COM_LANGUAGES: DeployedLanguages = [\n Language.En,\n Language.Ar,\n Language.De,\n Language.El,\n Language.Es,\n Language.Fr,\n Language.It,\n Language.Ja,\n Language.Pt,\n Language.Zh,\n];\n\nexport const UI_COM_DEPLOYED_LANGUAGES_PROD = {\n [StoreId.Us]: ALL_UI_COM_LANGUAGES,\n [StoreId.Ca]: ALL_UI_COM_LANGUAGES,\n [StoreId.Cn]: ALL_UI_COM_LANGUAGES,\n [StoreId.Uk]: ALL_UI_COM_LANGUAGES,\n [StoreId.Eu]: ALL_UI_COM_LANGUAGES,\n [StoreId.Jp]: ALL_UI_COM_LANGUAGES,\n [StoreId.Br]: ALL_UI_COM_LANGUAGES,\n [StoreId.In]: ALL_UI_COM_LANGUAGES,\n [StoreId.Me]: ALL_UI_COM_LANGUAGES,\n [StoreId.Za]: ALL_UI_COM_LANGUAGES,\n [StoreId.Tw]: ALL_UI_COM_LANGUAGES,\n [StoreId.Sg]: ALL_UI_COM_LANGUAGES,\n [StoreId.Mx]: ALL_UI_COM_LANGUAGES,\n [StoreId.Ph]: ALL_UI_COM_LANGUAGES,\n} satisfies DeployedLanguagesMapping;\n\n// NOTE: Currently enabled languages are the same for all environments\nexport const UI_COM_DEPLOYED_LANGUAGES_LOCAL =\n UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguagesMapping;\n\nexport const UI_COM_DEPLOYED_LANGUAGES_PROTO =\n UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguagesMapping;\n\nexport const UI_COM_DEPLOYED_LANGUAGES_QA =\n UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguagesMapping;\n\n/**\n * uwc.ui.com languages\n */\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_PROD: DeployedLanguages = [\n Language.En,\n Language.Ar,\n Language.De,\n Language.El,\n Language.Es,\n Language.Fr,\n Language.It,\n Language.Ja,\n Language.Pt,\n Language.Zh,\n];\n\n// NOTE: Currently enabled languages are the same for all environments\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_LOCAL =\n UWC_UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguages;\n\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_PROTO =\n UWC_UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguages;\n\nexport const UWC_UI_COM_DEPLOYED_LANGUAGES_QA =\n UWC_UI_COM_DEPLOYED_LANGUAGES_PROD satisfies DeployedLanguages;\n\n/**\n * Store mapping\n */\nexport const STORE_DEPLOYED_LANGUAGES_LOCAL = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: [Language.Zh, Language.En],\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n\nexport const STORE_DEPLOYED_LANGUAGES_PROTO = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: [Language.Zh, Language.En],\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n\nexport const STORE_DEPLOYED_LANGUAGES_QA = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: [Language.Zh, Language.En],\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: [Language.Es, Language.En],\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n\nexport const STORE_DEPLOYED_LANGUAGES_PROD = {\n [StoreId.Us]: [Language.En],\n [StoreId.Ca]: [Language.En],\n [StoreId.Cn]: null, // Not yet launched\n [StoreId.Uk]: [Language.En],\n [StoreId.Eu]: [Language.En],\n [StoreId.Jp]: [Language.Ja, Language.En],\n [StoreId.Br]: [Language.Pt, Language.En],\n [StoreId.In]: [Language.En],\n [StoreId.Me]: [Language.En],\n [StoreId.Za]: [Language.En],\n [StoreId.Tw]: [Language.Tw, Language.En],\n [StoreId.Sg]: [Language.En],\n [StoreId.Mx]: null, // Not yet launched\n [StoreId.Ph]: [Language.En],\n} satisfies DeployedLanguagesMapping;\n"],"names":["STORE_ROOT_URLS_LOCAL","br","ca","cn","eu","in","jp","me","mx","ph","sg","tw","uk","us","za","STORE_ROOT_URLS_PROTO","STORE_ROOT_URLS_HONEYPOT","STORE_ROOT_URLS_QA","STORE_ROOT_URLS_PROD","MICROSITE_ROOT_URLS_LOCAL","ui","uisp","amplifi","techSpecs","expertsUi","expertsUisp","uwc","MICROSITE_ROOT_URLS_PROTO","MICROSITE_ROOT_URLS_QA","MICROSITE_ROOT_URLS_PROD","ALL_UI_COM_LANGUAGES","Language","En","Ar","De","El","Es","Fr","It","Ja","Pt","Zh","UI_COM_DEPLOYED_LANGUAGES_PROD","StoreId","Us","Ca","Cn","Uk","Eu","Jp","Br","In","Me","Za","Tw","Sg","Mx","Ph","UI_COM_DEPLOYED_LANGUAGES_LOCAL","UI_COM_DEPLOYED_LANGUAGES_PROTO","UI_COM_DEPLOYED_LANGUAGES_QA","UWC_UI_COM_DEPLOYED_LANGUAGES_PROD","UWC_UI_COM_DEPLOYED_LANGUAGES_LOCAL","UWC_UI_COM_DEPLOYED_LANGUAGES_PROTO","UWC_UI_COM_DEPLOYED_LANGUAGES_QA","STORE_DEPLOYED_LANGUAGES_LOCAL","STORE_DEPLOYED_LANGUAGES_PROTO","STORE_DEPLOYED_LANGUAGES_QA","STORE_DEPLOYED_LANGUAGES_PROD"],"mappings":";;;;AAcO,MAAMA,qBAAwB,GAAA;EACnCC,EAAI,EAAA,oCAAA;EACJC,EAAI,EAAA,oCAAA;EACJ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;EAC1B,CAACW,OAAQ,CAAAE,EAAE,GAAG,CAACd,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAG,EAAE,GAAG,IAAA;EAAA;EACd,CAACH,OAAQ,CAAAI,EAAE,GAAG,CAAChB,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAK,EAAE,GAAG,CAACjB,SAASC,EAAE,CAAA;EAC1B,CAACW,QAAQM,EAAE,GAAG,CAAClB,QAAS,CAAAQ,EAAA,EAAIR,SAASC,EAAE,CAAA;EACvC,CAACW,QAAQO,EAAE,GAAG,CAACnB,QAAS,CAAAS,EAAA,EAAIT,SAASC,EAAE,CAAA;EACvC,CAACW,OAAQ,CAAAQ,EAAE,GAAG,CAACpB,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAS,EAAE,GAAG,CAACrB,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAU,EAAE,GAAG,CAACtB,SAASC,EAAE,CAAA;EAC1B,CAACW,QAAQW,EAAE,GAAG,CAACvB,QAAS,CAAAuB,EAAA,EAAIvB,SAASC,EAAE,CAAA;EACvC,CAACW,OAAQ,CAAAY,EAAE,GAAG,CAACxB,SAASC,EAAE,CAAA;EAC1B,CAACW,OAAQ,CAAAa,EAAE,GAAG,IAAA;EAAA;EACd,CAACb,OAAQ,CAAAc,EAAE,GAAG,CAAC1B,SAASC,EAAE;AAC5B,CAAA;"}
|
package/lib/helpers/index.d.ts
CHANGED
package/lib/helpers/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var proStoreCategories = require('./proStoreCategories.js');
|
|
4
|
+
var product = require('./product.js');
|
|
4
5
|
var ux = require('./ux.js');
|
|
5
6
|
"use strict";
|
|
6
7
|
exports.getCategoriesBySubcategory = proStoreCategories.getCategoriesBySubcategory;
|
|
@@ -11,6 +12,16 @@ exports.getSubCategoryIdByCollectionSlug = proStoreCategories.getSubCategoryIdBy
|
|
|
11
12
|
exports.isValidSubCategory = proStoreCategories.isValidSubCategory;
|
|
12
13
|
exports.parseCategories = proStoreCategories.parseCategories;
|
|
13
14
|
exports.useTranslatedCategories = proStoreCategories.useTranslatedCategories;
|
|
15
|
+
exports.COLLECTION_SECTION_OTHER_ID = product.COLLECTION_SECTION_OTHER_ID;
|
|
16
|
+
exports.HDDProductSlugs = product.HDDProductSlugs;
|
|
17
|
+
exports.MagicCollectionTags = product.MagicCollectionTags;
|
|
18
|
+
exports.ProductOptions = product.ProductOptions;
|
|
19
|
+
exports.createSectionHierarchy = product.createSectionHierarchy;
|
|
20
|
+
exports.getProStoreCategory = product.getProStoreCategory;
|
|
21
|
+
exports.getProductGroups = product.getProductGroups;
|
|
22
|
+
exports.getStoreProducts = product.getStoreProducts;
|
|
23
|
+
exports.isNonNullish = product.isNonNullish;
|
|
24
|
+
exports.removeExcludedProducts = product.removeExcludedProducts;
|
|
14
25
|
exports.getTrueOffsetY = ux.getTrueOffsetY;
|
|
15
26
|
exports.scrollIntoView = ux.scrollIntoView;
|
|
16
27
|
exports.scrollToY = ux.scrollToY;
|
package/lib/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/helpers/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { getCategoriesBySubcategory, getLocalizedCategories, getProductLineByCategory, getProductLineBySubcategory, getSubCategoryIdByCollectionSlug, isValidSubCategory, parseCategories, useTranslatedCategories } from './proStoreCategories.mjs';
|
|
2
|
+
export { COLLECTION_SECTION_OTHER_ID, HDDProductSlugs, MagicCollectionTags, ProductOptions, createSectionHierarchy, getProStoreCategory, getProductGroups, getStoreProducts, isNonNullish, removeExcludedProducts } from './product.mjs';
|
|
2
3
|
export { getTrueOffsetY, scrollIntoView, scrollToY } from './ux.mjs';
|
|
3
4
|
"use strict";
|
|
4
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ParsedCategoryItem } from "../constants/proStoreCategories";
|
|
2
|
+
import type { CollectionSection, MappedProductSection, Nullish, ProductTagFragment, Section, StorefrontOption, StorefrontProduct, StoreId } from "../types";
|
|
3
|
+
export declare const isNonNullish: <T>(entry: T | null | undefined) => entry is T;
|
|
4
|
+
/**
|
|
5
|
+
* Removes products that have tag starting with `EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX`
|
|
6
|
+
* and ends with `storeId`, e.g. `"exclude-from-store-grid:us`
|
|
7
|
+
*
|
|
8
|
+
* @warning Use this function only on grid and breadcrumbs products
|
|
9
|
+
*/
|
|
10
|
+
export declare const removeExcludedProducts: <T extends {
|
|
11
|
+
tags: ProductTagFragment[];
|
|
12
|
+
}>(products: T[], storeId: StoreId) => T[];
|
|
13
|
+
export declare enum HDDProductSlugs {
|
|
14
|
+
HDD_1TB = "uacc-hdd-s-1tb",
|
|
15
|
+
HDD_8TB_Enterprise = "uacc-hdd-e-8tb",
|
|
16
|
+
HDD_16TB_Enterprise = "uacc-hdd-e-16tb"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Recursively create section hierarchy
|
|
20
|
+
*/
|
|
21
|
+
export declare const createSectionHierarchy: (sections: CollectionSection[], level?: number) => Section[];
|
|
22
|
+
export declare enum MagicCollectionTags {
|
|
23
|
+
/**
|
|
24
|
+
* Used to determine if collection should be shown in an accessory
|
|
25
|
+
* layout style where sections are placed inside variant cards
|
|
26
|
+
*/
|
|
27
|
+
LayoutAccessories = "layout-accessories",
|
|
28
|
+
/**
|
|
29
|
+
* Used to determine if collection is pro-store specific and should
|
|
30
|
+
* be redirected to pro-store's appropriate category
|
|
31
|
+
*/
|
|
32
|
+
ProStore = "pro-store",
|
|
33
|
+
/**
|
|
34
|
+
* Used to disable length options (disable product splitting by "length")
|
|
35
|
+
*/
|
|
36
|
+
DisableLengthOptions = "disable-length-options",
|
|
37
|
+
/**
|
|
38
|
+
* Used to disable speed options (disable product splitting by "speed")
|
|
39
|
+
*/
|
|
40
|
+
DisableSpeedOptions = "disable-speed-options"
|
|
41
|
+
}
|
|
42
|
+
export declare enum ProductOptions {
|
|
43
|
+
Length = "length",
|
|
44
|
+
Speed = "speed",
|
|
45
|
+
Color = "color"
|
|
46
|
+
}
|
|
47
|
+
export declare const COLLECTION_SECTION_OTHER_ID = "other";
|
|
48
|
+
/**
|
|
49
|
+
* Create product groups
|
|
50
|
+
*/
|
|
51
|
+
export declare const getProductGroups: <T extends StorefrontProduct & {
|
|
52
|
+
options: StorefrontOption[];
|
|
53
|
+
}>(products?: T[], sectionHierarchy?: Nullish<Section[]>, tags?: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
}>) => MappedProductSection<T>[] | undefined;
|
|
57
|
+
export declare const getProStoreCategory: ({ queryCategory, product, ignoreQuery, }: {
|
|
58
|
+
queryCategory?: string;
|
|
59
|
+
product: Pick<StorefrontProduct, "collectionSlug" | "organizationalCollectionSlug" | "proCollectionSlug">;
|
|
60
|
+
ignoreQuery?: boolean;
|
|
61
|
+
}) => string | null;
|
|
62
|
+
type StoreProductsData = ({
|
|
63
|
+
category: {
|
|
64
|
+
id: string;
|
|
65
|
+
label: string | null;
|
|
66
|
+
} | undefined;
|
|
67
|
+
} & {
|
|
68
|
+
products: StorefrontProduct[];
|
|
69
|
+
}) | {
|
|
70
|
+
productGroups: MappedProductSection<StorefrontProduct>[];
|
|
71
|
+
};
|
|
72
|
+
export declare const getStoreProducts: ({ storeId, queryCategory, currentProduct, collections, allCategoryItems, }: {
|
|
73
|
+
storeId: StoreId;
|
|
74
|
+
queryCategory: string | undefined;
|
|
75
|
+
currentProduct: Pick<StorefrontProduct, "id" | "slug" | "collectionSlug" | "organizationalCollectionSlug" | "proCollectionSlug">;
|
|
76
|
+
collections: Array<{
|
|
77
|
+
slug: string;
|
|
78
|
+
sections: Array<{
|
|
79
|
+
id: string;
|
|
80
|
+
title: string;
|
|
81
|
+
productTags: Array<string>;
|
|
82
|
+
}>;
|
|
83
|
+
products: Array<Pick<StorefrontProduct, "id" | "slug" | "tags" | "variants" | "options" | "title" | "status" | "minDisplayPrice">>;
|
|
84
|
+
}>;
|
|
85
|
+
allCategoryItems: ParsedCategoryItem[];
|
|
86
|
+
}) => StoreProductsData;
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var lodashEs = require('lodash-es');
|
|
4
|
+
require('../constants/proStoreCategories/index.js');
|
|
5
|
+
require('../types/index.js');
|
|
6
|
+
var array = require('../utils/array.js');
|
|
7
|
+
var productSort = require('../utils/productSort.js');
|
|
8
|
+
var proStoreCategories = require('./proStoreCategories.js');
|
|
9
|
+
var unifi = require('../constants/proStoreCategories/mapping/unifi.js');
|
|
10
|
+
var uisp = require('../constants/proStoreCategories/mapping/uisp.js');
|
|
11
|
+
var product = require('../types/product.js');
|
|
12
|
+
"use strict";
|
|
13
|
+
const isNonNullish = entry => entry !== null && entry !== void 0;
|
|
14
|
+
const EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX = "exclude-from-store-grid:";
|
|
15
|
+
const removeExcludedProducts = (products, storeId) => {
|
|
16
|
+
const excludeTag = `${EXCLUDE_PRODUCT_FROM_STORE_GRID_TAG_PREFIX}${storeId}`.toLowerCase();
|
|
17
|
+
return products.filter(product => {
|
|
18
|
+
return !product.tags.some(tag => tag.name.toLowerCase() === excludeTag);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const isAccessoryCategoryItem = categoryItem => {
|
|
22
|
+
return !!categoryItem && [unifi.UniFiCategoryId.Accessories, uisp.UISPCategoryId.AccessoryTech].includes(
|
|
23
|
+
// TODO: Check why this TS error appears
|
|
24
|
+
// @ts-expect-error: Unreachable code error
|
|
25
|
+
categoryItem.id);
|
|
26
|
+
};
|
|
27
|
+
var HDDProductSlugs = /* @__PURE__ */(HDDProductSlugs2 => {
|
|
28
|
+
HDDProductSlugs2["HDD_1TB"] = "uacc-hdd-s-1tb";
|
|
29
|
+
HDDProductSlugs2["HDD_8TB_Enterprise"] = "uacc-hdd-e-8tb";
|
|
30
|
+
HDDProductSlugs2["HDD_16TB_Enterprise"] = "uacc-hdd-e-16tb";
|
|
31
|
+
return HDDProductSlugs2;
|
|
32
|
+
})(HDDProductSlugs || {});
|
|
33
|
+
const isAllowedAccessoryCategoryProduct = ({
|
|
34
|
+
slug
|
|
35
|
+
}) => {
|
|
36
|
+
const allowedAccessoryProductSlugs = ["u-lte", "u-lte-backup-pro", "uacc-hdd-s-1tb" /* HDD_1TB */, "uacc-hdd-e-8tb" /* HDD_8TB_Enterprise */, "uacc-hdd-e-16tb" /* HDD_16TB_Enterprise */];
|
|
37
|
+
return allowedAccessoryProductSlugs.includes(slug);
|
|
38
|
+
};
|
|
39
|
+
const isAccessoryCategorySubItem = (categorySubItem, allCategoryItems) => {
|
|
40
|
+
const categoryItem = allCategoryItems.find(item => item.items?.some(subItem => subItem.id === categorySubItem.id));
|
|
41
|
+
return isAccessoryCategoryItem(categoryItem);
|
|
42
|
+
};
|
|
43
|
+
const createSectionHierarchy = (sections, level = 1) => {
|
|
44
|
+
const currentLevelSections = sections.filter(section => section.productTags.length === level);
|
|
45
|
+
if (!currentLevelSections.length) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
return currentLevelSections.map(section => ({
|
|
49
|
+
...section,
|
|
50
|
+
items: createSectionHierarchy(sections.filter(nextSection => section.productTags.every(tag => nextSection.productTags.includes(tag))), level + 1)
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
53
|
+
var MagicCollectionTags = /* @__PURE__ */(MagicCollectionTags2 => {
|
|
54
|
+
MagicCollectionTags2["LayoutAccessories"] = "layout-accessories";
|
|
55
|
+
MagicCollectionTags2["ProStore"] = "pro-store";
|
|
56
|
+
MagicCollectionTags2["DisableLengthOptions"] = "disable-length-options";
|
|
57
|
+
MagicCollectionTags2["DisableSpeedOptions"] = "disable-speed-options";
|
|
58
|
+
return MagicCollectionTags2;
|
|
59
|
+
})(MagicCollectionTags || {});
|
|
60
|
+
var ProductOptions = /* @__PURE__ */(ProductOptions2 => {
|
|
61
|
+
ProductOptions2["Length"] = "length";
|
|
62
|
+
ProductOptions2["Speed"] = "speed";
|
|
63
|
+
ProductOptions2["Color"] = "color";
|
|
64
|
+
return ProductOptions2;
|
|
65
|
+
})(ProductOptions || {});
|
|
66
|
+
const formatOptionValueTitleToTag = optionValueTitle => optionValueTitle.toLowerCase().replace(/[,\s]/g, "").replace(".", "-");
|
|
67
|
+
const divideProductByOption = (product, optionTitle) => {
|
|
68
|
+
const option = product.options.find(option2 => option2.slug === optionTitle);
|
|
69
|
+
if (!option) {
|
|
70
|
+
return [product];
|
|
71
|
+
}
|
|
72
|
+
return option.values.map(value => {
|
|
73
|
+
return {
|
|
74
|
+
...product,
|
|
75
|
+
options: product.options.filter(option2 => option2.slug !== optionTitle),
|
|
76
|
+
tags: [...product.tags, {
|
|
77
|
+
id: value.id,
|
|
78
|
+
name: formatOptionValueTitleToTag(value.slug)
|
|
79
|
+
}],
|
|
80
|
+
variants: product.variants.filter(variant => variant.optionValueIds?.includes(value.id))
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const COLLECTION_SECTION_OTHER_ID = "other";
|
|
85
|
+
const UNIT_FACTORS = {
|
|
86
|
+
m: 1,
|
|
87
|
+
km: 1e3
|
|
88
|
+
};
|
|
89
|
+
const DISTANCE_REGEX = /^\s*(\d+)\s*(m|km)\s*$/;
|
|
90
|
+
const mapProductsToSections = (products, section) => {
|
|
91
|
+
const productsInThisSection = products.filter(product => {
|
|
92
|
+
return section.productTags.every(sectionTag => {
|
|
93
|
+
return product.tags.find(tag => tag.name === sectionTag);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
if (productsInThisSection.length === 0) {
|
|
97
|
+
return void 0;
|
|
98
|
+
}
|
|
99
|
+
const items = section?.items?.map(item => mapProductsToSections(productsInThisSection, item)).filter(isNonNullish) ?? [];
|
|
100
|
+
const otherProducts = productsInThisSection.filter(product => {
|
|
101
|
+
return !items.some(item => item.products.find(p => p.id === product.id));
|
|
102
|
+
});
|
|
103
|
+
if (otherProducts.length && items.length) {
|
|
104
|
+
items.push({
|
|
105
|
+
id: `${section.id}-${COLLECTION_SECTION_OTHER_ID}`,
|
|
106
|
+
// TODO: Add translation
|
|
107
|
+
title: "Other",
|
|
108
|
+
productTags: section.productTags,
|
|
109
|
+
items: [],
|
|
110
|
+
products: otherProducts
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
...section,
|
|
115
|
+
items,
|
|
116
|
+
products: productsInThisSection
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
const compareDistanceTitles = (a, b) => {
|
|
120
|
+
const aMatch = a.title.match(DISTANCE_REGEX);
|
|
121
|
+
const bMatch = b.title.match(DISTANCE_REGEX);
|
|
122
|
+
if (!aMatch?.[1] || !aMatch[2] || !bMatch?.[1] || !bMatch[2]) {
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
const aValue = parseInt(aMatch[1]) * (UNIT_FACTORS[aMatch[2]] || 0);
|
|
126
|
+
const bValue = parseInt(bMatch[1]) * (UNIT_FACTORS[bMatch[2]] || 0);
|
|
127
|
+
return aValue - bValue;
|
|
128
|
+
};
|
|
129
|
+
const processSectionProductsWithDistanceInOptions = sections => {
|
|
130
|
+
return sections.map(section => ({
|
|
131
|
+
...section,
|
|
132
|
+
items: section.items.map(sec => {
|
|
133
|
+
const section2 = lodashEs.cloneDeep(sec);
|
|
134
|
+
const sectionWithDistanceTag = section2.items.find(section3 => section3.productTags.includes("distance"));
|
|
135
|
+
const sectionsMainProductTag = sectionWithDistanceTag?.productTags.filter(tag => tag !== "distance");
|
|
136
|
+
if (!sectionWithDistanceTag || !sectionsMainProductTag) {
|
|
137
|
+
return section2;
|
|
138
|
+
}
|
|
139
|
+
sectionWithDistanceTag.products.forEach(product => {
|
|
140
|
+
const optionValues = product?.options[0]?.values;
|
|
141
|
+
if (!optionValues?.length) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const formattedOptionValues = optionValues.map(value => ({
|
|
145
|
+
...value,
|
|
146
|
+
titleInTagFormat: formatOptionValueTitleToTag(value.title)
|
|
147
|
+
}));
|
|
148
|
+
formattedOptionValues.forEach(currentValue => {
|
|
149
|
+
const newSecondLevelSectionsTags = [...sectionsMainProductTag, currentValue.titleInTagFormat];
|
|
150
|
+
const alreadyExistingSecondLevelSection = section2.items.findIndex(section3 => array.areEqualArrays(section3.productTags, newSecondLevelSectionsTags));
|
|
151
|
+
const variantToAdd = product.variants.find(variant => variant.optionValueIds?.includes(currentValue.id));
|
|
152
|
+
if (!variantToAdd) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const productToAdd = {
|
|
156
|
+
...product,
|
|
157
|
+
options: product.options.filter(option => option.values.some(value => value.id === currentValue.id)).map(option => ({
|
|
158
|
+
...option,
|
|
159
|
+
values: option.values.filter(value => value.id === currentValue.id)
|
|
160
|
+
})),
|
|
161
|
+
variants: [variantToAdd]
|
|
162
|
+
};
|
|
163
|
+
if (alreadyExistingSecondLevelSection >= 0) {
|
|
164
|
+
section2.items[alreadyExistingSecondLevelSection]?.products.push(productToAdd);
|
|
165
|
+
} else {
|
|
166
|
+
const sectionToAdd = {
|
|
167
|
+
id: currentValue.id,
|
|
168
|
+
// TODO: Maybe so>me different ID would be better
|
|
169
|
+
items: [],
|
|
170
|
+
// FIXME: This is problem!
|
|
171
|
+
products: [productToAdd],
|
|
172
|
+
productTags: newSecondLevelSectionsTags,
|
|
173
|
+
title: currentValue.title
|
|
174
|
+
};
|
|
175
|
+
section2.items.push(sectionToAdd);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
return {
|
|
180
|
+
...section2,
|
|
181
|
+
items: section2.items.sort(compareDistanceTitles).filter(section3 => !section3.productTags.includes("distance"))
|
|
182
|
+
};
|
|
183
|
+
})
|
|
184
|
+
}));
|
|
185
|
+
};
|
|
186
|
+
const processSectionsWithOutOfStockProducts = section => {
|
|
187
|
+
const isDisabled = section.products.every(product$1 => product$1.variants.every(variant => variant.status !== product.DisplayProductStatus.Available));
|
|
188
|
+
return {
|
|
189
|
+
...section,
|
|
190
|
+
isDisabled,
|
|
191
|
+
items: section.items.map(processSectionsWithOutOfStockProducts)
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
const getProductGroups = (products, sectionHierarchy, tags) => {
|
|
195
|
+
if (!products?.length || !sectionHierarchy) return void 0;
|
|
196
|
+
const processedProducts = products.flatMap(product => {
|
|
197
|
+
const disableLengthOptions = tags?.find(tag => tag.name === "disable-length-options" /* DisableLengthOptions */);
|
|
198
|
+
const lengthOptions = !disableLengthOptions && product?.options?.find(option => option.slug === "length" /* Length */);
|
|
199
|
+
if (lengthOptions && product.options !== void 0) {
|
|
200
|
+
return divideProductByOption(product, "length" /* Length */);
|
|
201
|
+
}
|
|
202
|
+
const disableSpeedOptions = tags?.find(tag => tag.name === "disable-speed-options" /* DisableSpeedOptions */);
|
|
203
|
+
const speedOptions = !disableSpeedOptions && product?.options?.find(option => {
|
|
204
|
+
return option.slug === "speed" /* Speed */;
|
|
205
|
+
});
|
|
206
|
+
if (speedOptions) {
|
|
207
|
+
return divideProductByOption(product, "speed" /* Speed */);
|
|
208
|
+
}
|
|
209
|
+
return [product];
|
|
210
|
+
});
|
|
211
|
+
const mappedProductGroups = sectionHierarchy.map(section => {
|
|
212
|
+
return mapProductsToSections(processedProducts, section);
|
|
213
|
+
}).filter(section => !!section);
|
|
214
|
+
const otherProducts = products.filter(product => {
|
|
215
|
+
return !mappedProductGroups.some(section => {
|
|
216
|
+
return section.products.find(p => p.id === product.id);
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
if (otherProducts.length) {
|
|
220
|
+
otherProducts.forEach(product => {
|
|
221
|
+
mappedProductGroups.push({
|
|
222
|
+
id: product.id,
|
|
223
|
+
products: [product],
|
|
224
|
+
title: "",
|
|
225
|
+
items: [],
|
|
226
|
+
productTags: []
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
const processedProductGroups = processSectionProductsWithDistanceInOptions(mappedProductGroups).map(processSectionsWithOutOfStockProducts);
|
|
231
|
+
return processedProductGroups.sort((a, b) => {
|
|
232
|
+
const aFirstProductId = a?.products?.[0]?.id;
|
|
233
|
+
const bFirstProductId = b?.products?.[0]?.id;
|
|
234
|
+
const aFirstProduct = products.findIndex(product => product.id === aFirstProductId);
|
|
235
|
+
const bFirstProduct = products.findIndex(product => product.id === bFirstProductId);
|
|
236
|
+
return aFirstProduct - bFirstProduct;
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
const getProStoreCategory = ({
|
|
240
|
+
queryCategory,
|
|
241
|
+
product,
|
|
242
|
+
ignoreQuery
|
|
243
|
+
}) => {
|
|
244
|
+
return (
|
|
245
|
+
/**
|
|
246
|
+
* If category specified via the url search/query parameter then use it
|
|
247
|
+
*/
|
|
248
|
+
!ignoreQuery && queryCategory ||
|
|
249
|
+
/**
|
|
250
|
+
* Attempt to find category by it's default collection or fallback to the virtual default collection
|
|
251
|
+
*/
|
|
252
|
+
proStoreCategories.getSubCategoryIdByCollectionSlug(product.collectionSlug) || proStoreCategories.getSubCategoryIdByCollectionSlug(product.organizationalCollectionSlug) ||
|
|
253
|
+
/**
|
|
254
|
+
* If all else fails fallback detecting to category from pro store collection, unlikely but wouldn't hurt to do so
|
|
255
|
+
*/
|
|
256
|
+
proStoreCategories.getSubCategoryIdByCollectionSlug(product.proCollectionSlug)
|
|
257
|
+
);
|
|
258
|
+
};
|
|
259
|
+
const getStoreProducts = ({
|
|
260
|
+
storeId,
|
|
261
|
+
queryCategory,
|
|
262
|
+
currentProduct,
|
|
263
|
+
collections,
|
|
264
|
+
allCategoryItems
|
|
265
|
+
}) => {
|
|
266
|
+
const returnObj = {
|
|
267
|
+
category: void 0,
|
|
268
|
+
products: []
|
|
269
|
+
};
|
|
270
|
+
const category = getProStoreCategory({
|
|
271
|
+
queryCategory,
|
|
272
|
+
product: currentProduct
|
|
273
|
+
});
|
|
274
|
+
const categoryItem = allCategoryItems.find(item => item.items?.some(subItem => subItem.id === category));
|
|
275
|
+
const categorySubItem = categoryItem?.items?.find(subItem => subItem.id === category);
|
|
276
|
+
const categoryId = categorySubItem?.id ?? category;
|
|
277
|
+
if (categoryId) {
|
|
278
|
+
returnObj.category = {
|
|
279
|
+
id: categoryId,
|
|
280
|
+
label: categoryItem?.label ?? null
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const filteredCollections = collections.map(collection => ({
|
|
284
|
+
...collection,
|
|
285
|
+
products: removeExcludedProducts(collection.products, storeId)
|
|
286
|
+
}));
|
|
287
|
+
if (categoryItem?.hideSubItems) {
|
|
288
|
+
const products = filteredCollections.flatMap(collection => collection.products);
|
|
289
|
+
if (isAccessoryCategoryItem(categoryItem)) {
|
|
290
|
+
returnObj.products = isAllowedAccessoryCategoryProduct(currentProduct) ? products.filter(isAllowedAccessoryCategoryProduct) : [];
|
|
291
|
+
} else {
|
|
292
|
+
returnObj.products = products;
|
|
293
|
+
}
|
|
294
|
+
} else {
|
|
295
|
+
const collection = filteredCollections.find(collection2 => collection2.products.some(el => el.id === currentProduct.id));
|
|
296
|
+
if (!collection) {
|
|
297
|
+
throw new Error("Collection not found");
|
|
298
|
+
}
|
|
299
|
+
const subItems = (categoryItem?.items?.slice(1) ?? allCategoryItems.flatMap(el => el.items?.slice(1))).filter(Boolean);
|
|
300
|
+
const subItem = subItems.find(item => item.collectionSlugs.includes(collection.slug));
|
|
301
|
+
if (subItem && returnObj.category) {
|
|
302
|
+
returnObj.category = {
|
|
303
|
+
id: subItem.id,
|
|
304
|
+
label: subItem.label
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
const subItemCollections = filteredCollections.filter(el => subItem?.collectionSlugs.includes(el.slug));
|
|
308
|
+
const products = subItemCollections.flatMap(el => el.products);
|
|
309
|
+
if (subItem) {
|
|
310
|
+
if (isAccessoryCategorySubItem(subItem, allCategoryItems)) {
|
|
311
|
+
returnObj.products = isAllowedAccessoryCategoryProduct(currentProduct) ? products.filter(isAllowedAccessoryCategoryProduct) : [];
|
|
312
|
+
} else {
|
|
313
|
+
returnObj.products = products;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
const sections = subItemCollections.flatMap(el => el.sections);
|
|
317
|
+
const sectionHierarchy = createSectionHierarchy(sections);
|
|
318
|
+
const productGroups = getProductGroups(products, sectionHierarchy);
|
|
319
|
+
if (productGroups) {
|
|
320
|
+
return {
|
|
321
|
+
category: returnObj.category,
|
|
322
|
+
productGroups: productGroups.sort((a, b) => {
|
|
323
|
+
if (a.products[0] && b.products[0]) {
|
|
324
|
+
return productSort.sortProducts(null, storeId)(a.products[0], b.products[0]);
|
|
325
|
+
}
|
|
326
|
+
return 0;
|
|
327
|
+
})
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
...returnObj,
|
|
333
|
+
products: returnObj.products.sort(productSort.sortProducts(null, storeId))
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
exports.COLLECTION_SECTION_OTHER_ID = COLLECTION_SECTION_OTHER_ID;
|
|
337
|
+
exports.HDDProductSlugs = HDDProductSlugs;
|
|
338
|
+
exports.MagicCollectionTags = MagicCollectionTags;
|
|
339
|
+
exports.ProductOptions = ProductOptions;
|
|
340
|
+
exports.createSectionHierarchy = createSectionHierarchy;
|
|
341
|
+
exports.getProStoreCategory = getProStoreCategory;
|
|
342
|
+
exports.getProductGroups = getProductGroups;
|
|
343
|
+
exports.getStoreProducts = getStoreProducts;
|
|
344
|
+
exports.isNonNullish = isNonNullish;
|
|
345
|
+
exports.removeExcludedProducts = removeExcludedProducts;
|
|
346
|
+
//# sourceMappingURL=product.js.map
|