@flipdish/portal-library 1.0.26 → 1.0.27
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/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/ui/Form/FormItemLayout.cjs.js +2 -0
- package/dist/components/ui/Form/FormItemLayout.cjs.js.map +1 -0
- package/dist/components/ui/Form/FormItemLayout.js +2 -0
- package/dist/components/ui/Form/FormItemLayout.js.map +1 -0
- package/dist/components/ui/Form/utilities/formValidation.cjs.js +2 -0
- package/dist/components/ui/Form/utilities/formValidation.cjs.js.map +1 -0
- package/dist/components/ui/Form/utilities/formValidation.d.ts +6 -0
- package/dist/components/ui/Form/utilities/formValidation.js +2 -0
- package/dist/components/ui/Form/utilities/formValidation.js.map +1 -0
- package/dist/localization/en.json.cjs.js +1 -1
- package/dist/localization/en.json.js +1 -1
- package/package.json +2 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./themes/flipdishPublicTheme.cjs.js"),r=require("./ui/NotFoundPage/NotFoundPage.cjs.js"),
|
|
1
|
+
"use strict";var e=require("./themes/flipdishPublicTheme.cjs.js"),r=require("./ui/NotFoundPage/NotFoundPage.cjs.js"),i=require("./ui/PageLayout/PageLayout.cjs.js"),o=require("./ui/PortalMock/PortalMock.cjs.js"),t=require("./ui/LazyComponent/LazyComponent.cjs.js"),u=require("./ui/Spacer/Spacer.cjs.js"),a=require("./ui/Chip/Chip.cjs.js"),s=require("./ui/Form/utilities/formValidation.cjs.js");require("react/jsx-runtime"),require("@mui/material/Button"),require("formik"),require("@mui/material/TextField"),require("react"),require("../providers/TranslationProvider.cjs.js"),require("./ui/Form/FormItemLayout.cjs.js"),require("@mui/material/Typography"),exports.flipdishPublicTheme=e,exports.NotFoundPage=r,exports.PageLayout=i.default,exports.PortalMock=o,exports.LazyComponent=t,exports.Spacer=u,exports.Chip=a,exports.formikValidate=s.formikValidate;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -5,3 +5,4 @@ export { default as PortalMock } from './ui/PortalMock/PortalMock.js';
|
|
|
5
5
|
export { default as LazyComponent } from './ui/LazyComponent/LazyComponent.js';
|
|
6
6
|
export { default as Spacer } from './ui/Spacer/Spacer.js';
|
|
7
7
|
export { default as Chip } from './ui/Chip/Chip.js';
|
|
8
|
+
export { formikValidate } from './ui/Form/utilities/formValidation.js';
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as PageLayout}from"./ui/PageLayout/PageLayout.js";export{default as PortalMock}from"./ui/PortalMock/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";export{default as Chip}from"./ui/Chip/Chip.js";
|
|
1
|
+
export{default as flipdishPublicTheme}from"./themes/flipdishPublicTheme.js";export{default as NotFoundPage}from"./ui/NotFoundPage/NotFoundPage.js";export{default as PageLayout}from"./ui/PageLayout/PageLayout.js";export{default as PortalMock}from"./ui/PortalMock/PortalMock.js";export{default as LazyComponent}from"./ui/LazyComponent/LazyComponent.js";export{default as Spacer}from"./ui/Spacer/Spacer.js";export{default as Chip}from"./ui/Chip/Chip.js";export{formikValidate}from"./ui/Form/utilities/formValidation.js";import"react/jsx-runtime";import"@mui/material/Button";import"formik";import"@mui/material/TextField";import"react";import"../providers/TranslationProvider.js";import"./ui/Form/FormItemLayout.js";import"@mui/material/Typography";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";require("react/jsx-runtime");var e=require("@mui/material/Grid"),i=require("@mui/material/styles");require("@mui/material/Typography"),i.styled(e)((({theme:e})=>({padding:e.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),i.styled("div")((({theme:e})=>({paddingBottom:e.spacing(2),paddingRight:e.spacing(1.75)})));
|
|
2
|
+
//# sourceMappingURL=FormItemLayout.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItemLayout.cjs.js","sources":["../../../../src/components/ui/Form/FormItemLayout.tsx"],"sourcesContent":["import React from 'react';\n\nimport Grid, { GridSize } from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledGrid = styled(Grid)(({ theme }) => ({\n padding: theme.spacing(4.75, 0, 2.5, 0),\n alignItems: 'flex-start',\n flexWrap: 'wrap',\n borderBottom: '1px solid rgba(0,0,0,0.2)',\n}));\n\nconst StyledDescription = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1.75),\n}));\n\nexport interface FormItemLayoutProps {\n alignItems?: 'stretch' | 'center' | 'flex-end' | 'flex-start' | 'baseline';\n children: React.ReactNode;\n description?: React.ReactNode;\n descriptionTranslated?: string;\n label?: React.ReactNode;\n labelTranslated?: string;\n mdProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n noWrap?: boolean;\n removeRootPaddings?: boolean;\n smProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n}\n\ntype Props = FormItemLayoutProps;\nconst FormItemLayout = (props: Props) => {\n const { children, description, descriptionTranslated, label, labelTranslated, mdProportion, smProportion } = props;\n\n const [titleProportion, dataProportion] = mdProportion ? mdProportion.split('x').map((m) => parseInt(m, 10)) : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion ? smProportion.split('x').map((m) => parseInt(m, 10)) : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid item xs={12} sm={castToGridSize(titleProportionSm)} md={castToGridSize(titleProportion)}>\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid item xs={12} sm={castToGridSize(dataProportionSm)} md={castToGridSize(dataProportion)}>\n {children}\n </Grid>\n </StyledGrid>\n );\n};\n\nexport default FormItemLayout;\n"],"names":["styled","Grid","theme","padding","spacing","alignItems","flexWrap","borderBottom","paddingBottom","paddingRight"],"mappings":"oJAMmBA,EAAMA,OAACC,EAAPD,EAAa,EAAGE,YAAa,CAC5CC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGQP,EAAMA,OAAC,MAAPA,EAAc,EAAGE,YAAa,CACpDM,cAAeN,EAAME,QAAQ,GAC7BK,aAAcP,EAAME,QAAQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"react/jsx-runtime";import i from"@mui/material/Grid";import{styled as t}from"@mui/material/styles";import"@mui/material/Typography";t(i)((({theme:i})=>({padding:i.spacing(4.75,0,2.5,0),alignItems:"flex-start",flexWrap:"wrap",borderBottom:"1px solid rgba(0,0,0,0.2)"}))),t("div")((({theme:i})=>({paddingBottom:i.spacing(2),paddingRight:i.spacing(1.75)})));
|
|
2
|
+
//# sourceMappingURL=FormItemLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItemLayout.js","sources":["../../../../src/components/ui/Form/FormItemLayout.tsx"],"sourcesContent":["import React from 'react';\n\nimport Grid, { GridSize } from '@mui/material/Grid';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nconst StyledGrid = styled(Grid)(({ theme }) => ({\n padding: theme.spacing(4.75, 0, 2.5, 0),\n alignItems: 'flex-start',\n flexWrap: 'wrap',\n borderBottom: '1px solid rgba(0,0,0,0.2)',\n}));\n\nconst StyledDescription = styled('div')(({ theme }) => ({\n paddingBottom: theme.spacing(2),\n paddingRight: theme.spacing(1.75),\n}));\n\nexport interface FormItemLayoutProps {\n alignItems?: 'stretch' | 'center' | 'flex-end' | 'flex-start' | 'baseline';\n children: React.ReactNode;\n description?: React.ReactNode;\n descriptionTranslated?: string;\n label?: React.ReactNode;\n labelTranslated?: string;\n mdProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n noWrap?: boolean;\n removeRootPaddings?: boolean;\n smProportion?: '4x8' | '8x4' | '10x2' | '12x12';\n}\n\ntype Props = FormItemLayoutProps;\nconst FormItemLayout = (props: Props) => {\n const { children, description, descriptionTranslated, label, labelTranslated, mdProportion, smProportion } = props;\n\n const [titleProportion, dataProportion] = mdProportion ? mdProportion.split('x').map((m) => parseInt(m, 10)) : [4, 8];\n const [titleProportionSm, dataProportionSm] = smProportion ? smProportion.split('x').map((m) => parseInt(m, 10)) : [];\n const castToGridSize = (data: unknown) => data as GridSize;\n\n return (\n <StyledGrid container>\n <Grid item xs={12} sm={castToGridSize(titleProportionSm)} md={castToGridSize(titleProportion)}>\n <Typography variant=\"subtitle1\" component=\"h3\" color=\"textPrimary\">\n {labelTranslated || label || null}\n </Typography>\n\n {descriptionTranslated || description ? (\n <StyledDescription>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {descriptionTranslated || description || null}\n </Typography>\n </StyledDescription>\n ) : null}\n </Grid>\n <Grid item xs={12} sm={castToGridSize(dataProportionSm)} md={castToGridSize(dataProportion)}>\n {children}\n </Grid>\n </StyledGrid>\n );\n};\n\nexport default FormItemLayout;\n"],"names":["styled","Grid","theme","padding","spacing","alignItems","flexWrap","borderBottom","paddingBottom","paddingRight"],"mappings":"2IAMmBA,EAAOC,EAAPD,EAAa,EAAGE,YAAa,CAC5CC,QAASD,EAAME,QAAQ,KAAM,EAAG,IAAK,GACrCC,WAAY,aACZC,SAAU,OACVC,aAAc,gCAGQP,EAAO,MAAPA,EAAc,EAAGE,YAAa,CACpDM,cAAeN,EAAME,QAAQ,GAC7BK,aAAcP,EAAME,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formValidation.cjs.js","sources":["../../../../../src/components/ui/Form/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n Required: (value: string): TranslationId | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n\n return;\n },\n AtLeastOneSelected: (value: Array<string | number>): TranslationId | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n\n return;\n },\n};\n"],"names":["Required","value","length","AtLeastOneSelected"],"mappings":"oCAA8B,CAC1BA,SAAWC,IACP,GAAqB,IAAjBA,EAAMC,OACN,MAAO,UAGJ,EAEXC,mBAAqBF,IACjB,GAAqB,IAAjBA,EAAMC,OACN,MAAO,UAGJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formValidation.js","sources":["../../../../../src/components/ui/Form/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n Required: (value: string): TranslationId | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n\n return;\n },\n AtLeastOneSelected: (value: Array<string | number>): TranslationId | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n\n return;\n },\n};\n"],"names":["formikValidate","Required","value","length","AtLeastOneSelected"],"mappings":"AAAa,MAAAA,EAAiB,CAC1BC,SAAWC,IACP,GAAqB,IAAjBA,EAAMC,OACN,MAAO,UAGJ,EAEXC,mBAAqBF,IACjB,GAAqB,IAAjBA,EAAMC,OACN,MAAO,UAGJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={value:"About"},o={value:"About Page"},t={value:"Click on the Vite and React logos to learn more"},a={value:"Count is {count}"},_={value:"Go to About Page"},r={value:"Go to home Page"},l={value:"Home"},u={value:"Page Not Found"},p={value:"Required"},s={value:"Something went wrong, please refresh the page"},n={value:"Valid"},g={value:"Welcome to the About Page"},i={value:"Welcome to the new Flipdish Portal"},m={About:e,About_Page:o,Click_vite_react:t,Count_is:a,Go_to_about_page:_,Go_to_home_page:r,Home:l,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:u,Required:p,Something_went_wrong_please_refresh_the_page:s,Valid:n,Welcome_about_page:g,Welcome_to_new_portal:i};exports.About=e,exports.About_Page=o,exports.Click_vite_react=t,exports.Count_is=a,exports.Go_to_about_page=_,exports.Go_to_home_page=r,exports.Home=l,exports.Page_Not_Found=u,exports.Required=p,exports.Something_went_wrong_please_refresh_the_page=s,exports.Valid=n,exports.Welcome_about_page=g,exports.Welcome_to_new_portal=i,exports.default=m;
|
|
2
2
|
//# sourceMappingURL=en.json.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={value:"
|
|
1
|
+
var e={value:"About"},o={value:"About Page"},a={value:"Click on the Vite and React logos to learn more"},t={value:"Count is {count}"},l={value:"Go to About Page"},u={value:"Go to home Page"},_={value:"Home"},n={value:"Page Not Found"},r={value:"Required"},g={value:"Something went wrong, please refresh the page"},i={value:"Valid"},v={value:"Welcome to the About Page"},m={value:"Welcome to the new Flipdish Portal"},h={About:e,About_Page:o,Click_vite_react:a,Count_is:t,Go_to_about_page:l,Go_to_home_page:u,Home:_,"Micro-Frontend_Example":{value:"Micro-Frontend Example"},Page_Not_Found:n,Required:r,Something_went_wrong_please_refresh_the_page:g,Valid:i,Welcome_about_page:v,Welcome_to_new_portal:m};export{e as About,o as About_Page,a as Click_vite_react,t as Count_is,l as Go_to_about_page,u as Go_to_home_page,_ as Home,n as Page_Not_Found,r as Required,g as Something_went_wrong_please_refresh_the_page,i as Valid,v as Welcome_about_page,m as Welcome_to_new_portal,h as default};
|
|
2
2
|
//# sourceMappingURL=en.json.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipdish/portal-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"@emotion/styled": "11.13.0",
|
|
11
11
|
"@mui/icons-material": "5.16.7",
|
|
12
12
|
"@mui/material": "5.16.7",
|
|
13
|
+
"formik": "^2.4.6",
|
|
13
14
|
"react": "18.3.1",
|
|
14
15
|
"react-dom": "18.3.1",
|
|
15
16
|
"react-error-boundary": "^4.0.13"
|