@sustaina/shared-ui 1.36.1 → 1.37.1
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 +229 -150
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +229 -152
- 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
|
}
|
|
@@ -4227,7 +4304,7 @@ var sanitizeInput = (val) => {
|
|
|
4227
4304
|
const trimmed = val.trim();
|
|
4228
4305
|
if (/^\{.*\}$/s.test(trimmed) || /^\[.*\]$/s.test(trimmed)) return "__INVALID_JSON_LITERAL__";
|
|
4229
4306
|
if (/\\\{/.test(val) || /\\\}/.test(val)) return "__INVALID_JSON_ESCAPE__";
|
|
4230
|
-
if (/[
|
|
4307
|
+
if (/[%*~^]/.test(trimmed)) return "__INVALID_WILDCARD__";
|
|
4231
4308
|
if (/[%><={}\\[\]"']/u.test(trimmed)) return "__INVALID_CHAR__";
|
|
4232
4309
|
if (/\p{Cc}/u.test(val)) return "__INVALID_CONTROL_CHAR__";
|
|
4233
4310
|
return trimmed.replace(/\s+/g, " ");
|
|
@@ -5771,151 +5848,6 @@ function DialogDescription2({
|
|
|
5771
5848
|
// src/components/dialog-alert/lib/constants.ts
|
|
5772
5849
|
var DIALOG_ALERT_I18N_SUBNAMESPACE = "dialog_alert";
|
|
5773
5850
|
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
5851
|
var titleColorVariant = {
|
|
5920
5852
|
default: "",
|
|
5921
5853
|
success: "text-sus-button-green-3",
|
|
@@ -6147,6 +6079,151 @@ var DIALOG_ALERT_TEMPLATES = {
|
|
|
6147
6079
|
confirmText: "confirm.logout.confirm_text"
|
|
6148
6080
|
}
|
|
6149
6081
|
};
|
|
6082
|
+
|
|
6083
|
+
// src/components/dialog-alert/locale/default.ts
|
|
6084
|
+
var defaultResource = {
|
|
6085
|
+
sharedui: {
|
|
6086
|
+
translation: {
|
|
6087
|
+
[DIALOG_ALERT_I18N_SUBNAMESPACE]: {
|
|
6088
|
+
ok: "OK",
|
|
6089
|
+
cancel: "Cancel",
|
|
6090
|
+
close: "Close",
|
|
6091
|
+
"success.saved": {
|
|
6092
|
+
title: "Successfully",
|
|
6093
|
+
description: "Data has been successfully saved"
|
|
6094
|
+
},
|
|
6095
|
+
"success.deleted": {
|
|
6096
|
+
title: "Successfully",
|
|
6097
|
+
description: "Data has been successfully deleted"
|
|
6098
|
+
},
|
|
6099
|
+
"success.removed": {
|
|
6100
|
+
title: "Successfully",
|
|
6101
|
+
description: "Data has been successfully removed"
|
|
6102
|
+
},
|
|
6103
|
+
"error.api_db_error": {
|
|
6104
|
+
title: "API/Database Error",
|
|
6105
|
+
description: "Failed to connect to the system. Please check API or database connection."
|
|
6106
|
+
},
|
|
6107
|
+
"error.permission_denied": {
|
|
6108
|
+
title: "Permission Denied",
|
|
6109
|
+
description: "You do not have permission to perform this action.",
|
|
6110
|
+
confirm_text: "Discard"
|
|
6111
|
+
},
|
|
6112
|
+
"error.session_expired": {
|
|
6113
|
+
title: "Session Expired",
|
|
6114
|
+
description: "Your session has expired or you have been logged out. Please sign in again.",
|
|
6115
|
+
confirm_text: "Logout"
|
|
6116
|
+
},
|
|
6117
|
+
"error.user_not_found": {
|
|
6118
|
+
title: "User Not Found",
|
|
6119
|
+
description: "The system could not locate the user account.",
|
|
6120
|
+
confirm_text: "Logout"
|
|
6121
|
+
},
|
|
6122
|
+
"error.data_not_found": {
|
|
6123
|
+
title: "Data Not Found",
|
|
6124
|
+
description: "The data has already been deleted or does not exist in the system."
|
|
6125
|
+
},
|
|
6126
|
+
"error.data_restrict_editing": {
|
|
6127
|
+
title: "Data Status Restricts Editing",
|
|
6128
|
+
description: "Data status does not allow editing."
|
|
6129
|
+
},
|
|
6130
|
+
"error.network_timeout_error": {
|
|
6131
|
+
title: "Network Error / Timeout",
|
|
6132
|
+
description: "The system could not connect to the network or the request took too long to process."
|
|
6133
|
+
},
|
|
6134
|
+
"error.queue_full": {
|
|
6135
|
+
title: "Queue Full",
|
|
6136
|
+
description: "The notification queue has reached its limit. Please try again later."
|
|
6137
|
+
},
|
|
6138
|
+
"error.invalid_data_format": {
|
|
6139
|
+
title: "Invalid Data Format",
|
|
6140
|
+
description: "Data creation failed due to invalid or incorrectly formatted data."
|
|
6141
|
+
},
|
|
6142
|
+
"error.data_linked_to_system_data": {
|
|
6143
|
+
title: "Data Linked to System Data",
|
|
6144
|
+
description: "Cannot delete data because they are linked to existing system data."
|
|
6145
|
+
},
|
|
6146
|
+
"error.pending_workflow_conflict": {
|
|
6147
|
+
title: "Pending Workflow Conflict ",
|
|
6148
|
+
description: "The data is currently involved in a pending workflow or approval process and cannot be deactivated."
|
|
6149
|
+
},
|
|
6150
|
+
"error.invalid_incomplete_data": {
|
|
6151
|
+
title: "Invalid or Incomplete Data",
|
|
6152
|
+
description: "Data status cannot be changed due to incomplete or invalid information."
|
|
6153
|
+
},
|
|
6154
|
+
"error.client_side_error": {
|
|
6155
|
+
title: "Client-Side Error",
|
|
6156
|
+
description: "An error occurred on the client side. Please refresh the page or try again."
|
|
6157
|
+
},
|
|
6158
|
+
"error.system_limitation": {
|
|
6159
|
+
title: "System Limitation",
|
|
6160
|
+
description: "The search cannot be completed due to system limitations. Please simplify your query."
|
|
6161
|
+
},
|
|
6162
|
+
"error.timeout": {
|
|
6163
|
+
title: "Timeout",
|
|
6164
|
+
description: "Request failed due to a system error or timeout. Please try again."
|
|
6165
|
+
},
|
|
6166
|
+
"error.duplicate_data": {
|
|
6167
|
+
title: "Duplicate Data",
|
|
6168
|
+
description: "The data you entered already exists in the system."
|
|
6169
|
+
},
|
|
6170
|
+
"error.something_went_wrong": {
|
|
6171
|
+
title: "Something Went Wrong",
|
|
6172
|
+
description: "An unknown error occurred."
|
|
6173
|
+
},
|
|
6174
|
+
"confirm.delete": {
|
|
6175
|
+
title: "Confirmation",
|
|
6176
|
+
description: "Are you sure you want to delete this item?",
|
|
6177
|
+
confirm_text: "Delete"
|
|
6178
|
+
},
|
|
6179
|
+
"confirm.inactive": {
|
|
6180
|
+
title: "Confirmation",
|
|
6181
|
+
description: "Are you sure you want to inactive this item?",
|
|
6182
|
+
confirm_text: "Inactive"
|
|
6183
|
+
},
|
|
6184
|
+
"confirm.active": {
|
|
6185
|
+
variant: "confirm-green",
|
|
6186
|
+
title: "Confirmation",
|
|
6187
|
+
description: "Are you sure you want to active this item?",
|
|
6188
|
+
confirm_text: "Active"
|
|
6189
|
+
},
|
|
6190
|
+
"confirm.leave_page": {
|
|
6191
|
+
title: "Confirmation",
|
|
6192
|
+
description: "Unsaved changes. Do you want to leave this page?",
|
|
6193
|
+
confirm_text: "Leave"
|
|
6194
|
+
},
|
|
6195
|
+
"confirm.reset_form": {
|
|
6196
|
+
title: "Confirmation",
|
|
6197
|
+
description: "Unsaved changes. If you continue, all changes will be lost.",
|
|
6198
|
+
confirm_text: "Reset"
|
|
6199
|
+
},
|
|
6200
|
+
"confirm.remove": {
|
|
6201
|
+
title: "Confirmation",
|
|
6202
|
+
description: "Are you sure you want to remove this item?",
|
|
6203
|
+
confirm_text: "Remove"
|
|
6204
|
+
},
|
|
6205
|
+
"confirm.logout": {
|
|
6206
|
+
title: "Confirmation",
|
|
6207
|
+
description: "Do you want to log out?",
|
|
6208
|
+
confirm_text: "Logout"
|
|
6209
|
+
}
|
|
6210
|
+
}
|
|
6211
|
+
}
|
|
6212
|
+
}
|
|
6213
|
+
};
|
|
6214
|
+
|
|
6215
|
+
// src/components/dialog-alert/locale/i18n.ts
|
|
6216
|
+
var instance = i18n__default.default.createInstance({
|
|
6217
|
+
resources: defaultResource,
|
|
6218
|
+
lng: "sharedui",
|
|
6219
|
+
fallbackLng: "sharedui",
|
|
6220
|
+
defaultNS: "translation",
|
|
6221
|
+
interpolation: {
|
|
6222
|
+
escapeValue: false
|
|
6223
|
+
}
|
|
6224
|
+
}).use(reactI18next.initReactI18next);
|
|
6225
|
+
instance.init();
|
|
6226
|
+
var i18n_default = instance;
|
|
6150
6227
|
var useDialogAlertStore = zustand.create((set, get) => ({
|
|
6151
6228
|
open: false,
|
|
6152
6229
|
dialogProps: {},
|
|
@@ -6199,7 +6276,7 @@ var DialogAlertProvider = ({ children, i18nResource, i18nLang }) => {
|
|
|
6199
6276
|
return;
|
|
6200
6277
|
}
|
|
6201
6278
|
}, [i18nLang, i18nResource]);
|
|
6202
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6279
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactI18next.I18nextProvider, { i18n: i18n_default, children: [
|
|
6203
6280
|
children,
|
|
6204
6281
|
/* @__PURE__ */ jsxRuntime.jsx(DialogAlert, { open, onOpenChange: setOpen, ...dialogProps })
|
|
6205
6282
|
] });
|
|
@@ -12046,6 +12123,7 @@ exports.stripNullishObject = stripNullishObject;
|
|
|
12046
12123
|
exports.throttle = throttle;
|
|
12047
12124
|
exports.tokenizeFormulaString = tokenizeFormulaString;
|
|
12048
12125
|
exports.useControllableState = useControllableState_default;
|
|
12126
|
+
exports.useDraftGuardStore = useDraftGuardStore;
|
|
12049
12127
|
exports.useFormField = useFormField;
|
|
12050
12128
|
exports.useGridSettingsStore = useGridSettingsStore_default;
|
|
12051
12129
|
exports.useHover = useHover_default;
|
|
@@ -12054,6 +12132,7 @@ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
|
12054
12132
|
exports.useMediaQuery = useMediaQuery_default;
|
|
12055
12133
|
exports.usePreventPageLeave = usePreventPageLeave_default;
|
|
12056
12134
|
exports.usePreventPageLeaveStore = usePreventPageLeaveStore_default;
|
|
12135
|
+
exports.useSafeBlocker = useSafeBlocker;
|
|
12057
12136
|
exports.useScreenSize = useScreenSize_default;
|
|
12058
12137
|
exports.useSidebar = useSidebar;
|
|
12059
12138
|
exports.useTruncated = useTruncated_default;
|