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Ac9DA,EAAIK,SAASP,EAAMQ,SACvBjD,KAAKG,QAAQ+C,O,EAGflD,KAAKmD,iBAAoBV,IACN,WAAdA,EAAMW,KAAoC,KAAhBX,EAAMY,OAAkC,KAAlBZ,EAAMa,SACzDtD,KAAKG,QAAQ+C,O,EAGfK,OAAOC,iBAAiB,UAAWxD,KAAKwC,uBACxCe,OAAOC,iBAAiB,QAASxD,KAAKwC,uBACtCe,OAAOC,iBAAiB,OAAQxD,KAAKwC,uBACrCe,OAAOC,iBAAiB,aAAcxD,KAAKwC,uBAC3Ce,OAAOC,iBAAiB,UAAWxD,KAAKmD,iBAAiB,GACvD,GACJ,CAEA,QAAAM,G,MACCF,OAAOG,oBAAoB,UAAW1D,KAAKwC,uBAC3Ce,OAAOG,oBAAoB,QAAS1D,KAAKwC,uBACzCe,OAAOG,oBAAoB,OAAQ1D,KAAKwC,uBACxCe,OAAOG,oBAAoB,aAAc1D,KAAKwC,uBAC9Ce,OAAOG,oBAAoB,UAAW1D,KAAKmD,kBAEhC,QAAX,EAAAnD,KAAKqC,cAAM,SAAEsB,SACd,GA5DY3B,E,mUAAW,EADvB,EAAAtB,W,kIAM4B,IAAqCkD,WALrD5B,E","sources":["webpack://client-app/./src/app/components/context-menu/context-menu.scss","webpack://client-app/./src/app/components/context-menu/actions/context-button-action.html","webpack://client-app/./src/app/components/context-menu/actions/context-line-action.html","webpack://client-app/./src/app/components/context-menu/actions/context-number-action.html","webpack://client-app/./src/app/components/context-menu/actions/context-range-action.html","webpack://client-app/./src/app/components/context-menu/actions/context-select-action.html","webpack://client-app/./src/app/components/context-menu/actions/context-text-action.html","webpack://client-app/./src/app/components/context-menu/actions/context-toggle-action.html","webpack://client-app/./src/app/components/context-menu/context-menu.html","webpack://client-app/./src/app/components/context-menu/actions/context-action-model.ts","webpack://client-app/./src/app/components/context-menu/actions/context-button-action.ts","webpack://client-app/./src/app/components/context-menu/actions/context-line-action.ts","webpack://client-app/./src/app/components/context-menu/actions/context-number-action.ts","webpack://client-app/./src/app/components/context-menu/actions/context-range-action.ts","webpack://client-app/./src/app/components/context-menu/actions/context-select-action.ts","webpack://client-app/./src/app/components/context-menu/actions/context-text-action.ts","webpack://client-app/./src/app/components/context-menu/actions/context-toggle-action.ts","webpack://client-app/./src/app/components/context-menu/context-menu.ts"],"sourcesContent":["// 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, `.context-menu{background:#fff;border-radius:.25rem;box-shadow:0 0 .25rem rgba(0,0,0,.175);display:flex;flex-direction:column;padding:calc(15px/3) 0;position:fixed;z-index:2000}.context-menu .action{border-radius:0;border-color:#fff !important;display:flex;align-items:center;font-weight:600;padding:calc(15px/2) 15px;width:100%}.context-menu .action:hover{background:#efefef}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/context-menu/context-menu.scss\",\"webpack://./src/resources/styling-admin.scss\",\"webpack://./src/resources/customized-styles/variables.scss\"],\"names\":[],\"mappings\":\"AAGA,cACC,eCWa,CDVb,oBAAA,CACA,sCEMY,CFLZ,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,cAAA,CACA,YAAA,CAEA,sBACC,eAAA,CACA,4BAAA,CACA,YAAA,CACA,kBAAA,CACA,eAAA,CACA,yBAAA,CACA,UAAA,CAEA,4BACC,kBElBU\",\"sourcesContent\":[\"@import \\\"src/resources/customized-styles/variables\\\";\\r\\n@import \\\"src/resources/styling-admin\\\";\\r\\n\\r\\n.context-menu {\\r\\n\\tbackground: $white;\\r\\n\\tborder-radius: 0.25rem;\\r\\n\\tbox-shadow: $box-shadow;\\r\\n\\tdisplay: flex;\\r\\n\\tflex-direction: column;\\r\\n\\tpadding: calc(#{$gutter} / 3) 0;\\r\\n\\tposition: fixed;\\r\\n\\tz-index: 2000;\\r\\n\\r\\n\\t.action {\\r\\n\\t\\tborder-radius: 0;\\r\\n\\t\\tborder-color:white!important;//To hide borders on disabled items.\\r\\n\\t\\tdisplay: flex;\\r\\n\\t\\talign-items: center;\\r\\n\\t\\tfont-weight: 600;\\r\\n\\t\\tpadding: calc(#{$gutter} / 2) $gutter;\\r\\n\\t\\twidth: 100%;\\r\\n\\r\\n\\t\\t&:hover {\\r\\n\\t\\t\\tbackground: $grey-light;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\\r\\n\",\"$black: #000000 !default;\\r\\n$blue: #348fe2 !default;\\r\\n$cyan: #49b6d6 !default;\\r\\n$dark: #2d353c !default;\\r\\n$dark-darker: #1a2229 !default;\\r\\n$green: #32a932 !default;\\r\\n$indigo: #8753de !default;\\r\\n$lime: #90ca4b !default;\\r\\n$light: #f2f3f4 !default;\\r\\n$orange: #f59c1a !default;\\r\\n$purple: #727cb6 !default;\\r\\n$pink: #fb5597 !default;\\r\\n$red: #ff5b57 !default;\\r\\n$silver: #b6c2c9 !default;\\r\\n$teal: #00acac !default;\\r\\n$white: #FFFFFF !default;\\r\\n$yellow: #ffd900 !default;\\r\\n$inverse: $dark !default;\\r\\n$link-color: $blue !default;\\r\\n$btn-eg-theme-color: #517770 !default;\\r\\n$btn-ajour-theme-color:\\trgb(29, 30, 90) !default; \\t\\r\\n$colors: (\\r\\n\\t'black': $black,\\r\\n\\t'cyan': $cyan,\\r\\n\\t'dark': $dark,\\r\\n\\t'dark-darker': $dark-darker,\\r\\n\\t'green': $green,\\r\\n\\t'indigo': $indigo,\\r\\n\\t'lime': $lime,\\r\\n\\t'light': $light,\\r\\n\\t'orange': $orange,\\r\\n\\t'purple': $purple,\\r\\n\\t'pink': $pink,\\r\\n\\t'red': $red,\\r\\n\\t'silver': $silver,\\r\\n\\t'teal': $teal,\\r\\n\\t'white': $white,\\r\\n\\t'yellow': $yellow,\\r\\n\\t'muted': darken($silver, 30%),\\r\\n\\t'aqua': $cyan,\\r\\n\\t'btn-eg-theme-color': $btn-eg-theme-color,\\r\\n\\t'btn-ajour-theme-color': $btn-ajour-theme-color,\\r\\n\\r\\n);\\r\\n\\r\\n$border-radius: 4px !default;\\r\\n$border-radius-lg: 6px !default;\\r\\n$border-radius-sm: 3px !default;\",\"$text-color: #333;\\r\\n$accent: #00B3C9;\\r\\n$accent-15pct: #D9F4F7;\\r\\n$bs-default: #f1f3f4;\\r\\n$grey: #dddddd;\\r\\n$grey-light: #efefef;\\r\\n$grey-lighter: #F0F3F4;\\r\\n$grey-darker: #A5A3A3;\\r\\n$white-hsl-97: hsla(0deg, 0%, 97%, 1);\\r\\n\\r\\n$gutter: 15px;\\r\\n\\r\\n$box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-right: 0.05rem 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-left: -0.05rem 0 0.25rem rgba(0, 0, 0, 0.175);\\r\\n$box-shadow-color: rgba(0, 0, 0, 0.175);\\r\\n\\r\\n$border-color: rgba(0, 0, 0, 0.175);\\r\\n\\r\\n\\r\\n// Showroom header\\r\\n$showroom-header-height: 350px;\\r\\n$showroom-header-height-small: 150px;\\r\\n$showroom-header-height-mobile: 200px;\\r\\n\\r\\n// Navigation\\r\\n$nav-width: 275px;\\r\\n$nav-width-collapsed: 50px;\\r\\n$nav-height-mobile: 50px;\\r\\n\\r\\n// Top bar\\r\\n$top-bar-height: 4em;\\r\\n\\r\\n// CSS grid table\\r\\n$css-grid-header-height: calc(4em + 1px);\\r\\n\\r\\n// Object Presentation\\r\\n$object-presentation-left-content-width: 250px;\\r\\n$object-presentation-left-content-width-lg: 350px;\\r\\n$object-presentation-img-height: 250px;\\r\\n\\r\\n\\r\\n// Card deck\\r\\n$card-height: 250px;\\r\\n\\r\\n\\r\\n// Select\\r\\n$select-min-width: 200px;\\r\\n\\r\\n\\r\\n// Modal\\r\\n$modal-header-height: 50px;\\r\\n$modal-footer-height: 50px;\\r\\n\\r\\n// Object Properties\\r\\n$object-properties-width: 480px;\\r\\n$object-properties-width--detailed: 560px;\\r\\n$object-properties-width-mobile: 100vw;\\r\\n$object-properties-width-mobile--detailed: 100vw;\\r\\n$object-properties-width-tablet: 480px;\\r\\n$object-properties-width-tablet--detailed: 560px;\\r\\n\\r\\n// Notification Center\\r\\n$notification-center-width: 500px;\\r\\n\\r\\n// 7.0 z-index Setting\\r\\n\\r\\n$btn-scroll-to-top-zindex: 1020 !default;\\r\\n$content-zindex: 1020 !default;\\r\\n$float-submenu-zindex: 1020 !default;\\r\\n$footer-zindex: 1020 !default;\\r\\n$header-zindex: 1020 !default;\\r\\n$header-fixed-zindex: 1040 !default;\\r\\n$sidebar-zindex: 1010 !default;\\r\\n$top-menu-zindex: 1015 !default;\\r\\n$theme-panel-zindex: 1020 !default;\\r\\n$page-loader-zindex : 9999 !default;\\r\\n$page-title-zindex: 1020 !default;\\r\\n$pace-loader-zindex: 1030 !default;\\r\\n$panel-expand-zindex: 1080 !default;\\r\\n\\r\\n// 2.0 RTL Setting\\r\\n\\r\\n$enable-rtl: false !default;\\r\\n\\r\\n// 6.0 App Component Setting\\r\\n@import 'functions.scss';\\r\\n$boxed-layout-width: rem(1280px) !default;\\r\\n$content-padding-x: rem(30px) !default;\\r\\n$content-padding-y: rem(20px) !default;\\r\\n$content-padding-x-sm: rem(20px) !default;\\r\\n$content-padding-y-sm: rem(20px) !default;\\r\\n$header-height: rem(50px) !default;\\r\\n$header-height-sm: rem(50px) !default;\\r\\n$sidebar-width: rem(220px) !default;\\r\\n$sidebar-minified-width: rem(60px) !default;\\r\\n$sidebar-wide-width: rem(250px) !default;\\r\\n$top-menu-height: rem(40px) !default;\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = \"\";","module.exports = \"\";","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","export abstract class ContextAction {\r\n protected actionKey: string | undefined = \"\";\r\n public textKey: string = \"\";\r\n public icon?: string;\r\n public isDisabled?: boolean;\r\n protected service: any;\r\n private _postAction?: Function\r\n\r\n protected baseSetup(model: { textKey: string, icon?: string, isDisabled?: boolean, actionKey?: string, service: any, postAction?: Function}){\r\n this.textKey = model.textKey;\r\n this.icon = model.icon;\r\n this.isDisabled = model.isDisabled;\r\n\t\tthis.actionKey = model.actionKey;\r\n this.service = model.service;\r\n this._postAction = model.postAction;\r\n }\r\n\r\n protected postAction(){\r\n if(this._postAction && Boolean(this._postAction) && Boolean(this.actionKey))\r\n this._postAction();\r\n }\r\n}\r\n","import { ContextAction } from 'app/components/context-menu/actions/context-action-model';\r\nimport { autoinject } from 'aurelia-framework';\r\n\r\n@autoinject\r\nexport class ContextButtonAction extends ContextAction {\r\n\r\n\tpublic activate(model: { textKey: string, icon?: string, isDisabled?: boolean, actionKey?: string, service: any, postAction?: Function}){\r\n this.baseSetup(model);\r\n\r\n\t}\r\n\r\n public perform(){\r\n if (this.actionKey) {\r\n this.service[this.actionKey]();\r\n this.postAction();\r\n }\r\n }\r\n}\r\n","import { ContextAction } from 'app/components/context-menu/actions/context-action-model';\r\nimport { autoinject } from 'aurelia-framework';\r\n\r\n@autoinject\r\nexport class ContextLineAction extends ContextAction {\r\n\r\n\tpublic activate(model: { textKey: string, service: any, postAction?: Function}){\r\n this.baseSetup(model);\r\n\r\n\t}\r\n\r\n public perform() {\r\n if (this.actionKey) {\r\n this.service[this.actionKey]();\r\n this.postAction();\r\n }\r\n }\r\n}\r\n//d","import { ContextAction } from 'app/components/context-menu/actions/context-action-model';\r\nimport { autoinject } from 'aurelia-framework';\r\n\r\n@autoinject\r\nexport class ContextNumberAction extends ContextAction {\r\n //@bindable public data: any;\r\n\tpublic valueKey: string | undefined;\r\n\tpublic minValue: string | undefined;\r\n\tpublic maxValue: string | undefined;\r\n\tpublic step: string | undefined;\r\n public unit: string | undefined;\r\n public state: any;\r\n\r\n /*public attached() {\r\n this.setModel(this.data);\r\n }*/\r\n\r\n\tpublic activate(data: any) {\r\n //this.data = data;\r\n this.setModel(data);\r\n }\r\n \r\n private setModel(model: {textKey: string, valueKey: string, service: any, actionKey?: string, state?: any, minValue?: string, maxValue?: string, step?: string, unit?: string, postAction?: Function}){\r\n // Use action key if changing the number should have side effects\r\n if(Boolean(model)){\r\n this.baseSetup(model);\r\n this.valueKey = model.valueKey;\r\n this.minValue = Boolean(model.minValue) ? model.minValue : \"\";\r\n this.maxValue = Boolean(model.maxValue) ? model.maxValue : \"\";\r\n this.step = Boolean(model.step) ? model.step : \"1\";\r\n this.unit = Boolean(model.unit) ? model.unit : \"\";\r\n this.state = Boolean(model.state) ? model.state : model.service; // use state if the value/number and actionKey is not in the service/object\r\n }\r\n }\r\n\r\n public perform() {\r\n if(this.actionKey && this.valueKey && Boolean(this.actionKey))\r\n this.service[this.actionKey](parseFloat(this.state[this.valueKey]));\r\n this.postAction();\r\n }\r\n \r\n public stepUp() {\r\n if (this.valueKey && this.step) {\r\n this.doStep(parseFloat(this.state[this.valueKey])+parseFloat(this.step));\r\n }\r\n }\r\n public stepDown() {\r\n if (this.valueKey && this.step) {\r\n this.doStep(parseFloat(this.state[this.valueKey])-parseFloat(this.step));\r\n }\r\n }\r\n\r\n protected doStep(newValue: number) {\r\n if (this.actionKey && Boolean(this.actionKey)) {\r\n this.service[this.actionKey](newValue);\r\n }\r\n else {\r\n if (this.valueKey) {\r\n this.state[this.valueKey] = newValue;\r\n }\r\n }\r\n this.postAction();\r\n }\r\n}\r\n","import { autoinject } from 'aurelia-framework';\r\nimport { ContextNumberAction } from './context-number-action';\r\n\r\n@autoinject\r\nexport class ContextRangeAction extends ContextNumberAction {\r\n\r\n}\r\n","import { ContextToggleAction } from './context-toggle-action';\r\n\r\nexport class ContextSelectAction extends ContextToggleAction {\r\n\tpublic valueKey: string | undefined;\r\n\t\r\n\tactivate(model: { textKey: string, actionKey?: string, toggleKey: string, valueKey?: string, service: any, state?: any, postAction?: Function}) { \r\n super.activate(model);\r\n\t\tthis.valueKey = Boolean(model.valueKey) ? model.valueKey : model.textKey; // use value key if a the value is different then the text dispalyed\r\n }\r\n \r\n public perform(){\r\n if(this.actionKey && Boolean(this.actionKey))\r\n this.service[this.actionKey](this.valueKey);\r\n this.postAction();\r\n }\r\n}\r\n","import { ContextAction } from 'app/components/context-menu/actions/context-action-model';\r\nimport { autoinject } from 'aurelia-framework';\r\n\r\n@autoinject\r\nexport class ContextTextAction extends ContextAction {\r\n\r\n\tpublic activate(model: { textKey: string, actionKey?: string, service: any, postAction?: Function}){\r\n this.baseSetup(model);\r\n\r\n\t}\r\n\r\n public perform() {\r\n if (this.actionKey) {\r\n this.service[this.actionKey]();\r\n this.postAction();\r\n }\r\n }\r\n}\r\n//d","import { ContextAction } from 'app/components/context-menu/actions/context-action-model';\r\nexport class ContextToggleAction extends ContextAction {\r\n public toggleKey: string | undefined;\r\n public state: any;\r\n \r\n\tactivate(model: {textKey: string, actionKey?: string, toggleKey: string, service: any, state?: any, postAction?: Function}) {\r\n // Use action key if toggling should have side effects\r\n this.baseSetup(model);\r\n\t\tthis.toggleKey = model.toggleKey;\r\n this.state = Boolean(model.state) ? model.state : model.service; // use state if the toggle value and actionKey is not in the service/object\r\n\t}\r\n\r\n public perform(){\r\n if(this.actionKey && this.toggleKey && Boolean(this.actionKey)) {\r\n this.service[this.actionKey](this.state[this.toggleKey]);\r\n this.postAction(); \r\n }\r\n }\r\n}\r\n","import { createPopper, Instance } from '@popperjs/core';\r\nimport { ContextMenuService } from './../../services/context-menu-service';\r\nimport { autoinject } from \"aurelia-framework\";\r\n\r\n@autoinject\r\nexport class ContextMenu {\r\n\tprivate actionOutsideListener: any;\r\n\tprivate keyPressListener: any;\r\n\tprivate popper: Instance | undefined;\r\n\r\n\tconstructor(public service: ContextMenuService, private element: Element) {\r\n\t}\r\n\r\n\tattached() {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.popper = createPopper(this.service.contextElement, this.element, {\r\n\t\t\t\tplacement: this.service.placement\r\n\t\t\t});\r\n\t\t\tthis.actionOutsideListener = (event: any) => {\r\n\t\t\t\tif (event == undefined) { return; }\r\n\t\t\t\tlet elm:Node = this.element;\r\n\t\t\t\tif (elm == undefined) { return; }\r\n\r\n\t\t\t\tlet xx:string = typeof elm;\r\n\t\t\t\tconsole.log(`actionOutsideListener ${xx}: ${elm}`);\r\n\r\n\t\t\t\tif (!('contains' in elm)) { console.warn(`contains not in ${elm}`, elm); }\r\n\r\n\t\t\t\t// interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable {\r\n\r\n\t\t\t\t// Uncaught TypeError: Node.contains: Argument 1 does not implement interface Node.\r\n\t\t\t\t// part of the issue here seems a race condition:\r\n\t\t\t\t// IF we just log this.element, by the time we inspect it in the console,\r\n\t\t\t\t// it apparently has 'stabilized' to be a proper DOM node.\r\n\t\t\t\t// So, I suspect the problem is, that it is part of the DOM that is mutating, at the time we inspect it?\t\t\t\t \r\n\r\n\t\t\t\t// Det hjælper ikke noget at logge denne, da den når at blive til et rigtigt Element (?), til det tidspunkt hvor vi får en chance for at kigge.\r\n\t\t\t\t// console.log('actionOutsideListener,element:', this.element, 'target:',event);\r\n\r\n\t\t\t\t// We need elm to support the interface Node, to be able to call stuff on it.\r\n\t\t\t\tif (!elm.contains(event.target)) {\r\n\t\t\t\t\tthis.service.close();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tthis.keyPressListener = (event: any) => {\r\n\t\t\t\tif (event.key === 'Escape' || event.which === 27 || event.keyCode === 27) {\r\n\t\t\t\t\tthis.service.close();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\twindow.addEventListener('mouseup', this.actionOutsideListener);\r\n\t\t\twindow.addEventListener('wheel', this.actionOutsideListener);\r\n\t\t\twindow.addEventListener('blur', this.actionOutsideListener);\r\n\t\t\twindow.addEventListener('touchstart', this.actionOutsideListener);\r\n\t\t\twindow.addEventListener(\"keydown\", this.keyPressListener);\r\n\t\t}, 50);\r\n\t}\r\n\r\n\tdetached() {\r\n\t\twindow.removeEventListener('mouseup', this.actionOutsideListener);\r\n\t\twindow.removeEventListener('wheel', this.actionOutsideListener);\r\n\t\twindow.removeEventListener('blur', this.actionOutsideListener);\r\n\t\twindow.removeEventListener('touchstart', this.actionOutsideListener);\r\n\t\twindow.removeEventListener(\"keydown\", this.keyPressListener);\r\n\r\n\t\tthis.popper?.destroy();\r\n\t}\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","ContextAction","actionKey","textKey","baseSetup","model","this","icon","isDisabled","service","_postAction","postAction","Boolean","ContextButtonAction","activate","perform","autoinject","ContextLineAction","ContextNumberAction","data","setModel","valueKey","minValue","maxValue","step","unit","state","parseFloat","stepUp","doStep","stepDown","newValue","ContextRangeAction","ContextSelectAction","ContextToggleAction","super","ContextTextAction","toggleKey","ContextMenu","constructor","element","attached","setTimeout","popper","contextElement","placement","actionOutsideListener","event","undefined","elm","xx","console","log","warn","contains","target","close","keyPressListener","key","which","keyCode","window","addEventListener","detached","removeEventListener","destroy","Element"],"sourceRoot":""}