@kartverket/geonorge-web-components 4.0.9 → 4.0.11
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/GnIcon.js +1 -1
- package/GnIcon.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 +1 -1
- package/GnShortcutButton.js.map +1 -1
- 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/index.css +1 -1
- package/index.css.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchTypeSelector.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,SAAsB,mBAAIC,IACrF,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,IAAK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IAE1E,ECNDV,EAAoBW,EAAI,CAACE,EAAKvD,IAAUnG,OAAO4G,UAAU+C,eAAe9J,KAAK6J,EAAKvD,GCClF0C,EAAoBe,EAAK3M,IACH,oBAAX4M,QAA0BA,OAAOC,aAC1C9J,OAAOC,eAAehD,EAAS4M,OAAOC,YAAa,CAAEzI,MAAO,WAE7DrB,OAAOC,eAAehD,EAAS,aAAc,CAAEoE,OAAO,GAAO,ECFpCwH,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/../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/main-navigation/search-type-selector/search-type-selector.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/./stories/main-navigation/search-type-selector/search-type-selector.scss","webpack://geonorge/./stories/main-navigation/search-type-selector/search-type-selector.html","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\"][\"SearchTypeSelector\"] = 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 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};","import {\n Component, CustomElement, CustomElementOptions, Prop, Dispatch, DispatchEmitter,\n Listen, Watch, getElement, getShadowRootElement, Toggle\n} from 'super-custom-elements';\n\n\ninterface SearchTypeSelectorOptions extends CustomElementOptions {\n onSearchTypeChange?: () => void\n}\n\n@Component({\n tag: 'search-type-selector',\n template: import('./search-type-selector.html'),\n style: import('./search-type-selector.scss')\n})\n\nexport class SearchTypeSelector extends CustomElement {\n private static readonly elementSelector = 'search-type-selector';\n private searchTypeSelector: HTMLDivElement;\n private metadataNameElement: HTMLSpanElement;\n private metadataCounterElement: HTMLSpanElement;\n private articleNameElement: HTMLSpanElement;\n private articleCounterElement: HTMLSpanElement;\n\n @Prop() id: string;\n @Prop() metadataresultsfound: string;\n @Prop() articlesresultsfound: string;\n @Prop() language: string;\n @Prop() searchtype: string;\n @Dispatch('onSearchTypeChange') onSearchTypeChange: DispatchEmitter;\n\n constructor() {\n super();\n this.handleSearchTypeOnChange = this.handleSearchTypeOnChange.bind(this);\n\n }\n\n setup(options?: SearchTypeSelectorOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n connectedCallback() {\n this.searchTypeSelector = getShadowRootElement(this, '#search-type-selector');\n\n this.metadataNameElement = getShadowRootElement(this, '#search-type-metadata-name');\n this.metadataCounterElement = getShadowRootElement(this, '#search-type-metadata-counter');\n this.articleNameElement = getShadowRootElement(this, '#search-type-article-name');\n this.articleCounterElement = getShadowRootElement(this, '#search-type-article-counter');\n\n this.searchTypeSelector.querySelectorAll('input[name=search-type]').forEach((element: HTMLInputElement) => {\n element.onchange = this.handleSearchTypeOnChange;\n });\n const selectedSearchTypeSelector = this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`);\n }\n\n disconnectedCallback() {\n }\n\n updateNameElements(language: string) {\n this.metadataNameElement.innerHTML = language === 'en' ? 'Map catalog' : 'Kartkatalogen';\n this.articleNameElement.innerHTML = language === 'en' ? 'Articles' : 'Artikler';\n }\n\n handleSearchTypeOnChange(event: InputEvent) {\n if (this.onSearchTypeChange) {\n const selectedElement = event.composedPath()[0] as HTMLInputElement;\n this.onSearchTypeChange.emit({\n detail: {\n value: selectedElement.value\n }\n });\n }\n }\n\n @Watch('language')\n languageChanged() {\n this.updateNameElements(this.language);\n }\n\n @Watch('metadataresultsfound')\n metadataResultsFoundChanged() {\n this.metadataCounterElement.innerHTML = this.metadataresultsfound;\n }\n\n @Watch('articlesresultsfound')\n articlesResultsFoundChanged() {\n this.articleCounterElement.innerHTML = this.articlesresultsfound;\n }\n\n @Watch('searchtype')\n searchTypeChanged() {\n const selectedSearchTypeSelector = <HTMLInputElement>this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`);\n if (selectedSearchTypeSelector){\n selectedSearchTypeSelector.checked = true;\n }\n }\n\n public static setup(selector: string, options: SearchTypeSelectorOptions) {\n const element = getElement<SearchTypeSelector>(selector);\n\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};","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","// 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, `div.search-type-selector{width:235px;display:none}@media(min-width: 37.5em){div.search-type-selector{display:block}}div.search-type-selector label{font-size:14px;display:block;cursor:pointer;height:18px;font-weight:normal}div.search-type-selector label .search-type-counter{font-size:.9em}div.search-type-selector label .search-type-counter::before{content:\"(\"}div.search-type-selector label .search-type-counter::after{content:\")\"}div.search-type-selector input[type=radio]{-webkit-border-radius:50%;border-radius:50%;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;font:inherit;color:currentColor;width:16px;height:16px;border:2px solid #7d746d;transform:translateY(-0.075em);display:inline-grid;place-content:center}div.search-type-selector input[type=radio]::before{-webkit-border-radius:50%;border-radius:50%;content:\"\";width:8px;height:8px;transform:scale(0);transition:120ms transform ease-in-out}div.search-type-selector input[type=radio]:checked{border-color:#3767c7}div.search-type-selector input[type=radio]:checked::before{transform:scale(1);background-color:#3767c7}div.search-type-selector input[type=radio]:focus-visible{outline:max(2px,.1em) solid #3767c7;outline-offset:max(2px,.1em)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/main-navigation/search-type-selector/search-type-selector.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/mixins/_appearance.scss\",\"webpack://./style/variables/_colors.scss\"],\"names\":[],\"mappings\":\"AAKA,yBACI,WAAA,CACA,YAAA,CCSI,0BDXR,yBAIQ,aAAA,CAAA,CAEJ,+BACI,cAAA,CACA,aAAA,CACA,cAAA,CACA,WAAA,CACA,kBAAA,CACA,oDACI,cAAA,CACA,4DACI,WAAA,CAEJ,2DACI,WAAA,CAIZ,2CE1BF,yBF2B2C,CE1B3C,iBF0B2C,CG3BzC,uBH4BmC,CG3BnC,oBH2BmC,CG1BnC,eH0BmC,CAC/B,QAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,WAAA,CACA,wBAAA,CACA,8BAAA,CACA,mBAAA,CACA,oBAAA,CAGJ,mDExCF,yBFyC2C,CExC3C,iBFwC2C,CACrC,UAAA,CACA,SAAA,CACA,UAAA,CACA,kBAAA,CACA,sCAAA,CAGJ,mDACI,oBIpCO,CJqCP,2DACI,kBAAA,CACA,wBIvCG,CJ2CX,yDACI,mCAAA,CACA,4BAAA\",\"sourcesContent\":[\"@use \\\"../../../style/mixins/appearance\\\";\\n@use \\\"../../../style/mixins/border-radius\\\";\\n@use \\\"../../../style/mixins/breakpoints\\\";\\n@use \\\"../../../style/variables/colors\\\";\\n\\ndiv.search-type-selector {\\n width: 235px;\\n display: none;\\n @include breakpoints.breakpoint(phablet) {\\n display: block;\\n }\\n label {\\n font-size: 14px;\\n display: block;\\n cursor: pointer;\\n height: 18px;\\n font-weight: normal;\\n .search-type-counter {\\n font-size: 0.9em;\\n &::before {\\n content: \\\"(\\\";\\n }\\n &::after {\\n content: \\\")\\\";\\n }\\n }\\n }\\n input[type=\\\"radio\\\"] {\\n @include border-radius.border-radius(50%);\\n @include appearance.appearance(none);\\n margin: 0;\\n font: inherit;\\n color: currentColor;\\n width: 16px;\\n height: 16px;\\n border: 2px solid rgb(125, 116, 109);\\n transform: translateY(-0.075em);\\n display: inline-grid;\\n place-content: center;\\n }\\n\\n input[type=\\\"radio\\\"]::before {\\n @include border-radius.border-radius(50%);\\n content: \\\"\\\";\\n width: 8px;\\n height: 8px;\\n transform: scale(0);\\n transition: 120ms transform ease-in-out;\\n }\\n\\n input[type=\\\"radio\\\"]:checked {\\n border-color: colors.$primary-text;\\n &::before {\\n transform: scale(1);\\n background-color: colors.$primary-text;\\n }\\n }\\n\\n input[type=\\\"radio\\\"]:focus-visible {\\n outline: max(2px, 0.1em) solid colors.$primary-text;\\n outline-offset: max(2px, 0.1em);\\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 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}\",\"@mixin appearance ($value) {\\n -webkit-appearance: $value;\\n -moz-appearance: $value;\\n appearance: $value;\\n}\\n\",\"$body-background: #ffffff;\\n$navigation-bar-background: #f7f7f7;\\n$hover-background: rgba(0,0,0,.05);\\n$default-border: #d8d8d8;\\n\\n$default-background: #eee;\\n$default-background-hover: #ddd;\\n$default-text:#2F3940;\\n\\n$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","export default \"<template>\\n <div id=\\\"search-type-selector\\\" class=\\\"search-type-selector\\\">\\n <label for=\\\"search-type-metadata\\\">\\n <input name=\\\"search-type\\\" type=\\\"radio\\\" id=\\\"search-type-metadata\\\" value=\\\"metadata\\\" />\\n <span id=\\\"search-type-metadata-name\\\">Kartkatalogen</span>\\n <span id=\\\"search-type-metadata-counter\\\" class=\\\"search-type-counter\\\"></span>\\n </label>\\n <label for=\\\"search-type-article\\\">\\n <input name=\\\"search-type\\\" type=\\\"radio\\\" id=\\\"search-type-article\\\" value=\\\"articles\\\" />\\n <span id=\\\"search-type-article-name\\\">Artikler</span>\\n <span id=\\\"search-type-article-counter\\\" class=\\\"search-type-counter\\\"></span>\\n </label>\\n </div>\\n</template>\";","// 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__(6417);\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","SearchTypeSelector","handleSearchTypeOnChange","bind","setup","container","connectedCallback","searchTypeSelector","metadataNameElement","metadataCounterElement","articleNameElement","articleCounterElement","querySelectorAll","forEach","element","onchange","searchtype","disconnectedCallback","updateNameElements","language","innerHTML","event","onSearchTypeChange","selectedElement","composedPath","detail","languageChanged","metadataResultsFoundChanged","metadataresultsfound","articlesResultsFoundChanged","articlesresultsfound","searchTypeChanged","selectedSearchTypeSelector","checked","elementSelector","Prop","Component","tag","template","style","onAttributeChange","initializeProps","prop","plainAttributes","keys","v","cycleProps","getProps","attribValue","new","args","prototype","name","showShadowRoot","shadow","attachShadow","mode","observedAttributes","x","attributeChangedCallback","newValue","methodToCall","old","render","createElement","getStyle","Promise","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","ready","resolve","_","customElements","___CSS_LOADER_EXPORT___","__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":"SearchTypeSelector.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,SAAsB,mBAAIC,IACrF,CATD,CASGK,MAAM,I,oGCNLC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACL,EAAOM,GAAI,0sCAA2sC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,qFAAqF,6CAA6C,+CAA+C,4CAA4C,4CAA4C,MAAQ,GAAG,SAAW,ofAAof,eAAiB,CAAC,kqDAAwrD,ukBAAykB,28BAA28B,kIAA6H,k1BAAk1B,WAAa,MAE5tM,S,4CCPA,suB,SCMAN,EAAOD,QAAU,SAAUQ,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,GA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etF,KAAKqF,EAAKnE,GCClFsD,EAAoBe,EAAK3M,IACH,oBAAX4M,QAA0BA,OAAOC,aAC1CtJ,OAAOgE,eAAevH,EAAS4M,OAAOC,YAAa,CAAE3E,MAAO,WAE7D3E,OAAOgE,eAAevH,EAAS,aAAc,CAAEkI,OAAO,GAAO,ECFpC0D,EAAoB,K","sources":["webpack://geonorge/webpack/universalModuleDefinition","webpack://geonorge/./stories/main-navigation/search-type-selector/search-type-selector.scss","webpack://geonorge/./stories/main-navigation/search-type-selector/search-type-selector.html","webpack://geonorge/../node_modules/css-loader/dist/runtime/api.js","webpack://geonorge/../node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://geonorge/../node_modules/super-custom-elements/src/component.ts","webpack://geonorge/../node_modules/super-custom-elements/src/custom-element.ts","webpack://geonorge/../node_modules/super-custom-elements/src/helpers.ts","webpack://geonorge/../node_modules/super-custom-elements/src/index.ts","webpack://geonorge/../node_modules/super-custom-elements/src/listen.ts","webpack://geonorge/../node_modules/super-custom-elements/src/prop.ts","webpack://geonorge/../node_modules/super-custom-elements/src/toggle.ts","webpack://geonorge/../node_modules/super-custom-elements/src/util.ts","webpack://geonorge/../node_modules/super-custom-elements/src/watch.ts","webpack://geonorge/./stories/main-navigation/search-type-selector/search-type-selector.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\"][\"SearchTypeSelector\"] = factory();\n})(self, () => {\nreturn ","// 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, `div.search-type-selector{width:235px;display:none}@media(min-width: 37.5em){div.search-type-selector{display:block}}div.search-type-selector label{font-size:14px;display:block;cursor:pointer;height:18px;font-weight:normal}div.search-type-selector label .search-type-counter{font-size:.9em}div.search-type-selector label .search-type-counter::before{content:\"(\"}div.search-type-selector label .search-type-counter::after{content:\")\"}div.search-type-selector input[type=radio]{-webkit-border-radius:50%;border-radius:50%;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;font:inherit;color:currentColor;width:16px;height:16px;border:2px solid #7d746d;transform:translateY(-0.075em);display:inline-grid;place-content:center}div.search-type-selector input[type=radio]::before{-webkit-border-radius:50%;border-radius:50%;content:\"\";width:8px;height:8px;transform:scale(0);transition:120ms transform ease-in-out}div.search-type-selector input[type=radio]:checked{border-color:#3767c7}div.search-type-selector input[type=radio]:checked::before{transform:scale(1);background-color:#3767c7}div.search-type-selector input[type=radio]:focus-visible{outline:max(2px,.1em) solid #3767c7;outline-offset:max(2px,.1em)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./stories/main-navigation/search-type-selector/search-type-selector.scss\",\"webpack://./style/mixins/_breakpoints.scss\",\"webpack://./style/mixins/_border-radius.scss\",\"webpack://./style/mixins/_appearance.scss\",\"webpack://./style/variables/_colors.scss\"],\"names\":[],\"mappings\":\"AAKA,yBACI,WAAA,CACA,YAAA,CCSI,0BDXR,yBAIQ,aAAA,CAAA,CAEJ,+BACI,cAAA,CACA,aAAA,CACA,cAAA,CACA,WAAA,CACA,kBAAA,CACA,oDACI,cAAA,CACA,4DACI,WAAA,CAEJ,2DACI,WAAA,CAIZ,2CE1BF,yBF2B2C,CE1B3C,iBF0B2C,CG3BzC,uBH4BmC,CG3BnC,oBH2BmC,CG1BnC,eH0BmC,CAC/B,QAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,WAAA,CACA,wBAAA,CACA,8BAAA,CACA,mBAAA,CACA,oBAAA,CAGJ,mDExCF,yBFyC2C,CExC3C,iBFwC2C,CACrC,UAAA,CACA,SAAA,CACA,UAAA,CACA,kBAAA,CACA,sCAAA,CAGJ,mDACI,oBIpCO,CJqCP,2DACI,kBAAA,CACA,wBIvCG,CJ2CX,yDACI,mCAAA,CACA,4BAAA\",\"sourcesContent\":[\"@use \\\"../../../style/mixins/appearance\\\";\\n@use \\\"../../../style/mixins/border-radius\\\";\\n@use \\\"../../../style/mixins/breakpoints\\\";\\n@use \\\"../../../style/variables/colors\\\";\\n\\ndiv.search-type-selector {\\n width: 235px;\\n display: none;\\n @include breakpoints.breakpoint(phablet) {\\n display: block;\\n }\\n label {\\n font-size: 14px;\\n display: block;\\n cursor: pointer;\\n height: 18px;\\n font-weight: normal;\\n .search-type-counter {\\n font-size: 0.9em;\\n &::before {\\n content: \\\"(\\\";\\n }\\n &::after {\\n content: \\\")\\\";\\n }\\n }\\n }\\n input[type=\\\"radio\\\"] {\\n @include border-radius.border-radius(50%);\\n @include appearance.appearance(none);\\n margin: 0;\\n font: inherit;\\n color: currentColor;\\n width: 16px;\\n height: 16px;\\n border: 2px solid rgb(125, 116, 109);\\n transform: translateY(-0.075em);\\n display: inline-grid;\\n place-content: center;\\n }\\n\\n input[type=\\\"radio\\\"]::before {\\n @include border-radius.border-radius(50%);\\n content: \\\"\\\";\\n width: 8px;\\n height: 8px;\\n transform: scale(0);\\n transition: 120ms transform ease-in-out;\\n }\\n\\n input[type=\\\"radio\\\"]:checked {\\n border-color: colors.$primary-text;\\n &::before {\\n transform: scale(1);\\n background-color: colors.$primary-text;\\n }\\n }\\n\\n input[type=\\\"radio\\\"]:focus-visible {\\n outline: max(2px, 0.1em) solid colors.$primary-text;\\n outline-offset: max(2px, 0.1em);\\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 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}\",\"@mixin appearance ($value) {\\n -webkit-appearance: $value;\\n -moz-appearance: $value;\\n appearance: $value;\\n}\\n\",\"$body-background: #ffffff;\\n$navigation-bar-background: #f7f7f7;\\n$hover-background: rgba(0,0,0,.05);\\n$default-border: #d8d8d8;\\n\\n$default-background: #eee;\\n$default-background-hover: #ddd;\\n$default-text:#2F3940;\\n\\n$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","export default \"<template>\\n <div id=\\\"search-type-selector\\\" class=\\\"search-type-selector\\\">\\n <label for=\\\"search-type-metadata\\\">\\n <input name=\\\"search-type\\\" type=\\\"radio\\\" id=\\\"search-type-metadata\\\" value=\\\"metadata\\\" />\\n <span id=\\\"search-type-metadata-name\\\">Kartkatalogen</span>\\n <span id=\\\"search-type-metadata-counter\\\" class=\\\"search-type-counter\\\"></span>\\n </label>\\n <label for=\\\"search-type-article\\\">\\n <input name=\\\"search-type\\\" type=\\\"radio\\\" id=\\\"search-type-article\\\" value=\\\"articles\\\" />\\n <span id=\\\"search-type-article-name\\\">Artikler</span>\\n <span id=\\\"search-type-article-counter\\\" class=\\\"search-type-counter\\\"></span>\\n </label>\\n </div>\\n</template>\";","\"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};","\"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};","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","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","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};","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';","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, 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 { 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","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","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};","import {\n Component, CustomElement, CustomElementOptions, Prop, Dispatch, DispatchEmitter,\n Listen, Watch, getElement, getShadowRootElement, Toggle\n} from 'super-custom-elements';\n\n\ninterface SearchTypeSelectorOptions extends CustomElementOptions {\n onSearchTypeChange?: () => void\n}\n\n@Component({\n tag: 'search-type-selector',\n template: import('./search-type-selector.html'),\n style: import('./search-type-selector.scss')\n})\n\nexport class SearchTypeSelector extends CustomElement {\n private static readonly elementSelector = 'search-type-selector';\n private searchTypeSelector: HTMLDivElement;\n private metadataNameElement: HTMLSpanElement;\n private metadataCounterElement: HTMLSpanElement;\n private articleNameElement: HTMLSpanElement;\n private articleCounterElement: HTMLSpanElement;\n\n @Prop() id: string;\n @Prop() metadataresultsfound: string;\n @Prop() articlesresultsfound: string;\n @Prop() language: string;\n @Prop() searchtype: string;\n @Dispatch('onSearchTypeChange') onSearchTypeChange: DispatchEmitter;\n\n constructor() {\n super();\n this.handleSearchTypeOnChange = this.handleSearchTypeOnChange.bind(this);\n\n }\n\n setup(options?: SearchTypeSelectorOptions): void {\n this.connect(options.container);\n if (options.id) {\n this.id = options.id;\n }\n }\n\n connectedCallback() {\n this.searchTypeSelector = getShadowRootElement(this, '#search-type-selector');\n\n this.metadataNameElement = getShadowRootElement(this, '#search-type-metadata-name');\n this.metadataCounterElement = getShadowRootElement(this, '#search-type-metadata-counter');\n this.articleNameElement = getShadowRootElement(this, '#search-type-article-name');\n this.articleCounterElement = getShadowRootElement(this, '#search-type-article-counter');\n\n this.searchTypeSelector.querySelectorAll('input[name=search-type]').forEach((element: HTMLInputElement) => {\n element.onchange = this.handleSearchTypeOnChange;\n });\n const selectedSearchTypeSelector = this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`);\n }\n\n disconnectedCallback() {\n }\n\n updateNameElements(language: string) {\n this.metadataNameElement.innerHTML = language === 'en' ? 'Map catalog' : 'Kartkatalogen';\n this.articleNameElement.innerHTML = language === 'en' ? 'Articles' : 'Artikler';\n }\n\n handleSearchTypeOnChange(event: InputEvent) {\n if (this.onSearchTypeChange) {\n const selectedElement = event.composedPath()[0] as HTMLInputElement;\n this.onSearchTypeChange.emit({\n detail: {\n value: selectedElement.value\n }\n });\n }\n }\n\n @Watch('language')\n languageChanged() {\n this.updateNameElements(this.language);\n }\n\n @Watch('metadataresultsfound')\n metadataResultsFoundChanged() {\n this.metadataCounterElement.innerHTML = this.metadataresultsfound;\n }\n\n @Watch('articlesresultsfound')\n articlesResultsFoundChanged() {\n this.articleCounterElement.innerHTML = this.articlesresultsfound;\n }\n\n @Watch('searchtype')\n searchTypeChanged() {\n const selectedSearchTypeSelector = <HTMLInputElement>this.searchTypeSelector.querySelector(`input[value=${this.searchtype}]`);\n if (selectedSearchTypeSelector){\n selectedSearchTypeSelector.checked = true;\n }\n }\n\n public static setup(selector: string, options: SearchTypeSelectorOptions) {\n const element = getElement<SearchTypeSelector>(selector);\n\n }\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__(6417);\n"],"names":["root","factory","exports","module","define","amd","self","___CSS_LOADER_EXPORT___","push","id","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","Component","args","target","tag","toKebabCase","prototype","constructor","name","customElement","super","props","showShadowRoot","shadow","shadowRoot","attachShadow","mode","observedAttributes","Object","keys","propsInit","x","attributeChangedCallback","oldValue","newValue","onAttributeChange","set","toCamelCase","watchAttributes","methodToCall","__connected","old","new","connectedCallback","render","addEventListeners","initializeProps","template","document","createElement","innerHTML","getStyle","Promise","appendChild","getExternalTemplate","cloneNode","markup","default","fragment","createRange","createContextualFragment","children","nodeName","firstChild","css","style","ready","resolve","_","customElements","get","CustomElement","HTMLElement","connect","selector","isConnected","querySelector","getElement","getShadowRootElement","Listen","eventName","methodName","listeners","handler","targetRoot","listener","eventTarget","addEventListener","e","call","Dispatch","propertyName","defineProperty","emit","options","evtName","toDotCase","dispatchEvent","CustomEvent","Prop","propName","attrName","getAttribute","value","tryParseInt","setAttribute","hasAttribute","prop","plainAttributes","forEach","v","cycleProps","getProps","attribValue","Toggle","attrValue","test","console","warn","removeAttribute","str","replace","toLowerCase","m","toUpperCase","parseInt","NaN","parseFloat","Watch","SearchTypeSelector","handleSearchTypeOnChange","bind","setup","container","searchTypeSelector","metadataNameElement","metadataCounterElement","articleNameElement","articleCounterElement","querySelectorAll","element","onchange","searchtype","disconnectedCallback","updateNameElements","language","event","onSearchTypeChange","selectedElement","composedPath","detail","languageChanged","metadataResultsFoundChanged","metadataresultsfound","articlesResultsFoundChanged","articlesresultsfound","searchTypeChanged","selectedSearchTypeSelector","checked","elementSelector","__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/UserAccount.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.UserAccount=e())}(self,(()=>(()=>{var t={164:t=>{"use strict";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,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},169:(t,e,n)=>{"use strict";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(i){const r=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(r,i))}}}})}},1063:(t,e,n)=>{"use strict";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}},2466:(t,e)=>{"use strict";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},2573:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(5052),i=n.n(o),r=n(164),s=n.n(r)()(i());s.push([t.id,'.user-account-content{display:flex;flex-direction:row;padding:6px 8px 6px 8px;width:auto;color:#403f3f;gap:6px;font-family:"Open Sans",sans-serif;font-size:14px;justify-content:space-between;align-items:center;margin:0 6px 0 12px;background:rgba(0,0,0,0);border:none}.user-account-content:hover{color:#1073bc;cursor:pointer}.user-account-content span:last-child{display:none;align-items:center;flex-direction:row;padding:2px 1px;vertical-align:middle;font-weight:500}@media(min-width: 992px){.user-account-content span:last-child{display:inline-block}}.user-account-content span:first-child svg{height:24px;width:24px;vertical-align:middle}.menu-wrapper{font-size:14px;font-family:"Open Sans",sans-serif;position:relative;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.menu-wrapper>div{max-height:0;overflow:hidden;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;position:absolute;display:flex;flex-direction:column;background-color:#fff;box-shadow:0px 1px 3px 0px rgba(0,0,0,.1019607843);width:375px;z-index:100;top:10px;right:-85px}.menu-wrapper>div>div:first-child>span{display:block}.menu-wrapper>div>div:first-child>span:last-child{font-weight:bolder}.menu-wrapper>div ul{list-style-type:none}.menu-wrapper>div ul li{margin:12px 0}.menu-wrapper>div ul li a,.menu-wrapper>div ul li a:link,.menu-wrapper>div ul li a:visited{color:#1a589f}.menu-wrapper>div>*:nth-child(odd){background-color:#f9f9f9;padding:32px;display:flex;flex-direction:column;gap:5px}.menu-wrapper>div>*:nth-child(even){background-color:#fff;margin-top:10px;display:flex;flex-direction:column;gap:5px;padding:0 32px}.menu-wrapper>div>*:last-child{padding:32px}.menu-wrapper>div a,.menu-wrapper>div a:link,.menu-wrapper>div a:visited{color:#000;display:flex;text-decoration:underline}.menu-wrapper>div a:hover{cursor:pointer}.menu-wrapper>div .menu-user-icon svg{padding-left:4px;width:24px;height:24px;color:#000}.menu-wrapper.open>div{max-height:1000px}.user-account-container{text-align:right;background-color:#d2cecb;max-height:0;overflow:hidden}.user-account-container.open{max-height:56px}.user-account-container a,.user-account-container button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:rgba(0,0,0,0);cursor:pointer;border:none;font-weight:normal;background:rgba(0,0,0,0)}.user-account-container a:not(:first-child),.user-account-container button:not(:first-child){border:none}',"",{version:3,sources:["webpack://./stories/main-navigation/user-account/user-account.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAIA,sBACI,YAAA,CACA,kBA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akpoints";\n@use "../../../style/mixins/transition";\n@use "../../../style/variables/typography";\n\n.user-account-content {\n display: flex;\n flex-direction: row;\n padding: 6px 8px 6px 8px;\n width: auto;\n color: #403f3f;\n gap: 6px;\n font-family: typography.$default-font;\n font-size: 14px;\n justify-content: space-between;\n align-items: center;\n margin: 0 6px 0 12px;\n background: transparent;\n &:hover {\n color: #1073bc;\n cursor: pointer;\n }\n\n border: none;\n span:last-child {\n display: none;\n align-items: center;\n flex-direction: row;\n padding: 2px 1px;\n vertical-align: middle;\n font-weight: 500;\n @include breakpoints.breakpoint(laptop) {\n display: inline-block;\n }\n }\n span:first-child {\n svg {\n height: 24px;\n width: 24px;\n vertical-align: middle;\n }\n }\n}\n.menu-wrapper {\n font-size: 14px;\n font-family: typography.$default-font;\n position: relative;\n @include transition.transition(all 0.3s ease-in-out);\n\n > div {\n max-height: 0;\n overflow: hidden;\n @include transition.transition(all 0.3s ease-in-out);\n position: absolute;\n display: flex;\n flex-direction: column;\n background-color: white;\n box-shadow: 0px 1px 3px 0px #0000001a;\n width: 375px;\n z-index: 100;\n top: 10px;\n right: -85px;\n > div:first-child > span {\n display: block;\n &:last-child {\n font-weight: bolder;\n }\n }\n ul {\n list-style-type: none;\n li {\n margin: 12px 0;\n a,\n a:link,\n a:visited {\n color: #1a589f;\n }\n }\n }\n\n > *:nth-child(odd) {\n background-color: #f9f9f9;\n padding: 32px;\n display: flex;\n flex-direction: column;\n gap: 5px;\n }\n > *:nth-child(even) {\n background-color: white;\n margin-top: 10px;\n display: flex;\n flex-direction: column;\n gap: 5px;\n padding: 0 32px;\n }\n > *:last-child {\n padding: 32px;\n }\n a,\n a:link,\n a:visited {\n color: #000000;\n display: flex;\n text-decoration: underline;\n }\n a:hover {\n cursor: pointer;\n }\n .menu-user-icon {\n svg {\n padding-left: 4px;\n width: 24px;\n height: 24px;\n color: #000000;\n }\n }\n }\n &.open {\n > div {\n max-height: 1000px;\n }\n }\n}\n.user-account-container {\n text-align: right;\n background-color: #d2cecb;\n max-height: 0;\n overflow: hidden;\n &.open {\n max-height: 56px;\n }\n a,\n button {\n display: inline-block;\n padding: 0.25em 1em 0.25em 1.1em;\n margin: 15px 0;\n text-decoration: none;\n color: transparent;\n cursor: pointer;\n border: none;\n font-weight: normal;\n background: transparent;\n &:not(:first-child) {\n border: none;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 15px;\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',"\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const a=s},2781:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getMinsideUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getMinsideUrl=t=>`https://minside.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,i,r,s)=>"articles"===n?`<a onClick="${o(i,s)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(i,s)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}?search=${i}">${t.Title}</a>`},3128:function(t,e,n){"use strict";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]}),i=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}),i(n(8631),e),i(n(3704),e),i(n(3365),e),i(n(169),e),i(n(6999),e),i(n(3982),e),i(n(8861),e),i(n(1063),e)},3365:(t,e)=>{"use strict";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)=>{"use strict";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)=>{"use strict";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)}})}},4142:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM160-160v-112q0-34 17.5-62.5T224-378q62-31 126-46.5T480-440q66 0 130 15.5T736-378q29 15 46.5 43.5T800-272v112H160Zm80-80h480v-32q0-11-5.5-20T700-306q-54-27-109-40.5T480-360q-56 0-111 13.5T260-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T560-640q0-33-23.5-56.5T480-720q-33 0-56.5 23.5T400-640q0 33 23.5 56.5T480-560Zm0-80Zm0 400Z"></path></svg>'},5052:t=>{"use strict";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)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},6388:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-120v-80h280v-560H480v-80h280q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H480Zm-80-160-55-58 102-102H120v-80h327L345-622l55-58 200 200-200 200Z"></path></svg>'},6999:(t,e,n)=>{"use strict";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 i=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,i,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 i=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:i})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},7227:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h240q17 0 28.5 11.5T480-800q0 17-11.5 28.5T440-760H200v560h240q17 0 28.5 11.5T480-160q0 17-11.5 28.5T440-120H200Zm487-320H400q-17 0-28.5-11.5T360-480q0-17 11.5-28.5T400-520h287l-75-75q-11-11-11-27t11-28q11-12 28-12.5t29 11.5l143 143q12 12 12 28t-12 28L669-309q-12 12-28.5 11.5T612-310q-11-12-10.5-28.5T613-366l74-74Z"></path></svg>'},8591:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n \n <button id="user-account-container" class="user-account-content"> \n \n </button>\n \n <div id="user-account-menu-wrapper" class="menu-wrapper">\n \n </div>\n \n </template> '},8631:function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function s(t){try{c(o.next(t))}catch(t){r(t)}}function a(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const i=n(169),r=n(6999),s=n(2466);e.Component=t=>e=>{var n;const a=t.tag||s.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>s.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[s.toCamelCase(t)]=n);const i=this.constructor.watchAttributes;if(i&&i[t]){const o=i[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,i.addEventListeners(this),r.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(a)||customElements.define(a,c),c}},8861:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},8969:function(t,e,n){"use strict";var o,i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},a=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),s=0;s<n.length;s++)"default"!==n[s]&&i(e,t,n[s]);return r(e,t),e}),c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.UserAccount=void 0;const l=n(3128),u=c(n(7227)),p=c(n(6388)),d=c(n(4142)),A=n(2781);let h=class extends l.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showmenu=!1},this.clickOutsideUserAccountItemsContainer=this.clickOutsideUserAccountItemsContainer.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.userAccountContent=(0,l.getShadowRootElement)(this,"#user-account-container"),this.userAccountItems=(0,l.getShadowRootElement)(this,"#user-account-menu-wrapper"),this.userAccountListContainer=(0,l.getShadowRootElement)(this,"#user-account-list-container"),(this.signinurl&&this.signouturl||this.shouldShowAuthenticationButton())&&this.renderLoginButton(),document.addEventListener("click",this.clickOutsideUserAccountItemsContainer)}shouldShowAuthenticationButton(){var t,e;return""===(null===(t=this.hasAuthenticationFunction)||void 0===t?void 0:t.toString())||"true"===(null===(e=this.hasAuthenticationFunction)||void 0===e?void 0:e.toString())}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideUserAccountItemsContainer)}clickOutsideUserAccountItemsContainer(t){const e=t.composedPath()[0];e.closest("#user-account-item-list-container")||e.closest("#user-account-toggle-button")||this.hideListContainer()}renderLoginButton(){this.userAccountContent.innerHTML="";const t=document.createElement("span");t.classList.add("menu-user-icon"),t.innerHTML=p.default;const e=document.createElement("span");e.innerText="en"===this.language?"Sign in":"Logg inn",this.userAccountContent.append(t,e)}renderLogoutButton(){var t;this.userAccountContent.innerHTML="";const e=document.createElement("div");e.id="user-account-toggle-button",e.classList.add("user-account-button");const n=document.createElement("span");let o=null===(t=JSON.parse(this.userinfo))||void 0===t?void 0:t.name;o&&o.length>10&&(o=o.substring(0,8)+"..."),n.innerText=o;const i=document.createElement("span");i.classList.add("close-user-icon"),i.innerHTML=d.default,e.appendChild(i),e.appendChild(n),this.userAccountContent.append(e)}renderUserButton(){(this.signinurl&&this.signouturl||this.shouldShowAuthenticationButton())&&(this.isloggedin?this.renderLogoutButton():this.renderLoginButton())}renderUserAccountItems(){var t;const e=this.signinurl&&this.signouturl;if(this.isloggedin||e||this.shouldShowAuthenticationButton()){this.userAccountItems.innerHTML="";const e=document.createElement("div"),n=document.createElement("div"),o=document.createElement("span");o.innerText="en"===this.language?"User account":"Pålogget som:",n.appendChild(o);const i=document.createElement("strong"),r=null===(t=JSON.parse(this.userinfo))||void 0===t?void 0:t.name;i.innerText=r,n.appendChild(i),e.appendChild(n);const s=document.createElement("ul"),a=t=>{const e=document.createElement("li"),n=document.createElement("a");return n.innerText=t,n.href=(0,A.getMinsideUrl)(this.environment),e.appendChild(n),e};s.appendChild(a("en"===this.language?"My page":"Min side")),e.appendChild(s);const c=document.createElement("div");c.style.marginTop="10px";const l=document.createElement("span");l.classList.add("menu-user-icon"),l.innerHTML=u.default;const p=document.createElement("a");p.setAttribute("role","button"),p.href="#";const d=document.createElement("span");d.innerText="en"===this.language?"Log out":"Logg ut",p.appendChild(l),p.appendChild(d),this.shouldShowAuthenticationButton()?p.onclick=t=>{t.preventDefault(),this.onSignOutClick.emit()}:p.href=this.signouturl,c.appendChild(p),e.appendChild(c),this.userAccountItems.appendChild(e)}else this.userAccountItems.innerHTML=""}buttonClicked(t){var e,n,o,i;this.isloggedin?(this.showmenu=!this.showmenu,this.showmenu?null===(e=this.userAccountItems)||void 0===e||e.classList.add("open"):null===(n=this.userAccountItems)||void 0===n||n.classList.remove("open"),this.showmenu?null===(o=this.userAccountListContainer)||void 0===o||o.classList.add("open"):null===(i=this.userAccountListContainer)||void 0===i||i.classList.remove("open")):this.shouldShowAuthenticationButton()?this.onSignInClick.emit():window.location.href=this.signinurl}showMenuChanged(){var t,e;this.showmenu?null===(t=this.userAccountItems)||void 0===t||t.classList.add("open"):null===(e=this.userAccountItems)||void 0===e||e.classList.remove("open")}hasAuthenticationFunctionChanged(){this.renderUserButton(),this.renderUserAccountItems()}isLoggedInChanged(){this.renderUserButton(),this.renderUserAccountItems()}languageChanged(){this.renderUserButton(),this.renderUserAccountItems()}organizationChanged(){this.renderUserButton(),this.renderUserAccountItems()}userInfoChanged(){this.renderUserButton(),this.renderUserAccountItems()}static setup(t,e){const n=(0,l.getElement)(t);e.active&&(n.showmenu=e.active)}};e.UserAccount=h,h.elementSelector="user-account",s([(0,l.Prop)()],h.prototype,"id",void 0),s([(0,l.Prop)()],h.prototype,"environment",void 0),s([(0,l.Prop)()],h.prototype,"language",void 0),s([(0,l.Prop)()],h.prototype,"signinurl",void 0),s([(0,l.Prop)()],h.prototype,"signouturl",void 0),s([(0,l.Prop)()],h.prototype,"organization",void 0),s([(0,l.Prop)()],h.prototype,"userinfo",void 0),s([(0,l.Toggle)()],h.prototype,"isloggedin",void 0),s([(0,l.Toggle)()],h.prototype,"showmenu",void 0),s([(0,l.Toggle)()],h.prototype,"hasAuthenticationFunction",void 0),s([(0,l.Dispatch)("onSignInClick")],h.prototype,"onSignInClick",void 0),s([(0,l.Dispatch)("onSignOutClick")],h.prototype,"onSignOutClick",void 0),s([(0,l.Dispatch)("onNorwegianLanguageSelect")],h.prototype,"onNorwegianLanguageSelect",void 0),s([(0,l.Dispatch)("onEnglishLanguageSelect")],h.prototype,"onEnglishLanguageSelect",void 0),s([(0,l.Listen)("click","#user-account-container")],h.prototype,"buttonClicked",null),s([(0,l.Watch)("showmenu")],h.prototype,"showMenuChanged",null),s([(0,l.Watch)("hasauthenticationfunction")],h.prototype,"hasAuthenticationFunctionChanged",null),s([(0,l.Watch)("isloggedin")],h.prototype,"isLoggedInChanged",null),s([(0,l.Watch)("language")],h.prototype,"languageChanged",null),s([(0,l.Watch)("organization")],h.prototype,"organizationChanged",null),s([(0,l.Watch)("userinfo")],h.prototype,"userInfoChanged",null),e.UserAccount=h=s([(0,l.Component)({tag:"user-account",template:Promise.resolve().then((()=>a(n(8591)))),style:Promise.resolve().then((()=>a(n(2573))))})],h)}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.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(8969)})()));
|
|
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.UserAccount=e())}(self,(()=>(()=>{var t={2573(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(5052),i=n.n(o),r=n(164),s=n.n(r)()(i());s.push([t.id,'.user-account-content{display:flex;flex-direction:row;padding:6px 8px 6px 8px;width:auto;color:#403f3f;gap:6px;font-family:"Open Sans",sans-serif;font-size:14px;justify-content:space-between;align-items:center;margin:0 6px 0 12px;background:rgba(0,0,0,0);border:none}.user-account-content:hover{color:#1073bc;cursor:pointer}.user-account-content span:last-child{display:none;align-items:center;flex-direction:row;padding:2px 1px;vertical-align:middle;font-weight:500}@media(min-width: 992px){.user-account-content span:last-child{display:inline-block}}.user-account-content span:first-child svg{height:24px;width:24px;vertical-align:middle}.menu-wrapper{font-size:14px;font-family:"Open Sans",sans-serif;position:relative;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.menu-wrapper>div{max-height:0;overflow:hidden;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;position:absolute;display:flex;flex-direction:column;background-color:#fff;box-shadow:0px 1px 3px 0px rgba(0,0,0,.1019607843);width:375px;z-index:100;top:10px;right:-85px}.menu-wrapper>div>div:first-child>span{display:block}.menu-wrapper>div>div:first-child>span:last-child{font-weight:bolder}.menu-wrapper>div ul{list-style-type:none}.menu-wrapper>div ul li{margin:12px 0}.menu-wrapper>div ul li a,.menu-wrapper>div ul li a:link,.menu-wrapper>div ul li a:visited{color:#1a589f}.menu-wrapper>div>*:nth-child(odd){background-color:#f9f9f9;padding:32px;display:flex;flex-direction:column;gap:5px}.menu-wrapper>div>*:nth-child(even){background-color:#fff;margin-top:10px;display:flex;flex-direction:column;gap:5px;padding:0 32px}.menu-wrapper>div>*:last-child{padding:32px}.menu-wrapper>div a,.menu-wrapper>div a:link,.menu-wrapper>div a:visited{color:#000;display:flex;text-decoration:underline}.menu-wrapper>div a:hover{cursor:pointer}.menu-wrapper>div .menu-user-icon svg{padding-left:4px;width:24px;height:24px;color:#000}.menu-wrapper.open>div{max-height:1000px}.user-account-container{text-align:right;background-color:#d2cecb;max-height:0;overflow:hidden}.user-account-container.open{max-height:56px}.user-account-container a,.user-account-container button{display:inline-block;padding:.25em 1em .25em 1.1em;margin:15px 0;text-decoration:none;color:rgba(0,0,0,0);cursor:pointer;border:none;font-weight:normal;background:rgba(0,0,0,0)}.user-account-container a:not(:first-child),.user-account-container button:not(:first-child){border:none}',"",{version:3,sources:["webpack://./stories/main-navigation/user-account/user-account.scss","webpack://./style/variables/_typography.scss","webpack://./style/mixins/_breakpoints.scss","webpack://./style/mixins/_transition.scss"],names:[],mappings:"AAIA,sBACI,YAAA,CACA,kBAAA,CACA,uBAAA,CACA,UAAA,CACA,aAAA,CACA,OAAA,CACA,kCCXW,CDYX,cAAA,CACA,6BAAA,CACA,kBAAA,CACA,mBAAA,CACA,wBAAA,CAMA,WAAA,CALA,4BACI,aAAA,CACA,cAAA,CAIJ,sCACI,YAAA,CACA,kBAAA,CACA,kBAAA,CACA,eAAA,CACA,qBAAA,CACA,eAAA,CErBA,yBFeJ,sCAQQ,oBAAA,CAAA,CAIJ,2CACI,WAAA,CACA,UAAA,CACA,qBAAA,CAIZ,cACI,cAAA,CACA,kCC5CW,CD6CX,iBAAA,CG5CA,mCH6CA,CG5CA,iCH4CA,CG3CA,sCH2CA,CG1CA,8BH0CA,CAEA,kBACI,YAAA,CACA,eAAA,CGjDJ,mCHkDI,CGjDJ,iCHiDI,CGhDJ,sCHgDI,CG/CJ,8BH+CI,CACA,iBAAA,CACA,YAAA,CACA,qBAAA,CACA,qBAAA,CACA,kDAAA,CACA,WAAA,CACA,WAAA,CACA,QAAA,CACA,WAAA,CACA,uCACI,aAAA,CACA,kDACI,kBAAA,CAGR,qBACI,oBAAA,CACA,wBACI,aAAA,CACA,2FAGI,aAAA,CAKZ,mCACI,wBAAA,CACA,YAAA,CACA,YAAA,CACA,qBAAA,CACA,OAAA,CAEJ,oCACI,qBAAA,CACA,eAAA,CACA,YAAA,CACA,qBAAA,CACA,OAAA,CACA,cAAA,CAEJ,+BACI,YAAA,CAEJ,yEAGI,UAAA,CACA,YAAA,CACA,yBAAA,CAEJ,0BACI,cAAA,CAGA,sCACI,gBAAA,CACA,UAAA,CACA,WAAA,CACA,UAAA,CAKR,uBACI,iBAAA,CAIZ,wBACI,gBAAA,CACA,wBAAA,CACA,YAAA,CACA,eAAA,CACA,6BACI,eAAA,CAEJ,yDAEI,oBAAA,CACA,6BAAA,CACA,aAAA,CACA,oBAAA,CACA,mBAAA,CACA,cAAA,CACA,WAAA,CACA,kBAAA,CACA,wBAAA,CACA,6FACI,WAAA",sourcesContent:['@use "../../../style/mixins/breakpoints";\n@use "../../../style/mixins/transition";\n@use "../../../style/variables/typography";\n\n.user-account-content {\n display: flex;\n flex-direction: row;\n padding: 6px 8px 6px 8px;\n width: auto;\n color: #403f3f;\n gap: 6px;\n font-family: typography.$default-font;\n font-size: 14px;\n justify-content: space-between;\n align-items: center;\n margin: 0 6px 0 12px;\n background: transparent;\n &:hover {\n color: #1073bc;\n cursor: pointer;\n }\n\n border: none;\n span:last-child {\n display: none;\n align-items: center;\n flex-direction: row;\n padding: 2px 1px;\n vertical-align: middle;\n font-weight: 500;\n @include breakpoints.breakpoint(laptop) {\n display: inline-block;\n }\n }\n span:first-child {\n svg {\n height: 24px;\n width: 24px;\n vertical-align: middle;\n }\n }\n}\n.menu-wrapper {\n font-size: 14px;\n font-family: typography.$default-font;\n position: relative;\n @include transition.transition(all 0.3s ease-in-out);\n\n > div {\n max-height: 0;\n overflow: hidden;\n @include transition.transition(all 0.3s ease-in-out);\n position: absolute;\n display: flex;\n flex-direction: column;\n background-color: white;\n box-shadow: 0px 1px 3px 0px #0000001a;\n width: 375px;\n z-index: 100;\n top: 10px;\n right: -85px;\n > div:first-child > span {\n display: block;\n &:last-child {\n font-weight: bolder;\n }\n }\n ul {\n list-style-type: none;\n li {\n margin: 12px 0;\n a,\n a:link,\n a:visited {\n color: #1a589f;\n }\n }\n }\n\n > *:nth-child(odd) {\n background-color: #f9f9f9;\n padding: 32px;\n display: flex;\n flex-direction: column;\n gap: 5px;\n }\n > *:nth-child(even) {\n background-color: white;\n margin-top: 10px;\n display: flex;\n flex-direction: column;\n gap: 5px;\n padding: 0 32px;\n }\n > *:last-child {\n padding: 32px;\n }\n a,\n a:link,\n a:visited {\n color: #000000;\n display: flex;\n text-decoration: underline;\n }\n a:hover {\n cursor: pointer;\n }\n .menu-user-icon {\n svg {\n padding-left: 4px;\n width: 24px;\n height: 24px;\n color: #000000;\n }\n }\n }\n &.open {\n > div {\n max-height: 1000px;\n }\n }\n}\n.user-account-container {\n text-align: right;\n background-color: #d2cecb;\n max-height: 0;\n overflow: hidden;\n &.open {\n max-height: 56px;\n }\n a,\n button {\n display: inline-block;\n padding: 0.25em 1em 0.25em 1.1em;\n margin: 15px 0;\n text-decoration: none;\n color: transparent;\n cursor: pointer;\n border: none;\n font-weight: normal;\n background: transparent;\n &:not(:first-child) {\n border: none;\n }\n }\n}\n','$default-font: "Open Sans", sans-serif;\n$header-font: "Raleway", sans-serif;\n$default-font-size: 15px;\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',"\ufeff@mixin transition($transition...) {\n -moz-transition: $transition;\n -o-transition: $transition;\n -webkit-transition: $transition;\n transition: $transition;\n}\n\n@mixin transition-property($property...) {\n -moz-transition-property: $property;\n -o-transition-property: $property;\n -webkit-transition-property: $property;\n transition-property: $property;\n}\n\n@mixin transition-duration($duration...) {\n -moz-transition-property: $duration;\n -o-transition-property: $duration;\n -webkit-transition-property: $duration;\n transition-property: $duration;\n}\n\n@mixin transition-timing-function($timing...) {\n -moz-transition-timing-function: $timing;\n -o-transition-timing-function: $timing;\n -webkit-transition-timing-function: $timing;\n transition-timing-function: $timing;\n}\n\n@mixin transition-delay($delay...) {\n -moz-transition-delay: $delay;\n -o-transition-delay: $delay;\n -webkit-transition-delay: $delay;\n transition-delay: $delay;\n}\n"],sourceRoot:""}]);const a=s},8591(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>o});const o='<template>\n \n <button id="user-account-container" class="user-account-content"> \n \n </button>\n \n <div id="user-account-menu-wrapper" class="menu-wrapper">\n \n </div>\n \n </template> '},164(t){"use strict";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,i,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},5052(t){"use strict";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)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},8631(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function s(t){try{c(o.next(t))}catch(t){r(t)}}function a(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;const i=n(169),r=n(6999),s=n(2466);e.Component=t=>e=>{var n;const a=t.tag||s.toKebabCase(e.prototype.constructor.name),c=((n=class extends e{constructor(){super(),this.props={},this.showShadowRoot=null==t.shadow||t.shadow,!this.shadowRoot&&this.showShadowRoot&&this.attachShadow({mode:"open"})}static get observedAttributes(){return Object.keys(this.propsInit||{}).map((t=>s.toKebabCase(t)))}attributeChangedCallback(t,e,n){this.onAttributeChange(t,e,n)}onAttributeChange(t,e,n,o=!0){if(e!=n){o&&(this[s.toCamelCase(t)]=n);const i=this.constructor.watchAttributes;if(i&&i[t]){const o=i[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,i.addEventListeners(this),r.initializeProps(this)}))}render(){return o(this,void 0,void 0,(function*(){if(this.__connected)return;const e=document.createElement("template");e.innerHTML=yield this.getStyle(),t.template instanceof Promise?e.content.appendChild(yield this.getExternalTemplate()):"string"==typeof t.template&&(e.innerHTML+=t.template),(this.showShadowRoot?this.shadowRoot:this).appendChild(e.content.cloneNode(!0))}))}getExternalTemplate(){return o(this,void 0,void 0,(function*(){const e=(yield t.template).default.toString(),n=document.createRange().createContextualFragment(e);return 1===n.children.length&&"TEMPLATE"===n.children[0].nodeName?n.firstChild.content:n}))}getStyle(){return o(this,void 0,void 0,(function*(){let e;return t.style instanceof Promise?e=(yield t.style).default.toString():"string"==typeof t.style&&(e=t.style),e?`<style>${e}</style>`:""}))}}).__connected=!1,n.ready=new Promise(((t,e)=>t(!0))),n);return customElements.get(a)||customElements.define(a,c),c}},3704(t,e){"use strict";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},3365(t,e){"use strict";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)},3128(t,e,n){"use strict";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]}),i=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}),i(n(8631),e),i(n(3704),e),i(n(3365),e),i(n(169),e),i(n(6999),e),i(n(3982),e),i(n(8861),e),i(n(1063),e)},169(t,e,n){"use strict";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(i){const r=t||o.toDotCase(n);e.dispatchEvent(new CustomEvent(r,i))}}}})}},6999(t,e,n){"use strict";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 i=this.props[e];this.props[e]=o.tryParseInt(t),"object"!=typeof t?this.setAttribute(n,t):this.onAttributeChange(n,i,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 i=t.props[n]||t.getAttribute(o.toKebabCase(n));"function"==typeof t[e[n]]&&t[e[n]]({new:i})}t.constructor.propsInit[n]&&(t.hasAttribute(o.toKebabCase(n))||(t[n]=t.constructor.propsInit[n]))}}},3982(t,e,n){"use strict";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)}})}},8861(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},2466(t,e){"use strict";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},1063(t,e,n){"use strict";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}},6388(t){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-120v-80h280v-560H480v-80h280q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H480Zm-80-160-55-58 102-102H120v-80h327L345-622l55-58 200 200-200 200Z"></path></svg>'},7227(t){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h240q17 0 28.5 11.5T480-800q0 17-11.5 28.5T440-760H200v560h240q17 0 28.5 11.5T480-160q0 17-11.5 28.5T440-120H200Zm487-320H400q-17 0-28.5-11.5T360-480q0-17 11.5-28.5T400-520h287l-75-75q-11-11-11-27t11-28q11-12 28-12.5t29 11.5l143 143q12 12 12 28t-12 28L669-309q-12 12-28.5 11.5T612-310q-11-12-10.5-28.5T613-366l74-74Z"></path></svg>'},4142(t){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-480q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47ZM160-160v-112q0-34 17.5-62.5T224-378q62-31 126-46.5T480-440q66 0 130 15.5T736-378q29 15 46.5 43.5T800-272v112H160Zm80-80h480v-32q0-11-5.5-20T700-306q-54-27-109-40.5T480-360q-56 0-111 13.5T260-306q-9 5-14.5 14t-5.5 20v32Zm240-320q33 0 56.5-23.5T560-640q0-33-23.5-56.5T480-720q-33 0-56.5 23.5T400-640q0 33 23.5 56.5T480-560Zm0-80Zm0 400Z"></path></svg>'},2781(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderDropdownResultLink=e.convertTextToUrlSlug=e.getGeonorgeNedlastingUrl=e.getGeonorgeUrl=e.getMinsideUrl=e.getKartkatalogUrl=void 0,e.getKartkatalogUrl=t=>`https://kartkatalog.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getMinsideUrl=t=>`https://minside.${"dev"===t||"test"===t?t+".":""}geonorge.no`,e.getGeonorgeUrl=(t,e)=>`https://www.${"dev"===e||"test"===e?"test.":""}geonorge.no/${"en"===t?"en/":""}`,e.getGeonorgeNedlastingUrl=t=>`https://nedlasting.${"dev"===t||"test"===t?"test.":""}geonorge.no`;const n=(t,e,n)=>(t=(t=(t=t.replace(new RegExp(`([^s])([${e}])([^s])`,"ig"),`$1 ${n} $3`)).replace(new RegExp(`([^s])([${e}])`,"ig"),`$1 ${n}`)).replace(new RegExp(`([${e}])([^s])`,"ig"),`${n} $2`)).replace(new RegExp(`[${e}]`,"ig"),n);e.convertTextToUrlSlug=(t="")=>(t=t.toLowerCase(),t=n(t,"&","and"),(t=(t=(t=(t=(t=(t=(t=(t=(t=n(t,"+","plus")).replace("æ","ae")).replace("ä","ae")).replace("ø","oe")).replace("ö","oe")).replace("å","aa")).replace(/( - )/g,"-")).replace(/[\s]+/g,"-")).replace(/[^a-z0-9-]+/gi,"")).replace(/^[^A-Z0-9]*|[^a-z0-9]*$/gi,""));const o=(t,e)=>{if(!e)return!1;e({event:"updateSearchString",category:"metadataSearch",activity:"dropDownResultsClick",searchString:t})};e.renderDropdownResultLink=(t,n,i,r,s)=>"articles"===n?`<a onClick="${o(i,s)}" href="${t.ShowDetailsUrl?t.ShowDetailsUrl:"#"}">${t.Title}</a>`:`<a onClick="${o(i,s)}" href="${(0,e.getKartkatalogUrl)(r)}/metadata/${(0,e.convertTextToUrlSlug)(t.Title)}/${t.Uuid}?search=${i}">${t.Title}</a>`},8969(t,e,n){"use strict";var o,i=this&&this.__createBinding||(Object.create?function(t,e,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,o,i)}:function(t,e,n,o){void 0===o&&(o=n),t[o]=e[n]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__decorate||function(t,e,n,o){var i,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,n,s):i(e,n))||s);return r>3&&s&&Object.defineProperty(e,n,s),s},a=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),s=0;s<n.length;s++)"default"!==n[s]&&i(e,t,n[s]);return r(e,t),e}),c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.UserAccount=void 0;const l=n(3128),u=c(n(7227)),p=c(n(6388)),d=c(n(4142)),A=n(2781);let h=class extends l.CustomElement{constructor(){super(),this.hideListContainer=()=>{this.showmenu=!1},this.clickOutsideUserAccountItemsContainer=this.clickOutsideUserAccountItemsContainer.bind(this)}setup(t){this.connect(t.container),t.id&&(this.id=t.id)}connectedCallback(){this.userAccountContent=(0,l.getShadowRootElement)(this,"#user-account-container"),this.userAccountItems=(0,l.getShadowRootElement)(this,"#user-account-menu-wrapper"),this.userAccountListContainer=(0,l.getShadowRootElement)(this,"#user-account-list-container"),(this.signinurl&&this.signouturl||this.shouldShowAuthenticationButton())&&this.renderLoginButton(),document.addEventListener("click",this.clickOutsideUserAccountItemsContainer)}shouldShowAuthenticationButton(){var t,e;return""===(null===(t=this.hasAuthenticationFunction)||void 0===t?void 0:t.toString())||"true"===(null===(e=this.hasAuthenticationFunction)||void 0===e?void 0:e.toString())}disconnectedCallback(){document.removeEventListener("click",this.clickOutsideUserAccountItemsContainer)}clickOutsideUserAccountItemsContainer(t){const e=t.composedPath()[0];e.closest("#user-account-item-list-container")||e.closest("#user-account-toggle-button")||this.hideListContainer()}renderLoginButton(){this.userAccountContent.innerHTML="";const t=document.createElement("span");t.classList.add("menu-user-icon"),t.innerHTML=p.default;const e=document.createElement("span");e.innerText="en"===this.language?"Sign in":"Logg inn",this.userAccountContent.append(t,e)}renderLogoutButton(){var t;this.userAccountContent.innerHTML="";const e=document.createElement("div");e.id="user-account-toggle-button",e.classList.add("user-account-button");const n=document.createElement("span");let o=null===(t=JSON.parse(this.userinfo))||void 0===t?void 0:t.name;o&&o.length>10&&(o=o.substring(0,8)+"..."),n.innerText=o;const i=document.createElement("span");i.classList.add("close-user-icon"),i.innerHTML=d.default,e.appendChild(i),e.appendChild(n),this.userAccountContent.append(e)}renderUserButton(){(this.signinurl&&this.signouturl||this.shouldShowAuthenticationButton())&&(this.isloggedin?this.renderLogoutButton():this.renderLoginButton())}renderUserAccountItems(){var t;const e=this.signinurl&&this.signouturl;if(this.isloggedin||e||this.shouldShowAuthenticationButton()){this.userAccountItems.innerHTML="";const e=document.createElement("div"),n=document.createElement("div"),o=document.createElement("span");o.innerText="en"===this.language?"User account":"Pålogget som:",n.appendChild(o);const i=document.createElement("strong"),r=null===(t=JSON.parse(this.userinfo))||void 0===t?void 0:t.name;i.innerText=r,n.appendChild(i),e.appendChild(n);const s=document.createElement("ul"),a=t=>{const e=document.createElement("li"),n=document.createElement("a");return n.innerText=t,n.href=(0,A.getMinsideUrl)(this.environment),e.appendChild(n),e};s.appendChild(a("en"===this.language?"My page":"Min side")),e.appendChild(s);const c=document.createElement("div");c.style.marginTop="10px";const l=document.createElement("span");l.classList.add("menu-user-icon"),l.innerHTML=u.default;const p=document.createElement("a");p.setAttribute("role","button"),p.href="#";const d=document.createElement("span");d.innerText="en"===this.language?"Log out":"Logg ut",p.appendChild(l),p.appendChild(d),this.shouldShowAuthenticationButton()?p.onclick=t=>{t.preventDefault(),this.onSignOutClick.emit()}:p.href=this.signouturl,c.appendChild(p),e.appendChild(c),this.userAccountItems.appendChild(e)}else this.userAccountItems.innerHTML=""}buttonClicked(t){var e,n,o,i;this.isloggedin?(this.showmenu=!this.showmenu,this.showmenu?null===(e=this.userAccountItems)||void 0===e||e.classList.add("open"):null===(n=this.userAccountItems)||void 0===n||n.classList.remove("open"),this.showmenu?null===(o=this.userAccountListContainer)||void 0===o||o.classList.add("open"):null===(i=this.userAccountListContainer)||void 0===i||i.classList.remove("open")):this.shouldShowAuthenticationButton()?this.onSignInClick.emit():window.location.href=this.signinurl}showMenuChanged(){var t,e;this.showmenu?null===(t=this.userAccountItems)||void 0===t||t.classList.add("open"):null===(e=this.userAccountItems)||void 0===e||e.classList.remove("open")}hasAuthenticationFunctionChanged(){this.renderUserButton(),this.renderUserAccountItems()}isLoggedInChanged(){this.renderUserButton(),this.renderUserAccountItems()}languageChanged(){this.renderUserButton(),this.renderUserAccountItems()}organizationChanged(){this.renderUserButton(),this.renderUserAccountItems()}userInfoChanged(){this.renderUserButton(),this.renderUserAccountItems()}static setup(t,e){const n=(0,l.getElement)(t);e.active&&(n.showmenu=e.active)}};e.UserAccount=h,h.elementSelector="user-account",s([(0,l.Prop)()],h.prototype,"id",void 0),s([(0,l.Prop)()],h.prototype,"environment",void 0),s([(0,l.Prop)()],h.prototype,"language",void 0),s([(0,l.Prop)()],h.prototype,"signinurl",void 0),s([(0,l.Prop)()],h.prototype,"signouturl",void 0),s([(0,l.Prop)()],h.prototype,"organization",void 0),s([(0,l.Prop)()],h.prototype,"userinfo",void 0),s([(0,l.Toggle)()],h.prototype,"isloggedin",void 0),s([(0,l.Toggle)()],h.prototype,"showmenu",void 0),s([(0,l.Toggle)()],h.prototype,"hasAuthenticationFunction",void 0),s([(0,l.Dispatch)("onSignInClick")],h.prototype,"onSignInClick",void 0),s([(0,l.Dispatch)("onSignOutClick")],h.prototype,"onSignOutClick",void 0),s([(0,l.Dispatch)("onNorwegianLanguageSelect")],h.prototype,"onNorwegianLanguageSelect",void 0),s([(0,l.Dispatch)("onEnglishLanguageSelect")],h.prototype,"onEnglishLanguageSelect",void 0),s([(0,l.Listen)("click","#user-account-container")],h.prototype,"buttonClicked",null),s([(0,l.Watch)("showmenu")],h.prototype,"showMenuChanged",null),s([(0,l.Watch)("hasauthenticationfunction")],h.prototype,"hasAuthenticationFunctionChanged",null),s([(0,l.Watch)("isloggedin")],h.prototype,"isLoggedInChanged",null),s([(0,l.Watch)("language")],h.prototype,"languageChanged",null),s([(0,l.Watch)("organization")],h.prototype,"organizationChanged",null),s([(0,l.Watch)("userinfo")],h.prototype,"userInfoChanged",null),e.UserAccount=h=s([(0,l.Component)({tag:"user-account",template:Promise.resolve().then((()=>a(n(8591)))),style:Promise.resolve().then((()=>a(n(2573))))})],h)}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.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(8969)})()));
|
|
2
2
|
//# sourceMappingURL=UserAccount.js.map
|