@bigbinary/neeto-molecules 4.1.70 → 4.1.71
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/{Columns-lnb4eO0H.js → Columns-DpeV3Jzz.js} +84 -77
- package/dist/Columns-DpeV3Jzz.js.map +1 -0
- package/dist/cjs/{Columns-CKKEXExE.js → Columns-C2ke8N58.js} +84 -77
- package/dist/cjs/Columns-C2ke8N58.js.map +1 -0
- package/dist/cjs/v2/Columns.js +2 -1
- package/dist/cjs/v2/Columns.js.map +1 -1
- package/dist/cjs/v2/Header.js +33 -40
- package/dist/cjs/v2/Header.js.map +1 -1
- package/dist/cjs/v2/LoginPage.js +5 -21
- package/dist/cjs/v2/LoginPage.js.map +1 -1
- package/dist/cjs/v2/MoreDropdown.js +11 -22
- package/dist/cjs/v2/MoreDropdown.js.map +1 -1
- package/dist/cjs/v2/Settings.js +16 -25
- package/dist/cjs/v2/Settings.js.map +1 -1
- package/dist/cjs/v2/SubHeader.js +56 -44
- package/dist/cjs/v2/SubHeader.js.map +1 -1
- package/dist/v2/Columns.js +2 -1
- package/dist/v2/Columns.js.map +1 -1
- package/dist/v2/Header.js +33 -40
- package/dist/v2/Header.js.map +1 -1
- package/dist/v2/LoginPage.js +5 -21
- package/dist/v2/LoginPage.js.map +1 -1
- package/dist/v2/MoreDropdown.js +11 -22
- package/dist/v2/MoreDropdown.js.map +1 -1
- package/dist/v2/Settings.js +16 -25
- package/dist/v2/Settings.js.map +1 -1
- package/dist/v2/SubHeader.js +58 -46
- package/dist/v2/SubHeader.js.map +1 -1
- package/package.json +3 -3
- package/dist/Columns-lnb4eO0H.js.map +0 -1
- package/dist/cjs/Columns-CKKEXExE.js.map +0 -1
package/dist/cjs/v2/Settings.js
CHANGED
|
@@ -67,29 +67,23 @@ var IntegrationItem$1 = function IntegrationItem(_ref) {
|
|
|
67
67
|
})
|
|
68
68
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
69
69
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
70
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
71
|
-
|
|
70
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Typography, {
|
|
71
|
+
className: "flex flex-wrap items-center gap-2",
|
|
72
|
+
"data-settings-heading": "",
|
|
73
|
+
"data-testid": "settings-item-heading",
|
|
72
74
|
variant: "h5",
|
|
73
75
|
weight: "semibold",
|
|
74
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
75
|
-
"data-
|
|
76
|
-
|
|
77
|
-
children:
|
|
78
|
-
})
|
|
76
|
+
children: [label, isConnected && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
77
|
+
"data-testid": "integration-status-tag",
|
|
78
|
+
variant: "green",
|
|
79
|
+
children: t("neetoMolecules.integrationCard.connected")
|
|
80
|
+
})]
|
|
79
81
|
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
80
|
-
|
|
82
|
+
className: "text-muted-foreground",
|
|
83
|
+
"data-testid": "settings-item-description",
|
|
81
84
|
variant: "body2",
|
|
82
|
-
children:
|
|
83
|
-
className: "text-muted-foreground",
|
|
84
|
-
"data-testid": "settings-item-description",
|
|
85
|
-
children: description
|
|
86
|
-
})
|
|
85
|
+
children: description
|
|
87
86
|
})]
|
|
88
|
-
}), isConnected && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
89
|
-
className: "absolute top-2 right-2",
|
|
90
|
-
"data-testid": "integration-status-tag",
|
|
91
|
-
variant: "default",
|
|
92
|
-
children: t("neetoMolecules.integrationCard.connected")
|
|
93
87
|
})]
|
|
94
88
|
}));
|
|
95
89
|
};
|
|
@@ -139,13 +133,10 @@ var Item$1 = function Item(_ref) {
|
|
|
139
133
|
})
|
|
140
134
|
})]
|
|
141
135
|
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
142
|
-
|
|
136
|
+
className: "text-muted-foreground",
|
|
137
|
+
"data-testid": "settings-item-description",
|
|
143
138
|
variant: "body2",
|
|
144
|
-
children:
|
|
145
|
-
className: "text-muted-foreground",
|
|
146
|
-
"data-testid": "settings-item-description",
|
|
147
|
-
children: description
|
|
148
|
-
})
|
|
139
|
+
children: description
|
|
149
140
|
})]
|
|
150
141
|
}), children && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
151
142
|
className: "border-border border-t pt-3",
|
|
@@ -177,7 +168,7 @@ var Category = function Category(_ref) {
|
|
|
177
168
|
variant: "h4",
|
|
178
169
|
weight: "semibold",
|
|
179
170
|
children: /*#__PURE__*/jsxRuntime.jsx("h2", {
|
|
180
|
-
className: "mt-2 mb-
|
|
171
|
+
className: "mt-2 mb-4",
|
|
181
172
|
"data-testid": "settings-category-heading",
|
|
182
173
|
children: label
|
|
183
174
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.js","sources":["../../../src/v2/components/Settings/constants.js","../../../src/v2/components/Settings/IntegrationItem.jsx","../../../src/v2/components/Settings/Item.jsx","../../../src/v2/components/Settings/Category.jsx","../../../src/v2/components/Settings/utils.js","../../../src/v2/components/Settings/index.jsx"],"sourcesContent":["export const UNSUPPORTED_LINK_PROPS = [\"staticContext\", \"tReady\"];\n","import { memo } from \"react\";\n\nimport { Badge, Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst IntegrationItem = ({\n icon: Icon = null,\n description,\n label,\n path,\n href,\n isConnected,\n isMobileOrTablet = false,\n className = \"\",\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const commonProps = {\n \"data-testid\": `${hyphenate(label).replace(/\\./g, \"-\")}-integration-card`,\n className: classnames(\n \"relative flex cursor-pointer flex-col items-start gap-3 rounded-lg border border-border px-6 py-6 no-underline outline-none transition-shadow duration-300 ease-in-out md:py-8 lg:flex-row xl:gap-4\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n {Icon && (\n <div className=\"border-border mt-0.5 flex shrink-0 items-center justify-center rounded-lg border p-1.5 shadow-sm xl:p-2.5\">\n <Icon\n data-testid={`${joinHyphenCase(label)}-integration-icon`}\n size={isMobileOrTablet ? 26 : 32}\n />\n </div>\n )}\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Typography asChild variant=\"h5\" weight=\"semibold\">\n <span data-settings-heading=\"\" data-testid=\"settings-item-heading\">\n {label}\n </span>\n </Typography>\n <Typography asChild variant=\"body2\">\n <p\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n >\n {description}\n </p>\n </Typography>\n </div>\n {isConnected && (\n <Badge\n className=\"absolute top-2 right-2\"\n data-testid=\"integration-status-tag\"\n variant=\"default\"\n >\n {t(\"neetoMolecules.integrationCard.connected\")}\n </Badge>\n )}\n </LinkElement>\n );\n};\n\nIntegrationItem.propTypes = {\n /**\n * The icon component to display. Accepts lucide-react icons or brand logos.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * A description of the integration.\n */\n description: PropTypes.string,\n /**\n * The label text for the integration item.\n */\n label: PropTypes.string.isRequired,\n /**\n * The internal route path for the integration item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the integration item link.\n */\n href: PropTypes.string,\n /**\n * Whether the integration is currently connected.\n */\n isConnected: PropTypes.bool,\n /**\n * Whether the current viewport is mobile or tablet size.\n */\n isMobileOrTablet: PropTypes.bool,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n};\n\nexport default memo(IntegrationItem);\n","import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst Item = ({\n label,\n description,\n icon: Icon = null,\n path,\n href,\n dataTestid,\n className = \"\",\n children,\n ...otherProps\n}) => {\n const commonProps = {\n \"data-testid\": dataTestid,\n className: classnames(\n \"group flex cursor-pointer flex-col gap-y-4 rounded-lg border border-border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n <div data-testid={`settings-item-${joinHyphenCase(label)}`}>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && <Icon className=\"text-muted-foreground\" size={24} />}\n <Typography asChild variant=\"h5\" weight=\"semibold\">\n <span data-settings-heading=\"\" data-testid=\"settings-item-heading\">\n {label}\n </span>\n </Typography>\n </div>\n <Typography asChild variant=\"body2\">\n <p\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n >\n {description}\n </p>\n </Typography>\n </div>\n {children && (\n <div className=\"border-border border-t pt-3\">{children}</div>\n )}\n </LinkElement>\n );\n};\n\nItem.propTypes = {\n /**\n * The label text for the settings item.\n */\n label: PropTypes.string.isRequired,\n /**\n * A description of the settings item.\n */\n description: PropTypes.string,\n /**\n * The icon component to display. Accepts lucide-react icons.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * The internal route path for the settings item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the settings item link.\n */\n href: PropTypes.string,\n /**\n * A custom data-testid attribute for the link element.\n */\n dataTestid: PropTypes.string,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n /**\n * Optional children rendered below the description, separated by a border.\n */\n children: PropTypes.node,\n};\n\nexport default memo(Item);\n","import { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport { useBreakpoints } from \"neetocommons/react-utils\";\n\nimport IntegrationItem from \"./IntegrationItem\";\nimport Item from \"./Item\";\n\nconst Category = ({ items, label, id, isIntegration }) => {\n const { isSize } = useBreakpoints();\n const SettingsCard = isIntegration ? IntegrationItem : Item;\n const isMobileOrTablet = isSize(\"mobile\") || isSize(\"tablet\");\n\n const isLabelPresent = isPresent(label);\n\n return (\n <div\n {...{ id }}\n className={classnames(\"flex flex-col\", { \"mb-7\": isLabelPresent })}\n >\n {isLabelPresent && (\n <Typography asChild variant=\"h4\" weight=\"semibold\">\n <h2 className=\"mt-2 mb-6\" data-testid=\"settings-category-heading\">\n {label}\n </h2>\n </Typography>\n )}\n <div\n className={classnames(\n \"grid grid-cols-1 gap-3 py-1 md:grid-cols-2 lg:grid-cols-2 lg:gap-4\",\n {\n \"xl:grid-cols-2 2xl:grid-cols-3\": isIntegration,\n \"xl:grid-cols-3 2xl:grid-cols-4\": !isIntegration,\n }\n )}\n >\n {items.map(item => (\n <SettingsCard\n key={item.label}\n {...item}\n {...(isIntegration && { isMobileOrTablet })}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default Category;\n","import { filterBy, isNotEmpty } from \"neetocist\";\n\nconst isTextMatching = (label, searchTerm) =>\n label.toLowerCase().includes(searchTerm.trim().toLowerCase());\n\nexport const scrollIntoSettingCategory = activeCategory => {\n document.getElementById(activeCategory)?.scrollIntoView({\n behavior: \"smooth\",\n });\n};\n\nexport const filterCategories = ({ categories = [], searchTerm = \"\" }) => {\n const isSearchTermBlank = !searchTerm.trim();\n\n const filteredCategories = isSearchTermBlank\n ? categories\n : categories.map(category => ({\n ...category,\n items: filterBy(\n ({ label, description }) =>\n isTextMatching(label, searchTerm) ||\n isTextMatching(description, searchTerm),\n category.items\n ),\n }));\n\n return filterBy({ items: isNotEmpty }, filteredCategories);\n};\n","import { useEffect } from \"react\";\n\nimport classnames from \"classnames\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Category from \"./Category\";\nimport { filterCategories, scrollIntoSettingCategory } from \"./utils\";\n\nimport Header from \"../Header\";\n\nconst Settings = ({\n isTitleHidden = false,\n isSearchHidden = false,\n title,\n headerProps = {},\n categories = [],\n className = \"\",\n}) => {\n const { t } = useTranslation();\n\n const { category: categoryParam, searchTerm = \"\" } = useQueryParams();\n\n const filteredCategories = filterCategories({ categories, searchTerm });\n\n const isHeaderVisible = !isSearchHidden || !isTitleHidden;\n\n const headerTitle = title ?? t(\"neetoMolecules.settingsPage.title\");\n\n useEffect(() => {\n scrollIntoSettingCategory(categoryParam);\n }, [categoryParam]);\n\n return (\n <div\n className={classnames(\n \"flex h-dvh grow flex-col items-start justify-start overflow-y-auto px-5 md:px-10\",\n { \"h-auto overflow-y-auto\": isTitleHidden },\n className\n )}\n >\n {isHeaderVisible && (\n <Header\n className={classnames({ \"min-h-0 pt-8 pb-4\": isTitleHidden })}\n title={!isTitleHidden && headerTitle}\n searchProps={\n isSearchHidden\n ? null\n : {\n className: \"w-72\",\n placeholder: t(\n \"neetoMolecules.settingsPage.placeholder.search\"\n ),\n }\n }\n {...headerProps}\n />\n )}\n {isEmpty(filteredCategories) ? (\n <div\n className=\"flex h-full w-full flex-grow items-center justify-center\"\n data-testid=\"settings-no-data\"\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <p className=\"text-lg font-medium\">\n {t(\"neetoMolecules.settingsPage.noData\")}\n </p>\n </div>\n </div>\n ) : (\n <div className=\"w-full\">\n {filteredCategories.map(({ id, label, items, isIntegration }) => (\n <Category {...{ id, isIntegration, items, label }} key={id} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n /**\n * Whether to hide the title or not.\n */\n isTitleHidden: PropTypes.bool,\n /**\n * This can be used to customize the title.\n */\n title: PropTypes.string,\n /**\n * Whether to hide the search bar or not.\n */\n isSearchHidden: PropTypes.bool,\n /**\n * An array of setting categories to be displayed.\n */\n categories: PropTypes.array,\n /**\n * Additional classes to be added to the container.\n */\n className: PropTypes.string,\n /**\n * Props to be passed to the header component.\n */\n headerProps: PropTypes.object,\n};\n\nexport default Settings;\n"],"names":["UNSUPPORTED_LINK_PROPS","IntegrationItem","_ref","_ref$icon","icon","Icon","description","label","path","href","isConnected","_ref$isMobileOrTablet","isMobileOrTablet","_ref$className","className","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","commonProps","_objectSpread","concat","hyphenate","replace","classnames","omit","LinkElement","Link","linkProps","to","_jsxs","children","_jsx","joinHyphenCase","size","Typography","asChild","variant","weight","Badge","memo","Item","dataTestid","Category","items","id","isIntegration","_useBreakpoints","useBreakpoints","isSize","SettingsCard","isLabelPresent","isPresent","map","item","isTextMatching","searchTerm","toLowerCase","includes","trim","scrollIntoSettingCategory","activeCategory","_document$getElementB","document","getElementById","scrollIntoView","behavior","filterCategories","_ref$categories","categories","_ref$searchTerm","isSearchTermBlank","filteredCategories","category","filterBy","_ref2","isNotEmpty","Settings","_ref$isTitleHidden","isTitleHidden","_ref$isSearchHidden","isSearchHidden","title","_ref$headerProps","headerProps","_useQueryParams","useQueryParams","categoryParam","_useQueryParams$searc","isHeaderVisible","headerTitle","useEffect","Header","searchProps","placeholder","isEmpty","_createElement","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,sBAAsB,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC;;;;;ACajE,IAAMC,iBAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAUf;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CATJE,IAAI;AAAEC,IAAAA,IAAI,GAAAF,SAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,SAAA;IACjBG,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;IACJC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IAAAC,qBAAA,GAAAT,IAAA,CACXU,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAAE,cAAA,GAAAX,IAAA,CACxBY,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;AACXE,I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A,EAC/Bb,CAAC,CAAC,oCAAoC;SACtC;OACA;KACF,CAAC,gBAENc,cAAA,CAAA,KAAA,EAAA;AAAKpB,MAAAA,SAAS,EAAC,QAAQ;AAAAmB,MAAAA,QAAA,EACpByC,kBAAkB,CAACnB,GAAG,CAAC,UAAAsB,KAAA,EAAA;AAAA,QAAA,IAAG9B,EAAE,GAAA8B,KAAA,CAAF9B,EAAE;UAAExC,KAAK,GAAAsE,KAAA,CAALtE,KAAK;UAAEuC,KAAK,GAAA+B,KAAA,CAAL/B,KAAK;UAAEE,aAAa,GAAA6B,KAAA,CAAb7B,aAAa;QAAA,oBACxDkD,mBAAA,CAACrD,QAAQ,EAAA;AAAOE,UAAAA,EAAE,EAAFA,EAAE;AAAEC,UAAAA,aAAa,EAAbA,aAAa;AAAEF,UAAAA,KAAK,EAALA,KAAK;AAAEvC,UAAAA,KAAK,EAALA,KAAK;AAAI4F,UAAAA,GAAG,EAAEpD;AAAG,SAAE,CAAC;MAAA,CAC/D;AAAC,KACC,CACN;AAAA,GACE,CAAC;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"Settings.js","sources":["../../../src/v2/components/Settings/constants.js","../../../src/v2/components/Settings/IntegrationItem.jsx","../../../src/v2/components/Settings/Item.jsx","../../../src/v2/components/Settings/Category.jsx","../../../src/v2/components/Settings/utils.js","../../../src/v2/components/Settings/index.jsx"],"sourcesContent":["export const UNSUPPORTED_LINK_PROPS = [\"staticContext\", \"tReady\"];\n","import { memo } from \"react\";\n\nimport { Badge, Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst IntegrationItem = ({\n icon: Icon = null,\n description,\n label,\n path,\n href,\n isConnected,\n isMobileOrTablet = false,\n className = \"\",\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const commonProps = {\n \"data-testid\": `${hyphenate(label).replace(/\\./g, \"-\")}-integration-card`,\n className: classnames(\n \"relative flex cursor-pointer flex-col items-start gap-3 rounded-lg border border-border px-6 py-6 no-underline outline-none transition-shadow duration-300 ease-in-out md:py-8 lg:flex-row xl:gap-4\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n {Icon && (\n <div className=\"border-border mt-0.5 flex shrink-0 items-center justify-center rounded-lg border p-1.5 shadow-sm xl:p-2.5\">\n <Icon\n data-testid={`${joinHyphenCase(label)}-integration-icon`}\n size={isMobileOrTablet ? 26 : 32}\n />\n </div>\n )}\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Typography\n className=\"flex flex-wrap items-center gap-2\"\n data-settings-heading=\"\"\n data-testid=\"settings-item-heading\"\n variant=\"h5\"\n weight=\"semibold\"\n >\n {label}\n {isConnected && (\n <Badge data-testid=\"integration-status-tag\" variant=\"green\">\n {t(\"neetoMolecules.integrationCard.connected\")}\n </Badge>\n )}\n </Typography>\n <Typography\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n </div>\n </LinkElement>\n );\n};\n\nIntegrationItem.propTypes = {\n /**\n * The icon component to display. Accepts lucide-react icons or brand logos.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * A description of the integration.\n */\n description: PropTypes.string,\n /**\n * The label text for the integration item.\n */\n label: PropTypes.string.isRequired,\n /**\n * The internal route path for the integration item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the integration item link.\n */\n href: PropTypes.string,\n /**\n * Whether the integration is currently connected.\n */\n isConnected: PropTypes.bool,\n /**\n * Whether the current viewport is mobile or tablet size.\n */\n isMobileOrTablet: PropTypes.bool,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n};\n\nexport default memo(IntegrationItem);\n","import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst Item = ({\n label,\n description,\n icon: Icon = null,\n path,\n href,\n dataTestid,\n className = \"\",\n children,\n ...otherProps\n}) => {\n const commonProps = {\n \"data-testid\": dataTestid,\n className: classnames(\n \"group flex cursor-pointer flex-col gap-y-4 rounded-lg border border-border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n <div data-testid={`settings-item-${joinHyphenCase(label)}`}>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && <Icon className=\"text-muted-foreground\" size={24} />}\n <Typography asChild variant=\"h5\" weight=\"semibold\">\n <span data-settings-heading=\"\" data-testid=\"settings-item-heading\">\n {label}\n </span>\n </Typography>\n </div>\n <Typography\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n </div>\n {children && (\n <div className=\"border-border border-t pt-3\">{children}</div>\n )}\n </LinkElement>\n );\n};\n\nItem.propTypes = {\n /**\n * The label text for the settings item.\n */\n label: PropTypes.string.isRequired,\n /**\n * A description of the settings item.\n */\n description: PropTypes.string,\n /**\n * The icon component to display. Accepts lucide-react icons.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * The internal route path for the settings item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the settings item link.\n */\n href: PropTypes.string,\n /**\n * A custom data-testid attribute for the link element.\n */\n dataTestid: PropTypes.string,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n /**\n * Optional children rendered below the description, separated by a border.\n */\n children: PropTypes.node,\n};\n\nexport default memo(Item);\n","import { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport { useBreakpoints } from \"neetocommons/react-utils\";\n\nimport IntegrationItem from \"./IntegrationItem\";\nimport Item from \"./Item\";\n\nconst Category = ({ items, label, id, isIntegration }) => {\n const { isSize } = useBreakpoints();\n const SettingsCard = isIntegration ? IntegrationItem : Item;\n const isMobileOrTablet = isSize(\"mobile\") || isSize(\"tablet\");\n\n const isLabelPresent = isPresent(label);\n\n return (\n <div\n {...{ id }}\n className={classnames(\"flex flex-col\", { \"mb-7\": isLabelPresent })}\n >\n {isLabelPresent && (\n <Typography asChild variant=\"h4\" weight=\"semibold\">\n <h2 className=\"mt-2 mb-4\" data-testid=\"settings-category-heading\">\n {label}\n </h2>\n </Typography>\n )}\n <div\n className={classnames(\n \"grid grid-cols-1 gap-3 py-1 md:grid-cols-2 lg:grid-cols-2 lg:gap-4\",\n {\n \"xl:grid-cols-2 2xl:grid-cols-3\": isIntegration,\n \"xl:grid-cols-3 2xl:grid-cols-4\": !isIntegration,\n }\n )}\n >\n {items.map(item => (\n <SettingsCard\n key={item.label}\n {...item}\n {...(isIntegration && { isMobileOrTablet })}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default Category;\n","import { filterBy, isNotEmpty } from \"neetocist\";\n\nconst isTextMatching = (label, searchTerm) =>\n label.toLowerCase().includes(searchTerm.trim().toLowerCase());\n\nexport const scrollIntoSettingCategory = activeCategory => {\n document.getElementById(activeCategory)?.scrollIntoView({\n behavior: \"smooth\",\n });\n};\n\nexport const filterCategories = ({ categories = [], searchTerm = \"\" }) => {\n const isSearchTermBlank = !searchTerm.trim();\n\n const filteredCategories = isSearchTermBlank\n ? categories\n : categories.map(category => ({\n ...category,\n items: filterBy(\n ({ label, description }) =>\n isTextMatching(label, searchTerm) ||\n isTextMatching(description, searchTerm),\n category.items\n ),\n }));\n\n return filterBy({ items: isNotEmpty }, filteredCategories);\n};\n","import { useEffect } from \"react\";\n\nimport classnames from \"classnames\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Category from \"./Category\";\nimport { filterCategories, scrollIntoSettingCategory } from \"./utils\";\n\nimport Header from \"../Header\";\n\nconst Settings = ({\n isTitleHidden = false,\n isSearchHidden = false,\n title,\n headerProps = {},\n categories = [],\n className = \"\",\n}) => {\n const { t } = useTranslation();\n\n const { category: categoryParam, searchTerm = \"\" } = useQueryParams();\n\n const filteredCategories = filterCategories({ categories, searchTerm });\n\n const isHeaderVisible = !isSearchHidden || !isTitleHidden;\n\n const headerTitle = title ?? t(\"neetoMolecules.settingsPage.title\");\n\n useEffect(() => {\n scrollIntoSettingCategory(categoryParam);\n }, [categoryParam]);\n\n return (\n <div\n className={classnames(\n \"flex h-dvh grow flex-col items-start justify-start overflow-y-auto px-5 md:px-10\",\n { \"h-auto overflow-y-auto\": isTitleHidden },\n className\n )}\n >\n {isHeaderVisible && (\n <Header\n className={classnames({ \"min-h-0 pt-8 pb-4\": isTitleHidden })}\n title={!isTitleHidden && headerTitle}\n searchProps={\n isSearchHidden\n ? null\n : {\n className: \"w-72\",\n placeholder: t(\n \"neetoMolecules.settingsPage.placeholder.search\"\n ),\n }\n }\n {...headerProps}\n />\n )}\n {isEmpty(filteredCategories) ? (\n <div\n className=\"flex h-full w-full flex-grow items-center justify-center\"\n data-testid=\"settings-no-data\"\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <p className=\"text-lg font-medium\">\n {t(\"neetoMolecules.settingsPage.noData\")}\n </p>\n </div>\n </div>\n ) : (\n <div className=\"w-full\">\n {filteredCategories.map(({ id, label, items, isIntegration }) => (\n <Category {...{ id, isIntegration, items, label }} key={id} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n /**\n * Whether to hide the title or not.\n */\n isTitleHidden: PropTypes.bool,\n /**\n * This can be used to customize the title.\n */\n title: PropTypes.string,\n /**\n * Whether to hide the search bar or not.\n */\n isSearchHidden: PropTypes.bool,\n /**\n * An array of setting categories to be displayed.\n */\n categories: PropTypes.array,\n /**\n * Additional classes to be added to the container.\n */\n className: PropTypes.string,\n /**\n * Props to be passed to the header component.\n */\n headerProps: PropTypes.object,\n};\n\nexport default Settings;\n"],"names":["UNSUPPORTED_LINK_PROPS","IntegrationItem","_ref","_ref$icon","icon","Icon","description","label","path","href","isConnected","_ref$isMobileOrTablet","isMobileOrTablet","_ref$className","className","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","commonProps","_objectSpread","concat","hyphenate","replace","classnames","omit","LinkElement","Link","linkProps","to","_jsxs","children","_jsx","joinHyphenCase","size","Typography","variant","weight","Badge","memo","Item","dataTestid","asChild","Category","items","id","isIntegration","_useBreakpoints","useBreakpoints","isSize","SettingsCard","isLabelPresent","isPresent","map","item","isTextMatching","searchTerm","toLowerCase","includes","trim","scrollIntoSettingCategory","activeCategory","_document$getElementB","document","getElementById","scrollIntoView","behavior","filterCategories","_ref$categories","categories","_ref$searchTerm","isSearchTermBlank","filteredCategories","category","filterBy","_ref2","isNotEmpty","Settings","_ref$isTitleHidden","isTitleHidden","_ref$isSearchHidden","isSearchHidden","title","_ref$headerProps","headerProps","_useQueryParams","useQueryParams","categoryParam","_useQueryParams$searc","isHeaderVisible","headerTitle","useEffect","Header","searchProps","placeholder","isEmpty","_createElement","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,sBAAsB,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC;;;;;ACajE,IAAMC,iBAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAUf;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CATJE,IAAI;AAAEC,IAAAA,IAAI,GAAAF,SAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,SAAA;IACjBG,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;IACJC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IAAAC,qBAAA,GAAAT,IAAA,CACXU,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAAE,cAAA,GAAAX,IAAA,CACxBY,SAAS;AAAT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nB,GAAG,CAAC,UAAAsB,KAAA,EAAA;AAAA,QAAA,IAAG9B,EAAE,GAAA8B,KAAA,CAAF9B,EAAE;UAAExC,KAAK,GAAAsE,KAAA,CAALtE,KAAK;UAAEuC,KAAK,GAAA+B,KAAA,CAAL/B,KAAK;UAAEE,aAAa,GAAA6B,KAAA,CAAb7B,aAAa;QAAA,oBACxDkD,mBAAA,CAACrD,QAAQ,EAAA;AAAOE,UAAAA,EAAE,EAAFA,EAAE;AAAEC,UAAAA,aAAa,EAAbA,aAAa;AAAEF,UAAAA,KAAK,EAALA,KAAK;AAAEvC,UAAAA,KAAK,EAALA,KAAK;AAAI4F,UAAAA,GAAG,EAAEpD;AAAG,SAAE,CAAC;MAAA,CAC/D;AAAC,KACC,CACN;AAAA,GACE,CAAC;AAEV;;;;"}
|
package/dist/cjs/v2/SubHeader.js
CHANGED
|
@@ -5,21 +5,22 @@ var classnames = require('classnames');
|
|
|
5
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
7
|
var ramda = require('ramda');
|
|
8
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
8
9
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
9
|
-
var
|
|
10
|
+
var primitives = require('@bigbinary/neeto-atoms/primitives');
|
|
10
11
|
var reactI18next = require('react-i18next');
|
|
11
|
-
var Columns$1 = require('../Columns-
|
|
12
|
+
var Columns$1 = require('../Columns-C2ke8N58.js');
|
|
12
13
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
13
14
|
require('@tanstack/react-query');
|
|
14
15
|
require('@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation');
|
|
15
16
|
require('axios');
|
|
16
17
|
var jsxRuntime = require('react/jsx-runtime');
|
|
17
18
|
var createLucideIcon = require('../createLucideIcon-DBDhE7kE.js');
|
|
19
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
18
20
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
19
21
|
var v2 = require('@bigbinary/neeto-filters-frontend/v2');
|
|
20
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
21
|
-
require('@bigbinary/neeto-atoms/primitives');
|
|
22
22
|
require('@dnd-kit/core');
|
|
23
|
+
require('@dnd-kit/modifiers');
|
|
23
24
|
require('@dnd-kit/sortable');
|
|
24
25
|
require('i18next');
|
|
25
26
|
require('../utilities.esm-jwIHISzF.js');
|
|
@@ -87,32 +88,46 @@ var Columns = function Columns(_ref) {
|
|
|
87
88
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
88
89
|
var _useTranslation = reactI18next.useTranslation(),
|
|
89
90
|
t = _useTranslation.t;
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
var _useState = React.useState(false),
|
|
92
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
93
|
+
isOpen = _useState2[0],
|
|
94
|
+
setIsOpen = _useState2[1];
|
|
95
|
+
var _useState3 = React.useState(false),
|
|
96
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
97
|
+
isTooltipOpen = _useState4[0],
|
|
98
|
+
setIsTooltipOpen = _useState4[1];
|
|
99
|
+
return /*#__PURE__*/jsxRuntime.jsx(primitives.TooltipProvider, {
|
|
100
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(primitives.Tooltip, {
|
|
101
|
+
open: isOpen ? false : isTooltipOpen,
|
|
102
|
+
onOpenChange: setIsTooltipOpen,
|
|
103
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(primitives.TooltipTrigger, {
|
|
104
|
+
asChild: true,
|
|
105
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
106
|
+
className: "inline-flex",
|
|
107
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Columns$1.Columns, _objectSpread$3({
|
|
108
|
+
isSearchable: true,
|
|
109
|
+
buttonProps: _objectSpread$3({
|
|
110
|
+
icon: Columns3,
|
|
111
|
+
"data-testid": "columns-dropdown-button"
|
|
112
|
+
}, buttonProps),
|
|
113
|
+
onOpenChange: setIsOpen
|
|
114
|
+
}, _objectSpread$3({
|
|
115
|
+
allowConfigurationResetOnUpdate: allowConfigurationResetOnUpdate,
|
|
116
|
+
columnData: columnData,
|
|
117
|
+
onMutationSuccess: onMutationSuccess,
|
|
118
|
+
tableKey: tableKey
|
|
119
|
+
}, props)))
|
|
120
|
+
})
|
|
121
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.TooltipContent, {
|
|
122
|
+
side: "bottom",
|
|
123
|
+
children: t("neetoMolecules.columns.columns")
|
|
124
|
+
})]
|
|
110
125
|
})
|
|
111
126
|
});
|
|
112
127
|
};
|
|
113
128
|
Columns.displayName = "Columns";
|
|
114
129
|
|
|
115
|
-
var _excluded$1 = ["content"];
|
|
130
|
+
var _excluded$1 = ["content", "position"];
|
|
116
131
|
function ownKeys$2(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; }
|
|
117
132
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
118
133
|
var DownloadButton = function DownloadButton(_ref) {
|
|
@@ -124,14 +139,14 @@ var DownloadButton = function DownloadButton(_ref) {
|
|
|
124
139
|
tooltipProps = _ref$tooltipProps === void 0 ? {} : _ref$tooltipProps;
|
|
125
140
|
var _useTranslation = reactI18next.useTranslation(),
|
|
126
141
|
t = _useTranslation.t;
|
|
127
|
-
var
|
|
142
|
+
var content = tooltipProps.content,
|
|
143
|
+
position = tooltipProps.position,
|
|
128
144
|
restTooltipProps = _objectWithoutProperties(tooltipProps, _excluded$1);
|
|
129
|
-
var resolvedTooltipContent = tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : t("neetoMolecules.common.download");
|
|
130
145
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
131
146
|
className: "relative",
|
|
132
147
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tooltip, _objectSpread$2(_objectSpread$2({
|
|
133
|
-
content:
|
|
134
|
-
position: "bottom"
|
|
148
|
+
content: content !== null && content !== void 0 ? content : t("neetoMolecules.common.download"),
|
|
149
|
+
position: position !== null && position !== void 0 ? position : "bottom"
|
|
135
150
|
}, restTooltipProps), {}, {
|
|
136
151
|
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
137
152
|
onClick: onClick,
|
|
@@ -154,21 +169,18 @@ var FilterButton = reactUtils.withT(function (_ref) {
|
|
|
154
169
|
var t = _ref.t,
|
|
155
170
|
buttonProps = _ref.buttonProps,
|
|
156
171
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
157
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}, buttonProps)
|
|
170
|
-
}, props))
|
|
171
|
-
});
|
|
172
|
+
return /*#__PURE__*/jsxRuntime.jsx(v2.Filters, _objectSpread$1({
|
|
173
|
+
buttonProps: _objectSpread$1({
|
|
174
|
+
"data-testid": "filter-button",
|
|
175
|
+
icon: Funnel,
|
|
176
|
+
variant: "ghost",
|
|
177
|
+
tooltipProps: {
|
|
178
|
+
content: t("neetoMolecules.common.filter"),
|
|
179
|
+
position: "bottom"
|
|
180
|
+
},
|
|
181
|
+
label: null
|
|
182
|
+
}, buttonProps)
|
|
183
|
+
}, props));
|
|
172
184
|
});
|
|
173
185
|
|
|
174
186
|
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; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubHeader.js","sources":["../../../node_modules/lucide-react/dist/esm/icons/columns-3.js","../../../node_modules/lucide-react/dist/esm/icons/download.js","../../../node_modules/lucide-react/dist/esm/icons/funnel.js","../../../src/v2/components/SubHeader/RightBlock/Columns.jsx","../../../src/v2/components/SubHeader/RightBlock/Download.jsx","../../../src/v2/components/SubHeader/RightBlock/Filter.jsx","../../../src/v2/components/SubHeader/RightBlock/index.jsx","../../../src/v2/components/SubHeader/index.jsx"],"sourcesContent":["/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"M15 3v18\", key: \"14nvp0\" }]\n];\nconst Columns3 = createLucideIcon(\"columns-3\", __iconNode);\n\nexport { __iconNode, Columns3 as default };\n//# sourceMappingURL=columns-3.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 15V3\", key: \"m9g1x1\" }],\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"path\", { d: \"m7 10 5 5 5-5\", key: \"brsn70\" }]\n];\nconst Download = createLucideIcon(\"download\", __iconNode);\n\nexport { __iconNode, Download as default };\n//# sourceMappingURL=download.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\",\n key: \"sc7q7i\"\n }\n ]\n];\nconst Funnel = createLucideIcon(\"funnel\", __iconNode);\n\nexport { __iconNode, Funnel as default };\n//# sourceMappingURL=funnel.js.map\n","import { Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Columns3 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns from \"../../Columns\";\n\nconst Columns = ({\n buttonProps = {},\n columnData,\n onMutationSuccess,\n allowConfigurationResetOnUpdate,\n tableKey,\n ...props\n}) => {\n const { t } = useTranslation();\n\n const tooltipContent = t(\"neetoMolecules.columns.columns\");\n\n return (\n <div>\n <Tooltip content={tooltipContent} position=\"bottom\">\n <div className=\"inline-flex\">\n <ManageColumns\n isSearchable\n buttonProps={{\n icon: Columns3,\n \"data-testid\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{\n allowConfigurationResetOnUpdate,\n columnData,\n onMutationSuccess,\n tableKey,\n ...props,\n }}\n />\n </div>\n </Tooltip>\n </div>\n );\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import { Button, Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Download } from \"lucide-react\";\nimport { isPresent } from \"neetocist\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-testid\": dataTestid = \"download-button\",\n tooltipProps = {},\n}) => {\n const { t } = useTranslation();\n\n const { content: tooltipContent, ...restTooltipProps } = tooltipProps;\n\n const resolvedTooltipContent =\n tooltipContent ?? t(\"neetoMolecules.common.download\");\n\n return (\n <div className=\"relative\">\n <Tooltip\n content={resolvedTooltipContent}\n position=\"bottom\"\n {...restTooltipProps}\n >\n <Button\n {...{ onClick }}\n data-testid={isPresent(dataTestid) ? dataTestid : \"download-button\"}\n icon={Download}\n size=\"icon\"\n variant=\"ghost\"\n />\n </Tooltip>\n {count && (\n <span className=\"bg-primary text-primary-foreground absolute -end-0.5 -top-0.5 z-[1] inline-flex min-h-4 min-w-4 items-center justify-center rounded-full text-[0.625rem]\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import { Filter } from \"lucide-react\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Filters as NeetoFilters } from \"neetofilters/v2\";\n\nconst FilterButton = withT(({ t, buttonProps, ...props }) => (\n <div>\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n variant: \"ghost\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n touch: [\"hold\", 500],\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n));\n\nexport default FilterButton;\n","import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\n \"flex flex-row items-center justify-end gap-2\",\n \"[&>:not([hidden])~:not([hidden])]:border-border [&>:not([hidden])~:not([hidden])]:border-s [&>:not([hidden])~:not([hidden])]:ps-2\",\n { hidden: not(showIcons) }\n )}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n tooltipProps: PropTypes.object,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n actionBlock: PropTypes.node,\n tableKey: PropTypes.string,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n onMutationSuccess: PropTypes.func,\n allowConfigurationResetOnUpdate: PropTypes.bool,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-testid\": dataTestid = \"subheader\",\n}) => {\n const subheaderRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!subheaderRef.current) return;\n const height = subheaderRef.current.offsetHeight;\n document.body.style.setProperty(\"--nv-subheader-height\", `${height}px`);\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\"--nv-subheader-height\");\n };\n }, []);\n\n return (\n <div\n data-testid={isPresent(dataTestid) ? dataTestid : \"subheader\"}\n ref={subheaderRef}\n className={classnames(\n \"mb-5 flex w-full shrink-0 flex-row flex-wrap items-center justify-between gap-4 md:flex-nowrap\",\n className\n )}\n >\n <div className=\"flex grow\" data-testid=\"subheader-left-wrapper\">\n {leftActionBlock && (\n <div\n className=\"flex flex-row items-center justify-start\"\n data-testid=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"ms-auto flex flex-row items-center justify-end gap-3 md:ms-0\"\n data-testid=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n );\n};\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["__iconNode","createLucideIcon","Columns","_ref","_ref$buttonProps","buttonProps","columnData","onMutationSuccess","allowConfigurationResetOnUpdate","tableKey","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","tooltipContent","_jsx","children","Tooltip","content","position","className","ManageColumns","_objectSpread","isSearchable","icon","Columns3","displayName","DownloadButton","count","onClick","_ref$dataTestid","dataTestid","_ref$tooltipProps","tooltipProps","restTooltipProps","resolvedTooltipContent","_jsxs","Button","isPresent","Download","size","variant","FilterButton","withT","NeetoFilters","Filter","touch","label","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock","subheaderRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","removeProperty","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAMA,YAAU,GAAG;AACnB,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AACjF,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC3C,CAAC;AACD,MAAM,QAAQ,GAAGC,iCAAgB,CAAC,WAAW,EAAED,YAAU,CAAC;;ACd1D;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAMA,YAAU,GAAG;AACnB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC5C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,2CAA2C,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC7E,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAA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;AAClB3C,IAAAA,SAAS,EAAEoC,UAAU,CACnB,gGAAgG,EAChGpC,SACF,CAAE;AAAAJ,IAAAA,QAAA,gBAEFD,cAAA,CAAA,KAAA,EAAA;AAAKK,MAAAA,SAAS,EAAC,WAAW;AAAC,MAAA,aAAA,EAAY,wBAAwB;MAAAJ,QAAA,EAC5D6C,eAAe,iBACd9C,cAAA,CAAA,KAAA,EAAA;AACEK,QAAAA,SAAS,EAAC,0CAA0C;AACpD,QAAA,aAAA,EAAY,gBAAgB;AAAAJ,QAAAA,QAAA,EAE3B6C;OACE;AACN,KACE,CAAC,EACLC,gBAAgB,iBACf/C,cAAA,CAAA,KAAA,EAAA;AACEK,MAAAA,SAAS,EAAC,8DAA8D;AACxE,MAAA,aAAA,EAAY,iBAAiB;AAAAJ,MAAAA,QAAA,EAE5B8C;AAAgB,KACd,CACN;AAAA,GACE,CAAC;AAEV;AAEAH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;","x_google_ignoreList":[0,1,2]}
|
|
1
|
+
{"version":3,"file":"SubHeader.js","sources":["../../../node_modules/lucide-react/dist/esm/icons/columns-3.js","../../../node_modules/lucide-react/dist/esm/icons/download.js","../../../node_modules/lucide-react/dist/esm/icons/funnel.js","../../../src/v2/components/SubHeader/RightBlock/Columns.jsx","../../../src/v2/components/SubHeader/RightBlock/Download.jsx","../../../src/v2/components/SubHeader/RightBlock/Filter.jsx","../../../src/v2/components/SubHeader/RightBlock/index.jsx","../../../src/v2/components/SubHeader/index.jsx"],"sourcesContent":["/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n [\"path\", { d: \"M15 3v18\", key: \"14nvp0\" }]\n];\nconst Columns3 = createLucideIcon(\"columns-3\", __iconNode);\n\nexport { __iconNode, Columns3 as default };\n//# sourceMappingURL=columns-3.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 15V3\", key: \"m9g1x1\" }],\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"path\", { d: \"m7 10 5 5 5-5\", key: \"brsn70\" }]\n];\nconst Download = createLucideIcon(\"download\", __iconNode);\n\nexport { __iconNode, Download as default };\n//# sourceMappingURL=download.js.map\n","/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\",\n key: \"sc7q7i\"\n }\n ]\n];\nconst Funnel = createLucideIcon(\"funnel\", __iconNode);\n\nexport { __iconNode, Funnel as default };\n//# sourceMappingURL=funnel.js.map\n","import { useState } from \"react\";\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@bigbinary/neeto-atoms/primitives\";\nimport { Columns3 } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns from \"../../Columns\";\n\nconst Columns = ({\n buttonProps = {},\n columnData,\n onMutationSuccess,\n allowConfigurationResetOnUpdate,\n tableKey,\n ...props\n}) => {\n const { t } = useTranslation();\n\n const [isOpen, setIsOpen] = useState(false);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n\n return (\n <TooltipProvider>\n <Tooltip\n open={isOpen ? false : isTooltipOpen}\n onOpenChange={setIsTooltipOpen}\n >\n <TooltipTrigger asChild>\n <span className=\"inline-flex\">\n <ManageColumns\n isSearchable\n buttonProps={{\n icon: Columns3,\n \"data-testid\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n onOpenChange={setIsOpen}\n {...{\n allowConfigurationResetOnUpdate,\n columnData,\n onMutationSuccess,\n tableKey,\n ...props,\n }}\n />\n </span>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {t(\"neetoMolecules.columns.columns\")}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import { Button, Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Download } from \"lucide-react\";\nimport { isPresent } from \"neetocist\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-testid\": dataTestid = \"download-button\",\n tooltipProps = {},\n}) => {\n const { t } = useTranslation();\n const { content, position, ...restTooltipProps } = tooltipProps;\n\n return (\n <div className=\"relative\">\n <Tooltip\n content={content ?? t(\"neetoMolecules.common.download\")}\n position={position ?? \"bottom\"}\n {...restTooltipProps}\n >\n <Button\n {...{ onClick }}\n data-testid={isPresent(dataTestid) ? dataTestid : \"download-button\"}\n icon={Download}\n size=\"icon\"\n variant=\"ghost\"\n />\n </Tooltip>\n {count && (\n <span className=\"bg-primary text-primary-foreground absolute -end-0.5 -top-0.5 z-[1] inline-flex min-h-4 min-w-4 items-center justify-center rounded-full text-[0.625rem]\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import { Filter } from \"lucide-react\";\nimport { withT } from \"neetocommons/react-utils\";\nimport { Filters as NeetoFilters } from \"neetofilters/v2\";\n\nconst FilterButton = withT(({ t, buttonProps, ...props }) => (\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n variant: \"ghost\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n));\n\nexport default FilterButton;\n","import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\n \"flex flex-row items-center justify-end gap-2\",\n \"[&>:not([hidden])~:not([hidden])]:border-border [&>:not([hidden])~:not([hidden])]:border-s [&>:not([hidden])~:not([hidden])]:ps-2\",\n { hidden: not(showIcons) }\n )}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n tooltipProps: PropTypes.object,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n actionBlock: PropTypes.node,\n tableKey: PropTypes.string,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n onMutationSuccess: PropTypes.func,\n allowConfigurationResetOnUpdate: PropTypes.bool,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-testid\": dataTestid = \"subheader\",\n}) => {\n const subheaderRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!subheaderRef.current) return;\n const height = subheaderRef.current.offsetHeight;\n document.body.style.setProperty(\"--nv-subheader-height\", `${height}px`);\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\"--nv-subheader-height\");\n };\n }, []);\n\n return (\n <div\n data-testid={isPresent(dataTestid) ? dataTestid : \"subheader\"}\n ref={subheaderRef}\n className={classnames(\n \"mb-5 flex w-full shrink-0 flex-row flex-wrap items-center justify-between gap-4 md:flex-nowrap\",\n className\n )}\n >\n <div className=\"flex grow\" data-testid=\"subheader-left-wrapper\">\n {leftActionBlock && (\n <div\n className=\"flex flex-row items-center justify-start\"\n data-testid=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"ms-auto flex flex-row items-center justify-end gap-3 md:ms-0\"\n data-testid=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n );\n};\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["__iconNode","createLucideIcon","Columns","_ref","_ref$buttonProps","buttonProps","columnData","onMutationSuccess","allowConfigurationResetOnUpdate","tableKey","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isOpen","setIsOpen","_useState3","_useState4","isTooltipOpen","setIsTooltipOpen","_jsx","TooltipProvider","children","_jsxs","Tooltip","open","onOpenChange","TooltipTrigger","asChild","className","ManageColumns","_objectSpread","isSearchable","icon","Columns3","TooltipContent","side","displayName","DownloadButton","count","onClick","_ref$dataTestid","dataTestid","_ref$tooltipProps","tooltipProps","content","position","restTooltipProps","Button","isPresent","Download","size","variant","FilterButton","withT","NeetoFilters","Filter","label","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock","subheaderRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","removeProperty","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAMA,YAAU,GAAG;AACnB,EAAE,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AACjF,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC3C,EAAE,CAAC,MAAM,EAAE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,EAC5DiD,eAAe,iBACdnD,cAAA,CAAA,KAAA,EAAA;AACES,QAAAA,SAAS,EAAC,0CAA0C;AACpD,QAAA,aAAA,EAAY,gBAAgB;AAAAP,QAAAA,QAAA,EAE3BiD;OACE;AACN,KACE,CAAC,EACLC,gBAAgB,iBACfpD,cAAA,CAAA,KAAA,EAAA;AACES,MAAAA,SAAS,EAAC,8DAA8D;AACxE,MAAA,aAAA,EAAY,iBAAiB;AAAAP,MAAAA,QAAA,EAE5BkD;AAAgB,KACd,CACN;AAAA,GACE,CAAC;AAEV;AAEAH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;","x_google_ignoreList":[0,1,2]}
|
package/dist/v2/Columns.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as COLUMNS_ORDER_STORAGE_KEY, H as HIDDEN_COLUMNS_STORAGE_KEY, T as TABLE_CONFIGURATION_QUERY_KEY, a as default, u as useTableConfigurations } from '../Columns-
|
|
1
|
+
export { C as COLUMNS_ORDER_STORAGE_KEY, H as HIDDEN_COLUMNS_STORAGE_KEY, T as TABLE_CONFIGURATION_QUERY_KEY, a as default, u as useTableConfigurations } from '../Columns-DpeV3Jzz.js';
|
|
2
2
|
import '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -7,6 +7,7 @@ import 'react';
|
|
|
7
7
|
import '@bigbinary/neeto-atoms';
|
|
8
8
|
import '@bigbinary/neeto-atoms/primitives';
|
|
9
9
|
import '@dnd-kit/core';
|
|
10
|
+
import '@dnd-kit/modifiers';
|
|
10
11
|
import '@dnd-kit/sortable';
|
|
11
12
|
import 'i18next';
|
|
12
13
|
import '@bigbinary/neeto-cist';
|
package/dist/v2/Columns.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/v2/Header.js
CHANGED
|
@@ -26,12 +26,10 @@ import '@bigbinary/neeto-commons-frontend/utils';
|
|
|
26
26
|
import '../search-DCgpNjip.js';
|
|
27
27
|
|
|
28
28
|
var SIZES = {
|
|
29
|
-
nano: "nano"
|
|
30
|
-
small: "small"
|
|
31
|
-
};
|
|
29
|
+
nano: "nano"};
|
|
32
30
|
var DROPDOWN_BUTTON_SIZES = {
|
|
33
|
-
nano: "
|
|
34
|
-
small: "
|
|
31
|
+
nano: "icon-sm",
|
|
32
|
+
small: "icon"
|
|
35
33
|
};
|
|
36
34
|
|
|
37
35
|
var _excluded = ["dropdownButtonProps"];
|
|
@@ -73,43 +71,38 @@ var Header = function Header(_ref) {
|
|
|
73
71
|
return /*#__PURE__*/jsxs("div", {
|
|
74
72
|
"data-testid": dataTestId,
|
|
75
73
|
ref: headerRef,
|
|
76
|
-
className: classnames("flex w-full shrink-0 flex-row items-start justify-between gap-4 pt-10 pb-6", "flex-wrap lg:flex-nowrap",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
className: "flex flex-
|
|
83
|
-
children:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
children: /*#__PURE__*/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
className: classnames("flex min-h-0 w-full shrink-0 flex-row items-start justify-between gap-4 pt-10 pb-6", "flex-wrap lg:flex-nowrap", className),
|
|
75
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
76
|
+
className: "flex flex-wrap",
|
|
77
|
+
children: [hasBreadcrumbs && /*#__PURE__*/jsx(Breadcrumbs, {
|
|
78
|
+
breadcrumbs: breadcrumbs
|
|
79
|
+
}), /*#__PURE__*/jsx("div", {
|
|
80
|
+
className: classnames("flex w-full flex-row items-center gap-3", hasBreadcrumbs ? "mt-0" : "-mt-1 max-lg:-mt-2.5 max-md:-mt-2 max-sm:-mt-1"),
|
|
81
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
82
|
+
asChild: true,
|
|
83
|
+
variant: isNano ? "h4" : "h2",
|
|
84
|
+
weight: "semibold",
|
|
85
|
+
children: /*#__PURE__*/jsxs(TitleTag, {
|
|
86
|
+
"data-testid": "main-header",
|
|
87
|
+
children: [title, isPresent(titleHelpPopoverProps) && /*#__PURE__*/jsx(HelpPopover, _objectSpread({
|
|
88
|
+
className: "ms-2 inline-flex align-middle",
|
|
89
|
+
side: "right"
|
|
90
|
+
}, titleHelpPopoverProps)), renderDropdown(function (_ref2) {
|
|
91
|
+
var _ref2$dropdownButtonP = _ref2.dropdownButtonProps,
|
|
92
|
+
dropdownButtonProps = _ref2$dropdownButtonP === void 0 ? {} : _ref2$dropdownButtonP,
|
|
93
|
+
dropdownProps = _objectWithoutProperties(_ref2, _excluded);
|
|
94
|
+
return /*#__PURE__*/jsx("span", {
|
|
94
95
|
className: "ms-2 inline-flex align-middle",
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
children: /*#__PURE__*/jsx(MoreDropdown, _objectSpread({
|
|
103
|
-
dropdownButtonProps: _objectSpread({
|
|
104
|
-
size: DROPDOWN_BUTTON_SIZES[size]
|
|
105
|
-
}, dropdownButtonProps)
|
|
106
|
-
}, dropdownProps))
|
|
107
|
-
});
|
|
108
|
-
})]
|
|
109
|
-
})
|
|
96
|
+
children: /*#__PURE__*/jsx(MoreDropdown, _objectSpread({
|
|
97
|
+
dropdownButtonProps: _objectSpread({
|
|
98
|
+
size: DROPDOWN_BUTTON_SIZES[size]
|
|
99
|
+
}, dropdownButtonProps)
|
|
100
|
+
}, dropdownProps))
|
|
101
|
+
});
|
|
102
|
+
})]
|
|
110
103
|
})
|
|
111
|
-
})
|
|
112
|
-
})
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
113
106
|
}), /*#__PURE__*/jsxs("div", {
|
|
114
107
|
className: classnames("flex items-center gap-3 empty:hidden", "flex-wrap justify-start md:flex-nowrap md:justify-end"),
|
|
115
108
|
children: [searchProps && /*#__PURE__*/jsx(Search, _objectSpread({
|
package/dist/v2/Header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../src/v2/components/Header/constants.js","../../src/v2/components/Header/index.jsx"],"sourcesContent":["const SIZES = { nano: \"nano\", small: \"small\" };\n\nconst DROPDOWN_BUTTON_SIZES = { nano: \"small\", small: \"medium\" };\n\nexport { SIZES, DROPDOWN_BUTTON_SIZES };\n","import { useLayoutEffect, useRef } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty, isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\n\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport HelpPopover from \"../HelpPopover\";\nimport MoreDropdown from \"../MoreDropdown\";\nimport Search from \"../Search\";\n\nconst Header = ({\n title,\n titleHelpPopoverProps = {},\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n size = \"small\",\n \"data-testid\": dataTestId = \"neeto-molecules-header\",\n}) => {\n const headerRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!headerRef.current) return;\n const height = headerRef.current.offsetHeight;\n document.body.style.setProperty(\"--nv-header-height\", `${height}px`);\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\"--nv-header-height\");\n };\n }, []);\n\n const isNano = size === SIZES.nano;\n const hasBreadcrumbs = isNotEmpty(breadcrumbs);\n const TitleTag = isNano ? \"h3\" : \"h1\";\n\n return (\n <div\n data-testid={dataTestId}\n ref={headerRef}\n className={classnames(\n \"flex w-full shrink-0 flex-row items-start justify-between gap-4 pt-10 pb-6\",\n \"flex-wrap lg:flex-nowrap\",\n { \"min-h-0\": isNano || size === SIZES.small },\n className\n )}\n >\n <div className=\"flex flex-row flex-wrap items-start justify-start\">\n <div className=\"flex flex-wrap\">\n {hasBreadcrumbs && <Breadcrumbs {...{ breadcrumbs }} />}\n <div\n className={classnames(\n \"flex w-full flex-row items-center gap-3\",\n hasBreadcrumbs\n ? \"mt-0\"\n : \"-mt-1 max-lg:-mt-2.5 max-md:-mt-2 max-sm:-mt-1\"\n )}\n >\n <Typography\n asChild\n variant={isNano ? \"h4\" : \"h2\"}\n weight=\"semibold\"\n >\n <TitleTag data-testid=\"main-header\">\n {title}\n {isPresent(titleHelpPopoverProps) && (\n <HelpPopover\n className=\"ms-2 inline-flex align-middle\"\n side=\"right\"\n {...titleHelpPopoverProps}\n />\n )}\n {renderDropdown(\n ({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <span className=\"ms-2 inline-flex align-middle\">\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n </span>\n )\n )}\n </TitleTag>\n </Typography>\n </div>\n </div>\n </div>\n <div\n className={classnames(\n \"flex items-center gap-3 empty:hidden\",\n \"flex-wrap justify-start md:flex-nowrap md:justify-end\"\n )}\n >\n {searchProps && (\n <Search\n enableUrlSync\n className={classnames(\n \"min-w-[12.6rem] grow-0\",\n searchProps.className\n )}\n {...searchProps}\n />\n )}\n {actionBlock && (\n <div className=\"flex shrink-0 items-center justify-end gap-3 max-[360px]:shrink max-[360px]:flex-wrap max-[360px]:justify-start\">\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To set props for the HelpPopover component in the title.\n */\n titleHelpPopoverProps: PropTypes.object,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n actionBlock: PropTypes.node,\n /**\n * To add **Search** molecule to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * A function to render the Dropdown next to the title. It provides the MoreDropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n /**\n * To specify size of the Header.\n * `small` - Default size.\n *\n * `nano` - To be used in inner pages with menubar.\n */\n size: PropTypes.oneOf([\"nano\", \"small\"]),\n};\n\nexport default Header;\n"],"names":["SIZES","nano","small","DROPDOWN_BUTTON_SIZES","Header","_ref","title","_ref$titleHelpPopover","titleHelpPopoverProps","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","headerRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","removeProperty","isNano","hasBreadcrumbs","isNotEmpty","TitleTag","_jsxs","ref","classnames","children","_jsx","Breadcrumbs","Typography","asChild","variant","weight","isPresent","HelpPopover","_objectSpread","side","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE;AAAQ,CAAC;AAE9C,IAAMC,qBAAqB,GAAG;AAAEF,EAAAA,IAAI,EAAE,OAAO;AAAEC,EAAAA,KA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DpC,WAAW,iBACVqC,GAAA,CAACiB,MAAM,EAAAT,aAAA,CAAA;QACLU,aAAa,EAAA,IAAA;AACbrD,QAAAA,SAAS,EAAEiC,UAAU,CACnB,wBAAwB,EACxBnC,WAAW,CAACE,SACd;AAAE,OAAA,EACEF,WAAW,CAChB,CACF,EACAG,WAAW,iBACVkC,GAAA,CAAA,KAAA,EAAA;AAAKnC,QAAAA,SAAS,EAAC,iHAAiH;AAAAkC,QAAAA,QAAA,EAC7HjC;AAAW,OACT,CACN;AAAA,KACE,CAAC;AAAA,GACH,CAAC;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../src/v2/components/Header/constants.js","../../src/v2/components/Header/index.jsx"],"sourcesContent":["const SIZES = { nano: \"nano\", small: \"small\" };\n\nconst DROPDOWN_BUTTON_SIZES = { nano: \"icon-sm\", small: \"icon\" };\n\nexport { SIZES, DROPDOWN_BUTTON_SIZES };\n","import { useLayoutEffect, useRef } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty, isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\n\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport HelpPopover from \"../HelpPopover\";\nimport MoreDropdown from \"../MoreDropdown\";\nimport Search from \"../Search\";\n\nconst Header = ({\n title,\n titleHelpPopoverProps = {},\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n size = \"small\",\n \"data-testid\": dataTestId = \"neeto-molecules-header\",\n}) => {\n const headerRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!headerRef.current) return;\n const height = headerRef.current.offsetHeight;\n document.body.style.setProperty(\"--nv-header-height\", `${height}px`);\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\"--nv-header-height\");\n };\n }, []);\n\n const isNano = size === SIZES.nano;\n const hasBreadcrumbs = isNotEmpty(breadcrumbs);\n const TitleTag = isNano ? \"h3\" : \"h1\";\n\n return (\n <div\n data-testid={dataTestId}\n ref={headerRef}\n className={classnames(\n \"flex min-h-0 w-full shrink-0 flex-row items-start justify-between gap-4 pt-10 pb-6\",\n \"flex-wrap lg:flex-nowrap\",\n className\n )}\n >\n <div className=\"flex flex-wrap\">\n {hasBreadcrumbs && <Breadcrumbs {...{ breadcrumbs }} />}\n <div\n className={classnames(\n \"flex w-full flex-row items-center gap-3\",\n hasBreadcrumbs\n ? \"mt-0\"\n : \"-mt-1 max-lg:-mt-2.5 max-md:-mt-2 max-sm:-mt-1\"\n )}\n >\n <Typography asChild variant={isNano ? \"h4\" : \"h2\"} weight=\"semibold\">\n <TitleTag data-testid=\"main-header\">\n {title}\n {isPresent(titleHelpPopoverProps) && (\n <HelpPopover\n className=\"ms-2 inline-flex align-middle\"\n side=\"right\"\n {...titleHelpPopoverProps}\n />\n )}\n {renderDropdown(\n ({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <span className=\"ms-2 inline-flex align-middle\">\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n </span>\n )\n )}\n </TitleTag>\n </Typography>\n </div>\n </div>\n <div\n className={classnames(\n \"flex items-center gap-3 empty:hidden\",\n \"flex-wrap justify-start md:flex-nowrap md:justify-end\"\n )}\n >\n {searchProps && (\n <Search\n enableUrlSync\n className={classnames(\n \"min-w-[12.6rem] grow-0\",\n searchProps.className\n )}\n {...searchProps}\n />\n )}\n {actionBlock && (\n <div className=\"flex shrink-0 items-center justify-end gap-3 max-[360px]:shrink max-[360px]:flex-wrap max-[360px]:justify-start\">\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To set props for the HelpPopover component in the title.\n */\n titleHelpPopoverProps: PropTypes.object,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n actionBlock: PropTypes.node,\n /**\n * To add **Search** molecule to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * A function to render the Dropdown next to the title. It provides the MoreDropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n /**\n * To specify size of the Header.\n * `small` - Default size.\n *\n * `nano` - To be used in inner pages with menubar.\n */\n size: PropTypes.oneOf([\"nano\", \"small\"]),\n};\n\nexport default Header;\n"],"names":["SIZES","nano","DROPDOWN_BUTTON_SIZES","small","Header","_ref","title","_ref$titleHelpPopover","titleHelpPopoverProps","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","headerRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","removeProperty","isNano","hasBreadcrumbs","isNotEmpty","TitleTag","_jsxs","ref","classnames","children","_jsx","Breadcrumbs","Typography","asChild","variant","weight","isPresent","HelpPopover","_objectSpread","side","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAuB,CAAC;AAE9C,IAAMC,qBAAqB,GAAG;AAAED,EAAAA,IAAI,EAAE,SAAS;AAAEE,EAAAA,KAAK,EAA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