@telia-ace/knowledge-widget-types-grid 1.0.54 → 1.1.1-rc.1

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.
@@ -0,0 +1,642 @@
1
+ "use strict";var ge=Object.defineProperty;var ue=(t,e,s)=>e in t?ge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var L=(t,e,s)=>(ue(t,typeof e!="symbol"?e+"":e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-6e1f4d54.js"),c=require("react/jsx-runtime"),g=require("react");require("react-dom");const N=require("./create-params-13c11e30.js"),D=t=>{if(!t)return"";const e=[{from:/[äæǽ]+/gi,to:"ae"},{from:/[öœ]+/gi,to:"oe"},{from:/[ü]+/gi,to:"ue"},{from:/[Ä]+/gi,to:"Ae"},{from:/[Ü]+/gi,to:"Ue"},{from:/[Ö]+/gi,to:"Oe"},{from:/[ÀÁÂÃÄÅǺĀĂĄǍΑΆẢẠẦẪẨẬẰẮẴẲẶА]+/gi,to:"A"},{from:/[àáâãåǻāăąǎªαάảạầấẫẩậằắẵẳặа]+/gi,to:"a"},{from:/[Б]+/gi,to:"B"},{from:/[б]+/gi,to:"b"},{from:/[ÇĆĈĊČ]+/gi,to:"C"},{from:/[çćĉċč]+/gi,to:"c"},{from:/[Д]+/gi,to:"D"},{from:/[д]+/gi,to:"d"},{from:/[ÐĎĐΔ]+/gi,to:"Dj"},{from:/[ðďđδ]+/gi,to:"dj"},{from:/[ÈÉÊËĒĔĖĘĚΕΈẼẺẸỀẾỄỂỆЕЭ]+/gi,to:"E"},{from:/[èéêëēĕėęěέεẽẻẹềếễểệеэ]+/gi,to:"e"},{from:/[Ф]+/gi,to:"F"},{from:/[ф]+/gi,to:"f"},{from:/[ĜĞĠĢΓГҐ]+/gi,to:"G"},{from:/[ĝğġģγгґ]+/gi,to:"g"},{from:/[ĤĦ]+/gi,to:"H"},{from:/[ĥħ]+/gi,to:"h"},{from:/[ÌÍÎÏĨĪĬǏĮİΗΉΊΙΪỈỊИЫ]+/gi,to:"I"},{from:/[ìíîïĩīĭǐįıηήίιϊỉịиыї]+/gi,to:"i"},{from:/[Ĵ]+/gi,to:"J"},{from:/[ĵ]+/gi,to:"j"},{from:/[ĶΚК]+/gi,to:"K"},{from:/[ķκк]+/gi,to:"k"},{from:/[ĹĻĽĿŁΛЛ]+/gi,to:"L"},{from:/[ĺļľŀłλл]+/gi,to:"l"},{from:/[М]+/gi,to:"M"},{from:/[м]+/gi,to:"m"},{from:/[ÑŃŅŇΝН]+/gi,to:"N"},{from:/[ñńņňʼnνн]+/gi,to:"n"},{from:/[ÒÓÔÕŌŎǑŐƠØǾΟΌΩΏỎỌỒỐỖỔỘỜỚỠỞỢО]+/gi,to:"O"},{from:/[òóôõōŏǒőơøǿºοόωώỏọồốỗổộờớỡởợо]+/gi,to:"o"},{from:/[П]+/gi,to:"P"},{from:/[п]+/gi,to:"p"},{from:/[ŔŖŘΡР]+/gi,to:"R"},{from:/[ŕŗřρр]+/gi,to:"r"},{from:/[ŚŜŞȘŠΣС]+/gi,to:"S"},{from:/[śŝşșšſσςс]+/gi,to:"s"},{from:/[ȚŢŤŦτТ]+/gi,to:"T"},{from:/[țţťŧт]+/gi,to:"t"},{from:/[ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛŨỦỤỪỨỮỬỰУ]+/gi,to:"U"},{from:/[ùúûũūŭůűųưǔǖǘǚǜυύϋủụừứữửựу]+/gi,to:"u"},{from:/[ÝŸŶΥΎΫỲỸỶỴЙ]+/gi,to:"Y"},{from:/[ýÿŷỳỹỷỵй]+/gi,to:"y"},{from:/[В]+/gi,to:"V"},{from:/[в]+/gi,to:"v"},{from:/[Ŵ]+/gi,to:"W"},{from:/[ŵ]+/gi,to:"w"},{from:/[ŹŻŽΖЗ]+/gi,to:"Z"},{from:/[źżžζз]+/gi,to:"z"},{from:/[ÆǼ]+/gi,to:"AE"},{from:/[ß]+/gi,to:"ss"},{from:/[IJ]+/gi,to:"IJ"},{from:/[ij]+/gi,to:"ij"},{from:/[Œ]+/gi,to:"OE"},{from:/[ƒ]+/gi,to:"f"},{from:/[ξ]+/gi,to:"ks"},{from:/[π]+/gi,to:"p"},{from:/[β]+/gi,to:"v"},{from:/[μ]+/gi,to:"m"},{from:/[ψ]+/gi,to:"ps"},{from:/[Ё]+/gi,to:"Yo"},{from:/[ё]+/gi,to:"yo"},{from:/[Є]+/gi,to:"Ye"},{from:/[є]+/gi,to:"ye"},{from:/[Ї]+/gi,to:"Yi"},{from:/[Ж]+/gi,to:"Zh"},{from:/[ж]+/gi,to:"zh"},{from:/[Х]+/gi,to:"Kh"},{from:/[х]+/gi,to:"kh"},{from:/[Ц]+/gi,to:"Ts"},{from:/[ц]+/gi,to:"ts"},{from:/[Ч]+/gi,to:"Ch"},{from:/[ч]+/gi,to:"ch"},{from:/[Ш]+/gi,to:"Sh"},{from:/[ш]+/gi,to:"sh"},{from:/[Щ]+/gi,to:"Shch"},{from:/[щ]+/gi,to:"shch"},{from:/[ЪъЬь]+/gi,to:""},{from:/[Ю]+/gi,to:"Yu"},{from:/[ю]+/gi,to:"yu"},{from:/[Я]+/gi,to:"Ya"},{from:/[я]+/gi,to:"ya"}],s=/[^a-zA-Z0-9]+/g,i=/[-]$/;let a=t;for(const r in e)e.hasOwnProperty(r)&&e[r].from.test(t)&&(a=a.replace(e[r].from,e[r].to));return a=a.replace(s,"-"),a=a.replace(i,""),a=a.toLowerCase(),a||"humany"},pe=t=>{let e;t.split(",")[0].indexOf("base64")!==-1?e=atob(t.split(",")[1]):e=decodeURI(t.split(",")[1]);const s=t.split(",")[0].split(":")[1].split(";")[0],i=[];for(let a=0;a<e.length;a++)i[a]=e.charCodeAt(a);return new Blob([new Uint8Array(i)],{type:s})},ye=(t,e)=>{if(!t||!e)return!0;let s=e.parentNode,i=!1;for(;s!==null;)s===t&&(i=!0),s=s.parentNode;return i},H=(t,e={},s={},i=()=>{})=>{t.properties&&Object.keys(t.properties).forEach(a=>{const r={schema:t.properties[a],layout:e[a],data:s[a]},l={data:{options:(s["data:options"]||{})[a]}};i(new o.Component$1(a,r),l),typeof r.schema=="object"&&H(r.schema,r.layout,r.data,i)})};class ve{constructor(e){this.form=e}findValue(e){}traverse(e){const{schema:s,layout:i,data:a}=this.form;H(s,i,a,e)}export(e=!1){const s=new FormData,i={},a={};return this.traverse((r,n)=>{switch(r.component){case"Name":case"Address":case"Fieldset":case"Submit":break;case"File":const{data:l}=n,{options:d}=l;if(d){const{fileName:f}=d;i[r.name]=f}if(e)a[r.name]={component:r,extra:n};else if(r.value){const f=n.data.options.fileName||r.name,m=pe(r.value);s.append(r.name,m,f)}break;default:i[r.name]=r.value;break}}),s.append("components",JSON.stringify(i)),{formData:s,values:i,excluded:a}}}const $e=()=>{const[t,e]=g.useState(!1);return g.useEffect(()=>{const s=()=>{e(!1)},i=a=>{a.keyCode===9&&e(!0)};return window.addEventListener("keydown",i),window.addEventListener("click",s),()=>{window.removeEventListener("keydown",i),window.removeEventListener("click",s)}},[]),t};var V=(t=>(t.HH_MM="hh:mm",t.YYYY_MM_DD="yyyy-mm-dd",t.YYYY_MM_DD_HH_MM="yyyy-mm-dd hh:mm",t))(V||{});const _=({className:t="",format:e="hh:mm",timestamp:s})=>c.jsx("span",{className:o.appendClassNames(t,"humany-timestamp"),children:be(s,e)}),B=t=>`0${t}`.slice(-2);function be(t,e){const s=new Date(t),i=s.toTimeString().split(" ")[0].split(":"),a=i.length>1?`${i[0]}:${i[1]}`:i[0],r=s.getFullYear(),n=s.getMonth()+1,l=s.getDate(),d=`${r}-${B(n)}-${B(l)}`;return e==="yyyy-mm-dd"?d:e==="hh:mm"?a:`${d} ${a}`}const q=(t,e,s=!1)=>t.getManyAsync("matchingClient","router").then(i=>{const{formData:a}=new ve(e.body.form).export(s),{router:r,matchingClient:n}=i,{params:l}=r.getRouteData();return n.customRequest(`contactmethods/${e.id}${s?"/validatedwithpayload":""}`,"POST",{body:a,configuration:{guideId:e.body.guideId||l.guideId}})}),G=(t,e)=>q(t,e,!0).then(s=>({valid:s.Validation.IsValid,errors:s.Validation.Errors,errorTypes:s.Validation.ErrorTypes})),J=(t,e)=>q(t,e,!0).then(s=>o.FormBuilder.fromLegacyForm(e.id,s.ContactMethod.Form).get()),U=(t,e)=>t.getAsync("matchingClient").then(s=>{s.completeContactMethod(e.id)}),we=async(t,e)=>{const s=t.get(e.clientName);let{description:i,disabled:a,onClick:r}=e;if(s){const{handleClick:n,handleDescription:l,handleDisabled:d}=s;typeof n=="function"&&(r=await Promise.resolve(n(e))),typeof l=="function"&&(i=await Promise.resolve(l(e))),typeof d=="function"&&(a=await Promise.resolve(d(e)))}return Promise.resolve({...e,description:i,disabled:a,onClick:r})};class T{constructor(e,s){L(this,"adapters",new Map);L(this,"subs",[]);if(this.container=e,this.componentPlatform=s,s){s.components().ofType("contact-list").select().actions.watch("contact-list.fetched",async(n,l)=>{const{contactMethods:d}=n;if(d){const f=Promise.all(d.map(m=>this.handleAdapters(m)));await Promise.resolve(f).then(m=>{n.contactMethods=m})}return l(n)});const a=s.components().ofType("guide").select();a.actions.watch("guide.fetched",async(n,l)=>{const{contactMethods:d}=n;if(d){const f=Promise.all(d.map(m=>this.handleAdapters(m)));await Promise.resolve(f).then(m=>{n.contactMethods=m})}return l(n)}),a.actions.watch("guide.handover",async(n,l)=>{const{handoverContactMethods:d}=n;if(d){const f=Promise.all(d.map(m=>this.handleAdapters(m)));await Promise.resolve(f).then(m=>{n.handoverContactMethods=m})}return l(n)}),s.components().ofType("contact-method").select().actions.watch("contact-method.fetched",async(n,l)=>{const{contactMethod:d}=n;return d?this.handleAdapters(d).then(f=>l({...n,contactMethod:f})):l(n)})}}static create(e){return o.ComponentPlatform.getInstance(e).then(s=>new T(e,s))}handleAdapters(e){return we(this.adapters,e)}static getInstance(e,s="contactMethods"){return o.lock(e)(()=>e.getAsync(s).then(i=>{let a=i;return a||o.ComponentPlatform.getInstance(e).then(r=>(a=new T(e,r),e.registerAsync(s,()=>a),a))}))}track(e={},s){const{events:i}=this.container.get("$widget");i.dispatch("tracking:service-client-response",{type:s,data:e})}complete(e){const{id:s,title:i,clientName:a,expanded:r,body:n}=e;this.track({contactMethod:{id:s,title:i,expanded:r,type:a},hasGuide:!!n.guideId},"contact-method-complete");const l=this.adapters.get(a);if(l&&l.onComplete)return l.onComplete(e)}evaluate(e){const{clientName:s}=e,i=this.adapters.get(s);return i&&i.onEvaluate?Promise.resolve(i.onEvaluate(e)):Promise.resolve(e.body.form)}validate(e){const{id:s,title:i,clientName:a}=e,r=this.adapters.get(a);return r&&r.onValidate?Promise.resolve(r.onValidate(e)).then(n=>{this.track({contactMethod:{id:s,title:i,type:a},isValid:n.valid},"contact-method-validate");const{events:l}=this.container.get("$widget");return l.dispatch("form:validated",{isValid:n.valid}),n}):Promise.resolve({valid:!0})}submit(e){const{clientName:s}=e,i=this.adapters.get(s);return i&&i.onSubmit?Promise.resolve(i.onSubmit(e)).then(a=>(this.complete(e),a)):Promise.resolve("")}create(e){const{clientName:s,render:i}=e;return this.adapters.set(s,{onValidate:a=>G(this.container,a),onEvaluate:a=>J(this.container,a),onComplete:a=>U(this.container,a),...e}),this.container.getAsync("componentResolver").then(a=>{typeof i=="string"?this.subs.push(a.registerAlias(s,i)):this.subs.push(a.registerComponent(s,g.lazy(()=>i)))})}dispose(){this.subs.forEach(e=>e())}}const xe=T,Se=({title:t="",className:e,id:s,parent:i,connection:a,type:r,target:n,href:l,children:d,connectionKey:f})=>{const m={},{name:h,params:p}=o.useRouteData();switch(r){case"default":case"guide":const{id:w,title:$}=i;let b=f||a;w!==s&&!f&&(b=void 0),m.routeName=h,m.params=N.createParams({...p,guide:s,connection:b,uriName:D(s===w?$:t)});break;case"link":m.href=l,m.target=n;break}return c.jsx(o.Link,{className:o.appendClassNames(e,"humany-dialog-link"),...m,children:d||c.jsxs(c.Fragment,{children:[r==="link"&&c.jsx(o.Icon,{faIcon:"link"}),c.jsx("span",{children:t})]})})};g.forwardRef(({className:t,dialog:e,...s},i)=>e.length?c.jsx(ke,{className:o.appendClassNames(t,"humany-dialog"),items:e,renderItem:a=>c.jsx("li",{"data-dialog":a.connection,children:c.jsx(Se,{...a})},a.connection),...s,ref:i}):null);const ke=o.newStyled(o.List)`
2
+ ${o.list}
3
+ a {
4
+ min-width: 150px;
5
+ max-width: 400px;
6
+ display: block;
7
+ white-space: normal;
8
+ ${t=>{var e,s;return((e=t.theme.colors)==null?void 0:e.primary)&&o.invertedHoverButton({primaryColor:(s=t.theme.colors)==null?void 0:s.primary,secondaryColor:"#FFFFFF",theme:t.theme})}}
9
+ }
10
+
11
+ i {
12
+ margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
13
+ }
14
+ `;o.newStyled(o.ItemList)`
15
+ ${o.itemList}
16
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
17
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
18
+ > ul > li {
19
+ overflow: visible;
20
+ font-weight: 300;
21
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
22
+ }
23
+ `;o.newStyled.div`
24
+ background: #fff;
25
+ border: #ccc 1px solid;
26
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
27
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
28
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
29
+ `;o.newStyled.div`
30
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
31
+ padding-bottom: 0;
32
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
33
+ font-weight: normal;
34
+ white-space: nowrap;
35
+ display: flex;
36
+ align-items: center;
37
+
38
+ h1,
39
+ h2,
40
+ h3,
41
+ h4,
42
+ h5,
43
+ h6 {
44
+ margin: 0;
45
+ font-weight: normal;
46
+ padding-bottom: 0;
47
+ }
48
+
49
+ svg,
50
+ i {
51
+ margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
52
+ }
53
+ `;o.newStyled(o.List)`
54
+ list-style: none;
55
+ padding: 0;
56
+ margin: 0;
57
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0;
58
+
59
+ li {
60
+ background: #fff;
61
+
62
+ a {
63
+ display: block;
64
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
65
+ padding: ${t=>{var e,s;return`${(e=t.theme.sizes)==null?void 0:e.small} ${(s=t.theme.sizes)==null?void 0:s.normal}`}};
66
+ cursor: pointer;
67
+ color: #555;
68
+ text-decoration: none;
69
+
70
+ &:hover {
71
+ background: #f9f9f9;
72
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
73
+ }
74
+ }
75
+ }
76
+ `;o.newStyled(o.ItemList)`
77
+ ${o.itemList}
78
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
79
+ > div {
80
+ ${t=>{var e;return o.headingElement(t)("> h1",o.css`
81
+ font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
82
+ line-height: 1.2em;
83
+ `)}}
84
+ }
85
+ > ul > li {
86
+ overflow: visible;
87
+ font-weight: 300;
88
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
89
+
90
+ a {
91
+ display: inline-block;
92
+
93
+ @media (hover: hover) {
94
+ &:hover {
95
+ text-decoration: underline;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ `;const ze=t=>o.css`
101
+ ${t["data-loading"]&&"position: relative;"};
102
+ ${t["data-loading"]&&"min-height: 150px;"}
103
+ > * {
104
+ transition: 200ms ease-out opacity;
105
+ opacity: ${t["data-loading"]?"0.5":"1"};
106
+ }
107
+ .humany-loader {
108
+ opacity: ${t["data-loading"]?"1":"0"};
109
+ }
110
+ `;o.newStyled(o.Icon)`
111
+ && {
112
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
113
+ }
114
+ width: 1.2em;
115
+ `;o.newStyled(o.Text)`
116
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
117
+ font-weight: normal;
118
+ line-height: 1.2em;
119
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
120
+ `;const je=o.newStyled(o.Button)`
121
+ display: flex;
122
+ align-items: center;
123
+
124
+ ${t=>{var e;return t["data-has-label"]==="true"&&t["data-has-symbol"]==="true"&&`
125
+ svg, i {
126
+ margin: 0 ${(e=t.theme.sizes)==null?void 0:e.small} 0 0;
127
+ }
128
+ `}}
129
+
130
+ &:focus-visible {
131
+ ${t=>t["data-has-label"]==="true"&&o.paddedBorderTabStyle}
132
+
133
+ svg, i {
134
+ ${t=>t["data-has-label"]==="false"&&t["data-has-symbol"]==="true"&&o.css`
135
+ ${o.paddedBorderTabStyle(t)}
136
+ box-sizing: content-box;
137
+ `}
138
+ }
139
+ }
140
+
141
+ span {
142
+ flex: 1;
143
+ font-weight: 300;
144
+ }
145
+ `,Ce=({addFavoriteTooltip:t,removeFavoriteCancelLabel:e,removeFavoriteConfirmLabel:s,removeFavoriteHeader:i,removeFavoriteLabel:a,removeFavoriteTooltip:r,id:n,isFavorite:l,guideTitle:d,buttonLabel:f="",actions:{addFavorite:m,removeFavorite:h}})=>{const p=g.useCallback(()=>{h(n)},[n,h]),w=g.useCallback(()=>{m(n)},[n,m]),$=`${l?r:t}${d?`: "${d}"`:""}`;return l?c.jsx(o.Confirm,{trigger:c.jsxs(R,{className:"humany-favorite-button",title:$,"aria-label":$,"data-favorite":"true","data-has-label":f?"true":"false","data-has-symbol":"true",children:[c.jsx(o.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),f&&c.jsx(o.StyledText,{children:f})]}),onConfirm:p,cancelLabel:e,confirmLabel:s,header:i,text:a}):c.jsxs(R,{className:"humany-favorite-button",title:$,"aria-label":$,onClick:w,"data-favorite":"false","data-has-label":f?"true":"false","data-has-symbol":"true",children:[c.jsx(o.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),f&&c.jsx(o.StyledText,{children:f})]})},R=o.newStyled(je)`
146
+ grid-area: favorite;
147
+
148
+ &:focus-visible {
149
+ svg {
150
+ ${t=>{var e,s;return t["data-favorite"]==="true"?`
151
+ fill: transparent;
152
+
153
+ path {
154
+ fill: transparent;
155
+ }
156
+ `:`
157
+ fill: ${(e=t.theme.colors)==null?void 0:e.text};
158
+
159
+ path {
160
+ fill: ${(s=t.theme.colors)==null?void 0:s.text};
161
+ }
162
+ `}}
163
+ }
164
+ }
165
+
166
+ ${t=>{var e,s,i,a,r,n,l;return((e=t.theme.colors)==null?void 0:e.text)&&o.css`
167
+ svg {
168
+ stroke: ${(s=t.theme.colors)==null?void 0:s.text};
169
+
170
+ path {
171
+ stroke: ${(i=t.theme.colors)==null?void 0:i.text};
172
+ }
173
+
174
+ ${t["data-favorite"]==="true"&&`
175
+ fill: ${(a=t.theme.colors)==null?void 0:a.text};
176
+
177
+ path {
178
+ fill: ${(r=t.theme.colors)==null?void 0:r.text};
179
+ }
180
+ `};
181
+ }
182
+
183
+ &:hover {
184
+ svg {
185
+ ${t["data-favorite"]==="true"?`
186
+ fill: transparent;
187
+
188
+ path {
189
+ fill: transparent;
190
+ }
191
+ `:`
192
+ fill: ${(n=t.theme.colors)==null?void 0:n.text};
193
+
194
+ path {
195
+ fill: ${(l=t.theme.colors)==null?void 0:l.text};
196
+ }
197
+ `};
198
+ }
199
+ }
200
+ `}}
201
+ `;g.forwardRef(({onFeedback:t=()=>{},direction:e="horizontal",className:s,header:i,positive:a,negative:r,selected:n,...l},d)=>c.jsxs(Te,{className:o.appendClassNames(s,"humany-feedback"),"data-direction":e,...o.convertToStringAttributes(l),ref:d,children:[!!i&&c.jsx(Ne,{children:i}),c.jsxs(Y,{className:"humany-feedback-button",disabled:!!n,"data-selected":n==="positive","data-direction":e,onClick:()=>t("positive"),children:[c.jsx(o.Icon,{faIcon:"smile-o"}),c.jsx("span",{children:a})]}),c.jsxs(Y,{className:"humany-feedback-button",disabled:!!n,"data-selected":n==="negative","data-direction":e,onClick:()=>t("negative"),children:[c.jsx(o.Icon,{faIcon:"frown-o"}),c.jsx("span",{children:r})]})]}));const Ne=o.newStyled(o.StyledText)`
202
+ font-weight: normal;
203
+ margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
204
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
205
+ display: block;
206
+ `,Y=o.newStyled(o.Button)`
207
+ display: inline-block;
208
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
209
+ font-weight: 300;
210
+ && {
211
+ margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
212
+ }
213
+
214
+ ${t=>{var e,s;return t["data-direction"]==="horizontal"&&o.css`
215
+ width: 225px;
216
+ max-width: calc(50% - ${(e=t.theme.sizes)==null?void 0:e.large} - ${(s=t.theme.sizes)==null?void 0:s.small});
217
+ `}}
218
+
219
+ ${t=>t["data-direction"]==="vertical"&&o.css`
220
+ min-width: 190px;
221
+ `}
222
+
223
+ ${t=>{var e,s;return((e=t.theme.colors)==null?void 0:e.primary)&&o.invertedHoverButton({active:t["data-selected"],primaryColor:(s=t.theme.colors)==null?void 0:s.primary,secondaryColor:"#FFFFFF",theme:t.theme})}}
224
+
225
+ i {
226
+ margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
227
+ }
228
+ `,Te=o.newStyled.div`
229
+ ${t=>{var e;return t["data-direction"]==="vertical"&&o.css`
230
+ > button {
231
+ width: 100%;
232
+ &:not(:last-child) {
233
+ margin-bottom: ${(e=t.theme.sizes)==null?void 0:e.normal};
234
+ }
235
+ }
236
+ `}}
237
+ `,Pe=()=>{const t=o.useContainer(),[e,s]=g.useState([]),i=t.get("favorites");g.useEffect(()=>{if(i){s(i.get());const{events:d}=t.get("$widget");return d.subscribe("widget:favorites-updated",(m,{updated:h})=>{s([...h])})}},[]);const a=d=>i?i.add(d):Promise.resolve([]),r=d=>i?i.remove(d):Promise.resolve([]),n=()=>i?i.clear():Promise.resolve([]),l=g.useCallback(d=>e.indexOf(d)>-1?r(d):a(d),[e]);return[e,g.useMemo(()=>({addFavorite:a,removeFavorite:r,clearFavorites:n,toggleFavorite:l}),[e])]},Ie=({format:t=V.YYYY_MM_DD_HH_MM,className:e="",byLabel:s="",modifiedLabel:i="",publishedLabel:a="",modifiedBy:r="",publishedBy:n="",showModified:l=!1,showPublished:d=!1,modified:f,published:m})=>{const h=d&&m?c.jsx(O,{format:t,timestamp:m}):null,p=l&&f?c.jsx(O,{format:t,timestamp:f}):null;return!h&&!p?null:c.jsxs(A,{className:o.appendClassNames(e,"humany-metadata"),children:[h&&c.jsxs(A,{className:"humany-published",children:[a,h,s&&n&&` ${s.replace("{{editor}}",n)}`]}),p&&c.jsxs(A,{className:"humany-modified",children:[h&&", ",i,p,s&&r&&` ${s.replace("{{editor}}",r)}`]})]})},O=o.newStyled(_)`
238
+ &:not(:first-child) {
239
+ margin-left: 4px;
240
+ }
241
+ &:not(:last-child) {
242
+ margin-right: 4px;
243
+ }
244
+ `,A=o.newStyled(o.Text)`
245
+ font-style: italic;
246
+ `,Ee=({tags:t})=>t.filter(e=>e.symbol).length?c.jsx(Me,{className:"humany-guide-list-tags",items:t,renderItem:({id:e,symbol:s,title:i})=>s&&c.jsx("li",{"data-tag":e,children:c.jsx(Fe,{size:18,symbol:s,title:i})},e)}):null;g.forwardRef(({title:t,id:e,route:s,symbolSize:i,collapseUri:a,children:r},n)=>{const{params:l}=o.useRouteData();return c.jsxs(Le,{ref:n,"data-guide":e,children:[c.jsx(o.TextLink,{title:t,"aria-label":t,routeName:s,params:N.createParams({...l,uriName:a||void 0,id:void 0,guide:void 0,accordion:void 0}),text:t,children:c.jsx(o.SymbolBadge,{size:i,symbol:{type:"Svg",content:"caret-up"}})}),r]})});const Le=o.newStyled.li`
247
+ > a {
248
+ grid-column: 1/-1;
249
+ font-weight: bold;
250
+ margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0;
251
+ }
252
+
253
+ > div {
254
+ grid-column: 1/-1;
255
+ }
256
+ `;g.forwardRef(({expandable:t=!1,routing:e={},paramMappers:s={},symbolSize:i=11,pageRole:a="link",pageCaret:r="down",showTags:n=!1,showFavoriteToggle:l=!1,localPaging:d=!1,onItemClick:f=()=>{},dispatch:m=()=>{},metadata:h={},pageLabel:p,className:w,children:$,items:b,renderItem:P,addFavoriteTooltip:W,removeFavoriteCancelLabel:Q,removeFavoriteConfirmLabel:X,removeFavoriteHeader:ee,removeFavoriteLabel:te,removeFavoriteTooltip:oe,...se},ie)=>{const M=$e(),S=g.useRef(),k=o.usePrevious(b),{guide:ae="guide",page:re="index"}=e,{guide:ne=({id:u})=>N.createParams({guide:u}),page:F=()=>N.createParams()}=s,[le,de]=Pe();g.useImperativeHandle(ie,()=>S.current);const I=u=>{const{id:v,title:y,tags:x,published:j,modified:z,publishedBy:C,modifiedBy:E}=u;return c.jsxs("li",{"data-guide":v,"has-metadata":(!!(h!=null&&h.showPublished)&&!!j||!!(h!=null&&h.showModified)&&!!z).toString(),children:[c.jsx(o.TextLink,{className:"humany-guide-link",title:y,"aria-label":y,routeName:ae,onClick:he=>f(he,u),params:ne(u),text:y,children:c.jsx(o.SymbolBadge,{size:i,symbol:{type:"Svg",content:t?"caret-down":"caret-right"}})}),l&&c.jsx(Ce,{guideTitle:y,addFavoriteTooltip:W,removeFavoriteCancelLabel:Q,removeFavoriteConfirmLabel:X,removeFavoriteHeader:ee,removeFavoriteLabel:te,removeFavoriteTooltip:oe,isFavorite:le.indexOf(v)>-1,actions:de,id:v}),n&&c.jsx(Ee,{tags:x}),c.jsx(De,{...h,indent:t?void 0:i,modified:z,published:j,publishedBy:C,modifiedBy:E})]},v)},ce=g.useCallback((u,v,y)=>P?P(u,v,y,I):I(u),[P,I]),me=g.useCallback(u=>{d&&(u.preventDefault(),m("page",F()))},[m,d]);g.useEffect(()=>{if(k&&k.length<b.length&&S.current){const u=S.current.querySelectorAll(".humany-guide-list > ul > li"),v=u[k.length];if(u.length===b.length&&k.length){const y=u[k.length];if(y){const x=y.querySelector(".humany-guide-link");x&&x.focus()}}else v&&new MutationObserver((x,j)=>{x.forEach(z=>{if(z.addedNodes){const C=Array.from(z.addedNodes).find(E=>E.tagName==="A");C&&ye(S.current,document.activeElement)&&(M&&C.focus(),j.disconnect())}})}).observe(v,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})}});const fe=!!Object.keys(h).filter(u=>typeof h[u]<"u").length;return c.jsxs(Ae,{className:o.appendClassNames(w,"humany-guide-list"),"data-item-count":b.length,items:b,renderItem:ce,isTabbing:M,expandable:t?"true":"false","grid-items":n||l||fe?"true":"false",...o.convertToStringAttributes(se),ref:S,children:[p?c.jsx(o.TextLink,{text:p,title:p,"aria-label":p,routeName:re,role:a,params:F(),onClick:me,children:c.jsx(o.SymbolBadge,{size:i,symbol:{type:"Svg",content:`caret-${r}`}})}):null,$]})});const Ae=o.newStyled(o.ItemList)`
257
+ ${o.itemList}
258
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
259
+ overflow: auto;
260
+ justify-content: flex-start;
261
+ white-space: nowrap;
262
+ font-weight: 300;
263
+ text-decoration: none;
264
+
265
+ > div {
266
+ ${t=>o.headingElement(t)("> h1",o.css`
267
+ white-space: pre-wrap;
268
+ `)}
269
+ }
270
+
271
+ > ul > li {
272
+ ${t=>{var e,s;return t["grid-items"]==="true"&&o.css`
273
+ display: grid;
274
+ grid-template-columns: auto 1fr 1fr;
275
+ gap: 0px 0px;
276
+ grid-template-areas: '. favorite tags';
277
+ align-items: center;
278
+
279
+ > button {
280
+ margin: 0 0 0 ${(e=t.theme.sizes)==null?void 0:e.small};
281
+
282
+ &[data-favorite='false'] {
283
+ ${t.isTabbing?"opacity: 0;":"display: none;"};
284
+ &:focus {
285
+ opacity: 1;
286
+ }
287
+ }
288
+ }
289
+
290
+ > span {
291
+ font-size: ${(s=t.theme.fonts)==null?void 0:s.small};
292
+ }
293
+
294
+ &:hover {
295
+ button[data-favorite='false'] {
296
+ display: flex;
297
+ justify-self: flex-start;
298
+ }
299
+ }
300
+
301
+ &[has-metadata='true'] {
302
+ grid-template-rows: 1fr 1fr;
303
+ grid-template-areas:
304
+ '. favorite tags'
305
+ 'metadata metadata metadata';
306
+ }
307
+ `}}
308
+ > a {
309
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
310
+ overflow: hidden;
311
+ text-overflow: ellipsis;
312
+ max-width: 100%;
313
+ display: inline-block;
314
+
315
+ svg {
316
+ margin: 0 calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}}*2) 0 0;
317
+ line {
318
+ stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
319
+ }
320
+ }
321
+
322
+ ${t=>{var e;return t.expandable==="true"&&o.css`
323
+ display: flex;
324
+ flex-direction: row-reverse;
325
+ justify-content: flex-end;
326
+ align-items: center;
327
+
328
+ span {
329
+ overflow: hidden;
330
+ text-overflow: ellipsis;
331
+ }
332
+
333
+ svg {
334
+ margin: 0 0 0 ${(e=t.theme.sizes)==null?void 0:e.small};
335
+ }
336
+ `}}
337
+
338
+ &:focus-visible {
339
+ ${o.borderTabStyle}
340
+ text-decoration: underline;
341
+ }
342
+
343
+ @media (hover: hover) {
344
+ &:hover {
345
+ text-decoration: underline;
346
+ }
347
+ }
348
+ }
349
+ }
350
+
351
+ > a {
352
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
353
+ margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0;
354
+ align-self: flex-start;
355
+ align-items: center;
356
+ display: flex;
357
+
358
+ span {
359
+ text-decoration: underline;
360
+ }
361
+
362
+ svg {
363
+ margin: 0 calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}}*2) 0 0;
364
+ line {
365
+ stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
366
+ }
367
+ }
368
+
369
+ &:focus-visible {
370
+ ${o.borderTabStyle}
371
+ text-decoration: underline;
372
+ }
373
+ }
374
+ `,Me=o.newStyled(o.List)`
375
+ ${o.list}
376
+ display: flex;
377
+ margin: 0 0 0 auto;
378
+ grid-area: tags;
379
+
380
+ li,
381
+ li:last-child {
382
+ margin: 0 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
383
+ display: flex;
384
+ align-items: center;
385
+ justify-content: space-between;
386
+ }
387
+ `,Fe=o.newStyled(o.SymbolBadge)`
388
+ display: block;
389
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
390
+ ${t=>{if(t.symbol.type==="Uri")return`
391
+ width: ${t.size}px;
392
+ height: ${t.size}px;
393
+ `;if(t.symbol.type==="FontAwesome")return`
394
+ font-size: ${t.size}px;
395
+ `}}
396
+ `,De=o.newStyled(Ie)`
397
+ grid-area: metadata;
398
+ text-overflow: ellipsis;
399
+ overflow: hidden;
400
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
401
+ ${t=>{var e;return typeof t.indent=="number"&&`text-indent: calc(${(e=t.theme.sizes)==null?void 0:e.small} * 2 + ${t.indent}px);`}}
402
+ `,Be=o.keyframes`
403
+ 100% {
404
+ transform: rotate(360deg);
405
+ }
406
+ `,Re=o.keyframes`
407
+ 0% {
408
+ stroke-dasharray: 1, 200;
409
+ stroke-dashoffset: 0;
410
+ }
411
+ 50% {
412
+ stroke-dasharray: 89, 200;
413
+ stroke-dashoffset: -35px;
414
+ }
415
+ 100% {
416
+ stroke-dasharray: 89, 200;
417
+ stroke-dashoffset: -124px;
418
+ }
419
+ `;o.newStyled.svg`
420
+ animation: ${Be} 2s linear infinite;
421
+ height: 100%;
422
+ transform-origin: center center;
423
+ width: 100%;
424
+ position: absolute;
425
+ top: 0;
426
+ bottom: 0;
427
+ left: 0;
428
+ right: 0;
429
+ margin: auto;
430
+ transition: 200ms ease-out opacity;
431
+ `;o.newStyled.div`
432
+ position: absolute;
433
+ top: 0;
434
+ bottom: 0;
435
+ left: 0;
436
+ right: 0;
437
+ height: 100%;
438
+ width: 100%;
439
+ pointer-events: ${t=>t["data-loading"]?"all":"none"};
440
+ display: flex;
441
+ flex-direction: column;
442
+ justify-content: center;
443
+ transition: 200ms ease-out opacity;
444
+ box-sizing: border-box;
445
+ overflow: hidden;
446
+
447
+ .humany-spinner-svg {
448
+ opacity: ${t=>t["data-loading"]?"1":"0"};
449
+ }
450
+ `;o.newStyled.div`
451
+ position: relative;
452
+ margin: 0 auto;
453
+ width: 100px;
454
+ &:before {
455
+ content: '';
456
+ display: block;
457
+ padding-top: 100%;
458
+ }
459
+ `;o.newStyled.circle`
460
+ stroke-dasharray: 1, 200;
461
+ stroke-dashoffset: 0;
462
+ animation: ${Re} 1.5s ease-in-out infinite;
463
+ stroke-linecap: round;
464
+ stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
465
+ stroke-width: 2px;
466
+ `;o.newStyled(o.Button)`
467
+ display: flex;
468
+ justify-content: space-between;
469
+ align-items: center;
470
+ width: 100%;
471
+ text-align: left;
472
+ svg,
473
+ i {
474
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
475
+ }
476
+ span {
477
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
478
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
479
+ overflow: hidden;
480
+ text-overflow: ellipsis;
481
+ flex: 1;
482
+ white-space: nowrap;
483
+ }
484
+ &:focus-visible {
485
+ ${o.borderTabStyle}
486
+ span {
487
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
488
+ text-decoration: underline;
489
+ }
490
+ }
491
+ `;o.newStyled(o.ItemList)`
492
+ ${ze}
493
+ ${o.itemList}
494
+ overflow: hidden;
495
+ justify-content: flex-start;
496
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
497
+ ${t=>!t["data-show-header"]&&o.css`
498
+ > div {
499
+ ${o.headingElement(t)("h1",o.css`
500
+ display: none;
501
+ `)}
502
+ }
503
+ `}
504
+
505
+ @media (hover: hover) {
506
+ button:hover {
507
+ text-decoration: underline;
508
+ }
509
+ }
510
+ `;o.newStyled(o.Paragraph)`
511
+ ${o.genericHtml}
512
+ font-weight: 300;
513
+
514
+ p {
515
+ white-space: normal;
516
+ }
517
+ `;o.newStyled.li`
518
+ .humany-paragraph {
519
+ display: none;
520
+ &:not(:only-child) {
521
+ ${t=>{var e,s,i;return((e=t.theme.sizes)==null?void 0:e.cardinal)&&((s=t.theme.sizes)==null?void 0:s.normal)&&o.css`
522
+ margin: ${(i=t.theme.sizes)==null?void 0:i.normal} 0;
523
+ `}}
524
+ }
525
+ }
526
+
527
+ ${t=>t["data-expanded"]&&o.css`
528
+ .humany-paragraph {
529
+ display: block;
530
+ }
531
+ `}
532
+
533
+ > span {
534
+ display: block;
535
+ font-weight: 300;
536
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.accent}};
537
+ }
538
+ `;o.newStyled(o.SymbolBadge)`
539
+ margin: 0 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
540
+ line {
541
+ stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
542
+ }
543
+ `;o.newStyled(_)`
544
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
545
+ font-weight: 300;
546
+ `;o.newStyled(o.Paragraph)`
547
+ ${t=>{var e;return o.headingElement(t)("h1",o.css`
548
+ font-weight: normal;
549
+ font-size: ${(e=t.theme.fonts)==null?void 0:e.medium};
550
+ `)}}
551
+ `;o.newStyled(o.Html)`
552
+ ${o.genericHtml}
553
+ font-weight: 300;
554
+ line-height: 1.5em;
555
+ button:focus-visible {
556
+ ${o.borderTabStyle};
557
+ }
558
+
559
+ a:focus-visible {
560
+ ${o.linkTabStyle};
561
+ }
562
+ `;const Z=t=>{var e,s,i,a,r,n,l,d;return o.css`
563
+ display: flex;
564
+ padding: ${(e=t.theme.sizes)==null?void 0:e.large};
565
+ ${t.description?"":"align-items: center;"}
566
+ text-decoration: none;
567
+ span {
568
+ display: inline-block;
569
+ color: ${(s=t.theme.colors)==null?void 0:s.text};
570
+ }
571
+ i {
572
+ font-size: ${(i=t.theme.fonts)==null?void 0:i.large};
573
+ margin: 0 ${(a=t.theme.sizes)==null?void 0:a.large} 0 0;
574
+ min-height: ${(r=t.theme.fonts)==null?void 0:r.large};
575
+ min-width: ${(n=t.theme.fonts)==null?void 0:n.large};
576
+ line-height: ${(l=t.theme.fonts)==null?void 0:l.large};
577
+ display: inline-block;
578
+ vertical-align: bottom;
579
+ color: ${(d=t.theme.colors)==null?void 0:d.text};
580
+ }
581
+ `};o.newStyled(o.StyledText)`
582
+ line-height: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.large}};
583
+ `;o.newStyled(o.Link)`
584
+ ${t=>Z(t)}
585
+
586
+ &:focus-visible {
587
+ ${o.borderTabStyle};
588
+ }
589
+ `;o.newStyled.div`
590
+ text-align: center;
591
+ display: block;
592
+ ${t=>{var e,s;return typeof((e=t.theme.colors)==null?void 0:e.warning)<"u"&&`color: ${(s=t.theme.colors)==null?void 0:s.warning};`}}
593
+ `;const K=t=>{var e,s,i;return o.css`
594
+ ${o.itemList(t)}
595
+
596
+ > div {
597
+ padding: ${(e=t.theme.sizes)==null?void 0:e.large};
598
+
599
+ ${o.headingElement(t)("h1",o.css`
600
+ margin: 0;
601
+ `)}
602
+ }
603
+
604
+ > ul {
605
+ &:not(:first-child) {
606
+ border-top: ${t.theme.border};
607
+ }
608
+
609
+ > li {
610
+ margin: 0;
611
+ white-space: normal;
612
+
613
+ > a {
614
+ overflow: hidden;
615
+ }
616
+
617
+ &:first-child > a {
618
+ border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
619
+ }
620
+
621
+ &:last-child:not(:first-child) > a {
622
+ border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
623
+ }
624
+
625
+ &:not(:last-child) {
626
+ border-bottom: ${t.theme.border};
627
+ }
628
+
629
+ > div {
630
+ padding: ${(s=t.theme.sizes)==null?void 0:s.large};
631
+ }
632
+ }
633
+ }
634
+
635
+ @media (hover: hover) {
636
+ a:hover {
637
+ background-color: ${(i=t.theme.colors)==null?void 0:i.accent};
638
+ }
639
+ }
640
+ `};o.newStyled(o.ItemList)`
641
+ ${t=>K(t)}
642
+ `;exports.ContactMethodPlatform=xe;exports.contactItemList=K;exports.contactLink=Z;exports.defaultComplete=U;exports.defaultEvaluate=J;exports.defaultValidate=G;
@@ -0,0 +1,13 @@
1
+ import { D as p, a as y, F as o, S as s, b as m, d as n, f as T } from "./index-f6d7c0ea.mjs";
2
+ import "react/jsx-runtime";
3
+ import "react";
4
+ import "react-dom";
5
+ export {
6
+ p as DataClient,
7
+ y as DataType,
8
+ o as FeedbackType,
9
+ s as ServiceClientQueryType,
10
+ m as SortingType,
11
+ n as determineServiceClientQueryType,
12
+ T as formatLegacyData
13
+ };