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UAAYrB,KAAKM,YAAYK,YAAc,IAAWlB,OAAS,IAAM,EAExF,CAEA,aAAA+B,CAAcC,GACb,IAAKA,EAAEC,aAAc,CACpB,IAAIC,EAAI3B,KAAKM,YACb,GAAIqB,KAAOA,EAAEjB,KAAKkB,OAAS,GAAM,OAAO5B,KAAK6B,KAAK,uBAAuBJ,GACzEA,EAAEK,OAAS9B,KAAKM,W,CAEjB,OAAO,CACR,CAEA,IAAAuB,CAAKE,EAAaN,GAGjB,OAFAO,MAAMD,GACNN,EAAEC,cAAe,GACV,CACR,GA/DYzC,E,mUAAiB,EAD7B,EAAAgD,W,kIAcmB,EAAAC,iBACC,IACC,OAfTjD,E,mJCNN,IAAMkD,EAAN,MAGN,WAAAjD,CAAsBC,GAAA,KAAAA,OAAAA,EAFtB,KAAAiD,aAAoC,IAIpC,CAEA,MAAAC,GACCrC,KAAKb,OAAOkD,QACb,CAEA,EAAAC,GACCC,QAAQC,IAAI,qCACZxC,KAAKb,OAAOmD,KACZC,QAAQC,IAAI,mCACb,CAEA,UAAAC,CAAWC,G,QACVH,QAAQC,IAAI,wBAAyBE,GACjCA,EAAOhB,eAEXa,QAAQC,IAAI,oBAAoBE,EAAQ,MAAwB,QAAjB,EAAA1C,KAAKoC,oBAAY,eAAE1B,MAClEgC,EAAOZ,OAA0B,QAAjB,EAAA9B,KAAKoC,oBAAY,eAAE1B,KACpC,GAvBYyB,E,mUAAY,EADxB,EAAAF,W,kIAI8B,EAAAC,oBAHlBC,E","sources":["webpack://client-app/./src/app/components/modals/manual-entry-editor/manual-entry-editor.scss","webpack://client-app/./src/app/components/modals/new-value-list/new-value-list.scss","webpack://client-app/./src/app/components/modals/manual-entry-editor/manual-entry-editor.html","webpack://client-app/./src/app/components/modals/new-value-list/new-value-list.html","webpack://client-app/./src/app/components/modals/manual-entry-editor/manual-entry-editor.ts","webpack://client-app/./src/app/components/modals/new-value-list/new-value-list.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, `.manual-entry-editor ux-dialog{max-width:900px}@media(max-width: 1024px){[data-device-type=tablet] .manual-entry-editor ux-dialog{width:calc(100vw - 60px)}}@media(min-width: 1024px){[data-device-type=tablet] .manual-entry-editor ux-dialog{width:80vw}}.manual-entry-editor ux-dialog-body{flex-direction:column;padding:15px !important}.manual-entry-editor ux-dialog-body .form-group:last-of-type{margin-bottom:0}.manual-entry-editor ux-dialog-body label{display:block;padding-top:10px;padding-bottom:5px}.manual-entry-editor ux-dialog-body .splitpeter{display:flex;gap:15px}.manual-entry-editor ux-dialog-body .splitpeter>*{flex:100%}.manual-entry-editor ux-dialog-body .weighting{display:grid;align-items:center;grid-template-columns:1fr calc(15px*3);gap:calc(15px/1.5)}.manual-entry-editor ux-dialog-body .weighting__value{text-align:right}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/modals/manual-entry-editor/manual-entry-editor.scss\",\"webpack://./src/resources/customized-styles/variables.scss\"],\"names\":[],\"mappings\":\"AAEA,+BACC,eAAA,CAGC,0BADD,yDAEE,wBAAA,CAAA,CAGD,0BALD,yDAME,UAAA,CAAA,CAIF,oCACC,qBAAA,CACA,uBAAA,CAGC,6DACC,eAAA,CAIF,0CACC,aAAA,CACA,gBAAA,CACA,kBAAA,CAGD,gDACC,YAAA,CACA,QCvBM,CDyBN,kDACC,SAAA,CAIF,+CACC,YAAA,CACA,kBAAA,CACA,sCAAA,CACA,kBAAA,CAEA,sDACC,gBAAA\",\"sourcesContent\":[\"@import \\\"src/resources/customized-styles/variables\\\";\\r\\n\\r\\n.manual-entry-editor ux-dialog {\\r\\n\\tmax-width: 900px;\\r\\n\\r\\n\\t[data-device-type=tablet] & {\\r\\n\\t\\t@media (max-width: 1024px) {\\r\\n\\t\\t\\twidth: calc(100vw - 60px);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t@media (min-width: 1024px) {\\r\\n\\t\\t\\twidth: 80vw;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\r\\n\\t&-body {\\r\\n\\t\\tflex-direction: column;\\r\\n\\t\\tpadding: $gutter !important;\\r\\n\\r\\n\\t\\t.form-group {\\r\\n\\t\\t\\t&:last-of-type {\\r\\n\\t\\t\\t\\tmargin-bottom: 0;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\tlabel {\\r\\n\\t\\t\\tdisplay: block;\\r\\n\\t\\t\\tpadding-top: 10px;\\r\\n\\t\\t\\tpadding-bottom: 5px;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t.splitpeter {\\r\\n\\t\\t\\tdisplay: flex;\\r\\n\\t\\t\\tgap: $gutter;\\r\\n\\r\\n\\t\\t\\t> * {\\r\\n\\t\\t\\t\\tflex: 100%;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t.weighting {\\r\\n\\t\\t\\tdisplay: grid;\\r\\n\\t\\t\\talign-items: center;\\r\\n\\t\\t\\tgrid-template-columns: 1fr calc(#{$gutter} * 3);\\r\\n\\t\\t\\tgap: calc(#{$gutter} / 1.5);\\r\\n\\r\\n\\t\\t\\t&__value {\\r\\n\\t\\t\\t\\ttext-align: right;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\\r\\n\",\"$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","// 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, `.new-value-list{width:300px}.new-value-list ux-dialog-body{flex-direction:column;padding:15px !important;width:100%}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/components/modals/new-value-list/new-value-list.scss\"],\"names\":[],\"mappings\":\"AAEA,gBACC,WAAA,CAGC,+BACC,qBAAA,CACA,uBAAA,CACA,UAAA\",\"sourcesContent\":[\"@import \\\"src/resources/customized-styles/variables\\\";\\r\\n\\r\\n.new-value-list {\\r\\n\\twidth: 300px;\\r\\n\\r\\n\\tux-dialog {\\r\\n\\t\\t&-body {\\r\\n\\t\\t\\tflex-direction: column;\\r\\n\\t\\t\\tpadding: $gutter !important;\\r\\n\\t\\t\\twidth: 100%;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = \"\\r\\n\";","module.exports = \"\\r\\n\";","import { ManualEntryDto } from 'app/models/manual-entry-dto';\r\nimport { EntryTypes } from './../../../models/manual-entry-dto';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport { AppContextService } from 'app/services/app-context-service';\r\nimport { ApiClient } from 'app/services/api-client';\r\nimport { DisplayUnitTypesOnProject } from 'app/models/parameter-definition-dto';\r\nimport { DialogCloseResult, DialogController } from 'aurelia-dialog';\r\n\r\n//import * as environment from '../../../../../config/environment.json';\r\n\r\n@autoinject\r\nexport class ManualEntryEditor {\r\n\tpublic manualEntry: ManualEntryDto | undefined;\r\n\tpublic unitTypes: DisplayUnitTypesOnProject[] = [];\r\n\tpublic entryTypes: EntryTypes[] = [EntryTypes.Main, EntryTypes.Option, EntryTypes.Regulation];\r\n\r\n\t/* Right now, both devs and production\r\n\t * should experience EntryTypes as disabled,\r\n\t * to prepare for manual-entries release.\r\n\t * Later, we will re-enable it for TEST-env.\r\n\t */\r\n\tpublic entryTypesDisabled: boolean = true; //!(environment.debug || environment.testing);\r\n\r\n\tconstructor(\r\n\t\tprotected dialog: DialogController,\r\n\t\tprivate apiClient: ApiClient,\r\n\t\tprivate appContext: AppContextService\r\n\t) {\r\n\t\tdialog.settings.overlayDismiss = false;\r\n\t\t// bemaerk, vi redigerer ManualEntryDto.quantityPrecise\r\n\t}\r\n\r\n\tasync activate(model: ManualEntryDto) {\r\n\t\tthis.unitTypes = await this.apiClient.projectWToken(this.appContext.projectId).get(\"ParameterDefinitions/GetDisplayUnitTypeEnums\").jsonResult();\r\n\r\n\t\tif (Boolean(model)) { // edit existing.\r\n\t\t\tthis.manualEntry = Object.assign({}, model);\r\n\t\t} else { // create new.\r\n\t\t\tlet firstUnitType = this.unitTypes[0];\r\n\t\t\tthis.manualEntry = {\r\n\t\t\t\tid: \"00000000-0000-0000-0000-000000000000\",\r\n\t\t\t\tname: \"\",\r\n\t\t\t\tentryType: EntryTypes.Main,\r\n\t\t\t\tquantity: 0,\r\n\t\t\t\tquantityPrecise: \"0\",\t\t\t\t\r\n\t\t\t\tquantityRounded: \"0\",\t\t\t\t\r\n\t\t\t\tquantity_UnitType: firstUnitType.unitTypeEnumInt, \r\n\t\t\t\tdisplayUnit_short: firstUnitType.unitShort,\r\n\t\t\t\tdisplayUnit_long: firstUnitType.unitString,\r\n\t\t\t\tweighting: 0,\r\n\t\t\t\tselected: false\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tupdateWeighting() {\r\n\t\tif (this.manualEntry) {\r\n\t\t\tthis.manualEntry.weighting = this.manualEntry.entryType === EntryTypes.Option ? 100 : 0;\r\n\t\t}\r\n\t}\r\n\r\n\tcanDeactivate(r: DialogCloseResult):boolean {\r\n\t\tif (!r.wasCancelled) {\r\n\t\t\tlet m = this.manualEntry;\r\n\t\t\tif (m && !(m.name.length > 0)) { return this.fail('Name cannot be empty',r); }\r\n\t\t\tr.output = this.manualEntry;\r\n\t\t} \r\n\t\treturn true;\r\n\t}\r\n\r\n\tfail(msg: string, r: DialogCloseResult):boolean {\r\n\t\talert(msg); // Alert() er ikke god, fordi den ikke tager keyboard focus.\r\n\t\tr.wasCancelled = true;\r\n\t\treturn false;\r\n\t}\r\n}\r\n","import { ValueListDto } from 'app/models/value-list-dtos';\r\nimport {DialogCloseError, DialogCloseResult, DialogController} from 'aurelia-dialog';\r\nimport { autoinject } from 'aurelia-framework';\r\n\r\n@autoinject\r\nexport class NewValueList {\r\n\tnewValueList: ValueListDto | null = null;\r\n\r\n\tconstructor(protected dialog: DialogController) {\r\n\r\n\t}\r\n\r\n\tcancel() {\r\n\t\tthis.dialog.cancel();\r\n\t}\r\n\r\n\tok() {\r\n\t\tconsole.log('BEFORE ctrl.ok, ok-button+clicked');\r\n\t\tthis.dialog.ok();\r\n\t\tconsole.log('AFTER ctrl.ok, ok-button+clicked');\r\n\t}\r\n\t\r\n\tdeactivate(result: DialogCloseResult | DialogCloseError) {\r\n\t\tconsole.log('welcome to deactivate', result);\r\n\t\tif (result.wasCancelled) { return; }\r\n\r\n\t\tconsole.log('setting output in',result, 'to:', this.newValueList?.name);\r\n\t\tresult.output = this.newValueList?.name;\r\n\t}\r\n}\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","ManualEntryEditor","constructor","dialog","apiClient","appContext","unitTypes","entryTypes","Main","Option","Regulation","entryTypesDisabled","settings","overlayDismiss","activate","model","this","projectWToken","projectId","get","jsonResult","Boolean","manualEntry","Object","assign","firstUnitType","name","entryType","quantity","quantityPrecise","quantityRounded","quantity_UnitType","unitTypeEnumInt","displayUnit_short","unitShort","displayUnit_long","unitString","weighting","selected","updateWeighting","canDeactivate","r","wasCancelled","m","length","fail","output","msg","alert","autoinject","DialogController","NewValueList","newValueList","cancel","ok","console","log","deactivate","result"],"sourceRoot":""}