[{"__symbolic":"module","version":4,"metadata":{"DataTableConfig":{"__symbolic":"interface"},"CuiDataTableComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":20,"character":1},"arguments":[{"selector":"cui-data-table","template":"<p *ngIf=\"config.title\" [class]=\"'h' + (config.titleLevel ? config.titleLevel : 1)\">{{config.title}}</p>\n<div *ngIf=\"config.additionalData\">\n  <p *ngFor=\"let data of config.additionalData()\">\n    <i>{{data.label}}: </i><i>{{data.value}}</i>\n  </p>\n</div>\n\n<table class=\"table table-hover table-bordered table-responsive-sm table-responsive-md\">\n  <thead>\n  <tr>\n    <th *ngFor=\"let property of config.properties\" [width]=\"property.width\">\n      {{property.label}}\n    </th>\n    <th *ngIf=\"config.buttons.length > 0\">&nbsp;</th>\n  </tr>\n  </thead>\n  <tbody>\n    <tr *ngFor=\"let item of FilterList(list); let i = index\"\n        [ngClass]=\"ResolveClasses(i)\">\n      <td *ngFor=\"let property of config.properties\">\n\n        <div *ngIf=\"!property.is_editable\">\n          <cui-data-read-only-cell [property]=\"property\" [model]=\"item\"></cui-data-read-only-cell>\n        </div>\n\n        <div *ngIf=\"property.is_editable\">\n          <cui-data-editable-cell [property]=\"property\"\n                                  [model]=\"item\"\n                                  [value]=\"cuiModelHelper.GetModelValue(item, property.key)\"\n                                  (changedByUser)=\"MarkAsChanged(i)\"\n          >\n          </cui-data-editable-cell>\n        </div>\n      </td>\n      <td *ngIf=\"IsAvailableSave() || config.buttons.length > 0\">\n        <div class=\"btn-group\">\n          <button *ngFor=\"let button of config.buttons\"\n                  [title]=\"button.title\"\n                  [class]=\"button.class + ' ml-1 btn-sm'\"\n                  (click)=\"button.action(item, list)\"\n          >\n          </button>\n          <button\n            *ngIf=\"IsAvailableSave()\"\n            [title]=\"'Сохранить'\"\n            [class]=\"'btn btn-success icon icon-check ml-1 btn-sm'\"\n            (click)=\"SaveModel(item)\"\n          >\n          </button>\n        </div>\n      </td>\n    </tr>\n  </tbody>\n  <tfoot>\n    <tr>\n      <td *ngIf=\"IsAvailableAdd() || IsAvailableComplexUpdate()\" [attr.colspan]=\"config.properties.length + 1\">\n        <div>\n          <div class=\"float-right ml-3\">\n            <button *ngIf=\"IsAvailableComplexUpdate()\"\n                    [title]=\"'Сохранить все'\"\n                    [class]=\"'btn btn-success btn-block'\"\n                    (click)=\"SaveAllModels()\"\n            >\n              Сохранить все\n            </button>\n          </div>\n\n          <div class=\"float-right ml-3\">\n            <button *ngIf=\"IsAvailableAdd()\"\n                    [title]=\"'Добавить'\"\n                    [class]=\"'btn btn-success btn-block'\"\n                    (click)=\"AddItem()\"\n            >\n              Добавить\n            </button>\n          </div>\n        </div>\n      </td>\n    </tr>\n  </tfoot>\n</table>\n\n\n\n\n","styles":["cui-data-table table .form-control {\n  border: none !important;\n  box-shadow: none !important; }\n\ncui-data-table table tr .form-control.is-invalid {\n  background-color: #fdcdcc !important; }\n\ncui-data-table table tr.not-saved-item .form-control {\n  background-color: #74cbea; }\n\ncui-data-table table tr.new-item .form-control {\n  background-color: #e1e7ea; }\n\ncui-data-table table table {\n  border-spacing: 0; }\n\ncui-data-table table .custom-select {\n  height: inherit !important; }\n"]}]}],"members":{"list":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../services/cui/cui-form.helper","name":"CuiFormHelper","line":34,"character":37},{"__symbolic":"reference","module":"../../services/cui/cui.helper","name":"CuiModelHelper","line":35,"character":37},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":36,"character":30}]}],"ngOnChanges":[{"__symbolic":"method"}],"SaveAllModels":[{"__symbolic":"method"}],"SaveModel":[{"__symbolic":"method"}],"AddItem":[{"__symbolic":"method"}],"PushToTable":[{"__symbolic":"method"}],"FilterList":[{"__symbolic":"method"}],"IsAvailableAdd":[{"__symbolic":"method"}],"IsAvailableSave":[{"__symbolic":"method"}],"IsAvailableComplexUpdate":[{"__symbolic":"method"}],"ResolveClasses":[{"__symbolic":"method"}],"MarkAsChanged":[{"__symbolic":"method"}],"CreateAdditionalPropsList":[{"__symbolic":"method"}]}}}}]