@homecode/ui 4.26.1 → 4.26.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.
@@ -3,7 +3,7 @@ import STORE from './store.js';
3
3
 
4
4
  const Redirect = (props) => {
5
5
  useEffect(() => {
6
- STORE.replaceState(props.to, { replace: true });
6
+ STORE.replaceState(props.to);
7
7
  }, []);
8
8
  return null;
9
9
  };
@@ -55,14 +55,14 @@ function init(config) {
55
55
  componentStore,
56
56
  // hook (update when componentStore._updated changed)
57
57
  withI18N: Component => props => {
58
- useStore({ [storeName]: true });
58
+ useStore({ [storeName]: [] });
59
59
  return jsx(Component, { ...props });
60
60
  },
61
61
  i18n: (key, props) => getTrans(key, props),
62
62
  I18N: memo(function I18N({ id, children, props }) {
63
63
  useStore({
64
64
  i18n: ['lang'],
65
- [storeName]: true,
65
+ [storeName]: [],
66
66
  });
67
67
  const key = id ?? children;
68
68
  // @ts-ignore
@@ -1,6 +1,16 @@
1
1
  type Props = {
2
2
  store?: any;
3
3
  };
4
- export declare const NotificationsStore: any;
4
+ export declare const NotificationsStore: import("justorm/dist/esm/proxy").ProxyStore<{
5
+ items: string[];
6
+ autohide: string[];
7
+ data: {};
8
+ paused: boolean;
9
+ show(data: any): any;
10
+ pause(): void;
11
+ unpause(): void;
12
+ close(id: any): void;
13
+ remove(id: any): void;
14
+ }>;
5
15
  export declare const Notifications: (props: Props) => JSX.Element;
6
16
  export {};
@@ -1,2 +1,13 @@
1
- declare const STORE: any;
1
+ declare const STORE: import("justorm/dist/esm/proxy").ProxyStore<{
2
+ items: string[];
3
+ autohide: string[];
4
+ data: {};
5
+ paused: boolean;
6
+ show(data: any): any;
7
+ pause(): void;
8
+ unpause(): void;
9
+ close(id: any): void;
10
+ remove(id: any): void;
11
+ }>;
2
12
  export default STORE;
13
+ export type NotificationsStore = typeof STORE;
@@ -7,6 +7,21 @@ export declare const Router: {
7
7
  export * from './Route';
8
8
  export * from './Redirect';
9
9
  export * from './Link/Link';
10
- export declare const RouterStore: any;
10
+ export declare const RouterStore: import("justorm/dist/esm/proxy").ProxyStore<{
11
+ path: string;
12
+ params: {};
13
+ query: Record<string, string>;
14
+ queryString: string;
15
+ on(cb: any): void;
16
+ un(cb: any): void;
17
+ go(path?: any, query?: string | Record<string, any>, params?: {
18
+ replace?: boolean;
19
+ }): void;
20
+ setParams(queryParams: Record<string, any>): void;
21
+ back(): void;
22
+ replaceState(href: string, params?: {
23
+ quiet?: boolean;
24
+ }): void;
25
+ }>;
11
26
  export declare const RouterContext: import("react").Context<import("./context").ContextType>;
12
27
  export type RouterStore = RouterStoreType;
@@ -1,4 +1,32 @@
1
- declare const STORE: any;
1
+ type GoParams = {
2
+ replace?: boolean;
3
+ };
4
+ type ReplaceStateParams = {
5
+ quiet?: boolean;
6
+ };
7
+ declare const STORE: import("justorm/dist/esm/proxy").ProxyStore<{
8
+ path: string;
9
+ params: {};
10
+ query: Record<string, string>;
11
+ queryString: string;
12
+ on(cb: any): void;
13
+ un(cb: any): void;
14
+ go(path?: any, query?: Record<string, any> | string, params?: GoParams): void;
15
+ setParams(queryParams: Record<string, any>): void;
16
+ back(): void;
17
+ replaceState(href: string, params?: ReplaceStateParams): void;
18
+ }>;
2
19
  export type RouterStore = typeof STORE;
3
- declare const _default: any;
20
+ declare const _default: import("justorm/dist/esm/proxy").ProxyStore<{
21
+ path: string;
22
+ params: {};
23
+ query: Record<string, string>;
24
+ queryString: string;
25
+ on(cb: any): void;
26
+ un(cb: any): void;
27
+ go(path?: any, query?: string | Record<string, any>, params?: GoParams): void;
28
+ setParams(queryParams: Record<string, any>): void;
29
+ back(): void;
30
+ replaceState(href: string, params?: ReplaceStateParams): void;
31
+ }>;
4
32
  export default _default;
@@ -9,15 +9,15 @@ type I18NProps = {
9
9
  children?: React.ReactNode;
10
10
  props?: number | Record<string, any>;
11
11
  };
12
- export declare const store: import("justorm/dist/esm/proxy").ProxyStore<{
12
+ export declare const store: import("justorm/dist/esm/proxy").ProxyStore<import("justorm/dist/esm/create").StoreDefinition<{
13
13
  lang: string | void;
14
- changeLang(lang: any): Promise<void>;
15
- }>;
14
+ changeLang: (lang: any) => Promise<void>;
15
+ }>>;
16
16
  export declare function init(config: RegisterConfig): {
17
17
  storeName: string;
18
- componentStore: import("justorm/dist/esm/proxy").ProxyStore<{
18
+ componentStore: import("justorm/dist/esm/proxy").ProxyStore<import("justorm/dist/esm/create").StoreDefinition<{
19
19
  _updated: string;
20
- }>;
20
+ }>>;
21
21
  withI18N: (Component: any) => (props: any) => JSX.Element;
22
22
  i18n: (key: any, props?: any) => any;
23
23
  I18N: import("react").NamedExoticComponent<I18NProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.26.1",
3
+ "version": "4.26.3",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",
@@ -56,7 +56,7 @@
56
56
  "fastest-validator": "^1.16.0",
57
57
  "favicons": "^7.1.3",
58
58
  "favicons-webpack-plugin": "^6.0.0",
59
- "justorm": "3.0.0-beta-24",
59
+ "justorm": "^3.0.2",
60
60
  "lodash.omit": "^4.5.0",
61
61
  "lodash.pick": "^4.4.0",
62
62
  "moment": "^2.29.4",