UNPKG

@data-cafe/datagrid

Version:

A very generic datagrid component for data-café applications

1 lines 21.6 kB
{"version":3,"file":"data-cafe-datagrid.mjs","sources":["../../../projects/datagrid/src/lib/constant/clarity.icon.ts","../../../projects/datagrid/src/lib/constant/index.ts","../../../projects/datagrid/src/lib/cell-editable/cell-editable.component.ts","../../../projects/datagrid/src/lib/cell-editable/cell-editable.component.html","../../../projects/datagrid/src/lib/cell-editable/cell-editable.constant.ts","../../../projects/datagrid/src/lib/cell-editable/index.ts","../../../projects/datagrid/src/lib/model/type.enum.ts","../../../projects/datagrid/src/lib/model/ui.internal.ts","../../../projects/datagrid/src/lib/model/index.ts","../../../projects/datagrid/src/lib/datagrid/datagrid.component.ts","../../../projects/datagrid/src/lib/datagrid/datagrid.component.html","../../../projects/datagrid/src/lib/datagrid/index.ts","../../../projects/datagrid/src/lib/io/index.ts","../../../projects/datagrid/src/lib/datagrid.module.ts","../../../projects/datagrid/src/lib/index.ts","../../../projects/datagrid/src/public-api.ts","../../../projects/datagrid/src/data-cafe-datagrid.ts"],"sourcesContent":["/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { checkIcon, timesIcon } from '@cds/core/icon';\r\nimport { prepareIcons } from '@data-cafe/helpers';\r\n\r\nexport const { IconsForTemplate: ICONS, IconsForImport: IMPORT_ICONS } =\r\n prepareIcons({\r\n VALID: checkIcon,\r\n CANCEL: timesIcon,\r\n });\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport * from './clarity.icon';\r\n","/*\n * data·café\n * Copyright (c) 2021-2022 Data Terrae\n * This program is under the terms of the GNU Affero General Public License version 3\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n Renderer2,\n} from '@angular/core';\nimport { FormControl, ValidatorFn } from '@angular/forms';\nimport { UntilDestroy } from '@ngneat/until-destroy';\nimport { ICONS } from '../constant';\n\nexport interface Result<T> {\n previous: T | null,\n current: T | null,\n}\n\n@UntilDestroy()\n@Component({\n selector: 'dt-cell-editable',\n templateUrl: './cell-editable.component.html',\n styleUrls: ['./cell-editable.component.scss']\n})\nexport class CellEditableComponent<T> implements OnInit {\n\n readonly ICON = ICONS;\n\n /**\n * Main item to edit.\n * It could be null, meaning no value.\n * The `undefined` value is not allowed here; please use `null` instead.\n */\n @Input() item: T | null = null;\n /**\n * Fallback label used when item is null or falsy, or the property is missing.\n *\n * This is optional.\n */\n @Input() fallbackLabel?: string;\n /**\n * This list is a range of allowed values.\n * It displays a select element instead of a simple input.\n *\n * This is optional.\n */\n @Input() altValues?: Array<T>;\n /**\n * Converter method.\n *\n * This is optional only if:\n * - the item is a string\n * - the item contains a property `label`, `name` or `title`\n */\n @Input() itemToLabel?: (t: T) => string;\n\n /**\n * Allow edition\n */\n @Input() enable = true;\n\n /**\n * Specify some extra validators\n */\n @Input() validators: Array<ValidatorFn> = [];\n\n /**\n * call on save:\n * - button validate\n * - enter key\n */\n @Output() save: EventEmitter<Result<T>> = new EventEmitter<Result<T>>();\n\n /**\n * Dispatch a event indicating whenever this component is in edition mode.\n */\n @Output() editing$: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n formControl = new FormControl();\n\n constructor(readonly renderer: Renderer2,\n readonly element: ElementRef) {\n }\n\n ngOnInit(): void {\n // Styling parent cell <td>\n const cellElement = this.element.nativeElement.closest('clr-dg-cell');\n this.renderer.addClass(cellElement, 'has-edit');\n }\n\n getLabel(value: T | null): string | undefined {\n if (!value) {\n return undefined;\n } else if (['string', 'number'].includes(typeof value)) {\n return `${value}`;\n } else if (this.itemToLabel) {\n return this.itemToLabel(value);\n } else if ('label' in value) {\n return (value as unknown as { label: string }).label;\n } else if ('name' in value) {\n return (value as unknown as { name: string }).name;\n } else if ('title' in value) {\n return (value as unknown as { title: string }).title;\n } else {\n return '' + value;\n }\n }\n\n onEditableChange(mode: 'view' | 'edit'): void {\n if (mode === 'edit') {\n this.formControl.setValidators(this.validators);\n this.formControl.setValue(this.item);\n }\n this.editing$.emit(mode === 'edit');\n }\n\n trim(value: T | null): T | null {\n if (typeof value === 'string') {\n return value.trim() as unknown as T;\n } else {\n return value;\n }\n }\n\n onEdit() {\n if (this.formControl.valid) {\n this.save.emit({\n previous: this.item ?? null,\n current: this.trim(this.formControl.value) ?? null,\n });\n }\n }\n}\n","<!--\n ~ data·café\n ~ Copyright (c) 2021-2022 Data Terrae\n ~ This program is under the terms of the GNU Affero General Public License version 3\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<editable (modeChange)=\"onEditableChange($event)\"\n (save)=\"onEdit()\"\n [class.can-edit]=\"enable\"\n [class.is-editing]=\"editing$ | async\"\n [enabled]=\"enable\">\n <ng-template viewMode>\n <span [class.missing]=\"!item && fallbackLabel\"\n [innerText]=\"getLabel(item) ?? fallbackLabel ?? ''\"></span>\n </ng-template>\n <ng-template editMode>\n\n <input *ngIf=\"!altValues\"\n [formControl]=\"formControl\"\n clrInput\n editableFocusable editableOnEnter editableOnEscape trim=\"blur\"/>\n\n <select *ngIf=\"altValues\"\n [formControl]=\"formControl\"\n clrSelect\n editableFocusable editableOnEnter editableOnEscape>\n <option [label]=\"fallbackLabel\" [ngValue]=\"null\" class=\"missing\"></option>\n <option *ngFor=\"let alt of altValues\" [label]=\"getLabel(alt)\" [ngValue]=\"alt\"></option>\n </select>\n\n <div class=\"btn-group btn-sm btn-icon\">\n <button class=\"btn btn-success\" editableOnSave>\n <cds-icon [attr.shape]=\"ICON.VALID\"></cds-icon>\n </button>\n <button class=\"btn btn-danger\" editableOnCancel>\n <cds-icon [attr.shape]=\"ICON.CANCEL\"></cds-icon>\n </button>\n </div>\n </ng-template>\n</editable>\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Validators } from '@angular/forms';\r\n\r\nexport const EDITABLE_VALIDATORS = {\r\n NONE: [],\r\n REQUIRED: [Validators.required],\r\n EMAIL: [Validators.required, Validators.email],\r\n};\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport * from './cell-editable.component';\r\nexport * from './cell-editable.constant';\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport enum Type {\r\n TEXT = 'text',\r\n NUMBER = 'number',\r\n}\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\n/**\r\n * Internal variable to command UI rendering.\r\n */\r\nexport interface UI {\r\n loading: boolean;\r\n editable: boolean;\r\n}\r\n\r\n/**\r\n * Generate the inital UI state.\r\n */\r\nexport function initialUI(): UI {\r\n return {\r\n loading: false,\r\n editable: false,\r\n };\r\n}\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport * from './actions.model';\r\nexport * from './columns.model';\r\nexport * from './data.model';\r\nexport * from './items.model';\r\nexport * from './type.enum';\r\nexport * from './ui.internal';\r\n","/*\n * data·café\n * Copyright (c) 2021-2022 Data Terrae\n * This program is under the terms of the GNU Affero General Public License version 3\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ClrLoadingState } from '@clr/angular';\nimport { UntilDestroy } from '@ngneat/until-destroy';\nimport { ActionsInput, ItemsInput, TextsInput } from '../io';\nimport { EditOutput } from '../io/edit.output';\nimport { Column, Data, initialUI, Item, Type, UI } from '../model';\n\n@UntilDestroy()\n@Component({\n selector: 'dt-datagrid',\n templateUrl: './datagrid.component.html',\n styleUrls: ['./datagrid.component.scss'],\n})\nexport class DatagridComponent<I extends Item> {\n readonly NO_ITEMS: Array<I> = [];\n readonly NO_COLS: Array<Column> = [];\n readonly ClrLoadingState = ClrLoadingState;\n\n data?: Data<I>;\n ui: UI = initialUI();\n\n // -- Lifecycle --------------------------------------------------------------\n\n /**\n * Customize all texts in component for i18n purposes.\n */\n @Input() texts?: TextsInput;\n\n /**\n * Define custom action buttons.\n */\n @Input() actions?: ActionsInput;\n\n /**\n * Dispatch everytime an item is updated in the datagrid.\n *\n * @see editable\n */\n @Output() edit = new EventEmitter<EditOutput<I>>();\n\n constructor() {\n }\n\n /**\n * Set the data to be displayed.\n * @param value\n */\n @Input() set items(value: ItemsInput<I> | undefined | null) {\n this.updateUI(value ?? undefined);\n }\n\n /**\n * Transform the grid editable.\n *\n * @param something\n *\n * @see edit\n */\n @Input() set editable(something: unknown) {\n this.ui.editable = something != null && `${something}` !== \"false\";\n }\n\n onEdit(item: I, property: string, modification: any): void {\n this.edit.emit({\n previous: { ...item },\n updated: {\n ...item,\n [property]: modification,\n },\n updatedProperties: [property],\n });\n }\n\n // -- Helper methods ---------------------------------------------------------\n\n private updateUI(items?: Array<I>) {\n if (items?.length) {\n // Generate structure\n const cols: Column[] = Object\n .keys(items[0])\n .map(property => (<Column>{\n property,\n title: property, // TODO: Capitalize first letter\n type: Type.TEXT,\n }));\n\n // Build data\n this.data = {\n items,\n cols,\n };\n\n // Update UI\n this.ui.loading = false;\n\n } else {\n // Clear data\n this.data = undefined;\n\n // Update UI\n this.ui.loading = true;\n }\n }\n}\n","<!--\n ~ data·café\n ~ Copyright (c) 2021-2022 Data Terrae\n ~ This program is under the terms of the GNU Affero General Public License version 3\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<h1 *ngIf=\"texts?.h1\" [innerText]=\"texts!.h1\"></h1>\n<h2 *ngIf=\"texts?.h2\" [innerText]=\"texts!.h2\"></h2>\n<h3 *ngIf=\"texts?.h3\" [innerText]=\"texts!.h3\"></h3>\n<p *ngIf=\"texts?.top\" [innerText]=\"texts!.top\"></p>\n\n<clr-datagrid [clrLoading]=\"ui.loading\">\n\n <!-- Actions -->\n <clr-dg-action-bar *ngIf=\"actions?.length\">\n <div *ngFor=\"let action of actions\" class=\"btn-group\">\n <button (click)=\"action.callback($event)\"\n [clrLoading]=\"action.loading ?? ClrLoadingState.DEFAULT\"\n class=\"btn btn-sm btn-secondary\"\n type=\"button\">\n <cds-icon *ngIf=\"action.icon\" [attr.shape]=\"action.icon\"></cds-icon>\n {{ action.label }}\n </button>\n </div>\n </clr-dg-action-bar>\n\n <!-- Placeholder -->\n <clr-dg-placeholder *ngIf=\"texts?.placeholder\">{{ texts!.placeholder }}</clr-dg-placeholder>\n\n <!-- Columns -->\n <clr-dg-column *ngFor=\"let col of data?.cols ?? NO_COLS\">{{ col.title }}</clr-dg-column>\n\n <!-- Rows -->\n <clr-dg-row *ngFor=\"let item of data?.items ?? NO_ITEMS\" [clrDgItem]=\"item\">\n <clr-dg-cell *ngFor=\"let col of data?.cols ?? NO_COLS\">\n\n <dt-cell-editable (save)=\"onEdit(item, col.property, $event.current)\"\n [enable]=\"ui.editable\"\n [fallbackLabel]=\"col.fallbackLabel ?? texts?.fallbackLabel ?? undefined\"\n [item]=\"item[col.property]\"></dt-cell-editable>\n </clr-dg-cell>\n </clr-dg-row>\n\n <clr-dg-footer *ngIf=\"data && texts?.counter\">\n {{ texts!.counter!(data!.items.length) }}\n </clr-dg-footer>\n</clr-datagrid>\n\n<p *ngIf=\"texts?.bottom\" [innerText]=\"texts!.bottom\"></p>\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport * from './datagrid.component';\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport * from './actions.input';\r\nexport * from './edit.output';\r\nexport * from './items.input';\r\nexport * from './texts.input';\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { ClarityIcons } from '@cds/core/icon';\r\nimport { ClarityModule } from '@clr/angular';\r\nimport { EditableModule } from '@ngneat/edit-in-place';\r\nimport { DatagridComponent } from './datagrid';\r\nimport { CellEditableComponent } from './cell-editable';\r\nimport { IMPORT_ICONS } from './constant';\r\nimport { uniqueness } from '@data-cafe/helpers';\r\n\r\n// Clarity web component\r\nClarityIcons.addIcons(...uniqueness(...IMPORT_ICONS));\r\n\r\n@NgModule({\r\n declarations: [DatagridComponent, CellEditableComponent],\r\n imports: [\r\n // Angular\r\n CommonModule,\r\n BrowserAnimationsModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n\r\n // Third-party\r\n ClarityModule,\r\n EditableModule,\r\n ],\r\n exports: [DatagridComponent],\r\n})\r\nexport class DatagridModule {}\r\n","/*\r\n * data·café\r\n * Copyright (c) 2021-2022 Data Terrae\r\n * This program is under the terms of the GNU Affero General Public License version 3\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport * from './cell-editable';\r\nexport * from './constant';\r\nexport * from './datagrid';\r\nexport * from './io';\r\nexport * from './model';\r\n\r\nexport * from './datagrid.module';\r\n","/*\n * data·café\n * Copyright (c) 2021-2022 Data Terrae\n * This program is under the terms of the GNU Affero General Public License version 3\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\n// Public API Surface of datagrid\nexport {\n DatagridComponent,\n DatagridModule,\n ItemsInput,\n TextsInput,\n EditOutput,\n} from './lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;AAUO,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,GACpE,YAAY,CAAC;IACX,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;CAClB,CAAC;;ACdJ;;;;;;;IC+Ba,qBAAqB,SAArB,qBAAqB;IAwDhC,YAAqB,QAAmB,EACnB,OAAmB;QADnB,aAAQ,GAAR,QAAQ,CAAW;QACnB,YAAO,GAAP,OAAO,CAAY;QAvD/B,SAAI,GAAG,KAAK,CAAC;;;;;;QAOb,SAAI,GAAa,IAAI,CAAC;;;;QA0BtB,WAAM,GAAG,IAAI,CAAC;;;;QAKd,eAAU,GAAuB,EAAE,CAAC;;;;;;QAOnC,SAAI,GAA4B,IAAI,YAAY,EAAa,CAAC;;;;QAK9D,aAAQ,GAA0B,IAAI,YAAY,EAAW,CAAC;QAExE,gBAAW,GAAG,IAAI,WAAW,EAAE,CAAC;KAI/B;IAED,QAAQ;;QAEN,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACtE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;KACjD;IAED,QAAQ,CAAC,KAAe;QACtB,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,SAAS,CAAC;SAClB;aAAM,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QA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