@telia-ace/widget-components-not-found 1.0.33 → 1.0.34
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/not-found-afaaf9ab.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found-afaaf9ab.js","sources":["../src/not-found-base.tsx","../src/not-found.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport { contentBox, headingElement, TextLink, Typography } from '@telia-ace/widget-ui';\nimport React from 'react';\n\ntype Props = {\n header?: string;\n link?: string;\n suggestionHeader?: string;\n suggestion?: string;\n};\n\nconst NotFoundBase: React.FC<Props> = ({\n header = '',\n link = '',\n suggestionHeader = '',\n suggestion = '',\n}) => {\n return (\n <Wrapper>\n <Status>\n <Typography variant=\"h2\">404</Typography>\n </Status>\n <Header>\n <Typography variant=\"h3\">{header}</Typography>\n <TextLink routeName=\"index\" aria-label={link} text={link} />\n </Header>\n <Content>\n <span>{suggestionHeader}</span>\n <ul>\n <li>{suggestion}</li>\n </ul>\n </Content>\n </Wrapper>\n );\n};\n\nexport default NotFoundBase;\n\nconst Wrapper = styled.div`\n ${(p) => contentBox(p)}\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: flex-start;\n padding: ${(p) => p.theme.sizes?.medium};\n`;\n\nconst Status = styled.div`\n ${(p) =>\n headingElement(p)(\n 'h2',\n css`\n padding: 0;\n margin: 0;\n color: gray;\n font-size: ${p.theme.fonts?.huge};\n `\n )}\n`;\n\nconst Header = styled.div`\n margin-left: ${(p) => p.theme.sizes?.medium};\n\n ${(p) =>\n headingElement(p)(\n 'h3',\n css`\n text-transform: uppercase;\n font-size: ${p.theme.fonts?.normal};\n `\n )}\n\n a {\n color: ${(p) => p.theme.colors?.link};\n font-size: ${(p) => p.theme.fonts?.small};\n }\n`;\n\nconst Content = styled.div`\n margin-top: ${(p) => p.theme.sizes?.medium};\n min-width: 100%;\n\n span {\n font-weight: bold;\n }\n`;\n","import { useTheme } from '@emotion/react';\nimport { DetachedComponent } from '@telia-ace/widget-types-grid';\nimport { useContainer, useProperties } from '@telia-ace/widget-ui';\nimport React from 'react';\nimport NotFoundBase from './not-found-base';\nimport { NotFoundComponentProps } from './not-found-component';\n\ntype Props = {};\n\nconst NotFound: React.FC<Props> = () => {\n const { header, linkLabel, suggestionHeader, suggestionLabel, showSearch } =\n useProperties<NotFoundComponentProps>();\n const container = useContainer();\n const theme = useTheme();\n\n return (\n <>\n {showSearch && (\n <DetachedComponent\n builder={(components: any) => {\n return container.get('settings').then((settings: any) => {\n const searchComponentProps = Object.keys(settings.components).reduce(\n (acc, key) => {\n if (settings.components[key].type === 'search') {\n return settings.components[key].properties;\n }\n\n return acc;\n },\n {}\n );\n const searchNode = components.createNode('search', { detached: true });\n searchNode.writeLayout({ size: 'full' });\n searchNode.writeProperties({\n 'css-margin-bottom': theme?.sizes?.normal || '15px',\n ...searchComponentProps,\n });\n\n return searchNode;\n });\n }}\n />\n )}\n <NotFoundBase\n header={header}\n link={linkLabel}\n suggestionHeader={suggestionHeader}\n suggestion={suggestionLabel}\n />\n </>\n );\n};\n\nexport default NotFound;\n"],"names":["NotFoundBase","header","link","suggestionHeader","suggestion","Wrapper","React","Status","Typography","Header","TextLink","Content","NotFoundBase$1","styled","p","contentBox","_a","headingElement","css","NotFound","linkLabel","suggestionLabel","showSearch","useProperties","container","useContainer","theme","useTheme","DetachedComponent","components","settings","searchComponentProps","acc","key","searchNode","__spreadValues"],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAMA,IAAgC,CAAC;AAAA,EACnC,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,kBAAAC,IAAmB;AAAA,EACnB,YAAAC,IAAa;AACjB,sCAESC,GACG,MAAA,gBAAAC,EAAA,cAACC,SACI,gBAAAD,EAAA,cAAAE,GAAA,EAAW,SAAQ,KAAK,GAAA,KAAG,CAChC,GACA,gBAAAF,EAAA,cAACG,SACI,gBAAAH,EAAA,cAAAE,GAAA,EAAW,SAAQ,KAAM,GAAAP,CAAO,GAChC,gBAAAK,EAAA,cAAAI,GAAA,EAAS,WAAU,SAAQ,cAAYR,GAAM,MAAMA,GAAM,CAC9D,mCACCS,GACG,MAAA,gBAAAL,EAAA,cAAC,cAAMH,CAAiB,mCACvB,MACG,MAAA,gBAAAG,EAAA,cAAC,YAAIF,CAAW,CACpB,CACJ,CACJ,GAIRQ,IAAeZ,GAETK,IAAUQ,EAAO;AAAA,MACjB,CAACC,MAAMC,EAAWD,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"not-found-afaaf9ab.js","sources":["../src/not-found-base.tsx","../src/not-found.tsx"],"sourcesContent":["import { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport { contentBox, headingElement, TextLink, Typography } from '@telia-ace/widget-ui';\nimport React from 'react';\n\ntype Props = {\n header?: string;\n link?: string;\n suggestionHeader?: string;\n suggestion?: string;\n};\n\nconst NotFoundBase: React.FC<Props> = ({\n header = '',\n link = '',\n suggestionHeader = '',\n suggestion = '',\n}) => {\n return (\n <Wrapper>\n <Status>\n <Typography variant=\"h2\">404</Typography>\n </Status>\n <Header>\n <Typography variant=\"h3\">{header}</Typography>\n <TextLink routeName=\"index\" aria-label={link} text={link} />\n </Header>\n <Content>\n <span>{suggestionHeader}</span>\n <ul>\n <li>{suggestion}</li>\n </ul>\n </Content>\n </Wrapper>\n );\n};\n\nexport default NotFoundBase;\n\nconst Wrapper = styled.div`\n ${(p) => contentBox(p)}\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n justify-content: flex-start;\n padding: ${(p) => p.theme.sizes?.medium};\n`;\n\nconst Status = styled.div`\n ${(p) =>\n headingElement(p)(\n 'h2',\n css`\n padding: 0;\n margin: 0;\n color: gray;\n font-size: ${p.theme.fonts?.huge};\n `\n )}\n`;\n\nconst Header = styled.div`\n margin-left: ${(p) => p.theme.sizes?.medium};\n\n ${(p) =>\n headingElement(p)(\n 'h3',\n css`\n text-transform: uppercase;\n font-size: ${p.theme.fonts?.normal};\n `\n )}\n\n a {\n color: ${(p) => p.theme.colors?.link};\n font-size: ${(p) => p.theme.fonts?.small};\n }\n`;\n\nconst Content = styled.div`\n margin-top: ${(p) => p.theme.sizes?.medium};\n min-width: 100%;\n\n span {\n font-weight: bold;\n }\n`;\n","import { useTheme } from '@emotion/react';\nimport { DetachedComponent } from '@telia-ace/widget-types-grid';\nimport { useContainer, useProperties } from '@telia-ace/widget-ui';\nimport React from 'react';\nimport NotFoundBase from './not-found-base';\nimport { NotFoundComponentProps } from './not-found-component';\n\ntype Props = {};\n\nconst NotFound: React.FC<Props> = () => {\n const { header, linkLabel, suggestionHeader, suggestionLabel, showSearch } =\n useProperties<NotFoundComponentProps>();\n const container = useContainer();\n const theme = useTheme();\n\n return (\n <>\n {showSearch && (\n <DetachedComponent\n builder={(components: any) => {\n return container.get('settings').then((settings: any) => {\n const searchComponentProps = Object.keys(settings.components).reduce(\n (acc, key) => {\n if (settings.components[key].type === 'search') {\n return settings.components[key].properties;\n }\n\n return acc;\n },\n {}\n );\n const searchNode = components.createNode('search', { detached: true });\n searchNode.writeLayout({ size: 'full' });\n searchNode.writeProperties({\n 'css-margin-bottom': theme?.sizes?.normal || '15px',\n ...searchComponentProps,\n });\n\n return searchNode;\n });\n }}\n />\n )}\n <NotFoundBase\n header={header}\n link={linkLabel}\n suggestionHeader={suggestionHeader}\n suggestion={suggestionLabel}\n />\n </>\n );\n};\n\nexport default NotFound;\n"],"names":["NotFoundBase","header","link","suggestionHeader","suggestion","Wrapper","React","Status","Typography","Header","TextLink","Content","NotFoundBase$1","styled","p","contentBox","_a","headingElement","css","NotFound","linkLabel","suggestionLabel","showSearch","useProperties","container","useContainer","theme","useTheme","DetachedComponent","components","settings","searchComponentProps","acc","key","searchNode","__spreadValues"],"mappings":";;;;;;;;;;;;;;;;AAYA,MAAMA,IAAgC,CA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B;AAER;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-not-found",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"description": "Not found component for ACE Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
},
|
|
22
22
|
"sideEffects": false,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@telia-ace/widget-core": "1.0.
|
|
25
|
-
"@telia-ace/widget-types-grid": "1.0.
|
|
26
|
-
"@telia-ace/widget-ui": "1.0.
|
|
27
|
-
"@webprovisions/platform": "^1.1.
|
|
24
|
+
"@telia-ace/widget-core": "1.0.29",
|
|
25
|
+
"@telia-ace/widget-types-grid": "1.0.38",
|
|
26
|
+
"@telia-ace/widget-ui": "1.0.36",
|
|
27
|
+
"@webprovisions/platform": "^1.1.4"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@emotion/react": "^11.10.5",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"react-dom": "^18.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@emotion/react": "^11.
|
|
37
|
-
"@emotion/styled": "^11.
|
|
38
|
-
"@telia-ace/widget-developer-tools": "1.0.
|
|
39
|
-
"@types/react": "^18.
|
|
40
|
-
"@types/react-dom": "^18.
|
|
36
|
+
"@emotion/react": "^11.11.1",
|
|
37
|
+
"@emotion/styled": "^11.11.0",
|
|
38
|
+
"@telia-ace/widget-developer-tools": "1.0.24",
|
|
39
|
+
"@types/react": "^18.2.23",
|
|
40
|
+
"@types/react-dom": "^18.2.8",
|
|
41
41
|
"react": "^18.2.0",
|
|
42
42
|
"react-dom": "^18.2.0"
|
|
43
43
|
},
|