@telia-ace/widget-types-grid 1.0.35-next.2 → 1.0.35-next.3

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
@@ -491,7 +491,7 @@ class Lt {
491
491
  }
492
492
  render() {
493
493
  const { widgetDOMElement: n, triggerDOMElement: e } = this.options, s = this.container.get("$widget");
494
- return n.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === k.Badge && Nt(e), import("./render.c0493d57.js").then((i) => i.default(this.container, n)).then(() => {
494
+ return n.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === k.Badge && Nt(e), import("./render.ac2db47d.js").then((i) => i.default(this.container, n)).then(() => {
495
495
  if (n.setAttribute("data-rendered", "true"), e && this.options.triggerType === k.Badge) {
496
496
  const o = this.options.triggerOptions.openTooltip;
497
497
  be(e, o);
@@ -1,7 +1,7 @@
1
1
  import o, { useState as f, useEffect as m } from "react";
2
2
  import E from "react-dom";
3
- import y from "@emotion/cache";
4
- import { CacheProvider as h } from "@emotion/react";
3
+ import h from "@emotion/cache";
4
+ import { CacheProvider as y } from "@emotion/react";
5
5
  import { useIsMounted as v, useComponentPlatform as R, ContainerContext as _, RoutingContext as C } from "@telia-ace/widget-ui";
6
6
  import { Router as b } from "react-router-dom";
7
7
  import { Component as N } from "./index.js";
@@ -31,35 +31,35 @@ else {
31
31
  const P = (e) => {
32
32
  const [t, r] = f(null), n = v();
33
33
  return m(() => {
34
- e.getAsync("router").then((s) => {
35
- n.current && r(s);
34
+ e.getAsync("router").then((u) => {
35
+ n.current && r(u);
36
36
  });
37
37
  }, [e, n]), t;
38
- }, l = y({
38
+ }, l = h({
39
39
  key: "css",
40
- prepend: !0,
41
- nonce: "next"
42
- }), g = ({ container: e }) => {
43
- const t = R(e), r = P(e), [n, s] = f(null);
40
+ prepend: !0
41
+ }), O = ({ container: e }) => {
42
+ const t = R(e), r = P(e), [n, u] = f(null);
44
43
  return m(() => {
45
- const c = e.get("$settings");
46
- c != null && c.cspNonce && (l.nonce = c.cspNonce);
44
+ e.get("settings").then((c) => {
45
+ c != null && c.cspNonce && (l.nonce = c.cspNonce);
46
+ });
47
47
  }, []), m(() => {
48
48
  if (t)
49
- return s(t.nodes.root.children.default[0].id || null), t.events.subscribe(
49
+ return u(t.nodes.root.children.default[0].id || null), t.events.subscribe(
50
50
  "components:root-children-changed",
51
- (x, { node: u }) => {
52
- if (u.parent && u.parent.type === "root") {
53
- const d = u.parent.children.default[0].id;
54
- s(d);
51
+ (S, { node: s }) => {
52
+ if (s.parent && s.parent.type === "root") {
53
+ const d = s.parent.children.default[0].id;
54
+ u(d);
55
55
  }
56
56
  }
57
57
  );
58
- }, [t]), !r || !r.history || !t || !n ? null : /* @__PURE__ */ o.createElement(h, { value: l }, /* @__PURE__ */ o.createElement(b, { history: r.history }, /* @__PURE__ */ o.createElement(_.Provider, { value: e }, /* @__PURE__ */ o.createElement(C.Provider, { value: r }, /* @__PURE__ */ o.createElement(N, { id: n, branch: "default" })))));
59
- }, O = g, j = (e, t) => {
60
- p(t).render(/* @__PURE__ */ o.createElement(O, { container: e }));
58
+ }, [t]), !r || !r.history || !t || !n ? null : /* @__PURE__ */ o.createElement(y, { value: l }, /* @__PURE__ */ o.createElement(b, { history: r.history }, /* @__PURE__ */ o.createElement(_.Provider, { value: e }, /* @__PURE__ */ o.createElement(C.Provider, { value: r }, /* @__PURE__ */ o.createElement(N, { id: n, branch: "default" })))));
59
+ }, I = O, j = (e, t) => {
60
+ p(t).render(/* @__PURE__ */ o.createElement(I, { container: e }));
61
61
  };
62
62
  export {
63
63
  j as default
64
64
  };
65
- //# sourceMappingURL=render.c0493d57.js.map
65
+ //# sourceMappingURL=render.ac2db47d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.ac2db47d.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 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 container.get('settings').then((settings: any) => {\n if (settings?.cspNonce) {\n cacheProvider.nonce = settings.cspNonce;\n }\n });\n }, []);\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","settings","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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AAOpB,EAAA,GAC3B,gBAAAgB,EAAA,cAAAK,GAAA,EAAU,IAAIV,GAAO,QAAO,WAAU,CAC3C,CACJ,CACJ,CACJ;AAER,GAEAW,IAAed,GClEfe,IAAe,CAACxB,GAAsByB,MAAyB;AAE3D,EADa9B,EAAW8B,CAAO,EAC1B,OAAO,gBAAAR,EAAA,cAACR,GAAQ,EAAA,WAAAT,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.35-next.2",
3
+ "version": "1.0.35-next.3",
4
4
  "description": "Type definition for Grid widget.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@telia-ace/widget-core": "1.0.26-next.2",
25
- "@telia-ace/widget-forms": "1.0.33-next.2",
26
- "@telia-ace/widget-routing": "1.0.27-next.2",
27
- "@telia-ace/widget-services": "1.0.26-next.2",
28
- "@telia-ace/widget-ui": "1.0.33-next.2",
29
- "@telia-ace/widget-utilities": "1.0.15-next.2",
24
+ "@telia-ace/widget-core": "1.0.26-next.3",
25
+ "@telia-ace/widget-forms": "1.0.33-next.3",
26
+ "@telia-ace/widget-routing": "1.0.27-next.3",
27
+ "@telia-ace/widget-services": "1.0.26-next.3",
28
+ "@telia-ace/widget-ui": "1.0.33-next.3",
29
+ "@telia-ace/widget-utilities": "1.0.15-next.3",
30
30
  "@webprovisions/bootstrapping": "^1.0.12",
31
31
  "@webprovisions/platform": "^1.1.2"
32
32
  },
@@ -44,7 +44,7 @@
44
44
  "@emotion/cache": "^11.10.5",
45
45
  "@emotion/react": "^11.10.5",
46
46
  "@emotion/styled": "^11.10.5",
47
- "@telia-ace/widget-developer-tools": "1.0.21-next.2",
47
+ "@telia-ace/widget-developer-tools": "1.0.21-next.3",
48
48
  "@types/react": "^18.0.27",
49
49
  "@types/react-dom": "^18.0.10",
50
50
  "@types/react-router": "^5.1.20",
@@ -1 +0,0 @@
1
- {"version":3,"file":"render.c0493d57.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 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 nonce: 'next',\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 const settings = container.get('$settings');\n if (settings?.cspNonce) {\n cacheProvider.nonce = settings.cspNonce;\n }\n }, []);\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","settings","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;A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