@sustaina/shared-ui 1.14.0 → 1.15.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.d.mts CHANGED
@@ -101,6 +101,7 @@ interface AdvanceSearchProps {
101
101
  iconColor?: string;
102
102
  onSearch?: (param: Params) => void;
103
103
  onClear?: () => void;
104
+ shortDateFormat?: string;
104
105
  }
105
106
 
106
107
  declare const AdvanceSearch: React__default.FC<AdvanceSearchProps>;
@@ -1172,6 +1173,21 @@ declare function stripNullishObject<T extends Record<string, any>>(value: Partia
1172
1173
  [k: string]: any;
1173
1174
  };
1174
1175
 
1176
+ /**
1177
+ * Formats an ISO date string according to a specified format.
1178
+ *
1179
+ * @param isoDateString The input ISO 8601 date string (e.g., '2025-09-22T08:47:15.627Z') or javascript Date object
1180
+ * @param format The format string (e.g., 'd/m/Y H:i:s')
1181
+ * - d / DD: Day (01-31)
1182
+ * - m / MM: Month (01-12)
1183
+ * - Y / YYYY: Full Year (e.g., 2025)
1184
+ * - H: Hour (00-23)
1185
+ * - i: Minute (00-59)
1186
+ * - s: Second (00-59)
1187
+ * @returns A formatted date string.
1188
+ */
1189
+ declare function formatISODate(isoDate: string | Date, format?: string): string;
1190
+
1175
1191
  /**
1176
1192
  * Utility function to intelligently combine class names using `clsx`
1177
1193
  * and resolve Tailwind CSS class conflicts using `tailwind-merge`.
@@ -1250,4 +1266,4 @@ type UseTruncatedOptions<T> = {
1250
1266
  type UseTruncatedResult = boolean;
1251
1267
  declare const useTruncated: <T extends HTMLElement = any>({ elementRef, onChange, resizeDetectDelay }: UseTruncatedOptions<T>) => UseTruncatedResult;
1252
1268
 
1253
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_NAMESPACE, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Input, type InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, getDialogAlertControls, getDialogTemplates, inputVariants, isDefined, isEmptyObject, selectValueToBoolean, spinnerVariants, stripNullishObject, throttle, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated };
1269
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_NAMESPACE, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Input, type InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, formatISODate, getDialogAlertControls, getDialogTemplates, inputVariants, isDefined, isEmptyObject, selectValueToBoolean, spinnerVariants, stripNullishObject, throttle, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated };
package/dist/index.d.ts CHANGED
@@ -101,6 +101,7 @@ interface AdvanceSearchProps {
101
101
  iconColor?: string;
102
102
  onSearch?: (param: Params) => void;
103
103
  onClear?: () => void;
104
+ shortDateFormat?: string;
104
105
  }
105
106
 
106
107
  declare const AdvanceSearch: React__default.FC<AdvanceSearchProps>;
@@ -1172,6 +1173,21 @@ declare function stripNullishObject<T extends Record<string, any>>(value: Partia
1172
1173
  [k: string]: any;
1173
1174
  };
1174
1175
 
1176
+ /**
1177
+ * Formats an ISO date string according to a specified format.
1178
+ *
1179
+ * @param isoDateString The input ISO 8601 date string (e.g., '2025-09-22T08:47:15.627Z') or javascript Date object
1180
+ * @param format The format string (e.g., 'd/m/Y H:i:s')
1181
+ * - d / DD: Day (01-31)
1182
+ * - m / MM: Month (01-12)
1183
+ * - Y / YYYY: Full Year (e.g., 2025)
1184
+ * - H: Hour (00-23)
1185
+ * - i: Minute (00-59)
1186
+ * - s: Second (00-59)
1187
+ * @returns A formatted date string.
1188
+ */
1189
+ declare function formatISODate(isoDate: string | Date, format?: string): string;
1190
+
1175
1191
  /**
1176
1192
  * Utility function to intelligently combine class names using `clsx`
1177
1193
  * and resolve Tailwind CSS class conflicts using `tailwind-merge`.
@@ -1250,4 +1266,4 @@ type UseTruncatedOptions<T> = {
1250
1266
  type UseTruncatedResult = boolean;
1251
1267
  declare const useTruncated: <T extends HTMLElement = any>({ elementRef, onChange, resizeDetectDelay }: UseTruncatedOptions<T>) => UseTruncatedResult;
1252
1268
 
1253
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_NAMESPACE, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Input, type InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, getDialogAlertControls, getDialogTemplates, inputVariants, isDefined, isEmptyObject, selectValueToBoolean, spinnerVariants, stripNullishObject, throttle, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated };
1269
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvanceSearch, ArrowIcon, type Breakpoints, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, DIALOG_ALERT_I18N_NAMESPACE, DataTable, type DataTableChildrenKeyHandler, type DataTableColumnFilter, type DataTableColumnFilterProps, type DataTableColumnGrouping, type DataTableColumnOrdering, type DataTableColumnPinning, type DataTableColumnSeparatorProps, type DataTableColumnSorting, type DataTableColumnVisibility, type DataTableComponentProps, type DataTableFilterConfig, type DataTableFilters, type DataTableGlobalFilter, type DataTableHeaderCell, type DataTableProps, type DataTableRenderHeaderHandler, type DataTableRenderHeaderProps, type DataTableRenderRowHandler, type DataTableRenderRowProps, type DataTableRowCell, type DataTableRowClickHandler, type DataTableRowExpansion, type DataTableRowIdKeyHandler, type DataTableRowSelection, type DataTableScrollFetch, type DataTableStatusContent, type DatatableColumnResizing, DatePicker, type DatePickerProps, type DebounceOptions, type DebouncedFunction, Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type FieldSchema, type FieldType, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Input, type InputProps, Label, List, ListContainer, type ListContainerProps, ListHeader, type ListHeaderProps, type ListProps, ListTable, type ListTableProps, LookupSelect, type LookupSelectOption, type LookupSelectProps, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type Params, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, type RowClickType, type RowState, type ScrollInfo, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SorterProps, Spinner, type SpinnerProps, type StatusContentKey, SuiCalendarIcon, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, index as UI, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, booleanToSelectValue, buttonVariants, cn, compareAlphanumeric, debounce, formatISODate, getDialogAlertControls, getDialogTemplates, inputVariants, isDefined, isEmptyObject, selectValueToBoolean, spinnerVariants, stripNullishObject, throttle, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated };
package/dist/index.js CHANGED
@@ -214,6 +214,45 @@ function stripNullishObject(value) {
214
214
  return {};
215
215
  }
216
216
  }
217
+
218
+ // src/utils/date.ts
219
+ var pad = (num) => String(num).padStart(2, "0");
220
+ function formatISODate(isoDate, format5 = "d/m/Y H:i") {
221
+ const date = new Date(isoDate);
222
+ if (isNaN(date.getTime())) {
223
+ return "Invalid Date";
224
+ }
225
+ const parts = {
226
+ d: pad(date.getDate()),
227
+ m: pad(date.getMonth() + 1),
228
+ Y: String(date.getFullYear()),
229
+ H: pad(date.getHours()),
230
+ i: pad(date.getMinutes()),
231
+ s: pad(date.getSeconds())
232
+ };
233
+ const tokenMap = {
234
+ // Day
235
+ d: "d",
236
+ DD: "d",
237
+ // Month
238
+ m: "m",
239
+ MM: "m",
240
+ // Year
241
+ Y: "Y",
242
+ // 'Y' and 'YYYY' will both map to the 4-digit year
243
+ YYYY: "Y",
244
+ // Hour
245
+ H: "H",
246
+ // Minute
247
+ i: "i",
248
+ // Second
249
+ s: "s"
250
+ };
251
+ return format5.replace(/YYYY|Y|MM|m|DD|d|H|i|s/g, (match) => {
252
+ const partKey = tokenMap[match];
253
+ return partKey ? parts[partKey] : match;
254
+ });
255
+ }
217
256
  function cn(...args) {
218
257
  return tailwindMerge.twMerge(clsx2.clsx(args));
219
258
  }
@@ -1806,7 +1845,7 @@ var DatePicker2 = ({
1806
1845
  value,
1807
1846
  onChange,
1808
1847
  onValueChange,
1809
- placeholder: placeholder3 = "DD/MM/YYYY",
1848
+ placeholder: placeholder2 = "DD/MM/YYYY",
1810
1849
  allowClear = true,
1811
1850
  displayFormatter,
1812
1851
  valueFormatter,
@@ -1835,7 +1874,7 @@ var DatePicker2 = ({
1835
1874
  const parsed = parser(value);
1836
1875
  return parsed && dateFns.isValid(parsed) ? parsed : void 0;
1837
1876
  }, [parser, value]);
1838
- const buttonLabel = parsedValue ? labelFormatter(parsedValue) : placeholder3;
1877
+ const buttonLabel = parsedValue ? labelFormatter(parsedValue) : placeholder2;
1839
1878
  const buttonAriaLabel = ariaLabel ?? (parsedValue ? `Change date, current selection ${labelFormatter(parsedValue)}` : "Open date picker");
1840
1879
  const shouldShowClear = allowClear && !disabled && !!parsedValue;
1841
1880
  const handleClose = React4__namespace.default.useCallback(() => setOpen(false), []);
@@ -1909,8 +1948,15 @@ var DatePicker2 = ({
1909
1948
  )
1910
1949
  ] }) });
1911
1950
  };
1912
- var placeholder = "DD/MM/YYYY";
1913
- var ConditionDateInput = ({ row, control, onClear }) => {
1951
+
1952
+ // src/components/advanceSearch/components/constants/index.ts
1953
+ var fallbackShortDateFormat = "DD/MM/YYYY";
1954
+ var ConditionDateInput = ({
1955
+ row,
1956
+ control,
1957
+ onClear,
1958
+ shortDateFormat = fallbackShortDateFormat
1959
+ }) => {
1914
1960
  const isBetween = row.operator === "between";
1915
1961
  const buildAriaLabel = (isEnd) => {
1916
1962
  if (isEnd) return "Select end date";
@@ -1942,10 +1988,11 @@ var ConditionDateInput = ({ row, control, onClear }) => {
1942
1988
  ...field,
1943
1989
  value: field.value || void 0,
1944
1990
  onValueChange: handleValueChange,
1945
- placeholder,
1991
+ placeholder: shortDateFormat,
1946
1992
  ariaLabel: buildAriaLabel(options?.isEnd),
1947
1993
  clearAriaLabel: buildClearLabel(options?.isEnd),
1948
1994
  invalid: Boolean(fieldState.error),
1995
+ displayFormatter: (d) => formatISODate(d, shortDateFormat),
1949
1996
  wrapperClassName: "min-w-0"
1950
1997
  }
1951
1998
  ) }),
@@ -2229,7 +2276,7 @@ var MonthPicker2 = ({
2229
2276
  value,
2230
2277
  onChange,
2231
2278
  onValueChange,
2232
- placeholder: placeholder3 = "MM/YYYY",
2279
+ placeholder: placeholder2 = "MM/YYYY",
2233
2280
  allowClear = true,
2234
2281
  displayFormatter,
2235
2282
  valueFormatter,
@@ -2261,7 +2308,7 @@ var MonthPicker2 = ({
2261
2308
  }
2262
2309
  return void 0;
2263
2310
  }, [parser, value]);
2264
- const buttonLabel = parsedValue ? labelFormatter(parsedValue) : placeholder3;
2311
+ const buttonLabel = parsedValue ? labelFormatter(parsedValue) : placeholder2;
2265
2312
  const buttonAriaLabel = ariaLabel ?? (parsedValue ? `Change month, current selection ${labelFormatter(parsedValue)}` : "Open month picker");
2266
2313
  const shouldShowClear = allowClear && !disabled && !!parsedValue;
2267
2314
  const handleClose = React4__namespace.default.useCallback(() => setOpen(false), []);
@@ -2336,7 +2383,7 @@ var MonthPicker2 = ({
2336
2383
  )
2337
2384
  ] }) });
2338
2385
  };
2339
- var placeholder2 = "MM/YYYY";
2386
+ var placeholder = "MM/YYYY";
2340
2387
  var ConditionMonthInput = ({ row, control, onClear }) => {
2341
2388
  const isBetween = row.operator === "between";
2342
2389
  const buildAriaLabel = (isEnd) => {
@@ -2370,7 +2417,7 @@ var ConditionMonthInput = ({ row, control, onClear }) => {
2370
2417
  ...field,
2371
2418
  value,
2372
2419
  onValueChange: handleValueChange,
2373
- placeholder: placeholder2,
2420
+ placeholder,
2374
2421
  ariaLabel: buildAriaLabel(options?.isEnd),
2375
2422
  clearAriaLabel: buildClearLabel(options?.isEnd),
2376
2423
  displayFormatter: (month) => dateFns.format(month, "MM/yyyy"),
@@ -2482,7 +2529,7 @@ var LookupSelect = ({
2482
2529
  onChange,
2483
2530
  onClear,
2484
2531
  error,
2485
- placeholder: placeholder3,
2532
+ placeholder: placeholder2,
2486
2533
  maxTags = 10,
2487
2534
  fetchSuggestions,
2488
2535
  suggestionDebounce = 250,
@@ -2656,7 +2703,7 @@ var LookupSelect = ({
2656
2703
  window.removeEventListener("scroll", handleReposition, true);
2657
2704
  };
2658
2705
  }, [dropdownPortalElement, isDropdownOpen, updateDropdownPosition]);
2659
- const resolvedPlaceholder = placeholder3 ?? "Select";
2706
+ const resolvedPlaceholder = placeholder2 ?? "Select";
2660
2707
  const showDropdown = isDropdownOpen && !fetchError;
2661
2708
  const dropdownContent = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-md border border-gray-200 bg-white shadow-lg", children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 text-sm text-inherit", children: loadingMessage }) : suggestions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center px-3 py-4 text-sm text-inherit text-center", children: [
2662
2709
  /* @__PURE__ */ jsxRuntime.jsx(not_found_default, { className: "w-full max-w-[80px] h-auto" }),
@@ -2849,7 +2896,13 @@ var ConditionJSONInput = ({
2849
2896
  }
2850
2897
  }
2851
2898
  );
2852
- var ConditionValue = ({ row, fields, onClearValue, dropdownPortalId }) => {
2899
+ var ConditionValue = ({
2900
+ row,
2901
+ fields,
2902
+ onClearValue,
2903
+ dropdownPortalId,
2904
+ shortDateFormat
2905
+ }) => {
2853
2906
  const { control } = reactHookForm.useFormContext();
2854
2907
  const fieldSchema = fields.find((f) => f.name === row.fieldName);
2855
2908
  const fieldType = fieldSchema?.type ?? "text";
@@ -2858,7 +2911,15 @@ var ConditionValue = ({ row, fields, onClearValue, dropdownPortalId }) => {
2858
2911
  return /* @__PURE__ */ jsxRuntime.jsx(ConditionNumberInput, { row, control, onClear: onClearValue });
2859
2912
  case "date":
2860
2913
  case "datetime":
2861
- return /* @__PURE__ */ jsxRuntime.jsx(ConditionDateInput, { row, control, onClear: onClearValue });
2914
+ return /* @__PURE__ */ jsxRuntime.jsx(
2915
+ ConditionDateInput,
2916
+ {
2917
+ row,
2918
+ control,
2919
+ onClear: onClearValue,
2920
+ shortDateFormat
2921
+ }
2922
+ );
2862
2923
  case "datemonth":
2863
2924
  return /* @__PURE__ */ jsxRuntime.jsx(ConditionMonthInput, { row, control, onClear: onClearValue });
2864
2925
  case "dropdown":
@@ -2937,7 +2998,8 @@ var AdvanceSearchRow = ({
2937
2998
  onRemove,
2938
2999
  onClearValue,
2939
3000
  disableAdd,
2940
- dropdownPortalId
3001
+ dropdownPortalId,
3002
+ shortDateFormat
2941
3003
  }) => {
2942
3004
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-3 rounded-lg bg-white md:grid-cols-[minmax(150px,0.85fr)_minmax(140px,0.75fr)_minmax(260px,1fr)_auto] md:items-start", children: [
2943
3005
  /* @__PURE__ */ jsxRuntime.jsx(FieldSelect, { row, fieldOptions, onChangeField }),
@@ -2956,7 +3018,8 @@ var AdvanceSearchRow = ({
2956
3018
  row,
2957
3019
  fields,
2958
3020
  onClearValue,
2959
- dropdownPortalId
3021
+ dropdownPortalId,
3022
+ shortDateFormat
2960
3023
  }
2961
3024
  ),
2962
3025
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full", children: /* @__PURE__ */ jsxRuntime.jsx(AddRemoveButtons, { isFirst, onAdd, onRemove, disableAdd }) })
@@ -3378,7 +3441,8 @@ var AdvanceSearch = ({
3378
3441
  iconColor = "#ffffff",
3379
3442
  limitRows = 4,
3380
3443
  onSearch,
3381
- onClear
3444
+ onClear,
3445
+ shortDateFormat
3382
3446
  }) => {
3383
3447
  const fieldsData = React4.useMemo(() => {
3384
3448
  if (fields.length === 0) throw new Error("fields cannot be an empty array");
@@ -3508,6 +3572,7 @@ var AdvanceSearch = ({
3508
3572
  AdvanceSearchRow,
3509
3573
  {
3510
3574
  row,
3575
+ shortDateFormat,
3511
3576
  isFirst: idx === 0,
3512
3577
  fields: fieldsData,
3513
3578
  fieldOptions,
@@ -6331,8 +6396,8 @@ function parseSerializedEditorState(raw) {
6331
6396
  return void 0;
6332
6397
  }
6333
6398
  }
6334
- function Placeholder({ placeholder: placeholder3 }) {
6335
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: theme.placeholder, children: placeholder3 });
6399
+ function Placeholder({ placeholder: placeholder2 }) {
6400
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: theme.placeholder, children: placeholder2 });
6336
6401
  }
6337
6402
  var initialToolbarState = {
6338
6403
  isBold: false,
@@ -7233,7 +7298,7 @@ var RichText = React4.forwardRef(function RichText2({
7233
7298
  defaultValue,
7234
7299
  onChange,
7235
7300
  onHtmlChange,
7236
- placeholder: placeholder3,
7301
+ placeholder: placeholder2,
7237
7302
  readOnly,
7238
7303
  disabled,
7239
7304
  editorClassName,
@@ -7321,7 +7386,7 @@ var RichText = React4.forwardRef(function RichText2({
7321
7386
  )
7322
7387
  }
7323
7388
  ),
7324
- placeholder: /* @__PURE__ */ jsxRuntime.jsx(Placeholder, { placeholder: placeholder3 || "" }),
7389
+ placeholder: /* @__PURE__ */ jsxRuntime.jsx(Placeholder, { placeholder: placeholder2 || "" }),
7325
7390
  ErrorBoundary: LexicalErrorBoundary.LexicalErrorBoundary
7326
7391
  }
7327
7392
  ),
@@ -8543,6 +8608,7 @@ exports.buttonVariants = buttonVariants;
8543
8608
  exports.cn = cn;
8544
8609
  exports.compareAlphanumeric = compareAlphanumeric;
8545
8610
  exports.debounce = debounce;
8611
+ exports.formatISODate = formatISODate;
8546
8612
  exports.getDialogAlertControls = getDialogAlertControls;
8547
8613
  exports.getDialogTemplates = getDialogTemplates;
8548
8614
  exports.inputVariants = inputVariants;