@telia-ace/widget-components-not-found 1.0.24 → 1.0.25-next.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/index.js +1 -1
- package/dist/not-found-base.d.ts +1 -1
- package/dist/not-found-component.d.ts +1 -1
- package/dist/{not-found.2bdc2d40.js → not-found.b81d1bf3.js} +25 -27
- package/dist/{not-found.2bdc2d40.js.map → not-found.b81d1bf3.js.map} +1 -1
- package/dist/not-found.d.ts +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
package/dist/not-found-base.d.ts
CHANGED
|
@@ -19,15 +19,7 @@ const P = ({
|
|
|
19
19
|
link: e = "",
|
|
20
20
|
suggestionHeader: n = "",
|
|
21
21
|
suggestion: a = ""
|
|
22
|
-
}) => /* @__PURE__ */ r.createElement(j, null, /* @__PURE__ */ r.createElement(H, null, /* @__PURE__ */ r.createElement(h, {
|
|
23
|
-
variant: "h2"
|
|
24
|
-
}, "404")), /* @__PURE__ */ r.createElement(S, null, /* @__PURE__ */ r.createElement(h, {
|
|
25
|
-
variant: "h3"
|
|
26
|
-
}, t), /* @__PURE__ */ r.createElement(F, {
|
|
27
|
-
routeName: "index",
|
|
28
|
-
"aria-label": e,
|
|
29
|
-
text: e
|
|
30
|
-
})), /* @__PURE__ */ r.createElement(D, null, /* @__PURE__ */ r.createElement("span", null, n), /* @__PURE__ */ r.createElement("ul", null, /* @__PURE__ */ r.createElement("li", null, a)))), T = P, j = o.div`
|
|
22
|
+
}) => /* @__PURE__ */ r.createElement(j, null, /* @__PURE__ */ r.createElement(H, null, /* @__PURE__ */ r.createElement(h, { variant: "h2" }, "404")), /* @__PURE__ */ r.createElement(S, null, /* @__PURE__ */ r.createElement(h, { variant: "h3" }, t), /* @__PURE__ */ r.createElement(F, { routeName: "index", "aria-label": e, text: e })), /* @__PURE__ */ r.createElement(D, null, /* @__PURE__ */ r.createElement("span", null, n), /* @__PURE__ */ r.createElement("ul", null, /* @__PURE__ */ r.createElement("li", null, a)))), T = P, j = o.div`
|
|
31
23
|
${(t) => L(t)}
|
|
32
24
|
display: flex;
|
|
33
25
|
flex-wrap: wrap;
|
|
@@ -89,25 +81,31 @@ const P = ({
|
|
|
89
81
|
}
|
|
90
82
|
`, I = () => {
|
|
91
83
|
const { header: t, linkLabel: e, suggestionHeader: n, suggestionLabel: a, showSearch: E } = k(), x = B(), s = N();
|
|
92
|
-
return /* @__PURE__ */ r.createElement(r.Fragment, null, E && /* @__PURE__ */ r.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
84
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, E && /* @__PURE__ */ r.createElement(
|
|
85
|
+
C,
|
|
86
|
+
{
|
|
87
|
+
builder: ($) => x.get("settings").then((l) => {
|
|
88
|
+
var i;
|
|
89
|
+
const w = Object.keys(l.components).reduce(
|
|
90
|
+
(y, c) => l.components[c].type === "search" ? l.components[c].properties : y,
|
|
91
|
+
{}
|
|
92
|
+
), m = $.createNode("search", { detached: !0 });
|
|
93
|
+
return m.writeLayout({ size: "full" }), m.writeProperties(p({
|
|
94
|
+
"css-margin-bottom": ((i = s == null ? void 0 : s.sizes) == null ? void 0 : i.normal) || "15px"
|
|
95
|
+
}, w)), m;
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
), /* @__PURE__ */ r.createElement(
|
|
99
|
+
T,
|
|
100
|
+
{
|
|
101
|
+
header: t,
|
|
102
|
+
link: e,
|
|
103
|
+
suggestionHeader: n,
|
|
104
|
+
suggestion: a
|
|
105
|
+
}
|
|
106
|
+
));
|
|
109
107
|
};
|
|
110
108
|
export {
|
|
111
109
|
I as default
|
|
112
110
|
};
|
|
113
|
-
//# sourceMappingURL=not-found.
|
|
111
|
+
//# sourceMappingURL=not-found.b81d1bf3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not-found.
|
|
1
|
+
{"version":3,"file":"not-found.b81d1bf3.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,GAA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C,QAAM,EAAE,QAAAlB,GAAQ,WAAAmB,GAAW,kBAAAjB,GAAkB,iBAAAkB,GAAiB,YAAAC,EAAA,IAC1DC,KACEC,IAAYC,KACZC,IAAQC;AAEd,2DAESL,KACG,gBAAAhB,EAAA;AAAA,IAACsB;AAAA,IAAA;AAAA,MACG,SAAS,CAACC,MACCL,EAAU,IAAI,UAAU,EAAE,KAAK,CAACM,MAAkB;;AACrD,cAAMC,IAAuB,OAAO,KAAKD,EAAS,UAAU,EAAE;AAAA,UAC1D,CAACE,GAAKC,MACEH,EAAS,WAAWG,GAAK,SAAS,WAC3BH,EAAS,WAAWG,GAAK,aAG7BD;AAAA,UAEX,CAAC;AAAA,QAAA,GAECE,IAAaL,EAAW,WAAW,UAAU,EAAE,UAAU,IAAM;AACrE,eAAAK,EAAW,YAAY,EAAE,MAAM,OAAQ,CAAA,GACvCA,EAAW,gBAAgBC,EAAA;AAAA,UACvB,uBAAqBnB,IAAAU,KAAA,gBAAAA,EAAO,UAAP,gBAAAV,EAAc,WAAU;AAAA,WAC1Ce,EACN,GAEMG;AAAA,MAAA,CACV;AAAA,IACL;AAAA,EAGR,GAAA,gBAAA5B,EAAA;AAAA,IAACN;AAAAA,IAAA;AAAA,MACG,QAAAC;AAAA,MACA,MAAMmB;AAAA,MACN,kBAAAjB;AAAA,MACA,YAAYkB;AAAA,IAAA;AAAA,EAAA,CAEpB;AAER;"}
|
package/dist/not-found.d.ts
CHANGED
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.25-next.0",
|
|
4
4
|
"description": "Not found component for ACE Widgets.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -21,9 +21,9 @@
|
|
|
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.
|
|
24
|
+
"@telia-ace/widget-core": "^1.0.20-next.0",
|
|
25
|
+
"@telia-ace/widget-types-grid": "^1.0.29-next.0",
|
|
26
|
+
"@telia-ace/widget-ui": "^1.0.27-next.0",
|
|
27
27
|
"@webprovisions/platform": "^1.1.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
37
37
|
"@emotion/styled": "^11.10.5",
|
|
38
|
-
"@telia-ace/widget-developer-tools": "^1.0.
|
|
39
|
-
"@types/react": "^18.0.
|
|
40
|
-
"@types/react-dom": "^18.0.
|
|
38
|
+
"@telia-ace/widget-developer-tools": "^1.0.15-next.0",
|
|
39
|
+
"@types/react": "^18.0.26",
|
|
40
|
+
"@types/react-dom": "^18.0.9",
|
|
41
41
|
"react": "^18.2.0",
|
|
42
42
|
"react-dom": "^18.2.0"
|
|
43
43
|
},
|