@bigbinary/neeto-molecules 3.15.59 → 3.16.1-beta
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/dist/CardLayout.js +3 -3
- package/dist/CardLayout.js.map +1 -1
- package/dist/Container.js +1 -1
- package/dist/CopyToClipboardButton.js +3 -2
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/EmailPreview.js +1 -1
- package/dist/EmailPreview.js.map +1 -1
- package/dist/FloatingActionMenu.js +9 -3
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/ProductEmbed.js +985 -302
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/ShareViaLink.js +421 -182
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/cjs/CardLayout.js +3 -3
- package/dist/cjs/CardLayout.js.map +1 -1
- package/dist/cjs/Container.js +1 -1
- package/dist/cjs/CopyToClipboardButton.js +3 -2
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/EmailPreview.js +1 -1
- package/dist/cjs/EmailPreview.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +9 -3
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +984 -301
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +419 -180
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +48 -40
- package/types/FloatingActionMenu.d.ts +11 -0
- package/types/ProductEmbed.d.ts +1 -0
- package/types/ShareViaLink.d.ts +25 -28
package/dist/CardLayout.js
CHANGED
|
@@ -22,7 +22,7 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
22
22
|
"data-testid": "neeto-molecules-card",
|
|
23
23
|
className: classnames(["neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border", className]),
|
|
24
24
|
children: [/*#__PURE__*/jsxs("div", {
|
|
25
|
-
className: "neeto-molecules-card__content p-4",
|
|
25
|
+
className: "neeto-molecules-card__content p-4 md:p-6",
|
|
26
26
|
children: [icon && /*#__PURE__*/jsx("div", {
|
|
27
27
|
className: "neeto-molecules-card__icon-wrapper mb-4 w-full text-left",
|
|
28
28
|
children: icon
|
|
@@ -33,12 +33,12 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
33
33
|
}]),
|
|
34
34
|
children: title
|
|
35
35
|
}), description && /*#__PURE__*/jsx(Typography, {
|
|
36
|
-
className: "mb-
|
|
36
|
+
className: "mb-4",
|
|
37
37
|
style: "body1",
|
|
38
38
|
children: description
|
|
39
39
|
}), children]
|
|
40
40
|
}), actionBlock && /*#__PURE__*/jsx("div", {
|
|
41
|
-
className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4", className]),
|
|
41
|
+
className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4 md:px-6", className]),
|
|
42
42
|
children: actionBlock
|
|
43
43
|
})]
|
|
44
44
|
})
|
package/dist/CardLayout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardLayout.js","sources":["../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n icon,\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4\">\n {icon && (\n <div className=\"neeto-molecules-card__icon-wrapper mb-4 w-full text-left\">\n {icon}\n </div>\n )}\n {title && (\n <Typography\n style=\"h2\"\n className={classnames([\n \"mb-2\",\n { \"pb-2\": isNotPresent(description) },\n ])}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sources":["../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n icon,\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4 md:p-6\">\n {icon && (\n <div className=\"neeto-molecules-card__icon-wrapper mb-4 w-full text-left\">\n {icon}\n </div>\n )}\n {title && (\n <Typography\n style=\"h2\"\n className={classnames([\n \"mb-2\",\n { \"pb-2\": isNotPresent(description) },\n ])}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-4\" style=\"body1\">\n {description}\n </Typography>\n )}\n {children}\n </div>\n {actionBlock && (\n <div\n className={classnames([\n \"neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4 md:px-6\",\n className,\n ])}\n >\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nCardLayout.propTypes = {\n /**\n * To set the title of the card.\n */\n title: PropTypes.string,\n /**\n * To set the description of the card.\n */\n description: PropTypes.node,\n /**\n * To set custom class name to the card.\n */\n className: PropTypes.string,\n /**\n * To set custom class name to the card container.\n */\n containerClassName: PropTypes.string,\n /**\n * To specify the content to be rendered in the card footer.\n */\n actionBlock: PropTypes.node,\n /**\n * To specify the components to be rendered inside the card.\n */\n children: PropTypes.node,\n /**\n * To set the icon of the card.\n */\n icon: PropTypes.node,\n};\n\nexport default CardLayout;\n"],"names":["CardLayout","_ref","_ref$className","className","icon","_ref$containerClassNa","containerClassName","_ref$title","title","_ref$description","description","actionBlock","children","_jsx","classnames","_jsxs","Typography","style","isNotPresent"],"mappings":";;;;;AAKA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CACdE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,qBAAA,GAAAJ,IAAA,CACJK,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;IAAAE,UAAA,GAAAN,IAAA,CACvBO,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,UAAA;IAAAE,gBAAA,GAAAR,IAAA,CACZS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;IAClBE,WAAW,GAAAV,IAAA,CAAXU,WAAW;IACXC,QAAQ,GAAAX,IAAA,CAARW,QAAQ,CAAA;AAAA,EAAA,oBAERC,GAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,gCAAgC;IAC5CV,SAAS,EAAEW,UAAU,CAAC,CACpB,0DAA0D,EAC1DR,kBAAkB,CACnB,CAAE;AAAAM,IAAAA,QAAA,eAEHG,IAAA,CAAA,KAAA,EAAA;AACE,MAAA,aAAA,EAAY,sBAAsB;MAClCZ,SAAS,EAAEW,UAAU,CAAC,CACpB,sFAAsF,EACtFX,SAAS,CACV,CAAE;AAAAS,MAAAA,QAAA,gBAEHG,IAAA,CAAA,KAAA,EAAA;AAAKZ,QAAAA,SAAS,EAAC,0CAA0C;QAAAS,QAAA,EAAA,CACtDR,IAAI,iBACHS,GAAA,CAAA,KAAA,EAAA;AAAKV,UAAAA,SAAS,EAAC,0DAA0D;AAAAS,UAAAA,QAAA,EACtER,IAAAA;AAAI,SACF,CACN,EACAI,KAAK,iBACJK,GAAA,CAACG,UAAU,EAAA;AACTC,UAAAA,KAAK,EAAC,IAAI;AACVd,UAAAA,SAAS,EAAEW,UAAU,CAAC,CACpB,MAAM,EACN;YAAE,MAAM,EAAEI,YAAY,CAACR,WAAW,CAAA;AAAE,WAAC,CACtC,CAAE;AAAAE,UAAAA,QAAA,EAEFJ,KAAAA;AAAK,SACI,CACb,EACAE,WAAW,iBACVG,GAAA,CAACG,UAAU,EAAA;AAACb,UAAAA,SAAS,EAAC,MAAM;AAACc,UAAAA,KAAK,EAAC,OAAO;AAAAL,UAAAA,QAAA,EACvCF,WAAAA;SACS,CACb,EACAE,QAAQ,CAAA;AAAA,OACN,CAAC,EACLD,WAAW,iBACVE,GAAA,CAAA,KAAA,EAAA;QACEV,SAAS,EAAEW,UAAU,CAAC,CACpB,8HAA8H,EAC9HX,SAAS,CACV,CAAE;AAAAS,QAAAA,QAAA,EAEFD,WAAAA;AAAW,OACT,CACN,CAAA;KACE,CAAA;AAAC,GACH,CAAC,CAAA;AAAA;;;;"}
|
package/dist/Container.js
CHANGED
|
@@ -5,7 +5,7 @@ import { n } from './inject-css-DmrvuTKK.js';
|
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
7
7
|
|
|
8
|
-
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 2.5rem}@media screen and (max-width:
|
|
8
|
+
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 2.5rem}@media screen and (max-width:767px){.neeto-molecules-container{padding:0 1.25rem}}.neeto-molecules-container--header-fixed{padding:0}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:2.5rem;padding-right:2.5rem}@media screen and (max-width:768px){.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:1.25rem;padding-right:1.25rem}}";
|
|
9
9
|
n(css,{});
|
|
10
10
|
|
|
11
11
|
var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -22,7 +22,7 @@ var TOOLTIP_CONFIG = {
|
|
|
22
22
|
var css = ".neeto-molecules-copy-button{display:flex;justify-content:space-between}.neeto-molecules-copy-button .neeto-ui-btn:active,.neeto-molecules-copy-button .neeto-ui-btn:focus,.neeto-molecules-copy-button .neeto-ui-btn:hover{box-shadow:none}.neeto-molecules-copy-button--active{background:rgba(var(--neeto-ui-success-500));color:rgba(var(--neeto-ui-white))}.neeto-molecules-copy-button--active.neeto-ui-btn:active,.neeto-molecules-copy-button--active.neeto-ui-btn:focus,.neeto-molecules-copy-button--active.neeto-ui-btn:hover{background:rgba(var(--neeto-ui-success-500));box-shadow:none;color:rgba(var(--neeto-ui-white))}";
|
|
23
23
|
n(css,{});
|
|
24
24
|
|
|
25
|
-
var _excluded = ["className", "icon", "label", "successLabel", "tooltipContent", "successTooltipContent", "value", "style", "tooltipProps"];
|
|
25
|
+
var _excluded = ["className", "icon", "label", "successLabel", "tooltipContent", "successTooltipContent", "value", "style", "tooltipProps", "onClick"];
|
|
26
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
28
|
var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
@@ -37,6 +37,7 @@ var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
|
37
37
|
value = _ref.value,
|
|
38
38
|
style = _ref.style,
|
|
39
39
|
tooltipProps = _ref.tooltipProps,
|
|
40
|
+
onClick = _ref.onClick,
|
|
40
41
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
41
42
|
var _useTranslation = useTranslation(),
|
|
42
43
|
t = _useTranslation.t;
|
|
@@ -48,7 +49,7 @@ var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
|
48
49
|
var onHandleClick = function onHandleClick(event) {
|
|
49
50
|
event.preventDefault();
|
|
50
51
|
event.stopPropagation();
|
|
51
|
-
copyToClipboard(value, {
|
|
52
|
+
if (onClick) onClick(event);else copyToClipboard(value, {
|
|
52
53
|
showToastr: false
|
|
53
54
|
});
|
|
54
55
|
setIsChecked(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboardButton.js","sources":["../src/components/CopyToClipboardButton/constants.js","../src/components/CopyToClipboardButton/index.jsx"],"sourcesContent":["const TIME_OUT = 2000;\n\nconst TOOLTIP_CONFIG = {\n trigger: \"click mouseenter\",\n hideAfter: TIME_OUT,\n position: \"top\",\n};\n\nconst BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n text: \"text\",\n};\n\nexport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES };\n","import { useState, useEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { copyToClipboard } from \"neetocommons/utils/general\";\nimport { Copy, Check } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeAll } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES } from \"./constants\";\nimport \"./copyToClipboard.scss\";\n\nconst CopyToClipboardButton = ({\n className,\n icon = Copy,\n label = \"\",\n successLabel,\n tooltipContent,\n successTooltipContent,\n value,\n style,\n tooltipProps,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const [isChecked, setIsChecked] = useState(false);\n\n const ref = useRef();\n\n const onHandleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n copyToClipboard(value, { showToastr: false });\n setIsChecked(true);\n setTimeout(() => {\n setIsChecked(false);\n }, TIME_OUT); // Reset copied state after 2 seconds\n };\n\n useEffect(() => {\n if (!ref.current) return;\n const buttonWidth = ref.current.clientWidth;\n ref.current.style.minWidth = `${buttonWidth}px`;\n }, []);\n\n const tooltipOptions = label\n ? null\n : mergeAll([\n TOOLTIP_CONFIG,\n {\n content: isChecked\n ? successTooltipContent || t(\"neetoMolecules.common.copied\")\n : tooltipContent || t(\"neetoMolecules.common.copyToClipboard\"),\n },\n tooltipProps,\n ]);\n\n const buttonLabel =\n isChecked && label\n ? successLabel || t(\"neetoMolecules.common.copied\")\n : label;\n const buttonIcon = isChecked ? Check : icon;\n\n return (\n <Button\n {...{ ref, style }}\n data-cy=\"copy-to-clipboard-button\"\n data-testid=\"copy-button\"\n icon={buttonIcon}\n label={buttonLabel}\n tooltipProps={tooltipOptions}\n className={classnames(\"neeto-molecules-copy-button\", {\n [className]: className,\n \"neeto-molecules-copy-button--active\": isChecked,\n })}\n onClick={onHandleClick}\n {...otherProps}\n />\n );\n};\n\nCopyToClipboardButton.propTypes = {\n /**\n * To provide additional classnames to the button.\n */\n className: PropTypes.string,\n /**\n * To provide the icon to be passed to the button. Defaults to the Copy icon.\n */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /**\n * To provide the label to the button. By default there is no label.\n */\n label: PropTypes.string,\n /**\n * The label of button when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successLabel: PropTypes.string,\n /**\n * The value to be copied to clipboard. (required)\n */\n value: PropTypes.string,\n /**\n * To specify the style of the Button.\n */\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copy to clipboard'.\n */\n tooltipContent: PropTypes.string,\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successTooltipContent: PropTypes.string,\n};\n\nexport default CopyToClipboardButton;\n"],"names":["TIME_OUT","TOOLTIP_CONFIG","trigger","hideAfter","position","CopyToClipboardButton","_ref","className","_ref$icon","icon","Copy","_ref$label","label","successLabel","tooltipContent","successTooltipContent","value","style","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isChecked","setIsChecked","ref","useRef","onHandleClick","event","preventDefault","stopPropagation","copyToClipboard","showToastr","setTimeout","useEffect","current","buttonWidth","clientWidth","minWidth","concat","tooltipOptions","mergeAll","content","buttonLabel","buttonIcon","Check","_jsx","Button","_objectSpread","classnames","_defineProperty"
|
|
1
|
+
{"version":3,"file":"CopyToClipboardButton.js","sources":["../src/components/CopyToClipboardButton/constants.js","../src/components/CopyToClipboardButton/index.jsx"],"sourcesContent":["const TIME_OUT = 2000;\n\nconst TOOLTIP_CONFIG = {\n trigger: \"click mouseenter\",\n hideAfter: TIME_OUT,\n position: \"top\",\n};\n\nconst BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n text: \"text\",\n};\n\nexport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES };\n","import { useState, useEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { copyToClipboard } from \"neetocommons/utils/general\";\nimport { Copy, Check } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeAll } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES } from \"./constants\";\nimport \"./copyToClipboard.scss\";\n\nconst CopyToClipboardButton = ({\n className,\n icon = Copy,\n label = \"\",\n successLabel,\n tooltipContent,\n successTooltipContent,\n value,\n style,\n tooltipProps,\n onClick,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const [isChecked, setIsChecked] = useState(false);\n\n const ref = useRef();\n\n const onHandleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n\n if (onClick) onClick(event);\n else copyToClipboard(value, { showToastr: false });\n\n setIsChecked(true);\n setTimeout(() => {\n setIsChecked(false);\n }, TIME_OUT); // Reset copied state after 2 seconds\n };\n\n useEffect(() => {\n if (!ref.current) return;\n const buttonWidth = ref.current.clientWidth;\n ref.current.style.minWidth = `${buttonWidth}px`;\n }, []);\n\n const tooltipOptions = label\n ? null\n : mergeAll([\n TOOLTIP_CONFIG,\n {\n content: isChecked\n ? successTooltipContent || t(\"neetoMolecules.common.copied\")\n : tooltipContent || t(\"neetoMolecules.common.copyToClipboard\"),\n },\n tooltipProps,\n ]);\n\n const buttonLabel =\n isChecked && label\n ? successLabel || t(\"neetoMolecules.common.copied\")\n : label;\n const buttonIcon = isChecked ? Check : icon;\n\n return (\n <Button\n {...{ ref, style }}\n data-cy=\"copy-to-clipboard-button\"\n data-testid=\"copy-button\"\n icon={buttonIcon}\n label={buttonLabel}\n tooltipProps={tooltipOptions}\n className={classnames(\"neeto-molecules-copy-button\", {\n [className]: className,\n \"neeto-molecules-copy-button--active\": isChecked,\n })}\n onClick={onHandleClick}\n {...otherProps}\n />\n );\n};\n\nCopyToClipboardButton.propTypes = {\n /**\n * To provide additional classnames to the button.\n */\n className: PropTypes.string,\n /**\n * To provide the icon to be passed to the button. Defaults to the Copy icon.\n */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /**\n * To provide the label to the button. By default there is no label.\n */\n label: PropTypes.string,\n /**\n * The label of button when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successLabel: PropTypes.string,\n /**\n * The value to be copied to clipboard. (required)\n */\n value: PropTypes.string,\n /**\n * To specify the style of the Button.\n */\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copy to clipboard'.\n */\n tooltipContent: PropTypes.string,\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successTooltipContent: PropTypes.string,\n};\n\nexport default CopyToClipboardButton;\n"],"names":["TIME_OUT","TOOLTIP_CONFIG","trigger","hideAfter","position","CopyToClipboardButton","_ref","className","_ref$icon","icon","Copy","_ref$label","label","successLabel","tooltipContent","successTooltipContent","value","style","tooltipProps","onClick","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isChecked","setIsChecked","ref","useRef","onHandleClick","event","preventDefault","stopPropagation","copyToClipboard","showToastr","setTimeout","useEffect","current","buttonWidth","clientWidth","minWidth","concat","tooltipOptions","mergeAll","content","buttonLabel","buttonIcon","Check","_jsx","Button","_objectSpread","classnames","_defineProperty"],"mappings":";;;;;;;;;;;;;;AAAA,IAAMA,QAAQ,GAAG,IAAI,CAAA;AAErB,IAAMC,cAAc,GAAG;AACrBC,EAAAA,OAAO,EAAE,kBAAkB;AAC3BC,EAAAA,SAAS,EAAEH,QAAQ;AACnBI,EAAAA,QAAQ,EAAE,KAAA;AACZ,CAAC;;;;;;;;ACOD,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAYrB;AAAA,EAAA,IAXJC,SAAS,GAAAD,IAA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AC7BxC,IAAAA,SAAS,EAAEiD,UAAU,CAAC,6BAA6B,EAAAC,eAAA,CAAAA,eAAA,CAChDlD,EAAAA,EAAAA,SAAS,EAAGA,SAAS,CAAA,EACtB,qCAAqC,EAAEuB,SAAS,CACjD,CAAE;AACHX,IAAAA,OAAO,EAAEe,aAAAA;GACLd,EAAAA,UAAU,CACf,CAAC,CAAA;AAEN;;;;"}
|
package/dist/EmailPreview.js
CHANGED
|
@@ -25,7 +25,7 @@ var EmailPreview = withT(function (_ref) {
|
|
|
25
25
|
return /*#__PURE__*/jsxs("div", {
|
|
26
26
|
"data-cy": "email-preview-card",
|
|
27
27
|
"data-testid": "email-preview",
|
|
28
|
-
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", className),
|
|
28
|
+
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light flex flex-1 flex-col border", className),
|
|
29
29
|
children: [/*#__PURE__*/jsxs("div", {
|
|
30
30
|
className: "neeto-ui-border-gray-300 space-y-3 border-b p-6",
|
|
31
31
|
children: [/*#__PURE__*/jsxs("div", {
|
package/dist/EmailPreview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailPreview.js","sources":["../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 space-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"space-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,IAAI,CAACC,aAAa,CAAC,CAAA;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IAAAC,cAAA,GAAAT,IAAA,CACJU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,aAAa,GAAAX,IAAA,CAAbW,aAAa,CAAA;AAAA,EAAA,oBAEbC,IAAA,CAAA,KAAA,EAAA;AACE,IAAA,SAAA,EAAQ,oBAAoB;AAC5B,IAAA,aAAA,EAAY,eAAe;AAC3BF,IAAAA,SAAS,EAAEG,UAAU,CACnB,
|
|
1
|
+
{"version":3,"file":"EmailPreview.js","sources":["../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 space-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"space-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,IAAI,CAACC,aAAa,CAAC,CAAA;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,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OAAO,EAAEsB,SAAS,CAACE,MAAM;AACzB;AACF;AACA;EACEvB,IAAI,EAAEqB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACEtB,gBAAgB,EAAEoB,SAAS,CAACE,MAAM;AAClC;AACF;AACA;EACErB,IAAI,EAAEmB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACElB,aAAa,EAAEgB,SAAS,CAACE,MAAAA;AAC3B,CAAC;;;;"}
|
|
@@ -701,7 +701,8 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
701
701
|
topLinks = _ref.topLinks,
|
|
702
702
|
customContent = _ref.customContent,
|
|
703
703
|
isThemeSwitcherEnabled = _ref.isThemeSwitcherEnabled,
|
|
704
|
-
isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled
|
|
704
|
+
isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
|
|
705
|
+
profilePopoverProps = _ref.profilePopoverProps;
|
|
705
706
|
var _useState = useState(false),
|
|
706
707
|
_useState2 = _slicedToArray(_useState, 2),
|
|
707
708
|
isModalOpen = _useState2[0],
|
|
@@ -763,7 +764,9 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
763
764
|
return !hide;
|
|
764
765
|
});
|
|
765
766
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
766
|
-
children: [/*#__PURE__*/jsx(Profile.Pane, {
|
|
767
|
+
children: [/*#__PURE__*/jsx(Profile.Pane, {
|
|
768
|
+
popoverProps: profilePopoverProps
|
|
769
|
+
}), /*#__PURE__*/jsx(Dropdown$1, {
|
|
767
770
|
appendTo: function appendTo() {
|
|
768
771
|
return document.body;
|
|
769
772
|
},
|
|
@@ -825,7 +828,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
825
828
|
var css = ":root{--neeto-molecules-floating-menu-z-index:99999}.neeto-molecules-floating-action-menu__container{background-color:rgb(var(--neeto-ui-white));border:1px solid rgb(var(--neeto-ui-white));border-bottom-right-radius:1.0625rem;border-left:none;border-top-right-radius:1.0625rem;bottom:16px;left:0;position:fixed;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-bottom-right-radius:1rem;border-color:rgb(var(--neeto-ui-primary-500));border-top-right-radius:1rem;display:flex;flex-direction:column;gap:.375rem;justify-content:center;padding:.25rem}.neeto-molecules-floating-action-button__help-icon{align-items:center;background-color:#fff;border-radius:6.25rem;display:flex;height:1.625rem;justify-content:center;width:1.625rem}.neeto-molecules-floating-action-button__profile-avatar{--neeto-ui-avatar-container-width:1.625rem;--neeto-ui-avatar-container-height:1.625rem;border:2px solid #fff;border-radius:6.25rem}.neeto-molecules-floating-action-button__profile-avatar>div{height:100%;width:100%}.neeto-molecules-floating-action-button__profile-avatar .neeto-ui-avatar{height:100%!important;width:100%!important}.neeto-molecules-floating-action-button__dropdown{flex-shrink:0;max-height:none!important;max-width:none;width:16rem;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button__dropdown ul{padding-top:0!important}.neeto-molecules-product-switcher-menu-popup__dropdown{max-height:none!important;max-width:none}.neeto-molecules-menu__notif-count{border:1px solid #fff;height:.9375rem;min-width:.9375rem;pointer-events:none;position:absolute;right:0;top:0;z-index:3}.neeto-molecules-menu-list__item-btn-count,.neeto-molecules-menu__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);justify-content:center;padding-left:.25rem;padding-right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-molecules-menu-list__item-btn-count{height:1.125rem;min-width:1.125rem}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper .tippy-content{padding:0}.neeto-ui-dropdown__popup .neeto-molecules-product-switcher-menu-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-menu-sublist__item-btn{font-weight:500!important;height:2.5rem}.neeto-molecules-menu-sublist__item-btn[data-btn-weight=bold]{font-weight:700!important}.neeto-molecules-menu-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-menu-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-menu-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-product-switcher-menu-popup-wrapper{height:95vh;overflow-y:auto;width:calc(100vw - 25rem)}.neeto-molecules-floating-action-button__profile-wrapper-custom-content:hover{background-color:rgb(var(--neeto-ui-white))!important}.neeto-molecules-theme-switcher-menu-popup-wrapper .neeto-ui-dropdown__popup-menu{padding-top:.25rem!important}.neeto-molecules-organization-switcher-active-button,.neeto-molecules-theme-switcher-active-button{color:rgb(var(--neeto-ui-success-600))!important}";
|
|
826
829
|
n(css,{});
|
|
827
830
|
|
|
828
|
-
var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent"];
|
|
831
|
+
var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent", "profilePopoverProps"];
|
|
829
832
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
830
833
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
831
834
|
var FloatingActionMenu = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -843,6 +846,8 @@ var FloatingActionMenu = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
843
846
|
_ref$isOrganizationSw = _ref.isOrganizationSwitcherEnabled,
|
|
844
847
|
isOrganizationSwitcherEnabled = _ref$isOrganizationSw === void 0 ? false : _ref$isOrganizationSw,
|
|
845
848
|
customContent = _ref.customContent,
|
|
849
|
+
_ref$profilePopoverPr = _ref.profilePopoverProps,
|
|
850
|
+
profilePopoverProps = _ref$profilePopoverPr === void 0 ? {} : _ref$profilePopoverPr,
|
|
846
851
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
847
852
|
useEffect(function () {
|
|
848
853
|
isThemeSwitcherEnabled && setAppTheme();
|
|
@@ -860,6 +865,7 @@ var FloatingActionMenu = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
860
865
|
isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
|
|
861
866
|
isThemeSwitcherEnabled: isThemeSwitcherEnabled,
|
|
862
867
|
profileInfoOverrides: profileInfoOverrides,
|
|
868
|
+
profilePopoverProps: profilePopoverProps,
|
|
863
869
|
showProductSwitcher: showProductSwitcher,
|
|
864
870
|
topLinks: topLinks
|
|
865
871
|
}, "isOrganizationSwitcherEnabled", isBigBinaryEmail || isOrganizationSwitcherEnabled))
|