@apia/components 4.0.30 → 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 +27 -4
- package/dist/index.js +132 -93
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1056,6 +1056,7 @@ declare const IconInput: ({ additionalButtons, additionalButtonsPosition, button
|
|
|
1056
1056
|
|
|
1057
1057
|
type TDateProps = TModify<InputProps, {
|
|
1058
1058
|
allowPickBeforeToday?: boolean;
|
|
1059
|
+
avoidErrorMessage?: boolean;
|
|
1059
1060
|
CalModalRenderer?: (props: ICalModal & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement | null;
|
|
1060
1061
|
deleteFiltersTimestamp?: number;
|
|
1061
1062
|
error?: string | null;
|
|
@@ -1572,6 +1573,10 @@ declare const ListSkeletonLoader: ({ items }: {
|
|
|
1572
1573
|
items?: number | undefined;
|
|
1573
1574
|
}) => React$1.JSX.Element;
|
|
1574
1575
|
|
|
1576
|
+
declare const LinearSpinnerLock: ({ isLocked }: {
|
|
1577
|
+
isLocked: boolean;
|
|
1578
|
+
}) => React$1.JSX.Element | null;
|
|
1579
|
+
|
|
1575
1580
|
declare const DeadSessionModal: ({ onClick }: {
|
|
1576
1581
|
onClick: () => unknown;
|
|
1577
1582
|
}) => React__default.JSX.Element;
|
|
@@ -1822,6 +1827,7 @@ type TIcon<P = Record<string, unknown>> = {
|
|
|
1822
1827
|
* Permite modificar el color individual de un ícono.
|
|
1823
1828
|
*/
|
|
1824
1829
|
textColor?: string;
|
|
1830
|
+
title?: string;
|
|
1825
1831
|
};
|
|
1826
1832
|
type TIconsList<P = Record<string, unknown>> = {
|
|
1827
1833
|
/**
|
|
@@ -2067,6 +2073,22 @@ declare const Uploader: (({ handler }: {
|
|
|
2067
2073
|
displayName: string;
|
|
2068
2074
|
};
|
|
2069
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
|
+
}>;
|
|
2070
2092
|
interface IPagination {
|
|
2071
2093
|
appliedFilters?: number;
|
|
2072
2094
|
/**
|
|
@@ -2104,8 +2126,9 @@ interface IPagination {
|
|
|
2104
2126
|
variant?: 'primary' | 'secondary' | 'datagrid';
|
|
2105
2127
|
onMaximize?: () => unknown;
|
|
2106
2128
|
isMaximized?: boolean;
|
|
2129
|
+
labels?: Partial<typeof defaultLabels>;
|
|
2107
2130
|
}
|
|
2108
|
-
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>;
|
|
2109
2132
|
|
|
2110
2133
|
interface IAsidePanel {
|
|
2111
2134
|
title?: string;
|
|
@@ -2217,9 +2240,9 @@ declare const FooterResponsiveButtons: ({ breakpoint, children, className, }: {
|
|
|
2217
2240
|
* se muestra en el menú de hamburguesa.
|
|
2218
2241
|
*/
|
|
2219
2242
|
declare const HamburguerMenu: ({ container, header, forceVisibility, }: {
|
|
2220
|
-
container
|
|
2243
|
+
container?: string;
|
|
2221
2244
|
forceVisibility?: boolean;
|
|
2222
|
-
header
|
|
2245
|
+
header?: string;
|
|
2223
2246
|
}) => React__default.JSX.Element;
|
|
2224
2247
|
|
|
2225
2248
|
interface IHeader {
|
|
@@ -2625,5 +2648,5 @@ declare class Templater {
|
|
|
2625
2648
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2626
2649
|
}
|
|
2627
2650
|
|
|
2628
|
-
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 };
|
|
2629
2652
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -4821,8 +4821,6 @@ const IconInput = ({
|
|
|
4821
4821
|
const { sx: inputSx, ...actualInputProps } = inputProps ?? {};
|
|
4822
4822
|
const innerButtonRef = React__default.useRef(null);
|
|
4823
4823
|
const assignButtonRef = useCombinedRefs(buttonRef, innerButtonRef);
|
|
4824
|
-
const innerInputRef = React__default.useRef(null);
|
|
4825
|
-
const assignInputRef = useCombinedRefs(inputRef, innerInputRef);
|
|
4826
4824
|
const parentRef = React__default.useRef(null);
|
|
4827
4825
|
const handleBlur = React__default.useCallback(
|
|
4828
4826
|
(ev) => {
|
|
@@ -4830,7 +4828,9 @@ const IconInput = ({
|
|
|
4830
4828
|
ev.relatedTarget,
|
|
4831
4829
|
(current) => current === parentRef.current
|
|
4832
4830
|
))) {
|
|
4833
|
-
Object.assign(ev.target, {
|
|
4831
|
+
Object.assign(ev.target, {
|
|
4832
|
+
value: ev.target.closest(".iconInput").querySelector("input").value
|
|
4833
|
+
});
|
|
4834
4834
|
onBlur(ev);
|
|
4835
4835
|
}
|
|
4836
4836
|
},
|
|
@@ -4840,17 +4840,16 @@ const IconInput = ({
|
|
|
4840
4840
|
Box,
|
|
4841
4841
|
{
|
|
4842
4842
|
...getVariant("forms.iconInput"),
|
|
4843
|
-
className: `${className ?? ""} iconInput`,
|
|
4844
4843
|
ref: parentRef,
|
|
4845
4844
|
onBlur: handleBlur,
|
|
4845
|
+
className: `${className ?? ""} iconInput`,
|
|
4846
4846
|
children: [
|
|
4847
4847
|
/* @__PURE__ */ jsx(
|
|
4848
4848
|
ReactInputMask,
|
|
4849
4849
|
{
|
|
4850
4850
|
mask: mask ?? "",
|
|
4851
|
-
onBlur: handleBlur,
|
|
4852
4851
|
disabled: isLoading || disabled,
|
|
4853
|
-
ref:
|
|
4852
|
+
ref: inputRef,
|
|
4854
4853
|
readOnly,
|
|
4855
4854
|
sx: { variant: "forms.input", ...inputSx },
|
|
4856
4855
|
"data-variant": "forms.input",
|
|
@@ -4901,6 +4900,7 @@ const DateInput = React__default.forwardRef(
|
|
|
4901
4900
|
onError,
|
|
4902
4901
|
renderLabel,
|
|
4903
4902
|
value: outerValue,
|
|
4903
|
+
avoidErrorMessage,
|
|
4904
4904
|
...props
|
|
4905
4905
|
}, ref) => {
|
|
4906
4906
|
const id = React__default.useMemo(uniqueId$3, []);
|
|
@@ -4998,13 +4998,13 @@ const DateInput = React__default.forwardRef(
|
|
|
4998
4998
|
[setCalendarValue]
|
|
4999
4999
|
);
|
|
5000
5000
|
useEffect(() => {
|
|
5001
|
-
if (stateError !== "" && stateError !== null) {
|
|
5001
|
+
if (stateError !== "" && stateError !== null && !avoidErrorMessage) {
|
|
5002
5002
|
ApiaUtil.instance.notifications.notify({
|
|
5003
5003
|
message: stateError,
|
|
5004
5004
|
type: "warning"
|
|
5005
5005
|
});
|
|
5006
5006
|
}
|
|
5007
|
-
}, [stateError]);
|
|
5007
|
+
}, [avoidErrorMessage, stateError]);
|
|
5008
5008
|
const handleBlur = React__default.useCallback(
|
|
5009
5009
|
(ev) => {
|
|
5010
5010
|
hasBlured.current = true;
|
|
@@ -6132,7 +6132,7 @@ const AutoscrollContainer = ({ children, threshold = 150, className }) => {
|
|
|
6132
6132
|
mo.disconnect();
|
|
6133
6133
|
};
|
|
6134
6134
|
}, [threshold]);
|
|
6135
|
-
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, className
|
|
6135
|
+
return /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: `${className || ""} autoscrollContainer`, children });
|
|
6136
6136
|
};
|
|
6137
6137
|
|
|
6138
6138
|
const FileCard = forwardRef(
|
|
@@ -9022,6 +9022,31 @@ const SkeletonItem = () => /* @__PURE__ */ jsx(
|
|
|
9022
9022
|
);
|
|
9023
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)) });
|
|
9024
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
|
+
|
|
9025
9050
|
const distinctors = {
|
|
9026
9051
|
grid: [
|
|
9027
9052
|
(distinctors2, state) => {
|
|
@@ -9570,21 +9595,28 @@ const DefaultIconRendererNoMemo = (props) => {
|
|
|
9570
9595
|
console.error({ props });
|
|
9571
9596
|
console.error("The icon has no imageUrl nor icon defined");
|
|
9572
9597
|
}
|
|
9573
|
-
return /* @__PURE__ */ jsxs(
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
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
|
+
);
|
|
9588
9620
|
};
|
|
9589
9621
|
const DefaultIconRenderer = memo(DefaultIconRendererNoMemo);
|
|
9590
9622
|
|
|
@@ -10133,6 +10165,22 @@ const SortableList = makeStyledComponent(
|
|
|
10133
10165
|
UnstyledSortableList
|
|
10134
10166
|
);
|
|
10135
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
|
+
});
|
|
10136
10184
|
const NoMemoPagination = ({
|
|
10137
10185
|
appliedFilters,
|
|
10138
10186
|
areAllFiltersApplied,
|
|
@@ -10155,30 +10203,15 @@ const NoMemoPagination = ({
|
|
|
10155
10203
|
showMaximizeOnSmallBreakpoints,
|
|
10156
10204
|
variant = "primary",
|
|
10157
10205
|
isMaximized,
|
|
10158
|
-
onMaximize
|
|
10206
|
+
onMaximize,
|
|
10207
|
+
labels
|
|
10159
10208
|
}) => {
|
|
10160
10209
|
const numberPageCount = Number(pageCount);
|
|
10161
|
-
const breakPoint = useBreakpointIndex();
|
|
10162
10210
|
const numberCurrentPage = Number(currentPage);
|
|
10211
|
+
const breakPoint = useBreakpointIndex();
|
|
10163
10212
|
const recordsCount = outerRecordsCount;
|
|
10164
|
-
const
|
|
10165
|
-
numberCurrentPage ?? 1
|
|
10166
|
-
);
|
|
10167
|
-
const [lastEmittedPage, setLastEmittedPage] = useState(
|
|
10168
|
-
numberCurrentPage ?? 1
|
|
10169
|
-
);
|
|
10213
|
+
const definedLabels = Object.assign({}, defaultLabels, labels);
|
|
10170
10214
|
const [hasNoValue, setHasNoValue] = useState(false);
|
|
10171
|
-
useEffect(() => {
|
|
10172
|
-
setCurrentPage(numberCurrentPage);
|
|
10173
|
-
}, [numberCurrentPage]);
|
|
10174
|
-
const setCurrentAndDispatch = useCallback(
|
|
10175
|
-
(page) => {
|
|
10176
|
-
setCurrentPage(page);
|
|
10177
|
-
onPageChange(page);
|
|
10178
|
-
setLastEmittedPage(page);
|
|
10179
|
-
},
|
|
10180
|
-
[onPageChange]
|
|
10181
|
-
);
|
|
10182
10215
|
const InputRef = createRef();
|
|
10183
10216
|
const options = [];
|
|
10184
10217
|
for (let i = 1; i <= numberPageCount; i++) {
|
|
@@ -10187,19 +10220,22 @@ const NoMemoPagination = ({
|
|
|
10187
10220
|
const [infoButtonRef, setInfoButtonRef] = React__default.useState(
|
|
10188
10221
|
null
|
|
10189
10222
|
);
|
|
10190
|
-
const recordsCountLabel = `${
|
|
10223
|
+
const recordsCountLabel = `${definedLabels.totalRecords}: ${recordsCount}`;
|
|
10191
10224
|
const tooltipProps = React__default.useMemo(
|
|
10192
10225
|
() => ({
|
|
10193
|
-
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}`,
|
|
10194
10227
|
attachToElement: { current: infoButtonRef },
|
|
10195
10228
|
closeOnClickOut: true
|
|
10196
|
-
// closeOnClickOutChecker(element) {
|
|
10197
|
-
// return !getSpecificParent(element, (current) =>
|
|
10198
|
-
// current.classList.contains('pagination__information'),
|
|
10199
|
-
// );
|
|
10200
|
-
// },
|
|
10201
10229
|
}),
|
|
10202
|
-
[
|
|
10230
|
+
[
|
|
10231
|
+
breakPoint,
|
|
10232
|
+
definedLabels.moreData,
|
|
10233
|
+
definedLabels.totalRecordsReached,
|
|
10234
|
+
hasMore,
|
|
10235
|
+
infoButtonRef,
|
|
10236
|
+
reachedMax,
|
|
10237
|
+
recordsCountLabel
|
|
10238
|
+
]
|
|
10203
10239
|
);
|
|
10204
10240
|
return /* @__PURE__ */ jsxs(
|
|
10205
10241
|
Box,
|
|
@@ -10217,8 +10253,8 @@ const NoMemoPagination = ({
|
|
|
10217
10253
|
className: "pagination__fullScreenButton",
|
|
10218
10254
|
onClick: onMaximize,
|
|
10219
10255
|
icon: !isMaximized ? "Maximize" : "Minimize",
|
|
10220
|
-
title: !isMaximized ?
|
|
10221
|
-
"aria-label": !isMaximized ?
|
|
10256
|
+
title: !isMaximized ? definedLabels.maximize : definedLabels.minimize,
|
|
10257
|
+
"aria-label": !isMaximized ? definedLabels.maximize : definedLabels.minimize,
|
|
10222
10258
|
iconSize: "Md"
|
|
10223
10259
|
}
|
|
10224
10260
|
),
|
|
@@ -10232,8 +10268,8 @@ const NoMemoPagination = ({
|
|
|
10232
10268
|
onClick: () => ApiaUtil.instance.tooltips.open(tooltipProps),
|
|
10233
10269
|
ref: setInfoButtonRef,
|
|
10234
10270
|
iconSize: "Md",
|
|
10235
|
-
"aria-label":
|
|
10236
|
-
title:
|
|
10271
|
+
"aria-label": definedLabels.information,
|
|
10272
|
+
title: definedLabels.information
|
|
10237
10273
|
}
|
|
10238
10274
|
) : "",
|
|
10239
10275
|
breakPoint > 3 && /* @__PURE__ */ jsx(
|
|
@@ -10242,7 +10278,7 @@ const NoMemoPagination = ({
|
|
|
10242
10278
|
as: "span",
|
|
10243
10279
|
className: "recordsCounter pagination__deleteLabels",
|
|
10244
10280
|
title: recordsCountLabel,
|
|
10245
|
-
children: recordsCount !== -1 && `${
|
|
10281
|
+
children: recordsCount !== -1 && `${definedLabels.totalRecords}: ${recordsCount} `
|
|
10246
10282
|
}
|
|
10247
10283
|
)
|
|
10248
10284
|
] })
|
|
@@ -10252,11 +10288,12 @@ const NoMemoPagination = ({
|
|
|
10252
10288
|
IconButton,
|
|
10253
10289
|
{
|
|
10254
10290
|
variant: "icon-primary",
|
|
10255
|
-
disabled: disabled ||
|
|
10256
|
-
|
|
10291
|
+
disabled: disabled || numberCurrentPage === 1 || isLoading || isPerforming,
|
|
10292
|
+
title: definedLabels.firstPage,
|
|
10293
|
+
"aria-label": definedLabels.firstPage,
|
|
10257
10294
|
type: "button",
|
|
10258
10295
|
onClick: () => {
|
|
10259
|
-
|
|
10296
|
+
onPageChange(1);
|
|
10260
10297
|
},
|
|
10261
10298
|
icon: "First",
|
|
10262
10299
|
iconSize: "Sm"
|
|
@@ -10266,11 +10303,12 @@ const NoMemoPagination = ({
|
|
|
10266
10303
|
IconButton,
|
|
10267
10304
|
{
|
|
10268
10305
|
variant: "icon-primary",
|
|
10269
|
-
disabled: disabled ||
|
|
10270
|
-
|
|
10306
|
+
disabled: disabled || numberCurrentPage <= 1 || isLoading || isPerforming,
|
|
10307
|
+
title: definedLabels.previousPage,
|
|
10308
|
+
"aria-label": definedLabels.previousPage,
|
|
10271
10309
|
type: "button",
|
|
10272
10310
|
onClick: () => {
|
|
10273
|
-
|
|
10311
|
+
onPageChange(numberCurrentPage - 1);
|
|
10274
10312
|
},
|
|
10275
10313
|
icon: "Previous",
|
|
10276
10314
|
iconSize: "Sm"
|
|
@@ -10281,10 +10319,10 @@ const NoMemoPagination = ({
|
|
|
10281
10319
|
Input,
|
|
10282
10320
|
{
|
|
10283
10321
|
className: "pagination__controls__input",
|
|
10284
|
-
"aria-label":
|
|
10285
|
-
title: `${
|
|
10322
|
+
"aria-label": definedLabels.pageInputInstructions,
|
|
10323
|
+
title: `${definedLabels.page}: ${numberCurrentPage} `,
|
|
10286
10324
|
ref: InputRef,
|
|
10287
|
-
value: hasNoValue ? "" :
|
|
10325
|
+
value: hasNoValue ? "" : numberCurrentPage,
|
|
10288
10326
|
onKeyDown: (ev) => {
|
|
10289
10327
|
const regex = /([0-9])|(Backspace)|(Tab)/;
|
|
10290
10328
|
if (!ev.key.match(regex)) {
|
|
@@ -10294,28 +10332,28 @@ const NoMemoPagination = ({
|
|
|
10294
10332
|
if (ev.key === "Enter") {
|
|
10295
10333
|
ev.stopPropagation();
|
|
10296
10334
|
ev.preventDefault();
|
|
10297
|
-
|
|
10335
|
+
onPageChange(numberCurrentPage);
|
|
10298
10336
|
}
|
|
10299
10337
|
},
|
|
10300
10338
|
onBlur: () => {
|
|
10301
|
-
|
|
10302
|
-
setCurrentAndDispatch(internCurrentPage);
|
|
10303
|
-
}
|
|
10339
|
+
onPageChange(numberCurrentPage);
|
|
10304
10340
|
},
|
|
10305
10341
|
onFocus: (ev) => {
|
|
10306
10342
|
ev.currentTarget.select();
|
|
10307
10343
|
},
|
|
10308
10344
|
onChange: (ev) => {
|
|
10309
10345
|
setHasNoValue(ev.target.value === "");
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10315
|
-
|
|
10346
|
+
if (ev.target.value !== "") {
|
|
10347
|
+
onPageChange(
|
|
10348
|
+
Math.max(
|
|
10349
|
+
1,
|
|
10350
|
+
Math.min(
|
|
10351
|
+
noNaN(Number(ev.currentTarget.value)),
|
|
10352
|
+
pageCount
|
|
10353
|
+
)
|
|
10316
10354
|
)
|
|
10317
|
-
)
|
|
10318
|
-
|
|
10355
|
+
);
|
|
10356
|
+
}
|
|
10319
10357
|
},
|
|
10320
10358
|
disabled: disabled || isLoading || isPerforming
|
|
10321
10359
|
}
|
|
@@ -10327,7 +10365,7 @@ const NoMemoPagination = ({
|
|
|
10327
10365
|
Box,
|
|
10328
10366
|
{
|
|
10329
10367
|
as: "span",
|
|
10330
|
-
title: recordsCount !== -1 ? `${
|
|
10368
|
+
title: recordsCount !== -1 ? `${definedLabels.totalRecords} ${recordsCount}` : definedLabels.pageInputInstructions,
|
|
10331
10369
|
children: pageCount
|
|
10332
10370
|
}
|
|
10333
10371
|
)
|
|
@@ -10336,9 +10374,9 @@ const NoMemoPagination = ({
|
|
|
10336
10374
|
Select,
|
|
10337
10375
|
{
|
|
10338
10376
|
className: "pagination__selectPage",
|
|
10339
|
-
value:
|
|
10377
|
+
value: numberCurrentPage,
|
|
10340
10378
|
onChange: (e) => {
|
|
10341
|
-
|
|
10379
|
+
onPageChange(Number(e.target.value));
|
|
10342
10380
|
},
|
|
10343
10381
|
children: [
|
|
10344
10382
|
/* @__PURE__ */ jsxs("option", { disabled: true, children: [
|
|
@@ -10355,11 +10393,12 @@ const NoMemoPagination = ({
|
|
|
10355
10393
|
IconButton,
|
|
10356
10394
|
{
|
|
10357
10395
|
variant: "icon-primary",
|
|
10358
|
-
disabled: disabled ||
|
|
10359
|
-
|
|
10396
|
+
disabled: disabled || numberCurrentPage >= numberPageCount || isLoading || isPerforming,
|
|
10397
|
+
title: definedLabels.nextPage,
|
|
10398
|
+
"aria-label": definedLabels.nextPage,
|
|
10360
10399
|
type: "button",
|
|
10361
10400
|
onClick: () => {
|
|
10362
|
-
|
|
10401
|
+
onPageChange(numberCurrentPage + 1);
|
|
10363
10402
|
},
|
|
10364
10403
|
icon: "Next",
|
|
10365
10404
|
iconSize: "Sm"
|
|
@@ -10370,10 +10409,11 @@ const NoMemoPagination = ({
|
|
|
10370
10409
|
{
|
|
10371
10410
|
variant: "icon-primary",
|
|
10372
10411
|
type: "button",
|
|
10373
|
-
|
|
10374
|
-
|
|
10412
|
+
title: definedLabels.lastPage,
|
|
10413
|
+
"aria-label": definedLabels.lastPage,
|
|
10414
|
+
disabled: disabled || numberCurrentPage >= numberPageCount || isLoading || isPerforming,
|
|
10375
10415
|
onClick: () => {
|
|
10376
|
-
|
|
10416
|
+
onPageChange(numberPageCount);
|
|
10377
10417
|
},
|
|
10378
10418
|
icon: "Last",
|
|
10379
10419
|
iconSize: "Sm"
|
|
@@ -10388,7 +10428,7 @@ const NoMemoPagination = ({
|
|
|
10388
10428
|
className: "pagination__deleteFiltersButton",
|
|
10389
10429
|
onClick: onDeleteFilters,
|
|
10390
10430
|
children: [
|
|
10391
|
-
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 }),
|
|
10392
10432
|
/* @__PURE__ */ jsx(
|
|
10393
10433
|
Box,
|
|
10394
10434
|
{
|
|
@@ -10403,7 +10443,8 @@ const NoMemoPagination = ({
|
|
|
10403
10443
|
!hideRefreshButton && /* @__PURE__ */ jsx(
|
|
10404
10444
|
IconButton,
|
|
10405
10445
|
{
|
|
10406
|
-
|
|
10446
|
+
title: definedLabels.refresh,
|
|
10447
|
+
"aria-label": definedLabels.refresh,
|
|
10407
10448
|
onClick: () => onRefresh(numberCurrentPage),
|
|
10408
10449
|
icon: "Refresh",
|
|
10409
10450
|
iconSize: "Md",
|
|
@@ -10678,9 +10719,7 @@ const HamburguerMenu = ({
|
|
|
10678
10719
|
const bounding = document.querySelector(container).getBoundingClientRect();
|
|
10679
10720
|
if (!hamburguerRef || bounding.height === 0)
|
|
10680
10721
|
return;
|
|
10681
|
-
const hamburguerHeight =
|
|
10682
|
-
hamburguerRef.querySelector(".hamburguerIcon").clientHeight
|
|
10683
|
-
);
|
|
10722
|
+
const hamburguerHeight = 40;
|
|
10684
10723
|
const hamburguerTop = bounding.top + bounding.height / 2 - hamburguerHeight / 2 + window.scrollY;
|
|
10685
10724
|
const shouldOpenBelow = bounding.top <= window.innerHeight / 3;
|
|
10686
10725
|
const menuTop = shouldOpenBelow ? hamburguerTop + hamburguerHeight + 10 : 10;
|
|
@@ -10728,7 +10767,7 @@ const HamburguerMenu = ({
|
|
|
10728
10767
|
Box,
|
|
10729
10768
|
{
|
|
10730
10769
|
id: "HamburguerIconWrapper",
|
|
10731
|
-
className:
|
|
10770
|
+
className: `HamburguerIconWrapper ${forceVisibility ? "forced" : ""}`,
|
|
10732
10771
|
ref: setHamburguerRef,
|
|
10733
10772
|
as: "aside",
|
|
10734
10773
|
"aria-label": window.LBL_OPTIONS_VAR,
|
|
@@ -11915,5 +11954,5 @@ const _FiltersStore = class _FiltersStore {
|
|
|
11915
11954
|
__publicField(_FiltersStore, "instance", new _FiltersStore());
|
|
11916
11955
|
let FiltersStore = _FiltersStore;
|
|
11917
11956
|
|
|
11918
|
-
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 };
|
|
11919
11958
|
//# sourceMappingURL=index.js.map
|