@anglr/grid
Version:
Angular module displaying grid
83 lines • 2.79 kB
JavaScript
import { Component, ChangeDetectionStrategy, ElementRef, signal, inject, computed } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Plugin component for metadata selector, which does not allows selection of metadata
*/
export class NoMetadataSelectorComponent {
constructor() {
//######################### protected fields #########################
/**
* Indication whether gahterer has been initialized
*/
this.gathererInitialized = false;
/**
* Instance of signal for obtaining metadata
*/
this.metadataValue = signal(null).asReadonly();
//######################### public properties - implementation of NoMetadataSelector #########################
/**
* @inheritdoc
*/
this.options = {};
/**
* @inheritdoc
*/
this.pluginElement = inject((ElementRef));
}
/**
* @inheritdoc
*/
get metadata() {
return this.metadataValue;
}
//######################### public methods - implementation of NoMetadataSelector #########################
/**
* @inheritdoc
*/
show() {
}
/**
* @inheritdoc
*/
resetMetadata() {
}
/**
* @inheritdoc
*/
setMetadataGatherer(gatherer) {
if (this.metadataGatherer != gatherer) {
this.gathererInitialized = false;
}
this.metadataGatherer = gatherer;
}
/**
* @inheritdoc
*/
initialize(force) {
if (force || !this.gathererInitialized) {
this.metadataValue = computed(() => this.metadataGatherer?.metadata());
this.gathererInitialized = true;
}
}
/**
* @inheritdoc
*/
initOptions() {
}
/**
* @inheritdoc
*/
invalidateVisuals() {
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NoMetadataSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0", type: NoMetadataSelectorComponent, isStandalone: true, selector: "ng-no-metadata-selector", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NoMetadataSelectorComponent, decorators: [{
type: Component,
args: [{
selector: 'ng-no-metadata-selector',
template: '',
changeDetection: ChangeDetectionStrategy.OnPush
}]
}] });
//# sourceMappingURL=noMetadataSelector.component.js.map