@acrodata/gui 0.4.1 → 0.5.0

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.
@@ -4,6 +4,8 @@
4
4
  }
5
5
 
6
6
  .gui-field {
7
+ --mat-form-field-container-text-size: 12px;
8
+
7
9
  display: inline-flex;
8
10
  flex: 1;
9
11
  flex-wrap: wrap;
@@ -13,4 +15,51 @@
13
15
  width: 0;
14
16
  max-width: 100%;
15
17
  }
18
+
19
+ .mat-mdc-text-field-wrapper,
20
+ .mat-mdc-form-field-hint-wrapper {
21
+ position: relative;
22
+ padding: 0 8px;
23
+ border-radius: var(--mdc-filled-text-field-container-shape);
24
+
25
+ [dir='rtl'] & {
26
+ padding: 0 8px;
27
+ }
28
+ }
29
+
30
+ .mat-mdc-form-field-infix {
31
+ min-height: auto;
32
+ padding: 0 !important;
33
+ }
34
+
35
+ .mat-mdc-form-field-hint-spacer,
36
+ .mat-mdc-form-field-bottom-align::before,
37
+ .mdc-line-ripple {
38
+ display: none;
39
+ }
40
+
41
+ .mat-mdc-icon-button {
42
+ --mdc-icon-button-state-layer-size: 24px;
43
+ --mdc-icon-button-icon-size: 14px;
44
+
45
+ padding: 0;
46
+
47
+ .mat-mdc-button-touch-target {
48
+ width: var(--mdc-icon-button-state-layer-size);
49
+ height: var(--mdc-icon-button-state-layer-size);
50
+ }
51
+ }
52
+
53
+ // fix mat-form-field prefix icon
54
+ .mat-icon {
55
+ display: inline-flex;
56
+ justify-content: center;
57
+ align-items: center;
58
+ padding: 0 !important;
59
+
60
+ svg {
61
+ width: 14px;
62
+ height: 14px;
63
+ }
64
+ }
16
65
  }
@@ -1,7 +1,6 @@
1
1
  .gui-file-uploader {
2
2
  display: block;
3
3
  overflow: auto;
4
- flex: 1;
5
4
 
6
5
  .mat-mdc-form-field {
7
6
  width: 100%;
package/gui-form.d.ts CHANGED
@@ -23,6 +23,7 @@ export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
23
23
  formFields: GuiControl[];
24
24
  formSubscription: Subscription;
25
25
  controlSubscriptions: Subscription[];
26
+ uid: string;
26
27
  ngOnChanges(changes: SimpleChanges): void;
27
28
  ngOnInit(): void;
28
29
  ngOnDestroy(): void;
package/gui-form.scss CHANGED
@@ -1,5 +1,4 @@
1
1
  .gui-form {
2
- --mat-form-field-container-text-size: 12px;
3
2
  --mat-expansion-header-text-size: 12px;
4
3
  --mat-expansion-container-text-size: 12px;
5
4
  --mat-expansion-header-collapsed-state-height: 32px;
@@ -58,18 +57,6 @@
58
57
  padding: 0 12px;
59
58
  }
60
59
 
61
- .mat-icon {
62
- display: inline-flex;
63
- justify-content: center;
64
- align-items: center;
65
- padding: 0 !important;
66
-
67
- svg {
68
- width: 14px;
69
- height: 14px;
70
- }
71
- }
72
-
73
60
  .mat-mdc-icon-button {
74
61
  --mdc-icon-button-state-layer-size: 24px;
75
62
  --mdc-icon-button-icon-size: 14px;
@@ -80,29 +67,13 @@
80
67
  width: var(--mdc-icon-button-state-layer-size);
81
68
  height: var(--mdc-icon-button-state-layer-size);
82
69
  }
83
- }
84
-
85
- .mat-mdc-text-field-wrapper,
86
- .mat-mdc-form-field-hint-wrapper {
87
- position: relative;
88
- padding: 0 8px;
89
- border-radius: var(--mdc-filled-text-field-container-shape);
90
70
 
91
- [dir='rtl'] & {
92
- padding: 0 8px;
71
+ .mat-icon {
72
+ display: inline-flex;
73
+ justify-content: center;
74
+ align-items: center;
93
75
  }
94
76
  }
95
-
96
- .mat-mdc-form-field-infix {
97
- min-height: auto;
98
- padding: 0 !important;
99
- }
100
-
101
- .mat-mdc-form-field-hint-spacer,
102
- .mat-mdc-form-field-bottom-align::before,
103
- .mdc-line-ripple {
104
- display: none;
105
- }
106
77
  }
107
78
 
108
79
  .gui-list-item-heading {
@@ -1,21 +1,24 @@
1
- import { ChangeDetectorRef } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { MtxSelect } from '@ng-matero/extensions/select';
3
4
  import { GuiControl } from '../interface';
4
5
  import * as i0 from "@angular/core";
5
- export declare class GuiImageSelect implements ControlValueAccessor {
6
+ export declare class GuiImageSelect implements ControlValueAccessor, AfterViewInit {
6
7
  private cdr;
8
+ mtxSelect: MtxSelect;
7
9
  config: Partial<GuiControl>;
8
10
  disabled: boolean;
11
+ appendTo: string;
9
12
  value: unknown;
10
13
  private onChange;
11
14
  private onTouched;
12
15
  constructor(cdr: ChangeDetectorRef);
16
+ ngAfterViewInit(): void;
13
17
  writeValue(value: unknown): void;
14
18
  registerOnChange(fn: (value: unknown) => void): void;
15
19
  registerOnTouched(fn: () => void): void;
16
20
  setDisabledState(isDisabled: boolean): void;
17
21
  onValueChange(): void;
18
- onPanelOpened(): void;
19
22
  static ɵfac: i0.ɵɵFactoryDeclaration<GuiImageSelect, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<GuiImageSelect, "gui-image-select", never, { "config": { "alias": "config"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<GuiImageSelect, "gui-image-select", never, { "config": { "alias": "config"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; }, {}, never, never, false, never>;
21
24
  }
@@ -27,10 +27,8 @@
27
27
  }
28
28
  }
29
29
  }
30
- }
31
30
 
32
- .gui-form {
33
- .ng-dropdown-panel {
31
+ &.ng-dropdown-panel {
34
32
  .ng-dropdown-panel-items {
35
33
  .ng-option {
36
34
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrodata/gui",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "A lightweight GUI library for Angular",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,12 +31,12 @@
31
31
  }
32
32
  },
33
33
  "peerDependencies": {
34
- "@angular/cdk": ">=15.0.0",
35
- "@angular/common": ">=15.0.0",
36
- "@angular/core": ">=15.0.0",
37
- "@angular/forms": ">=15.0.0",
38
- "@angular/material": ">=15.0.0",
39
- "@ng-matero/extensions": ">=15.0.0"
34
+ "@angular/cdk": ">=16.0.0",
35
+ "@angular/common": ">=16.0.0",
36
+ "@angular/core": ">=16.0.0",
37
+ "@angular/forms": ">=16.0.0",
38
+ "@angular/material": ">=16.0.0",
39
+ "@ng-matero/extensions": ">=16.0.0"
40
40
  },
41
41
  "dependencies": {
42
42
  "tslib": "^2.3.0"