@owlmeans/mui-panel 0.1.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.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/build/.gitkeep +0 -0
- package/build/auth/context.d.ts +5 -0
- package/build/auth/context.d.ts.map +1 -0
- package/build/auth/context.js +19 -0
- package/build/auth/context.js.map +1 -0
- package/build/auth/exports.d.ts +25 -0
- package/build/auth/exports.d.ts.map +1 -0
- package/build/auth/exports.js +19 -0
- package/build/auth/exports.js.map +1 -0
- package/build/auth/index.d.ts +5 -0
- package/build/auth/index.d.ts.map +1 -0
- package/build/auth/index.js +4 -0
- package/build/auth/index.js.map +1 -0
- package/build/auth/modules.d.ts +2 -0
- package/build/auth/modules.d.ts.map +1 -0
- package/build/auth/modules.js +4 -0
- package/build/auth/modules.js.map +1 -0
- package/build/auth/plugins/basic-ed25519.d.ts +3 -0
- package/build/auth/plugins/basic-ed25519.d.ts.map +1 -0
- package/build/auth/plugins/basic-ed25519.js +40 -0
- package/build/auth/plugins/basic-ed25519.js.map +1 -0
- package/build/auth/plugins/exports.d.ts +4 -0
- package/build/auth/plugins/exports.d.ts.map +1 -0
- package/build/auth/plugins/exports.js +4 -0
- package/build/auth/plugins/exports.js.map +1 -0
- package/build/auth/plugins/index.d.ts +6 -0
- package/build/auth/plugins/index.d.ts.map +1 -0
- package/build/auth/plugins/index.js +10 -0
- package/build/auth/plugins/index.js.map +1 -0
- package/build/auth/plugins/re-captcha.d.ts +3 -0
- package/build/auth/plugins/re-captcha.d.ts.map +1 -0
- package/build/auth/plugins/re-captcha.js +51 -0
- package/build/auth/plugins/re-captcha.js.map +1 -0
- package/build/auth/plugins/tunnel-consumer.d.ts +3 -0
- package/build/auth/plugins/tunnel-consumer.d.ts.map +1 -0
- package/build/auth/plugins/tunnel-consumer.js +38 -0
- package/build/auth/plugins/tunnel-consumer.js.map +1 -0
- package/build/auth/types.d.ts +10 -0
- package/build/auth/types.d.ts.map +1 -0
- package/build/auth/types.js +2 -0
- package/build/auth/types.js.map +1 -0
- package/build/components/block.d.ts +4 -0
- package/build/components/block.d.ts.map +1 -0
- package/build/components/block.js +15 -0
- package/build/components/block.js.map +1 -0
- package/build/components/button/index.d.ts +3 -0
- package/build/components/button/index.d.ts.map +1 -0
- package/build/components/button/index.js +2 -0
- package/build/components/button/index.js.map +1 -0
- package/build/components/button/selector.d.ts +4 -0
- package/build/components/button/selector.d.ts.map +1 -0
- package/build/components/button/selector.js +8 -0
- package/build/components/button/selector.js.map +1 -0
- package/build/components/button/types.d.ts +7 -0
- package/build/components/button/types.d.ts.map +1 -0
- package/build/components/button/types.js +2 -0
- package/build/components/button/types.js.map +1 -0
- package/build/components/form/button/component.d.ts +5 -0
- package/build/components/form/button/component.d.ts.map +1 -0
- package/build/components/form/button/component.js +34 -0
- package/build/components/form/button/component.js.map +1 -0
- package/build/components/form/button/index.d.ts +3 -0
- package/build/components/form/button/index.d.ts.map +1 -0
- package/build/components/form/button/index.js +3 -0
- package/build/components/form/button/index.js.map +1 -0
- package/build/components/form/button/types.d.ts +15 -0
- package/build/components/form/button/types.d.ts.map +1 -0
- package/build/components/form/button/types.js +2 -0
- package/build/components/form/button/types.js.map +1 -0
- package/build/components/form/component.d.ts +4 -0
- package/build/components/form/component.d.ts.map +1 -0
- package/build/components/form/component.js +59 -0
- package/build/components/form/component.js.map +1 -0
- package/build/components/form/index.d.ts +3 -0
- package/build/components/form/index.d.ts.map +1 -0
- package/build/components/form/index.js +2 -0
- package/build/components/form/index.js.map +1 -0
- package/build/components/form/text/component.d.ts +4 -0
- package/build/components/form/text/component.d.ts.map +1 -0
- package/build/components/form/text/component.js +34 -0
- package/build/components/form/text/component.js.map +1 -0
- package/build/components/form/text/index.d.ts +3 -0
- package/build/components/form/text/index.d.ts.map +1 -0
- package/build/components/form/text/index.js +3 -0
- package/build/components/form/text/index.js.map +1 -0
- package/build/components/form/text/types.d.ts +11 -0
- package/build/components/form/text/types.d.ts.map +1 -0
- package/build/components/form/text/types.js +2 -0
- package/build/components/form/text/types.js.map +1 -0
- package/build/components/form/types.d.ts +6 -0
- package/build/components/form/types.d.ts.map +1 -0
- package/build/components/form/types.js +2 -0
- package/build/components/form/types.js.map +1 -0
- package/build/components/helper.d.ts +6 -0
- package/build/components/helper.d.ts.map +1 -0
- package/build/components/helper.js +70 -0
- package/build/components/helper.js.map +1 -0
- package/build/components/index.d.ts +14 -0
- package/build/components/index.d.ts.map +1 -0
- package/build/components/index.js +13 -0
- package/build/components/index.js.map +1 -0
- package/build/components/layout/component.d.ts +4 -0
- package/build/components/layout/component.d.ts.map +1 -0
- package/build/components/layout/component.js +6 -0
- package/build/components/layout/component.js.map +1 -0
- package/build/components/layout/index.d.ts +3 -0
- package/build/components/layout/index.d.ts.map +1 -0
- package/build/components/layout/index.js +3 -0
- package/build/components/layout/index.js.map +1 -0
- package/build/components/layout/types.d.ts +4 -0
- package/build/components/layout/types.d.ts.map +1 -0
- package/build/components/layout/types.js +2 -0
- package/build/components/layout/types.js.map +1 -0
- package/build/components/link.d.ts +4 -0
- package/build/components/link.d.ts.map +1 -0
- package/build/components/link.js +27 -0
- package/build/components/link.js.map +1 -0
- package/build/components/panel-app/component.d.ts +4 -0
- package/build/components/panel-app/component.d.ts.map +1 -0
- package/build/components/panel-app/component.js +11 -0
- package/build/components/panel-app/component.js.map +1 -0
- package/build/components/panel-app/index.d.ts +3 -0
- package/build/components/panel-app/index.d.ts.map +1 -0
- package/build/components/panel-app/index.js +3 -0
- package/build/components/panel-app/index.js.map +1 -0
- package/build/components/panel-app/types.d.ts +6 -0
- package/build/components/panel-app/types.d.ts.map +1 -0
- package/build/components/panel-app/types.js +2 -0
- package/build/components/panel-app/types.js.map +1 -0
- package/build/components/status.d.ts +4 -0
- package/build/components/status.d.ts.map +1 -0
- package/build/components/status.js +19 -0
- package/build/components/status.js.map +1 -0
- package/build/components/text.d.ts +4 -0
- package/build/components/text.d.ts.map +1 -0
- package/build/components/text.js +9 -0
- package/build/components/text.js.map +1 -0
- package/build/components/types.d.ts +32 -0
- package/build/components/types.d.ts.map +1 -0
- package/build/components/types.js +2 -0
- package/build/components/types.js.map +1 -0
- package/build/components/uploader/image.d.ts +4 -0
- package/build/components/uploader/image.d.ts.map +1 -0
- package/build/components/uploader/image.js +24 -0
- package/build/components/uploader/image.js.map +1 -0
- package/build/components/uploader/index.d.ts +2 -0
- package/build/components/uploader/index.d.ts.map +1 -0
- package/build/components/uploader/index.js +2 -0
- package/build/components/uploader/index.js.map +1 -0
- package/build/components/uploader/types.d.ts +5 -0
- package/build/components/uploader/types.d.ts.map +1 -0
- package/build/components/uploader/types.js +2 -0
- package/build/components/uploader/types.js.map +1 -0
- package/build/context.d.ts +4 -0
- package/build/context.d.ts.map +1 -0
- package/build/context.js +12 -0
- package/build/context.js.map +1 -0
- package/build/exports.d.ts +19 -0
- package/build/exports.d.ts.map +1 -0
- package/build/exports.js +17 -0
- package/build/exports.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -0
- package/build/main.d.ts +5 -0
- package/build/main.d.ts.map +1 -0
- package/build/main.js +14 -0
- package/build/main.js.map +1 -0
- package/build/modules.d.ts +2 -0
- package/build/modules.d.ts.map +1 -0
- package/build/modules.js +4 -0
- package/build/modules.js.map +1 -0
- package/build/types.d.ts +9 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/package.json +95 -0
- package/src/auth/context.ts +27 -0
- package/src/auth/exports.ts +29 -0
- package/src/auth/index.ts +5 -0
- package/src/auth/modules.ts +5 -0
- package/src/auth/plugins/basic-ed25519.tsx +57 -0
- package/src/auth/plugins/exports.ts +4 -0
- package/src/auth/plugins/index.ts +15 -0
- package/src/auth/plugins/re-captcha.tsx +73 -0
- package/src/auth/plugins/tunnel-consumer.tsx +65 -0
- package/src/auth/types.ts +11 -0
- package/src/components/block.tsx +27 -0
- package/src/components/button/index.ts +3 -0
- package/src/components/button/selector.tsx +16 -0
- package/src/components/button/types.ts +7 -0
- package/src/components/form/button/component.tsx +53 -0
- package/src/components/form/button/index.ts +3 -0
- package/src/components/form/button/types.ts +16 -0
- package/src/components/form/component.tsx +101 -0
- package/src/components/form/index.ts +3 -0
- package/src/components/form/text/component.tsx +45 -0
- package/src/components/form/text/index.ts +3 -0
- package/src/components/form/text/types.ts +11 -0
- package/src/components/form/types.ts +6 -0
- package/src/components/helper.ts +79 -0
- package/src/components/index.ts +17 -0
- package/src/components/layout/component.tsx +7 -0
- package/src/components/layout/index.ts +3 -0
- package/src/components/layout/types.ts +4 -0
- package/src/components/link.tsx +34 -0
- package/src/components/panel-app/component.tsx +20 -0
- package/src/components/panel-app/index.ts +3 -0
- package/src/components/panel-app/types.ts +6 -0
- package/src/components/status.tsx +23 -0
- package/src/components/text.tsx +14 -0
- package/src/components/types.ts +35 -0
- package/src/components/uploader/image.tsx +31 -0
- package/src/components/uploader/index.ts +2 -0
- package/src/components/uploader/types.ts +6 -0
- package/src/context.ts +18 -0
- package/src/exports.ts +22 -0
- package/src/index.ts +9 -0
- package/src/main.tsx +19 -0
- package/src/modules.ts +5 -0
- package/src/types.ts +11 -0
- package/tests/smoke.spec.ts +24 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/components/form/button/component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAUvD,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAuBjC,CAAA;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,WAAW,CAcvC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
import MUIButton from '@mui/material/Button';
|
|
5
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
6
|
+
import { useFormContext } from 'react-hook-form';
|
|
7
|
+
import { useCommonI18n, useI18nApp, useI18nLib } from '@owlmeans/client-i18n';
|
|
8
|
+
import { useContext } from '@owlmeans/client';
|
|
9
|
+
import { useFormI18n, usePanelHelper } from '@owlmeans/client-panel';
|
|
10
|
+
export const Button = memo(({ label, onClick, i18n, loader, size, fullWidth, variant = 'contained' }) => {
|
|
11
|
+
const context = useContext();
|
|
12
|
+
const panel = usePanelHelper();
|
|
13
|
+
const t = useCommonI18n(i18n?.resource ?? panel.resource ?? context.cfg.service, i18n?.ns ?? panel.ns, i18n?.prefix ?? panel.prefix);
|
|
14
|
+
const appT = useI18nApp(context.cfg.service, 'buttons');
|
|
15
|
+
const libT = useI18nLib('client-panel', 'buttons');
|
|
16
|
+
label = useMemo(() => i18n?.suppress ? label : t(label, {
|
|
17
|
+
defaultValue: appT(label, { defaultValue: libT(label) })
|
|
18
|
+
}), [i18n?.suppress, label]);
|
|
19
|
+
size = size ?? 'medium';
|
|
20
|
+
const progressSize = size === 'large'
|
|
21
|
+
? 20
|
|
22
|
+
: size === 'medium' ? 16 : 14;
|
|
23
|
+
return _jsx(MUIButton, { variant: variant, size: size, fullWidth: fullWidth, startIcon: loader != null && loader.opened === true ? _jsx(CircularProgress, { size: progressSize }) : undefined, disabled: loader != null && loader.opened === true, onClick: onClick, children: label });
|
|
24
|
+
});
|
|
25
|
+
export const SubmitButton = memo((props) => {
|
|
26
|
+
let { i18n, label } = props;
|
|
27
|
+
const { handleSubmit } = useFormContext();
|
|
28
|
+
const t = useFormI18n();
|
|
29
|
+
label = label ?? 'submit';
|
|
30
|
+
const _i18n = { ...i18n };
|
|
31
|
+
_i18n.suppress = true;
|
|
32
|
+
return _jsx(Button, { ...props, label: t(label), i18n: _i18n, onClick: handleSubmit(props.onSubmit ?? props.onClick ?? (() => { console.info('Empty submit'); }), problem => console.error('Failed to submit form with error: ', problem)) });
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/form/button/component.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAG5B,OAAO,SAAS,MAAM,sBAAsB,CAAA;AAC5C,OAAO,gBAAgB,MAAM,gCAAgC,CAAA;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEpE,MAAM,CAAC,MAAM,MAAM,GAAoB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,GAAG,WAAW,EAAE,EAAE,EAAE;IACvH,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,KAAK,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,CAAC,GAAG,aAAa,CACrB,IAAI,EAAE,QAAQ,IAAI,KAAK,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EACvD,IAAI,EAAE,EAAE,IAAI,KAAK,CAAC,EAAE,EACpB,IAAI,EAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAC7B,CAAA;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IACvD,M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AAQ,CAAA;IACzB,MAAM,KAAK,GAAsB,EAAE,GAAG,IAAI,EAAE,CAAA;IAC5C,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAA;IAErB,OAAO,KAAC,MAAM,OAAK,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EACpD,OAAO,EAAE,YAAY,CACnB,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA,CAAC,CAAC,CAAC,EAC3E,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,OAAO,CAAC,CACxE,GAAI,CAAA;AACT,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/button/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/button/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Toggleable } from '@owlmeans/client';
|
|
2
|
+
import type { I18nProps } from '@owlmeans/client-i18n';
|
|
3
|
+
export interface ButtonProps extends I18nProps {
|
|
4
|
+
size?: 'small' | 'medium' | 'large';
|
|
5
|
+
fullWidth?: boolean;
|
|
6
|
+
variant?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
loader?: Toggleable;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface SubmitProps extends Omit<ButtonProps, "label"> {
|
|
12
|
+
label?: string;
|
|
13
|
+
onSubmit?: (data: any) => Promise<void> | void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/form/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEtD,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAC/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/form/button/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/form/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAmB/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAK9C,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,YAAY,CA4EjC,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { FormProvider, useForm } from 'react-hook-form';
|
|
4
|
+
import { ajvResolver } from '@hookform/resolvers/ajv';
|
|
5
|
+
import Grid from '@mui/material/Grid';
|
|
6
|
+
import Card from '@mui/material/Card';
|
|
7
|
+
import CardContent from '@mui/material/CardContent';
|
|
8
|
+
import CardActions from '@mui/material/CardActions';
|
|
9
|
+
import { FormContext, schemaToFormDefault } from '@owlmeans/client-panel';
|
|
10
|
+
import Ajv from 'ajv';
|
|
11
|
+
import formatsPlugin from 'ajv-formats';
|
|
12
|
+
import { useTheme } from '@mui/material/styles';
|
|
13
|
+
import { SubmitButton } from './button/component.js';
|
|
14
|
+
import { useToggle } from '@owlmeans/client';
|
|
15
|
+
import { scalingToStyles } from '../helper.js';
|
|
16
|
+
import { ResilientError } from '@owlmeans/error';
|
|
17
|
+
import { Status } from '../status.js';
|
|
18
|
+
const ajv = new Ajv({ coerceTypes: true });
|
|
19
|
+
formatsPlugin(ajv);
|
|
20
|
+
export const Form = (props) => {
|
|
21
|
+
const { defaults, children, formRef, validation, name, horizontal, vertical, decorate, onSubmit, i18n, styles } = props;
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const _defaults = useMemo(() => defaults ?? (validation != null ? schemaToFormDefault(validation) : undefined), [name, defaults != null, validation != null]);
|
|
24
|
+
const loader = useToggle(false);
|
|
25
|
+
const form = useForm({
|
|
26
|
+
mode: 'all',
|
|
27
|
+
defaultValues: _defaults,
|
|
28
|
+
resolver: validation
|
|
29
|
+
? ajvResolver(validation, { formats: ajv.formats, coerceTypes: true })
|
|
30
|
+
: undefined,
|
|
31
|
+
delayError: 300
|
|
32
|
+
});
|
|
33
|
+
const update = useCallback(((data) => {
|
|
34
|
+
const fields = validation != null
|
|
35
|
+
? Object.keys(validation.properties)
|
|
36
|
+
: Object.keys(data);
|
|
37
|
+
fields.forEach(key => {
|
|
38
|
+
form.setValue(key, data[key]);
|
|
39
|
+
});
|
|
40
|
+
}), [name]);
|
|
41
|
+
const setError = useCallback((error, target = 'root') => {
|
|
42
|
+
form.setError(target, {
|
|
43
|
+
message: ResilientError.ensure(error instanceof Error ? error : `${error}`).marshal().message
|
|
44
|
+
});
|
|
45
|
+
}, [name]);
|
|
46
|
+
if (formRef != null) {
|
|
47
|
+
formRef.current = { form, update, loader, error: setError };
|
|
48
|
+
}
|
|
49
|
+
const style = useMemo(() => scalingToStyles(horizontal, vertical, theme), [horizontal]);
|
|
50
|
+
const content = () => _jsx(Grid, { container: true, direction: "column", justifyContent: "flex-start", alignItems: "stretch", rowSpacing: 2, sx: !decorate ? style : {}, children: Array.isArray(children)
|
|
51
|
+
? children.map((child, index) => _jsx(Grid, { children: child }, index)) : children });
|
|
52
|
+
if (decorate === true) {
|
|
53
|
+
const root = form.getFieldState('root');
|
|
54
|
+
return _jsx(FormProvider, { ...form, children: _jsx(FormContext, { ...props, loader: loader, children: _jsxs(Card, { sx: { ...style, display: 'flex', flexDirection: 'column', justifyContent: 'space-between', ...styles }, children: [_jsxs(CardContent, { children: [content(), root.invalid && root.error?.message &&
|
|
55
|
+
_jsx(Status, { ok: false, i18n: i18n, error: ResilientError.ensure(root.error.message) })] }), onSubmit != null ? _jsx(CardActions, { sx: { flexDirection: 'row', justifyContent: 'flex-end', pr: 2, pb: 2 }, children: _jsx(SubmitButton, { loader: loader, onSubmit: async (data) => onSubmit(data, update) }) }) : undefined] }) }) });
|
|
56
|
+
}
|
|
57
|
+
return _jsx(FormProvider, { ...form, children: _jsx(FormContext, { ...props, loader: loader, children: content() }) });
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/form/component.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAi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K,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAI,IACzE,EACb,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,EAAE,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,YACrG,KAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAC,IAAI,EAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,GAAI,GACpE,CAAC,CAAC,CAAC,SAAS,IACrB,GACK,GACD,CAAA;IACjB,CAAC;IAED,OAAO,KAAC,YAAY,OAAK,IAAI,YAC3B,KAAC,WAAW,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,YAAG,OAAO,EAAE,GAAe,GACpD,CAAA;AACjB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,mBAAmB,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/components/form/text/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAM3C,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoCxC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import { useFormError, useFormI18n } from '@owlmeans/client-panel';
|
|
5
|
+
import { useClientFormContext } from '@owlmeans/client-panel';
|
|
6
|
+
export const TextInput = ({ name, label, placeholder, hint, type, def, disableAutocomplete }) => {
|
|
7
|
+
const { control } = useFormContext();
|
|
8
|
+
const t = useFormI18n();
|
|
9
|
+
const key = name;
|
|
10
|
+
if (typeof label === 'boolean' && label) {
|
|
11
|
+
label = t(`${key}.label`);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
label = undefined;
|
|
15
|
+
}
|
|
16
|
+
if (typeof placeholder === 'boolean' && placeholder) {
|
|
17
|
+
placeholder = t(`${key}.placeholder`);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
placeholder = undefined;
|
|
21
|
+
}
|
|
22
|
+
if (typeof hint === 'boolean' && hint) {
|
|
23
|
+
hint = t(`${key}.hint`);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
hint = undefined;
|
|
27
|
+
}
|
|
28
|
+
return _jsx(Controller, { control: control, name: name, defaultValue: def, render: ({ field, fieldState }) => {
|
|
29
|
+
const error = useFormError(name, fieldState.error);
|
|
30
|
+
const { loader } = useClientFormContext();
|
|
31
|
+
return _jsx(TextField, { fullWidth: true, ...field, error: fieldState.error != null, disabled: loader != null && loader.opened === true, label: label, type: type ?? 'text', placeholder: placeholder, autoComplete: disableAutocomplete ? 'off' : 'on', helperText: error ?? hint });
|
|
32
|
+
} });
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/form/text/component.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB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C,CAAA;YAClD,MAAM,EAAE,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAAA;YAEzC,OAAO,KAAC,SAAS,IAAC,SAAS,WAAK,KAAK,EACnC,KAAK,EAAE,UAAU,CAAC,KAAK,IAAI,IAAI,EAC/B,QAAQ,EAAE,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAClD,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,IAAI,MAAM,EACpB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAChD,UAAU,EAAE,KAAK,IAAI,IAAI,GACzB,CAAA;QACJ,CAAC,GACC,CAAA;AACN,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/text/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/form/text/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FormFieldProps } from '@owlmeans/client-panel';
|
|
2
|
+
import type { HTMLInputTypeAttribute } from 'react';
|
|
3
|
+
export interface TextInputProps extends FormFieldProps {
|
|
4
|
+
name: string;
|
|
5
|
+
label?: string | boolean;
|
|
6
|
+
placeholder?: string | boolean;
|
|
7
|
+
hint?: string | boolean;
|
|
8
|
+
type?: HTMLInputTypeAttribute;
|
|
9
|
+
disableAutocomplete?: boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/form/text/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAEnD,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,sBAAsB,CAAA;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/form/text/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/form/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAG,MAAM,wBAAwB,CAAA;AAExD,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/form/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
import { BlockScaling } from '@owlmeans/client-panel';
|
|
3
|
+
export declare const scalingToStyles: (horizontal?: BlockScaling, vertical?: BlockScaling, theme?: Theme) => SxProps;
|
|
4
|
+
export declare const useBreakPoint: () => string;
|
|
5
|
+
export declare const useMapBreakpoint: <T>(map: Record<string, T>, def?: T, breakpoint?: string) => T;
|
|
6
|
+
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/components/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAErD,eAAO,MAAM,eAAe,GAC1B,aAAa,YAAY,EACzB,WAAW,YAAY,EACvB,QAAQ,KAAK,KACZ,OAuCF,CAAA;AAED,eAAO,MAAM,aAAa,cAiBzB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,aAAa,MAAM,KAAG,CAS1F,CAAA"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
3
|
+
import { BlockScaling } from '@owlmeans/client-panel';
|
|
4
|
+
export const scalingToStyles = (horizontal, vertical, theme) => {
|
|
5
|
+
const style = {};
|
|
6
|
+
switch (horizontal) {
|
|
7
|
+
case BlockScaling.Half:
|
|
8
|
+
Object.assign(style, {
|
|
9
|
+
maxWidth: '50%',
|
|
10
|
+
[theme?.breakpoints.down('md') ?? 'xs']: {
|
|
11
|
+
maxWidth: '90%'
|
|
12
|
+
},
|
|
13
|
+
flexGrow: 1
|
|
14
|
+
});
|
|
15
|
+
break;
|
|
16
|
+
case BlockScaling.Wide:
|
|
17
|
+
Object.assign(style, { mx: '10%', flexGrow: 1 });
|
|
18
|
+
break;
|
|
19
|
+
case BlockScaling.Full:
|
|
20
|
+
Object.assign(style, { flexGrow: 1 });
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
switch (vertical) {
|
|
24
|
+
case BlockScaling.Half:
|
|
25
|
+
Object.assign(style, {
|
|
26
|
+
maxHeight: '50%',
|
|
27
|
+
[theme?.breakpoints.down('md') ?? 'xs']: {
|
|
28
|
+
maxHeight: '90%'
|
|
29
|
+
},
|
|
30
|
+
flexGrow: 1
|
|
31
|
+
});
|
|
32
|
+
break;
|
|
33
|
+
case BlockScaling.Wide:
|
|
34
|
+
Object.assign(style, { my: '10%', flexGrow: 1 });
|
|
35
|
+
break;
|
|
36
|
+
case BlockScaling.Full:
|
|
37
|
+
Object.assign(style, { height: '100%', flexGrow: 1 });
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
return style;
|
|
41
|
+
};
|
|
42
|
+
export const useBreakPoint = () => {
|
|
43
|
+
const theme = useTheme();
|
|
44
|
+
// Define breakpoints
|
|
45
|
+
const isXs = useMediaQuery(theme.breakpoints.only('xs'));
|
|
46
|
+
const isSm = useMediaQuery(theme.breakpoints.only('sm'));
|
|
47
|
+
const isMd = useMediaQuery(theme.breakpoints.only('md'));
|
|
48
|
+
const isLg = useMediaQuery(theme.breakpoints.only('lg'));
|
|
49
|
+
const isXl = useMediaQuery(theme.breakpoints.only('xl'));
|
|
50
|
+
let currentBreakpoint = isXs ? 'xs' : 'unknown'; // Default value
|
|
51
|
+
if (isSm)
|
|
52
|
+
currentBreakpoint = 'sm';
|
|
53
|
+
if (isMd)
|
|
54
|
+
currentBreakpoint = 'md';
|
|
55
|
+
if (isLg)
|
|
56
|
+
currentBreakpoint = 'lg';
|
|
57
|
+
if (isXl)
|
|
58
|
+
currentBreakpoint = 'xl';
|
|
59
|
+
return currentBreakpoint;
|
|
60
|
+
};
|
|
61
|
+
export const useMapBreakpoint = (map, def, breakpoint) => {
|
|
62
|
+
const _breakpoint = useBreakPoint();
|
|
63
|
+
breakpoint = breakpoint ?? _breakpoint;
|
|
64
|
+
const result = map[breakpoint] ?? def;
|
|
65
|
+
if (result == null) {
|
|
66
|
+
throw new SyntaxError(`Breakpoint should always return value. We have ${breakpoint}, but ${Object.keys(map).join(', ')} are available`);
|
|
67
|
+
}
|
|
68
|
+
return result;
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/components/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,aAAa,MAAM,6BAA6B,CAAA;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAErD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,UAAyB,EACzB,QAAuB,EACvB,KAAa,EACJ,EAAE;IACX,MAAM,KAAK,GAAY,EAAE,CAAA;IACzB,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,YAAY,CAAC,IAAI;YACpB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;gBACnB,QAAQ,EAAE,KAAK;gBACf,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE;oBACvC,QAAQ,EAAE,KAAK;iBAChB;gBACD,QAAQ,EAAE,CAAC;aACZ,CAAC,CAAA;YACF,MAAK;QACP,KAAK,YAAY,CAAC,IAAI;YACpB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAA;YAChD,MAAK;QACP,KAAK,YAAY,CAAC,IAAI;YACpB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAA;YACrC,MAAK;IACT,CAAC;IAED,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,YAAY,CAAC,IAAI;YACpB,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;gBACnB,SAAS,EAAE,KAAK;gBAChB,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IA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AG,IAAI,CAAA;IAClC,IAAI,IAAI;QAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,IAAI,IAAI;QAAE,iBAAiB,GAAG,IAAI,CAAA;IAElC,OAAO,iBAAiB,CAAA;AAC1B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAI,GAAsB,EAAE,GAAO,EAAE,UAAmB,EAAK,EAAE;IAC7F,MAAM,WAAW,GAAG,aAAa,EAAE,CAAA;IACnC,UAAU,GAAG,UAAU,IAAI,WAAW,CAAA;IACtC,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,CAAA;IACrC,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,WAAW,CAAC,kDAAkD,UAAU,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IACzI,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type * from './types.js';
|
|
2
|
+
export * from './panel-app/index.js';
|
|
3
|
+
export * from './layout/index.js';
|
|
4
|
+
export * from './form/index.js';
|
|
5
|
+
export * from './form/text/index.js';
|
|
6
|
+
export * from './form/button/index.js';
|
|
7
|
+
export * from './uploader/index.js';
|
|
8
|
+
export * from './button/index.js';
|
|
9
|
+
export * from './block.js';
|
|
10
|
+
export * from './text.js';
|
|
11
|
+
export * from './link.js';
|
|
12
|
+
export * from './helper.js';
|
|
13
|
+
export * from './status.js';
|
|
14
|
+
//# 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,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './panel-app/index.js';
|
|
2
|
+
export * from './layout/index.js';
|
|
3
|
+
export * from './form/index.js';
|
|
4
|
+
export * from './form/text/index.js';
|
|
5
|
+
export * from './form/button/index.js';
|
|
6
|
+
export * from './uploader/index.js';
|
|
7
|
+
export * from './button/index.js';
|
|
8
|
+
export * from './block.js';
|
|
9
|
+
export * from './text.js';
|
|
10
|
+
export * from './link.js';
|
|
11
|
+
export * from './helper.js';
|
|
12
|
+
export * from './status.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AAEnC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/layout/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG7C,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAElC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/layout/component.tsx"],"names":[],"mappings":";AAEA,OAAO,GAAG,MAAM,mBAAmB,CAAA;AAEnC,MAAM,CAAC,MAAM,MAAM,GAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtD,OAAO,KAAC,GAAG,cAAE,QAAQ,GAAO,CAAA;AAC9B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/layout/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAE9C,MAAM,WAAW,WAAY,SAAQ,iBAAiB;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/layout/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAO3C,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAwB9B,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { usePanelI18n } from '@owlmeans/client-panel';
|
|
3
|
+
import MUILink from '@mui/material/Link';
|
|
4
|
+
import { useValue } from '@owlmeans/client';
|
|
5
|
+
import { useContext } from '@owlmeans/web-client';
|
|
6
|
+
export const Link = ({ src, module, name, variant, children, center, open, styles }) => {
|
|
7
|
+
const t = usePanelI18n();
|
|
8
|
+
const context = useContext();
|
|
9
|
+
const href = useValue(async () => {
|
|
10
|
+
if (src != null) {
|
|
11
|
+
return src;
|
|
12
|
+
}
|
|
13
|
+
if (module != null) {
|
|
14
|
+
module = typeof module === 'string' ? context.module(module) : module;
|
|
15
|
+
const [url] = await module.call();
|
|
16
|
+
return url;
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}, [src, module]);
|
|
20
|
+
const label = name != null
|
|
21
|
+
? t(name)
|
|
22
|
+
: children != null || module == null
|
|
23
|
+
? undefined : t(`modules.${typeof module == 'string' ? module : module.alias}`);
|
|
24
|
+
const target = open ? '_blank' : undefined;
|
|
25
|
+
return _jsx(MUILink, { href: href ?? undefined, target: target, variant: variant, sx: { textAlign: center ? 'center' : 'inherit', ...styles }, children: label ?? children });
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/components/link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAGrD,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGjD,MAAM,CAAC,MAAM,IAAI,GAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAA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AAC,CAAC,SAAS,EAAE,GAAG,MAAM,EAAE,YAAG,KAAK,IAAI,QAAQ,GAAW,CAAA;AAC9F,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/panel-app/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAO/C,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAUtC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { App } from '@owlmeans/client';
|
|
4
|
+
import { I18nContext } from '@owlmeans/client-i18n';
|
|
5
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
6
|
+
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|
7
|
+
export const PanelApp = ({ context, provide, children, theme }) => {
|
|
8
|
+
theme = useMemo(() => theme ?? createTheme(), [theme]);
|
|
9
|
+
return _jsx(ThemeProvider, { theme: theme, children: _jsx(I18nContext, { config: context.cfg, children: _jsxs(App, { context: context, provide: provide, children: [_jsx(CssBaseline, {}), children] }) }) });
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/panel-app/component.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,WAAW,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEjE,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IACnF,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,WAAW,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IACtD,OAAO,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YAChC,KAAC,WAAW,IAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAC9B,MAAC,GAAG,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,aACrC,KAAC,WAAW,KAAG,EACd,QAAQ,IACJ,GACK,GACA,CAAA;AAClB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/panel-app/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/panel-app/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/panel-app/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhD,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC3C,KAAK,CAAC,EAAE,KAAK,CAAA;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/panel-app/types.ts"],"names":[],"mappings":""}
|