@mckit/form 19.0.39 → 20.0.2
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/fesm2022/mckit-form.mjs +130 -106
- package/fesm2022/mckit-form.mjs.map +1 -1
- package/index.d.ts +399 -5
- package/package.json +5 -5
- package/lib/components/footer-modal-form/footer-modal-form.component.d.ts +0 -23
- package/lib/components/footer-with-delete-modal-form/footer-with-delete-modal-form.component.d.ts +0 -7
- package/lib/components/form/form.component.d.ts +0 -23
- package/lib/components/form-modal/form-modal.component.d.ts +0 -21
- package/lib/components/http-form-modal/http-form-modal.component.d.ts +0 -17
- package/lib/components/print-field/print-field.component.d.ts +0 -16
- package/lib/entities/mc-config-form.d.ts +0 -6
- package/lib/entities/mc-config-http-modal-form.d.ts +0 -5
- package/lib/entities/mc-config-modal-form.d.ts +0 -7
- package/lib/entities/mc-event-form.d.ts +0 -5
- package/lib/entities/mc-event-modal-form.d.ts +0 -5
- package/lib/entities/mc-field.d.ts +0 -16
- package/lib/entities/mc-ifta-field.d.ts +0 -14
- package/lib/fields/array-field/array-field.component.d.ts +0 -21
- package/lib/fields/array-ifta-text-field/array-ifta-text-field.component.d.ts +0 -17
- package/lib/fields/column-field/column-field.component.d.ts +0 -10
- package/lib/fields/conditional-field/conditional-field.component.d.ts +0 -18
- package/lib/fields/divider-field/divider-field.component.d.ts +0 -10
- package/lib/fields/fieldset-field/fieldset-field.component.d.ts +0 -10
- package/lib/fields/group-field/group-field.component.d.ts +0 -12
- package/lib/fields/hidden-field/hidden-field.component.d.ts +0 -10
- package/lib/fields/ifta-currency-field/ifta-currency-field.component.d.ts +0 -18
- package/lib/fields/ifta-select-field/ifta-select-field.component.d.ts +0 -15
- package/lib/fields/ifta-select-obs-field/ifta-select-obs-field.component.d.ts +0 -23
- package/lib/fields/ifta-text-conditional-field/ifta-text-conditional-field.component.d.ts +0 -23
- package/lib/fields/ifta-text-field/ifta-text-field.component.d.ts +0 -16
- package/lib/fields/ifta-textarea-field/ifta-textarea-field.component.d.ts +0 -15
- package/lib/fields/mc-field.component.d.ts +0 -13
- package/lib/fields/row-field/row-field.component.d.ts +0 -11
- package/lib/fields/submit-button-field/submit-button-field.component.d.ts +0 -20
- package/lib/fields/tags-field/tags-field.component.d.ts +0 -10
- package/lib/rxjs/mc-event-form-modal-operator.d.ts +0 -4
- package/lib/services/base-http-form-modal-service.d.ts +0 -21
- package/lib/services/form-modal.service.d.ts +0 -15
- package/lib/services/http-form-modal.service.d.ts +0 -11
- package/lib/services/mc-form.service.d.ts +0 -15
- package/public-api.d.ts +0 -49
package/index.d.ts
CHANGED
|
@@ -1,5 +1,399 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ValidatorFn, UntypedFormControl, UntypedFormArray, FormArray, FormControl, UntypedFormGroup, AbstractControl } from '@angular/forms';
|
|
2
|
+
import { Observable, MonoTypeOperatorFunction, Subject, Subscription } from 'rxjs';
|
|
3
|
+
import { DynamicDialogRef, DialogService } from 'primeng/dynamicdialog';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { OnInit, AfterViewInit, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
6
|
+
import { MessageService } from 'primeng/api';
|
|
7
|
+
import { MCApiRestHttpService } from '@mckit/core';
|
|
8
|
+
|
|
9
|
+
declare class MCField {
|
|
10
|
+
key?: string;
|
|
11
|
+
component: any;
|
|
12
|
+
config?: any;
|
|
13
|
+
static initCustom(key: string, component: any, config: any): MCField;
|
|
14
|
+
static init(data: {
|
|
15
|
+
key?: string;
|
|
16
|
+
component: any;
|
|
17
|
+
validators?: ValidatorFn[];
|
|
18
|
+
default_value?: any;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
no_control?: boolean;
|
|
21
|
+
extra?: any;
|
|
22
|
+
}): MCField;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class MCIftaField {
|
|
26
|
+
static init(data: {
|
|
27
|
+
key?: string;
|
|
28
|
+
component: any;
|
|
29
|
+
label: string;
|
|
30
|
+
validators?: ValidatorFn[];
|
|
31
|
+
default_value?: any;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
no_control?: boolean;
|
|
34
|
+
extra?: any;
|
|
35
|
+
}): MCField;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class MCConfigForm {
|
|
39
|
+
fields: MCField[];
|
|
40
|
+
item: any;
|
|
41
|
+
containerFieldClass?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class MCEventForm {
|
|
45
|
+
key: string;
|
|
46
|
+
content: any;
|
|
47
|
+
static init(key: string, content?: any): MCEventForm;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare class MCConfigModalForm extends MCConfigForm {
|
|
51
|
+
title?: string;
|
|
52
|
+
position?: string;
|
|
53
|
+
styleClass?: string;
|
|
54
|
+
style?: any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class MCConfigHttpModalForm extends MCConfigModalForm {
|
|
58
|
+
http: (item: any) => Observable<any>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare class MCEventModalForm extends MCEventForm {
|
|
62
|
+
dialog?: DynamicDialogRef;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare function mcEventFormOperator(eventKey: string, onEvent: (event: MCEventModalForm) => void): MonoTypeOperatorFunction<MCEventModalForm>;
|
|
66
|
+
declare function mcSavedEventFormOperator(onSaved: () => void): MonoTypeOperatorFunction<MCEventModalForm>;
|
|
67
|
+
|
|
68
|
+
declare class MCFormService {
|
|
69
|
+
createControl(field: MCField): UntypedFormControl;
|
|
70
|
+
createArrayControl(field: MCField): UntypedFormArray;
|
|
71
|
+
createArrayStringControl(field: MCField): FormArray<FormControl<string | null>>;
|
|
72
|
+
loadFieldsInArray(group: UntypedFormGroup, field: MCField, item: any): void;
|
|
73
|
+
loadFieldsInArrayString(group: UntypedFormGroup, field: MCField, item: any): void;
|
|
74
|
+
loadFieldsInNewGroup(group: UntypedFormGroup, fields: MCField[], key: string, item: any): void;
|
|
75
|
+
loadFieldsWithChildren(group: UntypedFormGroup, field: MCField, item: any): void;
|
|
76
|
+
loadFields(group: UntypedFormGroup, fields: MCField[], item: any): void;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCFormService, never>;
|
|
78
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MCFormService>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare class MCForm implements OnInit {
|
|
82
|
+
config: i0.InputSignal<MCConfigForm>;
|
|
83
|
+
formGroup: i0.WritableSignal<UntypedFormGroup | undefined>;
|
|
84
|
+
formService: MCFormService;
|
|
85
|
+
onEvent: i0.OutputEmitterRef<MCEventForm>;
|
|
86
|
+
eventObs: Subject<MCEventForm>;
|
|
87
|
+
eventSubscription?: Subscription;
|
|
88
|
+
ngOnInit(): void;
|
|
89
|
+
ngOnDestroy(): void;
|
|
90
|
+
emitEvent(event: MCEventForm): void;
|
|
91
|
+
loadFields(): void;
|
|
92
|
+
updateItem(item: any): void;
|
|
93
|
+
getEventObs(): Subject<MCEventForm>;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCForm, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MCForm, "mc-form", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "onEvent": "onEvent"; }, never, never, true, never>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class MCFormModal implements OnInit {
|
|
99
|
+
formComponent: i0.Signal<MCForm | undefined>;
|
|
100
|
+
dialogService: DialogService;
|
|
101
|
+
dialogRef: DynamicDialogRef<any>;
|
|
102
|
+
formConfig: i0.WritableSignal<MCConfigForm>;
|
|
103
|
+
ngOnInit(): void;
|
|
104
|
+
emitEvent(event: MCEventModalForm): void;
|
|
105
|
+
initForm(): void;
|
|
106
|
+
getFormGroup(): UntypedFormGroup | undefined;
|
|
107
|
+
getEventObs(): Subject<MCEventModalForm>;
|
|
108
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCFormModal, never>;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MCFormModal, "mc-form-modal", never, {}, {}, never, never, true, never>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare class MCFormModalService {
|
|
113
|
+
dialogService: DialogService;
|
|
114
|
+
open(config: MCConfigModalForm, withDelete?: boolean): Observable<MCFormModal>;
|
|
115
|
+
openRight(config: MCConfigModalForm, withDelete?: boolean): Observable<MCFormModal>;
|
|
116
|
+
openRightWithDelete(config: MCConfigModalForm): Observable<MCFormModal>;
|
|
117
|
+
openWithDelete(config: MCConfigModalForm): Observable<MCFormModal>;
|
|
118
|
+
static initConfigRight(config: any): any;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCFormModalService, never>;
|
|
120
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MCFormModalService>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare class MCHttpFormModal extends MCFormModal implements OnInit, AfterViewInit, OnDestroy {
|
|
124
|
+
messageService: MessageService;
|
|
125
|
+
formConfig: i0.WritableSignal<MCConfigHttpModalForm>;
|
|
126
|
+
httpSubscription?: Subscription;
|
|
127
|
+
ngAfterViewInit(): void;
|
|
128
|
+
onSendRequest(item: any): void;
|
|
129
|
+
ngOnDestroy(): void;
|
|
130
|
+
initEvents(): void;
|
|
131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCHttpFormModal, never>;
|
|
132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MCHttpFormModal, "mc-http-form-modal", never, {}, {}, never, never, true, never>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare class MCHttpFormModalService extends MCFormModalService {
|
|
136
|
+
open(config: MCConfigHttpModalForm): Observable<MCHttpFormModal>;
|
|
137
|
+
openRight(config: MCConfigHttpModalForm): Observable<MCHttpFormModal>;
|
|
138
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCHttpFormModalService, never>;
|
|
139
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MCHttpFormModalService>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare class MCBaseHttpFormModalConfig<T extends {
|
|
143
|
+
id?: any;
|
|
144
|
+
}> {
|
|
145
|
+
title: string;
|
|
146
|
+
item?: T;
|
|
147
|
+
httpService: MCApiRestHttpService<T>;
|
|
148
|
+
identifierField: string;
|
|
149
|
+
constructor(title: string, httpService: MCApiRestHttpService<T>, item?: T);
|
|
150
|
+
}
|
|
151
|
+
declare abstract class MCBaseHttpFormModalService<T extends {
|
|
152
|
+
id?: any;
|
|
153
|
+
}> {
|
|
154
|
+
formModalService: MCHttpFormModalService;
|
|
155
|
+
abstract getFields(): Array<MCField>;
|
|
156
|
+
open(config: MCBaseHttpFormModalConfig<T>): Observable<MCEventModalForm>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
declare class MCFieldComponent {
|
|
160
|
+
field: i0.InputSignal<MCField>;
|
|
161
|
+
control: i0.InputSignal<UntypedFormControl | undefined>;
|
|
162
|
+
group: i0.InputSignal<UntypedFormGroup>;
|
|
163
|
+
eventObs: i0.InputSignal<Subject<MCEventForm> | undefined>;
|
|
164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MCFieldComponent, never>;
|
|
165
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MCFieldComponent, "mc-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "group": { "alias": "group"; "required": true; "isSignal": true; }; "eventObs": { "alias": "eventObs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
declare class IftaTextFieldComponent extends MCFieldComponent {
|
|
169
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaTextFieldComponent, never>;
|
|
170
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaTextFieldComponent, "mc-ifta-text-field", never, {}, {}, never, never, true, never>;
|
|
171
|
+
}
|
|
172
|
+
declare class IftaTextField {
|
|
173
|
+
static init(key: string | undefined, label: string, config?: {
|
|
174
|
+
validators?: ValidatorFn[];
|
|
175
|
+
default_value?: any;
|
|
176
|
+
disabled?: boolean;
|
|
177
|
+
extra?: any;
|
|
178
|
+
}): MCField;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
declare class SubmitButtonFieldComponent extends MCFieldComponent implements OnInit, OnDestroy {
|
|
182
|
+
isLoading: i0.WritableSignal<boolean>;
|
|
183
|
+
eventSubscription?: Subscription;
|
|
184
|
+
ngOnInit(): void;
|
|
185
|
+
ngOnDestroy(): void;
|
|
186
|
+
onClick(): void;
|
|
187
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubmitButtonFieldComponent, never>;
|
|
188
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubmitButtonFieldComponent, "mc-submit-button-field", never, {}, {}, never, never, true, never>;
|
|
189
|
+
}
|
|
190
|
+
declare class SubmitButtonField {
|
|
191
|
+
static init(key: string | undefined, label: string, config?: {
|
|
192
|
+
icon?: string;
|
|
193
|
+
disabled?: boolean;
|
|
194
|
+
}): MCField;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
declare class GroupFieldComponent extends MCFieldComponent {
|
|
198
|
+
newGroup: i0.Signal<UntypedFormGroup | undefined>;
|
|
199
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GroupFieldComponent, never>;
|
|
200
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GroupFieldComponent, "mc-group-field", never, {}, {}, never, never, true, never>;
|
|
201
|
+
}
|
|
202
|
+
declare class GroupField {
|
|
203
|
+
static init(key: string, fields: MCField[]): MCField;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare class RowFieldComponent extends GroupFieldComponent {
|
|
207
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RowFieldComponent, never>;
|
|
208
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RowFieldComponent, "mc-row-field", never, {}, {}, never, never, true, never>;
|
|
209
|
+
}
|
|
210
|
+
declare class RowField {
|
|
211
|
+
static initWithGroup(key: string, fields: MCField[]): MCField;
|
|
212
|
+
static init(fields: MCField[], extra?: any): MCField;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
declare class HiddenFieldComponent extends MCFieldComponent {
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HiddenFieldComponent, never>;
|
|
217
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HiddenFieldComponent, "mc-hidden-field", never, {}, {}, never, never, true, never>;
|
|
218
|
+
}
|
|
219
|
+
declare class HiddenField {
|
|
220
|
+
static init(key: string | undefined, default_value?: any): MCField;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
declare class IftaSelectFieldComponent extends MCFieldComponent {
|
|
224
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaSelectFieldComponent, never>;
|
|
225
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaSelectFieldComponent, "mc-ifta-select-field", never, {}, {}, never, never, true, never>;
|
|
226
|
+
}
|
|
227
|
+
declare class IftaSelectField {
|
|
228
|
+
static init(key: string | undefined, label: string, options: any[], optionLabel?: string, optionValue?: string, config?: {
|
|
229
|
+
validators?: ValidatorFn[];
|
|
230
|
+
default_value?: any;
|
|
231
|
+
disabled?: boolean;
|
|
232
|
+
}): MCField;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
declare class IftaTextConditionalFieldComponent extends MCFieldComponent implements OnInit, OnDestroy {
|
|
236
|
+
isShow: i0.WritableSignal<boolean>;
|
|
237
|
+
valuesSubscription?: Subscription;
|
|
238
|
+
ngOnInit(): void;
|
|
239
|
+
ngOnDestroy(): void;
|
|
240
|
+
verifyCondition(values: any): void;
|
|
241
|
+
loadObs(): void;
|
|
242
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaTextConditionalFieldComponent, never>;
|
|
243
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaTextConditionalFieldComponent, "mc-ifta-text-conditional-field", never, {}, {}, never, never, true, never>;
|
|
244
|
+
}
|
|
245
|
+
declare class IftaTextConditionalField {
|
|
246
|
+
static init(key: string | undefined, label: string, conditionalKey: string, conditionalValue: any, config?: {
|
|
247
|
+
validators?: ValidatorFn[];
|
|
248
|
+
default_value?: any;
|
|
249
|
+
disabled?: boolean;
|
|
250
|
+
}): MCField;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
declare class IftaSelectObsFieldComponent extends MCFieldComponent implements OnInit, OnDestroy {
|
|
254
|
+
isLoading: i0.WritableSignal<boolean>;
|
|
255
|
+
options: i0.WritableSignal<any[]>;
|
|
256
|
+
optionsSubscription?: Subscription;
|
|
257
|
+
ngOnInit(): void;
|
|
258
|
+
ngOnDestroy(): void;
|
|
259
|
+
loadObs(): void;
|
|
260
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaSelectObsFieldComponent, never>;
|
|
261
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaSelectObsFieldComponent, "mc-ifta-select-obs-field", never, {}, {}, never, never, true, never>;
|
|
262
|
+
}
|
|
263
|
+
declare class IftaSelectObsField {
|
|
264
|
+
static init(key: string | undefined, label: string, optionObs: () => Observable<Array<any>>, optionLabel?: string, optionValue?: string, config?: {
|
|
265
|
+
validators?: ValidatorFn[];
|
|
266
|
+
default_value?: any;
|
|
267
|
+
disabled?: boolean;
|
|
268
|
+
}): MCField;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
declare class DividerFieldComponent extends MCFieldComponent {
|
|
272
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DividerFieldComponent, never>;
|
|
273
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DividerFieldComponent, "mc-divider-field", never, {}, {}, never, never, true, never>;
|
|
274
|
+
}
|
|
275
|
+
declare class DividerField {
|
|
276
|
+
static init(label: string | undefined): MCField;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare class ArrayFieldComponent extends MCFieldComponent {
|
|
280
|
+
formService: MCFormService;
|
|
281
|
+
formArray: i0.Signal<FormArray<UntypedFormGroup>>;
|
|
282
|
+
onClickAdd(): void;
|
|
283
|
+
onClickRemove(index: number): void;
|
|
284
|
+
moveItem(index: number, direction: number): void;
|
|
285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayFieldComponent, never>;
|
|
286
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayFieldComponent, "mc-array-field", never, {}, {}, never, never, true, never>;
|
|
287
|
+
}
|
|
288
|
+
declare class ArrayField {
|
|
289
|
+
static init(key: string, fields: MCField[], data?: {
|
|
290
|
+
labelAddButton?: string;
|
|
291
|
+
labelTitlePanel?: string;
|
|
292
|
+
allow_order?: boolean;
|
|
293
|
+
}): MCField;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
declare class IftaTextareaFieldComponent extends MCFieldComponent {
|
|
297
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaTextareaFieldComponent, never>;
|
|
298
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaTextareaFieldComponent, "mc-ifta-textarea-field", never, {}, {}, never, never, true, never>;
|
|
299
|
+
}
|
|
300
|
+
declare class IftaTextareaField {
|
|
301
|
+
static init(key: string | undefined, label: string, config?: {
|
|
302
|
+
validators?: ValidatorFn[];
|
|
303
|
+
default_value?: any;
|
|
304
|
+
disabled?: boolean;
|
|
305
|
+
}): MCField;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare class ConditionalFieldComponent extends MCFieldComponent implements OnInit, OnDestroy {
|
|
309
|
+
isShow: i0.WritableSignal<boolean>;
|
|
310
|
+
valuesSubscription?: Subscription;
|
|
311
|
+
ngOnInit(): void;
|
|
312
|
+
ngOnDestroy(): void;
|
|
313
|
+
verifyCondition(values: any): void;
|
|
314
|
+
loadObs(): void;
|
|
315
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConditionalFieldComponent, never>;
|
|
316
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConditionalFieldComponent, "mc-conditional-field", never, {}, {}, never, never, true, never>;
|
|
317
|
+
}
|
|
318
|
+
declare class ConditionalField {
|
|
319
|
+
static init(conditionalKey: string, conditionalValue: any, fields: MCField[], valuesAreNumbers?: boolean): MCField;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
declare class ArrayIftaTextFieldComponent extends MCFieldComponent {
|
|
323
|
+
formArray: i0.Signal<FormArray<FormControl<string>>>;
|
|
324
|
+
onClickAdd(): void;
|
|
325
|
+
onClickRemove(index: number): void;
|
|
326
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayIftaTextFieldComponent, never>;
|
|
327
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayIftaTextFieldComponent, "mc-array-ifta-text-field", never, {}, {}, never, never, true, never>;
|
|
328
|
+
}
|
|
329
|
+
declare class ArrayIftaTextField {
|
|
330
|
+
static init(key: string, data?: {
|
|
331
|
+
labelAddButton?: string;
|
|
332
|
+
labelTitlePanel?: string;
|
|
333
|
+
}): MCField;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
declare class ColumnFieldComponent extends MCFieldComponent {
|
|
337
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnFieldComponent, never>;
|
|
338
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnFieldComponent, "mc-column-field", never, {}, {}, never, never, true, never>;
|
|
339
|
+
}
|
|
340
|
+
declare class ColumnField {
|
|
341
|
+
static init(fields: MCField[], extra?: any): MCField;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
declare class FieldsetFieldComponent extends MCFieldComponent {
|
|
345
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetFieldComponent, never>;
|
|
346
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetFieldComponent, "mc-fieldset-field", never, {}, {}, never, never, true, never>;
|
|
347
|
+
}
|
|
348
|
+
declare class FieldsetField {
|
|
349
|
+
static init(label: string, fields: MCField[], extra?: any): MCField;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
declare class TagsFieldComponent extends MCFieldComponent {
|
|
353
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TagsFieldComponent, never>;
|
|
354
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TagsFieldComponent, "mc-tags-field", never, {}, {}, never, never, true, never>;
|
|
355
|
+
}
|
|
356
|
+
declare class TagsField {
|
|
357
|
+
static init(key: string | undefined): MCField;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
declare class IftaCurrencyFieldComponent extends MCFieldComponent {
|
|
361
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaCurrencyFieldComponent, never>;
|
|
362
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaCurrencyFieldComponent, "mc-ifta-currency-field", never, {}, {}, never, never, true, never>;
|
|
363
|
+
}
|
|
364
|
+
declare class IftaCurrencyField {
|
|
365
|
+
static init(key: string | undefined, label: string, config?: {
|
|
366
|
+
validators?: ValidatorFn[];
|
|
367
|
+
default_value?: any;
|
|
368
|
+
disabled?: boolean;
|
|
369
|
+
prepended?: string;
|
|
370
|
+
appended?: string;
|
|
371
|
+
extra?: any;
|
|
372
|
+
}): MCField;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare class IftaDateFieldComponent extends MCFieldComponent {
|
|
376
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IftaDateFieldComponent, never>;
|
|
377
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IftaDateFieldComponent, "mc-ifta-date-field", never, {}, {}, never, never, true, never>;
|
|
378
|
+
}
|
|
379
|
+
declare class IftaDateField {
|
|
380
|
+
static init(key: string | undefined, label: string, config?: {
|
|
381
|
+
date_format: string;
|
|
382
|
+
validators?: ValidatorFn[];
|
|
383
|
+
default_value?: any;
|
|
384
|
+
disabled?: boolean;
|
|
385
|
+
}): MCField;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
declare class PrintFieldComponent implements OnInit {
|
|
389
|
+
field: i0.InputSignal<MCField>;
|
|
390
|
+
control: i0.InputSignal<AbstractControl<any, any, any> | null | undefined>;
|
|
391
|
+
group: i0.InputSignal<UntypedFormGroup | undefined>;
|
|
392
|
+
eventObs: i0.InputSignal<Subject<MCEventForm> | undefined>;
|
|
393
|
+
viewContainerRef: ViewContainerRef;
|
|
394
|
+
ngOnInit(): void;
|
|
395
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PrintFieldComponent, never>;
|
|
396
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PrintFieldComponent, "mc-print-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "group": { "alias": "group"; "required": false; "isSignal": true; }; "eventObs": { "alias": "eventObs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export { ArrayField, ArrayFieldComponent, ArrayIftaTextField, ArrayIftaTextFieldComponent, ColumnField, ColumnFieldComponent, ConditionalField, ConditionalFieldComponent, DividerField, DividerFieldComponent, FieldsetField, FieldsetFieldComponent, GroupField, GroupFieldComponent, HiddenField, HiddenFieldComponent, IftaCurrencyField, IftaCurrencyFieldComponent, IftaDateField, IftaDateFieldComponent, IftaSelectField, IftaSelectFieldComponent, IftaSelectObsField, IftaSelectObsFieldComponent, IftaTextConditionalField, IftaTextConditionalFieldComponent, IftaTextField, IftaTextFieldComponent, IftaTextareaField, IftaTextareaFieldComponent, MCBaseHttpFormModalConfig, MCBaseHttpFormModalService, MCConfigForm, MCConfigHttpModalForm, MCConfigModalForm, MCEventForm, MCEventModalForm, MCField, MCFieldComponent, MCForm, MCFormModal, MCFormModalService, MCFormService, MCHttpFormModal, MCHttpFormModalService, MCIftaField, PrintFieldComponent, RowField, RowFieldComponent, SubmitButtonField, SubmitButtonFieldComponent, TagsField, TagsFieldComponent, mcEventFormOperator, mcSavedEventFormOperator };
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mckit/form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^
|
|
6
|
-
"@angular/core": "^
|
|
7
|
-
"@
|
|
8
|
-
"@mckit/core": "^
|
|
5
|
+
"@angular/common": "^20.0.0",
|
|
6
|
+
"@angular/core": "^20.0.0",
|
|
7
|
+
"@primeuix/themes": "^1.2.5",
|
|
8
|
+
"@mckit/core": "^20.0.1"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tslib": "^2.6.2"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnDestroy, OnInit, WritableSignal } from '@angular/core';
|
|
2
|
-
import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
3
|
-
import { MCFormModal } from '../form-modal/form-modal.component';
|
|
4
|
-
import { UntypedFormGroup } from '@angular/forms';
|
|
5
|
-
import { Subject, Subscription } from 'rxjs';
|
|
6
|
-
import { MCEventModalForm } from '../../entities/mc-event-modal-form';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class MCFooterModalForm implements OnInit, OnDestroy {
|
|
9
|
-
dialogService: DialogService;
|
|
10
|
-
dialogRef: DynamicDialogRef<MCFormModal>;
|
|
11
|
-
isLoading: WritableSignal<boolean>;
|
|
12
|
-
group?: WritableSignal<UntypedFormGroup | undefined>;
|
|
13
|
-
eventObs?: Subject<MCEventModalForm>;
|
|
14
|
-
eventSubscription?: Subscription;
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
ngOnDestroy(): void;
|
|
17
|
-
onClickCancel(): void;
|
|
18
|
-
onClickSubmit(): void;
|
|
19
|
-
initConfig(): void;
|
|
20
|
-
initObs(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MCFooterModalForm, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MCFooterModalForm, "mc-footer-modal-form", never, {}, {}, never, never, true, never>;
|
|
23
|
-
}
|
package/lib/components/footer-with-delete-modal-form/footer-with-delete-modal-form.component.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MCFooterModalForm } from '../footer-modal-form/footer-modal-form.component';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class MCFooterWithDeleteModalForm extends MCFooterModalForm {
|
|
4
|
-
onClickDelete(): void;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MCFooterWithDeleteModalForm, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MCFooterWithDeleteModalForm, "mc-footer-with-delete-modal-form", never, {}, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { MCConfigForm } from '../../entities/mc-config-form';
|
|
3
|
-
import { UntypedFormGroup } from '@angular/forms';
|
|
4
|
-
import { MCFormService } from '../../services/mc-form.service';
|
|
5
|
-
import { MCEventForm } from '../../entities/mc-event-form';
|
|
6
|
-
import { Subject, Subscription } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class MCForm implements OnInit {
|
|
9
|
-
config: import("@angular/core").InputSignal<MCConfigForm>;
|
|
10
|
-
formGroup: import("@angular/core").WritableSignal<UntypedFormGroup | undefined>;
|
|
11
|
-
formService: MCFormService;
|
|
12
|
-
onEvent: import("@angular/core").OutputEmitterRef<MCEventForm>;
|
|
13
|
-
eventObs: Subject<MCEventForm>;
|
|
14
|
-
eventSubscription?: Subscription;
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
ngOnDestroy(): void;
|
|
17
|
-
emitEvent(event: MCEventForm): void;
|
|
18
|
-
loadFields(): void;
|
|
19
|
-
updateItem(item: any): void;
|
|
20
|
-
getEventObs(): Subject<MCEventForm>;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MCForm, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MCForm, "mc-form", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; }, { "onEvent": "onEvent"; }, never, never, true, never>;
|
|
23
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { MCForm } from '../form/form.component';
|
|
3
|
-
import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
4
|
-
import { MCConfigForm } from '../../entities/mc-config-form';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import { UntypedFormGroup } from '@angular/forms';
|
|
7
|
-
import { MCEventModalForm } from '../../entities/mc-event-modal-form';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class MCFormModal implements OnInit {
|
|
10
|
-
formComponent: import("@angular/core").Signal<MCForm | undefined>;
|
|
11
|
-
dialogService: DialogService;
|
|
12
|
-
dialogRef: DynamicDialogRef<any>;
|
|
13
|
-
formConfig: import("@angular/core").WritableSignal<MCConfigForm>;
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
emitEvent(event: MCEventModalForm): void;
|
|
16
|
-
initForm(): void;
|
|
17
|
-
getFormGroup(): UntypedFormGroup | undefined;
|
|
18
|
-
getEventObs(): Subject<MCEventModalForm>;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MCFormModal, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MCFormModal, "mc-form-modal", never, {}, {}, never, never, true, never>;
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { MCFormModal } from '../form-modal/form-modal.component';
|
|
3
|
-
import { MCConfigHttpModalForm } from '../../entities/mc-config-http-modal-form';
|
|
4
|
-
import { Subscription } from 'rxjs';
|
|
5
|
-
import { MessageService } from 'primeng/api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class MCHttpFormModal extends MCFormModal implements OnInit, AfterViewInit, OnDestroy {
|
|
8
|
-
messageService: MessageService;
|
|
9
|
-
formConfig: import("@angular/core").WritableSignal<MCConfigHttpModalForm>;
|
|
10
|
-
httpSubscription?: Subscription;
|
|
11
|
-
ngAfterViewInit(): void;
|
|
12
|
-
onSendRequest(item: any): void;
|
|
13
|
-
ngOnDestroy(): void;
|
|
14
|
-
initEvents(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MCHttpFormModal, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MCHttpFormModal, "mc-http-form-modal", never, {}, {}, never, never, true, never>;
|
|
17
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { MCField } from '../../entities/mc-field';
|
|
3
|
-
import { AbstractControl, UntypedFormGroup } from '@angular/forms';
|
|
4
|
-
import { Subject } from 'rxjs';
|
|
5
|
-
import { MCEventForm } from '../../entities/mc-event-form';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class PrintFieldComponent implements OnInit {
|
|
8
|
-
field: import("@angular/core").InputSignal<MCField>;
|
|
9
|
-
control: import("@angular/core").InputSignal<AbstractControl<any, any> | null | undefined>;
|
|
10
|
-
group: import("@angular/core").InputSignal<UntypedFormGroup | undefined>;
|
|
11
|
-
eventObs: import("@angular/core").InputSignal<Subject<MCEventForm> | undefined>;
|
|
12
|
-
viewContainerRef: ViewContainerRef;
|
|
13
|
-
ngOnInit(): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PrintFieldComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PrintFieldComponent, "mc-print-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "group": { "alias": "group"; "required": false; "isSignal": true; }; "eventObs": { "alias": "eventObs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ValidatorFn } from "@angular/forms";
|
|
2
|
-
export declare class MCField {
|
|
3
|
-
key?: string;
|
|
4
|
-
component: any;
|
|
5
|
-
config?: any;
|
|
6
|
-
static initCustom(key: string, component: any, config: any): MCField;
|
|
7
|
-
static init(data: {
|
|
8
|
-
key?: string;
|
|
9
|
-
component: any;
|
|
10
|
-
validators?: ValidatorFn[];
|
|
11
|
-
default_value?: any;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
no_control?: boolean;
|
|
14
|
-
extra?: any;
|
|
15
|
-
}): MCField;
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ValidatorFn } from "@angular/forms";
|
|
2
|
-
import { MCField } from "./mc-field";
|
|
3
|
-
export declare class MCIftaField {
|
|
4
|
-
static init(data: {
|
|
5
|
-
key?: string;
|
|
6
|
-
component: any;
|
|
7
|
-
label: string;
|
|
8
|
-
validators?: ValidatorFn[];
|
|
9
|
-
default_value?: any;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
no_control?: boolean;
|
|
12
|
-
extra?: any;
|
|
13
|
-
}): MCField;
|
|
14
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MCFieldComponent } from '../mc-field.component';
|
|
2
|
-
import { MCField } from '../../entities/mc-field';
|
|
3
|
-
import { FormArray, UntypedFormGroup } from '@angular/forms';
|
|
4
|
-
import { MCFormService } from '../../services/mc-form.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ArrayFieldComponent extends MCFieldComponent {
|
|
7
|
-
formService: MCFormService;
|
|
8
|
-
formArray: import("@angular/core").Signal<FormArray<UntypedFormGroup>>;
|
|
9
|
-
onClickAdd(): void;
|
|
10
|
-
onClickRemove(index: number): void;
|
|
11
|
-
moveItem(index: number, direction: number): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayFieldComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayFieldComponent, "mc-array-field", never, {}, {}, never, never, true, never>;
|
|
14
|
-
}
|
|
15
|
-
export declare class ArrayField {
|
|
16
|
-
static init(key: string, fields: MCField[], data?: {
|
|
17
|
-
labelAddButton?: string;
|
|
18
|
-
labelTitlePanel?: string;
|
|
19
|
-
allow_order?: boolean;
|
|
20
|
-
}): MCField;
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FormArray, FormControl } from '@angular/forms';
|
|
2
|
-
import { MCFieldComponent } from '../mc-field.component';
|
|
3
|
-
import { MCField } from '../../entities/mc-field';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ArrayIftaTextFieldComponent extends MCFieldComponent {
|
|
6
|
-
formArray: import("@angular/core").Signal<FormArray<FormControl<string>>>;
|
|
7
|
-
onClickAdd(): void;
|
|
8
|
-
onClickRemove(index: number): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayIftaTextFieldComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ArrayIftaTextFieldComponent, "mc-array-ifta-text-field", never, {}, {}, never, never, true, never>;
|
|
11
|
-
}
|
|
12
|
-
export declare class ArrayIftaTextField {
|
|
13
|
-
static init(key: string, data?: {
|
|
14
|
-
labelAddButton?: string;
|
|
15
|
-
labelTitlePanel?: string;
|
|
16
|
-
}): MCField;
|
|
17
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MCFieldComponent } from '../mc-field.component';
|
|
2
|
-
import { MCField } from '../../entities/mc-field';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ColumnFieldComponent extends MCFieldComponent {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnFieldComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnFieldComponent, "mc-column-field", never, {}, {}, never, never, true, never>;
|
|
7
|
-
}
|
|
8
|
-
export declare class ColumnField {
|
|
9
|
-
static init(fields: MCField[], extra?: any): MCField;
|
|
10
|
-
}
|