@telia-ace/knowledge-widget-components-contact-list 1.3.41-rc.1 → 1.3.41-rc.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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as D, Fragment as P } from "react/jsx-runtime";
2
2
  import d from "@emotion/styled";
3
- import { ContactList as T, contactItemList as U, contactLink as E } from "@telia-ace/knowledge-widget-adapters";
4
- import { GuideList as F, contentBox as G, loadingOpacity as j, useRouteData as w, useComponentDescriptor as O, useContainer as z, useChildren as R, useDispatch as A, AccordionListItem as q, createEmptyComponent as H, Loader as k, ItemList as J, Link as K, borderTabStyle as Q, StyledText as v, useProperties as V, SymbolBadge as W } from "@telia-ace/knowledge-widget-ui";
3
+ import { contactItemList as T, contactLink as U, ContactList as E } from "@telia-ace/knowledge-widget-adapters";
4
+ import { useRouteData as w, useComponentDescriptor as F, useContainer as z, useChildren as O, useDispatch as A, AccordionListItem as R, createEmptyComponent as H, Loader as k, contentBox as G, loadingOpacity as j, GuideList as q, useProperties as J, SymbolBadge as K, StyledText as v, ItemList as Q, borderTabStyle as V, Link as W } from "@telia-ace/knowledge-widget-ui";
5
5
  import { formatUrl as B, appendClassNames as L, createParams as M, findCategoryById as X } from "@telia-ace/widget-utilities";
6
6
  import { Component as Y } from "@telia-ace/widget-types-grid";
7
7
  import { useCallback as Z } from "react";
@@ -18,11 +18,11 @@ const _ = ({
18
18
  const {
19
19
  name: u,
20
20
  params: { contactCategory: I = 0, guide: y }
21
- } = w(), { name: a } = O(), b = z(), f = R(), S = A(), N = Z(
21
+ } = w(), { name: a } = F(), b = z(), f = O(), S = A(), N = Z(
22
22
  (n, c, g, l) => {
23
23
  const { id: h, title: C } = n;
24
24
  return r && y === h ? /* @__PURE__ */ t(
25
- q,
25
+ R,
26
26
  {
27
27
  id: h,
28
28
  title: C,
@@ -72,16 +72,16 @@ const _ = ({
72
72
  children: /* @__PURE__ */ t(k, { loading: m })
73
73
  }
74
74
  );
75
- }, tt = d(F)`
75
+ }, tt = d(q)`
76
76
  ${G}
77
77
  ${j}
78
- `, et = d(T)`
78
+ `, et = d(E)`
79
79
  ${j}
80
80
  ${G}
81
- `, nt = d(J)`
81
+ `, nt = d(Q)`
82
82
  ${(e) => j(e)}
83
83
  ${G}
84
- ${U}
84
+ ${T}
85
85
 
86
86
  && {
87
87
  i {
@@ -90,12 +90,12 @@ const _ = ({
90
90
  text-align: center;
91
91
  }
92
92
  }
93
- `, ot = d(K)`
93
+ `, ot = d(W)`
94
94
  &:focus-visible {
95
- ${Q};
95
+ ${V};
96
96
  }
97
97
 
98
- ${E}
98
+ ${U}
99
99
  `, at = d.div`
100
100
  display: flex;
101
101
  flex-direction: column;
@@ -114,7 +114,7 @@ const _ = ({
114
114
  guides: I = [],
115
115
  deflectionAccordion: y = !1,
116
116
  loading: a = !1
117
- } = V(), { contactCategory: b, guide: f = "guide" } = p;
117
+ } = J(), { contactCategory: b, guide: f = "guide" } = p;
118
118
  if (!u.length && !s.length && !a)
119
119
  return H(r, {
120
120
  ...o,
@@ -173,7 +173,7 @@ const _ = ({
173
173
  uriName: B(g)
174
174
  }),
175
175
  children: [
176
- l && /* @__PURE__ */ t(W, { symbol: l }),
176
+ l && /* @__PURE__ */ t(K, { symbol: l }),
177
177
  i != null && i.length ? /* @__PURE__ */ D(at, { children: [
178
178
  /* @__PURE__ */ t(rt, { children: g }),
179
179
  /* @__PURE__ */ t(v, { children: i })
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const h=require("@telia-ace/knowledge-data-client"),a=require("@telia-ace/knowledge-widget-component-utilities"),y=require("@telia-ace/knowledge-widget-core"),q=require("@telia-ace/knowledge-widget-ui"),M=s=>{const{events:m}=s.get("$widget"),[P,k]=y.createEventSubscriber(m);return q.createReactComponent(s,"contact-list",Promise.resolve().then(()=>require("./contact-list-05301ab8.js")),e=>{const i=t=>{e.writeProperties({loading:!0,contactMethods:[],categories:[]}),e.actions.dispatch("fetch",{params:t})};e.actions.create("fetch",t=>{const{submitButtonLabel:r="Submit",deflectionHeaderTag:o=void 0}=e.properties();o!==void 0&&(window.humany.deflectionHeaderTag=o);const d=(t.contactMethods||[]).map(c=>({...c,body:a.updateForm(c,{submit:r})}));return e.actions.dispatch("fetched",{...t,contactMethods:d,loading:!0})}),e.actions.create("fetched",t=>e.writeProperties({...t,guides:t.guides||[],loading:!1})),s.getAsync("router").then(t=>{const{params:r}=t.getRouteData();i(r)}),P("router:changed",(t,{current:r})=>{i(r.routeData.params)}),a.useForm(s,e),a.useExpand(e)}).then(()=>y.extendComponent(s,"contact-list",e=>{e.actions.watch("contact-list.fetch",(i,t)=>{const{deflection:r={},deflectionPageSize:o=5,deflectionAccordion:d}=e.properties(),{params:c={}}=i,{contactCategory:u,guide:l,accordion:v}=c;return h.DataClient.getInstance(s).then(g=>g.fetch(h.DataType.ContactMethodCategories,{contactMethodCategoryId:u}).then(({contactMethods:f,categories:b})=>{var p;const w=Object.keys(r),C=w.length===1&&!u?w[0]:u;return(p=r[C])!=null&&p.length?g.fetch(h.DataType.Guides,{categories:r[C],take:o}).then(n=>d&&l&&v===e.node.name?a.fetchAccordionGuideIfMissing(n,g,{guide:l}):new Promise(D=>D(n))).then(({guides:n})=>t({guides:n,contactMethods:f,categories:b})):t({contactMethods:f,categories:b})}))})})).then(()=>{k()})};module.exports=M;
1
+ "use strict";const h=require("@telia-ace/knowledge-data-client"),a=require("@telia-ace/knowledge-widget-component-utilities"),y=require("@telia-ace/knowledge-widget-core"),q=require("@telia-ace/knowledge-widget-ui"),M=s=>{const{events:m}=s.get("$widget"),[P,k]=y.createEventSubscriber(m);return q.createReactComponent(s,"contact-list",Promise.resolve().then(()=>require("./contact-list-JZA-EhY7.js")),e=>{const i=t=>{e.writeProperties({loading:!0,contactMethods:[],categories:[]}),e.actions.dispatch("fetch",{params:t})};e.actions.create("fetch",t=>{const{submitButtonLabel:r="Submit",deflectionHeaderTag:o=void 0}=e.properties();o!==void 0&&(window.humany.deflectionHeaderTag=o);const d=(t.contactMethods||[]).map(c=>({...c,body:a.updateForm(c,{submit:r})}));return e.actions.dispatch("fetched",{...t,contactMethods:d,loading:!0})}),e.actions.create("fetched",t=>e.writeProperties({...t,guides:t.guides||[],loading:!1})),s.getAsync("router").then(t=>{const{params:r}=t.getRouteData();i(r)}),P("router:changed",(t,{current:r})=>{i(r.routeData.params)}),a.useForm(s,e),a.useExpand(e)}).then(()=>y.extendComponent(s,"contact-list",e=>{e.actions.watch("contact-list.fetch",(i,t)=>{const{deflection:r={},deflectionPageSize:o=5,deflectionAccordion:d}=e.properties(),{params:c={}}=i,{contactCategory:u,guide:l,accordion:v}=c;return h.DataClient.getInstance(s).then(g=>g.fetch(h.DataType.ContactMethodCategories,{contactMethodCategoryId:u}).then(({contactMethods:f,categories:b})=>{var p;const w=Object.keys(r),C=w.length===1&&!u?w[0]:u;return(p=r[C])!=null&&p.length?g.fetch(h.DataType.Guides,{categories:r[C],take:o}).then(n=>d&&l&&v===e.node.name?a.fetchAccordionGuideIfMissing(n,g,{guide:l}):new Promise(D=>D(n))).then(({guides:n})=>t({guides:n,contactMethods:f,categories:b})):t({contactMethods:f,categories:b})}))})})).then(()=>{k()})};module.exports=M;
package/index.mjs CHANGED
@@ -7,7 +7,7 @@ const L = (o) => {
7
7
  return x(
8
8
  o,
9
9
  "contact-list",
10
- import("./contact-list-300090b9.mjs"),
10
+ import("./contact-list-CJWGJIzz.mjs"),
11
11
  (t) => {
12
12
  const c = (e) => {
13
13
  t.writeProperties({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/knowledge-widget-components-contact-list",
3
- "version": "1.3.41-rc.1",
3
+ "version": "1.3.41-rc.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -10,14 +10,14 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@telia-ace/knowledge-widget-adapters": "^1.3.41-rc.1",
14
- "@telia-ace/knowledge-widget-component-utilities": "^1.3.41-rc.1",
15
- "@telia-ace/knowledge-widget-core": "^1.3.41-rc.1",
16
- "@telia-ace/knowledge-widget-ui": "^1.3.41-rc.1",
17
- "@telia-ace/widget-forms": "^1.3.41-rc.1",
18
- "@telia-ace/widget-utilities": "^1.3.41-rc.1",
19
- "@telia-ace/widget-types-grid": "^1.3.41-rc.1",
20
- "@telia-ace/knowledge-data-client": "^1.3.41-rc.1",
13
+ "@telia-ace/knowledge-widget-adapters": "^1.3.41-rc.2",
14
+ "@telia-ace/knowledge-widget-component-utilities": "^1.3.41-rc.2",
15
+ "@telia-ace/knowledge-widget-core": "^1.3.41-rc.2",
16
+ "@telia-ace/knowledge-widget-ui": "^1.3.41-rc.2",
17
+ "@telia-ace/widget-forms": "^1.3.41-rc.2",
18
+ "@telia-ace/widget-utilities": "^1.3.41-rc.2",
19
+ "@telia-ace/widget-types-grid": "^1.3.41-rc.2",
20
+ "@telia-ace/knowledge-data-client": "^1.3.41-rc.2",
21
21
  "@webprovisions/platform": "^1.1.4"
22
22
  },
23
23
  "peerDependencies": {