@telia-ace/widget-components-not-found 1.0.19 → 1.0.20

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createReactComponent as t } from "@telia-ace/widget-ui";
2
- const e = (o) => t(o, "not-found", import("./not-found.baad3a4d.js"));
2
+ const e = (o) => t(o, "not-found", import("./not-found.95856431.js"));
3
3
  export {
4
4
  e as default
5
5
  };
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';\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;"}
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":["NotFoundComponent","container","createReactComponent"],"mappings":";AAWM,MAAAA,IAAoB,CAACC,MAChBC,EAAqBD,GAAW,aAAa,OAAO,0BAAc;"}
@@ -37,28 +37,34 @@ const j = ({
37
37
  return (e = t.theme.sizes) == null ? void 0 : e.medium;
38
38
  }};
39
39
  `, H = o.div`
40
- ${f("h2", g`
40
+ ${f(
41
+ "h2",
42
+ g`
41
43
  padding: 0;
42
44
  margin: 0;
43
45
  color: gray;
44
46
  font-size: ${(t) => {
45
- var e;
46
- return (e = t.theme.fonts) == null ? void 0 : e.huge;
47
- }};
48
- `)}
47
+ var e;
48
+ return (e = t.theme.fonts) == null ? void 0 : e.huge;
49
+ }};
50
+ `
51
+ )}
49
52
  `, S = o.div`
50
53
  margin-left: ${(t) => {
51
54
  var e;
52
55
  return (e = t.theme.sizes) == null ? void 0 : e.medium;
53
56
  }};
54
57
 
55
- ${f("h3", g`
58
+ ${f(
59
+ "h3",
60
+ g`
56
61
  text-transform: uppercase;
57
62
  font-size: ${(t) => {
58
- var e;
59
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
60
- }};
61
- `)}
63
+ var e;
64
+ return (e = t.theme.fonts) == null ? void 0 : e.normal;
65
+ }};
66
+ `
67
+ )}
62
68
 
63
69
  a {
64
70
  color: ${(t) => {
@@ -85,7 +91,10 @@ const j = ({
85
91
  return /* @__PURE__ */ r.createElement(r.Fragment, null, E && /* @__PURE__ */ r.createElement(C, {
86
92
  builder: ($) => x.get("settings").then((l) => {
87
93
  var m;
88
- const w = Object.keys(l.components).reduce((y, c) => l.components[c].type === "search" ? l.components[c].properties : y, {}), i = $.createNode("search", { detached: !0 });
94
+ const w = Object.keys(l.components).reduce(
95
+ (y, c) => l.components[c].type === "search" ? l.components[c].properties : y,
96
+ {}
97
+ ), i = $.createNode("search", { detached: !0 });
89
98
  return i.writeLayout({ size: "full" }), i.writeProperties(p({
90
99
  "css-margin-bottom": ((m = s == null ? void 0 : s.sizes) == null ? void 0 : m.normal) || "15px"
91
100
  }, w)), i;
@@ -100,4 +109,4 @@ const j = ({
100
109
  export {
101
110
  G as default
102
111
  };
103
- //# sourceMappingURL=not-found.baad3a4d.js.map
112
+ //# sourceMappingURL=not-found.95856431.js.map
@@ -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';\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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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.95856431.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":["NotFoundBase","header","link","suggestionHeader","suggestion","React","Wrapper","Status","Typography","Header","TextLink","Content","styled","contentBox","p","_a","headingElement","css","NotFound","linkLabel","suggestionLabel","showSearch","useProperties","container","useContainer","themeContext","useContext","ThemeContext","DetachedComponent","components","settings","searchComponentProps","acc","key","searchNode","__spreadValues"],"mappings":";;;;;;;;;;;;;;;AAWA,MAAMA,IAAgC,CAAC;AAAA,EACnC,QAAAC,IAAS;AAAA,EACT,MAAAC,IAAO;AAAA,EACP,kBAAAC,IAAmB;AAAA,EACnB,YAAAC,IAAa;AACjB,MAES,gBAAAC,EAAA,cAAAC,GAAA,MACI,gBAAAD,EAAA,cAAAE,GAAA,MACI,gBAAAF,EAAA,cAAAG,GAAA;AAAA,EAAW,SAAQ;AAAA,GAAK,KAAG,CAChC,GACA,gBAAAH,EAAA,cAACI,SACI,gBAAAJ,EAAA,cAAAG,GAAA;AAAA,EAAW,SAAQ;AAAM,GAAAP,CAAO,GAChC,gBAAAI,EAAA,cAAAK,GAAA;AAAA,EAAS,WAAU;AAAA,EAAQ,cAAYR;AAAA,EAAM,MAAMA;AAAA,CAAM,CAC9D,GACC,gBAAAG,EAAA,cAAAM,GAAA,sCACI,QAAM,MAAAR,CAAiB,GACxB,gBAAAE,EAAA,cAAC,YACI,gBAAAA,EAAA,cAAA,MAAA,MAAID,CAAW,CACpB,CACJ,CACJ,GAMFE,IAAUM,EAAO;AAAA,MACjBC;AAAA;AAAA;AAAA;AAAA;AAAA,eAKS,CAACC,MAAM;;AAAA,UAAAC,IAAAD,EAAE,MAAM,UAAR,gBAAAC,EAAe;AAAA;AAAA,GAG/BR,IAASK,EAAO;AAAA,MAChBI;AAAA,EACE;AAAA,EACAC;AAAA;A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WAAW,UAAU,EAAE,UAAU,IAAM;AACrE,aAAAK,EAAW,YAAY,EAAE,MAAM,OAAQ,CAAA,GACvCA,EAAW,gBAAgBC,EAAA;AAAA,QACvB,uBAAqBpB,IAAAU,KAAA,gBAAAA,EAAc,UAAd,gBAAAV,EAAqB,WAAU;AAAA,SACjDgB,EACN,GAEMG;AAAA,IAAA,CACV;AAAA,EACL,CACJ,GAEH,gBAAA7B,EAAA,cAAAL,GAAA;AAAA,IACG,QAAAC;AAAA,IACA,MAAMkB;AAAA,IACN,kBAAAhB;AAAA,IACA,YAAYiB;AAAA,EAChB,CAAA,CACJ;AAER;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-not-found",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "Not found component for ACE Widgets.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -8,6 +8,7 @@
8
8
  "telia"
9
9
  ],
10
10
  "main": "dist/index.js",
11
+ "sourceMain": "src/index.ts",
11
12
  "type": "module",
12
13
  "types": "dist/index.d.ts",
13
14
  "files": [
@@ -25,9 +26,9 @@
25
26
  },
26
27
  "sideEffects": false,
27
28
  "dependencies": {
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",
29
+ "@telia-ace/widget-core": "^1.0.15",
30
+ "@telia-ace/widget-types-grid": "^1.0.24",
31
+ "@telia-ace/widget-ui": "^1.0.22",
31
32
  "@webprovisions/platform": "^1.1.2"
32
33
  },
33
34
  "peerDependencies": {
@@ -40,5 +41,5 @@
40
41
  "@types/react-dom": "^16.8.0",
41
42
  "@types/styled-components": "^5.1.7"
42
43
  },
43
- "gitHead": "187396559955650eb5545c4fc4540b16658bcff0"
44
+ "gitHead": "c3045eebac4251ae8ba27333abd9b6aa3ccd5b38"
44
45
  }