sapenlinea-components 0.3.62 → 0.5.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { model, input, signal, computed, Component, output, HostListener, ViewChildren, forwardRef, effect, ViewChild, booleanAttribute, inject, DestroyRef, EventEmitter, Output, Input as Input$1, Injectable, ElementRef } from '@angular/core';
|
|
2
|
+
import { model, input, signal, computed, Component, output, HostListener, ViewChildren, forwardRef, effect, ViewChild, booleanAttribute, inject, DestroyRef, EventEmitter, Output, Input as Input$1, Injectable, ElementRef, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule, FormGroup, FormControl, Validators } from '@angular/forms';
|
|
7
7
|
import PubSub from 'pubsub-js';
|
|
8
|
+
import { BarChart as BarChart$1, LineChart as LineChart$1, PieChart } from 'echarts/charts';
|
|
9
|
+
import * as echarts from 'echarts/core';
|
|
10
|
+
import { NgxEchartsDirective, provideEchartsCore } from 'ngx-echarts';
|
|
11
|
+
import { GridComponent, TooltipComponent, GraphicComponent, DataZoomComponent } from 'echarts/components';
|
|
12
|
+
import { CanvasRenderer } from 'echarts/renderers';
|
|
8
13
|
|
|
9
14
|
class PaginationComponent {
|
|
10
15
|
// Inputs as Models/Signals
|
|
@@ -191,6 +196,8 @@ class Table {
|
|
|
191
196
|
return `${value}%`;
|
|
192
197
|
case 'date':
|
|
193
198
|
return this.formatDateValue(value);
|
|
199
|
+
case 'datetime':
|
|
200
|
+
return this.formatDateTimeValue(value);
|
|
194
201
|
case 'email':
|
|
195
202
|
return String(value).toLowerCase();
|
|
196
203
|
default:
|
|
@@ -248,7 +255,7 @@ class Table {
|
|
|
248
255
|
year = slashMatch[3];
|
|
249
256
|
}
|
|
250
257
|
else {
|
|
251
|
-
//
|
|
258
|
+
// Fallback: intentar con Date
|
|
252
259
|
const d = new Date(str);
|
|
253
260
|
if (isNaN(d.getTime()))
|
|
254
261
|
return str;
|
|
@@ -262,6 +269,79 @@ class Table {
|
|
|
262
269
|
const yyyy = String(year);
|
|
263
270
|
return `${dd}/${mm}/${yyyy}`;
|
|
264
271
|
}
|
|
272
|
+
formatDateTimeValue(value) {
|
|
273
|
+
if (!value)
|
|
274
|
+
return '';
|
|
275
|
+
const str = String(value).trim();
|
|
276
|
+
// Si ya está exactamente en formato dd/mm/yyyy hh:mm AM/PM → no tocar
|
|
277
|
+
const alreadyFormattedDt = /^\d{2}\/\d{2}\/\d{4} \d{2}:\d{2} (AM|PM)$/i;
|
|
278
|
+
// Si viene exactamente como fecha sin hora → no tocar tampoco
|
|
279
|
+
const alreadyFormattedDate = /^\d{2}\/\d{2}\/\d{4}$/;
|
|
280
|
+
if (alreadyFormattedDt.test(str) || alreadyFormattedDate.test(str)) {
|
|
281
|
+
return str;
|
|
282
|
+
}
|
|
283
|
+
let day;
|
|
284
|
+
let month;
|
|
285
|
+
let year;
|
|
286
|
+
let hours = 0;
|
|
287
|
+
let minutes = 0;
|
|
288
|
+
let hasTime = false;
|
|
289
|
+
// Matches 'YYYY-MM-DD' taking optional ' HH:mm' or 'THH:mm'
|
|
290
|
+
const isoMatch = /^(\d{4})-(\d{1,2})-(\d{1,2})(?:[\sT](\d{1,2}):(\d{1,2})(?::\d{1,2})?(?:\.\d+Z?)?)?$/.exec(str);
|
|
291
|
+
// Matches 'D/M/YYYY' with optional ' HH:mm'
|
|
292
|
+
const slashMatch = /^(\d{1,2})\/(\d{1,2})\/(\d{4})(?:[\s](\d{1,2}):(\d{1,2})(?::\d{1,2})?)?$/.exec(str);
|
|
293
|
+
if (isoMatch) {
|
|
294
|
+
year = isoMatch[1];
|
|
295
|
+
month = isoMatch[2];
|
|
296
|
+
day = isoMatch[3];
|
|
297
|
+
if (isoMatch[4]) {
|
|
298
|
+
hours = parseInt(isoMatch[4], 10);
|
|
299
|
+
minutes = parseInt(isoMatch[5], 10);
|
|
300
|
+
hasTime = true;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
else if (slashMatch) {
|
|
304
|
+
day = slashMatch[1];
|
|
305
|
+
month = slashMatch[2];
|
|
306
|
+
year = slashMatch[3];
|
|
307
|
+
if (slashMatch[4]) {
|
|
308
|
+
hours = parseInt(slashMatch[4], 10);
|
|
309
|
+
minutes = parseInt(slashMatch[5], 10);
|
|
310
|
+
hasTime = true;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
// Fallback: intentar con Date puro
|
|
315
|
+
let d = new Date(value);
|
|
316
|
+
if (isNaN(d.getTime()) && typeof value === 'string') {
|
|
317
|
+
d = new Date(value.replace(' ', 'T'));
|
|
318
|
+
}
|
|
319
|
+
if (isNaN(d.getTime()))
|
|
320
|
+
return str;
|
|
321
|
+
day = d.getDate();
|
|
322
|
+
month = d.getMonth() + 1;
|
|
323
|
+
year = d.getFullYear();
|
|
324
|
+
hours = d.getHours();
|
|
325
|
+
minutes = d.getMinutes();
|
|
326
|
+
// Try to determine if the purely parsed date had any time component. If hours/min are zero,
|
|
327
|
+
// assume it didn't unless proven otherwise, though standard behavior is to just print it.
|
|
328
|
+
// But we will print the time portion anyway to be safe.
|
|
329
|
+
hasTime = true;
|
|
330
|
+
}
|
|
331
|
+
const dd = String(day).padStart(2, '0');
|
|
332
|
+
const mm = String(month).padStart(2, '0');
|
|
333
|
+
const yyyy = String(year);
|
|
334
|
+
if (!hasTime) {
|
|
335
|
+
return `${dd}/${mm}/${yyyy}`;
|
|
336
|
+
}
|
|
337
|
+
let h = Number(hours);
|
|
338
|
+
const m = String(minutes).padStart(2, '0');
|
|
339
|
+
const ampm = h >= 12 ? 'PM' : 'AM';
|
|
340
|
+
h = h % 12;
|
|
341
|
+
h = h ? h : 12; // 0 becomes 12
|
|
342
|
+
const hh = String(h).padStart(2, '0');
|
|
343
|
+
return `${dd}/${mm}/${yyyy} ${hh}:${m} ${ampm}`;
|
|
344
|
+
}
|
|
265
345
|
/**
|
|
266
346
|
* Devuelve las acciones para una fila.
|
|
267
347
|
* Puede ser que `actions` sea un arreglo (se muestra tal cual) o una función
|
|
@@ -3591,11 +3671,11 @@ class TitleFilters {
|
|
|
3591
3671
|
this.clickButtonBack.emit();
|
|
3592
3672
|
}
|
|
3593
3673
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TitleFilters, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3594
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TitleFilters, isStandalone: true, selector: "lib-title-filters", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, filtersConfig: { classPropertyName: "filtersConfig", publicName: "filtersConfig", isSignal: true, isRequired: false, transformFunction: null }, buttonMode: { classPropertyName: "buttonMode", publicName: "buttonMode", isSignal: true, isRequired: false, transformFunction: null }, clickButtonIcon: { classPropertyName: "clickButtonIcon", publicName: "clickButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, clickButtonLabel: { classPropertyName: "clickButtonLabel", publicName: "clickButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, alwaysShowFilters: { classPropertyName: "alwaysShowFilters", publicName: "alwaysShowFilters", isSignal: true, isRequired: false, transformFunction: null }, showSecondaryButton: { classPropertyName: "showSecondaryButton", publicName: "showSecondaryButton", isSignal: true, isRequired: false, transformFunction: null }, secondaryButtonIcon: { classPropertyName: "secondaryButtonIcon", publicName: "secondaryButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, secondaryButtonLabel: { classPropertyName: "secondaryButtonLabel", publicName: "secondaryButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, showButtonBack: { classPropertyName: "showButtonBack", publicName: "showButtonBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filtersChange: "filtersChange", applyFilters: "applyFilters", clearFilters: "clearFilters", filterButtonClicked: "filterButtonClicked", secondaryButtonClicked: "secondaryButtonClicked", clickButtonBack: "clickButtonBack" }, viewQueries: [{ propertyName: "filtersContainer", first: true, predicate: ["filtersContainer"], descendants: true, read: ElementRef }, { propertyName: "submitBtn", first: true, predicate: ["submitBtn"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"header-container-table\">\n <div class=\"filters-dashboard-table\">\n <div class=\"left-title\">\n @if(showButtonBack()) {\n <div class=\"button-back\" (click)=\"clickButton()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-tabler icons-tabler-outline icon-tabler-arrow-left\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M5 12l14 0\" /><path d=\"M5 12l6 6\" /><path d=\"M5 12l6 -6\" /></svg>\n </div>\n }\n <div class=\"title-table\">{{ title() }}</div>\n </div>\n\n @if (buttonMode() === 'toggle') {\n <div class=\"button-small-primary\" (click)=\"toggleFilters()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-filter\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z\" />\n </svg>\n <div class=\"label\">Filtros</div>\n </div>\n }\n @if (buttonMode() === 'action') {\n <div class=\"button-small-primary\" (click)=\"onFilterButtonClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"none\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\"\n d=\"M10.85 16.608v1.684a8.3 8.3 0 0 0 4.433-1.842L14.1 15.258a6.6 6.6 0 0 1-3.25 1.35M3.358 10c0-3.375 2.525-6.175 5.792-6.608V1.708C4.958 2.15 1.692 5.7 1.692 10s3.266 7.85 7.458 8.292v-1.684C5.883 16.175 3.358 13.375 3.358 10m13.267-.833h1.683a8.3 8.3 0 0 0-1.841-4.434l-1.192 1.192a6.56 6.56 0 0 1 1.35 3.242M15.283 3.55a8.3 8.3 0 0 0-4.433-1.842v1.684a6.6 6.6 0 0 1 3.25 1.35zm-.008 10.533 1.192 1.184a8.3 8.3 0 0 0 1.841-4.434h-1.683a6.6 6.6 0 0 1-1.35 3.25\" />\n <path fill=\"#fff\"\n d=\"M13.333 9.25c0-2.075-1.583-3.417-3.333-3.417S6.667 7.175 6.667 9.25c0 1.383 1.108 3.025 3.333 4.917 2.225-1.892 3.333-3.534 3.333-4.917M10 10a.893.893 0 0 1 0-1.783A.893.893 0 0 1 10 10\" />\n </svg>\n <div class=\"label\">Ir al Mapa</div>\n </div>\n }\n @if (buttonMode() === 'click') {\n <lib-button variant=\"primary\" (clicked)=\"onFilterButtonClick()\">\n @if (clickButtonIcon()) {\n <span class=\"btn-icon {{clickButtonIcon()}}\"></span>\n }\n {{ clickButtonLabel() }}\n </lib-button>\n }\n @if (showSecondaryButton()) {\n <lib-button class=\"secondary-action-btn\" variant=\"secondary\" (clicked)=\"secondaryButtonClicked.emit()\">\n @if (secondaryButtonIcon()) {\n <span class=\"btn-icon {{secondaryButtonIcon()}}\"></span>\n }\n {{ secondaryButtonLabel() }}\n </lib-button>\n }\n </div>\n\n @if (filtersVisible) {\n <div class=\"filters-container\" #filtersContainer>\n <div class=\"filters-wrapper\">\n\n @for (config of normalizedFiltersConfig(); track $index) {\n @switch (config.type) {\n @case ('text') {\n <lib-input-text-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('number') {\n <lib-input-number-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('select') {\n <lib-input-select-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('date') {\n <lib-date-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (dateSelected)=\"onDateSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('time') {\n <lib-input-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n }\n }\n\n <div class=\"actions\">\n <lib-button #submitBtn tabindex=\"0\" [size]=\"'compact'\" (click)=\"onApplyFilters()\" (keydown.enter)=\"onApplyFilters()\">\n Aplicar Filtros\n </lib-button>\n\n <lib-button [variant]=\"'outline'\" [size]=\"'compact'\" (click)=\"clearAllFilters()\"> \n Borrar Filtros \n </lib-button>\n </div>\n </div>\n </div>\n }\n</div>", styles: [".header-container-table{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex:1;width:100%;position:relative;z-index:0}.filters-dashboard-table{display:flex;flex-direction:row;gap:24px;align-items:center;justify-content:flex-start;flex-shrink:0;width:100%;position:relative}.left-title{display:flex;flex-direction:row;gap:8px}.button-back{display:flex;align-items:center;justify-content:center;cursor:pointer}.button-back svg{width:28px;height:28px;color:#171c1f}.title-table{color:var(--schemes-on-surface, #171c1f);font-family:var(--headline-large-font, \"Roboto-SemiBold\", sans-serif);font-size:32px;line-height:40px;font-weight:600;position:relative}.filters-container{display:flex;flex-direction:row;gap:24px;margin-top:12px;position:relative;flex-wrap:wrap}.filters-wrapper{display:flex;position:relative;align-items:center;margin-top:4px;z-index:99;flex-wrap:wrap;gap:10px}.actions{display:flex;gap:10px}.button-text{display:flex;background-color:transparent;color:#61661f;padding:0 12px;font-size:1.3rem;font-weight:500;border:1px solid #61661F;border-radius:20px;cursor:pointer;justify-content:center;align-items:center;position:relative;flex-shrink:0}.button-text:hover{background-color:#d8eb2ca7;border:1px solid #d8eb2ca7}.button-small-primary{background-color:var(--primary, #596300);padding:10px 16px;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center;flex-shrink:0;position:relative;border:none;border-radius:99px;cursor:pointer}.button-small-primary:hover{background-color:var(--on-secondary-container, #61661F)}.button-small-primary:active{background-color:#737928}.secondary-action-btn{margin-left:auto}.btn-icon{flex-shrink:0;width:20px;height:20px;background-color:currentColor;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-size:contain;mask-repeat:no-repeat;mask-position:center;display:inline-block}.icon-download{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-upload{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-export{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>')}.button-small-primary .label{color:var(--schemes-on-primary, #ffffff);text-align:left;font-family:var( --theme-label-large-font-family, \"Roboto-Medium\", sans-serif );font-size:var(--theme-label-large-font-size, 1.4rem);line-height:var(--theme-label-large-line-height, 20px);letter-spacing:var(--theme-label-large-letter-spacing, .1px);font-weight:var(--theme-label-large-font-weight, 500);position:relative;display:flex;align-items:center;justify-content:flex-start}\n"], dependencies: [{ kind: "component", type: InputNumberFilter, selector: "lib-input-number-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: InputTextFilter, selector: "lib-input-text-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: InputSelectFilter, selector: "lib-input-select-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: DateTimeFilter, selector: "lib-date-time-filter", inputs: ["filters", "clearTrigger"], outputs: ["dateSelected", "dateChange", "enterPressed"] }, { kind: "component", type: InputTimeFilter, selector: "lib-input-time-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: Button, selector: "lib-button", inputs: ["variant", "type", "disabled", "fullWidth", "size"], outputs: ["clicked"] }] });
|
|
3674
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TitleFilters, isStandalone: true, selector: "lib-title-filters", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, filtersConfig: { classPropertyName: "filtersConfig", publicName: "filtersConfig", isSignal: true, isRequired: false, transformFunction: null }, buttonMode: { classPropertyName: "buttonMode", publicName: "buttonMode", isSignal: true, isRequired: false, transformFunction: null }, clickButtonIcon: { classPropertyName: "clickButtonIcon", publicName: "clickButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, clickButtonLabel: { classPropertyName: "clickButtonLabel", publicName: "clickButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, alwaysShowFilters: { classPropertyName: "alwaysShowFilters", publicName: "alwaysShowFilters", isSignal: true, isRequired: false, transformFunction: null }, showSecondaryButton: { classPropertyName: "showSecondaryButton", publicName: "showSecondaryButton", isSignal: true, isRequired: false, transformFunction: null }, secondaryButtonIcon: { classPropertyName: "secondaryButtonIcon", publicName: "secondaryButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, secondaryButtonLabel: { classPropertyName: "secondaryButtonLabel", publicName: "secondaryButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, showButtonBack: { classPropertyName: "showButtonBack", publicName: "showButtonBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filtersChange: "filtersChange", applyFilters: "applyFilters", clearFilters: "clearFilters", filterButtonClicked: "filterButtonClicked", secondaryButtonClicked: "secondaryButtonClicked", clickButtonBack: "clickButtonBack" }, viewQueries: [{ propertyName: "filtersContainer", first: true, predicate: ["filtersContainer"], descendants: true, read: ElementRef }, { propertyName: "submitBtn", first: true, predicate: ["submitBtn"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"header-container-table\">\n <div class=\"filters-dashboard-table\">\n <div class=\"left-title\">\n @if(showButtonBack()) {\n <div class=\"button-back\" (click)=\"clickButton()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-tabler icons-tabler-outline icon-tabler-arrow-left\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M5 12l14 0\" /><path d=\"M5 12l6 6\" /><path d=\"M5 12l6 -6\" /></svg>\n </div>\n }\n <div class=\"title-table\">{{ title() }}</div>\n </div>\n\n @if (buttonMode() === 'toggle') {\n <div class=\"button-small-primary\" (click)=\"toggleFilters()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-filter\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z\" />\n </svg>\n <div class=\"label\">Filtros</div>\n </div>\n }\n @if (buttonMode() === 'action') {\n <div class=\"button-small-primary\" (click)=\"onFilterButtonClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"none\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\"\n d=\"M10.85 16.608v1.684a8.3 8.3 0 0 0 4.433-1.842L14.1 15.258a6.6 6.6 0 0 1-3.25 1.35M3.358 10c0-3.375 2.525-6.175 5.792-6.608V1.708C4.958 2.15 1.692 5.7 1.692 10s3.266 7.85 7.458 8.292v-1.684C5.883 16.175 3.358 13.375 3.358 10m13.267-.833h1.683a8.3 8.3 0 0 0-1.841-4.434l-1.192 1.192a6.56 6.56 0 0 1 1.35 3.242M15.283 3.55a8.3 8.3 0 0 0-4.433-1.842v1.684a6.6 6.6 0 0 1 3.25 1.35zm-.008 10.533 1.192 1.184a8.3 8.3 0 0 0 1.841-4.434h-1.683a6.6 6.6 0 0 1-1.35 3.25\" />\n <path fill=\"#fff\"\n d=\"M13.333 9.25c0-2.075-1.583-3.417-3.333-3.417S6.667 7.175 6.667 9.25c0 1.383 1.108 3.025 3.333 4.917 2.225-1.892 3.333-3.534 3.333-4.917M10 10a.893.893 0 0 1 0-1.783A.893.893 0 0 1 10 10\" />\n </svg>\n <div class=\"label\">Ir al Mapa</div>\n </div>\n }\n @if (buttonMode() === 'click') {\n <lib-button variant=\"primary\" (clicked)=\"onFilterButtonClick()\">\n @if (clickButtonIcon()) {\n <span class=\"btn-icon {{clickButtonIcon()}}\"></span>\n }\n {{ clickButtonLabel() }}\n </lib-button>\n }\n @if (showSecondaryButton()) {\n <lib-button class=\"secondary-action-btn\" variant=\"secondary\" (clicked)=\"secondaryButtonClicked.emit()\">\n @if (secondaryButtonIcon()) {\n <span class=\"btn-icon {{secondaryButtonIcon()}}\"></span>\n }\n {{ secondaryButtonLabel() }}\n </lib-button>\n }\n </div>\n\n @if (filtersVisible) {\n <div class=\"filters-container\" #filtersContainer>\n <div class=\"filters-wrapper\">\n\n @for (config of normalizedFiltersConfig(); track $index) {\n @switch (config.type) {\n @case ('text') {\n <lib-input-text-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('number') {\n <lib-input-number-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('select') {\n <lib-input-select-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('date') {\n <lib-date-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (dateSelected)=\"onDateSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('time') {\n <lib-input-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n }\n }\n\n <div class=\"actions\">\n <lib-button #submitBtn tabindex=\"0\" [size]=\"'compact'\" (click)=\"onApplyFilters()\" (keydown.enter)=\"onApplyFilters()\">\n Aplicar Filtros\n </lib-button>\n\n <lib-button [variant]=\"'outline'\" [size]=\"'compact'\" (click)=\"clearAllFilters()\"> \n Borrar Filtros \n </lib-button>\n </div>\n </div>\n </div>\n }\n</div>", styles: [".header-container-table{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex:1;width:100%;position:relative;z-index:0}.filters-dashboard-table{display:flex;flex-direction:row;gap:24px;align-items:center;justify-content:flex-start;flex-shrink:0;width:100%;position:relative}.left-title{display:flex;flex-direction:row;gap:8px}.button-back{display:flex;align-items:center;justify-content:center;cursor:pointer}.button-back svg{width:28px;height:28px;color:#171c1f}.title-table{color:var(--schemes-on-surface, #171c1f);font-family:var(--headline-large-font, \"Roboto-SemiBold\", sans-serif);font-size:32px;line-height:40px;font-weight:600;position:relative}.filters-container{display:flex;flex-direction:row;gap:24px;margin-top:12px;position:relative;flex-wrap:wrap}.filters-wrapper{display:flex;position:relative;align-items:center;margin-top:4px;z-index:99;flex-wrap:wrap;gap:10px}.actions{display:flex;gap:10px}.button-text{display:flex;background-color:transparent;color:#61661f;padding:0 12px;font-size:1.3rem;font-weight:500;border:1px solid #61661F;border-radius:20px;cursor:pointer;justify-content:center;align-items:center;position:relative;flex-shrink:0}.button-text:hover{background-color:#d8eb2ca7;border:1px solid #d8eb2ca7}.button-small-primary{background-color:var(--primary, #596300);padding:10px 16px;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center;flex-shrink:0;position:relative;border:none;border-radius:99px;cursor:pointer}.button-small-primary:hover{background-color:var(--on-secondary-container, #61661F)}.button-small-primary:active{background-color:#737928}.icon-tabler-filter{color:var(--schemes-on-primary, #ffffff);width:20px;height:20px}.secondary-action-btn{margin-left:auto}.btn-icon{flex-shrink:0;width:20px;height:20px;background-color:currentColor;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-size:contain;mask-repeat:no-repeat;mask-position:center;display:inline-block}.icon-filter{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-download{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-upload{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-export{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>')}.button-small-primary .label{color:var(--schemes-on-primary, #ffffff);text-align:left;font-family:var( --theme-label-large-font-family, \"Roboto-Medium\", sans-serif );font-size:var(--theme-label-large-font-size, 1.4rem);line-height:var(--theme-label-large-line-height, 20px);letter-spacing:var(--theme-label-large-letter-spacing, .1px);font-weight:var(--theme-label-large-font-weight, 500);position:relative;display:flex;align-items:center;justify-content:flex-start}\n"], dependencies: [{ kind: "component", type: InputNumberFilter, selector: "lib-input-number-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: InputTextFilter, selector: "lib-input-text-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: InputSelectFilter, selector: "lib-input-select-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: DateTimeFilter, selector: "lib-date-time-filter", inputs: ["filters", "clearTrigger"], outputs: ["dateSelected", "dateChange", "enterPressed"] }, { kind: "component", type: InputTimeFilter, selector: "lib-input-time-filter", inputs: ["filters", "clearTrigger"], outputs: ["filterSelected", "valueChange", "enterPressed"] }, { kind: "component", type: Button, selector: "lib-button", inputs: ["variant", "type", "disabled", "fullWidth", "size"], outputs: ["clicked"] }] });
|
|
3595
3675
|
}
|
|
3596
3676
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TitleFilters, decorators: [{
|
|
3597
3677
|
type: Component,
|
|
3598
|
-
args: [{ selector: 'lib-title-filters', imports: [InputNumberFilter, InputTextFilter, InputSelectFilter, DateTimeFilter, InputTimeFilter, Button], template: "<div class=\"header-container-table\">\n <div class=\"filters-dashboard-table\">\n <div class=\"left-title\">\n @if(showButtonBack()) {\n <div class=\"button-back\" (click)=\"clickButton()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-tabler icons-tabler-outline icon-tabler-arrow-left\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M5 12l14 0\" /><path d=\"M5 12l6 6\" /><path d=\"M5 12l6 -6\" /></svg>\n </div>\n }\n <div class=\"title-table\">{{ title() }}</div>\n </div>\n\n @if (buttonMode() === 'toggle') {\n <div class=\"button-small-primary\" (click)=\"toggleFilters()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-filter\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z\" />\n </svg>\n <div class=\"label\">Filtros</div>\n </div>\n }\n @if (buttonMode() === 'action') {\n <div class=\"button-small-primary\" (click)=\"onFilterButtonClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"none\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\"\n d=\"M10.85 16.608v1.684a8.3 8.3 0 0 0 4.433-1.842L14.1 15.258a6.6 6.6 0 0 1-3.25 1.35M3.358 10c0-3.375 2.525-6.175 5.792-6.608V1.708C4.958 2.15 1.692 5.7 1.692 10s3.266 7.85 7.458 8.292v-1.684C5.883 16.175 3.358 13.375 3.358 10m13.267-.833h1.683a8.3 8.3 0 0 0-1.841-4.434l-1.192 1.192a6.56 6.56 0 0 1 1.35 3.242M15.283 3.55a8.3 8.3 0 0 0-4.433-1.842v1.684a6.6 6.6 0 0 1 3.25 1.35zm-.008 10.533 1.192 1.184a8.3 8.3 0 0 0 1.841-4.434h-1.683a6.6 6.6 0 0 1-1.35 3.25\" />\n <path fill=\"#fff\"\n d=\"M13.333 9.25c0-2.075-1.583-3.417-3.333-3.417S6.667 7.175 6.667 9.25c0 1.383 1.108 3.025 3.333 4.917 2.225-1.892 3.333-3.534 3.333-4.917M10 10a.893.893 0 0 1 0-1.783A.893.893 0 0 1 10 10\" />\n </svg>\n <div class=\"label\">Ir al Mapa</div>\n </div>\n }\n @if (buttonMode() === 'click') {\n <lib-button variant=\"primary\" (clicked)=\"onFilterButtonClick()\">\n @if (clickButtonIcon()) {\n <span class=\"btn-icon {{clickButtonIcon()}}\"></span>\n }\n {{ clickButtonLabel() }}\n </lib-button>\n }\n @if (showSecondaryButton()) {\n <lib-button class=\"secondary-action-btn\" variant=\"secondary\" (clicked)=\"secondaryButtonClicked.emit()\">\n @if (secondaryButtonIcon()) {\n <span class=\"btn-icon {{secondaryButtonIcon()}}\"></span>\n }\n {{ secondaryButtonLabel() }}\n </lib-button>\n }\n </div>\n\n @if (filtersVisible) {\n <div class=\"filters-container\" #filtersContainer>\n <div class=\"filters-wrapper\">\n\n @for (config of normalizedFiltersConfig(); track $index) {\n @switch (config.type) {\n @case ('text') {\n <lib-input-text-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('number') {\n <lib-input-number-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('select') {\n <lib-input-select-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('date') {\n <lib-date-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (dateSelected)=\"onDateSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('time') {\n <lib-input-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n }\n }\n\n <div class=\"actions\">\n <lib-button #submitBtn tabindex=\"0\" [size]=\"'compact'\" (click)=\"onApplyFilters()\" (keydown.enter)=\"onApplyFilters()\">\n Aplicar Filtros\n </lib-button>\n\n <lib-button [variant]=\"'outline'\" [size]=\"'compact'\" (click)=\"clearAllFilters()\"> \n Borrar Filtros \n </lib-button>\n </div>\n </div>\n </div>\n }\n</div>", styles: [".header-container-table{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex:1;width:100%;position:relative;z-index:0}.filters-dashboard-table{display:flex;flex-direction:row;gap:24px;align-items:center;justify-content:flex-start;flex-shrink:0;width:100%;position:relative}.left-title{display:flex;flex-direction:row;gap:8px}.button-back{display:flex;align-items:center;justify-content:center;cursor:pointer}.button-back svg{width:28px;height:28px;color:#171c1f}.title-table{color:var(--schemes-on-surface, #171c1f);font-family:var(--headline-large-font, \"Roboto-SemiBold\", sans-serif);font-size:32px;line-height:40px;font-weight:600;position:relative}.filters-container{display:flex;flex-direction:row;gap:24px;margin-top:12px;position:relative;flex-wrap:wrap}.filters-wrapper{display:flex;position:relative;align-items:center;margin-top:4px;z-index:99;flex-wrap:wrap;gap:10px}.actions{display:flex;gap:10px}.button-text{display:flex;background-color:transparent;color:#61661f;padding:0 12px;font-size:1.3rem;font-weight:500;border:1px solid #61661F;border-radius:20px;cursor:pointer;justify-content:center;align-items:center;position:relative;flex-shrink:0}.button-text:hover{background-color:#d8eb2ca7;border:1px solid #d8eb2ca7}.button-small-primary{background-color:var(--primary, #596300);padding:10px 16px;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center;flex-shrink:0;position:relative;border:none;border-radius:99px;cursor:pointer}.button-small-primary:hover{background-color:var(--on-secondary-container, #61661F)}.button-small-primary:active{background-color:#737928}.secondary-action-btn{margin-left:auto}.btn-icon{flex-shrink:0;width:20px;height:20px;background-color:currentColor;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-size:contain;mask-repeat:no-repeat;mask-position:center;display:inline-block}.icon-download{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-upload{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-export{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>')}.button-small-primary .label{color:var(--schemes-on-primary, #ffffff);text-align:left;font-family:var( --theme-label-large-font-family, \"Roboto-Medium\", sans-serif );font-size:var(--theme-label-large-font-size, 1.4rem);line-height:var(--theme-label-large-line-height, 20px);letter-spacing:var(--theme-label-large-letter-spacing, .1px);font-weight:var(--theme-label-large-font-weight, 500);position:relative;display:flex;align-items:center;justify-content:flex-start}\n"] }]
|
|
3678
|
+
args: [{ selector: 'lib-title-filters', imports: [InputNumberFilter, InputTextFilter, InputSelectFilter, DateTimeFilter, InputTimeFilter, Button], template: "<div class=\"header-container-table\">\n <div class=\"filters-dashboard-table\">\n <div class=\"left-title\">\n @if(showButtonBack()) {\n <div class=\"button-back\" (click)=\"clickButton()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-tabler icons-tabler-outline icon-tabler-arrow-left\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M5 12l14 0\" /><path d=\"M5 12l6 6\" /><path d=\"M5 12l6 -6\" /></svg>\n </div>\n }\n <div class=\"title-table\">{{ title() }}</div>\n </div>\n\n @if (buttonMode() === 'toggle') {\n <div class=\"button-small-primary\" (click)=\"toggleFilters()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-filter\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n d=\"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z\" />\n </svg>\n <div class=\"label\">Filtros</div>\n </div>\n }\n @if (buttonMode() === 'action') {\n <div class=\"button-small-primary\" (click)=\"onFilterButtonClick()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" fill=\"none\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\"\n d=\"M10.85 16.608v1.684a8.3 8.3 0 0 0 4.433-1.842L14.1 15.258a6.6 6.6 0 0 1-3.25 1.35M3.358 10c0-3.375 2.525-6.175 5.792-6.608V1.708C4.958 2.15 1.692 5.7 1.692 10s3.266 7.85 7.458 8.292v-1.684C5.883 16.175 3.358 13.375 3.358 10m13.267-.833h1.683a8.3 8.3 0 0 0-1.841-4.434l-1.192 1.192a6.56 6.56 0 0 1 1.35 3.242M15.283 3.55a8.3 8.3 0 0 0-4.433-1.842v1.684a6.6 6.6 0 0 1 3.25 1.35zm-.008 10.533 1.192 1.184a8.3 8.3 0 0 0 1.841-4.434h-1.683a6.6 6.6 0 0 1-1.35 3.25\" />\n <path fill=\"#fff\"\n d=\"M13.333 9.25c0-2.075-1.583-3.417-3.333-3.417S6.667 7.175 6.667 9.25c0 1.383 1.108 3.025 3.333 4.917 2.225-1.892 3.333-3.534 3.333-4.917M10 10a.893.893 0 0 1 0-1.783A.893.893 0 0 1 10 10\" />\n </svg>\n <div class=\"label\">Ir al Mapa</div>\n </div>\n }\n @if (buttonMode() === 'click') {\n <lib-button variant=\"primary\" (clicked)=\"onFilterButtonClick()\">\n @if (clickButtonIcon()) {\n <span class=\"btn-icon {{clickButtonIcon()}}\"></span>\n }\n {{ clickButtonLabel() }}\n </lib-button>\n }\n @if (showSecondaryButton()) {\n <lib-button class=\"secondary-action-btn\" variant=\"secondary\" (clicked)=\"secondaryButtonClicked.emit()\">\n @if (secondaryButtonIcon()) {\n <span class=\"btn-icon {{secondaryButtonIcon()}}\"></span>\n }\n {{ secondaryButtonLabel() }}\n </lib-button>\n }\n </div>\n\n @if (filtersVisible) {\n <div class=\"filters-container\" #filtersContainer>\n <div class=\"filters-wrapper\">\n\n @for (config of normalizedFiltersConfig(); track $index) {\n @switch (config.type) {\n @case ('text') {\n <lib-input-text-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('number') {\n <lib-input-number-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('select') {\n <lib-input-select-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('date') {\n <lib-date-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (dateSelected)=\"onDateSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n @case ('time') {\n <lib-input-time-filter\n [filters]=\"config.filters\"\n [clearTrigger]=\"clearFilterTrigger()\"\n (filterSelected)=\"onFilterSelected($event)\"\n (enterPressed)=\"focusNextFilter()\"\n />\n }\n }\n }\n\n <div class=\"actions\">\n <lib-button #submitBtn tabindex=\"0\" [size]=\"'compact'\" (click)=\"onApplyFilters()\" (keydown.enter)=\"onApplyFilters()\">\n Aplicar Filtros\n </lib-button>\n\n <lib-button [variant]=\"'outline'\" [size]=\"'compact'\" (click)=\"clearAllFilters()\"> \n Borrar Filtros \n </lib-button>\n </div>\n </div>\n </div>\n }\n</div>", styles: [".header-container-table{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex:1;width:100%;position:relative;z-index:0}.filters-dashboard-table{display:flex;flex-direction:row;gap:24px;align-items:center;justify-content:flex-start;flex-shrink:0;width:100%;position:relative}.left-title{display:flex;flex-direction:row;gap:8px}.button-back{display:flex;align-items:center;justify-content:center;cursor:pointer}.button-back svg{width:28px;height:28px;color:#171c1f}.title-table{color:var(--schemes-on-surface, #171c1f);font-family:var(--headline-large-font, \"Roboto-SemiBold\", sans-serif);font-size:32px;line-height:40px;font-weight:600;position:relative}.filters-container{display:flex;flex-direction:row;gap:24px;margin-top:12px;position:relative;flex-wrap:wrap}.filters-wrapper{display:flex;position:relative;align-items:center;margin-top:4px;z-index:99;flex-wrap:wrap;gap:10px}.actions{display:flex;gap:10px}.button-text{display:flex;background-color:transparent;color:#61661f;padding:0 12px;font-size:1.3rem;font-weight:500;border:1px solid #61661F;border-radius:20px;cursor:pointer;justify-content:center;align-items:center;position:relative;flex-shrink:0}.button-text:hover{background-color:#d8eb2ca7;border:1px solid #d8eb2ca7}.button-small-primary{background-color:var(--primary, #596300);padding:10px 16px;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center;flex-shrink:0;position:relative;border:none;border-radius:99px;cursor:pointer}.button-small-primary:hover{background-color:var(--on-secondary-container, #61661F)}.button-small-primary:active{background-color:#737928}.icon-tabler-filter{color:var(--schemes-on-primary, #ffffff);width:20px;height:20px}.secondary-action-btn{margin-left:auto}.btn-icon{flex-shrink:0;width:20px;height:20px;background-color:currentColor;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-size:contain;mask-repeat:no-repeat;mask-position:center;display:inline-block}.icon-filter{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-download{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 11l5 5l5 -5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-upload{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2\" /><path d=\"M7 9l5 -5l5 5\" /><path d=\"M12 4l0 12\" /></svg>')}.icon-export{-webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>');mask-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23000\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5\" /><path d=\"M3 10h18\" /><path d=\"M10 3v18\" /><path d=\"M16 19h6\" /><path d=\"M19 16l3 3l-3 3\" /></svg>')}.button-small-primary .label{color:var(--schemes-on-primary, #ffffff);text-align:left;font-family:var( --theme-label-large-font-family, \"Roboto-Medium\", sans-serif );font-size:var(--theme-label-large-font-size, 1.4rem);line-height:var(--theme-label-large-line-height, 20px);letter-spacing:var(--theme-label-large-letter-spacing, .1px);font-weight:var(--theme-label-large-font-weight, 500);position:relative;display:flex;align-items:center;justify-content:flex-start}\n"] }]
|
|
3599
3679
|
}], propDecorators: { filtersContainer: [{
|
|
3600
3680
|
type: ViewChild,
|
|
3601
3681
|
args: ['filtersContainer', { read: ElementRef }]
|
|
@@ -4069,12 +4149,574 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4069
4149
|
args: [{ selector: 'lib-toast', template: "@if (isShowToast()) {\r\n<div class=\"toast\" [class.show]=\"toastService.isVisible()\">\r\n <div class=\"toast-body\">\r\n <div class=\"toast-header\">\r\n <span class=\"toast-message\">\r\n {{\r\n toastService.currentToast()?.description\r\n }}\r\n </span>\r\n <button class=\"btn-close\" (click)=\"close()\" aria-label=\"Cerrar\">\r\n ×\r\n </button>\r\n </div>\r\n\r\n @if (toastService.currentToast()?.buttonText &&\r\n toastService.currentToast()?.action) {\r\n <div class=\"toast-footer\">\r\n <button\r\n class=\"btn-action\"\r\n (click)=\"executeAction()\"\r\n [attr.aria-label]=\"toastService.currentToast()?.buttonText\"\r\n >\r\n {{ toastService.currentToast()?.buttonText }}\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".toast{position:fixed;bottom:20px;right:20px;min-width:320px;max-width:350px;border-radius:8px;box-shadow:0 4px 20px #0000004d;opacity:0;transform:translateY(100%);transition:all .3s ease;z-index:9999;padding:16px;background-color:#303026;color:#f2f2de;font-size:14px;line-height:1.5}.toast.show{opacity:1;transform:translateY(0)}.toast-body{display:flex;flex-direction:column;gap:12px}.toast-header{display:flex;align-items:center;gap:12px;justify-content:space-between}.toast-message{flex:1}.toast-footer{display:flex;justify-content:flex-end}.btn-action{border:none;border-radius:4px;color:#bfd103;padding:6px 12px;font-size:12px;background-color:transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap}.btn-action:hover{color:#45a049}.btn-close{background:none;border:none;font-size:20px;cursor:pointer;color:#f2f2de;padding:0;width:30px;height:30px;border-radius:25px;transition:all .2s ease;flex-shrink:0}.btn-close:hover{color:#fff;background-color:#ffffff1a}@media (max-width: 480px){.toast{right:10px;left:10px;bottom:10px;min-width:auto;max-width:none}.toast-footer{justify-content:center}}\n"] }]
|
|
4070
4150
|
}] });
|
|
4071
4151
|
|
|
4152
|
+
class OptionCard {
|
|
4153
|
+
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
4154
|
+
description = input('', ...(ngDevMode ? [{ debugName: "description" }] : []));
|
|
4155
|
+
buttonBg = input(...(ngDevMode ? [undefined, { debugName: "buttonBg" }] : []));
|
|
4156
|
+
iconBg = input(...(ngDevMode ? [undefined, { debugName: "iconBg" }] : []));
|
|
4157
|
+
clickAction = output();
|
|
4158
|
+
onClick() {
|
|
4159
|
+
this.clickAction.emit();
|
|
4160
|
+
}
|
|
4161
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OptionCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4162
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: OptionCard, isStandalone: true, selector: "lib-option-card", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, buttonBg: { classPropertyName: "buttonBg", publicName: "buttonBg", isSignal: true, isRequired: false, transformFunction: null }, iconBg: { classPropertyName: "iconBg", publicName: "iconBg", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickAction: "clickAction" }, ngImport: i0, template: "<button\r\n type=\"button\"\r\n class=\"option-btn\"\r\n (click)=\"onClick()\"\r\n [style.--btn-bg]=\"buttonBg()\"\r\n [style.--icon-bg]=\"iconBg()\"\r\n>\r\n <!-- \u00CDcono (proyectado) -->\r\n <div class=\"option-btn-icon\">\r\n <ng-content select=\"[icon]\"></ng-content>\r\n </div>\r\n\r\n <!-- Contenido -->\r\n <div class=\"option-btn-content\">\r\n <div class=\"option-btn-header\">\r\n <h3 class=\"option-btn-title\">\r\n {{ label() }}\r\n </h3>\r\n\r\n <span class=\"option-btn-chevron\">\u203A</span>\r\n </div>\r\n\r\n @if (description()) {\r\n <p class=\"option-btn-description\">\r\n {{ description() }}\r\n </p>\r\n }\r\n </div>\r\n</button>", styles: [".option-btn{display:flex;align-items:flex-start;gap:16px;width:100%;padding:20px;border-radius:12px;border:1.5px solid transparent;background:var(--btn-bg, #e8e8d8);cursor:pointer;text-align:left;transition:all .2s ease;box-shadow:0 1px 3px #00000014}.option-btn:hover{border-color:var(--primary, #596300);box-shadow:0 4px 12px #5963001f;transform:translateY(-2px)}.option-btn-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--icon-bg, #eef4d3);color:var(--icon-color, #596300)}.option-btn-content{flex:1;min-width:0}.option-btn-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.option-btn-title{margin:0;font-size:14px;font-weight:600;color:var(--text, #1f2937)}.option-btn-chevron{font-size:16px;color:var(--text-muted, #6b7280)}.option-btn-description{margin:6px 0 0;font-size:12px;line-height:1.5;color:var(--text-muted, #6b7280);overflow:hidden;display:-webkit-box;line-clamp:2;-webkit-box-orient:vertical}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4163
|
+
}
|
|
4164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: OptionCard, decorators: [{
|
|
4165
|
+
type: Component,
|
|
4166
|
+
args: [{ selector: 'lib-option-card', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\r\n type=\"button\"\r\n class=\"option-btn\"\r\n (click)=\"onClick()\"\r\n [style.--btn-bg]=\"buttonBg()\"\r\n [style.--icon-bg]=\"iconBg()\"\r\n>\r\n <!-- \u00CDcono (proyectado) -->\r\n <div class=\"option-btn-icon\">\r\n <ng-content select=\"[icon]\"></ng-content>\r\n </div>\r\n\r\n <!-- Contenido -->\r\n <div class=\"option-btn-content\">\r\n <div class=\"option-btn-header\">\r\n <h3 class=\"option-btn-title\">\r\n {{ label() }}\r\n </h3>\r\n\r\n <span class=\"option-btn-chevron\">\u203A</span>\r\n </div>\r\n\r\n @if (description()) {\r\n <p class=\"option-btn-description\">\r\n {{ description() }}\r\n </p>\r\n }\r\n </div>\r\n</button>", styles: [".option-btn{display:flex;align-items:flex-start;gap:16px;width:100%;padding:20px;border-radius:12px;border:1.5px solid transparent;background:var(--btn-bg, #e8e8d8);cursor:pointer;text-align:left;transition:all .2s ease;box-shadow:0 1px 3px #00000014}.option-btn:hover{border-color:var(--primary, #596300);box-shadow:0 4px 12px #5963001f;transform:translateY(-2px)}.option-btn-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--icon-bg, #eef4d3);color:var(--icon-color, #596300)}.option-btn-content{flex:1;min-width:0}.option-btn-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.option-btn-title{margin:0;font-size:14px;font-weight:600;color:var(--text, #1f2937)}.option-btn-chevron{font-size:16px;color:var(--text-muted, #6b7280)}.option-btn-description{margin:6px 0 0;font-size:12px;line-height:1.5;color:var(--text-muted, #6b7280);overflow:hidden;display:-webkit-box;line-clamp:2;-webkit-box-orient:vertical}\n"] }]
|
|
4167
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], buttonBg: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonBg", required: false }] }], iconBg: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconBg", required: false }] }], clickAction: [{ type: i0.Output, args: ["clickAction"] }] } });
|
|
4168
|
+
|
|
4169
|
+
echarts.use([
|
|
4170
|
+
BarChart$1,
|
|
4171
|
+
LineChart$1,
|
|
4172
|
+
PieChart,
|
|
4173
|
+
GridComponent,
|
|
4174
|
+
TooltipComponent,
|
|
4175
|
+
CanvasRenderer,
|
|
4176
|
+
GraphicComponent,
|
|
4177
|
+
DataZoomComponent
|
|
4178
|
+
]);
|
|
4179
|
+
const UI_CHART_TOKENS = {
|
|
4180
|
+
fontFamily: 'Inter, sans-serif',
|
|
4181
|
+
text: '#1f2937',
|
|
4182
|
+
muted: '#6b7280',
|
|
4183
|
+
grid: '#e5e7eb',
|
|
4184
|
+
tooltipBg: '#ffffff',
|
|
4185
|
+
tooltipBorder: '#e5e7eb',
|
|
4186
|
+
primary: '#596300',
|
|
4187
|
+
primarySoft: '#eef4d3',
|
|
4188
|
+
secondary: '#61661F',
|
|
4189
|
+
secondarySoft: '#eef4d3',
|
|
4190
|
+
axis: '#8f948d',
|
|
4191
|
+
areaTop: 'rgba(201, 214, 108, 0.50)',
|
|
4192
|
+
areaBottom: 'rgba(201, 214, 108, 0.05)',
|
|
4193
|
+
labelLine: '#7f8572',
|
|
4194
|
+
centerText: '#202020',
|
|
4195
|
+
donutPalette: [
|
|
4196
|
+
'#6b7319',
|
|
4197
|
+
'#d9df88',
|
|
4198
|
+
'#92001f',
|
|
4199
|
+
'#003f55',
|
|
4200
|
+
'#7c7d63',
|
|
4201
|
+
'#c4d600',
|
|
4202
|
+
'#37add1',
|
|
4203
|
+
'#9fc6da',
|
|
4204
|
+
],
|
|
4205
|
+
};
|
|
4206
|
+
class BaseChart {
|
|
4207
|
+
options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
4208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4209
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: BaseChart, isStandalone: true, selector: "lib-base-chart", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, providers: [provideEchartsCore({ echarts })], ngImport: i0, template: "<div echarts class=\"ui-base-chart\" [options]=\"options()\" [autoResize]=\"true\">\r\n</div>", styles: [".ui-base-chart{display:block;width:100%;height:100%;min-height:320px}\n"], dependencies: [{ kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4210
|
+
}
|
|
4211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BaseChart, decorators: [{
|
|
4212
|
+
type: Component,
|
|
4213
|
+
args: [{ selector: 'lib-base-chart', imports: [NgxEchartsDirective], providers: [provideEchartsCore({ echarts })], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div echarts class=\"ui-base-chart\" [options]=\"options()\" [autoResize]=\"true\">\r\n</div>", styles: [".ui-base-chart{display:block;width:100%;height:100%;min-height:320px}\n"] }]
|
|
4214
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }] } });
|
|
4215
|
+
|
|
4216
|
+
function buildBarChartOptions(data) {
|
|
4217
|
+
const showScroll = data.length > 12;
|
|
4218
|
+
const zoomEnd = showScroll ? Math.floor((12 / data.length) * 100) : 100;
|
|
4219
|
+
return {
|
|
4220
|
+
animation: true,
|
|
4221
|
+
grid: {
|
|
4222
|
+
left: 8,
|
|
4223
|
+
right: 8,
|
|
4224
|
+
top: 16,
|
|
4225
|
+
bottom: showScroll ? 46 : 32,
|
|
4226
|
+
containLabel: true,
|
|
4227
|
+
},
|
|
4228
|
+
...(showScroll && {
|
|
4229
|
+
dataZoom: [
|
|
4230
|
+
{
|
|
4231
|
+
type: 'inside',
|
|
4232
|
+
xAxisIndex: [0],
|
|
4233
|
+
start: 0,
|
|
4234
|
+
end: zoomEnd,
|
|
4235
|
+
},
|
|
4236
|
+
{
|
|
4237
|
+
type: 'slider',
|
|
4238
|
+
show: true,
|
|
4239
|
+
xAxisIndex: [0],
|
|
4240
|
+
start: 0,
|
|
4241
|
+
end: zoomEnd,
|
|
4242
|
+
bottom: 10,
|
|
4243
|
+
height: 16,
|
|
4244
|
+
fillerColor: 'rgba(97, 102, 31, 0.2)',
|
|
4245
|
+
borderColor: 'transparent',
|
|
4246
|
+
backgroundColor: 'rgba(97, 102, 31, 0.05)',
|
|
4247
|
+
dataBackground: {
|
|
4248
|
+
lineStyle: { color: UI_CHART_TOKENS.muted, opacity: 0.4 },
|
|
4249
|
+
areaStyle: { color: UI_CHART_TOKENS.muted, opacity: 0.1 }
|
|
4250
|
+
},
|
|
4251
|
+
selectedDataBackground: {
|
|
4252
|
+
lineStyle: { color: UI_CHART_TOKENS.secondary, opacity: 0.8 },
|
|
4253
|
+
areaStyle: { color: UI_CHART_TOKENS.secondary, opacity: 0.3 }
|
|
4254
|
+
},
|
|
4255
|
+
handleIcon: 'path://M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z',
|
|
4256
|
+
handleSize: '120%',
|
|
4257
|
+
handleStyle: {
|
|
4258
|
+
color: '#fff',
|
|
4259
|
+
borderColor: UI_CHART_TOKENS.secondary,
|
|
4260
|
+
borderWidth: 1.5,
|
|
4261
|
+
shadowBlur: 3,
|
|
4262
|
+
shadowColor: 'rgba(97, 102, 31, 0.3)',
|
|
4263
|
+
shadowOffsetX: 1,
|
|
4264
|
+
shadowOffsetY: 1
|
|
4265
|
+
},
|
|
4266
|
+
moveHandleStyle: {
|
|
4267
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4268
|
+
opacity: 0.6
|
|
4269
|
+
},
|
|
4270
|
+
textStyle: {
|
|
4271
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4272
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4273
|
+
fontWeight: 500
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4276
|
+
]
|
|
4277
|
+
}),
|
|
4278
|
+
tooltip: {
|
|
4279
|
+
trigger: 'axis',
|
|
4280
|
+
axisPointer: {
|
|
4281
|
+
type: 'shadow',
|
|
4282
|
+
},
|
|
4283
|
+
backgroundColor: UI_CHART_TOKENS.tooltipBg,
|
|
4284
|
+
borderColor: UI_CHART_TOKENS.tooltipBorder,
|
|
4285
|
+
borderWidth: 1,
|
|
4286
|
+
textStyle: {
|
|
4287
|
+
color: UI_CHART_TOKENS.text,
|
|
4288
|
+
fontSize: 12,
|
|
4289
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4290
|
+
},
|
|
4291
|
+
extraCssText: `
|
|
4292
|
+
border-radius: 12px;
|
|
4293
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.08);
|
|
4294
|
+
padding: 10px 12px;
|
|
4295
|
+
`,
|
|
4296
|
+
},
|
|
4297
|
+
xAxis: {
|
|
4298
|
+
type: 'category',
|
|
4299
|
+
data: data.map(item => item.label),
|
|
4300
|
+
axisLine: {
|
|
4301
|
+
show: true,
|
|
4302
|
+
},
|
|
4303
|
+
axisTick: {
|
|
4304
|
+
show: true,
|
|
4305
|
+
},
|
|
4306
|
+
splitLine: {
|
|
4307
|
+
show: true,
|
|
4308
|
+
lineStyle: {
|
|
4309
|
+
color: UI_CHART_TOKENS.muted,
|
|
4310
|
+
type: 'dashed',
|
|
4311
|
+
width: 1,
|
|
4312
|
+
opacity: 0.1,
|
|
4313
|
+
},
|
|
4314
|
+
},
|
|
4315
|
+
axisLabel: {
|
|
4316
|
+
color: UI_CHART_TOKENS.muted,
|
|
4317
|
+
fontSize: 12,
|
|
4318
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4319
|
+
interval: 0,
|
|
4320
|
+
rotate: data.length > 6 ? 45 : 0,
|
|
4321
|
+
width: 80,
|
|
4322
|
+
overflow: 'truncate',
|
|
4323
|
+
},
|
|
4324
|
+
},
|
|
4325
|
+
yAxis: {
|
|
4326
|
+
type: 'value',
|
|
4327
|
+
axisLine: {
|
|
4328
|
+
show: true,
|
|
4329
|
+
},
|
|
4330
|
+
axisTick: {
|
|
4331
|
+
show: true,
|
|
4332
|
+
},
|
|
4333
|
+
splitLine: {
|
|
4334
|
+
show: true,
|
|
4335
|
+
lineStyle: {
|
|
4336
|
+
color: UI_CHART_TOKENS.muted,
|
|
4337
|
+
type: 'dashed',
|
|
4338
|
+
width: 1,
|
|
4339
|
+
opacity: 0.1,
|
|
4340
|
+
},
|
|
4341
|
+
},
|
|
4342
|
+
axisLabel: {
|
|
4343
|
+
color: UI_CHART_TOKENS.muted,
|
|
4344
|
+
fontSize: 12,
|
|
4345
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4346
|
+
},
|
|
4347
|
+
},
|
|
4348
|
+
series: [
|
|
4349
|
+
{
|
|
4350
|
+
type: 'bar',
|
|
4351
|
+
data: data.map(item => item.value),
|
|
4352
|
+
barWidth: 32,
|
|
4353
|
+
itemStyle: {
|
|
4354
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4355
|
+
},
|
|
4356
|
+
emphasis: {
|
|
4357
|
+
itemStyle: {
|
|
4358
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4359
|
+
},
|
|
4360
|
+
},
|
|
4361
|
+
label: {
|
|
4362
|
+
show: true,
|
|
4363
|
+
position: 'top',
|
|
4364
|
+
color: '#374151',
|
|
4365
|
+
fontSize: 12,
|
|
4366
|
+
},
|
|
4367
|
+
},
|
|
4368
|
+
],
|
|
4369
|
+
};
|
|
4370
|
+
}
|
|
4371
|
+
class BarChart {
|
|
4372
|
+
title = input('Bar Chart', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
4373
|
+
data = input([], ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
4374
|
+
isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
|
|
4375
|
+
toggleExpand = () => this.isExpanded.update(v => !v);
|
|
4376
|
+
options = computed(() => buildBarChartOptions(this.data()), ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
4377
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BarChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4378
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: BarChart, isStandalone: true, selector: "lib-bar-chart", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"bar-chart-container\" [class.expanded]=\"isExpanded()\">\r\n <div class=\"bar-chart-header\">\r\n <h3 class=\"bar-chart-title\">{{ title() }}</h3>\r\n <button class=\"expand-btn\" (click)=\"toggleExpand()\" type=\"button\" [attr.aria-label]=\"isExpanded() ? 'Minimize chart' : 'Maximize chart'\">\r\n @if (isExpanded()) {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-minimize-2\"><polyline points=\"4 14 10 14 10 20\"/><polyline points=\"20 10 14 10 14 4\"/><line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n } @else {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"/><polyline points=\"9 21 3 21 3 15\"/><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n }\r\n </button>\r\n </div>\r\n <lib-base-chart [options]=\"options()\" class=\"chart-wrapper\" />\r\n</div>\r\n@if (isExpanded()) {\r\n <div class=\"overlay\" (click)=\"toggleExpand()\"></div>\r\n}\r\n", styles: [".bar-chart-container{display:flex;flex-direction:column;gap:16px;background-color:#f0f0db;padding:24px 16px 16px;border-radius:20px;position:relative;transition:all .3s ease}.bar-chart-container.expanded{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;height:90vh;z-index:9999;box-shadow:0 25px 50px -12px #00000040;margin:0}.chart-wrapper{flex:1;min-height:300px;display:block}.bar-chart-container.expanded .chart-wrapper{min-height:unset;height:100%}.bar-chart-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.bar-chart-title{font-size:20px;font-weight:600;color:#333;font-family:Inter,sans-serif}.expand-btn{background:transparent;border:none;cursor:pointer;color:#61661f;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.expand-btn:hover{background-color:#61661f1a}.overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999}\n"], dependencies: [{ kind: "component", type: BaseChart, selector: "lib-base-chart", inputs: ["options"] }] });
|
|
4379
|
+
}
|
|
4380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: BarChart, decorators: [{
|
|
4381
|
+
type: Component,
|
|
4382
|
+
args: [{ selector: 'lib-bar-chart', imports: [BaseChart], template: "<div class=\"bar-chart-container\" [class.expanded]=\"isExpanded()\">\r\n <div class=\"bar-chart-header\">\r\n <h3 class=\"bar-chart-title\">{{ title() }}</h3>\r\n <button class=\"expand-btn\" (click)=\"toggleExpand()\" type=\"button\" [attr.aria-label]=\"isExpanded() ? 'Minimize chart' : 'Maximize chart'\">\r\n @if (isExpanded()) {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-minimize-2\"><polyline points=\"4 14 10 14 10 20\"/><polyline points=\"20 10 14 10 14 4\"/><line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n } @else {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"/><polyline points=\"9 21 3 21 3 15\"/><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n }\r\n </button>\r\n </div>\r\n <lib-base-chart [options]=\"options()\" class=\"chart-wrapper\" />\r\n</div>\r\n@if (isExpanded()) {\r\n <div class=\"overlay\" (click)=\"toggleExpand()\"></div>\r\n}\r\n", styles: [".bar-chart-container{display:flex;flex-direction:column;gap:16px;background-color:#f0f0db;padding:24px 16px 16px;border-radius:20px;position:relative;transition:all .3s ease}.bar-chart-container.expanded{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;height:90vh;z-index:9999;box-shadow:0 25px 50px -12px #00000040;margin:0}.chart-wrapper{flex:1;min-height:300px;display:block}.bar-chart-container.expanded .chart-wrapper{min-height:unset;height:100%}.bar-chart-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.bar-chart-title{font-size:20px;font-weight:600;color:#333;font-family:Inter,sans-serif}.expand-btn{background:transparent;border:none;cursor:pointer;color:#61661f;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.expand-btn:hover{background-color:#61661f1a}.overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999}\n"] }]
|
|
4383
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
4384
|
+
|
|
4385
|
+
function buildLineChartOptions(data) {
|
|
4386
|
+
const showScroll = data.length > 12;
|
|
4387
|
+
const zoomEnd = showScroll ? Math.floor((12 / data.length) * 100) : 100;
|
|
4388
|
+
return {
|
|
4389
|
+
animation: true,
|
|
4390
|
+
backgroundColor: 'transparent',
|
|
4391
|
+
grid: {
|
|
4392
|
+
left: 16,
|
|
4393
|
+
right: 16,
|
|
4394
|
+
top: 20,
|
|
4395
|
+
bottom: showScroll ? 46 : 16,
|
|
4396
|
+
containLabel: true,
|
|
4397
|
+
},
|
|
4398
|
+
...(showScroll && {
|
|
4399
|
+
dataZoom: [
|
|
4400
|
+
{
|
|
4401
|
+
type: 'inside',
|
|
4402
|
+
xAxisIndex: [0],
|
|
4403
|
+
start: 0,
|
|
4404
|
+
end: zoomEnd,
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
type: 'slider',
|
|
4408
|
+
show: true,
|
|
4409
|
+
xAxisIndex: [0],
|
|
4410
|
+
start: 0,
|
|
4411
|
+
end: zoomEnd,
|
|
4412
|
+
bottom: 10,
|
|
4413
|
+
height: 16,
|
|
4414
|
+
fillerColor: 'rgba(97, 102, 31, 0.2)',
|
|
4415
|
+
borderColor: 'transparent',
|
|
4416
|
+
backgroundColor: 'rgba(97, 102, 31, 0.05)',
|
|
4417
|
+
dataBackground: {
|
|
4418
|
+
lineStyle: { color: UI_CHART_TOKENS.muted, opacity: 0.4 },
|
|
4419
|
+
areaStyle: { color: UI_CHART_TOKENS.muted, opacity: 0.1 }
|
|
4420
|
+
},
|
|
4421
|
+
selectedDataBackground: {
|
|
4422
|
+
lineStyle: { color: UI_CHART_TOKENS.secondary, opacity: 0.8 },
|
|
4423
|
+
areaStyle: { color: UI_CHART_TOKENS.secondary, opacity: 0.3 }
|
|
4424
|
+
},
|
|
4425
|
+
handleIcon: 'path://M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z',
|
|
4426
|
+
handleSize: '120%',
|
|
4427
|
+
handleStyle: {
|
|
4428
|
+
color: '#fff',
|
|
4429
|
+
borderColor: UI_CHART_TOKENS.secondary,
|
|
4430
|
+
borderWidth: 1.5,
|
|
4431
|
+
shadowBlur: 3,
|
|
4432
|
+
shadowColor: 'rgba(97, 102, 31, 0.3)',
|
|
4433
|
+
shadowOffsetX: 1,
|
|
4434
|
+
shadowOffsetY: 1
|
|
4435
|
+
},
|
|
4436
|
+
moveHandleStyle: {
|
|
4437
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4438
|
+
opacity: 0.6
|
|
4439
|
+
},
|
|
4440
|
+
textStyle: {
|
|
4441
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4442
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4443
|
+
fontWeight: 500
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
]
|
|
4447
|
+
}),
|
|
4448
|
+
tooltip: {
|
|
4449
|
+
trigger: 'axis',
|
|
4450
|
+
backgroundColor: UI_CHART_TOKENS.tooltipBg,
|
|
4451
|
+
borderColor: UI_CHART_TOKENS.tooltipBorder,
|
|
4452
|
+
borderWidth: 1,
|
|
4453
|
+
textStyle: {
|
|
4454
|
+
color: UI_CHART_TOKENS.text,
|
|
4455
|
+
fontSize: 12,
|
|
4456
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4457
|
+
},
|
|
4458
|
+
extraCssText: `
|
|
4459
|
+
border-radius: 10px;
|
|
4460
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.10);
|
|
4461
|
+
padding: 8px 10px;
|
|
4462
|
+
`,
|
|
4463
|
+
axisPointer: {
|
|
4464
|
+
type: 'line',
|
|
4465
|
+
lineStyle: {
|
|
4466
|
+
color: '#bfc4a6',
|
|
4467
|
+
width: 1,
|
|
4468
|
+
type: 'dashed',
|
|
4469
|
+
},
|
|
4470
|
+
},
|
|
4471
|
+
},
|
|
4472
|
+
xAxis: {
|
|
4473
|
+
type: 'category',
|
|
4474
|
+
boundaryGap: false,
|
|
4475
|
+
data: data.map(item => item.label),
|
|
4476
|
+
axisLine: {
|
|
4477
|
+
show: true,
|
|
4478
|
+
lineStyle: {
|
|
4479
|
+
color: UI_CHART_TOKENS.axis,
|
|
4480
|
+
width: 1,
|
|
4481
|
+
},
|
|
4482
|
+
},
|
|
4483
|
+
axisTick: {
|
|
4484
|
+
show: true,
|
|
4485
|
+
},
|
|
4486
|
+
axisLabel: {
|
|
4487
|
+
color: UI_CHART_TOKENS.muted,
|
|
4488
|
+
fontSize: 12,
|
|
4489
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4490
|
+
interval: 0,
|
|
4491
|
+
rotate: data.length > 6 ? 45 : 0,
|
|
4492
|
+
width: 80,
|
|
4493
|
+
overflow: 'truncate',
|
|
4494
|
+
margin: 10,
|
|
4495
|
+
},
|
|
4496
|
+
splitLine: {
|
|
4497
|
+
show: true,
|
|
4498
|
+
lineStyle: {
|
|
4499
|
+
color: UI_CHART_TOKENS.muted,
|
|
4500
|
+
type: 'dotted',
|
|
4501
|
+
width: 1,
|
|
4502
|
+
opacity: 0.1,
|
|
4503
|
+
},
|
|
4504
|
+
},
|
|
4505
|
+
},
|
|
4506
|
+
yAxis: {
|
|
4507
|
+
type: 'value',
|
|
4508
|
+
min: 0,
|
|
4509
|
+
axisLine: {
|
|
4510
|
+
show: true,
|
|
4511
|
+
},
|
|
4512
|
+
axisTick: {
|
|
4513
|
+
show: true,
|
|
4514
|
+
},
|
|
4515
|
+
axisLabel: {
|
|
4516
|
+
color: UI_CHART_TOKENS.muted,
|
|
4517
|
+
fontSize: 12,
|
|
4518
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4519
|
+
margin: 8,
|
|
4520
|
+
},
|
|
4521
|
+
splitLine: {
|
|
4522
|
+
show: true,
|
|
4523
|
+
lineStyle: {
|
|
4524
|
+
color: UI_CHART_TOKENS.muted,
|
|
4525
|
+
type: 'dotted',
|
|
4526
|
+
width: 1,
|
|
4527
|
+
opacity: 0.1,
|
|
4528
|
+
},
|
|
4529
|
+
},
|
|
4530
|
+
},
|
|
4531
|
+
series: [
|
|
4532
|
+
{
|
|
4533
|
+
type: 'line',
|
|
4534
|
+
smooth: true,
|
|
4535
|
+
symbol: 'none',
|
|
4536
|
+
data: data.map(item => item.value),
|
|
4537
|
+
itemStyle: {
|
|
4538
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4539
|
+
},
|
|
4540
|
+
lineStyle: {
|
|
4541
|
+
color: UI_CHART_TOKENS.secondary,
|
|
4542
|
+
width: 2,
|
|
4543
|
+
},
|
|
4544
|
+
areaStyle: {
|
|
4545
|
+
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
4546
|
+
{ offset: 0, color: UI_CHART_TOKENS.areaTop },
|
|
4547
|
+
{ offset: 1, color: UI_CHART_TOKENS.areaBottom },
|
|
4548
|
+
]),
|
|
4549
|
+
},
|
|
4550
|
+
},
|
|
4551
|
+
],
|
|
4552
|
+
};
|
|
4553
|
+
}
|
|
4554
|
+
class LineChart {
|
|
4555
|
+
title = input('Line Chart', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
4556
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
4557
|
+
isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
|
|
4558
|
+
toggleExpand = () => this.isExpanded.update(v => !v);
|
|
4559
|
+
options = computed(() => buildLineChartOptions(this.data()), ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
4560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LineChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: LineChart, isStandalone: true, selector: "lib-line-chart", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"line-chart-container\" [class.expanded]=\"isExpanded()\">\r\n <div class=\"line-chart-header\">\r\n <h3 class=\"line-chart-title\">{{ title() }}</h3>\r\n <button class=\"expand-btn\" (click)=\"toggleExpand()\" type=\"button\" [attr.aria-label]=\"isExpanded() ? 'Minimize chart' : 'Maximize chart'\">\r\n @if (isExpanded()) {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-minimize-2\"><polyline points=\"4 14 10 14 10 20\"/><polyline points=\"20 10 14 10 14 4\"/><line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n } @else {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"/><polyline points=\"9 21 3 21 3 15\"/><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n }\r\n </button>\r\n </div>\r\n <lib-base-chart [options]=\"options()\" class=\"chart-wrapper\" />\r\n</div>\r\n@if (isExpanded()) {\r\n <div class=\"overlay\" (click)=\"toggleExpand()\"></div>\r\n}\r\n", styles: [".line-chart-container{display:flex;flex-direction:column;gap:16px;background-color:#f0f0db;padding:24px 16px 16px;border-radius:20px;position:relative;transition:all .3s ease}.line-chart-container.expanded{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;height:90vh;z-index:9999;box-shadow:0 25px 50px -12px #00000040;margin:0}.chart-wrapper{flex:1;min-height:300px;display:block}.line-chart-container.expanded .chart-wrapper{min-height:unset;height:100%}.line-chart-header{display:flex;justify-content:space-between;align-items:center}.line-chart-title{font-size:20px;font-weight:600;color:#333;font-family:Inter,sans-serif}.expand-btn{background:transparent;border:none;cursor:pointer;color:#61661f;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.expand-btn:hover{background-color:#61661f1a}.overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999}\n"], dependencies: [{ kind: "component", type: BaseChart, selector: "lib-base-chart", inputs: ["options"] }] });
|
|
4562
|
+
}
|
|
4563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LineChart, decorators: [{
|
|
4564
|
+
type: Component,
|
|
4565
|
+
args: [{ selector: 'lib-line-chart', imports: [BaseChart], template: "<div class=\"line-chart-container\" [class.expanded]=\"isExpanded()\">\r\n <div class=\"line-chart-header\">\r\n <h3 class=\"line-chart-title\">{{ title() }}</h3>\r\n <button class=\"expand-btn\" (click)=\"toggleExpand()\" type=\"button\" [attr.aria-label]=\"isExpanded() ? 'Minimize chart' : 'Maximize chart'\">\r\n @if (isExpanded()) {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-minimize-2\"><polyline points=\"4 14 10 14 10 20\"/><polyline points=\"20 10 14 10 14 4\"/><line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n } @else {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"/><polyline points=\"9 21 3 21 3 15\"/><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n }\r\n </button>\r\n </div>\r\n <lib-base-chart [options]=\"options()\" class=\"chart-wrapper\" />\r\n</div>\r\n@if (isExpanded()) {\r\n <div class=\"overlay\" (click)=\"toggleExpand()\"></div>\r\n}\r\n", styles: [".line-chart-container{display:flex;flex-direction:column;gap:16px;background-color:#f0f0db;padding:24px 16px 16px;border-radius:20px;position:relative;transition:all .3s ease}.line-chart-container.expanded{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;height:90vh;z-index:9999;box-shadow:0 25px 50px -12px #00000040;margin:0}.chart-wrapper{flex:1;min-height:300px;display:block}.line-chart-container.expanded .chart-wrapper{min-height:unset;height:100%}.line-chart-header{display:flex;justify-content:space-between;align-items:center}.line-chart-title{font-size:20px;font-weight:600;color:#333;font-family:Inter,sans-serif}.expand-btn{background:transparent;border:none;cursor:pointer;color:#61661f;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.expand-btn:hover{background-color:#61661f1a}.overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999}\n"] }]
|
|
4566
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }] } });
|
|
4567
|
+
|
|
4568
|
+
function getTotal(data) {
|
|
4569
|
+
return data.reduce((acc, item) => acc + item.value, 0);
|
|
4570
|
+
}
|
|
4571
|
+
function buildDonutChartOptions(data) {
|
|
4572
|
+
const total = getTotal(data);
|
|
4573
|
+
return {
|
|
4574
|
+
animation: true,
|
|
4575
|
+
backgroundColor: 'transparent',
|
|
4576
|
+
color: UI_CHART_TOKENS.donutPalette,
|
|
4577
|
+
dataZoom: [
|
|
4578
|
+
{
|
|
4579
|
+
type: 'inside',
|
|
4580
|
+
xAxisIndex: [0],
|
|
4581
|
+
start: 0,
|
|
4582
|
+
end: 100,
|
|
4583
|
+
},
|
|
4584
|
+
],
|
|
4585
|
+
tooltip: {
|
|
4586
|
+
trigger: 'item',
|
|
4587
|
+
backgroundColor: '#ffffff',
|
|
4588
|
+
borderColor: '#d9dcc7',
|
|
4589
|
+
borderWidth: 1,
|
|
4590
|
+
textStyle: {
|
|
4591
|
+
color: UI_CHART_TOKENS.text,
|
|
4592
|
+
fontSize: 12,
|
|
4593
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4594
|
+
},
|
|
4595
|
+
extraCssText: `
|
|
4596
|
+
border-radius: 10px;
|
|
4597
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.10);
|
|
4598
|
+
padding: 8px 10px;
|
|
4599
|
+
`,
|
|
4600
|
+
formatter: (params) => `${params.name}: ${params.value}`,
|
|
4601
|
+
},
|
|
4602
|
+
series: [
|
|
4603
|
+
{
|
|
4604
|
+
type: 'pie',
|
|
4605
|
+
radius: ['44%', '72%'],
|
|
4606
|
+
center: ['50%', '52%'],
|
|
4607
|
+
avoidLabelOverlap: true,
|
|
4608
|
+
minAngle: 4,
|
|
4609
|
+
itemStyle: {
|
|
4610
|
+
borderWidth: 0,
|
|
4611
|
+
},
|
|
4612
|
+
label: {
|
|
4613
|
+
show: true,
|
|
4614
|
+
position: 'outside',
|
|
4615
|
+
formatter: (params) => {
|
|
4616
|
+
return `{label|${params.name}}\n{value|${params.value}}`;
|
|
4617
|
+
},
|
|
4618
|
+
rich: {
|
|
4619
|
+
label: {
|
|
4620
|
+
fontSize: 12,
|
|
4621
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4622
|
+
color: UI_CHART_TOKENS.muted,
|
|
4623
|
+
lineHeight: 16,
|
|
4624
|
+
},
|
|
4625
|
+
value: {
|
|
4626
|
+
fontSize: 14,
|
|
4627
|
+
fontWeight: 700,
|
|
4628
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4629
|
+
lineHeight: 18,
|
|
4630
|
+
},
|
|
4631
|
+
},
|
|
4632
|
+
},
|
|
4633
|
+
labelLine: {
|
|
4634
|
+
show: true,
|
|
4635
|
+
length: 12,
|
|
4636
|
+
length2: 20,
|
|
4637
|
+
lineStyle: {
|
|
4638
|
+
color: UI_CHART_TOKENS.labelLine,
|
|
4639
|
+
width: 1,
|
|
4640
|
+
},
|
|
4641
|
+
},
|
|
4642
|
+
data: data.map((item, index) => ({
|
|
4643
|
+
name: item.label,
|
|
4644
|
+
value: item.value,
|
|
4645
|
+
label: {
|
|
4646
|
+
rich: {
|
|
4647
|
+
value: {
|
|
4648
|
+
fontSize: 14,
|
|
4649
|
+
fontWeight: 700,
|
|
4650
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4651
|
+
color: UI_CHART_TOKENS.donutPalette[index % UI_CHART_TOKENS.donutPalette.length],
|
|
4652
|
+
lineHeight: 18,
|
|
4653
|
+
},
|
|
4654
|
+
},
|
|
4655
|
+
},
|
|
4656
|
+
})),
|
|
4657
|
+
},
|
|
4658
|
+
],
|
|
4659
|
+
graphic: [
|
|
4660
|
+
{
|
|
4661
|
+
type: 'text',
|
|
4662
|
+
left: 'center',
|
|
4663
|
+
top: '48%',
|
|
4664
|
+
style: {
|
|
4665
|
+
text: `${total}`,
|
|
4666
|
+
textAlign: 'center',
|
|
4667
|
+
fill: UI_CHART_TOKENS.centerText,
|
|
4668
|
+
fontSize: 24,
|
|
4669
|
+
fontWeight: 700,
|
|
4670
|
+
fontFamily: UI_CHART_TOKENS.fontFamily,
|
|
4671
|
+
},
|
|
4672
|
+
},
|
|
4673
|
+
],
|
|
4674
|
+
};
|
|
4675
|
+
}
|
|
4676
|
+
class DonutChart {
|
|
4677
|
+
title = input('Donut Chart', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
4678
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
4679
|
+
isExpanded = signal(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
|
|
4680
|
+
toggleExpand = () => this.isExpanded.update(v => !v);
|
|
4681
|
+
options = computed(() => buildDonutChartOptions(this.data()), ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
4682
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DonutChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4683
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: DonutChart, isStandalone: true, selector: "lib-donut-chart", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"donut-chart-container\" [class.expanded]=\"isExpanded()\">\r\n <div class=\"donut-chart-header\">\r\n <h3 class=\"donut-chart-title\">{{ title() }}</h3>\r\n <button class=\"expand-btn\" (click)=\"toggleExpand()\" type=\"button\" [attr.aria-label]=\"isExpanded() ? 'Minimize chart' : 'Maximize chart'\">\r\n @if (isExpanded()) {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-minimize-2\"><polyline points=\"4 14 10 14 10 20\"/><polyline points=\"20 10 14 10 14 4\"/><line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n } @else {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"/><polyline points=\"9 21 3 21 3 15\"/><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n }\r\n </button>\r\n </div>\r\n <lib-base-chart [options]=\"options()\" class=\"chart-wrapper\" />\r\n</div>\r\n@if (isExpanded()) {\r\n <div class=\"overlay\" (click)=\"toggleExpand()\"></div>\r\n}", styles: [".donut-chart-container{display:flex;flex-direction:column;gap:16px;background-color:#f0f0db;padding:24px 16px 16px;border-radius:20px;position:relative;transition:all .3s ease}.donut-chart-container.expanded{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;height:90vh;z-index:9999;box-shadow:0 25px 50px -12px #00000040;margin:0}.chart-wrapper{flex:1;min-height:300px;display:block}.donut-chart-container.expanded .chart-wrapper{min-height:unset;height:100%}.donut-chart-header{display:flex;justify-content:space-between;align-items:center}.donut-chart-title{font-size:20px;font-weight:600;color:#333;font-family:Inter,sans-serif}.expand-btn{background:transparent;border:none;cursor:pointer;color:#61661f;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.expand-btn:hover{background-color:#61661f1a}.overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999}\n"], dependencies: [{ kind: "component", type: BaseChart, selector: "lib-base-chart", inputs: ["options"] }] });
|
|
4684
|
+
}
|
|
4685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DonutChart, decorators: [{
|
|
4686
|
+
type: Component,
|
|
4687
|
+
args: [{ selector: 'lib-donut-chart', imports: [BaseChart], template: "<div class=\"donut-chart-container\" [class.expanded]=\"isExpanded()\">\r\n <div class=\"donut-chart-header\">\r\n <h3 class=\"donut-chart-title\">{{ title() }}</h3>\r\n <button class=\"expand-btn\" (click)=\"toggleExpand()\" type=\"button\" [attr.aria-label]=\"isExpanded() ? 'Minimize chart' : 'Maximize chart'\">\r\n @if (isExpanded()) {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-minimize-2\"><polyline points=\"4 14 10 14 10 20\"/><polyline points=\"20 10 14 10 14 4\"/><line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n } @else {\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-maximize-2\"><polyline points=\"15 3 21 3 21 9\"/><polyline points=\"9 21 3 21 3 15\"/><line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\"/><line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\"/></svg>\r\n }\r\n </button>\r\n </div>\r\n <lib-base-chart [options]=\"options()\" class=\"chart-wrapper\" />\r\n</div>\r\n@if (isExpanded()) {\r\n <div class=\"overlay\" (click)=\"toggleExpand()\"></div>\r\n}", styles: [".donut-chart-container{display:flex;flex-direction:column;gap:16px;background-color:#f0f0db;padding:24px 16px 16px;border-radius:20px;position:relative;transition:all .3s ease}.donut-chart-container.expanded{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;height:90vh;z-index:9999;box-shadow:0 25px 50px -12px #00000040;margin:0}.chart-wrapper{flex:1;min-height:300px;display:block}.donut-chart-container.expanded .chart-wrapper{min-height:unset;height:100%}.donut-chart-header{display:flex;justify-content:space-between;align-items:center}.donut-chart-title{font-size:20px;font-weight:600;color:#333;font-family:Inter,sans-serif}.expand-btn{background:transparent;border:none;cursor:pointer;color:#61661f;padding:6px;border-radius:8px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.expand-btn:hover{background-color:#61661f1a}.overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999}\n"] }]
|
|
4688
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }] } });
|
|
4689
|
+
|
|
4690
|
+
const Colors = {
|
|
4691
|
+
primary: '#4B5E05',
|
|
4692
|
+
secondary: '#063546',
|
|
4693
|
+
tertiary: '#6B0518',
|
|
4694
|
+
quaternary: '#F57C00',
|
|
4695
|
+
};
|
|
4696
|
+
class KpiCard {
|
|
4697
|
+
title = input('Titulo', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
4698
|
+
description = input('Descripción', ...(ngDevMode ? [{ debugName: "description" }] : []));
|
|
4699
|
+
value = input('0', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
4700
|
+
iconColor = input('primary', ...(ngDevMode ? [{ debugName: "iconColor" }] : []));
|
|
4701
|
+
resolvedIconColor = computed(() => {
|
|
4702
|
+
const color = this.iconColor();
|
|
4703
|
+
// Revisa si es un predeterminado, si no, lo asume como hex code.
|
|
4704
|
+
return Colors[color] || color;
|
|
4705
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedIconColor" }] : []));
|
|
4706
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: KpiCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4707
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: KpiCard, isStandalone: true, selector: "lib-kpi-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"kpi-card\">\n <div class=\"kpi-card-text\">\n <h3 class=\"kpi-title\">{{ title() }}</h3>\n <p class=\"kpi-description\">{{ description() }}</p>\n <h2 class=\"kpi-value\">{{ value() }}</h2>\n </div>\n <div class=\"kpi-icon-container\" [style.--kpi-base-color]=\"resolvedIconColor()\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n</div>\n", styles: [".kpi-card{background-color:#f0f0db;border-radius:20px;padding:24px;display:flex;justify-content:space-between;font-family:Roboto,sans-serif;min-width:260px}.kpi-card-text{display:flex;flex-direction:column}.kpi-title{font-size:20px;font-weight:700;color:#37474f;margin:0 0 4px}.kpi-description{font-size:15px;font-weight:500;color:#546e7a;margin:0 0 16px}.kpi-value{font-size:28px;font-weight:800;color:#10161a;margin:0;line-height:1}.kpi-icon-container{width:72px;height:72px;background-color:var(--kpi-base-color, #4B5E05);color:color-mix(in srgb,var(--kpi-base-color, #4B5E05) 35%,white);border-radius:50%;display:flex;justify-content:center;align-items:center;flex-shrink:0;box-shadow:0 4px 6px #0000000d}::ng-deep .kpi-icon-container svg{width:32px;height:32px;stroke:currentColor;stroke-width:2}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
4708
|
+
}
|
|
4709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: KpiCard, decorators: [{
|
|
4710
|
+
type: Component,
|
|
4711
|
+
args: [{ selector: 'lib-kpi-card', imports: [CommonModule], template: "<div class=\"kpi-card\">\n <div class=\"kpi-card-text\">\n <h3 class=\"kpi-title\">{{ title() }}</h3>\n <p class=\"kpi-description\">{{ description() }}</p>\n <h2 class=\"kpi-value\">{{ value() }}</h2>\n </div>\n <div class=\"kpi-icon-container\" [style.--kpi-base-color]=\"resolvedIconColor()\">\n <ng-content select=\"[icon]\"></ng-content>\n </div>\n</div>\n", styles: [".kpi-card{background-color:#f0f0db;border-radius:20px;padding:24px;display:flex;justify-content:space-between;font-family:Roboto,sans-serif;min-width:260px}.kpi-card-text{display:flex;flex-direction:column}.kpi-title{font-size:20px;font-weight:700;color:#37474f;margin:0 0 4px}.kpi-description{font-size:15px;font-weight:500;color:#546e7a;margin:0 0 16px}.kpi-value{font-size:28px;font-weight:800;color:#10161a;margin:0;line-height:1}.kpi-icon-container{width:72px;height:72px;background-color:var(--kpi-base-color, #4B5E05);color:color-mix(in srgb,var(--kpi-base-color, #4B5E05) 35%,white);border-radius:50%;display:flex;justify-content:center;align-items:center;flex-shrink:0;box-shadow:0 4px 6px #0000000d}::ng-deep .kpi-icon-container svg{width:32px;height:32px;stroke:currentColor;stroke-width:2}\n"] }]
|
|
4712
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }] } });
|
|
4713
|
+
|
|
4072
4714
|
// src/app/components/public-api.ts
|
|
4073
|
-
// Exportar
|
|
4715
|
+
// Exportar los componentes
|
|
4074
4716
|
|
|
4075
4717
|
/**
|
|
4076
4718
|
* Generated bundle index. Do not edit.
|
|
4077
4719
|
*/
|
|
4078
4720
|
|
|
4079
|
-
export { Button, ButtonCards, CARD_BG, CardContent, DateTimeFilter, DateTimePicker, DevicesCarousel, DialogAlertComponent, DialogConfirmation, DynamicFormFields, FeatureCard, Footer, InfoGroup, Input, InputNumberFilter, InputSelectFilter, InputTextFilter, InputTimeFilter, Loader, ModalForm, NotFoundModal, NotFoundSection, NotificationModal, PaginationComponent, ProcessingOverlay, ProgressBar, ProgressFormService, SelectCustomSearch, SideCard, SideCardDetail, TOAST_EVENTS, Table, Tabs, TitleFilters, Toast, ToastHelper, ToastService, ToggleCustom, WizardForm };
|
|
4721
|
+
export { BarChart, BaseChart, Button, ButtonCards, CARD_BG, CardContent, Colors, DateTimeFilter, DateTimePicker, DevicesCarousel, DialogAlertComponent, DialogConfirmation, DonutChart, DynamicFormFields, FeatureCard, Footer, InfoGroup, Input, InputNumberFilter, InputSelectFilter, InputTextFilter, InputTimeFilter, KpiCard, LineChart, Loader, ModalForm, NotFoundModal, NotFoundSection, NotificationModal, OptionCard, PaginationComponent, ProcessingOverlay, ProgressBar, ProgressFormService, SelectCustomSearch, SideCard, SideCardDetail, TOAST_EVENTS, Table, Tabs, TitleFilters, Toast, ToastHelper, ToastService, ToggleCustom, UI_CHART_TOKENS, WizardForm };
|
|
4080
4722
|
//# sourceMappingURL=sapenlinea-components.mjs.map
|