@ubnt/store.core 9.45.0-beta.2 → 9.45.0-beta.4
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 +14 -0
- package/lib/_virtual/_virtual_multi-entry.js +2 -0
- 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/apis/smartcat.d.ts +4 -4
- package/lib/apis/smartcat.js +1 -1
- package/lib/apis/smartcat.js.map +1 -1
- package/lib/apis/smartcat.mjs +1 -1
- package/lib/apis/smartcat.mjs.map +1 -1
- package/lib/assets/close2.svg +2 -3
- package/lib/assets/close3.svg +3 -2
- package/lib/assets/pause.svg +3 -3
- package/lib/assets/pause2.svg +3 -3
- package/lib/assets/ux.png +0 -0
- package/lib/components/Accordion/Accordion.js +2 -2
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/Accordion.mjs +2 -2
- package/lib/components/Accordion/Accordion.mjs.map +1 -1
- package/lib/components/CustomImage/CustomImage.js +4 -4
- package/lib/components/CustomImage/CustomImage.js.map +1 -1
- package/lib/components/CustomImage/CustomImage.mjs +4 -4
- package/lib/components/CustomImage/CustomImage.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.js.map +1 -1
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +2 -2
- package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs.map +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
- package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
- package/lib/components/Gallery/Gallery.context.js.map +1 -1
- package/lib/components/Gallery/Gallery.context.mjs.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.js +3 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.js.map +1 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.mjs +3 -1
- package/lib/components/Gallery/GalleryItem/GalleryItem.mjs.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.js +3 -3
- package/lib/components/Header/AccountFrame/AccountFrame.js.map +1 -1
- package/lib/components/Header/AccountFrame/AccountFrame.mjs +3 -3
- package/lib/components/Header/AccountFrame/AccountFrame.mjs.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
- package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
- 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/Header/Header.types.d.ts +1 -1
- package/lib/components/Header/Header.types.js.map +1 -1
- package/lib/components/Header/Header.types.mjs.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.js.map +1 -1
- package/lib/components/Header/LanguageFrame/LanguageFrame.mjs.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js +2 -2
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.js.map +1 -1
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs +2 -2
- package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +11 -7
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +11 -7
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Hero/Hero.js +1 -1
- package/lib/components/Hero/Hero.js.map +1 -1
- package/lib/components/Hero/Hero.mjs +1 -1
- package/lib/components/Hero/Hero.mjs.map +1 -1
- package/lib/components/HeroVideo/HeroVideo.js +5 -5
- package/lib/components/HeroVideo/HeroVideo.js.map +1 -1
- package/lib/components/HeroVideo/HeroVideo.mjs +5 -5
- package/lib/components/HeroVideo/HeroVideo.mjs.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.js.map +1 -1
- package/lib/components/ImageCarousel/ImageCarousel.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.js +4 -1
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +4 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js +8 -8
- package/lib/components/LandingPageSidebar/LandingPageSidebar.js.map +1 -1
- package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +8 -8
- package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs.map +1 -1
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js +4 -4
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.js.map +1 -1
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.mjs +4 -4
- package/lib/components/MeetUniFiVideoPlayer/MeetUniFiVideoPlayer.mjs.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.js +2 -2
- package/lib/components/MicrositeHero/MicrositeHero.js.map +1 -1
- package/lib/components/MicrositeHero/MicrositeHero.mjs +2 -2
- package/lib/components/MicrositeHero/MicrositeHero.mjs.map +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/MicrositeVideoSlideshow.mjs +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.js +1 -1
- package/lib/components/MicrositeVideoSlideshow/assets/pause.svg.mjs +2 -2
- package/lib/components/Microsites/Microsites.types.js.map +1 -1
- package/lib/components/Microsites/Microsites.types.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js +37 -26
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.js.map +1 -1
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.mjs +37 -26
- package/lib/components/ModelCompareV3/ModelComparePropertyValueGridItem.mjs.map +1 -1
- package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js +16 -8
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.js.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.mjs +16 -8
- package/lib/components/ModelCompareV3/StickyGrid/StickyGridItem.mjs.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/context.d.ts +3 -3
- package/lib/components/ModelCompareV3/StickyGrid/context.js.map +1 -1
- package/lib/components/ModelCompareV3/StickyGrid/context.mjs.map +1 -1
- package/lib/components/PriceRangeSlider/PriceRangeSlider.types.d.ts +2 -2
- package/lib/components/PriceRangeSlider/PriceRangeSlider.types.js.map +1 -1
- package/lib/components/PriceRangeSlider/PriceRangeSlider.types.mjs.map +1 -1
- package/lib/components/ProductCard/ProductCard.js +1 -1
- package/lib/components/ProductCard/ProductCard.js.map +1 -1
- package/lib/components/ProductCard/ProductCard.mjs +2 -2
- package/lib/components/ProductCard/ProductCard.mjs.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.js +2 -2
- package/lib/components/ProductCardPopup/ProductCardPopup.js.map +1 -1
- package/lib/components/ProductCardPopup/ProductCardPopup.mjs +2 -2
- package/lib/components/ProductCardPopup/ProductCardPopup.mjs.map +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js +6 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.js.map +1 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.mjs +6 -1
- package/lib/components/ProductSectionTabs/ProductSectionTabs.mjs.map +1 -1
- package/lib/components/ProductWizard/ProductWizard.js +3 -3
- package/lib/components/ProductWizard/ProductWizard.js.map +1 -1
- package/lib/components/ProductWizard/ProductWizard.mjs +3 -3
- package/lib/components/ProductWizard/ProductWizard.mjs.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js +17 -4
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.js.map +1 -1
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.mjs +17 -4
- package/lib/components/ProductWizardFootnotes/ProductWizardFootnotes.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +673 -589
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +672 -589
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js +4 -4
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs +4 -4
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +2 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +1 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +1 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.js +27 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.js.map +1 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.mjs +3 -0
- package/lib/components/ResourceCalculatorV1/assets/consoles/ux.png.mjs.map +1 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.js +1 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +1 -0
- package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.js +87 -64
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.js.map +1 -1
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs +87 -64
- package/lib/components/ScrollWrapper/ScrollWrapper.styles.mjs.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.context.js +17 -14
- package/lib/components/StorageSliders/StorageSliders.context.js.map +1 -1
- package/lib/components/StorageSliders/StorageSliders.context.mjs +17 -14
- package/lib/components/StorageSliders/StorageSliders.context.mjs.map +1 -1
- package/lib/components/StorybookUtils/StoryFaker.js.map +1 -1
- package/lib/components/StorybookUtils/StoryFaker.mjs.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.js +4 -4
- package/lib/components/VariantSelector/VariantSelector.js.map +1 -1
- package/lib/components/VariantSelector/VariantSelector.mjs +4 -4
- package/lib/components/VariantSelector/VariantSelector.mjs.map +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.js +14 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.js.map +1 -1
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs +14 -16
- package/lib/components/VideoPlayerNew/VideoPlayer.mjs.map +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
- package/lib/components/VideoPlayerNew/assets/pause.svg.js +1 -1
- package/lib/components/VideoPlayerNew/assets/pause.svg.mjs +2 -2
- package/lib/constants/address.d.ts +1 -1
- package/lib/constants/address.js +34 -34
- package/lib/constants/address.js.map +1 -1
- package/lib/constants/address.mjs +34 -34
- package/lib/constants/address.mjs.map +1 -1
- package/lib/constants/icons/options/colors/black.svg.js +5 -5
- package/lib/constants/icons/options/colors/index.js +3 -3
- package/lib/constants/icons/options/styles/black.svg.js +5 -5
- package/lib/constants/icons/options/styles/index.js +3 -3
- package/lib/constants/optionIcons.js +6 -6
- package/lib/constants/optionIcons.mjs +4 -4
- package/lib/constants/postalCode.js +10 -10
- package/lib/constants/postalCode.js.map +1 -1
- package/lib/constants/postalCode.mjs +10 -10
- package/lib/constants/postalCode.mjs.map +1 -1
- package/lib/contexts/MenuContext/context.js +27 -26
- package/lib/contexts/MenuContext/context.js.map +1 -1
- package/lib/contexts/MenuContext/context.mjs +27 -26
- package/lib/contexts/MenuContext/context.mjs.map +1 -1
- package/lib/helpers/ux.d.ts +0 -11
- package/lib/hooks/useScrollToY.js.map +1 -1
- package/lib/hooks/useScrollToY.mjs.map +1 -1
- package/lib/utils/blackFriday.d.ts +1 -20
- package/lib/utils/blackFriday.js +3 -84
- package/lib/utils/blackFriday.js.map +1 -1
- package/lib/utils/blackFriday.mjs +1 -74
- package/lib/utils/blackFriday.mjs.map +1 -1
- package/lib/utils/collectionSlug.js +2 -2
- package/lib/utils/collectionSlug.js.map +1 -1
- package/lib/utils/collectionSlug.mjs +2 -2
- package/lib/utils/collectionSlug.mjs.map +1 -1
- package/lib/utils/errors.js.map +1 -1
- package/lib/utils/errors.mjs.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +2 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/index.mjs +2 -0
- package/lib/utils/index.mjs.map +1 -1
- package/lib/utils/measures.js +1 -0
- package/lib/utils/measures.js.map +1 -1
- package/lib/utils/measures.mjs +1 -0
- package/lib/utils/measures.mjs.map +1 -1
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/misc.js +1 -1
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +1 -1
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/nextjs/ssr/transform-css-module.js.map +1 -1
- package/lib/utils/nextjs/ssr/transform-css-module.mjs.map +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/lib/utils/product.js +4 -4
- package/lib/utils/product.js.map +1 -1
- package/lib/utils/product.mjs +4 -4
- package/lib/utils/product.mjs.map +1 -1
- package/lib/utils/sales.d.ts +34 -0
- package/lib/utils/sales.js +113 -0
- package/lib/utils/sales.js.map +1 -0
- package/lib/utils/sales.mjs +99 -0
- package/lib/utils/sales.mjs.map +1 -0
- package/lib/utils/sales.test.d.ts +1 -0
- package/lib/utils/tags.js +2 -2
- package/lib/utils/tags.js.map +1 -1
- package/lib/utils/tags.mjs +2 -2
- package/lib/utils/tags.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/helpers/ux.js +0 -53
- package/lib/helpers/ux.js.map +0 -1
- package/lib/helpers/ux.mjs +0 -49
- package/lib/helpers/ux.mjs.map +0 -1
|
@@ -21,6 +21,7 @@ var DeviceId = /* @__PURE__ */(DeviceId2 => {
|
|
|
21
21
|
DeviceId2["UcgMax"] = "UcgMax";
|
|
22
22
|
DeviceId2["Udr7"] = "Udr7";
|
|
23
23
|
DeviceId2["Envr"] = "Envr";
|
|
24
|
+
DeviceId2["UX"] = "UX";
|
|
24
25
|
return DeviceId2;
|
|
25
26
|
})(DeviceId || {});
|
|
26
27
|
export { DeviceId, FeatureId, isMessageFormatted };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComputeResourceCalculator.types.mjs","sources":["../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.ts"],"sourcesContent":["import type { StaticImageData } from \"next/image\";\n\nimport { en as EN_TRANSLATION } from \"../translations\";\n\nexport type ResourceCalculatorTranslationKey = keyof typeof EN_TRANSLATION;\n\nexport type ComputeResourceCalculatorProps = {\n defaultActiveDeviceId?: DeviceId;\n};\n\n// #############################################################################\n// Type guards\n// #############################################################################\nexport const isMessageFormatted = (\n title: string,\n): title is ResourceCalculatorTranslationKey =>\n EN_TRANSLATION[title as ResourceCalculatorTranslationKey] !== undefined;\n\n// #############################################################################\n// UI state types\n// #############################################################################\nexport enum FeatureId {\n Network = \"Network\",\n Protect = \"Protect\",\n Talk = \"Talk\",\n Access = \"Access\",\n}\nexport type ComputeResourceCalculatorInputs = {\n [FeatureId.Network]: {\n enabled: boolean;\n accessPoints: number;\n vpn: boolean;\n detections: boolean;\n adBlocking: boolean;\n qos: boolean;\n };\n [FeatureId.Protect]: {\n enabled: boolean;\n cameraHd: number;\n camera2k: number;\n camera4k: number;\n daysOfStorage: number;\n };\n [FeatureId.Talk]: {\n enabled: boolean;\n phones: number;\n record: boolean;\n };\n [FeatureId.Access]: {\n enabled: boolean;\n doors: number;\n };\n};\n\nexport type FeaturesBooleanMap = Record<FeatureId, boolean>;\n\n// #############################################################################\n// Constants types\n// #############################################################################\nexport enum DeviceId {\n Udr = \"Udr\",\n UdmProUdmSe = \"UdmProUdmSe\",\n Unvr = \"Unvr\",\n UnvrPro = \"UnvrPro\",\n CkG2Plus = \"CkG2Plus\",\n DreamWall = \"DreamWall\",\n UDMProMax = \"UDMProMax\",\n EFG = \"EFG\",\n UcgMax = \"UcgMax\",\n Udr7 = \"Udr7\",\n Envr = \"Envr\",\n}\n\n/**\n * - `value` field represents how much hardware resources are used.\n * - `weight` field represents how much the hardware resource should be weighed when calculating \"computed resources\".\n */\ntype HardwareResources = {\n cpu: {\n value: number;\n weight: number;\n };\n memory: {\n value: number;\n weight: number;\n };\n};\n\n/**\n * HDD size options to use for retention calculation.\n * - 0: No Storage\n */\nexport type HddGigabyteOption = 0 | 512 | 1000 | 2000 | 8000 | 16000;\nexport type HddGigabyteOptions = [HddGigabyteOption, ...HddGigabyteOption[]];\n\n/**\n * Device data.\n */\nexport type Device = {\n id: DeviceId;\n sku: string[];\n title: ResourceCalculatorTranslationKey;\n subtitle?: string;\n img: {\n src: string | StaticImageData;\n height: number;\n width: number;\n };\n\n settings: {\n // Default active features\n defaultEnabledFeatures: FeatureId[];\n\n // Force enabled features\n forcedFeatures?: FeatureId[];\n\n // HDD settings\n hdd?: {\n // Max number selectable hdds\n max: number;\n // The HDD TB options user can input - default is 1, 8, 16\n gigabyteOptions?: HddGigabyteOptions;\n // Does the device use a parity disk? Used to calculate storage days by hdd count.\n parityDisks: number;\n };\n\n // Max number of features that can be enabled at once\n maxFeatures?: number;\n\n /**\n * This is an edge case feature, devices can have decreased max values\n * for some inputs if a count of enabled features is reached.\n *\n * ---------------------------------------------------------\n * Example:\n * We want a device to have decreased max values for camera inputs if\n * 2 or more features are enabled.\n *\n > maxReducer: {\n > featureCountTrigger: 2,\n > maxValues: {\n > cameraHd: 5,\n > camera2k: 3,\n > camera4k: 1,\n > },\n > }\n * ---------------------------------------------------------\n */\n maxReducer?: {\n enabledFeaturesTrigger: number;\n maxValues: {\n cameras?: {\n cameraHd: number;\n camera2k: number;\n camera4k: number;\n };\n };\n };\n };\n\n // Hardware load data\n loadData: {\n Network?: {\n enableFeature: HardwareResources;\n accessPoint: {\n max: number;\n data: HardwareResources;\n };\n vpn: HardwareResources;\n securityDetection: HardwareResources;\n adBlocking: HardwareResources;\n qos: HardwareResources;\n };\n Protect?: {\n enableFeature: HardwareResources;\n playback: HardwareResources;\n liveView: HardwareResources;\n cameraHd: {\n max: number;\n data: HardwareResources;\n };\n camera2k: {\n max: number;\n data: HardwareResources;\n };\n camera4k: {\n max: number;\n data: HardwareResources;\n };\n };\n Access?: {\n enableFeature: HardwareResources;\n door: {\n max: number;\n data: HardwareResources;\n };\n };\n Talk?: {\n enableFeature: HardwareResources;\n phone: {\n max: number;\n data: HardwareResources;\n };\n record: HardwareResources;\n };\n };\n};\n\n// #############################################################################\n// Constants type\n// #############################################################################\nexport type ComputeResourceCalculatorConstants = {\n DEVICES: [Device, ...Device[]];\n};\n"],"names":["isMessageFormatted","title","EN_TRANSLATION","FeatureId","DeviceId"],"mappings":";;;AAaO,MAAMA,kBAAqB,GAChCC,KAEA,IAAAC,cAAA,CAAeD,KAAyC,CAAM,KAAA,KAAA,CAAA;AAKpD,IAAAE,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,SAAU,CAAA,GAAA,SAAA;EACVA,WAAA,SAAU,CAAA,GAAA,SAAA;EACVA,WAAA,MAAO,CAAA,GAAA,MAAA;EACPA,WAAA,QAAS,CAAA,GAAA,QAAA;EAJCA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;AAsCA,IAAAC,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,KAAM,CAAA,GAAA,KAAA;EACNA,UAAA,aAAc,CAAA,GAAA,aAAA;EACdA,UAAA,MAAO,CAAA,GAAA,MAAA;EACPA,UAAA,SAAU,CAAA,GAAA,SAAA;EACVA,UAAA,UAAW,CAAA,GAAA,UAAA;EACXA,UAAA,WAAY,CAAA,GAAA,WAAA;EACZA,UAAA,WAAY,CAAA,GAAA,WAAA;EACZA,UAAA,KAAM,CAAA,GAAA,KAAA;EACNA,UAAA,QAAS,CAAA,GAAA,QAAA;EACTA,UAAA,MAAO,CAAA,GAAA,MAAA;EACPA,UAAA,MAAO,CAAA,GAAA,MAAA;
|
|
1
|
+
{"version":3,"file":"ComputeResourceCalculator.types.mjs","sources":["../../../../src/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.ts"],"sourcesContent":["import type { StaticImageData } from \"next/image\";\n\nimport { en as EN_TRANSLATION } from \"../translations\";\n\nexport type ResourceCalculatorTranslationKey = keyof typeof EN_TRANSLATION;\n\nexport type ComputeResourceCalculatorProps = {\n defaultActiveDeviceId?: DeviceId;\n};\n\n// #############################################################################\n// Type guards\n// #############################################################################\nexport const isMessageFormatted = (\n title: string,\n): title is ResourceCalculatorTranslationKey =>\n EN_TRANSLATION[title as ResourceCalculatorTranslationKey] !== undefined;\n\n// #############################################################################\n// UI state types\n// #############################################################################\nexport enum FeatureId {\n Network = \"Network\",\n Protect = \"Protect\",\n Talk = \"Talk\",\n Access = \"Access\",\n}\nexport type ComputeResourceCalculatorInputs = {\n [FeatureId.Network]: {\n enabled: boolean;\n accessPoints: number;\n vpn: boolean;\n detections: boolean;\n adBlocking: boolean;\n qos: boolean;\n };\n [FeatureId.Protect]: {\n enabled: boolean;\n cameraHd: number;\n camera2k: number;\n camera4k: number;\n daysOfStorage: number;\n };\n [FeatureId.Talk]: {\n enabled: boolean;\n phones: number;\n record: boolean;\n };\n [FeatureId.Access]: {\n enabled: boolean;\n doors: number;\n };\n};\n\nexport type FeaturesBooleanMap = Record<FeatureId, boolean>;\n\n// #############################################################################\n// Constants types\n// #############################################################################\nexport enum DeviceId {\n Udr = \"Udr\",\n UdmProUdmSe = \"UdmProUdmSe\",\n Unvr = \"Unvr\",\n UnvrPro = \"UnvrPro\",\n CkG2Plus = \"CkG2Plus\",\n DreamWall = \"DreamWall\",\n UDMProMax = \"UDMProMax\",\n EFG = \"EFG\",\n UcgMax = \"UcgMax\",\n Udr7 = \"Udr7\",\n Envr = \"Envr\",\n UX = \"UX\",\n}\n\n/**\n * - `value` field represents how much hardware resources are used.\n * - `weight` field represents how much the hardware resource should be weighed when calculating \"computed resources\".\n */\ntype HardwareResources = {\n cpu: {\n value: number;\n weight: number;\n };\n memory: {\n value: number;\n weight: number;\n };\n};\n\n/**\n * HDD size options to use for retention calculation.\n * - 0: No Storage\n */\nexport type HddGigabyteOption = 0 | 512 | 1000 | 2000 | 8000 | 16000;\nexport type HddGigabyteOptions = [HddGigabyteOption, ...HddGigabyteOption[]];\n\n/**\n * Device data.\n */\nexport type Device = {\n id: DeviceId;\n sku: string[];\n title: ResourceCalculatorTranslationKey;\n subtitle?: string;\n img: {\n src: string | StaticImageData;\n height: number;\n width: number;\n };\n\n settings: {\n // Default active features\n defaultEnabledFeatures: FeatureId[];\n\n // Force enabled features\n forcedFeatures?: FeatureId[];\n\n // HDD settings\n hdd?: {\n // Max number selectable hdds\n max: number;\n // The HDD TB options user can input - default is 1, 8, 16\n gigabyteOptions?: HddGigabyteOptions;\n // Does the device use a parity disk? Used to calculate storage days by hdd count.\n parityDisks: number;\n };\n\n // Max number of features that can be enabled at once\n maxFeatures?: number;\n\n /**\n * This is an edge case feature, devices can have decreased max values\n * for some inputs if a count of enabled features is reached.\n *\n * ---------------------------------------------------------\n * Example:\n * We want a device to have decreased max values for camera inputs if\n * 2 or more features are enabled.\n *\n > maxReducer: {\n > featureCountTrigger: 2,\n > maxValues: {\n > cameraHd: 5,\n > camera2k: 3,\n > camera4k: 1,\n > },\n > }\n * ---------------------------------------------------------\n */\n maxReducer?: {\n enabledFeaturesTrigger: number;\n maxValues: {\n cameras?: {\n cameraHd: number;\n camera2k: number;\n camera4k: number;\n };\n };\n };\n };\n\n // Hardware load data\n loadData: {\n Network?: {\n enableFeature: HardwareResources;\n accessPoint: {\n max: number;\n data: HardwareResources;\n };\n vpn: HardwareResources;\n securityDetection: HardwareResources;\n adBlocking: HardwareResources;\n qos: HardwareResources;\n };\n Protect?: {\n enableFeature: HardwareResources;\n playback: HardwareResources;\n liveView: HardwareResources;\n cameraHd: {\n max: number;\n data: HardwareResources;\n };\n camera2k: {\n max: number;\n data: HardwareResources;\n };\n camera4k: {\n max: number;\n data: HardwareResources;\n };\n };\n Access?: {\n enableFeature: HardwareResources;\n door: {\n max: number;\n data: HardwareResources;\n };\n };\n Talk?: {\n enableFeature: HardwareResources;\n phone: {\n max: number;\n data: HardwareResources;\n };\n record: HardwareResources;\n };\n };\n};\n\n// #############################################################################\n// Constants type\n// #############################################################################\nexport type ComputeResourceCalculatorConstants = {\n DEVICES: [Device, ...Device[]];\n};\n"],"names":["isMessageFormatted","title","EN_TRANSLATION","FeatureId","DeviceId"],"mappings":";;;AAaO,MAAMA,kBAAqB,GAChCC,KAEA,IAAAC,cAAA,CAAeD,KAAyC,CAAM,KAAA,KAAA,CAAA;AAKpD,IAAAE,SAAA,GAAA,gBAAAA,UAAL,IAAA;EACLA,WAAA,SAAU,CAAA,GAAA,SAAA;EACVA,WAAA,SAAU,CAAA,GAAA,SAAA;EACVA,WAAA,MAAO,CAAA,GAAA,MAAA;EACPA,WAAA,QAAS,CAAA,GAAA,QAAA;EAJCA,OAAAA,UAAAA;AAAA,CAAA,EAAAA,SAAA,IAAA,CAAA,CAAA,CAAA;AAsCA,IAAAC,QAAA,GAAA,gBAAAA,SAAL,IAAA;EACLA,UAAA,KAAM,CAAA,GAAA,KAAA;EACNA,UAAA,aAAc,CAAA,GAAA,aAAA;EACdA,UAAA,MAAO,CAAA,GAAA,MAAA;EACPA,UAAA,SAAU,CAAA,GAAA,SAAA;EACVA,UAAA,UAAW,CAAA,GAAA,UAAA;EACXA,UAAA,WAAY,CAAA,GAAA,WAAA;EACZA,UAAA,WAAY,CAAA,GAAA,WAAA;EACZA,UAAA,KAAM,CAAA,GAAA,KAAA;EACNA,UAAA,QAAS,CAAA,GAAA,QAAA;EACTA,UAAA,MAAO,CAAA,GAAA,MAAA;EACPA,UAAA,MAAO,CAAA,GAAA,MAAA;EACPA,UAAA,IAAK,CAAA,GAAA,IAAA;EAZKA,OAAAA,SAAAA;AAAA,CAAA,EAAAA,QAAA,IAAA,CAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var ux = require("../../../../assets/ux.png");
|
|
7
|
+
function _interopDefault(e) {
|
|
8
|
+
return e && e.__esModule ? e : {
|
|
9
|
+
default: e
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var ux__default = /*#__PURE__*/_interopDefault(ux);
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return ux__default["default"];
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.keys(ux).forEach(function (k) {
|
|
20
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return ux[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=ux.png.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux.png.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ux.png.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useResourceCalculatorTranslation: () => {
|
|
2
|
-
intl: import("@formatjs/intl").IntlShape<"add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.UDM Pro / SE" | "device.ENVR" | "device.UDM Pro Max" | "device.UNVR" | "device.UNVR Pro" | "device.CloudKey+" | "device.UDW" | "device.UDR" | "device.UDR7" | "device.EFG" | "device.UCG Max" | "estimatesMayVary" | "network.accessPoints" | "network.adBlocking" | "network.clientsPerAP" | "network.maxFeaturesNote" | "network.qos" | "network.securityDetections" | "network.vpn" | "notAvailable" | "poeCapacity" | "poeConsumer.AC In-Wall" | "poeConsumer.AC Lite" | "poeConsumer.AC Long-Range" | "poeConsumer.AC Mesh" | "poeConsumer.AC Mesh Pro" | "poeConsumer.AC Pro" | "poeConsumer.AI 360" | "poeConsumer.AI Bullet" | "poeConsumer.AI DSLR" | "poeConsumer.AI DSLR LD" | "poeConsumer.AI Pro" | "poeConsumer.AI Theta" | "poeConsumer.Access Hub" | "poeConsumer.Access Reader G2" | "poeConsumer.Access Reader G2 Pro" | "poeConsumer.Access Reader Lite" | "poeConsumer.Analog Telephone Adapter" | "poeConsumer.Building Bridge" | "poeConsumer.Building Bridge XG" | "poeConsumer.Connect Display" | "poeConsumer.G3 Flex" | "poeConsumer.G4 Bullet" | "poeConsumer.G4 Dome" | "poeConsumer.G4 Doorbell Pro PoE Kit" | "poeConsumer.G4 PTZ" | "poeConsumer.G4 Pro" | "poeConsumer.G5 Bullet" | "poeConsumer.G5 Dome" | "poeConsumer.G5 Flex" | "poeConsumer.G5 Pro" | "poeConsumer.G5 Pro with Enhancer" | "poeConsumer.Phone Touch" | "poeConsumer.Phone Touch Max" | "poeConsumer.Protect Floodlight" | "poeConsumer.Protect Viewport" | "poeConsumer.Swiss Army Knife Ultra" | "poeConsumer.U6 Enterprise" | "poeConsumer.U6 Enterprise In-Wall" | "poeConsumer.U6 In-Wall" | "poeConsumer.U6 Lite" | "poeConsumer.U6 Long-Range" | "poeConsumer.U6 Mesh" | "poeConsumer.U6 Pro" | "poeConsumer.U6+" | "poeConsumer.U7 Pro" | "poeConsumer.WiFi BaseStation XG" | "poeConsumer.empty" | "poePowerBudget" | "poeProvider.8 PoE (Gen1)" | "poeProvider.8 PoE, SFP (Gen1)" | "poeProvider.Enterprise 24 PoE" | "poeProvider.Enterprise 48 PoE" | "poeProvider.Enterprise 8 PoE" | "poeProvider.Flex" | "poeProvider.Industrial" | "poeProvider.Lite 16 PoE" | "poeProvider.Lite 8 PoE" | "poeProvider.Mission Critical" | "poeProvider.Pro 24 PoE" | "poeProvider.Pro 48 PoE" | "poeProvider.Pro 8 PoE" | "poeProvider.Pro Max 24 PoE" | "poeProvider.Pro Max 48 PoE" | "poeProvider.Standard 16 PoE" | "poeProvider.Standard 16 PoE (Gen1)" | "poeProvider.Standard 24 PoE" | "poeProvider.Standard 24 PoE (Gen1)" | "poeProvider.Standard 48 PoE" | "poeProvider.Standard 48 PoE (Gen1)" | "poeProvider.Ultra" | "poeProvider.Ultra 210W" | "poeProvider.Ultra 60W" | "poeProvider.XG 6 PoE (Gen1)" | "protect.2kCameras" | "protect.4kCameras" | "protect.CkG2PlusNote" | "protect.DreamWallNote" | "protect.days" | "protect.hdCameras" | "protect.noStorage" | "protect.storageDriveSize" | "protect.storageProtection" | "recommendedPoeSwitches" | "removePorts" | "requirements" | "showLess" | "showMore" | "systemCapacity" | "talk.callRecording" | "talk.phones" | "watts">;
|
|
3
|
-
formatMessage: (id: "add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.UDM Pro / SE" | "device.ENVR" | "device.UDM Pro Max" | "device.UNVR" | "device.UNVR Pro" | "device.CloudKey+" | "device.UDW" | "device.UDR" | "device.UDR7" | "device.EFG" | "device.UCG Max" | "estimatesMayVary" | "network.accessPoints" | "network.adBlocking" | "network.clientsPerAP" | "network.maxFeaturesNote" | "network.qos" | "network.securityDetections" | "network.vpn" | "notAvailable" | "poeCapacity" | "poeConsumer.AC In-Wall" | "poeConsumer.AC Lite" | "poeConsumer.AC Long-Range" | "poeConsumer.AC Mesh" | "poeConsumer.AC Mesh Pro" | "poeConsumer.AC Pro" | "poeConsumer.AI 360" | "poeConsumer.AI Bullet" | "poeConsumer.AI DSLR" | "poeConsumer.AI DSLR LD" | "poeConsumer.AI Pro" | "poeConsumer.AI Theta" | "poeConsumer.Access Hub" | "poeConsumer.Access Reader G2" | "poeConsumer.Access Reader G2 Pro" | "poeConsumer.Access Reader Lite" | "poeConsumer.Analog Telephone Adapter" | "poeConsumer.Building Bridge" | "poeConsumer.Building Bridge XG" | "poeConsumer.Connect Display" | "poeConsumer.G3 Flex" | "poeConsumer.G4 Bullet" | "poeConsumer.G4 Dome" | "poeConsumer.G4 Doorbell Pro PoE Kit" | "poeConsumer.G4 PTZ" | "poeConsumer.G4 Pro" | "poeConsumer.G5 Bullet" | "poeConsumer.G5 Dome" | "poeConsumer.G5 Flex" | "poeConsumer.G5 Pro" | "poeConsumer.G5 Pro with Enhancer" | "poeConsumer.Phone Touch" | "poeConsumer.Phone Touch Max" | "poeConsumer.Protect Floodlight" | "poeConsumer.Protect Viewport" | "poeConsumer.Swiss Army Knife Ultra" | "poeConsumer.U6 Enterprise" | "poeConsumer.U6 Enterprise In-Wall" | "poeConsumer.U6 In-Wall" | "poeConsumer.U6 Lite" | "poeConsumer.U6 Long-Range" | "poeConsumer.U6 Mesh" | "poeConsumer.U6 Pro" | "poeConsumer.U6+" | "poeConsumer.U7 Pro" | "poeConsumer.WiFi BaseStation XG" | "poeConsumer.empty" | "poePowerBudget" | "poeProvider.8 PoE (Gen1)" | "poeProvider.8 PoE, SFP (Gen1)" | "poeProvider.Enterprise 24 PoE" | "poeProvider.Enterprise 48 PoE" | "poeProvider.Enterprise 8 PoE" | "poeProvider.Flex" | "poeProvider.Industrial" | "poeProvider.Lite 16 PoE" | "poeProvider.Lite 8 PoE" | "poeProvider.Mission Critical" | "poeProvider.Pro 24 PoE" | "poeProvider.Pro 48 PoE" | "poeProvider.Pro 8 PoE" | "poeProvider.Pro Max 24 PoE" | "poeProvider.Pro Max 48 PoE" | "poeProvider.Standard 16 PoE" | "poeProvider.Standard 16 PoE (Gen1)" | "poeProvider.Standard 24 PoE" | "poeProvider.Standard 24 PoE (Gen1)" | "poeProvider.Standard 48 PoE" | "poeProvider.Standard 48 PoE (Gen1)" | "poeProvider.Ultra" | "poeProvider.Ultra 210W" | "poeProvider.Ultra 60W" | "poeProvider.XG 6 PoE (Gen1)" | "protect.2kCameras" | "protect.4kCameras" | "protect.CkG2PlusNote" | "protect.DreamWallNote" | "protect.days" | "protect.hdCameras" | "protect.noStorage" | "protect.storageDriveSize" | "protect.storageProtection" | "recommendedPoeSwitches" | "removePorts" | "requirements" | "showLess" | "showMore" | "systemCapacity" | "talk.callRecording" | "talk.phones" | "watts", values?: {
|
|
2
|
+
intl: import("@formatjs/intl").IntlShape<"add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.UDM Pro / SE" | "device.ENVR" | "device.UDM Pro Max" | "device.UNVR" | "device.UNVR Pro" | "device.CloudKey+" | "device.UDW" | "device.UDR" | "device.UDR7" | "device.UX" | "device.EFG" | "device.UCG Max" | "estimatesMayVary" | "network.accessPoints" | "network.adBlocking" | "network.clientsPerAP" | "network.maxFeaturesNote" | "network.qos" | "network.securityDetections" | "network.vpn" | "notAvailable" | "poeCapacity" | "poeConsumer.AC In-Wall" | "poeConsumer.AC Lite" | "poeConsumer.AC Long-Range" | "poeConsumer.AC Mesh" | "poeConsumer.AC Mesh Pro" | "poeConsumer.AC Pro" | "poeConsumer.AI 360" | "poeConsumer.AI Bullet" | "poeConsumer.AI DSLR" | "poeConsumer.AI DSLR LD" | "poeConsumer.AI Pro" | "poeConsumer.AI Theta" | "poeConsumer.Access Hub" | "poeConsumer.Access Reader G2" | "poeConsumer.Access Reader G2 Pro" | "poeConsumer.Access Reader Lite" | "poeConsumer.Analog Telephone Adapter" | "poeConsumer.Building Bridge" | "poeConsumer.Building Bridge XG" | "poeConsumer.Connect Display" | "poeConsumer.G3 Flex" | "poeConsumer.G4 Bullet" | "poeConsumer.G4 Dome" | "poeConsumer.G4 Doorbell Pro PoE Kit" | "poeConsumer.G4 PTZ" | "poeConsumer.G4 Pro" | "poeConsumer.G5 Bullet" | "poeConsumer.G5 Dome" | "poeConsumer.G5 Flex" | "poeConsumer.G5 Pro" | "poeConsumer.G5 Pro with Enhancer" | "poeConsumer.Phone Touch" | "poeConsumer.Phone Touch Max" | "poeConsumer.Protect Floodlight" | "poeConsumer.Protect Viewport" | "poeConsumer.Swiss Army Knife Ultra" | "poeConsumer.U6 Enterprise" | "poeConsumer.U6 Enterprise In-Wall" | "poeConsumer.U6 In-Wall" | "poeConsumer.U6 Lite" | "poeConsumer.U6 Long-Range" | "poeConsumer.U6 Mesh" | "poeConsumer.U6 Pro" | "poeConsumer.U6+" | "poeConsumer.U7 Pro" | "poeConsumer.WiFi BaseStation XG" | "poeConsumer.empty" | "poePowerBudget" | "poeProvider.8 PoE (Gen1)" | "poeProvider.8 PoE, SFP (Gen1)" | "poeProvider.Enterprise 24 PoE" | "poeProvider.Enterprise 48 PoE" | "poeProvider.Enterprise 8 PoE" | "poeProvider.Flex" | "poeProvider.Industrial" | "poeProvider.Lite 16 PoE" | "poeProvider.Lite 8 PoE" | "poeProvider.Mission Critical" | "poeProvider.Pro 24 PoE" | "poeProvider.Pro 48 PoE" | "poeProvider.Pro 8 PoE" | "poeProvider.Pro Max 24 PoE" | "poeProvider.Pro Max 48 PoE" | "poeProvider.Standard 16 PoE" | "poeProvider.Standard 16 PoE (Gen1)" | "poeProvider.Standard 24 PoE" | "poeProvider.Standard 24 PoE (Gen1)" | "poeProvider.Standard 48 PoE" | "poeProvider.Standard 48 PoE (Gen1)" | "poeProvider.Ultra" | "poeProvider.Ultra 210W" | "poeProvider.Ultra 60W" | "poeProvider.XG 6 PoE (Gen1)" | "protect.2kCameras" | "protect.4kCameras" | "protect.CkG2PlusNote" | "protect.DreamWallNote" | "protect.days" | "protect.hdCameras" | "protect.noStorage" | "protect.storageDriveSize" | "protect.storageProtection" | "recommendedPoeSwitches" | "removePorts" | "requirements" | "showLess" | "showMore" | "systemCapacity" | "talk.callRecording" | "talk.phones" | "watts">;
|
|
3
|
+
formatMessage: (id: "add" | "network" | "protect" | "talk" | "access" | "portCount" | "ports" | "capacityCalculator" | "access.doors" | "addPorts" | "adjustYourDevice" | "assignPoeDevices" | "capacityExceeded" | "category.Access Points" | "category.Cameras" | "category.Connect Display" | "category.Door Access" | "category.Talk" | "cloudKeyNote" | "computeResources" | "designCenter.startYourProject" | "designCenter.title" | "device.UDM Pro / SE" | "device.ENVR" | "device.UDM Pro Max" | "device.UNVR" | "device.UNVR Pro" | "device.CloudKey+" | "device.UDW" | "device.UDR" | "device.UDR7" | "device.UX" | "device.EFG" | "device.UCG Max" | "estimatesMayVary" | "network.accessPoints" | "network.adBlocking" | "network.clientsPerAP" | "network.maxFeaturesNote" | "network.qos" | "network.securityDetections" | "network.vpn" | "notAvailable" | "poeCapacity" | "poeConsumer.AC In-Wall" | "poeConsumer.AC Lite" | "poeConsumer.AC Long-Range" | "poeConsumer.AC Mesh" | "poeConsumer.AC Mesh Pro" | "poeConsumer.AC Pro" | "poeConsumer.AI 360" | "poeConsumer.AI Bullet" | "poeConsumer.AI DSLR" | "poeConsumer.AI DSLR LD" | "poeConsumer.AI Pro" | "poeConsumer.AI Theta" | "poeConsumer.Access Hub" | "poeConsumer.Access Reader G2" | "poeConsumer.Access Reader G2 Pro" | "poeConsumer.Access Reader Lite" | "poeConsumer.Analog Telephone Adapter" | "poeConsumer.Building Bridge" | "poeConsumer.Building Bridge XG" | "poeConsumer.Connect Display" | "poeConsumer.G3 Flex" | "poeConsumer.G4 Bullet" | "poeConsumer.G4 Dome" | "poeConsumer.G4 Doorbell Pro PoE Kit" | "poeConsumer.G4 PTZ" | "poeConsumer.G4 Pro" | "poeConsumer.G5 Bullet" | "poeConsumer.G5 Dome" | "poeConsumer.G5 Flex" | "poeConsumer.G5 Pro" | "poeConsumer.G5 Pro with Enhancer" | "poeConsumer.Phone Touch" | "poeConsumer.Phone Touch Max" | "poeConsumer.Protect Floodlight" | "poeConsumer.Protect Viewport" | "poeConsumer.Swiss Army Knife Ultra" | "poeConsumer.U6 Enterprise" | "poeConsumer.U6 Enterprise In-Wall" | "poeConsumer.U6 In-Wall" | "poeConsumer.U6 Lite" | "poeConsumer.U6 Long-Range" | "poeConsumer.U6 Mesh" | "poeConsumer.U6 Pro" | "poeConsumer.U6+" | "poeConsumer.U7 Pro" | "poeConsumer.WiFi BaseStation XG" | "poeConsumer.empty" | "poePowerBudget" | "poeProvider.8 PoE (Gen1)" | "poeProvider.8 PoE, SFP (Gen1)" | "poeProvider.Enterprise 24 PoE" | "poeProvider.Enterprise 48 PoE" | "poeProvider.Enterprise 8 PoE" | "poeProvider.Flex" | "poeProvider.Industrial" | "poeProvider.Lite 16 PoE" | "poeProvider.Lite 8 PoE" | "poeProvider.Mission Critical" | "poeProvider.Pro 24 PoE" | "poeProvider.Pro 48 PoE" | "poeProvider.Pro 8 PoE" | "poeProvider.Pro Max 24 PoE" | "poeProvider.Pro Max 48 PoE" | "poeProvider.Standard 16 PoE" | "poeProvider.Standard 16 PoE (Gen1)" | "poeProvider.Standard 24 PoE" | "poeProvider.Standard 24 PoE (Gen1)" | "poeProvider.Standard 48 PoE" | "poeProvider.Standard 48 PoE (Gen1)" | "poeProvider.Ultra" | "poeProvider.Ultra 210W" | "poeProvider.Ultra 60W" | "poeProvider.XG 6 PoE (Gen1)" | "protect.2kCameras" | "protect.4kCameras" | "protect.CkG2PlusNote" | "protect.DreamWallNote" | "protect.days" | "protect.hdCameras" | "protect.noStorage" | "protect.storageDriveSize" | "protect.storageProtection" | "recommendedPoeSwitches" | "removePorts" | "requirements" | "showLess" | "showMore" | "systemCapacity" | "talk.callRecording" | "talk.phones" | "watts", values?: {
|
|
4
4
|
[x: string]: import("intl-messageformat").PrimitiveType | import("intl-messageformat").FormatXMLElementFn<string, string>;
|
|
5
5
|
}) => string;
|
|
6
6
|
};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
4
|
var layout = require('../../constants/layout.js');
|
|
5
5
|
var theme = require('../../constants/theme.js');
|
|
6
|
-
var ux = require('../../helpers/ux.js');
|
|
7
6
|
require('../StyleableSvgImage/index.js');
|
|
8
7
|
var StyleableSvgImage = require('../StyleableSvgImage/StyleableSvgImage.js');
|
|
9
8
|
function _interopDefault(e) {
|
|
@@ -27,18 +26,22 @@ const ScrollContainer = styled__default["default"].div`
|
|
|
27
26
|
|
|
28
27
|
${({
|
|
29
28
|
$direction
|
|
30
|
-
}) =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
}) => {
|
|
30
|
+
switch ($direction) {
|
|
31
|
+
case "horizontal":
|
|
32
|
+
return styled.css`
|
|
33
|
+
overscroll-behavior-x: contain;
|
|
34
|
+
overflow: scroll hidden;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
`;
|
|
37
|
+
case "vertical":
|
|
38
|
+
return styled.css`
|
|
39
|
+
overscroll-behavior-y: contain;
|
|
40
|
+
overflow: hidden scroll;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
}};
|
|
42
45
|
|
|
43
46
|
/* Hide scroll bar */
|
|
44
47
|
scrollbar-width: none;
|
|
@@ -83,43 +86,51 @@ const ArrowIcon = styled__default["default"].div`
|
|
|
83
86
|
$direction,
|
|
84
87
|
$first,
|
|
85
88
|
$arrowGap
|
|
86
|
-
}) =>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
}) => {
|
|
90
|
+
switch ($direction) {
|
|
91
|
+
case "horizontal":
|
|
92
|
+
{
|
|
93
|
+
return $first ? styled.css`
|
|
94
|
+
width: ${FADE_BUTTON_SIZE}px;
|
|
95
|
+
height: 100%;
|
|
96
|
+
left: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
97
|
+
top: 50%;
|
|
98
|
+
transform: translateY(-50%) rotate(180deg);
|
|
93
99
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
@media ${layout.BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
101
|
+
left: ${$arrowGap ? `10px` : 0};
|
|
102
|
+
}
|
|
103
|
+
` : styled.css`
|
|
104
|
+
width: ${FADE_BUTTON_SIZE}px;
|
|
105
|
+
height: 100%;
|
|
106
|
+
right: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
107
|
+
top: 50%;
|
|
108
|
+
transform: translateY(-50%);
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
110
|
+
@media ${layout.BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
111
|
+
right: ${$arrowGap ? `10px` : 0};
|
|
112
|
+
width: 30px;
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
case "vertical":
|
|
117
|
+
{
|
|
118
|
+
return $first ? styled.css`
|
|
119
|
+
width: 100%;
|
|
120
|
+
height: ${FADE_BUTTON_SIZE}px;
|
|
121
|
+
top: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
122
|
+
left: 50%;
|
|
123
|
+
transform: translateX(-50%) rotate(-90deg);
|
|
124
|
+
` : styled.css`
|
|
125
|
+
width: 100%;
|
|
126
|
+
height: ${FADE_BUTTON_SIZE}px;
|
|
127
|
+
bottom: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
128
|
+
left: 50%;
|
|
129
|
+
transform: translateX(-50%) rotate(90deg);
|
|
130
|
+
`;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}}
|
|
123
134
|
|
|
124
135
|
${({
|
|
125
136
|
$arrowFadeColor
|
|
@@ -177,36 +188,48 @@ const OuterContainer = styled__default["default"].div`
|
|
|
177
188
|
${({
|
|
178
189
|
$align,
|
|
179
190
|
$direction
|
|
180
|
-
}) =>
|
|
181
|
-
|
|
191
|
+
}) => {
|
|
192
|
+
switch ($align) {
|
|
193
|
+
case "left":
|
|
194
|
+
return $direction === "horizontal" ? styled.css`
|
|
182
195
|
justify-content: flex-start;
|
|
183
196
|
` : styled.css`
|
|
184
197
|
align-items: flex-start;
|
|
185
|
-
|
|
186
|
-
|
|
198
|
+
`;
|
|
199
|
+
case "center":
|
|
200
|
+
return $direction === "horizontal" ? styled.css`
|
|
187
201
|
justify-content: center;
|
|
188
202
|
` : styled.css`
|
|
189
203
|
align-items: center;
|
|
190
|
-
|
|
191
|
-
|
|
204
|
+
`;
|
|
205
|
+
case "right":
|
|
206
|
+
return $direction === "horizontal" ? styled.css`
|
|
192
207
|
justify-content: flex-end;
|
|
193
208
|
` : styled.css`
|
|
194
209
|
align-items: flex-end;
|
|
195
|
-
|
|
196
|
-
}
|
|
210
|
+
`;
|
|
211
|
+
}
|
|
212
|
+
}};
|
|
197
213
|
|
|
198
214
|
${({
|
|
199
215
|
$direction,
|
|
200
216
|
$showFadeStart,
|
|
201
217
|
$showFadeEnd
|
|
202
|
-
}) =>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
`
|
|
209
|
-
|
|
218
|
+
}) => {
|
|
219
|
+
if (!$showFadeStart && !$showFadeEnd) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
switch ($direction) {
|
|
223
|
+
case "horizontal":
|
|
224
|
+
return styled.css`
|
|
225
|
+
justify-content: flex-start;
|
|
226
|
+
`;
|
|
227
|
+
case "vertical":
|
|
228
|
+
return styled.css`
|
|
229
|
+
align-items: flex-start;
|
|
230
|
+
`;
|
|
231
|
+
}
|
|
232
|
+
}};
|
|
210
233
|
|
|
211
234
|
/* Case for solid fill */
|
|
212
235
|
${({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollWrapper.styles.js","sources":["../../../src/components/ScrollWrapper/ScrollWrapper.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { styledSwitch } from \"../../helpers/ux\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport type {\n ScrollWrapperAlign,\n ScrollWrapperDirection,\n ScrollWrapperFillType,\n} from \"./ScrollWrapper.types\";\n\nexport const FADE_BUTTON_SIZE = 40;\n\n// #############################################################################\n// Styles\n// #############################################################################\nexport const ScrollContainer = styled.div<{\n $direction: ScrollWrapperDirection;\n $gap?: number;\n}>`\n /* Inherit all - items defined below will overwrite inherited */\n all: inherit;\n display: flex;\n\n ${({ $gap }) => css`\n gap: ${$gap}px;\n `}\n\n ${({ $direction }) =>\n styledSwitch($direction, {\n horizontal: css`\n overscroll-behavior-x: contain;\n overflow: scroll hidden;\n flex-direction: row;\n `,\n vertical: css`\n overscroll-behavior-y: contain;\n overflow: hidden scroll;\n flex-direction: column;\n `,\n })};\n\n /* Hide scroll bar */\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const Item = styled.div`\n flex-shrink: 0;\n`;\n\nexport const ArrowIcon = styled.div<{\n $show: boolean;\n $direction: ScrollWrapperDirection;\n $first?: boolean;\n $fillType?: ScrollWrapperFillType;\n $fillColor?: string;\n $accentColor?: string;\n $arrowColor?: string;\n $arrowFadeColor?: string;\n $circleArrowBackground?: boolean;\n $arrowGap?: number;\n}>`\n z-index: 10;\n cursor: pointer;\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n max-width: 100%;\n max-height: 100%;\n transition: opacity 0.2s ease-in-out;\n opacity: ${({ $show }) => ($show ? \"1\" : \"0\")};\n\n ${({ $show }) =>\n !$show &&\n css`\n pointer-events: none;\n `}\n\n ${({ $fillType, $direction, $accentColor }) =>\n $accentColor &&\n $fillType === \"solid\" &&\n ($direction === \"horizontal\"\n ? css`\n border-left: 1px solid ${$accentColor};\n `\n : css`\n border-top: 1px solid ${$accentColor};\n `)}\n\n ${({ $direction, $first, $arrowGap }) =>\n styledSwitch($direction, {\n horizontal: $first\n ? css`\n width: ${FADE_BUTTON_SIZE}px;\n height: 100%;\n left: ${$arrowGap ? `${$arrowGap}px` : 0};\n top: 50%;\n transform: translateY(-50%) rotate(180deg);\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n left: ${$arrowGap ? `10px` : 0};\n }\n `\n : css`\n width: ${FADE_BUTTON_SIZE}px;\n height: 100%;\n right: ${$arrowGap ? `${$arrowGap}px` : 0};\n top: 50%;\n transform: translateY(-50%);\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n right: ${$arrowGap ? `10px` : 0};\n width: 30px;\n }\n `,\n vertical: $first\n ? css`\n width: 100%;\n height: ${FADE_BUTTON_SIZE}px;\n top: ${$arrowGap ? `${$arrowGap}px` : 0};\n left: 50%;\n transform: translateX(-50%) rotate(-90deg);\n `\n : css`\n width: 100%;\n height: ${FADE_BUTTON_SIZE}px;\n bottom: ${$arrowGap ? `${$arrowGap}px` : 0};\n left: 50%;\n transform: translateX(-50%) rotate(90deg);\n `,\n })}\n\n ${({ $arrowFadeColor }) =>\n $arrowFadeColor &&\n css`\n &::before {\n content: \"\";\n position: absolute;\n inset: -1px 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n ${$arrowFadeColor} 40%\n );\n z-index: -1;\n }\n `}\n\n ${({ $circleArrowBackground }) =>\n $circleArrowBackground &&\n css`\n height: 60px;\n width: 60px;\n border-radius: 50%;\n background: rgb(0 0 0 / 0.1);\n transition: background 0.2s;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n height: 40px;\n width: 40px;\n }\n\n &:hover {\n background: rgb(0 0 0 / 0.15);\n }\n\n ${ArrowIconSvg} {\n color: ${theme.colors.menu.base.light};\n }\n `}\n\n > svg {\n width: 8px;\n height: auto;\n }\n`;\n\nexport const RightArrowIcon = styled(ArrowIcon)``;\n\nexport const LeftArrowIcon = styled(ArrowIcon)``;\n\nexport const OuterContainer = styled.div<{\n $align: ScrollWrapperAlign;\n $direction: ScrollWrapperDirection;\n $showFadeStart: boolean;\n $showFadeEnd: boolean;\n $fillType?: ScrollWrapperFillType;\n $fillColor?: string;\n $gradientSize?: number;\n}>`\n /* Inherit all - items defined below will overwrite inherited */\n all: inherit;\n\n position: relative;\n padding: 0;\n\n ${({ $align, $direction }) =>\n styledSwitch($align, {\n left:\n $direction === \"horizontal\"\n ? css`\n justify-content: flex-start;\n `\n : css`\n align-items: flex-start;\n `,\n center:\n $direction === \"horizontal\"\n ? css`\n justify-content: center;\n `\n : css`\n align-items: center;\n `,\n right:\n $direction === \"horizontal\"\n ? css`\n justify-content: flex-end;\n `\n : css`\n align-items: flex-end;\n `,\n })}\n\n ${({ $direction, $showFadeStart, $showFadeEnd }) =>\n ($showFadeStart || $showFadeEnd) &&\n styledSwitch($direction, {\n horizontal: css`\n justify-content: flex-start;\n `,\n vertical: css`\n align-items: flex-start;\n `,\n })}\n\n /* Case for solid fill */\n ${({\n $fillType,\n $fillColor,\n $showFadeStart,\n $showFadeEnd,\n $gradientSize,\n }) => {\n const fillColor = $fillColor ?? theme.colors.white;\n\n switch ($fillType) {\n case \"gradient\":\n return css`\n &::after,\n &::before {\n content: \"\";\n height: 100%;\n width: ${$gradientSize ? `${$gradientSize}px` : \"80px\"};\n position: absolute;\n z-index: 1;\n pointer-events: none;\n transition: opacity 0.2s ease-in-out;\n\n /* TODO based on $direction */\n top: 0;\n }\n\n &::before {\n /* TODO based on $direction */\n left: -1px;\n opacity: ${$showFadeStart ? \"1\" : \"0\"};\n background: linear-gradient(\n to right,\n ${fillColor} 20%,\n rgba(0 0 0 / 0) 100%\n );\n }\n\n &::after {\n /* TODO based on $direction */\n right: -1px;\n opacity: ${$showFadeEnd ? \"1\" : \"0\"};\n background: linear-gradient(\n to left,\n ${fillColor} 20%,\n rgba(0 0 0 / 0) 100%\n );\n }\n `;\n\n case \"solid\":\n return css`\n ${ArrowIcon} {\n background: ${fillColor};\n }\n `;\n\n default:\n return;\n }\n }}\n`;\n\nexport const ArrowIconSvg = styled(StyleableSvgImage)<{ $arrowColor?: string }>`\n color: ${({ $arrowColor }) => $arrowColor ?? \"#909090\"};\n`;\n"],"names":["FADE_BUTTON_SIZE","ScrollContainer","styled","div","$gap","css","$direction","styledSwitch","horizontal","vertical","Item","ArrowIcon","$show","$fillType","$accentColor","$first","$arrowGap","BREAKPOINTS","MOBILE_AND_DOWN","$arrowFadeColor","$circleArrowBackground","ArrowIconSvg","theme","colors","menu","base","light","RightArrowIcon","LeftArrowIcon","OuterContainer","$align","left","center","right","$showFadeStart","$showFadeEnd","$fillColor","$gradientSize","fillColor","white","StyleableSvgImage","$arrowColor"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"ScrollWrapper.styles.js","sources":["../../../src/components/ScrollWrapper/ScrollWrapper.styles.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BREAKPOINTS } from \"../../constants/layout\";\nimport { theme } from \"../../constants/theme\";\nimport { StyleableSvgImage } from \"../StyleableSvgImage\";\nimport type {\n ScrollWrapperAlign,\n ScrollWrapperDirection,\n ScrollWrapperFillType,\n} from \"./ScrollWrapper.types\";\n\nexport const FADE_BUTTON_SIZE = 40;\n\n// #############################################################################\n// Styles\n// #############################################################################\nexport const ScrollContainer = styled.div<{\n $direction: ScrollWrapperDirection;\n $gap?: number;\n}>`\n /* Inherit all - items defined below will overwrite inherited */\n all: inherit;\n display: flex;\n\n ${({ $gap }) => css`\n gap: ${$gap}px;\n `}\n\n ${({ $direction }) => {\n switch ($direction) {\n case \"horizontal\":\n return css`\n overscroll-behavior-x: contain;\n overflow: scroll hidden;\n flex-direction: row;\n `;\n case \"vertical\":\n return css`\n overscroll-behavior-y: contain;\n overflow: hidden scroll;\n flex-direction: column;\n `;\n }\n }};\n\n /* Hide scroll bar */\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n`;\n\nexport const Item = styled.div`\n flex-shrink: 0;\n`;\n\nexport const ArrowIcon = styled.div<{\n $show: boolean;\n $direction: ScrollWrapperDirection;\n $first?: boolean;\n $fillType?: ScrollWrapperFillType;\n $fillColor?: string;\n $accentColor?: string;\n $arrowColor?: string;\n $arrowFadeColor?: string;\n $circleArrowBackground?: boolean;\n $arrowGap?: number;\n}>`\n z-index: 10;\n cursor: pointer;\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n max-width: 100%;\n max-height: 100%;\n transition: opacity 0.2s ease-in-out;\n opacity: ${({ $show }) => ($show ? \"1\" : \"0\")};\n\n ${({ $show }) =>\n !$show &&\n css`\n pointer-events: none;\n `}\n\n ${({ $fillType, $direction, $accentColor }) =>\n $accentColor &&\n $fillType === \"solid\" &&\n ($direction === \"horizontal\"\n ? css`\n border-left: 1px solid ${$accentColor};\n `\n : css`\n border-top: 1px solid ${$accentColor};\n `)}\n\n ${({ $direction, $first, $arrowGap }) => {\n switch ($direction) {\n case \"horizontal\": {\n return $first\n ? css`\n width: ${FADE_BUTTON_SIZE}px;\n height: 100%;\n left: ${$arrowGap ? `${$arrowGap}px` : 0};\n top: 50%;\n transform: translateY(-50%) rotate(180deg);\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n left: ${$arrowGap ? `10px` : 0};\n }\n `\n : css`\n width: ${FADE_BUTTON_SIZE}px;\n height: 100%;\n right: ${$arrowGap ? `${$arrowGap}px` : 0};\n top: 50%;\n transform: translateY(-50%);\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n right: ${$arrowGap ? `10px` : 0};\n width: 30px;\n }\n `;\n }\n case \"vertical\": {\n return $first\n ? css`\n width: 100%;\n height: ${FADE_BUTTON_SIZE}px;\n top: ${$arrowGap ? `${$arrowGap}px` : 0};\n left: 50%;\n transform: translateX(-50%) rotate(-90deg);\n `\n : css`\n width: 100%;\n height: ${FADE_BUTTON_SIZE}px;\n bottom: ${$arrowGap ? `${$arrowGap}px` : 0};\n left: 50%;\n transform: translateX(-50%) rotate(90deg);\n `;\n }\n }\n }}\n\n ${({ $arrowFadeColor }) =>\n $arrowFadeColor &&\n css`\n &::before {\n content: \"\";\n position: absolute;\n inset: -1px 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n ${$arrowFadeColor} 40%\n );\n z-index: -1;\n }\n `}\n\n ${({ $circleArrowBackground }) =>\n $circleArrowBackground &&\n css`\n height: 60px;\n width: 60px;\n border-radius: 50%;\n background: rgb(0 0 0 / 0.1);\n transition: background 0.2s;\n\n @media ${BREAKPOINTS.MOBILE_AND_DOWN} {\n height: 40px;\n width: 40px;\n }\n\n &:hover {\n background: rgb(0 0 0 / 0.15);\n }\n\n ${ArrowIconSvg} {\n color: ${theme.colors.menu.base.light};\n }\n `}\n\n > svg {\n width: 8px;\n height: auto;\n }\n`;\n\nexport const RightArrowIcon = styled(ArrowIcon)``;\n\nexport const LeftArrowIcon = styled(ArrowIcon)``;\n\nexport const OuterContainer = styled.div<{\n $align: ScrollWrapperAlign;\n $direction: ScrollWrapperDirection;\n $showFadeStart: boolean;\n $showFadeEnd: boolean;\n $fillType?: ScrollWrapperFillType;\n $fillColor?: string;\n $gradientSize?: number;\n}>`\n /* Inherit all - items defined below will overwrite inherited */\n all: inherit;\n\n position: relative;\n padding: 0;\n\n ${({ $align, $direction }) => {\n switch ($align) {\n case \"left\":\n return $direction === \"horizontal\"\n ? css`\n justify-content: flex-start;\n `\n : css`\n align-items: flex-start;\n `;\n case \"center\":\n return $direction === \"horizontal\"\n ? css`\n justify-content: center;\n `\n : css`\n align-items: center;\n `;\n case \"right\":\n return $direction === \"horizontal\"\n ? css`\n justify-content: flex-end;\n `\n : css`\n align-items: flex-end;\n `;\n }\n }};\n\n ${({ $direction, $showFadeStart, $showFadeEnd }) => {\n if (!$showFadeStart && !$showFadeEnd) {\n return;\n }\n\n switch ($direction) {\n case \"horizontal\":\n return css`\n justify-content: flex-start;\n `;\n case \"vertical\":\n return css`\n align-items: flex-start;\n `;\n }\n }};\n\n /* Case for solid fill */\n ${({\n $fillType,\n $fillColor,\n $showFadeStart,\n $showFadeEnd,\n $gradientSize,\n }) => {\n const fillColor = $fillColor ?? theme.colors.white;\n\n switch ($fillType) {\n case \"gradient\":\n return css`\n &::after,\n &::before {\n content: \"\";\n height: 100%;\n width: ${$gradientSize ? `${$gradientSize}px` : \"80px\"};\n position: absolute;\n z-index: 1;\n pointer-events: none;\n transition: opacity 0.2s ease-in-out;\n\n /* TODO based on $direction */\n top: 0;\n }\n\n &::before {\n /* TODO based on $direction */\n left: -1px;\n opacity: ${$showFadeStart ? \"1\" : \"0\"};\n background: linear-gradient(\n to right,\n ${fillColor} 20%,\n rgba(0 0 0 / 0) 100%\n );\n }\n\n &::after {\n /* TODO based on $direction */\n right: -1px;\n opacity: ${$showFadeEnd ? \"1\" : \"0\"};\n background: linear-gradient(\n to left,\n ${fillColor} 20%,\n rgba(0 0 0 / 0) 100%\n );\n }\n `;\n\n case \"solid\":\n return css`\n ${ArrowIcon} {\n background: ${fillColor};\n }\n `;\n\n default:\n return;\n }\n }}\n`;\n\nexport const ArrowIconSvg = styled(StyleableSvgImage)<{ $arrowColor?: string }>`\n color: ${({ $arrowColor }) => $arrowColor ?? \"#909090\"};\n`;\n"],"names":["FADE_BUTTON_SIZE","ScrollContainer","styled","div","$gap","css","$direction","Item","ArrowIcon","$show","$fillType","$accentColor","$first","$arrowGap","BREAKPOINTS","MOBILE_AND_DOWN","$arrowFadeColor","$circleArrowBackground","ArrowIconSvg","theme","colors","menu","base","light","RightArrowIcon","LeftArrowIcon","OuterContainer","$align","$showFadeStart","$showFadeEnd","$fillColor","$gradientSize","fillColor","white","StyleableSvgImage","$arrowColor"],"mappings":";;;;;;;;;;;;;;AAWO,MAAMA,gBAAmB,GAAA,EAAA;AAKzB,MAAMC,kBAAkBC,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQlC,CAAC;EAAEC;AAAW,CAAA,KAAAC,UAAA;AAAA,WACPD,IAAI;AAAA,GACZ;AAAA;AAAA,IAEC,CAAC;EAAEE;CAAiB,KAAA;EACpB,QAAQA,UAAY;IAClB,KAAK,YAAA;MACI,OAAAD,UAAA;AAAA;AAAA;AAAA;AAAA,SAAA;IAKT,KAAK,UAAA;MACI,OAAAA,UAAA;AAAA;AAAA;AAAA;AAAA,SAAA;EAKX;AACF,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASI,MAAME,OAAOL,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA,CAAA;AAIpB,MAAMK,YAAYN,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAqBnB,CAAC;EAAEM;AAAA,CAAa,KAAAA,KAAA,GAAQ,MAAM,GAAI;AAAA;AAAA,IAE3C,CAAC;EAAEA;AAAM,CAAA,KACT,CAACA,KACD,IAAAJ,MAAAA,CAAAA,GAAA;AAAA;AAAA,KAEC;AAAA;AAAA,IAED,CAAC;EAAEK,SAAA;EAAWJ,UAAY;EAAAK;MAC1BA,YACA,IAAAD,SAAA,KAAc,OACb,KAAAJ,UAAA,KAAe,YACZ,GAAAD,MAAAA,CAAAA,GAAA;AAAA,mCAC2BM,YAAY;AAAA,SAEvC,GAAAN,MAAAA,CAAAA,GAAA;AAAA,kCAC0BM,YAAY;AAAA,SACpC,CAAA;AAAA;AAAA,IAEN,CAAC;EAAEL,UAAY;EAAAM,MAAA;EAAQC;CAAgB,KAAA;EACvC,QAAQP,UAAY;IAClB,KAAK,YAAc;MAAA;QACjB,OAAOM,MACH,GAAAP,MAAAA,CAAAA,GAAA;AAAA,uBACWL,gBAAgB;AAAA;AAAA,sBAEjBa,SAAY,GAAA,GAAGA,SAAS,IAAA,GAAO,CAAC;AAAA;AAAA;AAAA;AAAA,uBAI/BC,MAAAA,CAAAA,YAAYC,eAAe;AAAA,wBAC1BF,SAAA,GAAY,SAAS,CAAC;AAAA;AAAA,aAGlC,GAAAR,MAAAA,CAAAA,GAAA;AAAA,uBACWL,gBAAgB;AAAA;AAAA,uBAEhBa,SAAY,GAAA,GAAGA,SAAS,IAAA,GAAO,CAAC;AAAA;AAAA;AAAA;AAAA,uBAIhCC,MAAAA,CAAAA,YAAYC,eAAe;AAAA,yBACzBF,SAAA,GAAY,SAAS,CAAC;AAAA;AAAA;AAAA,aAAA;MAIzC;IACA,KAAK,UAAY;MAAA;QACf,OAAOD,MACH,GAAAP,MAAAA,CAAAA,GAAA;AAAA;AAAA,wBAEYL,gBAAgB;AAAA,qBACnBa,SAAY,GAAA,GAAGA,SAAS,IAAA,GAAO,CAAC;AAAA;AAAA;AAAA,aAIzC,GAAAR,MAAAA,CAAAA,GAAA;AAAA;AAAA,wBAEYL,gBAAgB;AAAA,wBAChBa,SAAY,GAAA,GAAGA,SAAS,IAAA,GAAO,CAAC;AAAA;AAAA;AAAA,aAAA;MAIlD;EACF;AACF,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEG;CAAgB,KACnBA,eACA,IAAAX,MAAAA,CAAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQQW,eAAe;AAAA;AAAA;AAAA;AAAA,KAItB;AAAA;AAAA,IAED,CAAC;EAAEC;CAAuB,KAC1BA,sBACA,IAAAZ,MAAAA,CAAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOWS,MAAAA,CAAAA,YAAYC,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QASlCG,YAAY;AAAA,iBACHC,KAAM,CAAAA,KAAA,CAAAC,MAAA,CAAOC,IAAK,CAAAC,IAAA,CAAKC,KAAK;AAAA;AAAA,KAExC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQQ,MAAAC,cAAA,GAAiBtB,eAAAA,CAAAA,SAAAA,EAAOM,SAAS,CAAA,EAAA;AAEjC,MAAAiB,aAAA,GAAgBvB,eAAAA,CAAAA,SAAAA,EAAOM,SAAS,CAAA,EAAA;AAEtC,MAAMkB,iBAAiBxB,eAAO,CAAA,SAAA,CAAA,CAAAC,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAejC,CAAC;EAAEwB,MAAQ;EAAArB;CAAiB,KAAA;EAC5B,QAAQqB,MAAQ;IACd,KAAK,MAAA;MACH,OAAOrB,eAAe,YAClB,GAAAD,UAAA;AAAA;AAAA,aAGA,GAAAA,MAAAA,CAAAA,GAAA;AAAA;AAAA,aAAA;IAGN,KAAK,QAAA;MACH,OAAOC,eAAe,YAClB,GAAAD,UAAA;AAAA;AAAA,aAGA,GAAAA,MAAAA,CAAAA,GAAA;AAAA;AAAA,aAAA;IAGN,KAAK,OAAA;MACH,OAAOC,eAAe,YAClB,GAAAD,UAAA;AAAA;AAAA,aAGA,GAAAA,MAAAA,CAAAA,GAAA;AAAA;AAAA,aAAA;EAGR;AACF,CAAC;AAAA;AAAA,IAEC,CAAC;EAAEC,UAAY;EAAAsB,cAAA;EAAgBC;CAAmB,KAAA;EAC9C,IAAA,CAACD,cAAkB,IAAA,CAACC,YAAc,EAAA;IACpC;EACF;EAEA,QAAQvB,UAAY;IAClB,KAAK,YAAA;MACI,OAAAD,UAAA;AAAA;AAAA,SAAA;IAGT,KAAK,UAAA;MACI,OAAAA,UAAA;AAAA;AAAA,SAAA;EAGX;AACF,CAAC;AAAA;AAAA;AAAA,IAGC,CAAC;EACDK,SAAA;EACAoB,UAAA;EACAF,cAAA;EACAC,YAAA;EACAE;AACF,CAAM,KAAA;EACE,MAAAC,SAAA,GAAYF,UAAc,IAAAX,WAAA,CAAMC,MAAO,CAAAa,KAAA;EAE7C,QAAQvB,SAAW;IACjB,KAAK,UAAA;MACI,OAAAL,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAKM0B,aAAgB,GAAA,GAAGA,aAAa,IAAA,GAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAa3CH,cAAA,GAAiB,MAAM,GAAG;AAAA;AAAA;AAAA,gBAGjCI,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAQFH,YAAA,GAAe,MAAM,GAAG;AAAA;AAAA;AAAA,gBAG/BG,SAAS;AAAA;AAAA;AAAA;AAAA,SAAA;IAMnB,KAAK,OAAA;MACI,OAAA3B,UAAA;AAAA,YACHG,SAAS;AAAA,0BACKwB,SAAS;AAAA;AAAA,SAAA;IAI7B;MACE;EACJ;AACF,CAAC;AAAA,CAAA;AAGU,MAAAd,YAAA,GAAehB,eAAAA,CAAAA,SAAAA,EAAOgC,iBAAAA,CAAAA,iBAAiB,CAAA;AAAA,WACzC,CAAC;EAAEC;CAAY,KAAMA,eAAe,SAAS;AAAA,CAAA;;;;;;;;"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { BREAKPOINTS } from '../../constants/layout.mjs';
|
|
3
3
|
import { theme } from '../../constants/theme.mjs';
|
|
4
|
-
import { styledSwitch } from '../../helpers/ux.mjs';
|
|
5
4
|
import '../StyleableSvgImage/index.mjs';
|
|
6
5
|
import { StyleableSvgImage } from '../StyleableSvgImage/StyleableSvgImage.mjs';
|
|
7
6
|
"use strict";
|
|
@@ -19,18 +18,22 @@ const ScrollContainer = styled.div`
|
|
|
19
18
|
|
|
20
19
|
${({
|
|
21
20
|
$direction
|
|
22
|
-
}) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
}) => {
|
|
22
|
+
switch ($direction) {
|
|
23
|
+
case "horizontal":
|
|
24
|
+
return css`
|
|
25
|
+
overscroll-behavior-x: contain;
|
|
26
|
+
overflow: scroll hidden;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
`;
|
|
29
|
+
case "vertical":
|
|
30
|
+
return css`
|
|
31
|
+
overscroll-behavior-y: contain;
|
|
32
|
+
overflow: hidden scroll;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
}};
|
|
34
37
|
|
|
35
38
|
/* Hide scroll bar */
|
|
36
39
|
scrollbar-width: none;
|
|
@@ -75,43 +78,51 @@ const ArrowIcon = styled.div`
|
|
|
75
78
|
$direction,
|
|
76
79
|
$first,
|
|
77
80
|
$arrowGap
|
|
78
|
-
}) =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
}) => {
|
|
82
|
+
switch ($direction) {
|
|
83
|
+
case "horizontal":
|
|
84
|
+
{
|
|
85
|
+
return $first ? css`
|
|
86
|
+
width: ${FADE_BUTTON_SIZE}px;
|
|
87
|
+
height: 100%;
|
|
88
|
+
left: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
89
|
+
top: 50%;
|
|
90
|
+
transform: translateY(-50%) rotate(180deg);
|
|
85
91
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
@media ${BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
93
|
+
left: ${$arrowGap ? `10px` : 0};
|
|
94
|
+
}
|
|
95
|
+
` : css`
|
|
96
|
+
width: ${FADE_BUTTON_SIZE}px;
|
|
97
|
+
height: 100%;
|
|
98
|
+
right: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
99
|
+
top: 50%;
|
|
100
|
+
transform: translateY(-50%);
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
@media ${BREAKPOINTS.MOBILE_AND_DOWN} {
|
|
103
|
+
right: ${$arrowGap ? `10px` : 0};
|
|
104
|
+
width: 30px;
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
case "vertical":
|
|
109
|
+
{
|
|
110
|
+
return $first ? css`
|
|
111
|
+
width: 100%;
|
|
112
|
+
height: ${FADE_BUTTON_SIZE}px;
|
|
113
|
+
top: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
114
|
+
left: 50%;
|
|
115
|
+
transform: translateX(-50%) rotate(-90deg);
|
|
116
|
+
` : css`
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: ${FADE_BUTTON_SIZE}px;
|
|
119
|
+
bottom: ${$arrowGap ? `${$arrowGap}px` : 0};
|
|
120
|
+
left: 50%;
|
|
121
|
+
transform: translateX(-50%) rotate(90deg);
|
|
122
|
+
`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}}
|
|
115
126
|
|
|
116
127
|
${({
|
|
117
128
|
$arrowFadeColor
|
|
@@ -169,36 +180,48 @@ const OuterContainer = styled.div`
|
|
|
169
180
|
${({
|
|
170
181
|
$align,
|
|
171
182
|
$direction
|
|
172
|
-
}) =>
|
|
173
|
-
|
|
183
|
+
}) => {
|
|
184
|
+
switch ($align) {
|
|
185
|
+
case "left":
|
|
186
|
+
return $direction === "horizontal" ? css`
|
|
174
187
|
justify-content: flex-start;
|
|
175
188
|
` : css`
|
|
176
189
|
align-items: flex-start;
|
|
177
|
-
|
|
178
|
-
|
|
190
|
+
`;
|
|
191
|
+
case "center":
|
|
192
|
+
return $direction === "horizontal" ? css`
|
|
179
193
|
justify-content: center;
|
|
180
194
|
` : css`
|
|
181
195
|
align-items: center;
|
|
182
|
-
|
|
183
|
-
|
|
196
|
+
`;
|
|
197
|
+
case "right":
|
|
198
|
+
return $direction === "horizontal" ? css`
|
|
184
199
|
justify-content: flex-end;
|
|
185
200
|
` : css`
|
|
186
201
|
align-items: flex-end;
|
|
187
|
-
|
|
188
|
-
}
|
|
202
|
+
`;
|
|
203
|
+
}
|
|
204
|
+
}};
|
|
189
205
|
|
|
190
206
|
${({
|
|
191
207
|
$direction,
|
|
192
208
|
$showFadeStart,
|
|
193
209
|
$showFadeEnd
|
|
194
|
-
}) =>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
`
|
|
201
|
-
|
|
210
|
+
}) => {
|
|
211
|
+
if (!$showFadeStart && !$showFadeEnd) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
switch ($direction) {
|
|
215
|
+
case "horizontal":
|
|
216
|
+
return css`
|
|
217
|
+
justify-content: flex-start;
|
|
218
|
+
`;
|
|
219
|
+
case "vertical":
|
|
220
|
+
return css`
|
|
221
|
+
align-items: flex-start;
|
|
222
|
+
`;
|
|
223
|
+
}
|
|
224
|
+
}};
|
|
202
225
|
|
|
203
226
|
/* Case for solid fill */
|
|
204
227
|
${({
|