@apia/components 4.0.44 → 4.0.45
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 +2 -9
- package/dist/index.js +125 -233
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -357,7 +357,7 @@ type TabsControllerProps<TabType extends TTab> = {
|
|
|
357
357
|
id: string;
|
|
358
358
|
initialTabs?: TabType[];
|
|
359
359
|
getController?: (controller: TabsController) => unknown;
|
|
360
|
-
initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple'
|
|
360
|
+
initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple'>;
|
|
361
361
|
onCloseTab?: (tan: Tab) => void;
|
|
362
362
|
orientation: TOrientation;
|
|
363
363
|
};
|
|
@@ -538,8 +538,6 @@ declare class ApiaUtilParsers {
|
|
|
538
538
|
* Toma un número en formato Apia y lo devuelve como float en javascript.
|
|
539
539
|
*/
|
|
540
540
|
jsNumber(value: string): number;
|
|
541
|
-
dateToApiaString(value: Date): string | undefined;
|
|
542
|
-
dateFromApiaString(value: string): Date | null;
|
|
543
541
|
/**
|
|
544
542
|
* Hay muchos valores que podrían querer ser interpretados como booleano
|
|
545
543
|
*
|
|
@@ -1745,7 +1743,6 @@ type TIconsList<P = Record<string, unknown>> = {
|
|
|
1745
1743
|
* Listado de íconos
|
|
1746
1744
|
*/
|
|
1747
1745
|
icons: TIcon<P>[];
|
|
1748
|
-
iconsPerRow?: number;
|
|
1749
1746
|
iconRenderer?: TIconRenderer<P>;
|
|
1750
1747
|
/**
|
|
1751
1748
|
* Por defecto se usa iconWidth=100.
|
|
@@ -2112,8 +2109,6 @@ declare function useMenu(breakPoints?: number[], initialMenu?: IMenuDefinition):
|
|
|
2112
2109
|
*/
|
|
2113
2110
|
declare const FooterButtons: (props: BoxProps) => React$1.JSX.Element;
|
|
2114
2111
|
|
|
2115
|
-
declare const TwoColumns: ({ atVeryTop, upperAside, overHeadAside, image, title, subTitle, description, underHeadAside, mainContent, footer, asideContent, footerButtons, }: Partial<Record<"atVeryTop" | "upperAside" | "overHeadAside" | "image" | "title" | "subTitle" | "description" | "underHeadAside" | "mainContent" | "footer" | "asideContent" | "footerButtons", ReactNode>>) => React$1.JSX.Element;
|
|
2116
|
-
|
|
2117
2112
|
/**
|
|
2118
2113
|
* Este aside aparece en la vista twoColumnList en los
|
|
2119
2114
|
* breakpoints de vista móvil.
|
|
@@ -2181,8 +2176,6 @@ declare const ShowResponsive: ({ show, children, display, }: {
|
|
|
2181
2176
|
|
|
2182
2177
|
declare const CenteredHeaderButtons: () => React__default.JSX.Element;
|
|
2183
2178
|
|
|
2184
|
-
declare const TwoColumnsList: ({ image, subTitle, title, description, favoriteIcon, content, headerBottom, contentFooter, footer, asideContent, footerButtons, }: Partial<Record<"image" | "title" | "subTitle" | "description" | "favoriteIcon" | "headerBottom" | "content" | "contentFooter" | "footer" | "asideContent" | "footerButtons", ReactNode>>) => React$1.JSX.Element;
|
|
2185
|
-
|
|
2186
2179
|
declare class TableParameter extends Parameter<ITableParameterProps> {
|
|
2187
2180
|
constructor(params: ITableParameterProps);
|
|
2188
2181
|
}
|
|
@@ -2569,5 +2562,5 @@ declare class Templater {
|
|
|
2569
2562
|
parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
|
|
2570
2563
|
}
|
|
2571
2564
|
|
|
2572
|
-
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, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, 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, _default as MDRenderer, Modal, ModalContext, 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 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 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,
|
|
2565
|
+
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, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultAccordionItemButton, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, type IAccordionItemButton, type IAccordionItemProps, type IAccordionProps, type IAlert, type IApiaFilter, type IAsidePanel, 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, _default as MDRenderer, Modal, ModalContext, 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 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 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, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
2573
2566
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { uniqueId as uniqueId$3, cloneDeep, isFunction as isFunction$1 } from 'l
|
|
|
7
7
|
import { Box, getVariant, useBreakpointIndex, Close, responsive, spacing, Heading, Link, Button, Spinner, createElement, Select, Input, Flex, IconButton as IconButton$1, Image, injectStyles, focusOutline, makeStyledComponent, useThemeUI, Label as Label$1, Progress, Grid, Paragraph, Container, Textarea } from '@apia/theme';
|
|
8
8
|
import { BarLoader } from 'react-spinners';
|
|
9
9
|
import uniqueId$2 from 'lodash-es/uniqueId';
|
|
10
|
-
import { findScrollContainer, useUpdateEffect, focus, focusSelector, getFocusSelector, addBoundary, useCombinedRefs, usePrevious, getLabel,
|
|
10
|
+
import { findScrollContainer, useUpdateEffect, focus, focusSelector, getFocusSelector, addBoundary, useCombinedRefs, usePrevious, getLabel, isChild, EventEmitter, useUnmount, useMount, StatefulEmitter, shallowEqual as shallowEqual$1, getSpecificParent, getDateFormat, customEvents, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription, uniqueId as uniqueId$4, useMatchScrollDirection, arrayOrArray } from '@apia/util';
|
|
11
11
|
import usePortal from 'react-cool-portal';
|
|
12
12
|
import { CSSTransition } from 'react-transition-group';
|
|
13
13
|
import { uniqueId as uniqueId$1, defaultNotifier, NotificationsList } from '@apia/notifications';
|
|
@@ -2252,12 +2252,6 @@ class ApiaUtilParsers {
|
|
|
2252
2252
|
}
|
|
2253
2253
|
return aux ? parseFloat(aux) : parseFloat(value);
|
|
2254
2254
|
}
|
|
2255
|
-
dateToApiaString(value) {
|
|
2256
|
-
return dateToApiaFormat(value);
|
|
2257
|
-
}
|
|
2258
|
-
dateFromApiaString(value) {
|
|
2259
|
-
return dateFromApiaFormat(value);
|
|
2260
|
-
}
|
|
2261
2255
|
/**
|
|
2262
2256
|
* Hay muchos valores que podrían querer ser interpretados como booleano
|
|
2263
2257
|
*
|
|
@@ -4162,19 +4156,18 @@ const DateInput = React__default.forwardRef(
|
|
|
4162
4156
|
}, [stateError]);
|
|
4163
4157
|
const shoutOnChange = React__default.useCallback(
|
|
4164
4158
|
(newValue) => {
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
return onChange?.(newValue) ?? true;
|
|
4168
|
-
}
|
|
4159
|
+
lastEmittedValue.current = newValue;
|
|
4160
|
+
return onChange?.(newValue) ?? true;
|
|
4169
4161
|
},
|
|
4170
4162
|
[onChange]
|
|
4171
4163
|
);
|
|
4172
4164
|
const setCalendarValue = React__default.useCallback(
|
|
4173
4165
|
(value, nocheck, avoidShout) => {
|
|
4174
4166
|
if (value === "") {
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4167
|
+
if (getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== inputValue)
|
|
4168
|
+
void shoutOnChange("");
|
|
4169
|
+
setInputValue("");
|
|
4170
|
+
setCalValue(/* @__PURE__ */ new Date());
|
|
4178
4171
|
return;
|
|
4179
4172
|
}
|
|
4180
4173
|
let newDate = dayjs(value, dateFormat);
|
|
@@ -4281,8 +4274,6 @@ const DateInput = React__default.forwardRef(
|
|
|
4281
4274
|
const hasPlaceHolder = ev.target.value.match(/_/);
|
|
4282
4275
|
if (!hasPlaceHolder)
|
|
4283
4276
|
return onChange?.(ev.target.value);
|
|
4284
|
-
} else if (getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) === ev.target.value) {
|
|
4285
|
-
setCalendarValue("");
|
|
4286
4277
|
}
|
|
4287
4278
|
},
|
|
4288
4279
|
onBlur: (ev) => {
|
|
@@ -7079,11 +7070,9 @@ const IconsListNonForwarded = (props, ref) => {
|
|
|
7079
7070
|
render = useCallback(() => doRender((current) => !current), []);
|
|
7080
7071
|
const storeId = useMemo(() => uniqueId("IconsList"), []);
|
|
7081
7072
|
const [actions, useProps, , , Context] = useStore({ storeId });
|
|
7082
|
-
const rows = Math.ceil(
|
|
7083
|
-
propsRef.current.icons.length / (props.iconsPerRow ? props.iconsPerRow : breakPoint)
|
|
7084
|
-
);
|
|
7073
|
+
const rows = Math.ceil(propsRef.current.icons.length / breakPoint);
|
|
7085
7074
|
const sx = useStyles({
|
|
7086
|
-
breakPoint
|
|
7075
|
+
breakPoint,
|
|
7087
7076
|
containerWidth,
|
|
7088
7077
|
iconWidth: propsRef.current.iconWidth ?? 100,
|
|
7089
7078
|
verticalGap: propsRef.current.verticalGap,
|
|
@@ -7094,7 +7083,7 @@ const IconsListNonForwarded = (props, ref) => {
|
|
|
7094
7083
|
}, [breakPoint]);
|
|
7095
7084
|
const IconRenderer = propsRef.current.iconRenderer ?? DefaultIconRenderer;
|
|
7096
7085
|
const gridRef = useProps("grid", {
|
|
7097
|
-
columns:
|
|
7086
|
+
columns: breakPoint,
|
|
7098
7087
|
iconsCount: propsRef.current.icons.length,
|
|
7099
7088
|
rows
|
|
7100
7089
|
});
|
|
@@ -7109,7 +7098,7 @@ const IconsListNonForwarded = (props, ref) => {
|
|
|
7109
7098
|
storeId,
|
|
7110
7099
|
children: /* @__PURE__ */ jsx(Box, { ref: gridRef, children: Array(rows).fill(1).map((_, i) => {
|
|
7111
7100
|
const icons = getRowIcons({
|
|
7112
|
-
breakPoint
|
|
7101
|
+
breakPoint,
|
|
7113
7102
|
i,
|
|
7114
7103
|
icons: propsRef.current.icons
|
|
7115
7104
|
});
|
|
@@ -9764,6 +9753,119 @@ const FooterButtons = (props) => {
|
|
|
9764
9753
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Box, { ...props }) });
|
|
9765
9754
|
};
|
|
9766
9755
|
|
|
9756
|
+
const AccordionAside = () => {
|
|
9757
|
+
const children = useMenu([1, 2, 3]);
|
|
9758
|
+
return children;
|
|
9759
|
+
};
|
|
9760
|
+
|
|
9761
|
+
const Aside = () => {
|
|
9762
|
+
const children = useMenu([5, 6, 7]);
|
|
9763
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
9764
|
+
};
|
|
9765
|
+
|
|
9766
|
+
const AsideLoader = (definition) => {
|
|
9767
|
+
React__default.useEffect(() => {
|
|
9768
|
+
const variant = definition.variant ?? "twoColumnsAside";
|
|
9769
|
+
const unregister = menuController.setMenu({
|
|
9770
|
+
menu: /* @__PURE__ */ jsx(Box, { className: "ApplicationMenu", variant: `layout.${variant}`, children: definition.menu ?? definition.children }),
|
|
9771
|
+
stage: definition.stage ?? uniqueId$3()
|
|
9772
|
+
});
|
|
9773
|
+
return () => {
|
|
9774
|
+
unregister();
|
|
9775
|
+
};
|
|
9776
|
+
}, [
|
|
9777
|
+
definition.children,
|
|
9778
|
+
definition.menu,
|
|
9779
|
+
definition.stage,
|
|
9780
|
+
definition.variant
|
|
9781
|
+
]);
|
|
9782
|
+
return null;
|
|
9783
|
+
};
|
|
9784
|
+
|
|
9785
|
+
const BodyAside = () => {
|
|
9786
|
+
const children = useMenu([1, 2, 3]);
|
|
9787
|
+
return children;
|
|
9788
|
+
};
|
|
9789
|
+
|
|
9790
|
+
const FloatingAside = () => {
|
|
9791
|
+
const isScrollingUp = useMatchScrollDirection("up");
|
|
9792
|
+
const [hasScrolledEnough, setHasScrolledEnough] = React__default.useState(false);
|
|
9793
|
+
useScroll(document, ({ top }) => {
|
|
9794
|
+
const menu = document.getElementById("BodyAside");
|
|
9795
|
+
if (!menu)
|
|
9796
|
+
return false;
|
|
9797
|
+
let computedStyle = 0;
|
|
9798
|
+
if (window.getComputedStyle(menu).paddingTop.match(/\d+/)) {
|
|
9799
|
+
computedStyle = Number(
|
|
9800
|
+
window.getComputedStyle(menu).paddingTop.match(/\d+/)[0]
|
|
9801
|
+
) + Number(
|
|
9802
|
+
window.getComputedStyle(menu).paddingBottom.match(/\d+/)[0]
|
|
9803
|
+
);
|
|
9804
|
+
}
|
|
9805
|
+
const boxTop = menu.offsetHeight + menu.offsetTop + computedStyle;
|
|
9806
|
+
if (hasScrolledEnough !== boxTop < top)
|
|
9807
|
+
setHasScrolledEnough(boxTop < top);
|
|
9808
|
+
return false;
|
|
9809
|
+
});
|
|
9810
|
+
const children = useMenu([1, 2, 3]);
|
|
9811
|
+
const { Portal } = usePortal({
|
|
9812
|
+
containerId: "NonControlledAppModals",
|
|
9813
|
+
clickOutsideToHide: false,
|
|
9814
|
+
autoRemoveContainer: false,
|
|
9815
|
+
defaultShow: true,
|
|
9816
|
+
escToHide: false
|
|
9817
|
+
});
|
|
9818
|
+
if (!children)
|
|
9819
|
+
return null;
|
|
9820
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
9821
|
+
Box,
|
|
9822
|
+
{
|
|
9823
|
+
...getVariant("layout.twoColumnsAside.floatingResponsive"),
|
|
9824
|
+
className: isScrollingUp && hasScrolledEnough ? "" : "hidden",
|
|
9825
|
+
children: /* @__PURE__ */ jsx(
|
|
9826
|
+
AccordionItem,
|
|
9827
|
+
{
|
|
9828
|
+
defaultExpanded: false,
|
|
9829
|
+
buttonProps: {
|
|
9830
|
+
label: getLabel("lblMnuOpc").text,
|
|
9831
|
+
ariaLabel: getLabel("lblMnuOpc").title
|
|
9832
|
+
},
|
|
9833
|
+
id: "floatingMenuAccordion",
|
|
9834
|
+
...getVariant("tabPrimary"),
|
|
9835
|
+
children: isScrollingUp && hasScrolledEnough && children
|
|
9836
|
+
}
|
|
9837
|
+
)
|
|
9838
|
+
}
|
|
9839
|
+
) });
|
|
9840
|
+
};
|
|
9841
|
+
|
|
9842
|
+
const FooterResponsiveButtons = ({
|
|
9843
|
+
breakpoint = 4,
|
|
9844
|
+
children,
|
|
9845
|
+
className
|
|
9846
|
+
}) => {
|
|
9847
|
+
const { Portal } = usePortal({
|
|
9848
|
+
containerId: "NonControlledAppModals",
|
|
9849
|
+
clickOutsideToHide: false,
|
|
9850
|
+
autoRemoveContainer: false,
|
|
9851
|
+
defaultShow: true,
|
|
9852
|
+
escToHide: false
|
|
9853
|
+
});
|
|
9854
|
+
const appBreakpoint = useBreakpointIndex();
|
|
9855
|
+
const shouldShow = useMatchScrollDirection("down") && breakpoint >= appBreakpoint;
|
|
9856
|
+
if (Array.isArray(children) && children.length === 0)
|
|
9857
|
+
return null;
|
|
9858
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
9859
|
+
Box,
|
|
9860
|
+
{
|
|
9861
|
+
as: "aside",
|
|
9862
|
+
...getVariant("layout.footerResponsiveButtons"),
|
|
9863
|
+
className: `${className ?? ""} ${shouldShow ? "visible" : "hidden"}`,
|
|
9864
|
+
children
|
|
9865
|
+
}
|
|
9866
|
+
) });
|
|
9867
|
+
};
|
|
9868
|
+
|
|
9767
9869
|
const HamburguerMenu = ({
|
|
9768
9870
|
container = ".TitleContainer",
|
|
9769
9871
|
header = "MainHeader",
|
|
@@ -9876,170 +9978,6 @@ const HamburguerMenu = ({
|
|
|
9876
9978
|
] });
|
|
9877
9979
|
};
|
|
9878
9980
|
|
|
9879
|
-
const BodyAside = () => {
|
|
9880
|
-
const children = useMenu([1, 2, 3]);
|
|
9881
|
-
return children;
|
|
9882
|
-
};
|
|
9883
|
-
|
|
9884
|
-
const Aside = () => {
|
|
9885
|
-
const children = useMenu([5, 6, 7]);
|
|
9886
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
9887
|
-
};
|
|
9888
|
-
|
|
9889
|
-
const FooterResponsiveButtons = ({
|
|
9890
|
-
breakpoint = 4,
|
|
9891
|
-
children,
|
|
9892
|
-
className
|
|
9893
|
-
}) => {
|
|
9894
|
-
const { Portal } = usePortal({
|
|
9895
|
-
containerId: "NonControlledAppModals",
|
|
9896
|
-
clickOutsideToHide: false,
|
|
9897
|
-
autoRemoveContainer: false,
|
|
9898
|
-
defaultShow: true,
|
|
9899
|
-
escToHide: false
|
|
9900
|
-
});
|
|
9901
|
-
const appBreakpoint = useBreakpointIndex();
|
|
9902
|
-
const shouldShow = useMatchScrollDirection("down") && breakpoint >= appBreakpoint;
|
|
9903
|
-
if (Array.isArray(children) && children.length === 0)
|
|
9904
|
-
return null;
|
|
9905
|
-
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
9906
|
-
Box,
|
|
9907
|
-
{
|
|
9908
|
-
as: "aside",
|
|
9909
|
-
...getVariant("layout.footerResponsiveButtons"),
|
|
9910
|
-
className: `${className ?? ""} ${shouldShow ? "visible" : "hidden"}`,
|
|
9911
|
-
children
|
|
9912
|
-
}
|
|
9913
|
-
) });
|
|
9914
|
-
};
|
|
9915
|
-
|
|
9916
|
-
const FloatingAside = () => {
|
|
9917
|
-
const isScrollingUp = useMatchScrollDirection("up");
|
|
9918
|
-
const [hasScrolledEnough, setHasScrolledEnough] = React__default.useState(false);
|
|
9919
|
-
useScroll(document, ({ top }) => {
|
|
9920
|
-
const menu = document.getElementById("BodyAside");
|
|
9921
|
-
if (!menu)
|
|
9922
|
-
return false;
|
|
9923
|
-
let computedStyle = 0;
|
|
9924
|
-
if (window.getComputedStyle(menu).paddingTop.match(/\d+/)) {
|
|
9925
|
-
computedStyle = Number(
|
|
9926
|
-
window.getComputedStyle(menu).paddingTop.match(/\d+/)[0]
|
|
9927
|
-
) + Number(
|
|
9928
|
-
window.getComputedStyle(menu).paddingBottom.match(/\d+/)[0]
|
|
9929
|
-
);
|
|
9930
|
-
}
|
|
9931
|
-
const boxTop = menu.offsetHeight + menu.offsetTop + computedStyle;
|
|
9932
|
-
if (hasScrolledEnough !== boxTop < top)
|
|
9933
|
-
setHasScrolledEnough(boxTop < top);
|
|
9934
|
-
return false;
|
|
9935
|
-
});
|
|
9936
|
-
const children = useMenu([1, 2, 3]);
|
|
9937
|
-
const { Portal } = usePortal({
|
|
9938
|
-
containerId: "NonControlledAppModals",
|
|
9939
|
-
clickOutsideToHide: false,
|
|
9940
|
-
autoRemoveContainer: false,
|
|
9941
|
-
defaultShow: true,
|
|
9942
|
-
escToHide: false
|
|
9943
|
-
});
|
|
9944
|
-
if (!children)
|
|
9945
|
-
return null;
|
|
9946
|
-
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
9947
|
-
Box,
|
|
9948
|
-
{
|
|
9949
|
-
...getVariant("layout.twoColumnsAside.floatingResponsive"),
|
|
9950
|
-
className: isScrollingUp && hasScrolledEnough ? "" : "hidden",
|
|
9951
|
-
children: /* @__PURE__ */ jsx(
|
|
9952
|
-
AccordionItem,
|
|
9953
|
-
{
|
|
9954
|
-
defaultExpanded: false,
|
|
9955
|
-
buttonProps: {
|
|
9956
|
-
label: getLabel("lblMnuOpc").text,
|
|
9957
|
-
ariaLabel: getLabel("lblMnuOpc").title
|
|
9958
|
-
},
|
|
9959
|
-
id: "floatingMenuAccordion",
|
|
9960
|
-
...getVariant("tabPrimary"),
|
|
9961
|
-
children: isScrollingUp && hasScrolledEnough && children
|
|
9962
|
-
}
|
|
9963
|
-
)
|
|
9964
|
-
}
|
|
9965
|
-
) });
|
|
9966
|
-
};
|
|
9967
|
-
|
|
9968
|
-
const AsideLoader = (definition) => {
|
|
9969
|
-
React__default.useEffect(() => {
|
|
9970
|
-
const variant = definition.variant ?? "twoColumnsAside";
|
|
9971
|
-
const unregister = menuController.setMenu({
|
|
9972
|
-
menu: /* @__PURE__ */ jsx(Box, { className: "ApplicationMenu", variant: `layout.${variant}`, children: definition.menu ?? definition.children }),
|
|
9973
|
-
stage: definition.stage ?? uniqueId$3()
|
|
9974
|
-
});
|
|
9975
|
-
return () => {
|
|
9976
|
-
unregister();
|
|
9977
|
-
};
|
|
9978
|
-
}, [
|
|
9979
|
-
definition.children,
|
|
9980
|
-
definition.menu,
|
|
9981
|
-
definition.stage,
|
|
9982
|
-
definition.variant
|
|
9983
|
-
]);
|
|
9984
|
-
return null;
|
|
9985
|
-
};
|
|
9986
|
-
|
|
9987
|
-
const TwoColumns = ({
|
|
9988
|
-
atVeryTop,
|
|
9989
|
-
upperAside,
|
|
9990
|
-
overHeadAside,
|
|
9991
|
-
image,
|
|
9992
|
-
title,
|
|
9993
|
-
subTitle,
|
|
9994
|
-
description,
|
|
9995
|
-
underHeadAside,
|
|
9996
|
-
mainContent,
|
|
9997
|
-
footer,
|
|
9998
|
-
asideContent,
|
|
9999
|
-
footerButtons
|
|
10000
|
-
}) => {
|
|
10001
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10002
|
-
/* @__PURE__ */ jsxs(Box, { ...getVariant("layout.twoColumns"), children: [
|
|
10003
|
-
/* @__PURE__ */ jsxs(Box, { as: "section", className: "twoColumns__topBox", id: "MainHeader", children: [
|
|
10004
|
-
atVeryTop,
|
|
10005
|
-
/* @__PURE__ */ jsx(Box, { as: "aside", className: "topBox__upperAside", children: upperAside }),
|
|
10006
|
-
overHeadAside,
|
|
10007
|
-
/* @__PURE__ */ jsxs(Box, { className: "topBox__heading", children: [
|
|
10008
|
-
/* @__PURE__ */ jsx(Box, { as: "header", className: "topBox__imageHeader", children: image }),
|
|
10009
|
-
/* @__PURE__ */ jsxs(Box, { as: "header", className: "topBox__header TitleContainer", children: [
|
|
10010
|
-
/* @__PURE__ */ jsxs(Box, { className: "topBox__headings", children: [
|
|
10011
|
-
/* @__PURE__ */ jsx("h1", { children: title }),
|
|
10012
|
-
subTitle && /* @__PURE__ */ jsx("h2", { children: subTitle })
|
|
10013
|
-
] }),
|
|
10014
|
-
/* @__PURE__ */ jsx(Box, { as: "p", children: description })
|
|
10015
|
-
] }),
|
|
10016
|
-
/* @__PURE__ */ jsxs(Box, { className: "topBox__nav", children: [
|
|
10017
|
-
/* @__PURE__ */ jsx(FavoriteIcon, {}),
|
|
10018
|
-
/* @__PURE__ */ jsx(HamburguerMenu, {})
|
|
10019
|
-
] })
|
|
10020
|
-
] }),
|
|
10021
|
-
underHeadAside
|
|
10022
|
-
] }),
|
|
10023
|
-
/* @__PURE__ */ jsxs(Box, { as: "section", className: "twoColumns__section", children: [
|
|
10024
|
-
/* @__PURE__ */ jsxs(Box, { as: "main", className: "twoColumns__main", children: [
|
|
10025
|
-
/* @__PURE__ */ jsx(BodyAside, {}),
|
|
10026
|
-
mainContent
|
|
10027
|
-
] }),
|
|
10028
|
-
/* @__PURE__ */ jsx(Box, { as: "nav", id: "MainAside", className: "twoColumns__aside", children: /* @__PURE__ */ jsx(Aside, {}) })
|
|
10029
|
-
] }),
|
|
10030
|
-
/* @__PURE__ */ jsx(Box, { as: "footer", className: "twoColumns__footer", children: footer })
|
|
10031
|
-
] }),
|
|
10032
|
-
/* @__PURE__ */ jsx(AsideLoader, { children: asideContent }),
|
|
10033
|
-
/* @__PURE__ */ jsx(FooterResponsiveButtons, { children: footerButtons }),
|
|
10034
|
-
/* @__PURE__ */ jsx(FloatingAside, {})
|
|
10035
|
-
] });
|
|
10036
|
-
};
|
|
10037
|
-
|
|
10038
|
-
const AccordionAside = () => {
|
|
10039
|
-
const children = useMenu([1, 2, 3]);
|
|
10040
|
-
return children;
|
|
10041
|
-
};
|
|
10042
|
-
|
|
10043
9981
|
const HeaderButtons = () => {
|
|
10044
9982
|
const breakPoint = useBreakpointIndex();
|
|
10045
9983
|
const shouldShowAsFloat = breakPoint === 3;
|
|
@@ -10122,52 +10060,6 @@ const CenteredHeaderButtons = () => {
|
|
|
10122
10060
|
return /* @__PURE__ */ jsx(Portal3, { children: icon });
|
|
10123
10061
|
};
|
|
10124
10062
|
|
|
10125
|
-
const TwoColumnsList = ({
|
|
10126
|
-
image,
|
|
10127
|
-
subTitle,
|
|
10128
|
-
title,
|
|
10129
|
-
description,
|
|
10130
|
-
favoriteIcon,
|
|
10131
|
-
content,
|
|
10132
|
-
headerBottom,
|
|
10133
|
-
contentFooter,
|
|
10134
|
-
footer,
|
|
10135
|
-
asideContent,
|
|
10136
|
-
footerButtons
|
|
10137
|
-
}) => {
|
|
10138
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10139
|
-
/* @__PURE__ */ jsxs("div", { ...getVariant("layout.twoColumnsList"), className: "twoColumnsList", children: [
|
|
10140
|
-
/* @__PURE__ */ jsxs("div", { className: "twoColumnsList__topBox", id: "MainHeader", children: [
|
|
10141
|
-
/* @__PURE__ */ jsxs("header", { className: "topBox__heading", children: [
|
|
10142
|
-
/* @__PURE__ */ jsx("section", { className: "topBox__imageHeader", children: image }),
|
|
10143
|
-
/* @__PURE__ */ jsxs("section", { className: "topBox__header TitleContainer", children: [
|
|
10144
|
-
/* @__PURE__ */ jsxs("div", { className: "topBox__headings", children: [
|
|
10145
|
-
/* @__PURE__ */ jsx("h1", { children: title }),
|
|
10146
|
-
subTitle && /* @__PURE__ */ jsx("h2", { children: subTitle })
|
|
10147
|
-
] }),
|
|
10148
|
-
/* @__PURE__ */ jsx("p", { className: "topBox__description", children: description })
|
|
10149
|
-
] }),
|
|
10150
|
-
/* @__PURE__ */ jsxs("nav", { className: "topBox__nav", title: getLabel("lblNavOptions").text, children: [
|
|
10151
|
-
favoriteIcon,
|
|
10152
|
-
/* @__PURE__ */ jsx(HamburguerMenu, {})
|
|
10153
|
-
] })
|
|
10154
|
-
] }),
|
|
10155
|
-
headerBottom
|
|
10156
|
-
] }),
|
|
10157
|
-
/* @__PURE__ */ jsxs("section", { className: "twoColumnsList__section", children: [
|
|
10158
|
-
/* @__PURE__ */ jsxs("main", { className: "twoColumnsList__main", children: [
|
|
10159
|
-
/* @__PURE__ */ jsx("div", { className: "twoColumnsList__content", children: content }),
|
|
10160
|
-
/* @__PURE__ */ jsx("div", { className: "twoColumnsList__contentFooter", children: contentFooter })
|
|
10161
|
-
] }),
|
|
10162
|
-
/* @__PURE__ */ jsx("aside", { id: "MainAside", className: "twoColumnsList__aside", children: /* @__PURE__ */ jsx(Aside, {}) })
|
|
10163
|
-
] }),
|
|
10164
|
-
/* @__PURE__ */ jsx("footer", { className: "twoColumnsList__mainFooter", children: footer })
|
|
10165
|
-
] }),
|
|
10166
|
-
/* @__PURE__ */ jsx(AsideLoader, { children: asideContent }),
|
|
10167
|
-
/* @__PURE__ */ jsx(FooterResponsiveButtons, { children: footerButtons })
|
|
10168
|
-
] });
|
|
10169
|
-
};
|
|
10170
|
-
|
|
10171
10063
|
var __defProp$5 = Object.defineProperty;
|
|
10172
10064
|
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10173
10065
|
var __publicField$5 = (obj, key, value) => {
|
|
@@ -11234,5 +11126,5 @@ const _FiltersStore = class _FiltersStore {
|
|
|
11234
11126
|
__publicField(_FiltersStore, "instance", new _FiltersStore());
|
|
11235
11127
|
let FiltersStore = _FiltersStore;
|
|
11236
11128
|
|
|
11237
|
-
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, index as MDRenderer, Modal, ModalContext, 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,
|
|
11129
|
+
export { Accordion, AccordionAside, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, Aside, AsideLoader, AsidePanel, AutoEllipsis, Autocomplete, AutocompleteController, AutogrowTextarea, BaseButton, BodyAside, CalendarModal, Captcha, CenteredHeaderButtons, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, ContainerWithHeader, DateInput, DeadSessionModal, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, Dropzone, FavoriteIcon, FieldErrorMessage, FieldLabel, FileCard, FilterConditionDTO, FilterDTO, FiltersStore, FloatingAside, FooterButtons, FooterResponsiveButtons, HamburguerMenu, Header, HeaderButtons, IconButton, IconInput, IconsList, Label, LabelBox, LinearLoader, LinearSpinnerLock, ListSkeletonLoader, Listbox, ListboxItem, LoaderSpinner, index as MDRenderer, Modal, ModalContext, 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, getFieldErrorStyles, getFieldTouchedStyles, importComponent, isFavoriteIcon, isParametersGroup, makeResponsiveComponent, menuController, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useCurrentTab, useMenu, useModal, useModalContext, useOtherTagButton, useTabsContext };
|
|
11238
11130
|
//# sourceMappingURL=index.js.map
|