@apia/util 4.0.45 → 4.0.47

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 CHANGED
@@ -375,7 +375,7 @@ declare function enableChildrenFocus(parent: HTMLElement): void;
375
375
  * Toma una cadena de texto que puede tener caracteres de escape de HTML (por
376
376
  * ejemplo á) y devuelve su correspondiente en texto plano.
377
377
  */
378
- declare const decodeHTMLEntities: (str: string) => string | null;
378
+ declare const decodeHTMLEntities: (str: string) => string;
379
379
 
380
380
  /**
381
381
  * @public
@@ -873,6 +873,7 @@ interface TMessage {
873
873
  content?: string;
874
874
  title?: string;
875
875
  type?: string;
876
+ stack?: string;
876
877
  }
877
878
  interface TNotificationMessage {
878
879
  onClose?: string;
@@ -885,6 +886,7 @@ interface TNotificationMessage {
885
886
  exceptions?: {
886
887
  exception: TMessage | TMessage[];
887
888
  };
889
+ actions?: TApiaActions;
888
890
  }
889
891
 
890
892
  type TAttribute = {
@@ -996,6 +998,18 @@ interface IStatesSource {
996
998
  isLight: boolean;
997
999
  }
998
1000
 
1001
+ type NotificationIcon = string;
1002
+ type NotificationType = 'info' | 'error' | 'success' | 'warning' | 'modal';
1003
+ type NotificationDefinition = {
1004
+ icon?: NotificationIcon;
1005
+ id?: string | number;
1006
+ isOpen?: boolean;
1007
+ message: string;
1008
+ stackTrace?: string;
1009
+ title?: string;
1010
+ type?: NotificationType;
1011
+ };
1012
+
999
1013
  type TId = string | number;
1000
1014
  type TModify<T, R> = Omit<T, keyof R> & R;
1001
1015
  type TMap$1<T> = Record<string | number, T>;
@@ -1052,20 +1066,21 @@ interface IFocusCheck {
1052
1066
  currentInstruction: number;
1053
1067
  }
1054
1068
  declare const focus: {
1055
- "__#4@#root": HTMLElement;
1056
- "__#4@#props": IFocusProps | undefined;
1069
+ "__#private@#root": HTMLElement;
1070
+ "__#private@#props": IFocusProps | undefined;
1057
1071
  afterNotificationFocus: IFocusQueryElement | undefined;
1058
- "__#4@#actualFocusQuery": IFocusQueryElement[];
1059
- "__#4@#currentInstruction": number;
1060
- "__#4@#focusDelay": number;
1061
- "__#4@#focusRetries": number;
1062
- "__#4@#focusTimeout": number;
1063
- "__#4@#isIntervalRunning": boolean;
1064
- "__#4@#focusQuery": IFocusQueryElement[];
1065
- "__#4@#checkInstruction"(focusCheck: IFocusCheck): boolean;
1066
- "__#4@#doFocus"(HTMLElement: HTMLElement | TFocusRetriever, focusCheck: IFocusCheck, isLastTry: boolean, configuration?: IOnFocusConfiguration): Promise<false | HTMLElement | null>;
1067
- "__#4@#resetInterval"(): void;
1068
- "__#4@#runFocusInterval"(focusElement?: IFocusQueryElement, internalCall?: boolean): Promise<false | HTMLElement>;
1072
+ "__#private@#actualFocusQuery": IFocusQueryElement[];
1073
+ "__#private@#currentInstruction": number;
1074
+ "__#private@#focusDelay": number;
1075
+ "__#private@#focusRetries": number;
1076
+ "__#private@#focusTimeout": number;
1077
+ "__#private@#isIntervalRunning": boolean;
1078
+ get "__#private@#focusQuery"(): IFocusQueryElement[];
1079
+ set "__#private@#focusQuery"(value: IFocusQueryElement[]);
1080
+ "__#private@#checkInstruction"(focusCheck: IFocusCheck): boolean;
1081
+ "__#private@#doFocus"(HTMLElement: HTMLElement | TFocusRetriever, focusCheck: IFocusCheck, isLastTry: boolean, configuration?: IOnFocusConfiguration): Promise<false | HTMLElement | null>;
1082
+ "__#private@#resetInterval"(): void;
1083
+ "__#private@#runFocusInterval"(focusElement?: IFocusQueryElement, internalCall?: boolean): Promise<false | HTMLElement>;
1069
1084
  /**
1070
1085
  * Da la instrucción de colocar el foco en el elemento provisto como
1071
1086
  * parámetro una vez que todas las notificaciones se hayan cerrado. En caso
@@ -1113,12 +1128,12 @@ declare const focus: {
1113
1128
  */
1114
1129
  declare const globalFocus: {
1115
1130
  focused: (HTMLElement | TFocusRetriever)[];
1116
- "__#2@#onFocusCallbacks": (() => unknown)[];
1131
+ "__#private@#onFocusCallbacks": (() => unknown)[];
1117
1132
  offFocus(cb: () => unknown): void;
1118
1133
  onFocus(cb: () => unknown): () => void;
1119
1134
  inDocument(el: HTMLElement | TFocusRetriever): boolean;
1120
- focus: HTMLElement | TFocusRetriever;
1121
- readonly list: (HTMLElement | TFocusRetriever)[];
1135
+ set focus(element: HTMLElement | TFocusRetriever);
1136
+ get list(): (HTMLElement | TFocusRetriever)[];
1122
1137
  /**
1123
1138
  * @param querySelector A query selector against which the element should match
1124
1139
  * @returns The last HTMLElement if no querySelector argument provided or else, the last which matches
@@ -1382,6 +1397,14 @@ declare function useImperativeComponentContext<Events extends TMap = TMap>(): {
1382
1397
  eventsStore: TEventsHandlers<Events>;
1383
1398
  };
1384
1399
 
1400
+ interface ILabelsContainer {
1401
+ labels: {
1402
+ [key: string]: {
1403
+ text: string;
1404
+ title: string;
1405
+ };
1406
+ };
1407
+ }
1385
1408
  /**
1386
1409
  * Dado un nombre de etiqueta, devuelve el texto que esa etiqueta contiene en
1387
1410
  * el idioma actual. En este momento, lo único que hace realmente esta función
@@ -1393,6 +1416,9 @@ declare function useImperativeComponentContext<Events extends TMap = TMap>(): {
1393
1416
  *
1394
1417
  * Permite el pasaje de tokens para el reemplazo automático de los mismos.
1395
1418
  *
1419
+ * @param outerWindow - En librerías que puedan trabajar tanto en Browser como en Node es requerido pasar el window como parámetro para evitar que la función vaya directamente al window.
1420
+ *
1421
+ *
1396
1422
  * @example
1397
1423
  *
1398
1424
  * // Suponemos la etiqueta msgUsu = { text: 'Usuario <TOK1>', title: 'Usuario <TOK1>' }
@@ -2075,5 +2101,5 @@ declare class TasksQueue {
2075
2101
  run<T>(task: Task<T>): Promise<T | undefined>;
2076
2102
  }
2077
2103
 
2078
- export { AudioRecorder, type AudioRecorderState, BasicStoredElement, BouncingEmitter, type Callback, ClassNameBuilder, type DebounceOptions, type DeepReadonly, type DownloadStringAsDocProps, EventEmitter, History, type IOnFocusConfiguration, type IParameter, type ISetBoundary, type IStatesSource, Locker, type Map, Mutex, PropsSelectorUndefinedObject, PropsStore, ScrollLocker, Semaphore, StatefulEmitter, type StatefulStoreUpdateProps, type StatefulStoreUpdater, type TActionBehavior, type TActionSource, type TApiaAction, type TApiaActions, type TApiaCellDefinition, type TApiaComplexCell, type TApiaFieldPropsObj, type TApiaFilter, type TApiaFilterOption, type TApiaFilterValue, type TApiaFormButton, type TApiaFormElement, type TApiaFormElementOption, type TApiaFunction, type TApiaFunctionPageInfo, type TApiaLoad, type TApiaLoadForm, type TApiaLoadText, type TApiaMessage, type TApiaMultiplePossibleValue, type TApiaPossibleValue, type TApiaRadioPossibleValue, type TApiaRowDefinition, type TApiaSelectPossibleValue, type TApiaSystemMessageObj, type TApiaTableFunction, type TAttribute, type TBasicAction, type TBehavior, type TCallback, type TCell, type TColumn, type TDateFormat, type TDispatchCallback, type TDownloadUrlOptions, type TFieldEvent, type TFieldScriptEvent, type TFieldScriptEvents, type TFieldServerEvent, type TFieldServerEvents, type TFilter, type TFncParams, type TFocusRetriever, type THistoryCount, type THistoryStep, type THistoryStepChange, type TId, type TKey, type TLoadStructure, type TMap$1 as TMap, type TMessage, type TModify, type TNotificationMessage, type TOption, type TPropsComparator, type TPropsConfiguration, type TPropsSelector, type TRefresh, type TRequireOnlyOne, type TRow, type TShortcutBranch, type TState, type TStateIcon, type TUpdateFieldConfiguration, type TWithAlignment, type TWithAttributes, type TWithOptions, type TWithStylesModifiers, type Task, TasksQueue, type ThrottleOptions, type UnSubscriber, Url, addBoundary, alignment, animate, apiaDateToStandarFormat, arrayOrArray, autoDisconnectMutationObserver, awaitTime, cantFocusSelector, cloneDeep, customEvents, dateToApiaFormat, debugDispatcher, decodeBase64ToUtf8, decodeHTMLEntities, decrypt, deepEqual, defaultGetNameFromResponse, disableChildrenFocus, downloadStringAsDoc, downloadUrl, enableChildrenFocus, encodeStrToBase64Utf8, encrypt, findOffsetRelativeToScrollParent, findScrollContainer, focus, focusSelector, formatMessage, freezeDeep, getDateFormat, getFocusSelector, getIndex, getJSObjFromXML, getLabel, getSpecificParent, getValueByPath, globalFocus, globals, isChild, isDebugDispatcherEnabled, isFocusable, isPropsConfigurationObject, isSetter, isTrue, makeImperativeComponent, makeSingleImperativeComponent, makeStatefulStore, noNaN, notificationsSelector, openAndReadFile, openAndReadFiles, parseAsSize, parseXMLRequestResponse, parseXmlAsync, persistentStorage, postNavigation, propsStore, screenLocker, scrollParentIntoElement, setValueByPath, shallowCompareArrays, shallowEqual, shortcutController, toBoolean, ucfirst, uniqueId, useCombinedRefs, useDebouncedCallback, useDebouncedState, useDomState, useImperativeComponentContext, useImperativeComponentEvents, useIntermediateValue, useLatest, useLocalStorage, useMatchScrollDirection, useMount, useMountTransition, usePanAndZoom, usePrevious, usePropsSelector, useShallowMemo, useStateRef, useSubscription, useUnmount, useUpdateEffect, useWhyUpdated };
2104
+ export { AudioRecorder, type AudioRecorderState, BasicStoredElement, BouncingEmitter, type Callback, ClassNameBuilder, type DebounceOptions, type DeepReadonly, type DownloadStringAsDocProps, EventEmitter, History, type ILabelsContainer, type IOnFocusConfiguration, type IParameter, type ISetBoundary, type IStatesSource, Locker, type Map, Mutex, type NotificationDefinition, type NotificationIcon, type NotificationType, PropsSelectorUndefinedObject, PropsStore, ScrollLocker, Semaphore, StatefulEmitter, type StatefulStoreUpdateProps, type StatefulStoreUpdater, type TActionBehavior, type TActionSource, type TApiaAction, type TApiaActions, type TApiaCellDefinition, type TApiaComplexCell, type TApiaFieldPropsObj, type TApiaFilter, type TApiaFilterOption, type TApiaFilterValue, type TApiaFormButton, type TApiaFormElement, type TApiaFormElementOption, type TApiaFunction, type TApiaFunctionPageInfo, type TApiaLoad, type TApiaLoadForm, type TApiaLoadText, type TApiaMessage, type TApiaMultiplePossibleValue, type TApiaPossibleValue, type TApiaRadioPossibleValue, type TApiaRowDefinition, type TApiaSelectPossibleValue, type TApiaSystemMessageObj, type TApiaTableFunction, type TAttribute, type TBasicAction, type TBehavior, type TCallback, type TCell, type TColumn, type TDateFormat, type TDispatchCallback, type TDownloadUrlOptions, type TFieldEvent, type TFieldScriptEvent, type TFieldScriptEvents, type TFieldServerEvent, type TFieldServerEvents, type TFilter, type TFncParams, type TFocusRetriever, type THistoryCount, type THistoryStep, type THistoryStepChange, type TId, type TKey, type TLoadStructure, type TMap$1 as TMap, type TMessage, type TModify, type TNotificationMessage, type TOption, type TPropsComparator, type TPropsConfiguration, type TPropsSelector, type TRefresh, type TRequireOnlyOne, type TRow, type TShortcutBranch, type TState, type TStateIcon, type TUpdateFieldConfiguration, type TWithAlignment, type TWithAttributes, type TWithOptions, type TWithStylesModifiers, type Task, TasksQueue, type ThrottleOptions, type UnSubscriber, Url, addBoundary, alignment, animate, apiaDateToStandarFormat, arrayOrArray, autoDisconnectMutationObserver, awaitTime, cantFocusSelector, cloneDeep, customEvents, dateToApiaFormat, debugDispatcher, decodeBase64ToUtf8, decodeHTMLEntities, decrypt, deepEqual, defaultGetNameFromResponse, disableChildrenFocus, downloadStringAsDoc, downloadUrl, enableChildrenFocus, encodeStrToBase64Utf8, encrypt, findOffsetRelativeToScrollParent, findScrollContainer, focus, focusSelector, formatMessage, freezeDeep, getDateFormat, getFocusSelector, getIndex, getJSObjFromXML, getLabel, getSpecificParent, getValueByPath, globalFocus, globals, isChild, isDebugDispatcherEnabled, isFocusable, isPropsConfigurationObject, isSetter, isTrue, makeImperativeComponent, makeSingleImperativeComponent, makeStatefulStore, noNaN, notificationsSelector, openAndReadFile, openAndReadFiles, parseAsSize, parseXMLRequestResponse, parseXmlAsync, persistentStorage, postNavigation, propsStore, screenLocker, scrollParentIntoElement, setValueByPath, shallowCompareArrays, shallowEqual, shortcutController, toBoolean, ucfirst, uniqueId, useCombinedRefs, useDebouncedCallback, useDebouncedState, useDomState, useImperativeComponentContext, useImperativeComponentEvents, useIntermediateValue, useLatest, useLocalStorage, useMatchScrollDirection, useMount, useMountTransition, usePanAndZoom, usePrevious, usePropsSelector, useShallowMemo, useStateRef, useSubscription, useUnmount, useUpdateEffect, useWhyUpdated };
2079
2105
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -2505,8 +2505,8 @@ function getLabel(name, replaceTokens, outerWindow) {
2505
2505
  const actualWindow = outerWindow ?? window;
2506
2506
  const label = {
2507
2507
  ...actualWindow.labels[name] ?? {
2508
- text: `Not preloaded: ${name}`,
2509
- title: `Not preloaded: ${name}`
2508
+ text: `${name}`,
2509
+ title: `${name}`
2510
2510
  }
2511
2511
  };
2512
2512
  if (replaceTokens?.text !== void 0)