@owlmeans/client-panel 0.1.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 (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +791 -0
  3. package/build/.gitkeep +0 -0
  4. package/build/auth/i18n/en.json +56 -0
  5. package/build/auth/i18n.d.ts +2 -0
  6. package/build/auth/i18n.d.ts.map +1 -0
  7. package/build/auth/i18n.js +4 -0
  8. package/build/auth/i18n.js.map +1 -0
  9. package/build/auth/index.d.ts +2 -0
  10. package/build/auth/index.d.ts.map +1 -0
  11. package/build/auth/index.js +2 -0
  12. package/build/auth/index.js.map +1 -0
  13. package/build/auth/plugins/consts.d.ts +4 -0
  14. package/build/auth/plugins/consts.d.ts.map +1 -0
  15. package/build/auth/plugins/consts.js +13 -0
  16. package/build/auth/plugins/consts.js.map +1 -0
  17. package/build/auth/plugins/exports.d.ts +3 -0
  18. package/build/auth/plugins/exports.d.ts.map +1 -0
  19. package/build/auth/plugins/exports.js +3 -0
  20. package/build/auth/plugins/exports.js.map +1 -0
  21. package/build/auth/plugins/types.d.ts +6 -0
  22. package/build/auth/plugins/types.d.ts.map +1 -0
  23. package/build/auth/plugins/types.js +2 -0
  24. package/build/auth/plugins/types.js.map +1 -0
  25. package/build/components/consts.d.ts +6 -0
  26. package/build/components/consts.d.ts.map +1 -0
  27. package/build/components/consts.js +7 -0
  28. package/build/components/consts.js.map +1 -0
  29. package/build/components/context.d.ts +9 -0
  30. package/build/components/context.d.ts.map +1 -0
  31. package/build/components/context.js +30 -0
  32. package/build/components/context.js.map +1 -0
  33. package/build/components/form/context.d.ts +8 -0
  34. package/build/components/form/context.d.ts.map +1 -0
  35. package/build/components/form/context.js +26 -0
  36. package/build/components/form/context.js.map +1 -0
  37. package/build/components/form/helper.d.ts +4 -0
  38. package/build/components/form/helper.d.ts.map +1 -0
  39. package/build/components/form/helper.js +5 -0
  40. package/build/components/form/helper.js.map +1 -0
  41. package/build/components/form/index.d.ts +4 -0
  42. package/build/components/form/index.d.ts.map +1 -0
  43. package/build/components/form/index.js +4 -0
  44. package/build/components/form/index.js.map +1 -0
  45. package/build/components/form/types.d.ts +33 -0
  46. package/build/components/form/types.d.ts.map +1 -0
  47. package/build/components/form/types.js +2 -0
  48. package/build/components/form/types.js.map +1 -0
  49. package/build/components/index.d.ts +6 -0
  50. package/build/components/index.d.ts.map +1 -0
  51. package/build/components/index.js +5 -0
  52. package/build/components/index.js.map +1 -0
  53. package/build/components/layout/helper.d.ts +6 -0
  54. package/build/components/layout/helper.d.ts.map +1 -0
  55. package/build/components/layout/helper.js +17 -0
  56. package/build/components/layout/helper.js.map +1 -0
  57. package/build/components/layout/index.d.ts +2 -0
  58. package/build/components/layout/index.d.ts.map +1 -0
  59. package/build/components/layout/index.js +2 -0
  60. package/build/components/layout/index.js.map +1 -0
  61. package/build/components/types.d.ts +7 -0
  62. package/build/components/types.d.ts.map +1 -0
  63. package/build/components/types.js +2 -0
  64. package/build/components/types.js.map +1 -0
  65. package/build/helper/form.d.ts +3 -0
  66. package/build/helper/form.d.ts.map +1 -0
  67. package/build/helper/form.js +5 -0
  68. package/build/helper/form.js.map +1 -0
  69. package/build/helper/index.d.ts +2 -0
  70. package/build/helper/index.d.ts.map +1 -0
  71. package/build/helper/index.js +2 -0
  72. package/build/helper/index.js.map +1 -0
  73. package/build/index.d.ts +3 -0
  74. package/build/index.d.ts.map +1 -0
  75. package/build/index.js +3 -0
  76. package/build/index.js.map +1 -0
  77. package/package.json +74 -0
  78. package/src/auth/i18n/en.json +56 -0
  79. package/src/auth/i18n.ts +5 -0
  80. package/src/auth/index.ts +2 -0
  81. package/src/auth/plugins/consts.ts +15 -0
  82. package/src/auth/plugins/exports.ts +3 -0
  83. package/src/auth/plugins/types.ts +6 -0
  84. package/src/components/consts.ts +6 -0
  85. package/src/components/context.tsx +44 -0
  86. package/src/components/form/context.tsx +39 -0
  87. package/src/components/form/helper.ts +7 -0
  88. package/src/components/form/index.ts +4 -0
  89. package/src/components/form/types.ts +37 -0
  90. package/src/components/index.ts +6 -0
  91. package/src/components/layout/helper.ts +26 -0
  92. package/src/components/layout/index.ts +2 -0
  93. package/src/components/types.ts +7 -0
  94. package/src/helper/form.ts +7 -0
  95. package/src/helper/index.ts +2 -0
  96. package/src/index.ts +3 -0
  97. package/tsconfig.json +16 -0
  98. package/tsconfig.tsbuildinfo +1 -0
package/build/.gitkeep ADDED
File without changes
@@ -0,0 +1,56 @@
1
+ {
2
+ "basic-ed25519": {
3
+ "entityId": {
4
+ "label": "Organization id"
5
+ },
6
+ "address": {
7
+ "label": "User DID"
8
+ },
9
+ "privateKey": {
10
+ "label": "Private key"
11
+ },
12
+ "submit": "Authenticate"
13
+ },
14
+ "re-captcha": {
15
+ "guideline": "We need to make sure that you are not a robot. Please click in the white box below to prove that you are a human."
16
+ },
17
+ "wallet-provider": {
18
+ "pin": {
19
+ "loading": "Loading...",
20
+ "guideline": "Use this pin-code on any resource supporting wallet-base authorization"
21
+ }
22
+ },
23
+ "wallet-consumer": {
24
+ "pin": {
25
+ "label": "Pin-code",
26
+ "hint": "Scan the QR code or genereta a pin-code with your OwlMeans ID app"
27
+ },
28
+ "submit": "Proceed with pin"
29
+ },
30
+ "oidp-auth": {
31
+ "reset": "Reset",
32
+ "error": {
33
+ "socket": {
34
+ "timeout": {
35
+ "rely": "Authentication window expired. Please refresh to try again."
36
+ }
37
+ }
38
+ }
39
+ },
40
+ "oidp-create-id": {
41
+ "error": {
42
+ "socket": {
43
+ "timeout": {
44
+ "call": "Action timeout! For security reason we set a time limit on authentication actions. Please try again.",
45
+ "rely": "Authentication code expired. Please try again."
46
+ }
47
+ },
48
+ "auth": {
49
+ "authorization": {
50
+ "sequence": "Auhtentcation process was interupted by the authentication app you use."
51
+ }
52
+ }
53
+ },
54
+ "reset": "Reload"
55
+ }
56
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/auth/i18n.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { addI18nLib } from '@owlmeans/i18n';
2
+ import en from './i18n/en.json';
3
+ addI18nLib('en', 'client-panel-auth', en);
4
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/auth/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE/B,UAAU,CAAC,IAAI,EAAE,mBAAmB,EAAE,EAAE,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './i18n.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './i18n.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { JSONSchemaType } from 'ajv';
2
+ import { Ed22519BasicAuthUIPluginForm } from './types.js';
3
+ export declare const Ed22519BasicAuthUIPluginFormSchema: JSONSchemaType<Ed22519BasicAuthUIPluginForm>;
4
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAA;AAIzD,eAAO,MAAM,kCAAkC,EAAE,cAAc,CAAC,4BAA4B,CAS3F,CAAA"}
@@ -0,0 +1,13 @@
1
+ // @TODO Move to some abstract layer cause this validation is the same for both client
2
+ // and server
3
+ export const Ed22519BasicAuthUIPluginFormSchema = {
4
+ type: 'object',
5
+ properties: {
6
+ entityId: { type: 'string', minLength: 1, maxLength: 255, default: '' },
7
+ address: { type: 'string', minLength: 1, maxLength: 255, default: '' },
8
+ privateKey: { type: 'string', minLength: 1, maxLength: 512, default: '' }
9
+ },
10
+ required: ['entityId', 'address', 'privateKey'],
11
+ additionalProperties: false,
12
+ };
13
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../../src/auth/plugins/consts.ts"],"names":[],"mappings":"AAGA,sFAAsF;AACtF,aAAa;AACb,MAAM,CAAC,MAAM,kCAAkC,GAAiD;IAC9F,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACvE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;QACtE,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;KAC1E;IACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;IAC/C,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './consts.js';
3
+ //# sourceMappingURL=exports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/exports.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './consts.js';
3
+ //# sourceMappingURL=exports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/auth/plugins/exports.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,6 @@
1
+ export interface Ed22519BasicAuthUIPluginForm {
2
+ entityId: string;
3
+ address: string;
4
+ privateKey: string;
5
+ }
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/auth/plugins/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export declare enum BlockScaling {
2
+ Full = "full",
3
+ Half = "half",
4
+ Wide = "wide"
5
+ }
6
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/components/consts.ts"],"names":[],"mappings":"AACA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;CACd"}
@@ -0,0 +1,7 @@
1
+ export var BlockScaling;
2
+ (function (BlockScaling) {
3
+ BlockScaling["Full"] = "full";
4
+ BlockScaling["Half"] = "half";
5
+ BlockScaling["Wide"] = "wide";
6
+ })(BlockScaling || (BlockScaling = {}));
7
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/components/consts.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,6BAAa,CAAA;IACb,6BAAa,CAAA;AACf,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB"}
@@ -0,0 +1,9 @@
1
+ import type { FC } from 'react';
2
+ import type { TPanelContext } from './types.js';
3
+ import { I18nProps } from '@owlmeans/client-i18n';
4
+ import { ResilientError } from '@owlmeans/error';
5
+ export declare const PanelContext: FC<TPanelContext>;
6
+ export declare const usePanelHelper: () => TPanelContext;
7
+ export declare const usePanelI18n: (name?: string, override?: I18nProps["i18n"]) => import("i18next").TFunction<"translation", undefined>;
8
+ export declare const usePanelError: (name: string, error?: ResilientError) => string | undefined;
9
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/components/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,SAAS,EAA6B,MAAM,uBAAuB,CAAA;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAIhD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAK1C,CAAA;AAED,eAAO,MAAM,cAAc,qBAAsD,CAAA;AAEjF,eAAO,MAAM,YAAY,UAAW,MAAM,aAAa,SAAS,CAAC,MAAM,CAAC,0DAUvE,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,MAAM,UAAU,cAAc,uBAajE,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext as useReactContext } from 'react';
3
+ import { useCommonI18n, useI18nLib } from '@owlmeans/client-i18n';
4
+ import { useContext } from '@owlmeans/client';
5
+ const PanelContext_ = createContext({});
6
+ export const PanelContext = ({ children, ...props }) => {
7
+ const parent = usePanelHelper();
8
+ props = { ...parent, ...props };
9
+ return _jsx(PanelContext_.Provider, { value: props, children: children });
10
+ };
11
+ export const usePanelHelper = () => useReactContext(PanelContext_);
12
+ export const usePanelI18n = (name, override) => {
13
+ const context = useContext();
14
+ const i18n = { ...usePanelHelper(), ...override };
15
+ const prefix = (i18n?.prefix ?? '') + (name != null && i18n?.prefix != null ? '.' : '') + (name ?? '');
16
+ return useCommonI18n(i18n?.resource ?? context.cfg.service, i18n?.ns ?? context.cfg.service ?? i18n?.resource, prefix);
17
+ };
18
+ export const usePanelError = (name, error) => {
19
+ const t = usePanelI18n();
20
+ const key = name;
21
+ const libT = useI18nLib('errors');
22
+ return error != null ?
23
+ error.type != null
24
+ ? t([`${key}.errors.${error.type}`, `errors.${error.type}`], {
25
+ defaultValue: libT(error.type ?? 'form-field')
26
+ }) : t(`${key}.error`, {
27
+ defaultValue: libT('form-field')
28
+ }) : undefined;
29
+ };
30
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/components/context.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAA;AAEpE,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG7C,MAAM,aAAa,GAAG,aAAa,CAAgB,EAAE,CAAC,CAAA;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAsB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAA;IAC/B,KAAK,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,KAAK,EAAE,CAAA;IAE/B,OAAO,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA0B,CAAA;AAClF,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,eAAe,CAAgB,aAAa,CAAC,CAAA;AAEjF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAa,EAAE,QAA4B,EAAE,EAAE;IAC1E,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,IAAI,GAAG,EAAE,GAAG,cAAc,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAA;IACjD,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;IAEtG,OAAO,aAAa,CAClB,IAAI,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EACrC,IAAI,EAAE,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,EAAE,QAAQ,EACjD,MAAM,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,KAAsB,EAAE,EAAE;IACpE,MAAM,CAAC,GAAG,YAAY,EAAE,CAAA;IACxB,MAAM,GAAG,GAAG,IAAI,CAAA;IAEhB,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAEjC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC;QACpB,KAAK,CAAC,IAAI,IAAI,IAAI;YAChB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,WAAW,KAAK,CAAC,IAAI,EAAE,EAAE,UAAU,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE;gBAC3D,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,YAAY,CAAC;aAC/C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,EAAE;YACrB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;SACjC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACpB,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { FC, PropsWithChildren } from 'react';
2
+ import type { FieldError } from 'react-hook-form';
3
+ import type { TFormContext } from './types.js';
4
+ export declare const FormContext: FC<PropsWithChildren<TFormContext>>;
5
+ export declare const useClientFormContext: () => TFormContext;
6
+ export declare const useFormI18n: () => import("i18next").TFunction<"translation", undefined>;
7
+ export declare const useFormError: (name: string, error?: FieldError) => string | undefined;
8
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/form/context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAI9C,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,CACa,CAAA;AAEzE,eAAO,MAAM,oBAAoB,oBAAoD,CAAA;AAErF,eAAO,MAAM,WAAW,6DASvB,CAAA;AAED,eAAO,MAAM,YAAY,SAAU,MAAM,UAAU,UAAU,uBAa5D,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext as useReactContext } from 'react';
3
+ import { useCommonI18n, useI18nLib } from '@owlmeans/client-i18n';
4
+ import { useContext } from '@owlmeans/client';
5
+ const FormContext_ = createContext({});
6
+ export const FormContext = ({ children, ...props }) => _jsx(FormContext_.Provider, { value: props, children: children });
7
+ export const useClientFormContext = () => useReactContext(FormContext_);
8
+ export const useFormI18n = () => {
9
+ const context = useContext();
10
+ const { i18n, name } = useClientFormContext();
11
+ const prefix = (i18n?.prefix != null ? i18n.prefix + '.' : '') + (name ?? '');
12
+ return useCommonI18n(i18n?.resource ?? context.cfg.service, i18n?.ns ?? i18n?.resource ?? context.cfg.service, prefix);
13
+ };
14
+ export const useFormError = (name, error) => {
15
+ const t = useFormI18n();
16
+ const key = name;
17
+ const libT = useI18nLib('errors');
18
+ return error != null ?
19
+ error.type != null
20
+ ? t([`${key}.errors.${error.type}`, `errors.${error.type}`], {
21
+ defaultValue: libT(error.type ?? 'form-field')
22
+ }) : t(`${key}.error`, {
23
+ defaultValue: libT('form-field')
24
+ }) : undefined;
25
+ };
26
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/components/form/context.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAA;AACpE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG7C,MAAM,YAAY,GAAG,aAAa,CAAe,EAA6B,CAAC,CAAA;AAE/E,MAAM,CAAC,MAAM,WAAW,GAAwC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CACzF,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAA;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,eAAe,CAAe,YAAY,CAAC,CAAA;AAErF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,oBAAoB,EAAE,CAAA;IAC7C,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;IAC7E,OAAO,aAAa,CAClB,IAAI,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EACrC,IAAI,EAAE,EAAE,IAAI,IAAI,EAAE,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EACjD,MAAM,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,KAAkB,EAAE,EAAE;IAC/D,MAAM,CAAC,GAAG,WAAW,EAAE,CAAA;IACvB,MAAM,GAAG,GAAG,IAAI,CAAA;IAEhB,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAA;IAEjC,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC;QACpB,KAAK,CAAC,IAAI,IAAI,IAAI;YAChB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,WAAW,KAAK,CAAC,IAAI,EAAE,EAAE,UAAU,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE;gBAC3D,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,YAAY,CAAC;aAC/C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,EAAE;YACrB,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;SACjC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACpB,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { FieldValues } from 'react-hook-form';
2
+ import type { FormRef } from './types.js';
3
+ export declare const useFormRef: <T extends FieldValues = FieldValues>() => import("react").MutableRefObject<FormRef<T> | null>;
4
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/components/form/helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzC,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,wEAE/C,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { useRef } from 'react';
2
+ export const useFormRef = () => {
3
+ return useRef(null);
4
+ };
5
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/components/form/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAI9B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAwC,EAAE;IAClE,OAAO,MAAM,CAAoB,IAAI,CAAC,CAAA;AACxC,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './types.js';
2
+ export * from './helper.js';
3
+ export * from './context.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './types.js';
2
+ export * from './helper.js';
3
+ export * from './context.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,33 @@
1
+ import type { AnySchema } from 'ajv';
2
+ import type { PropsWithChildren, MutableRefObject } from 'react';
3
+ import type { UseFormReturn, FieldValues } from 'react-hook-form';
4
+ import type { I18nProps } from '@owlmeans/client-i18n';
5
+ import type { Toggleable } from '@owlmeans/client';
6
+ import type { BlockScaling } from '../consts.js';
7
+ export interface FormProps extends PropsWithChildren<I18nProps> {
8
+ name?: string;
9
+ formRef?: MutableRefObject<FormRef<any> | null>;
10
+ defaults?: Record<string, any>;
11
+ validation?: AnySchema;
12
+ decorate?: boolean;
13
+ horizontal?: BlockScaling;
14
+ vertical?: BlockScaling;
15
+ onSubmit?: FormOnSubmit<any>;
16
+ }
17
+ export interface FormRef<T extends FieldValues = FieldValues> {
18
+ form: UseFormReturn<T>;
19
+ update: (data: T) => void;
20
+ loader: Toggleable;
21
+ error: (error: unknown, target?: string) => void;
22
+ }
23
+ export interface FormOnSubmit<T> {
24
+ (data: T, update?: (data: T) => void): Promise<void> | void;
25
+ }
26
+ export interface TFormContext extends Omit<FormProps, 'defaults' | 'children'> {
27
+ loader: Toggleable;
28
+ }
29
+ export interface FormFieldProps {
30
+ name: string;
31
+ def?: any;
32
+ }
33
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/form/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,MAAM,WAAW,SAAU,SAAQ,iBAAiB,CAAC,SAAS,CAAC;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;CAC7B;AAED,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IAC1D,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAA;IACtB,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;IACzB,MAAM,EAAE,UAAU,CAAA;IAClB,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAC5D;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAC;IAC5E,MAAM,EAAE,UAAU,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,GAAG,CAAA;CACV"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/form/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export type * from './types.js';
2
+ export * from './form/index.js';
3
+ export * from './layout/index.js';
4
+ export * from './context.js';
5
+ export * from './consts.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAE/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './form/index.js';
2
+ export * from './layout/index.js';
3
+ export * from './context.js';
4
+ export * from './consts.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { ClientModule } from '@owlmeans/client-module';
2
+ import type { AbstractRequest } from '@owlmeans/module';
3
+ export declare const usePanelLayout: <T = {}, R extends AbstractRequest = AbstractRequest<{}>>() => ClientModule<T, R>;
4
+ export declare const useLayoutTitle: (name?: string, alias?: string) => string;
5
+ export declare const prepareLayoutTitle: (title: string) => string;
6
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/components/layout/helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAOvD,eAAO,MAAM,cAAc,GAAI,CAAC,OAAO,CAAC,SAAS,eAAe,6BAAuB,YAAY,CAAC,CAAC,EAAE,CAAC,CAKvG,CAAA;AAED,eAAO,MAAM,cAAc,UAAW,MAAM,UAAU,MAAM,KAAG,MAM9D,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,MAAM,WAA0C,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { useLocation } from 'react-router';
2
+ import { useContext } from '@owlmeans/client';
3
+ import { usePanelI18n } from '../context.js';
4
+ import { useMemo } from 'react';
5
+ export const usePanelLayout = () => {
6
+ const context = useContext();
7
+ const location = useLocation();
8
+ return context.module(location.state.alias);
9
+ };
10
+ export const useLayoutTitle = (name, alias) => {
11
+ const layout = usePanelLayout();
12
+ const t = usePanelI18n(name);
13
+ alias = alias ?? layout.alias;
14
+ return useMemo(() => t(`${prepareLayoutTitle(alias)}`), [alias, name]);
15
+ };
16
+ export const prepareLayoutTitle = (title) => `${title.replace(/\W+/g, '.')}.title`;
17
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/components/layout/helper.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,MAAM,CAAC,MAAM,cAAc,GAAG,GAA4E,EAAE;IAC1G,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,QAAQ,GAA0B,WAAW,EAAE,CAAA;IAErD,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC7C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAa,EAAE,KAAc,EAAU,EAAE;IACtE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAA;IAC/B,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IAC5B,KAAK,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAA;IAE7B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;AACxE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './helper.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './helper.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { Toggleable } from '@owlmeans/client';
2
+ import type { I18nProps } from '@owlmeans/client-i18n';
3
+ import type { PropsWithChildren } from 'react';
4
+ export interface TPanelContext extends PropsWithChildren<I18nProps["i18n"]> {
5
+ loader?: Toggleable;
6
+ }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACzE,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { AnySchema } from 'ajv';
2
+ export declare const schemaToFormDefault: (schema: AnySchema) => Record<string, any>;
3
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/helper/form.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,KAAK,CAAA;AAEpD,eAAO,MAAM,mBAAmB,WAAY,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAGzE,CAAA"}
@@ -0,0 +1,5 @@
1
+ export const schemaToFormDefault = (schema) => {
2
+ const _schema = schema;
3
+ return Object.fromEntries(Object.entries(_schema.properties).map(([key, value]) => [key, value.default ?? '']));
4
+ };
5
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/helper/form.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,MAAiB,EAAuB,EAAE;IAC5E,MAAM,OAAO,GAA4B,MAAiC,CAAA;IAC1E,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAG,KAAa,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AAC1H,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './form.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helper/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './form.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helper/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './components/index.js';
2
+ export * from './helper/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA"}
package/build/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './components/index.js';
2
+ export * from './helper/index.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA"}
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@owlmeans/client-panel",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "scripts": {
6
+ "build": "tsc -b",
7
+ "dev": "sleep 108 && nodemon -e ts,tsx,json --watch src --exec \"tsc -p ./tsconfig.json\"",
8
+ "watch": "tsc -b -w --preserveWatchOutput --pretty"
9
+ },
10
+ "main": "build/index.js",
11
+ "module": "build/index.js",
12
+ "types": "build/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./build/index.js",
16
+ "require": "./build/index.js",
17
+ "default": "./build/index.js",
18
+ "module": "./build/index.js",
19
+ "types": "./build/index.d.ts"
20
+ },
21
+ "./auth": {
22
+ "import": "./build/auth/index.js",
23
+ "require": "./build/auth/index.js",
24
+ "default": "./build/auth/index.js",
25
+ "module": "./build/auth/index.js",
26
+ "types": "./build/auth/index.d.ts"
27
+ },
28
+ "./auth/plugins": {
29
+ "import": "./build/auth/plugins/exports.js",
30
+ "require": "./build/auth/plugins/exports.js",
31
+ "default": "./build/auth/plugins/exports.js",
32
+ "module": "./build/auth/plugins/exports.js",
33
+ "types": "./build/auth/plugins/exports.d.ts"
34
+ }
35
+ },
36
+ "dependencies": {
37
+ "@owlmeans/client": "^0.1.0",
38
+ "@owlmeans/client-i18n": "^0.1.0",
39
+ "@owlmeans/client-module": "^0.1.0",
40
+ "@owlmeans/client-route": "^0.1.0",
41
+ "@owlmeans/error": "^0.1.0",
42
+ "@owlmeans/module": "^0.1.0"
43
+ },
44
+ "peerDependencies": {
45
+ "@owlmeans/auth": "*",
46
+ "@owlmeans/client-auth": "*",
47
+ "@owlmeans/i18n": "*",
48
+ "ajv": "*",
49
+ "react": "*",
50
+ "react-hook-form": "*",
51
+ "react-router": "*"
52
+ },
53
+ "peerDependenciesMeta": {
54
+ "@owlmeans/auth": {
55
+ "optional": true
56
+ },
57
+ "@owlmeans/client-auth": {
58
+ "optional": true
59
+ }
60
+ },
61
+ "devDependencies": {
62
+ "@owlmeans/auth": "^0.1.0",
63
+ "@owlmeans/client-auth": "^0.1.0",
64
+ "@types/react": "^18.3.11",
65
+ "nodemon": "^3.1.7",
66
+ "npm-check": "^6.0.1",
67
+ "react-hook-form": "^7.53.0",
68
+ "typescript": "^5.6.3"
69
+ },
70
+ "private": false,
71
+ "publishConfig": {
72
+ "access": "public"
73
+ }
74
+ }