UNPKG

@aujsf/bootstrap-theme

Version:
35 lines 1.92 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { customElement, bindable, computedFrom, inlineView } from 'aurelia-framework'; import { ErrorSchema } from '@aujsf/core'; let AujsfBsErrorCounter = class AujsfBsErrorCounter { constructor() { this.tooltip = 'This item contains errors'; } get hasDeepErrors() { var _a, _b; return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a['es:hasErrors']) || ((_b = this.errors) === null || _b === void 0 ? void 0 : _b['es:hasChildErrors']()) || false; } }; __decorate([ bindable, __metadata("design:type", ErrorSchema) ], AujsfBsErrorCounter.prototype, "errors", void 0); __decorate([ computedFrom('errors'), __metadata("design:type", Boolean), __metadata("design:paramtypes", []) ], AujsfBsErrorCounter.prototype, "hasDeepErrors", null); AujsfBsErrorCounter = __decorate([ customElement('aujsf-bs-error-counter'), inlineView(`<template class="ml-1"><span if.bind="hasDeepErrors" class="badge badge-danger" title.bind="tooltip">!</span></template>`) ], AujsfBsErrorCounter); export { AujsfBsErrorCounter }; //# sourceMappingURL=aujsf-bs-error-counter.js.map