@acrodata/gui 0.3.1 → 0.4.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.
- package/esm2022/button-toggle/icon.mjs +4 -4
- package/esm2022/gui-form.mjs +31 -28
- package/esm2022/gui-icons.mjs +6 -1
- package/esm2022/interface.mjs +1 -1
- package/fesm2022/acrodata-gui.mjs +38 -30
- package/fesm2022/acrodata-gui.mjs.map +1 -1
- package/gui-form.d.ts +13 -18
- package/gui-form.scss +12 -4
- package/interface.d.ts +1 -0
- package/package.json +1 -1
package/gui-form.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FormArray, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { GuiControl, GuiFieldType, GuiFields, GuiTabsMode } from './interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
|
|
7
|
-
private cdr;
|
|
8
7
|
/**
|
|
9
8
|
* The form instance which allow to track model value and validation status.
|
|
10
9
|
*/
|
|
@@ -24,7 +23,6 @@ export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
|
|
|
24
23
|
formFields: GuiControl[];
|
|
25
24
|
formSubscription: Subscription;
|
|
26
25
|
controlSubscriptions: Subscription[];
|
|
27
|
-
constructor(cdr: ChangeDetectorRef);
|
|
28
26
|
ngOnChanges(changes: SimpleChanges): void;
|
|
29
27
|
ngOnInit(): void;
|
|
30
28
|
ngOnDestroy(): void;
|
|
@@ -36,31 +34,28 @@ export declare class GuiForm implements OnChanges, OnInit, OnDestroy {
|
|
|
36
34
|
* @param model The value of the form control
|
|
37
35
|
* @param defaultValue The default value of the form field
|
|
38
36
|
* @param parentType The type of the form field parent
|
|
39
|
-
* @param options The reactive form options
|
|
40
37
|
* @returns
|
|
41
38
|
*/
|
|
42
|
-
getFormFieldArray(form: FormGroup | FormArray, config?: GuiFields | GuiControl[], model?: Record<string, any>, defaultValue?: any, parentType?: GuiFieldType
|
|
43
|
-
onlySelf?: boolean;
|
|
44
|
-
emitEvent?: boolean;
|
|
45
|
-
}): GuiControl[];
|
|
39
|
+
getFormFieldArray(form: FormGroup | FormArray, config?: GuiFields | GuiControl[], model?: Record<string, any>, defaultValue?: any, parentType?: GuiFieldType): GuiControl[];
|
|
46
40
|
/**
|
|
47
41
|
* Add a tab item.
|
|
48
42
|
*
|
|
49
|
-
* @param e
|
|
50
|
-
* @param
|
|
51
|
-
* @param tabs
|
|
52
|
-
* @param
|
|
43
|
+
* @param e The mouse event
|
|
44
|
+
* @param formArray The reactive form instance
|
|
45
|
+
* @param tabs The config of the tabs field
|
|
46
|
+
* @param copy Whether to copy the current tab
|
|
47
|
+
* @param index The index of the tabs array
|
|
53
48
|
*/
|
|
54
|
-
addTab(e: MouseEvent,
|
|
49
|
+
addTab(e: MouseEvent, formArray: FormArray, tabs: GuiControl, copy?: boolean, index?: number): void;
|
|
55
50
|
/**
|
|
56
51
|
* Remove a tab item.
|
|
57
52
|
*
|
|
58
|
-
* @param e
|
|
59
|
-
* @param
|
|
60
|
-
* @param tabs
|
|
61
|
-
* @param index
|
|
53
|
+
* @param e The mouse event
|
|
54
|
+
* @param formArray The reactive form instance
|
|
55
|
+
* @param tabs The config of the tabs field
|
|
56
|
+
* @param index The index of the tabs array
|
|
62
57
|
*/
|
|
63
|
-
removeTab(e: MouseEvent,
|
|
58
|
+
removeTab(e: MouseEvent, formArray: FormArray, tabs: GuiControl, index?: number): void;
|
|
64
59
|
/**
|
|
65
60
|
* Change the display mode of tabs.
|
|
66
61
|
*
|
package/gui-form.scss
CHANGED
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
|
|
29
29
|
gui-field-label {
|
|
30
30
|
flex: 1;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
text-overflow: ellipsis;
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
}
|
|
@@ -104,10 +107,6 @@
|
|
|
104
107
|
padding: 0 12px;
|
|
105
108
|
line-height: 24px;
|
|
106
109
|
|
|
107
|
-
.gui-list-item-title {
|
|
108
|
-
flex: 1;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
110
|
&::before {
|
|
112
111
|
position: absolute;
|
|
113
112
|
left: 0;
|
|
@@ -118,6 +117,15 @@
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
|
|
120
|
+
.gui-list-item-title {
|
|
121
|
+
flex: 1;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
|
|
124
|
+
.gui-list-item-active & {
|
|
125
|
+
font-weight: bold;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
121
129
|
.gui-menu {
|
|
122
130
|
.mat-mdc-tab-header {
|
|
123
131
|
--mdc-tab-indicator-active-indicator-shape: 4px;
|
package/interface.d.ts
CHANGED