@bigbinary/neeto-molecules 4.1.55 → 4.1.57
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-cUgR6NTO.js → Columns-BVXRaORo.js} +8 -11
- package/dist/Columns-BVXRaORo.js.map +1 -0
- package/dist/{ConfigureView-C84AmCMq.js → ConfigureView-DAZrBZPv.js} +3 -2
- package/dist/{ConfigureView-C84AmCMq.js.map → ConfigureView-DAZrBZPv.js.map} +1 -1
- package/dist/cjs/{Columns-D3eocaeY.js → Columns-ZySdkGqV.js} +12 -15
- package/dist/cjs/Columns-ZySdkGqV.js.map +1 -0
- package/dist/cjs/{ConfigureView-DGf7cRMQ.js → ConfigureView-CAWRNNYI.js} +12 -11
- package/dist/cjs/{ConfigureView-DGf7cRMQ.js.map → ConfigureView-CAWRNNYI.js.map} +1 -1
- package/dist/cjs/useKeyboardShortcutsPaneState-BG_xVteC.js +39 -0
- package/dist/cjs/useKeyboardShortcutsPaneState-BG_xVteC.js.map +1 -0
- package/dist/cjs/v2/AuditLogs.js +19 -80
- package/dist/cjs/v2/AuditLogs.js.map +1 -1
- package/dist/cjs/v2/Breadcrumbs.js +7 -7
- package/dist/cjs/v2/Breadcrumbs.js.map +1 -1
- package/dist/cjs/v2/Columns.js +2 -1
- package/dist/cjs/v2/Columns.js.map +1 -1
- package/dist/cjs/v2/ConfigurePageSidebar.js +7 -6
- package/dist/cjs/v2/ConfigurePageSidebar.js.map +1 -1
- package/dist/cjs/v2/CopyToClipboardButton.js +11 -17
- package/dist/cjs/v2/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/v2/FloatingActionMenu.js +58 -81
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/v2/Header.js +2 -1
- package/dist/cjs/v2/Header.js.map +1 -1
- package/dist/cjs/v2/HelpPopover.js +51 -54
- package/dist/cjs/v2/HelpPopover.js.map +1 -1
- package/dist/cjs/v2/KeyboardShortcuts.js +13 -51
- package/dist/cjs/v2/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/v2/MoreDropdown.js +59 -78
- package/dist/cjs/v2/MoreDropdown.js.map +1 -1
- package/dist/cjs/v2/Settings.js +1 -0
- package/dist/cjs/v2/Settings.js.map +1 -1
- package/dist/cjs/v2/Sidebar.js +102 -117
- package/dist/cjs/v2/Sidebar.js.map +1 -1
- package/dist/cjs/v2/SubHeader.js +31 -43
- package/dist/cjs/v2/SubHeader.js.map +1 -1
- package/dist/useKeyboardShortcutsPaneState-dNIbb_PI.js +37 -0
- package/dist/useKeyboardShortcutsPaneState-dNIbb_PI.js.map +1 -0
- package/dist/v2/AuditLogs.js +20 -81
- package/dist/v2/AuditLogs.js.map +1 -1
- package/dist/v2/Breadcrumbs.js +1 -1
- package/dist/v2/Breadcrumbs.js.map +1 -1
- package/dist/v2/Columns.js +2 -1
- package/dist/v2/Columns.js.map +1 -1
- package/dist/v2/ConfigurePageSidebar.js +3 -2
- package/dist/v2/ConfigurePageSidebar.js.map +1 -1
- package/dist/v2/CopyToClipboardButton.js +13 -19
- package/dist/v2/CopyToClipboardButton.js.map +1 -1
- package/dist/v2/FloatingActionMenu.js +33 -56
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/dist/v2/Header.js +2 -1
- package/dist/v2/Header.js.map +1 -1
- package/dist/v2/HelpPopover.js +53 -56
- package/dist/v2/HelpPopover.js.map +1 -1
- package/dist/v2/KeyboardShortcuts.js +12 -50
- package/dist/v2/KeyboardShortcuts.js.map +1 -1
- package/dist/v2/MoreDropdown.js +61 -80
- package/dist/v2/MoreDropdown.js.map +1 -1
- package/dist/v2/Settings.js +1 -0
- package/dist/v2/Settings.js.map +1 -1
- package/dist/v2/Sidebar.js +88 -103
- package/dist/v2/Sidebar.js.map +1 -1
- package/dist/v2/SubHeader.js +32 -44
- package/dist/v2/SubHeader.js.map +1 -1
- package/package.json +5 -3
- package/dist/Columns-cUgR6NTO.js.map +0 -1
- package/dist/cjs/Columns-D3eocaeY.js.map +0 -1
package/dist/cjs/v2/SubHeader.js
CHANGED
|
@@ -8,7 +8,7 @@ var ramda = require('ramda');
|
|
|
8
8
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
9
9
|
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
10
10
|
var reactI18next = require('react-i18next');
|
|
11
|
-
var Columns$1 = require('../Columns-
|
|
11
|
+
var Columns$1 = require('../Columns-ZySdkGqV.js');
|
|
12
12
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
13
13
|
require('@tanstack/react-query');
|
|
14
14
|
require('@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation');
|
|
@@ -18,6 +18,7 @@ var createLucideIcon = require('../createLucideIcon-DBDhE7kE.js');
|
|
|
18
18
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
19
19
|
var NeetoFilters = require('@bigbinary/neeto-filters-frontend/Filters');
|
|
20
20
|
require('@babel/runtime/helpers/slicedToArray');
|
|
21
|
+
require('@bigbinary/neeto-atoms/primitives');
|
|
21
22
|
require('@dnd-kit/core');
|
|
22
23
|
require('@dnd-kit/sortable');
|
|
23
24
|
require('i18next');
|
|
@@ -88,29 +89,23 @@ var Columns = function Columns(_ref) {
|
|
|
88
89
|
t = _useTranslation.t;
|
|
89
90
|
var tooltipContent = t("neetoMolecules.columns.columns");
|
|
90
91
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
91
|
-
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}, props)))
|
|
109
|
-
})
|
|
110
|
-
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.TooltipContent, {
|
|
111
|
-
side: "bottom",
|
|
112
|
-
children: tooltipContent
|
|
113
|
-
})]
|
|
92
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tooltip, {
|
|
93
|
+
content: tooltipContent,
|
|
94
|
+
position: "bottom",
|
|
95
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
96
|
+
className: "inline-flex",
|
|
97
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Columns$1.Columns, _objectSpread$3({
|
|
98
|
+
isSearchable: true,
|
|
99
|
+
buttonProps: _objectSpread$3({
|
|
100
|
+
icon: Columns3,
|
|
101
|
+
"data-testid": "columns-dropdown-button"
|
|
102
|
+
}, buttonProps)
|
|
103
|
+
}, _objectSpread$3({
|
|
104
|
+
allowConfigurationResetOnUpdate: allowConfigurationResetOnUpdate,
|
|
105
|
+
columnData: columnData,
|
|
106
|
+
onMutationSuccess: onMutationSuccess,
|
|
107
|
+
tableKey: tableKey
|
|
108
|
+
}, props)))
|
|
114
109
|
})
|
|
115
110
|
})
|
|
116
111
|
});
|
|
@@ -134,25 +129,18 @@ var DownloadButton = function DownloadButton(_ref) {
|
|
|
134
129
|
var resolvedTooltipContent = tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : t("neetoMolecules.common.download");
|
|
135
130
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
136
131
|
className: "relative",
|
|
137
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
})
|
|
150
|
-
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.TooltipContent, {
|
|
151
|
-
side: "bottom",
|
|
152
|
-
children: resolvedTooltipContent
|
|
153
|
-
})]
|
|
154
|
-
}))
|
|
155
|
-
}), count && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
132
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tooltip, _objectSpread$2(_objectSpread$2({
|
|
133
|
+
content: resolvedTooltipContent,
|
|
134
|
+
position: "bottom"
|
|
135
|
+
}, restTooltipProps), {}, {
|
|
136
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
137
|
+
onClick: onClick,
|
|
138
|
+
"data-testid": neetoCist.isPresent(dataTestid) ? dataTestid : "download-button",
|
|
139
|
+
icon: Download,
|
|
140
|
+
size: "icon",
|
|
141
|
+
variant: "ghost"
|
|
142
|
+
})
|
|
143
|
+
})), count && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
156
144
|
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]",
|
|
157
145
|
children: count
|
|
158
146
|
})]
|
|
@@ -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 {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} 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 <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\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 </TooltipTrigger>\n <TooltipContent side=\"bottom\">{tooltipContent}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n </div>\n );\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport {\n Button,\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} 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 <TooltipProvider>\n <Tooltip {...restTooltipProps}>\n <TooltipTrigger asChild>\n <Button\n {...{ onClick }}\n size=\"icon\"\n variant=\"ghost\"\n data-testid={\n isPresent(dataTestid) ? dataTestid : \"download-button\"\n }\n >\n <Download size={16} />\n </Button>\n </TooltipTrigger>\n <TooltipContent side=\"bottom\">\n {resolvedTooltipContent}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\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\";\n\nconst FilterButton = withT(({ t, buttonProps, ...props }) => (\n <div>\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\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(\n \"--neeto-molecules-effective-subheader-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\n \"--neeto-molecules-effective-subheader-height\"\n );\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","TooltipProvider","_jsxs","Tooltip","TooltipTrigger","asChild","className","ManageColumns","_objectSpread","isSearchable","icon","Columns3","TooltipContent","side","displayName","DownloadButton","count","onClick","_ref$dataTestid","dataTestid","_ref$tooltipProps","tooltipProps","content","restTooltipProps","resolvedTooltipContent","Button","size","variant","isPresent","Download","FilterButton","withT","NeetoFilters","Filter","style","position","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","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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,gBAAgB;AAAAN,QAAAA,QAAA,EAE3BmD;OACE;AACN,KACE,CAAC,EACLC,gBAAgB,iBACfrD,cAAA,CAAA,KAAA,EAAA;AACEO,MAAAA,SAAS,EAAC,8DAA8D;AACxE,MAAA,aAAA,EAAY,iBAAiB;AAAAN,MAAAA,QAAA,EAE5BoD;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 { 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","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport { 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\";\n\nconst FilterButton = withT(({ t, buttonProps, ...props }) => (\n <div>\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\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(\n \"--neeto-molecules-effective-subheader-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\n \"--neeto-molecules-effective-subheader-height\"\n );\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","style","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","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,EAAE,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE;AAChD,CAAC;AACD,MAAM,QAAQ,GAAGC,iCAAgB,CAAC,UAAU,E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FD,cAAA,CAAA,KAAA,EAAA;AAAKK,MAAAA,SAAS,EAAC,WAAW;AAAC,MAAA,aAAA,EAAY,wBAAwB;MAAAJ,QAAA,EAC5D8C,eAAe,iBACd/C,cAAA,CAAA,KAAA,EAAA;AACEK,QAAAA,SAAS,EAAC,0CAA0C;AACpD,QAAA,aAAA,EAAY,gBAAgB;AAAAJ,QAAAA,QAAA,EAE3B8C;OACE;AACN,KACE,CAAC,EACLC,gBAAgB,iBACfhD,cAAA,CAAA,KAAA,EAAA;AACEK,MAAAA,SAAS,EAAC,8DAA8D;AACxE,MAAA,aAAA,EAAY,iBAAiB;AAAAJ,MAAAA,QAAA,EAE5B+C;AAAgB,KACd,CACN;AAAA,GACE,CAAC;AAEV;AAEAH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useShallow } from 'zustand/shallow';
|
|
2
|
+
import withImmutableActions from '@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions';
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
|
|
5
|
+
/** @type {import("neetocommons/react-utils").ZustandStoreHook} */
|
|
6
|
+
var useKeyboardShortcutsStore = create(withImmutableActions(function (set) {
|
|
7
|
+
return {
|
|
8
|
+
isOpen: false,
|
|
9
|
+
setIsOpen: function setIsOpen(arg) {
|
|
10
|
+
if (typeof arg === "function") {
|
|
11
|
+
set(function (state) {
|
|
12
|
+
return {
|
|
13
|
+
isOpen: arg(state.isOpen)
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
} else {
|
|
17
|
+
set({
|
|
18
|
+
isOpen: arg
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}));
|
|
24
|
+
var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
|
|
25
|
+
var _useKeyboardShortcuts = useKeyboardShortcutsStore(useShallow(function (store) {
|
|
26
|
+
return {
|
|
27
|
+
isOpen: store["isOpen"],
|
|
28
|
+
setIsOpen: store["setIsOpen"]
|
|
29
|
+
};
|
|
30
|
+
})),
|
|
31
|
+
isOpen = _useKeyboardShortcuts.isOpen,
|
|
32
|
+
setIsOpen = _useKeyboardShortcuts.setIsOpen;
|
|
33
|
+
return [isOpen, setIsOpen];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { useKeyboardShortcutsPaneState as u };
|
|
37
|
+
//# sourceMappingURL=useKeyboardShortcutsPaneState-dNIbb_PI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardShortcutsPaneState-dNIbb_PI.js","sources":["../src/v2/components/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js"],"sourcesContent":["import withImmutableActions from \"neetocommons/react-utils/withImmutableActions\";\nimport { create } from \"zustand\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useKeyboardShortcutsStore = create(\n withImmutableActions(set => ({\n isOpen: false,\n\n setIsOpen: arg => {\n if (typeof arg === \"function\") {\n set(state => ({ isOpen: arg(state.isOpen) }));\n } else {\n set({ isOpen: arg });\n }\n },\n }))\n);\n\nconst useKeyboardShortcutsPaneState = () => {\n const { isOpen, setIsOpen } = useKeyboardShortcutsStore.pick();\n\n return [isOpen, setIsOpen];\n};\n\nexport default useKeyboardShortcutsPaneState;\n"],"names":["useKeyboardShortcutsStore","create","withImmutableActions","set","isOpen","setIsOpen","arg","state","useKeyboardShortcutsPaneState","_useKeyboardShortcuts","useShallow","store"],"mappings":";;;;AAGA;AACA,IAAMA,yBAAyB,GAAGC,MAAM,CACtCC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC3BC,IAAAA,MAAM,EAAE,KAAK;AAEbC,IAAAA,SAAS,EAAE,SAAXA,SAASA,CAAEC,GAAG,EAAI;AAChB,MAAA,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;QAC7BH,GAAG,CAAC,UAAAI,KAAK,EAAA;UAAA,OAAK;AAAEH,YAAAA,MAAM,EAAEE,GAAG,CAACC,KAAK,CAACH,MAAM;WAAG;AAAA,QAAA,CAAC,CAAC;AAC/C,MAAA,CAAC,MAAM;AACLD,QAAAA,GAAG,CAAC;AAAEC,UAAAA,MAAM,EAAEE;AAAI,SAAC,CAAC;AACtB,MAAA;AACF,IAAA;GACD;AAAA,CAAC,CACJ,CAAC;AAED,IAAME,6BAA6B,GAAG,SAAhCA,6BAA6BA,GAAS;AAC1C,EAAA,IAAAC,qBAAA,GAAAT,yBAAA,CAAAU,UAAA,WAAAC,KAAA,EAAA;AAAA,MAAA,OAAA;AAAQP,QAAAA,MAAM,EAAAO,KAAA,CAAA,QAAA,CAAA;AAAEN,QAAAA,SAAS,EAAAM,KAAA,CAAA,WAAA;AAAA,OAAA;AAAA,IAAA,CAAA,CAAA,CAAA;IAAjBP,MAAM,GAAAK,qBAAA,CAANL,MAAM;IAAEC,SAAS,GAAAI,qBAAA,CAATJ,SAAS;AAEzB,EAAA,OAAO,CAACD,MAAM,EAAEC,SAAS,CAAC;AAC5B;;;;"}
|
package/dist/v2/AuditLogs.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import { useMemo, createElement } from 'react';
|
|
3
|
-
import { Typography,
|
|
4
|
-
import classnames from 'classnames';
|
|
3
|
+
import { Typography, Spinner, Pagination } from '@bigbinary/neeto-atoms';
|
|
5
4
|
import { snakeToCamelCase, humanize, isPresent, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
6
5
|
import { LANGUAGE_OPTIONS, DEFAULT_STALE_TIME, DEFAULT_PAGE_INDEX } from '@bigbinary/neeto-commons-frontend/constants';
|
|
7
6
|
import { useQueryParams } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
@@ -9,6 +8,7 @@ import { buildUrl } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
|
9
8
|
import { indexBy, prop, omit, isEmpty, identity, mergeLeft } from 'ramda';
|
|
10
9
|
import { Trans as Trans$1, useTranslation } from 'react-i18next';
|
|
11
10
|
import { useHistory, useLocation } from 'react-router-dom';
|
|
11
|
+
import classnames from 'classnames';
|
|
12
12
|
import { dateFormat } from '@bigbinary/neeto-commons-frontend/utils';
|
|
13
13
|
import Apple from '@bigbinary/neeto-icons/misc/Apple';
|
|
14
14
|
import GoogleCalendar from '@bigbinary/neeto-icons/misc/GoogleCalendar';
|
|
@@ -32,6 +32,7 @@ import Header from './Header.js';
|
|
|
32
32
|
import '../index-DAYCJu79.js';
|
|
33
33
|
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
34
34
|
import './Breadcrumbs.js';
|
|
35
|
+
import '@bigbinary/neeto-atoms/primitives';
|
|
35
36
|
import './HelpPopover.js';
|
|
36
37
|
import '../circle-question-mark-Dib48f5Z.js';
|
|
37
38
|
import './MoreDropdown.js';
|
|
@@ -678,14 +679,11 @@ var Card = function Card(_ref) {
|
|
|
678
679
|
"rounded-t-md border-t": index === 0,
|
|
679
680
|
"rounded-b-md": index === totalCount - 1
|
|
680
681
|
}),
|
|
681
|
-
children: [/*#__PURE__*/jsx(
|
|
682
|
-
className: "mt-0.5 size-9 shrink-0",
|
|
683
|
-
children: /*#__PURE__*/jsx(
|
|
684
|
-
className: "
|
|
685
|
-
|
|
686
|
-
className: "text-muted-foreground",
|
|
687
|
-
size: 18
|
|
688
|
-
})
|
|
682
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
683
|
+
className: "bg-muted neeto-ui-rounded-full mt-0.5 flex size-9 shrink-0 items-center justify-center",
|
|
684
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
685
|
+
className: "text-muted-foreground",
|
|
686
|
+
size: 18
|
|
689
687
|
})
|
|
690
688
|
}), /*#__PURE__*/jsxs("div", {
|
|
691
689
|
className: "flex min-w-0 flex-col gap-y-1",
|
|
@@ -756,89 +754,30 @@ var useFetchPermissions = function useFetchPermissions() {
|
|
|
756
754
|
|
|
757
755
|
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; }
|
|
758
756
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).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; }
|
|
759
|
-
var
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
if (totalPages <= 7) {
|
|
764
|
-
for (var i = 1; i <= totalPages; i++) pages.push(i);
|
|
765
|
-
return pages;
|
|
766
|
-
}
|
|
767
|
-
pages.push(1);
|
|
768
|
-
if (currentPage > 3) {
|
|
769
|
-
pages.push("ellipsis-start");
|
|
770
|
-
}
|
|
771
|
-
var start = Math.max(2, currentPage - 1);
|
|
772
|
-
var end = Math.min(totalPages - 1, currentPage + 1);
|
|
773
|
-
for (var _i = start; _i <= end; _i++) pages.push(_i);
|
|
774
|
-
if (currentPage < totalPages - 2) {
|
|
775
|
-
pages.push("ellipsis-end");
|
|
776
|
-
}
|
|
777
|
-
pages.push(totalPages);
|
|
778
|
-
return pages;
|
|
779
|
-
};
|
|
780
|
-
var AuditLogsPagination = function AuditLogsPagination(_ref2) {
|
|
781
|
-
var count = _ref2.count,
|
|
782
|
-
pageNo = _ref2.pageNo,
|
|
783
|
-
pageSize = _ref2.pageSize;
|
|
757
|
+
var AuditLogsPagination = function AuditLogsPagination(_ref) {
|
|
758
|
+
var count = _ref.count,
|
|
759
|
+
pageNo = _ref.pageNo,
|
|
760
|
+
pageSize = _ref.pageSize;
|
|
784
761
|
var history = useHistory();
|
|
785
762
|
var _useLocation = useLocation(),
|
|
786
763
|
pathname = _useLocation.pathname;
|
|
787
764
|
var queryParams = useQueryParams();
|
|
788
|
-
var totalPages = Math.ceil(count / pageSize);
|
|
789
|
-
if (totalPages <= 1) return null;
|
|
790
|
-
var pages = getPageNumbers({
|
|
791
|
-
currentPage: pageNo,
|
|
792
|
-
totalPages: totalPages
|
|
793
|
-
});
|
|
794
765
|
var navigateToPage = function navigateToPage(page) {
|
|
795
766
|
history.push(buildUrl(pathname, mergeLeft({
|
|
796
767
|
page: page
|
|
797
768
|
}, queryParams)));
|
|
798
769
|
};
|
|
799
770
|
return /*#__PURE__*/jsx(Pagination, {
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
"pointer-events-none opacity-50": pageNo <= 1,
|
|
805
|
-
"cursor-pointer": !(pageNo <= 1)
|
|
806
|
-
}),
|
|
807
|
-
onClick: function onClick() {
|
|
808
|
-
return pageNo > 1 && navigateToPage(pageNo - 1);
|
|
809
|
-
}
|
|
810
|
-
})
|
|
811
|
-
}), pages.map(function (page) {
|
|
812
|
-
return typeof page === "string" ? /*#__PURE__*/jsx(PaginationItem, {
|
|
813
|
-
children: /*#__PURE__*/jsx(PaginationEllipsis, {})
|
|
814
|
-
}, page) : /*#__PURE__*/jsx(PaginationItem, {
|
|
815
|
-
children: /*#__PURE__*/jsx(PaginationLink, {
|
|
816
|
-
className: "cursor-pointer",
|
|
817
|
-
isActive: page === pageNo,
|
|
818
|
-
onClick: function onClick() {
|
|
819
|
-
return navigateToPage(page);
|
|
820
|
-
},
|
|
821
|
-
children: page
|
|
822
|
-
})
|
|
823
|
-
}, page);
|
|
824
|
-
}), /*#__PURE__*/jsx(PaginationItem, {
|
|
825
|
-
children: /*#__PURE__*/jsx(PaginationNext, {
|
|
826
|
-
className: classnames({
|
|
827
|
-
"pointer-events-none opacity-50": pageNo >= totalPages,
|
|
828
|
-
"cursor-pointer": !(pageNo >= totalPages)
|
|
829
|
-
}),
|
|
830
|
-
onClick: function onClick() {
|
|
831
|
-
return pageNo < totalPages && navigateToPage(pageNo + 1);
|
|
832
|
-
}
|
|
833
|
-
})
|
|
834
|
-
})]
|
|
835
|
-
})
|
|
771
|
+
count: count,
|
|
772
|
+
pageNo: pageNo,
|
|
773
|
+
pageSize: pageSize,
|
|
774
|
+
navigate: navigateToPage
|
|
836
775
|
});
|
|
837
776
|
};
|
|
838
|
-
var AuditLogs = function AuditLogs(
|
|
839
|
-
var headerProps =
|
|
840
|
-
noDataHelpText =
|
|
841
|
-
noDataTitle =
|
|
777
|
+
var AuditLogs = function AuditLogs(_ref2) {
|
|
778
|
+
var headerProps = _ref2.headerProps,
|
|
779
|
+
noDataHelpText = _ref2.noDataHelpText,
|
|
780
|
+
noDataTitle = _ref2.noDataTitle;
|
|
842
781
|
var _useTranslation = useTranslation(),
|
|
843
782
|
t = _useTranslation.t;
|
|
844
783
|
var _useQueryParams = useQueryParams(),
|