@sustaina/shared-ui 1.36.1 → 1.37.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 +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +235 -149
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +235 -151
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -151,7 +151,7 @@ interface AdvanceSearchProps {
|
|
|
151
151
|
declare const AdvanceSearch: React__default.FC<AdvanceSearchProps>;
|
|
152
152
|
|
|
153
153
|
declare const buttonVariants: (props?: ({
|
|
154
|
-
variant?: "
|
|
154
|
+
variant?: "cancel" | "default" | "link" | "secondary" | "destructive" | "warning" | "cottonYellowDark" | "cottonGreen" | "cottonBlue" | "cottonRed" | "cottonAccent" | "cottonYellow" | "cottonBlack" | "defaultOutline" | "destructiveOutline" | "outline" | "ghost" | "defaultSelect" | null | undefined;
|
|
155
155
|
size?: "default" | "option" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
156
156
|
active?: boolean | null | undefined;
|
|
157
157
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -1562,6 +1562,34 @@ declare function stripNullishObject<T extends Record<string, any>>(value: Partia
|
|
|
1562
1562
|
*/
|
|
1563
1563
|
declare function formatISODate(isoDate: string | Date, format?: string): string;
|
|
1564
1564
|
|
|
1565
|
+
type UseSafeBlockerOpts = {
|
|
1566
|
+
shouldBlockFn: () => boolean | Promise<boolean>;
|
|
1567
|
+
enableBeforeUnload?: boolean | (() => boolean);
|
|
1568
|
+
disabled?: boolean;
|
|
1569
|
+
withResolver?: boolean;
|
|
1570
|
+
};
|
|
1571
|
+
type SafeBlockerResolver = {
|
|
1572
|
+
status: "blocked";
|
|
1573
|
+
proceed: () => void;
|
|
1574
|
+
reset: () => void;
|
|
1575
|
+
} | {
|
|
1576
|
+
status: "idle";
|
|
1577
|
+
proceed: undefined;
|
|
1578
|
+
reset: undefined;
|
|
1579
|
+
};
|
|
1580
|
+
declare function useSafeBlocker({ shouldBlockFn, enableBeforeUnload, disabled, withResolver }: UseSafeBlockerOpts): SafeBlockerResolver;
|
|
1581
|
+
|
|
1582
|
+
type DraftSource = "create" | "edit" | null;
|
|
1583
|
+
interface DraftGuardState {
|
|
1584
|
+
isDirty: boolean;
|
|
1585
|
+
source: DraftSource;
|
|
1586
|
+
isInitialized: boolean;
|
|
1587
|
+
markDirty: (source: DraftSource) => void;
|
|
1588
|
+
clearDraft: () => void;
|
|
1589
|
+
markInitialized: () => void;
|
|
1590
|
+
}
|
|
1591
|
+
declare const useDraftGuardStore: zustand.UseBoundStore<zustand.StoreApi<DraftGuardState>>;
|
|
1592
|
+
|
|
1565
1593
|
/**
|
|
1566
1594
|
* Utility function to intelligently combine class names using `clsx`
|
|
1567
1595
|
* and resolve Tailwind CSS class conflicts using `tailwind-merge`.
|
|
@@ -1665,4 +1693,4 @@ type DeepPartialNullish<T> = T extends BrowserNativeObject ? T | null : {
|
|
|
1665
1693
|
[K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] | null : DeepPartialNullish<T[K]> | null;
|
|
1666
1694
|
};
|
|
1667
1695
|
|
|
1668
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionMenu, type ActionMenuProps, AdvanceSearch, ArrowIcon, AuditFooter, type AuditFooterProps, type Breakpoints, type BrowserNativeObject, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, 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, DecreaseIcon, type DeepPartial, type DeepPartialNullish, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, type FieldSchema, type FieldType, FiltersIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, LookupSelect, type LookupSelectOption, type LookupSelectProps, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type OptionData, type Params, type PermissionString, PlusIcon$2 as PlusIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, 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, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, PlusIcon as UserAloneIcon, PlusIcon$1 as UserFriendIcon, UserIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useControllableState, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
|
|
1696
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionMenu, type ActionMenuProps, AdvanceSearch, ArrowIcon, AuditFooter, type AuditFooterProps, type Breakpoints, type BrowserNativeObject, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, 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, DecreaseIcon, type DeepPartial, type DeepPartialNullish, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type DraftGuardState, type DraftSource, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, type FieldSchema, type FieldType, FiltersIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, LookupSelect, type LookupSelectOption, type LookupSelectProps, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type OptionData, type Params, type PermissionString, PlusIcon$2 as PlusIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, 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, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, PlusIcon as UserAloneIcon, PlusIcon$1 as UserFriendIcon, UserIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useSafeBlocker, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
|
package/dist/index.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ interface AdvanceSearchProps {
|
|
|
151
151
|
declare const AdvanceSearch: React__default.FC<AdvanceSearchProps>;
|
|
152
152
|
|
|
153
153
|
declare const buttonVariants: (props?: ({
|
|
154
|
-
variant?: "
|
|
154
|
+
variant?: "cancel" | "default" | "link" | "secondary" | "destructive" | "warning" | "cottonYellowDark" | "cottonGreen" | "cottonBlue" | "cottonRed" | "cottonAccent" | "cottonYellow" | "cottonBlack" | "defaultOutline" | "destructiveOutline" | "outline" | "ghost" | "defaultSelect" | null | undefined;
|
|
155
155
|
size?: "default" | "option" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
|
|
156
156
|
active?: boolean | null | undefined;
|
|
157
157
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -1562,6 +1562,34 @@ declare function stripNullishObject<T extends Record<string, any>>(value: Partia
|
|
|
1562
1562
|
*/
|
|
1563
1563
|
declare function formatISODate(isoDate: string | Date, format?: string): string;
|
|
1564
1564
|
|
|
1565
|
+
type UseSafeBlockerOpts = {
|
|
1566
|
+
shouldBlockFn: () => boolean | Promise<boolean>;
|
|
1567
|
+
enableBeforeUnload?: boolean | (() => boolean);
|
|
1568
|
+
disabled?: boolean;
|
|
1569
|
+
withResolver?: boolean;
|
|
1570
|
+
};
|
|
1571
|
+
type SafeBlockerResolver = {
|
|
1572
|
+
status: "blocked";
|
|
1573
|
+
proceed: () => void;
|
|
1574
|
+
reset: () => void;
|
|
1575
|
+
} | {
|
|
1576
|
+
status: "idle";
|
|
1577
|
+
proceed: undefined;
|
|
1578
|
+
reset: undefined;
|
|
1579
|
+
};
|
|
1580
|
+
declare function useSafeBlocker({ shouldBlockFn, enableBeforeUnload, disabled, withResolver }: UseSafeBlockerOpts): SafeBlockerResolver;
|
|
1581
|
+
|
|
1582
|
+
type DraftSource = "create" | "edit" | null;
|
|
1583
|
+
interface DraftGuardState {
|
|
1584
|
+
isDirty: boolean;
|
|
1585
|
+
source: DraftSource;
|
|
1586
|
+
isInitialized: boolean;
|
|
1587
|
+
markDirty: (source: DraftSource) => void;
|
|
1588
|
+
clearDraft: () => void;
|
|
1589
|
+
markInitialized: () => void;
|
|
1590
|
+
}
|
|
1591
|
+
declare const useDraftGuardStore: zustand.UseBoundStore<zustand.StoreApi<DraftGuardState>>;
|
|
1592
|
+
|
|
1565
1593
|
/**
|
|
1566
1594
|
* Utility function to intelligently combine class names using `clsx`
|
|
1567
1595
|
* and resolve Tailwind CSS class conflicts using `tailwind-merge`.
|
|
@@ -1665,4 +1693,4 @@ type DeepPartialNullish<T> = T extends BrowserNativeObject ? T | null : {
|
|
|
1665
1693
|
[K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] | null : DeepPartialNullish<T[K]> | null;
|
|
1666
1694
|
};
|
|
1667
1695
|
|
|
1668
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionMenu, type ActionMenuProps, AdvanceSearch, ArrowIcon, AuditFooter, type AuditFooterProps, type Breakpoints, type BrowserNativeObject, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, 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, DecreaseIcon, type DeepPartial, type DeepPartialNullish, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, type FieldSchema, type FieldType, FiltersIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, LookupSelect, type LookupSelectOption, type LookupSelectProps, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type OptionData, type Params, type PermissionString, PlusIcon$2 as PlusIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, 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, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, PlusIcon as UserAloneIcon, PlusIcon$1 as UserFriendIcon, UserIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useControllableState, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
|
|
1696
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type ActionButtonProps, ActionMenu, type ActionMenuProps, AdvanceSearch, ArrowIcon, AuditFooter, type AuditFooterProps, type Breakpoints, type BrowserNativeObject, Button, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, Combobox, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CroppedImagePayload, type CroppedImagePayloadWithBlobUrl, CropperModal, CropperModalError, type CropperModalErrorType, type CropperModalProps, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, 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, DecreaseIcon, type DeepPartial, type DeepPartialNullish, Dialog$1 as Dialog, DialogAlert, type DialogAlertI18nResource, type DialogAlertProps, DialogAlertProvider, type DialogAlertTemplateUnit, type DialogAlertTemplates, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogTitle, DialogTrigger, type DialogVariant, type DraftGuardState, type DraftSource, type EllipsisConfig, type EmptyObject, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, type ExtractObjects, type FieldSchema, type FieldType, FiltersIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, type FormulaEditorProps, type FormulaOperator, type FormulaTokenAttributes, type FormulaTokenConfig, type FormulaTokenSuggestion, type FormulaTokenType, type GridPayload, GridSettingsModal, type GridSettingsModalProps, HeaderCell, type HeaderCellProps, Image, type ImageLoader, type ImageLoaderProps, type ImageProps, InformationIcon, Input, type InputCustomInputProps, InputNumber, type InputNumberProps, type InputProps$1 as InputProps, Label, LookupSelect, type LookupSelectOption, type LookupSelectProps, MainListContainer, type MainListContainerClassNames, type MainListContainerProps, type MainListContainerSlots, MonthPicker, type MonthPickerProps, _default as Navbar, type NavbarProps, NotFoundIcon, type OptionData, type Params, type PermissionString, PlusIcon$2 as PlusIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, type PrefixMap, PreventPageLeave, RadioGroupItem, RadioGroupRoot, RadioLabel, type RawFormulaSegment, RichText, RightPanelContainer, type RightPanelContainerClassNames, type RightPanelContainerHeaderProps, type RightPanelContainerProps, type RightPanelContainerSlots, RoleIcon, 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, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, type TemplateKeys, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, TrashIcon, Truncated, TruncatedMouseEnterDiv, type TruncatedMouseEnterDivProps, type TruncatedProps, index as UI, type UseControllableStateOptions, type UseControllableStateResult, type UseHoverResult, type UseMediaQueryOptions, type UseMediaQueryResult, type UsePreventPageLeaveOptions, type UseScreenSizeResult, type UseTruncatedOptions, type UseTruncatedResult, PlusIcon as UserAloneIcon, PlusIcon$1 as UserFriendIcon, UserIcon, VirtualizedCommand, type VirtualizedCommandFieldNames, type VirtualizedCommandOption, type VirtualizedCommandProps, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants$1 as inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore, useHover, useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery, usePreventPageLeave, usePreventPageLeaveStore, useSafeBlocker, useScreenSize, useSidebar, useTruncated, validateTokenPrefixes };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var React25 = require('react');
|
|
4
|
+
var reactRouter = require('@tanstack/react-router');
|
|
5
|
+
var zustand = require('zustand');
|
|
3
6
|
var clsx2 = require('clsx');
|
|
4
7
|
var tailwindMerge = require('tailwind-merge');
|
|
5
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
9
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
7
|
-
var React25 = require('react');
|
|
8
10
|
var lucideReact = require('lucide-react');
|
|
9
11
|
var reactDom = require('react-dom');
|
|
10
12
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
@@ -20,7 +22,6 @@ var reactTable = require('@tanstack/react-table');
|
|
|
20
22
|
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
21
23
|
var reactI18next = require('react-i18next');
|
|
22
24
|
var i18n = require('i18next');
|
|
23
|
-
var zustand = require('zustand');
|
|
24
25
|
var StarterKit = require('@tiptap/starter-kit');
|
|
25
26
|
var react = require('@tiptap/react');
|
|
26
27
|
var ReactDOM = require('react-dom/client');
|
|
@@ -82,9 +83,9 @@ function _interopNamespace(e) {
|
|
|
82
83
|
return Object.freeze(n);
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
var React25__namespace = /*#__PURE__*/_interopNamespace(React25);
|
|
85
87
|
var clsx2__default = /*#__PURE__*/_interopDefault(clsx2);
|
|
86
88
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
87
|
-
var React25__namespace = /*#__PURE__*/_interopNamespace(React25);
|
|
88
89
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
89
90
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
90
91
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
@@ -265,6 +266,82 @@ function formatISODate(isoDate, format5 = "d/m/Y H:i") {
|
|
|
265
266
|
return partKey ? parts[partKey] : match;
|
|
266
267
|
});
|
|
267
268
|
}
|
|
269
|
+
function useSafeBlocker({
|
|
270
|
+
shouldBlockFn,
|
|
271
|
+
enableBeforeUnload = true,
|
|
272
|
+
disabled = false,
|
|
273
|
+
withResolver = false
|
|
274
|
+
}) {
|
|
275
|
+
const router = reactRouter.useRouter({ warn: false });
|
|
276
|
+
const [resolver, setResolver] = React25.useState({
|
|
277
|
+
status: "idle",
|
|
278
|
+
proceed: void 0,
|
|
279
|
+
reset: void 0
|
|
280
|
+
});
|
|
281
|
+
React25.useEffect(() => {
|
|
282
|
+
if (disabled || !router?.history?.block) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
return router.history.block({
|
|
286
|
+
enableBeforeUnload,
|
|
287
|
+
blockerFn: async () => {
|
|
288
|
+
const shouldBlock = await shouldBlockFn();
|
|
289
|
+
if (!withResolver) {
|
|
290
|
+
return shouldBlock;
|
|
291
|
+
}
|
|
292
|
+
if (!shouldBlock) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
const canNavigate = await new Promise((resolve) => {
|
|
296
|
+
setResolver({
|
|
297
|
+
status: "blocked",
|
|
298
|
+
proceed: () => resolve(false),
|
|
299
|
+
reset: () => resolve(true)
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
setResolver({
|
|
303
|
+
status: "idle",
|
|
304
|
+
proceed: void 0,
|
|
305
|
+
reset: void 0
|
|
306
|
+
});
|
|
307
|
+
return canNavigate;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}, [disabled, enableBeforeUnload, router, shouldBlockFn, withResolver]);
|
|
311
|
+
React25.useEffect(() => {
|
|
312
|
+
if (disabled || router?.history || typeof window === "undefined") {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
const shouldEnable = enableBeforeUnload;
|
|
316
|
+
if (!shouldEnable) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const handler = (event) => {
|
|
320
|
+
const shouldBlock = typeof shouldEnable === "function" ? shouldEnable() : shouldEnable;
|
|
321
|
+
if (!shouldBlock) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
event.preventDefault();
|
|
325
|
+
event.returnValue = "";
|
|
326
|
+
};
|
|
327
|
+
window.addEventListener("beforeunload", handler, { capture: true });
|
|
328
|
+
return () => window.removeEventListener("beforeunload", handler, { capture: true });
|
|
329
|
+
}, [disabled, enableBeforeUnload, router]);
|
|
330
|
+
return resolver;
|
|
331
|
+
}
|
|
332
|
+
var useDraftGuardStore = zustand.create((set) => ({
|
|
333
|
+
isDirty: false,
|
|
334
|
+
source: null,
|
|
335
|
+
isInitialized: false,
|
|
336
|
+
markDirty: (source) => set((state) => {
|
|
337
|
+
if (!state.isInitialized || !source) {
|
|
338
|
+
return state;
|
|
339
|
+
}
|
|
340
|
+
return { ...state, isDirty: true, source };
|
|
341
|
+
}),
|
|
342
|
+
clearDraft: () => set({ isDirty: false, source: null }),
|
|
343
|
+
markInitialized: () => set({ isInitialized: true })
|
|
344
|
+
}));
|
|
268
345
|
function cn(...args) {
|
|
269
346
|
return tailwindMerge.twMerge(clsx2.clsx(args));
|
|
270
347
|
}
|
|
@@ -3368,6 +3445,13 @@ var LookupSelect = ({
|
|
|
3368
3445
|
clearTimeout(fetchDelayRef.current);
|
|
3369
3446
|
}
|
|
3370
3447
|
const query = inputValue.trim();
|
|
3448
|
+
if (!query) {
|
|
3449
|
+
setLoading(false);
|
|
3450
|
+
setFetchError(null);
|
|
3451
|
+
setSuggestions([]);
|
|
3452
|
+
setIsDropdownOpen(false);
|
|
3453
|
+
return;
|
|
3454
|
+
}
|
|
3371
3455
|
setLoading(true);
|
|
3372
3456
|
setFetchError(null);
|
|
3373
3457
|
setIsDropdownOpen(true);
|
|
@@ -5771,151 +5855,6 @@ function DialogDescription2({
|
|
|
5771
5855
|
// src/components/dialog-alert/lib/constants.ts
|
|
5772
5856
|
var DIALOG_ALERT_I18N_SUBNAMESPACE = "dialog_alert";
|
|
5773
5857
|
var i18nPrefix = `translation:${DIALOG_ALERT_I18N_SUBNAMESPACE}.`;
|
|
5774
|
-
|
|
5775
|
-
// src/components/dialog-alert/locale/default.ts
|
|
5776
|
-
var defaultResource = {
|
|
5777
|
-
sharedui: {
|
|
5778
|
-
translation: {
|
|
5779
|
-
[DIALOG_ALERT_I18N_SUBNAMESPACE]: {
|
|
5780
|
-
ok: "OK",
|
|
5781
|
-
cancel: "Cancel",
|
|
5782
|
-
close: "Close",
|
|
5783
|
-
"success.saved": {
|
|
5784
|
-
title: "Successfully",
|
|
5785
|
-
description: "Data has been successfully saved"
|
|
5786
|
-
},
|
|
5787
|
-
"success.deleted": {
|
|
5788
|
-
title: "Successfully",
|
|
5789
|
-
description: "Data has been successfully deleted"
|
|
5790
|
-
},
|
|
5791
|
-
"success.removed": {
|
|
5792
|
-
title: "Successfully",
|
|
5793
|
-
description: "Data has been successfully removed"
|
|
5794
|
-
},
|
|
5795
|
-
"error.api_db_error": {
|
|
5796
|
-
title: "API/Database Error",
|
|
5797
|
-
description: "Failed to connect to the system. Please check API or database connection."
|
|
5798
|
-
},
|
|
5799
|
-
"error.permission_denied": {
|
|
5800
|
-
title: "Permission Denied",
|
|
5801
|
-
description: "You do not have permission to perform this action.",
|
|
5802
|
-
confirm_text: "Discard"
|
|
5803
|
-
},
|
|
5804
|
-
"error.session_expired": {
|
|
5805
|
-
title: "Session Expired",
|
|
5806
|
-
description: "Your session has expired or you have been logged out. Please sign in again.",
|
|
5807
|
-
confirm_text: "Logout"
|
|
5808
|
-
},
|
|
5809
|
-
"error.user_not_found": {
|
|
5810
|
-
title: "User Not Found",
|
|
5811
|
-
description: "The system could not locate the user account.",
|
|
5812
|
-
confirm_text: "Logout"
|
|
5813
|
-
},
|
|
5814
|
-
"error.data_not_found": {
|
|
5815
|
-
title: "Data Not Found",
|
|
5816
|
-
description: "The data has already been deleted or does not exist in the system."
|
|
5817
|
-
},
|
|
5818
|
-
"error.data_restrict_editing": {
|
|
5819
|
-
title: "Data Status Restricts Editing",
|
|
5820
|
-
description: "Data status does not allow editing."
|
|
5821
|
-
},
|
|
5822
|
-
"error.network_timeout_error": {
|
|
5823
|
-
title: "Network Error / Timeout",
|
|
5824
|
-
description: "The system could not connect to the network or the request took too long to process."
|
|
5825
|
-
},
|
|
5826
|
-
"error.queue_full": {
|
|
5827
|
-
title: "Queue Full",
|
|
5828
|
-
description: "The notification queue has reached its limit. Please try again later."
|
|
5829
|
-
},
|
|
5830
|
-
"error.invalid_data_format": {
|
|
5831
|
-
title: "Invalid Data Format",
|
|
5832
|
-
description: "Data creation failed due to invalid or incorrectly formatted data."
|
|
5833
|
-
},
|
|
5834
|
-
"error.data_linked_to_system_data": {
|
|
5835
|
-
title: "Data Linked to System Data",
|
|
5836
|
-
description: "Cannot delete data because they are linked to existing system data."
|
|
5837
|
-
},
|
|
5838
|
-
"error.pending_workflow_conflict": {
|
|
5839
|
-
title: "Pending Workflow Conflict ",
|
|
5840
|
-
description: "The data is currently involved in a pending workflow or approval process and cannot be deactivated."
|
|
5841
|
-
},
|
|
5842
|
-
"error.invalid_incomplete_data": {
|
|
5843
|
-
title: "Invalid or Incomplete Data",
|
|
5844
|
-
description: "Data status cannot be changed due to incomplete or invalid information."
|
|
5845
|
-
},
|
|
5846
|
-
"error.client_side_error": {
|
|
5847
|
-
title: "Client-Side Error",
|
|
5848
|
-
description: "An error occurred on the client side. Please refresh the page or try again."
|
|
5849
|
-
},
|
|
5850
|
-
"error.system_limitation": {
|
|
5851
|
-
title: "System Limitation",
|
|
5852
|
-
description: "The search cannot be completed due to system limitations. Please simplify your query."
|
|
5853
|
-
},
|
|
5854
|
-
"error.timeout": {
|
|
5855
|
-
title: "Timeout",
|
|
5856
|
-
description: "Request failed due to a system error or timeout. Please try again."
|
|
5857
|
-
},
|
|
5858
|
-
"error.duplicate_data": {
|
|
5859
|
-
title: "Duplicate Data",
|
|
5860
|
-
description: "The data you entered already exists in the system."
|
|
5861
|
-
},
|
|
5862
|
-
"error.something_went_wrong": {
|
|
5863
|
-
title: "Something Went Wrong",
|
|
5864
|
-
description: "An unknown error occurred."
|
|
5865
|
-
},
|
|
5866
|
-
"confirm.delete": {
|
|
5867
|
-
title: "Confirmation",
|
|
5868
|
-
description: "Are you sure you want to delete this item?",
|
|
5869
|
-
confirm_text: "Delete"
|
|
5870
|
-
},
|
|
5871
|
-
"confirm.inactive": {
|
|
5872
|
-
title: "Confirmation",
|
|
5873
|
-
description: "Are you sure you want to inactive this item?",
|
|
5874
|
-
confirm_text: "Inactive"
|
|
5875
|
-
},
|
|
5876
|
-
"confirm.active": {
|
|
5877
|
-
variant: "confirm-green",
|
|
5878
|
-
title: "Confirmation",
|
|
5879
|
-
description: "Are you sure you want to active this item?",
|
|
5880
|
-
confirm_text: "Active"
|
|
5881
|
-
},
|
|
5882
|
-
"confirm.leave_page": {
|
|
5883
|
-
title: "Confirmation",
|
|
5884
|
-
description: "Unsaved changes. Do you want to leave this page?",
|
|
5885
|
-
confirm_text: "Leave"
|
|
5886
|
-
},
|
|
5887
|
-
"confirm.reset_form": {
|
|
5888
|
-
title: "Confirmation",
|
|
5889
|
-
description: "Unsaved changes. If you continue, all changes will be lost.",
|
|
5890
|
-
confirm_text: "Reset"
|
|
5891
|
-
},
|
|
5892
|
-
"confirm.remove": {
|
|
5893
|
-
title: "Confirmation",
|
|
5894
|
-
description: "Are you sure you want to remove this item?",
|
|
5895
|
-
confirm_text: "Remove"
|
|
5896
|
-
},
|
|
5897
|
-
"confirm.logout": {
|
|
5898
|
-
title: "Confirmation",
|
|
5899
|
-
description: "Do you want to log out?",
|
|
5900
|
-
confirm_text: "Logout"
|
|
5901
|
-
}
|
|
5902
|
-
}
|
|
5903
|
-
}
|
|
5904
|
-
}
|
|
5905
|
-
};
|
|
5906
|
-
|
|
5907
|
-
// src/components/dialog-alert/locale/i18n.ts
|
|
5908
|
-
var instance = i18n__default.default.createInstance({
|
|
5909
|
-
resources: defaultResource,
|
|
5910
|
-
lng: "sharedui",
|
|
5911
|
-
fallbackLng: "sharedui",
|
|
5912
|
-
defaultNS: "translation",
|
|
5913
|
-
interpolation: {
|
|
5914
|
-
escapeValue: false
|
|
5915
|
-
}
|
|
5916
|
-
}).use(reactI18next.initReactI18next);
|
|
5917
|
-
instance.init();
|
|
5918
|
-
var i18n_default = instance;
|
|
5919
5858
|
var titleColorVariant = {
|
|
5920
5859
|
default: "",
|
|
5921
5860
|
success: "text-sus-button-green-3",
|
|
@@ -6147,6 +6086,151 @@ var DIALOG_ALERT_TEMPLATES = {
|
|
|
6147
6086
|
confirmText: "confirm.logout.confirm_text"
|
|
6148
6087
|
}
|
|
6149
6088
|
};
|
|
6089
|
+
|
|
6090
|
+
// src/components/dialog-alert/locale/default.ts
|
|
6091
|
+
var defaultResource = {
|
|
6092
|
+
sharedui: {
|
|
6093
|
+
translation: {
|
|
6094
|
+
[DIALOG_ALERT_I18N_SUBNAMESPACE]: {
|
|
6095
|
+
ok: "OK",
|
|
6096
|
+
cancel: "Cancel",
|
|
6097
|
+
close: "Close",
|
|
6098
|
+
"success.saved": {
|
|
6099
|
+
title: "Successfully",
|
|
6100
|
+
description: "Data has been successfully saved"
|
|
6101
|
+
},
|
|
6102
|
+
"success.deleted": {
|
|
6103
|
+
title: "Successfully",
|
|
6104
|
+
description: "Data has been successfully deleted"
|
|
6105
|
+
},
|
|
6106
|
+
"success.removed": {
|
|
6107
|
+
title: "Successfully",
|
|
6108
|
+
description: "Data has been successfully removed"
|
|
6109
|
+
},
|
|
6110
|
+
"error.api_db_error": {
|
|
6111
|
+
title: "API/Database Error",
|
|
6112
|
+
description: "Failed to connect to the system. Please check API or database connection."
|
|
6113
|
+
},
|
|
6114
|
+
"error.permission_denied": {
|
|
6115
|
+
title: "Permission Denied",
|
|
6116
|
+
description: "You do not have permission to perform this action.",
|
|
6117
|
+
confirm_text: "Discard"
|
|
6118
|
+
},
|
|
6119
|
+
"error.session_expired": {
|
|
6120
|
+
title: "Session Expired",
|
|
6121
|
+
description: "Your session has expired or you have been logged out. Please sign in again.",
|
|
6122
|
+
confirm_text: "Logout"
|
|
6123
|
+
},
|
|
6124
|
+
"error.user_not_found": {
|
|
6125
|
+
title: "User Not Found",
|
|
6126
|
+
description: "The system could not locate the user account.",
|
|
6127
|
+
confirm_text: "Logout"
|
|
6128
|
+
},
|
|
6129
|
+
"error.data_not_found": {
|
|
6130
|
+
title: "Data Not Found",
|
|
6131
|
+
description: "The data has already been deleted or does not exist in the system."
|
|
6132
|
+
},
|
|
6133
|
+
"error.data_restrict_editing": {
|
|
6134
|
+
title: "Data Status Restricts Editing",
|
|
6135
|
+
description: "Data status does not allow editing."
|
|
6136
|
+
},
|
|
6137
|
+
"error.network_timeout_error": {
|
|
6138
|
+
title: "Network Error / Timeout",
|
|
6139
|
+
description: "The system could not connect to the network or the request took too long to process."
|
|
6140
|
+
},
|
|
6141
|
+
"error.queue_full": {
|
|
6142
|
+
title: "Queue Full",
|
|
6143
|
+
description: "The notification queue has reached its limit. Please try again later."
|
|
6144
|
+
},
|
|
6145
|
+
"error.invalid_data_format": {
|
|
6146
|
+
title: "Invalid Data Format",
|
|
6147
|
+
description: "Data creation failed due to invalid or incorrectly formatted data."
|
|
6148
|
+
},
|
|
6149
|
+
"error.data_linked_to_system_data": {
|
|
6150
|
+
title: "Data Linked to System Data",
|
|
6151
|
+
description: "Cannot delete data because they are linked to existing system data."
|
|
6152
|
+
},
|
|
6153
|
+
"error.pending_workflow_conflict": {
|
|
6154
|
+
title: "Pending Workflow Conflict ",
|
|
6155
|
+
description: "The data is currently involved in a pending workflow or approval process and cannot be deactivated."
|
|
6156
|
+
},
|
|
6157
|
+
"error.invalid_incomplete_data": {
|
|
6158
|
+
title: "Invalid or Incomplete Data",
|
|
6159
|
+
description: "Data status cannot be changed due to incomplete or invalid information."
|
|
6160
|
+
},
|
|
6161
|
+
"error.client_side_error": {
|
|
6162
|
+
title: "Client-Side Error",
|
|
6163
|
+
description: "An error occurred on the client side. Please refresh the page or try again."
|
|
6164
|
+
},
|
|
6165
|
+
"error.system_limitation": {
|
|
6166
|
+
title: "System Limitation",
|
|
6167
|
+
description: "The search cannot be completed due to system limitations. Please simplify your query."
|
|
6168
|
+
},
|
|
6169
|
+
"error.timeout": {
|
|
6170
|
+
title: "Timeout",
|
|
6171
|
+
description: "Request failed due to a system error or timeout. Please try again."
|
|
6172
|
+
},
|
|
6173
|
+
"error.duplicate_data": {
|
|
6174
|
+
title: "Duplicate Data",
|
|
6175
|
+
description: "The data you entered already exists in the system."
|
|
6176
|
+
},
|
|
6177
|
+
"error.something_went_wrong": {
|
|
6178
|
+
title: "Something Went Wrong",
|
|
6179
|
+
description: "An unknown error occurred."
|
|
6180
|
+
},
|
|
6181
|
+
"confirm.delete": {
|
|
6182
|
+
title: "Confirmation",
|
|
6183
|
+
description: "Are you sure you want to delete this item?",
|
|
6184
|
+
confirm_text: "Delete"
|
|
6185
|
+
},
|
|
6186
|
+
"confirm.inactive": {
|
|
6187
|
+
title: "Confirmation",
|
|
6188
|
+
description: "Are you sure you want to inactive this item?",
|
|
6189
|
+
confirm_text: "Inactive"
|
|
6190
|
+
},
|
|
6191
|
+
"confirm.active": {
|
|
6192
|
+
variant: "confirm-green",
|
|
6193
|
+
title: "Confirmation",
|
|
6194
|
+
description: "Are you sure you want to active this item?",
|
|
6195
|
+
confirm_text: "Active"
|
|
6196
|
+
},
|
|
6197
|
+
"confirm.leave_page": {
|
|
6198
|
+
title: "Confirmation",
|
|
6199
|
+
description: "Unsaved changes. Do you want to leave this page?",
|
|
6200
|
+
confirm_text: "Leave"
|
|
6201
|
+
},
|
|
6202
|
+
"confirm.reset_form": {
|
|
6203
|
+
title: "Confirmation",
|
|
6204
|
+
description: "Unsaved changes. If you continue, all changes will be lost.",
|
|
6205
|
+
confirm_text: "Reset"
|
|
6206
|
+
},
|
|
6207
|
+
"confirm.remove": {
|
|
6208
|
+
title: "Confirmation",
|
|
6209
|
+
description: "Are you sure you want to remove this item?",
|
|
6210
|
+
confirm_text: "Remove"
|
|
6211
|
+
},
|
|
6212
|
+
"confirm.logout": {
|
|
6213
|
+
title: "Confirmation",
|
|
6214
|
+
description: "Do you want to log out?",
|
|
6215
|
+
confirm_text: "Logout"
|
|
6216
|
+
}
|
|
6217
|
+
}
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
};
|
|
6221
|
+
|
|
6222
|
+
// src/components/dialog-alert/locale/i18n.ts
|
|
6223
|
+
var instance = i18n__default.default.createInstance({
|
|
6224
|
+
resources: defaultResource,
|
|
6225
|
+
lng: "sharedui",
|
|
6226
|
+
fallbackLng: "sharedui",
|
|
6227
|
+
defaultNS: "translation",
|
|
6228
|
+
interpolation: {
|
|
6229
|
+
escapeValue: false
|
|
6230
|
+
}
|
|
6231
|
+
}).use(reactI18next.initReactI18next);
|
|
6232
|
+
instance.init();
|
|
6233
|
+
var i18n_default = instance;
|
|
6150
6234
|
var useDialogAlertStore = zustand.create((set, get) => ({
|
|
6151
6235
|
open: false,
|
|
6152
6236
|
dialogProps: {},
|
|
@@ -6199,7 +6283,7 @@ var DialogAlertProvider = ({ children, i18nResource, i18nLang }) => {
|
|
|
6199
6283
|
return;
|
|
6200
6284
|
}
|
|
6201
6285
|
}, [i18nLang, i18nResource]);
|
|
6202
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6286
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactI18next.I18nextProvider, { i18n: i18n_default, children: [
|
|
6203
6287
|
children,
|
|
6204
6288
|
/* @__PURE__ */ jsxRuntime.jsx(DialogAlert, { open, onOpenChange: setOpen, ...dialogProps })
|
|
6205
6289
|
] });
|
|
@@ -12046,6 +12130,7 @@ exports.stripNullishObject = stripNullishObject;
|
|
|
12046
12130
|
exports.throttle = throttle;
|
|
12047
12131
|
exports.tokenizeFormulaString = tokenizeFormulaString;
|
|
12048
12132
|
exports.useControllableState = useControllableState_default;
|
|
12133
|
+
exports.useDraftGuardStore = useDraftGuardStore;
|
|
12049
12134
|
exports.useFormField = useFormField;
|
|
12050
12135
|
exports.useGridSettingsStore = useGridSettingsStore_default;
|
|
12051
12136
|
exports.useHover = useHover_default;
|
|
@@ -12054,6 +12139,7 @@ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
|
12054
12139
|
exports.useMediaQuery = useMediaQuery_default;
|
|
12055
12140
|
exports.usePreventPageLeave = usePreventPageLeave_default;
|
|
12056
12141
|
exports.usePreventPageLeaveStore = usePreventPageLeaveStore_default;
|
|
12142
|
+
exports.useSafeBlocker = useSafeBlocker;
|
|
12057
12143
|
exports.useScreenSize = useScreenSize_default;
|
|
12058
12144
|
exports.useSidebar = useSidebar;
|
|
12059
12145
|
exports.useTruncated = useTruncated_default;
|