@apia/components 4.0.29 → 4.0.31
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.ts +33 -4
- package/dist/index.js +137 -95
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -423,6 +423,12 @@ type TTabLabelRenderer = (props: {
|
|
|
423
423
|
}) => React__default.ReactElement;
|
|
424
424
|
type TTabsListState<TabType extends TTab> = {
|
|
425
425
|
isMultiple: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* By default, any customEvents.focus occurred inside the tab render will cause the tab to be opened.
|
|
428
|
+
*
|
|
429
|
+
* If listenFocusEvents=false, the customEvents.focus events will be ignored.
|
|
430
|
+
*/
|
|
431
|
+
listenFocusEvents?: boolean;
|
|
426
432
|
openTabsHistory: Set<Tab<TabType>>;
|
|
427
433
|
/**
|
|
428
434
|
* If this property is true, then it could never happen that all tabs are closed.
|
|
@@ -1050,6 +1056,7 @@ declare const IconInput: ({ additionalButtons, additionalButtonsPosition, button
|
|
|
1050
1056
|
|
|
1051
1057
|
type TDateProps = TModify<InputProps, {
|
|
1052
1058
|
allowPickBeforeToday?: boolean;
|
|
1059
|
+
avoidErrorMessage?: boolean;
|
|
1053
1060
|
CalModalRenderer?: (props: ICalModal & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1054
1061
|
deleteFiltersTimestamp?: number;
|
|
1055
1062
|
error?: string | null;
|
|
@@ -1566,6 +1573,10 @@ declare const ListSkeletonLoader: ({ items }: {
|
|
|
1566
1573
|
items?: number | undefined;
|
|
1567
1574
|
}) => React$1.JSX.Element;
|
|
1568
1575
|
|
|
1576
|
+
declare const LinearSpinnerLock: ({ isLocked }: {
|
|
1577
|
+
isLocked: boolean;
|
|
1578
|
+
}) => React$1.JSX.Element | null;
|
|
1579
|
+
|
|
1569
1580
|
declare const DeadSessionModal: ({ onClick }: {
|
|
1570
1581
|
onClick: () => unknown;
|
|
1571
1582
|
}) => React__default.JSX.Element;
|
|
@@ -1816,6 +1827,7 @@ type TIcon<P = Record<string, unknown>> = {
|
|
|
1816
1827
|
* Permite modificar el color individual de un ícono.
|
|
1817
1828
|
*/
|
|
1818
1829
|
textColor?: string;
|
|
1830
|
+
title?: string;
|
|
1819
1831
|
};
|
|
1820
1832
|
type TIconsList<P = Record<string, unknown>> = {
|
|
1821
1833
|
/**
|
|
@@ -2061,6 +2073,22 @@ declare const Uploader: (({ handler }: {
|
|
|
2061
2073
|
displayName: string;
|
|
2062
2074
|
};
|
|
2063
2075
|
|
|
2076
|
+
declare const defaultLabels: Readonly<{
|
|
2077
|
+
totalRecords: string;
|
|
2078
|
+
totalRecordsReached: string;
|
|
2079
|
+
maximize: string;
|
|
2080
|
+
minimize: string;
|
|
2081
|
+
information: string;
|
|
2082
|
+
deleteFilters: string;
|
|
2083
|
+
refresh: string;
|
|
2084
|
+
firstPage: string;
|
|
2085
|
+
previousPage: string;
|
|
2086
|
+
lastPage: string;
|
|
2087
|
+
nextPage: string;
|
|
2088
|
+
pageInputInstructions: string;
|
|
2089
|
+
page: string;
|
|
2090
|
+
moreData: string;
|
|
2091
|
+
}>;
|
|
2064
2092
|
interface IPagination {
|
|
2065
2093
|
appliedFilters?: number;
|
|
2066
2094
|
/**
|
|
@@ -2098,8 +2126,9 @@ interface IPagination {
|
|
|
2098
2126
|
variant?: 'primary' | 'secondary' | 'datagrid';
|
|
2099
2127
|
onMaximize?: () => unknown;
|
|
2100
2128
|
isMaximized?: boolean;
|
|
2129
|
+
labels?: Partial<typeof defaultLabels>;
|
|
2101
2130
|
}
|
|
2102
|
-
declare const Pagination: React__default.MemoExoticComponent<({ appliedFilters, areAllFiltersApplied, className, currentPage, disabled, disableReduced, hasMore, hideInfo, hideMaximizeButton, hideRefreshButton, isLoading, isPerforming, onDeleteFilters, onPageChange, onRefresh, pageCount, recordsCount: outerRecordsCount, reachedMax, showMaximizeOnSmallBreakpoints, variant, isMaximized, onMaximize, }: IPagination) => React__default.JSX.Element>;
|
|
2131
|
+
declare const Pagination: React__default.MemoExoticComponent<({ appliedFilters, areAllFiltersApplied, className, currentPage, disabled, disableReduced, hasMore, hideInfo, hideMaximizeButton, hideRefreshButton, isLoading, isPerforming, onDeleteFilters, onPageChange, onRefresh, pageCount, recordsCount: outerRecordsCount, reachedMax, showMaximizeOnSmallBreakpoints, variant, isMaximized, onMaximize, labels, }: IPagination) => React__default.JSX.Element>;
|
|
2103
2132
|
|
|
2104
2133
|
interface IAsidePanel {
|
|
2105
2134
|
title?: string;
|
|
@@ -2211,9 +2240,9 @@ declare const FooterResponsiveButtons: ({ breakpoint, children, className, }: {
|
|
|
2211
2240
|
* se muestra en el menú de hamburguesa.
|
|
2212
2241
|
*/
|
|
2213
2242
|
declare const HamburguerMenu: ({ container, header, forceVisibility, }: {
|
|
2214
|
-
container
|
|
2243
|
+
container?: string;
|
|
2215
2244
|
forceVisibility?: boolean;
|
|
2216
|
-
header
|
|
2245
|
+
header?: string;
|
|
2217
2246
|
}) => React__default.JSX.Element;
|
|
2218
2247
|
|
|
2219
2248
|
interface IHeader {
|
|
@@ -2619,5 +2648,5 @@ declare class Templater {
|
|
|
2619
2648
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2620
2649
|
}
|
|
2621
2650
|
|
|
2622
|
-
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, type AutocompleteCmpProps, AutocompleteController, type AutocompleteOption, type AutocompleteProps, AutogrowTextarea, AutoscrollContainer, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, ChatController, ChatMessage, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FloatingChatController, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, type IAttachment, type ICalendarModal, type IConfirm, type IDialogButtonBar, type IDialogHeader, type IField, type IFieldErrorMessage, type IFilterCondition, type IFilterDTOState, type IFilterValue, type IIconInput, type IMenuDefinition, type IOverlay, type IPagination, type IParameter, type IParametersGroup, type IRequiredMark, type IResponsiveComponent, type ISimpleButton, type ITableParameterProps, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, type MessageCallbackProps, type MessageSubmitCallback, Modal, NumberInput, Overlay, Pagination, Parameter, type ParameterObject, type ParameterPossibleValue, ParameterRender, type ParameterRenderer, type ParameterRendererProps, type ParameterType, Parameters, type ParametersDefinition, ParametersGroup, type ParametersGroupRenderer, ParametersStore, ParametersTable, type Payload, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, type TAccordionHandler, type TAccordionItemButton, type TApiaButtonType, type TApiaIconButton, type TChatControllerState, type TCheckbox, type TCssProps, type TDateProps, type TFieldLabel, type TFilterOp, type TFilterPayload, type TFilterType, type TFilterValue, type TFilterValueType, type TGetTabsController, type TIcon, type TIconButton, type TIconRenderer, type TIconSize, type TIconsList, type TListbox, type TMenuItem, type TMessageType, type TModal, type TModalSize, type TNumberInput, type TNumberInputChangeEvent, type TOnClickNode, type TOnConfirmSelection, type TOnSelectionChange, type TOpenModal, type TParameterType, type TSubmenu, type TTab, type TTabLabelRenderer as TTabRenderer, type TToolbarIconButton as TToolDefinition, type TTooltip, type TUploadHandlerProps, type TUploadInProgress, type TUploadedFile, type TUseModalConfiguration, type TVisualizationType, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isFavoriteIcon, isImage, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2651
|
+
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, type AutocompleteCmpProps, AutocompleteController, type AutocompleteOption, type AutocompleteProps, AutogrowTextarea, AutoscrollContainer, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, ChatController, ChatMessage, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FloatingChatController, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, type IAttachment, type ICalendarModal, type IConfirm, type IDialogButtonBar, type IDialogHeader, type IField, type IFieldErrorMessage, type IFilterCondition, type IFilterDTOState, type IFilterValue, type IIconInput, type IMenuDefinition, type IOverlay, type IPagination, type IParameter, type IParametersGroup, type IRequiredMark, type IResponsiveComponent, type ISimpleButton, type ITableParameterProps, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, type MessageCallbackProps, type MessageSubmitCallback, Modal, NumberInput, Overlay, Pagination, Parameter, type ParameterObject, type ParameterPossibleValue, ParameterRender, type ParameterRenderer, type ParameterRendererProps, type ParameterType, Parameters, type ParametersDefinition, ParametersGroup, type ParametersGroupRenderer, ParametersStore, ParametersTable, type Payload, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, type TAccordionHandler, type TAccordionItemButton, type TApiaButtonType, type TApiaIconButton, type TChatControllerState, type TCheckbox, type TCssProps, type TDateProps, type TFieldLabel, type TFilterOp, type TFilterPayload, type TFilterType, type TFilterValue, type TFilterValueType, type TGetTabsController, type TIcon, type TIconButton, type TIconRenderer, type TIconSize, type TIconsList, type TListbox, type TMenuItem, type TMessageType, type TModal, type TModalSize, type TNumberInput, type TNumberInputChangeEvent, type TOnClickNode, type TOnConfirmSelection, type TOnSelectionChange, type TOpenModal, type TParameterType, type TSubmenu, type TTab, type TTabLabelRenderer as TTabRenderer, type TToolbarIconButton as TToolDefinition, type TTooltip, type TUploadHandlerProps, type TUploadInProgress, type TUploadedFile, type TUseModalConfiguration, type TVisualizationType, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isFavoriteIcon, isImage, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2623
2652
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -2022,7 +2022,8 @@ class TabsController {
|
|
|
2022
2022
|
openTabsHistory: /* @__PURE__ */ new Set(),
|
|
2023
2023
|
tabs: /* @__PURE__ */ new Map(),
|
|
2024
2024
|
timestamp: 0,
|
|
2025
|
-
showAtLeastOneTab: false
|
|
2025
|
+
showAtLeastOneTab: false,
|
|
2026
|
+
listenFocusEvents: true
|
|
2026
2027
|
});
|
|
2027
2028
|
Object.assign(this.state, props.initialState ?? {});
|
|
2028
2029
|
props.initialTabs?.forEach((tab) => this.append(tab));
|
|
@@ -2338,7 +2339,9 @@ const InnerRenderer = observer(({ tab }) => {
|
|
|
2338
2339
|
uns.current();
|
|
2339
2340
|
if (el instanceof HTMLElement) {
|
|
2340
2341
|
const handleFocus = () => {
|
|
2341
|
-
tab.
|
|
2342
|
+
if (tab.controller.state.listenFocusEvents !== false) {
|
|
2343
|
+
tab.open();
|
|
2344
|
+
}
|
|
2342
2345
|
};
|
|
2343
2346
|
el.addEventListener(customEvents.focus, handleFocus);
|
|
2344
2347
|
uns.current = () => {
|
|
@@ -4818,8 +4821,6 @@ const IconInput = ({
|
|
|
4818
4821
|
const { sx: inputSx, ...actualInputProps } = inputProps ?? {};
|
|
4819
4822
|
const innerButtonRef = React__default.useRef(null);
|
|
4820
4823
|
const assignButtonRef = useCombinedRefs(buttonRef, innerButtonRef);
|
|
4821
|
-
const innerInputRef = React__default.useRef(null);
|
|
4822
|
-
const assignInputRef = useCombinedRefs(inputRef, innerInputRef);
|
|
4823
4824
|
const parentRef = React__default.useRef(null);
|
|
4824
4825
|
const handleBlur = React__default.useCallback(
|
|
4825
4826
|
(ev) => {
|
|
@@ -4827,7 +4828,9 @@ const IconInput = ({
|
|
|
4827
4828
|
ev.relatedTarget,
|
|
4828
4829
|
(current) => current === parentRef.current
|
|
4829
4830
|
))) {
|
|
4830
|
-
Object.assign(ev.target, {
|
|
4831
|
+
Object.assign(ev.target, {
|
|
4832
|
+
value: ev.target.closest(".iconInput").querySelector("input").value
|
|
4833
|
+
});
|
|
4831
4834
|
onBlur(ev);
|
|
4832
4835
|
}
|
|
4833
4836
|
},
|
|
@@ -4837,17 +4840,16 @@ const IconInput = ({
|
|
|
4837
4840
|
Box,
|
|
4838
4841
|
{
|
|
4839
4842
|
...getVariant("forms.iconInput"),
|
|
4840
|
-
className: `${className ?? ""} iconInput`,
|
|
4841
4843
|
ref: parentRef,
|
|
4842
4844
|
onBlur: handleBlur,
|
|
4845
|
+
className: `${className ?? ""} iconInput`,
|
|
4843
4846
|
children: [
|
|
4844
4847
|
/* @__PURE__ */ jsx(
|
|
4845
4848
|
ReactInputMask,
|
|
4846
4849
|
{
|
|
4847
4850
|
mask: mask ?? "",
|
|
4848
|
-
onBlur: handleBlur,
|
|
4849
4851
|
disabled: isLoading || disabled,
|
|
4850
|
-
ref:
|
|
4852
|
+
ref: inputRef,
|
|
4851
4853
|
readOnly,
|
|
4852
4854
|
sx: { variant: "forms.input", ...inputSx },
|
|
4853
4855
|
"data-variant": "forms.input",
|
|
@@ -4898,6 +4900,7 @@ const DateInput = React__default.forwardRef(
|
|
|
4898
4900
|
onError,
|
|
4899
4901
|
renderLabel,
|
|
4900
4902
|
value: outerValue,
|
|
4903
|
+
avoidErrorMessage,
|
|
4901
4904
|
...props
|
|
4902
4905
|
}, ref) => {
|
|
4903
4906
|
const id = React__default.useMemo(uniqueId$3, []);
|
|
@@ -4995,13 +4998,13 @@ const DateInput = React__default.forwardRef(
|
|
|
4995
4998
|
[setCalendarValue]
|
|
4996
4999
|
);
|
|
4997
5000
|
useEffect(() => {
|
|
4998
|
-
if (stateError !== "" && stateError !== null) {
|
|
5001
|
+
if (stateError !== "" && stateError !== null && !avoidErrorMessage) {
|
|
4999
5002
|
ApiaUtil.instance.notifications.notify({
|
|
5000
5003
|
message: stateError,
|
|
5001
5004
|
type: "warning"
|
|
5002
5005
|
});
|
|
5003
5006
|
}
|
|
5004
|
-
}, [stateError]);
|
|
5007
|
+
}, [avoidErrorMessage, stateError]);
|
|
5005
5008
|
const handleBlur = React__default.useCallback(
|
|
5006
5009
|
(ev) => {
|
|
5007
5010
|
hasBlured.current = true;
|
|
@@ -6129,7 +6132,7 @@ const AutoscrollContainer = ({ children, threshold = 150, className }) => {
|
|
|
6129
6132
|
mo.disconnect();
|
|
6130
6133
|
};
|
|
6131
6134
|
}, [threshold]);
|
|
6132
|
-
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, className
|
|
6135
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: `${className || ""} autoscrollContainer`, children });
|
|
6133
6136
|
};
|
|
6134
6137
|
|
|
6135
6138
|
const FileCard = forwardRef(
|
|
@@ -9019,6 +9022,31 @@ const SkeletonItem = () => /* @__PURE__ */ jsx(
|
|
|
9019
9022
|
);
|
|
9020
9023
|
const ListSkeletonLoader = ({ items = 5 }) => /* @__PURE__ */ jsx(Box, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ jsx(SkeletonItem, {}, index)) });
|
|
9021
9024
|
|
|
9025
|
+
const LinearSpinnerLock = ({ isLocked }) => isLocked ? /* @__PURE__ */ jsx(
|
|
9026
|
+
Box,
|
|
9027
|
+
{
|
|
9028
|
+
className: "locker",
|
|
9029
|
+
style: {
|
|
9030
|
+
backgroundColor: "rgb(128 128 128 / 0%)",
|
|
9031
|
+
inset: 0,
|
|
9032
|
+
position: "fixed",
|
|
9033
|
+
display: "flex",
|
|
9034
|
+
alignItems: "center",
|
|
9035
|
+
justifyContent: "center",
|
|
9036
|
+
zIndex: "modal",
|
|
9037
|
+
transition: "background-color 2s"
|
|
9038
|
+
},
|
|
9039
|
+
ref: (el) => {
|
|
9040
|
+
if (el instanceof HTMLElement) {
|
|
9041
|
+
window.requestAnimationFrame(() => {
|
|
9042
|
+
el.style.backgroundColor = "rgb(200 200 200 / 60%)";
|
|
9043
|
+
});
|
|
9044
|
+
}
|
|
9045
|
+
},
|
|
9046
|
+
children: /* @__PURE__ */ jsx(LinearLoader, {})
|
|
9047
|
+
}
|
|
9048
|
+
) : null;
|
|
9049
|
+
|
|
9022
9050
|
const distinctors = {
|
|
9023
9051
|
grid: [
|
|
9024
9052
|
(distinctors2, state) => {
|
|
@@ -9567,21 +9595,28 @@ const DefaultIconRendererNoMemo = (props) => {
|
|
|
9567
9595
|
console.error({ props });
|
|
9568
9596
|
console.error("The icon has no imageUrl nor icon defined");
|
|
9569
9597
|
}
|
|
9570
|
-
return /* @__PURE__ */ jsxs(
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9598
|
+
return /* @__PURE__ */ jsxs(
|
|
9599
|
+
Box,
|
|
9600
|
+
{
|
|
9601
|
+
title: props.title || props.label,
|
|
9602
|
+
className: "iconsList__icon__wrapper",
|
|
9603
|
+
children: [
|
|
9604
|
+
/* @__PURE__ */ jsxs(Box, { className: "iconsList__icon__image__wrapper", children: [
|
|
9605
|
+
props.imageUrl && /* @__PURE__ */ jsx(
|
|
9606
|
+
Image,
|
|
9607
|
+
{
|
|
9608
|
+
className: "iconsList__icon__image",
|
|
9609
|
+
src: props.imageUrl,
|
|
9610
|
+
role: "none",
|
|
9611
|
+
alt: ""
|
|
9612
|
+
}
|
|
9613
|
+
),
|
|
9614
|
+
props.icon && /* @__PURE__ */ jsx(Icon$1, { icon: props.icon, title: props.ariaLabel })
|
|
9615
|
+
] }),
|
|
9616
|
+
/* @__PURE__ */ jsx(Box, { className: "iconsList__icon__label", children: props.label })
|
|
9617
|
+
]
|
|
9618
|
+
}
|
|
9619
|
+
);
|
|
9585
9620
|
};
|
|
9586
9621
|
const DefaultIconRenderer = memo(DefaultIconRendererNoMemo);
|
|
9587
9622
|
|
|
@@ -10130,6 +10165,22 @@ const SortableList = makeStyledComponent(
|
|
|
10130
10165
|
UnstyledSortableList
|
|
10131
10166
|
);
|
|
10132
10167
|
|
|
10168
|
+
const defaultLabels = Object.freeze({
|
|
10169
|
+
totalRecords: window.GNR_TOT_RECORDS,
|
|
10170
|
+
totalRecordsReached: window.GNR_TOT_RECORDS_REACHED,
|
|
10171
|
+
maximize: window.LBL_MAXIMIZE,
|
|
10172
|
+
minimize: window.LBL_MINIMIZE,
|
|
10173
|
+
information: window.BTN_FILE_INFO_TOOLTIP,
|
|
10174
|
+
deleteFilters: window.BTN_DELETE_FILTERS,
|
|
10175
|
+
refresh: window.NAV_REFRESH,
|
|
10176
|
+
firstPage: window.NAV_FIRST_PAGE,
|
|
10177
|
+
previousPage: window.NAV_PREVIOUS_PAGE,
|
|
10178
|
+
lastPage: window.NAV_LAST_PAGE,
|
|
10179
|
+
nextPage: window.NAV_NEXT_PAGE,
|
|
10180
|
+
pageInputInstructions: window.NAV_INPUT_LABEL,
|
|
10181
|
+
page: window.PAGE,
|
|
10182
|
+
moreData: window.QUERY_MORE_DATA
|
|
10183
|
+
});
|
|
10133
10184
|
const NoMemoPagination = ({
|
|
10134
10185
|
appliedFilters,
|
|
10135
10186
|
areAllFiltersApplied,
|
|
@@ -10152,30 +10203,15 @@ const NoMemoPagination = ({
|
|
|
10152
10203
|
showMaximizeOnSmallBreakpoints,
|
|
10153
10204
|
variant = "primary",
|
|
10154
10205
|
isMaximized,
|
|
10155
|
-
onMaximize
|
|
10206
|
+
onMaximize,
|
|
10207
|
+
labels
|
|
10156
10208
|
}) => {
|
|
10157
10209
|
const numberPageCount = Number(pageCount);
|
|
10158
|
-
const breakPoint = useBreakpointIndex();
|
|
10159
10210
|
const numberCurrentPage = Number(currentPage);
|
|
10211
|
+
const breakPoint = useBreakpointIndex();
|
|
10160
10212
|
const recordsCount = outerRecordsCount;
|
|
10161
|
-
const
|
|
10162
|
-
numberCurrentPage ?? 1
|
|
10163
|
-
);
|
|
10164
|
-
const [lastEmittedPage, setLastEmittedPage] = useState(
|
|
10165
|
-
numberCurrentPage ?? 1
|
|
10166
|
-
);
|
|
10213
|
+
const definedLabels = Object.assign({}, defaultLabels, labels);
|
|
10167
10214
|
const [hasNoValue, setHasNoValue] = useState(false);
|
|
10168
|
-
useEffect(() => {
|
|
10169
|
-
setCurrentPage(numberCurrentPage);
|
|
10170
|
-
}, [numberCurrentPage]);
|
|
10171
|
-
const setCurrentAndDispatch = useCallback(
|
|
10172
|
-
(page) => {
|
|
10173
|
-
setCurrentPage(page);
|
|
10174
|
-
onPageChange(page);
|
|
10175
|
-
setLastEmittedPage(page);
|
|
10176
|
-
},
|
|
10177
|
-
[onPageChange]
|
|
10178
|
-
);
|
|
10179
10215
|
const InputRef = createRef();
|
|
10180
10216
|
const options = [];
|
|
10181
10217
|
for (let i = 1; i <= numberPageCount; i++) {
|
|
@@ -10184,19 +10220,22 @@ const NoMemoPagination = ({
|
|
|
10184
10220
|
const [infoButtonRef, setInfoButtonRef] = React__default.useState(
|
|
10185
10221
|
null
|
|
10186
10222
|
);
|
|
10187
|
-
const recordsCountLabel = `${
|
|
10223
|
+
const recordsCountLabel = `${definedLabels.totalRecords}: ${recordsCount}`;
|
|
10188
10224
|
const tooltipProps = React__default.useMemo(
|
|
10189
10225
|
() => ({
|
|
10190
|
-
text: breakPoint <= 3 ? `${recordsCountLabel}.${!reachedMax && !hasMore ? "" : reachedMax &&
|
|
10226
|
+
text: breakPoint <= 3 ? `${recordsCountLabel}.${!reachedMax && !hasMore ? "" : reachedMax && definedLabels.totalRecordsReached || hasMore && definedLabels.moreData}` : `${!reachedMax && !hasMore ? "" : reachedMax && definedLabels.totalRecordsReached || hasMore && definedLabels.moreData}`,
|
|
10191
10227
|
attachToElement: { current: infoButtonRef },
|
|
10192
10228
|
closeOnClickOut: true
|
|
10193
|
-
// closeOnClickOutChecker(element) {
|
|
10194
|
-
// return !getSpecificParent(element, (current) =>
|
|
10195
|
-
// current.classList.contains('pagination__information'),
|
|
10196
|
-
// );
|
|
10197
|
-
// },
|
|
10198
10229
|
}),
|
|
10199
|
-
[
|
|
10230
|
+
[
|
|
10231
|
+
breakPoint,
|
|
10232
|
+
definedLabels.moreData,
|
|
10233
|
+
definedLabels.totalRecordsReached,
|
|
10234
|
+
hasMore,
|
|
10235
|
+
infoButtonRef,
|
|
10236
|
+
reachedMax,
|
|
10237
|
+
recordsCountLabel
|
|
10238
|
+
]
|
|
10200
10239
|
);
|
|
10201
10240
|
return /* @__PURE__ */ jsxs(
|
|
10202
10241
|
Box,
|
|
@@ -10214,8 +10253,8 @@ const NoMemoPagination = ({
|
|
|
10214
10253
|
className: "pagination__fullScreenButton",
|
|
10215
10254
|
onClick: onMaximize,
|
|
10216
10255
|
icon: !isMaximized ? "Maximize" : "Minimize",
|
|
10217
|
-
title: !isMaximized ?
|
|
10218
|
-
"aria-label": !isMaximized ?
|
|
10256
|
+
title: !isMaximized ? definedLabels.maximize : definedLabels.minimize,
|
|
10257
|
+
"aria-label": !isMaximized ? definedLabels.maximize : definedLabels.minimize,
|
|
10219
10258
|
iconSize: "Md"
|
|
10220
10259
|
}
|
|
10221
10260
|
),
|
|
@@ -10229,8 +10268,8 @@ const NoMemoPagination = ({
|
|
|
10229
10268
|
onClick: () => ApiaUtil.instance.tooltips.open(tooltipProps),
|
|
10230
10269
|
ref: setInfoButtonRef,
|
|
10231
10270
|
iconSize: "Md",
|
|
10232
|
-
"aria-label":
|
|
10233
|
-
title:
|
|
10271
|
+
"aria-label": definedLabels.information,
|
|
10272
|
+
title: definedLabels.information
|
|
10234
10273
|
}
|
|
10235
10274
|
) : "",
|
|
10236
10275
|
breakPoint > 3 && /* @__PURE__ */ jsx(
|
|
@@ -10239,7 +10278,7 @@ const NoMemoPagination = ({
|
|
|
10239
10278
|
as: "span",
|
|
10240
10279
|
className: "recordsCounter pagination__deleteLabels",
|
|
10241
10280
|
title: recordsCountLabel,
|
|
10242
|
-
children: recordsCount !== -1 && `${
|
|
10281
|
+
children: recordsCount !== -1 && `${definedLabels.totalRecords}: ${recordsCount} `
|
|
10243
10282
|
}
|
|
10244
10283
|
)
|
|
10245
10284
|
] })
|
|
@@ -10249,11 +10288,12 @@ const NoMemoPagination = ({
|
|
|
10249
10288
|
IconButton,
|
|
10250
10289
|
{
|
|
10251
10290
|
variant: "icon-primary",
|
|
10252
|
-
disabled: disabled ||
|
|
10253
|
-
|
|
10291
|
+
disabled: disabled || numberCurrentPage === 1 || isLoading || isPerforming,
|
|
10292
|
+
title: definedLabels.firstPage,
|
|
10293
|
+
"aria-label": definedLabels.firstPage,
|
|
10254
10294
|
type: "button",
|
|
10255
10295
|
onClick: () => {
|
|
10256
|
-
|
|
10296
|
+
onPageChange(1);
|
|
10257
10297
|
},
|
|
10258
10298
|
icon: "First",
|
|
10259
10299
|
iconSize: "Sm"
|
|
@@ -10263,11 +10303,12 @@ const NoMemoPagination = ({
|
|
|
10263
10303
|
IconButton,
|
|
10264
10304
|
{
|
|
10265
10305
|
variant: "icon-primary",
|
|
10266
|
-
disabled: disabled ||
|
|
10267
|
-
|
|
10306
|
+
disabled: disabled || numberCurrentPage <= 1 || isLoading || isPerforming,
|
|
10307
|
+
title: definedLabels.previousPage,
|
|
10308
|
+
"aria-label": definedLabels.previousPage,
|
|
10268
10309
|
type: "button",
|
|
10269
10310
|
onClick: () => {
|
|
10270
|
-
|
|
10311
|
+
onPageChange(numberCurrentPage - 1);
|
|
10271
10312
|
},
|
|
10272
10313
|
icon: "Previous",
|
|
10273
10314
|
iconSize: "Sm"
|
|
@@ -10278,10 +10319,10 @@ const NoMemoPagination = ({
|
|
|
10278
10319
|
Input,
|
|
10279
10320
|
{
|
|
10280
10321
|
className: "pagination__controls__input",
|
|
10281
|
-
"aria-label":
|
|
10282
|
-
title: `${
|
|
10322
|
+
"aria-label": definedLabels.pageInputInstructions,
|
|
10323
|
+
title: `${definedLabels.page}: ${numberCurrentPage} `,
|
|
10283
10324
|
ref: InputRef,
|
|
10284
|
-
value: hasNoValue ? "" :
|
|
10325
|
+
value: hasNoValue ? "" : numberCurrentPage,
|
|
10285
10326
|
onKeyDown: (ev) => {
|
|
10286
10327
|
const regex = /([0-9])|(Backspace)|(Tab)/;
|
|
10287
10328
|
if (!ev.key.match(regex)) {
|
|
@@ -10291,28 +10332,28 @@ const NoMemoPagination = ({
|
|
|
10291
10332
|
if (ev.key === "Enter") {
|
|
10292
10333
|
ev.stopPropagation();
|
|
10293
10334
|
ev.preventDefault();
|
|
10294
|
-
|
|
10335
|
+
onPageChange(numberCurrentPage);
|
|
10295
10336
|
}
|
|
10296
10337
|
},
|
|
10297
10338
|
onBlur: () => {
|
|
10298
|
-
|
|
10299
|
-
setCurrentAndDispatch(internCurrentPage);
|
|
10300
|
-
}
|
|
10339
|
+
onPageChange(numberCurrentPage);
|
|
10301
10340
|
},
|
|
10302
10341
|
onFocus: (ev) => {
|
|
10303
10342
|
ev.currentTarget.select();
|
|
10304
10343
|
},
|
|
10305
10344
|
onChange: (ev) => {
|
|
10306
10345
|
setHasNoValue(ev.target.value === "");
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10346
|
+
if (ev.target.value !== "") {
|
|
10347
|
+
onPageChange(
|
|
10348
|
+
Math.max(
|
|
10349
|
+
1,
|
|
10350
|
+
Math.min(
|
|
10351
|
+
noNaN(Number(ev.currentTarget.value)),
|
|
10352
|
+
pageCount
|
|
10353
|
+
)
|
|
10313
10354
|
)
|
|
10314
|
-
)
|
|
10315
|
-
|
|
10355
|
+
);
|
|
10356
|
+
}
|
|
10316
10357
|
},
|
|
10317
10358
|
disabled: disabled || isLoading || isPerforming
|
|
10318
10359
|
}
|
|
@@ -10324,7 +10365,7 @@ const NoMemoPagination = ({
|
|
|
10324
10365
|
Box,
|
|
10325
10366
|
{
|
|
10326
10367
|
as: "span",
|
|
10327
|
-
title: recordsCount !== -1 ? `${
|
|
10368
|
+
title: recordsCount !== -1 ? `${definedLabels.totalRecords} ${recordsCount}` : definedLabels.pageInputInstructions,
|
|
10328
10369
|
children: pageCount
|
|
10329
10370
|
}
|
|
10330
10371
|
)
|
|
@@ -10333,9 +10374,9 @@ const NoMemoPagination = ({
|
|
|
10333
10374
|
Select,
|
|
10334
10375
|
{
|
|
10335
10376
|
className: "pagination__selectPage",
|
|
10336
|
-
value:
|
|
10377
|
+
value: numberCurrentPage,
|
|
10337
10378
|
onChange: (e) => {
|
|
10338
|
-
|
|
10379
|
+
onPageChange(Number(e.target.value));
|
|
10339
10380
|
},
|
|
10340
10381
|
children: [
|
|
10341
10382
|
/* @__PURE__ */ jsxs("option", { disabled: true, children: [
|
|
@@ -10352,11 +10393,12 @@ const NoMemoPagination = ({
|
|
|
10352
10393
|
IconButton,
|
|
10353
10394
|
{
|
|
10354
10395
|
variant: "icon-primary",
|
|
10355
|
-
disabled: disabled ||
|
|
10356
|
-
|
|
10396
|
+
disabled: disabled || numberCurrentPage >= numberPageCount || isLoading || isPerforming,
|
|
10397
|
+
title: definedLabels.nextPage,
|
|
10398
|
+
"aria-label": definedLabels.nextPage,
|
|
10357
10399
|
type: "button",
|
|
10358
10400
|
onClick: () => {
|
|
10359
|
-
|
|
10401
|
+
onPageChange(numberCurrentPage + 1);
|
|
10360
10402
|
},
|
|
10361
10403
|
icon: "Next",
|
|
10362
10404
|
iconSize: "Sm"
|
|
@@ -10367,10 +10409,11 @@ const NoMemoPagination = ({
|
|
|
10367
10409
|
{
|
|
10368
10410
|
variant: "icon-primary",
|
|
10369
10411
|
type: "button",
|
|
10370
|
-
|
|
10371
|
-
|
|
10412
|
+
title: definedLabels.lastPage,
|
|
10413
|
+
"aria-label": definedLabels.lastPage,
|
|
10414
|
+
disabled: disabled || numberCurrentPage >= numberPageCount || isLoading || isPerforming,
|
|
10372
10415
|
onClick: () => {
|
|
10373
|
-
|
|
10416
|
+
onPageChange(numberPageCount);
|
|
10374
10417
|
},
|
|
10375
10418
|
icon: "Last",
|
|
10376
10419
|
iconSize: "Sm"
|
|
@@ -10385,7 +10428,7 @@ const NoMemoPagination = ({
|
|
|
10385
10428
|
className: "pagination__deleteFiltersButton",
|
|
10386
10429
|
onClick: onDeleteFilters,
|
|
10387
10430
|
children: [
|
|
10388
|
-
breakPoint > 3 && /* @__PURE__ */ jsx(Box, { as: "span", className: "pagination__deleteLabels", children:
|
|
10431
|
+
breakPoint > 3 && /* @__PURE__ */ jsx(Box, { as: "span", className: "pagination__deleteLabels", children: definedLabels.deleteFilters }),
|
|
10389
10432
|
/* @__PURE__ */ jsx(
|
|
10390
10433
|
Box,
|
|
10391
10434
|
{
|
|
@@ -10400,7 +10443,8 @@ const NoMemoPagination = ({
|
|
|
10400
10443
|
!hideRefreshButton && /* @__PURE__ */ jsx(
|
|
10401
10444
|
IconButton,
|
|
10402
10445
|
{
|
|
10403
|
-
|
|
10446
|
+
title: definedLabels.refresh,
|
|
10447
|
+
"aria-label": definedLabels.refresh,
|
|
10404
10448
|
onClick: () => onRefresh(numberCurrentPage),
|
|
10405
10449
|
icon: "Refresh",
|
|
10406
10450
|
iconSize: "Md",
|
|
@@ -10675,9 +10719,7 @@ const HamburguerMenu = ({
|
|
|
10675
10719
|
const bounding = document.querySelector(container).getBoundingClientRect();
|
|
10676
10720
|
if (!hamburguerRef || bounding.height === 0)
|
|
10677
10721
|
return;
|
|
10678
|
-
const hamburguerHeight =
|
|
10679
|
-
hamburguerRef.querySelector(".hamburguerIcon").clientHeight
|
|
10680
|
-
);
|
|
10722
|
+
const hamburguerHeight = 40;
|
|
10681
10723
|
const hamburguerTop = bounding.top + bounding.height / 2 - hamburguerHeight / 2 + window.scrollY;
|
|
10682
10724
|
const shouldOpenBelow = bounding.top <= window.innerHeight / 3;
|
|
10683
10725
|
const menuTop = shouldOpenBelow ? hamburguerTop + hamburguerHeight + 10 : 10;
|
|
@@ -10725,7 +10767,7 @@ const HamburguerMenu = ({
|
|
|
10725
10767
|
Box,
|
|
10726
10768
|
{
|
|
10727
10769
|
id: "HamburguerIconWrapper",
|
|
10728
|
-
className:
|
|
10770
|
+
className: `HamburguerIconWrapper ${forceVisibility ? "forced" : ""}`,
|
|
10729
10771
|
ref: setHamburguerRef,
|
|
10730
10772
|
as: "aside",
|
|
10731
10773
|
"aria-label": window.LBL_OPTIONS_VAR,
|
|
@@ -11912,5 +11954,5 @@ const _FiltersStore = class _FiltersStore {
|
|
|
11912
11954
|
__publicField(_FiltersStore, "instance", new _FiltersStore());
|
|
11913
11955
|
let FiltersStore = _FiltersStore;
|
|
11914
11956
|
|
|
11915
|
-
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, AutoscrollContainer, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, ChatController, ChatMessage, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FloatingChatController, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, Modal, NumberInput, Overlay, Pagination, Parameter, ParameterRender, Parameters, ParametersGroup, ParametersStore, ParametersTable, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isFavoriteIcon, isImage, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
11957
|
+
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, AutoscrollContainer, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, ChatController, ChatMessage, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FloatingChatController, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, Modal, NumberInput, Overlay, Pagination, Parameter, ParameterRender, Parameters, ParametersGroup, ParametersStore, ParametersTable, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, Tab, Tabs, TabsContent, TabsController, TabsList, Templater, Toolbar, ToolbarController, ToolbarIconButton, ToolbarInput, ToolbarSelect, ToolbarSeparator, ToolbarTextButton, UnstyledSortableList, UploadHandler, Uploader, WaiTypeAhead, getBase64FromBlob, getBase64FromFile, getFieldErrorStyles, getFieldTouchedStyles, getFileExtension, importComponent, isFavoriteIcon, isImage, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
11916
11958
|
//# sourceMappingURL=index.js.map
|