@fxlt/common-ui 0.0.3-rc1 → 0.0.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.
- package/components.css +3 -0
- package/fesm2022/fxlt-common-ui.mjs +147 -46
- package/fesm2022/fxlt-common-ui.mjs.map +1 -1
- package/index.d.ts +59 -29
- package/package.json +4 -2
- package/src/lib/styles/components.css +3 -0
- package/src/lib/ui/components/circle-progress-bar/circle-progress-bar.component.html +44 -0
- package/src/lib/ui/components/datetime-picker/datetime-picker.component.html +8 -5
- package/src/lib/ui/components/flow-connection/flow-connection.component.html +10 -0
package/index.d.ts
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, Injector, ApplicationRef, OnInit, AfterViewInit, ChangeDetectorRef, Type, EventEmitter, ModuleWithProviders, TemplateRef, ViewContainerRef, ElementRef, AfterContentInit, QueryList, Renderer2, OnChanges } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i38 from '@angular/material/paginator';
|
|
4
4
|
import { MatPaginator } from '@angular/material/paginator';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i39 from '@angular/material/table';
|
|
6
6
|
import { MatTableDataSource, MatTable } from '@angular/material/table';
|
|
7
|
-
import { HttpClient, HttpErrorResponse, HttpInterceptor, HttpRequest, HttpHandler
|
|
7
|
+
import { HttpClient, HttpEvent, HttpErrorResponse, HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
|
|
8
8
|
import * as rxjs from 'rxjs';
|
|
9
|
-
import {
|
|
10
|
-
import * as
|
|
9
|
+
import { Observable, Subject } from 'rxjs';
|
|
10
|
+
import * as i26 from '@angular/forms';
|
|
11
11
|
import { NgForm, NgControl, ControlValueAccessor, ValidationErrors } from '@angular/forms';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i41 from '@angular/material/dialog';
|
|
13
13
|
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
14
14
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
15
15
|
import * as i1 from '@ngx-translate/core';
|
|
16
16
|
import { TranslateService } from '@ngx-translate/core';
|
|
17
17
|
import { CanActivate, Router } from '@angular/router';
|
|
18
18
|
import { EChartsOption } from 'echarts';
|
|
19
|
-
import * as
|
|
20
|
-
import
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import * as i31 from '@
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
27
|
-
import * as
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
30
|
-
import * as i40 from '@angular/material/
|
|
31
|
-
import * as
|
|
32
|
-
import * as
|
|
33
|
-
import * as
|
|
34
|
-
import * as
|
|
19
|
+
import * as i32 from 'ngx-vflow';
|
|
20
|
+
import { Node, Edge, Connection } from 'ngx-vflow';
|
|
21
|
+
import * as i25 from '@angular/common';
|
|
22
|
+
import * as i27 from '@danielmoncada/angular-datetime-picker';
|
|
23
|
+
import * as i28 from '@danielmoncada/angular-datetime-picker-moment-adapter';
|
|
24
|
+
import * as i31 from '@dimaslz/ng-heroicons';
|
|
25
|
+
import * as i33 from 'ngx-echarts';
|
|
26
|
+
import * as i34 from '@angular/material/select';
|
|
27
|
+
import * as i35 from '@angular/material/radio';
|
|
28
|
+
import * as i36 from '@angular/material/button';
|
|
29
|
+
import * as i37 from '@angular/material/icon';
|
|
30
|
+
import * as i40 from '@angular/material/snack-bar';
|
|
31
|
+
import * as i42 from '@angular/material/checkbox';
|
|
32
|
+
import * as i43 from '@angular/material/card';
|
|
33
|
+
import * as i44 from '@angular/material/datepicker';
|
|
34
|
+
import * as i45 from '@angular/material/timepicker';
|
|
35
|
+
import * as i46 from '@angular/material/badge';
|
|
36
|
+
import * as i47 from '@angular/material/expansion';
|
|
37
|
+
import * as i48 from '@angular/material/form-field';
|
|
38
|
+
import * as i49 from '@angular/material/menu';
|
|
35
39
|
|
|
36
40
|
declare abstract class BaseComponent implements OnDestroy {
|
|
37
41
|
protected injector: Injector;
|
|
@@ -50,6 +54,7 @@ declare class HttpWrapper {
|
|
|
50
54
|
post(url: string, body?: any, options?: any): Promise<any>;
|
|
51
55
|
put(url: string, body: any, options?: any): Promise<any>;
|
|
52
56
|
delete(url: string, options?: any): Promise<any>;
|
|
57
|
+
upload(url: string, body: FormData, options?: any): Observable<HttpEvent<any>>;
|
|
53
58
|
search(params?: any): Promise<any>;
|
|
54
59
|
detail(params: any): Promise<any>;
|
|
55
60
|
remove(params?: any): Promise<any>;
|
|
@@ -516,6 +521,7 @@ declare class DndUploadComponent {
|
|
|
516
521
|
onFileSelected(event: Event): void;
|
|
517
522
|
private processFiles;
|
|
518
523
|
private onUpload;
|
|
524
|
+
private isAccepted;
|
|
519
525
|
static ɵfac: i0.ɵɵFactoryDeclaration<DndUploadComponent, never>;
|
|
520
526
|
static ɵcmp: i0.ɵɵComponentDeclaration<DndUploadComponent, "fx-ui-dnd-upload", never, { "multiple": { "alias": "multiple"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "maxSizeMB": { "alias": "maxSizeMB"; "required": false; }; "strictSize": { "alias": "strictSize"; "required": false; }; }, { "fileDrop": "fileDrop"; "fileClick": "fileClick"; "uploadComplete": "uploadComplete"; "uploadError": "uploadError"; }, never, never, false, never>;
|
|
521
527
|
}
|
|
@@ -553,24 +559,25 @@ declare class RadioButtonToggleComponent extends FxComponent<any> implements Aft
|
|
|
553
559
|
static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonToggleComponent, "fx-ui-radio-toggle, [fx-ui-radio-toggle]", never, { "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, never, false, never>;
|
|
554
560
|
}
|
|
555
561
|
|
|
556
|
-
declare class DatetimePicker extends FxComponent<any> implements AfterViewInit {
|
|
562
|
+
declare class DatetimePicker extends FxComponent<any> implements AfterViewInit, OnInit {
|
|
557
563
|
private ref;
|
|
558
564
|
label?: string;
|
|
559
565
|
placeholder: string;
|
|
560
566
|
required: boolean;
|
|
561
|
-
|
|
562
|
-
format: string;
|
|
567
|
+
type: any;
|
|
563
568
|
disabled: boolean;
|
|
564
569
|
errorMessages: ErrorMessages;
|
|
565
570
|
validateFn: (date: string) => ValidationErrors | null;
|
|
571
|
+
startAt: any;
|
|
566
572
|
constructor(ngControl: NgControl, ref: ChangeDetectorRef);
|
|
573
|
+
ngOnInit(): void;
|
|
567
574
|
ngAfterViewInit(): void;
|
|
568
575
|
setDisabledState?(isDisabled: boolean): void;
|
|
569
576
|
onBlur(): void;
|
|
570
577
|
writeValue(value: any): void;
|
|
571
578
|
onValueChange(date: any): void;
|
|
572
579
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatetimePicker, never>;
|
|
573
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePicker, "fx-ui-datetime-picker", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "
|
|
580
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatetimePicker, "fx-ui-datetime-picker", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "validateFn": { "alias": "validateFn"; "required": false; }; }, {}, never, never, false, never>;
|
|
574
581
|
}
|
|
575
582
|
|
|
576
583
|
declare class LoadingPanel {
|
|
@@ -776,6 +783,29 @@ declare class SkeletonTableLoadingComponent {
|
|
|
776
783
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonTableLoadingComponent, "fx-ui-skeleton-table-loading", never, { "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; }, {}, never, never, false, never>;
|
|
777
784
|
}
|
|
778
785
|
|
|
786
|
+
declare class FlowConnection {
|
|
787
|
+
nodes: Node[];
|
|
788
|
+
edges: Edge[];
|
|
789
|
+
backgroundColor: any;
|
|
790
|
+
view: any;
|
|
791
|
+
handleConnection(connection: Connection): void;
|
|
792
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowConnection, never>;
|
|
793
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowConnection, "fx-ui-flow-connection", never, { "nodes": { "alias": "nodes"; "required": false; }; "edges": { "alias": "edges"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "view": { "alias": "view"; "required": false; }; }, {}, never, never, false, never>;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
declare class CircleProgressBar {
|
|
797
|
+
percent: number;
|
|
798
|
+
showPercent: boolean;
|
|
799
|
+
readonly radius = 35;
|
|
800
|
+
readonly stroke = 10;
|
|
801
|
+
readonly normalizedRadius: number;
|
|
802
|
+
readonly circumference: number;
|
|
803
|
+
get dashOffset(): number;
|
|
804
|
+
get ariaLabel(): string;
|
|
805
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CircleProgressBar, never>;
|
|
806
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CircleProgressBar, "fx-ui-circle-progress-bar", never, { "percent": { "alias": "percent"; "required": false; }; "showPercent": { "alias": "showPercent"; "required": false; }; }, {}, never, never, false, never>;
|
|
807
|
+
}
|
|
808
|
+
|
|
779
809
|
declare class ConfirmationDialogComponent {
|
|
780
810
|
private ref;
|
|
781
811
|
bindings: any;
|
|
@@ -791,7 +821,7 @@ declare class ConfirmationDialogComponent {
|
|
|
791
821
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationDialogComponent, "fx-ui-confirmation-dialog", never, {}, {}, never, never, false, never>;
|
|
792
822
|
}
|
|
793
823
|
|
|
794
|
-
declare const
|
|
824
|
+
declare const MY_MOMENT_FORMATS: {
|
|
795
825
|
parseInput: string;
|
|
796
826
|
fullPickerInput: string;
|
|
797
827
|
datePickerInput: string;
|
|
@@ -802,9 +832,9 @@ declare const MY_FORMATS: {
|
|
|
802
832
|
};
|
|
803
833
|
declare class UiModule {
|
|
804
834
|
static ɵfac: i0.ɵɵFactoryDeclaration<UiModule, never>;
|
|
805
|
-
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 ConfirmationDialogComponent], [typeof
|
|
835
|
+
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 ConfirmationDialogComponent], [typeof i25.CommonModule, typeof i26.FormsModule, typeof i26.ReactiveFormsModule, typeof i27.OwlDateTimeModule, typeof i27.OwlNativeDateTimeModule, typeof i28.OwlMomentDateTimeModule, typeof HasPermissionDirective, typeof TrimOnBlurDirective, typeof i31.NgHeroiconsModule, typeof i32.VflowComponent, typeof i32.HandleComponent, typeof i32.ResizableComponent, typeof i32.SelectableDirective, typeof i32.MiniMapComponent, typeof i32.NodeToolbarComponent, typeof i32.CustomTemplateEdgeComponent, typeof i32.DragHandleDirective, typeof i32.ConnectionControllerDirective, typeof i32.NodeHtmlTemplateDirective, typeof i32.NodeSvgTemplateDirective, typeof i32.GroupNodeTemplateDirective, typeof i32.EdgeLabelHtmlTemplateDirective, typeof i32.EdgeTemplateDirective, typeof i32.ConnectionTemplateDirective, typeof i32.HandleTemplateDirective, typeof i33.NgxEchartsModule, typeof i34.MatSelectModule, typeof i35.MatRadioModule, typeof i36.MatButtonModule, typeof i37.MatIconModule, typeof i38.MatPaginatorModule, typeof i39.MatTableModule, typeof i40.MatSnackBarModule, typeof i41.MatDialogModule, typeof i42.MatCheckboxModule, typeof i43.MatCardModule, typeof i44.MatDatepickerModule, typeof i45.MatTimepickerModule, typeof i46.MatBadgeModule, typeof i47.MatExpansionModule, typeof i48.MatFormFieldModule, typeof i49.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 ConfirmationDialogComponent, typeof i26.FormsModule, typeof i26.ReactiveFormsModule, typeof i27.OwlDateTimeModule, typeof i27.OwlNativeDateTimeModule, typeof HasPermissionDirective, typeof i31.NgHeroiconsModule, typeof i34.MatSelectModule, typeof i35.MatRadioModule, typeof i36.MatButtonModule, typeof i37.MatIconModule, typeof i38.MatPaginatorModule, typeof i39.MatTableModule, typeof i40.MatSnackBarModule, typeof i41.MatDialogModule, typeof i42.MatCheckboxModule, typeof i43.MatCardModule, typeof i44.MatDatepickerModule, typeof i45.MatTimepickerModule, typeof i46.MatBadgeModule, typeof i47.MatExpansionModule, typeof i48.MatFormFieldModule, typeof i49.MatMenuModule]>;
|
|
806
836
|
static ɵinj: i0.ɵɵInjectorDeclaration<UiModule>;
|
|
807
837
|
}
|
|
808
838
|
|
|
809
|
-
export { AuthInterceptor, AuthStateService, BaseComponent, BaseDialogComponent, BaseResolver, BaseTableComponent, BreadcrumbService, ButtonComponent, ChartComponent, CheckboxComponent, ConfirmationDialogComponent, DatetimePicker, DndUploadComponent, FxLoadingService, FxStorageService, FxToastrService, FxUtils, HasPermissionDirective, HeroIconComponent, HttpLoaderFactory, HttpWrapper, InputComponent, LoadingPanel,
|
|
839
|
+
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, ToastComponent, ToastContainerComponent, TranslationModule, TranslationService, TrimOnBlurDirective, UiModule };
|
|
810
840
|
export type { Breadcrumb, IChartType, IRadioButton, TableResult, TagType, ToastData, UploadResult };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fxlt/common-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "bundles/ui.umd.js",
|
|
6
6
|
"module": "fesm2022/fxlt-common-ui.mjs",
|
|
@@ -27,11 +27,13 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"tslib": "^2.3.0",
|
|
29
29
|
"@danielmoncada/angular-datetime-picker": "^20.0.0",
|
|
30
|
+
"@danielmoncada/angular-datetime-picker-moment-adapter": "^7.0.1",
|
|
30
31
|
"echarts": "^6.0.0",
|
|
31
32
|
"ngx-echarts": "^20.0.2",
|
|
32
33
|
"d3": "^7.9.0",
|
|
33
34
|
"@dimaslz/ng-heroicons": "^1.19.1",
|
|
34
|
-
"quill": "^2.0.3"
|
|
35
|
+
"quill": "^2.0.3",
|
|
36
|
+
"ngx-vflow": "^1.16.2"
|
|
35
37
|
},
|
|
36
38
|
"exports": {
|
|
37
39
|
"./SpaceMono-Regular.ttf": "./SpaceMono-Regular.ttf",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<div class="flex items-center justify-center w-full h-full">
|
|
2
|
+
<svg
|
|
3
|
+
class="transform -rotate-90 block"
|
|
4
|
+
[attr.viewBox]="'0 0 ' + radius * 2 + ' ' + radius * 2"
|
|
5
|
+
width="100%"
|
|
6
|
+
height="100%"
|
|
7
|
+
>
|
|
8
|
+
<circle
|
|
9
|
+
class="opacity-20"
|
|
10
|
+
[attr.cx]="radius"
|
|
11
|
+
[attr.cy]="radius"
|
|
12
|
+
[attr.r]="normalizedRadius"
|
|
13
|
+
[attr.stroke-width]="stroke"
|
|
14
|
+
fill="transparent"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
></circle>
|
|
17
|
+
|
|
18
|
+
<circle
|
|
19
|
+
class="stroke-current"
|
|
20
|
+
[attr.cx]="radius"
|
|
21
|
+
[attr.cy]="radius"
|
|
22
|
+
[attr.r]="normalizedRadius"
|
|
23
|
+
[attr.stroke-width]="stroke"
|
|
24
|
+
fill="transparent"
|
|
25
|
+
stroke-linecap="round"
|
|
26
|
+
[attr.stroke-dasharray]="circumference"
|
|
27
|
+
[attr.stroke-dashoffset]="dashOffset"
|
|
28
|
+
style="transition: stroke-dashoffset 300ms linear"
|
|
29
|
+
></circle>
|
|
30
|
+
|
|
31
|
+
@if(showPercent){
|
|
32
|
+
<text
|
|
33
|
+
[attr.x]="radius"
|
|
34
|
+
[attr.y]="radius"
|
|
35
|
+
dominant-baseline="central"
|
|
36
|
+
text-anchor="middle"
|
|
37
|
+
class="text-xs font-medium"
|
|
38
|
+
fill="currentColor"
|
|
39
|
+
>
|
|
40
|
+
{{ percent }}%
|
|
41
|
+
</text>
|
|
42
|
+
}
|
|
43
|
+
</svg>
|
|
44
|
+
</div>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<div class="flex flex-col mb-4 w-full text-left">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
@if (label){
|
|
3
|
+
<label class="txt-field-label">
|
|
4
|
+
{{ label }}
|
|
5
|
+
<span *ngIf="required" class="txt-required">*</span>
|
|
6
|
+
</label>
|
|
7
|
+
}
|
|
6
8
|
|
|
7
9
|
<div class="relative">
|
|
8
10
|
<input
|
|
@@ -18,7 +20,8 @@
|
|
|
18
20
|
</div>
|
|
19
21
|
<owl-date-time
|
|
20
22
|
#picker
|
|
21
|
-
[
|
|
23
|
+
[startAt]="startAt"
|
|
24
|
+
[pickerType]="type"
|
|
22
25
|
(afterPickerClosed)="onValueChange($event)"
|
|
23
26
|
></owl-date-time>
|
|
24
27
|
<div *ngIf="invalid" class="txt-invalid">{{ getErrorMessage(label) }}</div>
|