@apia/util 1.0.1 → 2.0.0
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/animate/index.d.ts +4 -0
- package/dist/animate/index.d.ts.map +1 -0
- package/dist/animate/index.js +24 -0
- package/dist/animate/index.js.map +1 -0
- package/dist/array/arrayOrArray.d.ts +4 -0
- package/dist/array/arrayOrArray.d.ts.map +1 -0
- package/dist/array/arrayOrArray.js +8 -0
- package/dist/array/arrayOrArray.js.map +1 -0
- package/dist/array/getIndex.d.ts +14 -0
- package/dist/array/getIndex.d.ts.map +1 -0
- package/dist/array/getIndex.js +12 -0
- package/dist/array/getIndex.js.map +1 -0
- package/dist/crypto/decrypt.d.ts +4 -0
- package/dist/crypto/decrypt.d.ts.map +1 -0
- package/dist/crypto/decrypt.js +16 -0
- package/dist/crypto/decrypt.js.map +1 -0
- package/dist/crypto/encrypt.d.ts +4 -0
- package/dist/crypto/encrypt.d.ts.map +1 -0
- package/dist/crypto/encrypt.js +13 -0
- package/dist/crypto/encrypt.js.map +1 -0
- package/dist/crypto/generateKey.js +11 -0
- package/dist/crypto/generateKey.js.map +1 -0
- package/dist/date/apiaDateToStandarFormat.d.ts +4 -0
- package/dist/date/apiaDateToStandarFormat.d.ts.map +1 -0
- package/dist/date/apiaDateToStandarFormat.js +12 -0
- package/dist/date/apiaDateToStandarFormat.js.map +1 -0
- package/dist/date/dateToApiaFormat.d.ts +4 -0
- package/dist/date/dateToApiaFormat.d.ts.map +1 -0
- package/dist/date/dateToApiaFormat.js +9 -0
- package/dist/date/dateToApiaFormat.js.map +1 -0
- package/dist/date/getDateFormat.d.ts +11 -0
- package/dist/date/getDateFormat.d.ts.map +1 -0
- package/dist/date/getDateFormat.js +20 -0
- package/dist/date/getDateFormat.js.map +1 -0
- package/dist/debug/debugDispatcher.d.ts +32 -0
- package/dist/debug/debugDispatcher.d.ts.map +1 -0
- package/dist/debug/debugDispatcher.js +72 -0
- package/dist/debug/debugDispatcher.js.map +1 -0
- package/dist/debug/shortcutController.d.ts +57 -0
- package/dist/debug/shortcutController.d.ts.map +1 -0
- package/dist/debug/shortcutController.js +152 -0
- package/dist/debug/shortcutController.js.map +1 -0
- package/dist/documents/downloadStringAsDoc.d.ts +8 -0
- package/dist/documents/downloadStringAsDoc.d.ts.map +1 -0
- package/dist/documents/downloadStringAsDoc.js +12 -0
- package/dist/documents/downloadStringAsDoc.js.map +1 -0
- package/dist/documents/downloadUrl.d.ts +20 -0
- package/dist/documents/downloadUrl.d.ts.map +1 -0
- package/dist/documents/downloadUrl.js +18 -0
- package/dist/documents/downloadUrl.js.map +1 -0
- package/dist/documents/openAndReadFile.d.ts +4 -0
- package/dist/documents/openAndReadFile.d.ts.map +1 -0
- package/dist/documents/openAndReadFile.js +29 -0
- package/dist/documents/openAndReadFile.js.map +1 -0
- package/dist/dom/autoDisconnectMutationObserver.d.ts +17 -0
- package/dist/dom/autoDisconnectMutationObserver.d.ts.map +1 -0
- package/dist/dom/autoDisconnectMutationObserver.js +35 -0
- package/dist/dom/autoDisconnectMutationObserver.js.map +1 -0
- package/dist/dom/customEvents.d.ts +40 -0
- package/dist/dom/customEvents.d.ts.map +1 -0
- package/dist/dom/customEvents.js +34 -0
- package/dist/dom/customEvents.js.map +1 -0
- package/dist/dom/enableChildrenFocus.d.ts +18 -0
- package/dist/dom/enableChildrenFocus.d.ts.map +1 -0
- package/dist/dom/enableChildrenFocus.js +26 -0
- package/dist/dom/enableChildrenFocus.js.map +1 -0
- package/dist/dom/findOffsetRelativeToScrollParent.d.ts +7 -0
- package/dist/dom/findOffsetRelativeToScrollParent.d.ts.map +1 -0
- package/dist/dom/findOffsetRelativeToScrollParent.js +19 -0
- package/dist/dom/findOffsetRelativeToScrollParent.js.map +1 -0
- package/dist/dom/findScrollContainer.d.ts +8 -0
- package/dist/dom/findScrollContainer.d.ts.map +1 -0
- package/dist/dom/findScrollContainer.js +9 -0
- package/dist/dom/findScrollContainer.js.map +1 -0
- package/dist/dom/getFocusSelector.d.ts +25 -0
- package/dist/dom/getFocusSelector.d.ts.map +1 -0
- package/dist/dom/getFocusSelector.js +30 -0
- package/dist/dom/getFocusSelector.js.map +1 -0
- package/dist/dom/getSpecificParent.d.ts +23 -0
- package/dist/dom/getSpecificParent.d.ts.map +1 -0
- package/dist/dom/getSpecificParent.js +19 -0
- package/dist/dom/getSpecificParent.js.map +1 -0
- package/dist/dom/isChild.d.ts +13 -0
- package/dist/dom/isChild.d.ts.map +1 -0
- package/dist/dom/isChild.js +8 -0
- package/dist/dom/isChild.js.map +1 -0
- package/dist/dom/scrollParentIntoElement.d.ts +9 -0
- package/dist/dom/scrollParentIntoElement.d.ts.map +1 -0
- package/dist/dom/scrollParentIntoElement.js +24 -0
- package/dist/dom/scrollParentIntoElement.js.map +1 -0
- package/dist/dom/url.d.ts +18 -0
- package/dist/dom/url.d.ts.map +1 -0
- package/dist/dom/url.js +52 -0
- package/dist/dom/url.js.map +1 -0
- package/dist/dom/usePanAndZoom.d.ts +14 -0
- package/dist/dom/usePanAndZoom.d.ts.map +1 -0
- package/dist/dom/usePanAndZoom.js +111 -0
- package/dist/dom/usePanAndZoom.js.map +1 -0
- package/dist/encoding/index.d.ts +8 -0
- package/dist/encoding/index.d.ts.map +1 -0
- package/dist/encoding/index.js +12 -0
- package/dist/encoding/index.js.map +1 -0
- package/dist/events/BouncingEmitter.d.ts +67 -0
- package/dist/events/BouncingEmitter.d.ts.map +1 -0
- package/dist/events/BouncingEmitter.js +72 -0
- package/dist/events/BouncingEmitter.js.map +1 -0
- package/dist/events/EventEmitter.d.ts +47 -0
- package/dist/events/EventEmitter.d.ts.map +1 -0
- package/dist/events/EventEmitter.js +75 -0
- package/dist/events/EventEmitter.js.map +1 -0
- package/dist/events/StatefulEmitter.d.ts +44 -0
- package/dist/events/StatefulEmitter.d.ts.map +1 -0
- package/dist/events/StatefulEmitter.js +57 -0
- package/dist/events/StatefulEmitter.js.map +1 -0
- package/dist/events/types.d.ts +29 -0
- package/dist/events/types.d.ts.map +1 -0
- package/dist/focus/focusController.d.ts +108 -0
- package/dist/focus/focusController.d.ts.map +1 -0
- package/dist/focus/focusController.js +295 -0
- package/dist/focus/focusController.js.map +1 -0
- package/dist/focus/globalFocus.d.ts +24 -0
- package/dist/focus/globalFocus.d.ts.map +1 -0
- package/dist/focus/globalFocus.js +87 -0
- package/dist/focus/globalFocus.js.map +1 -0
- package/dist/history/History.d.ts +81 -0
- package/dist/history/History.d.ts.map +1 -0
- package/dist/history/History.js +122 -0
- package/dist/history/History.js.map +1 -0
- package/dist/hooks/useCombinedRefs.d.ts +18 -0
- package/dist/hooks/useCombinedRefs.d.ts.map +1 -0
- package/dist/hooks/useCombinedRefs.js +20 -0
- package/dist/hooks/useCombinedRefs.js.map +1 -0
- package/dist/hooks/useDebouncedCallback.d.ts +7 -0
- package/dist/hooks/useDebouncedCallback.d.ts.map +1 -0
- package/dist/hooks/useDebouncedCallback.js +21 -0
- package/dist/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/hooks/useLatest.d.ts +13 -0
- package/dist/hooks/useLatest.d.ts.map +1 -0
- package/dist/hooks/useLatest.js +10 -0
- package/dist/hooks/useLatest.js.map +1 -0
- package/dist/hooks/useMount.d.ts +6 -0
- package/dist/hooks/useMount.d.ts.map +1 -0
- package/dist/hooks/useMount.js +14 -0
- package/dist/hooks/useMount.js.map +1 -0
- package/dist/hooks/usePrevious.d.ts +6 -0
- package/dist/hooks/usePrevious.d.ts.map +1 -0
- package/dist/hooks/usePrevious.js +12 -0
- package/dist/hooks/usePrevious.js.map +1 -0
- package/dist/hooks/useShallowMemo.d.ts +9 -0
- package/dist/hooks/useShallowMemo.d.ts.map +1 -0
- package/dist/hooks/useShallowMemo.js +42 -0
- package/dist/hooks/useShallowMemo.js.map +1 -0
- package/dist/hooks/useStateRef.d.ts +10 -0
- package/dist/hooks/useStateRef.d.ts.map +1 -0
- package/dist/hooks/useStateRef.js +11 -0
- package/dist/hooks/useStateRef.js.map +1 -0
- package/dist/hooks/useSubscription.d.ts +31 -0
- package/dist/hooks/useSubscription.d.ts.map +1 -0
- package/dist/hooks/useSubscription.js +21 -0
- package/dist/hooks/useSubscription.js.map +1 -0
- package/dist/hooks/useUnmount.d.ts +4 -0
- package/dist/hooks/useUnmount.d.ts.map +1 -0
- package/dist/hooks/useUnmount.js +10 -0
- package/dist/hooks/useUnmount.js.map +1 -0
- package/dist/hooks/useUpdateEffect.d.ts +10 -0
- package/dist/hooks/useUpdateEffect.d.ts.map +1 -0
- package/dist/hooks/useUpdateEffect.js +16 -0
- package/dist/hooks/useUpdateEffect.js.map +1 -0
- package/dist/imperative/makeImperativeComponent.d.ts +56 -0
- package/dist/imperative/makeImperativeComponent.d.ts.map +1 -0
- package/dist/imperative/makeImperativeComponent.js +48 -0
- package/dist/imperative/makeImperativeComponent.js.map +1 -0
- package/dist/imperative/makeSingleImperativeComponent.d.ts +15 -0
- package/dist/imperative/makeSingleImperativeComponent.d.ts.map +1 -0
- package/dist/imperative/makeSingleImperativeComponent.js +31 -0
- package/dist/imperative/makeSingleImperativeComponent.js.map +1 -0
- package/dist/imperative/types.d.ts +22 -0
- package/dist/imperative/types.d.ts.map +1 -0
- package/dist/imperative/types.js +8 -0
- package/dist/imperative/types.js.map +1 -0
- package/dist/imperative/useImperativeComponentEvents.d.ts +6 -0
- package/dist/imperative/useImperativeComponentEvents.d.ts.map +1 -0
- package/dist/imperative/useImperativeComponentEvents.js +35 -0
- package/dist/imperative/useImperativeComponentEvents.js.map +1 -0
- package/dist/imperative/useImperativeIdentifierContext.d.ts +14 -0
- package/dist/imperative/useImperativeIdentifierContext.d.ts.map +1 -0
- package/dist/imperative/useImperativeIdentifierContext.js +10 -0
- package/dist/imperative/useImperativeIdentifierContext.js.map +1 -0
- package/dist/index.d.ts +69 -1777
- package/dist/index.js +63 -2659
- package/dist/index.js.map +1 -1
- package/dist/labels/formatMessage.d.ts +19 -0
- package/dist/labels/formatMessage.d.ts.map +1 -0
- package/dist/labels/formatMessage.js +13 -0
- package/dist/labels/formatMessage.js.map +1 -0
- package/dist/labels/getLabel.d.ts +34 -0
- package/dist/labels/getLabel.d.ts.map +1 -0
- package/dist/labels/getLabel.js +18 -0
- package/dist/labels/getLabel.js.map +1 -0
- package/dist/number/index.d.ts +29 -0
- package/dist/number/index.d.ts.map +1 -0
- package/dist/number/index.js +43 -0
- package/dist/number/index.js.map +1 -0
- package/dist/objects/getValueByPath.d.ts +23 -0
- package/dist/objects/getValueByPath.d.ts.map +1 -0
- package/dist/objects/getValueByPath.js +19 -0
- package/dist/objects/getValueByPath.js.map +1 -0
- package/dist/objects/setValueByPath.d.ts +33 -0
- package/dist/objects/setValueByPath.d.ts.map +1 -0
- package/dist/objects/setValueByPath.js +35 -0
- package/dist/objects/setValueByPath.js.map +1 -0
- package/dist/propsStore/propsStore.d.ts +42 -0
- package/dist/propsStore/propsStore.d.ts.map +1 -0
- package/dist/propsStore/propsStore.js +157 -0
- package/dist/propsStore/propsStore.js.map +1 -0
- package/dist/propsStore/types.d.ts +24 -0
- package/dist/propsStore/types.d.ts.map +1 -0
- package/dist/propsStore/usePropsSelector.d.ts +67 -0
- package/dist/propsStore/usePropsSelector.d.ts.map +1 -0
- package/dist/propsStore/usePropsSelector.js +92 -0
- package/dist/propsStore/usePropsSelector.js.map +1 -0
- package/dist/screenLock/screenLocker.d.ts +60 -0
- package/dist/screenLock/screenLocker.d.ts.map +1 -0
- package/dist/screenLock/screenLocker.js +95 -0
- package/dist/screenLock/screenLocker.js.map +1 -0
- package/dist/states/useDebouncedState.d.ts +10 -0
- package/dist/states/useDebouncedState.d.ts.map +1 -0
- package/dist/states/useDebouncedState.js +22 -0
- package/dist/states/useDebouncedState.js.map +1 -0
- package/dist/states/useDomState.d.ts +86 -0
- package/dist/states/useDomState.d.ts.map +1 -0
- package/dist/states/useDomState.js +35 -0
- package/dist/states/useDomState.js.map +1 -0
- package/dist/storage/StatefulStore.d.ts +205 -0
- package/dist/storage/StatefulStore.d.ts.map +1 -0
- package/dist/storage/StatefulStore.js +301 -0
- package/dist/storage/StatefulStore.js.map +1 -0
- package/dist/storage/persistentStorage.d.ts +12 -0
- package/dist/storage/persistentStorage.d.ts.map +1 -0
- package/dist/storage/persistentStorage.js +28 -0
- package/dist/storage/persistentStorage.js.map +1 -0
- package/dist/storage/useLocalStorage.d.ts +7 -0
- package/dist/storage/useLocalStorage.d.ts.map +1 -0
- package/dist/storage/useLocalStorage.js +40 -0
- package/dist/storage/useLocalStorage.js.map +1 -0
- package/dist/string/alignment.d.ts +25 -0
- package/dist/string/alignment.d.ts.map +1 -0
- package/dist/string/alignment.js +26 -0
- package/dist/string/alignment.js.map +1 -0
- package/dist/string/ucfirst.d.ts +4 -0
- package/dist/string/ucfirst.d.ts.map +1 -0
- package/dist/string/ucfirst.js +6 -0
- package/dist/string/ucfirst.js.map +1 -0
- package/dist/typeGuards/toBoolean.d.ts +26 -0
- package/dist/typeGuards/toBoolean.d.ts.map +1 -0
- package/dist/typeGuards/toBoolean.js +11 -0
- package/dist/typeGuards/toBoolean.js.map +1 -0
- package/dist/types/apia/common.d.ts +114 -0
- package/dist/types/apia/common.d.ts.map +1 -0
- package/dist/types/apia/date.d.ts +4 -0
- package/dist/types/apia/date.d.ts.map +1 -0
- package/dist/types/apia/forms.d.ts +221 -0
- package/dist/types/apia/forms.d.ts.map +1 -0
- package/dist/types/misc.d.ts +9 -0
- package/dist/types/misc.d.ts.map +1 -0
- package/dist/xml/parseXmlAsync.d.ts +4 -0
- package/dist/xml/parseXmlAsync.d.ts.map +1 -0
- package/dist/xml/parseXmlAsync.js +58 -0
- package/dist/xml/parseXmlAsync.js.map +1 -0
- package/package.json +24 -35
- package/LICENSE.md +0 -21
- package/README.md +0 -18
- package/cleanDist.json +0 -3
- package/entries.json +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,1777 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
type TCallback = (ev: KeyboardEvent) => unknown;
|
|
71
|
-
type TKey = {
|
|
72
|
-
key: string;
|
|
73
|
-
altKey?: boolean;
|
|
74
|
-
ctrlKey?: boolean;
|
|
75
|
-
shiftKey?: boolean;
|
|
76
|
-
};
|
|
77
|
-
type TShortcutBranch = {
|
|
78
|
-
key: TKey;
|
|
79
|
-
children: TShortcutBranch[];
|
|
80
|
-
callbacks: TCallback[];
|
|
81
|
-
fireEvenFromInputs?: boolean;
|
|
82
|
-
};
|
|
83
|
-
declare const shortcutController: {
|
|
84
|
-
history: TKey[];
|
|
85
|
-
candidates: TShortcutBranch[];
|
|
86
|
-
shortcuts: TShortcutBranch;
|
|
87
|
-
shortcutsStrings: string[];
|
|
88
|
-
categories: {
|
|
89
|
-
dev: string[];
|
|
90
|
-
};
|
|
91
|
-
parseKeyToString(key: string | TKey): string;
|
|
92
|
-
parseKey(keyString: string): TKey;
|
|
93
|
-
/**
|
|
94
|
-
* Para setear un shorcut se puede pasar un string representativo con la
|
|
95
|
-
* forma:
|
|
96
|
-
*
|
|
97
|
-
* **alt**?&**ctrl**?&**shift**?&**(\w)**
|
|
98
|
-
*
|
|
99
|
-
* Donde: alt? ctrl? shift? implica que cualquiera de esas palabras pueden o
|
|
100
|
-
* no aparecer y (\w) es una letra, símbolo o número.
|
|
101
|
-
*
|
|
102
|
-
* Puede aparecer cualquier tecla de control o no, pero el símbolo o letra
|
|
103
|
-
* debe aparecer.
|
|
104
|
-
*
|
|
105
|
-
* @param category
|
|
106
|
-
* Agrega un prefijo de teclas que se deben presionar antes del shortcut para
|
|
107
|
-
* que funcione, de forma que por ejemplo, todos los shortcuts de la categoría
|
|
108
|
-
* dev serán ejecutados solamente si antes se presionó shift&D
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
*
|
|
112
|
-
shortcutController.on(['shift&A', 'b', 'ctrl&c', 'alt&d'], (ev) => {
|
|
113
|
-
ev.preventDefault();
|
|
114
|
-
console.log('Abctrl+cd'),
|
|
115
|
-
}); // Este shortcut se ejecuta en desarrollo y producción
|
|
116
|
-
|
|
117
|
-
shortcutController.on('unshortcut'.split(''), (ev) => {
|
|
118
|
-
ev.preventDefault();
|
|
119
|
-
console.log('Abctrl+cd'),
|
|
120
|
-
}, 'dev'); // Este shortcut solo se ejecuta en desarrollo
|
|
121
|
-
*/
|
|
122
|
-
on(keys: (string | TKey)[], callback: TCallback, category?: keyof typeof this$1.categories, fireEvenFromInputs?: boolean): void;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
interface IAutoDisconnectMutationObserverConf {
|
|
126
|
-
/** Por defecto es true */
|
|
127
|
-
runCallbackOnInit?: boolean;
|
|
128
|
-
/** Por defecto es 100 (ms) */
|
|
129
|
-
timeout?: number;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Crea un observer que va a desconectarse automáticamente luego de que pase
|
|
133
|
-
* una determinada cantidad de tiempo sin actividad en el elemento.
|
|
134
|
-
*
|
|
135
|
-
* Se usa especialmente para esperar que un componente termine de renderizar y
|
|
136
|
-
* aplicar cálculos a nivel de layout sobre él.
|
|
137
|
-
*/
|
|
138
|
-
declare function autoDisconnectMutationObserver(element: HTMLElement, callback: () => unknown, conf?: IAutoDisconnectMutationObserverConf): () => void;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* This function gets an URL and a file name and performs a file download.
|
|
142
|
-
*
|
|
143
|
-
* @param url The url to fetch
|
|
144
|
-
* @param getNameFromResponse The name will be given by the 'content-disposition' prop in the headers
|
|
145
|
-
*/
|
|
146
|
-
declare function downloadUrl(url: string, getNameFromResponse?: (blob: AxiosResponse) => string): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* This function gets an URL and a file name and performs a file download.
|
|
149
|
-
*
|
|
150
|
-
* @param url The url to fetch
|
|
151
|
-
* @param fileName The name the file will have as default in the save dialog
|
|
152
|
-
*/
|
|
153
|
-
declare function downloadUrl(url: string, fileName: string): Promise<void>;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Esta función calcula el offset que existe entre un elemento y su padre más inmediato que tenga scroll visible
|
|
157
|
-
*/
|
|
158
|
-
declare function findOffsetRelativeToScrollParent(element: HTMLElement, which?: 'Left' | 'Top'): number;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Encuentra el primer elemento padre del elemento provisto que tenga scroll
|
|
162
|
-
* activo.
|
|
163
|
-
*/
|
|
164
|
-
declare function findScrollContainer(el: HTMLElement): HTMLElement | null;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Busca el padre con scroll visible y establece su scrollTop de acuerdo al offset del elemento pasado como argumento, de modo que éste aparezca visible dentro del padre mencionado.
|
|
168
|
-
*
|
|
169
|
-
* @param fixedOffsetTop Establece un mínimo de distancia que debe mantener con el borde superior del contenedor con scroll. Se usa para compensar en las situaciones donde existen cabezales fijos.
|
|
170
|
-
*/
|
|
171
|
-
declare function scrollParentIntoElement(element: HTMLElement, fixedOffsetTop?: number, tries?: number, timeout?: number, scrollId?: string | undefined): void;
|
|
172
|
-
|
|
173
|
-
declare function usePanAndZoom<ContainerType extends HTMLElement = HTMLElement, ChildType extends HTMLElement | SVGElement = HTMLElement>(effectiveMargin?: {
|
|
174
|
-
left: number;
|
|
175
|
-
top: number;
|
|
176
|
-
right: number;
|
|
177
|
-
bottom: number;
|
|
178
|
-
}, blockZoom?: boolean): {
|
|
179
|
-
boxRef: React__default.RefObject<ContainerType>;
|
|
180
|
-
elementRef: React__default.RefObject<ChildType>;
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Existen algunos eventos que se disparan en la
|
|
185
|
-
* aplicación con la finalidad de desencadenar
|
|
186
|
-
* un comportamiento específico. Por ello se declaran
|
|
187
|
-
* las siguientes constantes.
|
|
188
|
-
*/
|
|
189
|
-
declare const customEvents: {
|
|
190
|
-
/**
|
|
191
|
-
* Indica que un elemento necesita recibir el foco,
|
|
192
|
-
* de esta forma, elementos que no se están mostrando
|
|
193
|
-
* en pantalla (por display:none por ejemplo), pueden
|
|
194
|
-
* indicar a sus ancestros que deben expandirse.
|
|
195
|
-
*/
|
|
196
|
-
focus: string;
|
|
197
|
-
/**
|
|
198
|
-
* Indica que debe cambiarse el título del modal
|
|
199
|
-
*/
|
|
200
|
-
iframeModalChangeTitle: string;
|
|
201
|
-
/**
|
|
202
|
-
* Indica que un iframe modal debe cerrarse
|
|
203
|
-
*/
|
|
204
|
-
iframeModalClose: string;
|
|
205
|
-
/**
|
|
206
|
-
* Indica que un iframe modal debe cerrarse
|
|
207
|
-
*/
|
|
208
|
-
iframeModalNotify: string;
|
|
209
|
-
/**
|
|
210
|
-
* Indica que un modal debe cerrarse
|
|
211
|
-
*/
|
|
212
|
-
modalClose: string;
|
|
213
|
-
/**
|
|
214
|
-
* Indica que el panel contenedor debe cerrarse porque
|
|
215
|
-
* está vacío
|
|
216
|
-
*/
|
|
217
|
-
hidePanel: string;
|
|
218
|
-
showPanel: string;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Este selector pretende abarcar todos modificadores que en caso de estar
|
|
223
|
-
* presentes hacen que un elemento no sea focusable
|
|
224
|
-
*/
|
|
225
|
-
declare const cantFocusSelector: string;
|
|
226
|
-
/**
|
|
227
|
-
* Este selector pretende abarcar todos los elementos que sean focusables
|
|
228
|
-
*/
|
|
229
|
-
declare const focusSelector: string;
|
|
230
|
-
/**
|
|
231
|
-
* Genera un selector que permitirá seleccionar
|
|
232
|
-
* todos los elementos candidatos a recibir foco,
|
|
233
|
-
* que no cumplan con la condición not pasada
|
|
234
|
-
* como parámetro.
|
|
235
|
-
*
|
|
236
|
-
* @param not Un selector not css, indicando cuáles
|
|
237
|
-
* condiciones deben evitar el foco en un elemento.
|
|
238
|
-
*
|
|
239
|
-
* @returns Una cadena que representa un selector
|
|
240
|
-
* css.
|
|
241
|
-
*/
|
|
242
|
-
declare function getFocusSelector(not?: string): string;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Searches for a specific parent of a element,
|
|
246
|
-
* using a callback function as the source of
|
|
247
|
-
* truth in order to determine which is the correct
|
|
248
|
-
* parent.
|
|
249
|
-
*
|
|
250
|
-
* @param element The element where the process
|
|
251
|
-
* starts.
|
|
252
|
-
*
|
|
253
|
-
* @param checkParent A callback that will be
|
|
254
|
-
* called for each of the ancestors of the element
|
|
255
|
-
* until the desired parent is found.
|
|
256
|
-
* This function should return **true when found**
|
|
257
|
-
* the desired parend was found, **null to cancel**
|
|
258
|
-
* the search or **false to continue searching**.
|
|
259
|
-
*
|
|
260
|
-
* @returns The specific parent or null in case
|
|
261
|
-
* the root parent element is raised.
|
|
262
|
-
*/
|
|
263
|
-
declare function getSpecificParent(element: HTMLElement | null, checkParent: (parent: HTMLElement) => boolean | null): HTMLElement | null;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Permite iterar desde un elemento hacia arriba en el
|
|
267
|
-
* DOM, utilizando una función de comparación para
|
|
268
|
-
* determinar si el elemento actual es el que estamos
|
|
269
|
-
* buscando.
|
|
270
|
-
*
|
|
271
|
-
* Si la función checkParent devuelve true, isChild
|
|
272
|
-
* devuelve true.
|
|
273
|
-
*/
|
|
274
|
-
declare function isChild(element: HTMLElement | null, checkParent: (parent: HTMLElement) => boolean | null): boolean;
|
|
275
|
-
|
|
276
|
-
interface IParameter {
|
|
277
|
-
name: string;
|
|
278
|
-
value: unknown;
|
|
279
|
-
allowMultiple?: boolean;
|
|
280
|
-
}
|
|
281
|
-
declare class Url {
|
|
282
|
-
#private;
|
|
283
|
-
defaultAllowMultiple: boolean;
|
|
284
|
-
base: string;
|
|
285
|
-
constructor(baseUrl: string, defaultAllowMultiple?: boolean);
|
|
286
|
-
addParameter(name: string, value: unknown, allowMultiple?: boolean): void;
|
|
287
|
-
addParameters(parameters: IParameter[]): void;
|
|
288
|
-
getParameter(name: string): string | string[];
|
|
289
|
-
toString(): string;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Deshabilita la posibilidad de hacer foco en
|
|
294
|
-
* todos los descendientes de parent. Es
|
|
295
|
-
* especialmente útli cuando se ocultan elementos
|
|
296
|
-
* del DOM sin quitarlos, cuando por accesibilidad
|
|
297
|
-
* es importante que el foco no alcance a dichos
|
|
298
|
-
* métodos.
|
|
299
|
-
*/
|
|
300
|
-
declare function disableChildrenFocus(parent: HTMLElement): void;
|
|
301
|
-
/**
|
|
302
|
-
* Restaura el foco de los hijos de parent a los
|
|
303
|
-
* que previamente se les había quitado el foco
|
|
304
|
-
* con disableChildrenFocus.
|
|
305
|
-
*/
|
|
306
|
-
declare function enableChildrenFocus(parent: HTMLElement): void;
|
|
307
|
-
|
|
308
|
-
type TEventMap$1 = Record<string, any>;
|
|
309
|
-
type TEventKey$1<T extends TEventMap$1> = string & keyof T;
|
|
310
|
-
type TEventReceiver$1<T> = (params: T) => unknown;
|
|
311
|
-
type TFun = () => unknown;
|
|
312
|
-
interface IEmitter<T extends TEventMap$1> {
|
|
313
|
-
on<K extends TEventKey$1<T>>(eventName: K, fn: TEventReceiver$1<T[K]>): TFun;
|
|
314
|
-
off<K extends TEventKey$1<T>>(eventName: K, fn: TEventReceiver$1<T[K]>): unknown;
|
|
315
|
-
emit<K extends TEventKey$1<T>>(eventName: K, params?: T[K]): unknown;
|
|
316
|
-
}
|
|
317
|
-
declare function eventEmitterBaseFunction<T extends TEventMap$1>(): IEmitter<T>;
|
|
318
|
-
/**
|
|
319
|
-
* EventEmitter muy sencillo.
|
|
320
|
-
*
|
|
321
|
-
* El siguiente ejemplo es un fragmento de una clase
|
|
322
|
-
* perteneciente al grupo de wai-aria helpers. Ver que el método #shout nada
|
|
323
|
-
* tiene que ver con la clase EventEmitter, sino que es un método interno de la
|
|
324
|
-
* clase WaiTypeAhead.
|
|
325
|
-
*
|
|
326
|
-
* Lo que realmente importa en el ejemplo es el tipado (Lo que va luego de
|
|
327
|
-
* extends EventEmitter) y el this.emit en la creación del emitter; por otra
|
|
328
|
-
* parte es importante el (instance).on(...) que se muestra al final del
|
|
329
|
-
* ejemplo, que permite realizar suscripciones al EventEmitter creado.
|
|
330
|
-
*
|
|
331
|
-
* Además, es notable que cuando se realiza una suscripción mediante
|
|
332
|
-
* (instance).on, este método devuelve un método que al ser llamado rompe la
|
|
333
|
-
* suscripción; esto nos da la firma del método on como:
|
|
334
|
-
*
|
|
335
|
-
* on(eventName: string, callback: (ev: eventType) => unknown): Unsuscriptor;
|
|
336
|
-
*
|
|
337
|
-
* @example
|
|
338
|
-
*
|
|
339
|
-
* // Event emitter creation
|
|
340
|
-
*
|
|
341
|
-
* class WaiTypeAhead extends EventEmitter<{
|
|
342
|
-
multipleKeys: string;
|
|
343
|
-
singleKey: string;
|
|
344
|
-
}> {
|
|
345
|
-
// ...
|
|
346
|
-
#shout({ clear } = { clear: true }) {
|
|
347
|
-
if (this.typing.length === 1) {
|
|
348
|
-
this.emit('singleKey', this.typing);
|
|
349
|
-
} else if (this.typing.length > 1) {
|
|
350
|
-
this.emit('multipleKeys', this.typing);
|
|
351
|
-
}
|
|
352
|
-
// ...
|
|
353
|
-
}
|
|
354
|
-
// ...
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// Usage
|
|
358
|
-
|
|
359
|
-
const wtype = new WaiTypeAhead();
|
|
360
|
-
wtype.on('multipleKeys', (typing) => {
|
|
361
|
-
write(`Multiple: ${typing}`);
|
|
362
|
-
});
|
|
363
|
-
*/
|
|
364
|
-
declare class EventEmitter<T extends TEventMap$1> implements IEmitter<T> {
|
|
365
|
-
#private;
|
|
366
|
-
on<K extends TEventKey$1<T>>(eventName: K, fn: TEventReceiver$1<T[K]>): () => void;
|
|
367
|
-
off<K extends TEventKey$1<T>>(eventName: K, fn: TEventReceiver$1<T[K]>): void;
|
|
368
|
-
emit<K extends TEventKey$1<T>>(eventName: K, params?: T[K]): void;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
type TEventMap = Record<string, any>;
|
|
372
|
-
type TEventKey<T extends TEventMap> = string & keyof T;
|
|
373
|
-
type TEventReceiver<T> = (params: T) => unknown;
|
|
374
|
-
/**
|
|
375
|
-
* La clase HashedEventEmitter permite la utilización de emisión de eventos con
|
|
376
|
-
* mayor eficiencia dado que en base a la función de hasheo provista, divide los
|
|
377
|
-
* listeners en diferentes arrays, reduciendo la cantidad de escuchas generadas.
|
|
378
|
-
*/
|
|
379
|
-
declare class HashedEventEmitter<T extends TEventMap, HashData extends TEventMap> {
|
|
380
|
-
#private;
|
|
381
|
-
private hashMethod;
|
|
382
|
-
constructor(hashMethod: (hash: HashData) => string);
|
|
383
|
-
on<K extends TEventKey<T>>(hash: HashData | '*', eventName: K, fn: TEventReceiver<T[K]>): () => void;
|
|
384
|
-
off<K extends TEventKey<T>>(hash: HashData | '*', eventName: K, fn: TEventReceiver<T[K]>): void;
|
|
385
|
-
emit<K extends TEventKey<T>>(hash: HashData | '*', eventName: K, params?: T[K]): void;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
* Esta clase ofrece la posibilidad de crear una variable que al ser
|
|
390
|
-
* actualizada avisa sobre la actualización.
|
|
391
|
-
*
|
|
392
|
-
* @example
|
|
393
|
-
* const name = new WithEventsValue<string>('Alexis Leite');
|
|
394
|
-
*
|
|
395
|
-
* name.on('update', (newName) => console.log(`El nuevo nombre es ${newName}`));
|
|
396
|
-
*
|
|
397
|
-
* name.value = 'Joel'; // logs "El nuevo nombre es Joel"
|
|
398
|
-
*/
|
|
399
|
-
declare class WithEventsValue<T> extends EventEmitter<{
|
|
400
|
-
update: T | undefined;
|
|
401
|
-
}> {
|
|
402
|
-
#private;
|
|
403
|
-
constructor(value?: T);
|
|
404
|
-
get value(): T | undefined;
|
|
405
|
-
set value(value: T | undefined);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
interface TFncParams {
|
|
409
|
-
type: 'V' | 'P' | 'E';
|
|
410
|
-
value?: string;
|
|
411
|
-
attId?: number;
|
|
412
|
-
}
|
|
413
|
-
type TApiaFormButton = {
|
|
414
|
-
onclick: string;
|
|
415
|
-
text: string;
|
|
416
|
-
id: string;
|
|
417
|
-
type: string;
|
|
418
|
-
};
|
|
419
|
-
interface TApiaSelectPossibleValue {
|
|
420
|
-
value: string | number;
|
|
421
|
-
label: string;
|
|
422
|
-
selected?: boolean;
|
|
423
|
-
}
|
|
424
|
-
interface TApiaMultiplePossibleValue {
|
|
425
|
-
value: string | number;
|
|
426
|
-
label: string;
|
|
427
|
-
selected?: boolean;
|
|
428
|
-
}
|
|
429
|
-
interface TApiaRadioPossibleValue {
|
|
430
|
-
value: string | number;
|
|
431
|
-
label: string;
|
|
432
|
-
selected?: boolean;
|
|
433
|
-
}
|
|
434
|
-
type TApiaPossibleValue = TApiaRadioPossibleValue & TApiaMultiplePossibleValue & TApiaSelectPossibleValue;
|
|
435
|
-
type TFieldEvent = 'onLoad' | 'onReload' | 'onSubmit' | 'onChange' | 'onModalReturn' | 'onClick' | 'onPopulate' | 'populate' | 'gridAdd' | 'gridSort' | 'gridSortUp' | 'gridSortDown' | 'gridDelete' | 'gridColumnSelect' | 'JSApiaUpdate' | 'onSubmit';
|
|
436
|
-
interface TFieldScriptEvent {
|
|
437
|
-
fncName: string;
|
|
438
|
-
evtName: Readonly<TFieldEvent>;
|
|
439
|
-
evtId: number | string;
|
|
440
|
-
fncParams: TFncParams[];
|
|
441
|
-
}
|
|
442
|
-
type TFieldScriptEvents = TFieldScriptEvent[];
|
|
443
|
-
interface TFieldServerEvent {
|
|
444
|
-
evtId: number;
|
|
445
|
-
evtName: Readonly<TFieldEvent>;
|
|
446
|
-
isAjax: boolean;
|
|
447
|
-
}
|
|
448
|
-
type TFieldServerEvents = TFieldServerEvent[];
|
|
449
|
-
interface TApiaFieldPropsObj {
|
|
450
|
-
alignment?: string;
|
|
451
|
-
alt?: string;
|
|
452
|
-
bold?: string;
|
|
453
|
-
checked?: boolean;
|
|
454
|
-
colspan?: number;
|
|
455
|
-
cssClass?: string;
|
|
456
|
-
disabled?: boolean;
|
|
457
|
-
docType?: string;
|
|
458
|
-
dontBreakRadio?: boolean;
|
|
459
|
-
fontColor?: string;
|
|
460
|
-
gridHeight?: number;
|
|
461
|
-
gridColTitle?: string;
|
|
462
|
-
gridTitle?: string;
|
|
463
|
-
height?: string;
|
|
464
|
-
hideAddButton?: boolean;
|
|
465
|
-
hideDelButton?: boolean;
|
|
466
|
-
hideDocMetadata?: boolean;
|
|
467
|
-
hideDocPermissions?: boolean;
|
|
468
|
-
hideGridButtons?: boolean;
|
|
469
|
-
hideIncludeButton?: boolean;
|
|
470
|
-
hideOrderButton?: boolean;
|
|
471
|
-
hideSignButtons?: boolean;
|
|
472
|
-
pagedGridSize?: number;
|
|
473
|
-
paged?: boolean;
|
|
474
|
-
includeFirstRow?: boolean;
|
|
475
|
-
imageUrl?: string;
|
|
476
|
-
inputAsText?: boolean;
|
|
477
|
-
isActuallyReadonly?: boolean;
|
|
478
|
-
multiselect?: boolean;
|
|
479
|
-
name?: string;
|
|
480
|
-
noPrint?: boolean;
|
|
481
|
-
readonly?: boolean;
|
|
482
|
-
readOnly?: boolean;
|
|
483
|
-
regExpMessage?: string;
|
|
484
|
-
reqSign?: boolean;
|
|
485
|
-
reqTrad?: boolean;
|
|
486
|
-
required?: boolean;
|
|
487
|
-
rowspan?: number;
|
|
488
|
-
selParent?: boolean;
|
|
489
|
-
size?: string;
|
|
490
|
-
storeMdlQryResult?: boolean;
|
|
491
|
-
tooltip?: string;
|
|
492
|
-
tooltipHelp?: boolean;
|
|
493
|
-
transient?: boolean;
|
|
494
|
-
underlined?: boolean;
|
|
495
|
-
url?: string;
|
|
496
|
-
value?: unknown;
|
|
497
|
-
updateValueWithoutSynchronize?: unknown;
|
|
498
|
-
valueColor?: string;
|
|
499
|
-
visibilityHidden?: boolean;
|
|
500
|
-
possibleValue?: TApiaSelectPossibleValue[] | TApiaSelectPossibleValue | TApiaRadioPossibleValue[] | TApiaMultiplePossibleValue[] | TApiaMultiplePossibleValue;
|
|
501
|
-
leafIcon?: string;
|
|
502
|
-
parentIcon?: string;
|
|
503
|
-
props?: string;
|
|
504
|
-
id?: string;
|
|
505
|
-
noLock?: boolean;
|
|
506
|
-
noErase?: boolean;
|
|
507
|
-
noModify?: boolean;
|
|
508
|
-
noDownload?: boolean;
|
|
509
|
-
allowEdition?: boolean;
|
|
510
|
-
hideDocDownload?: boolean;
|
|
511
|
-
qryId?: string;
|
|
512
|
-
startIndex?: number;
|
|
513
|
-
curPage?: number;
|
|
514
|
-
pages?: number;
|
|
515
|
-
rowCount?: number;
|
|
516
|
-
maxRecords?: number;
|
|
517
|
-
colWidth?: string;
|
|
518
|
-
gridForm?: string;
|
|
519
|
-
documentMonitorCus?: number;
|
|
520
|
-
fileCollapseFldStrc?: boolean;
|
|
521
|
-
fileCollapseMetadata?: boolean;
|
|
522
|
-
fileCollapsePermission?: boolean;
|
|
523
|
-
fileDefFolder?: number;
|
|
524
|
-
fileDntShwDocMdlOnDrop?: boolean;
|
|
525
|
-
fileExpDate?: boolean;
|
|
526
|
-
fileNoAllwDnD?: boolean;
|
|
527
|
-
fileNotShowDocMon?: boolean;
|
|
528
|
-
fileShowDesc?: boolean;
|
|
529
|
-
fileShwFoldTreeBtn?: boolean;
|
|
530
|
-
fileShwFoldTreeStr?: boolean;
|
|
531
|
-
oneClickUpload?: boolean;
|
|
532
|
-
fieldId?: string;
|
|
533
|
-
hasFinishedLoading?: boolean;
|
|
534
|
-
}
|
|
535
|
-
type TApiaFormElementOption = {
|
|
536
|
-
content: string;
|
|
537
|
-
value: string;
|
|
538
|
-
};
|
|
539
|
-
type TApiaFormElement = {
|
|
540
|
-
class: string;
|
|
541
|
-
disabled: boolean;
|
|
542
|
-
html: boolean;
|
|
543
|
-
id: string;
|
|
544
|
-
isADate: boolean;
|
|
545
|
-
mandatory: boolean;
|
|
546
|
-
maxlength?: string;
|
|
547
|
-
modalFunction?: string;
|
|
548
|
-
name: string;
|
|
549
|
-
normalWhiteSpace: boolean;
|
|
550
|
-
onChange: string;
|
|
551
|
-
options: {
|
|
552
|
-
option: TApiaFormElementOption | TApiaFormElementOption[];
|
|
553
|
-
};
|
|
554
|
-
readonly: boolean;
|
|
555
|
-
regExp?: string;
|
|
556
|
-
regExpMessage?: string;
|
|
557
|
-
selected: boolean;
|
|
558
|
-
size: string;
|
|
559
|
-
text: string;
|
|
560
|
-
title: string;
|
|
561
|
-
type: string;
|
|
562
|
-
value: string;
|
|
563
|
-
valueAsAttribute: boolean;
|
|
564
|
-
};
|
|
565
|
-
type TApiaLoadForm = {
|
|
566
|
-
form: {
|
|
567
|
-
closeOnSubmit: boolean;
|
|
568
|
-
multiPart: boolean;
|
|
569
|
-
ajaxNewPanel: boolean;
|
|
570
|
-
showErrors: boolean;
|
|
571
|
-
doEscape: boolean;
|
|
572
|
-
action: string;
|
|
573
|
-
onLoad: string;
|
|
574
|
-
ajaxsubmit: boolean;
|
|
575
|
-
closeAll: boolean;
|
|
576
|
-
title: string;
|
|
577
|
-
autoExpand: boolean;
|
|
578
|
-
titleClass: string;
|
|
579
|
-
addClass: string;
|
|
580
|
-
elements?: {
|
|
581
|
-
label: string;
|
|
582
|
-
element: TApiaFormElement | TApiaFormElement[];
|
|
583
|
-
};
|
|
584
|
-
buttons?: {
|
|
585
|
-
button: TApiaFormButton | TApiaFormButton[];
|
|
586
|
-
};
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
|
-
type TApiaFilterValue = string | number;
|
|
590
|
-
type TApiaFilterOption = {
|
|
591
|
-
label: string;
|
|
592
|
-
value: TApiaFilterValue;
|
|
593
|
-
selected?: boolean;
|
|
594
|
-
id?: string;
|
|
595
|
-
name?: string;
|
|
596
|
-
};
|
|
597
|
-
type TApiaFilter = {
|
|
598
|
-
asAdditional?: boolean;
|
|
599
|
-
column?: string;
|
|
600
|
-
currentValue: TApiaFilterValue;
|
|
601
|
-
deleteFiltersTimestamp?: number;
|
|
602
|
-
error?: string;
|
|
603
|
-
id: string | number;
|
|
604
|
-
isMeta?: boolean;
|
|
605
|
-
placeholder?: string;
|
|
606
|
-
runAutomatically?: boolean;
|
|
607
|
-
title?: string;
|
|
608
|
-
toolTip?: string;
|
|
609
|
-
detectOnChange?: boolean;
|
|
610
|
-
readonly?: boolean;
|
|
611
|
-
required?: boolean;
|
|
612
|
-
sortCombo?: boolean;
|
|
613
|
-
/**
|
|
614
|
-
* Con esta propiedad se permite agupar los filtros para mostrarlos en un
|
|
615
|
-
* panel especifico.
|
|
616
|
-
*/
|
|
617
|
-
group?: string;
|
|
618
|
-
options?: TApiaFilterOption[];
|
|
619
|
-
type?: 'date' | 'D' | 'S' | 'number' | 'N' | 'apiaNumber';
|
|
620
|
-
hide?: boolean;
|
|
621
|
-
hideToFilter?: boolean;
|
|
622
|
-
filterToId?: string;
|
|
623
|
-
filterToValue?: TApiaFilterValue;
|
|
624
|
-
isRange?: boolean;
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
interface TApiaAction {
|
|
628
|
-
toDo?: string;
|
|
629
|
-
param: string | string[];
|
|
630
|
-
}
|
|
631
|
-
interface TApiaActions {
|
|
632
|
-
action: TApiaAction | TApiaAction[];
|
|
633
|
-
}
|
|
634
|
-
interface TApiaMessage {
|
|
635
|
-
text: string;
|
|
636
|
-
label?: string;
|
|
637
|
-
}
|
|
638
|
-
type TApiaComplexCell = {
|
|
639
|
-
label: string;
|
|
640
|
-
classToAdd?: string;
|
|
641
|
-
isHTML?: boolean;
|
|
642
|
-
docName?: string;
|
|
643
|
-
forceTitle?: string;
|
|
644
|
-
[key: string]: unknown;
|
|
645
|
-
};
|
|
646
|
-
type TApiaCellDefinition = TApiaComplexCell | string;
|
|
647
|
-
type TApiaRowDefinition = {
|
|
648
|
-
'data-selected'?: boolean;
|
|
649
|
-
selected?: boolean;
|
|
650
|
-
dblclic: boolean;
|
|
651
|
-
id: string;
|
|
652
|
-
classToAdd?: string;
|
|
653
|
-
rowSeparator?: boolean;
|
|
654
|
-
suspended?: boolean;
|
|
655
|
-
unselectableTR?: boolean;
|
|
656
|
-
headName?: string;
|
|
657
|
-
isLocked?: boolean;
|
|
658
|
-
cell: TApiaCellDefinition | TApiaCellDefinition[];
|
|
659
|
-
boldType?: boolean;
|
|
660
|
-
'expired-doc': true;
|
|
661
|
-
};
|
|
662
|
-
type TApiaFunctionPageInfo = {
|
|
663
|
-
amount: string;
|
|
664
|
-
currentPage: string;
|
|
665
|
-
hasMore: boolean;
|
|
666
|
-
pageCount: string;
|
|
667
|
-
prefix: string;
|
|
668
|
-
reachedMax: boolean;
|
|
669
|
-
selectOnlyOne: boolean;
|
|
670
|
-
totalRecords: string;
|
|
671
|
-
};
|
|
672
|
-
type TApiaSystemMessageObj<Structure = Record<string, unknown>> = Structure & {
|
|
673
|
-
onClose?: string;
|
|
674
|
-
sysMessages?: {
|
|
675
|
-
message: TApiaMessage | TApiaMessage[];
|
|
676
|
-
};
|
|
677
|
-
sysExceptions?: {
|
|
678
|
-
exception: TApiaMessage | TApiaMessage[];
|
|
679
|
-
};
|
|
680
|
-
exceptions?: {
|
|
681
|
-
exception: TApiaMessage | TApiaMessage[];
|
|
682
|
-
};
|
|
683
|
-
actions?: TApiaActions;
|
|
684
|
-
code?: unknown;
|
|
685
|
-
load?: Structure;
|
|
686
|
-
};
|
|
687
|
-
type TApiaTableFunction = {
|
|
688
|
-
result: {
|
|
689
|
-
pageInfo: TApiaFunctionPageInfo;
|
|
690
|
-
table?: {
|
|
691
|
-
row: TApiaRowDefinition | TApiaRowDefinition[];
|
|
692
|
-
};
|
|
693
|
-
};
|
|
694
|
-
};
|
|
695
|
-
type TApiaFunction<T = TApiaTableFunction, HasMessages = true> = HasMessages extends true ? {
|
|
696
|
-
function: {
|
|
697
|
-
dropLastMessage?: boolean;
|
|
698
|
-
name: string;
|
|
699
|
-
messages: T;
|
|
700
|
-
};
|
|
701
|
-
} : {
|
|
702
|
-
function: {
|
|
703
|
-
name: string;
|
|
704
|
-
} & T;
|
|
705
|
-
};
|
|
706
|
-
type TApiaLoadText = {
|
|
707
|
-
text: {
|
|
708
|
-
closeAll: boolean;
|
|
709
|
-
title: string;
|
|
710
|
-
addClass: string;
|
|
711
|
-
content: string;
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
type TApiaLoad<T extends Record<string, unknown> = TApiaLoadForm> = {
|
|
715
|
-
canClose: boolean;
|
|
716
|
-
type: string;
|
|
717
|
-
} & T;
|
|
718
|
-
interface TMessage {
|
|
719
|
-
text: string;
|
|
720
|
-
content?: string;
|
|
721
|
-
title?: string;
|
|
722
|
-
type?: string;
|
|
723
|
-
}
|
|
724
|
-
interface TNotificationMessage {
|
|
725
|
-
onClose?: string;
|
|
726
|
-
sysMessages?: {
|
|
727
|
-
message: TMessage | TMessage[];
|
|
728
|
-
};
|
|
729
|
-
sysExceptions?: {
|
|
730
|
-
exception: TMessage | TMessage[];
|
|
731
|
-
};
|
|
732
|
-
exceptions?: {
|
|
733
|
-
exception: TMessage | TMessage[];
|
|
734
|
-
};
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
type TId = string | number;
|
|
738
|
-
type TModify<T, R> = Omit<T, keyof R> & R;
|
|
739
|
-
type TMap$1<T> = Record<string | number, T>;
|
|
740
|
-
type TRequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
741
|
-
[K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
|
|
742
|
-
}[Keys];
|
|
743
|
-
|
|
744
|
-
interface IFocusProps {
|
|
745
|
-
modalsContainerRetriever?: () => HTMLElement;
|
|
746
|
-
notificationsContainerRetriever?: () => HTMLElement;
|
|
747
|
-
}
|
|
748
|
-
interface IOnFocusConfiguration {
|
|
749
|
-
/**
|
|
750
|
-
* El controlador emite un evento custom cuando se realiza foco, con la
|
|
751
|
-
* intención de que los elementos colapsables se abran automáticamente. Si
|
|
752
|
-
* este parámetro es pasado con false, se evita ese comportamiento.
|
|
753
|
-
*/
|
|
754
|
-
dispatchCustomEvent?: boolean;
|
|
755
|
-
/**
|
|
756
|
-
* Cuando la pantalla está bloqueada con el spinner, el controlador no
|
|
757
|
-
* intentará hacer foco, a menos que este parámetro se pase en true.
|
|
758
|
-
*/
|
|
759
|
-
focusEvenWhenScreenLocked?: boolean;
|
|
760
|
-
scrollIntoViewOptions?: ScrollIntoViewOptions;
|
|
761
|
-
}
|
|
762
|
-
declare const notificationsSelector = ".notification";
|
|
763
|
-
/**
|
|
764
|
-
* Al método focus.on se le puede pasar o bien un HTMLElement o bien una
|
|
765
|
-
* función que implemente esta interfaz. Cuando se pasa una función, la misma
|
|
766
|
-
* será invocada cada vez que se vaya a intentar una acción de foco.
|
|
767
|
-
*
|
|
768
|
-
* Si la función devuelve un elemento HTML, se intentará hacer foco sobre éste.
|
|
769
|
-
*
|
|
770
|
-
* Si la función devuelve null, ese intento será tomado como nulo y se volverá
|
|
771
|
-
* a intentar luego del tiempo determinado.
|
|
772
|
-
*
|
|
773
|
-
* Si la función devuelve false, será eliminada de la cola de foco, lo que
|
|
774
|
-
* significa que ya no se intentará hacer foco sobre este elemento. En cambio,
|
|
775
|
-
* se continuará con los demás elementos de la cola o en caso de no haber
|
|
776
|
-
* ninguno, con el último elemento que tuvo foco y aún esté presente en el
|
|
777
|
-
* documento.
|
|
778
|
-
*/
|
|
779
|
-
type TFocusRetriever = (isLastTry: boolean) => HTMLElement | null | false;
|
|
780
|
-
interface IFocusQueryElement {
|
|
781
|
-
element: HTMLElement | TFocusRetriever;
|
|
782
|
-
configuration?: IOnFocusConfiguration;
|
|
783
|
-
}
|
|
784
|
-
declare global {
|
|
785
|
-
interface Window {
|
|
786
|
-
focusStatus: Record<string, unknown>;
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
interface IFocusCheck {
|
|
790
|
-
currentInstruction: number;
|
|
791
|
-
}
|
|
792
|
-
declare const focus: {
|
|
793
|
-
"__#8@#root": HTMLElement;
|
|
794
|
-
"__#8@#props": IFocusProps | undefined;
|
|
795
|
-
afterNotificationFocus: IFocusQueryElement | undefined;
|
|
796
|
-
"__#8@#actualFocusQuery": IFocusQueryElement[];
|
|
797
|
-
"__#8@#currentInstruction": number;
|
|
798
|
-
"__#8@#focusDelay": number;
|
|
799
|
-
"__#8@#focusRetries": number;
|
|
800
|
-
"__#8@#focusTimeout": number;
|
|
801
|
-
"__#8@#isIntervalRunning": boolean;
|
|
802
|
-
"__#8@#focusQuery": IFocusQueryElement[];
|
|
803
|
-
"__#8@#checkInstruction"(focusCheck: IFocusCheck): boolean;
|
|
804
|
-
"__#8@#doFocus"(HTMLElement: HTMLElement | TFocusRetriever, focusCheck: IFocusCheck, isLastTry: boolean, configuration?: IOnFocusConfiguration): Promise<false | HTMLElement | null>;
|
|
805
|
-
"__#8@#resetInterval"(): void;
|
|
806
|
-
"__#8@#runFocusInterval"(focusElement?: IFocusQueryElement, internalCall?: boolean): Promise<false | HTMLElement>;
|
|
807
|
-
/**
|
|
808
|
-
* Da la instrucción de colocar el foco en el elemento provisto como
|
|
809
|
-
* parámetro una vez que todas las notificaciones se hayan cerrado. En caso
|
|
810
|
-
* de no existir notificaciones abiertas, hace foco en el elemento
|
|
811
|
-
* directamente.
|
|
812
|
-
*/
|
|
813
|
-
afterNotifications(element: HTMLElement | TFocusRetriever, configuration?: IOnFocusConfiguration): void;
|
|
814
|
-
/**
|
|
815
|
-
* Da la instrucción de colocar el foco en el elemento provisto como
|
|
816
|
-
* parámetro luego de recargar la página.
|
|
817
|
-
*
|
|
818
|
-
* Los parámetros pasados serán ordenados en orden de importancia priorizando
|
|
819
|
-
* en el siguiente orden:
|
|
820
|
-
* - id
|
|
821
|
-
* - name
|
|
822
|
-
* - className
|
|
823
|
-
* - selector
|
|
824
|
-
*/
|
|
825
|
-
afterReload({ className, id, name, selector, }: TRequireOnlyOne<{
|
|
826
|
-
className: string;
|
|
827
|
-
id: string;
|
|
828
|
-
name: string;
|
|
829
|
-
selector: string;
|
|
830
|
-
}, "name" | "className" | "id" | "selector">): void;
|
|
831
|
-
/**
|
|
832
|
-
* Da la instrucción de colocar el foco el elemento pasado como parámetro.
|
|
833
|
-
* Se puede pasar también una función que devuelva HTMLElement | false |
|
|
834
|
-
* null.
|
|
835
|
-
*
|
|
836
|
-
* El segundo parámetro del método on es un objeto de tipo
|
|
837
|
-
* ScrollIntoViewOptions, que permite modificar el comportamiento del scroll
|
|
838
|
-
* a en el elemento.
|
|
839
|
-
*
|
|
840
|
-
* @see TFocusRetriever para más detalles sobre la función como parámetro.
|
|
841
|
-
*/
|
|
842
|
-
on(element: HTMLElement | TFocusRetriever, configuration?: IOnFocusConfiguration): Promise<false | HTMLElement>;
|
|
843
|
-
focusOnReload: string | null;
|
|
844
|
-
restore(): void;
|
|
845
|
-
init(): void;
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* The GlobalFocus helper keeps a list of the last focused elements and allows
|
|
850
|
-
* to retrieve the last focused element which matches against a query selector.
|
|
851
|
-
*/
|
|
852
|
-
declare const globalFocus: {
|
|
853
|
-
focused: (HTMLElement | TFocusRetriever)[];
|
|
854
|
-
"__#5@#onFocusCallbacks": (() => unknown)[];
|
|
855
|
-
offFocus(cb: () => unknown): void;
|
|
856
|
-
onFocus(cb: () => unknown): () => void;
|
|
857
|
-
inDocument(el: HTMLElement | TFocusRetriever): boolean;
|
|
858
|
-
focus: HTMLElement | TFocusRetriever;
|
|
859
|
-
readonly list: (HTMLElement | TFocusRetriever)[];
|
|
860
|
-
/**
|
|
861
|
-
* @param querySelector A query selector against which the element should match
|
|
862
|
-
* @returns The last HTMLElement if no querySelector argument provided or else, the last which matches
|
|
863
|
-
* against that query selector.
|
|
864
|
-
* */
|
|
865
|
-
last(querySelector?: string, omit?: number): HTMLElement | TFocusRetriever | null;
|
|
866
|
-
};
|
|
867
|
-
|
|
868
|
-
type THistoryCount = {
|
|
869
|
-
currentStep: number;
|
|
870
|
-
stepCount: number;
|
|
871
|
-
};
|
|
872
|
-
type THistoryStep<T> = {
|
|
873
|
-
content: T;
|
|
874
|
-
} & THistoryCount;
|
|
875
|
-
type THistoryStepChange<T> = THistoryCount & THistoryStep<T> & {
|
|
876
|
-
fromPush?: boolean;
|
|
877
|
-
hasPrevious: boolean;
|
|
878
|
-
hasNext: boolean;
|
|
879
|
-
};
|
|
880
|
-
type THistoryConfiguration = {
|
|
881
|
-
maxLength: number;
|
|
882
|
-
};
|
|
883
|
-
/**
|
|
884
|
-
* # Cómo usar el historial
|
|
885
|
-
*
|
|
886
|
-
* Es muy sencillo: se instancia con un callback que recibirá un método push
|
|
887
|
-
* cada vez que una ventana se cierre. En esos momentos, el usuario del History
|
|
888
|
-
* puede hacer push al estado.
|
|
889
|
-
*
|
|
890
|
-
* ## La mecánica
|
|
891
|
-
*
|
|
892
|
-
* - Instancio la clase y recibo el método push
|
|
893
|
-
* - Cuando se realizan cambios significativos, llamo al método openWindow
|
|
894
|
-
* - El método openWindow da una ventana de 350ms antes de llamar al callback
|
|
895
|
-
* - Si durante esa ventana se vuelve a llamar a openWindow, la ventana se
|
|
896
|
-
* resetea
|
|
897
|
-
* - Si al llamar al callback, se hace push al estado, ese estado es propagado
|
|
898
|
-
* mediante el hook y mediante el evento on('stepChange')
|
|
899
|
-
*
|
|
900
|
-
* ## Back y forward
|
|
901
|
-
*
|
|
902
|
-
* El back y forward son dos métodos del history que hacen un stepChange y
|
|
903
|
-
* emiten a través de on('stepChange') y el hook
|
|
904
|
-
*/
|
|
905
|
-
declare class History<T> extends EventEmitter<{
|
|
906
|
-
stepChange: THistoryStepChange<T>;
|
|
907
|
-
}> {
|
|
908
|
-
private configuration;
|
|
909
|
-
private autocloseTimeout;
|
|
910
|
-
private currentStep;
|
|
911
|
-
private content;
|
|
912
|
-
private enabled;
|
|
913
|
-
private _isOpen;
|
|
914
|
-
private timeoutMs;
|
|
915
|
-
constructor(onCloseWindow: (push: (newState: T) => void) => unknown, configuration?: THistoryConfiguration);
|
|
916
|
-
private closeWindow;
|
|
917
|
-
private getEvent;
|
|
918
|
-
private onCloseWindow;
|
|
919
|
-
private push;
|
|
920
|
-
private shoutStepChange;
|
|
921
|
-
hooks: {
|
|
922
|
-
useCountChange: (onChange: (ev: THistoryStepChange<T>) => unknown) => void;
|
|
923
|
-
};
|
|
924
|
-
back: () => void;
|
|
925
|
-
disable: () => void;
|
|
926
|
-
enable: () => void;
|
|
927
|
-
forward: () => void;
|
|
928
|
-
get isOpen(): boolean;
|
|
929
|
-
openWindow: () => void;
|
|
930
|
-
updateConfig: (newConfiguration: Partial<THistoryConfiguration>) => void;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
/**
|
|
934
|
-
* Permite reasignar múltiples referencias desde un mismo componente.
|
|
935
|
-
*
|
|
936
|
-
* @example
|
|
937
|
-
*
|
|
938
|
-
* const ref1 = useRef(null)
|
|
939
|
-
* const ref2 = useRef(null)
|
|
940
|
-
*
|
|
941
|
-
* const assignRefs = useMultipleRefs(ref1, ref2);
|
|
942
|
-
*
|
|
943
|
-
* return <Box ref={assignRefs} ...
|
|
944
|
-
*/
|
|
945
|
-
declare function useCombinedRefs<RefType = HTMLInputElement>(...refs: (React.ForwardedRef<unknown> | undefined)[]): React.Dispatch<React.SetStateAction<RefType | undefined>>;
|
|
946
|
-
|
|
947
|
-
declare const useDebouncedCallback: <Params extends any[]>(callback: (...params: Params) => unknown, { runWhenTriggered, timeout }?: {
|
|
948
|
-
runWhenTriggered: boolean;
|
|
949
|
-
timeout: number;
|
|
950
|
-
}) => (...params: Params) => void;
|
|
951
|
-
|
|
952
|
-
/**
|
|
953
|
-
* Devuelve una referencia que mantiene siempre el último valor del elemento
|
|
954
|
-
* pasado, es especialmente útil para acceder a valores del componente desde
|
|
955
|
-
* dentro de efectos.
|
|
956
|
-
*
|
|
957
|
-
* *Investigar qué es 'react stale state'*
|
|
958
|
-
*/
|
|
959
|
-
declare function useLatest<T>(value: T): React.MutableRefObject<T>;
|
|
960
|
-
|
|
961
|
-
declare function useMount(effect: EffectCallback): void;
|
|
962
|
-
|
|
963
|
-
declare function useUnmount(unmountCallback: () => void): void;
|
|
964
|
-
|
|
965
|
-
declare function usePrevious<T>(value: T): React.MutableRefObject<T | undefined>;
|
|
966
|
-
|
|
967
|
-
declare function useStateRef<T>(initialState?: T): [
|
|
968
|
-
typeof initialState extends undefined ? T | undefined : T,
|
|
969
|
-
Dispatch<SetStateAction<typeof initialState extends undefined ? T | undefined : T>>,
|
|
970
|
-
MutableRefObject<typeof initialState extends undefined ? T | undefined : T>
|
|
971
|
-
];
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Este hook se comporta igual que useEffect, con la diferencia de que en el
|
|
975
|
-
* primer renderizado no se va a ejecutar.
|
|
976
|
-
*/
|
|
977
|
-
declare function useUpdateEffect(effect: EffectCallback, deps?: DependencyList): void;
|
|
978
|
-
|
|
979
|
-
declare function shallowEqual(a: unknown, b: unknown): boolean;
|
|
980
|
-
/**
|
|
981
|
-
* Compara con shallowEqual todos los ítems de dos arrays
|
|
982
|
-
*/
|
|
983
|
-
declare function shallowCompareArrays(a: unknown[], b: unknown[]): boolean;
|
|
984
|
-
declare function useShallowMemo<T>(creator: () => T, deps: unknown[]): T;
|
|
985
|
-
|
|
986
|
-
type TMethod<CR> = CR extends (state: any, ...args: infer Action) => any ? (id: TId, ...args: Action) => unknown : () => unknown;
|
|
987
|
-
type TMethods<State extends TMap, K extends any[] = any[]> = Record<string, (setState: TStateManager<State>, ...args: K) => void>;
|
|
988
|
-
type TMethodsMap<OriginalMethods extends TMethods<any>> = {
|
|
989
|
-
[Name in keyof OriginalMethods]: TMethod<OriginalMethods[Name]>;
|
|
990
|
-
};
|
|
991
|
-
type TEventsMap<OriginalEvents extends TMap> = {
|
|
992
|
-
[Name in keyof OriginalEvents]: (args: OriginalEvents[Name]) => unknown;
|
|
993
|
-
};
|
|
994
|
-
type TEventsHandlers<OriginalEvents extends TMap> = Record<TId, {
|
|
995
|
-
[Name in keyof OriginalEvents]?: {
|
|
996
|
-
cb: (args?: OriginalEvents[Name]) => unknown;
|
|
997
|
-
uniqueHookId: string;
|
|
998
|
-
}[];
|
|
999
|
-
}>;
|
|
1000
|
-
type TMap = Record<string, any>;
|
|
1001
|
-
type TStateManager<State> = (newState: Partial<State>) => void;
|
|
1002
|
-
type TFireEvent<Events extends TMap> = <K extends keyof Events>(id: TId, ev: K, args: Events[K] extends void ? undefined : Events[K]) => void;
|
|
1003
|
-
|
|
1004
|
-
/**
|
|
1005
|
-
* Permite la creación de componentes multi-instancia que ofrecen métodos para
|
|
1006
|
-
* trabajar sobre su estado o su comportamiento interno.
|
|
1007
|
-
*
|
|
1008
|
-
* @example
|
|
1009
|
-
* const [methods, events, Imperative] = makeImperativeComponent<
|
|
1010
|
-
{
|
|
1011
|
-
age: number;
|
|
1012
|
-
},
|
|
1013
|
-
{ blink: number }
|
|
1014
|
-
>()(
|
|
1015
|
-
{} as {
|
|
1016
|
-
name: string;
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
setName(setState, name: string) {
|
|
1020
|
-
setState({ name });
|
|
1021
|
-
},
|
|
1022
|
-
},
|
|
1023
|
-
({ age, name, useEvents }) => {
|
|
1024
|
-
const [isBlinking, setIsBlinking] = useState(false);
|
|
1025
|
-
|
|
1026
|
-
useEvents({
|
|
1027
|
-
blink() {
|
|
1028
|
-
setInterval(() => setIsBlinking((current) => !current), 300);
|
|
1029
|
-
},
|
|
1030
|
-
});
|
|
1031
|
-
|
|
1032
|
-
return (
|
|
1033
|
-
<Box sx={{ background: isBlinking ? 'red' : undefined }}>
|
|
1034
|
-
{age} {name}
|
|
1035
|
-
</Box>
|
|
1036
|
-
);
|
|
1037
|
-
},
|
|
1038
|
-
);
|
|
1039
|
-
|
|
1040
|
-
methods
|
|
1041
|
-
*/
|
|
1042
|
-
declare function makeImperativeComponent<ComponentProps extends TMap, Events extends TMap = TMap>(): <State extends TMap, Methods extends TMethods<State, any[]>>({ Component, initialState, methods, }: {
|
|
1043
|
-
initialState?: State | undefined;
|
|
1044
|
-
methods?: Methods | undefined;
|
|
1045
|
-
Component: FC<Omit<ComponentProps, "id"> & State>;
|
|
1046
|
-
}) => [TMethodsMap<Methods>, TFireEvent<Events>, FC<ComponentProps & {
|
|
1047
|
-
id: TId;
|
|
1048
|
-
}>];
|
|
1049
|
-
|
|
1050
|
-
type TSingleMethodsMap<Methods extends TMethods<any>, MethodsMap extends TMethodsMap<Methods>> = {
|
|
1051
|
-
[Name in keyof MethodsMap]: MethodsMap[Name] extends (id: TId, ...args: infer Action) => unknown ? (...args: Action) => unknown : never;
|
|
1052
|
-
};
|
|
1053
|
-
declare function makeSingleImperativeComponent<ComponentProps extends TMap, Events extends TMap = TMap>(): <State extends TMap, Methods extends TMethods<State, any[]>>({ initialState, methods, Component, }: {
|
|
1054
|
-
initialState?: State | undefined;
|
|
1055
|
-
methods?: Methods | undefined;
|
|
1056
|
-
Component: FC<Omit<ComponentProps, "id"> & State>;
|
|
1057
|
-
}) => [TSingleMethodsMap<Methods, TMethodsMap<Methods>>, <K extends keyof Events>(ev: K, args: Events[K]) => void, FC<ComponentProps>];
|
|
1058
|
-
|
|
1059
|
-
declare const useImperativeComponentEvents: <Events extends TMap = TMap>(handlers: Partial<TEventsMap<Events>>) => string;
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* Permite el uso de eventos en herederos directos o no del imperativeComponent
|
|
1063
|
-
* más cercano.
|
|
1064
|
-
*/
|
|
1065
|
-
declare function useImperativeComponentContext<Events extends TMap = TMap>(): {
|
|
1066
|
-
id: TId;
|
|
1067
|
-
eventsStore: TEventsHandlers<Events>;
|
|
1068
|
-
};
|
|
1069
|
-
|
|
1070
|
-
/**
|
|
1071
|
-
* Dado un nombre de etiqueta, devuelve el texto que esa etiqueta contiene en
|
|
1072
|
-
* el idioma actual. En este momento, lo único que hace realmente esta función
|
|
1073
|
-
* es devolver la variable del window con el mismo nombre que se está
|
|
1074
|
-
* pidiendo.
|
|
1075
|
-
*
|
|
1076
|
-
* La idea de implementar esta función, es que en un futuro la fuente de la
|
|
1077
|
-
* que provienen las labels pueda ser más diversa.
|
|
1078
|
-
*
|
|
1079
|
-
* Permite el pasaje de tokens para el reemplazo automático de los mismos.
|
|
1080
|
-
*
|
|
1081
|
-
* @example
|
|
1082
|
-
*
|
|
1083
|
-
* // Suponemos la etiqueta msgUsu = { text: 'Usuario <TOK1>', title: 'Usuario <TOK1>' }
|
|
1084
|
-
*
|
|
1085
|
-
* getLabel('msgUsu' , {
|
|
1086
|
-
* text: {
|
|
1087
|
-
* TOK1: 'admin',
|
|
1088
|
-
* },
|
|
1089
|
-
* title: {
|
|
1090
|
-
* TOK1: 'no disponible',
|
|
1091
|
-
* }
|
|
1092
|
-
* })
|
|
1093
|
-
*/
|
|
1094
|
-
declare function getLabel(name: string, replaceTokens?: {
|
|
1095
|
-
text?: Record<string, string>;
|
|
1096
|
-
title?: Record<string, string>;
|
|
1097
|
-
}): {
|
|
1098
|
-
text: string;
|
|
1099
|
-
tooltip: string;
|
|
1100
|
-
};
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* Da formato a un mensaje con tokens incrustados.
|
|
1104
|
-
*
|
|
1105
|
-
* @example
|
|
1106
|
-
*
|
|
1107
|
-
* // Dado el siguiente mensaje:
|
|
1108
|
-
* var msg = 'El campo <TOK1> es inválido.';
|
|
1109
|
-
*
|
|
1110
|
-
* console.log(formatMessage(msg, {
|
|
1111
|
-
* TOK1: 'nombre',
|
|
1112
|
-
* }));
|
|
1113
|
-
* // Imprime: El campo nombre es inválido.
|
|
1114
|
-
*/
|
|
1115
|
-
declare const formatMessage: (str: string, obj: {
|
|
1116
|
-
[key: string]: string;
|
|
1117
|
-
}) => string;
|
|
1118
|
-
|
|
1119
|
-
interface ISetBoundary {
|
|
1120
|
-
number?: number | string;
|
|
1121
|
-
min?: number;
|
|
1122
|
-
max?: number;
|
|
1123
|
-
loop?: boolean;
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* Añade límites a un número, impidiendo que sea
|
|
1127
|
-
* inferior o superior a los límites establecidos.
|
|
1128
|
-
*
|
|
1129
|
-
* Si se pasa loop en true, al llegar al valor maximo o minimo regresara al
|
|
1130
|
-
* minimo o maximo respectivamente.
|
|
1131
|
-
*/
|
|
1132
|
-
declare function addBoundary(num: number, min: number, max?: number, loop?: boolean): number;
|
|
1133
|
-
declare function addBoundary(definition: ISetBoundary): number;
|
|
1134
|
-
/**
|
|
1135
|
-
* Esta función acepta un número y devuelve la representaciíon
|
|
1136
|
-
* en string de su tamaño en disco. Ej: 1024 => 1kb
|
|
1137
|
-
*/
|
|
1138
|
-
declare function parseAsSize(num: number): string;
|
|
1139
|
-
/**
|
|
1140
|
-
* Toma cualquier valor y devuelve siempre un número. En caso de que el valor
|
|
1141
|
-
* casteado con la función Number(value) de NaN, devuelve defaultReturn, que por
|
|
1142
|
-
* defecto es 0
|
|
1143
|
-
*/
|
|
1144
|
-
declare function noNaN(number: unknown, defaultReturn?: number): number;
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* Este método itera sobre un objeto hasta encontrar la ruta especificada
|
|
1148
|
-
*
|
|
1149
|
-
* @example
|
|
1150
|
-
*
|
|
1151
|
-
const obj = {
|
|
1152
|
-
a: {
|
|
1153
|
-
b: {
|
|
1154
|
-
c: {
|
|
1155
|
-
d: "d"
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
};
|
|
1160
|
-
|
|
1161
|
-
console.log(getValueByPath(obj,'a.b.c')) // { d: 'd' }
|
|
1162
|
-
console.log(getValueByPath(obj,'a.b.c.d')) // 'd'
|
|
1163
|
-
*
|
|
1164
|
-
*/
|
|
1165
|
-
declare function getValueByPath(obj: Record<string, unknown>, path: string | string[], separator?: string): unknown;
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* Permite escribir una propiedad en un objeto, en una ruta especificada. Si
|
|
1169
|
-
* dicha ruta no existe dentro del objeto la crea, siempre que sea posible. No
|
|
1170
|
-
* será posible en caso de que alguno de los elementos de la ruta contenga una
|
|
1171
|
-
* propiedad que no sea de tipo objeto.
|
|
1172
|
-
*
|
|
1173
|
-
* @param obj El objeto donde se desea escribir la propiedad
|
|
1174
|
-
* @param path La ruta en la que se va a escribir
|
|
1175
|
-
* @param value El valor que se va a escribir en la ruta especificada
|
|
1176
|
-
* @returns Un objeto idéntico del recibido pero co nlos cambios aplicados
|
|
1177
|
-
*
|
|
1178
|
-
* @throws { Error } En caso de que la ruta especificada contenga algún elemento que no puede ser escrito.
|
|
1179
|
-
*
|
|
1180
|
-
* @example
|
|
1181
|
-
*
|
|
1182
|
-
* const a = {
|
|
1183
|
-
* a: {}
|
|
1184
|
-
* };
|
|
1185
|
-
*
|
|
1186
|
-
* setValueByPath(a, 'a.b.c', 'Hello world');
|
|
1187
|
-
* /* Outputs:
|
|
1188
|
-
* {
|
|
1189
|
-
* a: {
|
|
1190
|
-
* b: {
|
|
1191
|
-
* c: 'Hello world'
|
|
1192
|
-
* }
|
|
1193
|
-
* }
|
|
1194
|
-
* }
|
|
1195
|
-
*/
|
|
1196
|
-
declare function setValueByPath(obj: Record<string, unknown>, path: string, value: unknown): Record<string, unknown> | null;
|
|
1197
|
-
|
|
1198
|
-
type TProperties = Record<string, unknown>;
|
|
1199
|
-
type TPropsSuscriptor<PropsType extends Record<string, unknown> = TProperties> = (props: PropsType, urgent?: boolean) => unknown;
|
|
1200
|
-
type TPropsSelector<Selected = any, PropsType = TProperties> = (props: PropsType) => Selected;
|
|
1201
|
-
/**
|
|
1202
|
-
* La función comparadora debe devolver true cuando
|
|
1203
|
-
* los elementos son iguales o false cuando son
|
|
1204
|
-
* distintos.
|
|
1205
|
-
*/
|
|
1206
|
-
type TPropsComparator<Selected> = (prevProps: Selected | undefined, newProps: Selected | undefined) => boolean;
|
|
1207
|
-
type TPropsConfiguration<Selected, PropsType extends Record<string, unknown> = TProperties> = {
|
|
1208
|
-
selector?: TPropsSelector<Selected, PropsType>;
|
|
1209
|
-
comparator?: TPropsComparator<Selected>;
|
|
1210
|
-
initialValue?: Selected;
|
|
1211
|
-
propsStore?: PropsStore<PropsType>;
|
|
1212
|
-
};
|
|
1213
|
-
type TUpdateFieldConfiguration = Partial<{
|
|
1214
|
-
noEmit: boolean;
|
|
1215
|
-
isUrgent: boolean;
|
|
1216
|
-
}>;
|
|
1217
|
-
|
|
1218
|
-
interface IPropsStoreConf {
|
|
1219
|
-
logCommands: {
|
|
1220
|
-
propsStore?: string;
|
|
1221
|
-
updateProp?: string;
|
|
1222
|
-
propsSuscriptors?: string;
|
|
1223
|
-
propsLog?: string;
|
|
1224
|
-
};
|
|
1225
|
-
}
|
|
1226
|
-
declare class PropsStore<PropsType extends Record<TId, unknown> = Record<TId, unknown>> {
|
|
1227
|
-
private configuration?;
|
|
1228
|
-
log: unknown;
|
|
1229
|
-
fields: Record<TId, PropsType>;
|
|
1230
|
-
suscriptors: Record<TId, TPropsSuscriptor<PropsType>[]>;
|
|
1231
|
-
loggers: Record<string, (props: unknown[]) => void>;
|
|
1232
|
-
constructor(configuration?: IPropsStoreConf | undefined);
|
|
1233
|
-
destructor(): void;
|
|
1234
|
-
getAllFields(): Record<TId, PropsType>;
|
|
1235
|
-
/**
|
|
1236
|
-
* Devuelve los props actuales de un campo.
|
|
1237
|
-
*/
|
|
1238
|
-
getFieldProps<ParsedPropsType = PropsType>(fieldId: TId): ParsedPropsType;
|
|
1239
|
-
removeField(fieldId: TId): void;
|
|
1240
|
-
/**
|
|
1241
|
-
* Permite establecer un suscriptor que será llamado
|
|
1242
|
-
* cada vez que las props del campo especificado cambien.
|
|
1243
|
-
*/
|
|
1244
|
-
suscribe(fieldId: TId, callback: TPropsSuscriptor<PropsType>): () => void;
|
|
1245
|
-
/**
|
|
1246
|
-
* Actualiza o crea las props de un campo.
|
|
1247
|
-
*
|
|
1248
|
-
* La tercera prop está relacionada
|
|
1249
|
-
*/
|
|
1250
|
-
updateField<NewPropsType extends Record<TId, unknown> = Partial<PropsType>>(fieldId: TId, props: Partial<NewPropsType>, conf?: TUpdateFieldConfiguration): void;
|
|
1251
|
-
}
|
|
1252
|
-
declare const propsStore: PropsStore<TProperties>;
|
|
1253
|
-
|
|
1254
|
-
declare const PropsSelectorUndefinedObject: {};
|
|
1255
|
-
declare function isPropsConfigurationObject<Selected, PropsType extends Record<string, unknown> = TProperties>(value?: TPropsSelector<Selected, PropsType> | TPropsConfiguration<Selected, PropsType>): value is TPropsConfiguration<Selected, PropsType>;
|
|
1256
|
-
/**
|
|
1257
|
-
*
|
|
1258
|
-
* Este hook permite escuchar los cambios en las propiedades
|
|
1259
|
-
* de un campo en particular.
|
|
1260
|
-
*
|
|
1261
|
-
* @param configuration
|
|
1262
|
-
* Este objeto permite pasar las siguientes propiedades para ser
|
|
1263
|
-
* determinar el comportamiento del hook:
|
|
1264
|
-
*
|
|
1265
|
-
* **selector:** La función selectora es una función equivalente
|
|
1266
|
-
* a la que se utiliza en el useAppSelector de redux. Con ella
|
|
1267
|
-
* se puede seleccionar una porción de las props, evitando
|
|
1268
|
-
* re-renderizados innecesarios. Esto se debe a que el renderizado
|
|
1269
|
-
* solamente ocurrirá cuando la función selectora devuelva un valor
|
|
1270
|
-
* que sea distinto del anterior.
|
|
1271
|
-
*
|
|
1272
|
-
* El concepto de distinto es: si existe una función comparadora,
|
|
1273
|
-
* se determinará mediante la ejecución de dicha función, a la que
|
|
1274
|
-
* se le pasan como parámetros el objeto anterior y el nuevo.
|
|
1275
|
-
*
|
|
1276
|
-
* En caso de que no haya función comparadora, se comparará que
|
|
1277
|
-
* las props seleccionadas y las nuevas sean exactamente las mismas
|
|
1278
|
-
* (la referencia al mismo objeto).
|
|
1279
|
-
*
|
|
1280
|
-
* **comparator:** La función comparadora de la que estamos
|
|
1281
|
-
* hablando.
|
|
1282
|
-
*
|
|
1283
|
-
* **initialValue:** Un valor para setearlo al inicio, el mismo
|
|
1284
|
-
* solamente será seteado en caso de que ya no exista un valor
|
|
1285
|
-
* en el store.
|
|
1286
|
-
* @returns
|
|
1287
|
-
*/
|
|
1288
|
-
declare function usePropsSelector<Selected = TProperties, PropsType extends Record<string, unknown> = TProperties>(fieldId: TId, configuration?: TPropsConfiguration<Selected, PropsType>): Selected;
|
|
1289
|
-
/**
|
|
1290
|
-
*
|
|
1291
|
-
* Este hook permite escuchar los cambios en las propiedades
|
|
1292
|
-
* de un campo en particular.
|
|
1293
|
-
*
|
|
1294
|
-
* @param selector La función selectora es una función equivalente
|
|
1295
|
-
* a la que se utiliza en el useAppSelector de redux. Con ella
|
|
1296
|
-
* se puede seleccionar una porción de las props, evitando
|
|
1297
|
-
* re-renderizados innecesarios. Esto se debe a que el renderizado
|
|
1298
|
-
* solamente ocurrirá cuando la función selectora devuelva un valor
|
|
1299
|
-
* que sea distinto del anterior.
|
|
1300
|
-
*
|
|
1301
|
-
* El concepto de distinto es: si existe una función comparadora,
|
|
1302
|
-
* se determinará mediante la ejecución de dicha función, a la que
|
|
1303
|
-
* se le pasan como parámetros el objeto anterior y el nuevo.
|
|
1304
|
-
*
|
|
1305
|
-
* En caso de que no haya función comparadora, se comparará que
|
|
1306
|
-
* las props seleccionadas y las nuevas sean exactamente las mismas
|
|
1307
|
-
* (la referencia al mismo objeto).
|
|
1308
|
-
*
|
|
1309
|
-
* @param comparator La función comparadora de la que estamos
|
|
1310
|
-
* hablando.
|
|
1311
|
-
*
|
|
1312
|
-
* @returns
|
|
1313
|
-
*/
|
|
1314
|
-
declare function usePropsSelector<Selected = TProperties, PropsType extends Record<string, unknown> = TProperties>(fieldId: TId, selector?: TPropsSelector<Selected, PropsType> | TPropsConfiguration<Selected, PropsType>, comparator?: TPropsComparator<Selected>, anotherPropsStore?: PropsStore<PropsType>): Selected;
|
|
1315
|
-
|
|
1316
|
-
/**
|
|
1317
|
-
* El hook useDomState permite aplicar propiedades a un
|
|
1318
|
-
* elemento del DOM de la forma más eficiente posible.
|
|
1319
|
-
*
|
|
1320
|
-
* Este hook no permite el uso de sx ya que por las características
|
|
1321
|
-
* del sx, el re-renderizado es necesario.
|
|
1322
|
-
*
|
|
1323
|
-
* @example
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
* const TestComponent = () => {
|
|
1327
|
-
const { domProps, setDomProps } = useDomState<BoxProps>({
|
|
1328
|
-
style: {
|
|
1329
|
-
position: 'fixed',
|
|
1330
|
-
left: 0,
|
|
1331
|
-
top: 0,
|
|
1332
|
-
width: '150px',
|
|
1333
|
-
height: '150px',
|
|
1334
|
-
backgroundColor: '#ccc',
|
|
1335
|
-
},
|
|
1336
|
-
});
|
|
1337
|
-
const initialPosition = React.useRef({ boxX: 0, boxY: 0, x: 0, y: 0 });
|
|
1338
|
-
const isDragging = React.useRef(false);
|
|
1339
|
-
const [state, setState] = React.useState(1);
|
|
1340
|
-
|
|
1341
|
-
React.useEffect(() => {
|
|
1342
|
-
const move = (ev: MouseEvent) => {
|
|
1343
|
-
if (isDragging.current) {
|
|
1344
|
-
const moveX = ev.clientX - initialPosition.current.x;
|
|
1345
|
-
const moveY = ev.clientY - initialPosition.current.y;
|
|
1346
|
-
const newLeft = initialPosition.current.boxX + moveX;
|
|
1347
|
-
const newTop = initialPosition.current.boxY + moveY;
|
|
1348
|
-
setDomProps({
|
|
1349
|
-
style: {
|
|
1350
|
-
left: `${newLeft}px`,
|
|
1351
|
-
top: `${newTop}px`,
|
|
1352
|
-
},
|
|
1353
|
-
});
|
|
1354
|
-
}
|
|
1355
|
-
};
|
|
1356
|
-
|
|
1357
|
-
const removeSuscription = () => {
|
|
1358
|
-
isDragging.current = false;
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
document.addEventListener('mousemove', move);
|
|
1362
|
-
document.addEventListener('mouseup', removeSuscription);
|
|
1363
|
-
|
|
1364
|
-
return () => {
|
|
1365
|
-
document.removeEventListener('mousemove', move);
|
|
1366
|
-
document.removeEventListener('mouseup', removeSuscription);
|
|
1367
|
-
};
|
|
1368
|
-
}, [setDomProps]);
|
|
1369
|
-
|
|
1370
|
-
return (
|
|
1371
|
-
<Box
|
|
1372
|
-
{...domProps}
|
|
1373
|
-
onMouseDown={(ev) => {
|
|
1374
|
-
initialPosition.current = {
|
|
1375
|
-
boxX: Number.parseInt(domProps.style?.left as string, 10),
|
|
1376
|
-
boxY: Number.parseInt(domProps.style?.top as string, 10),
|
|
1377
|
-
x: ev.clientX,
|
|
1378
|
-
y: ev.clientY,
|
|
1379
|
-
};
|
|
1380
|
-
isDragging.current = true;
|
|
1381
|
-
}}
|
|
1382
|
-
>
|
|
1383
|
-
Esta caja es arrastrable. Renderizados: {state}
|
|
1384
|
-
<Button onClick={() => setState((current) => current + 1)}>
|
|
1385
|
-
Renderizar
|
|
1386
|
-
</Button>
|
|
1387
|
-
</Box>
|
|
1388
|
-
);
|
|
1389
|
-
};
|
|
1390
|
-
*/
|
|
1391
|
-
declare function useDomState<T extends HTMLAttributes<HTMLElement>>(initialDomProps?: T): {
|
|
1392
|
-
domProps: T & {
|
|
1393
|
-
ref: (el: HTMLElement) => void;
|
|
1394
|
-
};
|
|
1395
|
-
setDomProps: ({ style, ...newDomProps }: Partial<T>) => void;
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
/**
|
|
1399
|
-
* Permite manejar un estado que se actualizará únicamente siguiendo el
|
|
1400
|
-
* comportamiento esperado de un debounce
|
|
1401
|
-
*/
|
|
1402
|
-
declare function useDebouncedState<T>(timeout: number, initialState?: T): [T | undefined, (state: SetStateAction<T>, immediate?: boolean) => unknown];
|
|
1403
|
-
|
|
1404
|
-
/**
|
|
1405
|
-
* Esta clase no implementa ninguna funcionalidad de bloqueo, sino solamente se
|
|
1406
|
-
* encarga de la lógica y de los eventos.
|
|
1407
|
-
*
|
|
1408
|
-
* El concepto es que hay n niveles de bloqueo y además existe el bloqueo
|
|
1409
|
-
* forzado. Cada uno de los niveles recibe un nombre, por defecto se realizan
|
|
1410
|
-
* operaciones contra el bloque 'common' si no se pasa ninguno, pero
|
|
1411
|
-
* podría utilizarse cualquier otro. Esto es así con el fin de implementar
|
|
1412
|
-
* varios bloqueos en la misma clase, ejemplos: el bloqueo común, el bloqueo
|
|
1413
|
-
* lineal de las tablas, bloque con pantalla blanca en el inicio de formularios,
|
|
1414
|
-
* o cualquier otro que se desee. Para los bloqueos estándar se utilizan los
|
|
1415
|
-
* métodos lock y unlock.
|
|
1416
|
-
*
|
|
1417
|
-
* El bloqueo forzado por otra parte es un estado general que se puede alterar
|
|
1418
|
-
* mediante los métodos force y releaseForced. Cada vez que se bloquee o
|
|
1419
|
-
* desbloquee la pantalla, se lanzará un evento lockStateChange sin lockName y
|
|
1420
|
-
* con forced = true.
|
|
1421
|
-
*
|
|
1422
|
-
* Además, provee un evento para saber cuándo se desbloquea la pantalla
|
|
1423
|
-
* efectivamente por primera vez para cada tipo de bloqueo. Es posible a su vez
|
|
1424
|
-
* resetear la clase para que este evento sea lanzado nuevamente en el próximo
|
|
1425
|
-
* desbloqueo mediante resetRefreshFirstTime.
|
|
1426
|
-
*
|
|
1427
|
-
* El evento releasForFirstTime se dispara únicamente para el bloqueo 'common'.
|
|
1428
|
-
* Esto es así ya que sino podría dar lugar a confusión en situaciones donde no
|
|
1429
|
-
* se controle el nombre del bloqueo.
|
|
1430
|
-
*/
|
|
1431
|
-
declare const screenLocker: {
|
|
1432
|
-
"__#6@#hasReleasedFirstTime": boolean;
|
|
1433
|
-
"__#6@#wasReleasedFirstTime": boolean;
|
|
1434
|
-
"__#6@#isForced": boolean;
|
|
1435
|
-
"__#6@#locks": Record<string, boolean>;
|
|
1436
|
-
readonly hasReleasedFirstTime: boolean;
|
|
1437
|
-
readonly isForced: boolean;
|
|
1438
|
-
/**
|
|
1439
|
-
* Permite saber si un bloqueo determinado está activo o si la clase tiene
|
|
1440
|
-
* forceLock activo.
|
|
1441
|
-
*/
|
|
1442
|
-
isLocked(lockName?: string): boolean;
|
|
1443
|
-
"__#6@#shoutLockState"(lockName?: string): void;
|
|
1444
|
-
lock(lockName?: string): void;
|
|
1445
|
-
unlock(lockName?: string): void;
|
|
1446
|
-
force(): void;
|
|
1447
|
-
releaseForced(): void;
|
|
1448
|
-
"__#2@#emitter": IEmitter<{
|
|
1449
|
-
forcedStateChange: {
|
|
1450
|
-
hasReleasedFirstTime: boolean;
|
|
1451
|
-
isForced: boolean;
|
|
1452
|
-
};
|
|
1453
|
-
lockStateChange: {
|
|
1454
|
-
hasReleasedFirstTime: boolean;
|
|
1455
|
-
isLocked: boolean;
|
|
1456
|
-
lockName: string;
|
|
1457
|
-
};
|
|
1458
|
-
releaseForFirstTime: void;
|
|
1459
|
-
ready: void;
|
|
1460
|
-
}>;
|
|
1461
|
-
on<K extends TEventKey$1<{
|
|
1462
|
-
forcedStateChange: {
|
|
1463
|
-
hasReleasedFirstTime: boolean;
|
|
1464
|
-
isForced: boolean;
|
|
1465
|
-
};
|
|
1466
|
-
lockStateChange: {
|
|
1467
|
-
hasReleasedFirstTime: boolean;
|
|
1468
|
-
isLocked: boolean;
|
|
1469
|
-
lockName: string;
|
|
1470
|
-
};
|
|
1471
|
-
releaseForFirstTime: void;
|
|
1472
|
-
ready: void;
|
|
1473
|
-
}>>(eventName: K, fn: TEventReceiver$1<{
|
|
1474
|
-
forcedStateChange: {
|
|
1475
|
-
hasReleasedFirstTime: boolean;
|
|
1476
|
-
isForced: boolean;
|
|
1477
|
-
};
|
|
1478
|
-
lockStateChange: {
|
|
1479
|
-
hasReleasedFirstTime: boolean;
|
|
1480
|
-
isLocked: boolean;
|
|
1481
|
-
lockName: string;
|
|
1482
|
-
};
|
|
1483
|
-
releaseForFirstTime: void;
|
|
1484
|
-
ready: void;
|
|
1485
|
-
}[K]>): () => void;
|
|
1486
|
-
off<K_1 extends TEventKey$1<{
|
|
1487
|
-
forcedStateChange: {
|
|
1488
|
-
hasReleasedFirstTime: boolean;
|
|
1489
|
-
isForced: boolean;
|
|
1490
|
-
};
|
|
1491
|
-
lockStateChange: {
|
|
1492
|
-
hasReleasedFirstTime: boolean;
|
|
1493
|
-
isLocked: boolean;
|
|
1494
|
-
lockName: string;
|
|
1495
|
-
};
|
|
1496
|
-
releaseForFirstTime: void;
|
|
1497
|
-
ready: void;
|
|
1498
|
-
}>>(eventName: K_1, fn: TEventReceiver$1<{
|
|
1499
|
-
forcedStateChange: {
|
|
1500
|
-
hasReleasedFirstTime: boolean;
|
|
1501
|
-
isForced: boolean;
|
|
1502
|
-
};
|
|
1503
|
-
lockStateChange: {
|
|
1504
|
-
hasReleasedFirstTime: boolean;
|
|
1505
|
-
isLocked: boolean;
|
|
1506
|
-
lockName: string;
|
|
1507
|
-
};
|
|
1508
|
-
releaseForFirstTime: void;
|
|
1509
|
-
ready: void;
|
|
1510
|
-
}[K_1]>): void;
|
|
1511
|
-
emit<K_2 extends TEventKey$1<{
|
|
1512
|
-
forcedStateChange: {
|
|
1513
|
-
hasReleasedFirstTime: boolean;
|
|
1514
|
-
isForced: boolean;
|
|
1515
|
-
};
|
|
1516
|
-
lockStateChange: {
|
|
1517
|
-
hasReleasedFirstTime: boolean;
|
|
1518
|
-
isLocked: boolean;
|
|
1519
|
-
lockName: string;
|
|
1520
|
-
};
|
|
1521
|
-
releaseForFirstTime: void;
|
|
1522
|
-
ready: void;
|
|
1523
|
-
}>>(eventName: K_2, params?: {
|
|
1524
|
-
forcedStateChange: {
|
|
1525
|
-
hasReleasedFirstTime: boolean;
|
|
1526
|
-
isForced: boolean;
|
|
1527
|
-
};
|
|
1528
|
-
lockStateChange: {
|
|
1529
|
-
hasReleasedFirstTime: boolean;
|
|
1530
|
-
isLocked: boolean;
|
|
1531
|
-
lockName: string;
|
|
1532
|
-
};
|
|
1533
|
-
releaseForFirstTime: void;
|
|
1534
|
-
ready: void;
|
|
1535
|
-
}[K_2] | undefined): void;
|
|
1536
|
-
};
|
|
1537
|
-
|
|
1538
|
-
type StatefulStoreUnsuscriber = () => void;
|
|
1539
|
-
type StatefulStoreUpdater<Props> = (currentProps: Props) => Props;
|
|
1540
|
-
type StatefulStoreUpdateProps<Props> = StatefulStoreUpdater<Props> | Partial<Props>;
|
|
1541
|
-
/**
|
|
1542
|
-
* Clase facilitadora del uso de StatefulStore. Es un pequeño almacen que
|
|
1543
|
-
* permite actualizar sus propiedades y sabe cómo sincronizarse con el store de
|
|
1544
|
-
* modo que los cambios se propaguen según corresponda.
|
|
1545
|
-
*/
|
|
1546
|
-
declare abstract class BasicStoredElement<Props extends Record<string, unknown>> {
|
|
1547
|
-
#private;
|
|
1548
|
-
abstract getId(): TId;
|
|
1549
|
-
onUpdate(cb: () => void): StatefulStoreUnsuscriber;
|
|
1550
|
-
props: Props;
|
|
1551
|
-
constructor(props: Props);
|
|
1552
|
-
protected shoutUpdates: () => void;
|
|
1553
|
-
update(newProps: StatefulStoreUpdateProps<Props>): void;
|
|
1554
|
-
useProps: () => Props;
|
|
1555
|
-
}
|
|
1556
|
-
/**
|
|
1557
|
-
* Son las acciones de adición del store.
|
|
1558
|
-
*/
|
|
1559
|
-
type AddActions<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1560
|
-
[P in keyof T as `add${Capitalize<string & P>}`]: (el: T[P]) => void;
|
|
1561
|
-
};
|
|
1562
|
-
/**
|
|
1563
|
-
* Acciones de vaciado del store.
|
|
1564
|
-
*/
|
|
1565
|
-
type EmptyActions<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1566
|
-
[P in keyof T as `empty${Capitalize<string & P>}`]: () => void;
|
|
1567
|
-
};
|
|
1568
|
-
/**
|
|
1569
|
-
* Acciones de removido del store.
|
|
1570
|
-
*/
|
|
1571
|
-
type RemoveActions<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1572
|
-
[P in keyof T as `remove${Capitalize<string & P>}`]: (id: TId) => void;
|
|
1573
|
-
};
|
|
1574
|
-
/**
|
|
1575
|
-
* Conjunto de acciones disponibles del store
|
|
1576
|
-
*/
|
|
1577
|
-
type ActionMethods<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1578
|
-
actions: AddActions<T> & EmptyActions<T> & RemoveActions<T>;
|
|
1579
|
-
};
|
|
1580
|
-
/**
|
|
1581
|
-
* Método que permite obtener el listado de elementos de un tipo.
|
|
1582
|
-
*/
|
|
1583
|
-
type GetStateActions<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1584
|
-
[P in keyof T as `get${Capitalize<string & P>}State`]: () => T[P][];
|
|
1585
|
-
};
|
|
1586
|
-
/**
|
|
1587
|
-
* Método que permite conocer las propiedades de un elemento.
|
|
1588
|
-
*/
|
|
1589
|
-
type GetItemActions<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1590
|
-
[P in keyof T as `get${Capitalize<string & P>}`]: (id: TId) => T[P];
|
|
1591
|
-
};
|
|
1592
|
-
type UpdateItemActions<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1593
|
-
[P in keyof T as `update${Capitalize<string & P>}`]: (id: TId, newProps: StatefulStoreUpdateProps<T[P]['props']>) => void;
|
|
1594
|
-
};
|
|
1595
|
-
/**
|
|
1596
|
-
* Conjunto de métodos que permiten acceder al estado en un momento
|
|
1597
|
-
* determinado.
|
|
1598
|
-
*/
|
|
1599
|
-
type StateMethods<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1600
|
-
state: GetStateActions<T> & GetItemActions<T> & UpdateItemActions<T>;
|
|
1601
|
-
};
|
|
1602
|
-
/**
|
|
1603
|
-
* Es el hook encargado de permitir la escucha de listado de elementos y sus
|
|
1604
|
-
* propiedades.
|
|
1605
|
-
*/
|
|
1606
|
-
type HookUseState<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1607
|
-
[P in keyof T as `use${Capitalize<string & P>}`]: () => T[P][];
|
|
1608
|
-
};
|
|
1609
|
-
/**
|
|
1610
|
-
* Es el hook encargado de permitir la escucha de listado de elementos
|
|
1611
|
-
*/
|
|
1612
|
-
type HookUseList<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1613
|
-
[P in keyof T as `use${Capitalize<string & P>}List`]: () => T[P][];
|
|
1614
|
-
};
|
|
1615
|
-
/**
|
|
1616
|
-
* Es el hook encargado de permitir la escucha de propiedades de un elemento
|
|
1617
|
-
*/
|
|
1618
|
-
type HookUseStateById<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1619
|
-
[P in keyof T as `use${Capitalize<string & P>}ById`]: (id: TId) => T[P] | undefined;
|
|
1620
|
-
};
|
|
1621
|
-
/**
|
|
1622
|
-
* Conjunto de hooks del store.
|
|
1623
|
-
*/
|
|
1624
|
-
type HooksMethods<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1625
|
-
hooks: HookUseState<T> & HookUseStateById<T> & HookUseList<T>;
|
|
1626
|
-
};
|
|
1627
|
-
/**
|
|
1628
|
-
* Es la suscripción encargada de permitir la escucha de propiedades de un
|
|
1629
|
-
* elemento
|
|
1630
|
-
*/
|
|
1631
|
-
type SuscribeById<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1632
|
-
[P in keyof T as `change${Capitalize<string & P>}Element`]: (id: TId, cb: (props: T[P]) => unknown) => StatefulStoreUnsuscriber;
|
|
1633
|
-
};
|
|
1634
|
-
/**
|
|
1635
|
-
* Es la suscripción encaragada de permitir la escucha de cambios en la lista y
|
|
1636
|
-
* las propiedades de sus elementos.
|
|
1637
|
-
*/
|
|
1638
|
-
type SuscribeToListChange<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1639
|
-
[P in keyof T as `change${Capitalize<string & P>}`]: (cb: (props: T[P][]) => unknown) => StatefulStoreUnsuscriber;
|
|
1640
|
-
};
|
|
1641
|
-
/**
|
|
1642
|
-
* Es la suscripción encaragada de permitir la escucha de cambios en la
|
|
1643
|
-
* cantidad de elementos de la lista, pero no en las propiedades de los
|
|
1644
|
-
* elementos.
|
|
1645
|
-
*/
|
|
1646
|
-
type SuscribeToListCountChange<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1647
|
-
[P in keyof T as `change${Capitalize<string & P>}Ammount`]: (cb: (props: T[P][]) => unknown) => StatefulStoreUnsuscriber;
|
|
1648
|
-
};
|
|
1649
|
-
type SuscribeMethods<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1650
|
-
on: SuscribeById<T> & SuscribeToListChange<T> & SuscribeToListCountChange<T>;
|
|
1651
|
-
};
|
|
1652
|
-
type InitialStates<T extends Record<string, BasicStoredElement<any>>> = {
|
|
1653
|
-
[P in keyof T as `${string & P}State`]: T[P][];
|
|
1654
|
-
};
|
|
1655
|
-
/**
|
|
1656
|
-
* Este store permite mantener `N` listados de objetos y por cada tipo de
|
|
1657
|
-
* objeto ofrece métodos para agregar, eliminar, obtener uno, obtener todos y
|
|
1658
|
-
* un hook para conocer el listado en tiempo real.
|
|
1659
|
-
*
|
|
1660
|
-
* **Métodos disponibles**
|
|
1661
|
-
*
|
|
1662
|
-
* - **action.addXXX**: Agrega un elemento de tipo XXX a la lista.
|
|
1663
|
-
* - **action.emptyXXX**: Vacía el listado de tipo XXX.
|
|
1664
|
-
* - **action.removeXXX**: Elimina un elemento de tipo XXX de la lista.
|
|
1665
|
-
* - **hooks.useXXX**: Permite conocer el listado de elementos y el cambio
|
|
1666
|
-
* en sus propiedades en tiempo real.
|
|
1667
|
-
* - **hooks.useXXXById**: Permite conocer los cambios a un elemento de la
|
|
1668
|
-
* lista en tiempo real.
|
|
1669
|
-
* - **hooks.useXXXList**: Permite conocer el listado de
|
|
1670
|
-
* elementos pero no reacciona a los cambios en las propiedades de los
|
|
1671
|
-
* elementos.
|
|
1672
|
-
* - **on.changeXXX**: Permite suscribirse al listado de elementos y
|
|
1673
|
-
* cambios en sus propiedades.
|
|
1674
|
-
* - **on.changeXXXAmmount**: Permite suscribirse
|
|
1675
|
-
* al listado de elementos, sin tomar en cuenta el cambio en las propiedades
|
|
1676
|
-
* de sus items.
|
|
1677
|
-
* - **on.changeXXXElement**: Permite suscribirse al cambio de
|
|
1678
|
-
* propiedades de un ítem particular
|
|
1679
|
-
* - **state.getXXX**: Permite obtener el
|
|
1680
|
-
* esatdo de un elemento particular de la lista.
|
|
1681
|
-
* - **state.getXXXState**:
|
|
1682
|
-
* Permite obtener el estado del listado completo de un tipo de elementos.
|
|
1683
|
-
* - **state.updateXXX**: Es un atajo para state.getXXX(id).update
|
|
1684
|
-
*
|
|
1685
|
-
* La funcionalidad de actualización se implementa en el objeto almacenado y es
|
|
1686
|
-
* comunicada en forma automática al store, de forma que el store no conoce
|
|
1687
|
-
* solamente cuántos y cuáles elementos hay almacenados, sino que además refleja
|
|
1688
|
-
* en tiempo real el estado de sus propiedades.
|
|
1689
|
-
*
|
|
1690
|
-
* @example
|
|
1691
|
-
*
|
|
1692
|
-
type TPeople = { name: string };
|
|
1693
|
-
class People extends BasicStoredElement<TPeople> {
|
|
1694
|
-
getId(): TId {
|
|
1695
|
-
return this.props.name;
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
class Schedule extends BasicStoredElement<{ day: string; task: string }>
|
|
1700
|
-
{
|
|
1701
|
-
getId() {
|
|
1702
|
-
return this.props.day;
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
|
-
const r = makeStatefulStore(
|
|
1707
|
-
{
|
|
1708
|
-
people: People.prototype,
|
|
1709
|
-
schedules: Schedule.prototype,
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
peopleState: [new People({ name: 'A' }), new People({ name: 'B' })],
|
|
1713
|
-
},
|
|
1714
|
-
);
|
|
1715
|
-
|
|
1716
|
-
const p = r.hooks.usePeople();
|
|
1717
|
-
p[0].props.name;
|
|
1718
|
-
|
|
1719
|
-
r.hooks.usePeople();
|
|
1720
|
-
|
|
1721
|
-
r.actions.removePeople('asdf');
|
|
1722
|
-
|
|
1723
|
-
r.actions.addPeople(new People({ name: 'asdf' }));
|
|
1724
|
-
r.actions.removePeople('asdf');
|
|
1725
|
-
|
|
1726
|
-
r.state.getPeopleState();
|
|
1727
|
-
const pep = r.state.getPeople('asdf')
|
|
1728
|
-
|
|
1729
|
-
const ph = r.hooks.usePeople();
|
|
1730
|
-
const sch = r.hooks.useSchedules();
|
|
1731
|
-
*/
|
|
1732
|
-
declare function makeStatefulStore<T extends Record<string, BasicStoredElement<any>>>(entries: T, initialStates?: Partial<InitialStates<T>>): ActionMethods<T> & HooksMethods<T> & StateMethods<T> & SuscribeMethods<T>;
|
|
1733
|
-
|
|
1734
|
-
declare const persistentStorage: {
|
|
1735
|
-
[key: string]: unknown;
|
|
1736
|
-
remove(prop: string): unknown;
|
|
1737
|
-
};
|
|
1738
|
-
declare global {
|
|
1739
|
-
interface Window {
|
|
1740
|
-
persistentStorage: typeof persistentStorage;
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
/**
|
|
1745
|
-
* @param prop este nombre define el nombre del localStorage, las modificaciones a este parametro no van a tener efecto.
|
|
1746
|
-
*/
|
|
1747
|
-
declare function useLocalStorage<T>(prop: string, defaultValue?: T): [T, (newValue: T) => void];
|
|
1748
|
-
|
|
1749
|
-
declare function ucfirst(word: string): string;
|
|
1750
|
-
|
|
1751
|
-
/**
|
|
1752
|
-
* Toma un valor y devuelve true o false según las
|
|
1753
|
-
* siguientes condiciones:
|
|
1754
|
-
*
|
|
1755
|
-
* Si es string, ['',
|
|
1756
|
-
* 'false'].includes(value.toLowerCase()) => false, todo lo
|
|
1757
|
-
* demás => true.
|
|
1758
|
-
*
|
|
1759
|
-
* Si es array, [] => false, [...] => true.
|
|
1760
|
-
*
|
|
1761
|
-
* Todo lo demás !!value
|
|
1762
|
-
*
|
|
1763
|
-
* @example
|
|
1764
|
-
*
|
|
1765
|
-
* toBoolean('true') // true
|
|
1766
|
-
* toBoolean('TrUE') // true
|
|
1767
|
-
* toBoolean('FAlSe') // false
|
|
1768
|
-
* toBoolean(0) // false
|
|
1769
|
-
* toBoolean(1) // true
|
|
1770
|
-
* toBoolean([0]) // true
|
|
1771
|
-
* toBoolean([]) // false
|
|
1772
|
-
*/
|
|
1773
|
-
declare function toBoolean(value: unknown): boolean;
|
|
1774
|
-
|
|
1775
|
-
declare const parseXmlAsync: <T>(xml: string) => Promise<T>;
|
|
1776
|
-
|
|
1777
|
-
export { BasicStoredElement, EventEmitter, HashedEventEmitter, History, IOnFocusConfiguration, IParameter, ISetBoundary, PropsSelectorUndefinedObject, PropsStore, StatefulStoreUpdateProps, StatefulStoreUpdater, TApiaAction, TApiaActions, TApiaCellDefinition, TApiaComplexCell, TApiaFieldPropsObj, TApiaFilter, TApiaFilterOption, TApiaFilterValue, TApiaFormButton, TApiaFormElement, TApiaFormElementOption, TApiaFunction, TApiaFunctionPageInfo, TApiaLoad, TApiaLoadForm, TApiaLoadText, TApiaMessage, TApiaMultiplePossibleValue, TApiaPossibleValue, TApiaRadioPossibleValue, TApiaRowDefinition, TApiaSelectPossibleValue, TApiaSystemMessageObj, TApiaTableFunction, TCallback, TDateFormat, TDispatchCallback, TFieldEvent, TFieldScriptEvent, TFieldScriptEvents, TFieldServerEvent, TFieldServerEvents, TFncParams, TFocusRetriever, THistoryCount, THistoryStep, THistoryStepChange, TId, TKey, TMap$1 as TMap, TMessage, TModify, TNotificationMessage, TPropsComparator, TPropsConfiguration, TPropsSelector, TRequireOnlyOne, TShortcutBranch, TUpdateFieldConfiguration, Url, WithEventsValue, addBoundary, animate, apiaDateToStandarFormat, arrayOrArray, autoDisconnectMutationObserver, cantFocusSelector, customEvents, dateToApiaFormat, debugDispatcher, decrypt, disableChildrenFocus, downloadUrl, enableChildrenFocus, enableDebugDispatcher, encrypt, eventEmitterBaseFunction, findOffsetRelativeToScrollParent, findScrollContainer, focus, focusSelector, formatMessage, getDateFormat, getFocusSelector, getIndex, getLabel, getSpecificParent, getValueByPath, globalFocus, isChild, isDebugDispatcherEnabled, isPropsConfigurationObject, makeImperativeComponent, makeSingleImperativeComponent, makeStatefulStore, noNaN, notificationsSelector, parseAsSize, parseXmlAsync, persistentStorage, propsStore, screenLocker, scrollParentIntoElement, setValueByPath, shallowCompareArrays, shallowEqual, shortcutController, toBoolean, ucfirst, useCombinedRefs, useDebouncedCallback, useDebouncedState, useDomState, useImperativeComponentContext, useImperativeComponentEvents, useLatest, useLocalStorage, useMount, usePanAndZoom, usePrevious, usePropsSelector, useShallowMemo, useStateRef, useUnmount, useUpdateEffect };
|
|
1
|
+
export { animate } from './animate/index.js';
|
|
2
|
+
export { default as arrayOrArray } from './array/arrayOrArray.js';
|
|
3
|
+
export { getIndex } from './array/getIndex.js';
|
|
4
|
+
export { decrypt } from './crypto/decrypt.js';
|
|
5
|
+
export { encrypt } from './crypto/encrypt.js';
|
|
6
|
+
export { apiaDateToStandarFormat } from './date/apiaDateToStandarFormat.js';
|
|
7
|
+
export { dateToApiaFormat } from './date/dateToApiaFormat.js';
|
|
8
|
+
export { getDateFormat } from './date/getDateFormat.js';
|
|
9
|
+
export { TDispatchCallback, debugDispatcher, isDebugDispatcherEnabled } from './debug/debugDispatcher.js';
|
|
10
|
+
export { TCallback, TKey, TShortcutBranch, shortcutController } from './debug/shortcutController.js';
|
|
11
|
+
export { DownloadStringAsDocProps, downloadStringAsDoc } from './documents/downloadStringAsDoc.js';
|
|
12
|
+
export { defaultGetNameFromResponse, downloadUrl } from './documents/downloadUrl.js';
|
|
13
|
+
export { openAndReadFile } from './documents/openAndReadFile.js';
|
|
14
|
+
export { autoDisconnectMutationObserver } from './dom/autoDisconnectMutationObserver.js';
|
|
15
|
+
export { findOffsetRelativeToScrollParent } from './dom/findOffsetRelativeToScrollParent.js';
|
|
16
|
+
export { findScrollContainer } from './dom/findScrollContainer.js';
|
|
17
|
+
export { scrollParentIntoElement } from './dom/scrollParentIntoElement.js';
|
|
18
|
+
export { usePanAndZoom } from './dom/usePanAndZoom.js';
|
|
19
|
+
export { customEvents } from './dom/customEvents.js';
|
|
20
|
+
export { cantFocusSelector, focusSelector, getFocusSelector } from './dom/getFocusSelector.js';
|
|
21
|
+
export { getSpecificParent } from './dom/getSpecificParent.js';
|
|
22
|
+
export { isChild } from './dom/isChild.js';
|
|
23
|
+
export { IParameter, Url } from './dom/url.js';
|
|
24
|
+
export { disableChildrenFocus, enableChildrenFocus } from './dom/enableChildrenFocus.js';
|
|
25
|
+
export { decodeHTMLEntities } from './encoding/index.js';
|
|
26
|
+
export { BouncingEmitter, DebounceOptions, ThrottleOptions } from './events/BouncingEmitter.js';
|
|
27
|
+
export { EventEmitter } from './events/EventEmitter.js';
|
|
28
|
+
export { StatefulEmitter, isSetter } from './events/StatefulEmitter.js';
|
|
29
|
+
export { IOnFocusConfiguration, TFocusRetriever, focus, notificationsSelector } from './focus/focusController.js';
|
|
30
|
+
export { globalFocus } from './focus/globalFocus.js';
|
|
31
|
+
export { History, THistoryCount, THistoryStep, THistoryStepChange } from './history/History.js';
|
|
32
|
+
export { useCombinedRefs } from './hooks/useCombinedRefs.js';
|
|
33
|
+
export { useDebouncedCallback } from './hooks/useDebouncedCallback.js';
|
|
34
|
+
export { useLatest } from './hooks/useLatest.js';
|
|
35
|
+
export { useMount } from './hooks/useMount.js';
|
|
36
|
+
export { useUnmount } from './hooks/useUnmount.js';
|
|
37
|
+
export { usePrevious } from './hooks/usePrevious.js';
|
|
38
|
+
export { useStateRef } from './hooks/useStateRef.js';
|
|
39
|
+
export { useSubscription } from './hooks/useSubscription.js';
|
|
40
|
+
export { useUpdateEffect } from './hooks/useUpdateEffect.js';
|
|
41
|
+
export { shallowCompareArrays, shallowEqual, useShallowMemo } from './hooks/useShallowMemo.js';
|
|
42
|
+
export { default as makeImperativeComponent } from './imperative/makeImperativeComponent.js';
|
|
43
|
+
export { default as makeSingleImperativeComponent } from './imperative/makeSingleImperativeComponent.js';
|
|
44
|
+
export { default as useImperativeComponentEvents } from './imperative/useImperativeComponentEvents.js';
|
|
45
|
+
export { default as useImperativeComponentContext } from './imperative/useImperativeIdentifierContext.js';
|
|
46
|
+
export { getLabel } from './labels/getLabel.js';
|
|
47
|
+
export { formatMessage } from './labels/formatMessage.js';
|
|
48
|
+
export { ISetBoundary, addBoundary, noNaN, parseAsSize } from './number/index.js';
|
|
49
|
+
export { getValueByPath } from './objects/getValueByPath.js';
|
|
50
|
+
export { setValueByPath } from './objects/setValueByPath.js';
|
|
51
|
+
export { PropsSelectorUndefinedObject, PropsStore, propsStore } from './propsStore/propsStore.js';
|
|
52
|
+
export { isPropsConfigurationObject, usePropsSelector } from './propsStore/usePropsSelector.js';
|
|
53
|
+
export { TPropsComparator, TPropsConfiguration, TPropsSelector, TUpdateFieldConfiguration } from './propsStore/types.js';
|
|
54
|
+
export { useDomState } from './states/useDomState.js';
|
|
55
|
+
export { useDebouncedState } from './states/useDebouncedState.js';
|
|
56
|
+
export { screenLocker } from './screenLock/screenLocker.js';
|
|
57
|
+
export { BasicStoredElement, StatefulStoreUpdateProps, StatefulStoreUpdater, makeStatefulStore } from './storage/StatefulStore.js';
|
|
58
|
+
export { default as persistentStorage } from './storage/persistentStorage.js';
|
|
59
|
+
export { useLocalStorage } from './storage/useLocalStorage.js';
|
|
60
|
+
export { alignment } from './string/alignment.js';
|
|
61
|
+
export { ucfirst } from './string/ucfirst.js';
|
|
62
|
+
export { toBoolean } from './typeGuards/toBoolean.js';
|
|
63
|
+
export { TApiaAction, TApiaActions, TApiaCellDefinition, TApiaComplexCell, TApiaFunction, TApiaFunctionPageInfo, TApiaLoad, TApiaLoadText, TApiaMessage, TApiaRowDefinition, TApiaSystemMessageObj, TApiaTableFunction, TMessage, TNotificationMessage } from './types/apia/common.js';
|
|
64
|
+
export { TDateFormat } from './types/apia/date.js';
|
|
65
|
+
export { TApiaFieldPropsObj, TApiaFilter, TApiaFilterOption, TApiaFilterValue, TApiaFormButton, TApiaFormElement, TApiaFormElementOption, TApiaLoadForm, TApiaMultiplePossibleValue, TApiaPossibleValue, TApiaRadioPossibleValue, TApiaSelectPossibleValue, TFieldEvent, TFieldScriptEvent, TFieldScriptEvents, TFieldServerEvent, TFieldServerEvents, TFncParams } from './types/apia/forms.js';
|
|
66
|
+
export { TId, TMap, TModify, TRequireOnlyOne } from './types/misc.js';
|
|
67
|
+
export { parseXmlAsync } from './xml/parseXmlAsync.js';
|
|
68
|
+
export { Callback, Map, UnSubscriber } from './events/types.js';
|
|
69
|
+
//# sourceMappingURL=index.d.ts.map
|