@apia/components 4.0.50 → 4.0.60

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/LICENSE.md ADDED
@@ -0,0 +1,6 @@
1
+ All Rights Reserved.
2
+
3
+ Copyright (c) 2026 Statum
4
+
5
+ This software and associated documentation files are proprietary and confidential.
6
+ Unauthorized copying, distribution, modification, or use is strictly prohibited.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, Ref, RefObject, DetailedHTMLProps, TextareaHTMLAttributes, ChangeEventHandler, FocusEvent, MutableRefObject, MouseEvent as MouseEvent$1, KeyboardEvent, FC, FunctionComponent, ForwardedRef, ComponentType, ReactElement } from 'react';
3
3
  import * as _apia_util from '@apia/util';
4
- import { IOnFocusConfiguration, TFocusRetriever, TId as TId$1, EventEmitter, StatefulEmitter, TModify, TApiaFilter, TApiaFilterValue } from '@apia/util';
4
+ import { IOnFocusConfiguration, TFocusRetriever, TId as TId$1, EventEmitter, StatefulEmitter, TModify, TLabel, TApiaFilter, TApiaFilterValue } from '@apia/util';
5
5
  import { BoxProps, TPalette, InputProps, ThemeUIStyleObject, IconButtonProps, ButtonProps, ThemeUICSSObject, SelectProps, SwitchProps, LabelProps } from '@apia/theme';
6
6
  import { TIconName, TIconType } from '@apia/icons';
7
7
  import { Args } from 'react-cool-portal';
@@ -333,6 +333,7 @@ declare class TabsController<TabType extends TTab = TTab> {
333
333
  */
334
334
  append(tab: TabType, behavior?: TAppendBehavior): void;
335
335
  closeAll(closeFixedTabsAsWell?: boolean, force?: boolean): Promise<void>;
336
+ openAll(): Promise<void>;
336
337
  closeOpenTab(force?: boolean): void;
337
338
  closeToRight(targetId: string, force?: boolean): Promise<void>;
338
339
  closeToLeft(targetId: string, force?: boolean): Promise<void>;
@@ -359,7 +360,7 @@ type TabsControllerProps<TabType extends TTab> = {
359
360
  id: string;
360
361
  initialTabs?: TabType[];
361
362
  getController?: (controller: TabsController) => unknown;
362
- initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple'>;
363
+ initialState?: Pick<Partial<TTabsListState<TabType>>, 'isMultiple' | 'showAtLeastOneTab' | 'allowDetach'>;
363
364
  onCloseTab?: (tan: Tab) => void;
364
365
  orientation: TOrientation;
365
366
  };
@@ -1053,6 +1054,24 @@ type TCheckbox = TModify<ButtonProps, {
1053
1054
  }>;
1054
1055
  declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<TCheckbox, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
1055
1056
 
1057
+ type TCheckboxLabel = {
1058
+ /**
1059
+ * Permite mostrar un mensaje de error debajo del campo
1060
+ */
1061
+ error?: string;
1062
+ hideRequiredMark?: boolean;
1063
+ label: string | TLabel;
1064
+ /**
1065
+ * La propiedad required se utiliza para mostrar el * de requerido.
1066
+ *
1067
+ * @see requiredMarkPosition
1068
+ * @see hideRequiredMark
1069
+ */
1070
+ required?: boolean;
1071
+ requiredMarkPosition?: 'before' | 'after';
1072
+ };
1073
+ declare const CheckboxLabel: React$1.ForwardRefExoticComponent<TCheckboxLabel & BoxProps & React$1.RefAttributes<HTMLDivElement>>;
1074
+
1056
1075
  type TDateProps = {
1057
1076
  className?: string;
1058
1077
  disabled?: boolean;
@@ -1147,7 +1166,7 @@ type TFieldLabel = {
1147
1166
  */
1148
1167
  error?: string;
1149
1168
  hideRequiredMark?: boolean;
1150
- label: string;
1169
+ label: string | TLabel;
1151
1170
  /**
1152
1171
  * La propiedad required se utiliza para mostrar el * de requerido.
1153
1172
  *
@@ -1164,7 +1183,7 @@ declare const FieldLabel: React$1.ForwardRefExoticComponent<{
1164
1183
  */
1165
1184
  error?: string;
1166
1185
  hideRequiredMark?: boolean;
1167
- label: string;
1186
+ label: string | TLabel;
1168
1187
  /**
1169
1188
  * La propiedad required se utiliza para mostrar el * de requerido.
1170
1189
  *
@@ -1911,13 +1930,14 @@ declare const FileCard: React$1.ForwardRefExoticComponent<{
1911
1930
  };
1912
1931
  } & React$1.RefAttributes<unknown>>;
1913
1932
 
1914
- declare const Dropzone: ({ sx, className, messageError, progress, defaultLabel, draggingLabel, onClick, onChange, handleInfoButton, }: {
1933
+ declare const Dropzone: ({ sx, className, messageError, progress, defaultLabel, draggingLabel, onClick, onChange, handleInfoButton, infoButtonProps, }: {
1915
1934
  sx?: ThemeUIStyleObject;
1916
1935
  className?: string;
1917
1936
  messageError?: string;
1918
1937
  progress?: number;
1919
1938
  defaultLabel?: string;
1920
1939
  draggingLabel?: string;
1940
+ infoButtonProps?: any;
1921
1941
  onClick?: (e: MouseEvent$1) => void;
1922
1942
  onChange?: (e: File[]) => any;
1923
1943
  handleInfoButton?: (e: MouseEvent$1) => void;
@@ -2596,5 +2616,5 @@ declare class Templater {
2596
2616
  parseString(content: string, options?: IAlterDefaultOptions): string | JSX.Element | JSX.Element[];
2597
2617
  }
2598
2618
 
2599
- 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, Permissions, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, SwitchCard, 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 TPickPoolForPermissions, type TPickUserForPermissions, 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 };
2619
+ 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, CheckboxLabel, 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, Permissions, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, SwitchCard, type TAccordionHandler, type TAccordionItemButton, type TApiaButtonType, type TApiaIconButton, type TCheckbox, type TCheckboxLabel, 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 TPickPoolForPermissions, type TPickUserForPermissions, 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 };
2600
2620
  //# 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, Switch, 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, isChild, EventEmitter, useUnmount, useMount, StatefulEmitter, shallowEqual as shallowEqual$1, getSpecificParent, uniqueId as uniqueId$4, getDateFormat, customEvents, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription, toBoolean, useMatchScrollDirection, arrayOrArray } from '@apia/util';
10
+ import { findScrollContainer, useUpdateEffect, focus, focusSelector, getFocusSelector, addBoundary, useCombinedRefs, usePrevious, getLabel, isChild, EventEmitter, useUnmount, useMount, StatefulEmitter, shallowEqual as shallowEqual$1, getSpecificParent, getLabelTooltip, getLabelName, uniqueId as uniqueId$4, getDateFormat, customEvents, persistentStorage, disableChildrenFocus, enableChildrenFocus, decodeHTMLEntities, useDebouncedCallback, getIndex, noNaN, useLatest, useSubscription, toBoolean, 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';
@@ -1892,8 +1892,8 @@ const Confirm = ({
1892
1892
  if (!showsCancelButton && showsConfirmButton) {
1893
1893
  confirmText = confirmText || getLabel("btnClose").text;
1894
1894
  } else if (showsConfirmButton) {
1895
- confirmText = getLabel("btnCon").text;
1896
- cancelText = getLabel("btnCan").text;
1895
+ confirmText = confirmText || getLabel("btnCon").text;
1896
+ cancelText = cancelText || getLabel("btnCan").text;
1897
1897
  }
1898
1898
  return /* @__PURE__ */ jsxs(
1899
1899
  Box,
@@ -3488,8 +3488,8 @@ _timeout = new WeakMap();
3488
3488
  const SearchBox = observer((props) => {
3489
3489
  const handler = useAutocompleteContext();
3490
3490
  const breakpoint = useBreakpointIndex();
3491
- const inputRef = useRef(null);
3492
- return /* @__PURE__ */ jsxs(Box, { className: "autocomplete__inputWrapper", children: [
3491
+ const boxRef = useRef(null);
3492
+ return /* @__PURE__ */ jsxs(Box, { className: "autocomplete__inputWrapper", ref: boxRef, children: [
3493
3493
  /* @__PURE__ */ jsx(
3494
3494
  "input",
3495
3495
  {
@@ -3512,13 +3512,12 @@ const SearchBox = observer((props) => {
3512
3512
  Input,
3513
3513
  {
3514
3514
  ...props,
3515
- ref: inputRef,
3516
3515
  className: `autocomplete__search ${handler.state.disabled ? "disabled" : ""} ${handler.state.readOnly ? "readOnly" : ""}`,
3517
3516
  onChange: async (ev) => {
3518
3517
  handler.search(ev.target.value);
3519
3518
  },
3520
3519
  onClick: () => {
3521
- handler.state.width = inputRef.current?.getBoundingClientRect().width ?? handler.state.width;
3520
+ handler.state.width = boxRef.current?.getBoundingClientRect().width ?? handler.state.width;
3522
3521
  handler.toggleOpen();
3523
3522
  },
3524
3523
  onFocus: (ev) => {
@@ -4019,6 +4018,93 @@ const Checkbox$1 = forwardRef(
4019
4018
  );
4020
4019
  Checkbox$1.displayName = "Checkbox";
4021
4020
 
4021
+ const RequiredMark = ({
4022
+ isFormReadonly = false,
4023
+ isRequired = false,
4024
+ isReadonly = false,
4025
+ sx,
4026
+ style,
4027
+ ...rest
4028
+ }) => {
4029
+ const mergedSx = {
4030
+ color: "palette.error.main",
4031
+ fontWeight: "bold",
4032
+ ...sx ?? style ?? {}
4033
+ };
4034
+ if (!isRequired || isReadonly || isFormReadonly)
4035
+ return null;
4036
+ return /* @__PURE__ */ jsx(
4037
+ Box,
4038
+ {
4039
+ as: "span",
4040
+ sx: mergedSx,
4041
+ className: "requiredMark",
4042
+ title: getLabel("msgReqField").text,
4043
+ ...rest,
4044
+ children: "*"
4045
+ }
4046
+ );
4047
+ };
4048
+
4049
+ injectStyles("layout.common.components.checkboxLabel", {
4050
+ display: "flex",
4051
+ flexDirection: "column",
4052
+ gap: 1,
4053
+ ".checkboxLabel__label": {
4054
+ fontWeight: "bold"
4055
+ }
4056
+ });
4057
+ const CheckboxLabel = forwardRef(
4058
+ ({
4059
+ as,
4060
+ children,
4061
+ error,
4062
+ hideRequiredMark,
4063
+ label,
4064
+ required,
4065
+ requiredMarkPosition = "after",
4066
+ ...props
4067
+ }, ref) => {
4068
+ return /* @__PURE__ */ jsxs(
4069
+ Box,
4070
+ {
4071
+ as: as ?? "label",
4072
+ ...props,
4073
+ className: `checkboxLabel ${props.className ?? ""} ${error ? "field__withError" : ""}`,
4074
+ ...getVariant("layout.common.components.checkboxLabel"),
4075
+ "aria-label": props["aria-label"] ?? getLabelTooltip(label),
4076
+ ref,
4077
+ children: [
4078
+ /* @__PURE__ */ jsxs(Box, { className: "label_row", children: [
4079
+ children,
4080
+ /* @__PURE__ */ jsxs(Box, { className: `checkboxLabel__label`, children: [
4081
+ requiredMarkPosition === "before" && /* @__PURE__ */ jsx(
4082
+ RequiredMark,
4083
+ {
4084
+ isRequired: required,
4085
+ isReadonly: hideRequiredMark,
4086
+ isFormReadonly: hideRequiredMark
4087
+ }
4088
+ ),
4089
+ getLabelName(label),
4090
+ requiredMarkPosition === "after" && /* @__PURE__ */ jsx(
4091
+ RequiredMark,
4092
+ {
4093
+ isRequired: required,
4094
+ isReadonly: hideRequiredMark,
4095
+ isFormReadonly: hideRequiredMark
4096
+ }
4097
+ )
4098
+ ] })
4099
+ ] }),
4100
+ error && /* @__PURE__ */ jsx(Box, { className: "checkboxLabel__error", children: error })
4101
+ ]
4102
+ }
4103
+ );
4104
+ }
4105
+ );
4106
+ CheckboxLabel.displayName = "CheckboxLabel";
4107
+
4022
4108
  const IconInput = ({
4023
4109
  additionalButtons,
4024
4110
  additionalButtonsPosition = "before",
@@ -4134,7 +4220,7 @@ const getMaskForDateFormat = () => {
4134
4220
  return "99/99/9999";
4135
4221
  };
4136
4222
  class DateInputController {
4137
- constructor(actualId) {
4223
+ constructor() {
4138
4224
  __publicField$c(this, "props", {});
4139
4225
  __publicField$c(this, "state", {});
4140
4226
  __publicField$c(this, "_ref", null);
@@ -4142,22 +4228,26 @@ class DateInputController {
4142
4228
  __publicField$c(this, "inputValue", "");
4143
4229
  __publicField$c(this, "value", null);
4144
4230
  __publicField$c(this, "previousValue", "");
4145
- this.props.id = uniqueId$4(actualId ?? "date-input");
4231
+ this.props.id = uniqueId$4("date-input");
4146
4232
  makeAutoObservable(this);
4147
4233
  }
4148
4234
  clear() {
4149
- this.setValueFromString("");
4150
- this.focus();
4235
+ if (!this.state.disabled) {
4236
+ this.setValueFromString("");
4237
+ this.focus();
4238
+ }
4151
4239
  }
4152
4240
  focus() {
4153
- const input = this._ref?.querySelector("input");
4154
- if (input) {
4155
- input.focus();
4156
- setTimeout(() => {
4157
- window.requestAnimationFrame(() => {
4158
- input.setSelectionRange(0, input.value.length);
4159
- });
4160
- }, 0);
4241
+ if (!this.state.disabled) {
4242
+ const input = this._ref?.querySelector("input");
4243
+ if (input) {
4244
+ input.focus();
4245
+ setTimeout(() => {
4246
+ window.requestAnimationFrame(() => {
4247
+ input.setSelectionRange(0, input.value.length);
4248
+ });
4249
+ }, 0);
4250
+ }
4161
4251
  }
4162
4252
  }
4163
4253
  ref(el) {
@@ -4172,13 +4262,15 @@ class DateInputController {
4172
4262
  );
4173
4263
  }
4174
4264
  onBlur(ev) {
4175
- if (!this.isInsidePicker(ev.relatedTarget)) {
4176
- if (this.error) {
4177
- this.inputValue = "";
4178
- this.value = null;
4179
- this.error = false;
4265
+ if (!this.state.disabled) {
4266
+ if (!this.isInsidePicker(ev.relatedTarget)) {
4267
+ if (this.error) {
4268
+ this.inputValue = "";
4269
+ this.value = null;
4270
+ this.error = false;
4271
+ }
4272
+ this.props.onBlur?.(this.inputValue, ev);
4180
4273
  }
4181
- this.props.onBlur?.(this.inputValue, ev);
4182
4274
  }
4183
4275
  }
4184
4276
  onInputChange(ev) {
@@ -4188,76 +4280,82 @@ class DateInputController {
4188
4280
  this.setValue(value);
4189
4281
  }
4190
4282
  openCalendar(ev) {
4191
- const tooltip = ApiaUtil.instance.tooltips.open({
4192
- attachToElement() {
4193
- return ev.target.closest("button");
4194
- },
4195
- attachToElementAnchorPoint: "center",
4196
- closeOnClick: false,
4197
- closeOnClickOut: true,
4198
- closeOnEscape: true,
4199
- closeOnMouseLeaveTooltip: false,
4200
- closeOnMouseLeaveAttachedElement: false,
4201
- closeOnScrollOut: true,
4202
- children: /* @__PURE__ */ jsx("div", { id: this.calendarElementId, children: /* @__PURE__ */ jsx(
4203
- CalModal,
4204
- {
4205
- calValue: this.value || /* @__PURE__ */ new Date(),
4206
- locale: DEFAULT_LOCALE,
4207
- handleClickDay: (date) => {
4208
- tooltip.close();
4209
- this.onCalendarSelect(date);
4210
- this.focus();
4283
+ if (!this.state.disabled) {
4284
+ const tooltip = ApiaUtil.instance.tooltips.open({
4285
+ attachToElement() {
4286
+ return ev.target.closest("button");
4287
+ },
4288
+ attachToElementAnchorPoint: "center",
4289
+ closeOnClick: false,
4290
+ closeOnClickOut: true,
4291
+ closeOnEscape: true,
4292
+ closeOnMouseLeaveTooltip: false,
4293
+ closeOnMouseLeaveAttachedElement: false,
4294
+ closeOnScrollOut: true,
4295
+ children: /* @__PURE__ */ jsx("div", { id: this.calendarElementId, children: /* @__PURE__ */ jsx(
4296
+ CalModal,
4297
+ {
4298
+ calValue: this.value || /* @__PURE__ */ new Date(),
4299
+ locale: DEFAULT_LOCALE,
4300
+ handleClickDay: (date) => {
4301
+ tooltip.close();
4302
+ this.onCalendarSelect(date);
4303
+ this.focus();
4304
+ }
4211
4305
  }
4306
+ ) }),
4307
+ initialFocusGetter(el) {
4308
+ return el.querySelector(`.react-calendar__tile--active`);
4309
+ },
4310
+ minSize: { width: 350, height: 310 },
4311
+ onClose: () => {
4312
+ window.requestAnimationFrame(() => {
4313
+ if (!this.isInsidePicker(document.activeElement)) {
4314
+ this.props.onBlur?.(this.inputValue);
4315
+ }
4316
+ });
4212
4317
  }
4213
- ) }),
4214
- initialFocusGetter(el) {
4215
- return el.querySelector(`.react-calendar__tile--active`);
4216
- },
4217
- minSize: { width: 350, height: 310 },
4218
- onClose: () => {
4219
- window.requestAnimationFrame(() => {
4220
- if (!this.isInsidePicker(document.activeElement)) {
4221
- this.props.onBlur?.(this.inputValue);
4222
- }
4223
- });
4224
- }
4225
- });
4318
+ });
4319
+ }
4226
4320
  }
4227
4321
  setValueFromString(str, fire = true) {
4228
- if (str === "" || str.replaceAll("_", "9") === getMaskForDateFormat()) {
4229
- this.inputValue = "";
4230
- this.setValue(null, fire);
4231
- } else if (str !== this.inputValue) {
4232
- const hasPlaceHolder = str.match(/_/);
4233
- if (!hasPlaceHolder) {
4234
- const value = dayjs(str, dateFormat);
4235
- const formattedDate = value.format(dateFormat);
4236
- if (value.isValid() && formattedDate === str) {
4237
- this.setValue(value.toDate(), fire);
4322
+ if (!this.state.disabled) {
4323
+ if (str === "" || str.replaceAll("_", "9") === getMaskForDateFormat()) {
4324
+ this.inputValue = "";
4325
+ this.setValue(null, fire);
4326
+ } else if (str !== this.inputValue) {
4327
+ const hasPlaceHolder = str.match(/_/);
4328
+ if (!hasPlaceHolder) {
4329
+ const value = dayjs(str, dateFormat);
4330
+ const formattedDate = value.format(dateFormat);
4331
+ if (value.isValid() && formattedDate === str) {
4332
+ this.setValue(value.toDate(), fire);
4333
+ } else {
4334
+ this.inputValue = str;
4335
+ this.props.onError?.(getLabel("msgInvalidDate").text);
4336
+ this.error = true;
4337
+ }
4238
4338
  } else {
4239
4339
  this.inputValue = str;
4240
- this.props.onError?.(getLabel("msgInvalidDate").text);
4241
- this.error = true;
4242
4340
  }
4243
- } else {
4244
- this.inputValue = str;
4245
4341
  }
4246
4342
  }
4247
4343
  }
4248
4344
  async setValue(date, fire = true) {
4249
- this.error = false;
4250
- if (date !== this.value) {
4251
- const dateValue = dayjs(date);
4252
- const newValue = dateValue.isValid() ? dateValue.format(dateFormat) : "";
4253
- const res = fire ? await this.props.onChange?.(newValue) : null;
4254
- this.inputValue = newValue || "";
4255
- if (typeof res !== "string") {
4256
- this.value = date;
4257
- } else {
4258
- this.error = true;
4259
- this.value = null;
4260
- this.props.onError?.(res);
4345
+ if (!this.state.disabled) {
4346
+ this.error = false;
4347
+ if (date !== this.value) {
4348
+ const dateValue = dayjs(date);
4349
+ const newValue = dateValue.isValid() ? dateValue.format(dateFormat) : "";
4350
+ const res = fire ? await this.props.onChange?.(newValue) : null;
4351
+ this.inputValue = newValue || "";
4352
+ if (typeof res !== "string") {
4353
+ this.value = date;
4354
+ } else {
4355
+ this.error = true;
4356
+ this.value = null;
4357
+ this.props.onError?.(res);
4358
+ }
4261
4359
  }
4262
4360
  }
4263
4361
  }
@@ -4290,10 +4388,7 @@ const DateInput = observer(
4290
4388
  value: outerValue,
4291
4389
  props
4292
4390
  }) => {
4293
- const controller = useMemo(
4294
- () => new DateInputController(outerId),
4295
- [outerId]
4296
- );
4391
+ const controller = useMemo(() => new DateInputController(), []);
4297
4392
  controller.render({
4298
4393
  className,
4299
4394
  disabled,
@@ -4317,7 +4412,7 @@ const DateInput = observer(
4317
4412
  children: /* @__PURE__ */ jsx(
4318
4413
  IconInput,
4319
4414
  {
4320
- additionalButtons: controller.inputValue && getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== controller.inputValue ? /* @__PURE__ */ jsx(
4415
+ additionalButtons: controller.inputValue && getMaskForDateFormat().replaceAll("9", DEFAULT_MASK_PLACEHOLDER) !== controller.inputValue && !disabled ? /* @__PURE__ */ jsx(
4321
4416
  Close,
4322
4417
  {
4323
4418
  as: "button",
@@ -4335,8 +4430,6 @@ const DateInput = observer(
4335
4430
  disabled,
4336
4431
  onChange: controller.onInputChange.bind(controller),
4337
4432
  value: controller.inputValue,
4338
- id: outerId,
4339
- name: outerId,
4340
4433
  ...props
4341
4434
  },
4342
4435
  mask: getMaskForDateFormat(),
@@ -4521,34 +4614,6 @@ const NumberInput = React__default.forwardRef(
4521
4614
  }
4522
4615
  );
4523
4616
 
4524
- const RequiredMark = ({
4525
- isFormReadonly = false,
4526
- isRequired = false,
4527
- isReadonly = false,
4528
- sx,
4529
- style,
4530
- ...rest
4531
- }) => {
4532
- const mergedSx = {
4533
- color: "palette.error.main",
4534
- fontWeight: "bold",
4535
- ...sx ?? style ?? {}
4536
- };
4537
- if (!isRequired || isReadonly || isFormReadonly)
4538
- return null;
4539
- return /* @__PURE__ */ jsx(
4540
- Box,
4541
- {
4542
- as: "span",
4543
- sx: mergedSx,
4544
- className: "requiredMark",
4545
- title: getLabel("msgReqField").text,
4546
- ...rest,
4547
- children: "*"
4548
- }
4549
- );
4550
- };
4551
-
4552
4617
  const getFieldErrorStyles = (isValid) => {
4553
4618
  return {
4554
4619
  borderLeftStyle: !isValid ? "solid" : null,
@@ -4591,7 +4656,7 @@ const FieldLabel = forwardRef(
4591
4656
  ...props,
4592
4657
  className: `fieldLabel ${props.className ?? ""}`,
4593
4658
  ...getVariant("layout.common.components.fieldLabel"),
4594
- "aria-label": props["aria-label"] ?? label,
4659
+ "aria-label": props["aria-label"] ?? getLabelTooltip(label),
4595
4660
  ref,
4596
4661
  children: [
4597
4662
  /* @__PURE__ */ jsxs(Box, { className: "fieldLabel__label", children: [
@@ -4603,7 +4668,7 @@ const FieldLabel = forwardRef(
4603
4668
  isFormReadonly: hideRequiredMark
4604
4669
  }
4605
4670
  ),
4606
- label,
4671
+ getLabelName(label),
4607
4672
  requiredMarkPosition === "after" && /* @__PURE__ */ jsx(
4608
4673
  RequiredMark,
4609
4674
  {
@@ -7650,7 +7715,8 @@ const Dropzone = ({
7650
7715
  draggingLabel = getLabel("lblDroping").text,
7651
7716
  onClick,
7652
7717
  onChange,
7653
- handleInfoButton
7718
+ handleInfoButton,
7719
+ infoButtonProps
7654
7720
  }) => {
7655
7721
  const innerSx = messageError ? { borderLeft: "2px solid", borderColor: "danger" } : {};
7656
7722
  const fileInputRef = useRef(null);
@@ -7724,6 +7790,7 @@ const Dropzone = ({
7724
7790
  handleInfoButton && /* @__PURE__ */ jsx(
7725
7791
  IconButton,
7726
7792
  {
7793
+ ...infoButtonProps,
7727
7794
  className: "info",
7728
7795
  iconSize: "Sm",
7729
7796
  icon: "Info",
@@ -9147,10 +9214,15 @@ const DefaultTabsLabelRenderer = observer(
9147
9214
  );
9148
9215
  const handleMouseDown = React__default.useCallback(
9149
9216
  (ev) => {
9217
+ if (ev.shiftKey && ev.button === 0) {
9218
+ tab.controller.openAll();
9219
+ return;
9220
+ }
9150
9221
  if (ev.button === 1) {
9151
9222
  tab.close();
9152
- } else if (ev.button === 0)
9223
+ } else if (ev.button === 0) {
9153
9224
  tab.open();
9225
+ }
9154
9226
  },
9155
9227
  [tab]
9156
9228
  );
@@ -9510,6 +9582,13 @@ class TabsController {
9510
9582
  }
9511
9583
  }
9512
9584
  }
9585
+ async openAll() {
9586
+ for (const tab of this.tabsList) {
9587
+ if (!tab.state.isFixed) {
9588
+ tab.open(false);
9589
+ }
9590
+ }
9591
+ }
9513
9592
  closeOpenTab(force) {
9514
9593
  const openTab = this.activeTab;
9515
9594
  openTab?.close(force);
@@ -10321,7 +10400,7 @@ class Parameter {
10321
10400
  this.state.values = this.getValues().filter((x) => !!x && x !== value);
10322
10401
  }
10323
10402
  asPayloadElement() {
10324
- return this.state.type === "label" ? null : toJS(this.state.values);
10403
+ return this.state.type === "label" ? null : toJS(this.state.values.filter((x) => !!x));
10325
10404
  }
10326
10405
  includes(value) {
10327
10406
  return this.state.values.includes(value);
@@ -10371,7 +10450,8 @@ const ParameterRender = observer(
10371
10450
  onChange: (ev) => {
10372
10451
  parameter.setValue(ev.target.value, index);
10373
10452
  },
10374
- value: parameter.state.values[index] ?? ""
10453
+ value: parameter.state.values[index] ?? "",
10454
+ className: parameter.state.validationError ? "requiredFilter__Border" : ""
10375
10455
  }
10376
10456
  ),
10377
10457
  error
@@ -10407,7 +10487,8 @@ const ParameterRender = observer(
10407
10487
  index
10408
10488
  );
10409
10489
  },
10410
- value: parameter.state.values.join("")
10490
+ value: parameter.state.values.join(""),
10491
+ className: parameter.state.validationError ? "requiredFilter__Border" : ""
10411
10492
  }
10412
10493
  ),
10413
10494
  error
@@ -10430,7 +10511,8 @@ const ParameterRender = observer(
10430
10511
  onChange: (ev) => {
10431
10512
  parameter.setValue(String(ev.target.checked), index);
10432
10513
  },
10433
- checked: parameter.state.values[index] === "true"
10514
+ checked: parameter.state.values[index] === "true",
10515
+ className: parameter.state.validationError ? "requiredFilter__Border" : ""
10434
10516
  }
10435
10517
  ),
10436
10518
  error
@@ -10454,6 +10536,7 @@ const ParameterRender = observer(
10454
10536
  parameter.setValue(ev.target.value, index);
10455
10537
  },
10456
10538
  value: parameter.state.values[index],
10539
+ className: parameter.state.validationError ? "requiredFilter__Border" : "",
10457
10540
  children: arrayOrArray(parameter.state.possibleValues).map((c) => /* @__PURE__ */ jsx("option", { value: c.value, children: c.text }))
10458
10541
  }
10459
10542
  ),
@@ -11335,5 +11418,5 @@ const _FiltersStore = class _FiltersStore {
11335
11418
  __publicField(_FiltersStore, "instance", new _FiltersStore());
11336
11419
  let FiltersStore = _FiltersStore;
11337
11420
 
11338
- 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, Permissions, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, SwitchCard, 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 };
11421
+ 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, CheckboxLabel, 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, Permissions, ProgressBar, RequiredMark, ScreenLocker, ShowResponsive, SimpleButton, SortableList, SortableListItem, SwitchCard, 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 };
11339
11422
  //# sourceMappingURL=index.js.map