@eztrak/shared 0.15.0 → 0.15.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/{chunk-KFBKDGZV.mjs → chunk-HQPQ6TOE.mjs} +13 -6
- package/dist/{chunk-KFBKDGZV.mjs.map → chunk-HQPQ6TOE.mjs.map} +1 -1
- package/dist/components/index.d.mts +15 -3
- package/dist/components/index.d.ts +15 -3
- package/dist/components/index.js +13 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ROW_ACTION_DEFAULT_ICON_SIZE,
|
|
12
12
|
ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE,
|
|
13
13
|
ROW_ACTION_ITEM_HOVER_CLASS,
|
|
14
|
+
ROW_ACTION_ITEM_TEXT_CLASS,
|
|
14
15
|
ROW_ACTION_PRESETS,
|
|
15
16
|
ResetColumnsButton,
|
|
16
17
|
ResetFiltersButton,
|
|
@@ -22,7 +23,7 @@ import {
|
|
|
22
23
|
TooltipText,
|
|
23
24
|
dropdownStyles,
|
|
24
25
|
resolveActions
|
|
25
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-HQPQ6TOE.mjs";
|
|
26
27
|
import "../chunk-EIX5CUQF.mjs";
|
|
27
28
|
export {
|
|
28
29
|
ActionMenuItem,
|
|
@@ -37,6 +38,7 @@ export {
|
|
|
37
38
|
ROW_ACTION_DEFAULT_ICON_SIZE,
|
|
38
39
|
ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE,
|
|
39
40
|
ROW_ACTION_ITEM_HOVER_CLASS,
|
|
41
|
+
ROW_ACTION_ITEM_TEXT_CLASS,
|
|
40
42
|
ROW_ACTION_PRESETS,
|
|
41
43
|
ResetColumnsButton,
|
|
42
44
|
ResetFiltersButton,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CreateBaseQueryWithRetryOptions, PermissionRecord, TransformedPermissions, USER_STATE_STORAGE_KEY, capitalizeText, checkIfExistsInArray, cn, convertCommaDataToArray, createBaseQueryWithRetry, currencyFormatter, deserializeJson, flattenTableData, formatDate, formatDateTime, formatNumber, get, getApiError, getErrorMessages, getFieldsByCategory, getFieldsByInputType, getFieldsByName, getItem, getItemFromLocalStorage, isEmpty, loadUserState, normalizeApiListItems, parseCurrencyValueToNumber, removeByPropertyValues, removeItem, resetPageParam, saveItemLocalStorage, saveUserState, set, setItem, storeItemInLocalStorage, toDateInputValue, toLowerCaseText, transformPermissions, truncateFileName, truncateText } from './utils/index.mjs';
|
|
2
2
|
export { C as ConfirmationAlertOptions, E as ErrorClassification, a as ErrorSuggestedAction, H as HandleApiErrorOptions, R as RtkQueryError, c as classifyError, b as confirmationAlert, f as formatValidationErrorsHtml, h as handleApiError, i as isRetryableError } from './handleApiError-CwVIJOqO.mjs';
|
|
3
3
|
export { UseGridHeightOptions, useGridHeight, usePaginationUrlSync } from './hooks/index.mjs';
|
|
4
|
-
export { ActionMenuItem, ActionMenuItemProps, CardSkeleton, CardSkeletonProps, CardSkeletonVariant, CellEditPayload, CellEditorInputType, CustomCellEditor, CustomCellEditorProps, CustomCellEditorRef, CustomPagination, CustomPaginationClassNames, CustomPaginationProps, DropdownFilter, DropdownFilterProps, DropdownOption, EztrakTab, EztrakTabs, EztrakTabsClassNames, EztrakTabsProps, LayoutStatus, Loader, LoaderProps, Modal, ModalProps, PaginationData, PopupActionHandler, PopupCellRenderer, PopupCellRendererParams, PopupCellRendererProps, PopupDropDownContent, ROW_ACTION_DEFAULT_ICON_SIZE, ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE, ROW_ACTION_ITEM_HOVER_CLASS, ROW_ACTION_PRESETS, ResetColumnsButton, ResetColumnsButtonProps, ResetFiltersButton, ResetFiltersButtonProps, ResetFiltersButtonVariant, ResolvedRowAction, RowAction, RowActionConfirmFn, RowActionFlag, RowActionItemRenderContext, RowActionItemType, RowActionPreset, RowActionPresetName, RowActions, RowActionsList, RowActionsMode, RowActionsProps, RowActionsRenderContext, SearchInput, SearchInputProps, TableErrorBoundary, TableErrorBoundaryProps, TableLayoutToolbarControls, TableLayoutToolbarControlsProps, ToolTip, ToolTipProps, TooltipText, TooltipTextProps, dropdownStyles, resolveActions } from './components/index.mjs';
|
|
4
|
+
export { ActionMenuItem, ActionMenuItemProps, CardSkeleton, CardSkeletonProps, CardSkeletonVariant, CellEditPayload, CellEditorInputType, CustomCellEditor, CustomCellEditorProps, CustomCellEditorRef, CustomPagination, CustomPaginationClassNames, CustomPaginationProps, DropdownFilter, DropdownFilterProps, DropdownOption, EztrakTab, EztrakTabs, EztrakTabsClassNames, EztrakTabsProps, LayoutStatus, Loader, LoaderProps, Modal, ModalProps, PaginationData, PopupActionHandler, PopupCellRenderer, PopupCellRendererParams, PopupCellRendererProps, PopupDropDownContent, ROW_ACTION_DEFAULT_ICON_SIZE, ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE, ROW_ACTION_ITEM_HOVER_CLASS, ROW_ACTION_ITEM_TEXT_CLASS, ROW_ACTION_PRESETS, ResetColumnsButton, ResetColumnsButtonProps, ResetFiltersButton, ResetFiltersButtonProps, ResetFiltersButtonVariant, ResolvedRowAction, RowAction, RowActionConfirmFn, RowActionFlag, RowActionItemRenderContext, RowActionItemType, RowActionPreset, RowActionPresetName, RowActions, RowActionsList, RowActionsMode, RowActionsProps, RowActionsRenderContext, SearchInput, SearchInputProps, TableErrorBoundary, TableErrorBoundaryProps, TableLayoutToolbarControls, TableLayoutToolbarControlsProps, ToolTip, ToolTipProps, TooltipText, TooltipTextProps, dropdownStyles, resolveActions } from './components/index.mjs';
|
|
5
5
|
import 'clsx';
|
|
6
6
|
import '@reduxjs/toolkit/query';
|
|
7
7
|
import 'react-router-dom';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { CreateBaseQueryWithRetryOptions, PermissionRecord, TransformedPermissions, USER_STATE_STORAGE_KEY, capitalizeText, checkIfExistsInArray, cn, convertCommaDataToArray, createBaseQueryWithRetry, currencyFormatter, deserializeJson, flattenTableData, formatDate, formatDateTime, formatNumber, get, getApiError, getErrorMessages, getFieldsByCategory, getFieldsByInputType, getFieldsByName, getItem, getItemFromLocalStorage, isEmpty, loadUserState, normalizeApiListItems, parseCurrencyValueToNumber, removeByPropertyValues, removeItem, resetPageParam, saveItemLocalStorage, saveUserState, set, setItem, storeItemInLocalStorage, toDateInputValue, toLowerCaseText, transformPermissions, truncateFileName, truncateText } from './utils/index.js';
|
|
2
2
|
export { C as ConfirmationAlertOptions, E as ErrorClassification, a as ErrorSuggestedAction, H as HandleApiErrorOptions, R as RtkQueryError, c as classifyError, b as confirmationAlert, f as formatValidationErrorsHtml, h as handleApiError, i as isRetryableError } from './handleApiError-CwVIJOqO.js';
|
|
3
3
|
export { UseGridHeightOptions, useGridHeight, usePaginationUrlSync } from './hooks/index.js';
|
|
4
|
-
export { ActionMenuItem, ActionMenuItemProps, CardSkeleton, CardSkeletonProps, CardSkeletonVariant, CellEditPayload, CellEditorInputType, CustomCellEditor, CustomCellEditorProps, CustomCellEditorRef, CustomPagination, CustomPaginationClassNames, CustomPaginationProps, DropdownFilter, DropdownFilterProps, DropdownOption, EztrakTab, EztrakTabs, EztrakTabsClassNames, EztrakTabsProps, LayoutStatus, Loader, LoaderProps, Modal, ModalProps, PaginationData, PopupActionHandler, PopupCellRenderer, PopupCellRendererParams, PopupCellRendererProps, PopupDropDownContent, ROW_ACTION_DEFAULT_ICON_SIZE, ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE, ROW_ACTION_ITEM_HOVER_CLASS, ROW_ACTION_PRESETS, ResetColumnsButton, ResetColumnsButtonProps, ResetFiltersButton, ResetFiltersButtonProps, ResetFiltersButtonVariant, ResolvedRowAction, RowAction, RowActionConfirmFn, RowActionFlag, RowActionItemRenderContext, RowActionItemType, RowActionPreset, RowActionPresetName, RowActions, RowActionsList, RowActionsMode, RowActionsProps, RowActionsRenderContext, SearchInput, SearchInputProps, TableErrorBoundary, TableErrorBoundaryProps, TableLayoutToolbarControls, TableLayoutToolbarControlsProps, ToolTip, ToolTipProps, TooltipText, TooltipTextProps, dropdownStyles, resolveActions } from './components/index.js';
|
|
4
|
+
export { ActionMenuItem, ActionMenuItemProps, CardSkeleton, CardSkeletonProps, CardSkeletonVariant, CellEditPayload, CellEditorInputType, CustomCellEditor, CustomCellEditorProps, CustomCellEditorRef, CustomPagination, CustomPaginationClassNames, CustomPaginationProps, DropdownFilter, DropdownFilterProps, DropdownOption, EztrakTab, EztrakTabs, EztrakTabsClassNames, EztrakTabsProps, LayoutStatus, Loader, LoaderProps, Modal, ModalProps, PaginationData, PopupActionHandler, PopupCellRenderer, PopupCellRendererParams, PopupCellRendererProps, PopupDropDownContent, ROW_ACTION_DEFAULT_ICON_SIZE, ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE, ROW_ACTION_ITEM_HOVER_CLASS, ROW_ACTION_ITEM_TEXT_CLASS, ROW_ACTION_PRESETS, ResetColumnsButton, ResetColumnsButtonProps, ResetFiltersButton, ResetFiltersButtonProps, ResetFiltersButtonVariant, ResolvedRowAction, RowAction, RowActionConfirmFn, RowActionFlag, RowActionItemRenderContext, RowActionItemType, RowActionPreset, RowActionPresetName, RowActions, RowActionsList, RowActionsMode, RowActionsProps, RowActionsRenderContext, SearchInput, SearchInputProps, TableErrorBoundary, TableErrorBoundaryProps, TableLayoutToolbarControls, TableLayoutToolbarControlsProps, ToolTip, ToolTipProps, TooltipText, TooltipTextProps, dropdownStyles, resolveActions } from './components/index.js';
|
|
5
5
|
import 'clsx';
|
|
6
6
|
import '@reduxjs/toolkit/query';
|
|
7
7
|
import 'react-router-dom';
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
ROW_ACTION_DEFAULT_ICON_SIZE: () => ROW_ACTION_DEFAULT_ICON_SIZE,
|
|
43
43
|
ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE: () => ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE,
|
|
44
44
|
ROW_ACTION_ITEM_HOVER_CLASS: () => ROW_ACTION_ITEM_HOVER_CLASS,
|
|
45
|
+
ROW_ACTION_ITEM_TEXT_CLASS: () => ROW_ACTION_ITEM_TEXT_CLASS,
|
|
45
46
|
ROW_ACTION_PRESETS: () => ROW_ACTION_PRESETS,
|
|
46
47
|
ResetColumnsButton: () => ResetColumnsButton,
|
|
47
48
|
ResetFiltersButton: () => ResetFiltersButton,
|
|
@@ -2207,13 +2208,14 @@ function PopupCellRenderer({
|
|
|
2207
2208
|
// src/components/row-actions/presets.ts
|
|
2208
2209
|
var import_fa2 = require("react-icons/fa");
|
|
2209
2210
|
var ROW_ACTION_ITEM_HOVER_CLASS = "hover:bg-primary-50 hover:text-primary-150";
|
|
2211
|
+
var ROW_ACTION_ITEM_TEXT_CLASS = "text-secondary";
|
|
2210
2212
|
var ROW_ACTION_DEFAULT_ICON_SIZE = 16;
|
|
2211
2213
|
var ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE = {
|
|
2212
2214
|
zIndex: 1e4
|
|
2213
2215
|
};
|
|
2214
2216
|
var ROW_ACTION_PRESETS = {
|
|
2215
2217
|
edit: { label: "Edit", icon: import_fa2.FaEdit },
|
|
2216
|
-
delete: { label: "Delete", icon: import_fa2.FaTrashAlt, danger: true },
|
|
2218
|
+
delete: { label: "Delete", icon: import_fa2.FaTrashAlt, danger: true, iconClassName: "text-red-500" },
|
|
2217
2219
|
view: { label: "View", icon: import_fa2.FaEye },
|
|
2218
2220
|
notes: { label: "Notes", icon: import_fa2.FaFileAlt },
|
|
2219
2221
|
history: { label: "History", icon: import_fa2.FaHistory },
|
|
@@ -2229,6 +2231,7 @@ function ActionMenuItem({
|
|
|
2229
2231
|
icon: Icon,
|
|
2230
2232
|
iconSize = ROW_ACTION_DEFAULT_ICON_SIZE,
|
|
2231
2233
|
iconClassName,
|
|
2234
|
+
labelClassName,
|
|
2232
2235
|
tooltip,
|
|
2233
2236
|
tooltipPlacement = "top",
|
|
2234
2237
|
tooltipDelayShow,
|
|
@@ -2267,9 +2270,9 @@ function ActionMenuItem({
|
|
|
2267
2270
|
},
|
|
2268
2271
|
className: cn(
|
|
2269
2272
|
"flex items-center gap-2 text-sm transition-colors duration-150",
|
|
2273
|
+
ROW_ACTION_ITEM_TEXT_CLASS,
|
|
2270
2274
|
showLabel ? "w-full rounded-xl px-3 py-2 text-left" : "justify-center rounded-md p-1",
|
|
2271
2275
|
disabled ? "cursor-not-allowed opacity-50" : ROW_ACTION_ITEM_HOVER_CLASS,
|
|
2272
|
-
danger && "text-red-500",
|
|
2273
2276
|
highlight && !danger && "text-primary-150",
|
|
2274
2277
|
className
|
|
2275
2278
|
),
|
|
@@ -2282,7 +2285,7 @@ function ActionMenuItem({
|
|
|
2282
2285
|
size: iconSize
|
|
2283
2286
|
}
|
|
2284
2287
|
) : null,
|
|
2285
|
-
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: label }) : null
|
|
2288
|
+
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: labelClassName, children: label }) : null
|
|
2286
2289
|
]
|
|
2287
2290
|
}
|
|
2288
2291
|
)
|
|
@@ -2331,7 +2334,9 @@ function resolveActions(actions, data, hasPermission, presets) {
|
|
|
2331
2334
|
tooltipPlacement: action.tooltipPlacement,
|
|
2332
2335
|
confirm: action.confirm,
|
|
2333
2336
|
closeOnClick: action.closeOnClick !== false,
|
|
2334
|
-
className: action.className
|
|
2337
|
+
className: action.className,
|
|
2338
|
+
iconClassName: cn(preset?.iconClassName, action.iconClassName) || void 0,
|
|
2339
|
+
labelClassName: action.labelClassName
|
|
2335
2340
|
};
|
|
2336
2341
|
return [resolved];
|
|
2337
2342
|
});
|
|
@@ -2363,6 +2368,7 @@ function RowActions({
|
|
|
2363
2368
|
menuClassName,
|
|
2364
2369
|
itemClassName,
|
|
2365
2370
|
itemIconClassName,
|
|
2371
|
+
itemLabelClassName,
|
|
2366
2372
|
iconSize = ROW_ACTION_DEFAULT_ICON_SIZE,
|
|
2367
2373
|
triggerTooltip = "Actions",
|
|
2368
2374
|
triggerAriaLabel = "Row actions",
|
|
@@ -2408,7 +2414,8 @@ function RowActions({
|
|
|
2408
2414
|
label: action.label,
|
|
2409
2415
|
icon: action.icon,
|
|
2410
2416
|
iconSize: action.iconSize ?? iconSize,
|
|
2411
|
-
iconClassName: itemIconClassName,
|
|
2417
|
+
iconClassName: cn(itemIconClassName, action.iconClassName),
|
|
2418
|
+
labelClassName: cn(itemLabelClassName, action.labelClassName),
|
|
2412
2419
|
tooltip: action.tooltip,
|
|
2413
2420
|
tooltipPlacement: action.tooltipPlacement ?? tooltipPlacement,
|
|
2414
2421
|
tooltipDelayShow,
|
|
@@ -2582,6 +2589,7 @@ var TableErrorBoundary = ({
|
|
|
2582
2589
|
ROW_ACTION_DEFAULT_ICON_SIZE,
|
|
2583
2590
|
ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE,
|
|
2584
2591
|
ROW_ACTION_ITEM_HOVER_CLASS,
|
|
2592
|
+
ROW_ACTION_ITEM_TEXT_CLASS,
|
|
2585
2593
|
ROW_ACTION_PRESETS,
|
|
2586
2594
|
ResetColumnsButton,
|
|
2587
2595
|
ResetFiltersButton,
|