@fidurcode/dashboard-widgets-skeleton 1.4.1 → 1.4.3
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,16 +1,212 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, computed, Injectable, input, model, inject, Component, effect, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/material/button';
|
|
6
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
+
import * as i3 from '@angular/material/icon';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
+
import * as i1 from '@angular/material/button-toggle';
|
|
10
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
11
|
+
import * as i5 from '@ngx-translate/core';
|
|
12
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
13
|
+
import { wrapGrid } from 'animate-css-grid';
|
|
14
|
+
import * as i1$2 from '@angular/material/menu';
|
|
15
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
16
|
+
|
|
17
|
+
class WidgetService {
|
|
18
|
+
widgets = signal([], ...(ngDevMode ? [{ debugName: "widgets" }] : []));
|
|
19
|
+
addedWidgets = signal([], ...(ngDevMode ? [{ debugName: "addedWidgets" }] : []));
|
|
20
|
+
widgetsToAdd = computed(() => {
|
|
21
|
+
const addedIds = this.addedWidgets().map((widget) => widget.id);
|
|
22
|
+
return this.widgets().filter((w) => !addedIds.includes(w.id));
|
|
23
|
+
}, ...(ngDevMode ? [{ debugName: "widgetsToAdd" }] : []));
|
|
24
|
+
setAvailableWidgets(widgets) {
|
|
25
|
+
this.widgets.set(widgets);
|
|
26
|
+
}
|
|
27
|
+
addWidget(widget) {
|
|
28
|
+
this.addedWidgets.set([...this.addedWidgets(), { ...widget }]);
|
|
29
|
+
}
|
|
30
|
+
updateWidget(id, widget) {
|
|
31
|
+
const index = this.addedWidgets().findIndex((w) => w.id === id);
|
|
32
|
+
if (index !== -1) {
|
|
33
|
+
const newWidgets = [...this.addedWidgets()];
|
|
34
|
+
newWidgets[index] = { ...newWidgets[index], ...widget };
|
|
35
|
+
this.addedWidgets.set(newWidgets);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
moveWidgetToLeft(id) {
|
|
39
|
+
const index = this.addedWidgets().findIndex((w) => w.id === id);
|
|
40
|
+
if (index == 0)
|
|
41
|
+
return;
|
|
42
|
+
const newWidgets = [...this.addedWidgets()];
|
|
43
|
+
[newWidgets[index], newWidgets[index - 1]] = [
|
|
44
|
+
{ ...newWidgets[index - 1] },
|
|
45
|
+
{ ...newWidgets[index] },
|
|
46
|
+
];
|
|
47
|
+
this.addedWidgets.set(newWidgets);
|
|
48
|
+
}
|
|
49
|
+
moveWidgetToRight(id) {
|
|
50
|
+
const index = this.addedWidgets().findIndex((w) => w.id === id);
|
|
51
|
+
if (index == this.addedWidgets().length - 1)
|
|
52
|
+
return;
|
|
53
|
+
const newWidgets = [...this.addedWidgets()];
|
|
54
|
+
[newWidgets[index], newWidgets[index + 1]] = [
|
|
55
|
+
{ ...newWidgets[index + 1] },
|
|
56
|
+
{ ...newWidgets[index] },
|
|
57
|
+
];
|
|
58
|
+
this.addedWidgets.set(newWidgets);
|
|
59
|
+
}
|
|
60
|
+
deleteWidget(id) {
|
|
61
|
+
this.addedWidgets.set(this.addedWidgets().filter((w) => w.id !== id));
|
|
62
|
+
}
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
64
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetService });
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetService, decorators: [{
|
|
67
|
+
type: Injectable
|
|
68
|
+
}] });
|
|
69
|
+
|
|
70
|
+
class WidgetOptionsComponent {
|
|
71
|
+
widget = input.required(...(ngDevMode ? [{ debugName: "widget" }] : []));
|
|
72
|
+
showOptions = model(false, ...(ngDevMode ? [{ debugName: "showOptions" }] : []));
|
|
73
|
+
store = inject(WidgetService);
|
|
74
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetOptionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
75
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.0-rc.0", type: WidgetOptionsComponent, isStandalone: false, selector: "app-widget-options", inputs: { widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: true, transformFunction: null }, showOptions: { classPropertyName: "showOptions", publicName: "showOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { showOptions: "showOptionsChange" }, ngImport: i0, template: "<button (click)=\"showOptions.set(false)\" class=\"close-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n</button>\n\n<div (click)=\"store.moveWidgetToRight(widget().id)\" class=\"move-forward-button\">\n <mat-icon>chevron_right</mat-icon>\n</div>\n\n<div (click)=\"store.moveWidgetToLeft(widget().id)\" class=\"move-backward-button\">\n <mat-icon>chevron_left</mat-icon>\n</div>\n\n<div (click)=\"store.deleteWidget(widget().id)\" class=\"remove-widget-button\">\n <mat-icon>delete</mat-icon>\n</div>\n\n<div>\n Width\n <mat-button-toggle-group\n (change)=\"store.updateWidget(widget().id, { columns: +$event.value })\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"widget().columns ?? 1\">\n <mat-button-toggle [value]=\"1\">1</mat-button-toggle>\n <mat-button-toggle [value]=\"2\">2</mat-button-toggle>\n <mat-button-toggle [value]=\"3\">3</mat-button-toggle>\n <mat-button-toggle [value]=\"4\">4</mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n<div>\n Height\n <mat-button-toggle-group\n (change)=\"store.updateWidget(widget().id, { rows: +$event.value })\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"widget().rows ?? 1\">\n <mat-button-toggle [value]=\"1\">1</mat-button-toggle>\n <mat-button-toggle [value]=\"2\">2</mat-button-toggle>\n <mat-button-toggle [value]=\"3\">3</mat-button-toggle>\n <mat-button-toggle [value]=\"4\">4</mat-button-toggle>\n </mat-button-toggle-group>\n</div>", styles: [":host{position:absolute;z-index:2;background:inherit;color:inherit;top:0;left:0;border-radius:inherit;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;box-sizing:border-box;--mat-standard-button-toggle-height: 9px}:host>div{display:flex;gap:8px;align-items:center;margin-left:8px}.close-button{position:absolute;top:0;right:0}.move-forward-button{position:absolute;top:50%;transform:translateY(-50%);right:-5px}.move-backward-button{position:absolute;top:50%;transform:translateY(-50%);left:-5px}.remove-widget-button{position:absolute;top:0;left:0;padding:5px}\n"], dependencies: [{ kind: "directive", type: i1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
76
|
+
}
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetOptionsComponent, decorators: [{
|
|
78
|
+
type: Component,
|
|
79
|
+
args: [{ selector: 'app-widget-options', standalone: false, template: "<button (click)=\"showOptions.set(false)\" class=\"close-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n</button>\n\n<div (click)=\"store.moveWidgetToRight(widget().id)\" class=\"move-forward-button\">\n <mat-icon>chevron_right</mat-icon>\n</div>\n\n<div (click)=\"store.moveWidgetToLeft(widget().id)\" class=\"move-backward-button\">\n <mat-icon>chevron_left</mat-icon>\n</div>\n\n<div (click)=\"store.deleteWidget(widget().id)\" class=\"remove-widget-button\">\n <mat-icon>delete</mat-icon>\n</div>\n\n<div>\n Width\n <mat-button-toggle-group\n (change)=\"store.updateWidget(widget().id, { columns: +$event.value })\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"widget().columns ?? 1\">\n <mat-button-toggle [value]=\"1\">1</mat-button-toggle>\n <mat-button-toggle [value]=\"2\">2</mat-button-toggle>\n <mat-button-toggle [value]=\"3\">3</mat-button-toggle>\n <mat-button-toggle [value]=\"4\">4</mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n<div>\n Height\n <mat-button-toggle-group\n (change)=\"store.updateWidget(widget().id, { rows: +$event.value })\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"widget().rows ?? 1\">\n <mat-button-toggle [value]=\"1\">1</mat-button-toggle>\n <mat-button-toggle [value]=\"2\">2</mat-button-toggle>\n <mat-button-toggle [value]=\"3\">3</mat-button-toggle>\n <mat-button-toggle [value]=\"4\">4</mat-button-toggle>\n </mat-button-toggle-group>\n</div>", styles: [":host{position:absolute;z-index:2;background:inherit;color:inherit;top:0;left:0;border-radius:inherit;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;box-sizing:border-box;--mat-standard-button-toggle-height: 9px}:host>div{display:flex;gap:8px;align-items:center;margin-left:8px}.close-button{position:absolute;top:0;right:0}.move-forward-button{position:absolute;top:50%;transform:translateY(-50%);right:-5px}.move-backward-button{position:absolute;top:50%;transform:translateY(-50%);left:-5px}.remove-widget-button{position:absolute;top:0;left:0;padding:5px}\n"] }]
|
|
80
|
+
}], propDecorators: { widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: true }] }], showOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOptions", required: false }] }, { type: i0.Output, args: ["showOptionsChange"] }] } });
|
|
81
|
+
|
|
82
|
+
class WidgetComponent {
|
|
83
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
84
|
+
showWidgetOptions = signal(false, ...(ngDevMode ? [{ debugName: "showWidgetOptions" }] : []));
|
|
85
|
+
get gridArea() {
|
|
86
|
+
const widget = this.data();
|
|
87
|
+
return `span ${widget.rows ?? 1} / span ${widget.columns ?? 1}`;
|
|
88
|
+
}
|
|
89
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
90
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0-rc.0", type: WidgetComponent, isStandalone: false, selector: "app-widget", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "style.grid-area": "gridArea" } }, ngImport: i0, template: "<div\n class=\"widget-container mat-elevation-z3\"\n>\n <h3 class=\"m-0\">{{ data().label | translate}}</h3>\n <button (click)=\"showWidgetOptions.set(true)\" class=\"settings-button\" mat-icon-button>\n <mat-icon>settings</mat-icon>\n </button>\n\n <ng-container [ngComponentOutlet]=\"data().content\"/>\n\n @if (showWidgetOptions()) {\n <app-widget-options [(showOptions)]=\"showWidgetOptions\" [widget]=\"data()\"/>\n }\n</div>\n", styles: [":host{display:block;border-radius:16px}.widget-container{position:relative;height:100%;width:100%;padding:32px;box-sizing:border-box;border-radius:inherit;overflow:hidden;background-color:var(--mat-sys-background);cursor:pointer}.settings-button{position:absolute;top:20px;right:20px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: WidgetOptionsComponent, selector: "app-widget-options", inputs: ["widget", "showOptions"], outputs: ["showOptionsChange"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
|
|
91
|
+
}
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: WidgetComponent, decorators: [{
|
|
93
|
+
type: Component,
|
|
94
|
+
args: [{ selector: 'app-widget', standalone: false, host: {
|
|
95
|
+
'[style.grid-area]': 'gridArea',
|
|
96
|
+
}, template: "<div\n class=\"widget-container mat-elevation-z3\"\n>\n <h3 class=\"m-0\">{{ data().label | translate}}</h3>\n <button (click)=\"showWidgetOptions.set(true)\" class=\"settings-button\" mat-icon-button>\n <mat-icon>settings</mat-icon>\n </button>\n\n <ng-container [ngComponentOutlet]=\"data().content\"/>\n\n @if (showWidgetOptions()) {\n <app-widget-options [(showOptions)]=\"showWidgetOptions\" [widget]=\"data()\"/>\n }\n</div>\n", styles: [":host{display:block;border-radius:16px}.widget-container{position:relative;height:100%;width:100%;padding:32px;box-sizing:border-box;border-radius:inherit;overflow:hidden;background-color:var(--mat-sys-background);cursor:pointer}.settings-button{position:absolute;top:20px;right:20px}\n"] }]
|
|
97
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }] } });
|
|
98
|
+
|
|
99
|
+
class DashboardWidgetsComponent {
|
|
100
|
+
DEFAULT_STORAGE_KEY = 'dashboard-widgets';
|
|
101
|
+
ERROR_PARSING_MESSAGE = 'Error parsing widgets from localStorage';
|
|
102
|
+
title = input.required(...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
103
|
+
widgets = input.required(...(ngDevMode ? [{ debugName: "widgets" }] : []));
|
|
104
|
+
storageKey = input(this.DEFAULT_STORAGE_KEY, ...(ngDevMode ? [{ debugName: "storageKey" }] : []));
|
|
105
|
+
store = inject(WidgetService);
|
|
106
|
+
dashboard;
|
|
107
|
+
constructor() {
|
|
108
|
+
effect(() => {
|
|
109
|
+
const ids = this.store.addedWidgets().map(w => w.id);
|
|
110
|
+
localStorage.setItem(this.storageKey(), JSON.stringify(ids));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
ngOnInit() {
|
|
114
|
+
this.setAvailableWidgets();
|
|
115
|
+
this.loadFromStorage();
|
|
116
|
+
}
|
|
117
|
+
ngAfterViewInit() {
|
|
118
|
+
wrapGrid(this.dashboard.nativeElement, { duration: 300 });
|
|
119
|
+
}
|
|
120
|
+
setAvailableWidgets() {
|
|
121
|
+
const widgets = this.widgets();
|
|
122
|
+
if (widgets?.length > 0) {
|
|
123
|
+
this.store.setAvailableWidgets(widgets);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
loadFromStorage() {
|
|
127
|
+
const stored = localStorage.getItem(this.storageKey());
|
|
128
|
+
if (!stored)
|
|
129
|
+
return;
|
|
130
|
+
try {
|
|
131
|
+
const ids = JSON.parse(stored);
|
|
132
|
+
const restoredWidgets = this.store.widgets().filter(w => ids.includes(w.id));
|
|
133
|
+
this.store.addedWidgets.set(restoredWidgets);
|
|
134
|
+
}
|
|
135
|
+
catch (e) {
|
|
136
|
+
console.error(this.ERROR_PARSING_MESSAGE, e);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: DashboardWidgetsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0-rc.0", type: DashboardWidgetsComponent, isStandalone: false, selector: "fidurcode-dashboard-widgets", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, widgets: { classPropertyName: "widgets", publicName: "widgets", isSignal: true, isRequired: true, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null } }, providers: [WidgetService], viewQueries: [{ propertyName: "dashboard", first: true, predicate: ["dashboard"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"dashboard-widgets-header\">\n <h2>{{title()}}</h2>\n <button [matMenuTriggerFor]=\"menu\" mat-raised-button>\n <mat-icon>add_circle</mat-icon>\n Add widget\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (widget of store.widgetsToAdd(); track widget.id) {\n <button mat-menu-item (click)=\"store.addWidget(widget)\">{{ widget.label | translate}}</button>\n } @empty {\n <button mat-menu-item>No widget to add</button>\n }\n </mat-menu>\n</div>\n<div #dashboard class=\"dashboard-widgets\">\n @for (w of store.addedWidgets(); track w.id) {\n <app-widget [data]=\"w\"/>\n }\n</div>\n", styles: [".dashboard-widgets-header{display:flex;justify-content:space-between;align-items:center}.dashboard-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));grid-auto-rows:150px;gap:16px}\n"], dependencies: [{ kind: "component", type: i1$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: WidgetComponent, selector: "app-widget", inputs: ["data"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] });
|
|
141
|
+
}
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: DashboardWidgetsComponent, decorators: [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{ selector: 'fidurcode-dashboard-widgets', standalone: false, providers: [WidgetService], template: "<div class=\"dashboard-widgets-header\">\n <h2>{{title()}}</h2>\n <button [matMenuTriggerFor]=\"menu\" mat-raised-button>\n <mat-icon>add_circle</mat-icon>\n Add widget\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (widget of store.widgetsToAdd(); track widget.id) {\n <button mat-menu-item (click)=\"store.addWidget(widget)\">{{ widget.label | translate}}</button>\n } @empty {\n <button mat-menu-item>No widget to add</button>\n }\n </mat-menu>\n</div>\n<div #dashboard class=\"dashboard-widgets\">\n @for (w of store.addedWidgets(); track w.id) {\n <app-widget [data]=\"w\"/>\n }\n</div>\n", styles: [".dashboard-widgets-header{display:flex;justify-content:space-between;align-items:center}.dashboard-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));grid-auto-rows:150px;gap:16px}\n"] }]
|
|
145
|
+
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], widgets: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgets", required: true }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], dashboard: [{
|
|
146
|
+
type: ViewChild,
|
|
147
|
+
args: ['dashboard', { static: true }]
|
|
148
|
+
}] } });
|
|
149
|
+
|
|
150
|
+
class DashboardWidgetsSkeletonModule {
|
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: DashboardWidgetsSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
152
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0-rc.0", ngImport: i0, type: DashboardWidgetsSkeletonModule, declarations: [WidgetComponent,
|
|
153
|
+
WidgetOptionsComponent,
|
|
154
|
+
DashboardWidgetsComponent], imports: [CommonModule, i5.TranslateModule, MatMenuModule,
|
|
155
|
+
MatButtonToggleModule,
|
|
156
|
+
MatButtonModule,
|
|
157
|
+
MatIconModule], exports: [WidgetComponent,
|
|
158
|
+
WidgetOptionsComponent,
|
|
159
|
+
DashboardWidgetsComponent,
|
|
160
|
+
MatMenuModule,
|
|
161
|
+
MatButtonToggleModule,
|
|
162
|
+
MatButtonModule,
|
|
163
|
+
MatIconModule] });
|
|
164
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: DashboardWidgetsSkeletonModule, providers: [WidgetService], imports: [CommonModule,
|
|
165
|
+
TranslateModule.forChild(),
|
|
166
|
+
MatMenuModule,
|
|
167
|
+
MatButtonToggleModule,
|
|
168
|
+
MatButtonModule,
|
|
169
|
+
MatIconModule, MatMenuModule,
|
|
170
|
+
MatButtonToggleModule,
|
|
171
|
+
MatButtonModule,
|
|
172
|
+
MatIconModule] });
|
|
173
|
+
}
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0-rc.0", ngImport: i0, type: DashboardWidgetsSkeletonModule, decorators: [{
|
|
175
|
+
type: NgModule,
|
|
176
|
+
args: [{
|
|
177
|
+
declarations: [
|
|
178
|
+
WidgetComponent,
|
|
179
|
+
WidgetOptionsComponent,
|
|
180
|
+
DashboardWidgetsComponent,
|
|
181
|
+
],
|
|
182
|
+
imports: [
|
|
183
|
+
CommonModule,
|
|
184
|
+
TranslateModule.forChild(),
|
|
185
|
+
MatMenuModule,
|
|
186
|
+
MatButtonToggleModule,
|
|
187
|
+
MatButtonModule,
|
|
188
|
+
MatIconModule,
|
|
189
|
+
],
|
|
190
|
+
exports: [
|
|
191
|
+
WidgetComponent,
|
|
192
|
+
WidgetOptionsComponent,
|
|
193
|
+
DashboardWidgetsComponent,
|
|
194
|
+
MatMenuModule,
|
|
195
|
+
MatButtonToggleModule,
|
|
196
|
+
MatButtonModule,
|
|
197
|
+
MatIconModule,
|
|
198
|
+
],
|
|
199
|
+
providers: [WidgetService]
|
|
200
|
+
}]
|
|
201
|
+
}] });
|
|
202
|
+
|
|
2
203
|
/*
|
|
3
204
|
* Public API Surface of dashboard-widgets-skeleton
|
|
4
205
|
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
tslib_1.__exportStar(require("./lib/components/widget/widget.component"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./lib/components/widget-options/widget-options.component"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./lib/components/dashboard-widgets/dashboard-widgets.component"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./lib/services/widget.service"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./lib/dashboard-widgets-skeleton.module"), exports);
|
|
12
206
|
|
|
13
207
|
/**
|
|
14
208
|
* Generated bundle index. Do not edit.
|
|
15
209
|
*/
|
|
210
|
+
|
|
211
|
+
export { DashboardWidgetsComponent, DashboardWidgetsSkeletonModule, WidgetComponent, WidgetOptionsComponent, WidgetService };
|
|
16
212
|
//# sourceMappingURL=fidurcode-dashboard-widgets-skeleton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fidurcode-dashboard-widgets-skeleton.mjs","sources":["../../../projects/dashboard-widgets-skeleton/src/public-api.ts","../../../projects/dashboard-widgets-skeleton/src/fidurcode-dashboard-widgets-skeleton.ts"],"sourcesContent":["/*\n * Public API Surface of dashboard-widgets-skeleton\n */\n\nexport * from './lib/components/widget/widget.component';\nexport * from './lib/components/widget-options/widget-options.component';\nexport * from './lib/components/dashboard-widgets/dashboard-widgets.component';\nexport * from './lib/services/widget.service';\nexport * from './lib/dashboard-widgets-skeleton.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";AAAA;;AAEG;;;AAEH,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0CAAA,CAAA,EAAA,OAAA,CAAA;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0DAAA,CAAA,EAAA,OAAA,CAAA;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gEAAA,CAAA,EAAA,OAAA,CAAA;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA,CAAA;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yCAAA,CAAA,EAAA,OAAA,CAAA;;ACRA;;AAEG"}
|
|
1
|
+
{"version":3,"file":"fidurcode-dashboard-widgets-skeleton.mjs","sources":["../../../projects/dashboard-widgets-skeleton/src/lib/services/widget.service.ts","../../../projects/dashboard-widgets-skeleton/src/lib/components/widget-options/widget-options.component.ts","../../../projects/dashboard-widgets-skeleton/src/lib/components/widget-options/widget-options.component.html","../../../projects/dashboard-widgets-skeleton/src/lib/components/widget/widget.component.ts","../../../projects/dashboard-widgets-skeleton/src/lib/components/widget/widget.component.html","../../../projects/dashboard-widgets-skeleton/src/lib/components/dashboard-widgets/dashboard-widgets.component.ts","../../../projects/dashboard-widgets-skeleton/src/lib/components/dashboard-widgets/dashboard-widgets.component.html","../../../projects/dashboard-widgets-skeleton/src/lib/dashboard-widgets-skeleton.module.ts","../../../projects/dashboard-widgets-skeleton/src/public-api.ts","../../../projects/dashboard-widgets-skeleton/src/fidurcode-dashboard-widgets-skeleton.ts"],"sourcesContent":["import {\n computed,\n Injectable,\n Signal,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { Widget } from '../components/widget/widget';\n\n@Injectable()\nexport class WidgetService {\n public widgets: WritableSignal<Widget[]> = signal<Widget[]>([]);\n\n addedWidgets: WritableSignal<Widget[]> = signal<Widget[]>([]);\n\n widgetsToAdd: Signal<Widget[]> = computed((): Widget[] => {\n const addedIds: number[] = this.addedWidgets().map(\n (widget: Widget): number => widget.id,\n );\n return this.widgets().filter((w): boolean => !addedIds.includes(w.id));\n });\n\n setAvailableWidgets(widgets: Widget[]): void {\n this.widgets.set(widgets);\n }\n\n addWidget(widget: Widget): void {\n this.addedWidgets.set([...this.addedWidgets(), { ...widget }]);\n }\n\n updateWidget(id: number, widget: Partial<Widget>): void {\n const index = this.addedWidgets().findIndex((w) => w.id === id);\n if (index !== -1) {\n const newWidgets = [...this.addedWidgets()];\n newWidgets[index] = { ...newWidgets[index], ...widget };\n this.addedWidgets.set(newWidgets);\n }\n }\n\n moveWidgetToLeft(id: number): void {\n const index = this.addedWidgets().findIndex((w) => w.id === id);\n if (index == 0) return;\n const newWidgets = [...this.addedWidgets()];\n [newWidgets[index], newWidgets[index - 1]] = [\n { ...newWidgets[index - 1] },\n { ...newWidgets[index] },\n ];\n\n this.addedWidgets.set(newWidgets);\n }\n\n moveWidgetToRight(id: number): void {\n const index = this.addedWidgets().findIndex((w) => w.id === id);\n if (index == this.addedWidgets().length - 1) return;\n const newWidgets = [...this.addedWidgets()];\n [newWidgets[index], newWidgets[index + 1]] = [\n { ...newWidgets[index + 1] },\n { ...newWidgets[index] },\n ];\n\n this.addedWidgets.set(newWidgets);\n }\n\n deleteWidget(id: number): void {\n this.addedWidgets.set(this.addedWidgets().filter((w) => w.id !== id));\n }\n}\n","import {\n Component,\n inject,\n input,\n InputSignal,\n model,\n ModelSignal,\n} from '@angular/core';\nimport { Widget } from '../widget/widget';\nimport { WidgetService } from '../../services/widget.service';\n\n@Component({\n selector: 'app-widget-options',\n standalone: false,\n templateUrl: './widget-options.component.html',\n styleUrl: './widget-options.component.scss',\n})\nexport class WidgetOptionsComponent {\n widget: InputSignal<Widget> = input.required<Widget>();\n showOptions: ModelSignal<boolean> = model<boolean>(false);\n\n store = inject(WidgetService);\n}\n","<button (click)=\"showOptions.set(false)\" class=\"close-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n</button>\n\n<div (click)=\"store.moveWidgetToRight(widget().id)\" class=\"move-forward-button\">\n <mat-icon>chevron_right</mat-icon>\n</div>\n\n<div (click)=\"store.moveWidgetToLeft(widget().id)\" class=\"move-backward-button\">\n <mat-icon>chevron_left</mat-icon>\n</div>\n\n<div (click)=\"store.deleteWidget(widget().id)\" class=\"remove-widget-button\">\n <mat-icon>delete</mat-icon>\n</div>\n\n<div>\n Width\n <mat-button-toggle-group\n (change)=\"store.updateWidget(widget().id, { columns: +$event.value })\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"widget().columns ?? 1\">\n <mat-button-toggle [value]=\"1\">1</mat-button-toggle>\n <mat-button-toggle [value]=\"2\">2</mat-button-toggle>\n <mat-button-toggle [value]=\"3\">3</mat-button-toggle>\n <mat-button-toggle [value]=\"4\">4</mat-button-toggle>\n </mat-button-toggle-group>\n</div>\n\n<div>\n Height\n <mat-button-toggle-group\n (change)=\"store.updateWidget(widget().id, { rows: +$event.value })\"\n [hideSingleSelectionIndicator]=\"true\"\n [value]=\"widget().rows ?? 1\">\n <mat-button-toggle [value]=\"1\">1</mat-button-toggle>\n <mat-button-toggle [value]=\"2\">2</mat-button-toggle>\n <mat-button-toggle [value]=\"3\">3</mat-button-toggle>\n <mat-button-toggle [value]=\"4\">4</mat-button-toggle>\n </mat-button-toggle-group>\n</div>","import {\n Component,\n input,\n InputSignal,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { Widget } from './widget';\n\n@Component({\n selector: 'app-widget',\n standalone: false,\n templateUrl: './widget.component.html',\n styleUrl: './widget.component.scss',\n host: {\n '[style.grid-area]': 'gridArea',\n },\n})\nexport class WidgetComponent {\n data: InputSignal<Widget> = input.required<Widget>();\n\n showWidgetOptions: WritableSignal<boolean> = signal<boolean>(false);\n\n get gridArea(): string {\n const widget: Widget = this.data();\n return `span ${widget.rows ?? 1} / span ${widget.columns ?? 1}`;\n }\n}\n","<div\n class=\"widget-container mat-elevation-z3\"\n>\n <h3 class=\"m-0\">{{ data().label | translate}}</h3>\n <button (click)=\"showWidgetOptions.set(true)\" class=\"settings-button\" mat-icon-button>\n <mat-icon>settings</mat-icon>\n </button>\n\n <ng-container [ngComponentOutlet]=\"data().content\"/>\n\n @if (showWidgetOptions()) {\n <app-widget-options [(showOptions)]=\"showWidgetOptions\" [widget]=\"data()\"/>\n }\n</div>\n","import {\n Component,\n ElementRef,\n ViewChild,\n InputSignal,\n input,\n inject,\n effect,\n OnInit,\n AfterViewInit,\n} from '@angular/core';\nimport { WidgetService } from '../../services/widget.service';\nimport { wrapGrid } from 'animate-css-grid';\nimport { Widget } from '../widget/widget';\n\n@Component({\n selector: 'fidurcode-dashboard-widgets',\n standalone: false,\n templateUrl: './dashboard-widgets.component.html',\n styleUrls: ['./dashboard-widgets.component.scss'],\n providers: [WidgetService],\n})\nexport class DashboardWidgetsComponent implements OnInit, AfterViewInit {\n private readonly DEFAULT_STORAGE_KEY = 'dashboard-widgets';\n private readonly ERROR_PARSING_MESSAGE = 'Error parsing widgets from localStorage';\n\n title: InputSignal<string> = input.required<string>();\n widgets: InputSignal<Widget[]> = input.required<Widget[]>();\n storageKey: InputSignal<string> = input<string>(this.DEFAULT_STORAGE_KEY);\n\n public store = inject(WidgetService);\n\n @ViewChild('dashboard', { static: true }) dashboard!: ElementRef;\n\n constructor() {\n effect((): void => {\n const ids = this.store.addedWidgets().map(w => w.id);\n localStorage.setItem(this.storageKey(), JSON.stringify(ids));\n });\n }\n\n ngOnInit(): void {\n this.setAvailableWidgets();\n this.loadFromStorage();\n }\n\n ngAfterViewInit(): void {\n wrapGrid(this.dashboard.nativeElement, { duration: 300 });\n }\n\n private setAvailableWidgets(): void {\n const widgets = this.widgets();\n if (widgets?.length > 0) {\n this.store.setAvailableWidgets(widgets);\n }\n }\n\n private loadFromStorage(): void {\n const stored = localStorage.getItem(this.storageKey());\n if (!stored) return;\n\n try {\n const ids: number[] = JSON.parse(stored);\n const restoredWidgets = this.store.widgets().filter(w => ids.includes(w.id));\n this.store.addedWidgets.set(restoredWidgets);\n } catch (e) {\n console.error(this.ERROR_PARSING_MESSAGE, e);\n }\n }\n}\n","<div class=\"dashboard-widgets-header\">\n <h2>{{title()}}</h2>\n <button [matMenuTriggerFor]=\"menu\" mat-raised-button>\n <mat-icon>add_circle</mat-icon>\n Add widget\n </button>\n <mat-menu #menu=\"matMenu\">\n @for (widget of store.widgetsToAdd(); track widget.id) {\n <button mat-menu-item (click)=\"store.addWidget(widget)\">{{ widget.label | translate}}</button>\n } @empty {\n <button mat-menu-item>No widget to add</button>\n }\n </mat-menu>\n</div>\n<div #dashboard class=\"dashboard-widgets\">\n @for (w of store.addedWidgets(); track w.id) {\n <app-widget [data]=\"w\"/>\n }\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { WidgetComponent } from './components/widget/widget.component';\nimport { WidgetOptionsComponent } from './components/widget-options/widget-options.component';\nimport { DashboardWidgetsComponent } from './components/dashboard-widgets/dashboard-widgets.component';\nimport { WidgetService } from './services/widget.service';\nimport {MatMenuModule} from '@angular/material/menu';\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatIconModule} from '@angular/material/icon';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [\n WidgetComponent,\n WidgetOptionsComponent,\n DashboardWidgetsComponent,\n ],\n imports: [\n CommonModule,\n TranslateModule.forChild(),\n MatMenuModule,\n MatButtonToggleModule,\n MatButtonModule,\n MatIconModule,\n ],\n exports: [\n WidgetComponent,\n WidgetOptionsComponent,\n DashboardWidgetsComponent,\n MatMenuModule,\n MatButtonToggleModule,\n MatButtonModule,\n MatIconModule,\n ],\n providers: [WidgetService]\n})\nexport class DashboardWidgetsSkeletonModule {}\n","/*\n * Public API Surface of dashboard-widgets-skeleton\n */\n\nexport * from './lib/components/widget/widget.component';\nexport * from './lib/components/widget-options/widget-options.component';\nexport * from './lib/components/dashboard-widgets/dashboard-widgets.component';\nexport * from './lib/services/widget.service';\nexport * from './lib/dashboard-widgets-skeleton.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i4.WidgetOptionsComponent","i4.WidgetComponent"],"mappings":";;;;;;;;;;;;;;;;MAUa,aAAa,CAAA;AACjB,IAAA,OAAO,GAA6B,MAAM,CAAW,EAAE,mDAAC;AAE/D,IAAA,YAAY,GAA6B,MAAM,CAAW,EAAE,wDAAC;AAE7D,IAAA,YAAY,GAAqB,QAAQ,CAAC,MAAe;AACvD,QAAA,MAAM,QAAQ,GAAa,IAAI,CAAC,YAAY,EAAE,CAAC,GAAG,CAChD,CAAC,MAAc,KAAa,MAAM,CAAC,EAAE,CACtC;QACD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACxE,IAAA,CAAC,wDAAC;AAEF,IAAA,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qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,eAAe;wBACf,sBAAsB;wBACtB,yBAAyB;wBACzB,aAAa;wBACb,qBAAqB;wBACrB,eAAe;wBACf,aAAa;AACd,qBAAA;oBACD,SAAS,EAAE,CAAC,aAAa;AAC1B,iBAAA;;;ACpCD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fidurcode/dashboard-widgets-skeleton",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"animate-css-grid": "^1.5.1",
|
|
7
7
|
"@ngx-translate/core": "^17.0.0"
|
|
8
8
|
},
|
|
9
|
-
"sideEffects":
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"*.css",
|
|
11
|
+
"*.scss"
|
|
12
|
+
],
|
|
10
13
|
"module": "fesm2022/fidurcode-dashboard-widgets-skeleton.mjs",
|
|
11
14
|
"typings": "types/fidurcode-dashboard-widgets-skeleton.d.ts",
|
|
12
15
|
"exports": {
|