@telia-ace/widget-components-not-found 1.0.18 → 1.0.19
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.txt +5 -5
- package/README.md +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/not-found-base.d.ts +9 -9
- package/dist/not-found-component.d.ts +10 -10
- package/dist/not-found.baad3a4d.js.map +1 -1
- package/dist/not-found.d.ts +4 -4
- package/package.json +5 -5
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Copyright © 2021, Telia Company AB. All rights reserved.
|
|
2
|
-
|
|
3
|
-
THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
|
|
4
|
-
THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
|
|
5
|
-
AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
|
|
1
|
+
Copyright © 2021, Telia Company AB. All rights reserved.
|
|
2
|
+
|
|
3
|
+
THIS PACKAGE AND CONTAINING SOFTWARE IS PART OF
|
|
4
|
+
THE HUMANY SERVICE. BY USING THIS SOFTWARE YOU
|
|
5
|
+
AGREE TO THE FOLLOWING TERMS AND CONDITIONS:
|
|
6
6
|
http://www.humany.com/legal
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# `@telia-ace/widget-components-not-found`
|
|
2
|
-
|
|
3
|
-
Not found component for ACE Widgets.
|
|
1
|
+
# `@telia-ace/widget-components-not-found`
|
|
2
|
+
|
|
3
|
+
Not found component for ACE Widgets.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import NotFoundComponent from './not-found-component';
|
|
2
|
-
export default NotFoundComponent;
|
|
1
|
+
import NotFoundComponent from './not-found-component';
|
|
2
|
+
export default NotFoundComponent;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/not-found-component.tsx"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\n\nexport type NotFoundComponentProps = {\n header?: string;\n linkLabel?: string;\n suggestionHeader?: string;\n suggestionLabel?: string;\n showSearch?: boolean;\n};\n\nconst NotFoundComponent = (container: Container) => {\n return createReactComponent(container, 'not-found', import('./not-found'));\n};\n\nexport default NotFoundComponent;\n"],"names":[],"mappings":";AAWM,MAAA,IAAoB,CAAC,MAChB,EAAqB,GAAW,aAAa,OAAO,0BAAc;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/not-found-component.tsx"],"sourcesContent":["import { createReactComponent } from '@telia-ace/widget-ui';\r\nimport { Container } from '@webprovisions/platform';\r\n\r\nexport type NotFoundComponentProps = {\r\n header?: string;\r\n linkLabel?: string;\r\n suggestionHeader?: string;\r\n suggestionLabel?: string;\r\n showSearch?: boolean;\r\n};\r\n\r\nconst NotFoundComponent = (container: Container) => {\r\n return createReactComponent(container, 'not-found', import('./not-found'));\r\n};\r\n\r\nexport default NotFoundComponent;\r\n"],"names":[],"mappings":";AAWM,MAAA,IAAoB,CAAC,MAChB,EAAqB,GAAW,aAAa,OAAO,0BAAc;"}
|
package/dist/not-found-base.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type Props = {
|
|
3
|
-
header?: string;
|
|
4
|
-
link?: string;
|
|
5
|
-
suggestionHeader?: string;
|
|
6
|
-
suggestion?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const NotFoundBase: React.FC<Props>;
|
|
9
|
-
export default NotFoundBase;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
header?: string;
|
|
4
|
+
link?: string;
|
|
5
|
+
suggestionHeader?: string;
|
|
6
|
+
suggestion?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const NotFoundBase: React.FC<Props>;
|
|
9
|
+
export default NotFoundBase;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Container } from '@webprovisions/platform';
|
|
2
|
-
export declare type NotFoundComponentProps = {
|
|
3
|
-
header?: string;
|
|
4
|
-
linkLabel?: string;
|
|
5
|
-
suggestionHeader?: string;
|
|
6
|
-
suggestionLabel?: string;
|
|
7
|
-
showSearch?: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare const NotFoundComponent: (container: Container) => Promise<void>;
|
|
10
|
-
export default NotFoundComponent;
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
export declare type NotFoundComponentProps = {
|
|
3
|
+
header?: string;
|
|
4
|
+
linkLabel?: string;
|
|
5
|
+
suggestionHeader?: string;
|
|
6
|
+
suggestionLabel?: string;
|
|
7
|
+
showSearch?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const NotFoundComponent: (container: Container) => Promise<void>;
|
|
10
|
+
export default NotFoundComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found.baad3a4d.js","sources":["../src/not-found-base.tsx","../src/not-found.tsx"],"sourcesContent":["import { contentBox, headingElement, TextLink, Typography } from '@telia-ace/widget-ui';\nimport React from 'react';\nimport styled, { css } from 'styled-components';\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 ${contentBox}\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 ${headingElement(\n 'h2',\n css`\n padding: 0;\n margin: 0;\n color: gray;\n font-size: ${(p) => p.theme.fonts?.huge};\n `\n )}\n`;\n\nconst Header = styled.div`\n margin-left: ${(p) => p.theme.sizes?.medium};\n\n ${headingElement(\n 'h3',\n css`\n text-transform: uppercase;\n font-size: ${(p) => 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 { ComponentPlatform } from '@telia-ace/widget-core';\nimport { DetachedComponent } from '@telia-ace/widget-types-grid';\nimport { useContainer, useProperties } from '@telia-ace/widget-ui';\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\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 themeContext = useContext(ThemeContext);\n\n return (\n <>\n {showSearch && (\n <DetachedComponent\n builder={(components: ComponentPlatform) => {\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': themeContext?.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":[],"mappings":";;;;;;;;;;;;;;;AAWA,MAAM,IAAgC,C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AA;AAAA,GCnElC,IAA4B,MAAM;AACpC,QAAM,EAAE,WAAQ,cAAW,qBAAkB,oBAAiB,kBAC1D,KACE,IAAY,KACZ,IAAe,EAAW,CAAY;AAGxC,SAAA,kBAAA,cAAA,EAAA,UAAA,MACK,KACI,kBAAA,cAAA,GAAA;AAAA,IACG,SAAS,CAAC,MACC,EAAU,IAAI,UAAU,EAAE,KAAK,CAAC,MAAkB;;AAC/C,YAAA,IAAuB,OAAO,KAAK,EAAS,UAAU,EAAE,OAC1D,CAAC,GAAK,MACE,EAAS,WAAW,GAAK,SAAS,WAC3B,EAAS,WAAW,GAAK,aAG7B,GAEX,CACJ,CAAA,GACM,IAAa,EAAW,WAAW,UAAU,EAAE,UAAU,IAAM;AACrE,eAAW,YAAY,EAAE,MAAM,OAAQ,CAAA,GACvC,EAAW,gBAAgB;AAAA,QACvB,qBAAqB,6BAAc,UAAd,kBAAqB,WAAU;AAAA,SACjD,EACN,GAEM;AAAA,IAAA,CACV;AAAA,EACL,CACJ,GAEH,kBAAA,cAAA,GAAA;AAAA,IACG;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA,YAAY;AAAA,EAChB,CAAA,CACJ;AAER;"}
|
|
1
|
+
{"version":3,"file":"not-found.baad3a4d.js","sources":["../src/not-found-base.tsx","../src/not-found.tsx"],"sourcesContent":["import { contentBox, headingElement, TextLink, Typography } from '@telia-ace/widget-ui';\r\nimport React from 'react';\r\nimport styled, { css } from 'styled-components';\r\n\r\ntype Props = {\r\n header?: string;\r\n link?: string;\r\n suggestionHeader?: string;\r\n suggestion?: string;\r\n};\r\n\r\nconst NotFoundBase: React.FC<Props> = ({\r\n header = '',\r\n link = '',\r\n suggestionHeader = '',\r\n suggestion = '',\r\n}) => {\r\n return (\r\n <Wrapper>\r\n <Status>\r\n <Typography variant=\"h2\">404</Typography>\r\n </Status>\r\n <Header>\r\n <Typography variant=\"h3\">{header}</Typography>\r\n <TextLink routeName=\"index\" aria-label={link} text={link} />\r\n </Header>\r\n <Content>\r\n <span>{suggestionHeader}</span>\r\n <ul>\r\n <li>{suggestion}</li>\r\n </ul>\r\n </Content>\r\n </Wrapper>\r\n );\r\n};\r\n\r\nexport default NotFoundBase;\r\n\r\nconst Wrapper = styled.div`\r\n ${contentBox}\r\n display: flex;\r\n flex-wrap: wrap;\r\n flex-direction: row;\r\n justify-content: flex-start;\r\n padding: ${(p) => p.theme.sizes?.medium};\r\n`;\r\n\r\nconst Status = styled.div`\r\n ${headingElement(\r\n 'h2',\r\n css`\r\n padding: 0;\r\n margin: 0;\r\n color: gray;\r\n font-size: ${(p) => p.theme.fonts?.huge};\r\n `\r\n )}\r\n`;\r\n\r\nconst Header = styled.div`\r\n margin-left: ${(p) => p.theme.sizes?.medium};\r\n\r\n ${headingElement(\r\n 'h3',\r\n css`\r\n text-transform: uppercase;\r\n font-size: ${(p) => p.theme.fonts?.normal};\r\n `\r\n )}\r\n\r\n a {\r\n color: ${(p) => p.theme.colors?.link};\r\n font-size: ${(p) => p.theme.fonts?.small};\r\n }\r\n`;\r\n\r\nconst Content = styled.div`\r\n margin-top: ${(p) => p.theme.sizes?.medium};\r\n min-width: 100%;\r\n\r\n span {\r\n font-weight: bold;\r\n }\r\n`;\r\n","import { ComponentPlatform } from '@telia-ace/widget-core';\r\nimport { DetachedComponent } from '@telia-ace/widget-types-grid';\r\nimport { useContainer, useProperties } from '@telia-ace/widget-ui';\r\nimport React, { useContext } from 'react';\r\nimport { ThemeContext } from 'styled-components';\r\nimport NotFoundBase from './not-found-base';\r\nimport { NotFoundComponentProps } from './not-found-component';\r\n\r\ntype Props = {};\r\n\r\nconst NotFound: React.FC<Props> = () => {\r\n const { header, linkLabel, suggestionHeader, suggestionLabel, showSearch } =\r\n useProperties<NotFoundComponentProps>();\r\n const container = useContainer();\r\n const themeContext = useContext(ThemeContext);\r\n\r\n return (\r\n <>\r\n {showSearch && (\r\n <DetachedComponent\r\n builder={(components: ComponentPlatform) => {\r\n return container.get('settings').then((settings: any) => {\r\n const searchComponentProps = Object.keys(settings.components).reduce(\r\n (acc, key) => {\r\n if (settings.components[key].type === 'search') {\r\n return settings.components[key].properties;\r\n }\r\n\r\n return acc;\r\n },\r\n {}\r\n );\r\n const searchNode = components.createNode('search', { detached: true });\r\n searchNode.writeLayout({ size: 'full' });\r\n searchNode.writeProperties({\r\n 'css-margin-bottom': themeContext?.sizes?.normal || '15px',\r\n ...searchComponentProps,\r\n });\r\n\r\n return searchNode;\r\n });\r\n }}\r\n />\r\n )}\r\n <NotFoundBase\r\n header={header}\r\n link={linkLabel}\r\n suggestionHeader={suggestionHeader}\r\n suggestion={suggestionLabel}\r\n />\r\n </>\r\n );\r\n};\r\n\r\nexport default NotFound;\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAWA,MAAM,IAAgC,CAAC;AAAA,EACnC,YAAS;AAAA,EACT,UAAO;AAAA,EACP,sBAAmB;AAAA,EACnB,gBAAa;AAAA,MAGR,kBAAA,cAAA,GAAA,MACI,kBAAA,cAAA,GAAA,MACI,kBAAA,cAAA,GAAA;AAAA,EAAW,SAAQ;AAAA,GAAK,KAAG,CAChC,GACA,kBAAA,cAAC,SACI,kBAAA,cAAA,GAAA;AAAA,EAAW,SAAQ;AAAM,GAAA,CAAO,GAChC,kBAAA,cAAA,GAAA;AAAA,EAAS,WAAU;AAAA,EAAQ,cAAY;AAAA,EAAM,MAAM;AAAA,CAAM,CAC9D,GACC,kBAAA,cAAA,GAAA,sCACI,QAAM,MAAA,CAAiB,GACxB,kBAAA,cAAC,YACI,kBAAA,cAAA,MAAA,MAAI,CAAW,CACpB,CACJ,CACJ,GAMF,IAAU,EAAO;AAAA,MACjB;AAAA;AAAA;AAAA;AAAA;AAAA,eAKS,CAAC,MAAM;;AAAA,gBAAE,MAAM,UAAR,kBAAe;AAAA;AAAA,GAG/B,IAAS,EAAO;AAAA,MAChB,EACE,MACA;AAAA;AAAA;AAAA;AAAA,yBAIiB,CAAC,MAAM;;AAAA,gBAAE,MAAM,UAAR,kBA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/dist/not-found.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type Props = {};
|
|
3
|
-
declare const NotFound: React.FC<Props>;
|
|
4
|
-
export default NotFound;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {};
|
|
3
|
+
declare const NotFound: React.FC<Props>;
|
|
4
|
+
export default NotFound;
|
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.19",
|
|
4
4
|
"description": "Not found component for ACE Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@telia-ace/widget-core": "^1.0.
|
|
29
|
-
"@telia-ace/widget-types-grid": "^1.0.
|
|
30
|
-
"@telia-ace/widget-ui": "^1.0.
|
|
28
|
+
"@telia-ace/widget-core": "^1.0.14",
|
|
29
|
+
"@telia-ace/widget-types-grid": "^1.0.23",
|
|
30
|
+
"@telia-ace/widget-ui": "^1.0.21",
|
|
31
31
|
"@webprovisions/platform": "^1.1.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@types/react-dom": "^16.8.0",
|
|
41
41
|
"@types/styled-components": "^5.1.7"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "187396559955650eb5545c4fc4540b16658bcff0"
|
|
44
44
|
}
|