@ceed/ads 1.27.0 → 1.28.0

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/index.cjs CHANGED
@@ -2319,6 +2319,7 @@ var StyledTd = (0, import_joy25.styled)("td")(({ theme }) => ({
2319
2319
  }));
2320
2320
  var MotionSortIcon = (0, import_framer_motion17.motion)(import_ArrowUpwardRounded.default);
2321
2321
  var DefaultLoadingOverlay = () => /* @__PURE__ */ import_react19.default.createElement(import_joy25.LinearProgress, { value: 8, variant: "plain" });
2322
+ var DefaultNoRowsOverlay = () => /* @__PURE__ */ import_react19.default.createElement(import_joy25.Typography, { level: "body-sm", textColor: "text.tertiary" }, "No rows");
2322
2323
  var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ import_react19.default.createElement(
2323
2324
  Box_default,
2324
2325
  {
@@ -4033,9 +4034,15 @@ function Component(props, apiRef) {
4033
4034
  checkbox: RenderCheckbox = Checkbox_default,
4034
4035
  toolbar: Toolbar,
4035
4036
  footer: Footer,
4036
- loadingOverlay: LoadingOverlay = DefaultLoadingOverlay
4037
+ loadingOverlay: LoadingOverlay = DefaultLoadingOverlay,
4038
+ noRowsOverlay: NoRowsOverlay = DefaultNoRowsOverlay
4039
+ } = {},
4040
+ slotProps: {
4041
+ checkbox: checkboxProps = {},
4042
+ toolbar: toolbarProps,
4043
+ background: backgroundProps = {},
4044
+ noRowsOverlay: noRowsOverlayProps = {}
4037
4045
  } = {},
4038
- slotProps: { checkbox: checkboxProps = {}, toolbar: toolbarProps, background: backgroundProps = {} } = {},
4039
4046
  stripe,
4040
4047
  isTotalSelected: ___________,
4041
4048
  ...innerProps
@@ -4079,6 +4086,8 @@ function Component(props, apiRef) {
4079
4086
  const paginationModel = (0, import_react28.useMemo)(() => ({ page, pageSize }), [page, pageSize]);
4080
4087
  const totalSize = virtualizer.getTotalSize();
4081
4088
  const virtualizedItems = virtualizer.getVirtualItems();
4089
+ const showNoRowsOverlay = !loading && rowCount === 0;
4090
+ const totalColCount = Math.max(1, columns.length + (checkboxSelection ? 1 : 0));
4082
4091
  const getRowClickHandler = (0, import_react28.useCallback)(
4083
4092
  (row, rowId) => (e) => {
4084
4093
  onRowClick?.({ row, rowId }, e);
@@ -4370,6 +4379,18 @@ function Component(props, apiRef) {
4370
4379
  /* @__PURE__ */ import_react28.default.createElement(LoadingOverlay, null)
4371
4380
  )
4372
4381
  )),
4382
+ showNoRowsOverlay && /* @__PURE__ */ import_react28.default.createElement("tr", null, /* @__PURE__ */ import_react28.default.createElement("td", { colSpan: totalColCount, style: { border: "none" } }, /* @__PURE__ */ import_react28.default.createElement(
4383
+ Box_default,
4384
+ {
4385
+ sx: {
4386
+ display: "flex",
4387
+ alignItems: "center",
4388
+ justifyContent: "center",
4389
+ minHeight: "150px"
4390
+ }
4391
+ },
4392
+ /* @__PURE__ */ import_react28.default.createElement(NoRowsOverlay, { ...noRowsOverlayProps })
4393
+ ))),
4373
4394
  virtualizedItems.map((virtualizedRow, index) => {
4374
4395
  const rowIndex = virtualizedRow.index;
4375
4396
  const row = dataInPage[rowIndex];
package/dist/index.js CHANGED
@@ -2079,7 +2079,7 @@ var numberFormatter = (value) => "Intl" in window ? new Intl.NumberFormat().form
2079
2079
 
2080
2080
  // src/components/DataTable/styled.tsx
2081
2081
  import React17 from "react";
2082
- import { styled as styled8, LinearProgress, buttonClasses, iconButtonClasses } from "@mui/joy";
2082
+ import { styled as styled8, LinearProgress, buttonClasses, iconButtonClasses, Typography as Typography3 } from "@mui/joy";
2083
2083
  import { motion as motion17 } from "framer-motion";
2084
2084
  import SortIcon from "@mui/icons-material/ArrowUpwardRounded";
2085
2085
  var EllipsisDiv = styled8("div", {
@@ -2185,6 +2185,7 @@ var StyledTd = styled8("td")(({ theme }) => ({
2185
2185
  }));
2186
2186
  var MotionSortIcon = motion17(SortIcon);
2187
2187
  var DefaultLoadingOverlay = () => /* @__PURE__ */ React17.createElement(LinearProgress, { value: 8, variant: "plain" });
2188
+ var DefaultNoRowsOverlay = () => /* @__PURE__ */ React17.createElement(Typography3, { level: "body-sm", textColor: "text.tertiary" }, "No rows");
2188
2189
  var Resizer = (ref, targetRef = ref) => /* @__PURE__ */ React17.createElement(
2189
2190
  Box_default,
2190
2191
  {
@@ -2656,7 +2657,7 @@ var Textarea_default = Textarea;
2656
2657
 
2657
2658
  // src/components/Select/Select.tsx
2658
2659
  import React20, { useMemo as useMemo7 } from "react";
2659
- import { Select as JoySelect, Option as JoyOption, ListItemContent as ListItemContent2, Typography as Typography3 } from "@mui/joy";
2660
+ import { Select as JoySelect, Option as JoyOption, ListItemContent as ListItemContent2, Typography as Typography4 } from "@mui/joy";
2660
2661
  import { motion as motion20 } from "framer-motion";
2661
2662
  var MotionOption = motion20(JoyOption);
2662
2663
  var Option = MotionOption;
@@ -2730,7 +2731,7 @@ function Select(props) {
2730
2731
  return optionMap.get(selected.value)?.label;
2731
2732
  }
2732
2733
  },
2733
- options.map((option) => /* @__PURE__ */ React20.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.secondaryText ? /* @__PURE__ */ React20.createElement(ListItemContent2, { sx: { gap: 0.5 } }, /* @__PURE__ */ React20.createElement(Typography3, { level: "inherit" }, option.label), /* @__PURE__ */ React20.createElement(Typography3, { level: secondaryTextLevelMap2[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : option.label))
2734
+ options.map((option) => /* @__PURE__ */ React20.createElement(Option, { key: option.value, value: option.value, disabled: option.disabled }, option.secondaryText ? /* @__PURE__ */ React20.createElement(ListItemContent2, { sx: { gap: 0.5 } }, /* @__PURE__ */ React20.createElement(Typography4, { level: "inherit" }, option.label), /* @__PURE__ */ React20.createElement(Typography4, { level: secondaryTextLevelMap2[size ?? "md"], textColor: "text.tertiary" }, option.secondaryText)) : option.label))
2734
2735
  );
2735
2736
  return /* @__PURE__ */ React20.createElement(
2736
2737
  FormControl_default,
@@ -3908,9 +3909,15 @@ function Component(props, apiRef) {
3908
3909
  checkbox: RenderCheckbox = Checkbox_default,
3909
3910
  toolbar: Toolbar,
3910
3911
  footer: Footer,
3911
- loadingOverlay: LoadingOverlay = DefaultLoadingOverlay
3912
+ loadingOverlay: LoadingOverlay = DefaultLoadingOverlay,
3913
+ noRowsOverlay: NoRowsOverlay = DefaultNoRowsOverlay
3914
+ } = {},
3915
+ slotProps: {
3916
+ checkbox: checkboxProps = {},
3917
+ toolbar: toolbarProps,
3918
+ background: backgroundProps = {},
3919
+ noRowsOverlay: noRowsOverlayProps = {}
3912
3920
  } = {},
3913
- slotProps: { checkbox: checkboxProps = {}, toolbar: toolbarProps, background: backgroundProps = {} } = {},
3914
3921
  stripe,
3915
3922
  isTotalSelected: ___________,
3916
3923
  ...innerProps
@@ -3954,6 +3961,8 @@ function Component(props, apiRef) {
3954
3961
  const paginationModel = useMemo10(() => ({ page, pageSize }), [page, pageSize]);
3955
3962
  const totalSize = virtualizer.getTotalSize();
3956
3963
  const virtualizedItems = virtualizer.getVirtualItems();
3964
+ const showNoRowsOverlay = !loading && rowCount === 0;
3965
+ const totalColCount = Math.max(1, columns.length + (checkboxSelection ? 1 : 0));
3957
3966
  const getRowClickHandler = useCallback12(
3958
3967
  (row, rowId) => (e) => {
3959
3968
  onRowClick?.({ row, rowId }, e);
@@ -4245,6 +4254,18 @@ function Component(props, apiRef) {
4245
4254
  /* @__PURE__ */ React25.createElement(LoadingOverlay, null)
4246
4255
  )
4247
4256
  )),
4257
+ showNoRowsOverlay && /* @__PURE__ */ React25.createElement("tr", null, /* @__PURE__ */ React25.createElement("td", { colSpan: totalColCount, style: { border: "none" } }, /* @__PURE__ */ React25.createElement(
4258
+ Box_default,
4259
+ {
4260
+ sx: {
4261
+ display: "flex",
4262
+ alignItems: "center",
4263
+ justifyContent: "center",
4264
+ minHeight: "150px"
4265
+ }
4266
+ },
4267
+ /* @__PURE__ */ React25.createElement(NoRowsOverlay, { ...noRowsOverlayProps })
4268
+ ))),
4248
4269
  virtualizedItems.map((virtualizedRow, index) => {
4249
4270
  const rowIndex = virtualizedRow.index;
4250
4271
  const row = dataInPage[rowIndex];
@@ -5345,7 +5366,7 @@ CurrencyRange.displayName = "CurrencyRange";
5345
5366
 
5346
5367
  // src/components/FilterMenu/components/PercentageInput.tsx
5347
5368
  import React38 from "react";
5348
- import { Stack as Stack8, Typography as Typography4 } from "@mui/joy";
5369
+ import { Stack as Stack8, Typography as Typography5 } from "@mui/joy";
5349
5370
 
5350
5371
  // src/components/PercentageInput/PercentageInput.tsx
5351
5372
  import React37, { useCallback as useCallback21, useMemo as useMemo14, useState as useState13 } from "react";
@@ -5480,7 +5501,7 @@ var PercentageInput3 = ({
5480
5501
  if (hidden) {
5481
5502
  return null;
5482
5503
  }
5483
- return /* @__PURE__ */ React38.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React38.createElement(Typography4, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React38.createElement(
5504
+ return /* @__PURE__ */ React38.createElement(Stack8, { spacing: 3, role: "group", "aria-labelledby": id }, !!label && /* @__PURE__ */ React38.createElement(Typography5, { id, level: "title-sm", component: "label", textColor: "text.tertiary" }, label), /* @__PURE__ */ React38.createElement(
5484
5505
  PercentageInput,
5485
5506
  {
5486
5507
  value: _value,