@telia-ace/knowledge-widget-types-grid 1.0.54 → 1.1.1-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.
- package/create-params-13c11e30.js +1 -0
- package/create-params-4e652cc7.mjs +24 -0
- package/index-373df3a5.js +6 -0
- package/index-37d41a7c.js +1 -0
- package/index-4000749f.mjs +18 -0
- package/index-4a7683d6.mjs +7686 -0
- package/index-53f86cb1.mjs +80 -0
- package/index-5c9c2abf.mjs +883 -0
- package/index-6573c0b0.js +1258 -0
- package/index-83935001.js +1 -0
- package/index-89e0c636.js +1 -0
- package/index-8ea3d174.mjs +81 -0
- package/index-a20f39e4.mjs +1709 -0
- package/index-a53df8cf.js +642 -0
- package/index-da27700c.js +9 -0
- package/index-f2febaed.mjs +792 -0
- package/index.js +1 -0
- package/index.mjs +23 -0
- package/package.json +14 -25
- package/render-6b17449a.js +1 -0
- package/render-e363a527.mjs +57 -0
- package/unmount-063d8ea3.mjs +5 -0
- package/unmount-7ebc3b77.js +1 -0
- package/{dist/widget → widget}/services.d.ts +1 -1
- package/LICENSE.txt +0 -6
- package/README.md +0 -4
- package/dist/index.js +0 -20
- package/dist/index.js.map +0 -1
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/widget → widget}/extended-widget.d.ts +0 -0
- /package/{dist/widget → widget}/index.d.ts +0 -0
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
"use strict";var pe=Object.defineProperty;var ye=(t,e,o)=>e in t?pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var M=(t,e,o)=>(ye(t,typeof e!="symbol"?e+"":e,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-6573c0b0.js"),m=require("react/jsx-runtime"),u=require("@emotion/react"),p=require("react");require("react-dom");require("react-transition-group");const d=require("@emotion/styled"),P=require("./create-params-13c11e30.js");require("react-router-dom");require("react-router");const R=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"}],o=/[^a-zA-Z0-9]+/g,s=/[-]$/;let i=t;for(const r in e)e.hasOwnProperty(r)&&e[r].from.test(t)&&(i=i.replace(e[r].from,e[r].to));return i=i.replace(o,"-"),i=i.replace(s,""),i=i.toLowerCase(),i||"humany"},ve=t=>{let e;t.split(",")[0].indexOf("base64")!==-1?e=atob(t.split(",")[1]):e=decodeURI(t.split(",")[1]);const o=t.split(",")[0].split(":")[1].split(";")[0],s=[];for(let i=0;i<e.length;i++)s[i]=e.charCodeAt(i);return new Blob([new Uint8Array(s)],{type:o})},$e=(t,e)=>{if(!t||!e)return!0;let o=e.parentNode,s=!1;for(;o!==null;)o===t&&(s=!0),o=o.parentNode;return s},q=(t,e={},o={},s=()=>{})=>{t.properties&&Object.keys(t.properties).forEach(i=>{const r={schema:t.properties[i],layout:e[i],data:o[i]},l={data:{options:(o["data:options"]||{})[i]}};s(new a.Component$1(i,r),l),typeof r.schema=="object"&&q(r.schema,r.layout,r.data,s)})};class be{constructor(e){this.form=e}findValue(e){}traverse(e){const{schema:o,layout:s,data:i}=this.form;q(o,s,i,e)}export(e=!1){const o=new FormData,s={},i={};return this.traverse((r,n)=>{switch(r.component){case"Name":case"Address":case"Fieldset":case"Submit":break;case"File":const{data:l}=n,{options:c}=l;if(c){const{fileName:h}=c;s[r.name]=h}if(e)i[r.name]={component:r,extra:n};else if(r.value){const h=n.data.options.fileName||r.name,f=ve(r.value);o.append(r.name,f,h)}break;default:s[r.name]=r.value;break}}),o.append("components",JSON.stringify(s)),{formData:o,values:s,excluded:i}}}const xe=()=>{const[t,e]=p.useState(!1);return p.useEffect(()=>{const o=()=>{e(!1)},s=i=>{i.keyCode===9&&e(!0)};return window.addEventListener("keydown",s),window.addEventListener("click",o),()=>{window.removeEventListener("keydown",s),window.removeEventListener("click",o)}},[]),t};var _=(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))(_||{});const G=({className:t="",format:e="hh:mm",timestamp:o})=>m.jsx("span",{className:a.appendClassNames(t,"humany-timestamp"),children:we(o,e)}),Y=t=>`0${t}`.slice(-2);function we(t,e){const o=new Date(t),s=o.toTimeString().split(" ")[0].split(":"),i=s.length>1?`${s[0]}:${s[1]}`:s[0],r=o.getFullYear(),n=o.getMonth()+1,l=o.getDate(),c=`${r}-${Y(n)}-${Y(l)}`;return e==="yyyy-mm-dd"?c:e==="hh:mm"?i:`${c} ${i}`}const J=(t,e,o=!1)=>t.getManyAsync("matchingClient","router").then(s=>{const{formData:i}=new be(e.body.form).export(o),{router:r,matchingClient:n}=s,{params:l}=r.getRouteData();return n.customRequest(`contactmethods/${e.id}${o?"/validatedwithpayload":""}`,"POST",{body:i,configuration:{guideId:e.body.guideId||l.guideId}})}),U=(t,e)=>J(t,e,!0).then(o=>({valid:o.Validation.IsValid,errors:o.Validation.Errors,errorTypes:o.Validation.ErrorTypes})),Z=(t,e)=>J(t,e,!0).then(o=>a.FormBuilder.fromLegacyForm(e.id,o.ContactMethod.Form).get()),K=(t,e)=>t.getAsync("matchingClient").then(o=>{o.completeContactMethod(e.id)}),ke=async(t,e)=>{const o=t.get(e.clientName);let{description:s,disabled:i,onClick:r}=e;if(o){const{handleClick:n,handleDescription:l,handleDisabled:c}=o;typeof n=="function"&&(r=await Promise.resolve(n(e))),typeof l=="function"&&(s=await Promise.resolve(l(e))),typeof c=="function"&&(i=await Promise.resolve(c(e)))}return Promise.resolve({...e,description:s,disabled:i,onClick:r})};class I{constructor(e,o){M(this,"adapters",new Map);M(this,"subs",[]);if(this.container=e,this.componentPlatform=o,o){o.components().ofType("contact-list").select().actions.watch("contact-list.fetched",async(n,l)=>{const{contactMethods:c}=n;if(c){const h=Promise.all(c.map(f=>this.handleAdapters(f)));await Promise.resolve(h).then(f=>{n.contactMethods=f})}return l(n)});const i=o.components().ofType("guide").select();i.actions.watch("guide.fetched",async(n,l)=>{const{contactMethods:c}=n;if(c){const h=Promise.all(c.map(f=>this.handleAdapters(f)));await Promise.resolve(h).then(f=>{n.contactMethods=f})}return l(n)}),i.actions.watch("guide.handover",async(n,l)=>{const{handoverContactMethods:c}=n;if(c){const h=Promise.all(c.map(f=>this.handleAdapters(f)));await Promise.resolve(h).then(f=>{n.handoverContactMethods=f})}return l(n)}),o.components().ofType("contact-method").select().actions.watch("contact-method.fetched",async(n,l)=>{const{contactMethod:c}=n;return c?this.handleAdapters(c).then(h=>l({...n,contactMethod:h})):l(n)})}}static create(e){return a.ComponentPlatform.getInstance(e).then(o=>new I(e,o))}handleAdapters(e){return ke(this.adapters,e)}static getInstance(e,o="contactMethods"){return a.lock(e)(()=>e.getAsync(o).then(s=>{let i=s;return i||a.ComponentPlatform.getInstance(e).then(r=>(i=new I(e,r),e.registerAsync(o,()=>i),i))}))}track(e={},o){const{events:s}=this.container.get("$widget");s.dispatch("tracking:service-client-response",{type:o,data:e})}complete(e){const{id:o,title:s,clientName:i,expanded:r,body:n}=e;this.track({contactMethod:{id:o,title:s,expanded:r,type:i},hasGuide:!!n.guideId},"contact-method-complete");const l=this.adapters.get(i);if(l&&l.onComplete)return l.onComplete(e)}evaluate(e){const{clientName:o}=e,s=this.adapters.get(o);return s&&s.onEvaluate?Promise.resolve(s.onEvaluate(e)):Promise.resolve(e.body.form)}validate(e){const{id:o,title:s,clientName:i}=e,r=this.adapters.get(i);return r&&r.onValidate?Promise.resolve(r.onValidate(e)).then(n=>{this.track({contactMethod:{id:o,title:s,type:i},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:o}=e,s=this.adapters.get(o);return s&&s.onSubmit?Promise.resolve(s.onSubmit(e)).then(i=>(this.complete(e),i)):Promise.resolve("")}create(e){const{clientName:o,render:s}=e;return this.adapters.set(o,{onValidate:i=>U(this.container,i),onEvaluate:i=>Z(this.container,i),onComplete:i=>K(this.container,i),...e}),this.container.getAsync("componentResolver").then(i=>{typeof s=="string"?this.subs.push(i.registerAlias(o,s)):this.subs.push(i.registerComponent(o,p.lazy(()=>s)))})}dispose(){this.subs.forEach(e=>e())}}const ze=I,je=({title:t="",className:e,id:o,parent:s,connection:i,type:r,target:n,href:l,children:c,connectionKey:h})=>{const f={},{name:g,params:v}=a.useRouteData();switch(r){case"default":case"guide":const{id:k,title:x}=s;let w=h||i;k!==o&&!h&&(w=void 0),f.routeName=g,f.params=P.createParams({...v,guide:o,connection:w,uriName:R(o===k?x:t)});break;case"link":f.href=l,f.target=n;break}return m.jsx(a.Link,{className:a.appendClassNames(e,"humany-dialog-link"),...f,children:c||m.jsxs(m.Fragment,{children:[r==="link"&&m.jsx(a.Icon,{faIcon:"link"}),m.jsx("span",{children:t})]})})};p.forwardRef(({className:t,dialog:e,...o},s)=>e.length?m.jsx(Ce,{className:a.appendClassNames(t,"humany-dialog"),items:e,renderItem:i=>m.jsx("li",{"data-dialog":i.connection,children:m.jsx(je,{...i})},i.connection),...o,ref:s}):null);const Ce=d(a.List)`
|
|
2
|
+
${a.list}
|
|
3
|
+
a {
|
|
4
|
+
min-width: 150px;
|
|
5
|
+
max-width: 400px;
|
|
6
|
+
display: block;
|
|
7
|
+
white-space: normal;
|
|
8
|
+
${t=>{var e,o;return((e=t.theme.colors)==null?void 0:e.primary)&&a.invertedHoverButton({primaryColor:(o=t.theme.colors)==null?void 0:o.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
|
+
`;d(a.ItemList)`
|
|
15
|
+
${a.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
|
+
`;d.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
|
+
`;d.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
|
+
`;d(a.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,o;return`${(e=t.theme.sizes)==null?void 0:e.small} ${(o=t.theme.sizes)==null?void 0:o.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
|
+
`;d(a.ItemList)`
|
|
77
|
+
${a.itemList}
|
|
78
|
+
font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
|
|
79
|
+
> div {
|
|
80
|
+
${t=>{var e;return a.headingElement(t)("> h1",u.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 Se=t=>u.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
|
+
`;d(a.Icon)`
|
|
111
|
+
&& {
|
|
112
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
113
|
+
}
|
|
114
|
+
width: 1.2em;
|
|
115
|
+
`;d(a.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 Ne=d(a.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"&&a.paddedBorderTabStyle}
|
|
132
|
+
|
|
133
|
+
svg, i {
|
|
134
|
+
${t=>t["data-has-label"]==="false"&&t["data-has-symbol"]==="true"&&u.css`
|
|
135
|
+
${a.paddedBorderTabStyle(t)}
|
|
136
|
+
box-sizing: content-box;
|
|
137
|
+
`}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
span {
|
|
142
|
+
flex: 1;
|
|
143
|
+
font-weight: 300;
|
|
144
|
+
}
|
|
145
|
+
`,Te=({addFavoriteTooltip:t,removeFavoriteCancelLabel:e,removeFavoriteConfirmLabel:o,removeFavoriteHeader:s,removeFavoriteLabel:i,removeFavoriteTooltip:r,id:n,isFavorite:l,guideTitle:c,buttonLabel:h="",actions:{addFavorite:f,removeFavorite:g}})=>{const v=p.useCallback(()=>{g(n)},[n,g]),k=p.useCallback(()=>{f(n)},[n,f]),x=`${l?r:t}${c?`: "${c}"`:""}`;return l?m.jsx(a.Confirm,{trigger:m.jsxs(O,{className:"humany-favorite-button",title:x,"aria-label":x,"data-favorite":"true","data-has-label":h?"true":"false","data-has-symbol":"true",children:[m.jsx(a.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),h&&m.jsx(a.StyledText,{children:h})]}),onConfirm:v,cancelLabel:e,confirmLabel:o,header:s,text:i}):m.jsxs(O,{className:"humany-favorite-button",title:x,"aria-label":x,onClick:k,"data-favorite":"false","data-has-label":h?"true":"false","data-has-symbol":"true",children:[m.jsx(a.SymbolBadge,{size:16,symbol:{type:"Svg",content:"star-empty"}}),h&&m.jsx(a.StyledText,{children:h})]})},O=d(Ne)`
|
|
146
|
+
grid-area: favorite;
|
|
147
|
+
|
|
148
|
+
&:focus-visible {
|
|
149
|
+
svg {
|
|
150
|
+
${t=>{var e,o;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: ${(o=t.theme.colors)==null?void 0:o.text};
|
|
161
|
+
}
|
|
162
|
+
`}}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
${t=>{var e,o,s,i,r,n,l;return((e=t.theme.colors)==null?void 0:e.text)&&u.css`
|
|
167
|
+
svg {
|
|
168
|
+
stroke: ${(o=t.theme.colors)==null?void 0:o.text};
|
|
169
|
+
|
|
170
|
+
path {
|
|
171
|
+
stroke: ${(s=t.theme.colors)==null?void 0:s.text};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
${t["data-favorite"]==="true"&&`
|
|
175
|
+
fill: ${(i=t.theme.colors)==null?void 0:i.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
|
+
`;p.forwardRef(({onFeedback:t=()=>{},direction:e="horizontal",className:o,header:s,positive:i,negative:r,selected:n,...l},c)=>m.jsxs(Ie,{className:a.appendClassNames(o,"humany-feedback"),"data-direction":e,...a.convertToStringAttributes(l),ref:c,children:[!!s&&m.jsx(Pe,{children:s}),m.jsxs(H,{className:"humany-feedback-button",disabled:!!n,"data-selected":n==="positive","data-direction":e,onClick:()=>t("positive"),children:[m.jsx(a.Icon,{faIcon:"smile-o"}),m.jsx("span",{children:i})]}),m.jsxs(H,{className:"humany-feedback-button",disabled:!!n,"data-selected":n==="negative","data-direction":e,onClick:()=>t("negative"),children:[m.jsx(a.Icon,{faIcon:"frown-o"}),m.jsx("span",{children:r})]})]}));const Pe=d(a.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
|
+
`,H=d(a.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,o;return t["data-direction"]==="horizontal"&&u.css`
|
|
215
|
+
width: 225px;
|
|
216
|
+
max-width: calc(50% - ${(e=t.theme.sizes)==null?void 0:e.large} - ${(o=t.theme.sizes)==null?void 0:o.small});
|
|
217
|
+
`}}
|
|
218
|
+
|
|
219
|
+
${t=>t["data-direction"]==="vertical"&&u.css`
|
|
220
|
+
min-width: 190px;
|
|
221
|
+
`}
|
|
222
|
+
|
|
223
|
+
${t=>{var e,o;return((e=t.theme.colors)==null?void 0:e.primary)&&a.invertedHoverButton({active:t["data-selected"],primaryColor:(o=t.theme.colors)==null?void 0:o.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
|
+
`,Ie=d.div`
|
|
229
|
+
${t=>{var e;return t["data-direction"]==="vertical"&&u.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
|
+
`,Ee=()=>{const t=a.useContainer(),[e,o]=p.useState([]),s=t.get("favorites");p.useEffect(()=>{if(s){o(s.get());const{events:c}=t.get("$widget");return c.subscribe("widget:favorites-updated",(f,{updated:g})=>{o([...g])})}},[]);const i=c=>s?s.add(c):Promise.resolve([]),r=c=>s?s.remove(c):Promise.resolve([]),n=()=>s?s.clear():Promise.resolve([]),l=p.useCallback(c=>e.indexOf(c)>-1?r(c):i(c),[e]);return[e,p.useMemo(()=>({addFavorite:i,removeFavorite:r,clearFavorites:n,toggleFavorite:l}),[e])]},Le=({format:t=_.YYYY_MM_DD_HH_MM,className:e="",byLabel:o="",modifiedLabel:s="",publishedLabel:i="",modifiedBy:r="",publishedBy:n="",showModified:l=!1,showPublished:c=!1,modified:h,published:f})=>{const g=c&&f?m.jsx(V,{format:t,timestamp:f}):null,v=l&&h?m.jsx(V,{format:t,timestamp:h}):null;return!g&&!v?null:m.jsxs(F,{className:a.appendClassNames(e,"humany-metadata"),children:[g&&m.jsxs(F,{className:"humany-published",children:[i,g,o&&n&&` ${o.replace("{{editor}}",n)}`]}),v&&m.jsxs(F,{className:"humany-modified",children:[g&&", ",s,v,o&&r&&` ${o.replace("{{editor}}",r)}`]})]})},V=d(G)`
|
|
238
|
+
&:not(:first-child) {
|
|
239
|
+
margin-left: 4px;
|
|
240
|
+
}
|
|
241
|
+
&:not(:last-child) {
|
|
242
|
+
margin-right: 4px;
|
|
243
|
+
}
|
|
244
|
+
`,F=d(a.Text)`
|
|
245
|
+
font-style: italic;
|
|
246
|
+
`,Ae=({tags:t})=>t.filter(e=>e.symbol).length?m.jsx(De,{className:"humany-guide-list-tags",items:t,renderItem:({id:e,symbol:o,title:s})=>o&&m.jsx("li",{"data-tag":e,children:m.jsx(Be,{size:18,symbol:o,title:s})},e)}):null;p.forwardRef(({title:t,id:e,route:o,symbolSize:s,collapseUri:i,children:r},n)=>{const{params:l}=a.useRouteData();return m.jsxs(Me,{ref:n,"data-guide":e,children:[m.jsx(a.TextLink,{title:t,"aria-label":t,routeName:o,params:P.createParams({...l,uriName:i||void 0,id:void 0,guide:void 0,accordion:void 0}),text:t,children:m.jsx(a.SymbolBadge,{size:s,symbol:{type:"Svg",content:"caret-up"}})}),r]})});const Me=d.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
|
+
`;p.forwardRef(({expandable:t=!1,routing:e={},paramMappers:o={},symbolSize:s=11,pageRole:i="link",pageCaret:r="down",showTags:n=!1,showFavoriteToggle:l=!1,localPaging:c=!1,onItemClick:h=()=>{},dispatch:f=()=>{},metadata:g={},pageLabel:v,className:k,children:x,items:w,renderItem:E,addFavoriteTooltip:X,removeFavoriteCancelLabel:ee,removeFavoriteConfirmLabel:te,removeFavoriteHeader:oe,removeFavoriteLabel:se,removeFavoriteTooltip:ie,...ae},re)=>{const D=xe(),j=p.useRef(),C=a.usePrevious(w),{guide:ne="guide",page:le="index"}=e,{guide:ce=({id:y})=>P.createParams({guide:y}),page:B=()=>P.createParams()}=o,[me,de]=Ee();p.useImperativeHandle(re,()=>j.current);const L=y=>{const{id:b,title:$,tags:z,published:N,modified:S,publishedBy:T,modifiedBy:A}=y;return m.jsxs("li",{"data-guide":b,"has-metadata":(!!(g!=null&&g.showPublished)&&!!N||!!(g!=null&&g.showModified)&&!!S).toString(),children:[m.jsx(a.TextLink,{className:"humany-guide-link",title:$,"aria-label":$,routeName:ne,onClick:ue=>h(ue,y),params:ce(y),text:$,children:m.jsx(a.SymbolBadge,{size:s,symbol:{type:"Svg",content:t?"caret-down":"caret-right"}})}),l&&m.jsx(Te,{guideTitle:$,addFavoriteTooltip:X,removeFavoriteCancelLabel:ee,removeFavoriteConfirmLabel:te,removeFavoriteHeader:oe,removeFavoriteLabel:se,removeFavoriteTooltip:ie,isFavorite:me.indexOf(b)>-1,actions:de,id:b}),n&&m.jsx(Ae,{tags:z}),m.jsx(Re,{...g,indent:t?void 0:s,modified:S,published:N,publishedBy:T,modifiedBy:A})]},b)},fe=p.useCallback((y,b,$)=>E?E(y,b,$,L):L(y),[E,L]),he=p.useCallback(y=>{c&&(y.preventDefault(),f("page",B()))},[f,c]);p.useEffect(()=>{if(C&&C.length<w.length&&j.current){const y=j.current.querySelectorAll(".humany-guide-list > ul > li"),b=y[C.length];if(y.length===w.length&&C.length){const $=y[C.length];if($){const z=$.querySelector(".humany-guide-link");z&&z.focus()}}else b&&new MutationObserver((z,N)=>{z.forEach(S=>{if(S.addedNodes){const T=Array.from(S.addedNodes).find(A=>A.tagName==="A");T&&$e(j.current,document.activeElement)&&(D&&T.focus(),N.disconnect())}})}).observe(b,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})}});const ge=!!Object.keys(g).filter(y=>typeof g[y]<"u").length;return m.jsxs(Fe,{className:a.appendClassNames(k,"humany-guide-list"),"data-item-count":w.length,items:w,renderItem:fe,isTabbing:D,expandable:t?"true":"false","grid-items":n||l||ge?"true":"false",...a.convertToStringAttributes(ae),ref:j,children:[v?m.jsx(a.TextLink,{text:v,title:v,"aria-label":v,routeName:le,role:i,params:B(),onClick:he,children:m.jsx(a.SymbolBadge,{size:s,symbol:{type:"Svg",content:`caret-${r}`}})}):null,x]})});const Fe=d(a.ItemList)`
|
|
257
|
+
${a.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=>a.headingElement(t)("> h1",u.css`
|
|
267
|
+
white-space: pre-wrap;
|
|
268
|
+
`)}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
> ul > li {
|
|
272
|
+
${t=>{var e,o;return t["grid-items"]==="true"&&u.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: ${(o=t.theme.fonts)==null?void 0:o.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"&&u.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
|
+
${a.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
|
+
${a.borderTabStyle}
|
|
371
|
+
text-decoration: underline;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
`,De=d(a.List)`
|
|
375
|
+
${a.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
|
+
`,Be=d(a.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
|
+
`,Re=d(Le)`
|
|
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
|
+
`,Ye=u.keyframes`
|
|
403
|
+
100% {
|
|
404
|
+
transform: rotate(360deg);
|
|
405
|
+
}
|
|
406
|
+
`,Oe=u.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
|
+
`;d.svg`
|
|
420
|
+
animation: ${Ye} 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
|
+
`;d.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
|
+
`;d.div`
|
|
451
|
+
position: relative;
|
|
452
|
+
margin: 0 auto;
|
|
453
|
+
width: 100px;
|
|
454
|
+
&:before {
|
|
455
|
+
content: '';
|
|
456
|
+
display: block;
|
|
457
|
+
padding-top: 100%;
|
|
458
|
+
}
|
|
459
|
+
`;d.circle`
|
|
460
|
+
stroke-dasharray: 1, 200;
|
|
461
|
+
stroke-dashoffset: 0;
|
|
462
|
+
animation: ${Oe} 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
|
+
`;d(a.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
|
+
${a.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
|
+
`;d(a.ItemList)`
|
|
492
|
+
${Se}
|
|
493
|
+
${a.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"]&&u.css`
|
|
498
|
+
> div {
|
|
499
|
+
${a.headingElement(t)("h1",u.css`
|
|
500
|
+
display: none;
|
|
501
|
+
`)}
|
|
502
|
+
}
|
|
503
|
+
`}
|
|
504
|
+
|
|
505
|
+
@media (hover: hover) {
|
|
506
|
+
button:hover {
|
|
507
|
+
text-decoration: underline;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
`;d(a.Paragraph)`
|
|
511
|
+
${a.genericHtml}
|
|
512
|
+
font-weight: 300;
|
|
513
|
+
|
|
514
|
+
p {
|
|
515
|
+
white-space: normal;
|
|
516
|
+
}
|
|
517
|
+
`;d.li`
|
|
518
|
+
.humany-paragraph {
|
|
519
|
+
display: none;
|
|
520
|
+
&:not(:only-child) {
|
|
521
|
+
${t=>{var e,o,s;return((e=t.theme.sizes)==null?void 0:e.cardinal)&&((o=t.theme.sizes)==null?void 0:o.normal)&&u.css`
|
|
522
|
+
margin: ${(s=t.theme.sizes)==null?void 0:s.normal} 0;
|
|
523
|
+
`}}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
${t=>t["data-expanded"]&&u.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
|
+
`;d(a.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
|
+
`;d(G)`
|
|
544
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
545
|
+
font-weight: 300;
|
|
546
|
+
`;d(a.Paragraph)`
|
|
547
|
+
${t=>{var e;return a.headingElement(t)("h1",u.css`
|
|
548
|
+
font-weight: normal;
|
|
549
|
+
font-size: ${(e=t.theme.fonts)==null?void 0:e.medium};
|
|
550
|
+
`)}}
|
|
551
|
+
`;d(a.Html)`
|
|
552
|
+
${a.genericHtml}
|
|
553
|
+
font-weight: 300;
|
|
554
|
+
line-height: 1.5em;
|
|
555
|
+
button:focus-visible {
|
|
556
|
+
${a.borderTabStyle};
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
a:focus-visible {
|
|
560
|
+
${a.linkTabStyle};
|
|
561
|
+
}
|
|
562
|
+
`;const W=t=>{var e,o,s,i,r,n,l,c;return u.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: ${(o=t.theme.colors)==null?void 0:o.text};
|
|
570
|
+
}
|
|
571
|
+
i {
|
|
572
|
+
font-size: ${(s=t.theme.fonts)==null?void 0:s.large};
|
|
573
|
+
margin: 0 ${(i=t.theme.sizes)==null?void 0:i.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: ${(c=t.theme.colors)==null?void 0:c.text};
|
|
580
|
+
}
|
|
581
|
+
`};d(a.StyledText)`
|
|
582
|
+
line-height: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.large}};
|
|
583
|
+
`;d(a.Link)`
|
|
584
|
+
${t=>W(t)}
|
|
585
|
+
|
|
586
|
+
&:focus-visible {
|
|
587
|
+
${a.borderTabStyle};
|
|
588
|
+
}
|
|
589
|
+
`;d.div`
|
|
590
|
+
text-align: center;
|
|
591
|
+
display: block;
|
|
592
|
+
${t=>{var e,o;return typeof((e=t.theme.colors)==null?void 0:e.warning)<"u"&&`color: ${(o=t.theme.colors)==null?void 0:o.warning};`}}
|
|
593
|
+
`;const Q=t=>{var e,o,s;return u.css`
|
|
594
|
+
${a.itemList(t)}
|
|
595
|
+
|
|
596
|
+
> div {
|
|
597
|
+
padding: ${(e=t.theme.sizes)==null?void 0:e.large};
|
|
598
|
+
|
|
599
|
+
${a.headingElement(t)("h1",u.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: ${(o=t.theme.sizes)==null?void 0:o.large};
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
@media (hover: hover) {
|
|
636
|
+
a:hover {
|
|
637
|
+
background-color: ${(s=t.theme.colors)==null?void 0:s.accent};
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
`};d(a.ItemList)`
|
|
641
|
+
${t=>Q(t)}
|
|
642
|
+
`;exports.ContactMethodPlatform=ze;exports.contactItemList=Q;exports.contactLink=W;exports.defaultComplete=K;exports.defaultEvaluate=Z;exports.defaultValidate=U;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";var S=Object.defineProperty;var d=(o,r,t)=>r in o?S(o,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[r]=t;var a=(o,r,t)=>(d(o,typeof r!="symbol"?r+"":r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-6573c0b0.js");require("react/jsx-runtime");require("@emotion/styled");require("@emotion/react");require("react");require("react-transition-group");require("react-dom");require("react-router-dom");require("react-router");class i{constructor(){a(this,"memory",{tenant:{},implementation:{},widget:{}})}async setItem(r,t,s={}){return e.lock(this)(()=>{const c=e.processStore(this.memory,[e.StorageCategory.Necessary]),{scope:n=e.StorageScope.Tenant,expiration:g}=s;c[n][r]=e.createValue(t,e.StorageCategory.Necessary,(g==null?void 0:g.toISOString())||e.createExpirationDate()),this.memory=c,process.env.NODE_ENV!=="production"&&e.Logger.warn(`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value stored temporarily in memory.
|
|
2
|
+
Key: ${r}
|
|
3
|
+
Value: ${JSON.stringify(t)}
|
|
4
|
+
Options: ${JSON.stringify(s)}
|
|
5
|
+
Memory: ${JSON.stringify(c)}`)})}async getItem(r){return e.lock(this)(()=>{const t=e.processStore(this.memory,[e.StorageCategory.Necessary]);process.env.NODE_ENV!=="production"&&e.Logger.warn(`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value fetched from legacy memory storage.
|
|
6
|
+
Key: ${r}
|
|
7
|
+
Memory: ${JSON.stringify(t)}`);const s=e.getValue(t,r);return this.memory=t,s})}async removeItem(r){return e.lock(this)(()=>{const t=e.processStore(this.memory,[e.StorageCategory.Necessary]);delete t.tenant[r],delete t.implementation[r],delete t.widget[r],this.memory=t,process.env.NODE_ENV!=="production"&&e.Logger.warn(`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value removed from memory.
|
|
8
|
+
Key: ${r}
|
|
9
|
+
Memory: ${JSON.stringify(t)}`)})}async clear(){return Promise.resolve()}}class m{constructor(){a(this,"cookies");a(this,"session");a(this,"local");this.cookies=new i,this.session=new i,this.local=new i}}exports.StorageCategory=e.StorageCategory;exports.StorageMedium=e.StorageMedium;exports.StorageScope=e.StorageScope;exports.createStorageWriter=e.createStorageWriter;exports.readStorage=e.readStorage;exports.StorageProvider=m;exports.StorageService=i;
|