@gen-epix/ui-core-components 4.1.0 → 4.3.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.
- package/dist/components/CopyToClipboardButton/index.js.map +1 -1
- package/dist/hoc/withDialog/index.js +13 -3
- package/dist/hoc/withDialog/index.js.map +1 -1
- package/dist/hoc/withDialog/withDialog.d.ts +4 -0
- package/dist/locale/en.json +1 -0
- package/dist/locale/nl.json +1 -0
- package/package.json +41 -40
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../builtin:esm-external-require-react","../../../../../node_modules/.pnpm/use-cleanup-callback@1.3.0_react@19.
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../builtin:esm-external-require-react","../../../../../node_modules/.pnpm/use-cleanup-callback@1.3.0_react@19.3.0/node_modules/use-cleanup-callback/dist/index.js","../../../src/components/CopyToClipboardButton/CopyToClipboardButton.tsx"],"sourcesContent":["import * as m from 'react';module.exports = { ...m };","var n=require(\"react\");function e(n){var e=n.cleanup;n.isCalled||\"function\"!=typeof e||(n.isCalled=!0,e())}module.exports=function(u,c,l){var r=void 0===l?{}:l,a=r.cleanUpOnCall,t=void 0===a||a,o=r.cleanUpOnDepsChange,i=void 0!==o&&o,p=r.cleanUpOnUnmount,f=void 0===p||p,s=n.useRef({cleanup:null,isCalled:!1}),C={cleanUpOnCall:t,cleanUpOnDepsChange:i,cleanUpOnUnmount:f},U=n.useRef(C);return n.useEffect(function(){U.current=C}),n.useEffect(function(){return function(){U.current.cleanUpOnDepsChange&&e(s.current)}},[c]),n.useEffect(function(){return function(){U.current.cleanUpOnUnmount&&e(s.current)}},[]),n.useCallback(function(){U.current.cleanUpOnCall&&e(s.current);var n=u.apply(void 0,[].slice.call(arguments));if(\"object\"==typeof n){var c=n.value,l=n.cleanup;return s.current={cleanup:l,isCalled:!1},c}return\"function\"==typeof n&&(s.current={cleanup:n,isCalled:!1}),n},c)};\n//# sourceMappingURL=index.js.map\n","import type { ButtonOwnProps } from '@mui/material';\nimport {\n Button,\n IconButton,\n Tooltip,\n} from '@mui/material';\nimport { useTranslation } from 'react-i18next';\nimport useCleanupCallback from 'use-cleanup-callback';\nimport ContentCopyIcon from '@mui/icons-material/ContentCopy';\nimport DoneIcon from '@mui/icons-material/Done';\nimport ErrorIcon from '@mui/icons-material/Error';\nimport type { ReactElement } from 'react';\nimport { useState } from 'react';\n\nexport type CopyToClipboardButtonProps = {\n readonly baseIcon?: ReactElement;\n readonly buttonProps?: ButtonOwnProps;\n readonly buttonText?: string;\n readonly buttonVariant?: ButtonOwnProps['variant'];\n readonly clipboardValue?: string;\n readonly iconOnly?: boolean;\n readonly onGetClipboardValue?: () => string;\n readonly tooltipSuccessText?: string;\n};\n\nexport const CopyToClipboardButton = ({ baseIcon, buttonProps, buttonText, buttonVariant, clipboardValue, iconOnly, onGetClipboardValue, tooltipSuccessText }: CopyToClipboardButtonProps) => {\n const { t } = useTranslation();\n const [copyToClipBoardButtonColor, setCopyToClipBoardButtonColor] = useState<ButtonOwnProps['color']>('primary');\n const [copyToClipBoardIcon, setCopyToClipBoardIcon] = useState<ReactElement>(baseIcon ?? <ContentCopyIcon />);\n const [tooltipText, setTooltipText] = useState<string>(buttonText ?? t`Copy to clipboard`);\n\n\n const onCopyToClipboardButtonClick = useCleanupCallback(() => {\n let timeoutId: number;\n const perform = async () => {\n try {\n await navigator.clipboard.writeText(clipboardValue ?? onGetClipboardValue());\n setCopyToClipBoardButtonColor('success');\n setCopyToClipBoardIcon(\n <DoneIcon />,\n );\n setTooltipText(tooltipSuccessText ?? t`Copied to clipboard`);\n } catch (_error: unknown) {\n setCopyToClipBoardButtonColor('error');\n setCopyToClipBoardIcon(\n <ErrorIcon />,\n );\n setTooltipText(t`Error`);\n } finally {\n timeoutId = window.setTimeout(() => {\n setCopyToClipBoardButtonColor('primary');\n setCopyToClipBoardIcon(baseIcon ?? <ContentCopyIcon />);\n setTooltipText(buttonText ?? t`Copy to clipboard`);\n }, 2000);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n perform();\n return () => {\n clearTimeout(timeoutId);\n };\n }, [baseIcon, buttonText, clipboardValue, onGetClipboardValue, t, tooltipSuccessText]);\n\n if (iconOnly) {\n return (\n <Tooltip\n arrow\n placement={'top'}\n title={tooltipText}\n >\n <IconButton\n {...buttonProps}\n color={copyToClipBoardButtonColor}\n onClick={onCopyToClipboardButtonClick}\n size={'small'}\n >\n {copyToClipBoardIcon}\n </IconButton>\n </Tooltip>\n );\n }\n\n return (\n <Button\n {...buttonProps}\n color={copyToClipBoardButtonColor}\n onClick={onCopyToClipboardButtonClick}\n startIcon={copyToClipBoardIcon}\n variant={buttonVariant ?? 'contained'}\n >\n {buttonText ?? t`Copy to clipboard`}\n </Button>\n );\n};\n"],"x_google_ignoreList":[1],"mappings":";;;;;;;;;;;CAA2B,EAAO,UAAU,EAAE,GAAG,EAAE;;CCAnD,IAAI,IAAA,EAAA;CAAmB,SAAS,EAAE,GAAE;EAAC,IAAI,IAAE,EAAE;EAAQ,EAAE,YAAsB,OAAO,KAAnB,eAAuB,EAAE,WAAS,CAAC,GAAE,EAAE;CAAE;CAAC,EAAO,UAAQ,SAAS,GAAE,GAAE,GAAE;EAAC,IAAI,IAAW,MAAT,KAAK,IAAM,CAAC,IAAE,GAAE,IAAE,EAAE,eAAc,IAAW,MAAT,KAAK,KAAO,GAAE,IAAE,EAAE,qBAAoB,IAAW,MAAT,KAAK,KAAO,GAAE,IAAE,EAAE,kBAAiB,IAAW,MAAT,KAAK,KAAO,GAAE,IAAE,EAAE,OAAO;GAAC,SAAQ;GAAK,UAAS,CAAC;EAAC,CAAC,GAAE,IAAE;GAAC,eAAc;GAAE,qBAAoB;GAAE,kBAAiB;EAAC,GAAE,IAAE,EAAE,OAAO,CAAC;EAAE,OAAO,EAAE,UAAU,WAAU;GAAC,EAAE,UAAQ;EAAC,CAAC,GAAE,EAAE,UAAU,WAAU;GAAC,O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AO;GACzB,UAAU;IACR,IAAY,OAAO,iBAAiB;KAGlC,AAFA,EAA8B,SAAS,GACvC,EAAuB,KAAY,kBAAC,GAAD,CAAkB,CAAA,CAAC,GACtD,EAAe,KAAc,CAAC,mBAAmB;IACnD,GAAG,GAAI;GACT;EACF,EAEA,CAAQ,SACK;GACX,aAAa,CAAS;EACxB;CACF,GAAG;EAAC;EAAU;EAAY;EAAgB;EAAqB;EAAG;CAAkB,CAAC;CAqBrF,OAnBI,IAEA,kBAAC,GAAD;EACE,OAAA;EACA,WAAW;EACX,OAAO;EAEP,UAAA,kBAAC,GAAD;GACE,GAAI;GACJ,OAAO;GACP,SAAS;GACT,MAAM;GAEL,UAAA;EACS,CAAA;CACL,CAAA,IAKX,kBAAC,GAAD;EACE,GAAI;EACJ,OAAO;EACP,SAAS;EACT,WAAW;EACX,SAAS,KAAiB;EAEzB,UAAA,KAAc,CAAC;CACV,CAAA;AAEZ"}
|
|
@@ -7,11 +7,13 @@ var i = (i, a = {}) => class extends t {
|
|
|
7
7
|
constructor(e) {
|
|
8
8
|
super(e), this.state = {
|
|
9
9
|
actions: null,
|
|
10
|
+
disableBackdropClick: a?.disableBackdropClick,
|
|
10
11
|
isOpen: !1,
|
|
12
|
+
noCloseButton: a?.noCloseButton,
|
|
11
13
|
openProps: void 0,
|
|
12
14
|
permalink: e.permalink,
|
|
13
15
|
title: e.title || a?.defaultTitle
|
|
14
|
-
}, this.onClose = this.onClose.bind(this), this.onPermalinkChange = this.onPermalinkChange.bind(this), this.onTitleChange = this.onTitleChange.bind(this), this.onActionsChange = this.onActionsChange.bind(this), this.dialogContentRef = n();
|
|
16
|
+
}, this.onClose = this.onClose.bind(this), this.onPermalinkChange = this.onPermalinkChange.bind(this), this.onTitleChange = this.onTitleChange.bind(this), this.onActionsChange = this.onActionsChange.bind(this), this.onDisableBackdropClickChange = this.onDisableBackdropClickChange.bind(this), this.onNoCloseButtonChange = this.onNoCloseButtonChange.bind(this), this.dialogContentRef = n();
|
|
15
17
|
}
|
|
16
18
|
close() {
|
|
17
19
|
this.setState({ isOpen: !1 });
|
|
@@ -27,11 +29,11 @@ var i = (i, a = {}) => class extends t {
|
|
|
27
29
|
return t ? /* @__PURE__ */ r(e, {
|
|
28
30
|
actions: this.state.actions,
|
|
29
31
|
dialogContentRef: this.dialogContentRef,
|
|
30
|
-
disableBackdropClick:
|
|
32
|
+
disableBackdropClick: this.state.disableBackdropClick,
|
|
31
33
|
fullScreen: a.fullScreen,
|
|
32
34
|
fullWidth: a.fullWidth,
|
|
33
35
|
maxWidth: a.maxWidth,
|
|
34
|
-
noCloseButton:
|
|
36
|
+
noCloseButton: this.state.noCloseButton,
|
|
35
37
|
noPadding: a.noPadding,
|
|
36
38
|
noTitle: a?.noTitle,
|
|
37
39
|
onClose: this.onClose,
|
|
@@ -44,6 +46,8 @@ var i = (i, a = {}) => class extends t {
|
|
|
44
46
|
dialogContentRef: this.dialogContentRef,
|
|
45
47
|
onActionsChange: this.onActionsChange,
|
|
46
48
|
onClose: this.onClose,
|
|
49
|
+
onDisableBackdropClickChange: this.onDisableBackdropClickChange,
|
|
50
|
+
onNoCloseButtonChange: this.onNoCloseButtonChange,
|
|
47
51
|
onPermalinkChange: this.onPermalinkChange,
|
|
48
52
|
onTitleChange: this.onTitleChange,
|
|
49
53
|
openProps: this.state.openProps
|
|
@@ -56,6 +60,12 @@ var i = (i, a = {}) => class extends t {
|
|
|
56
60
|
onClose() {
|
|
57
61
|
this.close(), this.props.onClose?.();
|
|
58
62
|
}
|
|
63
|
+
onDisableBackdropClickChange(e) {
|
|
64
|
+
this.setState({ disableBackdropClick: e });
|
|
65
|
+
}
|
|
66
|
+
onNoCloseButtonChange(e) {
|
|
67
|
+
this.setState({ noCloseButton: e });
|
|
68
|
+
}
|
|
59
69
|
onPermalinkChange(e) {
|
|
60
70
|
this.setState({ permalink: e });
|
|
61
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hoc/withDialog/withDialog.tsx"],"sourcesContent":["import type { DialogProps as MuiDialogProps } from '@mui/material';\nimport type {\n ComponentClass,\n ComponentType,\n RefObject,\n} from 'react';\nimport {\n Component,\n createRef,\n} from 'react';\n\nimport { Dialog } from '../../components/Dialog';\nimport type {\n DialogAction,\n DialogProps,\n} from '../../components/Dialog';\n\nexport type WithDialogOptions = {\n defaultTitle?: string;\n disableBackdropClick?: boolean;\n noCloseButton?: boolean;\n noTitle?: boolean;\n testId?: string;\n} & Pick<DialogProps, 'fullScreen' | 'fullWidth' | 'maxWidth' | 'noPadding' | 'titleVariant'>;\n\nexport interface WithDialogRefMethods<TProps extends WithDialogRenderProps<TOpenProps>, TOpenProps = never> extends Component<TProps, WithDialogState<TOpenProps>> {\n close: () => void;\n open: (props?: TOpenProps) => void;\n}\n\nexport type WithDialogRenderProps<TOpenProps = never> = {\n dialogContentRef?: RefObject<HTMLDivElement>;\n maxWidth?: MuiDialogProps['maxWidth'];\n onActionsChange?: (config: DialogAction[]) => void;\n onClose?: () => void;\n onPermalinkChange?: (permalink: string) => void;\n onTitleChange?: (title: string) => void;\n openProps?: TOpenProps;\n permalink?: string;\n title?: string;\n};\n\nexport interface WithDialogState<TOpenProps> {\n actions: DialogAction[];\n isOpen: boolean;\n openProps: TOpenProps;\n permalink: string;\n title: string;\n}\n\nexport const withDialog = <TProps extends WithDialogRenderProps<TOpenProps>, TOpenProps = never>(Content: ComponentType<TProps>, withDialogOptions: WithDialogOptions = {}): ComponentClass<TProps, WithDialogState<TOpenProps>> => {\n // eslint-disable-next-line @eslint-react/no-class-component\n return class WithDialog extends Component<TProps, WithDialogState<TOpenProps>> implements WithDialogRefMethods<TProps, TOpenProps> {\n private readonly dialogContentRef: RefObject<HTMLDivElement>;\n\n public constructor(props: TProps) {\n super(props);\n this.state = {\n actions: null,\n isOpen: false,\n openProps: undefined,\n permalink: props.permalink,\n title: props.title || withDialogOptions?.defaultTitle,\n };\n this.onClose = this.onClose.bind(this);\n this.onPermalinkChange = this.onPermalinkChange.bind(this);\n this.onTitleChange = this.onTitleChange.bind(this);\n this.onActionsChange = this.onActionsChange.bind(this);\n this.dialogContentRef = createRef<HTMLDivElement>();\n }\n\n public close(): void {\n this.setState({ isOpen: false });\n }\n\n // eslint-disable-next-line @eslint-react/no-unused-class-component-members\n public open(openProps: TOpenProps): void {\n this.setState({ isOpen: true, openProps });\n }\n\n public render() {\n const { isOpen } = this.state;\n if (!isOpen) {\n return null;\n }\n\n return (\n <Dialog\n actions={this.state.actions}\n dialogContentRef={this.dialogContentRef}\n disableBackdropClick={
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hoc/withDialog/withDialog.tsx"],"sourcesContent":["import type { DialogProps as MuiDialogProps } from '@mui/material';\nimport type {\n ComponentClass,\n ComponentType,\n RefObject,\n} from 'react';\nimport {\n Component,\n createRef,\n} from 'react';\n\nimport { Dialog } from '../../components/Dialog';\nimport type {\n DialogAction,\n DialogProps,\n} from '../../components/Dialog';\n\nexport type WithDialogOptions = {\n defaultTitle?: string;\n disableBackdropClick?: boolean;\n noCloseButton?: boolean;\n noTitle?: boolean;\n testId?: string;\n} & Pick<DialogProps, 'fullScreen' | 'fullWidth' | 'maxWidth' | 'noPadding' | 'titleVariant'>;\n\nexport interface WithDialogRefMethods<TProps extends WithDialogRenderProps<TOpenProps>, TOpenProps = never> extends Component<TProps, WithDialogState<TOpenProps>> {\n close: () => void;\n open: (props?: TOpenProps) => void;\n}\n\nexport type WithDialogRenderProps<TOpenProps = never> = {\n dialogContentRef?: RefObject<HTMLDivElement>;\n maxWidth?: MuiDialogProps['maxWidth'];\n onActionsChange?: (config: DialogAction[]) => void;\n onClose?: () => void;\n onDisableBackdropClickChange?: (disableBackdropClick: boolean) => void;\n onNoCloseButtonChange?: (noCloseButton: boolean) => void;\n onPermalinkChange?: (permalink: string) => void;\n onTitleChange?: (title: string) => void;\n openProps?: TOpenProps;\n permalink?: string;\n title?: string;\n};\n\nexport interface WithDialogState<TOpenProps> {\n actions: DialogAction[];\n disableBackdropClick: boolean;\n isOpen: boolean;\n noCloseButton: boolean;\n openProps: TOpenProps;\n permalink: string;\n title: string;\n}\n\nexport const withDialog = <TProps extends WithDialogRenderProps<TOpenProps>, TOpenProps = never>(Content: ComponentType<TProps>, withDialogOptions: WithDialogOptions = {}): ComponentClass<TProps, WithDialogState<TOpenProps>> => {\n // eslint-disable-next-line @eslint-react/no-class-component\n return class WithDialog extends Component<TProps, WithDialogState<TOpenProps>> implements WithDialogRefMethods<TProps, TOpenProps> {\n private readonly dialogContentRef: RefObject<HTMLDivElement>;\n\n public constructor(props: TProps) {\n super(props);\n this.state = {\n actions: null,\n disableBackdropClick: withDialogOptions?.disableBackdropClick,\n isOpen: false,\n noCloseButton: withDialogOptions?.noCloseButton,\n openProps: undefined,\n permalink: props.permalink,\n title: props.title || withDialogOptions?.defaultTitle,\n };\n this.onClose = this.onClose.bind(this);\n this.onPermalinkChange = this.onPermalinkChange.bind(this);\n this.onTitleChange = this.onTitleChange.bind(this);\n this.onActionsChange = this.onActionsChange.bind(this);\n this.onDisableBackdropClickChange = this.onDisableBackdropClickChange.bind(this);\n this.onNoCloseButtonChange = this.onNoCloseButtonChange.bind(this);\n this.dialogContentRef = createRef<HTMLDivElement>();\n }\n\n public close(): void {\n this.setState({ isOpen: false });\n }\n\n // eslint-disable-next-line @eslint-react/no-unused-class-component-members\n public open(openProps: TOpenProps): void {\n this.setState({ isOpen: true, openProps });\n }\n\n public render() {\n const { isOpen } = this.state;\n if (!isOpen) {\n return null;\n }\n\n return (\n <Dialog\n actions={this.state.actions}\n dialogContentRef={this.dialogContentRef}\n disableBackdropClick={this.state.disableBackdropClick}\n fullScreen={withDialogOptions.fullScreen}\n fullWidth={withDialogOptions.fullWidth}\n maxWidth={withDialogOptions.maxWidth}\n noCloseButton={this.state.noCloseButton}\n noPadding={withDialogOptions.noPadding}\n noTitle={withDialogOptions?.noTitle}\n onClose={this.onClose}\n permalink={this.state.permalink}\n testId={withDialogOptions?.testId}\n title={this.state.title}\n titleVariant={withDialogOptions?.titleVariant}\n >\n <Content\n {...this.props}\n dialogContentRef={this.dialogContentRef}\n onActionsChange={this.onActionsChange}\n onClose={this.onClose}\n onDisableBackdropClickChange={this.onDisableBackdropClickChange}\n onNoCloseButtonChange={this.onNoCloseButtonChange}\n onPermalinkChange={this.onPermalinkChange}\n onTitleChange={this.onTitleChange}\n openProps={this.state.openProps}\n />\n </Dialog>\n );\n }\n\n private onActionsChange(actions: DialogAction[]): void {\n this.setState({ actions });\n }\n\n private onClose(): void {\n this.close();\n this.props.onClose?.();\n }\n\n private onDisableBackdropClickChange(disableBackdropClick: boolean): void {\n this.setState({ disableBackdropClick });\n }\n\n private onNoCloseButtonChange(noCloseButton: boolean): void {\n this.setState({ noCloseButton });\n }\n\n private onPermalinkChange(permalink: string): void {\n this.setState({ permalink });\n }\n\n private onTitleChange(title: string): void {\n this.setState({ title });\n }\n };\n};\n"],"mappings":";;;;AAsDA,IAAa,KAAoF,GAAgC,IAAuC,CAAC,MAEhK,cAAyB,EAAmG;CACjI;CAEA,YAAmB,GAAe;EAiBhC,AAhBA,MAAM,CAAK,GACX,KAAK,QAAQ;GACX,SAAS;GACT,sBAAsB,GAAmB;GACzC,QAAQ;GACR,eAAe,GAAmB;GAClC,WAAW,KAAA;GACX,WAAW,EAAM;GACjB,OAAO,EAAM,SAAS,GAAmB;EAC3C,GACA,KAAK,UAAU,KAAK,QAAQ,KAAK,IAAI,GACrC,KAAK,oBAAoB,KAAK,kBAAkB,KAAK,IAAI,GACzD,KAAK,gBAAgB,KAAK,cAAc,KAAK,IAAI,GACjD,KAAK,kBAAkB,KAAK,gBAAgB,KAAK,IAAI,GACrD,KAAK,+BAA+B,KAAK,6BAA6B,KAAK,IAAI,GAC/E,KAAK,wBAAwB,KAAK,sBAAsB,KAAK,IAAI,GACjE,KAAK,mBAAmB,EAA0B;CACpD;CAEA,QAAqB;EACnB,KAAK,SAAS,EAAE,QAAQ,GAAM,CA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ction[]) => void;
|
|
19
19
|
onClose?: () => void;
|
|
20
|
+
onDisableBackdropClickChange?: (disableBackdropClick: boolean) => void;
|
|
21
|
+
onNoCloseButtonChange?: (noCloseButton: boolean) => void;
|
|
20
22
|
onPermalinkChange?: (permalink: string) => void;
|
|
21
23
|
onTitleChange?: (title: string) => void;
|
|
22
24
|
openProps?: TOpenProps;
|
|
@@ -25,7 +27,9 @@ export type WithDialogRenderProps<TOpenProps = never> = {
|
|
|
25
27
|
};
|
|
26
28
|
export interface WithDialogState<TOpenProps> {
|
|
27
29
|
actions: DialogAction[];
|
|
30
|
+
disableBackdropClick: boolean;
|
|
28
31
|
isOpen: boolean;
|
|
32
|
+
noCloseButton: boolean;
|
|
29
33
|
openProps: TOpenProps;
|
|
30
34
|
permalink: string;
|
|
31
35
|
title: string;
|
package/dist/locale/en.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"translation": {
|
|
3
3
|
"(last modified: {{lastModified}})": "(last modified: {{lastModified}})",
|
|
4
4
|
"(size: {{size}})": "(size: {{size}})",
|
|
5
|
+
"{{label}} ({{accept}})": "{{label}} ({{accept}})",
|
|
5
6
|
"Cancel": "Cancel",
|
|
6
7
|
"Choose File": "Choose File",
|
|
7
8
|
"Clear {{fileName}}": "Clear {{fileName}}",
|
package/dist/locale/nl.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"translation": {
|
|
3
3
|
"(last modified: {{lastModified}})": "(laatst gewijzigd: {{lastModified}})",
|
|
4
4
|
"(size: {{size}})": "(grootte: {{size}})",
|
|
5
|
+
"{{label}} ({{accept}})": "{{label}} ({{accept}})",
|
|
5
6
|
"Cancel": "Annuleren",
|
|
6
7
|
"Choose File": "Bestand kiezen",
|
|
7
8
|
"Clear {{fileName}}": "{{fileName}} wissen",
|
package/package.json
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gen-epix/ui-core-components",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"
|
|
3
|
+
"version": "4.3.0",
|
|
4
|
+
"homepage": "https://github.com/RIVM-bioinformatics/gen-epix",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/RIVM-bioinformatics/gen-epix-ui.git"
|
|
8
8
|
},
|
|
9
|
+
"license": "EUPL-1.2",
|
|
9
10
|
"author": "RIVM-bioinformatics <ids-bioinformatics@rivm.nl>",
|
|
10
|
-
"homepage": "https://github.com/RIVM-bioinformatics/gen-epix",
|
|
11
11
|
"type": "module",
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
|
-
"access": "public"
|
|
20
|
-
},
|
|
21
12
|
"exports": {
|
|
22
13
|
"./components/BackdropSpinner": {
|
|
23
14
|
"types": "./dist/components/BackdropSpinner/index.d.ts",
|
|
@@ -76,56 +67,66 @@
|
|
|
76
67
|
"import": "./dist/models/nestedMenu.js"
|
|
77
68
|
}
|
|
78
69
|
},
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
"react": "*",
|
|
86
|
-
"react-i18next": "*"
|
|
87
|
-
},
|
|
70
|
+
"files": [
|
|
71
|
+
"dist"
|
|
72
|
+
],
|
|
73
|
+
"browserslist": [
|
|
74
|
+
"last 2 Chrome versions"
|
|
75
|
+
],
|
|
88
76
|
"dependencies": {
|
|
77
|
+
"date-fns": "4.4.0",
|
|
89
78
|
"lodash": "4.18.1",
|
|
90
|
-
"react-hook-form": "7.87.0",
|
|
91
79
|
"use-cleanup-callback": "1.3.0",
|
|
92
80
|
"use-debounce": "10.1.1",
|
|
93
|
-
"date-fns": "4.4.0",
|
|
94
81
|
"uuid": "14.0.2"
|
|
95
82
|
},
|
|
96
83
|
"devDependencies": {
|
|
97
84
|
"@gen-epix/eslint-config": "0.5.0",
|
|
98
|
-
"@gen-epix/ui-core": "^3.1.0",
|
|
99
85
|
"@gen-epix/translation-util": "0.2.0",
|
|
86
|
+
"@gen-epix/ui-core": "^3.3.0",
|
|
100
87
|
"@mui/icons-material": "9.4.0",
|
|
101
88
|
"@mui/material": "9.4.0",
|
|
102
89
|
"@mui/utils": "9.4.0",
|
|
103
90
|
"@types/lodash": "4.17.25",
|
|
104
|
-
"@types/react": "19.
|
|
105
|
-
"eslint": "10.
|
|
106
|
-
"i18next": "26.4.
|
|
107
|
-
"react": "19.
|
|
108
|
-
"react-
|
|
91
|
+
"@types/react": "19.3.0",
|
|
92
|
+
"eslint": "10.10.0",
|
|
93
|
+
"i18next": "26.4.2",
|
|
94
|
+
"react": "19.3.0",
|
|
95
|
+
"react-hook-form": "7.88.0",
|
|
96
|
+
"react-i18next": "17.0.14",
|
|
109
97
|
"typescript": "6.0.3",
|
|
98
|
+
"vite": "8.3.0",
|
|
110
99
|
"vite-plugin-dts": "5.1.0",
|
|
111
100
|
"vite-plugin-static-copy": "4.1.1",
|
|
112
|
-
"
|
|
113
|
-
|
|
101
|
+
"vitest": "5.0.1"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"@gen-epix/ui-core": "^3.3.0",
|
|
105
|
+
"@mui/icons-material": "*",
|
|
106
|
+
"@mui/material": "*",
|
|
107
|
+
"@mui/utils": "*",
|
|
108
|
+
"i18next": "*",
|
|
109
|
+
"react": "*",
|
|
110
|
+
"react-hook-form": "*",
|
|
111
|
+
"react-i18next": "*"
|
|
112
|
+
},
|
|
113
|
+
"publishConfig": {
|
|
114
|
+
"access": "public",
|
|
115
|
+
"files": [
|
|
116
|
+
"dist"
|
|
117
|
+
]
|
|
114
118
|
},
|
|
115
|
-
"browserslist": [
|
|
116
|
-
"last 2 Chrome versions"
|
|
117
|
-
],
|
|
118
119
|
"scripts": {
|
|
119
|
-
"test-missing-translations": "translation-util ./ --dry-run --fail-on-missing --fail-on-stale",
|
|
120
120
|
"add-missing-translations": "translation-util ./",
|
|
121
|
-
"update-exports": "node scripts/update-exports.js",
|
|
122
121
|
"build": "vite build",
|
|
123
122
|
"build-publish": "pnpm build && pnpm publish --access=public",
|
|
124
|
-
"
|
|
125
|
-
"test": "vitest --coverage",
|
|
126
|
-
"test-run": "vitest run --passWithNoTests --coverage",
|
|
123
|
+
"check-types": "tsc --noemit",
|
|
127
124
|
"lint": "eslint ./src --report-unused-disable-directives --max-warnings 0",
|
|
128
125
|
"lint-fix": "eslint ./src --report-unused-disable-directives --max-warnings 0 --fix",
|
|
129
|
-
"
|
|
126
|
+
"test": "vitest --coverage",
|
|
127
|
+
"test-missing-translations": "translation-util ./ --dry-run --fail-on-missing --fail-on-stale",
|
|
128
|
+
"test-run": "vitest run --passWithNoTests --coverage",
|
|
129
|
+
"update-exports": "node scripts/update-exports.js",
|
|
130
|
+
"validate": "pnpm run lint && pnpm run check-types && pnpm run test-run"
|
|
130
131
|
}
|
|
131
132
|
}
|