@telia-ace/knowledge-widget-components-guide-category-dropdown 1.3.41-rc.1 → 1.3.41
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,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as c, jsx as o, Fragment as D } from "react/jsx-runtime";
|
|
2
|
-
import { loadingOpacity as j, contentBox as B, borderTabStyle as M,
|
|
2
|
+
import { loadingOpacity as j, contentBox as B, borderTabStyle as M, linkTabStyle as O, Link as G, list as R, List as A, Text as $, useProperties as C, useHover as E, SymbolBadge as f, useRouteData as P, useContainer as W, useIsTabbing as H, createEmptyComponent as U } from "@telia-ace/knowledge-widget-ui";
|
|
3
3
|
import { appendClassNames as z, createParams as q, formatUrl as J } from "@telia-ace/widget-utilities";
|
|
4
4
|
import { useState as T, useEffect as K } from "react";
|
|
5
5
|
import { initialRouteFallback as Q } from "@telia-ace/knowledge-widget-component-utilities";
|
|
@@ -72,14 +72,14 @@ const V = m.div`
|
|
|
72
72
|
`;
|
|
73
73
|
}, Y = m.div`
|
|
74
74
|
${N}
|
|
75
|
-
`, Z = m(
|
|
75
|
+
`, Z = m(G)`
|
|
76
76
|
${N}
|
|
77
77
|
&:focus {
|
|
78
78
|
outline: none;
|
|
79
79
|
}
|
|
80
80
|
&:focus-visible {
|
|
81
81
|
span {
|
|
82
|
-
${
|
|
82
|
+
${O};
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
`, _ = m.div`
|
|
@@ -102,8 +102,8 @@ const V = m.div`
|
|
|
102
102
|
.humany-guide-category-dropdown-item {
|
|
103
103
|
font-weight: normal;
|
|
104
104
|
}
|
|
105
|
-
`, ee = m(
|
|
106
|
-
${
|
|
105
|
+
`, ee = m(A)`
|
|
106
|
+
${R}
|
|
107
107
|
display: flex;
|
|
108
108
|
justify-content: center;
|
|
109
109
|
flex-direction: column;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("@telia-ace/knowledge-data-client"),l=require("@telia-ace/knowledge-widget-core"),v=require("@telia-ace/knowledge-widget-ui"),D=(e,a,n)=>!n||n.length<1?a:h(e,a,null,n),h=(e,a,n,o)=>{if(e.find(s=>s.id===o)||!o)return n||a;for(let s=0;s<e.length;s+=1){const t=e[s];if(t.items){const r=h(t.items,a,t,o);if(r)return r}}},P=e=>e.matches&&e.matches>0,q=e=>{const{events:a}=e.get("$widget"),[n,o]=l.createEventSubscriber(a);return v.createReactComponent(e,"guide-category-dropdown",Promise.resolve().then(()=>require("./guide-category-dropdown-
|
|
1
|
+
"use strict";const g=require("@telia-ace/knowledge-data-client"),l=require("@telia-ace/knowledge-widget-core"),v=require("@telia-ace/knowledge-widget-ui"),D=(e,a,n)=>!n||n.length<1?a:h(e,a,null,n),h=(e,a,n,o)=>{if(e.find(s=>s.id===o)||!o)return n||a;for(let s=0;s<e.length;s+=1){const t=e[s];if(t.items){const r=h(t.items,a,t,o);if(r)return r}}},P=e=>e.matches&&e.matches>0,q=e=>{const{events:a}=e.get("$widget"),[n,o]=l.createEventSubscriber(a);return v.createReactComponent(e,"guide-category-dropdown",Promise.resolve().then(()=>require("./guide-category-dropdown-BCWPWKu6.js")),i=>{const s=t=>{i.writeProperties({loading:!0}),i.actions.dispatch("fetch",{params:t}).then(()=>{i.writeProperties({loading:!1})})};i.actions.create("fetch",({parent:t,categories:r})=>{i.writeProperties({parent:t,categories:r,loading:!1})}),e.getAsync("router").then(t=>{const{params:r}=t.getRouteData();s(r)}),n("router:changed",(t,{current:r})=>{s(r.routeData.params)})}).then(()=>l.extendComponent(e,"guide-category-dropdown",i=>{i.actions.watch("guide-category-dropdown.fetch",(s,t)=>{const{matchFilters:r={search:!1,tag:!1},rootCategoryHeader:f}=i.properties(),{params:{phrase:p,guideCategory:w,tag:m}}=s;return g.DataClient.getInstance(e).then(b=>b.fetch(g.DataType.GuideCategories,{searchPhrase:r.search?p:void 0,tagId:r.tag?m:void 0}).then(({categories:d,matches:C})=>{var u;const c=D(d,{matches:C,id:"0",title:f,items:d},w);return t({parent:c,categories:(u=c==null?void 0:c.items)==null?void 0:u.filter(P)})}))})})).then(()=>{o()})};module.exports=q;
|
package/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ const y = (e, n, a) => !a || a.length < 1 ? n : h(e, n, null, a), h = (e, n, a,
|
|
|
17
17
|
return P(
|
|
18
18
|
e,
|
|
19
19
|
"guide-category-dropdown",
|
|
20
|
-
import("./guide-category-dropdown-
|
|
20
|
+
import("./guide-category-dropdown-CEvmcObD.mjs"),
|
|
21
21
|
(i) => {
|
|
22
22
|
const s = (t) => {
|
|
23
23
|
i.writeProperties({ loading: !0 }), i.actions.dispatch("fetch", { params: t }).then(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-components-guide-category-dropdown",
|
|
3
|
-
"version": "1.3.41
|
|
3
|
+
"version": "1.3.41",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/knowledge-widget-core": "^1.3.41
|
|
14
|
-
"@telia-ace/knowledge-widget-component-utilities": "^1.3.41
|
|
15
|
-
"@telia-ace/knowledge-widget-ui": "^1.3.41
|
|
16
|
-
"@telia-ace/widget-utilities": "^1.3.41
|
|
17
|
-
"@telia-ace/knowledge-data-client": "^1.3.41
|
|
13
|
+
"@telia-ace/knowledge-widget-core": "^1.3.41",
|
|
14
|
+
"@telia-ace/knowledge-widget-component-utilities": "^1.3.41",
|
|
15
|
+
"@telia-ace/knowledge-widget-ui": "^1.3.41",
|
|
16
|
+
"@telia-ace/widget-utilities": "^1.3.41",
|
|
17
|
+
"@telia-ace/knowledge-data-client": "^1.3.41",
|
|
18
18
|
"@webprovisions/platform": "^1.1.4"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
File without changes
|