@fxlt/common-ui 0.0.4 → 0.0.5-rc1
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.
- package/animations.css +15 -0
- package/components.css +6 -20
- package/fesm2022/fxlt-common-ui.mjs +191 -81
- package/fesm2022/fxlt-common-ui.mjs.map +1 -1
- package/index.d.ts +45 -28
- package/package.json +1 -1
- package/src/lib/styles/animations.css +15 -0
- package/src/lib/styles/components.css +6 -20
- package/src/lib/styles/theme.css +1 -1
- package/src/lib/ui/components/chart/chart.component.html +10 -8
- package/src/lib/ui/components/table-cell/table-cell.component.html +7 -0
- package/theme.css +1 -1
package/index.d.ts
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, Injector, ApplicationRef, OnInit, AfterViewInit, ChangeDetectorRef, Type, EventEmitter, ModuleWithProviders, TemplateRef, ViewContainerRef, ElementRef, RendererFactory2, AfterContentInit, QueryList, Renderer2, OnChanges, NgZone } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as _fxlt_common_ui from '@fxlt/common-ui';
|
|
4
|
+
import * as i40 from '@angular/material/paginator';
|
|
4
5
|
import { MatPaginator } from '@angular/material/paginator';
|
|
5
|
-
import * as
|
|
6
|
+
import * as i41 from '@angular/material/table';
|
|
6
7
|
import { MatTableDataSource, MatTable } from '@angular/material/table';
|
|
7
8
|
import { HttpClient, HttpEvent, HttpErrorResponse, HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
|
|
8
9
|
import * as rxjs from 'rxjs';
|
|
9
10
|
import { Observable, Subject } from 'rxjs';
|
|
10
|
-
import * as
|
|
11
|
+
import * as i28 from '@angular/forms';
|
|
11
12
|
import { NgForm, NgControl, ControlValueAccessor, ValidationErrors } from '@angular/forms';
|
|
12
|
-
import * as
|
|
13
|
+
import * as i43 from '@angular/material/dialog';
|
|
13
14
|
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
14
15
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
15
16
|
import * as i1 from '@ngx-translate/core';
|
|
16
17
|
import { TranslateService } from '@ngx-translate/core';
|
|
17
18
|
import { CanActivate, Router } from '@angular/router';
|
|
18
19
|
import { EChartsOption } from 'echarts';
|
|
19
|
-
import * as
|
|
20
|
+
import * as i34 from 'ngx-vflow';
|
|
20
21
|
import { Node, Edge, Connection } from 'ngx-vflow';
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
27
|
-
import * as
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
31
|
-
import * as
|
|
32
|
-
import * as
|
|
33
|
-
import * as
|
|
34
|
-
import * as
|
|
35
|
-
import * as
|
|
36
|
-
import * as
|
|
37
|
-
import * as
|
|
38
|
-
import * as
|
|
22
|
+
import * as i27 from '@angular/common';
|
|
23
|
+
import * as i29 from '@danielmoncada/angular-datetime-picker';
|
|
24
|
+
import * as i30 from '@danielmoncada/angular-datetime-picker-moment-adapter';
|
|
25
|
+
import * as i33 from '@dimaslz/ng-heroicons';
|
|
26
|
+
import * as i35 from 'ngx-echarts';
|
|
27
|
+
import * as i36 from '@angular/material/select';
|
|
28
|
+
import * as i37 from '@angular/material/radio';
|
|
29
|
+
import * as i38 from '@angular/material/button';
|
|
30
|
+
import * as i39 from '@angular/material/icon';
|
|
31
|
+
import * as i42 from '@angular/material/snack-bar';
|
|
32
|
+
import * as i44 from '@angular/material/checkbox';
|
|
33
|
+
import * as i45 from '@angular/material/card';
|
|
34
|
+
import * as i46 from '@angular/material/datepicker';
|
|
35
|
+
import * as i47 from '@angular/material/timepicker';
|
|
36
|
+
import * as i48 from '@angular/material/badge';
|
|
37
|
+
import * as i49 from '@angular/material/expansion';
|
|
38
|
+
import * as i50 from '@angular/material/form-field';
|
|
39
|
+
import * as i51 from '@angular/material/menu';
|
|
39
40
|
|
|
40
41
|
declare abstract class BaseComponent implements OnDestroy {
|
|
41
42
|
protected injector: Injector;
|
|
@@ -111,6 +112,7 @@ declare class BaseTableComponent<T = any> extends BaseComponent implements OnIni
|
|
|
111
112
|
toastr: FxToastrService;
|
|
112
113
|
_lock: boolean;
|
|
113
114
|
keywordChange$: Subject<string>;
|
|
115
|
+
dataSourcePlaceholder: any[];
|
|
114
116
|
config: {
|
|
115
117
|
create?: {
|
|
116
118
|
dialog?: Type<{}>;
|
|
@@ -162,7 +164,9 @@ declare class BaseTableComponent<T = any> extends BaseComponent implements OnIni
|
|
|
162
164
|
view(model: any): Promise<void>;
|
|
163
165
|
delete(model: any): Promise<void>;
|
|
164
166
|
remove(model: any): Promise<any>;
|
|
165
|
-
|
|
167
|
+
tagClass(tag: string): _fxlt_common_ui.TagType;
|
|
168
|
+
capitalize(label: string): string;
|
|
169
|
+
value(model: any, key: string, defaultValue?: any): any;
|
|
166
170
|
toggleExpand(element: any): void;
|
|
167
171
|
updateStatus(params: any): Promise<void>;
|
|
168
172
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseTableComponent<any>, never>;
|
|
@@ -237,6 +241,7 @@ declare class FxUtils {
|
|
|
237
241
|
static getTagClass(key: string, isCriticalExist?: boolean): TagType;
|
|
238
242
|
static validateEmail(value: string): boolean;
|
|
239
243
|
static isStrongPassword(password: string): boolean;
|
|
244
|
+
static formatSizeUnits(bytes: number): string;
|
|
240
245
|
}
|
|
241
246
|
|
|
242
247
|
declare function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader;
|
|
@@ -701,13 +706,18 @@ declare class ChartComponent implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
701
706
|
palette?: string[];
|
|
702
707
|
height: string;
|
|
703
708
|
loading: boolean;
|
|
709
|
+
pieLegendAlign: any;
|
|
710
|
+
pieLegendPosition: any;
|
|
711
|
+
showPieLabel: boolean;
|
|
712
|
+
labelFontFamily: string;
|
|
704
713
|
chartClick: EventEmitter<any>;
|
|
705
714
|
chartInit: EventEmitter<any>;
|
|
706
715
|
labelFontSize: number;
|
|
707
|
-
|
|
716
|
+
canInit: boolean;
|
|
708
717
|
chartOptions: EChartsOption;
|
|
709
718
|
private chartInstance?;
|
|
710
719
|
private resizeObserver?;
|
|
720
|
+
private intersectionObserver?;
|
|
711
721
|
constructor(ref: ElementRef, cdr: ChangeDetectorRef);
|
|
712
722
|
ngAfterViewInit(): void;
|
|
713
723
|
ngOnDestroy(): void;
|
|
@@ -721,7 +731,7 @@ declare class ChartComponent implements OnChanges, AfterViewInit, OnDestroy {
|
|
|
721
731
|
private buildOptions;
|
|
722
732
|
private resolvePalette;
|
|
723
733
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
724
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "fx-ui-chart", never, { "type": { "alias": "type"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "chartClick": "chartClick"; "chartInit": "chartInit"; }, never, never, false, never>;
|
|
734
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "fx-ui-chart", never, { "type": { "alias": "type"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "pieLegendAlign": { "alias": "pieLegendAlign"; "required": false; }; "pieLegendPosition": { "alias": "pieLegendPosition"; "required": false; }; "showPieLabel": { "alias": "showPieLabel"; "required": false; }; "labelFontFamily": { "alias": "labelFontFamily"; "required": false; }; }, { "chartClick": "chartClick"; "chartInit": "chartInit"; }, never, never, false, never>;
|
|
725
735
|
}
|
|
726
736
|
|
|
727
737
|
declare class SliderComponent extends FxComponent<any> implements AfterViewInit {
|
|
@@ -850,6 +860,13 @@ declare class TreeDiagram implements AfterViewInit, OnDestroy {
|
|
|
850
860
|
static ɵcmp: i0.ɵɵComponentDeclaration<TreeDiagram, "fx-ui-tree-diagram", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
|
|
851
861
|
}
|
|
852
862
|
|
|
863
|
+
declare class TableCell {
|
|
864
|
+
loading: boolean;
|
|
865
|
+
skeletonClass: string;
|
|
866
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableCell, never>;
|
|
867
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableCell, "fx-ui-table-cell", never, { "loading": { "alias": "loading"; "required": true; }; "skeletonClass": { "alias": "skeletonClass"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
868
|
+
}
|
|
869
|
+
|
|
853
870
|
declare class ConfirmationDialogComponent {
|
|
854
871
|
private ref;
|
|
855
872
|
bindings: any;
|
|
@@ -876,9 +893,9 @@ declare const MY_MOMENT_FORMATS: {
|
|
|
876
893
|
};
|
|
877
894
|
declare class UiModule {
|
|
878
895
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiModule, never>;
|
|
879
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<UiModule, [typeof InputComponent, typeof SelectComponent, typeof RadioButtonComponent, typeof CheckboxComponent, typeof DndUploadComponent, typeof ButtonComponent, typeof RadioButtonToggleComponent, typeof DatetimePicker, typeof LoadingPanel, typeof SearchBarComponent, typeof TabGroupComponent, typeof TabComponent, typeof HeroIconComponent, typeof ToastComponent, typeof ToastContainerComponent, typeof TagComponent, typeof ChartComponent, typeof SliderComponent, typeof SwitchComponent, typeof RichTextAreaComponent, typeof SkeletonTableLoadingComponent, typeof FlowConnection, typeof CircleProgressBar, typeof TreeDiagram, typeof ConfirmationDialogComponent], [typeof
|
|
896
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UiModule, [typeof InputComponent, typeof SelectComponent, typeof RadioButtonComponent, typeof CheckboxComponent, typeof DndUploadComponent, typeof ButtonComponent, typeof RadioButtonToggleComponent, typeof DatetimePicker, typeof LoadingPanel, typeof SearchBarComponent, typeof TabGroupComponent, typeof TabComponent, typeof HeroIconComponent, typeof ToastComponent, typeof ToastContainerComponent, typeof TagComponent, typeof ChartComponent, typeof SliderComponent, typeof SwitchComponent, typeof RichTextAreaComponent, typeof SkeletonTableLoadingComponent, typeof FlowConnection, typeof CircleProgressBar, typeof TreeDiagram, typeof TableCell, typeof ConfirmationDialogComponent], [typeof i27.CommonModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.OwlDateTimeModule, typeof i29.OwlNativeDateTimeModule, typeof i30.OwlMomentDateTimeModule, typeof HasPermissionDirective, typeof TrimOnBlurDirective, typeof i33.NgHeroiconsModule, typeof i34.VflowComponent, typeof i34.HandleComponent, typeof i34.ResizableComponent, typeof i34.SelectableDirective, typeof i34.MiniMapComponent, typeof i34.NodeToolbarComponent, typeof i34.CustomTemplateEdgeComponent, typeof i34.DragHandleDirective, typeof i34.ConnectionControllerDirective, typeof i34.NodeHtmlTemplateDirective, typeof i34.NodeSvgTemplateDirective, typeof i34.GroupNodeTemplateDirective, typeof i34.EdgeLabelHtmlTemplateDirective, typeof i34.EdgeTemplateDirective, typeof i34.ConnectionTemplateDirective, typeof i34.HandleTemplateDirective, typeof i35.NgxEchartsModule, typeof i36.MatSelectModule, typeof i37.MatRadioModule, typeof i38.MatButtonModule, typeof i39.MatIconModule, typeof i40.MatPaginatorModule, typeof i41.MatTableModule, typeof i42.MatSnackBarModule, typeof i43.MatDialogModule, typeof i44.MatCheckboxModule, typeof i45.MatCardModule, typeof i46.MatDatepickerModule, typeof i47.MatTimepickerModule, typeof i48.MatBadgeModule, typeof i49.MatExpansionModule, typeof i50.MatFormFieldModule, typeof i51.MatMenuModule], [typeof InputComponent, typeof SelectComponent, typeof RadioButtonComponent, typeof CheckboxComponent, typeof DndUploadComponent, typeof ButtonComponent, typeof RadioButtonToggleComponent, typeof DatetimePicker, typeof LoadingPanel, typeof SearchBarComponent, typeof TabGroupComponent, typeof TabComponent, typeof HeroIconComponent, typeof ToastComponent, typeof ToastContainerComponent, typeof TagComponent, typeof ChartComponent, typeof SliderComponent, typeof SwitchComponent, typeof RichTextAreaComponent, typeof SkeletonTableLoadingComponent, typeof FlowConnection, typeof CircleProgressBar, typeof TreeDiagram, typeof TableCell, typeof ConfirmationDialogComponent, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.OwlDateTimeModule, typeof i29.OwlNativeDateTimeModule, typeof HasPermissionDirective, typeof i33.NgHeroiconsModule, typeof i36.MatSelectModule, typeof i37.MatRadioModule, typeof i38.MatButtonModule, typeof i39.MatIconModule, typeof i40.MatPaginatorModule, typeof i41.MatTableModule, typeof i42.MatSnackBarModule, typeof i43.MatDialogModule, typeof i44.MatCheckboxModule, typeof i45.MatCardModule, typeof i46.MatDatepickerModule, typeof i47.MatTimepickerModule, typeof i48.MatBadgeModule, typeof i49.MatExpansionModule, typeof i50.MatFormFieldModule, typeof i51.MatMenuModule]>;
|
|
880
897
|
static ɵinj: i0.ɵɵInjectorDeclaration<UiModule>;
|
|
881
898
|
}
|
|
882
899
|
|
|
883
|
-
export { AuthInterceptor, AuthStateService, BaseComponent, BaseDialogComponent, BaseResolver, BaseTableComponent, BreadcrumbService, ButtonComponent, ChartComponent, CheckboxComponent, CircleProgressBar, ConfirmationDialogComponent, DatetimePicker, DndUploadComponent, FlowConnection, FxLoadingService, FxStorageService, FxToastrService, FxUtils, HasPermissionDirective, HeroIconComponent, HttpLoaderFactory, HttpWrapper, InputComponent, LoadingPanel, MY_MOMENT_FORMATS, PermissionGuard, PermissionService, QuillStyleLoaderService, RadioButtonComponent, RadioButtonToggleComponent, RichTextAreaComponent, SearchBarComponent, SelectComponent, SkeletonTableLoadingComponent, SliderComponent, SwitchComponent, TabComponent, TabGroupComponent, TagComponent, ThemeService, ToastComponent, ToastContainerComponent, TranslationModule, TranslationService, TreeDiagram, TrimOnBlurDirective, UiModule };
|
|
900
|
+
export { AuthInterceptor, AuthStateService, BaseComponent, BaseDialogComponent, BaseResolver, BaseTableComponent, BreadcrumbService, ButtonComponent, ChartComponent, CheckboxComponent, CircleProgressBar, ConfirmationDialogComponent, DatetimePicker, DndUploadComponent, FlowConnection, FxLoadingService, FxStorageService, FxToastrService, FxUtils, HasPermissionDirective, HeroIconComponent, HttpLoaderFactory, HttpWrapper, InputComponent, LoadingPanel, MY_MOMENT_FORMATS, PermissionGuard, PermissionService, QuillStyleLoaderService, RadioButtonComponent, RadioButtonToggleComponent, RichTextAreaComponent, SearchBarComponent, SelectComponent, SkeletonTableLoadingComponent, SliderComponent, SwitchComponent, TabComponent, TabGroupComponent, TableCell, TagComponent, ThemeService, ToastComponent, ToastContainerComponent, TranslationModule, TranslationService, TreeDiagram, TrimOnBlurDirective, UiModule };
|
|
884
901
|
export type { Breadcrumb, IChartType, IRadioButton, TableResult, TagType, ToastData, TreeNode, UploadResult };
|
package/package.json
CHANGED
|
@@ -113,3 +113,18 @@
|
|
|
113
113
|
.fade-out-animation {
|
|
114
114
|
animation: fade-out 0.4s ease-out forwards;
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
@keyframes pulse-glow {
|
|
118
|
+
0%,
|
|
119
|
+
100% {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
filter: brightness(1);
|
|
122
|
+
}
|
|
123
|
+
50% {
|
|
124
|
+
opacity: 0.7;
|
|
125
|
+
filter: brightness(1.4);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
.animate-pulse-glow {
|
|
129
|
+
animation: pulse-glow 3s ease-in-out infinite;
|
|
130
|
+
}
|
|
@@ -104,10 +104,6 @@
|
|
|
104
104
|
.mdc-data-table__cell {
|
|
105
105
|
border-left: 1px solid rgb(var(--border-default)) !important;
|
|
106
106
|
background-color: rgb(var(--bg-primary)) !important;
|
|
107
|
-
/* padding-top: 8px !important;
|
|
108
|
-
padding-bottom: 8px !important;
|
|
109
|
-
padding-left: 16px !important;
|
|
110
|
-
padding-right: 16px !important; */
|
|
111
107
|
font-family: 'BeVietnamPro';
|
|
112
108
|
}
|
|
113
109
|
|
|
@@ -413,25 +409,12 @@ input[type='password'] {
|
|
|
413
409
|
}
|
|
414
410
|
/* progress bar */
|
|
415
411
|
.progress-bar-container {
|
|
416
|
-
@apply bg-bg-hover mt-semi rounded-
|
|
412
|
+
@apply bg-bg-hover mt-semi rounded-md h-1.5 overflow-hidden shadow-inner;
|
|
417
413
|
}
|
|
418
414
|
.progress-bar-buffer {
|
|
419
|
-
@apply h-1.5 bg-primary rounded-
|
|
420
|
-
}
|
|
421
|
-
@keyframes pulse-glow {
|
|
422
|
-
0%,
|
|
423
|
-
100% {
|
|
424
|
-
opacity: 1;
|
|
425
|
-
filter: brightness(1);
|
|
426
|
-
}
|
|
427
|
-
50% {
|
|
428
|
-
opacity: 0.7;
|
|
429
|
-
filter: brightness(1.4);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
.animate-pulse-glow {
|
|
433
|
-
animation: pulse-glow 3s ease-in-out infinite;
|
|
415
|
+
@apply h-1.5 bg-primary rounded-md transition-all duration-700 ease-in-out;
|
|
434
416
|
}
|
|
417
|
+
|
|
435
418
|
/* radio button */
|
|
436
419
|
.radio-container {
|
|
437
420
|
@apply w-large h-large flex items-center justify-center rounded-full border;
|
|
@@ -485,3 +468,6 @@ input[type='password'] {
|
|
|
485
468
|
rgb(var(--gradient-primary-end))
|
|
486
469
|
) border-box;
|
|
487
470
|
}
|
|
471
|
+
.skeleton-load {
|
|
472
|
+
@apply rounded bg-gray-200 animate-pulse motion-reduce:animate-none;
|
|
473
|
+
}
|
package/src/lib/styles/theme.css
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<div class="chart-wrapper" [style.height]="height" [class.loading]="loading">
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<ng-container *ngIf="canInit">
|
|
3
|
+
<div
|
|
4
|
+
echarts
|
|
5
|
+
[options]="chartOptions"
|
|
6
|
+
(chartInit)="onChartInit($event)"
|
|
7
|
+
(chartClick)="onChartClick($event)"
|
|
8
|
+
class="w-full h-full">
|
|
9
|
+
</div>
|
|
10
|
+
</ng-container>
|
|
9
11
|
|
|
10
12
|
<div class="chart-loader" *ngIf="loading">
|
|
11
13
|
<span class="txt-default">Loading...</span>
|
|
12
14
|
</div>
|
|
13
|
-
</div>
|
|
15
|
+
</div>
|
package/theme.css
CHANGED