@htmlbricks/hb-navbar 0.19.30 → 0.19.31
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/package.json +3 -3
- package/release/manifest.json +1 -1
- package/release/release.js +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@htmlbricks/hb-navbar",
|
|
3
3
|
"displayName": "Svelte Navbar WebComponent",
|
|
4
4
|
"description": "Svelte Navbar WebComponent",
|
|
5
|
-
"version": "0.19.
|
|
5
|
+
"version": "0.19.31",
|
|
6
6
|
"main": "release/release.js",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"wc-js-utils": "^0.0.1"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@htmlbricks/hb-dropdown-simple": "^0.19.
|
|
73
|
+
"@htmlbricks/hb-dropdown-simple": "^0.19.31"
|
|
74
74
|
},
|
|
75
75
|
"keywords": [
|
|
76
76
|
"svelte",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"webcomponents"
|
|
79
79
|
],
|
|
80
80
|
"contributors": [],
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "57eedc8258265f728220d11ea55a90c3ff493e42"
|
|
82
82
|
}
|
package/release/manifest.json
CHANGED
package/release/release.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let s,l;function a(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function c(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function d(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function m(t){return document.createTextNode(t)}function f(){return m(" ")}function h(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:g(t,e,n)}function y(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function b(t){const e={};for(const n of t)e[n.name]=n.value;return e}function $(t){l=t}function w(){if(!l)throw new Error("Function called outside component initialization");return l}function x(){const t=w();return(e,n,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[e];if(r){const i=function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(e,n,{cancelable:o});return r.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}const _=[],k=[],C=[],E=[],j=Promise.resolve();let D=!1;function L(t){C.push(t)}const N=new Set;let T=0;function O(){if(0!==T)return;const t=l;do{try{for(;T<_.length;){const t=_[T];T++,$(t),S(t.$$)}}catch(t){throw _.length=0,T=0,t}for($(null),_.length=0,T=0;k.length;)k.pop()();for(let t=0;t<C.length;t+=1){const e=C[t];N.has(e)||(N.add(e),e())}C.length=0}while(_.length);for(;E.length;)E.pop()();D=!1,N.clear(),$(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const A=new Set;function M(t,e){-1===t.$$.dirty[0]&&(_.push(t),D||(D=!0,j.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function P(i,s,a,c,u,p,m,f=[-1]){const h=l;$(i);const g=i.$$={fragment:null,ctx:[],props:p,update:t,not_equal:u,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(h?h.$$.context:[])),callbacks:n(),dirty:f,skip_bound:!1,root:s.target||h.$$.root};m&&m(g.root);let v=!1;if(g.ctx=a?a(i,s.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),v&&M(i,t)),e})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();s.intro&&((y=i.$$.fragment)&&y.i&&(A.delete(y),y.i(b))),function(t,n,i,s){const{fragment:l,after_update:a}=t.$$;l&&l.m(n,i),s||L((()=>{const n=t.$$.on_mount.map(e).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),a.forEach(L)}(i,s.target,s.anchor,s.customElement),O()}var y,b;$(h)}let z;"function"==typeof HTMLElement&&(z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(e,n){if(!r(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H={name:"@htmlbricks/hb-navbar",displayName:"Svelte Navbar WebComponent",description:"Svelte Navbar WebComponent",version:"0.19.30",main:"release/release.js",publishConfig:{access:"public"},author:"Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",authorUrl:"https://dariocaruso.info",license:"MIT","license-docs":"CC BY 4.0","license-translations":"CC BY 4.0","license-images":"CC BY-NC 4.0",engines:{node:">=16.0.0"},scripts:{start:"sirv dist",dev:"rm -rf ./dist && rollup -c -w",build:"rm -rf ./dist && rollup -c","generate-manifest":"npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD","generate-component-schema":"ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json","generate-events-schema":"ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json","generate-schemes":"npm run generate-events-schema && npm run generate-component-schema",copydest:"rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/","build-extra":"tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*","build:release":"PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",prepublish:"npm run build:release"},devDependencies:{"@rollup/plugin-alias":"^3.1.2","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^4.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.10","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0",eslint:"^7.25.0","eslint-plugin-jsdoc":"^33.0.0","eslint-plugin-svelte3":"^3.2.0","monorepo-wc-packages-manifester":"^0.0.3","node-sass":"^6.0.1",postcss:"^8.2.13","postcss-load-config":"^3.0.1",prettier:"^2.8.4",rollup:"^2.46.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-css-only":"^3.1.0","rollup-plugin-livereload":"^2.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts-paths":"^1.0.5","rollup-plugin-typescript2":"^0.31.1",sass:"^1.32.12","sirv-cli":"^1.0.11",svelte:"^3.46.2","svelte-check":"^1.5.2","svelte-preprocess":"^4.7.2","ts-json-schema-generator":"^0.98.0","ts-node":"^9.1.1",tslib:"^2.2.0",ttypescript:"^1.5.12",typescript:"^4.2.4","typescript-transform-paths":"^2.2.3","wc-js-utils":"^0.0.1"},dependencies:{"@htmlbricks/hb-dropdown-simple":"^0.19.30"},keywords:["svelte","svelte-webcomponents","webcomponents"],contributors:[],gitHead:"7e404e6aab454c97ee17c670715a482623d450a9"};var I,R=(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,o,r="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(o=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===o?void 0:o.length))for(var i=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(r+="".concat(n,":").concat(t[n],";"))},s=0,l=Object.keys(t);s<l.length;s++)i(l[s]);return r},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var r=document.createElement("script");r.id=n+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,o){return t.formatDate(e,n,o||this.lang)},t.getDefaultLang=function(){var t,e,n,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(e,n,o){var r;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(r=n[o])||void 0===r?void 0:r[e]))return n[o][e];var i="",s=t.getDefaultLang();if(!o||s!==o){var l=null==n?void 0:n[s];(null==l?void 0:l[e])&&(i=l[e])}return i},t.formatDate=function(e,n,o){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n}(I={exports:{}},I.exports),I.exports),W={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},B=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,U=/\n/g,F=/^\s*/,J=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Y=/^:\s*/,q=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,K=/^[;\s]*/,V=/^\s+|\s+$/g,G="\n",Q="/",X="*",Z="",tt="comment",et="declaration",nt=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,o=1;function r(t){var e=t.match(U);e&&(n+=e.length);var r=t.lastIndexOf(G);o=~r?t.length-r:o+t.length}function i(){var t={line:n,column:o};return function(e){return e.position=new s(t),c(),e}}function s(t){this.start=t,this.end={line:n,column:o},this.source=e.source}function l(r){var i=new Error(e.source+":"+n+":"+o+": "+r);if(i.reason=r,i.filename=e.source,i.line=n,i.column=o,i.source=t,!e.silent)throw i}function a(e){var n=e.exec(t);if(n){var o=n[0];return r(o),t=t.slice(o.length),n}}function c(){a(F)}function u(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=i();if(Q==t.charAt(0)&&X==t.charAt(1)){for(var n=2;Z!=t.charAt(n)&&(X!=t.charAt(n)||Q!=t.charAt(n+1));)++n;if(n+=2,Z===t.charAt(n-1))return l("End of comment missing");var s=t.slice(2,n-2);return o+=2,r(s),t=t.slice(n),o+=2,e({type:tt,comment:s})}}function p(){var t=i(),e=a(J);if(e){if(d(),!a(Y))return l("property missing ':'");var n=a(q),o=t({type:et,property:ot(e[0].replace(B,Z)),value:n?ot(n[0].replace(B,Z)):Z});return a(K),o}}return s.prototype.content=t,c(),function(){var t,e=[];for(u(e);t=p();)!1!==t&&(e.push(t),u(e));return e}()};function ot(t){return t?t.replace(V,Z):Z}var rt=function(t,e){var n,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,s=nt(t),l="function"==typeof e,a=0,c=s.length;a<c;a++)r=(n=s[a]).property,i=n.value,l?e(r,i,n):i&&(o||(o={}),o[r]=i);return o};function it(e){let n,o,r;return{c(){n=p("button"),n.innerHTML='<slot name="nav-switcher">☰</slot>',y(n,"font-size","20px"),y(n,"border","none")},m(t,i){u(t,n,i),o||(r=h(n,"click",e[11]),o=!0)},p:t,d(t){t&&d(n),o=!1,r()}}}function st(t){let e,n;return{c(){e=p("img"),y(e,"height","30px"),y(e,"vertical-align","middle"),g(e,"alt",""),a(e.src,n=t[1])||g(e,"src",n)},m(t,n){u(t,e,n)},p(t,o){2&o&&!a(e.src,n=t[1])&&g(e,"src",n)},d(t){t&&d(e)}}}function lt(t){let e,n,o,r,i,s,l;return{c(){e=p("hb-dropdown-simple"),n=p("span"),o=p("img"),y(o,"height","30px"),y(o,"vertical-align","middle"),g(o,"alt",""),a(o.src,r=t[2].imgUri)||g(o,"src",r),g(n,"slot","dropdownbutton"),v(e,"style",t[4]),v(e,"list",i=JSON.stringify(t[2].list)),v(e,"position","right")},m(r,i){u(r,e,i),c(e,n),c(n,o),s||(l=h(e,"dropDownClick",t[14]),s=!0)},p(t,n){4&n&&!a(o.src,r=t[2].imgUri)&&g(o,"src",r),16&n&&v(e,"style",t[4]),4&n&&i!==(i=JSON.stringify(t[2].list))&&v(e,"list",i)},d(t){t&&d(e),s=!1,l()}}}function at(e){let n,r,i,s,l,a,v,b,$,w,x,_,k,C,E,j,D,L,N,T,O,S,A=!e[3]&&it(e),M=e[1]&&st(e),P=e[2]&<(e);return{c(){n=p("div"),r=p("div"),i=p("div"),A&&A.c(),s=f(),l=p("span"),l.innerHTML='<slot name="left-slot"></slot>',a=f(),v=p("div"),b=p("div"),$=p("span"),w=p("slot"),M&&M.c(),x=f(),_=m(e[0]),k=f(),C=p("slot"),E=f(),j=p("div"),D=p("div"),L=p("div"),N=p("slot"),T=f(),P&&P.c(),this.c=t,y(l,"cursor","pointer"),g(i,"id","left_side_content"),g(i,"class","side"),y(r,"padding-left","10px"),g(n,"id","left_side"),g(n,"class","navitem"),g(n,"part","left-slot"),g(w,"name","brand"),y($,"cursor","pointer"),g(C,"name","center-slot"),g(b,"class","side"),y(b,"margin","auto"),y(b,"max-width","100%"),g(v,"id","center_side"),g(v,"part","center-slot"),g(v,"class","navitem"),g(N,"name","right-slot"),g(L,"class","side"),g(D,"id","rigth_side_content"),g(j,"id","rigth_side"),g(j,"part","right-slot"),g(j,"class","navitem")},m(t,o){u(t,n,o),c(n,r),c(r,i),A&&A.m(i,null),c(i,s),c(i,l),u(t,a,o),u(t,v,o),c(v,b),c(b,$),c($,w),M&&M.m(w,null),c(w,x),c(w,_),c(b,k),c(b,C),u(t,E,o),u(t,j,o),c(j,D),c(D,L),c(L,N),c(L,T),P&&P.m(L,null),O||(S=[h(l,"click",e[12]),h($,"click",e[13])],O=!0)},p(t,[e]){t[3]?A&&(A.d(1),A=null):A?A.p(t,e):(A=it(t),A.c(),A.m(i,s)),t[1]?M?M.p(t,e):(M=st(t),M.c(),M.m(w,x)):M&&(M.d(1),M=null),1&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(_,t[0]),t[2]?P?P.p(t,e):(P=lt(t),P.c(),P.m(L,null)):P&&(P.d(1),P=null)},i:t,o:t,d(t){t&&d(n),A&&A.d(),t&&d(a),t&&d(v),M&&M.d(),t&&d(E),t&&d(j),P&&P.d(),O=!1,o(S)}}}function ct(t,e,n){let o,r,{style:i}=e,s="",{id:l}=e,{companybrandname:a}=e,{companylogouri:c}=e,{switchopen:u}=e,{usermenu:d}=e,{noburger:p}=e;R.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H.version});const m=w(),f=x();function h(t,e){f(t,e),m.dispatchEvent&&m.dispatchEvent(new CustomEvent(t,{detail:e}))}function g(){r=!r,h("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&n(9,i=t.style),"id"in t&&n(7,l=t.id),"companybrandname"in t&&n(0,a=t.companybrandname),"companylogouri"in t&&n(1,c=t.companylogouri),"switchopen"in t&&n(8,u=t.switchopen),"usermenu"in t&&n(2,d=t.usermenu),"noburger"in t&&n(3,p=t.noburger)},t.$$.update=()=>{1935&t.$$.dirty&&(i&&(n(10,o=rt(i)),n(4,s=R.getChildStyleToPass(o,null==W?void 0:W.vars))),a||n(0,a=""),c||n(1,c=""),l||n(7,l=""),u&&"no"!==u?r=!0:(n(8,u=""),r=!1),p||n(3,p=null),d?"string"==typeof d&&n(2,d=JSON.parse(d)):n(2,d=null))},[a,c,d,p,s,h,g,l,u,i,o,()=>g(),()=>h("navbarSlotClick",{side:"left"}),()=>h("navbarSlotClick",{side:"center"}),t=>h("navbarDropDownClick",t.detail.key)]}class ut extends z{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;display:block;background-color:#f1f1f1;width:100%;height:30px;display:block;padding:10px 0px 10px 0px}.side{position:relative;z-index:1;max-width:33%}#left_side{text-align:left}#center_side{text-align:center}#rigth_side{text-align:right}#rigth_side_content{display:inline-block;padding-right:10px;z-index:3}#left_side_content{z-index:3;position:relative}.navitem{position:absolute;width:100%;color:white;line-height:30px;font-size:22px;color:black}</style>',P(this,{target:this.shadowRoot,props:b(this.attributes),customElement:!0},ct,at,i,{style:9,id:7,companybrandname:0,companylogouri:1,switchopen:8,usermenu:2,noburger:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),O()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),O()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),O()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),O()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),O()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),O()}}return customElements.define("hb-navbar",ut),ut}();
|
|
1
|
+
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function r(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let s,l;function a(t,e){return s||(s=document.createElement("a")),s.href=e,t===s.href}function c(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function d(t){t.parentNode&&t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function m(){return f(" ")}function h(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function g(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:g(t,e,n)}function y(t,e,n,o){null===n?t.style.removeProperty(e):t.style.setProperty(e,n,o?"important":"")}function b(t){const e={};for(const n of t)e[n.name]=n.value;return e}function $(t){l=t}function w(){if(!l)throw new Error("Function called outside component initialization");return l}function x(){const t=w();return(e,n,{cancelable:o=!1}={})=>{const r=t.$$.callbacks[e];if(r){const i=function(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n,o,e),r}(e,n,{cancelable:o});return r.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}const _=[],k=[],C=[],E=[],j=Promise.resolve();let D=!1;function L(t){C.push(t)}const N=new Set;let T=0;function O(){if(0!==T)return;const t=l;do{try{for(;T<_.length;){const t=_[T];T++,$(t),S(t.$$)}}catch(t){throw _.length=0,T=0,t}for($(null),_.length=0,T=0;k.length;)k.pop()();for(let t=0;t<C.length;t+=1){const e=C[t];N.has(e)||(N.add(e),e())}C.length=0}while(_.length);for(;E.length;)E.pop()();D=!1,N.clear(),$(t)}function S(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(L)}}const A=new Set;function M(t,e){-1===t.$$.dirty[0]&&(_.push(t),D||(D=!0,j.then(O)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function P(i,s,a,c,u,p,f,m=[-1]){const h=l;$(i);const g=i.$$={fragment:null,ctx:[],props:p,update:t,not_equal:u,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s.context||(h?h.$$.context:[])),callbacks:n(),dirty:m,skip_bound:!1,root:s.target||h.$$.root};f&&f(g.root);let v=!1;if(g.ctx=a?a(i,s.props||{},((t,e,...n)=>{const o=n.length?n[0]:e;return g.ctx&&u(g.ctx[t],g.ctx[t]=o)&&(!g.skip_bound&&g.bound[t]&&g.bound[t](o),v&&M(i,t)),e})):[],g.update(),v=!0,o(g.before_update),g.fragment=!!c&&c(g.ctx),s.target){if(s.hydrate){const t=function(t){return Array.from(t.childNodes)}(s.target);g.fragment&&g.fragment.l(t),t.forEach(d)}else g.fragment&&g.fragment.c();s.intro&&((y=i.$$.fragment)&&y.i&&(A.delete(y),y.i(b))),function(t,n,i,s){const{fragment:l,after_update:a}=t.$$;l&&l.m(n,i),s||L((()=>{const n=t.$$.on_mount.map(e).filter(r);t.$$.on_destroy?t.$$.on_destroy.push(...n):o(n),t.$$.on_mount=[]})),a.forEach(L)}(i,s.target,s.anchor,s.customElement),O()}var y,b;$(h)}let z;"function"==typeof HTMLElement&&(z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(r);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(e,n){if(!r(n))return t;const o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{const t=o.indexOf(n);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var H={name:"@htmlbricks/hb-navbar",displayName:"Svelte Navbar WebComponent",description:"Svelte Navbar WebComponent",version:"0.19.31",main:"release/release.js",publishConfig:{access:"public"},author:"Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",authorUrl:"https://dariocaruso.info",license:"MIT","license-docs":"CC BY 4.0","license-translations":"CC BY 4.0","license-images":"CC BY-NC 4.0",engines:{node:">=16.0.0"},scripts:{start:"sirv dist",dev:"rm -rf ./dist && rollup -c -w",build:"rm -rf ./dist && rollup -c","generate-manifest":"npm run generate-schemes && monorepo-wc-packages-manifester --dir $PWD","generate-component-schema":"ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json","generate-events-schema":"ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json","generate-schemes":"npm run generate-events-schema && npm run generate-component-schema",copydest:"rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/","build-extra":"tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*","build:release":"PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",prepublish:"npm run build:release"},devDependencies:{"@rollup/plugin-alias":"^3.1.2","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^4.0.0","@rollup/plugin-typescript":"^8.2.1","@tsconfig/svelte":"^1.0.10","@types/node":"^16.7.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0",eslint:"^7.25.0","eslint-plugin-jsdoc":"^33.0.0","eslint-plugin-svelte3":"^3.2.0","monorepo-wc-packages-manifester":"^0.0.3","node-sass":"^6.0.1",postcss:"^8.2.13","postcss-load-config":"^3.0.1",prettier:"^2.8.4",rollup:"^2.46.0","rollup-plugin-copy":"^3.4.0","rollup-plugin-css-only":"^3.1.0","rollup-plugin-livereload":"^2.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-ts-paths":"^1.0.5","rollup-plugin-typescript2":"^0.31.1",sass:"^1.32.12","sirv-cli":"^1.0.11",svelte:"^3.46.2","svelte-check":"^1.5.2","svelte-preprocess":"^4.7.2","ts-json-schema-generator":"^0.98.0","ts-node":"^9.1.1",tslib:"^2.2.0",ttypescript:"^1.5.12",typescript:"^4.2.4","typescript-transform-paths":"^2.2.3","wc-js-utils":"^0.0.1"},dependencies:{"@htmlbricks/hb-dropdown-simple":"^0.19.31"},keywords:["svelte","svelte-webcomponents","webcomponents"],contributors:[],gitHead:"57eedc8258265f728220d11ea55a90c3ff493e42"};var I,R=(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,o,r="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(o=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===o?void 0:o.length))for(var i=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(r+="".concat(n,":").concat(t[n],";"))},s=0,l=Object.keys(t);s<l.length;s++)i(l[s]);return r},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var o=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var r=document.createElement("script");r.id=n+"-script",r.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(o),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(r.src="".concat(t.local)),document.head.appendChild(r)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,o){return t.formatDate(e,n,o||this.lang)},t.getDefaultLang=function(){var t,e,n,o,r,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(i=null===(r=null===(o=navigator.languages[0])||void 0===o?void 0:o.split("-")[0])||void 0===r?void 0:r.toLowerCase()),i},t.getDictionaryWord=function(e,n,o){var r;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(o&&(null===(r=n[o])||void 0===r?void 0:r[e]))return n[o][e];var i="",s=t.getDefaultLang();if(!o||s!==o){var l=null==n?void 0:n[s];(null==l?void 0:l[e])&&(i=l[e])}return i},t.formatDate=function(e,n,o){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(o||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n}(I={exports:{}},I.exports),I.exports),W={vars:[],parts:[{name:"dropdown",description:""},{name:"dropdownbutton",description:""},{name:"dropdowncontent",description:""}]},B=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,U=/\n/g,F=/^\s*/,J=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Y=/^:\s*/,q=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,K=/^[;\s]*/,V=/^\s+|\s+$/g,G="\n",Q="/",X="*",Z="",tt="comment",et="declaration",nt=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,o=1;function r(t){var e=t.match(U);e&&(n+=e.length);var r=t.lastIndexOf(G);o=~r?t.length-r:o+t.length}function i(){var t={line:n,column:o};return function(e){return e.position=new s(t),c(),e}}function s(t){this.start=t,this.end={line:n,column:o},this.source=e.source}function l(r){var i=new Error(e.source+":"+n+":"+o+": "+r);if(i.reason=r,i.filename=e.source,i.line=n,i.column=o,i.source=t,!e.silent)throw i}function a(e){var n=e.exec(t);if(n){var o=n[0];return r(o),t=t.slice(o.length),n}}function c(){a(F)}function u(t){var e;for(t=t||[];e=d();)!1!==e&&t.push(e);return t}function d(){var e=i();if(Q==t.charAt(0)&&X==t.charAt(1)){for(var n=2;Z!=t.charAt(n)&&(X!=t.charAt(n)||Q!=t.charAt(n+1));)++n;if(n+=2,Z===t.charAt(n-1))return l("End of comment missing");var s=t.slice(2,n-2);return o+=2,r(s),t=t.slice(n),o+=2,e({type:tt,comment:s})}}function p(){var t=i(),e=a(J);if(e){if(d(),!a(Y))return l("property missing ':'");var n=a(q),o=t({type:et,property:ot(e[0].replace(B,Z)),value:n?ot(n[0].replace(B,Z)):Z});return a(K),o}}return s.prototype.content=t,c(),function(){var t,e=[];for(u(e);t=p();)!1!==t&&(e.push(t),u(e));return e}()};function ot(t){return t?t.replace(V,Z):Z}var rt=function(t,e){var n,o=null;if(!t||"string"!=typeof t)return o;for(var r,i,s=nt(t),l="function"==typeof e,a=0,c=s.length;a<c;a++)r=(n=s[a]).property,i=n.value,l?e(r,i,n):i&&(o||(o={}),o[r]=i);return o};function it(e){let n,o,r;return{c(){n=p("button"),n.innerHTML='<slot name="nav-switcher">☰</slot>',y(n,"font-size","20px"),y(n,"border","none")},m(t,i){u(t,n,i),o||(r=h(n,"click",e[11]),o=!0)},p:t,d(t){t&&d(n),o=!1,r()}}}function st(t){let e,n;return{c(){e=p("img"),y(e,"height","30px"),y(e,"vertical-align","middle"),g(e,"alt",""),a(e.src,n=t[1])||g(e,"src",n)},m(t,n){u(t,e,n)},p(t,o){2&o&&!a(e.src,n=t[1])&&g(e,"src",n)},d(t){t&&d(e)}}}function lt(t){let e,n,o,r,i,s,l;return{c(){e=p("hb-dropdown-simple"),n=p("span"),o=p("img"),y(o,"height","30px"),y(o,"vertical-align","middle"),g(o,"alt",""),a(o.src,r=t[2].imgUri)||g(o,"src",r),g(n,"slot","dropdownbutton"),v(e,"style",t[4]),v(e,"list",i=JSON.stringify(t[2].list)),v(e,"position","right")},m(r,i){u(r,e,i),c(e,n),c(n,o),s||(l=h(e,"dropDownClick",t[14]),s=!0)},p(t,n){4&n&&!a(o.src,r=t[2].imgUri)&&g(o,"src",r),16&n&&v(e,"style",t[4]),4&n&&i!==(i=JSON.stringify(t[2].list))&&v(e,"list",i)},d(t){t&&d(e),s=!1,l()}}}function at(e){let n,r,i,s,l,a,v,b,$,w,x,_,k,C,E,j,D,L,N,T,O,S,A=!e[3]&&it(e),M=e[1]&&st(e),P=e[2]&<(e);return{c(){n=p("div"),r=p("div"),i=p("div"),A&&A.c(),s=m(),l=p("span"),l.innerHTML='<slot name="left-slot"></slot>',a=m(),v=p("div"),b=p("div"),$=p("span"),w=p("slot"),M&&M.c(),x=m(),_=f(e[0]),k=m(),C=p("slot"),E=m(),j=p("div"),D=p("div"),L=p("div"),N=p("slot"),T=m(),P&&P.c(),this.c=t,y(l,"cursor","pointer"),g(i,"id","left_side_content"),g(i,"class","side"),y(r,"padding-left","10px"),g(n,"id","left_side"),g(n,"class","navitem"),g(n,"part","left-slot"),g(w,"name","brand"),y($,"cursor","pointer"),g(C,"name","center-slot"),g(b,"class","side"),y(b,"margin","auto"),y(b,"max-width","100%"),g(v,"id","center_side"),g(v,"part","center-slot"),g(v,"class","navitem"),g(N,"name","right-slot"),g(L,"class","side"),g(D,"id","rigth_side_content"),g(j,"id","rigth_side"),g(j,"part","right-slot"),g(j,"class","navitem")},m(t,o){u(t,n,o),c(n,r),c(r,i),A&&A.m(i,null),c(i,s),c(i,l),u(t,a,o),u(t,v,o),c(v,b),c(b,$),c($,w),M&&M.m(w,null),c(w,x),c(w,_),c(b,k),c(b,C),u(t,E,o),u(t,j,o),c(j,D),c(D,L),c(L,N),c(L,T),P&&P.m(L,null),O||(S=[h(l,"click",e[12]),h($,"click",e[13])],O=!0)},p(t,[e]){t[3]?A&&(A.d(1),A=null):A?A.p(t,e):(A=it(t),A.c(),A.m(i,s)),t[1]?M?M.p(t,e):(M=st(t),M.c(),M.m(w,x)):M&&(M.d(1),M=null),1&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(_,t[0]),t[2]?P?P.p(t,e):(P=lt(t),P.c(),P.m(L,null)):P&&(P.d(1),P=null)},i:t,o:t,d(t){t&&d(n),A&&A.d(),t&&d(a),t&&d(v),M&&M.d(),t&&d(E),t&&d(j),P&&P.d(),O=!1,o(S)}}}function ct(t,e,n){let o,r,{style:i}=e,s="",{id:l}=e,{companybrandname:a}=e,{companylogouri:c}=e,{switchopen:u}=e,{usermenu:d}=e,{noburger:p}=e;R.addComponent({repoName:"@htmlbricks/hb-dropdown-simple",version:H.version});const f=w(),m=x();function h(t,e){m(t,e),f.dispatchEvent&&f.dispatchEvent(new CustomEvent(t,{detail:e}))}function g(){r=!r,h("navmenuswitch",{isOpen:r})}return t.$$set=t=>{"style"in t&&n(9,i=t.style),"id"in t&&n(7,l=t.id),"companybrandname"in t&&n(0,a=t.companybrandname),"companylogouri"in t&&n(1,c=t.companylogouri),"switchopen"in t&&n(8,u=t.switchopen),"usermenu"in t&&n(2,d=t.usermenu),"noburger"in t&&n(3,p=t.noburger)},t.$$.update=()=>{1935&t.$$.dirty&&(i&&(n(10,o=rt(i)),n(4,s=R.getChildStyleToPass(o,null==W?void 0:W.vars))),a||n(0,a=""),c||n(1,c=""),l||n(7,l=""),u&&"no"!==u?r=!0:(n(8,u=""),r=!1),p||n(3,p=null),d?"string"==typeof d&&n(2,d=JSON.parse(d)):n(2,d=null))},[a,c,d,p,s,h,g,l,u,i,o,()=>g(),()=>h("navbarSlotClick",{side:"left"}),()=>h("navbarSlotClick",{side:"center"}),t=>h("navbarDropDownClick",t.detail.key)]}class ut extends z{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host{font-family:"Roboto", sans-serif;width:100%;display:block;background-color:#f1f1f1;width:100%;height:30px;display:block;padding:10px 0px 10px 0px}.side{position:relative;z-index:1;max-width:33%}#left_side{text-align:left}#center_side{text-align:center}#rigth_side{text-align:right}#rigth_side_content{display:inline-block;padding-right:10px;z-index:3}#left_side_content{z-index:3;position:relative}.navitem{position:absolute;width:100%;color:white;line-height:30px;font-size:22px;color:black}</style>',P(this,{target:this.shadowRoot,props:b(this.attributes),customElement:!0},ct,at,i,{style:9,id:7,companybrandname:0,companylogouri:1,switchopen:8,usermenu:2,noburger:3},null),t&&(t.target&&u(t.target,this,t.anchor),t.props&&(this.$set(t.props),O()))}static get observedAttributes(){return["style","id","companybrandname","companylogouri","switchopen","usermenu","noburger"]}get style(){return this.$$.ctx[9]}set style(t){this.$$set({style:t}),O()}get id(){return this.$$.ctx[7]}set id(t){this.$$set({id:t}),O()}get companybrandname(){return this.$$.ctx[0]}set companybrandname(t){this.$$set({companybrandname:t}),O()}get companylogouri(){return this.$$.ctx[1]}set companylogouri(t){this.$$set({companylogouri:t}),O()}get switchopen(){return this.$$.ctx[8]}set switchopen(t){this.$$set({switchopen:t}),O()}get usermenu(){return this.$$.ctx[2]}set usermenu(t){this.$$set({usermenu:t}),O()}get noburger(){return this.$$.ctx[3]}set noburger(t){this.$$set({noburger:t}),O()}}return customElements.define("hb-navbar",ut),ut}();
|
|
2
2
|
//# sourceMappingURL=release.js.map
|