@kartverket/geonorge-web-components
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geonorge=t():(e.geonorge=e.geonorge||{},e.geonorge.GnSelect=t())}(self,(()=>(()=>{var e={798:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,'gn-select{background-color:#fff}gn-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:0 29px 0 15px;height:34px;border:1px solid #cfcfcf;border-radius:0;margin-bottom:10px;box-shadow:none;position:relative;z-index:1;margin-right:-27px}gn-select[block] select{width:100%}',"",{version:3,sources:["webpack://./stories/gn-select/gn-select.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,UACI,qBAAA,CACA,iBCHA,uBDIwB,CCHxB,oBDGwB,CCFxB,eDEwB,CACpB,kCENO,CFOP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,qBAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,kBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,kBAAA,CAGA,wBACI,UAAA",sourcesContent:['@import "../../style/all";\n\ngn-select {\n background-color: #fff;\n select {\n @include appearance(none);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 0 29px 0 15px;\n height: 34px;\n border: 1px solid #cfcfcf;\n border-radius: 0;\n margin-bottom: 10px;\n box-shadow: none;\n position: relative;\n z-index: 1;\n margin-right: -27px;\n }\n &[block] {\n select {\n width: 100%;\n }\n }\n}\n\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\n}\n",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const c=i},5195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,".arrow-down-icon{position:relative;bottom:-1px;z-index:0;width:0}.arrow-down-icon svg{width:14px;height:14px}","",{version:3,sources:["webpack://./stories/gn-select/template.scss"],names:[],mappings:"AAAA,iBACI,iBAAA,CACA,WAAA,CACA,SAAA,CACA,OAAA,CACA,qBACI,UAAA,CACA,WAAA",sourcesContent:[".arrow-down-icon {\n position: relative;\n bottom: -1px;\n z-index: 0;\n width: 0;\n svg {\n width: 14px;\n height: 14px;\n }\n}"],sourceRoot:""}]);const c=i},828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o='<template>\n <slot></slot>\n <span id="arrow-down-icon" class="arrow-down-icon"></span>\n</template>\n'},7638:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(i[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},4663:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),s="/*# ".concat(r," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function i(e){try{a(o.next(e))}catch(e){s(e)}}function c(e){try{a(o.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}a((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);t.Component=e=>t=>{var n;const c=e.tag||i.toKebabCase(t.prototype.constructor.name),a=((n=class extends t{constructor(){super(),this.props={},this.showShadowRoot=null==e.shadow||e.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((e=>i.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,o=!0){if(t!=n){o&&(this[i.toCamelCase(e)]=n);const r=this.constructor.watchAttributes;if(r&&r[e]){const o=r[e];this.__connected&&"function"==typeof this[o]&&this[o]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const t=document.createElement("template");t.innerHTML=yield this.getStyle(),e.template instanceof Promise?t.content.appendChild(yield this.getExternalTemplate()):"string"==typeof e.template&&(t.innerHTML+=e.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(t.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),n=document.createRange().createContextualFragment(t);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let t;return e.style instanceof Promise?t=(yield e.style).default.toString():"string"==typeof e.style&&(t=e.style),t?`<style>${t}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((e,t)=>e(!0))),n);return customElements.get(c)||customElements.define(c,a),a}},985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=n},265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRootElement=t.getElement=void 0,t.getElement=e=>document.querySelector(e),t.getShadowRootElement=(e,t)=>e.shadowRoot.querySelector(t)},406:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1397),t),r(n(985),t),r(n(265),t),r(n(5969),t),r(n(5773),t),r(n(4271),t),r(n(9766),t),r(n(4938),t)},5969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const o=n(3804);t.Listen=(e,t)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[o]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const o=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;o&&o.addEventListener(n.eventName,(t=>{n.handler.call(e,t)}))}}},t.Dispatch=e=>(t,n)=>{Object.defineProperty(t,n,{get:function(){const t=this;return{emit(r){const s=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const o=n(3804);t.Prop=()=>(e,t)=>{const n=o.toKebabCase(t);e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return this.props[t]?this.props[t]:this.getAttribute(n)},set:function(e){if(this.__connected){const r=this.props[t];this.props[t]=o.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,r,e,!1)}else this.hasAttribute(o.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let n of(e=>{const t=e.constructor.watchAttributes,n=Object.assign({},t);Object.keys(n).forEach((e=>n[e]=""));const o=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(o)})(e)){if(t)if(null==t[o.toKebabCase(n)])t[o.toKebabCase(n)]="";else{const r=e.props[n]||e.getAttribute(o.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:r})}e.constructor.propsInit[n]&&(e.hasAttribute(o.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},4271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const o=n(3804);t.Toggle=()=>(e,t)=>{e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return(e=>{if(this.hasAttribute(e)){const t=this.getAttribute(e);return!!/^(true|false|^$)$/.test(t)&&("true"==t||""==t)}return!1})(t)},set:function(e){const n=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`),e=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`}this.__connected?(this.props[t]=e||!1,""!==n&&null!==n?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(o.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},9766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryParseInt=t.toDotCase=t.toCamelCase=t.toKebabCase=void 0,t.toKebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),t.toCamelCase=e=>e.toLowerCase().replace(/(\-\w)/g,(e=>e[1].toUpperCase())),t.toDotCase=e=>e.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),t.tryParseInt=e=>parseInt(e)==e&&NaN!==parseFloat(e)?parseInt(e):e},4938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const o=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[o.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},394:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 9 7.8" style="enable-background:new 0 0 9 7.8;" xml:space="preserve"><style type="text/css"> .__AVg6WTM__st0{fill:#414042;} </style><g id="Layer_1"></g><g id="Header"><polygon class="__AVg6WTM__st0 " points="0,0 4.5,7.8 9,0"></polygon></g></svg>'},5527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},783:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,o){var r,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(i=(s<3?r(i):s>3?r(t,n,i):r(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnSelect=void 0;const a=n(406),l=n(5527),u=c(n(394)),p=c(n(798));let d=class extends a.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("content-container-styles",p.default)}connectedCallback(){(0,a.getShadowRootElement)(this,"#arrow-down-icon").innerHTML=u.default}setup(e){}};s([(0,a.Toggle)()],d.prototype,"block",void 0),d=s([(0,a.Component)({tag:"gn-select",template:Promise.resolve().then((()=>i(n(828)))),style:Promise.resolve().then((()=>i(n(5195))))})],d),t.GnSelect=d}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={id:o,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(783)})())); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geonorge=t():(e.geonorge=e.geonorge||{},e.geonorge.GnSelect=t())}(self,(()=>(()=>{var e={798:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,'gn-select{background-color:#fff}gn-select select{-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:"Open Sans",sans-serif;font-size:16px;background:none;color:#000;font-size:12pt;padding:0 29px 0 15px;height:34px;border:1px solid #cfcfcf;border-radius:0;margin-bottom:10px;box-shadow:none;position:relative;z-index:1;margin-right:-27px}gn-select[block] select{width:100%}',"",{version:3,sources:["webpack://./stories/gn-select/gn-select.scss","webpack://./style/mixins/_appearance.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,UACI,qBAAA,CACA,iBCHA,uBDIwB,CCHxB,oBDGwB,CCFxB,eDEwB,CACpB,kCENO,CFOP,cAAA,CACA,eAAA,CACA,UAAA,CACA,cAAA,CACA,qBAAA,CACA,WAAA,CACA,wBAAA,CACA,eAAA,CACA,kBAAA,CACA,eAAA,CACA,iBAAA,CACA,SAAA,CACA,kBAAA,CAGA,wBACI,UAAA",sourcesContent:['@import "../../style/all";\n\ngn-select {\n background-color: #fff;\n select {\n @include appearance(none);\n font-family: $default-font;\n font-size: 16px;\n background: none;\n color: #000;\n font-size: 12pt;\n padding: 0 29px 0 15px;\n height: 34px;\n border: 1px solid #cfcfcf;\n border-radius: 0;\n margin-bottom: 10px;\n box-shadow: none;\n position: relative;\n z-index: 1;\n margin-right: -27px;\n }\n &[block] {\n select {\n width: 100%;\n }\n }\n}\n\n',"\ufeff@mixin appearance ($value) {\n -webkit-appearance: $value;\n -moz-appearance: $value;\n appearance: $value;\n}\n",'$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const c=i},5195:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var o=n(4663),r=n.n(o),s=n(7638),i=n.n(s)()(r());i.push([e.id,".arrow-down-icon{position:relative;bottom:-1px;z-index:0;width:0}.arrow-down-icon svg{width:14px;height:14px}","",{version:3,sources:["webpack://./stories/gn-select/template.scss"],names:[],mappings:"AAAA,iBACI,iBAAA,CACA,WAAA,CACA,SAAA,CACA,OAAA,CACA,qBACI,UAAA,CACA,WAAA",sourcesContent:[".arrow-down-icon {\n position: relative;\n bottom: -1px;\n z-index: 0;\n width: 0;\n svg {\n width: 14px;\n height: 14px;\n }\n}"],sourceRoot:""}]);const c=i},828:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});const o='<template>\n <slot></slot>\n <span id="arrow-down-icon" class="arrow-down-icon"></span>\n</template>\n'},7638:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,s){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(i[a]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);o&&i[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},4663:e=>{"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),s="/*# ".concat(r," */");return[t].concat([s]).join("\n")}return[t].join("\n")}},1397:function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,s){function i(e){try{a(o.next(e))}catch(e){s(e)}}function c(e){try{a(o.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}a((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const r=n(5969),s=n(5773),i=n(3804);t.Component=e=>t=>{var n;const c=e.tag||i.toKebabCase(t.prototype.constructor.name),a=((n=class extends t{constructor(){super(),this.props={},this.showShadowRoot=null==e.shadow||e.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((e=>i.toKebabCase(e)))}attributeChangedCallback(e,t,n){this.onAttributeChange(e,t,n)}onAttributeChange(e,t,n,o=!0){if(t!=n){o&&(this[i.toCamelCase(e)]=n);const r=this.constructor.watchAttributes;if(r&&r[e]){const o=r[e];this.__connected&&"function"==typeof this[o]&&this[o]({old:t,new:n})}}}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),e.connectedCallback&&e.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const t=document.createElement("template");t.innerHTML=yield this.getStyle(),e.template instanceof Promise?t.content.appendChild(yield this.getExternalTemplate()):"string"==typeof e.template&&(t.innerHTML+=e.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(t.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const t=(yield e.template).default.toString(),n=document.createRange().createContextualFragment(t);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let t;return e.style instanceof Promise?t=(yield e.style).default.toString():"string"==typeof e.style&&(t=e.style),t?`<style>${t}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((e,t)=>e(!0))),n);return customElements.get(c)||customElements.define(c,a),a}},985:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(e){this.isConnected||document.querySelector(e).appendChild(this)}}t.CustomElement=n},265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRootElement=t.getElement=void 0,t.getElement=e=>document.querySelector(e),t.getShadowRootElement=(e,t)=>e.shadowRoot.querySelector(t)},406:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1397),t),r(n(985),t),r(n(265),t),r(n(5969),t),r(n(5773),t),r(n(4271),t),r(n(9766),t),r(n(4938),t)},5969:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dispatch=t.addEventListeners=t.Listen=void 0;const o=n(3804);t.Listen=(e,t)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:t,eventName:e,handler:n[o]})},t.addEventListeners=e=>{if(e.constructor.listeners){const t=e.shadowRoot||e;for(const n of e.constructor.listeners){const o=n.selector?t.querySelector(n.selector)?t.querySelector(n.selector):null:e;o&&o.addEventListener(n.eventName,(t=>{n.handler.call(e,t)}))}}},t.Dispatch=e=>(t,n)=>{Object.defineProperty(t,n,{get:function(){const t=this;return{emit(r){const s=e||o.toDotCase(n);t.dispatchEvent(new CustomEvent(s,r))}}}})}},5773:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeProps=t.Prop=void 0;const o=n(3804);t.Prop=()=>(e,t)=>{const n=o.toKebabCase(t);e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return this.props[t]?this.props[t]:this.getAttribute(n)},set:function(e){if(this.__connected){const r=this.props[t];this.props[t]=o.tryParseInt(e),"object"!=typeof e?this.setAttribute(n,e):this.onAttributeChange(n,r,e,!1)}else this.hasAttribute(o.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})},t.initializeProps=e=>{const t=e.constructor.watchAttributes;for(let n of(e=>{const t=e.constructor.watchAttributes,n=Object.assign({},t);Object.keys(n).forEach((e=>n[e]=""));const o=Object.assign(Object.assign({},n),e.constructor.propsInit);return Object.keys(o)})(e)){if(t)if(null==t[o.toKebabCase(n)])t[o.toKebabCase(n)]="";else{const r=e.props[n]||e.getAttribute(o.toKebabCase(n));"function"==typeof e[t[n]]&&e[t[n]]({new:r})}e.constructor.propsInit[n]&&(e.hasAttribute(o.toKebabCase(n))||(e[n]=e.constructor.propsInit[n]))}}},4271:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Toggle=void 0;const o=n(3804);t.Toggle=()=>(e,t)=>{e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null,Object.defineProperty(e,t,{get:function(){return(e=>{if(this.hasAttribute(e)){const t=this.getAttribute(e);return!!/^(true|false|^$)$/.test(t)&&("true"==t||""==t)}return!1})(t)},set:function(e){const n=e;if(null!=e)switch(typeof e){case"boolean":break;case"string":/^(true|false|^$)$/.test(e)?e="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`),e=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${t}' to '${e}'`}this.__connected?(this.props[t]=e||!1,""!==n&&null!==n?this.setAttribute(t,e):e?this.setAttribute(t,""):this.removeAttribute(t)):this.hasAttribute(o.toKebabCase(t))||(this.constructor.propsInit[t]=e)}})}},9766:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryParseInt=t.toDotCase=t.toCamelCase=t.toKebabCase=void 0,t.toKebabCase=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),t.toCamelCase=e=>e.toLowerCase().replace(/(\-\w)/g,(e=>e[1].toUpperCase())),t.toDotCase=e=>e.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),t.tryParseInt=e=>parseInt(e)==e&&NaN!==parseFloat(e)?parseInt(e):e},4938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const o=n(3804);t.Watch=e=>(t,n)=>{t.constructor.watchAttributes||(t.constructor.watchAttributes={}),t.constructor.watchAttributes[o.toKebabCase(e)]=n,t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null}},394:e=>{e.exports='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 9 7.8" style="enable-background:new 0 0 9 7.8;" xml:space="preserve"><style type="text/css"> .__AVg6WTM__st0{fill:#414042;} </style><g id="Layer_1"></g><g id="Header"><polygon class="__AVg6WTM__st0 " points="0,0 4.5,7.8 9,0"></polygon></g></svg>'},5527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGlobalStylesheet=t.getFocusableElementsInsideElement=void 0,t.getFocusableElementsInsideElement=e=>e.querySelectorAll('button, [href], input, [tabindex="0"]'),t.addGlobalStylesheet=(e,t)=>{const n=document.createElement("style");n.setAttribute("id",e),n.textContent=t,document.getElementById(e)||document.head.appendChild(n)}},783:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,n,o){var r,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(i=(s<3?r(i):s>3?r(t,n,i):r(t,n))||i);return s>3&&i&&Object.defineProperty(t,n,i),i},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return r(t,e),t},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GnSelect=void 0;const a=n(406),l=n(5527),u=c(n(394)),p=c(n(798));let d=class extends a.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-table-styles",p.default)}connectedCallback(){(0,a.getShadowRootElement)(this,"#arrow-down-icon").innerHTML=u.default}setup(e){}};s([(0,a.Toggle)()],d.prototype,"block",void 0),d=s([(0,a.Component)({tag:"gn-select",template:Promise.resolve().then((()=>i(n(828)))),style:Promise.resolve().then((()=>i(n(5195))))})],d),t.GnSelect=d}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={id:o,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(783)})())); | ||
//# sourceMappingURL=GnSelect.js.map |
{ | ||
"name": "@kartverket/geonorge-web-components", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Geonorge Web Components", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4166719