@ubnt/store.core 9.10.0 → 9.11.0-alpha.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 +54 -0
- package/lib/assets/plus5.svg +9 -9
- package/lib/assets/plus6.svg +9 -9
- package/lib/assets/ucgUltra.jpg +0 -0
- package/lib/assets/ucgUltra2.jpg +0 -0
- package/lib/assets/udmPro.jpg +0 -0
- package/lib/assets/udmPro2.jpg +0 -0
- package/lib/assets/udmProMax.jpg +0 -0
- package/lib/assets/udmProMax2.jpg +0 -0
- package/lib/assets/udmProSpecial.jpg +0 -0
- package/lib/assets/udmProSpecial2.jpg +0 -0
- package/lib/assets/x.svg +1 -1
- package/lib/components/Footer/Footer.styles.js +5 -3
- package/lib/components/Footer/Footer.styles.js.map +1 -1
- package/lib/components/Footer/Footer.styles.mjs +5 -3
- package/lib/components/Footer/Footer.styles.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.js +19 -2
- package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.mjs +19 -2
- package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +1 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.js +6 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs +6 -0
- package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.d.ts +3 -0
- package/lib/components/LandingPagePro/LandingPagePro.js +3 -3
- package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
- package/lib/components/LandingPagePro/LandingPagePro.mjs +2 -2
- package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
- package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmPro.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
- package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
- package/lib/components/ModelCompareV3/data/CloudGateways.js +12 -12
- package/lib/components/ModelCompareV3/data/CloudGateways.mjs +8 -8
- package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
- package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmPro.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
- package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +6 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +6 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +2 -0
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputSections/CounterSection.mjs +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.js +1 -1
- package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/assets/plus.svg.mjs +2 -2
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +1 -1
- package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +1 -1
- 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/components/Tooltip/Tooltip.d.ts +2 -0
- package/lib/components/Tooltip/Tooltip.js +45 -0
- package/lib/components/Tooltip/Tooltip.js.map +1 -0
- package/lib/components/Tooltip/Tooltip.mjs +43 -0
- package/lib/components/Tooltip/Tooltip.mjs.map +1 -0
- package/lib/components/Tooltip/Tooltip.styles.d.ts +32 -0
- package/lib/components/Tooltip/Tooltip.styles.js +44 -0
- package/lib/components/Tooltip/Tooltip.styles.js.map +1 -0
- package/lib/components/Tooltip/Tooltip.styles.mjs +34 -0
- package/lib/components/Tooltip/Tooltip.styles.mjs.map +1 -0
- package/lib/components/Tooltip/index.d.ts +1 -0
- package/lib/components/Tooltip/index.js +6 -0
- package/lib/components/Tooltip/index.js.map +1 -0
- package/lib/components/Tooltip/index.mjs +3 -0
- package/lib/components/Tooltip/index.mjs.map +1 -0
- package/lib/constants/proStoreCategories/mapping/index.d.ts +3 -0
- package/lib/constants/proStoreCategories/mapping/index.js +20 -10
- package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/index.mjs +20 -10
- package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.d.ts +3 -1
- package/lib/constants/proStoreCategories/mapping/unifi.js +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
- package/lib/constants/proStoreCategories/mapping/unifi.mjs +2 -0
- package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/ar.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/de.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/el.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.js +5 -0
- package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs +5 -1
- package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/es.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/fr.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/fr.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/it.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/it.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/ja.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.js +1 -1
- package/lib/constants/proStoreCategories/translations/pt-BR.json.mjs +1 -1
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +2 -2
- package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +2 -2
- package/lib/utils/money/allocators/fixedAmount.d.ts +26 -0
- package/lib/utils/money/allocators/fixedAmount.js +55 -0
- package/lib/utils/money/allocators/fixedAmount.js.map +1 -0
- package/lib/utils/money/allocators/fixedAmount.mjs +53 -0
- package/lib/utils/money/allocators/fixedAmount.mjs.map +1 -0
- package/lib/utils/money/allocators/index.d.ts +2 -0
- package/lib/utils/money/allocators/index.js +8 -0
- package/lib/utils/money/allocators/index.js.map +1 -0
- package/lib/utils/money/allocators/index.mjs +4 -0
- package/lib/utils/money/allocators/index.mjs.map +1 -0
- package/lib/utils/money/allocators/productAmount.d.ts +13 -0
- package/lib/utils/money/allocators/productAmount.js +110 -0
- package/lib/utils/money/allocators/productAmount.js.map +1 -0
- package/lib/utils/money/allocators/productAmount.mjs +108 -0
- package/lib/utils/money/allocators/productAmount.mjs.map +1 -0
- package/lib/utils/money/constants.d.ts +56 -25
- package/lib/utils/money/constants.js +72 -7
- package/lib/utils/money/constants.js.map +1 -1
- package/lib/utils/money/constants.mjs +70 -7
- package/lib/utils/money/constants.mjs.map +1 -1
- package/lib/utils/money/exchangeRate.d.ts +31 -0
- package/lib/utils/money/exchangeRate.js +27 -0
- package/lib/utils/money/exchangeRate.js.map +1 -0
- package/lib/utils/money/exchangeRate.mjs +23 -0
- package/lib/utils/money/exchangeRate.mjs.map +1 -0
- package/lib/utils/money/format.d.ts +10 -5
- package/lib/utils/money/format.js +22 -14
- package/lib/utils/money/format.js.map +1 -1
- package/lib/utils/money/format.mjs +23 -16
- package/lib/utils/money/format.mjs.map +1 -1
- package/lib/utils/money/index.d.ts +4 -1
- package/lib/utils/money/index.js +26 -8
- package/lib/utils/money/index.js.map +1 -1
- package/lib/utils/money/index.mjs +8 -4
- package/lib/utils/money/index.mjs.map +1 -1
- package/lib/utils/money/misc.d.ts +68 -28
- package/lib/utils/money/misc.js +35 -64
- package/lib/utils/money/misc.js.map +1 -1
- package/lib/utils/money/misc.mjs +32 -43
- package/lib/utils/money/misc.mjs.map +1 -1
- package/lib/utils/money/misc.private.d.ts +23 -0
- package/lib/utils/money/misc.private.js +46 -0
- package/lib/utils/money/misc.private.js.map +1 -0
- package/lib/utils/money/misc.private.mjs +21 -0
- package/lib/utils/money/misc.private.mjs.map +1 -0
- package/lib/utils/money/shipping.d.ts +5 -0
- package/lib/utils/money/shipping.js +8 -0
- package/lib/utils/money/shipping.js.map +1 -0
- package/lib/utils/money/shipping.mjs +6 -0
- package/lib/utils/money/shipping.mjs.map +1 -0
- package/lib/utils/money/tax.d.ts +38 -2
- package/lib/utils/money/tax.js +46 -10
- package/lib/utils/money/tax.js.map +1 -1
- package/lib/utils/money/tax.mjs +42 -11
- package/lib/utils/money/tax.mjs.map +1 -1
- package/lib/utils/money/tax.private.d.ts +17 -0
- package/lib/utils/money/tax.private.js +65 -0
- package/lib/utils/money/tax.private.js.map +1 -0
- package/lib/utils/money/tax.private.mjs +60 -0
- package/lib/utils/money/tax.private.mjs.map +1 -0
- package/lib/utils/money/types.d.ts +78 -3
- package/lib/utils/number.d.ts +1 -1
- package/lib/utils/number.js +1 -1
- package/lib/utils/number.js.map +1 -1
- package/lib/utils/number.mjs +1 -1
- package/lib/utils/number.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/utils/validations.d.ts +0 -15
- package/lib/utils/validations.js +0 -23
- package/lib/utils/validations.js.map +0 -1
- package/lib/utils/validations.mjs +0 -21
- package/lib/utils/validations.mjs.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "../../../../../../assets/
|
|
2
|
-
export { default } from "../../../../../../assets/
|
|
1
|
+
export * from "../../../../../../assets/plus6.svg";
|
|
2
|
+
export { default } from "../../../../../../assets/plus6.svg";
|
|
3
3
|
//# sourceMappingURL=plus.svg.mjs.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var reactUse = require('react-use');
|
|
6
|
+
var Tooltip_styles = require('./Tooltip.styles.js');
|
|
7
|
+
"use strict";
|
|
8
|
+
const Tooltip = ({
|
|
9
|
+
children,
|
|
10
|
+
tooltipClassName,
|
|
11
|
+
...rest
|
|
12
|
+
}) => {
|
|
13
|
+
const target = react.useRef(null);
|
|
14
|
+
const tooltipRef = react.useRef(null);
|
|
15
|
+
const {
|
|
16
|
+
y: scrollY
|
|
17
|
+
} = reactUse.useWindowScroll();
|
|
18
|
+
const [isOpen, setIsOpen] = react.useState();
|
|
19
|
+
react.useEffect(() => {
|
|
20
|
+
setIsOpen(false);
|
|
21
|
+
scrollY;
|
|
22
|
+
}, [scrollY]);
|
|
23
|
+
reactUse.useClickAway(tooltipRef, () => {
|
|
24
|
+
if (isOpen) {
|
|
25
|
+
setIsOpen(false);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const classNameList = [Tooltip_styles.TOOLTIP_CLASS_NAME, tooltipClassName];
|
|
29
|
+
const tooltipClassNames = classNameList.join(" ");
|
|
30
|
+
return /* @__PURE__ */jsxRuntime.jsx(Tooltip_styles.Tooltip, {
|
|
31
|
+
ref: tooltipRef,
|
|
32
|
+
isOpen,
|
|
33
|
+
...rest,
|
|
34
|
+
tooltipClassName: tooltipClassNames,
|
|
35
|
+
children: /* @__PURE__ */jsxRuntime.jsxs("div", {
|
|
36
|
+
ref: target,
|
|
37
|
+
onMouseLeave: () => setIsOpen(false),
|
|
38
|
+
onMouseEnter: () => setIsOpen(true),
|
|
39
|
+
onTouchStart: () => setIsOpen(!isOpen),
|
|
40
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(Tooltip_styles.TooltipStyles, {}), children]
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
exports.Tooltip = Tooltip;
|
|
45
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import type { TooltipProps } from \"@ubnt/ui-components/Tooltip\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useClickAway, useWindowScroll } from \"react-use\";\n\nimport * as S from \"./Tooltip.styles\";\nimport { TOOLTIP_CLASS_NAME } from \"./Tooltip.styles\";\n\nexport const Tooltip = ({\n children,\n tooltipClassName,\n ...rest\n}: TooltipProps) => {\n const target = useRef<HTMLDivElement>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n const { y: scrollY } = useWindowScroll();\n\n const [isOpen, setIsOpen] = useState<boolean>();\n\n // Hide tooltip when scrolling\n useEffect(() => {\n setIsOpen(false);\n scrollY;\n }, [scrollY]);\n\n useClickAway(tooltipRef, () => {\n if (isOpen) {\n setIsOpen(false);\n }\n });\n\n const classNameList = [TOOLTIP_CLASS_NAME, tooltipClassName];\n const tooltipClassNames = classNameList.join(\" \");\n\n return (\n <S.Tooltip\n ref={tooltipRef}\n isOpen={isOpen}\n {...rest}\n tooltipClassName={tooltipClassNames}\n >\n <div\n ref={target}\n onMouseLeave={() => setIsOpen(false)}\n onMouseEnter={() => setIsOpen(true)}\n onTouchStart={() => setIsOpen(!isOpen)}\n >\n <S.TooltipStyles />\n {children}\n </div>\n </S.Tooltip>\n );\n};\n"],"names":["Tooltip","children","tooltipClassName","rest","target","useRef","tooltipRef","y","scrollY","useWindowScroll","isOpen","setIsOpen","useState","useEffect","useClickAway","classNameList","TOOLTIP_CLASS_NAME","tooltipClassNames","join","jsx","S.Tooltip","ref","jsxs","onMouseLeave","onMouseEnter","onTouchStart","S.TooltipStyles"],"mappings":";;;;;;;AAOO,MAAMA,UAAUA,CAAC;EACtBC,QAAA;EACAC,gBAAA;EACA,GAAGC;AACL,CAAoB,KAAA;EACZ,MAAAC,MAAA,GAASC,aAAuB,IAAI,CAAA;EACpC,MAAAC,UAAA,GAAaD,aAAuB,IAAI,CAAA;EAC9C,MAAM;IAAEE,CAAA,EAAGC;EAAQ,CAAA,GAAIC,QAAgB,CAAAA,eAAA,CAAA,CAAA;EAEvC,MAAM,CAACC,MAAA,EAAQC,SAAS,CAAA,GAAIC,KAAkB,CAAAA,QAAA,CAAA,CAAA;EAG9CC,KAAAA,CAAAA,SAAA,CAAU,MAAM;IACdF,SAAA,CAAU,KAAK,CAAA;IACfH,OAAA;EAAA,CACF,EAAG,CAACA,OAAO,CAAC,CAAA;EAEZM,QAAA,CAAAA,YAAA,CAAaR,YAAY,MAAM;IAC7B,IAAII,MAAQ,EAAA;MACVC,SAAA,CAAU,KAAK,CAAA;IACjB;EAAA,CACD,CAAA;EAEK,MAAAI,aAAA,GAAgB,CAACC,iCAAA,EAAoBd,gBAAgB,CAAA;EACrD,MAAAe,iBAAA,GAAoBF,aAAc,CAAAG,IAAA,CAAK,GAAG,CAAA;EAG9C,sBAAAC,UAAA,CAAAA,GAAA,CAACC,cAAE,CAAApB,OAAA,EAAF;IACCqB,GAAK,EAAAf,UAAA;IACLI,MAAA;IACC,GAAGP,IAAA;IACJD,gBAAkB,EAAAe,iBAAA;IAElBhB,QAAA,iBAAAqB,UAAA,CAAAA,IAAA,CAAC,KAAA,EAAA;MACCD,GAAK,EAAAjB,MAAA;MACLmB,YAAA,EAAcA,CAAA,KAAMZ,SAAA,CAAU,KAAK,CAAA;MACnCa,YAAA,EAAcA,CAAA,KAAMb,SAAA,CAAU,IAAI,CAAA;MAClCc,YAAc,EAAAA,CAAA,KAAMd,SAAU,CAAA,CAACD,MAAM,CAAA;MAErCT,QAAA,EAAA,CAAA,eAACkB,UAAA,CAAAA,GAAA,CAAAO,8BAAA,EAAgB,CAAA,EAChBzB,QAAA;IAAA,CACH;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useState, useEffect } from 'react';
|
|
3
|
+
import { useWindowScroll, useClickAway } from 'react-use';
|
|
4
|
+
import { TOOLTIP_CLASS_NAME, Tooltip as Tooltip$1, TooltipStyles } from './Tooltip.styles.mjs';
|
|
5
|
+
"use strict";
|
|
6
|
+
const Tooltip = ({
|
|
7
|
+
children,
|
|
8
|
+
tooltipClassName,
|
|
9
|
+
...rest
|
|
10
|
+
}) => {
|
|
11
|
+
const target = useRef(null);
|
|
12
|
+
const tooltipRef = useRef(null);
|
|
13
|
+
const {
|
|
14
|
+
y: scrollY
|
|
15
|
+
} = useWindowScroll();
|
|
16
|
+
const [isOpen, setIsOpen] = useState();
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
setIsOpen(false);
|
|
19
|
+
scrollY;
|
|
20
|
+
}, [scrollY]);
|
|
21
|
+
useClickAway(tooltipRef, () => {
|
|
22
|
+
if (isOpen) {
|
|
23
|
+
setIsOpen(false);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const classNameList = [TOOLTIP_CLASS_NAME, tooltipClassName];
|
|
27
|
+
const tooltipClassNames = classNameList.join(" ");
|
|
28
|
+
return /* @__PURE__ */jsx(Tooltip$1, {
|
|
29
|
+
ref: tooltipRef,
|
|
30
|
+
isOpen,
|
|
31
|
+
...rest,
|
|
32
|
+
tooltipClassName: tooltipClassNames,
|
|
33
|
+
children: /* @__PURE__ */jsxs("div", {
|
|
34
|
+
ref: target,
|
|
35
|
+
onMouseLeave: () => setIsOpen(false),
|
|
36
|
+
onMouseEnter: () => setIsOpen(true),
|
|
37
|
+
onTouchStart: () => setIsOpen(!isOpen),
|
|
38
|
+
children: [/* @__PURE__ */jsx(TooltipStyles, {}), children]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export { Tooltip };
|
|
43
|
+
//# sourceMappingURL=Tooltip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.mjs","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import type { TooltipProps } from \"@ubnt/ui-components/Tooltip\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { useClickAway, useWindowScroll } from \"react-use\";\n\nimport * as S from \"./Tooltip.styles\";\nimport { TOOLTIP_CLASS_NAME } from \"./Tooltip.styles\";\n\nexport const Tooltip = ({\n children,\n tooltipClassName,\n ...rest\n}: TooltipProps) => {\n const target = useRef<HTMLDivElement>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n const { y: scrollY } = useWindowScroll();\n\n const [isOpen, setIsOpen] = useState<boolean>();\n\n // Hide tooltip when scrolling\n useEffect(() => {\n setIsOpen(false);\n scrollY;\n }, [scrollY]);\n\n useClickAway(tooltipRef, () => {\n if (isOpen) {\n setIsOpen(false);\n }\n });\n\n const classNameList = [TOOLTIP_CLASS_NAME, tooltipClassName];\n const tooltipClassNames = classNameList.join(\" \");\n\n return (\n <S.Tooltip\n ref={tooltipRef}\n isOpen={isOpen}\n {...rest}\n tooltipClassName={tooltipClassNames}\n >\n <div\n ref={target}\n onMouseLeave={() => setIsOpen(false)}\n onMouseEnter={() => setIsOpen(true)}\n onTouchStart={() => setIsOpen(!isOpen)}\n >\n <S.TooltipStyles />\n {children}\n </div>\n </S.Tooltip>\n );\n};\n"],"names":["Tooltip","children","tooltipClassName","rest","target","useRef","tooltipRef","y","scrollY","useWindowScroll","isOpen","setIsOpen","useState","useEffect","useClickAway","classNameList","TOOLTIP_CLASS_NAME","tooltipClassNames","join","jsx","S.Tooltip","ref","jsxs","onMouseLeave","onMouseEnter","onTouchStart","S.TooltipStyles"],"mappings":";;;;;AAOO,MAAMA,UAAUA,CAAC;EACtBC,QAAA;EACAC,gBAAA;EACA,GAAGC;AACL,CAAoB,KAAA;EACZ,MAAAC,MAAA,GAASC,OAAuB,IAAI,CAAA;EACpC,MAAAC,UAAA,GAAaD,OAAuB,IAAI,CAAA;EAC9C,MAAM;IAAEE,CAAA,EAAGC;EAAQ,CAAA,GAAIC,eAAgB,CAAA,CAAA;EAEvC,MAAM,CAACC,MAAA,EAAQC,SAAS,CAAA,GAAIC,QAAkB,CAAA,CAAA;EAG9CC,SAAA,CAAU,MAAM;IACdF,SAAA,CAAU,KAAK,CAAA;IACfH,OAAA;EAAA,CACF,EAAG,CAACA,OAAO,CAAC,CAAA;EAEZM,YAAA,CAAaR,YAAY,MAAM;IAC7B,IAAII,MAAQ,EAAA;MACVC,SAAA,CAAU,KAAK,CAAA;IACjB;EAAA,CACD,CAAA;EAEK,MAAAI,aAAA,GAAgB,CAACC,kBAAA,EAAoBd,gBAAgB,CAAA;EACrD,MAAAe,iBAAA,GAAoBF,aAAc,CAAAG,IAAA,CAAK,GAAG,CAAA;EAG9C,sBAAAC,GAAA,CAACC,SAAE,EAAF;IACCC,GAAK,EAAAf,UAAA;IACLI,MAAA;IACC,GAAGP,IAAA;IACJD,gBAAkB,EAAAe,iBAAA;IAElBhB,QAAA,iBAAAqB,IAAA,CAAC,KAAA,EAAA;MACCD,GAAK,EAAAjB,MAAA;MACLmB,YAAA,EAAcA,CAAA,KAAMZ,SAAA,CAAU,KAAK,CAAA;MACnCa,YAAA,EAAcA,CAAA,KAAMb,SAAA,CAAU,IAAI,CAAA;MAClCc,YAAc,EAAAA,CAAA,KAAMd,SAAU,CAAA,CAACD,MAAM,CAAA;MAErCT,QAAA,EAAA,CAAA,eAACkB,GAAA,CAAAO,eAAA,EAAgB,CAAA,EAChBzB,QAAA;IAAA,CACH;EAAA,CAAA,CACF;AAEJ,CAAA;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const TOOLTIP_CLASS_NAME = "custom-tooltip";
|
|
2
|
+
export declare const Tooltip: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
3
|
+
message?: import("react").ReactNode;
|
|
4
|
+
tooltipMessageClassName?: string;
|
|
5
|
+
messageProps?: Omit<import("@ubnt/ui-components").TextProps, "forwardedRef">;
|
|
6
|
+
omitTextWrapper?: boolean;
|
|
7
|
+
leftRightInset?: number;
|
|
8
|
+
isHoverable?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
title?: import("react").ReactNode;
|
|
11
|
+
description?: import("react").ReactNode;
|
|
12
|
+
children?: import("react").ReactNode;
|
|
13
|
+
isOpen?: boolean;
|
|
14
|
+
disableHover?: boolean;
|
|
15
|
+
isInteractive?: boolean;
|
|
16
|
+
cursorType?: "default" | "pointer";
|
|
17
|
+
width?: string | number;
|
|
18
|
+
maxWidth?: string | number;
|
|
19
|
+
position?: import("@ubnt/ui-components/Tooltip").VisualTooltipPosition | import("@ubnt/ui-components/Tooltip").TooltipPosition;
|
|
20
|
+
motif?: import("@ubnt/ui-components").Motif;
|
|
21
|
+
tooltipClassName?: string;
|
|
22
|
+
offset?: number;
|
|
23
|
+
delay?: number | import("@ubnt/ui-components").DelayOptions;
|
|
24
|
+
autoPosition?: boolean | import("@ubnt/ui-components/Tooltip").TooltipPosition[];
|
|
25
|
+
animate?: boolean;
|
|
26
|
+
noWrap?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
style?: import("react").CSSProperties;
|
|
29
|
+
portal?: boolean;
|
|
30
|
+
onClick?: import("react").MouseEventHandler;
|
|
31
|
+
} & Omit<import("react").HTMLAttributes<HTMLElement>, "title"> & import("react").RefAttributes<HTMLElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
32
|
+
export declare const TooltipStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Tooltip$1 = require('@ubnt/ui-components/Tooltip');
|
|
4
|
+
var styled = require('styled-components');
|
|
5
|
+
var theme = require('../../constants/theme.js');
|
|
6
|
+
function _interopDefault(e) {
|
|
7
|
+
return e && e.__esModule ? e : {
|
|
8
|
+
default: e
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
12
|
+
"use strict";
|
|
13
|
+
const TOOLTIP_CLASS_NAME = "custom-tooltip";
|
|
14
|
+
const Tooltip = styled__default["default"](Tooltip$1.Tooltip)`
|
|
15
|
+
display: flex;
|
|
16
|
+
`;
|
|
17
|
+
const TooltipStyles = styled.createGlobalStyle`
|
|
18
|
+
.${TOOLTIP_CLASS_NAME} {
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
z-index: ${theme.theme.zIndex.header + 1}!important;
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
color: #808893;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
line-height: 20px;
|
|
25
|
+
box-shadow: 0 0 1px 0 rgb(33 35 39 / 0.08), 0 12px 48px 0 rgb(33 35 39 / 0.12);
|
|
26
|
+
background-color: #fff;
|
|
27
|
+
padding: 16px;
|
|
28
|
+
|
|
29
|
+
* {
|
|
30
|
+
color: #808893;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
line-height: 20px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&::before {
|
|
36
|
+
background-color: #fff;
|
|
37
|
+
box-shadow: -4px -4px 4px -4px rgb(33 35 39 / .08);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
exports.TOOLTIP_CLASS_NAME = TOOLTIP_CLASS_NAME;
|
|
42
|
+
exports.Tooltip = Tooltip;
|
|
43
|
+
exports.TooltipStyles = TooltipStyles;
|
|
44
|
+
//# sourceMappingURL=Tooltip.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.styles.js","sources":["../../../src/components/Tooltip/Tooltip.styles.tsx"],"sourcesContent":["import { Tooltip as BaseTooltip } from \"@ubnt/ui-components/Tooltip\";\nimport styled, { createGlobalStyle } from \"styled-components\";\n\nimport { theme } from \"../../constants/theme\";\n\nexport const TOOLTIP_CLASS_NAME = \"custom-tooltip\";\n\nexport const Tooltip = styled(BaseTooltip)`\n display: flex;\n`;\n\nexport const TooltipStyles = createGlobalStyle`\n .${TOOLTIP_CLASS_NAME} {\n white-space: nowrap;\n z-index: ${theme.zIndex.header + 1}!important;\n border-radius: 8px;\n color: #808893;\n font-size: 14px;\n line-height: 20px;\n box-shadow: 0 0 1px 0 rgb(33 35 39 / 0.08), 0 12px 48px 0 rgb(33 35 39 / 0.12);\n background-color: #fff;\n padding: 16px;\n\n * {\n color: #808893;\n font-size: 14px;\n line-height: 20px;\n }\n\n &::before {\n background-color: #fff;\n box-shadow: -4px -4px 4px -4px rgb(33 35 39 / .08);\n }\n }\n`;\n"],"names":["TOOLTIP_CLASS_NAME","Tooltip","styled","BaseTooltip","TooltipStyles","createGlobalStyle","theme","zIndex","header"],"mappings":";;;;;;;;;;;;AAKO,MAAMA,kBAAqB,GAAA,gBAAA;AAErB,MAAAC,OAAA,GAAUC,eAAAA,CAAAA,SAAAA,EAAOC,SAAAA,CAAAA,OAAW,CAAA;AAAA;AAAA,CAAA;AAIlC,MAAMC,aAAgB,GAAAC,MAAAA,CAAAA,iBAAA;AAAA,KACxBL,kBAAkB;AAAA;AAAA,eAERM,WAAA,CAAMC,MAAO,CAAAC,MAAA,GAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Tooltip as Tooltip$1 } from '@ubnt/ui-components/Tooltip';
|
|
2
|
+
import styled, { createGlobalStyle } from 'styled-components';
|
|
3
|
+
import { theme } from '../../constants/theme.mjs';
|
|
4
|
+
"use strict";
|
|
5
|
+
const TOOLTIP_CLASS_NAME = "custom-tooltip";
|
|
6
|
+
const Tooltip = styled(Tooltip$1)`
|
|
7
|
+
display: flex;
|
|
8
|
+
`;
|
|
9
|
+
const TooltipStyles = createGlobalStyle`
|
|
10
|
+
.${TOOLTIP_CLASS_NAME} {
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
z-index: ${theme.zIndex.header + 1}!important;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
color: #808893;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
line-height: 20px;
|
|
17
|
+
box-shadow: 0 0 1px 0 rgb(33 35 39 / 0.08), 0 12px 48px 0 rgb(33 35 39 / 0.12);
|
|
18
|
+
background-color: #fff;
|
|
19
|
+
padding: 16px;
|
|
20
|
+
|
|
21
|
+
* {
|
|
22
|
+
color: #808893;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
line-height: 20px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&::before {
|
|
28
|
+
background-color: #fff;
|
|
29
|
+
box-shadow: -4px -4px 4px -4px rgb(33 35 39 / .08);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
export { TOOLTIP_CLASS_NAME, Tooltip, TooltipStyles };
|
|
34
|
+
//# sourceMappingURL=Tooltip.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.styles.mjs","sources":["../../../src/components/Tooltip/Tooltip.styles.tsx"],"sourcesContent":["import { Tooltip as BaseTooltip } from \"@ubnt/ui-components/Tooltip\";\nimport styled, { createGlobalStyle } from \"styled-components\";\n\nimport { theme } from \"../../constants/theme\";\n\nexport const TOOLTIP_CLASS_NAME = \"custom-tooltip\";\n\nexport const Tooltip = styled(BaseTooltip)`\n display: flex;\n`;\n\nexport const TooltipStyles = createGlobalStyle`\n .${TOOLTIP_CLASS_NAME} {\n white-space: nowrap;\n z-index: ${theme.zIndex.header + 1}!important;\n border-radius: 8px;\n color: #808893;\n font-size: 14px;\n line-height: 20px;\n box-shadow: 0 0 1px 0 rgb(33 35 39 / 0.08), 0 12px 48px 0 rgb(33 35 39 / 0.12);\n background-color: #fff;\n padding: 16px;\n\n * {\n color: #808893;\n font-size: 14px;\n line-height: 20px;\n }\n\n &::before {\n background-color: #fff;\n box-shadow: -4px -4px 4px -4px rgb(33 35 39 / .08);\n }\n }\n`;\n"],"names":["TOOLTIP_CLASS_NAME","Tooltip","styled","BaseTooltip","TooltipStyles","createGlobalStyle","theme","zIndex","header"],"mappings":";;;;AAKO,MAAMA,kBAAqB,GAAA,gBAAA;AAErB,MAAAC,OAAA,GAAUC,OAAOC,SAAW,CAAA;AAAA;AAAA,CAAA;AAIlC,MAAMC,aAAgB,GAAAC,iBAAA;AAAA,KACxBL,kBAAkB;AAAA;AAAA,eAERM,KAAA,CAAMC,MAAO,CAAAC,MAAA,GAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from "./Tooltip";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -54,6 +54,7 @@ export declare const getProStoreCategoryMapping: (translations?: {
|
|
|
54
54
|
"Mega Capacity": string;
|
|
55
55
|
"Mobile Routing": string;
|
|
56
56
|
Mounting: string;
|
|
57
|
+
NAS: string;
|
|
57
58
|
"NVRs & Viewport": string;
|
|
58
59
|
"New Integrations": string;
|
|
59
60
|
Other: string;
|
|
@@ -68,9 +69,11 @@ export declare const getProStoreCategoryMapping: (translations?: {
|
|
|
68
69
|
"Professional A/V": string;
|
|
69
70
|
"Professional Max": string;
|
|
70
71
|
"RF Shielding": string;
|
|
72
|
+
"RJ45 & Copper": string;
|
|
71
73
|
"Rack Mount": string;
|
|
72
74
|
"Radio Module": string;
|
|
73
75
|
Readers: string;
|
|
76
|
+
"SFP & Fiber": string;
|
|
74
77
|
"Small Scale": string;
|
|
75
78
|
"Special Devices": string;
|
|
76
79
|
Standard: string;
|
|
@@ -335,31 +335,36 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
335
335
|
},
|
|
336
336
|
disabledStores: [generated.StoreId.In, generated.StoreId.Jp, generated.StoreId.Br],
|
|
337
337
|
items: [{
|
|
338
|
+
id: unifi.UniFiChildCategorySlug.NAS,
|
|
339
|
+
label: formatMessage("NAS"),
|
|
340
|
+
collectionSlugs: ["unifi-new-integrations-nas"],
|
|
341
|
+
disabledStores: store.inverseStoreSelect([generated.StoreId.Us, generated.StoreId.Ca, generated.StoreId.Eu, generated.StoreId.Uk])
|
|
342
|
+
}, {
|
|
338
343
|
id: unifi.UniFiChildCategorySlug.ManagedVoIP,
|
|
339
344
|
label: formatMessage("Managed VoIP"),
|
|
340
345
|
collectionSlugs: ["unifi-talk-business-voip"],
|
|
341
346
|
enableProductGrouping: true,
|
|
342
347
|
disabledStores: [generated.StoreId.Tw]
|
|
343
348
|
}, {
|
|
344
|
-
id: unifi.UniFiChildCategorySlug.
|
|
345
|
-
label: formatMessage("
|
|
346
|
-
collectionSlugs: ["unifi-new-integrations-
|
|
347
|
-
disabledStores: [generated.StoreId.Tw]
|
|
349
|
+
id: unifi.UniFiChildCategorySlug.ProfessionalAV,
|
|
350
|
+
label: formatMessage("Professional A/V"),
|
|
351
|
+
collectionSlugs: ["unifi-new-integrations-av-giant-poe-touchscreens", "unifi-new-integrations-av-digital-signage"]
|
|
348
352
|
}, {
|
|
349
353
|
id: unifi.UniFiChildCategorySlug.EVCharging,
|
|
350
354
|
label: formatMessage("EV Charging"),
|
|
351
355
|
collectionSlugs: ["unifi-new-integrations-ev-charging"],
|
|
352
356
|
disabledStores: store.inverseStoreSelect([generated.StoreId.Ca, generated.StoreId.Us])
|
|
353
|
-
}, {
|
|
354
|
-
id: unifi.UniFiChildCategorySlug.ProfessionalAV,
|
|
355
|
-
label: formatMessage("Professional A/V"),
|
|
356
|
-
collectionSlugs: ["unifi-new-integrations-av-giant-poe-touchscreens", "unifi-new-integrations-av-digital-signage"]
|
|
357
357
|
}, {
|
|
358
358
|
id: unifi.UniFiChildCategorySlug.InternetSolutions,
|
|
359
359
|
label: formatMessage("Internet Solutions"),
|
|
360
360
|
collectionSlugs: ["pro-internet-solutions"],
|
|
361
361
|
disabledStores: [generated.StoreId.In, generated.StoreId.Jp, generated.StoreId.Br, generated.StoreId.Tw, generated.StoreId.Ca],
|
|
362
362
|
enableProductGrouping: [generated.StoreId.Us]
|
|
363
|
+
}, {
|
|
364
|
+
id: unifi.UniFiChildCategorySlug.MobileRouting,
|
|
365
|
+
label: formatMessage("Mobile Routing"),
|
|
366
|
+
collectionSlugs: ["unifi-new-integrations-mobile-routing"],
|
|
367
|
+
disabledStores: [generated.StoreId.Tw]
|
|
363
368
|
}]
|
|
364
369
|
}, {
|
|
365
370
|
id: unifi.UniFiCategoryId.Accessories,
|
|
@@ -374,8 +379,13 @@ const getProStoreCategoryMapping = (translations = en["default"]) => {
|
|
|
374
379
|
hideAllCategory: true,
|
|
375
380
|
items: [{
|
|
376
381
|
id: unifi.UniFiChildCategorySlug.AccessoriesCablesDACS,
|
|
377
|
-
label: formatMessage("
|
|
378
|
-
collectionSlugs: ["accessories-pro-patch-cables", "accessories-pro-box-cables", "accessories-
|
|
382
|
+
label: formatMessage("RJ45 & Copper"),
|
|
383
|
+
collectionSlugs: ["accessories-pro-patch-cables", "accessories-pro-box-cables", "accessories-ethernet-repeater"],
|
|
384
|
+
enableProductGrouping: true
|
|
385
|
+
}, {
|
|
386
|
+
id: unifi.UniFiChildCategorySlug.AccessoriesModulesFiber,
|
|
387
|
+
label: formatMessage("SFP & Fiber"),
|
|
388
|
+
collectionSlugs: ["accessories-pro-direct-attach-cables", "accessories-pro-multi-mode-optical-fiber", "accessories-pro-single-mode-optical-fiber", "accessories-pro-cwdm", "accessories-pro-data-transport"],
|
|
379
389
|
enableProductGrouping: true
|
|
380
390
|
}, {
|
|
381
391
|
id: unifi.UniFiChildCategorySlug.AccessoriesStorage,
|