@kartverket/geonorge-web-components
Advanced tools
Comparing version 1.0.17 to 1.0.18
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GnTable=e())}(self,(()=>(()=>{"use strict";var t={8422:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),i=n(7638),s=n.n(i)()(r());s.push([t.id,'::slotted(table){border-collapse:collapse;width:100%;font-family:"Open Sans",sans-serif}',"",{version:3,sources:["webpack://./stories/gn-table/gn-table.scss","webpack://./style/variables/_typography.scss"],names:[],mappings:"AAEA,iBACE,wBAAA,CACA,UAAA,CACA,kCCLa",sourcesContent:['@import "../../style/all";\n\n::slotted(table) {\n border-collapse: collapse;\n width: 100%;\n font-family: $default-font;\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;'],sourceRoot:""}]);const a=s},5377:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),i=n(7638),s=n.n(i)()(r());s.push([t.id,"gn-table thead tr th{border-bottom:2px solid #fe5000;color:#3767c7;font-weight:normal;height:27px;line-height:20px;text-align:left;text-transform:uppercase;padding:8px 8px 0}gn-table tbody tr td{padding:8px;border-bottom:1px solid #d8d8d8;line-height:20px}gn-table img,gn-table svg{max-height:20px}gn-table[hoverable] tbody tr{-moz-transition:background-color .15s ease-in-out;-o-transition:background-color .15s ease-in-out;-webkit-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}gn-table[hoverable] tbody tr:hover{background-color:rgba(0,0,0,.05)}","",{version:3,sources:["webpack://./stories/gn-table/slottedStyles.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAKY,qBACI,+BAAA,CACA,aCOD,CDNC,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,eAAA,CACA,wBAAA,CACA,iBAAA,CAMJ,qBACI,WAAA,CACA,+BAAA,CACA,gBAAA,CAIZ,0BAEI,eAAA,CAII,6BE/BR,iDFgCY,CE/BZ,+CF+BY,CE9BZ,oDF8BY,CE7BZ,4CF6BY,CACA,mCACI,gCCjCD",sourcesContent:['@import "../../style/all";\n\ngn-table {\n thead {\n tr {\n th {\n border-bottom: 2px solid $primary-brand;\n color: $primary-text;\n font-weight: normal;\n height: 27px;\n line-height: 20px;\n text-align: left;\n text-transform: uppercase;\n padding: 8px 8px 0;\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 8px;\n border-bottom: 1px solid $default-border;\n line-height: 20px;\n }\n }\n }\n img,\n svg {\n max-height: 20px;\n }\n &[hoverable] {\n tbody {\n tr {\n @include transition(background-color 0.15s ease-in-out);\n &:hover {\n background-color: $hover-background;\n }\n }\n }\n }\n}\n',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const a=s},6500:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>"},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var d=[].concat(t[l]);o&&s[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),e.push(d))}},e}},4663:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),s=n(3804);e.Component=t=>e=>{var n;const a=t.tag||s.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>s.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[s.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),i.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(a)||customElements.define(a,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},4474:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnTable=void 0;const c=n(406),l=n(5527),d=a(n(5377));let u=class extends c.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-table-styles",d.default)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}static setup(t,e){(0,c.getElement)(t)}};i([(0,c.Prop)()],u.prototype,"id",void 0),i([(0,c.Toggle)()],u.prototype,"hoverable",void 0),u=i([(0,c.Component)({tag:"gn-table",template:Promise.resolve().then((()=>s(n(6500)))),style:Promise.resolve().then((()=>s(n(8422))))})],u),e.GnTable=u}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(4474)})())); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.geonorge=e():(t.geonorge=t.geonorge||{},t.geonorge.GnTable=e())}(self,(()=>(()=>{"use strict";var t={8422:(t,e,n)=>{n.r(e),n.d(e,{default:()=>a});var o=n(4663),r=n.n(o),i=n(7638),s=n.n(i)()(r());s.push([t.id,'gn-table table{border-collapse:collapse;width:100%;font-family:"Open Sans",sans-serif}gn-table table tr th{border-bottom:2px solid #fe5000;color:#3767c7;font-weight:normal;height:27px;line-height:20px;text-align:left;text-transform:uppercase;padding:8px 8px 0}gn-table table tr td{padding:8px;border-bottom:1px solid #d8d8d8;line-height:20px}gn-table table img,gn-table table svg{max-height:20px}gn-table[hoverable] table tbody tr{-moz-transition:background-color .15s ease-in-out;-o-transition:background-color .15s ease-in-out;-webkit-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}gn-table[hoverable] table tbody tr:hover{background-color:rgba(0,0,0,.05)}',"",{version:3,sources:["webpack://./stories/gn-table/gn-table.scss","webpack://./style/variables/_typography.scss","webpack://./style/variables/_colors.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAGE,eACE,wBAAA,CACA,UAAA,CACA,kCCNW,CDQT,qBACE,+BAAA,CACA,aEIO,CFHP,kBAAA,CACA,WAAA,CACA,gBAAA,CACA,eAAA,CACA,wBAAA,CACA,iBAAA,CAEF,qBACE,WAAA,CACA,+BAAA,CACA,gBAAA,CAGJ,sCAEE,eAAA,CAME,mCG/BJ,iDHgCM,CG/BN,+CH+BM,CG9BN,oDH8BM,CG7BN,4CH6BM,CACA,yCACE,gCEjCO",sourcesContent:['@import "../../style/all";\n\ngn-table {\n table {\n border-collapse: collapse;\n width: 100%;\n font-family: $default-font;\n tr {\n th {\n border-bottom: 2px solid $primary-brand;\n color: $primary-text;\n font-weight: normal;\n height: 27px;\n line-height: 20px;\n text-align: left;\n text-transform: uppercase;\n padding: 8px 8px 0;\n }\n td {\n padding: 8px;\n border-bottom: 1px solid $default-border;\n line-height: 20px;\n }\n }\n img,\n svg {\n max-height: 20px;\n }\n }\n &[hoverable] {\n table {\n tbody {\n tr {\n @include transition(background-color 0.15s ease-in-out);\n &:hover {\n background-color: $hover-background;\n }\n }\n }\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;',"$body-background: #ffffff;\n$navigation-bar-background: #f7f7f7;\n$hover-background: rgba(0,0,0,.05);\n$default-border: #d8d8d8;\n\n$default-background: #eee;\n$default-background-hover: #ddd;\n$default-text:#2F3940;\n\n$primary-brand: #FE5000;\n$secondary-brand: #4C7AA9;\n\n$primary-background: #4C7AA9;\n$primary-background-hover: #FE5000;\n$primary-text: #3767C7;\n$primary-text-hover:#0056b3;\n\n\n$success-background: #06A755;\n$success-background-hover: #009745;\n$success-text: #06A755;\n\n\n$warning-background: #C38621;\n$warning-background-hover: #B37611;\n$warning-text: #C38621;\n\n$danger-background: #E00d0D;\n$danger-background-hover: #D00000;\n$danger-text: #E00d0D;\n\n$disabled-background: #ffffff;\n$disabled-text: #d8d8d8;\n","\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const a=s},6500:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>"},7638:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,o,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),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)),e.push(u))}},e}},4663:t=>{t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},1397:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(5969),i=n(5773),s=n(3804);e.Component=t=>e=>{var n;const a=t.tag||s.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>s.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[s.toCamelCase(t)]=n);const r=this.constructor.watchAttributes;if(r&&r[t]){const o=r[t];this.__connected&&"function"==typeof this[o]&&this[o]({old:e,new:n})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return o(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),i.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(a)||customElements.define(a,c),c}},985:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class n extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=n},265:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getShadowRootElement=e.getElement=void 0,e.getElement=t=>document.querySelector(t),e.getShadowRootElement=(t,e)=>t.shadowRoot.querySelector(e)},406:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||o(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(n(1397),e),r(n(985),e),r(n(265),e),r(n(5969),e),r(n(5773),e),r(n(4271),e),r(n(9766),e),r(n(4938),e)},5969:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(3804);e.Listen=(t,e)=>(n,o)=>{n.constructor.listeners||(n.constructor.listeners=[]),n.constructor.listeners.push({selector:e,eventName:t,handler:n[o]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const n of t.constructor.listeners){const o=n.selector?e.querySelector(n.selector)?e.querySelector(n.selector):null:t;o&&o.addEventListener(n.eventName,(e=>{n.handler.call(t,e)}))}}},e.Dispatch=t=>(e,n)=>{Object.defineProperty(e,n,{get:function(){const e=this;return{emit(r){const i=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(i,r))}}}})}},5773:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(3804);e.Prop=()=>(t,e)=>{const n=o.toKebabCase(e);t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return this.props[e]?this.props[e]:this.getAttribute(n)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,r,t,!1)}else this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let n of(t=>{const e=t.constructor.watchAttributes,n=Object.assign({},e);Object.keys(n).forEach((t=>n[t]=""));const o=Object.assign(Object.assign({},n),t.constructor.propsInit);return Object.keys(o)})(t)){if(e)if(null==e[o.toKebabCase(n)])e[o.toKebabCase(n)]="";else{const r=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:r})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},4271:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(3804);e.Toggle=()=>(t,e)=>{t.constructor.propsInit||(t.constructor.propsInit={}),t.constructor.propsInit[e]=null,Object.defineProperty(t,e,{get:function(){return(t=>{if(this.hasAttribute(t)){const e=this.getAttribute(t);return!!/^(true|false|^$)$/.test(e)&&("true"==e||""==e)}return!1})(e)},set:function(t){const n=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==n||""==n:(console.warn(`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`),t=!1);break;default:throw`TypeError: Cannot set boolean toggle property '${e}' to '${t}'`}this.__connected?(this.props[e]=t||!1,""!==n&&null!==n?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(o.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},9766:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},3804:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryParseInt=e.toDotCase=e.toCamelCase=e.toKebabCase=void 0,e.toKebabCase=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),e.toCamelCase=t=>t.toLowerCase().replace(/(\-\w)/g,(t=>t[1].toUpperCase())),e.toDotCase=t=>t.replace(/(?!^)([A-Z])/g," $1").replace(/[_\s]+(?=[a-zA-Z])/g,".").toLowerCase(),e.tryParseInt=t=>parseInt(t)==t&&NaN!==parseFloat(t)?parseInt(t):t},4938:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(3804);e.Watch=t=>(e,n)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[o.toKebabCase(t)]=n,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},5527:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addGlobalStylesheet=e.getFocusableElementsInsideElement=void 0,e.getFocusableElementsInsideElement=t=>t.querySelectorAll('button, [href], input, [tabindex="0"]'),e.addGlobalStylesheet=(t,e)=>{const n=document.createElement("style");n.setAttribute("id",t),n.textContent=e,document.getElementById(t)||document.head.appendChild(n)}},4474:function(t,e,n){var o=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(e,n);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,r)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__decorate||function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return r(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnTable=void 0;const c=n(406),l=n(5527),u=a(n(8422));let d=class extends c.CustomElement{constructor(){super(),(0,l.addGlobalStylesheet)("gn-table-styles",u.default)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}static setup(t,e){(0,c.getElement)(t)}};i([(0,c.Prop)()],d.prototype,"id",void 0),i([(0,c.Toggle)()],d.prototype,"hoverable",void 0),d=i([(0,c.Component)({tag:"gn-table",template:Promise.resolve().then((()=>s(n(6500))))})],d),e.GnTable=d}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={id:o,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(4474)})())); | ||
//# sourceMappingURL=GnTable.js.map |
{ | ||
"name": "@kartverket/geonorge-web-components", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"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
4165868
3322