@flipdish/portal-library 3.7.1 → 4.0.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/FDErrorBoundary/index.cjs.js.map +1 -1
- package/dist/components/FDErrorBoundary/index.js.map +1 -1
- package/dist/components/Form/FormItemLayout/index.cjs.js.map +1 -1
- package/dist/components/Form/FormItemLayout/index.js.map +1 -1
- package/dist/components/Form/GenericAutocompleteField/index.cjs.js +1 -1
- package/dist/components/Form/GenericAutocompleteField/index.cjs.js.map +1 -1
- package/dist/components/Form/GenericAutocompleteField/index.d.ts +4 -4
- package/dist/components/Form/GenericAutocompleteField/index.js +1 -1
- package/dist/components/Form/GenericAutocompleteField/index.js.map +1 -1
- package/dist/components/Form/GenericFormContainer/index.cjs.js +1 -1
- package/dist/components/Form/GenericFormContainer/index.cjs.js.map +1 -1
- package/dist/components/Form/GenericFormContainer/index.d.ts +3 -3
- package/dist/components/Form/GenericFormContainer/index.js +1 -1
- package/dist/components/Form/GenericFormContainer/index.js.map +1 -1
- package/dist/components/Form/GenericTextField/index.cjs.js.map +1 -1
- package/dist/components/Form/GenericTextField/index.js.map +1 -1
- package/dist/components/Form/PaginatedAutocompleteField/index.cjs.js +1 -1
- package/dist/components/Form/PaginatedAutocompleteField/index.cjs.js.map +1 -1
- package/dist/components/Form/PaginatedAutocompleteField/index.js +1 -1
- package/dist/components/Form/PaginatedAutocompleteField/index.js.map +1 -1
- package/dist/components/GenericDatePickerField/GenericDateFieldBase.cjs.js.map +1 -1
- package/dist/components/GenericDatePickerField/GenericDateFieldBase.js.map +1 -1
- package/dist/components/GenericRadioButtons/index.cjs.js +1 -1
- package/dist/components/GenericRadioButtons/index.cjs.js.map +1 -1
- package/dist/components/GenericRadioButtons/index.d.ts +3 -3
- package/dist/components/GenericRadioButtons/index.js +1 -1
- package/dist/components/GenericRadioButtons/index.js.map +1 -1
- package/dist/components/GenericTable/HighlightScrollbar.cjs.js.map +1 -1
- package/dist/components/GenericTable/HighlightScrollbar.js.map +1 -1
- package/dist/components/GenericTable/index.cjs.js +1 -1
- package/dist/components/GenericTable/index.cjs.js.map +1 -1
- package/dist/components/GenericTable/index.js +1 -1
- package/dist/components/GenericTable/index.js.map +1 -1
- package/dist/components/GenericTableBody/index.cjs.js +1 -1
- package/dist/components/GenericTableBody/index.cjs.js.map +1 -1
- package/dist/components/GenericTableBody/index.d.ts +9 -9
- package/dist/components/GenericTableBody/index.js +1 -1
- package/dist/components/GenericTableBody/index.js.map +1 -1
- package/dist/components/GenericTableBodyRow/index.cjs.js +1 -1
- package/dist/components/GenericTableBodyRow/index.cjs.js.map +1 -1
- package/dist/components/GenericTableBodyRow/index.d.ts +2 -2
- package/dist/components/GenericTableBodyRow/index.js +1 -1
- package/dist/components/GenericTableBodyRow/index.js.map +1 -1
- package/dist/components/ListItemLinkButton/index.cjs.js +1 -1
- package/dist/components/ListItemLinkButton/index.cjs.js.map +1 -1
- package/dist/components/ListItemLinkButton/index.js +1 -1
- package/dist/components/ListItemLinkButton/index.js.map +1 -1
- package/dist/components/NoResults/index.cjs.js.map +1 -1
- package/dist/components/NoResults/index.js.map +1 -1
- package/dist/components/PageLayout/DocumentTitle.cjs.js.map +1 -1
- package/dist/components/PageLayout/DocumentTitle.d.ts +1 -1
- package/dist/components/PageLayout/DocumentTitle.js.map +1 -1
- package/dist/components/PageLayout/FullWidthContainer.cjs.js.map +1 -1
- package/dist/components/PageLayout/FullWidthContainer.js.map +1 -1
- package/dist/components/PageLayout/GlobalSpacingStyles.cjs.js.map +1 -1
- package/dist/components/PageLayout/GlobalSpacingStyles.js.map +1 -1
- package/dist/components/PageLayout/index.cjs.js.map +1 -1
- package/dist/components/PageLayout/index.js.map +1 -1
- package/dist/components/PortalMock/index.cjs.js.map +1 -1
- package/dist/components/PortalMock/index.js.map +1 -1
- package/dist/components/Spacer/index.cjs.js.map +1 -1
- package/dist/components/Spacer/index.js.map +1 -1
- package/dist/components/atoms/Badge/index.cjs.js +1 -1
- package/dist/components/atoms/Badge/index.cjs.js.map +1 -1
- package/dist/components/atoms/Badge/index.js +1 -1
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Button/buttonThemeOverrides.cjs.js +2 -0
- package/dist/components/atoms/Button/buttonThemeOverrides.cjs.js.map +1 -0
- package/dist/components/atoms/Button/buttonThemeOverrides.d.ts +21 -0
- package/dist/components/atoms/Button/buttonThemeOverrides.js +2 -0
- package/dist/components/atoms/Button/buttonThemeOverrides.js.map +1 -0
- package/dist/components/atoms/Button/getButtonStyles.cjs.js +2 -0
- package/dist/components/atoms/Button/getButtonStyles.cjs.js.map +1 -0
- package/dist/components/atoms/Button/getButtonStyles.d.ts +15 -0
- package/dist/components/atoms/Button/getButtonStyles.js +2 -0
- package/dist/components/atoms/Button/getButtonStyles.js.map +1 -0
- package/dist/components/atoms/Button/index.cjs.js +2 -0
- package/dist/components/atoms/Button/index.cjs.js.map +1 -0
- package/dist/components/atoms/Button/index.d.ts +26 -0
- package/dist/components/atoms/Button/index.js +2 -0
- package/dist/components/atoms/Button/index.js.map +1 -0
- package/dist/components/atoms/IconContainer/index.cjs.js.map +1 -1
- package/dist/components/molecules/Alert/index.cjs.js +1 -1
- package/dist/components/molecules/Alert/index.cjs.js.map +1 -1
- package/dist/components/molecules/Alert/index.d.ts +1 -1
- package/dist/components/molecules/Alert/index.js +1 -1
- package/dist/components/molecules/Alert/index.js.map +1 -1
- package/dist/components/molecules/Modal/index.cjs.js.map +1 -1
- package/dist/components/molecules/Modal/index.js.map +1 -1
- package/dist/custom-hooks/useMicroFrontendAttributes.cjs.js +1 -1
- package/dist/custom-hooks/useMicroFrontendAttributes.cjs.js.map +1 -1
- package/dist/custom-hooks/useMicroFrontendAttributes.d.ts +4 -4
- package/dist/custom-hooks/useMicroFrontendAttributes.js +1 -1
- package/dist/custom-hooks/useMicroFrontendAttributes.js.map +1 -1
- package/dist/custom-hooks/useRenderValidText.cjs.js.map +1 -1
- package/dist/custom-hooks/useRenderValidText.d.ts +3 -3
- package/dist/custom-hooks/useRenderValidText.js.map +1 -1
- package/dist/custom-hooks/useToasts.cjs.js.map +1 -1
- package/dist/custom-hooks/useToasts.js.map +1 -1
- package/dist/icons/helpers/withSvgIcon.cjs.js.map +1 -1
- package/dist/icons/helpers/withSvgIcon.js.map +1 -1
- package/dist/themes/ThemeProvider.cjs.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js +1 -1
- package/dist/themes/flipdishPublicTheme.cjs.js.map +1 -1
- package/dist/themes/flipdishPublicTheme.js +1 -1
- package/dist/themes/flipdishPublicTheme.js.map +1 -1
- package/dist/themes/theme.d.ts +14 -2
- package/dist/themes/tokens/colours/colours-stories-utils.cjs.js +1 -1
- package/dist/themes/tokens/colours/colours-stories-utils.cjs.js.map +1 -1
- package/dist/themes/tokens/colours/colours-stories-utils.js +1 -1
- package/dist/themes/tokens/colours/colours-stories-utils.js.map +1 -1
- package/dist/themes/tokens/colours/primitives.cjs.js +1 -1
- package/dist/themes/tokens/colours/primitives.cjs.js.map +1 -1
- package/dist/themes/tokens/colours/primitives.js +1 -1
- package/dist/themes/tokens/colours/primitives.js.map +1 -1
- package/dist/themes/tokens/colours/semantic.cjs.js +1 -1
- package/dist/themes/tokens/colours/semantic.cjs.js.map +1 -1
- package/dist/themes/tokens/colours/semantic.d.ts +223 -4
- package/dist/themes/tokens/colours/semantic.js +1 -1
- package/dist/themes/tokens/colours/semantic.js.map +1 -1
- package/dist/themes/tokens/colours/types.d.ts +14 -14
- package/dist/themes/tokens/shadows/shadows.cjs.js +2 -0
- package/dist/themes/tokens/shadows/shadows.cjs.js.map +1 -0
- package/dist/themes/tokens/shadows/shadows.d.ts +8 -0
- package/dist/themes/tokens/shadows/shadows.js +2 -0
- package/dist/themes/tokens/shadows/shadows.js.map +1 -0
- package/dist/themes/typography.cjs.js.map +1 -1
- package/dist/themes/typography.d.ts +31 -2
- package/dist/themes/typography.js.map +1 -1
- package/dist/utilities/formValidation.cjs.js +1 -1
- package/dist/utilities/formValidation.cjs.js.map +1 -1
- package/dist/utilities/formValidation.d.ts +1 -1
- package/dist/utilities/formValidation.js.map +1 -1
- package/dist/utilities/genericUtilities.cjs.js.map +1 -1
- package/dist/utilities/genericUtilities.js.map +1 -1
- package/dist/utilities/renderUtilities.cjs.js.map +1 -1
- package/dist/utilities/renderUtilities.js.map +1 -1
- package/package.json +5 -4
- package/dist/components/Button/index.cjs.js +0 -2
- package/dist/components/Button/index.cjs.js.map +0 -1
- package/dist/components/Button/index.d.ts +0 -6
- package/dist/components/Button/index.js +0 -2
- package/dist/components/Button/index.js.map +0 -1
- package/dist/themes/tokens/colours/index.cjs.js +0 -2
- package/dist/themes/tokens/colours/index.cjs.js.map +0 -1
- package/dist/themes/tokens/colours/index.d.ts +0 -3
- package/dist/themes/tokens/colours/index.js +0 -2
- package/dist/themes/tokens/colours/index.js.map +0 -1
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { fontSize } from './tokens/typography/font-size.js';
|
|
3
3
|
|
|
4
4
|
declare const getMobileTextStyle: (sizeKey: keyof (typeof fontSize)['mobile']) => React.CSSProperties;
|
|
5
|
-
declare const typography:
|
|
5
|
+
declare const typography: {
|
|
6
|
+
readonly d1Strong: react.CSSProperties;
|
|
7
|
+
readonly d1Weak: react.CSSProperties;
|
|
8
|
+
readonly d2Strong: react.CSSProperties;
|
|
9
|
+
readonly d2Weak: react.CSSProperties;
|
|
10
|
+
readonly d3Strong: react.CSSProperties;
|
|
11
|
+
readonly d3Weak: react.CSSProperties;
|
|
12
|
+
readonly d3WeakAlternate: react.CSSProperties;
|
|
13
|
+
readonly d4Strong: react.CSSProperties;
|
|
14
|
+
readonly d4Weak: react.CSSProperties;
|
|
15
|
+
readonly d4WeakAlternate: react.CSSProperties;
|
|
16
|
+
readonly h1Strong: react.CSSProperties;
|
|
17
|
+
readonly h1Weak: react.CSSProperties;
|
|
18
|
+
readonly h1WeakAlternate: react.CSSProperties;
|
|
19
|
+
readonly h2Strong: react.CSSProperties;
|
|
20
|
+
readonly h2Weak: react.CSSProperties;
|
|
21
|
+
readonly h3Strong: react.CSSProperties;
|
|
22
|
+
readonly h3Weak: react.CSSProperties;
|
|
23
|
+
readonly h4Strong: react.CSSProperties;
|
|
24
|
+
readonly h4Weak: react.CSSProperties;
|
|
25
|
+
readonly h4StrongUnderlined: react.CSSProperties;
|
|
26
|
+
readonly b1Strong: react.CSSProperties;
|
|
27
|
+
readonly b1Weak: react.CSSProperties;
|
|
28
|
+
readonly b1StrongUnderlined: react.CSSProperties;
|
|
29
|
+
readonly b1WeakUnderlined: react.CSSProperties;
|
|
30
|
+
readonly captionStrong: react.CSSProperties;
|
|
31
|
+
readonly captionWeak: react.CSSProperties;
|
|
32
|
+
readonly captionStrongUnderlined: react.CSSProperties;
|
|
33
|
+
readonly captionWeakUnderlined: react.CSSProperties;
|
|
34
|
+
};
|
|
6
35
|
|
|
7
36
|
export { getMobileTextStyle, typography };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","sources":["../../src/themes/typography.ts"],"sourcesContent":["import type { ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { fontFamily } from './tokens/typography/font-family';\nimport { fontSize } from './tokens/typography/font-size';\nimport { letterSpacing } from './tokens/typography/letter-spacing';\nimport { lineHeight } from './tokens/typography/line-height';\n\nconst underlineStyles: React.CSSProperties = {\n textDecorationLine: 'underline',\n textDecorationStyle: 'solid',\n textDecorationSkipInk: 'auto',\n textDecorationThickness: '2px', // Ensure a valid value\n textUnderlineOffset: '25%',\n textUnderlinePosition: 'from-font',\n};\n\nconst createTextStyle = (\n weight: number,\n type: 'alternate' | 'body' | 'heading',\n sizeKey: keyof (typeof fontSize)['desktop'],\n underline = false,\n): React.CSSProperties => ({\n fontFamily: fontFamily['desktop'][type],\n fontSize: fontSize['desktop'][sizeKey],\n fontStyle: 'normal',\n fontWeight: weight,\n lineHeight: lineHeight['desktop'][sizeKey],\n letterSpacing: letterSpacing['desktop'][sizeKey],\n ...(underline ? underlineStyles : {}),\n});\n\n// has to be done using media queries, otherwise it isn't responsive\nexport const getMobileTextStyle = (sizeKey: keyof (typeof fontSize)['mobile']): React.CSSProperties => ({\n fontSize: fontSize['mobile'][sizeKey],\n lineHeight: lineHeight['mobile'][sizeKey],\n letterSpacing: letterSpacing['mobile'][sizeKey],\n});\n\nexport const typography
|
|
1
|
+
{"version":3,"file":"typography.js","sources":["../../src/themes/typography.ts"],"sourcesContent":["import type { ThemeOptions } from '@mui/material/styles/createTheme';\n\nimport { fontFamily } from './tokens/typography/font-family';\nimport { fontSize } from './tokens/typography/font-size';\nimport { letterSpacing } from './tokens/typography/letter-spacing';\nimport { lineHeight } from './tokens/typography/line-height';\n\nconst underlineStyles: React.CSSProperties = {\n textDecorationLine: 'underline',\n textDecorationStyle: 'solid',\n textDecorationSkipInk: 'auto',\n textDecorationThickness: '2px', // Ensure a valid value\n textUnderlineOffset: '25%',\n textUnderlinePosition: 'from-font',\n};\n\nconst createTextStyle = (\n weight: number,\n type: 'alternate' | 'body' | 'heading',\n sizeKey: keyof (typeof fontSize)['desktop'],\n underline = false,\n): React.CSSProperties => ({\n fontFamily: fontFamily['desktop'][type],\n fontSize: fontSize['desktop'][sizeKey],\n fontStyle: 'normal',\n fontWeight: weight,\n lineHeight: lineHeight['desktop'][sizeKey],\n letterSpacing: letterSpacing['desktop'][sizeKey],\n ...(underline ? underlineStyles : {}),\n});\n\n// has to be done using media queries, otherwise it isn't responsive\nexport const getMobileTextStyle = (sizeKey: keyof (typeof fontSize)['mobile']): React.CSSProperties => ({\n fontSize: fontSize['mobile'][sizeKey],\n lineHeight: lineHeight['mobile'][sizeKey],\n letterSpacing: letterSpacing['mobile'][sizeKey],\n});\n\nexport const typography = {\n d1Strong: createTextStyle(600, 'heading', 'd1'),\n d1Weak: createTextStyle(400, 'body', 'd1'),\n d2Strong: createTextStyle(600, 'heading', 'd2'),\n d2Weak: createTextStyle(400, 'body', 'd2'),\n d3Strong: createTextStyle(600, 'heading', 'd3'),\n d3Weak: createTextStyle(400, 'body', 'd3'),\n d3WeakAlternate: createTextStyle(400, 'alternate', 'd3'),\n d4Strong: createTextStyle(600, 'heading', 'd4'),\n d4Weak: createTextStyle(400, 'body', 'd4'),\n d4WeakAlternate: createTextStyle(400, 'alternate', 'd4'),\n h1Strong: createTextStyle(600, 'heading', 'h1'),\n h1Weak: createTextStyle(400, 'body', 'h1'),\n h1WeakAlternate: createTextStyle(400, 'alternate', 'h1'),\n h2Strong: createTextStyle(600, 'heading', 'h2'),\n h2Weak: createTextStyle(400, 'body', 'h2'),\n h3Strong: createTextStyle(600, 'heading', 'h3'),\n h3Weak: createTextStyle(400, 'body', 'h3'),\n h4Strong: createTextStyle(600, 'heading', 'h4'),\n h4Weak: createTextStyle(400, 'body', 'h4'),\n h4StrongUnderlined: createTextStyle(600, 'heading', 'h4', true),\n b1Strong: createTextStyle(600, 'body', 'b1'),\n b1Weak: createTextStyle(400, 'body', 'b1'),\n b1StrongUnderlined: createTextStyle(600, 'body', 'b1', true),\n b1WeakUnderlined: createTextStyle(400, 'body', 'b1', true),\n captionStrong: createTextStyle(600, 'body', 'caption'),\n captionWeak: createTextStyle(400, 'body', 'caption'),\n captionStrongUnderlined: createTextStyle(600, 'body', 'caption', true),\n captionWeakUnderlined: createTextStyle(400, 'body', 'caption', true),\n} as const satisfies NonNullable<ThemeOptions['typography']>;\n"],"names":["underlineStyles","textDecorationLine","textDecorationStyle","textDecorationSkipInk","textDecorationThickness","textUnderlineOffset","textUnderlinePosition","createTextStyle","weight","type","sizeKey","underline","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","letterSpacing","getMobileTextStyle","typography","d1Strong","d1Weak","d2Strong","d2Weak","d3Strong","d3Weak","d3WeakAlternate","d4Strong","d4Weak","d4WeakAlternate","h1Strong","h1Weak","h1WeakAlternate","h2Strong","h2Weak","h3Strong","h3Weak","h4Strong","h4Weak","h4StrongUnderlined","b1Strong","b1Weak","b1StrongUnderlined","b1WeakUnderlined","captionStrong","captionWeak","captionStrongUnderlined","captionWeakUnderlined"],"mappings":"kQAOA,MAAMA,EAAuC,CAC3CC,mBAAoB,YACpBC,oBAAqB,QACrBC,sBAAuB,OACvBC,wBAAyB,MACzBC,oBAAqB,MACrBC,sBAAuB,aAGnBC,EAAkB,CACtBC,EACAC,EACAC,EACAC,GAAY,KACa,CACzBC,WAAYA,EAAoB,QAAEH,GAClCI,SAAUA,EAAkB,QAAEH,GAC9BI,UAAW,SACXC,WAAYP,EACZQ,WAAYA,EAAoB,QAAEN,GAClCO,cAAeA,EAAuB,QAAEP,MACpCC,EAAYX,EAAkB,KAIvBkB,EAAsBR,IAAqE,CACtGG,SAAUA,EAAiB,OAAEH,GAC7BM,WAAYA,EAAmB,OAAEN,GACjCO,cAAeA,EAAsB,OAAEP,KAG5BS,EAAa,CACxBC,SAAUb,EAAgB,IAAK,UAAW,MAC1Cc,OAAQd,EAAgB,IAAK,OAAQ,MACrCe,SAAUf,EAAgB,IAAK,UAAW,MAC1CgB,OAAQhB,EAAgB,IAAK,OAAQ,MACrCiB,SAAUjB,EAAgB,IAAK,UAAW,MAC1CkB,OAAQlB,EAAgB,IAAK,OAAQ,MACrCmB,gBAAiBnB,EAAgB,IAAK,YAAa,MACnDoB,SAAUpB,EAAgB,IAAK,UAAW,MAC1CqB,OAAQrB,EAAgB,IAAK,OAAQ,MACrCsB,gBAAiBtB,EAAgB,IAAK,YAAa,MACnDuB,SAAUvB,EAAgB,IAAK,UAAW,MAC1CwB,OAAQxB,EAAgB,IAAK,OAAQ,MACrCyB,gBAAiBzB,EAAgB,IAAK,YAAa,MACnD0B,SAAU1B,EAAgB,IAAK,UAAW,MAC1C2B,OAAQ3B,EAAgB,IAAK,OAAQ,MACrC4B,SAAU5B,EAAgB,IAAK,UAAW,MAC1C6B,OAAQ7B,EAAgB,IAAK,OAAQ,MACrC8B,SAAU9B,EAAgB,IAAK,UAAW,MAC1C+B,OAAQ/B,EAAgB,IAAK,OAAQ,MACrCgC,mBAAoBhC,EAAgB,IAAK,UAAW,MAAM,GAC1DiC,SAAUjC,EAAgB,IAAK,OAAQ,MACvCkC,OAAQlC,EAAgB,IAAK,OAAQ,MACrCmC,mBAAoBnC,EAAgB,IAAK,OAAQ,MAAM,GACvDoC,iBAAkBpC,EAAgB,IAAK,OAAQ,MAAM,GACrDqC,cAAerC,EAAgB,IAAK,OAAQ,WAC5CsC,YAAatC,EAAgB,IAAK,OAAQ,WAC1CuC,wBAAyBvC,EAAgB,IAAK,OAAQ,WAAW,GACjEwC,sBAAuBxC,EAAgB,IAAK,OAAQ,WAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const e={Required:e=>{if(0===e.length)return"Required"},AtLeastOneSelected:e=>{if(0===e.length)return"Required"}};exports.formikValidate=e;
|
|
2
2
|
//# sourceMappingURL=formValidation.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formValidation.cjs.js","sources":["../../src/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n
|
|
1
|
+
{"version":3,"file":"formValidation.cjs.js","sources":["../../src/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n Required: (value: string): string | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n return undefined;\n },\n AtLeastOneSelected: (value: Array<number | string>): string | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n return undefined;\n },\n};\n"],"names":["formikValidate","Required","value","length","AtLeastOneSelected"],"mappings":"aAAa,MAAAA,EAAiB,CAC5BC,SAAWC,IACT,GAAqB,IAAjBA,EAAMC,OACR,MAAO,YAIXC,mBAAqBF,IACnB,GAAqB,IAAjBA,EAAMC,OACR,MAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const formikValidate: {
|
|
2
2
|
Required: (value: string) => string | undefined;
|
|
3
|
-
AtLeastOneSelected: (value: Array<
|
|
3
|
+
AtLeastOneSelected: (value: Array<number | string>) => string | undefined;
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export { formikValidate };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formValidation.js","sources":["../../src/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n
|
|
1
|
+
{"version":3,"file":"formValidation.js","sources":["../../src/utilities/formValidation.tsx"],"sourcesContent":["export const formikValidate = {\n Required: (value: string): string | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n return undefined;\n },\n AtLeastOneSelected: (value: Array<number | string>): string | undefined => {\n if (value.length === 0) {\n return 'Required';\n }\n return undefined;\n },\n};\n"],"names":["formikValidate","Required","value","length","AtLeastOneSelected"],"mappings":"AAAa,MAAAA,EAAiB,CAC5BC,SAAWC,IACT,GAAqB,IAAjBA,EAAMC,OACR,MAAO,YAIXC,mBAAqBF,IACnB,GAAqB,IAAjBA,EAAMC,OACR,MAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genericUtilities.cjs.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["func","waitMs","lodashDebounce"],"mappings":"+DAWwB,CAACA,EAAgCC,IAAmBC,EAAeF,EAAMC"}
|
|
1
|
+
{"version":3,"file":"genericUtilities.cjs.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["func","waitMs","lodashDebounce"],"mappings":"+DAWwB,CAACA,EAAgCC,IAAmBC,EAAeF,EAAMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genericUtilities.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["debounce","func","waitMs","lodashDebounce"],"mappings":"+BAWa,MAAAA,EAAW,CAACC,EAAgCC,IAAmBC,EAAeF,EAAMC"}
|
|
1
|
+
{"version":3,"file":"genericUtilities.js","sources":["../../src/utilities/genericUtilities.ts"],"sourcesContent":["import lodashDebounce from 'lodash.debounce';\n\n/**\n * Creates a debounced function that delays invoking the provided function until after `waitMs` milliseconds\n * have elapsed since the last time the debounced function was invoked.\n *\n * @param func - The function to debounce\n * @param waitMs - The number of milliseconds to delay\n * @returns A debounced version of the provided function\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\nexport const debounce = (func: (...args: any[]) => void, waitMs: number) => lodashDebounce(func, waitMs);\n"],"names":["debounce","func","waitMs","lodashDebounce"],"mappings":"+BAWa,MAAAA,EAAW,CAACC,EAAgCC,IAAmBC,EAAeF,EAAMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderUtilities.cjs.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n
|
|
1
|
+
{"version":3,"file":"renderUtilities.cjs.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key) || '';\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return import.meta.env['VITE_APPID_OVERRIDE'] || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return import.meta.env['VITE_ORGID_OVERRIDE'] || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return import.meta.env['VITE_BRANDID_OVERRIDE'] || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const stringValue =\n import.meta.env['VITE_ISFLIPDISHSTAFFOVERRIDE'] || getMicroFrontendAttribute('data-isFlipdishStaff');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false',\n );\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const component = await componentImport();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","undefined","stringValue","toString","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"oCAEa,MAAAA,EAA6BC,IACxC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,IAAQ,qBAWxB,UAEfK,GAAqC,qBAAKN,EAA0B,iCAyBnD,UAGjBM,GAAuC,uBAAKN,EAA0B,2CAW7C,KAEhC,MAAMO,QACJD,GAA8C,8BAAKN,EAA0B,wBAE/E,MAAmC,SAA5BO,GAAaC,iEAjCE,UAGfF,GAAqC,qBAAKN,EAA0B,oCAkC/CS,GAC5BC,EAAAA,MAAKC,UAEH,MAAMC,EAAmCC,KAAKC,MAE5CC,OAAOC,eAAeC,QAAQ,kCAAoC,SAGpE,IAEE,MAAMC,QAAkBT,IAKxB,OAHAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAGxDD,EACP,MAAOE,GACP,IAAKR,EAIH,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAMzB,MAAMF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderUtilities.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n
|
|
1
|
+
{"version":3,"file":"renderUtilities.js","sources":["../../src/utilities/renderUtilities.ts"],"sourcesContent":["import { lazy } from 'react';\n\nexport const getMicroFrontendAttribute = (key: string): string => {\n const microFrontendDiv = document.getElementById('flipdish-micro-frontend');\n return microFrontendDiv?.getAttribute(key) || '';\n};\n\n/**\n * Retrieves the AppId.\n *\n * Attempts to get the value from the environment variable `VITE_APPID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-appId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getAppId = (): string => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return import.meta.env['VITE_APPID_OVERRIDE'] || getMicroFrontendAttribute('data-appId');\n};\n\n/**\n * Retrieves the OrgId.\n *\n * Attempts to get the value from the environment variable `VITE_ORGID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-orgId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getOrgId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return import.meta.env['VITE_ORGID_OVERRIDE'] || getMicroFrontendAttribute('data-orgId');\n};\n\n/**\n * Retrieves the BrandId.\n *\n * Attempts to get the value from the environment variable `VITE_BRANDID_OVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-brandId`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getBrandId = (): string => {\n //TODO: change to kebab case to satisfy html attribute requirements\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return import.meta.env['VITE_BRANDID_OVERRIDE'] || getMicroFrontendAttribute('data-brandId');\n};\n\n/**\n * Retrieves the isFlipdishStaff attribute.\n *\n * Attempts to get the value from the environment variable `VITE_ISFLIPDISHSTAFFOVERRIDE`.\n * If the environment variable is not set, it falls back to retrieving from a micro frontend attribute `data-isFlipdishStaff`.\n *\n * @warning Your component will not re-render if the value changes. Use 'useMicroFrontendAttributes' custom hook instead if you care about reactivity.\n */\nexport const getIsFlipdishStaff = (): boolean => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const stringValue =\n import.meta.env['VITE_ISFLIPDISHSTAFFOVERRIDE'] || getMicroFrontendAttribute('data-isFlipdishStaff');\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access\n return stringValue?.toString() === 'true';\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const lazyWithRetry = (componentImport: () => any) =>\n lazy(async () => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const pageHasAlreadyBeenForceRefreshed = JSON.parse(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n window.sessionStorage.getItem('page-has-been-force-refreshed') || 'false',\n );\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const component = await componentImport();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'false');\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return component;\n } catch (error) {\n if (!pageHasAlreadyBeenForceRefreshed) {\n // Assuming that the user is not on the latest version of the application.\n // Let's refresh the page immediately.\n window.sessionStorage.setItem('page-has-been-force-refreshed', 'true');\n return window.location.reload();\n }\n\n // The page has already been reloaded\n // Assuming that user is already using the latest version of the application.\n // Let's let the application crash and raise the error.\n throw error;\n }\n });\n"],"names":["getMicroFrontendAttribute","key","microFrontendDiv","document","getElementById","getAttribute","getAppId","env","getOrgId","getBrandId","getIsFlipdishStaff","stringValue","toString","lazyWithRetry","componentImport","lazy","async","pageHasAlreadyBeenForceRefreshed","JSON","parse","window","sessionStorage","getItem","component","setItem","error","location","reload"],"mappings":"6BAEa,MAAAA,EAA6BC,IACxC,MAAMC,EAAmBC,SAASC,eAAe,2BACjD,OAAOF,GAAkBG,aAAaJ,IAAQ,IAWnCK,EAAW,gBAEHC,IAAyB,qBAAKP,EAA0B,cAWhEQ,EAAW,gBAGHD,IAAyB,qBAAKP,EAA0B,cAWhES,EAAa,gBAGLF,IAA2B,uBAAKP,EAA0B,gBAWlEU,EAAqB,KAEhC,MAAMC,cACQJ,IAAkC,8BAAKP,EAA0B,wBAE/E,MAAmC,SAA5BW,GAAaC,YAITC,EAAiBC,GAC5BC,GAAKC,UAEH,MAAMC,EAAmCC,KAAKC,MAE5CC,OAAOC,eAAeC,QAAQ,kCAAoC,SAGpE,IAEE,MAAMC,QAAkBT,IAKxB,OAHAM,OAAOC,eAAeG,QAAQ,gCAAiC,SAGxDD,EACP,MAAOE,GACP,IAAKR,EAIH,OADAG,OAAOC,eAAeG,QAAQ,gCAAiC,QACxDJ,OAAOM,SAASC,SAMzB,MAAMF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flipdish/portal-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@actions/core": "^1.11.1",
|
|
41
41
|
"@emotion/react": "11.14.0",
|
|
42
42
|
"@emotion/styled": "11.14.0",
|
|
43
|
-
"@mui/material": "6.4.
|
|
43
|
+
"@mui/material": "6.4.12",
|
|
44
44
|
"@mui/x-date-pickers": "^7.23.3",
|
|
45
45
|
"@tanstack/react-query": "^5.62.0",
|
|
46
46
|
"formik": "^2.4.6",
|
|
@@ -77,11 +77,12 @@
|
|
|
77
77
|
"@tanstack/react-query": "^5.62.0",
|
|
78
78
|
"@testing-library/jest-dom": "6.6.3",
|
|
79
79
|
"@testing-library/react": "15.0.7",
|
|
80
|
-
"@types/
|
|
80
|
+
"@types/lodash.debounce": "^4.0.9",
|
|
81
|
+
"@types/react": "18.3.23",
|
|
81
82
|
"@types/react-dom": "18.3.7",
|
|
82
83
|
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
83
84
|
"@typescript-eslint/parser": "7.18.0",
|
|
84
|
-
"@vitejs/plugin-react-swc": "3.
|
|
85
|
+
"@vitejs/plugin-react-swc": "3.10.1",
|
|
85
86
|
"chromatic": "^11.25.2",
|
|
86
87
|
"dotenv": "^16.4.5",
|
|
87
88
|
"eslint": "^8.56.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { GreyPrimitives, LightDarkPrimitives, PrimaryPrimitives, PrimativeColours, SimplePaletteColourOptions, SinglePrimitive, SolidGreyPrimitives, SystemPrimitives } from './types.js';
|
|
2
|
-
export { primativeColours } from './primitives.js';
|
|
3
|
-
export { darkColours, lightColours } from './semantic.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|