ngx-notion
Version:
An Notion page renderer for Angular
20 lines • 5.07 kB
JavaScript
import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../rich-text/rich-text.component";
import * as i2 from "@angular/common";
export class TableComponent {
constructor() {
this.data = [];
}
}
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: TableComponent, selector: "block-table", inputs: { properties: "properties", data: "data" }, ngImport: i0, template: "<table [ngClass]=\"{\n 'row-header': properties?.has_row_header,\n 'column-header': properties?.has_column_header\n}\">\n <tbody>\n <tr *ngFor=\"let row of data; let i = index\">\n <td *ngFor=\"let item of row.table_row?.cells || []\">\n <div class=\"table-cell-text\">\n <rich-text [richText]=\"item\"></rich-text>\n </div>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: ["table{font-size:14px;border-collapse:collapse;border-spacing:0;width:100%}table.column-header tr:first-child,table.row-header tr td:first-child{background:#f7f6f3;font-weight:500}table tr td{color:inherit;fill:inherit;border:1px solid #e9e9e7;position:relative;vertical-align:top;min-width:120px;max-width:240px;min-height:32px}table tr td .table-cell-text{max-width:100%;width:100%;white-space:pre-wrap;word-break:break-word;caret-color:#37352f;padding:7px 9px;background-color:transparent;font-size:14px;line-height:20px}\n"], components: [{ type: i1.RichTextComponent, selector: "rich-text", inputs: ["richText"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TableComponent, decorators: [{
type: Component,
args: [{ selector: 'block-table', template: "<table [ngClass]=\"{\n 'row-header': properties?.has_row_header,\n 'column-header': properties?.has_column_header\n}\">\n <tbody>\n <tr *ngFor=\"let row of data; let i = index\">\n <td *ngFor=\"let item of row.table_row?.cells || []\">\n <div class=\"table-cell-text\">\n <rich-text [richText]=\"item\"></rich-text>\n </div>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: ["table{font-size:14px;border-collapse:collapse;border-spacing:0;width:100%}table.column-header tr:first-child,table.row-header tr td:first-child{background:#f7f6f3;font-weight:500}table tr td{color:inherit;fill:inherit;border:1px solid #e9e9e7;position:relative;vertical-align:top;min-width:120px;max-width:240px;min-height:32px}table tr td .table-cell-text{max-width:100%;width:100%;white-space:pre-wrap;word-break:break-word;caret-color:#37352f;padding:7px 9px;background-color:transparent;font-size:14px;line-height:20px}\n"] }]
}], propDecorators: { properties: [{
type: Input
}], data: [{
type: Input
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFibGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW5vdGlvbi9zcmMvbGliL2NvbXBvbmVudHMvYmxvY2tzL3RhYmxlL3RhYmxlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ub3Rpb24vc3JjL2xpYi9jb21wb25lbnRzL2Jsb2Nrcy90YWJsZS90YWJsZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQzs7OztBQU9qRCxNQUFNLE9BQU8sY0FBYztJQUwzQjtRQVdFLFNBQUksR0FBVSxFQUFFLENBQUM7S0FFbEI7OzJHQVJZLGNBQWM7K0ZBQWQsY0FBYyx1R0NQM0IsOGNBY0E7MkZEUGEsY0FBYztrQkFMMUIsU0FBUzsrQkFDRSxhQUFhOz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