@fxlt/common-ui 0.0.3 → 0.0.4-beta1

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/index.d.ts CHANGED
@@ -1,41 +1,41 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, Injector, ApplicationRef, OnInit, AfterViewInit, ChangeDetectorRef, Type, EventEmitter, ModuleWithProviders, TemplateRef, ViewContainerRef, ElementRef, AfterContentInit, QueryList, Renderer2, OnChanges } from '@angular/core';
3
- import * as i38 from '@angular/material/paginator';
2
+ import { OnDestroy, Injector, ApplicationRef, OnInit, AfterViewInit, ChangeDetectorRef, Type, EventEmitter, ModuleWithProviders, TemplateRef, ViewContainerRef, ElementRef, AfterContentInit, QueryList, Renderer2, OnChanges, NgZone } from '@angular/core';
3
+ import * as i39 from '@angular/material/paginator';
4
4
  import { MatPaginator } from '@angular/material/paginator';
5
- import * as i39 from '@angular/material/table';
5
+ import * as i40 from '@angular/material/table';
6
6
  import { MatTableDataSource, MatTable } from '@angular/material/table';
7
7
  import { HttpClient, HttpEvent, HttpErrorResponse, HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
8
8
  import * as rxjs from 'rxjs';
9
9
  import { Observable, Subject } from 'rxjs';
10
- import * as i26 from '@angular/forms';
10
+ import * as i27 from '@angular/forms';
11
11
  import { NgForm, NgControl, ControlValueAccessor, ValidationErrors } from '@angular/forms';
12
- import * as i41 from '@angular/material/dialog';
12
+ import * as i42 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 i32 from 'ngx-vflow';
19
+ import * as i33 from 'ngx-vflow';
20
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';
21
+ import * as i26 from '@angular/common';
22
+ import * as i28 from '@danielmoncada/angular-datetime-picker';
23
+ import * as i29 from '@danielmoncada/angular-datetime-picker-moment-adapter';
24
+ import * as i32 from '@dimaslz/ng-heroicons';
25
+ import * as i34 from 'ngx-echarts';
26
+ import * as i35 from '@angular/material/select';
27
+ import * as i36 from '@angular/material/radio';
28
+ import * as i37 from '@angular/material/button';
29
+ import * as i38 from '@angular/material/icon';
30
+ import * as i41 from '@angular/material/snack-bar';
31
+ import * as i43 from '@angular/material/checkbox';
32
+ import * as i44 from '@angular/material/card';
33
+ import * as i45 from '@angular/material/datepicker';
34
+ import * as i46 from '@angular/material/timepicker';
35
+ import * as i47 from '@angular/material/badge';
36
+ import * as i48 from '@angular/material/expansion';
37
+ import * as i49 from '@angular/material/form-field';
38
+ import * as i50 from '@angular/material/menu';
39
39
 
40
40
  declare abstract class BaseComponent implements OnDestroy {
41
41
  protected injector: Injector;
@@ -806,6 +806,33 @@ declare class CircleProgressBar {
806
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
807
  }
808
808
 
809
+ interface TreeNode {
810
+ id: string;
811
+ label: string;
812
+ status?: string;
813
+ children?: TreeNode[];
814
+ }
815
+ declare class TreeDiagram implements AfterViewInit, OnDestroy {
816
+ private zone;
817
+ private cdr;
818
+ data: any;
819
+ container: ElementRef;
820
+ root: ElementRef;
821
+ children: QueryList<ElementRef>;
822
+ lines: any[];
823
+ svgWidth: number;
824
+ svgHeight: number;
825
+ private resizeObserver;
826
+ private rafId?;
827
+ constructor(zone: NgZone, cdr: ChangeDetectorRef);
828
+ ngAfterViewInit(): void;
829
+ ngOnDestroy(): void;
830
+ private scheduleDraw;
831
+ private drawLines;
832
+ static ɵfac: i0.ɵɵFactoryDeclaration<TreeDiagram, never>;
833
+ static ɵcmp: i0.ɵɵComponentDeclaration<TreeDiagram, "fx-ui-tree-diagram", never, { "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
834
+ }
835
+
809
836
  declare class ConfirmationDialogComponent {
810
837
  private ref;
811
838
  bindings: any;
@@ -832,9 +859,9 @@ declare const MY_MOMENT_FORMATS: {
832
859
  };
833
860
  declare class UiModule {
834
861
  static ɵfac: i0.ɵɵFactoryDeclaration<UiModule, never>;
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]>;
862
+ 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 i26.CommonModule, typeof i27.FormsModule, typeof i27.ReactiveFormsModule, typeof i28.OwlDateTimeModule, typeof i28.OwlNativeDateTimeModule, typeof i29.OwlMomentDateTimeModule, typeof HasPermissionDirective, typeof TrimOnBlurDirective, typeof i32.NgHeroiconsModule, typeof i33.VflowComponent, typeof i33.HandleComponent, typeof i33.ResizableComponent, typeof i33.SelectableDirective, typeof i33.MiniMapComponent, typeof i33.NodeToolbarComponent, typeof i33.CustomTemplateEdgeComponent, typeof i33.DragHandleDirective, typeof i33.ConnectionControllerDirective, typeof i33.NodeHtmlTemplateDirective, typeof i33.NodeSvgTemplateDirective, typeof i33.GroupNodeTemplateDirective, typeof i33.EdgeLabelHtmlTemplateDirective, typeof i33.EdgeTemplateDirective, typeof i33.ConnectionTemplateDirective, typeof i33.HandleTemplateDirective, typeof i34.NgxEchartsModule, typeof i35.MatSelectModule, typeof i36.MatRadioModule, typeof i37.MatButtonModule, typeof i38.MatIconModule, typeof i39.MatPaginatorModule, typeof i40.MatTableModule, typeof i41.MatSnackBarModule, typeof i42.MatDialogModule, typeof i43.MatCheckboxModule, typeof i44.MatCardModule, typeof i45.MatDatepickerModule, typeof i46.MatTimepickerModule, typeof i47.MatBadgeModule, typeof i48.MatExpansionModule, typeof i49.MatFormFieldModule, typeof i50.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 ConfirmationDialogComponent, typeof i27.FormsModule, typeof i27.ReactiveFormsModule, typeof i28.OwlDateTimeModule, typeof i28.OwlNativeDateTimeModule, typeof HasPermissionDirective, typeof i32.NgHeroiconsModule, typeof i35.MatSelectModule, typeof i36.MatRadioModule, typeof i37.MatButtonModule, typeof i38.MatIconModule, typeof i39.MatPaginatorModule, typeof i40.MatTableModule, typeof i41.MatSnackBarModule, typeof i42.MatDialogModule, typeof i43.MatCheckboxModule, typeof i44.MatCardModule, typeof i45.MatDatepickerModule, typeof i46.MatTimepickerModule, typeof i47.MatBadgeModule, typeof i48.MatExpansionModule, typeof i49.MatFormFieldModule, typeof i50.MatMenuModule]>;
836
863
  static ɵinj: i0.ɵɵInjectorDeclaration<UiModule>;
837
864
  }
838
865
 
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 };
840
- export type { Breadcrumb, IChartType, IRadioButton, TableResult, TagType, ToastData, UploadResult };
866
+ 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, TreeDiagram, TrimOnBlurDirective, UiModule };
867
+ export type { Breadcrumb, IChartType, IRadioButton, TableResult, TagType, ToastData, TreeNode, UploadResult };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fxlt/common-ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.4-beta1",
4
4
  "license": "MIT",
5
5
  "main": "bundles/ui.umd.js",
6
6
  "module": "fesm2022/fxlt-common-ui.mjs",
@@ -166,6 +166,58 @@ input[type='password'] {
166
166
  }
167
167
 
168
168
  /* system style */
169
+ .txt-heading-03 {
170
+ @apply font-semibold text-2xl tracking-normal leading-10 text-text-primary;
171
+ }
172
+ .txt-heading-04 {
173
+ @apply font-semibold text-xl tracking-normal leading-7 text-text-primary;
174
+ }
175
+ .txt-heading-05 {
176
+ @apply font-semibold text-lg tracking-normal leading-7 text-text-primary;
177
+ }
178
+ .txt-heading-06 {
179
+ @apply font-semibold text-base tracking-normal leading-6 text-text-primary;
180
+ }
181
+ .txt-heading-07 {
182
+ @apply font-semibold text-sm tracking-normal leading-5 text-text-primary;
183
+ }
184
+ .txt-heading-compact-02 {
185
+ @apply font-semibold text-sm tracking-normal leading-5 text-text-primary;
186
+ }
187
+ .txt-body-compact-01 {
188
+ @apply font-normal text-sm tracking-normal leading-5 text-text-primary;
189
+ }
190
+ .txt-body-01 {
191
+ @apply font-normal text-sm tracking-normal leading-5 text-text-primary;
192
+ }
193
+ .txt-body-02 {
194
+ @apply font-normal text-base tracking-normal leading-6 text-text-primary;
195
+ }
196
+ .txt-body-medium-01 {
197
+ @apply font-medium text-sm tracking-normal leading-5 text-text-primary;
198
+ }
199
+ .txt-body-medium-02 {
200
+ @apply font-medium text-base tracking-normal leading-6 text-text-primary;
201
+ }
202
+ .txt-body-p-bold {
203
+ @apply font-semibold text-sm tracking-normal leading-5 text-text-primary;
204
+ }
205
+ .txt-body-p-normal {
206
+ @apply font-normal text-sm tracking-normal leading-5 text-text-primary;
207
+ }
208
+ .txt-utility-caption {
209
+ @apply font-normal text-xs tracking-normal leading-4 text-text-primary;
210
+ }
211
+ .txt-utility-button {
212
+ @apply font-semibold text-sm tracking-normal leading-5 text-text-primary;
213
+ }
214
+ .txt-utility-description {
215
+ @apply font-light text-xs tracking-normal leading-4 text-text-secondary;
216
+ }
217
+ .txt-tag-label {
218
+ @apply font-medium text-xs;
219
+ }
220
+
169
221
  .txt-page-title {
170
222
  @apply text-3xl text-text-primary font-semibold tracking-normal leading-10;
171
223
  }
@@ -190,9 +242,6 @@ input[type='password'] {
190
242
  .txt-section-header {
191
243
  @apply mb-1 text-xl text-text-primary font-semibold tracking-normal leading-7;
192
244
  }
193
- .txt-dialog-header {
194
- @apply text-xl text-text-primary font-semibold tracking-normal leading-7 px-xl py-semi;
195
- }
196
245
  .txt-section-subtitle {
197
246
  @apply text-sm text-text-secondary font-normal tracking-normal;
198
247
  }
@@ -393,9 +442,12 @@ input[type='password'] {
393
442
  .table-status-col {
394
443
  width: 200px;
395
444
  }
445
+ .table-empty {
446
+ @apply w-full h-[100px] flex items-center justify-center;
447
+ }
396
448
  .dialog-container {
397
449
  @apply rounded-lg border border-border-default;
398
450
  }
399
- .table-empty {
400
- @apply w-full h-[100px] flex items-center justify-center;
451
+ .dialog-header {
452
+ @apply px-xl py-semi;
401
453
  }
@@ -1,4 +1,4 @@
1
- .light_theme {
1
+ :root {
2
2
  --bg-primary: 255 255 255;
3
3
  --primary: 236 25 56;
4
4
  --success: 15 140 96;
@@ -30,7 +30,7 @@
30
30
  --shadow-color: 0 0 0;
31
31
  }
32
32
 
33
- :root {
33
+ /* :root {
34
34
  --bg-primary: 12 14 18;
35
35
  --primary: 236 25 56;
36
36
  --success: 76 175 80;
@@ -60,4 +60,4 @@
60
60
  --border-secondary-hover: 0 199 205;
61
61
  --bg-secondary-hover: 6 59 70;
62
62
  --shadow-color: 255 255 255;
63
- }
63
+ } */
@@ -0,0 +1,40 @@
1
+ <div class="relative p-8" #container>
2
+
3
+ <!-- ROOT -->
4
+ <div
5
+ #root
6
+ class="mx-auto w-fit bg-blue-600 text-white px-7 py-3 rounded-md font-semibold text-center"
7
+ >
8
+ {{ data.label }}
9
+ </div>
10
+
11
+ <!-- CHILDREN -->
12
+ <div class="mt-16 flex justify-center gap-16">
13
+ <div
14
+ *ngFor="let child of data.children"
15
+ #child
16
+ class="w-48 bg-rose-600 text-white px-4 py-4 rounded-lg text-center"
17
+ >
18
+ <div class="font-semibold text-lg">{{ child.label }}</div>
19
+ <div class="mt-1 text-sm opacity-90">{{ child.status }}</div>
20
+ </div>
21
+ </div>
22
+
23
+ <!-- SVG CONNECTORS -->
24
+ <svg
25
+ class="absolute inset-0 pointer-events-none"
26
+ [attr.width]="svgWidth"
27
+ [attr.height]="svgHeight"
28
+ >
29
+ <line
30
+ *ngFor="let line of lines"
31
+ [attr.x1]="line.x1"
32
+ [attr.y1]="line.y1"
33
+ [attr.x2]="line.x2"
34
+ [attr.y2]="line.y2"
35
+ stroke="#1f2937"
36
+ stroke-width="2"
37
+ />
38
+ </svg>
39
+
40
+ </div>
package/theme.css CHANGED
@@ -1,4 +1,4 @@
1
- .light_theme {
1
+ :root {
2
2
  --bg-primary: 255 255 255;
3
3
  --primary: 236 25 56;
4
4
  --success: 15 140 96;
@@ -30,7 +30,7 @@
30
30
  --shadow-color: 0 0 0;
31
31
  }
32
32
 
33
- :root {
33
+ /* :root {
34
34
  --bg-primary: 12 14 18;
35
35
  --primary: 236 25 56;
36
36
  --success: 76 175 80;
@@ -60,4 +60,4 @@
60
60
  --border-secondary-hover: 0 199 205;
61
61
  --bg-secondary-hover: 6 59 70;
62
62
  --shadow-color: 255 255 255;
63
- }
63
+ } */