@bigbinary/neeto-molecules 1.15.16 → 1.15.17
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/CustomDomain.js +1 -1
- package/dist/CustomDomainDashboard.js +1 -1
- package/dist/HelpPopover.js +14 -14
- package/dist/HelpPopover.js.map +1 -1
- package/dist/MoreDropdown.js +19 -10
- package/dist/MoreDropdown.js.map +1 -1
- package/dist/Schedule.js +1 -1
- package/dist/cjs/CustomDomain.js +1 -1
- package/dist/cjs/CustomDomainDashboard.js +1 -1
- package/dist/cjs/HelpPopover.js +12 -12
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/MoreDropdown.js +20 -10
- package/dist/cjs/MoreDropdown.js.map +1 -1
- package/dist/cjs/Schedule.js +1 -1
- package/dist/cjs/{index-cd140b32.js → index-35629600.js} +1 -1
- package/dist/cjs/{index-cd140b32.js.map → index-35629600.js.map} +1 -1
- package/dist/{index-46f9dbca.js → index-2fe27725.js} +1 -1
- package/dist/{index-46f9dbca.js.map → index-2fe27725.js.map} +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +2 -1
- package/types/MoreDropdown.d.ts +4 -1
- package/dist/AdaptiveInput.js +0 -84
- package/dist/AdaptiveInput.js.map +0 -1
- package/dist/cjs/AdaptiveInput.js +0 -94
- package/dist/cjs/AdaptiveInput.js.map +0 -1
- package/types/AdaptiveInput.d.ts +0 -51
package/dist/CustomDomain.js
CHANGED
|
@@ -6,7 +6,7 @@ import { hyphenize } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
|
6
6
|
import { CustomDomain as CustomDomain$1 } from '@bigbinary/neeto-icons';
|
|
7
7
|
import { Spinner, Tag, Button } from '@bigbinary/neetoui';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
import { u as useFetchCustomDomains, a as useDeleteCustomDomain, M as Manage, D as DeleteAlert } from './index-
|
|
9
|
+
import { u as useFetchCustomDomains, a as useDeleteCustomDomain, M as Manage, D as DeleteAlert } from './index-2fe27725.js';
|
|
10
10
|
import MoreDropdown from './MoreDropdown.js';
|
|
11
11
|
import 'formik';
|
|
12
12
|
import '@bigbinary/neeto-hotkeys';
|
|
@@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
7
|
import Container from './Container.js';
|
|
8
8
|
import PageLoader from './PageLoader.js';
|
|
9
9
|
import SubHeader from './SubHeader.js';
|
|
10
|
-
import { u as useFetchCustomDomains, a as useDeleteCustomDomain, r as renderColumnData, M as Manage, D as DeleteAlert } from './index-
|
|
10
|
+
import { u as useFetchCustomDomains, a as useDeleteCustomDomain, r as renderColumnData, M as Manage, D as DeleteAlert } from './index-2fe27725.js';
|
|
11
11
|
import { _ as _extends } from './extends-093996c9.js';
|
|
12
12
|
import { PLURAL } from '@bigbinary/neeto-commons-frontend/constants';
|
|
13
13
|
import withT from '@bigbinary/neeto-commons-frontend/react-utils/withT';
|
package/dist/HelpPopover.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './defineProperty-549061a7.js';
|
|
2
1
|
import { _ as _extends } from './extends-093996c9.js';
|
|
2
|
+
import { _ as _defineProperty } from './defineProperty-549061a7.js';
|
|
3
3
|
import { _ as _objectWithoutProperties } from './objectWithoutProperties-a0edb288.js';
|
|
4
|
-
import React__default
|
|
4
|
+
import React__default from 'react';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import { isNotPresent } from '@bigbinary/neeto-cist';
|
|
7
7
|
import { Help } from '@bigbinary/neeto-icons';
|
|
8
|
-
import { Popover,
|
|
8
|
+
import { Popover, Tooltip, Typography, Button } from '@bigbinary/neetoui';
|
|
9
|
+
import { useTranslation } from 'react-i18next';
|
|
9
10
|
|
|
10
11
|
var SIZE = {
|
|
11
12
|
"default": 16,
|
|
@@ -27,7 +28,8 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
27
28
|
_ref$icon = _ref.icon,
|
|
28
29
|
icon = _ref$icon === void 0 ? Help : _ref$icon,
|
|
29
30
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
var
|
|
31
|
+
var _useTranslation = useTranslation(),
|
|
32
|
+
t = _useTranslation.t;
|
|
31
33
|
var isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);
|
|
32
34
|
var Icon = function Icon() {
|
|
33
35
|
var Component = icon;
|
|
@@ -36,14 +38,7 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
36
38
|
size: SIZE[size]
|
|
37
39
|
});
|
|
38
40
|
};
|
|
39
|
-
return /*#__PURE__*/React__default.createElement(
|
|
40
|
-
"data-cy": "help-popover-button",
|
|
41
|
-
"data-testid": "help-popover-button",
|
|
42
|
-
icon: Icon,
|
|
43
|
-
ref: helpIconRef,
|
|
44
|
-
style: "text",
|
|
45
|
-
className: classnames("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
|
|
46
|
-
})), /*#__PURE__*/React__default.createElement(Tooltip, _extends({
|
|
41
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, _extends({
|
|
47
42
|
appendTo: function appendTo() {
|
|
48
43
|
return document.body;
|
|
49
44
|
}
|
|
@@ -51,7 +46,6 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
51
46
|
interactive: true,
|
|
52
47
|
arrow: isCompact ? undefined : true,
|
|
53
48
|
className: classnames(_defineProperty({}, "neeto-ui-popover", !isCompact)),
|
|
54
|
-
reference: helpIconRef,
|
|
55
49
|
role: "tooltip",
|
|
56
50
|
theme: isCompact ? "dark" : "light",
|
|
57
51
|
content: /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -67,13 +61,19 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
67
61
|
}, description) : description, helpLinkProps && /*#__PURE__*/React__default.createElement(Button, _extends({
|
|
68
62
|
className: "neeto-ui-mt-3",
|
|
69
63
|
"data-cy": "help-popover-link-button",
|
|
70
|
-
label: "
|
|
64
|
+
label: t("neetoMolecules.common.viewHelpArticle"),
|
|
71
65
|
size: "small"
|
|
72
66
|
}, helpLinkProps, {
|
|
73
67
|
"data-testid": "help-popover-link-button",
|
|
74
68
|
style: "link",
|
|
75
69
|
target: "_blank"
|
|
76
70
|
})))
|
|
71
|
+
}), /*#__PURE__*/React__default.createElement(Button, _extends({}, otherProps, {
|
|
72
|
+
"data-cy": "help-popover-button",
|
|
73
|
+
"data-testid": "help-popover-button",
|
|
74
|
+
icon: Icon,
|
|
75
|
+
style: "text",
|
|
76
|
+
className: classnames("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
|
|
77
77
|
})));
|
|
78
78
|
};
|
|
79
79
|
|
package/dist/HelpPopover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPopover.js","sources":["../src/components/HelpPopover/constants.js","../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import React
|
|
1
|
+
{"version":3,"file":"HelpPopover.js","sources":["../src/components/HelpPopover/constants.js","../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"#1f1f1f\",\n icon = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n const Icon = () => {\n const Component = icon;\n\n return <Component color={iconColor} size={SIZE[size]} />;\n };\n\n return (\n <Tooltip\n appendTo={() => document.body}\n {...popoverProps}\n interactive\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n >\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={Icon}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n </Tooltip>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","isCompact","isNotPresent","Icon","Component","React","createElement","color","Tooltip","_extends","appendTo","document","body","interactive","arrow","undefined","classNames","_defineProperty","role","theme","content","Typography","lineHeight","style","Button","label","target"],"mappings":";;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE,EAAA;AAAG,CAAC;;;ACW9C,IAAQC,KAAK,GAAKC,OAAO,CAAjBD,KAAK,CAAA;AAEb,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAUX;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,SAAA,GAAAF,IAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,SAAA;IAChBE,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAAC,cAAA,GAAAR,IAAA,CACTS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,cAAA;IAAAE,SAAA,GAAAV,IAAA,CACrBW,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,SAAA;AACRG,IAAAA,UAAU,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EACT,IAAMC,SAAS,GAAGC,YAAY,CAACnB,KAAK,CAAC,IAAImB,YAAY,CAACf,aAAa,CAAC,CAAA;AAEpE,EAAA,IAAMgB,IAAI,GAA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AC,aAAa,iBACZkB,cAAA,CAAAC,aAAA,CAACkB,MAAM,EAAAf,QAAA,CAAA;AACLpB,MAAAA,SAAS,EAAC,eAAe;AACzB,MAAA,SAAA,EAAQ,0BAA0B;AAClCoC,MAAAA,KAAK,EAAEzB,CAAC,CAAC,uCAAuC,CAAE;AAClDf,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAA,EACRE,aAAa,EAAA;AACjB,MAAA,aAAA,EAAY,0BAA0B;AACtCoC,MAAAA,KAAK,EAAC,MAAM;AACZG,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,CAChB,CAEA,CAAA;GAGPrB,CAAAA,eAAAA,cAAA,CAAAC,aAAA,CAACkB,MAAM,EAAAf,QAAA,KACDd,UAAU,EAAA;AACd,IAAA,SAAA,EAAQ,qBAAqB;AAC7B,IAAA,aAAA,EAAY,qBAAqB;AACjCF,IAAAA,IAAI,EAAEU,IAAK;AACXoB,IAAAA,KAAK,EAAC,MAAM;AACZlC,IAAAA,SAAS,EAAE2B,UAAU,CACnB,8EAA8E,EAC9E3B,SACF,CAAA;AAAE,GAAA,CACH,CACM,CAAC,CAAA;AAEd;;;;"}
|
package/dist/MoreDropdown.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { _ as _objectWithoutProperties } from './objectWithoutProperties-a0edb288.js';
|
|
2
1
|
import { _ as _defineProperty } from './defineProperty-549061a7.js';
|
|
3
2
|
import { _ as _extends } from './extends-093996c9.js';
|
|
3
|
+
import { _ as _objectWithoutProperties } from './objectWithoutProperties-a0edb288.js';
|
|
4
4
|
import React__default from 'react';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
import { hyphenate } from '@bigbinary/neeto-cist';
|
|
6
7
|
import { MenuVertical, MenuHorizontal } from '@bigbinary/neeto-icons';
|
|
7
8
|
import { Dropdown, Tooltip, Button } from '@bigbinary/neetoui';
|
|
@@ -19,7 +20,7 @@ var DEFAULT_TOOLTIP_PROPS = {
|
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
var _excluded$2 = ["label", "key"],
|
|
22
|
-
_excluded2 = ["isVisible", "key"];
|
|
23
|
+
_excluded2$1 = ["isVisible", "key"];
|
|
23
24
|
var MenuItem$1 = Dropdown.MenuItem,
|
|
24
25
|
Menu$1 = Dropdown.Menu;
|
|
25
26
|
var Submenu = function Submenu(_ref) {
|
|
@@ -35,7 +36,7 @@ var Submenu = function Submenu(_ref) {
|
|
|
35
36
|
var _ref2$isVisible = _ref2.isVisible,
|
|
36
37
|
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
37
38
|
key = _ref2.key,
|
|
38
|
-
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
39
|
+
menuItemProps = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
39
40
|
if (!isVisible) return null;
|
|
40
41
|
return /*#__PURE__*/React__default.createElement(MoreDropdownMenuItem, _extends({
|
|
41
42
|
key: key
|
|
@@ -69,10 +70,11 @@ var MoreDropdownMenuItem = function MoreDropdownMenuItem(_ref) {
|
|
|
69
70
|
}, menuItemProps), label);
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
var css = ".neeto-ui-btn.neeto-ui-btn--icon-only[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:20px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:28px;justify-content:center;width:28px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:24px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:32px;justify-content:center;width:32px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:30px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:40px;justify-content:center;width:40px}";
|
|
73
|
+
var css = ".neeto-ui-btn.neeto-ui-btn--icon-only[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:20px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:28px;justify-content:center;width:28px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:24px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:32px;justify-content:center;width:32px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:30px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:40px;justify-content:center;width:40px}.neeto-ui-btn.neeto-molecule-moredropdown--rounded[data-dropdown-button-style=more-dropdown]{border-radius:100%}";
|
|
73
74
|
n(css,{});
|
|
74
75
|
|
|
75
|
-
var _excluded = ["
|
|
76
|
+
var _excluded = ["isRounded"],
|
|
77
|
+
_excluded2 = ["isVisible", "key"];
|
|
76
78
|
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; }
|
|
77
79
|
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; }
|
|
78
80
|
var Menu = Dropdown.Menu;
|
|
@@ -91,6 +93,8 @@ var MoreDropdown = function MoreDropdown(_ref) {
|
|
|
91
93
|
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
92
94
|
var _useTranslation = useTranslation(),
|
|
93
95
|
t = _useTranslation.t;
|
|
96
|
+
var isRoundedButton = dropdownButtonProps.isRounded,
|
|
97
|
+
buttonProps = _objectWithoutProperties(dropdownButtonProps, _excluded);
|
|
94
98
|
var tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
|
|
95
99
|
var targetIcon = isVertical ? MenuVertical : MenuHorizontal;
|
|
96
100
|
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
@@ -103,8 +107,11 @@ var MoreDropdown = function MoreDropdown(_ref) {
|
|
|
103
107
|
icon: targetIcon,
|
|
104
108
|
iconPosition: "right",
|
|
105
109
|
size: "medium",
|
|
106
|
-
style: "text"
|
|
107
|
-
|
|
110
|
+
style: "text",
|
|
111
|
+
className: classnames({
|
|
112
|
+
"neeto-molecule-moredropdown--rounded": isRoundedButton
|
|
113
|
+
})
|
|
114
|
+
}, buttonProps))));
|
|
108
115
|
}
|
|
109
116
|
return /*#__PURE__*/React__default.createElement(Dropdown, _extends({
|
|
110
117
|
autoWidth: true,
|
|
@@ -113,18 +120,20 @@ var MoreDropdown = function MoreDropdown(_ref) {
|
|
|
113
120
|
icon: targetIcon,
|
|
114
121
|
buttonProps: _objectSpread({
|
|
115
122
|
"data-dropdown-button-style": "more-dropdown",
|
|
116
|
-
className: "min-h-0 flex-shrink-0",
|
|
123
|
+
className: classnames("min-h-0 flex-shrink-0", {
|
|
124
|
+
"neeto-molecule-moredropdown--rounded": isRoundedButton
|
|
125
|
+
}),
|
|
117
126
|
style: "text",
|
|
118
127
|
tooltipProps: {
|
|
119
128
|
content: t("neetoMolecules.moreDropdown.tooltip"),
|
|
120
129
|
position: "top"
|
|
121
130
|
}
|
|
122
|
-
},
|
|
131
|
+
}, buttonProps)
|
|
123
132
|
}, dropdownProps), /*#__PURE__*/React__default.createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
|
|
124
133
|
var _ref2$isVisible = _ref2.isVisible,
|
|
125
134
|
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
126
135
|
key = _ref2.key,
|
|
127
|
-
menuItemProps = _objectWithoutProperties(_ref2,
|
|
136
|
+
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
128
137
|
if (!isVisible) return null;
|
|
129
138
|
return /*#__PURE__*/React__default.createElement(MoreDropdownMenuItem, _extends({
|
|
130
139
|
key: key !== null && key !== void 0 ? key : hyphenate(menuItemProps.label)
|
package/dist/MoreDropdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreDropdown.js","sources":["../src/components/MoreDropdown/constants.js","../src/components/MoreDropdown/Submenu.jsx","../src/components/MoreDropdown/MenuItem.jsx","../src/components/MoreDropdown/index.jsx"],"sourcesContent":["export const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n danger: \"danger\",\n danger_text: \"danger-text\",\n text: \"text\",\n link: \"link\",\n};\n\nexport const SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nexport const STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nexport const MENU_ITEM_TYPES = {\n menuItem: \"menuItem\",\n divider: \"divider\",\n};\n\nexport const DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n};\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport MoreDropdownMenuItem from \"./MenuItem\";\n\nconst { MenuItem, Menu } = Dropdown;\n\nconst Submenu = ({ label, key, ...menuItemProps }) => (\n <Dropdown\n customTarget={<MenuItem.Button>{label}</MenuItem.Button>}\n key={key}\n position=\"left\"\n trigger=\"hover\"\n {...menuItemProps.dropdownProps}\n >\n <Menu>\n {menuItemProps.menuItems.map(\n ({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return <MoreDropdownMenuItem key={key} {...menuItemProps} />;\n }\n )}\n </Menu>\n </Dropdown>\n);\n\nexport default Submenu;\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport { MENU_ITEM_TYPES } from \"./constants\";\nimport Submenu from \"./Submenu\";\n\nconst { MenuItem, Divider } = Dropdown;\n\nconst MoreDropdownMenuItem = ({\n onClick,\n label,\n type = MENU_ITEM_TYPES.menuItem,\n hasSubItems = false,\n ...menuItemProps\n}) => {\n if (type === MENU_ITEM_TYPES.divider) {\n return <Divider />;\n }\n\n if (hasSubItems) {\n return <Submenu {...{ label, ...menuItemProps }} />;\n }\n\n return (\n <MenuItem.Button {...{ onClick, ...menuItemProps }}>\n {label}\n </MenuItem.Button>\n );\n};\n\nexport default MoreDropdownMenuItem;\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { MenuHorizontal, MenuVertical } from \"neetoicons\";\nimport { Button, Dropdown, Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n BUTTON_STYLES,\n DEFAULT_TOOLTIP_PROPS,\n MENU_ITEM_TYPES,\n SIZES,\n STRATEGY,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\nimport \"./moredropdown.scss\";\n\nconst { Menu } = Dropdown;\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const tooltipProps = mergeRight(\n DEFAULT_TOOLTIP_PROPS,\n dropdownButtonProps.tooltipProps\n );\n\n const targetIcon = isVertical ? MenuVertical : MenuHorizontal;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <Tooltip {...tooltipProps}>\n <span>\n <Button\n disabled\n data-cy=\"more-dropdown-button\"\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"nui-dropdown-button\"\n icon={targetIcon}\n iconPosition=\"right\"\n size=\"medium\"\n style=\"text\"\n {...dropdownButtonProps}\n />\n </span>\n </Tooltip>\n );\n }\n\n return (\n <Dropdown\n autoWidth\n className=\"flex\"\n disabled={isDisabled}\n icon={targetIcon}\n buttonProps={{\n \"data-dropdown-button-style\": \"more-dropdown\",\n className: \"min-h-0 flex-shrink-0\",\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.moreDropdown.tooltip\"),\n position: \"top\",\n },\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n >\n <Menu>\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label)}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </Menu>\n </Dropdown>\n );\n};\n\nMoreDropdown.propTypes = {\n /*\n * This props will be passed to the target button of the dropdown.\n */\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n }),\n /*\n * Whether to show a MenuVertical icon. By default the icon will be MenuHorizontal.\n */\n isVertical: PropTypes.bool,\n /*\n * Whether the dropdown is disabled or not.\n */\n isDisabled: PropTypes.bool,\n /*\n * This props will be passed to the dropdown.\n */\n dropdownProps: PropTypes.shape({\n strategy: PropTypes.oneOf(Object.values(STRATEGY)),\n }),\n /*\n * This children will be rendered on top of the dropdown menu.\n */\n menuTopChildren: PropTypes.node,\n /*\n * This children will be rendered on bottom of the dropdown menu.\n */\n menuBottomChildren: PropTypes.node,\n /*\n * Menu items inside the dropdown. Each item needs to have a `label`, `onClick` and `key`.\n */\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["MENU_ITEM_TYPES","menuItem","divider","DEFAULT_TOOLTIP_PROPS","disabled","position","MenuItem","Dropdown","Menu","Submenu","_ref","label","key","menuItemProps","_objectWithoutProperties","_excluded","React","createElement","_extends","customTarget","Button","trigger","dropdownProps","menuItems","map","_ref2","_ref2$isVisible","isVisible","_excluded2","MoreDropdownMenuItem","Divider","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","_objectSpread","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_ref$menuItems","_useTranslation","useTranslation","t","tooltipProps","mergeRight","targetIcon","MenuVertical","MenuHorizontal","isDropdownDisabled","Tooltip","icon","iconPosition","size","style","autoWidth","className","buttonProps","content","hyphenate"],"mappings":";;;;;;;;;;;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAA;AACX,CAAC,CAAA;AAEM,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,QAAQ,EAAE,QAAA;AACZ,CAAC;;;;ACfD,IAAQC,UAAQ,GAAWC,QAAQ,CAA3BD,QAAQ;EAAEE,MAAI,GAAKD,QAAQ,CAAjBC,IAAI,CAAA;A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CAAAC,aAAA,CAACX,oBAAQ,EAAAY,QAAA,CAAA;MACPN,GAAG,EAAEA,GAAG,KAAA,IAAA,IAAHA,GAAG,KAAA,KAAA,CAAA,GAAHA,GAAG,GAAIsD,SAAS,CAACrD,aAAa,CAACF,KAAK,CAAA;KACrCE,EAAAA,aAAa,CAClB,CAAC,CAAA;AAEN,GAAC,CAAC,EACDiC,kBACG,CACE,CAAC,CAAA;AAEf;;;;"}
|
|
1
|
+
{"version":3,"file":"MoreDropdown.js","sources":["../src/components/MoreDropdown/constants.js","../src/components/MoreDropdown/Submenu.jsx","../src/components/MoreDropdown/MenuItem.jsx","../src/components/MoreDropdown/index.jsx"],"sourcesContent":["export const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n tertiary: \"tertiary\",\n danger: \"danger\",\n danger_text: \"danger-text\",\n text: \"text\",\n link: \"link\",\n};\n\nexport const SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nexport const STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nexport const MENU_ITEM_TYPES = {\n menuItem: \"menuItem\",\n divider: \"divider\",\n};\n\nexport const DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n};\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport MoreDropdownMenuItem from \"./MenuItem\";\n\nconst { MenuItem, Menu } = Dropdown;\n\nconst Submenu = ({ label, key, ...menuItemProps }) => (\n <Dropdown\n customTarget={<MenuItem.Button>{label}</MenuItem.Button>}\n key={key}\n position=\"left\"\n trigger=\"hover\"\n {...menuItemProps.dropdownProps}\n >\n <Menu>\n {menuItemProps.menuItems.map(\n ({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return <MoreDropdownMenuItem key={key} {...menuItemProps} />;\n }\n )}\n </Menu>\n </Dropdown>\n);\n\nexport default Submenu;\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport { MENU_ITEM_TYPES } from \"./constants\";\nimport Submenu from \"./Submenu\";\n\nconst { MenuItem, Divider } = Dropdown;\n\nconst MoreDropdownMenuItem = ({\n onClick,\n label,\n type = MENU_ITEM_TYPES.menuItem,\n hasSubItems = false,\n ...menuItemProps\n}) => {\n if (type === MENU_ITEM_TYPES.divider) {\n return <Divider />;\n }\n\n if (hasSubItems) {\n return <Submenu {...{ label, ...menuItemProps }} />;\n }\n\n return (\n <MenuItem.Button {...{ onClick, ...menuItemProps }}>\n {label}\n </MenuItem.Button>\n );\n};\n\nexport default MoreDropdownMenuItem;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { MenuHorizontal, MenuVertical } from \"neetoicons\";\nimport { Button, Dropdown, Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n BUTTON_STYLES,\n DEFAULT_TOOLTIP_PROPS,\n MENU_ITEM_TYPES,\n SIZES,\n STRATEGY,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\nimport \"./moredropdown.scss\";\n\nconst { Menu } = Dropdown;\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const { isRounded: isRoundedButton, ...buttonProps } = dropdownButtonProps;\n\n const tooltipProps = mergeRight(\n DEFAULT_TOOLTIP_PROPS,\n dropdownButtonProps.tooltipProps\n );\n\n const targetIcon = isVertical ? MenuVertical : MenuHorizontal;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <Tooltip {...tooltipProps}>\n <span>\n <Button\n disabled\n data-cy=\"more-dropdown-button\"\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"nui-dropdown-button\"\n icon={targetIcon}\n iconPosition=\"right\"\n size=\"medium\"\n style=\"text\"\n className={classnames({\n \"neeto-molecule-moredropdown--rounded\": isRoundedButton,\n })}\n {...buttonProps}\n />\n </span>\n </Tooltip>\n );\n }\n\n return (\n <Dropdown\n autoWidth\n className=\"flex\"\n disabled={isDisabled}\n icon={targetIcon}\n buttonProps={{\n \"data-dropdown-button-style\": \"more-dropdown\",\n className: classnames(\"min-h-0 flex-shrink-0\", {\n \"neeto-molecule-moredropdown--rounded\": isRoundedButton,\n }),\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.moreDropdown.tooltip\"),\n position: \"top\",\n },\n ...buttonProps,\n }}\n {...dropdownProps}\n >\n <Menu>\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label)}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </Menu>\n </Dropdown>\n );\n};\n\nMoreDropdown.propTypes = {\n /*\n * This props will be passed to the target button of the dropdown.\n */\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n isRounded: PropTypes.bool,\n }),\n /*\n * Whether to show a MenuVertical icon. By default the icon will be MenuHorizontal.\n */\n isVertical: PropTypes.bool,\n /*\n * Whether the dropdown is disabled or not.\n */\n isDisabled: PropTypes.bool,\n /*\n * This props will be passed to the dropdown.\n */\n dropdownProps: PropTypes.shape({\n strategy: PropTypes.oneOf(Object.values(STRATEGY)),\n }),\n /*\n * This children will be rendered on top of the dropdown menu.\n */\n menuTopChildren: PropTypes.node,\n /*\n * This children will be rendered on bottom of the dropdown menu.\n */\n menuBottomChildren: PropTypes.node,\n /*\n * Menu items inside the dropdown. Each item needs to have a `label`, `onClick` and `key`.\n */\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["MENU_ITEM_TYPES","menuItem","divider","DEFAULT_TOOLTIP_PROPS","disabled","position","MenuItem","Dropdown","Menu","Submenu","_ref","label","key","menuItemProps","_objectWithoutProperties","_excluded","React","createElement","_extends","customTarget","Button","trigger","dropdownProps","menuItems","map","_ref2","_ref2$isVisible","isVisible","_excluded2","MoreDropdownMenuItem","Divider","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","_objectSpread","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_ref$menuItems","_useTranslation","useTranslation","t","isRoundedButton","isRounded","buttonProps","tooltipProps","mergeRight","targetIcon","MenuVertical","MenuHorizontal","isDropdownDisabled","Tooltip","icon","iconPosition","size","style","className","classnames","autoWidth","content","hyphenate"],"mappings":";;;;;;;;;;;;AAcO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAA;AACX,CAAC,CAAA;AAEM,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,QAAQ,EAAE,QAAA;AACZ,CAAC;;;;AChBD,IAAQC,UAAQ,GAAWC,QAAQ,CAA3BD,QAAQ;EAAEE,MAAI,GAAKD,QAAQ,CAAjBC,IAAI,CAAA;AAEtB,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,GAAG,GAAAF,IAAA,CAAHE,GAAG;AAAKC,IAAAA,aAAa,GAA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AW,KAAA,EAAAG,UAAA,CAAA,CAAA;AACvD,IAAA,IAAI,CAACD,SAAS,EAAE,OAAO,IAAI,CAAA;AAE3B,IAAA,oBACEX,cAAA,CAAAC,aAAA,CAACX,oBAAQ,EAAAY,QAAA,CAAA;MACPN,GAAG,EAAEA,GAAG,KAAA,IAAA,IAAHA,GAAG,KAAA,KAAA,CAAA,GAAHA,GAAG,GAAIyD,SAAS,CAACxD,aAAa,CAACF,KAAK,CAAA;KACrCE,EAAAA,aAAa,CAClB,CAAC,CAAA;AAEN,GAAC,CAAC,EACDiC,kBACG,CACE,CAAC,CAAA;AAEf;;;;"}
|
package/dist/Schedule.js
CHANGED
|
@@ -24,8 +24,8 @@ import { _ as _toConsumableArray } from './toConsumableArray-1cc38429.js';
|
|
|
24
24
|
import { Profile } from '@bigbinary/neeto-team-members-frontend';
|
|
25
25
|
import MoreDropdown from './MoreDropdown.js';
|
|
26
26
|
import { n } from './inject-css-c86de496.js';
|
|
27
|
-
import './objectWithoutProperties-a0edb288.js';
|
|
28
27
|
import './extends-093996c9.js';
|
|
28
|
+
import './objectWithoutProperties-a0edb288.js';
|
|
29
29
|
|
|
30
30
|
var DAYS = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
31
31
|
var DEFAULT_SLOT_INTERVAL = 30;
|
package/dist/cjs/CustomDomain.js
CHANGED
|
@@ -8,7 +8,7 @@ var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
|
8
8
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
9
9
|
var neetoui = require('@bigbinary/neetoui');
|
|
10
10
|
var reactI18next = require('react-i18next');
|
|
11
|
-
var index = require('./index-
|
|
11
|
+
var index = require('./index-35629600.js');
|
|
12
12
|
var MoreDropdown = require('./MoreDropdown.js');
|
|
13
13
|
require('formik');
|
|
14
14
|
require('@bigbinary/neeto-hotkeys');
|
|
@@ -9,7 +9,7 @@ var reactI18next = require('react-i18next');
|
|
|
9
9
|
var Container = require('./Container.js');
|
|
10
10
|
var PageLoader = require('./PageLoader.js');
|
|
11
11
|
var SubHeader = require('./SubHeader.js');
|
|
12
|
-
var index = require('./index-
|
|
12
|
+
var index = require('./index-35629600.js');
|
|
13
13
|
var _extends = require('./extends-1b35a664.js');
|
|
14
14
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
15
15
|
var withT = require('@bigbinary/neeto-commons-frontend/react-utils/withT');
|
package/dist/cjs/HelpPopover.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var defineProperty = require('./defineProperty-886ed289.js');
|
|
4
3
|
var _extends = require('./extends-1b35a664.js');
|
|
4
|
+
var defineProperty = require('./defineProperty-886ed289.js');
|
|
5
5
|
var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var classnames = require('classnames');
|
|
8
8
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
9
9
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
10
10
|
var neetoui = require('@bigbinary/neetoui');
|
|
11
|
+
var reactI18next = require('react-i18next');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
14
|
|
|
@@ -34,7 +35,8 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
34
35
|
_ref$icon = _ref.icon,
|
|
35
36
|
icon = _ref$icon === void 0 ? neetoIcons.Help : _ref$icon,
|
|
36
37
|
otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
var
|
|
38
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
39
|
+
t = _useTranslation.t;
|
|
38
40
|
var isCompact = neetoCist.isNotPresent(title) && neetoCist.isNotPresent(helpLinkProps);
|
|
39
41
|
var Icon = function Icon() {
|
|
40
42
|
var Component = icon;
|
|
@@ -43,14 +45,7 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
43
45
|
size: SIZE[size]
|
|
44
46
|
});
|
|
45
47
|
};
|
|
46
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
47
|
-
"data-cy": "help-popover-button",
|
|
48
|
-
"data-testid": "help-popover-button",
|
|
49
|
-
icon: Icon,
|
|
50
|
-
ref: helpIconRef,
|
|
51
|
-
style: "text",
|
|
52
|
-
className: classnames__default["default"]("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
|
|
53
|
-
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends._extends({
|
|
48
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends._extends({
|
|
54
49
|
appendTo: function appendTo() {
|
|
55
50
|
return document.body;
|
|
56
51
|
}
|
|
@@ -58,7 +53,6 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
58
53
|
interactive: true,
|
|
59
54
|
arrow: isCompact ? undefined : true,
|
|
60
55
|
className: classnames__default["default"](defineProperty._defineProperty({}, "neeto-ui-popover", !isCompact)),
|
|
61
|
-
reference: helpIconRef,
|
|
62
56
|
role: "tooltip",
|
|
63
57
|
theme: isCompact ? "dark" : "light",
|
|
64
58
|
content: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -74,13 +68,19 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
74
68
|
}, description) : description, helpLinkProps && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends._extends({
|
|
75
69
|
className: "neeto-ui-mt-3",
|
|
76
70
|
"data-cy": "help-popover-link-button",
|
|
77
|
-
label: "
|
|
71
|
+
label: t("neetoMolecules.common.viewHelpArticle"),
|
|
78
72
|
size: "small"
|
|
79
73
|
}, helpLinkProps, {
|
|
80
74
|
"data-testid": "help-popover-link-button",
|
|
81
75
|
style: "link",
|
|
82
76
|
target: "_blank"
|
|
83
77
|
})))
|
|
78
|
+
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends._extends({}, otherProps, {
|
|
79
|
+
"data-cy": "help-popover-button",
|
|
80
|
+
"data-testid": "help-popover-button",
|
|
81
|
+
icon: Icon,
|
|
82
|
+
style: "text",
|
|
83
|
+
className: classnames__default["default"]("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
|
|
84
84
|
})));
|
|
85
85
|
};
|
|
86
86
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPopover.js","sources":["../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import React
|
|
1
|
+
{"version":3,"file":"HelpPopover.js","sources":["../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"#1f1f1f\",\n icon = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n const Icon = () => {\n const Component = icon;\n\n return <Component color={iconColor} size={SIZE[size]} />;\n };\n\n return (\n <Tooltip\n appendTo={() => document.body}\n {...popoverProps}\n interactive\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n >\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={Icon}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n </Tooltip>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","isCompact","isNotPresent","Icon","Component","React","createElement","color","Tooltip","_extends","appendTo","document","body","interactive","arrow","undefined","classNames","_defineProperty","role","theme","content","Typography","lineHeight","style","Button","label","target"],"mappings":";;;;;;;;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AA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;AAClDf,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAA,EACRE,aAAa,EAAA;AACjB,MAAA,aAAA,EAAY,0BAA0B;AACtCoC,MAAAA,KAAK,EAAC,MAAM;AACZG,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,CAChB,CAEA,CAAA;GAGPrB,CAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAACkB,cAAM,EAAAf,iBAAA,KACDd,UAAU,EAAA;AACd,IAAA,SAAA,EAAQ,qBAAqB;AAC7B,IAAA,aAAA,EAAY,qBAAqB;AACjCF,IAAAA,IAAI,EAAEU,IAAK;AACXoB,IAAAA,KAAK,EAAC,MAAM;AACZlC,IAAAA,SAAS,EAAE2B,8BAAU,CACnB,8EAA8E,EAC9E3B,SACF,CAAA;AAAE,GAAA,CACH,CACM,CAAC,CAAA;AAEd;;;;"}
|
package/dist/cjs/MoreDropdown.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
|
|
4
3
|
var defineProperty = require('./defineProperty-886ed289.js');
|
|
5
4
|
var _extends = require('./extends-1b35a664.js');
|
|
5
|
+
var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var classnames = require('classnames');
|
|
7
8
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
9
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
9
10
|
var neetoui = require('@bigbinary/neetoui');
|
|
@@ -14,6 +15,7 @@ var injectCss = require('./inject-css-80a5faa3.js');
|
|
|
14
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
16
|
|
|
16
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
|
+
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
17
19
|
|
|
18
20
|
var MENU_ITEM_TYPES = {
|
|
19
21
|
menuItem: "menuItem",
|
|
@@ -25,7 +27,7 @@ var DEFAULT_TOOLTIP_PROPS = {
|
|
|
25
27
|
};
|
|
26
28
|
|
|
27
29
|
var _excluded$2 = ["label", "key"],
|
|
28
|
-
_excluded2 = ["isVisible", "key"];
|
|
30
|
+
_excluded2$1 = ["isVisible", "key"];
|
|
29
31
|
var MenuItem$1 = neetoui.Dropdown.MenuItem,
|
|
30
32
|
Menu$1 = neetoui.Dropdown.Menu;
|
|
31
33
|
var Submenu = function Submenu(_ref) {
|
|
@@ -41,7 +43,7 @@ var Submenu = function Submenu(_ref) {
|
|
|
41
43
|
var _ref2$isVisible = _ref2.isVisible,
|
|
42
44
|
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
43
45
|
key = _ref2.key,
|
|
44
|
-
menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2);
|
|
46
|
+
menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2$1);
|
|
45
47
|
if (!isVisible) return null;
|
|
46
48
|
return /*#__PURE__*/React__default["default"].createElement(MoreDropdownMenuItem, _extends._extends({
|
|
47
49
|
key: key
|
|
@@ -75,10 +77,11 @@ var MoreDropdownMenuItem = function MoreDropdownMenuItem(_ref) {
|
|
|
75
77
|
}, menuItemProps), label);
|
|
76
78
|
};
|
|
77
79
|
|
|
78
|
-
var css = ".neeto-ui-btn.neeto-ui-btn--icon-only[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:20px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:28px;justify-content:center;width:28px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:24px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:32px;justify-content:center;width:32px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:30px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:40px;justify-content:center;width:40px}";
|
|
80
|
+
var css = ".neeto-ui-btn.neeto-ui-btn--icon-only[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:20px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:28px;justify-content:center;width:28px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:24px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:32px;justify-content:center;width:32px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:30px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:40px;justify-content:center;width:40px}.neeto-ui-btn.neeto-molecule-moredropdown--rounded[data-dropdown-button-style=more-dropdown]{border-radius:100%}";
|
|
79
81
|
injectCss.n(css,{});
|
|
80
82
|
|
|
81
|
-
var _excluded = ["
|
|
83
|
+
var _excluded = ["isRounded"],
|
|
84
|
+
_excluded2 = ["isVisible", "key"];
|
|
82
85
|
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; }
|
|
83
86
|
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._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; }
|
|
84
87
|
var Menu = neetoui.Dropdown.Menu;
|
|
@@ -97,6 +100,8 @@ var MoreDropdown = function MoreDropdown(_ref) {
|
|
|
97
100
|
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
98
101
|
var _useTranslation = reactI18next.useTranslation(),
|
|
99
102
|
t = _useTranslation.t;
|
|
103
|
+
var isRoundedButton = dropdownButtonProps.isRounded,
|
|
104
|
+
buttonProps = objectWithoutProperties._objectWithoutProperties(dropdownButtonProps, _excluded);
|
|
100
105
|
var tooltipProps = ramda.mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
|
|
101
106
|
var targetIcon = isVertical ? neetoIcons.MenuVertical : neetoIcons.MenuHorizontal;
|
|
102
107
|
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
@@ -109,8 +114,11 @@ var MoreDropdown = function MoreDropdown(_ref) {
|
|
|
109
114
|
icon: targetIcon,
|
|
110
115
|
iconPosition: "right",
|
|
111
116
|
size: "medium",
|
|
112
|
-
style: "text"
|
|
113
|
-
|
|
117
|
+
style: "text",
|
|
118
|
+
className: classnames__default["default"]({
|
|
119
|
+
"neeto-molecule-moredropdown--rounded": isRoundedButton
|
|
120
|
+
})
|
|
121
|
+
}, buttonProps))));
|
|
114
122
|
}
|
|
115
123
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends._extends({
|
|
116
124
|
autoWidth: true,
|
|
@@ -119,18 +127,20 @@ var MoreDropdown = function MoreDropdown(_ref) {
|
|
|
119
127
|
icon: targetIcon,
|
|
120
128
|
buttonProps: _objectSpread({
|
|
121
129
|
"data-dropdown-button-style": "more-dropdown",
|
|
122
|
-
className: "min-h-0 flex-shrink-0",
|
|
130
|
+
className: classnames__default["default"]("min-h-0 flex-shrink-0", {
|
|
131
|
+
"neeto-molecule-moredropdown--rounded": isRoundedButton
|
|
132
|
+
}),
|
|
123
133
|
style: "text",
|
|
124
134
|
tooltipProps: {
|
|
125
135
|
content: t("neetoMolecules.moreDropdown.tooltip"),
|
|
126
136
|
position: "top"
|
|
127
137
|
}
|
|
128
|
-
},
|
|
138
|
+
}, buttonProps)
|
|
129
139
|
}, dropdownProps), /*#__PURE__*/React__default["default"].createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
|
|
130
140
|
var _ref2$isVisible = _ref2.isVisible,
|
|
131
141
|
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
132
142
|
key = _ref2.key,
|
|
133
|
-
menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2,
|
|
143
|
+
menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2);
|
|
134
144
|
if (!isVisible) return null;
|
|
135
145
|
return /*#__PURE__*/React__default["default"].createElement(MoreDropdownMenuItem, _extends._extends({
|
|
136
146
|
key: key !== null && key !== void 0 ? key : neetoCist.hyphenate(menuItemProps.label)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoreDropdown.js","sources":["../../src/components/MoreDropdown/constants.js","../../src/components/MoreDropdown/Submenu.jsx","../../src/components/MoreDropdown/MenuItem.jsx","../../src/components/MoreDropdown/index.jsx"],"sourcesContent":["export const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n danger: \"danger\",\n danger_text: \"danger-text\",\n text: \"text\",\n link: \"link\",\n};\n\nexport const SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nexport const STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nexport const MENU_ITEM_TYPES = {\n menuItem: \"menuItem\",\n divider: \"divider\",\n};\n\nexport const DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n};\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport MoreDropdownMenuItem from \"./MenuItem\";\n\nconst { MenuItem, Menu } = Dropdown;\n\nconst Submenu = ({ label, key, ...menuItemProps }) => (\n <Dropdown\n customTarget={<MenuItem.Button>{label}</MenuItem.Button>}\n key={key}\n position=\"left\"\n trigger=\"hover\"\n {...menuItemProps.dropdownProps}\n >\n <Menu>\n {menuItemProps.menuItems.map(\n ({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return <MoreDropdownMenuItem key={key} {...menuItemProps} />;\n }\n )}\n </Menu>\n </Dropdown>\n);\n\nexport default Submenu;\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport { MENU_ITEM_TYPES } from \"./constants\";\nimport Submenu from \"./Submenu\";\n\nconst { MenuItem, Divider } = Dropdown;\n\nconst MoreDropdownMenuItem = ({\n onClick,\n label,\n type = MENU_ITEM_TYPES.menuItem,\n hasSubItems = false,\n ...menuItemProps\n}) => {\n if (type === MENU_ITEM_TYPES.divider) {\n return <Divider />;\n }\n\n if (hasSubItems) {\n return <Submenu {...{ label, ...menuItemProps }} />;\n }\n\n return (\n <MenuItem.Button {...{ onClick, ...menuItemProps }}>\n {label}\n </MenuItem.Button>\n );\n};\n\nexport default MoreDropdownMenuItem;\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { MenuHorizontal, MenuVertical } from \"neetoicons\";\nimport { Button, Dropdown, Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n BUTTON_STYLES,\n DEFAULT_TOOLTIP_PROPS,\n MENU_ITEM_TYPES,\n SIZES,\n STRATEGY,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\nimport \"./moredropdown.scss\";\n\nconst { Menu } = Dropdown;\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const tooltipProps = mergeRight(\n DEFAULT_TOOLTIP_PROPS,\n dropdownButtonProps.tooltipProps\n );\n\n const targetIcon = isVertical ? MenuVertical : MenuHorizontal;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <Tooltip {...tooltipProps}>\n <span>\n <Button\n disabled\n data-cy=\"more-dropdown-button\"\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"nui-dropdown-button\"\n icon={targetIcon}\n iconPosition=\"right\"\n size=\"medium\"\n style=\"text\"\n {...dropdownButtonProps}\n />\n </span>\n </Tooltip>\n );\n }\n\n return (\n <Dropdown\n autoWidth\n className=\"flex\"\n disabled={isDisabled}\n icon={targetIcon}\n buttonProps={{\n \"data-dropdown-button-style\": \"more-dropdown\",\n className: \"min-h-0 flex-shrink-0\",\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.moreDropdown.tooltip\"),\n position: \"top\",\n },\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n >\n <Menu>\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label)}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </Menu>\n </Dropdown>\n );\n};\n\nMoreDropdown.propTypes = {\n /*\n * This props will be passed to the target button of the dropdown.\n */\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n }),\n /*\n * Whether to show a MenuVertical icon. By default the icon will be MenuHorizontal.\n */\n isVertical: PropTypes.bool,\n /*\n * Whether the dropdown is disabled or not.\n */\n isDisabled: PropTypes.bool,\n /*\n * This props will be passed to the dropdown.\n */\n dropdownProps: PropTypes.shape({\n strategy: PropTypes.oneOf(Object.values(STRATEGY)),\n }),\n /*\n * This children will be rendered on top of the dropdown menu.\n */\n menuTopChildren: PropTypes.node,\n /*\n * This children will be rendered on bottom of the dropdown menu.\n */\n menuBottomChildren: PropTypes.node,\n /*\n * Menu items inside the dropdown. Each item needs to have a `label`, `onClick` and `key`.\n */\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["MENU_ITEM_TYPES","menuItem","divider","DEFAULT_TOOLTIP_PROPS","disabled","position","MenuItem","Dropdown","Menu","Submenu","_ref","label","key","menuItemProps","_objectWithoutProperties","_excluded","React","createElement","_extends","customTarget","Button","trigger","dropdownProps","menuItems","map","_ref2","_ref2$isVisible","isVisible","_excluded2","MoreDropdownMenuItem","Divider","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","_objectSpread","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_ref$menuItems","_useTranslation","useTranslation","t","tooltipProps","mergeRight","targetIcon","MenuVertical","MenuHorizontal","isDropdownDisabled","Tooltip","icon","iconPosition","size","style","autoWidth","className","buttonProps","content","hyphenate"],"mappings":";;;;;;;;;;;;;;;;;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EA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AA,GAAAD,KAAA,CAA9CE,SAAS;AAATA,MAAAA,SAAS,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;MAAEd,GAAG,GAAAa,KAAA,CAAHb,GAAG;AAAKC,MAAAA,aAAa,GAAAC,gDAAA,CAAAW,KAAA,EAAAV,SAAA,CAAA,CAAA;AACvD,IAAA,IAAI,CAACY,SAAS,EAAE,OAAO,IAAI,CAAA;AAE3B,IAAA,oBACEX,yBAAA,CAAAC,aAAA,CAACX,oBAAQ,EAAAY,iBAAA,CAAA;MACPN,GAAG,EAAEA,GAAG,KAAA,IAAA,IAAHA,GAAG,KAAA,KAAA,CAAA,GAAHA,GAAG,GAAIsD,mBAAS,CAACrD,aAAa,CAACF,KAAK,CAAA;KACrCE,EAAAA,aAAa,CAClB,CAAC,CAAA;AAEN,GAAC,CAAC,EACDiC,kBACG,CACE,CAAC,CAAA;AAEf;;;;"}
|
|
1
|
+
{"version":3,"file":"MoreDropdown.js","sources":["../../src/components/MoreDropdown/constants.js","../../src/components/MoreDropdown/Submenu.jsx","../../src/components/MoreDropdown/MenuItem.jsx","../../src/components/MoreDropdown/index.jsx"],"sourcesContent":["export const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n tertiary: \"tertiary\",\n danger: \"danger\",\n danger_text: \"danger-text\",\n text: \"text\",\n link: \"link\",\n};\n\nexport const SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nexport const STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nexport const MENU_ITEM_TYPES = {\n menuItem: \"menuItem\",\n divider: \"divider\",\n};\n\nexport const DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n};\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport MoreDropdownMenuItem from \"./MenuItem\";\n\nconst { MenuItem, Menu } = Dropdown;\n\nconst Submenu = ({ label, key, ...menuItemProps }) => (\n <Dropdown\n customTarget={<MenuItem.Button>{label}</MenuItem.Button>}\n key={key}\n position=\"left\"\n trigger=\"hover\"\n {...menuItemProps.dropdownProps}\n >\n <Menu>\n {menuItemProps.menuItems.map(\n ({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return <MoreDropdownMenuItem key={key} {...menuItemProps} />;\n }\n )}\n </Menu>\n </Dropdown>\n);\n\nexport default Submenu;\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport { MENU_ITEM_TYPES } from \"./constants\";\nimport Submenu from \"./Submenu\";\n\nconst { MenuItem, Divider } = Dropdown;\n\nconst MoreDropdownMenuItem = ({\n onClick,\n label,\n type = MENU_ITEM_TYPES.menuItem,\n hasSubItems = false,\n ...menuItemProps\n}) => {\n if (type === MENU_ITEM_TYPES.divider) {\n return <Divider />;\n }\n\n if (hasSubItems) {\n return <Submenu {...{ label, ...menuItemProps }} />;\n }\n\n return (\n <MenuItem.Button {...{ onClick, ...menuItemProps }}>\n {label}\n </MenuItem.Button>\n );\n};\n\nexport default MoreDropdownMenuItem;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { MenuHorizontal, MenuVertical } from \"neetoicons\";\nimport { Button, Dropdown, Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n BUTTON_STYLES,\n DEFAULT_TOOLTIP_PROPS,\n MENU_ITEM_TYPES,\n SIZES,\n STRATEGY,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\nimport \"./moredropdown.scss\";\n\nconst { Menu } = Dropdown;\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const { isRounded: isRoundedButton, ...buttonProps } = dropdownButtonProps;\n\n const tooltipProps = mergeRight(\n DEFAULT_TOOLTIP_PROPS,\n dropdownButtonProps.tooltipProps\n );\n\n const targetIcon = isVertical ? MenuVertical : MenuHorizontal;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <Tooltip {...tooltipProps}>\n <span>\n <Button\n disabled\n data-cy=\"more-dropdown-button\"\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"nui-dropdown-button\"\n icon={targetIcon}\n iconPosition=\"right\"\n size=\"medium\"\n style=\"text\"\n className={classnames({\n \"neeto-molecule-moredropdown--rounded\": isRoundedButton,\n })}\n {...buttonProps}\n />\n </span>\n </Tooltip>\n );\n }\n\n return (\n <Dropdown\n autoWidth\n className=\"flex\"\n disabled={isDisabled}\n icon={targetIcon}\n buttonProps={{\n \"data-dropdown-button-style\": \"more-dropdown\",\n className: classnames(\"min-h-0 flex-shrink-0\", {\n \"neeto-molecule-moredropdown--rounded\": isRoundedButton,\n }),\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.moreDropdown.tooltip\"),\n position: \"top\",\n },\n ...buttonProps,\n }}\n {...dropdownProps}\n >\n <Menu>\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label)}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </Menu>\n </Dropdown>\n );\n};\n\nMoreDropdown.propTypes = {\n /*\n * This props will be passed to the target button of the dropdown.\n */\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n isRounded: PropTypes.bool,\n }),\n /*\n * Whether to show a MenuVertical icon. By default the icon will be MenuHorizontal.\n */\n isVertical: PropTypes.bool,\n /*\n * Whether the dropdown is disabled or not.\n */\n isDisabled: PropTypes.bool,\n /*\n * This props will be passed to the dropdown.\n */\n dropdownProps: PropTypes.shape({\n strategy: PropTypes.oneOf(Object.values(STRATEGY)),\n }),\n /*\n * This children will be rendered on top of the dropdown menu.\n */\n menuTopChildren: PropTypes.node,\n /*\n * This children will be rendered on bottom of the dropdown menu.\n */\n menuBottomChildren: PropTypes.node,\n /*\n * Menu items inside the dropdown. Each item needs to have a `label`, `onClick` and `key`.\n */\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["MENU_ITEM_TYPES","menuItem","divider","DEFAULT_TOOLTIP_PROPS","disabled","position","MenuItem","Dropdown","Menu","Submenu","_ref","label","key","menuItemProps","_objectWithoutProperties","_excluded","React","createElement","_extends","customTarget","Button","trigger","dropdownProps","menuItems","map","_ref2","_ref2$isVisible","isVisible","_excluded2","MoreDropdownMenuItem","Divider","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","_objectSpread","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_ref$menuItems","_useTranslation","useTranslation","t","isRoundedButton","isRounded","buttonProps","tooltipProps","mergeRight","targetIcon","MenuVertical","MenuHorizontal","isDropdownDisabled","Tooltip","icon","iconPosition","size","style","className","classnames","autoWidth","content","hyphenate"],"mappings":";;;;;;;;;;;;;;;;;;;AAcO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAA;AACX,CAAC,CAAA;AAEM,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,QAAQ,EAAE,IAAI;AACd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d,GAAA,EACE/B,aAAa,CAEjBN,eAAAA,yBAAA,CAAAC,aAAA,CAACT,IAAI,EAAA,IAAA,EACFqC,eAAe,EACftB,SAAS,CAACC,GAAG,CAAC,UAAAC,KAAA,EAAiD;AAAA,IAAA,IAAAC,eAAA,GAAAD,KAAA,CAA9CE,SAAS;AAATA,MAAAA,SAAS,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;MAAEd,GAAG,GAAAa,KAAA,CAAHb,GAAG;AAAKC,MAAAA,aAAa,GAAAC,gDAAA,CAAAW,KAAA,EAAAG,UAAA,CAAA,CAAA;AACvD,IAAA,IAAI,CAACD,SAAS,EAAE,OAAO,IAAI,CAAA;AAE3B,IAAA,oBACEX,yBAAA,CAAAC,aAAA,CAACX,oBAAQ,EAAAY,iBAAA,CAAA;MACPN,GAAG,EAAEA,GAAG,KAAA,IAAA,IAAHA,GAAG,KAAA,KAAA,CAAA,GAAHA,GAAG,GAAIyD,mBAAS,CAACxD,aAAa,CAACF,KAAK,CAAA;KACrCE,EAAAA,aAAa,CAClB,CAAC,CAAA;AAEN,GAAC,CAAC,EACDiC,kBACG,CACE,CAAC,CAAA;AAEf;;;;"}
|
package/dist/cjs/Schedule.js
CHANGED
|
@@ -26,8 +26,8 @@ var toConsumableArray = require('./toConsumableArray-9abb3858.js');
|
|
|
26
26
|
var neetoTeamMembersFrontend = require('@bigbinary/neeto-team-members-frontend');
|
|
27
27
|
var MoreDropdown = require('./MoreDropdown.js');
|
|
28
28
|
var injectCss = require('./inject-css-80a5faa3.js');
|
|
29
|
-
require('./objectWithoutProperties-2fed2d7d.js');
|
|
30
29
|
require('./extends-1b35a664.js');
|
|
30
|
+
require('./objectWithoutProperties-2fed2d7d.js');
|
|
31
31
|
|
|
32
32
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
33
33
|
|