@corp-products/ui-components 2.0.8 → 3.0.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/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, TemplateRef, OnInit,
|
|
2
|
+
import { EventEmitter, TemplateRef, OnInit, PipeTransform, OnDestroy, Type, EnvironmentInjector, ApplicationRef } from '@angular/core';
|
|
3
3
|
import { ActivatedRoute, Router, Params } from '@angular/router';
|
|
4
4
|
import { DialogService, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
5
|
-
import {
|
|
5
|
+
import { FormGroup, FormControl, ValidationErrors, AbstractControl } from '@angular/forms';
|
|
6
|
+
import { AutoCompleteSelectEvent, AutoCompleteCompleteEvent } from 'primeng/autocomplete';
|
|
6
7
|
import * as rxjs from 'rxjs';
|
|
7
8
|
import { Subject } from 'rxjs';
|
|
8
|
-
import { SelectChangeEvent } from 'primeng/select';
|
|
9
|
-
import { AutoCompleteSelectEvent, AutoCompleteCompleteEvent } from 'primeng/autocomplete';
|
|
10
9
|
import { SelectButtonChangeEvent } from 'primeng/selectbutton';
|
|
10
|
+
import { SelectChangeEvent } from 'primeng/select';
|
|
11
11
|
import { MenuItem } from 'primeng/api';
|
|
12
12
|
|
|
13
13
|
type AppButtonSeverity = 'success' | 'info' | 'warn' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast';
|
|
@@ -131,6 +131,53 @@ declare class UserInfoComponent {
|
|
|
131
131
|
static ɵcmp: i0.ɵɵComponentDeclaration<UserInfoComponent, "user-info", never, { "profileImage": { "alias": "profileImage"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, never, true, never>;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
declare class FormUtils {
|
|
135
|
+
static getFormControl(controlName: string, form: FormGroup): FormControl;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare enum BasicErrorKeysEnum {
|
|
139
|
+
required = "REQUIRED",
|
|
140
|
+
email = "EMAIL",
|
|
141
|
+
pattern = "PATTERN",
|
|
142
|
+
invalidArFormat = "INVALID_AR_FORMAT",
|
|
143
|
+
invalidLink = "INVALID_LINK",
|
|
144
|
+
endDateBeforeStartDate = "END_DATE_BEFORE_START_DATE",
|
|
145
|
+
startDateEqualsEndDate = "START_DATE_EQUALS_END_DATE",
|
|
146
|
+
endTimeBeforeStartTime = "END_TIME_BEFORE_START_TIME",
|
|
147
|
+
startTimeEqualsEndTime = "START_TIME_EQUALS_END_TIME",
|
|
148
|
+
integer = "INTEGER",
|
|
149
|
+
positiveNumber = "POSITIVE_NUMBER",
|
|
150
|
+
fileSelected = "FILE_SELECTED",
|
|
151
|
+
default = "DEFAULT"
|
|
152
|
+
}
|
|
153
|
+
declare enum ErrorsWithValuesKeysEnum {
|
|
154
|
+
minlength = "MIN_LENGTH",
|
|
155
|
+
maxlength = "MAX_LENGTH",
|
|
156
|
+
min = "MIN",
|
|
157
|
+
max = "MAX",
|
|
158
|
+
maxSize = "MAX_SIZE",
|
|
159
|
+
maxFiles = "MAX_FILES",
|
|
160
|
+
allowedTypes = "ALLOWED_TYPES"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare class ValidationErrorsPipe implements PipeTransform {
|
|
164
|
+
private formValidationService;
|
|
165
|
+
transform(errors: ValidationErrors | null, allowedKeys?: string[]): string[];
|
|
166
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorsPipe, never>;
|
|
167
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ValidationErrorsPipe, "validationErrors", true>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare class FormValidationService {
|
|
171
|
+
private translate;
|
|
172
|
+
private getTranslation;
|
|
173
|
+
getErrorMessage(errorKey: string, errorValue: any): string;
|
|
174
|
+
private isBasicErrorKey;
|
|
175
|
+
private isErrorWithValueKey;
|
|
176
|
+
private getErrorWithValueMessage;
|
|
177
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormValidationService, never>;
|
|
178
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormValidationService>;
|
|
179
|
+
}
|
|
180
|
+
|
|
134
181
|
declare abstract class BaseInputComponent implements OnInit, OnDestroy {
|
|
135
182
|
control: FormControl;
|
|
136
183
|
name: string;
|
|
@@ -149,40 +196,19 @@ declare abstract class BaseInputComponent implements OnInit, OnDestroy {
|
|
|
149
196
|
static ɵcmp: i0.ɵɵComponentDeclaration<BaseInputComponent, "ng-component", never, { "control": { "alias": "control"; "required": true; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; }, {}, never, never, true, never>;
|
|
150
197
|
}
|
|
151
198
|
|
|
152
|
-
declare class
|
|
153
|
-
type: "text" | "textarea";
|
|
154
|
-
contentType: "text" | "email" | "number";
|
|
155
|
-
prefix: string;
|
|
156
|
-
rows: number;
|
|
157
|
-
cols: number;
|
|
158
|
-
autoResize: boolean;
|
|
159
|
-
basicInput: boolean;
|
|
160
|
-
noStyle: boolean;
|
|
161
|
-
hideOptionalLabel: boolean;
|
|
162
|
-
inputDirection: "ltr" | "rtl" | "inherit";
|
|
163
|
-
constructor();
|
|
164
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
165
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "stc-input", never, { "type": { "alias": "type"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "noStyle": { "alias": "noStyle"; "required": false; }; "hideOptionalLabel": { "alias": "hideOptionalLabel"; "required": false; }; "inputDirection": { "alias": "inputDirection"; "required": false; }; }, {}, never, never, true, never>;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare class SelectComponent extends BaseInputComponent {
|
|
199
|
+
declare class AutoCompleteComponent extends BaseInputComponent {
|
|
169
200
|
selectedItemTemplate: TemplateRef<unknown> | null;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
editable: boolean;
|
|
176
|
-
filter: boolean;
|
|
177
|
-
multiple: boolean;
|
|
178
|
-
filterBy: string;
|
|
179
|
-
selectedItemsLabel: string;
|
|
201
|
+
onSearch: EventEmitter<string>;
|
|
202
|
+
selectOption: EventEmitter<AutoCompleteSelectEvent>;
|
|
203
|
+
items: any[];
|
|
204
|
+
minLengthToSearch: number;
|
|
205
|
+
delay: number;
|
|
180
206
|
basicInput: boolean;
|
|
181
|
-
change: EventEmitter<any>;
|
|
182
207
|
constructor();
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
static
|
|
208
|
+
search(event: AutoCompleteCompleteEvent): void;
|
|
209
|
+
onSelect(event: AutoCompleteSelectEvent): void;
|
|
210
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutoCompleteComponent, never>;
|
|
211
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteComponent, "stc-auto-complete", never, { "selectedItemTemplate": { "alias": "selectedItemTemplate"; "required": false; }; "items": { "alias": "items"; "required": false; }; "minLengthToSearch": { "alias": "minLengthToSearch"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; }, { "onSearch": "onSearch"; "selectOption": "selectOption"; }, never, never, true, never>;
|
|
186
212
|
}
|
|
187
213
|
|
|
188
214
|
declare class DatePickerComponent extends BaseInputComponent {
|
|
@@ -196,27 +222,30 @@ declare class DatePickerComponent extends BaseInputComponent {
|
|
|
196
222
|
nowTime: Date;
|
|
197
223
|
selectionMode: 'single' | 'range';
|
|
198
224
|
onAfterClearDate: EventEmitter<void>;
|
|
225
|
+
variant: 'in' | 'over' | 'on';
|
|
199
226
|
constructor();
|
|
200
227
|
selectCurrentTime(e: any): void;
|
|
201
228
|
clearButtonClick(e: any): void;
|
|
202
229
|
afterClearDate(): void;
|
|
203
230
|
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
204
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "stc-date-picker", never, { "showIcon": { "alias": "showIcon"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "isTimeOnly": { "alias": "isTimeOnly"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "hourFormat": { "alias": "hourFormat"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; }, { "onAfterClearDate": "onAfterClearDate"; }, never, never, true, never>;
|
|
231
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "stc-date-picker", never, { "showIcon": { "alias": "showIcon"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "isTimeOnly": { "alias": "isTimeOnly"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "hourFormat": { "alias": "hourFormat"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, { "onAfterClearDate": "onAfterClearDate"; }, never, never, true, never>;
|
|
205
232
|
}
|
|
206
233
|
|
|
207
|
-
declare class
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
234
|
+
declare class InputComponent extends BaseInputComponent {
|
|
235
|
+
type: 'text' | 'textarea';
|
|
236
|
+
contentType: 'text' | 'email' | 'number';
|
|
237
|
+
prefix: string;
|
|
238
|
+
rows: number;
|
|
239
|
+
cols: number;
|
|
240
|
+
autoResize: boolean;
|
|
214
241
|
basicInput: boolean;
|
|
242
|
+
noStyle: boolean;
|
|
243
|
+
hideOptionalLabel: boolean;
|
|
244
|
+
inputDirection: 'ltr' | 'rtl' | 'inherit';
|
|
245
|
+
variant: 'in' | 'over' | 'on';
|
|
215
246
|
constructor();
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AutoCompleteComponent, never>;
|
|
219
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteComponent, "stc-auto-complete", never, { "selectedItemTemplate": { "alias": "selectedItemTemplate"; "required": false; }; "items": { "alias": "items"; "required": false; }; "minLengthToSearch": { "alias": "minLengthToSearch"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; }, { "onSearch": "onSearch"; "selectOption": "selectOption"; }, never, never, true, never>;
|
|
247
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
248
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "stc-input", never, { "type": { "alias": "type"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "noStyle": { "alias": "noStyle"; "required": false; }; "hideOptionalLabel": { "alias": "hideOptionalLabel"; "required": false; }; "inputDirection": { "alias": "inputDirection"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, never, true, never>;
|
|
220
249
|
}
|
|
221
250
|
|
|
222
251
|
interface LabelValue<T> {
|
|
@@ -233,6 +262,27 @@ declare class SelectButtonComponent extends BaseInputComponent {
|
|
|
233
262
|
static ɵcmp: i0.ɵɵComponentDeclaration<SelectButtonComponent, "stc-select-button", never, { "options": { "alias": "options"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
234
263
|
}
|
|
235
264
|
|
|
265
|
+
declare class SelectComponent extends BaseInputComponent {
|
|
266
|
+
selectedItemTemplate: TemplateRef<unknown> | null;
|
|
267
|
+
optionTemplate: TemplateRef<unknown> | null;
|
|
268
|
+
options: unknown[];
|
|
269
|
+
optionLabel: string;
|
|
270
|
+
checkmark: boolean;
|
|
271
|
+
showClear: boolean;
|
|
272
|
+
editable: boolean;
|
|
273
|
+
filter: boolean;
|
|
274
|
+
multiple: boolean;
|
|
275
|
+
filterBy: string;
|
|
276
|
+
selectedItemsLabel: string;
|
|
277
|
+
basicInput: boolean;
|
|
278
|
+
variant: 'in' | 'over' | 'on';
|
|
279
|
+
change: EventEmitter<any>;
|
|
280
|
+
constructor();
|
|
281
|
+
onChange(e: SelectChangeEvent): void;
|
|
282
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
283
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "stc-select", never, { "selectedItemTemplate": { "alias": "selectedItemTemplate"; "required": false; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "checkmark": { "alias": "checkmark"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; }; "basicInput": { "alias": "basicInput"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
|
|
284
|
+
}
|
|
285
|
+
|
|
236
286
|
declare class SwitchComponent {
|
|
237
287
|
label: string;
|
|
238
288
|
key: string;
|
|
@@ -243,53 +293,6 @@ declare class SwitchComponent {
|
|
|
243
293
|
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "stc-switch", never, { "label": { "alias": "label"; "required": false; }; "key": { "alias": "key"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
244
294
|
}
|
|
245
295
|
|
|
246
|
-
declare class FormUtils {
|
|
247
|
-
static getFormControl(controlName: string, form: FormGroup): FormControl;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
declare enum BasicErrorKeysEnum {
|
|
251
|
-
required = "REQUIRED",
|
|
252
|
-
email = "EMAIL",
|
|
253
|
-
pattern = "PATTERN",
|
|
254
|
-
invalidArFormat = "INVALID_AR_FORMAT",
|
|
255
|
-
invalidLink = "INVALID_LINK",
|
|
256
|
-
endDateBeforeStartDate = "END_DATE_BEFORE_START_DATE",
|
|
257
|
-
startDateEqualsEndDate = "START_DATE_EQUALS_END_DATE",
|
|
258
|
-
endTimeBeforeStartTime = "END_TIME_BEFORE_START_TIME",
|
|
259
|
-
startTimeEqualsEndTime = "START_TIME_EQUALS_END_TIME",
|
|
260
|
-
integer = "INTEGER",
|
|
261
|
-
positiveNumber = "POSITIVE_NUMBER",
|
|
262
|
-
fileSelected = "FILE_SELECTED",
|
|
263
|
-
default = "DEFAULT"
|
|
264
|
-
}
|
|
265
|
-
declare enum ErrorsWithValuesKeysEnum {
|
|
266
|
-
minlength = "MIN_LENGTH",
|
|
267
|
-
maxlength = "MAX_LENGTH",
|
|
268
|
-
min = "MIN",
|
|
269
|
-
max = "MAX",
|
|
270
|
-
maxSize = "MAX_SIZE",
|
|
271
|
-
maxFiles = "MAX_FILES",
|
|
272
|
-
allowedTypes = "ALLOWED_TYPES"
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
declare class ValidationErrorsPipe implements PipeTransform {
|
|
276
|
-
private formValidationService;
|
|
277
|
-
transform(errors: ValidationErrors | null, allowedKeys?: string[]): string[];
|
|
278
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorsPipe, never>;
|
|
279
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ValidationErrorsPipe, "validationErrors", true>;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
declare class FormValidationService {
|
|
283
|
-
private translate;
|
|
284
|
-
private getTranslation;
|
|
285
|
-
getErrorMessage(errorKey: string, errorValue: any): string;
|
|
286
|
-
private isBasicErrorKey;
|
|
287
|
-
private isErrorWithValueKey;
|
|
288
|
-
private getErrorWithValueMessage;
|
|
289
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormValidationService, never>;
|
|
290
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FormValidationService>;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
296
|
type InputType = "text" | "textarea";
|
|
294
297
|
type InputContentType = "text" | "email" | "password" | "number";
|
|
295
298
|
interface Dropdown<T = unknown> {
|
|
@@ -393,10 +396,10 @@ declare class UserAutocompleteCardComponent {
|
|
|
393
396
|
}
|
|
394
397
|
|
|
395
398
|
interface BreadcrumbItem {
|
|
396
|
-
|
|
399
|
+
notClickable: boolean;
|
|
397
400
|
label: string;
|
|
398
401
|
routerLink: string;
|
|
399
|
-
|
|
402
|
+
isShown: boolean;
|
|
400
403
|
extraBreadcrumbs?: BreadCrumbExtraData[];
|
|
401
404
|
}
|
|
402
405
|
interface BreadCrumbPosition {
|
|
@@ -408,7 +411,7 @@ declare class AppBreadcrumbComponent implements OnInit {
|
|
|
408
411
|
private activatedRoute;
|
|
409
412
|
private router;
|
|
410
413
|
items: BreadcrumbItem[] | undefined;
|
|
411
|
-
|
|
414
|
+
isShown: boolean;
|
|
412
415
|
constructor(activatedRoute: ActivatedRoute, router: Router);
|
|
413
416
|
ngOnInit(): void;
|
|
414
417
|
private _checkHiddenBreadcrumb;
|