react-better-html 1.1.119 → 1.1.120

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.d.mts CHANGED
@@ -293,11 +293,13 @@ type ModalRef = {
293
293
  type ModalComponent = {
294
294
  (props: ComponentPropWithRef<ModalRef, ModalProps>): React.ReactElement;
295
295
  confirmation: (props: ComponentPropWithRef<ModalRef, OmitProps<ModalProps, "maxWidth" | "children" | "overflow"> & {
296
+ message?: string;
296
297
  continueButtonLoaderName?: LoaderName | AnyOtherString;
297
298
  onContinue?: () => void;
298
299
  onCancel?: () => void;
299
300
  }>) => React.ReactElement;
300
301
  destructive: (props: ComponentPropWithRef<ModalRef, OmitProps<ModalProps, "maxWidth" | "children" | "overflow"> & {
302
+ message?: string;
301
303
  deleteButtonLoaderName?: LoaderName | AnyOtherString;
302
304
  onDelete?: () => void;
303
305
  onCancel?: () => void;
@@ -644,7 +646,7 @@ declare const ColorThemeSwitch: typeof ColorThemeSwitchComponent & {
644
646
  withText: typeof ColorThemeSwitchComponent.withText;
645
647
  };
646
648
 
647
- type FilterPreset = "today" | "yesterday" | "thisWeek" | "thisMonth" | "thisYear" | "lastWeek" | "lastMonth" | "lastYear" | "nextWeek" | "nextMonth" | "nextYear";
649
+ type FilterPreset = "today" | "yesterday" | "tomorrow" | "thisWeek" | "thisMonth" | "thisYear" | "lastWeek" | "lastMonth" | "lastYear" | "nextWeek" | "nextMonth" | "nextYear";
648
650
  type TableFilterData = {
649
651
  type: "number";
650
652
  min?: number;
package/dist/index.d.ts CHANGED
@@ -293,11 +293,13 @@ type ModalRef = {
293
293
  type ModalComponent = {
294
294
  (props: ComponentPropWithRef<ModalRef, ModalProps>): React.ReactElement;
295
295
  confirmation: (props: ComponentPropWithRef<ModalRef, OmitProps<ModalProps, "maxWidth" | "children" | "overflow"> & {
296
+ message?: string;
296
297
  continueButtonLoaderName?: LoaderName | AnyOtherString;
297
298
  onContinue?: () => void;
298
299
  onCancel?: () => void;
299
300
  }>) => React.ReactElement;
300
301
  destructive: (props: ComponentPropWithRef<ModalRef, OmitProps<ModalProps, "maxWidth" | "children" | "overflow"> & {
302
+ message?: string;
301
303
  deleteButtonLoaderName?: LoaderName | AnyOtherString;
302
304
  onDelete?: () => void;
303
305
  onCancel?: () => void;
@@ -644,7 +646,7 @@ declare const ColorThemeSwitch: typeof ColorThemeSwitchComponent & {
644
646
  withText: typeof ColorThemeSwitchComponent.withText;
645
647
  };
646
648
 
647
- type FilterPreset = "today" | "yesterday" | "thisWeek" | "thisMonth" | "thisYear" | "lastWeek" | "lastMonth" | "lastYear" | "nextWeek" | "nextMonth" | "nextYear";
649
+ type FilterPreset = "today" | "yesterday" | "tomorrow" | "thisWeek" | "thisMonth" | "thisYear" | "lastWeek" | "lastMonth" | "lastYear" | "nextWeek" | "nextMonth" | "nextYear";
648
650
  type TableFilterData = {
649
651
  type: "number";
650
652
  min?: number;
package/dist/index.js CHANGED
@@ -3098,7 +3098,7 @@ var ModalComponent = (0, import_react11.forwardRef)(function Modal({
3098
3098
  document.body
3099
3099
  );
3100
3100
  });
3101
- ModalComponent.confirmation = (0, import_react11.forwardRef)(function Confirmation({ continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3101
+ ModalComponent.confirmation = (0, import_react11.forwardRef)(function Confirmation({ message, continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
3102
3102
  const theme2 = useTheme();
3103
3103
  const modalRef = (0, import_react11.useRef)(null);
3104
3104
  const onCancelElement = (0, import_react11.useCallback)(() => {
@@ -3111,7 +3111,7 @@ ModalComponent.confirmation = (0, import_react11.forwardRef)(function Confirmati
3111
3111
  }, [onContinue]);
3112
3112
  (0, import_react11.useImperativeHandle)(ref, () => modalRef.current, []);
3113
3113
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
3114
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { color: theme2.colors.textSecondary, children: "Do you really want to continue? This action may be irreversible." }),
3114
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue? This action may be irreversible." }),
3115
3115
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3116
3116
  Div_default.row,
3117
3117
  {
@@ -3127,7 +3127,7 @@ ModalComponent.confirmation = (0, import_react11.forwardRef)(function Confirmati
3127
3127
  )
3128
3128
  ] });
3129
3129
  });
3130
- ModalComponent.destructive = (0, import_react11.forwardRef)(function Destructive2({ deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
3130
+ ModalComponent.destructive = (0, import_react11.forwardRef)(function Destructive2({ message, deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
3131
3131
  const theme2 = useTheme();
3132
3132
  const modalRef = (0, import_react11.useRef)(null);
3133
3133
  const onCancelElement = (0, import_react11.useCallback)(() => {
@@ -3140,7 +3140,7 @@ ModalComponent.destructive = (0, import_react11.forwardRef)(function Destructive
3140
3140
  }, [onDelete]);
3141
3141
  (0, import_react11.useImperativeHandle)(ref, () => modalRef.current, []);
3142
3142
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
3143
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { color: theme2.colors.textSecondary, children: "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
3143
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
3144
3144
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3145
3145
  Div_default.row,
3146
3146
  {
@@ -6999,6 +6999,7 @@ var TdStyledComponent = import_styled_components11.default.td.withConfig({
6999
6999
  var filterPresetsText = {
7000
7000
  today: "Today",
7001
7001
  yesterday: "Yesterday",
7002
+ tomorrow: "Tomorrow",
7002
7003
  thisWeek: "This week",
7003
7004
  thisMonth: "This month",
7004
7005
  thisYear: "This year",
@@ -7193,6 +7194,12 @@ var TableComponent = (0, import_react23.forwardRef)(function Table({
7193
7194
  max: getValueForDate(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() - 1)))
7194
7195
  });
7195
7196
  break;
7197
+ case "tomorrow":
7198
+ filterForm.setFieldsValue({
7199
+ min: getValueForDate(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 1))),
7200
+ max: getValueForDate(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() + 1)))
7201
+ });
7202
+ break;
7196
7203
  case "thisWeek":
7197
7204
  filterForm.setFieldsValue({
7198
7205
  min: getValueForDate(new Date((/* @__PURE__ */ new Date()).setDate((/* @__PURE__ */ new Date()).getDate() - 7))),
@@ -7565,10 +7572,13 @@ var TableComponent = (0, import_react23.forwardRef)(function Table({
7565
7572
  cancelButtonText: "Clear",
7566
7573
  onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
7567
7574
  children: [
7568
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(FormRow_default, { children: [
7575
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
7569
7576
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InputField_default.date, { label: "Min", ...filterForm.getInputFieldProps("min") }),
7570
7577
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InputField_default.date, { label: "Max", ...filterForm.getInputFieldProps("max") })
7571
- ] }),
7578
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
7579
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
7580
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
7581
+ ] }) }),
7572
7582
  openedFilterColumn.presets && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Div_default.column, { gap: theme2.styles.gap / 2, children: [
7573
7583
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Label_default, { text: "Presets" }),
7574
7584
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => {