@natoora-libs/core 0.2.38 → 0.2.40

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.
@@ -1,11 +1,11 @@
1
- import {
2
- useDynamicScroll
3
- } from "../chunk-IXEF6LYV.js";
4
1
  import {
5
2
  Loading_default,
6
3
  colors,
7
4
  isDarkModeEnabled
8
5
  } from "../chunk-CKW5LT7K.js";
6
+ import {
7
+ useDynamicScroll
8
+ } from "../chunk-IXEF6LYV.js";
9
9
  import {
10
10
  getFlattenedFiltersLabels,
11
11
  getSelectOptionFromKeyPress
@@ -15,9 +15,9 @@ import {
15
15
  __toESM
16
16
  } from "../chunk-5WRI5ZAA.js";
17
17
 
18
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js
18
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObject.js
19
19
  var require_isObject = __commonJS({
20
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObject.js"(exports, module) {
20
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObject.js"(exports, module) {
21
21
  function isObject(value) {
22
22
  var type = typeof value;
23
23
  return value != null && (type == "object" || type == "function");
@@ -26,17 +26,17 @@ var require_isObject = __commonJS({
26
26
  }
27
27
  });
28
28
 
29
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js
29
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_freeGlobal.js
30
30
  var require_freeGlobal = __commonJS({
31
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_freeGlobal.js"(exports, module) {
31
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_freeGlobal.js"(exports, module) {
32
32
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
33
33
  module.exports = freeGlobal;
34
34
  }
35
35
  });
36
36
 
37
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js
37
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_root.js
38
38
  var require_root = __commonJS({
39
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_root.js"(exports, module) {
39
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_root.js"(exports, module) {
40
40
  var freeGlobal = require_freeGlobal();
41
41
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
42
42
  var root = freeGlobal || freeSelf || Function("return this")();
@@ -44,9 +44,9 @@ var require_root = __commonJS({
44
44
  }
45
45
  });
46
46
 
47
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js
47
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/now.js
48
48
  var require_now = __commonJS({
49
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/now.js"(exports, module) {
49
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/now.js"(exports, module) {
50
50
  var root = require_root();
51
51
  var now = function() {
52
52
  return root.Date.now();
@@ -55,9 +55,9 @@ var require_now = __commonJS({
55
55
  }
56
56
  });
57
57
 
58
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js
58
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_trimmedEndIndex.js
59
59
  var require_trimmedEndIndex = __commonJS({
60
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_trimmedEndIndex.js"(exports, module) {
60
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_trimmedEndIndex.js"(exports, module) {
61
61
  var reWhitespace = /\s/;
62
62
  function trimmedEndIndex(string) {
63
63
  var index = string.length;
@@ -69,9 +69,9 @@ var require_trimmedEndIndex = __commonJS({
69
69
  }
70
70
  });
71
71
 
72
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js
72
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTrim.js
73
73
  var require_baseTrim = __commonJS({
74
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseTrim.js"(exports, module) {
74
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTrim.js"(exports, module) {
75
75
  var trimmedEndIndex = require_trimmedEndIndex();
76
76
  var reTrimStart = /^\s+/;
77
77
  function baseTrim(string) {
@@ -81,18 +81,18 @@ var require_baseTrim = __commonJS({
81
81
  }
82
82
  });
83
83
 
84
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js
84
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js
85
85
  var require_Symbol = __commonJS({
86
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_Symbol.js"(exports, module) {
86
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js"(exports, module) {
87
87
  var root = require_root();
88
88
  var Symbol = root.Symbol;
89
89
  module.exports = Symbol;
90
90
  }
91
91
  });
92
92
 
93
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js
93
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getRawTag.js
94
94
  var require_getRawTag = __commonJS({
95
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_getRawTag.js"(exports, module) {
95
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getRawTag.js"(exports, module) {
96
96
  var Symbol = require_Symbol();
97
97
  var objectProto = Object.prototype;
98
98
  var hasOwnProperty = objectProto.hasOwnProperty;
@@ -119,9 +119,9 @@ var require_getRawTag = __commonJS({
119
119
  }
120
120
  });
121
121
 
122
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js
122
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_objectToString.js
123
123
  var require_objectToString = __commonJS({
124
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_objectToString.js"(exports, module) {
124
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_objectToString.js"(exports, module) {
125
125
  var objectProto = Object.prototype;
126
126
  var nativeObjectToString = objectProto.toString;
127
127
  function objectToString(value) {
@@ -131,9 +131,9 @@ var require_objectToString = __commonJS({
131
131
  }
132
132
  });
133
133
 
134
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js
134
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetTag.js
135
135
  var require_baseGetTag = __commonJS({
136
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/_baseGetTag.js"(exports, module) {
136
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetTag.js"(exports, module) {
137
137
  var Symbol = require_Symbol();
138
138
  var getRawTag = require_getRawTag();
139
139
  var objectToString = require_objectToString();
@@ -150,9 +150,9 @@ var require_baseGetTag = __commonJS({
150
150
  }
151
151
  });
152
152
 
153
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js
153
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js
154
154
  var require_isObjectLike = __commonJS({
155
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isObjectLike.js"(exports, module) {
155
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js"(exports, module) {
156
156
  function isObjectLike(value) {
157
157
  return value != null && typeof value == "object";
158
158
  }
@@ -160,9 +160,9 @@ var require_isObjectLike = __commonJS({
160
160
  }
161
161
  });
162
162
 
163
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js
163
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSymbol.js
164
164
  var require_isSymbol = __commonJS({
165
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/isSymbol.js"(exports, module) {
165
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSymbol.js"(exports, module) {
166
166
  var baseGetTag = require_baseGetTag();
167
167
  var isObjectLike = require_isObjectLike();
168
168
  var symbolTag = "[object Symbol]";
@@ -173,9 +173,9 @@ var require_isSymbol = __commonJS({
173
173
  }
174
174
  });
175
175
 
176
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js
176
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toNumber.js
177
177
  var require_toNumber = __commonJS({
178
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/toNumber.js"(exports, module) {
178
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toNumber.js"(exports, module) {
179
179
  var baseTrim = require_baseTrim();
180
180
  var isObject = require_isObject();
181
181
  var isSymbol = require_isSymbol();
@@ -206,9 +206,9 @@ var require_toNumber = __commonJS({
206
206
  }
207
207
  });
208
208
 
209
- // ../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js
209
+ // ../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/debounce.js
210
210
  var require_debounce = __commonJS({
211
- "../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/debounce.js"(exports, module) {
211
+ "../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/debounce.js"(exports, module) {
212
212
  var isObject = require_isObject();
213
213
  var now = require_now();
214
214
  var toNumber = require_toNumber();
@@ -5757,8 +5757,14 @@ var FixedFooter_default = React4.memo(FixedFooter);
5757
5757
 
5758
5758
  // src/components/GlobalSearchTrigger/GlobalSearchTrigger.tsx
5759
5759
  import { memo as memo14 } from "react";
5760
+ import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
5760
5761
  import SearchRoundedIcon from "@mui/icons-material/SearchRounded";
5761
- import { Box as Box29, InputBase, Paper as Paper3 } from "@mui/material";
5762
+ import {
5763
+ Box as Box29,
5764
+ IconButton as IconButton5,
5765
+ InputBase,
5766
+ Paper as Paper3
5767
+ } from "@mui/material";
5762
5768
  import { alpha as alpha2 } from "@mui/material/styles";
5763
5769
  import { jsx as jsx97, jsxs as jsxs61 } from "react/jsx-runtime";
5764
5770
  var GlobalSearchTrigger = ({
@@ -5776,6 +5782,7 @@ var GlobalSearchTrigger = ({
5776
5782
  ref,
5777
5783
  inputRef
5778
5784
  }) => {
5785
+ const showClearButton = !readOnly && value.length > 0;
5779
5786
  return /* @__PURE__ */ jsxs61(
5780
5787
  Paper3,
5781
5788
  {
@@ -5829,7 +5836,23 @@ var GlobalSearchTrigger = ({
5829
5836
  }
5830
5837
  }
5831
5838
  ),
5832
- /* @__PURE__ */ jsx97(
5839
+ showClearButton ? /* @__PURE__ */ jsx97(
5840
+ IconButton5,
5841
+ {
5842
+ size: "small",
5843
+ "aria-label": "Clear search",
5844
+ onMouseDown: (event) => event.preventDefault(),
5845
+ onClick: () => onChange?.(""),
5846
+ sx: {
5847
+ color: alpha2(colors.white, 0.72),
5848
+ p: 0.25,
5849
+ "&:hover": {
5850
+ color: colors.white
5851
+ }
5852
+ },
5853
+ children: /* @__PURE__ */ jsx97(CloseRoundedIcon, { sx: { fontSize: 18 } })
5854
+ }
5855
+ ) : /* @__PURE__ */ jsx97(
5833
5856
  Box29,
5834
5857
  {
5835
5858
  sx: {
@@ -8066,7 +8089,7 @@ var SearchHeader = ({
8066
8089
  // src/components/SectionName/SectionName.tsx
8067
8090
  import HistoryIcon from "@mui/icons-material/History";
8068
8091
  import InfoIcon from "@mui/icons-material/Info";
8069
- import { Box as Box40, Divider as Divider10, IconButton as IconButton5, Tooltip as Tooltip10, Typography as Typography28 } from "@mui/material";
8092
+ import { Box as Box40, Divider as Divider10, IconButton as IconButton6, Tooltip as Tooltip10, Typography as Typography28 } from "@mui/material";
8070
8093
  import { makeStyles as makeStyles42 } from "tss-react/mui";
8071
8094
  import { jsx as jsx119, jsxs as jsxs82 } from "react/jsx-runtime";
8072
8095
  var useStyles42 = makeStyles42()((theme) => ({
@@ -8159,7 +8182,7 @@ var SectionName = ({
8159
8182
  }
8160
8183
  ) : null,
8161
8184
  openHistoryLog && buttonText && /* @__PURE__ */ jsx119(Divider10, { orientation: "vertical", sx: { height: "24px" } }),
8162
- openHistoryLog && /* @__PURE__ */ jsx119(IconButton5, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ jsx119(HistoryIcon, {}) })
8185
+ openHistoryLog && /* @__PURE__ */ jsx119(IconButton6, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ jsx119(HistoryIcon, {}) })
8163
8186
  ] })
8164
8187
  ] });
8165
8188
  };
@@ -9854,9 +9877,10 @@ var TableDesktopEditableField = ({
9854
9877
  {
9855
9878
  defaultValue: editInitialValue ? moment2(editInitialValue, "HH:mm:ss") : void 0,
9856
9879
  label: inputLabel,
9880
+ format: "DD/MM/YYYY",
9857
9881
  onAccept: (value) => {
9858
9882
  const formattedValue = value?.format("YYYY-MM-DD") ?? null;
9859
- const formattedLabel = value?.format("L") ?? null;
9883
+ const formattedLabel = value?.format("DD/MM/YYYY") ?? null;
9860
9884
  onUpdateEditableCell?.({
9861
9885
  rowId,
9862
9886
  columnId,
@@ -10012,7 +10036,7 @@ import { useEffect as useEffect16, useState as useState25 } from "react";
10012
10036
  import CheckIcon3 from "@mui/icons-material/Check";
10013
10037
  import CloseIcon from "@mui/icons-material/Close";
10014
10038
  import EditIcon from "@mui/icons-material/Edit";
10015
- import { IconButton as IconButton6, TableCell as TableCell6, Tooltip as Tooltip12 } from "@mui/material";
10039
+ import { IconButton as IconButton7, TableCell as TableCell6, Tooltip as Tooltip12 } from "@mui/material";
10016
10040
  import { Fragment as Fragment16, jsx as jsx140, jsxs as jsxs94 } from "react/jsx-runtime";
10017
10041
  var getReadOnlyBooleanIcon = (value) => {
10018
10042
  if (value) {
@@ -10076,7 +10100,7 @@ var TableDesktopCell = ({
10076
10100
  },
10077
10101
  children: /* @__PURE__ */ jsx140(DynamicOverflowTooltip, { tooltipDescription: String(readOnlyValue), arrow: true, children: /* @__PURE__ */ jsxs94(Fragment16, { children: [
10078
10102
  enableEditMode && isCellHovered ? /* @__PURE__ */ jsx140(Tooltip12, { title: isCellInEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ jsx140(
10079
- IconButton6,
10103
+ IconButton7,
10080
10104
  {
10081
10105
  onClick: handleEditClick,
10082
10106
  sx: {
@@ -10122,7 +10146,7 @@ import {
10122
10146
  Button as Button19,
10123
10147
  Divider as Divider11,
10124
10148
  FormControlLabel as FormControlLabel7,
10125
- IconButton as IconButton7,
10149
+ IconButton as IconButton8,
10126
10150
  Switch as Switch2,
10127
10151
  Tooltip as Tooltip13,
10128
10152
  Typography as Typography36
@@ -10242,7 +10266,7 @@ var TableDesktopToolbar = ({
10242
10266
  }
10243
10267
  ),
10244
10268
  isScrollable && /* @__PURE__ */ jsx141(
10245
- IconButton7,
10269
+ IconButton8,
10246
10270
  {
10247
10271
  "aria-label": "scroll-left",
10248
10272
  sx: { padding: 0, alignSelf: "center" },
@@ -10293,7 +10317,7 @@ var TableDesktopToolbar = ({
10293
10317
  }
10294
10318
  ),
10295
10319
  isScrollable && /* @__PURE__ */ jsx141(
10296
- IconButton7,
10320
+ IconButton8,
10297
10321
  {
10298
10322
  "aria-label": "scroll-right",
10299
10323
  sx: { p: 0, alignSelf: "center" },
@@ -10329,7 +10353,7 @@ var TableDesktopToolbar = ({
10329
10353
  ] }) : /* @__PURE__ */ jsxs95(Box48, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
10330
10354
  renderInfoIcons,
10331
10355
  renderExportCsvDialog ? /* @__PURE__ */ jsx141(Tooltip13, { title: "Download List", children: /* @__PURE__ */ jsx141("span", { style: { display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx141(
10332
- IconButton7,
10356
+ IconButton8,
10333
10357
  {
10334
10358
  disableRipple: true,
10335
10359
  disabled: isDataEmpty,
@@ -10339,7 +10363,7 @@ var TableDesktopToolbar = ({
10339
10363
  }
10340
10364
  ) }) }) : null,
10341
10365
  renderTableColumnConfigurationMenu ? /* @__PURE__ */ jsx141(Tooltip13, { title: "Table Column Configuration", children: /* @__PURE__ */ jsx141(
10342
- IconButton7,
10366
+ IconButton8,
10343
10367
  {
10344
10368
  disableRipple: true,
10345
10369
  "aria-label": "table-column-config-button",
@@ -10626,7 +10650,10 @@ var useStyles49 = makeStyles49()((theme) => ({
10626
10650
  topBar: {
10627
10651
  display: "flex",
10628
10652
  gap: theme.spacing(1),
10629
- backgroundColor: colors.topBar
10653
+ backgroundColor: colors.topBar,
10654
+ [theme.breakpoints.down("xl")]: {
10655
+ gap: theme.spacing(0.5)
10656
+ }
10630
10657
  }
10631
10658
  }));
10632
10659
  var TheToolbar = ({
@@ -10651,7 +10678,7 @@ var TheToolbar = ({
10651
10678
  onClick: handleOpen
10652
10679
  }
10653
10680
  ) : null,
10654
- /* @__PURE__ */ jsx145(
10681
+ /* @__PURE__ */ jsx145(Box50, { sx: { display: { xs: "none", lg: "block" }, flexShrink: 0 }, children: /* @__PURE__ */ jsx145(
10655
10682
  CompanyLogo_default,
10656
10683
  {
10657
10684
  size: "small",
@@ -10659,8 +10686,15 @@ var TheToolbar = ({
10659
10686
  imageLogoDarkSmall,
10660
10687
  imageLogoLightSmall
10661
10688
  }
10689
+ ) }),
10690
+ /* @__PURE__ */ jsx145(
10691
+ Box50,
10692
+ {
10693
+ ml: { xs: 0, lg: 2 },
10694
+ sx: { display: { xs: "none", xl: "block" }, flexShrink: 0 },
10695
+ children: leftSection
10696
+ }
10662
10697
  ),
10663
- /* @__PURE__ */ jsx145(Box50, { ml: 2, children: leftSection }),
10664
10698
  centerSection ? /* @__PURE__ */ jsx145(
10665
10699
  Box50,
10666
10700
  {
@@ -10673,7 +10707,7 @@ var TheToolbar = ({
10673
10707
  children: centerSection
10674
10708
  }
10675
10709
  ) : /* @__PURE__ */ jsx145(Box50, { sx: { flexGrow: 1 } }),
10676
- /* @__PURE__ */ jsx145(Box50, { children: rightSection })
10710
+ /* @__PURE__ */ jsx145(Box50, { sx: { flexShrink: 0 }, children: rightSection })
10677
10711
  ] }) }),
10678
10712
  LeftDrawer
10679
10713
  ] });