[{"__symbolic":"module","version":4,"metadata":{"StateComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../../../shared/configure-component-base","name":"ConfigureComponentBase","line":19,"character":36},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":14,"character":1},"arguments":[{"selector":"state","styles":["table,th,td{ border: 0; } .state-number{ width: 100%; line-height: 30px; font-size: 14px; color: #333333; .state-tool-tip{ font-size: 12px; color: #999999; margin-left: 10px; } input[type=number]{ width: 80px; height: 30px; } } .stateTable.table-scrollable { height: 180px; border:1px solid #d7dbe5; text-align: center; word-wrap: break-word; width: 100%; background: #F2F3F8; margin-top: 6px; table > thead > tr{ color: #333333; th{ padding: 0; line-height: 30px; border-bottom: 1px solid #d7dbe5; } } .dataTables_scrollBody{ border-bottom: none; height: 150px; overflow-y: scroll; table > tbody > tr { color: #666666; td{ padding: 0; line-height: 29px; border-bottom: 1px solid #d7dbe5; } } table > tbody > tr:nth-child(1){ td{ line-height: 30px; } } max-height: 150px; overflow-y: auto; } } table{ width: 100%; } tr.selected{ background-color: #3695ff; } tr.selected>td{ color:#ffffff!important; border-bottom: 1px solid #3695ff!important; } th.disabled { color: #999; } .editedState{ margin-top: 10px; background: #f2f3f8; border: 0; } .state-radio{ width: 30%; } .font-style{ margin-left: 105px; } .condition-select,.condition-input{ width: 90px; float: left; } .condition-input{ margin-left: 10px; } .noResize { resize: none; } .whole-width{ width: 100%; } textarea{ float: left; width: calc(100% - 105px); height: 150px; line-height: 20px; }"],"template":"<div provide-parent-forms> <div class=\"state-number\"> {{lc(\"StateNumber\")}}： <input #stateCountInput type=\"number\" name=\"StateCount\" class=\"\" [ngModel]=\"stateCount\" [readonly]=\"!stateCountEnabled\" min=\"2\" max=\"255\"> <span class=\"state-tool-tip\">{{lc(\"StateWarning\")}}</span> </div> <div> <div class=\"table-scrollable dataTables_scroll stateTable\"> <div class=\"dataTables_scrollHeadInner\"> <table> <thead> <tr> <th width=\"14%\">{{lc(\"State\")}}</th> <th width=\"29%\" [class.disabled]=\"!useIndicatorLight\">{{lc(\"Condition\")}}</th> <th width=\"29%\">{{lc(\"Label\")}}</th> <th width=\"14%\" [class.disabled]=\"!useIndicatorLight\">{{lc(\"Flicker\")}}</th> <th width=\"14%\" [class.disabled]=\"!useIndicatorLight\">{{lc(\"Frequency\")}}</th> </tr> </thead> </table> </div> <div class=\"dataTables_scrollBody\"> <table> <tbody> <tr *ngFor=\"let state of editedStates\" (click)=\"editedState = state\" [class.selected]=\"editedState&&state.id==editedState.id\"> <td width=\"14%\">{{state.id|stateId:useSwitch:useIndicatorLight}}</td> <td width=\"29%\"> <span *ngIf=\"state.condition\">{{state.condition.operator|stateCondition:useIndicatorLight:indicatorLightType:state.condition.operand}}</span> <span *ngIf=\"!state.condition&&useIndicatorLight\">{{lc(\"Other\")}}</span> </td> <td width=\"29%\" style=\"max-width: 150px;line-height: 20px;\">{{state.text.content}}</td> <td width=\"14%\">{{lc(indicatorLightHelper.getFlickerName(state?.faultFlicker?.flicker))}}</td> <td width=\"14%\" *ngIf=\"state?.faultFlicker?.flicker === flicker.Nothing\">--</td> <td width=\"14%\" *ngIf=\"state?.faultFlicker?.flicker !== flicker.Nothing\">{{state?.faultFlicker?.frequency}}s</td> </tr> </tbody> </table> </div> </div> </div> <div *ngIf=\"editedState\" class=\"editedState fe-modal-content\"> <div class=\"fe-transverse-label clearfix\"> <div class=\"fe-transverse-title\">{{lc(\"State\")}}：</div> <div class=\"fe-transverse-component\">{{editedState.id}}</div> </div> <div class=\"fe-transverse-label  clearfix\" *ngIf=\"useIndicatorLight\"> <div *ngIf=\"isBitIndicatorLight\"> <div class=\"fe-transverse-title\"> {{lc(\"Condition\")}}： </div> <div class=\"fe-transverse-component\"> <label class=\"state-radio\"> <input type=\"radio\" name=\"BitCondition\" [value]=\"true\" [(ngModel)]=\"bitConditionLogic\" /> <span> {{lc('PositiveLogic')}} </span> </label> <label class=\"state-radio\"> <input type=\"radio\" name=\"BitCondition\" [value]=\"false\" [(ngModel)]=\"bitConditionLogic\" /> <span> {{lc('NegativeLogic')}} </span> </label> </div> </div> <div *ngIf=\"!isBitIndicatorLight&&editedState.condition\"> <div class=\"fe-transverse-title\"> {{lc(\"Condition\")}}： </div> <div class=\"fe-transverse-component clearfix\"> <select name=\"ConditionDropDown\" [(ngModel)]=\"editedState.condition.operator\" class=\"condition-select\"> <option *ngFor=\"let condition of conditions\" [ngValue]=\"condition.key\">{{condition.name}}</option> </select> <input type=\"number\" name=\"ConditionOperand\" [(ngModel)]=\"editedState.condition.operand\" class=\"condition-input\" (change)=\"validateConditionOperand()\"> </div> </div> </div> <div class=\"fe-transverse-label textToolBarPadding clearfix\"> <div class=\"fe-transverse-title\"> {{lc(\"Label\")}}: </div> <textarea class=\"noResize\" rows=\"6\" name=\"content\" #textInput maxlength=\"500\" [(ngModel)]=\"editedState.text.content\"> </textarea> <div class=\"fe-transverse-component font-style\"> <font-style [(fontSize)]=\"editedState.text.font.fontSize\" [(fontColor)]=\"editedState.text.font.color\" [(isUnderline)]=\"editedState.text.font.isUnderline\" [(fontStyle)]=\"editedState.text.font.fontStyle\" [(textAlign)]=\"editedState.text.font.textAlign\"></font-style> </div> </div> <div class=\"fe-transverse-label  clearfix\" *ngIf=\"useIndicatorLight&&editedState.faultFlicker\"> <div class=\"fe-half-line\"> <div class=\"fe-transverse-title\"> {{lc(\"Flicker\")}}: </div> <div class=\"fe-transverse-component\"> <select name=\"StateFlicker\" [(ngModel)]=\"editedState.faultFlicker.flicker\"> <option *ngFor=\"let flicker of flickers\" [ngValue]=\"flicker.key\">{{lc(flicker.name)}}</option> </select> </div> </div> <div class=\"fe-half-line\"> <div class=\"fe-transverse-title\"> {{lc(\"Frequency\")}}: </div> <div class=\"fe-transverse-component\"> <input *ngIf=\"editedState.faultFlicker.flicker === flicker.Nothing\" type=\"text\" value=\"--\" [disabled]=\"true\"> <div *ngIf=\"editedState.faultFlicker.flicker !== flicker.Nothing\"> <input type=\"number\" name=\"Frequency\" #Frequency=\"ngModel\" [(ngModel)]=\"editedState.faultFlicker.frequency\" [custom-func-validate]=\"validateFrequency\" required> <div class=\"has-danger\"> <div class=\"form-control-feedback\" *ngIf=\"Frequency.invalid && (Frequency.dirty || Frequency.touched)\"> <span *ngIf=\"Frequency.errors.required || Frequency.errors.nonNegativeNumber\"> {{l('MustBeThan0')}}</span> </div> </div> </div> </div> </div> </div> </div> </div>"}]}],"members":{"useSwitch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":5}}]}],"useIndicatorLight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":5}}]}],"indicatorLightType":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":5}}]}],"stateSettings":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":5}}]}],"stateCountInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":35,"character":5},"arguments":["stateCountInput",{"static":true}]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":62,"character":26}]}],"changeStates":[{"__symbolic":"method"}],"getStatusConditionText":[{"__symbolic":"method"}],"validateFrequency":[{"__symbolic":"method"}],"validateConditionOperand":[{"__symbolic":"method"}]}}}}]