@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
88 lines (81 loc) • 11.3 kB
JavaScript
import * as i0 from '@angular/core';
import { Input, Directive, ContentChildren, ViewChild, Component, NgModule } from '@angular/core';
import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common';
import { C8yTranslatePipe, SearchResultEmptyComponent } from '@c8y/ngx-components';
class PreviewBlockDirective {
constructor(templateRef) {
this.templateRef = templateRef;
this.show = true;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PreviewBlockDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: PreviewBlockDirective, isStandalone: true, selector: "[previewBlock]", inputs: { label: ["previewBlock", "label"], show: ["previewBlockIf", "show"] }, ngImport: i0 }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PreviewBlockDirective, decorators: [{
type: Directive,
args: [{ selector: '[previewBlock]' }]
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { label: [{
type: Input,
args: ['previewBlock']
}], show: [{
type: Input,
args: ['previewBlockIf']
}] } });
class PreviewSelectionFrameComponent {
constructor() {
this.showType = false;
}
set _type(type) {
this.type = type;
this.showType = true;
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PreviewSelectionFrameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: PreviewSelectionFrameComponent, isStandalone: true, selector: "c8y-preview-selection-frame", inputs: { header: "header", name: "name", description: "description", _type: ["type", "_type"] }, queries: [{ propertyName: "previewBlocks", predicate: PreviewBlockDirective }], viewQueries: [{ propertyName: "listRef", first: true, predicate: ["list"], descendants: true }], ngImport: i0, template: "<div class=\"card-block p-t-0 flex-no-shrink separator-bottom col-xs-12\">\n <div class=\"d-flex p-b-8 p-t-4 j-c-center\">\n <div>\n <h4 class=\"text-center text-normal\">{{ header | translate }}</h4>\n <p *ngIf=\"name || description\" class=\"text-center p-t-16 p-b-8 text-truncate\">\n <strong *ngIf=\"name\" [title]=\"name\">{{ name }}</strong\n ><br />\n <small *ngIf=\"description\" [title]=\"description\">{{ description }}</small>\n </p>\n <p class=\"text-center\" *ngIf=\"showType\">\n <span class=\"label label-primary\" *ngIf=\"type; else noType\">\n {{ type }}\n </span>\n <ng-template #noType>\n <span class=\"label label-default\">\n {{ 'Undefined' | translate }}\n </span>\n </ng-template>\n </p>\n </div>\n </div>\n</div>\n<div *ngIf=\"previewBlocks?.length\" class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div class=\"card-block\">\n <ng-container *ngFor=\"let block of previewBlocks\">\n <div *ngIf=\"block.show\" class=\"d-flex p-b-8 j-c-center\">\n <div class=\"col-xs-12 col-sm-6\">\n <div class=\"text-truncate\" [title]=\"block.label | translate\">\n <span class=\"legend form-block\">{{ block.label | translate }}</span>\n <ng-container *ngTemplateOutlet=\"block.templateRef\"></ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n<div [style.display]=\"listRef?.nativeElement?.children?.length ? 'contents' : 'none'\">\n <div class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div #list class=\"card-block p-t-0 p-b-0\">\n <ng-content select=\"[list]\"> </ng-content>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: PreviewSelectionFrameComponent, decorators: [{
type: Component,
args: [{ selector: 'c8y-preview-selection-frame', imports: [NgIf, NgFor, NgTemplateOutlet, C8yTranslatePipe], template: "<div class=\"card-block p-t-0 flex-no-shrink separator-bottom col-xs-12\">\n <div class=\"d-flex p-b-8 p-t-4 j-c-center\">\n <div>\n <h4 class=\"text-center text-normal\">{{ header | translate }}</h4>\n <p *ngIf=\"name || description\" class=\"text-center p-t-16 p-b-8 text-truncate\">\n <strong *ngIf=\"name\" [title]=\"name\">{{ name }}</strong\n ><br />\n <small *ngIf=\"description\" [title]=\"description\">{{ description }}</small>\n </p>\n <p class=\"text-center\" *ngIf=\"showType\">\n <span class=\"label label-primary\" *ngIf=\"type; else noType\">\n {{ type }}\n </span>\n <ng-template #noType>\n <span class=\"label label-default\">\n {{ 'Undefined' | translate }}\n </span>\n </ng-template>\n </p>\n </div>\n </div>\n</div>\n<div *ngIf=\"previewBlocks?.length\" class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div class=\"card-block\">\n <ng-container *ngFor=\"let block of previewBlocks\">\n <div *ngIf=\"block.show\" class=\"d-flex p-b-8 j-c-center\">\n <div class=\"col-xs-12 col-sm-6\">\n <div class=\"text-truncate\" [title]=\"block.label | translate\">\n <span class=\"legend form-block\">{{ block.label | translate }}</span>\n <ng-container *ngTemplateOutlet=\"block.templateRef\"></ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n<div [style.display]=\"listRef?.nativeElement?.children?.length ? 'contents' : 'none'\">\n <div class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div #list class=\"card-block p-t-0 p-b-0\">\n <ng-content select=\"[list]\"> </ng-content>\n </div>\n </div>\n </div>\n</div>\n" }]
}], propDecorators: { header: [{
type: Input
}], name: [{
type: Input
}], description: [{
type: Input
}], _type: [{
type: Input,
args: ['type']
}], listRef: [{
type: ViewChild,
args: ['list']
}], previewBlocks: [{
type: ContentChildren,
args: [PreviewBlockDirective]
}] } });
class SelectStepFrameComponent {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SelectStepFrameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: SelectStepFrameComponent, isStandalone: true, selector: "c8y-select-step-frame", inputs: { header: "header", noResults: "noResults" }, ngImport: i0, template: "<div class=\"card-block overflow-visible flex-no-shrink col-xs-12 p-b-0 p-t-4 separator-bottom\">\n <div class=\"d-flex j-c-center m-b-24\">\n <div class=\"col-xs-12 col-sm-8\">\n <h4 class=\"text-normal text-center m-b-16\">\n {{ header | translate }}\n </h4>\n <ng-content select=\"[filters]\"></ng-content>\n </div>\n </div>\n <ng-content select=\"[header]\"></ng-content>\n</div>\n<c8y-search-result-empty *ngIf=\"noResults\"> </c8y-search-result-empty>\n<div class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div class=\"card-block p-t-0 p-b-0\">\n <ng-content select=\"[list]\"></ng-content>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SearchResultEmptyComponent, selector: "c8y-search-result-empty", inputs: ["message"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SelectStepFrameComponent, decorators: [{
type: Component,
args: [{ selector: 'c8y-select-step-frame', imports: [NgIf, SearchResultEmptyComponent, C8yTranslatePipe], template: "<div class=\"card-block overflow-visible flex-no-shrink col-xs-12 p-b-0 p-t-4 separator-bottom\">\n <div class=\"d-flex j-c-center m-b-24\">\n <div class=\"col-xs-12 col-sm-8\">\n <h4 class=\"text-normal text-center m-b-16\">\n {{ header | translate }}\n </h4>\n <ng-content select=\"[filters]\"></ng-content>\n </div>\n </div>\n <ng-content select=\"[header]\"></ng-content>\n</div>\n<c8y-search-result-empty *ngIf=\"noResults\"> </c8y-search-result-empty>\n<div class=\"col-xs-12 flex-grow no-gutter\">\n <div class=\"card-inner-scroll fit-h\">\n <div class=\"card-block p-t-0 p-b-0\">\n <ng-content select=\"[list]\"></ng-content>\n </div>\n </div>\n</div>\n" }]
}], propDecorators: { header: [{
type: Input
}], noResults: [{
type: Input
}] } });
class StepperFramesModule {
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StepperFramesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: StepperFramesModule, imports: [PreviewSelectionFrameComponent, SelectStepFrameComponent, PreviewBlockDirective], exports: [PreviewSelectionFrameComponent, SelectStepFrameComponent, PreviewBlockDirective] }); }
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StepperFramesModule, imports: [SelectStepFrameComponent] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: StepperFramesModule, decorators: [{
type: NgModule,
args: [{
imports: [PreviewSelectionFrameComponent, SelectStepFrameComponent, PreviewBlockDirective],
exports: [PreviewSelectionFrameComponent, SelectStepFrameComponent, PreviewBlockDirective]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
export { PreviewBlockDirective, PreviewSelectionFrameComponent, SelectStepFrameComponent, StepperFramesModule };
//# sourceMappingURL=c8y-ngx-components-operations-stepper-frames.mjs.map