oiu-core 0.0.1 → 0.0.3

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 (51) hide show
  1. package/dist/auth/AuthenticationProvider.d.ts +14 -0
  2. package/dist/auth/AuthenticationProvider.d.ts.map +1 -0
  3. package/dist/auth/AuthorizationProvider.d.ts +20 -0
  4. package/dist/auth/AuthorizationProvider.d.ts.map +1 -0
  5. package/dist/auth/Context.d.ts +5 -0
  6. package/dist/auth/Context.d.ts.map +1 -0
  7. package/dist/auth/OAuthService/index.d.ts +57 -0
  8. package/dist/auth/OAuthService/index.d.ts.map +1 -0
  9. package/dist/auth/OAuthService/utils.d.ts +15 -0
  10. package/dist/auth/OAuthService/utils.d.ts.map +1 -0
  11. package/dist/auth/_type.d.ts +22 -0
  12. package/dist/auth/_type.d.ts.map +1 -1
  13. package/dist/auth/index.d.ts +17 -0
  14. package/dist/auth/index.d.ts.map +1 -0
  15. package/dist/auth/utils.d.ts +42 -0
  16. package/dist/auth/utils.d.ts.map +1 -0
  17. package/dist/components/ConfigLoader/index.d.ts +22 -0
  18. package/dist/components/ConfigLoader/index.d.ts.map +1 -0
  19. package/dist/components/Wait/_type.d.ts +31 -0
  20. package/dist/components/Wait/_type.d.ts.map +1 -0
  21. package/dist/components/Wait/index.d.ts +9 -0
  22. package/dist/components/Wait/index.d.ts.map +1 -0
  23. package/dist/components/index.d.ts +4 -4
  24. package/dist/components/index.d.ts.map +1 -1
  25. package/dist/hoc/index.d.ts +2 -0
  26. package/dist/hoc/index.d.ts.map +1 -0
  27. package/dist/hoc/wl.d.ts +31 -0
  28. package/dist/hoc/wl.d.ts.map +1 -0
  29. package/dist/index-BzyehgBi.js +2659 -0
  30. package/dist/language/index.d.ts +0 -3
  31. package/dist/language/index.d.ts.map +1 -1
  32. package/dist/main-CKwVM_d-.js +6700 -0
  33. package/dist/main.d.ts +17 -5
  34. package/dist/main.d.ts.map +1 -1
  35. package/dist/main.js +11 -5956
  36. package/dist/redux/slices/appSlice.d.ts +4 -0
  37. package/dist/redux/slices/appSlice.d.ts.map +1 -1
  38. package/dist/utils/config.d.ts +34 -0
  39. package/dist/utils/config.d.ts.map +1 -0
  40. package/dist/utils/index.d.ts +3 -1
  41. package/dist/utils/index.d.ts.map +1 -1
  42. package/package.json +2 -2
  43. package/dist/components/Await/_type.d.ts +0 -29
  44. package/dist/components/Await/_type.d.ts.map +0 -1
  45. package/dist/components/Await/index.d.ts +0 -9
  46. package/dist/components/Await/index.d.ts.map +0 -1
  47. package/dist/components/Test1/index.d.ts +0 -2
  48. package/dist/components/Test1/index.d.ts.map +0 -1
  49. package/dist/components/Test2/index.d.ts +0 -2
  50. package/dist/components/Test2/index.d.ts.map +0 -1
  51. /package/dist/assets/{oiu.css → oiu-core.css} +0 -0
package/dist/main.d.ts CHANGED
@@ -1,19 +1,31 @@
1
1
  import { ComponentType } from 'react';
2
2
  import { DevToolsEnhancerOptions } from '@reduxjs/toolkit';
3
+ import * as auth from './auth';
3
4
  import * as utils from './utils';
4
5
  import * as redux from './redux';
5
6
  import * as language from './language';
6
7
  import * as components from './components';
8
+ import * as hoc from './hoc';
7
9
  import * as theme from './theme';
8
10
  export type RTKDevSetup = utils.SetupOptions<DevToolsEnhancerOptions>;
9
- export type InitOIUOptions<Token> = {
11
+ export type InitOIUOptions<Token, TSpinProps, TSkeletonProps> = {
12
+ /** Translation configuration */
10
13
  translation: {
14
+ /** Default language information, this will be used if the browser language is set to an unknown language */
11
15
  defaultLang: language.LangInfo;
16
+ /** Record of language code and its information. Example: { en: { code: 'en', locale: 'en-US' }, es: { code: 'es', locale: 'es-ES' } } */
12
17
  langs: Record<string, language.LangInfo>;
13
18
  };
19
+ /** Wait component configuration */
14
20
  wait: {
15
- spin: ComponentType<components.SpinProps>;
16
- skeleton?: ComponentType<components.SpinProps>;
21
+ /** Spin component to be used in the app */
22
+ spin: ComponentType<components.SpinProps<TSpinProps>>;
23
+ /** Default extra properties set to the spin component, this will ignored if there is spin extra props passed */
24
+ spinProps?: TSpinProps;
25
+ /** Skeleton component to be used in the app */
26
+ skeleton?: ComponentType<components.SpinProps<TSkeletonProps>>;
27
+ /** Default extra properties set to the skeleton component, this will ignored if there is skeleton extra props passed */
28
+ skeletonProps?: TSkeletonProps;
17
29
  };
18
30
  themeProvider?: theme.ProviderComponentType<Token>;
19
31
  };
@@ -23,7 +35,7 @@ export type InitOIUOptions<Token> = {
23
35
  * @param lang Record of language code and its information. Example: { en: { code: 'en', locale: 'en-US' }, es: { code: 'es', locale: 'es-ES' } }
24
36
  * @param themeProvider
25
37
  */
26
- export declare function initOIU<Token>(options: InitOIUOptions<Token>): void;
38
+ export declare function initOIU<Token, TSpinProps, TSkeletonProps>(options: InitOIUOptions<Token, TSpinProps, TSkeletonProps>): void;
27
39
  /**
28
40
  * Hook to initialize OIU in the component
29
41
  * @returns
@@ -38,5 +50,5 @@ export declare function useInitOIU(defaultLocale: string, devOptionsSetup?: RTKD
38
50
  }>, import("redux").StoreEnhancer]>>;
39
51
  langInfo: language.LangInfo;
40
52
  };
41
- export { components, language, redux, theme, utils };
53
+ export { auth, components, language, redux, theme, utils, hoc };
42
54
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../lib/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAW,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAQjC,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;AAEtE,M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