@telia-ace/widget-utilities 1.0.17 → 1.1.1-rc.0
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/index.js +1 -0
- package/{dist/index.js → index.mjs} +129 -154
- package/package.json +5 -28
- package/LICENSE.txt +0 -6
- package/README.md +0 -3
- package/dist/has-non-empty-categories.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/is-anchor-link.d.ts +0 -2
- /package/{dist/append-class-names.d.ts → append-class-names.d.ts} +0 -0
- /package/{dist/batch.d.ts → batch.d.ts} +0 -0
- /package/{dist/camilize.d.ts → camilize.d.ts} +0 -0
- /package/{dist/category-trail.d.ts → category-trail.d.ts} +0 -0
- /package/{dist/create-params.d.ts → create-params.d.ts} +0 -0
- /package/{dist/data-uri-to-blob.d.ts → data-uri-to-blob.d.ts} +0 -0
- /package/{dist/debug.d.ts → debug.d.ts} +0 -0
- /package/{dist/deep-clone.d.ts → deep-clone.d.ts} +0 -0
- /package/{dist/find-and-activate-stored-widgets.d.ts → find-and-activate-stored-widgets.d.ts} +0 -0
- /package/{dist/find-category-by-id.d.ts → find-category-by-id.d.ts} +0 -0
- /package/{dist/format-date.d.ts → format-date.d.ts} +0 -0
- /package/{dist/format-url.d.ts → format-url.d.ts} +0 -0
- /package/{dist/get-cookie.d.ts → get-cookie.d.ts} +0 -0
- /package/{dist/hash.d.ts → hash.d.ts} +0 -0
- /package/{dist/html-parent-contains.d.ts → html-parent-contains.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/kebab-case.d.ts → kebab-case.d.ts} +0 -0
- /package/{dist/lock.d.ts → lock.d.ts} +0 -0
- /package/{dist/merge-deep.d.ts → merge-deep.d.ts} +0 -0
- /package/{dist/notify-data-loaded.d.ts → notify-data-loaded.d.ts} +0 -0
- /package/{dist/remove-null-and-undefined-values.d.ts → remove-null-and-undefined-values.d.ts} +0 -0
- /package/{dist/set-cookie.d.ts → set-cookie.d.ts} +0 -0
- /package/{dist/shallow-compare.d.ts → shallow-compare.d.ts} +0 -0
- /package/{dist/uuid.d.ts → uuid.d.ts} +0 -0
- /package/{dist/wait-for.d.ts → wait-for.d.ts} +0 -0
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function L(e){const t=[];return e.forEach(o=>{t.indexOf(o)===-1&&t.push(o)}),t}function w(e="",t=""){const o=e.split(" ").concat(t.split(" "));return L(o).join(" ").trim()}function W(e,t){if(e){if(typeof t=="string")return t;if(Array.isArray(t)){let o="";return t.forEach(r=>o=w(o,r)),o}}}function z(...e){let t="";return e.length&&e.forEach(o=>{typeof o=="string"?t=w(t,o):Array.isArray(o)?t=w(t,W(...o)):typeof o<"u"&&o!==null&&process.env.NODE_ENV!=="production"&&h.warn("appendClassNames: arguments either haveto be a string or [boolean, ...string[]]. Passed args:",...e)}),t}const I=(e,t)=>{let o,r=[];return i=>(clearTimeout(o),new Promise((n,a)=>{r.push([i,n,a]),o=setTimeout(()=>{let f=t();r.forEach(([c,g,m])=>{f=c(f)}),r=[],n(f)},e)}))};function T(e){const t={};if(typeof e=="number"||typeof e=="string")return e;for(const o in e)if(e.hasOwnProperty(o)){const r=e[o],i=o.substring(0,1).toLowerCase()+o.substring(1);if(Object.prototype.toString.call(r)==="[object Array]"){t[i]=[];for(let n=0,a=r.length;n<a;n++)t[i].push(T(r[n]))}else r!==null&&typeof r=="object"?t[i]=T(r):t[i]=r}return t}function O(e={}){const{phrase:t="",category:o,guideCategory:r,contactCategory:i,take:n,connectionKey:a,accordion:f,id:c,uriName:g,sorting:m,tag:u,tagId:l,tagTitle:p,...D}=e,s={};return Object.keys(D).forEach(k=>{typeof e[k]=="string"&&(s[k]=e[k])}),typeof t=="string"&&t.length&&(s.phrase=t),t===null&&(s.phrase=t),typeof r=="string"&&r!=="0"&&(s.guideCategory=r),typeof r=="number"&&r!==0&&(s.guideCategory=r),typeof r=="object"&&r!==null&&(typeof r.id=="string"&&r.id!=="0"&&(s.guideCategory=r.id),typeof r.id=="number"&&r.id!==0&&(s.guideCategory=r.id)),typeof i=="string"&&i!=="0"&&(s.contactCategory=i),typeof i=="number"&&i!==0&&(s.contactCategory=i),typeof i=="object"&&i!==null&&(typeof i.id=="string"&&i.id!=="0"&&(s.contactCategory=i.id),typeof i.id=="number"&&i.id!==0&&(s.contactCategory=i.id)),typeof o=="string"&&o!=="0"&&(s.category=o),typeof o=="number"&&o!==0&&(s.category=o),typeof o=="object"&&o!==null&&(typeof o.id=="string"&&o.id!=="0"&&(s.category=o.id),typeof o.id=="number"&&o.id!==0&&(s.category=o.id)),c&&(s.id=c),g&&(+s.category||+s.guideCategory||+s.guide||+s.contactCategory||+s.contactMethod)&&(s.uriName=g),a&&(s.connectionKey=a),n&&(s.take=n),m&&(s.sorting=m),typeof f=="string"&&f.length>0&&(s.accordion=f),typeof u=="string"&&u!=="0"&&(s.tag=u),typeof u=="number"&&u!==0&&(s.tag=u),Array.isArray(u)&&u.length&&(s.tag=u),(typeof l=="string"||typeof l=="number")&&(s.tagId=l),typeof p=="string"&&(s.tagTitle=p),typeof s.tag=="string"&&(s.tag=s.tag.split(",")),s}function*x(e){if(e)for(let t=0;t<e.length;t++){const o=e[t];yield o,o.items&&(yield*x(o.items))}}const N=(e,t)=>{const o=x(t);let r=o.next(),i=null;for(;!r.done;)r.value.id===e&&(i=r.value),r=o.next();return i},$=e=>{if(!e)return"";const t=[{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,r=/[-]$/;let i=e;for(const n in t)t.hasOwnProperty(n)&&t[n].from.test(e)&&(i=i.replace(t[n].from,t[n].to));return i=i.replace(o,"-"),i=i.replace(r,""),i=i.toLowerCase(),i||"humany"};function E(e,t={},o){return e.forEach(r=>{o&&(t[+r.id]=o),r.items&&E(r.items,t,r.id)}),t}function S(e,t,o=[e],r=E(t)){const i=a=>{const f=r[+a];f&&(o.unshift(f),i(f))},n=r[+e];return n&&(o.unshift(n),i(n)),o}const q=(e,t)=>typeof e>"u"||typeof t>"u"?new Map:new Map(e.map(o=>{const r=N(o,t);return[o,r]})),B=(e,t,o,r="guide-categories")=>o.getAsync("dataClient").then(i=>i.fetch(r,{expandCategories:"descendants"}).then(({categories:n})=>{const a=f=>{const c=S(f,n),g=q(c,n),m=[];return c.forEach(u=>{const l=g.get(u);l&&m.push({routeName:e,title:l.title,symbol:l.symbol,id:l.id,routeParams:O(r==="contact-method-categories"?{contactCategory:l.id,uriName:$(l.title)}:{guideCategory:l.id,uriName:$(l.title)})})}),m};return Array.isArray(t)?t.reduce((f,c)=>{const g=a(c);return g.length>0&&f.push(g),f},[]):a(t)})),M=e=>{let t;e.split(",")[0].indexOf("base64")!==-1?t=atob(e.split(",")[1]):t=decodeURI(e.split(",")[1]);const o=e.split(",")[0].split(":")[1].split(";")[0],r=[];for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return new Blob([new Uint8Array(r)],{type:o})};function U(...e){return process.env.NODE_ENV!=="production"&&console&&console.warn(...e)}const A=(e,t,...o)=>typeof t=="string"?e(`[humany] ${t}`,...o):e(t,...o),y=class{constructor(){this.keys=[],this.log=(e,...t)=>this.lookup(e,()=>y.log(...t)),this.warn=(e,...t)=>this.lookup(e,()=>y.warn(...t)),this.error=(e,...t)=>this.lookup(e,()=>y.error(...t)),this.info=(e,...t)=>this.lookup(e,()=>y.info(...t))}lookup(e,t){this.keys.indexOf(e)===-1&&(this.keys.push(e),t())}};let h=y;h.log=(...e)=>A(console.log,...e);h.warn=(...e)=>A(console.warn,...e);h.error=(...e)=>A(console.error,...e);h.info=(...e)=>A(console.info,...e);const C=e=>{let t={},o,r;if(typeof e!="object"||e===null)return e;t=Array.isArray(e)?[]:{};for(r in e)o=e[r],t[r]=typeof o=="object"&&o!==null?C(o):o;return t},V=e=>{if(!e)return null;const t=localStorage.getItem(`humany_${P(e.tenant+e.name)}`);if(t){const{activeStickyWidget:o}=JSON.parse(t);if(o&&o.value&&e.widgets.get(o.value)){const i=document.createElement("a");i.setAttribute("href",`//${e.bindings[0]}/${o.value}`),document.body.appendChild(i)}}},F=(e,t=!1)=>{const o=new Date(e);let r=`${o.getMonth()+1}`,i=`${o.getDate()}`;const n=o.getFullYear();if(r.length<2&&(r=`0${r}`),i.length<2&&(i=`0${i}`),t){let a=`${o.getHours()}`,f=`${o.getMinutes()}`;return a.length<2&&(a=`0${a}`),f.length<2&&(f=`0${f}`),`${[n,r,i].join("-")} ${[a,f].join(":")}`}return[n,r,i].join("-")};function Y(e){const t=document.cookie;if(t.length>0){let o=t.indexOf(`${e}=`);if(o!==-1){o=o+e.length+1;let r=t.indexOf(";",o);return r===-1&&(r=t.length),unescape(t.substring(o,r))}}return null}function P(e){let t=0;if(e.length===0)return t.toString();for(let o=0;o<e.length;o++){const r=e.charCodeAt(o);t=(t<<5)-t+r,t=t&t}return t.toString()}const K=(e,t)=>{if(!e||!t)return!0;let o=t.parentNode,r=!1;for(;o!==null;)o===e&&(r=!0),o=o.parentNode;return r};function _(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}class Z{constructor(t,o){this.lockWarningTime=t,this.lockErrorTime=o,this.tasks=[],this.current=Promise.resolve(),this.next=this.next.bind(this)}add(t,o,r,i){this.tasks.push({task:t,resolve:o,reject:r,done:i}),this.next()}next(){this.current=this.current.then(()=>{const t=this.tasks.shift();if(t){let o;const r=setTimeout(()=>{process.env.NODE_ENV!=="production"&&h.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,t),o=setTimeout(()=>{t.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),i=Promise.resolve(t.task()).then(n=>(clearTimeout(r),clearTimeout(o),n));return Promise.resolve(i).then(this.next).then(()=>i.then(n=>{t.done(),t.resolve(n)})).catch(n=>(t.done(),t.reject(n),this.next()))}return Promise.resolve()})}}const b=new WeakMap;function J(e,t=5e3,o=1e3){return b.has(e)||b.set(e,new Z(t,o)),r=>new Promise((i,n)=>{const a=b.get(e);a.add(r,i,n,()=>{a.tasks.length||b.delete(e)})})}const v=e=>!!e&&typeof e=="object"&&!Array.isArray(e),Q=(e,...t)=>{const o=C(e),r=C(t);return j(o,...r)},j=(e,...t)=>{if(!t.length)return e;const o=t.shift();if(v(e)&&v(o))for(const r in o)v(o[r])?(e[r]||Object.assign(e,{[r]:{}}),j(e[r],o[r])):Object.assign(e,{[r]:o[r]});return j(e,...t)},H=(e,t)=>{const o=()=>t.querySelectorAll("[data-loading=true]").length>0,i=(()=>{let a=!1;return()=>{if(a)return;e.get("$widget").events.dispatch("widget:data-loaded",{element:t}),a=!0}})();if(!o())return i();new MutationObserver((a,f)=>{a.find(g=>g.type==="attributes"&&g.attributeName==="data-loading")&&!o()&&(f.disconnect(),i())}).observe(t,{attributes:!0,childList:!0,subtree:!0})},R=(e,t)=>{e.get("$widget").container.getAsync("components").then(r=>{r.events.subscribeOnce("components:component-model-initialized",()=>{let i=r.nodes.visible.reduce((f,c)=>(!c.name||!c.type||c.type==="view"||c.type==="root"||c.attributes.layout.size==="none"||t.querySelector(`[data-name="${c.name}"]`)||f.push(c.name),f),[]),n=!1;new MutationObserver((f,c)=>{f.forEach(g=>{if(g.addedNodes){const m=Array.from(g.addedNodes).reduce((u,l)=>{const p=l.getAttribute&&l.getAttribute("data-name");return p&&i.indexOf(p)>-1&&u.push(p),u},[]);i=i.filter(u=>m.indexOf(u)===-1),!n&&i.length===0&&(n=!0,H(e,t),c.disconnect())}})}).observe(t,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})})})},G=(e={})=>(Object.keys(e).forEach(t=>{(e[t]===null||typeof e[t]>"u")&&delete e[t]}),e);function X(e,t,o){let r="";if(o){const i=new Date;i.setTime(i.getTime()+o*24*60*60*1e3),r=`; expires=${i.toUTCString()}`}document.cookie=`${e}=${t}${r}; path=/`}const tt=(e,t)=>{let o=!0;return Object.keys(e).length!==Object.keys(t).length||Object.keys(e).some(i=>!Object.keys(t).some(a=>i===a))?!1:(Object.keys(e).forEach(i=>{if(o){const n=typeof e[i]>"u"?"":e[i],a=typeof t[i]>"u"?"":t[i];o=n.toString()===a.toString()}}),o)},d=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function et(){return d()+d()+"-"+d()+"-"+d()+"-"+d()+"-"+d()+d()+d()}class ot{constructor(t){this.queue=[],this.queueAttemptCalls=0,this.callCount=5,this.add=o=>{this.queue.push(o),this.queueAttempt=setInterval(this.processQueue,1e3)},this.processQueue=()=>{if(this.queue.length>0){const o=[];this.queue.forEach((r,i)=>{const n=r();typeof n=="function"&&(n(),o.push(i))}),this.queue=this.queue.filter((r,i)=>!(o.indexOf(i)>-1)),this.queueAttempt&&clearInterval(this.queueAttempt)}this.queueAttemptCalls>this.callCount&&(clearInterval(this.queueAttempt),this.queueAttemptCalls=0),this.queueAttemptCalls=this.queueAttemptCalls+1},t&&t.callCount&&(this.callCount=t.callCount)}}exports.Logger=h;exports.WaitFor=ot;exports.appendClassNames=z;exports.buildCategoryTrail=B;exports.camilize=T;exports.categoryTrail=S;exports.createBatch=I;exports.createParams=O;exports.dataURItoBlob=M;exports.debugLog=U;exports.deepClone=C;exports.findAndActivateStoredWidgets=V;exports.findCategoryById=N;exports.formatDate=F;exports.formatUrl=$;exports.getCategoryTrailAsObjects=q;exports.getCookie=Y;exports.hash=P;exports.htmlParentContains=K;exports.kebabCase=_;exports.lock=J;exports.mergeDeep=Q;exports.notifyDataLoaded=R;exports.removeNullAndUndefinedValues=G;exports.setCookie=X;exports.shallowCompare=tt;exports.uuid=et;
|
|
@@ -1,55 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
var L = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
3
|
-
var x = (e, t) => {
|
|
4
|
-
var o = {};
|
|
5
|
-
for (var r in e)
|
|
6
|
-
L.call(e, r) && t.indexOf(r) < 0 && (o[r] = e[r]);
|
|
7
|
-
if (e != null && O)
|
|
8
|
-
for (var r of O(e))
|
|
9
|
-
t.indexOf(r) < 0 && B.call(e, r) && (o[r] = e[r]);
|
|
10
|
-
return o;
|
|
11
|
-
};
|
|
12
|
-
function I(e) {
|
|
1
|
+
function q(e) {
|
|
13
2
|
const t = [];
|
|
14
3
|
return e.forEach((o) => {
|
|
15
4
|
t.indexOf(o) === -1 && t.push(o);
|
|
16
5
|
}), t;
|
|
17
6
|
}
|
|
18
|
-
function
|
|
7
|
+
function v(e = "", t = "") {
|
|
19
8
|
const o = e.split(" ").concat(t.split(" "));
|
|
20
|
-
return
|
|
9
|
+
return q(o).join(" ").trim();
|
|
21
10
|
}
|
|
22
|
-
function
|
|
11
|
+
function S(e, t) {
|
|
23
12
|
if (e) {
|
|
24
13
|
if (typeof t == "string")
|
|
25
14
|
return t;
|
|
26
15
|
if (Array.isArray(t)) {
|
|
27
16
|
let o = "";
|
|
28
|
-
return t.forEach((r) => o =
|
|
17
|
+
return t.forEach((r) => o = v(o, r)), o;
|
|
29
18
|
}
|
|
30
19
|
}
|
|
31
20
|
}
|
|
32
|
-
function
|
|
21
|
+
function M(...e) {
|
|
33
22
|
let t = "";
|
|
34
23
|
return e.length && e.forEach((o) => {
|
|
35
|
-
typeof o == "string" ? t =
|
|
24
|
+
typeof o == "string" ? t = v(t, o) : Array.isArray(o) ? t = v(t, S(...o)) : typeof o < "u" && o !== null && process.env.NODE_ENV !== "production" && p.warn(
|
|
36
25
|
"appendClassNames: arguments either haveto be a string or [boolean, ...string[]]. Passed args:",
|
|
37
26
|
...e
|
|
38
27
|
);
|
|
39
28
|
}), t;
|
|
40
29
|
}
|
|
41
|
-
const
|
|
30
|
+
const V = (e, t) => {
|
|
42
31
|
let o, r = [];
|
|
43
|
-
return (i) => (clearTimeout(o), new Promise((n,
|
|
44
|
-
r.push([i, n,
|
|
32
|
+
return (i) => (clearTimeout(o), new Promise((n, c) => {
|
|
33
|
+
r.push([i, n, c]), o = setTimeout(() => {
|
|
45
34
|
let f = t();
|
|
46
|
-
r.forEach(([
|
|
47
|
-
f =
|
|
35
|
+
r.forEach(([a, g, m]) => {
|
|
36
|
+
f = a(f);
|
|
48
37
|
}), r = [], n(f);
|
|
49
38
|
}, e);
|
|
50
39
|
}));
|
|
51
|
-
}
|
|
52
|
-
function
|
|
40
|
+
};
|
|
41
|
+
function $(e) {
|
|
53
42
|
const t = {};
|
|
54
43
|
if (typeof e == "number" || typeof e == "string")
|
|
55
44
|
return e;
|
|
@@ -58,61 +47,48 @@ function T(e) {
|
|
|
58
47
|
const r = e[o], i = o.substring(0, 1).toLowerCase() + o.substring(1);
|
|
59
48
|
if (Object.prototype.toString.call(r) === "[object Array]") {
|
|
60
49
|
t[i] = [];
|
|
61
|
-
for (let n = 0,
|
|
62
|
-
t[i].push(
|
|
50
|
+
for (let n = 0, c = r.length; n < c; n++)
|
|
51
|
+
t[i].push($(r[n]));
|
|
63
52
|
} else
|
|
64
|
-
r !== null && typeof r == "object" ? t[i] =
|
|
53
|
+
r !== null && typeof r == "object" ? t[i] = $(r) : t[i] = r;
|
|
65
54
|
}
|
|
66
55
|
return t;
|
|
67
56
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
57
|
+
function x(e = {}) {
|
|
58
|
+
const {
|
|
70
59
|
phrase: t = "",
|
|
71
60
|
category: o,
|
|
72
61
|
guideCategory: r,
|
|
73
62
|
contactCategory: i,
|
|
74
63
|
take: n,
|
|
75
|
-
connectionKey:
|
|
64
|
+
connectionKey: c,
|
|
76
65
|
accordion: f,
|
|
77
|
-
id:
|
|
66
|
+
id: a,
|
|
78
67
|
uriName: g,
|
|
79
68
|
sorting: m,
|
|
80
69
|
tag: u,
|
|
81
70
|
tagId: l,
|
|
82
|
-
tagTitle:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"guideCategory",
|
|
87
|
-
"contactCategory",
|
|
88
|
-
"take",
|
|
89
|
-
"connectionKey",
|
|
90
|
-
"accordion",
|
|
91
|
-
"id",
|
|
92
|
-
"uriName",
|
|
93
|
-
"sorting",
|
|
94
|
-
"tag",
|
|
95
|
-
"tagId",
|
|
96
|
-
"tagTitle"
|
|
97
|
-
]), s = {};
|
|
98
|
-
return Object.keys(P).forEach((A) => {
|
|
71
|
+
tagTitle: d,
|
|
72
|
+
...N
|
|
73
|
+
} = e, s = {};
|
|
74
|
+
return Object.keys(N).forEach((A) => {
|
|
99
75
|
typeof e[A] == "string" && (s[A] = e[A]);
|
|
100
|
-
}), typeof t == "string" && t.length && (s.phrase = t), t === null && (s.phrase = t), typeof r == "string" && r !== "0" && (s.guideCategory = r), typeof r == "number" && r !== 0 && (s.guideCategory = r), typeof r == "object" && r !== null && (typeof r.id == "string" && r.id !== "0" && (s.guideCategory = r.id), typeof r.id == "number" && r.id !== 0 && (s.guideCategory = r.id)), typeof i == "string" && i !== "0" && (s.contactCategory = i), typeof i == "number" && i !== 0 && (s.contactCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (s.contactCategory = i.id), typeof i.id == "number" && i.id !== 0 && (s.contactCategory = i.id)), typeof o == "string" && o !== "0" && (s.category = o), typeof o == "number" && o !== 0 && (s.category = o), typeof o == "object" && o !== null && (typeof o.id == "string" && o.id !== "0" && (s.category = o.id), typeof o.id == "number" && o.id !== 0 && (s.category = o.id)),
|
|
76
|
+
}), typeof t == "string" && t.length && (s.phrase = t), t === null && (s.phrase = t), typeof r == "string" && r !== "0" && (s.guideCategory = r), typeof r == "number" && r !== 0 && (s.guideCategory = r), typeof r == "object" && r !== null && (typeof r.id == "string" && r.id !== "0" && (s.guideCategory = r.id), typeof r.id == "number" && r.id !== 0 && (s.guideCategory = r.id)), typeof i == "string" && i !== "0" && (s.contactCategory = i), typeof i == "number" && i !== 0 && (s.contactCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (s.contactCategory = i.id), typeof i.id == "number" && i.id !== 0 && (s.contactCategory = i.id)), typeof o == "string" && o !== "0" && (s.category = o), typeof o == "number" && o !== 0 && (s.category = o), typeof o == "object" && o !== null && (typeof o.id == "string" && o.id !== "0" && (s.category = o.id), typeof o.id == "number" && o.id !== 0 && (s.category = o.id)), a && (s.id = a), g && (+s.category || +s.guideCategory || +s.guide || +s.contactCategory || +s.contactMethod) && (s.uriName = g), c && (s.connectionKey = c), n && (s.take = n), m && (s.sorting = m), typeof f == "string" && f.length > 0 && (s.accordion = f), typeof u == "string" && u !== "0" && (s.tag = u), typeof u == "number" && u !== 0 && (s.tag = u), Array.isArray(u) && u.length && (s.tag = u), (typeof l == "string" || typeof l == "number") && (s.tagId = l), typeof d == "string" && (s.tagTitle = d), typeof s.tag == "string" && (s.tag = s.tag.split(",")), s;
|
|
101
77
|
}
|
|
102
|
-
function*
|
|
78
|
+
function* E(e) {
|
|
103
79
|
if (e)
|
|
104
80
|
for (let t = 0; t < e.length; t++) {
|
|
105
81
|
const o = e[t];
|
|
106
|
-
yield o, o.items && (yield*
|
|
82
|
+
yield o, o.items && (yield* E(o.items));
|
|
107
83
|
}
|
|
108
84
|
}
|
|
109
|
-
const
|
|
110
|
-
const o =
|
|
85
|
+
const P = (e, t) => {
|
|
86
|
+
const o = E(t);
|
|
111
87
|
let r = o.next(), i = null;
|
|
112
88
|
for (; !r.done; )
|
|
113
89
|
r.value.id === e && (i = r.value), r = o.next();
|
|
114
90
|
return i;
|
|
115
|
-
},
|
|
91
|
+
}, T = (e) => {
|
|
116
92
|
if (!e)
|
|
117
93
|
return "";
|
|
118
94
|
const t = [
|
|
@@ -210,57 +186,57 @@ const V = (e, t) => {
|
|
|
210
186
|
for (const n in t)
|
|
211
187
|
t.hasOwnProperty(n) && t[n].from.test(e) && (i = i.replace(t[n].from, t[n].to));
|
|
212
188
|
return i = i.replace(o, "-"), i = i.replace(r, ""), i = i.toLowerCase(), i || "humany";
|
|
213
|
-
}
|
|
214
|
-
function
|
|
189
|
+
};
|
|
190
|
+
function j(e, t = {}, o) {
|
|
215
191
|
return e.forEach((r) => {
|
|
216
|
-
o && (t[+r.id] = o), r.items &&
|
|
192
|
+
o && (t[+r.id] = o), r.items && j(r.items, t, r.id);
|
|
217
193
|
}), t;
|
|
218
194
|
}
|
|
219
|
-
function
|
|
220
|
-
const i = (
|
|
221
|
-
const f = r[+
|
|
195
|
+
function D(e, t, o = [e], r = j(t)) {
|
|
196
|
+
const i = (c) => {
|
|
197
|
+
const f = r[+c];
|
|
222
198
|
f && (o.unshift(f), i(f));
|
|
223
199
|
}, n = r[+e];
|
|
224
200
|
return n && (o.unshift(n), i(n)), o;
|
|
225
201
|
}
|
|
226
|
-
const
|
|
202
|
+
const L = (e, t) => typeof e > "u" || typeof t > "u" ? /* @__PURE__ */ new Map() : new Map(
|
|
227
203
|
e.map((o) => {
|
|
228
|
-
const r =
|
|
204
|
+
const r = P(o, t);
|
|
229
205
|
return [o, r];
|
|
230
206
|
})
|
|
231
|
-
),
|
|
232
|
-
const
|
|
233
|
-
const
|
|
234
|
-
return
|
|
207
|
+
), Y = (e, t, o, r = "guide-categories") => o.getAsync("dataClient").then((i) => i.fetch(r, { expandCategories: "descendants" }).then(({ categories: n }) => {
|
|
208
|
+
const c = (f) => {
|
|
209
|
+
const a = D(f, n), g = L(a, n), m = [];
|
|
210
|
+
return a.forEach((u) => {
|
|
235
211
|
const l = g.get(u);
|
|
236
212
|
l && m.push({
|
|
237
213
|
routeName: e,
|
|
238
214
|
title: l.title,
|
|
239
215
|
symbol: l.symbol,
|
|
240
216
|
id: l.id,
|
|
241
|
-
routeParams:
|
|
217
|
+
routeParams: x(r === "contact-method-categories" ? {
|
|
242
218
|
contactCategory: l.id,
|
|
243
|
-
uriName:
|
|
219
|
+
uriName: T(l.title)
|
|
244
220
|
} : {
|
|
245
221
|
guideCategory: l.id,
|
|
246
|
-
uriName:
|
|
222
|
+
uriName: T(l.title)
|
|
247
223
|
})
|
|
248
224
|
});
|
|
249
225
|
}), m;
|
|
250
226
|
};
|
|
251
|
-
return Array.isArray(t) ? t.reduce((f,
|
|
252
|
-
const g = a
|
|
227
|
+
return Array.isArray(t) ? t.reduce((f, a) => {
|
|
228
|
+
const g = c(a);
|
|
253
229
|
return g.length > 0 && f.push(g), f;
|
|
254
|
-
}, []) :
|
|
255
|
-
})),
|
|
256
|
-
let t
|
|
257
|
-
e.split(",")[0].indexOf("base64") !== -1 ? t = atob(e.split(",")[1]) : t = decodeURI(e.split(",")[1])
|
|
258
|
-
const r = [];
|
|
230
|
+
}, []) : c(t);
|
|
231
|
+
})), F = (e) => {
|
|
232
|
+
let t;
|
|
233
|
+
e.split(",")[0].indexOf("base64") !== -1 ? t = atob(e.split(",")[1]) : t = decodeURI(e.split(",")[1]);
|
|
234
|
+
const o = e.split(",")[0].split(":")[1].split(";")[0], r = [];
|
|
259
235
|
for (let i = 0; i < t.length; i++)
|
|
260
236
|
r[i] = t.charCodeAt(i);
|
|
261
237
|
return new Blob([new Uint8Array(r)], { type: o });
|
|
262
|
-
}
|
|
263
|
-
function
|
|
238
|
+
};
|
|
239
|
+
function K(...e) {
|
|
264
240
|
return process.env.NODE_ENV !== "production" && console && console.warn(...e);
|
|
265
241
|
}
|
|
266
242
|
const C = (e, t, ...o) => typeof t == "string" ? e(`[humany] ${t}`, ...o) : e(t, ...o), y = class {
|
|
@@ -276,19 +252,19 @@ p.log = (...e) => C(console.log, ...e);
|
|
|
276
252
|
p.warn = (...e) => C(console.warn, ...e);
|
|
277
253
|
p.error = (...e) => C(console.error, ...e);
|
|
278
254
|
p.info = (...e) => C(console.info, ...e);
|
|
279
|
-
const
|
|
255
|
+
const w = (e) => {
|
|
280
256
|
let t = {}, o, r;
|
|
281
257
|
if (typeof e != "object" || e === null)
|
|
282
258
|
return e;
|
|
283
259
|
t = Array.isArray(e) ? [] : {};
|
|
284
260
|
for (r in e)
|
|
285
|
-
o = e[r], t[r] = typeof o == "object" && o !== null ?
|
|
261
|
+
o = e[r], t[r] = typeof o == "object" && o !== null ? w(o) : o;
|
|
286
262
|
return t;
|
|
287
|
-
},
|
|
263
|
+
}, _ = (e) => {
|
|
288
264
|
if (!e)
|
|
289
265
|
return null;
|
|
290
266
|
const t = localStorage.getItem(
|
|
291
|
-
`humany_${
|
|
267
|
+
`humany_${z(e.tenant + e.name)}`
|
|
292
268
|
);
|
|
293
269
|
if (t) {
|
|
294
270
|
const { activeStickyWidget: o } = JSON.parse(t);
|
|
@@ -300,17 +276,17 @@ const D = (e) => {
|
|
|
300
276
|
), document.body.appendChild(i);
|
|
301
277
|
}
|
|
302
278
|
}
|
|
303
|
-
},
|
|
279
|
+
}, B = (e, t = !1) => {
|
|
304
280
|
const o = new Date(e);
|
|
305
281
|
let r = `${o.getMonth() + 1}`, i = `${o.getDate()}`;
|
|
306
282
|
const n = o.getFullYear();
|
|
307
283
|
if (r.length < 2 && (r = `0${r}`), i.length < 2 && (i = `0${i}`), t) {
|
|
308
|
-
let
|
|
309
|
-
return
|
|
284
|
+
let c = `${o.getHours()}`, f = `${o.getMinutes()}`;
|
|
285
|
+
return c.length < 2 && (c = `0${c}`), f.length < 2 && (f = `0${f}`), `${[n, r, i].join("-")} ${[c, f].join(":")}`;
|
|
310
286
|
}
|
|
311
287
|
return [n, r, i].join("-");
|
|
312
288
|
};
|
|
313
|
-
function
|
|
289
|
+
function U(e) {
|
|
314
290
|
const t = document.cookie;
|
|
315
291
|
if (t.length > 0) {
|
|
316
292
|
let o = t.indexOf(`${e}=`);
|
|
@@ -322,7 +298,7 @@ function st(e) {
|
|
|
322
298
|
}
|
|
323
299
|
return null;
|
|
324
300
|
}
|
|
325
|
-
function
|
|
301
|
+
function z(e) {
|
|
326
302
|
let t = 0;
|
|
327
303
|
if (e.length === 0)
|
|
328
304
|
return t.toString();
|
|
@@ -332,7 +308,7 @@ function _(e) {
|
|
|
332
308
|
}
|
|
333
309
|
return t.toString();
|
|
334
310
|
}
|
|
335
|
-
const
|
|
311
|
+
const Z = (e, t) => {
|
|
336
312
|
if (!e || !t)
|
|
337
313
|
return !0;
|
|
338
314
|
let o = t.parentNode, r = !1;
|
|
@@ -340,10 +316,10 @@ const ft = (e, t) => {
|
|
|
340
316
|
o === e && (r = !0), o = o.parentNode;
|
|
341
317
|
return r;
|
|
342
318
|
};
|
|
343
|
-
function
|
|
319
|
+
function J(e) {
|
|
344
320
|
return e.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\s+/g, "-").toLowerCase();
|
|
345
321
|
}
|
|
346
|
-
class
|
|
322
|
+
class W {
|
|
347
323
|
constructor(t, o) {
|
|
348
324
|
this.lockWarningTime = t, this.lockErrorTime = o, this.tasks = [], this.current = Promise.resolve(), this.next = this.next.bind(this);
|
|
349
325
|
}
|
|
@@ -374,40 +350,40 @@ class Z {
|
|
|
374
350
|
}
|
|
375
351
|
}
|
|
376
352
|
const b = /* @__PURE__ */ new WeakMap();
|
|
377
|
-
function
|
|
378
|
-
return b.has(e) || b.set(e, new
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
353
|
+
function Q(e, t = 5e3, o = 1e3) {
|
|
354
|
+
return b.has(e) || b.set(e, new W(t, o)), (r) => new Promise((i, n) => {
|
|
355
|
+
const c = b.get(e);
|
|
356
|
+
c.add(r, i, n, () => {
|
|
357
|
+
c.tasks.length || b.delete(e);
|
|
382
358
|
});
|
|
383
359
|
});
|
|
384
360
|
}
|
|
385
|
-
const
|
|
386
|
-
const o =
|
|
387
|
-
return
|
|
388
|
-
},
|
|
361
|
+
const k = (e) => !!e && typeof e == "object" && !Array.isArray(e), H = (e, ...t) => {
|
|
362
|
+
const o = w(e), r = w(t);
|
|
363
|
+
return O(o, ...r);
|
|
364
|
+
}, O = (e, ...t) => {
|
|
389
365
|
if (!t.length)
|
|
390
366
|
return e;
|
|
391
367
|
const o = t.shift();
|
|
392
|
-
if (
|
|
368
|
+
if (k(e) && k(o))
|
|
393
369
|
for (const r in o)
|
|
394
|
-
|
|
395
|
-
return
|
|
396
|
-
},
|
|
370
|
+
k(o[r]) ? (e[r] || Object.assign(e, { [r]: {} }), O(e[r], o[r])) : Object.assign(e, { [r]: o[r] });
|
|
371
|
+
return O(e, ...t);
|
|
372
|
+
}, I = (e, t) => {
|
|
397
373
|
const o = () => t.querySelectorAll("[data-loading=true]").length > 0, i = (() => {
|
|
398
|
-
let
|
|
374
|
+
let c = !1;
|
|
399
375
|
return () => {
|
|
400
|
-
if (
|
|
376
|
+
if (c)
|
|
401
377
|
return;
|
|
402
378
|
e.get("$widget").events.dispatch("widget:data-loaded", {
|
|
403
379
|
element: t
|
|
404
|
-
}),
|
|
380
|
+
}), c = !0;
|
|
405
381
|
};
|
|
406
382
|
})();
|
|
407
383
|
if (!o())
|
|
408
384
|
return i();
|
|
409
|
-
new MutationObserver((
|
|
410
|
-
|
|
385
|
+
new MutationObserver((c, f) => {
|
|
386
|
+
c.find(
|
|
411
387
|
(g) => g.type === "attributes" && g.attributeName === "data-loading"
|
|
412
388
|
) && !o() && (f.disconnect(), i());
|
|
413
389
|
}).observe(t, {
|
|
@@ -415,23 +391,23 @@ const v = (e) => !!e && typeof e == "object" && !Array.isArray(e), J = (e, ...t)
|
|
|
415
391
|
childList: !0,
|
|
416
392
|
subtree: !0
|
|
417
393
|
});
|
|
418
|
-
},
|
|
394
|
+
}, G = (e, t) => {
|
|
419
395
|
e.get("$widget").container.getAsync("components").then((r) => {
|
|
420
396
|
r.events.subscribeOnce("components:component-model-initialized", () => {
|
|
421
397
|
let i = r.nodes.visible.reduce(
|
|
422
|
-
(f,
|
|
398
|
+
(f, a) => (!a.name || !a.type || a.type === "view" || a.type === "root" || a.attributes.layout.size === "none" || t.querySelector(`[data-name="${a.name}"]`) || f.push(a.name), f),
|
|
423
399
|
[]
|
|
424
400
|
), n = !1;
|
|
425
|
-
new MutationObserver((f,
|
|
401
|
+
new MutationObserver((f, a) => {
|
|
426
402
|
f.forEach((g) => {
|
|
427
403
|
if (g.addedNodes) {
|
|
428
404
|
const m = Array.from(
|
|
429
405
|
g.addedNodes
|
|
430
406
|
).reduce((u, l) => {
|
|
431
|
-
const
|
|
432
|
-
return
|
|
407
|
+
const d = l.getAttribute && l.getAttribute("data-name");
|
|
408
|
+
return d && i.indexOf(d) > -1 && u.push(d), u;
|
|
433
409
|
}, []);
|
|
434
|
-
i = i.filter((u) => m.indexOf(u) === -1), !n && i.length === 0 && (n = !0,
|
|
410
|
+
i = i.filter((u) => m.indexOf(u) === -1), !n && i.length === 0 && (n = !0, I(e, t), a.disconnect());
|
|
435
411
|
}
|
|
436
412
|
});
|
|
437
413
|
}).observe(t, {
|
|
@@ -444,10 +420,10 @@ const v = (e) => !!e && typeof e == "object" && !Array.isArray(e), J = (e, ...t)
|
|
|
444
420
|
});
|
|
445
421
|
});
|
|
446
422
|
});
|
|
447
|
-
},
|
|
448
|
-
(e[t] === null || typeof e[t]
|
|
449
|
-
}), e)
|
|
450
|
-
function
|
|
423
|
+
}, R = (e = {}) => (Object.keys(e).forEach((t) => {
|
|
424
|
+
(e[t] === null || typeof e[t] > "u") && delete e[t];
|
|
425
|
+
}), e);
|
|
426
|
+
function X(e, t, o) {
|
|
451
427
|
let r = "";
|
|
452
428
|
if (o) {
|
|
453
429
|
const i = /* @__PURE__ */ new Date();
|
|
@@ -455,19 +431,19 @@ function mt(e, t, o) {
|
|
|
455
431
|
}
|
|
456
432
|
document.cookie = `${e}=${t}${r}; path=/`;
|
|
457
433
|
}
|
|
458
|
-
const
|
|
434
|
+
const tt = (e, t) => {
|
|
459
435
|
let o = !0;
|
|
460
|
-
return Object.keys(e).length !== Object.keys(t).length || Object.keys(e).some((i) => !Object.keys(t).some((
|
|
436
|
+
return Object.keys(e).length !== Object.keys(t).length || Object.keys(e).some((i) => !Object.keys(t).some((c) => i === c)) ? !1 : (Object.keys(e).forEach((i) => {
|
|
461
437
|
if (o) {
|
|
462
|
-
const n = typeof e[i]
|
|
463
|
-
o = n.toString() ===
|
|
438
|
+
const n = typeof e[i] > "u" ? "" : e[i], c = typeof t[i] > "u" ? "" : t[i];
|
|
439
|
+
o = n.toString() === c.toString();
|
|
464
440
|
}
|
|
465
441
|
}), o);
|
|
466
|
-
},
|
|
467
|
-
function
|
|
468
|
-
return
|
|
442
|
+
}, h = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
443
|
+
function et() {
|
|
444
|
+
return h() + h() + "-" + h() + "-" + h() + "-" + h() + "-" + h() + h() + h();
|
|
469
445
|
}
|
|
470
|
-
class
|
|
446
|
+
class ot {
|
|
471
447
|
constructor(t) {
|
|
472
448
|
this.queue = [], this.queueAttemptCalls = 0, this.callCount = 5, this.add = (o) => {
|
|
473
449
|
this.queue.push(o), this.queueAttempt = setInterval(this.processQueue, 1e3);
|
|
@@ -485,31 +461,30 @@ class pt {
|
|
|
485
461
|
}
|
|
486
462
|
export {
|
|
487
463
|
p as Logger,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
464
|
+
ot as WaitFor,
|
|
465
|
+
M as appendClassNames,
|
|
466
|
+
Y as buildCategoryTrail,
|
|
467
|
+
$ as camilize,
|
|
468
|
+
D as categoryTrail,
|
|
469
|
+
V as createBatch,
|
|
470
|
+
x as createParams,
|
|
471
|
+
F as dataURItoBlob,
|
|
472
|
+
K as debugLog,
|
|
473
|
+
w as deepClone,
|
|
474
|
+
_ as findAndActivateStoredWidgets,
|
|
475
|
+
P as findCategoryById,
|
|
476
|
+
B as formatDate,
|
|
477
|
+
T as formatUrl,
|
|
478
|
+
L as getCategoryTrailAsObjects,
|
|
479
|
+
U as getCookie,
|
|
480
|
+
z as hash,
|
|
481
|
+
Z as htmlParentContains,
|
|
482
|
+
J as kebabCase,
|
|
483
|
+
Q as lock,
|
|
484
|
+
H as mergeDeep,
|
|
485
|
+
G as notifyDataLoaded,
|
|
486
|
+
R as removeNullAndUndefinedValues,
|
|
487
|
+
X as setCookie,
|
|
488
|
+
tt as shallowCompare,
|
|
489
|
+
et as uuid
|
|
514
490
|
};
|
|
515
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-utilities",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "Utilities used internally by ACE Widget packages.",
|
|
5
|
-
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
-
"author": "Telia Company AB",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"telia"
|
|
9
|
-
],
|
|
10
|
-
"main": "dist/index.js",
|
|
11
|
-
"sourceMain": "src/index.ts",
|
|
12
|
-
"type": "module",
|
|
13
|
-
"types": "dist/index.d.ts",
|
|
14
|
-
"files": [
|
|
15
|
-
"LICENSE.txt",
|
|
16
|
-
"README.md",
|
|
17
|
-
"dist/"
|
|
18
|
-
],
|
|
19
|
-
"publishConfig": {
|
|
20
|
-
"access": "public"
|
|
21
|
-
},
|
|
22
|
-
"sideEffects": false,
|
|
3
|
+
"version": "1.1.1-rc.0",
|
|
23
4
|
"dependencies": {
|
|
24
|
-
"@webprovisions/platform": "^1.1.
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@telia-ace/widget-developer-tools": "1.0.23"
|
|
5
|
+
"@webprovisions/platform": "^1.1.4"
|
|
28
6
|
},
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"module": "./index.mjs",
|
|
9
|
+
"typings": "./index.d.ts"
|
|
33
10
|
}
|
package/LICENSE.txt
DELETED
package/README.md
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/append-class-names.ts","../src/batch.ts","../src/camilize.ts","../src/create-params.ts","../src/find-category-by-id.ts","../src/format-url.ts","../src/category-trail.ts","../src/data-uri-to-blob.ts","../src/debug.ts","../src/deep-clone.ts","../src/find-and-activate-stored-widgets.ts","../src/format-date.ts","../src/get-cookie.ts","../src/hash.ts","../src/html-parent-contains.ts","../src/kebab-case.ts","../src/lock.ts","../src/merge-deep.ts","../src/notify-data-loaded.ts","../src/remove-null-and-undefined-values.ts","../src/set-cookie.ts","../src/shallow-compare.ts","../src/uuid.ts","../src/wait-for.ts"],"sourcesContent":["import { Logger } from '.';\n\ntype ArgumentHandler = string | [boolean, string | string[]] | undefined;\n\nexport function uniqueClassArray(classNames: string[]) {\n const classArray: string[] = [];\n classNames.forEach((c) => {\n if (classArray.indexOf(c) === -1) {\n classArray.push(c);\n }\n });\n return classArray;\n}\n\nexport function append(className1 = '', className2 = '') {\n const classNames = className1.split(' ').concat(className2.split(' '));\n return uniqueClassArray(classNames).join(' ').trim();\n}\n\nexport function handleFunctionArgument(expression: boolean, classes: string | string[]) {\n if (Boolean(expression)) {\n if (typeof classes === 'string') {\n return classes;\n }\n if (Array.isArray(classes)) {\n let className = '';\n classes.forEach((c) => (className = append(className, c)));\n return className;\n }\n }\n}\n\nexport default function appendClassNames(...args: ArgumentHandler[]): string {\n let className: string = '';\n if (args.length) {\n args.forEach((argument: ArgumentHandler) => {\n if (typeof argument === 'string') {\n className = append(className, argument as string);\n } else if (Array.isArray(argument)) {\n className = append(className, handleFunctionArgument(...argument));\n } else if (typeof argument !== 'undefined' && argument !== null) {\n if (process.env.NODE_ENV !== 'production') {\n Logger.warn(\n 'appendClassNames: arguments either have' +\n 'to be a string or [boolean, ...string[]]. Passed args:',\n ...args\n );\n }\n }\n });\n }\n return className;\n}\n","export type BatchFunction<T> = (acc: T) => T;\nexport type Batch<T> = (fn: BatchFunction<T>) => Promise<T>;\n\nconst createBatch = <T>(delay: number, createFallback: () => T): Batch<T> => {\n let timeout: ReturnType<typeof setTimeout>;\n let queue: [BatchFunction<T>, (value: T | PromiseLike<T>) => void, (reason?: any) => void][] =\n [];\n\n return (fn: BatchFunction<T>): Promise<T> => {\n clearTimeout(timeout);\n return new Promise<T>((resolve, reject) => {\n queue.push([fn, resolve, reject]);\n timeout = setTimeout(() => {\n let acc = createFallback();\n queue.forEach(([fn, resolve, reject]) => {\n acc = fn(acc);\n });\n queue = [];\n resolve(acc);\n }, delay);\n });\n };\n};\n\nexport default createBatch;\n","export default function camilize(obj: any): any {\n const camilizedObject: any = {};\n if (typeof obj === 'number' || typeof obj === 'string') {\n return obj;\n }\n for (const prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n const p = obj[prop];\n const camilizedProp = prop.substring(0, 1).toLowerCase() + prop.substring(1);\n if (Object.prototype.toString.call(p) === '[object Array]') {\n camilizedObject[camilizedProp] = [];\n for (let i = 0, c = p.length; i < c; i++) {\n // tslint:disable-line no-increment-decrement\n camilizedObject[camilizedProp].push(camilize(p[i]));\n }\n } else if (p !== null && typeof p === 'object') {\n camilizedObject[camilizedProp] = camilize(p);\n } else {\n camilizedObject[camilizedProp] = p;\n }\n }\n }\n return camilizedObject;\n}\n","export type Input = {\n phrase?: string;\n category?: ParamValue;\n guideCategory?: ParamValue;\n contactCategory?: ParamValue;\n take?: number;\n connectionKey?: string;\n id?: string;\n uriName?: string;\n sorting?: string;\n tag?: string | string[];\n tagId?: string | number;\n tagTitle?: string;\n} & { [key: string]: ParamValue };\n\nexport type ParamValue = string | number | any;\n\nexport type Params = { [key: string]: ParamValue };\n\nexport default function createParams(args: Input = {}): Params {\n const {\n phrase = '',\n category,\n guideCategory,\n contactCategory,\n take,\n connectionKey,\n accordion,\n id,\n uriName,\n sorting,\n tag,\n tagId,\n tagTitle,\n ...other\n } = args;\n const params: Params = {};\n\n Object.keys(other).forEach((k) => {\n if (typeof args[k] === 'string') {\n params[k] = args[k];\n }\n });\n\n if (typeof phrase === 'string' && phrase.length) {\n params.phrase = phrase;\n }\n\n if (phrase === null) {\n params.phrase = phrase;\n }\n\n if (typeof guideCategory === 'string' && guideCategory !== '0') {\n params.guideCategory = guideCategory;\n }\n if (typeof guideCategory === 'number' && guideCategory !== 0) {\n params.guideCategory = guideCategory;\n }\n if (typeof guideCategory === 'object' && guideCategory !== null) {\n if (typeof guideCategory.id === 'string' && guideCategory.id !== '0') {\n params.guideCategory = guideCategory.id;\n }\n if (typeof guideCategory.id === 'number' && guideCategory.id !== 0) {\n params.guideCategory = guideCategory.id;\n }\n }\n\n if (typeof contactCategory === 'string' && contactCategory !== '0') {\n params.contactCategory = contactCategory;\n }\n if (typeof contactCategory === 'number' && contactCategory !== 0) {\n params.contactCategory = contactCategory;\n }\n if (typeof contactCategory === 'object' && contactCategory !== null) {\n if (typeof contactCategory.id === 'string' && contactCategory.id !== '0') {\n params.contactCategory = contactCategory.id;\n }\n if (typeof contactCategory.id === 'number' && contactCategory.id !== 0) {\n params.contactCategory = contactCategory.id;\n }\n }\n\n if (typeof category === 'string' && category !== '0') {\n params.category = category;\n }\n if (typeof category === 'number' && category !== 0) {\n params.category = category;\n }\n if (typeof category === 'object' && category !== null) {\n if (typeof category.id === 'string' && category.id !== '0') {\n params.category = category.id;\n }\n if (typeof category.id === 'number' && category.id !== 0) {\n params.category = category.id;\n }\n }\n\n if (id) {\n params.id = id;\n }\n\n if (\n uriName &&\n (!!+params.category ||\n !!+params.guideCategory ||\n !!+params.guide ||\n !!+params.contactCategory ||\n !!+params.contactMethod)\n ) {\n params.uriName = uriName;\n }\n\n if (connectionKey) {\n params.connectionKey = connectionKey;\n }\n\n if (take) {\n params.take = take;\n }\n\n if (sorting) {\n params.sorting = sorting;\n }\n\n if (typeof accordion === 'string' && accordion.length > 0) {\n params.accordion = accordion;\n }\n\n if (typeof tag === 'string' && tag !== '0') {\n params.tag = tag;\n }\n if (typeof tag === 'number' && tag !== 0) {\n params.tag = tag;\n }\n if (Array.isArray(tag) && tag.length) {\n params.tag = tag;\n }\n\n if (typeof tagId === 'string' || typeof tagId === 'number') {\n params.tagId = tagId;\n }\n if (typeof tagTitle === 'string') {\n params.tagTitle = tagTitle;\n }\n\n if (typeof params.tag === 'string') {\n params.tag = params.tag.split(',');\n }\n\n return params;\n}\n","/**\n * Recursively find items\n * @param data Data to look in\n */\nfunction* processData(data: any[]): any {\n if (!data) {\n return;\n }\n\n // tslint:disable-next-line:no-increment-decrement\n for (let i = 0; i < data.length; i++) {\n const val = data[i];\n yield val;\n\n if (val.items) {\n yield* processData(val.items);\n }\n }\n}\n\n/**\n * Find a category by it's ID\n * @param id Id of category to find\n */\nconst findCategoryById = (id: string, categories: any) => {\n const it = processData(categories);\n let res = it.next();\n\n let found = null;\n\n while (!res.done) {\n if (res.value.id === id) {\n found = res.value;\n }\n\n res = it.next();\n }\n\n return found;\n};\n\nexport default findCategoryById;\n","const formatUrl = (url: string): string => {\n if (!url) {\n return '';\n }\n\n const replacements = [\n { from: /[äæǽ]+/gi, to: 'ae' },\n { from: /[öœ]+/gi, to: 'oe' },\n { from: /[ü]+/gi, to: 'ue' },\n { from: /[Ä]+/gi, to: 'Ae' },\n { from: /[Ü]+/gi, to: 'Ue' },\n { from: /[Ö]+/gi, to: 'Oe' },\n { from: /[ÀÁÂÃÄÅǺĀĂĄǍΑΆẢẠẦẪẨẬẰẮẴẲẶА]+/gi, to: 'A' },\n { from: /[àáâãåǻāăąǎªαάảạầấẫẩậằắẵẳặа]+/gi, to: 'a' },\n { from: /[Б]+/gi, to: 'B' },\n { from: /[б]+/gi, to: 'b' },\n { from: /[ÇĆĈĊČ]+/gi, to: 'C' },\n { from: /[çćĉċč]+/gi, to: 'c' },\n { from: /[Д]+/gi, to: 'D' },\n { from: /[д]+/gi, to: 'd' },\n { from: /[ÐĎĐΔ]+/gi, to: 'Dj' },\n { from: /[ðďđδ]+/gi, to: 'dj' },\n { from: /[ÈÉÊËĒĔĖĘĚΕΈẼẺẸỀẾỄỂỆЕЭ]+/gi, to: 'E' },\n { from: /[èéêëēĕėęěέεẽẻẹềếễểệеэ]+/gi, to: 'e' },\n { from: /[Ф]+/gi, to: 'F' },\n { from: /[ф]+/gi, to: 'f' },\n { from: /[ĜĞĠĢΓГҐ]+/gi, to: 'G' },\n { from: /[ĝğġģγгґ]+/gi, to: 'g' },\n { from: /[ĤĦ]+/gi, to: 'H' },\n { from: /[ĥħ]+/gi, to: 'h' },\n { from: /[ÌÍÎÏĨĪĬǏĮİΗΉΊΙΪỈỊИЫ]+/gi, to: 'I' },\n { from: /[ìíîïĩīĭǐįıηήίιϊỉịиыї]+/gi, to: 'i' },\n { from: /[Ĵ]+/gi, to: 'J' },\n { from: /[ĵ]+/gi, to: 'j' },\n { from: /[ĶΚК]+/gi, to: 'K' },\n { from: /[ķκк]+/gi, to: 'k' },\n { from: /[ĹĻĽĿŁΛЛ]+/gi, to: 'L' },\n { from: /[ĺļľŀłλл]+/gi, to: 'l' },\n { from: /[М]+/gi, to: 'M' },\n { from: /[м]+/gi, to: 'm' },\n { from: /[ÑŃŅŇΝН]+/gi, to: 'N' },\n { from: /[ñńņňʼnνн]+/gi, to: 'n' },\n { from: /[ÒÓÔÕŌŎǑŐƠØǾΟΌΩΏỎỌỒỐỖỔỘỜỚỠỞỢО]+/gi, to: 'O' },\n { from: /[òóôõōŏǒőơøǿºοόωώỏọồốỗổộờớỡởợо]+/gi, to: 'o' },\n { from: /[П]+/gi, to: 'P' },\n { from: /[п]+/gi, to: 'p' },\n { from: /[ŔŖŘΡР]+/gi, to: 'R' },\n { from: /[ŕŗřρр]+/gi, to: 'r' },\n { from: /[ŚŜŞȘŠΣС]+/gi, to: 'S' },\n { from: /[śŝşșšſσςс]+/gi, to: 's' },\n { from: /[ȚŢŤŦτТ]+/gi, to: 'T' },\n { from: /[țţťŧт]+/gi, to: 't' },\n { from: /[ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛŨỦỤỪỨỮỬỰУ]+/gi, to: 'U' },\n { from: /[ùúûũūŭůűųưǔǖǘǚǜυύϋủụừứữửựу]+/gi, to: 'u' },\n { from: /[ÝŸŶΥΎΫỲỸỶỴЙ]+/gi, to: 'Y' },\n { from: /[ýÿŷỳỹỷỵй]+/gi, to: 'y' },\n { from: /[В]+/gi, to: 'V' },\n { from: /[в]+/gi, to: 'v' },\n { from: /[Ŵ]+/gi, to: 'W' },\n { from: /[ŵ]+/gi, to: 'w' },\n { from: /[ŹŻŽΖЗ]+/gi, to: 'Z' },\n { from: /[źżžζз]+/gi, to: 'z' },\n { from: /[ÆǼ]+/gi, to: 'AE' },\n { from: /[ß]+/gi, to: 'ss' },\n { from: /[IJ]+/gi, to: 'IJ' },\n { from: /[ij]+/gi, to: 'ij' },\n { from: /[Œ]+/gi, to: 'OE' },\n { from: /[ƒ]+/gi, to: 'f' },\n { from: /[ξ]+/gi, to: 'ks' },\n { from: /[π]+/gi, to: 'p' },\n { from: /[β]+/gi, to: 'v' },\n { from: /[μ]+/gi, to: 'm' },\n { from: /[ψ]+/gi, to: 'ps' },\n { from: /[Ё]+/gi, to: 'Yo' },\n { from: /[ё]+/gi, to: 'yo' },\n { from: /[Є]+/gi, to: 'Ye' },\n { from: /[є]+/gi, to: 'ye' },\n { from: /[Ї]+/gi, to: 'Yi' },\n { from: /[Ж]+/gi, to: 'Zh' },\n { from: /[ж]+/gi, to: 'zh' },\n { from: /[Х]+/gi, to: 'Kh' },\n { from: /[х]+/gi, to: 'kh' },\n { from: /[Ц]+/gi, to: 'Ts' },\n { from: /[ц]+/gi, to: 'ts' },\n { from: /[Ч]+/gi, to: 'Ch' },\n { from: /[ч]+/gi, to: 'ch' },\n { from: /[Ш]+/gi, to: 'Sh' },\n { from: /[ш]+/gi, to: 'sh' },\n { from: /[Щ]+/gi, to: 'Shch' },\n { from: /[щ]+/gi, to: 'shch' },\n { from: /[ЪъЬь]+/gi, to: '' },\n { from: /[Ю]+/gi, to: 'Yu' },\n { from: /[ю]+/gi, to: 'yu' },\n { from: /[Я]+/gi, to: 'Ya' },\n { from: /[я]+/gi, to: 'ya' },\n ];\n\n const alphanumericExpression = /[^a-zA-Z0-9]+/g;\n const trailingDashExpression = /[-]$/;\n\n let parsed = url;\n\n for (const i in replacements) {\n if (replacements.hasOwnProperty(i) && replacements[i].from.test(url)) {\n parsed = parsed.replace(replacements[i].from, replacements[i].to);\n }\n }\n\n parsed = parsed.replace(alphanumericExpression, '-');\n parsed = parsed.replace(trailingDashExpression, '');\n parsed = parsed.toLowerCase();\n\n return parsed || 'humany';\n};\n\nexport default formatUrl;\n","import { Container } from '@webprovisions/platform';\nimport createParams from './create-params';\nimport { default as findCategoryById } from './find-category-by-id';\nimport formatUrl from './format-url';\n\ntype Item = { id: string; items?: Item[]; title: string; symbol?: any };\n\ntype ChildParentStructure = {\n [key: number]: string;\n};\n\nfunction childParentStructure(\n items: Item[],\n structure: ChildParentStructure = {},\n parent?: string\n) {\n items.forEach((item: Item) => {\n if (parent) {\n structure[+item.id] = parent;\n }\n if (item.items) {\n childParentStructure(item.items, structure, item.id);\n }\n });\n return structure;\n}\n\nexport function categoryTrail(\n id: string,\n items: Item[],\n ids: string[] = [id],\n structure: ChildParentStructure = childParentStructure(items)\n): string[] {\n const addAncestors = (id: string) => {\n const parentId = structure[+id];\n if (parentId) {\n ids.unshift(parentId);\n addAncestors(parentId);\n }\n };\n\n const parentId = structure[+id];\n if (parentId) {\n ids.unshift(parentId);\n addAncestors(parentId);\n }\n\n return ids;\n}\n\nexport const getCategoryTrailAsObjects = (\n trail: string[],\n categories: Item[]\n): Map<string, Item> => {\n if (typeof trail === 'undefined' || typeof categories === 'undefined') {\n return new Map();\n }\n\n return new Map(\n trail.map((categoryId: any): [string, any] => {\n const category = findCategoryById(categoryId, categories);\n\n return [categoryId, category];\n })\n );\n};\n\nexport const buildCategoryTrail = (\n routeName: string,\n categoryIds: string | string[],\n container: Container,\n dataType: 'guide-categories' | 'contact-method-categories' = 'guide-categories'\n): Promise<any[]> => {\n return container.getAsync('dataClient').then((dataClient) => {\n return dataClient\n .fetch(dataType, { expandCategories: 'descendants' })\n .then(({ categories }: any) => {\n const buildTrail = (id: string) => {\n const trail: string[] = categoryTrail(id, categories);\n const objectTrail = getCategoryTrailAsObjects(trail, categories);\n\n const result: any[] = [];\n\n trail.forEach((categoryId) => {\n const category = objectTrail.get(categoryId);\n if (category) {\n result.push({\n routeName,\n title: category.title,\n symbol: category.symbol,\n id: category.id,\n routeParams:\n dataType === 'contact-method-categories'\n ? createParams({\n contactCategory: category.id,\n uriName: formatUrl(category.title),\n })\n : createParams({\n guideCategory: category.id,\n uriName: formatUrl(category.title),\n }),\n });\n }\n });\n\n return result;\n };\n\n if (Array.isArray(categoryIds)) {\n return categoryIds.reduce<any>((acc, id) => {\n const result = buildTrail(id);\n\n if (result.length > 0) {\n acc.push(result);\n }\n\n return acc;\n }, []);\n }\n\n return buildTrail(categoryIds);\n });\n });\n};\n","const dataURItoBlob = (dataURI: string) => {\n let byteString;\n let mimestring;\n\n if (dataURI.split(',')[0].indexOf('base64') !== -1) {\n byteString = atob(dataURI.split(',')[1]);\n } else {\n byteString = decodeURI(dataURI.split(',')[1]);\n }\n\n mimestring = dataURI.split(',')[0].split(':')[1].split(';')[0];\n\n const content = [];\n for (let i = 0; i < byteString.length; i++) {\n // tslint:disable-line no-increment-decrement\n content[i] = byteString.charCodeAt(i);\n }\n\n return new Blob([new Uint8Array(content)], { type: mimestring });\n};\n\nexport default dataURItoBlob;\n","/**\n * Checks if process.env.NODE_ENV === 'production'\n * and passes arguments to console.warn().\n */\nexport function debugLog(...args: any[]) {\n return process.env.NODE_ENV !== 'production' && console && console.warn(...args);\n}\n\ntype Print = (message?: any, ...optionalParams: any[]) => void;\n\nconst print = (print: Print, msgOrObj?: any, ...args: any[]) => {\n if (typeof msgOrObj === 'string') {\n return print(`[humany] ${msgOrObj}`, ...args);\n }\n return print(msgOrObj, ...args);\n};\n\n/**\n * Simple internal log-handler\n */\nexport class Logger {\n private keys: string[] = [];\n\n private lookup(key: string, fn: () => void): void {\n if (this.keys.indexOf(key) === -1) {\n this.keys.push(key);\n fn();\n }\n }\n\n /**\n * Passes args to console.log\n */\n static log = (...args: any[]) => print(console.log, ...args);\n\n /**\n * Passes args to console.warn\n */\n static warn = (...args: any[]) => print(console.warn, ...args);\n\n /**\n * Passes args to console.error\n */\n static error = (...args: any[]) => print(console.error, ...args);\n\n /**\n * Passes args to console.info\n */\n static info = (...args: any[]) => print(console.info, ...args);\n\n /**\n * Checks if key already has been logged.\n * If not, passes following args to console.log\n * and stores key in logged messages.\n */\n public log = (key: string, ...args: any[]): void => this.lookup(key, () => Logger.log(...args));\n\n /**\n * Checks if key already has been logged.\n * If not, passes following args to console.warn\n * and stores key in logged messages.\n */\n public warn = (key: string, ...args: any[]): void =>\n this.lookup(key, () => Logger.warn(...args));\n\n /**\n * Checks if key already has been logged.\n * If not, passes following args to console.error\n * and stores key in logged messages.\n */\n public error = (key: string, ...args: any[]): void =>\n this.lookup(key, () => Logger.error(...args));\n\n /**\n * Checks if key already has been logged.\n * If not, passes following args to console.info\n * and stores key in logged messages.\n */\n public info = (key: string, ...args: any[]): void =>\n this.lookup(key, () => Logger.info(...args));\n}\n","// todo: consolidate with merge in component platform\nconst deepClone = <Type>(data: Type): Type => {\n let out: any = {};\n let value;\n let key;\n\n // If it's not an object return the original data\n if (typeof data !== 'object' || data === null) {\n return data;\n }\n\n // Create array if data is array, otherwise create an object\n out = Array.isArray(data) ? [] : {};\n\n for (key in data) {\n value = (data as { [key: string]: any })[key];\n\n // Copy nested objects and arrays recursively\n out[key] = typeof value === 'object' && value !== null ? deepClone(value) : value;\n }\n\n return out;\n};\n\nexport default deepClone;\n","import { hash } from '.';\n\n/**\n * Looks for stored widgets on the implementation in localStorage\n * and adds a trigger link to the DOM.\n *\n * TODO: A more robust version have been discussed, where the storageService is added to the\n * implementation instead of the widget.\n */\nexport default (implementation: any) => {\n if (!implementation) {\n return null;\n }\n\n const implementationStorage = localStorage.getItem(\n `humany_${hash(implementation.tenant + implementation.name)}`\n );\n\n if (implementationStorage) {\n const { activeStickyWidget } = JSON.parse(implementationStorage);\n if (activeStickyWidget && activeStickyWidget.value) {\n const widget = implementation.widgets.get(activeStickyWidget.value);\n if (widget) {\n const el = document.createElement('a');\n el.setAttribute(\n 'href',\n `//${implementation.bindings[0]}/${activeStickyWidget.value}`\n );\n document.body.appendChild(el);\n }\n }\n }\n};\n","export default (date: any, includeTime: boolean = false) => {\n const d = new Date(date);\n let month = `${d.getMonth() + 1}`;\n let day = `${d.getDate()}`;\n const year = d.getFullYear();\n\n if (month.length < 2) month = `0${month}`;\n if (day.length < 2) day = `0${day}`;\n\n if (includeTime) {\n let hours = `${d.getHours()}`;\n let minutes = `${d.getMinutes()}`;\n\n if (hours.length < 2) hours = `0${hours}`;\n if (minutes.length < 2) minutes = `0${minutes}`;\n\n return `${[year, month, day].join('-')} ${[hours, minutes].join(':')}`;\n }\n\n return [year, month, day].join('-');\n};\n","export default function getCookie(cookieName: string) {\n const documentCookie = document.cookie;\n if (documentCookie.length > 0) {\n let start = documentCookie.indexOf(`${cookieName}=`);\n if (start !== -1) {\n start = start + cookieName.length + 1;\n let end = documentCookie.indexOf(';', start);\n if (end === -1) {\n end = documentCookie.length;\n }\n return unescape(documentCookie.substring(start, end));\n }\n }\n return null;\n}\n","export default function (s: string): string {\n let hash = 0;\n if (s.length === 0) {\n return hash.toString();\n }\n // tslint:disable-next-line:no-increment-decrement\n for (let i = 0; i < s.length; i++) {\n const char = s.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash = hash & hash;\n }\n return hash.toString();\n}\n","/**\n * Checks whether or not the passed child is a descendant\n * of the passed parent.\n * Will return true if falsey parent or child.\n */\nexport default (parent: HTMLElement | Window, child: Element | null): boolean => {\n if (!parent || !child) {\n return true;\n }\n\n let node = child.parentNode;\n let hasChild = false;\n while (node !== null) {\n if (node === parent) {\n hasChild = true;\n }\n node = node.parentNode;\n }\n\n return hasChild;\n};\n","export default function kebabCase(string: string) {\n return string\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/\\s+/g, '-')\n .toLowerCase();\n}\n","import { Logger } from './debug';\n\ntype Task = () => Promise<any> | any;\n\nclass Queue {\n tasks: {\n task: Task;\n resolve: (data?: any) => any;\n reject: (data?: any) => any;\n done: () => void;\n }[] = [];\n current: Promise<any> = Promise.resolve();\n\n constructor(private lockWarningTime: number, private lockErrorTime: number) {\n this.next = this.next.bind(this);\n }\n\n add(\n task: Task,\n resolve: (data?: any) => any,\n reject: (data?: any) => any,\n done: () => void\n ): void {\n this.tasks.push({ task, resolve, reject, done });\n this.next();\n }\n\n next(): void {\n this.current = this.current.then(() => {\n const next = this.tasks.shift();\n if (next) {\n let errorTimeout: any; // NodeJS.Timeout\n const warningTimeout = setTimeout(() => {\n if (process.env.NODE_ENV !== 'production') {\n // tslint:disable-next-line max-line-length\n Logger.warn(\n `A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,\n next\n );\n }\n errorTimeout = setTimeout(() => {\n next.reject('lock timeout exceeded');\n }, this.lockErrorTime);\n }, this.lockWarningTime);\n const taskPromise = Promise.resolve(next.task()).then((result) => {\n clearTimeout(warningTimeout);\n clearTimeout(errorTimeout);\n return result;\n });\n return Promise.resolve(taskPromise)\n .then(this.next)\n .then(() =>\n taskPromise.then((data) => {\n next.done();\n next.resolve(data);\n })\n )\n .catch((reason) => {\n next.done();\n next.reject(reason);\n return this.next();\n });\n }\n return Promise.resolve();\n });\n }\n}\n\nexport type AddTask = (task: Task) => Promise<any>;\n\nconst locks = new WeakMap();\n\n/**\n * Creates a lock for the specified owner that allows only one executing\n * task simultaneously.\n * @param key Lock owner.\n */\nexport default function lock(key: object, lockWarningTime = 5000, lockErrorTime = 1000): AddTask {\n if (!locks.has(key)) {\n locks.set(key, new Queue(lockWarningTime, lockErrorTime));\n }\n return (task: Task): Promise<any> => {\n return new Promise((resolve, reject) => {\n const queue: Queue = locks.get(key);\n queue.add(task, resolve, reject, () => {\n if (!queue.tasks.length) {\n locks.delete(key);\n }\n });\n });\n };\n}\n","import deepClone from './deep-clone';\n\nconst isObject = (item: any): boolean => {\n return !!item && typeof item === 'object' && !Array.isArray(item);\n};\n\n/**\n * @param target Target to merge into\n * @param sources Source to merge into target\n * @returns Clone (new reference) with merged sources\n */\nconst mergeDeep = <Target, Source>(target: Target, ...sources: Source[]): Target & Source => {\n const clonedTarget = deepClone(target);\n const clonedSources = deepClone(sources);\n return mergeDeepRecursive(clonedTarget, ...clonedSources);\n};\n\nconst mergeDeepRecursive = (target: any, ...sources: any[]): any => {\n if (!sources.length) return target;\n const source = sources.shift();\n\n if (isObject(target) && isObject(source)) {\n for (const key in source) {\n if (isObject(source[key])) {\n if (!target[key]) Object.assign(target, { [key]: {} });\n mergeDeepRecursive(target[key], source[key]);\n } else {\n Object.assign(target, { [key]: source[key] });\n }\n }\n }\n return mergeDeepRecursive(target, ...sources);\n};\n\nexport default mergeDeep;\n","import { Container, Widget } from '@webprovisions/platform';\n\n/**\n * Dispatch widget:data-loaded event when all components\n * is considered to be finished loading their initial data\n */\nconst watchForLoadingComplete = (container: Container, widgetDOMElement: HTMLElement) => {\n const isLoading = () => widgetDOMElement.querySelectorAll('[data-loading=true]').length > 0;\n\n const complete = () => {\n let dispatched = false;\n\n return () => {\n if (dispatched) {\n return;\n }\n const widget: Widget = container.get('$widget');\n\n widget.events.dispatch('widget:data-loaded', {\n element: widgetDOMElement,\n });\n dispatched = true;\n };\n };\n\n const handleComplete = complete();\n\n if (!isLoading()) {\n return handleComplete();\n }\n\n const observer = new MutationObserver((mutations, observer) => {\n const check = mutations.find(\n (mutation) =>\n mutation.type === 'attributes' && mutation.attributeName === 'data-loading'\n );\n\n if (check && !isLoading()) {\n observer.disconnect();\n handleComplete();\n }\n });\n\n observer.observe(widgetDOMElement, {\n attributes: true,\n childList: true,\n subtree: true,\n });\n};\n\n/**\n * Wait for all visible components to render\n */\nconst notifyDataLoaded = (viewOutletContainer: Container, widgetDOMElement: HTMLElement) => {\n const widget: Widget = viewOutletContainer.get('$widget');\n\n widget.container.getAsync('components').then((components: any) => {\n components.events.subscribeOnce('components:component-model-initialized', () => {\n // Store the names of all visible components we should wait for\n let waitingFor: string[] = components.nodes.visible.reduce(\n (acc: string[], node: any) => {\n if (\n !node.name ||\n !node.type ||\n node.type === 'view' ||\n node.type === 'root' ||\n node.attributes.layout.size === 'none' ||\n widgetDOMElement.querySelector(`[data-name=\"${node.name}\"]`)\n ) {\n return acc;\n }\n\n acc.push(node.name);\n return acc;\n },\n []\n );\n\n let complete = false;\n const observer = new MutationObserver((mutations, observer) => {\n mutations.forEach((mutation) => {\n if (mutation.addedNodes) {\n const componentElements = Array.from(\n mutation.addedNodes as NodeListOf<HTMLElement>\n ).reduce<string[]>((acc, element) => {\n const dataName =\n element.getAttribute && element.getAttribute('data-name');\n\n if (dataName && waitingFor.indexOf(dataName) > -1) {\n acc.push(dataName);\n }\n return acc;\n }, []);\n\n // Remove added elements from the list of elements we are waiting for\n waitingFor = waitingFor.filter((name: string) => {\n return componentElements.indexOf(name) === -1;\n });\n\n // When the list is empty, we are finished waiting for components to render\n if (!complete && waitingFor.length === 0) {\n complete = true;\n // Creates a new observer that observes data-loading changes\n watchForLoadingComplete(viewOutletContainer, widgetDOMElement);\n observer.disconnect();\n }\n }\n });\n });\n\n observer.observe(widgetDOMElement, {\n attributes: false,\n characterData: false,\n childList: true,\n subtree: true,\n attributeOldValue: false,\n characterDataOldValue: false,\n });\n });\n });\n};\n\nexport default notifyDataLoaded;\n","const removeNullAndUndefinedValues = (object: { [key: string]: any } = {}) => {\n Object.keys(object).forEach((key) => {\n if (object[key] === null || typeof object[key] === 'undefined') {\n delete object[key];\n }\n });\n return object;\n};\n\nexport default removeNullAndUndefinedValues;\n","export default function setCookie(cookieName: string, value: any, days: number) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = `; expires=${date.toUTCString()}`;\n }\n document.cookie = `${cookieName}=${value}${expires}; path=/`;\n}\n","export default (a: { [key: string]: any }, b: { [key: string]: any }): boolean => {\n let equal = true;\n\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n const missingKey = Object.keys(a).some((key) => {\n const found = Object.keys(b).some((bKey) => {\n return key === bKey;\n });\n\n return !found;\n });\n\n if (missingKey) {\n return false;\n }\n\n Object.keys(a).forEach((key) => {\n if (equal) {\n const c = typeof a[key] === 'undefined' ? '' : a[key];\n const d = typeof b[key] === 'undefined' ? '' : b[key];\n equal = c.toString() === d.toString();\n }\n });\n\n return equal;\n};\n","const s4 = () => {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n};\n\nexport default function uuid() {\n // tslint:disable-next-line prefer-template\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}\n","type Action = (...args: any[]) => Function | false;\n\nexport type WaitForOptions = {\n callCount?: number;\n};\n\nexport default class WaitFor {\n private queue: Action[] = [];\n private queueAttempt: any;\n private queueAttemptCalls: number = 0;\n private callCount = 5;\n\n constructor(options?: WaitForOptions) {\n if (options && options.callCount) {\n this.callCount = options.callCount;\n }\n }\n\n /**\n * Add action to the queue\n */\n add = (action: Action) => {\n this.queue.push(action);\n\n this.queueAttempt = setInterval(this.processQueue, 1000);\n };\n\n /**\n * Go through queue and attempt to call each action\n */\n processQueue = () => {\n if (this.queue.length > 0) {\n const indexOfActionsEmitted: number[] = [];\n this.queue.forEach((queuedAction, index) => {\n const evaluate = queuedAction();\n\n if (typeof evaluate === 'function') {\n evaluate();\n indexOfActionsEmitted.push(index);\n }\n });\n\n // clean up queue\n this.queue = this.queue.filter((_, index) => {\n if (indexOfActionsEmitted.indexOf(index) > -1) {\n return false;\n }\n return true;\n });\n\n if (this.queueAttempt) {\n clearInterval(this.queueAttempt);\n }\n }\n\n if (this.queueAttemptCalls > this.callCount) {\n clearInterval(this.queueAttempt);\n this.queueAttemptCalls = 0;\n }\n\n this.queueAttemptCalls = this.queueAttemptCalls + 1;\n };\n}\n"],"names":["uniqueClassArray","classNames","classArray","c","append","className1","className2","handleFunctionArgument","expression","classes","className","appendClassNames","args","argument","Logger","createBatch","delay","createFallback","timeout","queue","fn","resolve","reject","acc","createBatch$1","camilize","obj","camilizedObject","prop","p","camilizedProp","i","createParams","_a","phrase","category","guideCategory","contactCategory","take","connectionKey","accordion","id","uriName","sorting","tag","tagId","tagTitle","other","__objRest","params","k","processData","data","val","findCategoryById","categories","it","res","found","findCategoryById$1","formatUrl","url","replacements","alphanumericExpression","trailingDashExpression","parsed","formatUrl$1","childParentStructure","items","structure","parent","item","categoryTrail","ids","addAncestors","parentId","getCategoryTrailAsObjects","trail","categoryId","buildCategoryTrail","routeName","categoryIds","container","dataType","dataClient","buildTrail","objectTrail","result","dataURItoBlob","dataURI","byteString","mimestring","content","dataURItoBlob$1","debugLog","print","msgOrObj","_Logger","key","deepClone","out","value","deepClone$1","findAndActivateStoredWidgets","implementation","implementationStorage","hash","activeStickyWidget","el","formatDate","date","includeTime","d","month","day","year","hours","minutes","getCookie","cookieName","documentCookie","start","end","s","char","htmlParentContains","child","node","hasChild","kebabCase","string","Queue","lockWarningTime","lockErrorTime","task","done","next","errorTimeout","warningTimeout","taskPromise","reason","locks","lock","isObject","mergeDeep","target","sources","clonedTarget","clonedSources","mergeDeepRecursive","source","mergeDeep$1","watchForLoadingComplete","widgetDOMElement","isLoading","handleComplete","dispatched","mutations","observer","mutation","notifyDataLoaded","viewOutletContainer","components","waitingFor","complete","componentElements","element","dataName","name","notifyDataLoaded$1","removeNullAndUndefinedValues","object","removeNullAndUndefinedValues$1","setCookie","days","expires","shallowCompare","a","b","equal","bKey","s4","uuid","WaitFor","options","action","indexOfActionsEmitted","queuedAction","index","evaluate","_"],"mappings":";;;;;;;;;;;AAIO,SAASA,EAAiBC,GAAsB;AACnD,QAAMC,IAAuB,CAAA;AAClB,SAAAD,EAAA,QAAQ,CAACE,MAAM;AACtB,IAAID,EAAW,QAAQC,CAAC,MAAM,MAC1BD,EAAW,KAAKC,CAAC;AAAA,EACrB,CACH,GACMD;AACX;AAEO,SAASE,EAAOC,IAAa,IAAIC,IAAa,IAAI;AAC/C,QAAAL,IAAaI,EAAW,MAAM,GAAG,EAAE,OAAOC,EAAW,MAAM,GAAG,CAAC;AACrE,SAAON,EAAiBC,CAAU,EAAE,KAAK,GAAG,EAAE;AAClD;AAEgB,SAAAM,EAAuBC,GAAqBC,GAA4B;AAChF,MAAQD,GAAa;AACjB,QAAA,OAAOC,KAAY;AACZ,aAAAA;AAEP,QAAA,MAAM,QAAQA,CAAO,GAAG;AACxB,UAAIC,IAAY;AAChB,aAAAD,EAAQ,QAAQ,CAACN,MAAOO,IAAYN,EAAOM,GAAWP,CAAC,CAAE,GAClDO;AAAA;AAAA;AAGnB;AAEA,SAAwBC,KAAoBC,GAAiC;AACzE,MAAIF,IAAoB;AACxB,SAAIE,EAAK,UACAA,EAAA,QAAQ,CAACC,MAA8B;AACpC,IAAA,OAAOA,KAAa,WACRH,IAAAN,EAAOM,GAAWG,CAAkB,IACzC,MAAM,QAAQA,CAAQ,IAC7BH,IAAYN,EAAOM,GAAWH,EAAuB,GAAGM,CAAQ,CAAC,IAC1D,OAAOA,KAAa,eAAeA,MAAa,QACnD,QAAQ,IAAI,aAAa,gBAClBC,EAAA;AAAA,MACH;AAAA,MAEA,GAAGF;AAAA,IAAA;AAAA,EAGf,CACH,GAEEF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AAK,OAAO,IAAI,KAAK,OAAO,KAAK,KAAO,EAC1C,SAAS,EAAE,EACX,UAAU,CAAC;AAGpB,SAAwBC,KAAO;AAE3B,SAAOD,EAAO,IAAAA,MAAO,MAAMA,EAAA,IAAO,MAAMA,EAAA,IAAO,MAAMA,EAAO,IAAA,MAAMA,EAAO,IAAAA,EAAA,IAAOA;AACpF;ACHA,MAAqBE,GAAQ;AAAA,EAMzB,YAAYC,GAA0B;AALtC,SAAQ,QAAkB,IAE1B,KAAQ,oBAA4B,GACpC,KAAQ,YAAY,GAWpB,KAAA,MAAM,CAACC,MAAmB;AACjB,WAAA,MAAM,KAAKA,CAAM,GAEtB,KAAK,eAAe,YAAY,KAAK,cAAc,GAAI;AAAA,IAAA,GAM3D,KAAA,eAAe,MAAM;AACb,UAAA,KAAK,MAAM,SAAS,GAAG;AACvB,cAAMC,IAAkC,CAAA;AACxC,aAAK,MAAM,QAAQ,CAACC,GAAcC,MAAU;AACxC,gBAAMC,IAAWF;AAEb,UAAA,OAAOE,KAAa,eACXA,KACTH,EAAsB,KAAKE,CAAK;AAAA,QACpC,CACH,GAGD,KAAK,QAAQ,KAAK,MAAM,OAAO,CAACE,GAAGF,MAC3B,EAAAF,EAAsB,QAAQE,CAAK,IAAI,GAI9C,GAEG,KAAK,gBACL,cAAc,KAAK,YAAY;AAAA;AAInC,MAAA,KAAK,oBAAoB,KAAK,cAC9B,cAAc,KAAK,YAAY,GAC/B,KAAK,oBAAoB,IAGxB,KAAA,oBAAoB,KAAK,oBAAoB;AAAA,IAAA,GA/C9CJ,KAAWA,EAAQ,cACnB,KAAK,YAAYA,EAAQ;AAAA,EAEjC;AA8CJ;"}
|
package/dist/is-anchor-link.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{dist/find-and-activate-stored-widgets.d.ts → find-and-activate-stored-widgets.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{dist/remove-null-and-undefined-values.d.ts → remove-null-and-undefined-values.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|