@natoora-libs/core 0.0.31 → 0.0.33

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.
@@ -879,9 +879,9 @@ var FilledButtonLg = ({
879
879
  loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
880
880
  import_material9.CircularProgress,
881
881
  {
882
- color: loadingProps?.color || "inherit",
883
- size: loadingProps?.size || 22,
884
- style: { marginLeft: "15px", ...loadingProps?.style }
882
+ color: (loadingProps == null ? void 0 : loadingProps.color) || "inherit",
883
+ size: (loadingProps == null ? void 0 : loadingProps.size) || 22,
884
+ style: { marginLeft: "15px", ...loadingProps == null ? void 0 : loadingProps.style }
885
885
  }
886
886
  )
887
887
  ]
@@ -3357,68 +3357,71 @@ var LeftDrawer = ({ handleClose, handleOpen, open }) => {
3357
3357
  ] }) }),
3358
3358
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.List, { children: filteredDrawerAppList.map((group) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react57.default.Fragment, { children: [
3359
3359
  /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.ListSubheader, { disableSticky: true, className: classes.subheader, children: group.groupName }),
3360
- group.apps.map((app) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react57.default.Fragment, { children: [
3361
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3362
- import_material13.ListItem,
3363
- {
3364
- title: app.url,
3365
- onClick: () => {
3366
- if (app.routeName === "logout") {
3367
- }
3368
- return window.location.assign(app.url);
3369
- },
3370
- children: [
3371
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_Icon.default, { className: classes.iconMenu, children: app.icon }) }),
3372
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3373
- import_material13.ListItemText,
3374
- {
3375
- className: classes.appName,
3376
- primary: app.name,
3377
- slotProps: {
3378
- primary: { variant: "body2" }
3379
- }
3380
- }
3381
- ),
3382
- app.children?.length > 0 && (openCollapse[app.routeName] ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3383
- import_icons_material3.ExpandLess,
3384
- {
3385
- "data-testid": "svg-close-collapse",
3386
- onClick: (e) => handleCollapse(e, app.routeName)
3387
- }
3388
- ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3389
- import_icons_material3.ExpandMore,
3390
- {
3391
- "data-testid": "svg-open-collapse",
3392
- onClick: (e) => handleCollapse(e, app.routeName)
3360
+ group.apps.map((app) => {
3361
+ var _a, _b;
3362
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react57.default.Fragment, { children: [
3363
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3364
+ import_material13.ListItem,
3365
+ {
3366
+ title: app.url,
3367
+ onClick: () => {
3368
+ if (app.routeName === "logout") {
3393
3369
  }
3394
- ))
3395
- ]
3396
- },
3397
- app.name
3398
- ),
3399
- app.children?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.Collapse, { in: openCollapse[app.routeName], children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.List, { children: app.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3400
- import_material13.ListItemButton,
3401
- {
3402
- className: classes.nested,
3403
- disabled: child.disabled,
3404
- onClick: () => window.location.assign(app.url),
3405
- title: app.url,
3406
- children: [
3407
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_icons_material3.FiberManualRecord, { style: { height: 12 } }) }),
3408
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3409
- import_material13.ListItemText,
3410
- {
3411
- primary: child.name,
3412
- slotProps: {
3413
- primary: { variant: "body2" }
3370
+ return window.location.assign(app.url);
3371
+ },
3372
+ children: [
3373
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_Icon.default, { className: classes.iconMenu, children: app.icon }) }),
3374
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3375
+ import_material13.ListItemText,
3376
+ {
3377
+ className: classes.appName,
3378
+ primary: app.name,
3379
+ slotProps: {
3380
+ primary: { variant: "body2" }
3381
+ }
3414
3382
  }
3415
- }
3416
- )
3417
- ]
3418
- },
3419
- child.name
3420
- )) }) })
3421
- ] }, `${group.groupName} ${app.name}`))
3383
+ ),
3384
+ ((_a = app.children) == null ? void 0 : _a.length) > 0 && (openCollapse[app.routeName] ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3385
+ import_icons_material3.ExpandLess,
3386
+ {
3387
+ "data-testid": "svg-close-collapse",
3388
+ onClick: (e) => handleCollapse(e, app.routeName)
3389
+ }
3390
+ ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3391
+ import_icons_material3.ExpandMore,
3392
+ {
3393
+ "data-testid": "svg-open-collapse",
3394
+ onClick: (e) => handleCollapse(e, app.routeName)
3395
+ }
3396
+ ))
3397
+ ]
3398
+ },
3399
+ app.name
3400
+ ),
3401
+ ((_b = app.children) == null ? void 0 : _b.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.Collapse, { in: openCollapse[app.routeName], children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.List, { children: app.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
3402
+ import_material13.ListItemButton,
3403
+ {
3404
+ className: classes.nested,
3405
+ disabled: child.disabled,
3406
+ onClick: () => window.location.assign(app.url),
3407
+ title: app.url,
3408
+ children: [
3409
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_material13.ListItemIcon, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_icons_material3.FiberManualRecord, { style: { height: 12 } }) }),
3410
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
3411
+ import_material13.ListItemText,
3412
+ {
3413
+ primary: child.name,
3414
+ slotProps: {
3415
+ primary: { variant: "body2" }
3416
+ }
3417
+ }
3418
+ )
3419
+ ]
3420
+ },
3421
+ child.name
3422
+ )) }) })
3423
+ ] }, `${group.groupName} ${app.name}`);
3424
+ })
3422
3425
  ] }, group.groupName)) })
3423
3426
  ]
3424
3427
  }
@@ -4308,7 +4311,7 @@ var SearchWithFilters = ({
4308
4311
  };
4309
4312
  const handleKeyDown = (e) => {
4310
4313
  if (e.key === "Enter") {
4311
- enterPressedInSearch?.();
4314
+ enterPressedInSearch == null ? void 0 : enterPressedInSearch();
4312
4315
  }
4313
4316
  };
4314
4317
  (0, import_react63.useEffect)(() => {
@@ -4728,10 +4731,10 @@ var TableDesktop = ({
4728
4731
  keyField
4729
4732
  }) => {
4730
4733
  const [order, setOrder] = (0, import_react68.useState)(
4731
- appliedFilters?.sortDir || "desc"
4734
+ (appliedFilters == null ? void 0 : appliedFilters.sortDir) || "desc"
4732
4735
  );
4733
4736
  const [orderBy, setOrderBy] = (0, import_react68.useState)(
4734
- appliedFilters?.sortField || "delivery_date"
4737
+ (appliedFilters == null ? void 0 : appliedFilters.sortField) || "delivery_date"
4735
4738
  );
4736
4739
  const [page] = (0, import_react68.useState)(0);
4737
4740
  const { classes } = useStyles29();
@@ -4824,7 +4827,7 @@ var TableHeader = ({ cells, onSort }) => {
4824
4827
  return "";
4825
4828
  };
4826
4829
  const handleSortClick = (sortedCell) => {
4827
- const newDirection = getNewSortDirection(sortedCell?.direction);
4830
+ const newDirection = getNewSortDirection(sortedCell == null ? void 0 : sortedCell.direction);
4828
4831
  if (onSort) {
4829
4832
  onSort({
4830
4833
  direction: newDirection,
@@ -4849,7 +4852,7 @@ var TableHeader = ({ cells, onSort }) => {
4849
4852
  import_material28.TableSortLabel,
4850
4853
  {
4851
4854
  className: classes.sortLabel,
4852
- direction: cell?.direction || "asc",
4855
+ direction: (cell == null ? void 0 : cell.direction) || "asc",
4853
4856
  IconComponent: import_ImportExport.default,
4854
4857
  onClick: () => handleSortClick(cell),
4855
4858
  children: cell.label