{"version":3,"sources":["webpack:///./src/modules/project/assets/styleLoadMixin.ts","webpack:///./src/modules/project/components/loads/components/formBlocks/LoadConnection.vue?2fef","webpack:///./src/modules/project/components/loads/components/formBlocks/LoadConnection.vue","webpack:///./src/modules/project/components/loads/components/formBlocks/LoadConnection.vue?9d17","webpack:///./src/modules/project/components/loads/components/formBlocks/LoadConnection.vue?b18f","webpack:///./src/modules/project/components/loads/components/formBlocks/LoadConnection.vue?0766"],"names":["mixins","extend","data","TypeCharge","styleOptions","dense","hideDetails","outlined","percent","appendIcon","fieldFullSize","class","fieldHalfSize","numberType","type","min","styleIcon","color","styleToggleBtn","small","activeClass","style","commonStyle","fieldCol1","fieldCol2","fieldCol3","fieldCol4","fieldCol5","fieldCol6","fieldCol7","fieldCol8","fieldCol9","fieldCol10","fieldCol11","fieldCol12","computed","referentiels","this","$database","globals","translator","$translator","language","global","projectCreation","traductorSelectGenset","modules","project","projectMenu","selectGenSet","methods","format","dateUnix","moment","unix","render","_vm","_c","_self","_setupProxy","attrs","staticClass","model","value","expand","callback","$$v","expression","scopedSlots","_u","key","fn","translatorConnection","load","loadContent","_v","_s","proxy","_l","loadConnections","lc","i","isActiveClass","id","on","$event","choseThisLoad","idLoadConnection","$set","textBtn","staticRenderFns","styleLoadMixin","loadsInteractionsMixin","loadsMixin","components","Tooltip","props","ChargeViewModel","schemaItem","Object","ProjectModel","isValid","connection","modelAsLoadWithLoadConnection","undefined","filter","phase","isSinglePhaseGensetCompatible","ChargeMotorGeneric","numberOfPhases","isMonophase","patron","Lighting","OfficeEquipement","name","description","handlerLoadConnectionChanged","idLoad","_this$modelAsLoadWith","watch","_this$modelAsLoadWith2","currentLoadConnectionFound","find","x","_this$modelAsLoadWith3","_this$loadConnections","firstOrDefault","component"],"mappings":"kHAAA,iDAIeA,wBAASC,OAAO,CAC7BC,OACE,MAAO,CACLC,kBACAC,aAAc,CACZC,OAAO,EACPC,aAAa,EACbC,UAAU,GAEZC,QAAS,CAAEC,WAAY,eACvB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kB,EAA6BpF,KAAK0C,gBAAgB2C,KACtDC,IAAC,IAAAC,EAAA,OAAID,EAAExC,KAAwC,QAAtCyC,EAAIvF,KAAKkE,qCAA6B,IAAAqB,OAAA,EAAlCA,EAAoCrC,oBAEN,IAAAsC,EAA7C,QAAkCrB,GAA9BiB,EACFpF,KAAKkE,8BAA8BhB,iBAAwD,QAAxCsC,EAAGxF,KAAK0C,gBAAgB+C,wBAAgB,IAAAD,OAAA,EAArCA,EAAuC1C,QCrF4X,I,wBCQ/d4C,EAAY,eACd,EACAxE,EACAmC,GACA,EACA,KACA,WACA,MAIa,aAAAqC,E","file":"js/chunk-0768437a.7f83487f.js","sourcesContent":["import moment from 'moment'\r\nimport mixins from 'vue-typed-mixins'\r\nimport TypeCharge from '../components/loads/models/typeCharge'\r\n\r\nexport default mixins().extend({\r\n data() {\r\n return {\r\n TypeCharge,\r\n styleOptions: {\r\n dense: true,\r\n hideDetails: true,\r\n outlined: true\r\n },\r\n percent: { appendIcon: 'mdi-percent' },\r\n fieldFullSize: { class: ' rounded-0 col-12 input--color' },\r\n fieldHalfSize: { class: 'rounded-0 col-6 input--color' },\r\n numberType: { type: 'number', min: 0 },\r\n styleIcon: { color: 'blue', class: 'icon--infos' },\r\n styleToggleBtn: {\r\n small: true,\r\n activeClass: 'activated--toggle--btn',\r\n class: 'mb-1',\r\n style: 'border:1px solid var(--v-gray1-base)'\r\n },\r\n commonStyle: {\r\n dense: true,\r\n hideDetails: true,\r\n outlined: true\r\n },\r\n fieldCol1: {\r\n class: 'rounded-0 col-1 mb-2 input--color'\r\n },\r\n fieldCol2: {\r\n class: 'rounded-0 col-2 mb-2 input--color'\r\n },\r\n fieldCol3: {\r\n class: 'rounded-0 col-3 mb-2 input--color'\r\n },\r\n fieldCol4: {\r\n class: 'rounded-0 col-4 mb-2 input--color'\r\n },\r\n fieldCol5: {\r\n class: 'rounded-0 col-5 mb-2 input--color'\r\n },\r\n fieldCol6: {\r\n class: 'rounded-0 col-6 mb-2 input--color'\r\n },\r\n fieldCol7: {\r\n class: 'rounded-0 col-7 mb-2 input--color'\r\n },\r\n fieldCol8: {\r\n class: 'rounded-0 col-8 mb-2 input--color'\r\n },\r\n fieldCol9: {\r\n class: 'rounded-0 col-9 mb-2 input--color'\r\n },\r\n fieldCol10: {\r\n class: 'rounded-0 col-10 mb-2 input--color'\r\n },\r\n fieldCol11: {\r\n class: 'rounded-0 col-11 mb-2 input--color'\r\n },\r\n fieldCol12: {\r\n class: 'rounded-0 col-12 mb-2 input--color',\r\n style: 'background-color:var(--v-gray4-base)'\r\n }\r\n }\r\n },\r\n computed: {\r\n referentiels(): any {\r\n return this.$database.globals.referentiels\r\n },\r\n translator(): any {\r\n return this.$translator.language.data.global.projectCreation\r\n },\r\n traductorSelectGenset() {\r\n return this.$translator.language.data.modules.project.projectMenu\r\n .selectGenSet\r\n }\r\n },\r\n methods: {\r\n /** Méthode de remplacement de tous les \"_\" d'un 'name' par un espace (seulement visuel) */\r\n format(dateUnix: number): string {\r\n return moment.unix(dateUnix).format('MM/DD/YYYY')\r\n }\r\n }\r\n})\r\n","export * from \"-!../../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadConnection.vue?vue&type=style&index=0&id=74837ff2&prod&scoped=true&lang=css&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('section',{attrs:{\"name\":\"Load Connection\"}},[_c('v-row',{attrs:{\"dense\":\"\",\"no-gutters\":\"\"}},[_c('v-expansion-panels',{staticClass:\"mb-2\",attrs:{\"flat\":\"\",\"tile\":\"\"},model:{value:(_vm.expand),callback:function ($$v) {_vm.expand=$$v},expression:\"expand\"}},[_c('v-expansion-panel',[_c('v-expansion-panel-header',{staticClass:\"white--text px-3\",attrs:{\"color\":\"primary\"},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_c('span',[_c('Tooltip',{attrs:{\"text\":_vm.translatorConnection.load,\"content\":_vm.translatorConnection.loadContent,\"iconColor\":\"white\"}})],1),_vm._v(\" \"+_vm._s(_vm.translatorConnection.load)+\" \"),_c('v-spacer')]},proxy:true},{key:\"actions\",fn:function(){return [_c('v-icon',{attrs:{\"color\":\"white\"}},[_vm._v(\"mdi-arrow-down-drop-circle\")])]},proxy:true}])}),_c('v-expansion-panel-content',{staticClass:\"mt-2\"},[_c('v-row',{attrs:{\"dense\":\"\",\"justify\":\"space-between\"}},_vm._l((_vm.loadConnections),function(lc,i){return _c('v-col',{key:i,attrs:{\"cols\":\"6\"}},[_c('v-btn',{staticClass:\"toggledBtn\",attrs:{\"active-class\":_vm.isActiveClass(lc.id),\"small\":\"\",\"outlined\":\"\",\"block\":\"\",\"tile\":\"\"},on:{\"click\":function($event){return _vm.choseThisLoad(lc.id)}},model:{value:(_vm.model.idLoadConnection),callback:function ($$v) {_vm.$set(_vm.model, \"idLoadConnection\", $$v)},expression:\"model.idLoadConnection\"}},[_vm._v(\" \"+_vm._s(_vm.textBtn(lc))+\" \")])],1)}),1)],1),_c('v-divider')],1)],1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\r\nimport mixins from 'vue-typed-mixins'\r\nimport styleLoadMixin from '@/modules/project/assets/styleLoadMixin'\r\nimport {\r\n ChargeViewModel,\r\n PatronFormulaireModel\r\n} from '../../models/chargePatronModel'\r\nimport TypeCharge from '@/modules/project/components/loads/models/typeCharge'\r\nimport {\r\n ChargeModel,\r\n LoadWithLoadConnection,\r\n ChargeMotorGeneric\r\n} from '../../models/chargeModel'\r\nimport loadsMixin from '../../loadsMixin'\r\nimport loadsInteractionsMixin from '../../loadsInteractionsMixin'\r\nimport ProjectModel from '@/modules/homePage/model/ProjectModel'\r\nimport LoadConnectionModel from '@/domain/globals/referentiels/loadConnection'\r\n\r\nexport default mixins(\r\n styleLoadMixin,\r\n loadsInteractionsMixin,\r\n loadsMixin\r\n).extend({\r\n components: { Tooltip: () => import('../formBlocks/TypeBlocks/Tooltip.vue') },\r\n props: { value: ChargeViewModel, schemaItem: Object, project: ProjectModel },\r\n data() {\r\n return { TypeCharge, expand: 0, isValid: true }\r\n },\r\n computed: {\r\n translatorConnection(): any {\r\n return this.$translator.language.data.modules.project.projectMenu\r\n .connection\r\n },\r\n modelAsLoadWithLoadConnection(): LoadWithLoadConnection | undefined {\r\n return 'idLoadConnection' in this.model\r\n ? (this.model as LoadWithLoadConnection)\r\n : undefined\r\n },\r\n loadConnections(): Array {\r\n return this.$database.globals.referentiels.loadConnections.filter(lc =>\r\n this.project.phase == 1\r\n ? lc.isSinglePhaseGensetCompatible\r\n : this.model instanceof ChargeMotorGeneric\r\n ? (this.model.numberOfPhases == 1) == lc.isMonophase\r\n : true\r\n )\r\n },\r\n patron(): PatronFormulaireModel {\r\n return this.value.patron\r\n },\r\n model(): ChargeModel {\r\n return this.value.model\r\n }\r\n },\r\n methods: {\r\n textBtn(lc: any): string {\r\n return (this.model.type == TypeCharge.Lighting ||\r\n this.model.type == TypeCharge.OfficeEquipement) &&\r\n lc.name == '3_PHASES'\r\n ? 'Evenly distributed'\r\n : lc.description\r\n },\r\n choseThisLoad(id: number) {\r\n if (this.modelAsLoadWithLoadConnection != undefined) {\r\n this.modelAsLoadWithLoadConnection.idLoadConnection = id\r\n this.handlerLoadConnectionChanged(this.modelAsLoadWithLoadConnection)\r\n }\r\n },\r\n isActiveClass(idLoad: number) {\r\n return this.modelAsLoadWithLoadConnection?.idLoadConnection == idLoad\r\n ? 'activated--toggle--btn'\r\n : ''\r\n }\r\n },\r\n watch: {\r\n 'value.model.idLoadConnection'() {\r\n this.isValid =\r\n this.modelAsLoadWithLoadConnection?.idLoadConnection != undefined\r\n },\r\n 'value.model.numberOfPhases'() {\r\n if (this.modelAsLoadWithLoadConnection != undefined) {\r\n const currentLoadConnectionFound = this.loadConnections.find(\r\n x => x.id == this.modelAsLoadWithLoadConnection?.idLoadConnection\r\n )\r\n if (currentLoadConnectionFound == undefined) {\r\n this.modelAsLoadWithLoadConnection.idLoadConnection = this.loadConnections.firstOrDefault()?.id\r\n }\r\n }\r\n }\r\n }\r\n})\r\n","import mod from \"-!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadConnection.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./LoadConnection.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./LoadConnection.vue?vue&type=template&id=74837ff2&scoped=true&\"\nimport script from \"./LoadConnection.vue?vue&type=script&lang=ts&\"\nexport * from \"./LoadConnection.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./LoadConnection.vue?vue&type=style&index=0&id=74837ff2&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"74837ff2\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}