@updevs/components 1.0.0-alpha.1 → 1.0.0-alpha.100
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/README.md +1 -24
- package/assets/styles/_bootstrap-components.scss +55 -0
- package/assets/styles/_bootstrap-config.scss +7 -0
- package/assets/styles/_bootstrap-override.scss +78 -0
- package/assets/styles/_config.scss +9 -0
- package/assets/styles/_core.scss +80 -0
- package/assets/styles/_debug.scss +49 -0
- package/assets/styles/_mixins.scss +2 -0
- package/assets/styles/_props.scss +91 -0
- package/assets/styles/_seven-columns.scss +73 -0
- package/assets/styles/_updevs.scss +25 -0
- package/assets/styles/_utilities-marketing.scss +209 -0
- package/assets/styles/_utilities.scss +133 -0
- package/assets/styles/_variables-dark.scss +19 -0
- package/assets/styles/_variables.scss +1003 -0
- package/assets/styles/fonts/_webfonts.scss +15 -0
- package/assets/styles/helpers/_index.scss +143 -0
- package/assets/styles/layout/_animations.scss +62 -0
- package/assets/styles/layout/_core.scss +62 -0
- package/assets/styles/layout/_dark.scss +77 -0
- package/assets/styles/layout/_footer.scss +12 -0
- package/assets/styles/layout/_navbar.scss +392 -0
- package/assets/styles/layout/_page.scss +170 -0
- package/assets/styles/layout/_root.scss +64 -0
- package/assets/styles/marketing/_browser.scss +67 -0
- package/assets/styles/marketing/_core.scss +8 -0
- package/assets/styles/marketing/_filters.scss +0 -0
- package/assets/styles/marketing/_hero.scss +70 -0
- package/assets/styles/marketing/_pricing.scss +111 -0
- package/assets/styles/marketing/_sections.scss +124 -0
- package/assets/styles/marketing/_shape.scss +31 -0
- package/assets/styles/mixins/_functions.scss +96 -0
- package/assets/styles/mixins/_mixins.scss +68 -0
- package/assets/styles/ui/_accordion.scss +178 -0
- package/assets/styles/ui/_alerts.scss +101 -0
- package/assets/styles/ui/_avatars.scss +145 -0
- package/assets/styles/ui/_badges.scss +113 -0
- package/assets/styles/ui/_breadcrumbs.scss +50 -0
- package/assets/styles/ui/_button-group.scss +16 -0
- package/assets/styles/ui/_buttons.scss +261 -0
- package/assets/styles/ui/_calendars.scss +104 -0
- package/assets/styles/ui/_cards.scss +595 -0
- package/assets/styles/ui/_carousel.scss +68 -0
- package/assets/styles/ui/_charts.scss +61 -0
- package/assets/styles/ui/_chat.scss +38 -0
- package/assets/styles/ui/_chips.scss +0 -0
- package/assets/styles/ui/_close.scss +60 -0
- package/assets/styles/ui/_datagrid.scss +17 -0
- package/assets/styles/ui/_dropdowns.scss +120 -0
- package/assets/styles/ui/_empty.scss +60 -0
- package/assets/styles/ui/_flags.scss +31 -0
- package/assets/styles/ui/_forms.scss +250 -0
- package/assets/styles/ui/_grid.scss +115 -0
- package/assets/styles/ui/_icons.scss +72 -0
- package/assets/styles/ui/_images.scss +19 -0
- package/assets/styles/ui/_legend.scss +12 -0
- package/assets/styles/ui/_lists.scss +123 -0
- package/assets/styles/ui/_loaders.scss +72 -0
- package/assets/styles/ui/_login.scss +3 -0
- package/assets/styles/ui/_markdown.scss +53 -0
- package/assets/styles/ui/_modals.scss +67 -0
- package/assets/styles/ui/_nav.scss +106 -0
- package/assets/styles/ui/_offcanvas.scss +17 -0
- package/assets/styles/ui/_pagination.scss +58 -0
- package/assets/styles/ui/_payments.scss +28 -0
- package/assets/styles/ui/_placeholder.scss +9 -0
- package/assets/styles/ui/_popovers.scss +2 -0
- package/assets/styles/ui/_progress.scss +107 -0
- package/assets/styles/ui/_ribbons.scss +157 -0
- package/assets/styles/ui/_segmented.scss +101 -0
- package/assets/styles/ui/_signature.scss +15 -0
- package/assets/styles/ui/_social.scss +52 -0
- package/assets/styles/ui/_stars.scss +13 -0
- package/assets/styles/ui/_status.scss +163 -0
- package/assets/styles/ui/_steps.scss +156 -0
- package/assets/styles/ui/_switch-icon.scss +211 -0
- package/assets/styles/ui/_tables.scss +176 -0
- package/assets/styles/ui/_tags.scss +57 -0
- package/assets/styles/ui/_timeline.scss +61 -0
- package/assets/styles/ui/_toasts.scss +18 -0
- package/assets/styles/ui/_toolbar.scss +10 -0
- package/assets/styles/ui/_tracking.scss +29 -0
- package/assets/styles/ui/_type.scss +330 -0
- package/assets/styles/ui/forms/_form-check.scss +91 -0
- package/assets/styles/ui/forms/_form-colorinput.scss +54 -0
- package/assets/styles/ui/forms/_form-custom.scss +28 -0
- package/assets/styles/ui/forms/_form-icon.scss +35 -0
- package/assets/styles/ui/forms/_form-imagecheck.scss +105 -0
- package/assets/styles/ui/forms/_form-selectgroup.scss +153 -0
- package/assets/styles/ui/forms/_validation.scss +13 -0
- package/assets/styles/ui/typo/_hr.scss +76 -0
- package/assets/styles/utils/_background.scss +15 -0
- package/assets/styles/utils/_colors.scss +101 -0
- package/assets/styles/utils/_opacity.scss +7 -0
- package/assets/styles/utils/_scroll.scss +45 -0
- package/assets/styles/utils/_shadow.scss +17 -0
- package/assets/styles/utils/_sizing.scss +10 -0
- package/assets/styles/utils/_text.scss +14 -0
- package/assets/styles/vendor/_apexcharts.scss +52 -0
- package/assets/styles/vendor/_coloris.scss +72 -0
- package/assets/styles/vendor/_dropzone.scss +27 -0
- package/assets/styles/vendor/_fslightbox.scss +13 -0
- package/assets/styles/vendor/_jsvectormap.scss +47 -0
- package/assets/styles/vendor/_litepicker.scss +69 -0
- package/assets/styles/vendor/_nouislider.scss +49 -0
- package/assets/styles/vendor/_plyr.scss +3 -0
- package/assets/styles/vendor/_stars-rating.scss +22 -0
- package/assets/styles/vendor/_tom-select.scss +81 -0
- package/assets/styles/vendor/_turbo.scss +3 -0
- package/assets/styles/vendor/_typed.scss +4 -0
- package/assets/styles/vendor/_wysiwyg.scss +46 -0
- package/fesm2022/updevs-components-badge.mjs +89 -0
- package/fesm2022/updevs-components-badge.mjs.map +1 -0
- package/fesm2022/updevs-components-button.mjs +193 -0
- package/fesm2022/updevs-components-button.mjs.map +1 -0
- package/fesm2022/updevs-components-calendar.mjs +582 -0
- package/fesm2022/updevs-components-calendar.mjs.map +1 -0
- package/fesm2022/updevs-components-card.mjs +242 -0
- package/fesm2022/updevs-components-card.mjs.map +1 -0
- package/fesm2022/updevs-components-drag-and-drop.mjs +185 -0
- package/fesm2022/updevs-components-drag-and-drop.mjs.map +1 -0
- package/fesm2022/updevs-components-dropdown.mjs +247 -0
- package/fesm2022/updevs-components-dropdown.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-abstractions.mjs +106 -0
- package/fesm2022/updevs-components-form-controls-abstractions.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-checkbox.mjs +99 -0
- package/fesm2022/updevs-components-form-controls-checkbox.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-date-picker.mjs +175 -0
- package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-file-upload.mjs +272 -0
- package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-input.mjs +281 -0
- package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-radio.mjs +98 -0
- package/fesm2022/updevs-components-form-controls-radio.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-select.mjs +600 -0
- package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-textarea.mjs +79 -0
- package/fesm2022/updevs-components-form-controls-textarea.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-time-picker.mjs +345 -0
- package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -0
- package/fesm2022/updevs-components-form.mjs +562 -0
- package/fesm2022/updevs-components-form.mjs.map +1 -0
- package/fesm2022/updevs-components-layout.mjs +1054 -0
- package/fesm2022/updevs-components-layout.mjs.map +1 -0
- package/fesm2022/updevs-components-link.mjs +79 -0
- package/fesm2022/updevs-components-link.mjs.map +1 -0
- package/fesm2022/updevs-components-list.mjs +215 -0
- package/fesm2022/updevs-components-list.mjs.map +1 -0
- package/fesm2022/updevs-components-modal.mjs +505 -0
- package/fesm2022/updevs-components-modal.mjs.map +1 -0
- package/fesm2022/updevs-components-paginator.mjs +160 -0
- package/fesm2022/updevs-components-paginator.mjs.map +1 -0
- package/fesm2022/updevs-components-popover.mjs +215 -0
- package/fesm2022/updevs-components-popover.mjs.map +1 -0
- package/fesm2022/updevs-components-pricing.mjs +130 -0
- package/fesm2022/updevs-components-pricing.mjs.map +1 -0
- package/fesm2022/updevs-components-table.mjs +2060 -0
- package/fesm2022/updevs-components-table.mjs.map +1 -0
- package/fesm2022/updevs-components.mjs +33 -0
- package/fesm2022/updevs-components.mjs.map +1 -0
- package/package.json +127 -14
- package/types/updevs-components-badge.d.ts +44 -0
- package/types/updevs-components-button.d.ts +75 -0
- package/types/updevs-components-calendar.d.ts +175 -0
- package/types/updevs-components-card.d.ts +92 -0
- package/types/updevs-components-drag-and-drop.d.ts +74 -0
- package/types/updevs-components-dropdown.d.ts +124 -0
- package/types/updevs-components-form-controls-abstractions.d.ts +49 -0
- package/types/updevs-components-form-controls-checkbox.d.ts +33 -0
- package/types/updevs-components-form-controls-date-picker.d.ts +80 -0
- package/types/updevs-components-form-controls-file-upload.d.ts +69 -0
- package/types/updevs-components-form-controls-input.d.ts +95 -0
- package/types/updevs-components-form-controls-radio.d.ts +32 -0
- package/types/updevs-components-form-controls-select.d.ts +200 -0
- package/types/updevs-components-form-controls-textarea.d.ts +31 -0
- package/types/updevs-components-form-controls-time-picker.d.ts +164 -0
- package/types/updevs-components-form.d.ts +356 -0
- package/types/updevs-components-layout.d.ts +490 -0
- package/types/updevs-components-link.d.ts +34 -0
- package/types/updevs-components-list.d.ts +107 -0
- package/types/updevs-components-modal.d.ts +155 -0
- package/types/updevs-components-paginator.d.ts +58 -0
- package/types/updevs-components-popover.d.ts +63 -0
- package/types/updevs-components-pricing.d.ts +91 -0
- package/types/updevs-components-table.d.ts +619 -0
- package/types/updevs-components.d.ts +44 -0
- package/CHANGELOG.md +0 -8
- package/ng-package.json +0 -7
- package/src/lib/components.component.spec.ts +0 -23
- package/src/lib/components.component.ts +0 -14
- package/src/lib/components.module.ts +0 -17
- package/src/lib/components.service.spec.ts +0 -16
- package/src/lib/components.service.ts +0 -9
- package/src/public-api.ts +0 -7
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { ButtonModel, BaseComponent } from '@updevs/sdk/layout';
|
|
2
|
+
import * as i4 from '@angular/forms';
|
|
3
|
+
import { ValidatorFn, FormControlStatus, FormGroup, FormControl } from '@angular/forms';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { Signal, OnInit, EventEmitter, InputSignal } from '@angular/core';
|
|
6
|
+
import * as i14 from '@updevs/sdk';
|
|
7
|
+
import { TextModel, TextService } from '@updevs/sdk';
|
|
8
|
+
import { RowColumnSize, HorizontalVerticalType, ValidationStatusType } from '@updevs/components';
|
|
9
|
+
import { RequiredPermissionsModel } from '@updevs/sdk/security';
|
|
10
|
+
import { DictionaryType, OptionalType } from '@updevs/sdk/types';
|
|
11
|
+
import * as i7 from '@updevs/components/form-controls/input';
|
|
12
|
+
import { InputType } from '@updevs/components/form-controls/input';
|
|
13
|
+
import { UpdMaskConfig } from '@updevs/sdk/mask';
|
|
14
|
+
import * as i11 from '@updevs/components/form-controls/select';
|
|
15
|
+
import { SelectItem, Defaults } from '@updevs/components/form-controls/select';
|
|
16
|
+
import { BaseSearchStore, ObservableSearchType } from '@updevs/sdk/stores';
|
|
17
|
+
import * as i6 from '@jsverse/transloco';
|
|
18
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
19
|
+
import * as i13 from '@updevs/components/form-controls/file-upload';
|
|
20
|
+
import { FileUploadChangedEvent } from '@updevs/components/form-controls/file-upload';
|
|
21
|
+
import * as i3 from '@angular/common';
|
|
22
|
+
import * as i5 from '@updevs/components/button';
|
|
23
|
+
import * as i8 from '@updevs/components/form-controls/checkbox';
|
|
24
|
+
import * as i9 from '@updevs/components/form-controls/radio';
|
|
25
|
+
import * as i10 from '@updevs/components/form-controls/date-picker';
|
|
26
|
+
import * as i12 from '@updevs/components/form-controls/textarea';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* How a parent field influences its child.
|
|
30
|
+
**/
|
|
31
|
+
declare enum AttachmentTypeEnum {
|
|
32
|
+
/**
|
|
33
|
+
* Enable / disable behaviour (default).
|
|
34
|
+
**/
|
|
35
|
+
Disabled = "disabled",
|
|
36
|
+
/**
|
|
37
|
+
* Child waits for the parent to have a value and (re)loads afterwards.
|
|
38
|
+
**/
|
|
39
|
+
ParentLoad = "parentLoad"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare enum DynamicFieldType {
|
|
43
|
+
Input = 1,
|
|
44
|
+
Select = 2,
|
|
45
|
+
SelectMultiple = 3,
|
|
46
|
+
Label = 4,
|
|
47
|
+
Checkbox = 5,
|
|
48
|
+
CheckboxGroup = 6,
|
|
49
|
+
Radio = 7,
|
|
50
|
+
RadioGroup = 8,
|
|
51
|
+
TextArea = 9,
|
|
52
|
+
FileUpload = 10,
|
|
53
|
+
MaskedInput = 11,
|
|
54
|
+
Button = 12,
|
|
55
|
+
ButtonGroup = 13
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Declarative relationship between two dynamic fields.
|
|
60
|
+
* P = parent value type, C = child value type.
|
|
61
|
+
*/
|
|
62
|
+
interface AttachmentRule<P = any, C = any> {
|
|
63
|
+
/**
|
|
64
|
+
* Name of the *parent* control inside the same FormGroup.
|
|
65
|
+
**/
|
|
66
|
+
name: string;
|
|
67
|
+
/**
|
|
68
|
+
* Kind of interaction (default = Disabled).
|
|
69
|
+
**/
|
|
70
|
+
type?: AttachmentTypeEnum;
|
|
71
|
+
/**
|
|
72
|
+
* Returns true when the *child* must be disabled.
|
|
73
|
+
**/
|
|
74
|
+
disableIf?: (childValue: C, parentValue: P) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Disable when the parent is empty/null/''.
|
|
77
|
+
**/
|
|
78
|
+
disableIfEmpty?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Clear the child’s value the moment it becomes disabled.
|
|
81
|
+
**/
|
|
82
|
+
clearValueIfDisabled?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Clear the child when the parent turns empty.
|
|
85
|
+
**/
|
|
86
|
+
clearValueIfEmpty?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Return false to HIDE the child; true → show.
|
|
89
|
+
**/
|
|
90
|
+
visibleIf?: (childValue: C, parentValue: P) => boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type FormUpdateOn = 'change' | 'blur' | 'submit';
|
|
94
|
+
|
|
95
|
+
interface DynamicFieldModel {
|
|
96
|
+
type: DynamicFieldType;
|
|
97
|
+
name: string;
|
|
98
|
+
isRequired?: boolean;
|
|
99
|
+
isDisabled?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* If the field is valid it will be marked as such, instead of just maintaining the default state.
|
|
102
|
+
*/
|
|
103
|
+
showValidStatus?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Initial value.
|
|
106
|
+
*/
|
|
107
|
+
initValue?: any;
|
|
108
|
+
/**
|
|
109
|
+
* Determines when the control validation is triggered.
|
|
110
|
+
* 'change' (default), 'blur', or 'submit'.
|
|
111
|
+
*/
|
|
112
|
+
updateOn?: FormUpdateOn;
|
|
113
|
+
placeholder?: TextModel;
|
|
114
|
+
label?: TextModel;
|
|
115
|
+
hint?: TextModel;
|
|
116
|
+
hintAsTooltip?: boolean;
|
|
117
|
+
colSize?: RowColumnSize;
|
|
118
|
+
labelColSize?: RowColumnSize;
|
|
119
|
+
validators?: ValidatorFn[];
|
|
120
|
+
requiredPermissions?: RequiredPermissionsModel;
|
|
121
|
+
/**
|
|
122
|
+
* Cross-field dependencies (optional).
|
|
123
|
+
**/
|
|
124
|
+
attachments?: AttachmentRule[];
|
|
125
|
+
isHidden?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Value coming from a parent field when the rule `AttachmentTypeEnum.ParentLoad` is active.
|
|
128
|
+
* `upd-select` can use it to fetch the dependent list.
|
|
129
|
+
*/
|
|
130
|
+
parentValue?: any;
|
|
131
|
+
/**
|
|
132
|
+
* A signal to control the visibility of the field.
|
|
133
|
+
*/
|
|
134
|
+
isVisible?: Signal<boolean>;
|
|
135
|
+
onValueChanged?: (value: any) => void;
|
|
136
|
+
onBlur?: () => void;
|
|
137
|
+
onFocus?: () => void;
|
|
138
|
+
onTouched?: () => void;
|
|
139
|
+
onInput?: (value: any) => void;
|
|
140
|
+
onEnter?: () => void;
|
|
141
|
+
onValidationStatusChanged?: (status: FormControlStatus) => void;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface ButtonFieldModel extends DynamicFieldModel {
|
|
145
|
+
model: ButtonModel;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface ButtonGroupFieldModel extends DynamicFieldModel {
|
|
149
|
+
buttons: ButtonModel[];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface RadioFieldModel extends DynamicFieldModel {
|
|
153
|
+
isInline?: boolean;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
interface CheckboxFieldModel extends RadioFieldModel {
|
|
157
|
+
isSwitch?: boolean;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface CheckboxGroupFieldModel extends CheckboxFieldModel {
|
|
161
|
+
options: DictionaryType<TextModel>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
interface FileUploadFieldModel extends DynamicFieldModel {
|
|
165
|
+
title?: TextModel;
|
|
166
|
+
allowFilesDrop?: boolean;
|
|
167
|
+
isMultiple?: boolean;
|
|
168
|
+
allowedExtensions?: string;
|
|
169
|
+
minFileSize?: number;
|
|
170
|
+
maxFileSize?: number;
|
|
171
|
+
saveAsDataUrl?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* If set, uses this property to store/read the name of the file.
|
|
174
|
+
* *NOTE*: Required when using saveAsDataUrl.
|
|
175
|
+
*/
|
|
176
|
+
fileNameFormProperty?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface FormConfig {
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
interface FormRowModel {
|
|
183
|
+
fields: DynamicFieldModel[];
|
|
184
|
+
isCompact?: boolean;
|
|
185
|
+
isHidden?: boolean;
|
|
186
|
+
requiredPermissions?: RequiredPermissionsModel;
|
|
187
|
+
title?: TextModel;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
interface InputFieldModel extends DynamicFieldModel {
|
|
191
|
+
inputType?: InputType;
|
|
192
|
+
shouldSubmitOnEnter?: boolean;
|
|
193
|
+
prefix?: TextModel;
|
|
194
|
+
suffix?: TextModel;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
interface MaskedInputFieldModel extends InputFieldModel {
|
|
198
|
+
mask?: string;
|
|
199
|
+
maskConfig?: UpdMaskConfig;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
interface RadioGroupFieldModel extends RadioFieldModel {
|
|
203
|
+
options: DictionaryType<TextModel>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
interface SelectFieldModel extends DynamicFieldModel {
|
|
207
|
+
items?: SelectItem[];
|
|
208
|
+
store?: BaseSearchStore;
|
|
209
|
+
/**
|
|
210
|
+
* Observable used to load/filter the items.
|
|
211
|
+
*/
|
|
212
|
+
observable?: ObservableSearchType;
|
|
213
|
+
/**
|
|
214
|
+
* Name of the property in the object that represents the ID/key of the option.
|
|
215
|
+
* **Note:** used only for remote data.
|
|
216
|
+
*/
|
|
217
|
+
itemKey?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Name of the property in the object that represents the value/description of the option.
|
|
220
|
+
* **Note:** used only for remote data.
|
|
221
|
+
*/
|
|
222
|
+
itemValue?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Maximum height of the dropdown.
|
|
225
|
+
*/
|
|
226
|
+
dropdownMaxHeight?: number;
|
|
227
|
+
typeaheadDebounce?: number;
|
|
228
|
+
shouldAutoSearch?: boolean;
|
|
229
|
+
shouldCloseOnOutsideClick?: boolean;
|
|
230
|
+
shouldTruncateSelectedText?: boolean;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
interface SingleSelectFieldModel extends SelectFieldModel {
|
|
234
|
+
useSystemStyle?: boolean;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
interface TextareaFieldModel extends DynamicFieldModel {
|
|
238
|
+
value?: string;
|
|
239
|
+
customClasses?: string;
|
|
240
|
+
wrapperClasses?: string;
|
|
241
|
+
maxLength?: number;
|
|
242
|
+
rows?: number;
|
|
243
|
+
isDisabled?: boolean;
|
|
244
|
+
displayCharactersCount?: boolean;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare class FormComponent<T> extends BaseComponent implements OnInit {
|
|
248
|
+
readonly initialized: EventEmitter<void>;
|
|
249
|
+
readonly dataLoaded: EventEmitter<T>;
|
|
250
|
+
readonly submitted: EventEmitter<T>;
|
|
251
|
+
/**
|
|
252
|
+
* Rows to generate the form.
|
|
253
|
+
*/
|
|
254
|
+
rows: InputSignal<FormRowModel[]>;
|
|
255
|
+
/**
|
|
256
|
+
* Form's layout.
|
|
257
|
+
*/
|
|
258
|
+
layout: InputSignal<HorizontalVerticalType>;
|
|
259
|
+
/**
|
|
260
|
+
* Title of the form.
|
|
261
|
+
* Optional.
|
|
262
|
+
*/
|
|
263
|
+
title: InputSignal<OptionalType<TextModel>>;
|
|
264
|
+
/**
|
|
265
|
+
* Whether the actions section will be displayed.
|
|
266
|
+
*/
|
|
267
|
+
hasActionsSection: InputSignal<boolean>;
|
|
268
|
+
/**
|
|
269
|
+
* Whether the form is contained in a card.
|
|
270
|
+
* If true, it'll display a card as a form wrapper.
|
|
271
|
+
*/
|
|
272
|
+
isCard: InputSignal<boolean>;
|
|
273
|
+
/**
|
|
274
|
+
* Whether the form is in read only mode, which means no fields can be edited.
|
|
275
|
+
*/
|
|
276
|
+
isDisabled: i0.InputSignalWithTransform<boolean, string | boolean>;
|
|
277
|
+
/**
|
|
278
|
+
* Whether the form is loading.
|
|
279
|
+
*/
|
|
280
|
+
isLoading: InputSignal<boolean>;
|
|
281
|
+
/**
|
|
282
|
+
* Whether the form is saving.
|
|
283
|
+
*/
|
|
284
|
+
isSaving: InputSignal<boolean>;
|
|
285
|
+
/**
|
|
286
|
+
* Current form data.
|
|
287
|
+
*/
|
|
288
|
+
formData: i0.ModelSignal<T>;
|
|
289
|
+
formGroup: i0.ModelSignal<FormGroup<{}>>;
|
|
290
|
+
get titleText(): string;
|
|
291
|
+
readonly textService: TextService;
|
|
292
|
+
constructor();
|
|
293
|
+
ngOnInit(): void;
|
|
294
|
+
submit(): void;
|
|
295
|
+
private setupFormGroup;
|
|
296
|
+
/**
|
|
297
|
+
* Glue the declarative AttachmentRule array to actual FormControls.
|
|
298
|
+
**/
|
|
299
|
+
private bindAttachments;
|
|
300
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent<any>, never>;
|
|
301
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent<any>, "upd-form", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "hasActionsSection": { "alias": "hasActionsSection"; "required": false; "isSignal": true; }; "isCard": { "alias": "isCard"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isSaving": { "alias": "isSaving"; "required": false; "isSignal": true; }; "formData": { "alias": "formData"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; }, { "initialized": "initialized"; "dataLoaded": "dataLoaded"; "submitted": "submitted"; "formData": "formDataChange"; "formGroup": "formGroupChange"; }, never, never, false, never>;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
declare class DynamicFieldComponent extends BaseComponent implements OnInit {
|
|
305
|
+
get hostClasses(): string;
|
|
306
|
+
readonly submitForm: EventEmitter<void>;
|
|
307
|
+
DynamicFieldType: typeof DynamicFieldType;
|
|
308
|
+
SelectDefaults: typeof Defaults;
|
|
309
|
+
formGroup: InputSignal<FormGroup>;
|
|
310
|
+
field: InputSignal<DynamicFieldModel>;
|
|
311
|
+
layout: InputSignal<HorizontalVerticalType>;
|
|
312
|
+
validationStatus?: ValidationStatusType;
|
|
313
|
+
validationStatusDescriptions: TextModel[];
|
|
314
|
+
get formControl(): FormControl;
|
|
315
|
+
get inputField(): InputFieldModel;
|
|
316
|
+
get checkboxField(): CheckboxFieldModel;
|
|
317
|
+
get checkboxGroupField(): CheckboxGroupFieldModel;
|
|
318
|
+
get radioField(): CheckboxFieldModel;
|
|
319
|
+
get radioGroupField(): RadioGroupFieldModel;
|
|
320
|
+
get selectField(): SelectFieldModel;
|
|
321
|
+
get singleSelectField(): SingleSelectFieldModel;
|
|
322
|
+
get textareaField(): TextareaFieldModel;
|
|
323
|
+
get fileUploadField(): FileUploadFieldModel;
|
|
324
|
+
get maskedField(): MaskedInputFieldModel;
|
|
325
|
+
get buttonField(): ButtonFieldModel;
|
|
326
|
+
get buttonGroupField(): ButtonGroupFieldModel;
|
|
327
|
+
get checkboxGroupOptionsKeys(): string[];
|
|
328
|
+
get radioGroupOptionsKeys(): string[];
|
|
329
|
+
get fileNameControl(): OptionalType<FormControl>;
|
|
330
|
+
readonly textService: TextService;
|
|
331
|
+
private readonly wrapperClasses;
|
|
332
|
+
private readonly errorsHelper;
|
|
333
|
+
constructor();
|
|
334
|
+
ngOnInit(): void;
|
|
335
|
+
onBlur(): void;
|
|
336
|
+
onFocus(): void;
|
|
337
|
+
onInput(event: Event): void;
|
|
338
|
+
setControlValue(value: any): void;
|
|
339
|
+
getText(textModel?: TextModel): string;
|
|
340
|
+
getOptionDescription(key: string, type: 'checkbox' | 'radio'): OptionalType<TextModel>;
|
|
341
|
+
handleFileSelected(event?: FileUploadChangedEvent): void;
|
|
342
|
+
onInputEnter(): void;
|
|
343
|
+
private updateValidationDisplay;
|
|
344
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFieldComponent, never>;
|
|
345
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFieldComponent, "upd-dynamic-field", never, { "formGroup": { "alias": "formGroup"; "required": true; "isSignal": true; }; "field": { "alias": "field"; "required": true; "isSignal": true; }; "layout": { "alias": "layout"; "required": true; "isSignal": true; }; }, { "submitForm": "submitForm"; }, never, never, false, never>;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
declare class UpdFormModule {
|
|
349
|
+
constructor(translocoService: TranslocoService);
|
|
350
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UpdFormModule, never>;
|
|
351
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<UpdFormModule, [typeof FormComponent, typeof DynamicFieldComponent], [typeof i3.CommonModule, typeof i4.ReactiveFormsModule, typeof i5.UpdButtonModule, typeof i6.TranslocoDirective, typeof i7.UpdInputModule, typeof i8.UpdCheckboxModule, typeof i9.UpdRadioModule, typeof i10.UpdDatePickerModule, typeof i11.UpdSelectModule, typeof i12.UpdTextareaModule, typeof i13.UpdFileUploadModule, typeof i14.UpdSdkModule], [typeof FormComponent]>;
|
|
352
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<UpdFormModule>;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export { AttachmentTypeEnum, DynamicFieldType, FormComponent, UpdFormModule };
|
|
356
|
+
export type { AttachmentRule, ButtonFieldModel, ButtonGroupFieldModel, CheckboxFieldModel, CheckboxGroupFieldModel, DynamicFieldModel, FileUploadFieldModel, FormConfig, FormRowModel, InputFieldModel, MaskedInputFieldModel, RadioFieldModel, RadioGroupFieldModel, SelectFieldModel, SingleSelectFieldModel, TextareaFieldModel };
|