@kartverket/geonorge-web-components 3.0.2 → 4.0.4
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/BodyText.js +1 -1
- package/BodyText.js.map +1 -1
- package/BreadcrumbList.js +1 -1
- package/BreadcrumbList.js.map +1 -1
- package/ContentContainer.js +1 -1
- package/ContentContainer.js.map +1 -1
- package/DownloadItem.js +1 -1
- package/DownloadItem.js.map +1 -1
- package/GeonorgeFooter.js +1 -1
- package/GeonorgeFooter.js.map +1 -1
- package/GnAccordion.js +1 -1
- package/GnAccordion.js.map +1 -1
- package/GnBadgeList.js +1 -1
- package/GnBadgeList.js.map +1 -1
- package/GnBreadcrumbList.js +1 -1
- package/GnBreadcrumbList.js.map +1 -1
- package/GnButton.js +1 -1
- package/GnButton.js.map +1 -1
- package/GnDialog.js +1 -1
- package/GnDialog.js.map +1 -1
- package/GnFieldContainer.js +1 -1
- package/GnFieldContainer.js.map +1 -1
- package/GnInput.js +1 -1
- package/GnInput.js.map +1 -1
- package/GnLabel.js +1 -1
- package/GnLabel.js.map +1 -1
- package/GnList.js +1 -1
- package/GnList.js.map +1 -1
- package/GnSelect.js +1 -1
- package/GnSelect.js.map +1 -1
- package/GnShortcutButton.js +2 -0
- package/GnShortcutButton.js.map +1 -0
- package/GnSrOnly.js +1 -1
- package/GnSrOnly.js.map +1 -1
- package/GnTable.js +1 -1
- package/GnTable.js.map +1 -1
- package/GnTextarea.js +1 -1
- package/GnTextarea.js.map +1 -1
- package/HeadingText.js +1 -1
- package/HeadingText.js.map +1 -1
- package/MainMenu.js +1 -1
- package/MainMenu.js.map +1 -1
- package/MainNavigation.js +1 -1
- package/MainNavigation.js.map +1 -1
- package/MainSearchField.js +1 -1
- package/MainSearchField.js.map +1 -1
- package/MapItem.js +1 -1
- package/MapItem.js.map +1 -1
- package/NavigationTabContent.js +1 -1
- package/NavigationTabContent.js.map +1 -1
- package/NavigationTabHeading.js +1 -1
- package/NavigationTabHeading.js.map +1 -1
- package/NavigationTabs.js +1 -1
- package/NavigationTabs.js.map +1 -1
- package/SearchTypeSelector.js +1 -1
- package/SearchTypeSelector.js.map +1 -1
- package/UserAccount.js +1 -1
- package/UserAccount.js.map +1 -1
- package/apiHelpers.d.ts +10 -0
- package/gn-button.d.ts +5 -0
- package/gn-shortcut-button.d.ts +36 -0
- package/guiHelpers.d.ts +1 -0
- package/heading-text.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/navigation-tab-content.d.ts +1 -1
- package/package.json +2 -2
package/GnDialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GnDialog.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAY,SAAIC,IAC3E,CATD,CASGK,MAAM,I,yzCCRT,gBAWA,UAGA,aAGA,aASO,IAAMC,EAAN,cAAuB,EAAAC,cAM1B,WAAAC,GACIC,QAyBJ,KAAAC,mBAAsBC,IAClB,MAAMC,GAAuB,IAAAC,sBAAqBC,KAAM,mBAGlDC,EAFQD,KAAKE,WAAWC,cAAc,QACTC,mBACeC,MAAMC,KAC3CA,EAAoBC,SAASV,EAAMW,UAE1CC,EAA8BX,EAAqBS,SAASV,EAAMW,SACpEV,GAA0BG,GAAwBQ,GAClDT,KAAKU,YACT,EAGJ,KAAAA,WAAa,KACTV,KAAKW,aAAa,OAAQ,QAAQ,EAWtC,KAAAC,gBAAmBf,IACf,GACS,KADDA,EAAMgB,QAKN,OAAO,KAHPb,KAAKU,YAIb,GAxDA,IAAAI,qBAAoB,mBAAoB,UAC5C,CAEA,iBAAAC,GACI,MAAMC,GAA2B,IAAAjB,s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G,EAASyN,OAAOC,YAAa,CAAEvG,MAAO,WAE7DnB,OAAOC,eAAejG,EAAS,aAAc,CAAEmH,OAAO,GAAO,ECFpCsF,EAAoB,G","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/gn-dialog/gn-dialog.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/./assets/svg/close-icon-black.svg","webpack://geonorge/./stories/gn-dialog/template.scss","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/./stories/gn-dialog/gn-dialog.scss","webpack://geonorge/./functions/guiHelpers.ts","webpack://geonorge/./stories/gn-dialog/gn-dialog.html","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnDialog\"] = factory();\n})(self, () => {\nreturn ","// Dependencies\nimport {\n Component,\n CustomElement,\n CustomElementOptions,\n getShadowRootElement,\n Prop,\n Toggle,\n Watch\n} from \"super-custom-elements\";\n\n// Helpers\nimport { addGlobalStylesheet } from \"../../functions/guiHelpers\";\n\n// Assets\nimport CloseIcon from \"../../assets/svg/close-icon-black.svg\";\n\n// Stylesheets\nimport style from \"./gn-dialog.scss\";\n\ninterface GnDialogOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-dialog\",\n template: import(\"./gn-dialog.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnDialog extends CustomElement {\n @Toggle() show: boolean;\n @Toggle() nopadding: boolean;\n @Prop() width: string;\n @Prop() overflow: string;\n\n constructor() {\n super();\n addGlobalStylesheet(\"gn-dialog-styles\", style);\n }\n\n connectedCallback() {\n const closeDialogButtonElement = getShadowRootElement(this, \"#close-dialog-button\");\n closeDialogButtonElement.innerHTML = CloseIcon;\n closeDialogButtonElement.addEventListener(\"click\", this.hideDialog);\n\n const dialogContainerElement = getShadowRootElement(this, \"#dialog-container\");\n dialogContainerElement.addEventListener(\"click\", this.handleClickOutside);\n\n document.addEventListener(\"keydown\", this.keyDownFunction, false);\n }\n\n disconnectedCallback() {\n const closeDialogButtonElement = getShadowRootElement(this, \"#close-dialog-button\");\n closeDialogButtonElement.removeEventListener(\"click\", this.hideDialog);\n\n const dialogContainerElement = getShadowRootElement(this, \"#dialog-container\");\n dialogContainerElement.removeEventListener(\"click\", this.handleClickOutside);\n\n document.removeEventListener(\"keydown\", this.keyDownFunction, false);\n }\n\n handleClickOutside = (event) => {\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n const slots = this.shadowRoot.querySelector(\"slot\");\n const assignedSlotElements = slots.assignedElements();\n const hasClickedInsideSlot = assignedSlotElements.some((assignedSlotElement) => {\n return !!assignedSlotElement.contains(event.target);\n });\n const hasClickedInsideDialogChild = dialogContentElement.contains(event.target);\n if (dialogContentElement && !(hasClickedInsideSlot || hasClickedInsideDialogChild)) {\n this.hideDialog();\n }\n };\n\n hideDialog = () => {\n this.setAttribute(\"show\", \"false\");\n };\n\n shouldShowDialog(show) {\n return show?.toString() === \"\" || show?.toString() === \"true\";\n }\n\n shouldHaveNoPadding(noPadding) {\n return noPadding?.toString() === \"\" || noPadding?.toString() === \"true\";\n }\n\n keyDownFunction = (event) => {\n switch (event.keyCode) {\n case 27: // Escape\n this.hideDialog();\n break;\n default:\n return null;\n }\n };\n\n @Watch(\"show\")\n showMenuChanged() {\n const shouldShowDialog = this.shouldShowDialog(this.show);\n const dialogContainerElement = getShadowRootElement(this, \"#dialog-container\");\n shouldShowDialog\n ? dialogContainerElement?.classList.add(\"visible\")\n : dialogContainerElement?.classList.remove(\"visible\");\n }\n\n @Watch(\"nopadding\")\n nopaddingChanged() {\n const shouldHaveNoPadding = this.shouldHaveNoPadding(this.nopadding);\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n shouldHaveNoPadding\n ? dialogContentElement.classList.add(\"noPadding\")\n : dialogContentElement.classList.remove(\"noPadding\");\n }\n\n @Watch(\"overflow\")\n overflowChanged() {\n const overflow = this.overflow?.length ? this.overflow : \"visible\";\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n dialogContentElement.style.overflow = overflow;\n }\n\n @Watch(\"width\")\n widthChanged() {\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n dialogContentElement.style.maxWidth = this.width;\n }\n\n setup(options?: GnDialogOptions): void {}\n}\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 -960 960 960\\\"><path fill=\\\"currentColor\\\" d=\\\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\\\"></path></svg>\"","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.dialog-container:not(.visible){display:none}.dialog-container.visible{display:flex;flex-wrap:wrap;position:fixed;width:100%;background:rgba(0,0,0,.25);height:100%;top:0;left:0;align-content:center;padding:8px 28px;z-index:2;justify-content:center;box-sizing:border-box}@media(min-width: 992px){.dialog-container.visible{padding:36px}}.dialog-container .dialog-content{max-height:-moz-calc(100% - 128px);max-height:-webkit-calc(100% - 128px);max-height:calc(100% - 128px);-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);-moz-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);-webkit-border-radius:4px;border-radius:4px;max-width:540px;width:100%;background-color:#fff;position:relative}.dialog-container .dialog-content:not(.noPadding){padding:28px 22px 22px}@media(min-width: 768px){.dialog-container .dialog-content:not(.noPadding){padding:38px 30px 30px}}.dialog-container .dialog-content.noPadding{padding:28px 0 0}@media(min-width: 768px){.dialog-container .dialog-content.noPadding{padding:38px 0 0}}@media(min-width: 992px){.dialog-container .dialog-content{width:-moz-calc(100% - 128px);width:-webkit-calc(100% - 128px);width:calc(100% - 128px);max-height:100%}}.dialog-container .dialog-content .close-dialog-button{background:none;border:none;color:#2f3940;display:inline-block;position:absolute;right:7px;top:4px;text-decoration:underline;font-size:19px;cursor:pointer;padding:0;right:8px;top:5px}@media(min-width: 768px){.dialog-container .dialog-content .close-dialog-button{right:15px;top:10px}}.dialog-container .dialog-content .close-dialog-button:hover{text-decoration:none}.dialog-container .dialog-content .close-dialog-button svg{width:17px;height:17px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-dialog/template.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/mixins/_calc.scss\",\"webpack://./style/mixins/_box-shadow.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/variables/_colors.scss\"],\"names\":[],\"mappings\":\"AAGI,gCACI,YAAA,CAEJ,0BACI,YAAA,CACA,cAAA,CACA,cAAA,CACA,UAAA,CACA,0BAAA,CACA,WAAA,CACA,KAAA,CACA,MAAA,CACA,oBAAA,CACA,gBAAA,CACA,SAAA,CACA,sBAAA,CACA,qBAAA,CCbA,yBAAA,0BDeI,YAAA,CAAA,CAGR,kCEvBF,kCAAA,CACA,qCAAA,CACA,6BAAA,CCFE,iHHyBI,CGxBJ,8GHwBI,CGvBJ,yGHuBI,CIzBN,yBJ8B6B,CI7B7B,iBJ6B6B,CACvB,eAAA,CACA,UAAA,CACA,qBAAA,CACA,iBAAA,CACA,kDACI,sBAAA,CC3BJ,yBD0BA,kDAGQ,sBAAA,CAAA,CAGR,4CACI,gBAAA,CCjCJ,yBDgCA,4CAGQ,gBAAA,CAAA,CCvCR,yBDkBJ,kCEvBF,6BAAA,CACA,gCAAA,CACA,wBAAA,CF+CU,eAAA,CAAA,CAEJ,uDACI,eAAA,CACA,WAAA,CACA,aKhDE,CLiDF,oBAAA,CACA,iBAAA,CACA,SAAA,CACA,OAAA,CACA,yBAAA,CACA,cAAA,CACA,cAAA,CACA,SAAA,CACA,SAAA,CACA,OAAA,CCvDJ,yBD0CA,uDAeQ,UAAA,CACA,QAAA,CAAA,CAEJ,6DACI,oBAAA,CAEJ,2DACI,UAAA,CACA,WAAA\",\"sourcesContent\":[\"@import \\\"../../style/all\\\";\\n\\n.dialog-container {\\n &:not(.visible) {\\n display: none;\\n }\\n &.visible {\\n display: flex;\\n flex-wrap: wrap;\\n position: fixed;\\n width: 100%;\\n background: rgba(0, 0, 0, 0.25);\\n height: 100%;\\n top: 0;\\n left: 0;\\n align-content: center;\\n padding: 8px 28px;\\n z-index: 2;\\n justify-content: center;\\n box-sizing: border-box;\\n @include breakpoint(laptop) {\\n padding: 36px;\\n }\\n }\\n .dialog-content {\\n @include calc(\\\"max-height\\\", \\\"100% - 128px\\\");\\n @include box-shadow(\\n 0 11px 15px -7px rgba(0, 0, 0, 0.2),\\n 0 24px 38px 3px rgba(0, 0, 0, 0.14),\\n 0 9px 46px 8px rgba(0, 0, 0, 0.12)\\n );\\n @include border-radius(4px);\\n max-width: 540px;\\n width: 100%;\\n background-color: #fff;\\n position: relative;\\n &:not(.noPadding) {\\n padding: 28px 22px 22px;\\n @include breakpoint(tablet) {\\n padding: 38px 30px 30px;\\n }\\n }\\n &.noPadding {\\n padding: 28px 0 0;\\n @include breakpoint(tablet) {\\n padding: 38px 0 0;\\n }\\n }\\n @include breakpoint(laptop) {\\n @include calc(\\\"width\\\", \\\"100% - 128px\\\");\\n max-height: 100%;\\n }\\n .close-dialog-button {\\n background: none;\\n border: none;\\n color: $default-text;\\n display: inline-block;\\n position: absolute;\\n right: 7px;\\n top: 4px;\\n text-decoration: underline;\\n font-size: 19px;\\n cursor: pointer;\\n padding: 0;\\n right: 8px;\\n top: 5px;\\n @include breakpoint(tablet) {\\n right: 15px;\\n top: 10px;\\n }\\n &:hover {\\n text-decoration: none;\\n }\\n svg {\\n width: 17px;\\n height: 17px;\\n }\\n }\\n }\\n}\\n\",\"@mixin breakpoint($point) {\\n @if $point == desktop {\\n @media (min-width: $screen-desktop) {\\n @content;\\n }\\n } @else if $point == laptop {\\n @media (min-width: $screen-laptop) {\\n @content;\\n }\\n } @else if $point == tablet {\\n @media (min-width: $screen-tablet) {\\n @content;\\n }\\n } @else if $point == phablet {\\n @media (min-width: $screen-phablet) {\\n @content;\\n }\\n }\\n}\\n\",\"@mixin calc($property, $expression) {\\n #{$property}: -moz-calc(#{$expression});\\n #{$property}: -webkit-calc(#{$expression});\\n #{$property}: calc(#{$expression});\\n}\",\"@mixin box-shadow($shadows...) {\\n -webkit-box-shadow: $shadows;\\n -moz-box-shadow: $shadows;\\n box-shadow: $shadows;\\n}\\n\",\"@mixin border-radius($radius) {\\n -webkit-border-radius: $radius;\\n border-radius: $radius;\\n}\\n\\n// Single side border-radius\\n\\n@mixin border-top-radius($radius) {\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\\n@mixin border-right-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n}\\n@mixin border-bottom-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n}\\n@mixin border-left-radius($radius) {\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\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$light-gray: #f6f5f4;\\n\\n$primary-brand: #FE5000;\\n\\n$primary-background: #3767C7;\\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: #f4f4f4;\\n$disabled-border: #dedede;\\n$disabled-text: #707070;\\n\\n\\n$light-green: #8fff33;\\n$light-yellow: #ffEb3b;\\n$light-red: #ff4a2e;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `gn-dialog{position:absolute}gn-dialog heading-text h1,gn-dialog heading-text h2,gn-dialog heading-text h3,gn-dialog heading-text h4,gn-dialog heading-text h5{margin-top:0}gn-dialog heading-text h1:before,gn-dialog heading-text h2:before,gn-dialog heading-text h3:before,gn-dialog heading-text h4:before,gn-dialog heading-text h5:before{margin-top:0}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-dialog/gn-dialog.scss\"],\"names\":[],\"mappings\":\"AAAA,UACG,iBAAA,CAEK,kIACG,YAAA,CACA,qKACG,YAAA\",\"sourcesContent\":[\"gn-dialog {\\n position: absolute;\\n heading-text {\\n h1, h2, h3, h4, h5 {\\n margin-top: 0;\\n &:before {\\n margin-top: 0;\\n }\\n }\\n }\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export const getFocusableElementsInsideElement = (element: HTMLElement) => {\n return element.querySelectorAll('button, [href], input, [tabindex=\"0\"]');\n};\n\nexport const addGlobalStylesheet = (styleElementId: string, styles: string) => {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", styleElementId);\n style.textContent = styles;\n if (!document.getElementById(styleElementId)) {\n document.head.appendChild(style);\n }\n};\n\nexport const removeInnerHTML = (element: HTMLElement) => {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n};\n","export default \"<template>\\n <div id=\\\"dialog-container\\\" class=\\\"dialog-container\\\">\\n <div id=\\\"dialog-content\\\" class=\\\"dialog-content\\\">\\n <button id=\\\"close-dialog-button\\\" class=\\\"close-dialog-button\\\"></button>\\n <slot></slot>\\n </div>\\n </div>\\n</template>\\n\";","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(72);\n"],"names":["root","factory","exports","module","define","amd","self","GnDialog","CustomElement","constructor","super","handleClickOutside","event","dialogContentElement","getShadowRootElement","this","hasClickedInsideSlot","shadowRoot","querySelector","assignedElements","some","assignedSlotElement","contains","target","hasClickedInsideDialogChild","hideDialog","setAttribute","keyDownFunction","keyCode","addGlobalStylesheet","connectedCallback","closeDialogButtonElement","innerHTML","addEventListener","document","disconnectedCallback","removeEventListener","shouldShowDialog","show","toString","shouldHaveNoPadding","noPadding","showMenuChanged","dialogContainerElement","classList","add","remove","nopaddingChanged","nopadding","overflowChanged","overflow","length","style","widthChanged","maxWidth","width","setup","options","Toggle","Prop","Watch","Component","tag","template","cssWithMappingToString","list","map","item","content","needLayer","concat","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","Listen","eventName","selector","methodName","listeners","handler","addEventListeners","targetRoot","listener","eventTarget","e","call","Dispatch","propertyName","Object","defineProperty","get","emit","evtName","toDotCase","dispatchEvent","CustomEvent","attrName","watchAttributes","toKebabCase","propsInit","str","replace","toLowerCase","toCamelCase","m","toUpperCase","tryParseInt","value","parseInt","NaN","parseFloat","getElement","customElement","___CSS_LOADER_EXPORT___","HTMLElement","connect","isConnected","appendChild","propName","hasAttribute","attrValue","getAttribute","test","set","oldValue","console","warn","__connected","props","removeAttribute","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","getFocusableElementsInsideElement","element","querySelectorAll","styleElementId","styles","createElement","textContent","getElementById","head","removeInnerHTML","firstChild","removeChild","onAttributeChange","initializeProps","prop","plainAttributes","keys","forEach","v","cycleProps","getProps","attribValue","new","args","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","render","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","css","ready","resolve","_","customElements","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"GnDialog.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAY,SAAIC,IAC3E,CATD,CASGK,MAAM,I,yzCCRT,gBAWA,UAGA,aAGA,aASO,IAAMC,EAAN,cAAuB,EAAAC,cAM1B,WAAAC,GACIC,QAyBJ,KAAAC,mBAAsBC,IAClB,MAAMC,GAAuB,IAAAC,sBAAqBC,KAAM,mBAGlDC,EAFQD,KAAKE,WAAWC,cAAc,QACTC,mBACeC,MAAMC,KAC3CA,EAAoBC,SAASV,EAAMW,UAE1CC,EAA8BX,EAAqBS,SAASV,EAAMW,SACpEV,GAA0BG,GAAwBQ,GAClDT,KAAKU,YACT,EAGJ,KAAAA,WAAa,KACTV,KAAKW,aAAa,OAAQ,QAAQ,EAWtC,KAAAC,gBAAmBf,IACf,GACS,KADDA,EAAMgB,QAKN,OAAO,KAHPb,KAAKU,YAIb,GAxDA,IAAAI,qBAAoB,mBAAoB,UAC5C,CAEA,iBAAAC,GACI,MAAMC,GAA2B,IAAAjB,sBAAqBC,KAAM,wBAC5DgB,EAAyBC,UAAY,UACrCD,EAAyBE,iBAAiB,QAASlB,KAAKU,aAEzB,IAAAX,sBAAqBC,KAAM,qBACnCkB,iBAAiB,QAASlB,KAAKJ,oBAEtDuB,SAASD,iBAAiB,UAAWlB,KAAKY,iBAAiB,EAC/D,CAEA,oBAAAQ,IACqC,IAAArB,sBAAqBC,KAAM,wBACnCqB,oBAAoB,QAASrB,KAAKU,aAE5B,IAAAX,sBAAqBC,KAAM,qBACnCqB,oBAAoB,QAASrB,KAAKJ,oBAE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UAAUA,YAAgB,EAC5C,G,IAzFiB9D,aAAuB,EAIvB,EAAA+D,MAA0B,IAAIX,SAAQ,CAACY,EAASC,IAAMD,GAAQ,K,GA4FjF,OAJKE,eAAevG,IAAItC,IACtB6I,eAAevM,OAAO0D,EAAK4D,GAGtBA,CAAa,C,+ECxGpBkF,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBhI,IAAjBiI,EACH,OAAOA,EAAa7M,QAGrB,IAAIC,EAASyM,EAAyBE,GAAY,CACjD7H,GAAI6H,EAEJ5M,QAAS,CAAC,GAOX,OAHA8M,EAAoBF,GAAU/G,KAAK5F,EAAOD,QAASC,EAAQA,EAAOD,QAAS2M,GAGpE1M,EAAOD,OACf,C,OCrBA2M,EAAoBI,EAAK9M,IACxB,IAAI+M,EAAS/M,GAAUA,EAAOgN,WAC7B,IAAOhN,EAAiB,QACxB,IAAM,EAEP,OADA0M,EAAoBO,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdL,EAAoBO,EAAI,CAAClN,EAASoN,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF,EAAYC,KAASV,EAAoBW,EAAEtN,EAASqN,IAC5ErH,OAAOC,eAAejG,EAASqN,EAAK,CAAEE,YAAY,EAAMrH,IAAKkH,EAAWC,IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAKrD,IAAUnE,OAAO6E,UAAU4C,eAAe5H,KAAK2H,EAAKrD,GCClFwC,EAAoBe,EAAK1N,IACH,oBAAX2N,QAA0BA,OAAOC,aAC1C5H,OAAOC,eAAejG,EAAS2N,OAAOC,YAAa,CAAEzG,MAAO,WAE7DnB,OAAOC,eAAejG,EAAS,aAAc,CAAEmH,OAAO,GAAO,ECFpCwF,EAAoB,G","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/gn-dialog/gn-dialog.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/./assets/svg/close-icon-black.svg","webpack://geonorge/./stories/gn-dialog/template.scss","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/./stories/gn-dialog/gn-dialog.scss","webpack://geonorge/./functions/guiHelpers.ts","webpack://geonorge/./stories/gn-dialog/gn-dialog.html","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnDialog\"] = factory();\n})(self, () => {\nreturn ","// Dependencies\nimport {\n Component,\n CustomElement,\n CustomElementOptions,\n getShadowRootElement,\n Prop,\n Toggle,\n Watch\n} from \"super-custom-elements\";\n\n// Helpers\nimport { addGlobalStylesheet } from \"../../functions/guiHelpers\";\n\n// Assets\nimport CloseIcon from \"../../assets/svg/close-icon-black.svg\";\n\n// Stylesheets\nimport style from \"./gn-dialog.scss\";\n\ninterface GnDialogOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-dialog\",\n template: import(\"./gn-dialog.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnDialog extends CustomElement {\n @Toggle() show: boolean;\n @Toggle() nopadding: boolean;\n @Prop() width: string;\n @Prop() overflow: string;\n\n constructor() {\n super();\n addGlobalStylesheet(\"gn-dialog-styles\", style);\n }\n\n connectedCallback() {\n const closeDialogButtonElement = getShadowRootElement(this, \"#close-dialog-button\");\n closeDialogButtonElement.innerHTML = CloseIcon;\n closeDialogButtonElement.addEventListener(\"click\", this.hideDialog);\n\n const dialogContainerElement = getShadowRootElement(this, \"#dialog-container\");\n dialogContainerElement.addEventListener(\"click\", this.handleClickOutside);\n\n document.addEventListener(\"keydown\", this.keyDownFunction, false);\n }\n\n disconnectedCallback() {\n const closeDialogButtonElement = getShadowRootElement(this, \"#close-dialog-button\");\n closeDialogButtonElement.removeEventListener(\"click\", this.hideDialog);\n\n const dialogContainerElement = getShadowRootElement(this, \"#dialog-container\");\n dialogContainerElement.removeEventListener(\"click\", this.handleClickOutside);\n\n document.removeEventListener(\"keydown\", this.keyDownFunction, false);\n }\n\n handleClickOutside = (event) => {\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n const slots = this.shadowRoot.querySelector(\"slot\");\n const assignedSlotElements = slots.assignedElements();\n const hasClickedInsideSlot = assignedSlotElements.some((assignedSlotElement) => {\n return !!assignedSlotElement.contains(event.target);\n });\n const hasClickedInsideDialogChild = dialogContentElement.contains(event.target);\n if (dialogContentElement && !(hasClickedInsideSlot || hasClickedInsideDialogChild)) {\n this.hideDialog();\n }\n };\n\n hideDialog = () => {\n this.setAttribute(\"show\", \"false\");\n };\n\n shouldShowDialog(show) {\n return show?.toString() === \"\" || show?.toString() === \"true\";\n }\n\n shouldHaveNoPadding(noPadding) {\n return noPadding?.toString() === \"\" || noPadding?.toString() === \"true\";\n }\n\n keyDownFunction = (event) => {\n switch (event.keyCode) {\n case 27: // Escape\n this.hideDialog();\n break;\n default:\n return null;\n }\n };\n\n @Watch(\"show\")\n showMenuChanged() {\n const shouldShowDialog = this.shouldShowDialog(this.show);\n const dialogContainerElement = getShadowRootElement(this, \"#dialog-container\");\n shouldShowDialog\n ? dialogContainerElement?.classList.add(\"visible\")\n : dialogContainerElement?.classList.remove(\"visible\");\n }\n\n @Watch(\"nopadding\")\n nopaddingChanged() {\n const shouldHaveNoPadding = this.shouldHaveNoPadding(this.nopadding);\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n shouldHaveNoPadding\n ? dialogContentElement.classList.add(\"noPadding\")\n : dialogContentElement.classList.remove(\"noPadding\");\n }\n\n @Watch(\"overflow\")\n overflowChanged() {\n const overflow = this.overflow?.length ? this.overflow : \"visible\";\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n dialogContentElement.style.overflow = overflow;\n }\n\n @Watch(\"width\")\n widthChanged() {\n const dialogContentElement = getShadowRootElement(this, \"#dialog-content\");\n dialogContentElement.style.maxWidth = this.width;\n }\n\n setup(options?: GnDialogOptions): void {}\n}\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 -960 960 960\\\"><path fill=\\\"currentColor\\\" d=\\\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\\\"></path></svg>\"","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.dialog-container:not(.visible){display:none}.dialog-container.visible{display:flex;flex-wrap:wrap;position:fixed;width:100%;background:rgba(0,0,0,.25);height:100%;top:0;left:0;align-content:center;padding:8px 28px;z-index:2;justify-content:center;box-sizing:border-box}@media(min-width: 992px){.dialog-container.visible{padding:36px}}.dialog-container .dialog-content{max-height:-moz-calc(100% - 128px);max-height:-webkit-calc(100% - 128px);max-height:calc(100% - 128px);-webkit-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);-moz-box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);-webkit-border-radius:4px;border-radius:4px;max-width:540px;width:100%;background-color:#fff;position:relative}.dialog-container .dialog-content:not(.noPadding){padding:28px 22px 22px}@media(min-width: 768px){.dialog-container .dialog-content:not(.noPadding){padding:38px 30px 30px}}.dialog-container .dialog-content.noPadding{padding:28px 0 0}@media(min-width: 768px){.dialog-container .dialog-content.noPadding{padding:38px 0 0}}@media(min-width: 992px){.dialog-container .dialog-content{width:-moz-calc(100% - 128px);width:-webkit-calc(100% - 128px);width:calc(100% - 128px);max-height:100%}}.dialog-container .dialog-content .close-dialog-button{background:none;border:none;color:#2f3940;display:inline-block;position:absolute;right:7px;top:4px;text-decoration:underline;font-size:19px;cursor:pointer;padding:0;right:8px;top:5px}@media(min-width: 768px){.dialog-container .dialog-content .close-dialog-button{right:15px;top:10px}}.dialog-container .dialog-content .close-dialog-button:hover{text-decoration:none}.dialog-container .dialog-content .close-dialog-button svg{width:17px;height:17px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-dialog/template.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/mixins/_calc.scss\",\"webpack://./style/mixins/_box-shadow.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/variables/_colors.scss\"],\"names\":[],\"mappings\":\"AAOI,gCACI,YAAA,CAEJ,0BACI,YAAA,CACA,cAAA,CACA,cAAA,CACA,UAAA,CACA,0BAAA,CACA,WAAA,CACA,KAAA,CACA,MAAA,CACA,oBAAA,CACA,gBAAA,CACA,SAAA,CACA,sBAAA,CACA,qBAAA,CCfA,yBDEJ,0BAeQ,YAAA,CAAA,CAGR,kCE3BF,kCAAA,CACA,qCAAA,CACA,6BAAA,CCFE,iHH6BI,CG5BJ,8GH4BI,CG3BJ,yGH2BI,CI7BN,yBJkC2C,CIjC3C,iBJiC2C,CACrC,eAAA,CACA,UAAA,CACA,qBAAA,CACA,iBAAA,CACA,kDACI,sBAAA,CC7BJ,yBD4BA,kDAGQ,sBAAA,CAAA,CAGR,4CACI,gBAAA,CCnCJ,yBDkCA,4CAGQ,gBAAA,CAAA,CCzCR,yBDoBJ,kCE3BF,6BAAA,CACA,gCAAA,CACA,wBAAA,CFmDU,eAAA,CAAA,CAEJ,uDACI,eAAA,CACA,WAAA,CACA,aKpDE,CLqDF,oBAAA,CACA,iBAAA,CACA,SAAA,CACA,OAAA,CACA,yBAAA,CACA,cAAA,CACA,cAAA,CACA,SAAA,CACA,SAAA,CACA,OAAA,CCzDJ,yBD4CA,uDAeQ,UAAA,CACA,QAAA,CAAA,CAEJ,6DACI,oBAAA,CAEJ,2DACI,UAAA,CACA,WAAA\",\"sourcesContent\":[\"@use \\\"../../style/mixins/border-radius\\\";\\n@use \\\"../../style/mixins/box-shadow\\\";\\n@use \\\"../../style/mixins/breakpoints\\\";\\n@use \\\"../../style/mixins/calc\\\";\\n@use \\\"../../style/variables/colors\\\";\\n\\n.dialog-container {\\n &:not(.visible) {\\n display: none;\\n }\\n &.visible {\\n display: flex;\\n flex-wrap: wrap;\\n position: fixed;\\n width: 100%;\\n background: rgba(0, 0, 0, 0.25);\\n height: 100%;\\n top: 0;\\n left: 0;\\n align-content: center;\\n padding: 8px 28px;\\n z-index: 2;\\n justify-content: center;\\n box-sizing: border-box;\\n @include breakpoints.breakpoint(laptop) {\\n padding: 36px;\\n }\\n }\\n .dialog-content {\\n @include calc.calc(\\\"max-height\\\", \\\"100% - 128px\\\");\\n @include box-shadow.box-shadow(\\n 0 11px 15px -7px rgba(0, 0, 0, 0.2),\\n 0 24px 38px 3px rgba(0, 0, 0, 0.14),\\n 0 9px 46px 8px rgba(0, 0, 0, 0.12)\\n );\\n @include border-radius.border-radius(4px);\\n max-width: 540px;\\n width: 100%;\\n background-color: #fff;\\n position: relative;\\n &:not(.noPadding) {\\n padding: 28px 22px 22px;\\n @include breakpoints.breakpoint(tablet) {\\n padding: 38px 30px 30px;\\n }\\n }\\n &.noPadding {\\n padding: 28px 0 0;\\n @include breakpoints.breakpoint(tablet) {\\n padding: 38px 0 0;\\n }\\n }\\n @include breakpoints.breakpoint(laptop) {\\n @include calc.calc(\\\"width\\\", \\\"100% - 128px\\\");\\n max-height: 100%;\\n }\\n .close-dialog-button {\\n background: none;\\n border: none;\\n color: colors.$default-text;\\n display: inline-block;\\n position: absolute;\\n right: 7px;\\n top: 4px;\\n text-decoration: underline;\\n font-size: 19px;\\n cursor: pointer;\\n padding: 0;\\n right: 8px;\\n top: 5px;\\n @include breakpoints.breakpoint(tablet) {\\n right: 15px;\\n top: 10px;\\n }\\n &:hover {\\n text-decoration: none;\\n }\\n svg {\\n width: 17px;\\n height: 17px;\\n }\\n }\\n }\\n}\\n\",\"@use \\\"../variables/breakpoints\\\";\\n\\n@mixin breakpoint($point) {\\n @if $point == desktop {\\n @media (min-width: breakpoints.$screen-desktop) {\\n @content;\\n }\\n } @else if $point == laptop {\\n @media (min-width: breakpoints.$screen-laptop) {\\n @content;\\n }\\n } @else if $point == tablet {\\n @media (min-width: breakpoints.$screen-tablet) {\\n @content;\\n }\\n } @else if $point == phablet {\\n @media (min-width: breakpoints.$screen-phablet) {\\n @content;\\n }\\n }\\n}\\n\",\"@mixin calc($property, $expression) {\\n #{$property}: -moz-calc(#{$expression});\\n #{$property}: -webkit-calc(#{$expression});\\n #{$property}: calc(#{$expression});\\n}\",\"@mixin box-shadow($shadows...) {\\n -webkit-box-shadow: $shadows;\\n -moz-box-shadow: $shadows;\\n box-shadow: $shadows;\\n}\\n\",\"@mixin border-radius($radius) {\\n -webkit-border-radius: $radius;\\n border-radius: $radius;\\n}\\n\\n// Single side border-radius\\n\\n@mixin border-top-radius($radius) {\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\n}\\n@mixin border-right-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-top-right-radius: $radius;\\n border-top-right-radius: $radius;\\n}\\n@mixin border-bottom-radius($radius) {\\n -webkit-border-bottom-right-radius: $radius;\\n border-bottom-right-radius: $radius;\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n}\\n@mixin border-left-radius($radius) {\\n -webkit-border-bottom-left-radius: $radius;\\n border-bottom-left-radius: $radius;\\n -webkit-border-top-left-radius: $radius;\\n border-top-left-radius: $radius;\\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$light-gray: #f6f5f4;\\n\\n$primary-brand: #FE5000;\\n\\n$primary-background: #3767C7;\\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: #f4f4f4;\\n$disabled-border: #dedede;\\n$disabled-text: #707070;\\n\\n\\n$light-green: #8fff33;\\n$light-yellow: #ffEb3b;\\n$light-red: #ff4a2e;\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `gn-dialog{position:absolute}gn-dialog heading-text h1,gn-dialog heading-text h2,gn-dialog heading-text h3,gn-dialog heading-text h4,gn-dialog heading-text h5{margin-top:0}gn-dialog heading-text h1:before,gn-dialog heading-text h2:before,gn-dialog heading-text h3:before,gn-dialog heading-text h4:before,gn-dialog heading-text h5:before{margin-top:0}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-dialog/gn-dialog.scss\"],\"names\":[],\"mappings\":\"AAAA,UACG,iBAAA,CAEG,kIAKG,YAAA,CACA,qKACG,YAAA\",\"sourcesContent\":[\"gn-dialog {\\n position: absolute;\\n heading-text {\\n h1,\\n h2,\\n h3,\\n h4,\\n h5 {\\n margin-top: 0;\\n &:before {\\n margin-top: 0;\\n }\\n }\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","export const getFocusableElementsInsideElement = (element: HTMLElement) => {\n return element.querySelectorAll('button, [href], input, [tabindex=\"0\"]');\n};\n\nexport const getDocumentHeading = () => {\n let documentHeading = document.querySelector(\"heading-text\") as HTMLElement | null; // This assumes that the heading is wrapped in a custom element called \"heading-text\"\n if (!documentHeading) {\n documentHeading = document.querySelector(\"h1:not(.sb-nopreview_heading.sb-heading)\") as HTMLElement | null; // Exclude the heading used by Storybook\n }\n return documentHeading;\n};\n\nexport const addGlobalStylesheet = (styleElementId: string, styles: string) => {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", styleElementId);\n style.textContent = styles;\n if (!document.getElementById(styleElementId)) {\n document.head.appendChild(style);\n }\n};\n\nexport const removeInnerHTML = (element: HTMLElement) => {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n};\n","export default \"<template>\\n <div id=\\\"dialog-container\\\" class=\\\"dialog-container\\\">\\n <div id=\\\"dialog-content\\\" class=\\\"dialog-content\\\">\\n <button id=\\\"close-dialog-button\\\" class=\\\"close-dialog-button\\\"></button>\\n <slot></slot>\\n </div>\\n </div>\\n</template>\\n\";","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(72);\n"],"names":["root","factory","exports","module","define","amd","self","GnDialog","CustomElement","constructor","super","handleClickOutside","event","dialogContentElement","getShadowRootElement","this","hasClickedInsideSlot","shadowRoot","querySelector","assignedElements","some","assignedSlotElement","contains","target","hasClickedInsideDialogChild","hideDialog","setAttribute","keyDownFunction","keyCode","addGlobalStylesheet","connectedCallback","closeDialogButtonElement","innerHTML","addEventListener","document","disconnectedCallback","removeEventListener","shouldShowDialog","show","toString","shouldHaveNoPadding","noPadding","showMenuChanged","dialogContainerElement","classList","add","remove","nopaddingChanged","nopadding","overflowChanged","overflow","length","style","widthChanged","maxWidth","width","setup","options","Toggle","Prop","Watch","Component","tag","template","cssWithMappingToString","list","map","item","content","needLayer","concat","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","Listen","eventName","selector","methodName","listeners","handler","addEventListeners","targetRoot","listener","eventTarget","e","call","Dispatch","propertyName","Object","defineProperty","get","emit","evtName","toDotCase","dispatchEvent","CustomEvent","attrName","watchAttributes","toKebabCase","propsInit","str","replace","toLowerCase","toCamelCase","m","toUpperCase","tryParseInt","value","parseInt","NaN","parseFloat","getElement","customElement","___CSS_LOADER_EXPORT___","HTMLElement","connect","isConnected","appendChild","propName","hasAttribute","attrValue","getAttribute","test","set","oldValue","console","warn","__connected","props","removeAttribute","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","getFocusableElementsInsideElement","element","querySelectorAll","getDocumentHeading","documentHeading","styleElementId","styles","createElement","textContent","getElementById","head","removeInnerHTML","firstChild","removeChild","onAttributeChange","initializeProps","prop","plainAttributes","keys","forEach","v","cycleProps","getProps","attribValue","new","args","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","render","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","css","ready","resolve","_","customElements","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|
package/GnFieldContainer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!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.GnFieldContainer=e())}(self,(()=>(()=>{"use strict";var t={164: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,s){"string"==typeof t&&(t=[[null,t,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<t.length;l++){var u=[].concat(t[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)),e.push(u))}},e}},169:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const o=n(2466);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 s=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(s,r))}}}})}},1063:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const o=n(2466);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}},1896:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const o="<template>\n <slot></slot>\n</template>\n"},2466:(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},3128: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(8631),e),r(n(3704),e),r(n(3365),e),r(n(169),e),r(n(6999),e),r(n(3982),e),r(n(8861),e),r(n(1063),e)},3365:(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)},3704:(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},3982:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const o=n(2466);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)}})}},5052: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),s="/*# ".concat(r," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},5979:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeInnerHTML=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)},e.removeInnerHTML=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)}},6999:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const o=n(2466);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]))}}},7198:(t,e,n)=>{n.r(e),n.d(e,{default:()=>c});var o=n(5052),r=n.n(o),s=n(164),i=n.n(s)()(r());i.push([t.id,"gn-field-container{margin-bottom:16px}gn-field-container[block]{display:block}gn-field-container[inlineblock]{margin-right:16px}gn-field-container:not([block]){display:inline-block}","",{version:3,sources:["webpack://./stories/gn-field-container/gn-field-container.scss"],names:[],mappings:"AAEA,mBACI,kBAAA,CACA,0BACI,aAAA,CAEJ,gCACI,iBAAA,CAEJ,gCACI,oBAAA",sourcesContent:['@import "../../style/all";\n\ngn-field-container {\n margin-bottom: 16px;\n &[block] {\n display: block;\n }\n &[inlineblock] {\n margin-right: 16px;\n }\n &:not([block]) {\n display: inline-block;\n }\n}\n'],sourceRoot:""}]);const c=i},8631:function(t,e,n){var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,s){function i(t){try{a(o.next(t))}catch(t){s(t)}}function c(t){try{a(o.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,c)}a((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=n(169),s=n(6999),i=n(2466);e.Component=t=>e=>{var n;const c=t.tag||i.toKebabCase(e.prototype.constructor.name),a=((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=>i.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[i.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),s.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(c)||customElements.define(c,a),a}},8861:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9950:function(t,e,n){var o,r=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]}),s=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,s=arguments.length,i=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,o);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(i=(s<3?r(i):s>3?r(e,n,i):r(e,n))||i);return s>3&&i&&Object.defineProperty(e,n,i),i},c=this&&this.__importStar||(o=function(t){return o=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},o(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=o(t),i=0;i<n.length;i++)"default"!==n[i]&&r(e,t,n[i]);return s(e,t),e}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GnFieldContainer=void 0;const l=n(3128),u=n(5979),d=a(n(7198));let p=class extends l.CustomElement{constructor(){super(),(0,u.addGlobalStylesheet)("gn-field-container-styles",d.default)}setup(t){}};e.GnFieldContainer=p,e.GnFieldContainer=p=i([(0,l.Component)({tag:"gn-field-container",template:Promise.resolve().then((()=>c(n(1896))))})],p)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={id:o,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.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(9950)})()));
|
|
1
|
+
!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.GnFieldContainer=e())}(self,(()=>(()=>{"use strict";var t={164:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var i={};if(n)for(var c=0;c<this.length;c++){var a=this[c][0];null!=a&&(i[a]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&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),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},169:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Dispatch=e.addEventListeners=e.Listen=void 0;const n=o(2466);e.Listen=(t,e)=>(o,n)=>{o.constructor.listeners||(o.constructor.listeners=[]),o.constructor.listeners.push({selector:e,eventName:t,handler:o[n]})},e.addEventListeners=t=>{if(t.constructor.listeners){const e=t.shadowRoot||t;for(const o of t.constructor.listeners){const n=o.selector?e.querySelector(o.selector)?e.querySelector(o.selector):null:t;n&&n.addEventListener(o.eventName,(e=>{o.handler.call(t,e)}))}}},e.Dispatch=t=>(e,o)=>{Object.defineProperty(e,o,{get:function(){const e=this;return{emit(r){const s=t||n.toDotCase(o);e.dispatchEvent(new CustomEvent(s,r))}}}})}},1063:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;const n=o(2466);e.Watch=t=>(e,o)=>{e.constructor.watchAttributes||(e.constructor.watchAttributes={}),e.constructor.watchAttributes[n.toKebabCase(t)]=o,e.constructor.propsInit||(e.constructor.propsInit={}),e.constructor.propsInit[t]=null}},1896:(t,e,o)=>{o.r(e),o.d(e,{default:()=>n});const n="<template>\n <slot></slot>\n</template>\n"},2466:(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},3128:function(t,e,o){var n=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),r=this&&this.__exportStar||function(t,e){for(var o in t)"default"===o||Object.prototype.hasOwnProperty.call(e,o)||n(e,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(o(8631),e),r(o(3704),e),r(o(3365),e),r(o(169),e),r(o(6999),e),r(o(3982),e),r(o(8861),e),r(o(1063),e)},3365:(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)},3704:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CustomElement=void 0;class o extends HTMLElement{constructor(){super()}connect(t){this.isConnected||document.querySelector(t).appendChild(this)}}e.CustomElement=o},3982:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;const n=o(2466);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 o=t;if(null!=t)switch(typeof t){case"boolean":break;case"string":/^(true|false|^$)$/.test(t)?t="true"==o||""==o:(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,""!==o&&null!==o?this.setAttribute(e,t):t?this.setAttribute(e,""):this.removeAttribute(e)):this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})}},5052:t=>{t.exports=function(t){var e=t[1],o=t[3];if(!o)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),s="/*# ".concat(r," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},5398:(t,e,o)=>{o.r(e),o.d(e,{default:()=>c});var n=o(5052),r=o.n(n),s=o(164),i=o.n(s)()(r());i.push([t.id,":host{margin-bottom:16px}:host([block]){display:block}:host:not([block]){display:inline-block}:host([inlineblock]){margin-right:16px}","",{version:3,sources:["webpack://./stories/gn-field-container/template.scss"],names:[],mappings:"AAAA,MACI,kBAAA,CAGJ,eACI,aAAA,CAGJ,mBACI,oBAAA,CAGJ,qBACI,iBAAA",sourcesContent:[":host {\n margin-bottom: 16px;\n}\n\n:host([block]) {\n display: block;\n}\n\n:host:not([block]) {\n display: inline-block;\n}\n\n:host([inlineblock]) {\n margin-right: 16px;\n}\n"],sourceRoot:""}]);const c=i},6999:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeProps=e.Prop=void 0;const n=o(2466);e.Prop=()=>(t,e)=>{const o=n.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(o)},set:function(t){if(this.__connected){const r=this.props[e];this.props[e]=n.tryParseInt(t),"object"!=typeof t?this.setAttribute(o,t):this.onAttributeChange(o,r,t,!1)}else this.hasAttribute(n.toKebabCase(e))||(this.constructor.propsInit[e]=t)}})},e.initializeProps=t=>{const e=t.constructor.watchAttributes;for(let o of(t=>{const e=t.constructor.watchAttributes,o=Object.assign({},e);Object.keys(o).forEach((t=>o[t]=""));const n=Object.assign(Object.assign({},o),t.constructor.propsInit);return Object.keys(n)})(t)){if(e)if(null==e[n.toKebabCase(o)])e[n.toKebabCase(o)]="";else{const r=t.props[o]||t.getAttribute(n.toKebabCase(o));"function"==typeof t[e[o]]&&t[e[o]]({new:r})}t.constructor.propsInit[o]&&(t.hasAttribute(n.toKebabCase(o))||(t[o]=t.constructor.propsInit[o]))}}},8631:function(t,e,o){var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,s){function i(t){try{a(n.next(t))}catch(t){s(t)}}function c(t){try{a(n.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(i,c)}a((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const r=o(169),s=o(6999),i=o(2466);e.Component=t=>e=>{var o;const c=t.tag||i.toKebabCase(e.prototype.constructor.name),a=((o=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=>i.toKebabCase(t)))}attributeChangedCallback(t,e,o){this.onAttributeChange(t,e,o)}onAttributeChange(t,e,o,n=!0){if(e!=o){n&&(this[i.toCamelCase(t)]=o);const r=this.constructor.watchAttributes;if(r&&r[t]){const n=r[t];this.__connected&&"function"==typeof this[n]&&this[n]({old:e,new:o})}}}connectedCallback(){const t=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return n(this,void 0,void 0,(function*(){yield this.render(),t.connectedCallback&&t.connectedCallback.call(this),this.__connected=!0,r.addEventListeners(this),s.initializeProps(this)}))}render(){return n(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 n(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),o=document.createRange().createContextualFragment(e);return 1===o.children.length&&"TEMPLATE"===o.children[0].nodeName?o.firstChild.content:o}))}getStyle(){return n(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,o.ready=new Promise(((t,e)=>t(!0))),o);return customElements.get(c)||customElements.define(c,a),a}},8861:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},9950:function(t,e,o){var n,r=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(e,o);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[o]}}),Object.defineProperty(t,n,r)}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),s=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,o,n){var r,s=arguments.length,i=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,o,n);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(i=(s<3?r(i):s>3?r(e,o,i):r(e,o))||i);return s>3&&i&&Object.defineProperty(e,o,i),i},c=this&&this.__importStar||(n=function(t){return n=Object.getOwnPropertyNames||function(t){var e=[];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[e.length]=o);return e},n(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o=n(t),i=0;i<o.length;i++)"default"!==o[i]&&r(e,t,o[i]);return s(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.GnFieldContainer=void 0;const a=o(3128);let l=class extends a.CustomElement{constructor(){super()}setup(t){}};e.GnFieldContainer=l,e.GnFieldContainer=l=i([(0,a.Component)({tag:"gn-field-container",template:Promise.resolve().then((()=>c(o(1896)))),style:Promise.resolve().then((()=>c(o(5398))))})],l)}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,o),s.exports}return o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o(9950)})()));
|
|
2
2
|
//# sourceMappingURL=GnFieldContainer.js.map
|
package/GnFieldContainer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GnFieldContainer.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAkB,SAAID,KAEtBD,EAAe,SAAIA,EAAe,UAAK,CAAC,EAAGA,EAAe,SAAoB,iBAAIC,IACnF,CATD,CASGK,MAAM,I,kCCHTH,EAAOD,QAAU,SAAUK,GACzB,IAAIC,EAAO,GA4EX,OAzEAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAU,GACVC,OAA+B,IAAZF,EAAK,GAoB5B,OAnBIA,EAAK,KACPC,GAAW,cAAcE,OAAOH,EAAK,GAAI,QAEvCA,EAAK,KACPC,GAAW,UAAUE,OAAOH,EAAK,GAAI,OAEnCE,IACFD,GAAW,SAASE,OAAOH,EAAK,GAAGI,OAAS,EAAI,IAAID,OAAOH,EAAK,IAAM,GAAI,OAE5EC,GAAWN,EAAuBK,GAC9BE,IACFD,GAAW,KAETD,EAAK,KACPC,GAAW,KAETD,EAAK,KACPC,GAAW,KAENA,CACT,IAAGI,KAAK,GACV,EAGAT,EAAKU,EAAI,SAAWC,EAASC,EAAOC,EAAQC,EAAUC,GAC7B,iBAAZJ,IACTA,EAAU,CAAC,CAAC,KAAMA,OAASK,KAE7B,IAAIC,EAAyB,CAAC,EAC9B,GAAIJ,EACF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3E,OAAOwF,UAAUiD,eAAe5I,KAAK2I,EAAK7D,GCClFgD,EAAoBe,EAAKzL,IACH,oBAAX0L,QAA0BA,OAAOC,aAC1C5I,OAAOC,eAAehD,EAAS0L,OAAOC,YAAa,CAAEvH,MAAO,WAE7DrB,OAAOC,eAAehD,EAAS,aAAc,CAAEoE,OAAO,GAAO,ECFpCsG,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.html","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/./functions/guiHelpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.scss","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnFieldContainer\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","export default \"<template>\\n <slot></slot>\\n</template>\\n\";","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","export const getFocusableElementsInsideElement = (element: HTMLElement) => {\n return element.querySelectorAll('button, [href], input, [tabindex=\"0\"]');\n};\n\nexport const addGlobalStylesheet = (styleElementId: string, styles: string) => {\n const style = document.createElement(\"style\");\n style.setAttribute(\"id\", styleElementId);\n style.textContent = styles;\n if (!document.getElementById(styleElementId)) {\n document.head.appendChild(style);\n }\n};\n\nexport const removeInnerHTML = (element: HTMLElement) => {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n};\n","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `gn-field-container{margin-bottom:16px}gn-field-container[block]{display:block}gn-field-container[inlineblock]{margin-right:16px}gn-field-container:not([block]){display:inline-block}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-field-container/gn-field-container.scss\"],\"names\":[],\"mappings\":\"AAEA,mBACI,kBAAA,CACA,0BACI,aAAA,CAEJ,gCACI,iBAAA,CAEJ,gCACI,oBAAA\",\"sourcesContent\":[\"@import \\\"../../style/all\\\";\\n\\ngn-field-container {\\n margin-bottom: 16px;\\n &[block] {\\n display: block;\\n }\\n &[inlineblock] {\\n margin-right: 16px;\\n }\\n &:not([block]) {\\n display: inline-block;\\n }\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","// Dependencies\nimport { Component, CustomElement, CustomElementOptions } from \"super-custom-elements\";\n\n// Helpers\nimport { addGlobalStylesheet } from \"../../functions/guiHelpers\";\n\n// Stylesheets\nimport style from \"./gn-field-container.scss\";\n\ninterface GnFieldContainerOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-field-container\",\n template: import(\"./gn-field-container.html\")\n})\nexport class GnFieldContainer extends CustomElement {\n constructor() {\n super();\n addGlobalStylesheet(\"gn-field-container-styles\", style);\n }\n\n setup(options?: GnFieldContainerOptions): void {}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(9950);\n"],"names":["root","factory","exports","module","define","amd","self","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","Listen","eventName","selector","target","methodName","constructor","listeners","handler","addEventListeners","targetRoot","shadowRoot","listener","eventTarget","querySelector","addEventListener","e","call","Dispatch","propertyName","Object","defineProperty","get","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Watch","attrName","watchAttributes","toKebabCase","propsInit","str","replace","toLowerCase","toCamelCase","m","toUpperCase","tryParseInt","value","parseInt","NaN","parseFloat","getElement","document","getShadowRootElement","customElement","CustomElement","HTMLElement","super","connect","isConnected","appendChild","Toggle","propName","hasAttribute","attrValue","getAttribute","test","set","oldValue","console","warn","__connected","props","setAttribute","removeAttribute","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","getFocusableElementsInsideElement","element","querySelectorAll","addGlobalStylesheet","styleElementId","styles","style","createElement","textContent","getElementById","head","removeInnerHTML","firstChild","removeChild","Prop","onAttributeChange","initializeProps","prop","plainAttributes","keys","forEach","v","cycleProps","getProps","attribValue","new","___CSS_LOADER_EXPORT___","Component","args","tag","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","connectedCallback","render","template","innerHTML","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","css","ready","resolve","_","customElements","GnFieldContainer","setup","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|
|
1
|
+
{"version":3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AAS6J,EAAyBE,GAAY,CACjDvI,GAAIuI,EAEJhK,QAAS,CAAC,GAOX,OAHAkK,EAAoBF,GAAUpH,KAAK3C,EAAOD,QAASC,EAAQA,EAAOD,QAAS+J,GAGpE9J,EAAOD,OACf,C,OCrBA+J,EAAoBI,EAAKlK,IACxB,IAAImK,EAASnK,GAAUA,EAAOoK,WAC7B,IAAOpK,EAAiB,QACxB,IAAM,EAEP,OADA8J,EAAoBO,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdL,EAAoBO,EAAI,CAACtK,EAASwK,KACjC,IAAI,IAAIC,KAAOD,EACXT,EAAoBW,EAAEF,EAAYC,KAASV,EAAoBW,EAAE1K,EAASyK,IAC5E1H,OAAOC,eAAehD,EAASyK,EAAK,CAAEE,YAAY,EAAM1H,IAAKuH,EAAWC,IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAK/D,IAAU9D,OAAO0E,UAAUoD,eAAejI,KAAKgI,EAAK/D,GCClFkD,EAAoBe,EAAK9K,IACH,oBAAX+K,QAA0BA,OAAOC,aAC1CjI,OAAOC,eAAehD,EAAS+K,OAAOC,YAAa,CAAE5G,MAAO,WAE7DrB,OAAOC,eAAehD,EAAS,aAAc,CAAEoE,OAAO,GAAO,ECFpC2F,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.html","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/./stories/gn-field-container/template.scss","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/./stories/gn-field-container/gn-field-container.ts","webpack://geonorge/webpack/bootstrap","webpack://geonorge/webpack/runtime/compat get default export","webpack://geonorge/webpack/runtime/define property getters","webpack://geonorge/webpack/runtime/hasOwnProperty shorthand","webpack://geonorge/webpack/runtime/make namespace object","webpack://geonorge/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"geonorge\"] = factory();\n\telse\n\t\troot[\"geonorge\"] = root[\"geonorge\"] || {}, root[\"geonorge\"][\"GnFieldContainer\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","import { toDotCase } from './util';\r\n\r\ninterface ListenerMetadata {\r\n eventName: string;\r\n handler: Function;\r\n selector?: string;\r\n}\r\n\r\ninterface CustomEventOptions {\r\n bubbles?: boolean;\r\n composed?: boolean;\r\n detail?: any;\r\n}\r\n\r\ninterface DispatchEmitter {\r\n emit(options?: CustomEventOptions): void;\r\n}\r\n\r\nconst Listen = (eventName: string, selector?: string) => {\r\n return (target: any, methodName: string) => {\r\n if (!target.constructor.listeners) {\r\n target.constructor.listeners = [];\r\n }\r\n target.constructor.listeners.push({ selector: selector, eventName: eventName, handler: target[methodName] });\r\n };\r\n};\r\n\r\nconst addEventListeners = (target: any) => {\r\n if (target.constructor.listeners) {\r\n const targetRoot: any = target.shadowRoot || target;\r\n for (const listener of target.constructor.listeners as Array<ListenerMetadata>) {\r\n const eventTarget = (listener.selector)\r\n ? targetRoot.querySelector(listener.selector)\r\n ? targetRoot.querySelector(listener.selector) : null\r\n : target;\r\n if (eventTarget) {\r\n eventTarget.addEventListener(listener.eventName, (e: CustomEvent) => {\r\n listener.handler.call(target, e);\r\n });\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Dispatch = (eventName?: string) => {\r\n return (target: HTMLElement, propertyName: string) => {\r\n function get() {\r\n const self: EventTarget = this as EventTarget;\r\n return {\r\n emit(options?: CustomEventOptions) {\r\n const evtName = (eventName) ? eventName : toDotCase(propertyName);\r\n self.dispatchEvent(new CustomEvent(evtName, options));\r\n }\r\n };\r\n }\r\n Object.defineProperty(target, propertyName, { get });\r\n };\r\n};\r\n\r\nexport { Listen, addEventListeners, DispatchEmitter, Dispatch, CustomEventOptions, ListenerMetadata };","import { toKebabCase } from './util';\r\n\r\nexport const Watch = (attrName: string) => {\r\n return (target: any, propertyName: string) => {\r\n if (!target.constructor.watchAttributes) {\r\n target.constructor.watchAttributes = {};\r\n }\r\n target.constructor.watchAttributes[toKebabCase(attrName)] = propertyName;\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[attrName] = null;\r\n };\r\n};","export default \"<template>\\n <slot></slot>\\n</template>\\n\";","export const toKebabCase = (str: string) => {\r\n return str\r\n .replace(/([a-z])([A-Z])/g, '$1-$2')\r\n .replace(/[\\s_]+/g, '-')\r\n .toLowerCase();\r\n};\r\n\r\nexport const toCamelCase = (str: string) => {\r\n return str\r\n .toLowerCase()\r\n .replace(/(\\-\\w)/g, (m) => m[1].toUpperCase());\r\n};\r\n\r\nexport const toDotCase = (str: string) => {\r\n return str.replace(/(?!^)([A-Z])/g, ' $1')\r\n .replace(/[_\\s]+(?=[a-zA-Z])/g, '.')\r\n .toLowerCase();\r\n};\r\n\r\nexport const tryParseInt = (value: any) => {\r\n return (parseInt(value) == value && parseFloat(value) !== NaN) ? parseInt(value) : value;\r\n};\r\n","export * from './component';\r\nexport * from './custom-element';\r\nexport * from './helpers';\r\nexport * from './listen';\r\nexport * from './prop';\r\nexport * from './toggle';\r\nexport * from './types';\r\nexport * from './watch';","export const getElement = <T extends HTMLElement>(selector: string): T => {\r\n return document.querySelector(selector);\r\n};\r\n\r\nexport const getShadowRootElement = <T extends HTMLElement>(customElement: HTMLElement, selector: string): T => {\r\n return customElement.shadowRoot.querySelector(selector);\r\n};","import { CustomElementOptions } from \"./types\";\r\n\r\nexport abstract class CustomElement extends HTMLElement {\r\n constructor() {\r\n super();\r\n }\r\n\r\n protected abstract setup(options?: CustomElementOptions): void;\r\n\r\n protected connect(selector: string): void {\r\n if (!this.isConnected) {\r\n document.querySelector(selector).appendChild(this);\r\n }\r\n }\r\n}\r\n","import { toKebabCase } from './util';\r\n\r\nexport const Toggle = (): any => {\r\n return (target: any, propName: any) => {\r\n function get() {\r\n const getAttribute = (propName: string) => {\r\n if (this.hasAttribute(propName)) {\r\n const attrValue = this.getAttribute(propName);\r\n if (/^(true|false|^$)$/.test(attrValue)) {\r\n return attrValue == 'true' || attrValue == '';\r\n } else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n };\r\n return getAttribute(propName);\r\n }\r\n function set(value: any) {\r\n const oldValue = value;\r\n if (value != undefined) {\r\n switch (typeof value) {\r\n case 'boolean':\r\n break;\r\n case 'string':\r\n if (/^(true|false|^$)$/.test(value)) {\r\n value = oldValue == 'true' || oldValue == '';\r\n } else {\r\n console.warn(`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n value = false;\r\n }\r\n break;\r\n default:\r\n throw (`TypeError: Cannot set boolean toggle property '${propName}' to '${value}'`);\r\n }\r\n }\r\n if (this.__connected) {\r\n this.props[propName] = value || false;\r\n if (oldValue !== '' && oldValue !== null) {\r\n this.setAttribute(propName, value);\r\n } else {\r\n if (value) {\r\n this.setAttribute(propName, '');\r\n } else {\r\n this.removeAttribute(propName);\r\n }\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{margin-bottom:16px}:host([block]){display:block}:host:not([block]){display:inline-block}:host([inlineblock]){margin-right:16px}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/gn-field-container/template.scss\"],\"names\":[],\"mappings\":\"AAAA,MACI,kBAAA,CAGJ,eACI,aAAA,CAGJ,mBACI,oBAAA,CAGJ,qBACI,iBAAA\",\"sourcesContent\":[\":host {\\n margin-bottom: 16px;\\n}\\n\\n:host([block]) {\\n display: block;\\n}\\n\\n:host:not([block]) {\\n display: inline-block;\\n}\\n\\n:host([inlineblock]) {\\n margin-right: 16px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { toKebabCase, tryParseInt } from './util';\r\n\r\nexport const Prop = (): any => {\r\n return (target: any, propName: any) => {\r\n const attrName = toKebabCase(propName);\r\n function get() {\r\n if (this.props[propName]) {\r\n return this.props[propName];\r\n }\r\n return this.getAttribute(attrName);\r\n }\r\n function set(value: any) {\r\n if (this.__connected) {\r\n const oldValue = this.props[propName];\r\n this.props[propName] = tryParseInt(value);\r\n if (typeof value != 'object') {\r\n this.setAttribute(attrName, value);\r\n } else {\r\n this.onAttributeChange(attrName, oldValue, value, false);\r\n }\r\n } else {\r\n if (!this.hasAttribute(toKebabCase(propName))) {\r\n this.constructor.propsInit[propName] = value;\r\n }\r\n }\r\n }\r\n if (!target.constructor.propsInit) {\r\n target.constructor.propsInit = {};\r\n }\r\n target.constructor.propsInit[propName] = null;\r\n Object.defineProperty(target, propName, { get, set });\r\n };\r\n};\r\n\r\nconst getProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n const plainAttributes = { ...watchAttributes };\r\n Object.keys(plainAttributes).forEach(v => plainAttributes[v] = '');\r\n const cycleProps = { ...plainAttributes, ...target.constructor.propsInit };\r\n return Object.keys(cycleProps);\r\n};\r\n\r\nexport const initializeProps = (target: any) => {\r\n const watchAttributes = target.constructor.watchAttributes;\r\n for (let prop of getProps(target)) {\r\n if (watchAttributes) {\r\n if (watchAttributes[toKebabCase(prop)] == null) {\r\n watchAttributes[toKebabCase(prop)] = '';\r\n } else {\r\n const attribValue = target.props[prop] || target.getAttribute(toKebabCase(prop));\r\n if (typeof target[watchAttributes[prop]] == 'function') {\r\n target[watchAttributes[prop]]({ new: attribValue });\r\n }\r\n }\r\n }\r\n if (target.constructor.propsInit[prop]) {\r\n if (!target.hasAttribute(toKebabCase(prop))) {\r\n target[prop] = target.constructor.propsInit[prop];\r\n }\r\n }\r\n }\r\n};","import { addEventListeners, ListenerMetadata } from './listen';\r\nimport { initializeProps } from './prop';\r\nimport { ComponentMetadata, KeyValue } from './types';\r\nimport { toKebabCase, toCamelCase } from './util';\r\n\r\nexport const Component = (args: ComponentMetadata) => {\r\n return (target: any) => {\r\n const tag: string = args.tag || toKebabCase(target.prototype.constructor.name);\r\n const customElement: any = class extends (target as { new(): any }) {\r\n protected static __connected: boolean = false;\r\n protected static propsInit: KeyValue;\r\n protected static watchAttributes: KeyValue;\r\n protected static listeners: ListenerMetadata[];\r\n protected static ready: Promise<boolean> = new Promise((resolve, _) => resolve(true));\r\n public props: KeyValue = {};\r\n private showShadowRoot: boolean;\r\n\r\n public static get observedAttributes(): string[] {\r\n return Object.keys(this.propsInit || {}).map(x => toKebabCase(x));\r\n }\r\n\r\n constructor() {\r\n super();\r\n\r\n this.showShadowRoot = args.shadow == null ? true : args.shadow;\r\n\r\n if (!this.shadowRoot && this.showShadowRoot) {\r\n this.attachShadow({ mode: 'open' });\r\n }\r\n }\r\n\r\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\r\n this.onAttributeChange(name, oldValue, newValue);\r\n }\r\n\r\n public onAttributeChange(name: string, oldValue: string, newValue: string, set: boolean = true): void {\r\n if (oldValue != newValue) {\r\n if (set) { this[toCamelCase(name)] = newValue; }\r\n const watchAttributes: KeyValue = (this.constructor as any).watchAttributes;\r\n if (watchAttributes && watchAttributes[name]) {\r\n const methodToCall: string = watchAttributes[name];\r\n if (this.__connected) {\r\n if (typeof this[methodToCall] == 'function') {\r\n this[methodToCall]({ old: oldValue, new: newValue });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async connectedCallback(): Promise<void> {\r\n await this.render();\r\n super.connectedCallback && super.connectedCallback();\r\n this.__connected = true;\r\n\r\n addEventListeners(this);\r\n initializeProps(this);\r\n }\r\n\r\n private async render(): Promise<void> {\r\n if (this.__connected) {\r\n return;\r\n }\r\n\r\n const template = document.createElement('template');\r\n template.innerHTML = await this.getStyle();\r\n\r\n if (args.template instanceof Promise) {\r\n template.content.appendChild(await this.getExternalTemplate());\r\n } else if (typeof args.template === 'string') {\r\n template.innerHTML += args.template;\r\n }\r\n\r\n (this.showShadowRoot ? this.shadowRoot : this).appendChild(template.content.cloneNode(true));\r\n }\r\n\r\n private async getExternalTemplate(): Promise<DocumentFragment> {\r\n const templateModule = await (args.template as Promise<typeof import('*.html')>);\r\n const markup = templateModule.default.toString();\r\n const fragment = document.createRange().createContextualFragment(markup);\r\n\r\n if (fragment.children.length === 1 && fragment.children[0].nodeName === 'TEMPLATE') {\r\n return (fragment.firstChild as HTMLTemplateElement).content;\r\n }\r\n return fragment;\r\n }\r\n\r\n private async getStyle(): Promise<string> {\r\n let css: string;\r\n\r\n if (args.style instanceof Promise) {\r\n const styleModule = await args.style;\r\n css = styleModule.default.toString();\r\n } else if (typeof args.style === 'string') {\r\n css = args.style;\r\n }\r\n\r\n return `${css ? `<style>${css}</style>` : ''}`\r\n }\r\n };\r\n\r\n if (!customElements.get(tag)) {\r\n customElements.define(tag, customElement);\r\n }\r\n\r\n return customElement;\r\n };\r\n};\r\n\r\n\r\n","// Dependencies\nimport { Component, CustomElement, CustomElementOptions } from \"super-custom-elements\";\n\ninterface GnFieldContainerOptions extends CustomElementOptions {}\n\n@Component({\n tag: \"gn-field-container\",\n template: import(\"./gn-field-container.html\"),\n style: import(\"./template.scss\")\n})\nexport class GnFieldContainer extends CustomElement {\n constructor() {\n super();\n }\n\n setup(options?: GnFieldContainerOptions): void {}\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(9950);\n"],"names":["root","factory","exports","module","define","amd","self","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","id","_k","push","Listen","eventName","selector","target","methodName","constructor","listeners","handler","addEventListeners","targetRoot","shadowRoot","listener","eventTarget","querySelector","addEventListener","e","call","Dispatch","propertyName","Object","defineProperty","get","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Watch","attrName","watchAttributes","toKebabCase","propsInit","str","replace","toLowerCase","toCamelCase","m","toUpperCase","tryParseInt","value","parseInt","NaN","parseFloat","getElement","document","getShadowRootElement","customElement","CustomElement","HTMLElement","super","connect","isConnected","appendChild","Toggle","propName","hasAttribute","attrValue","getAttribute","test","set","oldValue","console","warn","__connected","props","setAttribute","removeAttribute","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","___CSS_LOADER_EXPORT___","Prop","onAttributeChange","initializeProps","prop","plainAttributes","keys","forEach","v","cycleProps","getProps","attribValue","new","Component","args","tag","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","connectedCallback","render","template","createElement","innerHTML","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","GnFieldContainer","setup","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","enumerable","obj","hasOwnProperty","r","Symbol","toStringTag"],"sourceRoot":""}
|