@archbase/core 3.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.
Files changed (248) hide show
  1. package/README.md +42 -0
  2. package/dist/archbase-core-3.0.0.tgz +0 -0
  3. package/dist/context/ArchbaseAppContext.d.ts +43 -0
  4. package/dist/context/ArchbaseGlobalProvider.d.ts +33 -0
  5. package/dist/context/ArchbaseSimpleAppContext.d.ts +34 -0
  6. package/dist/context/index.d.ts +5 -0
  7. package/dist/error/ArchbaseError.d.ts +14 -0
  8. package/dist/error/index.d.ts +11 -0
  9. package/dist/errorboundary/ArchbaseErrorBoundary.d.ts +21 -0
  10. package/dist/errorboundary/ArchbaseErrorBoundaryContext.d.ts +6 -0
  11. package/dist/errorboundary/ArchbaseErrorFallback.d.ts +7 -0
  12. package/dist/errorboundary/assertArchbaseErrorBoundaryContext.d.ts +2 -0
  13. package/dist/errorboundary/index.d.ts +6 -0
  14. package/dist/errorboundary/types.d.ts +39 -0
  15. package/dist/errorboundary/useArchbaseErrorBoundary.d.ts +5 -0
  16. package/dist/errorboundary/withArchbaseErrorBoundary.d.ts +3 -0
  17. package/dist/exceptions/ApiError.d.ts +27 -0
  18. package/dist/exceptions/ArchbaseErrorHelper.d.ts +2 -0
  19. package/dist/exceptions/ArchbaseException.d.ts +9 -0
  20. package/dist/exceptions/index.d.ts +3 -0
  21. package/dist/fallback/ArchbaseSafeMigrationWrapper.d.ts +57 -0
  22. package/dist/helper/ArchbaseClickOutside.d.ts +9 -0
  23. package/dist/helper/ArchbaseObjectHelper.d.ts +9 -0
  24. package/dist/helper/index.d.ts +2 -0
  25. package/dist/hooks/ArchbaseDepencyManager.d.ts +70 -0
  26. package/dist/hooks/index.d.ts +15 -0
  27. package/dist/hooks/lifecycle/index.d.ts +54 -0
  28. package/dist/hooks/useArchbaseAsyncFunction.d.ts +1 -0
  29. package/dist/hooks/useArchbaseBool.d.ts +6 -0
  30. package/dist/hooks/useArchbaseForceRenderer.d.ts +1 -0
  31. package/dist/hooks/useArchbaseLatest.d.ts +3 -0
  32. package/dist/hooks/useArchbasePassiveLayoutEffect.d.ts +3 -0
  33. package/dist/hooks/useArchbasePasswordRemember.d.ts +11 -0
  34. package/dist/hooks/useArchbaseReducer.d.ts +21 -0
  35. package/dist/hooks/useArchbaseResizeObserver.d.ts +11 -0
  36. package/dist/hooks/useArchbaseSize.d.ts +12 -0
  37. package/dist/hooks/useArchbaseStateWithCallback.d.ts +2 -0
  38. package/dist/hooks/useArchbaseTextSelection.d.ts +14 -0
  39. package/dist/hooks/useArchbaseTheme.d.ts +6 -0
  40. package/dist/hooks/useArchbaseValidator.d.ts +2 -0
  41. package/dist/index.css +108 -0
  42. package/dist/index.d.ts +25 -0
  43. package/dist/index.js +9728 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/ioc/ArchbaseIOCHelper.d.ts +56 -0
  46. package/dist/ioc/ArchbaseIOCTypes.d.ts +11 -0
  47. package/dist/ioc/index.d.ts +2 -0
  48. package/dist/json/ArchbaseJacksonParser.d.ts +15 -0
  49. package/dist/json/index.d.ts +1 -0
  50. package/dist/locales/config.d.ts +1781 -0
  51. package/dist/locales/index.d.ts +1 -0
  52. package/dist/rsql/ast/ComparisonOperator.d.ts +24 -0
  53. package/dist/rsql/ast/LogicOperator.d.ts +13 -0
  54. package/dist/rsql/ast/Node.d.ts +41 -0
  55. package/dist/rsql/ast/ReservedChars.d.ts +4 -0
  56. package/dist/rsql/ast/index.d.ts +4 -0
  57. package/dist/rsql/builder/index.d.ts +20 -0
  58. package/dist/rsql/emitter/index.d.ts +19 -0
  59. package/dist/rsql/index.d.ts +7 -0
  60. package/dist/rsql/parser/Error.d.ts +7 -0
  61. package/dist/rsql/parser/ParserContext.d.ts +15 -0
  62. package/dist/rsql/parser/ParserOperation.d.ts +43 -0
  63. package/dist/rsql/parser/ParserProduction.d.ts +14 -0
  64. package/dist/rsql/parser/index.d.ts +3 -0
  65. package/dist/rsql/parser/lexer/LexerContext.d.ts +8 -0
  66. package/dist/rsql/parser/lexer/LexerProcessor.d.ts +8 -0
  67. package/dist/rsql/parser/lexer/Token.d.ts +38 -0
  68. package/dist/rsql/parser/lexer/lex.d.ts +3 -0
  69. package/dist/rsql/parser/lexer/processors/scanNonReservedSymbol.d.ts +3 -0
  70. package/dist/rsql/parser/lexer/processors/scanSymbol.d.ts +3 -0
  71. package/dist/rsql/parser/lexer/processors/seekAnyToken.d.ts +4 -0
  72. package/dist/rsql/parser/lexer/processors/seekComparisonCustomOperatorToken.d.ts +4 -0
  73. package/dist/rsql/parser/lexer/processors/seekComparisonOperatorToken.d.ts +4 -0
  74. package/dist/rsql/parser/lexer/processors/seekLogicCanonicalOperatorToken.d.ts +4 -0
  75. package/dist/rsql/parser/lexer/processors/seekLogicVerboseOperatorToken.d.ts +4 -0
  76. package/dist/rsql/parser/lexer/processors/seekParenthesisToken.d.ts +4 -0
  77. package/dist/rsql/parser/lexer/processors/seekQuotedToken.d.ts +4 -0
  78. package/dist/rsql/parser/lexer/processors/seekUnquotedToken.d.ts +4 -0
  79. package/dist/rsql/parser/lexer/processors/skipWhitespace.d.ts +3 -0
  80. package/dist/types/OptionsResult.d.ts +8 -0
  81. package/dist/types/filter.d.ts +56 -0
  82. package/dist/types/index.d.ts +5 -0
  83. package/dist/types/querybuilder.d.ts +85 -0
  84. package/dist/types/token.d.ts +50 -0
  85. package/dist/types/types.d.ts +5 -0
  86. package/dist/utils/archbaseLogo.d.ts +3 -0
  87. package/dist/utils/array.d.ts +1 -0
  88. package/dist/utils/convertImageToBase64.d.ts +1 -0
  89. package/dist/utils/deepFilter.d.ts +2 -0
  90. package/dist/utils/deepFind.d.ts +2 -0
  91. package/dist/utils/deepForEach.d.ts +2 -0
  92. package/dist/utils/deepMap.d.ts +2 -0
  93. package/dist/utils/dom.d.ts +2 -0
  94. package/dist/utils/enum-utils.d.ts +1 -0
  95. package/dist/utils/filter.d.ts +2 -0
  96. package/dist/utils/getElementName.d.ts +2 -0
  97. package/dist/utils/groupByType.d.ts +2 -0
  98. package/dist/utils/hasChildren.d.ts +4 -0
  99. package/dist/utils/hasComplexChildren.d.ts +4 -0
  100. package/dist/utils/index.d.ts +24 -0
  101. package/dist/utils/isBase64.d.ts +1 -0
  102. package/dist/utils/isEmail.d.ts +1 -0
  103. package/dist/utils/masker.d.ts +27 -0
  104. package/dist/utils/nestedObject.d.ts +7 -0
  105. package/dist/utils/object.d.ts +10 -0
  106. package/dist/utils/objectPrototype.d.ts +2 -0
  107. package/dist/utils/onlyText.d.ts +3 -0
  108. package/dist/utils/onlyValid.d.ts +2 -0
  109. package/dist/utils/propertyUtils.d.ts +1 -0
  110. package/dist/utils/string-utils.d.ts +138 -0
  111. package/dist/utils/string.d.ts +11 -0
  112. package/dist/validation/ValidationErrorsContext.d.ts +25 -0
  113. package/dist/validator/ArchbaseValidator.d.ts +21 -0
  114. package/dist/validator/container.d.ts +25 -0
  115. package/dist/validator/decorator/ValidationOptions.d.ts +25 -0
  116. package/dist/validator/decorator/array/ArrayContains.d.ts +12 -0
  117. package/dist/validator/decorator/array/ArrayMaxSize.d.ts +12 -0
  118. package/dist/validator/decorator/array/ArrayMinSize.d.ts +12 -0
  119. package/dist/validator/decorator/array/ArrayNotContains.d.ts +12 -0
  120. package/dist/validator/decorator/array/ArrayNotEmpty.d.ts +12 -0
  121. package/dist/validator/decorator/array/ArrayUnique.d.ts +13 -0
  122. package/dist/validator/decorator/common/Allow.d.ts +5 -0
  123. package/dist/validator/decorator/common/Equals.d.ts +10 -0
  124. package/dist/validator/decorator/common/IsDefined.d.ts +10 -0
  125. package/dist/validator/decorator/common/IsEmpty.d.ts +10 -0
  126. package/dist/validator/decorator/common/IsIn.d.ts +10 -0
  127. package/dist/validator/decorator/common/IsLatLong.d.ts +10 -0
  128. package/dist/validator/decorator/common/IsLatitude.d.ts +10 -0
  129. package/dist/validator/decorator/common/IsLongitude.d.ts +10 -0
  130. package/dist/validator/decorator/common/IsNotEmpty.d.ts +10 -0
  131. package/dist/validator/decorator/common/IsNotIn.d.ts +10 -0
  132. package/dist/validator/decorator/common/IsOptional.d.ts +5 -0
  133. package/dist/validator/decorator/common/NotEquals.d.ts +10 -0
  134. package/dist/validator/decorator/common/Validate.d.ts +14 -0
  135. package/dist/validator/decorator/common/ValidateBy.d.ts +11 -0
  136. package/dist/validator/decorator/common/ValidateIf.d.ts +5 -0
  137. package/dist/validator/decorator/common/ValidateNested.d.ts +5 -0
  138. package/dist/validator/decorator/common/ValidatePromise.d.ts +5 -0
  139. package/dist/validator/decorator/date/MaxDate.d.ts +10 -0
  140. package/dist/validator/decorator/date/MinDate.d.ts +10 -0
  141. package/dist/validator/decorator/decorators.d.ts +111 -0
  142. package/dist/validator/decorator/number/IsDivisibleBy.d.ts +10 -0
  143. package/dist/validator/decorator/number/IsNegative.d.ts +10 -0
  144. package/dist/validator/decorator/number/IsPositive.d.ts +10 -0
  145. package/dist/validator/decorator/number/Max.d.ts +10 -0
  146. package/dist/validator/decorator/number/Min.d.ts +10 -0
  147. package/dist/validator/decorator/object/IsInstance.d.ts +10 -0
  148. package/dist/validator/decorator/object/IsNotEmptyObject.d.ts +16 -0
  149. package/dist/validator/decorator/string/Contains.d.ts +12 -0
  150. package/dist/validator/decorator/string/IsAlpha.d.ts +12 -0
  151. package/dist/validator/decorator/string/IsAlphanumeric.d.ts +12 -0
  152. package/dist/validator/decorator/string/IsAscii.d.ts +12 -0
  153. package/dist/validator/decorator/string/IsBIC.d.ts +12 -0
  154. package/dist/validator/decorator/string/IsBase32.d.ts +12 -0
  155. package/dist/validator/decorator/string/IsBase58.d.ts +12 -0
  156. package/dist/validator/decorator/string/IsBase64.d.ts +12 -0
  157. package/dist/validator/decorator/string/IsBooleanString.d.ts +12 -0
  158. package/dist/validator/decorator/string/IsBtcAddress.d.ts +12 -0
  159. package/dist/validator/decorator/string/IsByteLength.d.ts +12 -0
  160. package/dist/validator/decorator/string/IsCreditCard.d.ts +12 -0
  161. package/dist/validator/decorator/string/IsCurrency.d.ts +12 -0
  162. package/dist/validator/decorator/string/IsDataURI.d.ts +12 -0
  163. package/dist/validator/decorator/string/IsDateString.d.ts +10 -0
  164. package/dist/validator/decorator/string/IsDecimal.d.ts +12 -0
  165. package/dist/validator/decorator/string/IsEAN.d.ts +12 -0
  166. package/dist/validator/decorator/string/IsEmail.d.ts +12 -0
  167. package/dist/validator/decorator/string/IsEthereumAddress.d.ts +12 -0
  168. package/dist/validator/decorator/string/IsFQDN.d.ts +12 -0
  169. package/dist/validator/decorator/string/IsFirebasePushId.d.ts +12 -0
  170. package/dist/validator/decorator/string/IsFullWidth.d.ts +12 -0
  171. package/dist/validator/decorator/string/IsHSL.d.ts +14 -0
  172. package/dist/validator/decorator/string/IsHalfWidth.d.ts +12 -0
  173. package/dist/validator/decorator/string/IsHash.d.ts +14 -0
  174. package/dist/validator/decorator/string/IsHexColor.d.ts +12 -0
  175. package/dist/validator/decorator/string/IsHexadecimal.d.ts +12 -0
  176. package/dist/validator/decorator/string/IsIBAN.d.ts +12 -0
  177. package/dist/validator/decorator/string/IsIP.d.ts +13 -0
  178. package/dist/validator/decorator/string/IsISBN.d.ts +13 -0
  179. package/dist/validator/decorator/string/IsISIN.d.ts +12 -0
  180. package/dist/validator/decorator/string/IsISO31661Alpha2.d.ts +10 -0
  181. package/dist/validator/decorator/string/IsISO31661Alpha3.d.ts +10 -0
  182. package/dist/validator/decorator/string/IsISO8601.d.ts +14 -0
  183. package/dist/validator/decorator/string/IsISRC.d.ts +12 -0
  184. package/dist/validator/decorator/string/IsISSN.d.ts +12 -0
  185. package/dist/validator/decorator/string/IsIdentityCard.d.ts +16 -0
  186. package/dist/validator/decorator/string/IsJSON.d.ts +12 -0
  187. package/dist/validator/decorator/string/IsJWT.d.ts +12 -0
  188. package/dist/validator/decorator/string/IsLocale.d.ts +12 -0
  189. package/dist/validator/decorator/string/IsLowercase.d.ts +12 -0
  190. package/dist/validator/decorator/string/IsMacAddress.d.ts +13 -0
  191. package/dist/validator/decorator/string/IsMagnetURI.d.ts +12 -0
  192. package/dist/validator/decorator/string/IsMilitaryTime.d.ts +12 -0
  193. package/dist/validator/decorator/string/IsMimeType.d.ts +12 -0
  194. package/dist/validator/decorator/string/IsMobilePhone.d.ts +28 -0
  195. package/dist/validator/decorator/string/IsMongoId.d.ts +12 -0
  196. package/dist/validator/decorator/string/IsMultibyte.d.ts +12 -0
  197. package/dist/validator/decorator/string/IsNumberString.d.ts +12 -0
  198. package/dist/validator/decorator/string/IsOctal.d.ts +12 -0
  199. package/dist/validator/decorator/string/IsPassportNumber.d.ts +12 -0
  200. package/dist/validator/decorator/string/IsPhoneNumber.d.ts +19 -0
  201. package/dist/validator/decorator/string/IsPort.d.ts +10 -0
  202. package/dist/validator/decorator/string/IsPostalCode.d.ts +12 -0
  203. package/dist/validator/decorator/string/IsRFC3339.d.ts +12 -0
  204. package/dist/validator/decorator/string/IsRgbColor.d.ts +14 -0
  205. package/dist/validator/decorator/string/IsSemVer.d.ts +12 -0
  206. package/dist/validator/decorator/string/IsStrongPassword.d.ts +16 -0
  207. package/dist/validator/decorator/string/IsSurrogatePair.d.ts +12 -0
  208. package/dist/validator/decorator/string/IsTimeZone.d.ts +12 -0
  209. package/dist/validator/decorator/string/IsUUID.d.ts +12 -0
  210. package/dist/validator/decorator/string/IsUppercase.d.ts +12 -0
  211. package/dist/validator/decorator/string/IsUrl.d.ts +12 -0
  212. package/dist/validator/decorator/string/IsVariableWidth.d.ts +12 -0
  213. package/dist/validator/decorator/string/Length.d.ts +12 -0
  214. package/dist/validator/decorator/string/Matches.d.ts +14 -0
  215. package/dist/validator/decorator/string/MaxLength.d.ts +12 -0
  216. package/dist/validator/decorator/string/MinLength.d.ts +12 -0
  217. package/dist/validator/decorator/string/NotContains.d.ts +12 -0
  218. package/dist/validator/decorator/string/is-iso4217-currency-code.d.ts +10 -0
  219. package/dist/validator/decorator/string/is-tax-id.d.ts +20 -0
  220. package/dist/validator/decorator/typechecker/IsArray.d.ts +10 -0
  221. package/dist/validator/decorator/typechecker/IsBoolean.d.ts +10 -0
  222. package/dist/validator/decorator/typechecker/IsDate.d.ts +10 -0
  223. package/dist/validator/decorator/typechecker/IsEnum.d.ts +10 -0
  224. package/dist/validator/decorator/typechecker/IsInt.d.ts +10 -0
  225. package/dist/validator/decorator/typechecker/IsNumber.d.ts +18 -0
  226. package/dist/validator/decorator/typechecker/IsObject.d.ts +12 -0
  227. package/dist/validator/decorator/typechecker/IsString.d.ts +10 -0
  228. package/dist/validator/index.d.ts +49 -0
  229. package/dist/validator/metadata/ConstraintMetadata.d.ts +23 -0
  230. package/dist/validator/metadata/MetadataStorage.d.ts +42 -0
  231. package/dist/validator/metadata/ValidationMetadata.d.ts +53 -0
  232. package/dist/validator/metadata/ValidationMetadataArgs.d.ts +38 -0
  233. package/dist/validator/register-decorator.d.ts +36 -0
  234. package/dist/validator/utils/convert-to-array.util.d.ts +4 -0
  235. package/dist/validator/utils/get-global.util.d.ts +7 -0
  236. package/dist/validator/utils/index.d.ts +3 -0
  237. package/dist/validator/utils/is-promise.util.d.ts +1 -0
  238. package/dist/validator/validation/ValidationArguments.d.ts +26 -0
  239. package/dist/validator/validation/ValidationError.d.ts +42 -0
  240. package/dist/validator/validation/ValidationExecutor.d.ts +28 -0
  241. package/dist/validator/validation/ValidationTypes.d.ts +15 -0
  242. package/dist/validator/validation/ValidationUtils.d.ts +8 -0
  243. package/dist/validator/validation/Validator.d.ts +37 -0
  244. package/dist/validator/validation/ValidatorConstraintInterface.d.ts +14 -0
  245. package/dist/validator/validation/ValidatorOptions.d.ts +75 -0
  246. package/dist/validator/validation-schema/ValidationSchema.d.ts +57 -0
  247. package/dist/validator/validation-schema/ValidationSchemaToMetadataTransformer.d.ts +8 -0
  248. package/package.json +88 -0
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @archbase/core
2
+
3
+ Core utilities and foundation for Archbase React v3.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @archbase/core
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - 🎯 **Error Handling**: Comprehensive error boundary system
14
+ - 🔧 **IOC Container**: Dependency injection with InversifyJS
15
+ - 🌍 **Context Providers**: Global app context management
16
+ - 🛠️ **Utilities**: 20+ utility functions for common operations
17
+ - 🔍 **RSQL Parser**: Complete RSQL query parser
18
+
19
+ ## Usage
20
+
21
+ ```typescript
22
+ import {
23
+ ArchbaseError,
24
+ ArchbaseErrorBoundary,
25
+ ArchbaseAppContext,
26
+ withArchbaseErrorBoundary
27
+ } from '@archbase/core';
28
+
29
+ // Error Boundary
30
+ <ArchbaseErrorBoundary>
31
+ <YourApp />
32
+ </ArchbaseErrorBoundary>
33
+
34
+ // Global Context
35
+ <ArchbaseAppContext.Provider value={appConfig}>
36
+ <YourApp />
37
+ </ArchbaseAppContext.Provider>
38
+ ```
39
+
40
+ ## API Documentation
41
+
42
+ Detailed API documentation coming soon...
Binary file
@@ -0,0 +1,43 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Container } from 'inversify';
3
+ import { MantineTheme, MantineColorScheme, MantineThemeOverride } from '@mantine/core';
4
+ import { ArchbaseUser } from '../types';
5
+ export type ArchbaseLanguage = {
6
+ lang: string;
7
+ name: string;
8
+ };
9
+ interface ArchbaseAppContextValues {
10
+ user: ArchbaseUser | null;
11
+ owner: string | null;
12
+ selectedCompany: any | null;
13
+ theme: MantineTheme | null;
14
+ colorScheme: MantineColorScheme | null;
15
+ iocContainer: Container | null;
16
+ dateFormat: string;
17
+ dateTimeFormat: string;
18
+ timeFormat: string;
19
+ variant?: string;
20
+ languages?: ArchbaseLanguage[];
21
+ setCustomTheme?: (dark: MantineThemeOverride, light: MantineThemeOverride) => void;
22
+ }
23
+ declare const ArchbaseAppContext: React.Context<ArchbaseAppContextValues>;
24
+ interface ArchbaseAppProviderProps {
25
+ children?: ReactNode;
26
+ user: any | null;
27
+ owner: string | null;
28
+ selectedCompany: any | null;
29
+ iocContainer?: any;
30
+ dateFormat?: string;
31
+ dateTimeFormat?: string;
32
+ timeFormat?: string;
33
+ variant?: string;
34
+ languages?: ArchbaseLanguage[];
35
+ setCustomTheme?: (dark: MantineThemeOverride, light: MantineThemeOverride) => void;
36
+ navigationProvider?: React.ComponentType<{
37
+ children: React.ReactNode;
38
+ }>;
39
+ }
40
+ declare const ArchbaseAppProvider: React.FC<ArchbaseAppProviderProps>;
41
+ declare const useArchbaseAppContext: () => ArchbaseAppContextValues;
42
+ export { ArchbaseAppContext, ArchbaseAppProvider, useArchbaseAppContext };
43
+ export type { ArchbaseAppContextValues };
@@ -0,0 +1,33 @@
1
+ import { MantineThemeOverride } from '@mantine/core';
2
+ import { i18n, ResourceLanguage } from 'i18next';
3
+ import React from 'react';
4
+ import '../locales/config';
5
+ type ArchbaseThemeOverride = MantineThemeOverride;
6
+ interface ArchbaseTranslationResource {
7
+ [language: string]: ResourceLanguage;
8
+ }
9
+ interface ArchbaseAppProviderProps {
10
+ children?: React.ReactNode;
11
+ colorScheme: 'dark' | 'light';
12
+ containerIOC: any | undefined;
13
+ themeDark?: ArchbaseThemeOverride;
14
+ themeLight?: ArchbaseThemeOverride;
15
+ withCssVariables?: boolean;
16
+ notificationAutoClose?: number;
17
+ translationName?: string | string[];
18
+ translationResource?: ArchbaseTranslationResource;
19
+ notificationPosition?: 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center';
20
+ }
21
+ export declare const initArchbaseI18nEarly: (translationName: string | string[], translationResource: any) => void;
22
+ export declare const initArchbaseTranslation: (translationName: any, translationResource: any) => Promise<any>;
23
+ export declare const getI18nextInstance: () => i18n;
24
+ export declare const archbaseI18next: i18n;
25
+ export declare const useArchbaseTranslation: (namespace?: string) => {
26
+ t: (key: string, options?: any) => string | object;
27
+ i18n: i18n;
28
+ ready: boolean;
29
+ };
30
+ export declare const syncSafeTranslate: (key: string) => string;
31
+ declare function ArchbaseGlobalProvider({ children, colorScheme, containerIOC, themeDark, themeLight, withCssVariables, notificationAutoClose, notificationPosition, translationName, translationResource, }: ArchbaseAppProviderProps): import("react/jsx-runtime").JSX.Element;
32
+ export { ArchbaseGlobalProvider };
33
+ export type { ArchbaseThemeOverride };
@@ -0,0 +1,34 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface ArchbaseAppConfig {
3
+ /** URL base da API */
4
+ apiUrl?: string;
5
+ /** Locale padrão da aplicação */
6
+ locale?: string;
7
+ /** Tema da aplicação */
8
+ theme?: 'light' | 'dark' | 'auto';
9
+ /** Features flags */
10
+ features?: Record<string, boolean>;
11
+ /** Configurações de debug */
12
+ debug?: boolean;
13
+ /** Formato de data */
14
+ dateFormat?: string;
15
+ /** Formato de data e hora */
16
+ dateTimeFormat?: string;
17
+ /** Formato de hora */
18
+ timeFormat?: string;
19
+ /** Configurações customizadas */
20
+ custom?: Record<string, unknown>;
21
+ }
22
+ export interface ArchbaseAppContextValue {
23
+ config: ArchbaseAppConfig;
24
+ updateConfig: (updates: Partial<ArchbaseAppConfig>) => void;
25
+ }
26
+ declare const ArchbaseAppContext: React.Context<ArchbaseAppContextValue>;
27
+ export interface ArchbaseAppProviderProps {
28
+ children: ReactNode;
29
+ config: ArchbaseAppConfig;
30
+ onConfigChange?: (config: ArchbaseAppConfig) => void;
31
+ }
32
+ export declare function ArchbaseAppProvider({ children, config: initialConfig, onConfigChange }: ArchbaseAppProviderProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function useArchbaseApp(): ArchbaseAppContextValue;
34
+ export { ArchbaseAppContext };
@@ -0,0 +1,5 @@
1
+ export * from './ArchbaseSimpleAppContext';
2
+ export { ArchbaseAppContext, ArchbaseAppProvider, useArchbaseAppContext } from './ArchbaseAppContext';
3
+ export type { ArchbaseAppContextValues, ArchbaseLanguage } from './ArchbaseAppContext';
4
+ export { ArchbaseGlobalProvider, initArchbaseTranslation, initArchbaseI18nEarly, syncSafeTranslate, getI18nextInstance, useArchbaseTranslation, archbaseI18next } from './ArchbaseGlobalProvider';
5
+ export type { ArchbaseThemeOverride } from './ArchbaseGlobalProvider';
@@ -0,0 +1,14 @@
1
+ export declare class ArchbaseError extends Error {
2
+ readonly code?: string;
3
+ readonly details?: unknown;
4
+ readonly timestamp: Date;
5
+ constructor(message: string, code?: string, details?: unknown);
6
+ toJSON(): {
7
+ name: string;
8
+ message: string;
9
+ code: string;
10
+ details: unknown;
11
+ timestamp: Date;
12
+ stack: string;
13
+ };
14
+ }
@@ -0,0 +1,11 @@
1
+ export declare class ArchbaseError extends Error {
2
+ code?: string;
3
+ details?: unknown;
4
+ constructor(message: string, code?: string, details?: unknown);
5
+ }
6
+ export declare class ArchbaseDataSourceError extends ArchbaseError {
7
+ constructor(message: string, code?: string, details?: unknown);
8
+ }
9
+ export declare class ArchbaseServiceError extends ArchbaseError {
10
+ constructor(message: string, code?: string, details?: unknown);
11
+ }
@@ -0,0 +1,21 @@
1
+ import React, { Component, ErrorInfo } from 'react';
2
+ import { ArchbaseErrorBoundaryProps } from './types';
3
+ type ArchbaseErrorBoundaryState = {
4
+ didCatch: true;
5
+ error: any;
6
+ } | {
7
+ didCatch: false;
8
+ error: null;
9
+ };
10
+ export declare class ArchbaseErrorBoundary extends Component<ArchbaseErrorBoundaryProps, ArchbaseErrorBoundaryState> {
11
+ constructor(props: ArchbaseErrorBoundaryProps);
12
+ static getDerivedStateFromError(error: Error): {
13
+ didCatch: boolean;
14
+ error: Error;
15
+ };
16
+ resetErrorBoundary(...args: any[]): void;
17
+ componentDidCatch(error: Error, info: ErrorInfo): void;
18
+ componentDidUpdate(prevProps: ArchbaseErrorBoundaryProps, prevState: ArchbaseErrorBoundaryState): void;
19
+ render(): React.FunctionComponentElement<React.ProviderProps<import("./ArchbaseErrorBoundaryContext").ArchbaseErrorBoundaryContextType>>;
20
+ }
21
+ export {};
@@ -0,0 +1,6 @@
1
+ export type ArchbaseErrorBoundaryContextType = {
2
+ didCatch: boolean;
3
+ error: any;
4
+ resetErrorBoundary: (...args: any[]) => void;
5
+ };
6
+ export declare const ArchbaseErrorBoundaryContext: import("react").Context<ArchbaseErrorBoundaryContextType>;
@@ -0,0 +1,7 @@
1
+ import { PureComponent } from 'react';
2
+ import { FallbackProps } from './types';
3
+ export type ArchbaseErrorFallbackProps = FallbackProps;
4
+ export declare class ArchbaseErrorFallback extends PureComponent<ArchbaseErrorFallbackProps> {
5
+ onClick(): void;
6
+ render(): import("react/jsx-runtime").JSX.Element;
7
+ }
@@ -0,0 +1,2 @@
1
+ import { ArchbaseErrorBoundaryContextType } from './ArchbaseErrorBoundaryContext';
2
+ export declare function assertArchbaseErrorBoundaryContext(value: any): asserts value is ArchbaseErrorBoundaryContextType;
@@ -0,0 +1,6 @@
1
+ export * from "./ArchbaseErrorBoundary";
2
+ export * from "./ArchbaseErrorBoundaryContext";
3
+ export * from "./useArchbaseErrorBoundary";
4
+ export * from "./withArchbaseErrorBoundary";
5
+ export * from "./ArchbaseErrorFallback";
6
+ export * from "./types";
@@ -0,0 +1,39 @@
1
+ import { Component, ComponentType, ErrorInfo, FunctionComponent, PropsWithChildren, ReactElement, ReactNode } from "react";
2
+ declare function FallbackRender(props: FallbackProps): ReactNode;
3
+ export type FallbackProps = {
4
+ error: any;
5
+ resetErrorBoundary: (...args: any[]) => void;
6
+ othersProps?: any;
7
+ };
8
+ type ArchbaseErrorBoundarySharedProps = PropsWithChildren<{
9
+ onError?: (error: Error, info: ErrorInfo) => void;
10
+ onReset?: (details: {
11
+ reason: "imperative-api";
12
+ args: any[];
13
+ } | {
14
+ reason: "keys";
15
+ prev: any[] | undefined;
16
+ next: any[] | undefined;
17
+ }) => void;
18
+ resetKeys?: any[];
19
+ }>;
20
+ export type ArchbaseErrorBoundaryPropsWithComponent = ArchbaseErrorBoundarySharedProps & {
21
+ fallback?: never;
22
+ FallbackComponent: ComponentType<FallbackProps>;
23
+ fallbackRender?: never;
24
+ othersProps?: any;
25
+ };
26
+ export type ArchbaseErrorBoundaryPropsWithRender = ArchbaseErrorBoundarySharedProps & {
27
+ fallback?: never;
28
+ FallbackComponent?: never;
29
+ fallbackRender: typeof FallbackRender;
30
+ othersProps?: any;
31
+ };
32
+ export type ArchbaseErrorBoundaryPropsWithFallback = ArchbaseErrorBoundarySharedProps & {
33
+ fallback: ReactElement<unknown, string | FunctionComponent | typeof Component> | null;
34
+ FallbackComponent?: never;
35
+ fallbackRender?: never;
36
+ othersProps?: any;
37
+ };
38
+ export type ArchbaseErrorBoundaryProps = ArchbaseErrorBoundaryPropsWithFallback | ArchbaseErrorBoundaryPropsWithComponent | ArchbaseErrorBoundaryPropsWithRender;
39
+ export {};
@@ -0,0 +1,5 @@
1
+ export type UseArchbaseErrorBoundaryApi<TError> = {
2
+ resetBoundary: () => void;
3
+ showBoundary: (error: TError) => void;
4
+ };
5
+ export declare function useArchbaseErrorBoundary<TError = any>(): UseArchbaseErrorBoundaryApi<TError>;
@@ -0,0 +1,3 @@
1
+ import { ComponentType } from 'react';
2
+ import { ArchbaseErrorBoundaryProps } from './types';
3
+ export declare function withArchbaseErrorBoundary<Props extends Object>(component: ComponentType<Props>, errorBoundaryProps: ArchbaseErrorBoundaryProps): any;
@@ -0,0 +1,27 @@
1
+ export declare class ApiError {
2
+ private _status;
3
+ private _timestamp;
4
+ private _message;
5
+ private _debugMessage;
6
+ private _subErrors;
7
+ constructor(data: any);
8
+ get status(): number;
9
+ get timestamp(): Date;
10
+ get debugMessage(): string;
11
+ get message(): string;
12
+ get subErrors(): ApiSubError[];
13
+ }
14
+ export declare abstract class ApiSubError {
15
+ constructor();
16
+ }
17
+ export declare class ApiValidationError extends ApiSubError {
18
+ private _object;
19
+ private _field;
20
+ private _rejectedValue;
21
+ private _message;
22
+ constructor(data: any);
23
+ get object(): string;
24
+ get field(): string;
25
+ get rejectedValue(): any;
26
+ get message(): string;
27
+ }
@@ -0,0 +1,2 @@
1
+ export declare function processErrorMessage(error: any): string;
2
+ export declare function processDetailErrorMessage(error: any): string;
@@ -0,0 +1,9 @@
1
+ export declare class ArchbaseError extends Error {
2
+ constructor(message: any);
3
+ }
4
+ export declare class ArchbaseServiceError extends Error {
5
+ constructor(message: any);
6
+ }
7
+ export declare class ArchbaseDataSourceError extends Error {
8
+ constructor(message: any);
9
+ }
@@ -0,0 +1,3 @@
1
+ export { processDetailErrorMessage, processErrorMessage } from './ArchbaseErrorHelper';
2
+ export { ArchbaseDataSourceError, ArchbaseError, ArchbaseServiceError } from './ArchbaseException';
3
+ export { ApiError, ApiSubError, ApiValidationError } from './ApiError';
@@ -0,0 +1,57 @@
1
+ /**
2
+ * ArchbaseSafeMigrationWrapper
3
+ *
4
+ * Sistema de fallback seguro para migração V1/V2.
5
+ * Garante que se V2 falhar, automaticamente volta para V1.
6
+ *
7
+ * ⚠️ CRITICAL: Este wrapper é obrigatório para todos os componentes migrados.
8
+ */
9
+ import React, { Component, ErrorInfo, ReactNode } from 'react';
10
+ interface Props {
11
+ children: ReactNode;
12
+ fallbackComponent: React.ComponentType<any>;
13
+ componentName: string;
14
+ v2Props: any;
15
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
16
+ }
17
+ interface State {
18
+ hasError: boolean;
19
+ error?: Error;
20
+ fallbackActive: boolean;
21
+ }
22
+ /**
23
+ * Error Boundary que implementa fallback automático V2 → V1
24
+ */
25
+ export declare class ArchbaseSafeMigrationWrapper extends Component<Props, State> {
26
+ constructor(props: Props);
27
+ static getDerivedStateFromError(error: Error): State;
28
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
29
+ render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>>;
30
+ }
31
+ /**
32
+ * Hook para criar wrapper de migração segura
33
+ */
34
+ export declare function useArchbaseSafeMigration<TProps>(componentName: string, V1Component: React.ComponentType<TProps>, V2Component: React.ComponentType<TProps>): {
35
+ (props: TProps): import("react/jsx-runtime").JSX.Element;
36
+ displayName: string;
37
+ };
38
+ /**
39
+ * HOC para aplicar migração segura
40
+ */
41
+ export declare function withSafeMigration<TProps>(componentName: string, V1Component: React.ComponentType<TProps>, V2Component: React.ComponentType<TProps>): {
42
+ (props: TProps): import("react/jsx-runtime").JSX.Element;
43
+ displayName: string;
44
+ };
45
+ /**
46
+ * Utilitário para detectar versão do DataSource
47
+ */
48
+ export declare function detectDataSourceVersion(dataSource: any): 'V1' | 'V2' | 'NONE';
49
+ /**
50
+ * Métricas para monitoramento de migração
51
+ */
52
+ export declare const MigrationMetrics: {
53
+ trackV2Usage: (componentName: string, dataSourceVersion: string) => void;
54
+ trackFallback: (componentName: string, reason: string) => void;
55
+ trackError: (componentName: string, error: Error) => void;
56
+ };
57
+ export default ArchbaseSafeMigrationWrapper;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ interface ArchbaseClickOutsideProps {
3
+ children: ReactNode;
4
+ exceptionRef?: any;
5
+ onClick: (event: MouseEvent) => void;
6
+ className?: string;
7
+ }
8
+ export declare function ArchbaseClickOutside({ children, exceptionRef, onClick, className }: ArchbaseClickOutsideProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ declare class ArchbaseObjectHelper {
2
+ getNestedProperty(object: any, property: any): any;
3
+ hasNestedProperty(object: any, property: any, options: any): any;
4
+ setNestedProperty(object: any, property: any, value: any): any;
5
+ isInNestedProperty(object: any, property: any, objectInPath: any, options: any): boolean;
6
+ isEmpty(obj: any): boolean;
7
+ }
8
+ declare const instance: ArchbaseObjectHelper;
9
+ export { instance as ArchbaseObjectHelper };
@@ -0,0 +1,2 @@
1
+ export { ArchbaseObjectHelper } from './ArchbaseObjectHelper';
2
+ export { ArchbaseClickOutside } from './ArchbaseClickOutside';
@@ -0,0 +1,70 @@
1
+ /**
2
+ * # ArchbaseDependencyProvider Component
3
+ *
4
+ * O `ArchbaseDependencyProvider` é um componente React que facilita a comunicação entre componentes em uma aplicação,
5
+ * permitindo que se registrem como ouvintes de dependências específicas e sejam notificados sobre atualizações,
6
+ * acompanhadas de dados relevantes.
7
+ *
8
+ * ## Uso
9
+ *
10
+ * Para utilizar, envolva os componentes com `ArchbaseDependencyProvider`. Dentro dos componentes filhos,
11
+ * utilize o hook `useArchbaseDependency` para registrar ouvintes para dependências específicas ou para notificar
12
+ * sobre atualizações de dependências.
13
+ *
14
+ * ## Exemplo
15
+ *
16
+ * ```jsx
17
+ * import React from 'react';
18
+ * import { ArchbaseDependencyProvider, useArchbaseDependency } from './ArchbaseDependencyManager';
19
+ *
20
+ * const App = () => (
21
+ * <ArchbaseDependencyProvider>
22
+ * <ChildComponent />
23
+ * <SiblingComponent />
24
+ * </ArchbaseDependencyProvider>
25
+ * );
26
+ *
27
+ * const ChildComponent = () => {
28
+ * const { registerListener } = useArchbaseDependency();
29
+ *
30
+ * useEffect(() => {
31
+ * const handleDataChange = (newData, extra) => {
32
+ * console.log('Data updated:', newData, 'Additional info:', extra);
33
+ * };
34
+ *
35
+ * registerListener('key', handleDataChange);
36
+ * }, []);
37
+ *
38
+ * return <div>Child Component</div>;
39
+ * };
40
+ *
41
+ * const SiblingComponent = () => {
42
+ * const { enqueueUpdate } = useArchbaseDependency();
43
+ *
44
+ * const updateData = () => {
45
+ * enqueueUpdate('key', 'updatedValue', { extraData: 'extraInfo' });
46
+ * };
47
+ *
48
+ * return <button onClick={updateData}>Update Data</button>;
49
+ * };
50
+ * ```
51
+ *
52
+ * Este exemplo mostra como `SiblingComponent` pode notificar `ChildComponent` sobre atualizações,
53
+ * usando o `ArchbaseDependencyProvider` para gerenciar a dependência 'key' entre eles.
54
+ */
55
+ import React, { ReactNode } from 'react';
56
+ type UpdateQueueItem = {
57
+ key: string;
58
+ value: any;
59
+ data: any;
60
+ };
61
+ interface ArchbaseDependencyProviderProps {
62
+ children: ReactNode;
63
+ }
64
+ export declare const ArchbaseDependencyProvider: React.FC<ArchbaseDependencyProviderProps>;
65
+ export declare const useArchbaseDependency: () => {
66
+ registerListener: (key: string, listener: Function) => void;
67
+ removeListener: (key: string, listener: Function) => void;
68
+ enqueueUpdate: (update: UpdateQueueItem) => void;
69
+ };
70
+ export {};
@@ -0,0 +1,15 @@
1
+ export * from './useArchbaseTheme';
2
+ export * from './useArchbaseSize';
3
+ export * from './useArchbaseBool';
4
+ export * from './useArchbasePasswordRemember';
5
+ export * from './useArchbaseValidator';
6
+ export * from './useArchbaseAsyncFunction';
7
+ export * from './useArchbaseForceRenderer';
8
+ export * from './useArchbaseLatest';
9
+ export * from './useArchbasePassiveLayoutEffect';
10
+ export * from './useArchbaseReducer';
11
+ export * from './useArchbaseStateWithCallback';
12
+ export * from './useArchbaseResizeObserver';
13
+ export * from './useArchbaseTextSelection';
14
+ export * from './ArchbaseDepencyManager';
15
+ export * from './lifecycle';
@@ -0,0 +1,54 @@
1
+ import type { DependencyList, EffectCallback, FC } from 'react';
2
+ type Props = Record<string, unknown>;
3
+ type ShouldComponentUpdateHandler = (props: Props, nextProps: Props) => boolean;
4
+ /**
5
+ * Called immediately before mounting occurs ( before render the component).
6
+ * Avoid introducing any side-effects or subscriptions in this method.
7
+ * Please, see our docs dir for this hook. Be Careful.
8
+ *
9
+ * @param handler callback function only allowed to return void.
10
+ */
11
+ declare function useArchbaseWillMount(handler: EffectCallback): void;
12
+ /**
13
+ * Called immediately after a component is mounted.
14
+ * Setting state here will trigger re-rendering.
15
+ *
16
+ * @param handler callback function only allowed to return void.
17
+ */
18
+ declare function useArchbaseDidMount(handler: EffectCallback): void;
19
+ /**
20
+ * Called immediately after updating occurs.
21
+ * Note : Called for the initial render.
22
+ *
23
+ * @param handler callback function only allowed to return void.
24
+ */
25
+ declare function useArchbaseDidUpdate(handler: EffectCallback, deps?: DependencyList): void;
26
+ /**
27
+ * Behave like shouldComponentUpdate but with different params.
28
+ *
29
+ * @param Component component want to inject with the shouldComponentUpdate lifecycle.
30
+ * @param shouldComponentUpdateHandler comparator like the shouldComponentUpdate lifecycle.
31
+ * @returns [PureComponent]
32
+ */
33
+ declare function useShouldComponentUpdate(Component: FC, shouldComponentUpdateHandler?: ShouldComponentUpdateHandler): import("react").NamedExoticComponent<{}>[];
34
+ /**
35
+ * @alias useShouldComponentUpdate
36
+ */
37
+ declare function usePureComponent(Component: FC, shouldComponentUpdateHandler?: ShouldComponentUpdateHandler): import("react").NamedExoticComponent<{}>[];
38
+ /**
39
+ * @alias useShouldComponentUpdate but with diffrent pattern (HOC)!
40
+ */
41
+ declare function withShouldComponentUpdate(Component: FC): (shouldComponentUpdateHandler: ShouldComponentUpdateHandler) => import("react").NamedExoticComponent<{}>;
42
+ /**
43
+ * Called immediately before a component is destroyed.
44
+ * Perform any necessary cleanup in this method, such
45
+ * as cancelled network requests, or cleaning up any
46
+ * DOM elements created in `useArchbaseDidMount`.
47
+ *
48
+ * @param handler callback function only allowed to return void.
49
+ */
50
+ declare function useArchbaseWillUnmount(handler: () => void): void;
51
+ declare function useArchbasePrevious(value: any): any;
52
+ declare const useArchbaseIsMounted: () => boolean;
53
+ declare const useArchbaseForceUpdate: () => () => void;
54
+ export { useArchbaseDidMount, useArchbaseDidUpdate, useArchbaseForceUpdate, useArchbaseIsMounted, useArchbasePrevious, useArchbaseWillMount, useArchbaseWillUnmount, usePureComponent, useShouldComponentUpdate, withShouldComponentUpdate };
@@ -0,0 +1 @@
1
+ export declare function useArchbaseAsyncFunction<T>(asyncFunction: () => Promise<T>, defaultValue: T): [T, string | null, boolean];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Hook para gerenciar estado booleano com funções helper
3
+ * @param initialValue Valor inicial (padrão: false)
4
+ * @returns [valor, setTrue, setFalse, toggle]
5
+ */
6
+ export declare function useArchbaseBool(initialValue?: boolean): readonly [boolean, () => void, () => void, () => void];
@@ -0,0 +1 @@
1
+ export declare const useArchbaseForceRerender: () => (() => void);
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare const useArchbaseLatest: <T extends unknown>(current: T) => React.RefObject<T>;
3
+ export default useArchbaseLatest;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const useArchbasePassiveLayoutEffect: typeof React.useEffect | typeof React.useLayoutEffect;
3
+ export default useArchbasePassiveLayoutEffect;
@@ -0,0 +1,11 @@
1
+ export declare function useArchbasePasswordRemember(): {
2
+ rememberMe: boolean;
3
+ clearRememberMe: () => void;
4
+ username: string;
5
+ password: string;
6
+ setRememberMe: import("react").Dispatch<import("react").SetStateAction<boolean>>;
7
+ setUsername: import("react").Dispatch<import("react").SetStateAction<string>>;
8
+ setPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
9
+ saveCredentials: (user: string, pass: string, remember: boolean) => void;
10
+ clearCredentials: () => void;
11
+ };
@@ -0,0 +1,21 @@
1
+ export interface ArchbaseStore {
2
+ setValue: (key: string, value: any) => void;
3
+ getValue: (key: string) => any;
4
+ existsValue: (key: string) => boolean;
5
+ clearValue: (key: string) => void;
6
+ clearAllValues: () => void;
7
+ reset: () => void;
8
+ values: Map<string, any>;
9
+ }
10
+ export interface ArchbaseState {
11
+ }
12
+ export type ArchbaseReducerAction<ArchbaseState> = {
13
+ type: string;
14
+ payload: Partial<ArchbaseState>;
15
+ info?: string;
16
+ };
17
+ export type ArchbaseReducer<S extends ArchbaseState, A extends ArchbaseReducerAction<S>> = (state: S, action: A) => S;
18
+ export declare function useArchbaseReducer<S extends ArchbaseState, A extends ArchbaseReducerAction<S>>(key: string, store: ArchbaseStore, initialState: S, customReducer: ArchbaseReducer<S, A>): {
19
+ dispatch: (action: A) => void;
20
+ state: S;
21
+ };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { ResizeObserver as Polyfill, ResizeObserverEntry } from '@juggle/resize-observer';
3
+ /**
4
+ * A React hook that fires a callback whenever ResizeObserver detects a change to its size
5
+ *
6
+ * @param target A React ref created by `useRef()` or an HTML element
7
+ * @param callback Invoked with a single `ResizeObserverEntry` any time
8
+ * the `target` resizes
9
+ */
10
+ export declare function useArchbaseResizeObserver<T extends HTMLElement>(target: React.RefObject<T> | T | null, callback: UseResizeObserverCallback): Polyfill;
11
+ export type UseResizeObserverCallback = (entry: ResizeObserverEntry, observer: Polyfill) => any;