@telia-ace/widget-types-grid 1.0.30-experimental.1 → 1.0.30-experimental.2
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 +26 -28
- package/dist/index.js.map +1 -1
- package/dist/render.b6303746.js +494 -0
- package/dist/render.b6303746.js.map +1 -0
- package/dist/ui/render.d.ts +0 -1
- package/dist/ui/widget-root.d.ts +2 -2
- package/package.json +8 -8
- package/dist/render.9ebba652.js +0 -8
- package/dist/render.9ebba652.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var N = (t, e) => {
|
|
|
19
19
|
e.indexOf(s) < 0 && re.call(t, s) && (n[s] = t[s]);
|
|
20
20
|
return n;
|
|
21
21
|
};
|
|
22
|
-
import { Grid as ue, useRouteData as Ce, useRouter as Oe, useProperties as de, useContext as X, useContainer as T, useComponentNode as ee, useScroll as he, transitionComposer as Se, paddedBorderTabStyle as Ae, useComponent as
|
|
22
|
+
import { Grid as ue, useRouteData as Ce, useRouter as Oe, useProperties as de, useContext as X, useContainer as T, useComponentNode as ee, useScroll as he, transitionComposer as Se, paddedBorderTabStyle as Ae, useComponent as De, useComponentDescriptor as xe, filterCssPropsStyle as Me, Typography as Ne, useComponentPlatform as me, useIsMounted as $e, useColumns as Le, useLayout as ke, ComponentNodeContext as Pe, ComponentPropertyContext as Re, filterCssProps as Ve } from "@telia-ace/widget-ui";
|
|
23
23
|
import h, { useState as z, forwardRef as pe, useMemo as _e, Suspense as Ie, useEffect as B } from "react";
|
|
24
24
|
import { css as fe, ThemeProvider as ze, useTheme as Be } from "@emotion/react";
|
|
25
25
|
import { asDescriptor as ae, ComponentPlatform as Te, createComponentModel as je, ComponentQuery as Ge, WidgetRenderState as O } from "@telia-ace/widget-core";
|
|
@@ -71,10 +71,10 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
|
|
|
71
71
|
return null;
|
|
72
72
|
const { location: se } = u;
|
|
73
73
|
a.name !== i && a.name !== "" && y && (c(Xe(i, a.name, st)), o(a.name));
|
|
74
|
-
const { views:
|
|
75
|
-
if (!Object.keys(
|
|
74
|
+
const { views: D } = f.get("$settings");
|
|
75
|
+
if (!Object.keys(D).length)
|
|
76
76
|
return null;
|
|
77
|
-
const
|
|
77
|
+
const x = (w, M, R) => {
|
|
78
78
|
const S = Y(M, R), I = m.getChildren(w)[0];
|
|
79
79
|
return /* @__PURE__ */ h.createElement(
|
|
80
80
|
nt,
|
|
@@ -117,9 +117,9 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
|
|
|
117
117
|
(w, { direction: M }) => /* @__PURE__ */ h.createElement(
|
|
118
118
|
ge,
|
|
119
119
|
{
|
|
120
|
-
views:
|
|
120
|
+
views: D,
|
|
121
121
|
location: se,
|
|
122
|
-
render: (R) =>
|
|
122
|
+
render: (R) => x(R, w, M)
|
|
123
123
|
}
|
|
124
124
|
)
|
|
125
125
|
)
|
|
@@ -195,7 +195,7 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
|
|
|
195
195
|
`, ht = pe(
|
|
196
196
|
(i, s) => {
|
|
197
197
|
var o = i, { className: t = "", children: e } = o, n = N(o, ["className", "children"]);
|
|
198
|
-
const r =
|
|
198
|
+
const r = De(), { name: c, type: a, id: u } = xe(), d = _e(() => r ? P(r)`
|
|
199
199
|
${U}
|
|
200
200
|
${Me}
|
|
201
201
|
` : null, [r]);
|
|
@@ -262,31 +262,31 @@ const Xe = (t, e, n) => typeof n[t] == "number" && typeof n[e] == "number" && n[
|
|
|
262
262
|
}, [l, e, s, L]), !m || !L)
|
|
263
263
|
return null;
|
|
264
264
|
const R = p(p({}, y), r || {}), {
|
|
265
|
-
cardinal:
|
|
266
|
-
fonts:
|
|
265
|
+
cardinal: D,
|
|
266
|
+
fonts: x = {},
|
|
267
267
|
accessibility: Y = {}
|
|
268
268
|
} = R, G = N(R, [
|
|
269
269
|
"cardinal",
|
|
270
270
|
"fonts",
|
|
271
271
|
"accessibility"
|
|
272
272
|
]), w = {
|
|
273
|
-
type:
|
|
274
|
-
base:
|
|
275
|
-
small:
|
|
276
|
-
normal:
|
|
277
|
-
medium:
|
|
278
|
-
large:
|
|
279
|
-
huge:
|
|
273
|
+
type: x.type,
|
|
274
|
+
base: x.base || "16px",
|
|
275
|
+
small: x.small || "0.8em",
|
|
276
|
+
normal: x.normal || "1em",
|
|
277
|
+
medium: x.medium || "1.2em",
|
|
278
|
+
large: x.large || "1.6em",
|
|
279
|
+
huge: x.huge || "2.5em"
|
|
280
280
|
}, M = C(p({}, G), {
|
|
281
281
|
fonts: w,
|
|
282
282
|
accessibility: p({}, Y)
|
|
283
283
|
});
|
|
284
|
-
return typeof
|
|
285
|
-
cardinal:
|
|
286
|
-
small: `${
|
|
287
|
-
normal: `${
|
|
288
|
-
medium: `${
|
|
289
|
-
large: `${
|
|
284
|
+
return typeof D == "number" && (M.sizes = {
|
|
285
|
+
cardinal: D,
|
|
286
|
+
small: `${D}px`,
|
|
287
|
+
normal: `${D * 3}px`,
|
|
288
|
+
medium: `${D * 5}px`,
|
|
289
|
+
large: `${D * 8}px`
|
|
290
290
|
}), /* @__PURE__ */ h.createElement(ze, { theme: M }, /* @__PURE__ */ h.createElement(Pe.Provider, { value: m }, /* @__PURE__ */ h.createElement(Re.Provider, { value: E }, (() => {
|
|
291
291
|
const S = p({
|
|
292
292
|
"data-width": A === "full" ? b : Math.min(A, b),
|
|
@@ -414,7 +414,7 @@ function At(t, e) {
|
|
|
414
414
|
e && n.setAttribute("title", e), n.classList.remove("humany-active"), n.classList.remove("humany-loading");
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Dt(t) {
|
|
418
418
|
t instanceof HTMLElement ? (t.classList.remove("humany-active"), t.classList.add("humany-loading")) : t instanceof Array && t.forEach((e) => {
|
|
419
419
|
e.classList.remove("humany-active"), e.classList.add("humany-loading");
|
|
420
420
|
});
|
|
@@ -425,9 +425,9 @@ function ye(t, e) {
|
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
427
|
var k = /* @__PURE__ */ ((t) => (t.Inline = "inline", t.Link = "link", t.Badge = "badge", t.Unsupported = "unsupported", t))(k || {});
|
|
428
|
-
const
|
|
428
|
+
const xt = (t, e) => t && e ? "both" : t ? "widgetDOM" : e ? "triggerDOM" : "none", be = (t) => t ? typeof t == "boolean" && t ? "link" : typeof t == "object" && !Array.isArray(t) ? "badge" : "unsupported" : "inline", Mt = (t, e, n, s, i = !1) => {
|
|
429
429
|
var u, d;
|
|
430
|
-
const o =
|
|
430
|
+
const o = xt(
|
|
431
431
|
e,
|
|
432
432
|
n
|
|
433
433
|
), r = be(s), c = {
|
|
@@ -488,7 +488,7 @@ class $t {
|
|
|
488
488
|
}
|
|
489
489
|
render() {
|
|
490
490
|
const { widgetDOMElement: e, triggerDOMElement: n } = this.options, s = this.container.get("$widget");
|
|
491
|
-
return e.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === k.Badge &&
|
|
491
|
+
return e.getAttribute("data-rendered") === "true" ? Promise.resolve() : (n && this.options.triggerType === k.Badge && Dt(n), import("./render.b6303746.js").then((i) => i.default(s.name, this.container, e)).then(() => {
|
|
492
492
|
if (e.setAttribute("data-rendered", "true"), n && this.options.triggerType === k.Badge) {
|
|
493
493
|
const o = this.options.triggerOptions.openTooltip;
|
|
494
494
|
ye(n, o);
|
|
@@ -645,8 +645,6 @@ class Jt extends Je {
|
|
|
645
645
|
), this.container.registerAsync("router", () => Pt(this.container)), this.container.registerAsync("actionResolver", () => Vt(this.container)), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync("components", () => It(this.container));
|
|
646
646
|
}
|
|
647
647
|
initialize() {
|
|
648
|
-
console.log("experimental abc123");
|
|
649
|
-
debugger;
|
|
650
648
|
const e = this.container.getManyAsync(
|
|
651
649
|
"actionResolver",
|
|
652
650
|
"router",
|