@telia-ace/widget-types-grid 1.0.25 → 1.0.26-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 CHANGED
@@ -493,7 +493,7 @@ class Lt {
493
493
  }
494
494
  render() {
495
495
  const { widgetDOMElement: n, triggerDOMElement: e } = this.options, s = this.container.get("$widget");
496
- return n.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === k.Badge && xt(e), import("./render.95f13e79.js").then((i) => i.default(this.container, n)).then(() => {
496
+ return n.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === k.Badge && xt(e), import("./render.e827eb22.js").then((i) => i.default(this.container, n)).then(() => {
497
497
  if (n.setAttribute("data-rendered", "true"), e && this.options.triggerType === k.Badge) {
498
498
  const o = this.options.triggerOptions.openTooltip;
499
499
  be(e, o);
@@ -0,0 +1,74 @@
1
+ import o, { useState as m, useEffect as l } from "react";
2
+ import f from "react-dom";
3
+ import d from "@emotion/cache";
4
+ import { CacheProvider as E } from "@emotion/react";
5
+ import { useIsMounted as y, useComponentPlatform as h, ContainerContext as v, RoutingContext as R } from "@telia-ace/widget-ui";
6
+ import { Router as _ } from "react-router-dom";
7
+ import { Component as C } from "./index.js";
8
+ import "@telia-ace/widget-core";
9
+ import "@emotion/styled";
10
+ import "@telia-ace/widget-utilities";
11
+ import "react-transition-group";
12
+ import "react-router";
13
+ import "@telia-ace/widget-routing";
14
+ import "@telia-ace/widget-services";
15
+ import "@webprovisions/bootstrapping";
16
+ import "@webprovisions/platform";
17
+ var c, s = f;
18
+ if (process.env.NODE_ENV === "production")
19
+ c = s.createRoot, s.hydrateRoot;
20
+ else {
21
+ var a = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
22
+ c = function(t, e) {
23
+ a.usingClientEntryPoint = !0;
24
+ try {
25
+ return s.createRoot(t, e);
26
+ } finally {
27
+ a.usingClientEntryPoint = !1;
28
+ }
29
+ };
30
+ }
31
+ const b = (t) => {
32
+ const [e, r] = m(null), n = y();
33
+ return l(() => {
34
+ t.getAsync("router").then((i) => {
35
+ n.current && r(i);
36
+ });
37
+ }, [t, n]), e;
38
+ }, P = d({
39
+ key: "css",
40
+ prepend: !0
41
+ }), g = ({ container: t }) => {
42
+ const e = h(t), r = b(t), [n, i] = m(null);
43
+ return l(() => {
44
+ if (e)
45
+ return i(e.nodes.root.children.default[0].id || null), e.events.subscribe(
46
+ "components:root-children-changed",
47
+ (I, { node: u }) => {
48
+ if (u.parent && u.parent.type === "root") {
49
+ const p = u.parent.children.default[0].id;
50
+ i(p);
51
+ }
52
+ }
53
+ );
54
+ }, [e]), !r || !r.history || !e || !n ? null : /* @__PURE__ */ o.createElement(E, {
55
+ value: P
56
+ }, /* @__PURE__ */ o.createElement(_, {
57
+ history: r.history
58
+ }, /* @__PURE__ */ o.createElement(v.Provider, {
59
+ value: t
60
+ }, /* @__PURE__ */ o.createElement(R.Provider, {
61
+ value: r
62
+ }, /* @__PURE__ */ o.createElement(C, {
63
+ id: n,
64
+ branch: "default"
65
+ })))));
66
+ }, N = g, j = (t, e) => {
67
+ c(e).render(/* @__PURE__ */ o.createElement(N, {
68
+ container: t
69
+ }));
70
+ };
71
+ export {
72
+ j as default
73
+ };
74
+ //# sourceMappingURL=render.e827eb22.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.e827eb22.js","sources":["../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js","../src/ui/use-router.ts","../src/ui/wrapper.tsx","../src/ui/render.tsx"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","import { RoutingService } from '@telia-ace/widget-routing';\nimport { useIsMounted } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\nimport { useEffect, useState } from 'react';\n\nexport default (container: Container): RoutingService | null => {\n const [router, setRouter] = useState<RoutingService | null>(null);\n const isMounted = useIsMounted();\n\n useEffect(() => {\n container.getAsync('router').then((router: RoutingService) => {\n if (isMounted.current) {\n setRouter(router);\n }\n });\n }, [container, isMounted]);\n\n return router;\n};\n","\nimport createCache from '@emotion/cache';\nimport { CacheProvider } from '@emotion/react';\nimport { ContainerContext, RoutingContext, useComponentPlatform } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\nimport React, { useEffect, useState } from 'react';\nimport { Router } from 'react-router-dom';\nimport Component from './component';\nimport useRouter from './use-router';\n\nconst keyNavigationKeys = ['Tab', 'ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'];\n\ntype Props = {\n container: Container;\n};\n\nconst cacheProvider = createCache({\n key: 'css',\n prepend: true,\n});\n\nconst Wrapper: React.FC<Props> = ({ container }) => {\n const components = useComponentPlatform(container);\n const router = useRouter(container);\n const [entry, setEntry] = useState<string | null>(null);\n\n useEffect(() => {\n if (components) {\n setEntry(components.nodes.root.children.default[0].id || null);\n const unsubscribe = components.events.subscribe(\n 'components:root-children-changed',\n (event, { node }) => {\n if (node.parent && node.parent.type === 'root') {\n const entry = node.parent.children.default[0].id;\n setEntry(entry);\n }\n }\n );\n\n return unsubscribe;\n }\n }, [components]);\n\n if (!router || !router.history || !components) {\n return null;\n }\n\n if (!entry) {\n return null;\n }\n\n return (\n <CacheProvider value={cacheProvider}>\n <Router history={router.history}>\n <ContainerContext.Provider value={container}>\n <RoutingContext.Provider value={router}>\n <Component id={entry} branch=\"default\" />\n </RoutingContext.Provider>\n </ContainerContext.Provider>\n </Router>\n </CacheProvider>\n );\n};\n\nexport default Wrapper;\n","import { Container } from '@webprovisions/platform';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Wrapper from './wrapper';\n\nexport default (container: Container, element: HTMLElement) => {\n const root = createRoot(element);\n root.render(<Wrapper container={container} />);\n};\n"],"names":["m","require$$0","createRoot","i","c","o","useRouter","container","router","setRouter","useState","isMounted","useIsMounted","useEffect","cacheProvider","createCache","Wrapper","components","useComponentPlatform","entry","setEntry","event","node","React","CacheProvider","Router","ContainerContext","RoutingContext","Component","Wrapper$1","render","element"],"mappings":";;;;;;;;;;;;;;;;OAEIA,IAAIC;AACR,IAAI,QAAQ,IAAI,aAAa;AAC3B,EAAAC,IAAqBF,EAAE,YACDA,EAAE;AAAA,KACnB;AACL,MAAIG,IAAIH,EAAE;AACV,EAAAE,IAAqB,SAASE,GAAGC,GAAG;AAClC,IAAAF,EAAE,wBAAwB;AAC1B,QAAI;AACF,aAAOH,EAAE,WAAWI,GAAGC,CAAC;AAAA,IAC9B,UAAc;AACR,MAAAF,EAAE,wBAAwB;AAAA,IAC3B;AAAA,EACL;AASA;ACnBA,MAAeG,IAAA,CAACC,MAAgD;AAC5D,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAgC,IAAI,GAC1DC,IAAYC;AAElB,SAAAC,EAAU,MAAM;AACZ,IAAAN,EAAU,SAAS,QAAQ,EAAE,KAAK,CAACC,MAA2B;AAC1D,MAAIG,EAAU,WACVF,EAAUD,CAAM;AAAA,IACpB,CACH;AAAA,EAAA,GACF,CAACD,GAAWI,CAAS,CAAC,GAElBH;AACX,GCFMM,IAAgBC,EAAY;AAAA,EAC9B,KAAK;AAAA,EACL,SAAS;AACb,CAAC,GAEKC,IAA2B,CAAC,EAAE,WAAAT,QAAgB;AAC1C,QAAAU,IAAaC,EAAqBX,CAAS,GAC3CC,IAASF,EAAUC,CAAS,GAC5B,CAACY,GAAOC,CAAQ,IAAIV,EAAwB,IAAI;AAuBtD,SArBAG,EAAU,MAAM;AACZ,QAAII;AACA,aAAAG,EAASH,EAAW,MAAM,KAAK,SAAS,QAAQ,GAAG,MAAM,IAAI,GACzCA,EAAW,OAAO;AAAA,QAClC;AAAA,QACA,CAACI,GAAO,EAAE,MAAAC,QAAW;AACjB,cAAIA,EAAK,UAAUA,EAAK,OAAO,SAAS,QAAQ;AAC5C,kBAAMH,IAAQG,EAAK,OAAO,SAAS,QAAQ,GAAG;AAC9C,YAAAF,EAASD,CAAK;AAAA,UAClB;AAAA,QACJ;AAAA,MAAA;AAAA,EAIR,GACD,CAACF,CAAU,CAAC,GAEX,CAACT,KAAU,CAACA,EAAO,WAAW,CAACS,KAI/B,CAACE,IACM,OAIN,gBAAAI,EAAA,cAAAC,GAAA;AAAA,IAAc,OAAOV;AAAA,EAAA,GACjB,gBAAAS,EAAA,cAAAE,GAAA;AAAA,IAAO,SAASjB,EAAO;AAAA,EACpB,GAAA,gBAAAe,EAAA,cAACG,EAAiB,UAAjB;AAAA,IAA0B,OAAOnB;AAAA,EAC9B,GAAA,gBAAAgB,EAAA,cAACI,EAAe,UAAf;AAAA,IAAwB,OAAOnB;AAAA,EAAA,GAC3B,gBAAAe,EAAA,cAAAK,GAAA;AAAA,IAAU,IAAIT;AAAA,IAAO,QAAO;AAAA,EAAA,CAAU,CAC3C,CACJ,CACJ,CACJ;AAER,GAEAU,IAAeb,GC3Dfc,IAAe,CAACvB,GAAsBwB,MAAyB;AAE3D,EADa7B,EAAW6B,CAAO,EAC1B,OAAQ,gBAAAR,EAAA,cAAAP,GAAA;AAAA,IAAQ,WAAAT;AAAA,EAAsB,CAAA,CAAE;AACjD;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-types-grid",
3
- "version": "1.0.25",
3
+ "version": "1.0.26-next.0",
4
4
  "description": "Type definition for Grid widget.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -21,16 +21,17 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@telia-ace/widget-core": "^1.0.16",
25
- "@telia-ace/widget-forms": "^1.0.23",
26
- "@telia-ace/widget-routing": "^1.0.17",
27
- "@telia-ace/widget-services": "^1.0.16",
28
- "@telia-ace/widget-ui": "^1.0.23",
29
- "@telia-ace/widget-utilities": "^1.0.5",
24
+ "@telia-ace/widget-core": "^1.0.17-next.0",
25
+ "@telia-ace/widget-forms": "^1.0.24-next.0",
26
+ "@telia-ace/widget-routing": "^1.0.18-next.0",
27
+ "@telia-ace/widget-services": "^1.0.17-next.0",
28
+ "@telia-ace/widget-ui": "^1.0.24-next.0",
29
+ "@telia-ace/widget-utilities": "^1.0.6-next.0",
30
30
  "@webprovisions/bootstrapping": "^1.0.12",
31
31
  "@webprovisions/platform": "^1.1.2"
32
32
  },
33
33
  "peerDependencies": {
34
+ "@emotion/cache": "^11.10.4",
34
35
  "@emotion/react": "^11.10.4",
35
36
  "@emotion/styled": "^11.10.4",
36
37
  "react": "^18.2.0",
@@ -40,9 +41,10 @@
40
41
  "react-transition-group": "^4.4.5"
41
42
  },
42
43
  "devDependencies": {
44
+ "@emotion/cache": "^11.10.4",
43
45
  "@emotion/react": "^11.10.5",
44
46
  "@emotion/styled": "^11.10.5",
45
- "@telia-ace/widget-developer-tools": "^1.0.11",
47
+ "@telia-ace/widget-developer-tools": "^1.0.12-next.0",
46
48
  "@types/react": "^18.0.24",
47
49
  "@types/react-dom": "^18.0.8",
48
50
  "@types/react-router": "^5.1.19",
@@ -1,68 +0,0 @@
1
- import n, { useState as m, useEffect as p } from "react";
2
- import f from "react-dom";
3
- import { useIsMounted as d, useComponentPlatform as E, ContainerContext as y, RoutingContext as R } from "@telia-ace/widget-ui";
4
- import { Router as _ } from "react-router-dom";
5
- import { Component as h } from "./index.js";
6
- import "@emotion/react";
7
- import "@telia-ace/widget-core";
8
- import "@emotion/styled";
9
- import "@telia-ace/widget-utilities";
10
- import "react-transition-group";
11
- import "react-router";
12
- import "@telia-ace/widget-routing";
13
- import "@telia-ace/widget-services";
14
- import "@webprovisions/bootstrapping";
15
- import "@webprovisions/platform";
16
- var c, u = f;
17
- if (process.env.NODE_ENV === "production")
18
- c = u.createRoot, u.hydrateRoot;
19
- else {
20
- var l = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
21
- c = function(e, t) {
22
- l.usingClientEntryPoint = !0;
23
- try {
24
- return u.createRoot(e, t);
25
- } finally {
26
- l.usingClientEntryPoint = !1;
27
- }
28
- };
29
- }
30
- const v = (e) => {
31
- const [t, r] = m(null), o = d();
32
- return p(() => {
33
- e.getAsync("router").then((i) => {
34
- o.current && r(i);
35
- });
36
- }, [e, o]), t;
37
- }, C = ({ container: e }) => {
38
- const t = E(e), r = v(e), [o, i] = m(null);
39
- return p(() => {
40
- if (t)
41
- return i(t.nodes.root.children.default[0].id || null), t.events.subscribe(
42
- "components:root-children-changed",
43
- (N, { node: s }) => {
44
- if (s.parent && s.parent.type === "root") {
45
- const a = s.parent.children.default[0].id;
46
- i(a);
47
- }
48
- }
49
- );
50
- }, [t]), !r || !r.history || !t || !o ? null : /* @__PURE__ */ n.createElement(_, {
51
- history: r.history
52
- }, /* @__PURE__ */ n.createElement(y.Provider, {
53
- value: e
54
- }, /* @__PURE__ */ n.createElement(R.Provider, {
55
- value: r
56
- }, /* @__PURE__ */ n.createElement(h, {
57
- id: o,
58
- branch: "default"
59
- }))));
60
- }, b = C, F = (e, t) => {
61
- c(t).render(/* @__PURE__ */ n.createElement(b, {
62
- container: e
63
- }));
64
- };
65
- export {
66
- F as default
67
- };
68
- //# sourceMappingURL=render.95f13e79.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.95f13e79.js","sources":["../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js","../src/ui/use-router.ts","../src/ui/wrapper.tsx","../src/ui/render.tsx"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","import { RoutingService } from '@telia-ace/widget-routing';\nimport { useIsMounted } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\nimport { useEffect, useState } from 'react';\n\nexport default (container: Container): RoutingService | null => {\n const [router, setRouter] = useState<RoutingService | null>(null);\n const isMounted = useIsMounted();\n\n useEffect(() => {\n container.getAsync('router').then((router: RoutingService) => {\n if (isMounted.current) {\n setRouter(router);\n }\n });\n }, [container, isMounted]);\n\n return router;\n};\n","import { ContainerContext, RoutingContext, useComponentPlatform } from '@telia-ace/widget-ui';\nimport { Container } from '@webprovisions/platform';\nimport React, { useEffect, useState } from 'react';\nimport { Router } from 'react-router-dom';\nimport Component from './component';\nimport useRouter from './use-router';\n\nconst keyNavigationKeys = ['Tab', 'ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'];\n\ntype Props = {\n container: Container;\n};\n\nconst Wrapper: React.FC<Props> = ({ container }) => {\n const components = useComponentPlatform(container);\n const router = useRouter(container);\n const [entry, setEntry] = useState<string | null>(null);\n\n useEffect(() => {\n if (components) {\n setEntry(components.nodes.root.children.default[0].id || null);\n const unsubscribe = components.events.subscribe(\n 'components:root-children-changed',\n (event, { node }) => {\n if (node.parent && node.parent.type === 'root') {\n const entry = node.parent.children.default[0].id;\n setEntry(entry);\n }\n }\n );\n\n return unsubscribe;\n }\n }, [components]);\n\n if (!router || !router.history || !components) {\n return null;\n }\n\n if (!entry) {\n return null;\n }\n\n return (\n <Router history={router.history}>\n <ContainerContext.Provider value={container}>\n <RoutingContext.Provider value={router}>\n <Component id={entry} branch=\"default\" />\n </RoutingContext.Provider>\n </ContainerContext.Provider>\n </Router>\n );\n};\n\nexport default Wrapper;\n","import { Container } from '@webprovisions/platform';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Wrapper from './wrapper';\n\nexport default (container: Container, element: HTMLElement) => {\n const root = createRoot(element);\n root.render(<Wrapper container={container} />);\n};\n"],"names":["m","require$$0","createRoot","i","c","o","useRouter","container","router","setRouter","useState","isMounted","useIsMounted","useEffect","Wrapper","components","useComponentPlatform","entry","setEntry","event","node","React","Router","ContainerContext","RoutingContext","Component","Wrapper$1","render","element"],"mappings":";;;;;;;;;;;;;;;OAEIA,IAAIC;AACR,IAAI,QAAQ,IAAI,aAAa;AAC3B,EAAAC,IAAqBF,EAAE,YACDA,EAAE;AAAA,KACnB;AACL,MAAIG,IAAIH,EAAE;AACV,EAAAE,IAAqB,SAASE,GAAGC,GAAG;AAClC,IAAAF,EAAE,wBAAwB;AAC1B,QAAI;AACF,aAAOH,EAAE,WAAWI,GAAGC,CAAC;AAAA,IAC9B,UAAc;AACR,MAAAF,EAAE,wBAAwB;AAAA,IAC3B;AAAA,EACL;AASA;ACnBA,MAAeG,IAAA,CAACC,MAAgD;AAC5D,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAgC,IAAI,GAC1DC,IAAYC;AAElB,SAAAC,EAAU,MAAM;AACZ,IAAAN,EAAU,SAAS,QAAQ,EAAE,KAAK,CAACC,MAA2B;AAC1D,MAAIG,EAAU,WACVF,EAAUD,CAAM;AAAA,IACpB,CACH;AAAA,EAAA,GACF,CAACD,GAAWI,CAAS,CAAC,GAElBH;AACX,GCLMM,IAA2B,CAAC,EAAE,WAAAP,QAAgB;AAC1C,QAAAQ,IAAaC,EAAqBT,CAAS,GAC3CC,IAASF,EAAUC,CAAS,GAC5B,CAACU,GAAOC,CAAQ,IAAIR,EAAwB,IAAI;AAuBtD,SArBAG,EAAU,MAAM;AACZ,QAAIE;AACA,aAAAG,EAASH,EAAW,MAAM,KAAK,SAAS,QAAQ,GAAG,MAAM,IAAI,GACzCA,EAAW,OAAO;AAAA,QAClC;AAAA,QACA,CAACI,GAAO,EAAE,MAAAC,QAAW;AACjB,cAAIA,EAAK,UAAUA,EAAK,OAAO,SAAS,QAAQ;AAC5C,kBAAMH,IAAQG,EAAK,OAAO,SAAS,QAAQ,GAAG;AAC9C,YAAAF,EAASD,CAAK;AAAA,UAClB;AAAA,QACJ;AAAA,MAAA;AAAA,EAIR,GACD,CAACF,CAAU,CAAC,GAEX,CAACP,KAAU,CAACA,EAAO,WAAW,CAACO,KAI/B,CAACE,IACM,OAIN,gBAAAI,EAAA,cAAAC,GAAA;AAAA,IAAO,SAASd,EAAO;AAAA,EACpB,GAAA,gBAAAa,EAAA,cAACE,EAAiB,UAAjB;AAAA,IAA0B,OAAOhB;AAAA,EAC9B,GAAA,gBAAAc,EAAA,cAACG,EAAe,UAAf;AAAA,IAAwB,OAAOhB;AAAA,EAAA,GAC3B,gBAAAa,EAAA,cAAAI,GAAA;AAAA,IAAU,IAAIR;AAAA,IAAO,QAAO;AAAA,EAAA,CAAU,CAC3C,CACJ,CACJ;AAER,GAEAS,IAAeZ,GCjDfa,IAAe,CAACpB,GAAsBqB,MAAyB;AAE3D,EADa1B,EAAW0B,CAAO,EAC1B,OAAQ,gBAAAP,EAAA,cAAAP,GAAA;AAAA,IAAQ,WAAAP;AAAA,EAAsB,CAAA,CAAE;AACjD;"}