cloud-ide-element 1.0.9 → 1.0.16
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/cloud-ide-element.mjs +813 -123
- package/fesm2022/cloud-ide-element.mjs.map +1 -1
- package/index.d.ts +98 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { PipeTransform, OnChanges, OnInit, EventEmitter,
|
|
2
|
+
import { PipeTransform, OnChanges, OnInit, OnDestroy, EventEmitter, TemplateRef, SimpleChanges, Renderer2, ElementRef, AfterContentInit, QueryList } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
4
4
|
import { elementStyleType, labelPlacementType, labelDirType, autocapitalizeType, autocompleteType, controlType, inputType, themeSize, spinnerType, iconType, selectSearchType, ICoreSype, GetElementDataRequest } from 'cloud-ide-lms-model';
|
|
5
5
|
import { Router, NavigationExtras } from '@angular/router';
|
|
@@ -22,7 +22,7 @@ type ValidationStatus = {
|
|
|
22
22
|
validation: ErrorValidationStatus;
|
|
23
23
|
status: boolean;
|
|
24
24
|
};
|
|
25
|
-
declare class CideInputComponent implements ControlValueAccessor, Validator, OnChanges, OnInit {
|
|
25
|
+
declare class CideInputComponent implements ControlValueAccessor, Validator, OnChanges, OnInit, OnDestroy {
|
|
26
26
|
capitalizePipe: CapitalizePipe;
|
|
27
27
|
private elementService;
|
|
28
28
|
constructor();
|
|
@@ -76,10 +76,10 @@ declare class CideInputComponent implements ControlValueAccessor, Validator, OnC
|
|
|
76
76
|
/** @description to get input value using one way binding like: [ngModel] or by two way binding [(ngModel)] */
|
|
77
77
|
ngModel: inputType;
|
|
78
78
|
option: string[];
|
|
79
|
-
/** @description min value for number type control */
|
|
80
|
-
min: number;
|
|
81
|
-
/** @description max value for number type control */
|
|
82
|
-
max: number;
|
|
79
|
+
/** @description min value for number type control or min date for date type control */
|
|
80
|
+
min: number | string;
|
|
81
|
+
/** @description max value for number type control or max date for date type control */
|
|
82
|
+
max: number | string;
|
|
83
83
|
/**
|
|
84
84
|
* @description
|
|
85
85
|
* Holds the size of the component like Small, Extra small, Large
|
|
@@ -106,6 +106,25 @@ declare class CideInputComponent implements ControlValueAccessor, Validator, OnC
|
|
|
106
106
|
trailingIconInternal: string;
|
|
107
107
|
isTrailingIconAllwedClick: boolean;
|
|
108
108
|
idRandom: string;
|
|
109
|
+
showDatePicker: boolean;
|
|
110
|
+
showMonthYearSelector: boolean;
|
|
111
|
+
currentMonth: number;
|
|
112
|
+
currentYear: number;
|
|
113
|
+
selectedDate: Date | null;
|
|
114
|
+
calendarDays: {
|
|
115
|
+
day: number;
|
|
116
|
+
isCurrentMonth: boolean;
|
|
117
|
+
isSelected: boolean;
|
|
118
|
+
isToday: boolean;
|
|
119
|
+
date: Date;
|
|
120
|
+
}[];
|
|
121
|
+
monthNames: string[];
|
|
122
|
+
shortMonthNames: string[];
|
|
123
|
+
private portalService;
|
|
124
|
+
private datePickerPortalId;
|
|
125
|
+
private viewContainerRef;
|
|
126
|
+
datePickerTemplate: TemplateRef<any>;
|
|
127
|
+
private datePickerViewRef;
|
|
109
128
|
/**
|
|
110
129
|
* @description Function to call when the HTML Chnage to tell Angular somthing is changed.
|
|
111
130
|
* @field value : inputType
|
|
@@ -143,6 +162,7 @@ declare class CideInputComponent implements ControlValueAccessor, Validator, OnC
|
|
|
143
162
|
/** @description Detect wether input propertires canged or not */
|
|
144
163
|
ngOnChanges(changes: SimpleChanges): void;
|
|
145
164
|
ngOnInit(): void;
|
|
165
|
+
ngOnDestroy(): void;
|
|
146
166
|
/** @description custom method run when HTML changes, we call method registerd by angular to detect change */
|
|
147
167
|
upDateValue(value: {
|
|
148
168
|
target: {
|
|
@@ -186,6 +206,68 @@ declare class CideInputComponent implements ControlValueAccessor, Validator, OnC
|
|
|
186
206
|
* @description use to detact the change in type if changes done this method is ued to run
|
|
187
207
|
*/
|
|
188
208
|
detectTypeChange(): void;
|
|
209
|
+
/**
|
|
210
|
+
* @description Format date to YYYY-MM-DD format (for form submission)
|
|
211
|
+
*/
|
|
212
|
+
formatDate(date: Date | string): string;
|
|
213
|
+
/**
|
|
214
|
+
* @description Format date for display as "DD/MMM/YYYY" (e.g., "20/Jun/2025")
|
|
215
|
+
*/
|
|
216
|
+
formatDateForDisplay(date: Date | string): string;
|
|
217
|
+
/**
|
|
218
|
+
* @description Get display value for date input
|
|
219
|
+
*/
|
|
220
|
+
getDateDisplayValue(): string;
|
|
221
|
+
/**
|
|
222
|
+
* @description Initialize date picker with current values
|
|
223
|
+
*/
|
|
224
|
+
initializeDatePicker(): void;
|
|
225
|
+
/**
|
|
226
|
+
* @description Generate calendar days for current month
|
|
227
|
+
*/
|
|
228
|
+
generateCalendar(): void;
|
|
229
|
+
/**
|
|
230
|
+
* @description Create date picker using template-based portal service
|
|
231
|
+
*/
|
|
232
|
+
private createDatePickerUsingPortal;
|
|
233
|
+
/**
|
|
234
|
+
* @description Close date picker
|
|
235
|
+
*/
|
|
236
|
+
closeDatePicker(): void;
|
|
237
|
+
/**
|
|
238
|
+
* @description Navigate to previous month
|
|
239
|
+
*/
|
|
240
|
+
previousMonth(): void;
|
|
241
|
+
/**
|
|
242
|
+
* @description Navigate to next month
|
|
243
|
+
*/
|
|
244
|
+
nextMonth(): void;
|
|
245
|
+
/**
|
|
246
|
+
* @description Navigate to previous year
|
|
247
|
+
*/
|
|
248
|
+
previousYear(): void;
|
|
249
|
+
/**
|
|
250
|
+
* @description Navigate to next year
|
|
251
|
+
*/
|
|
252
|
+
nextYear(): void;
|
|
253
|
+
/**
|
|
254
|
+
* @description Toggle between calendar and month/year selector
|
|
255
|
+
*/
|
|
256
|
+
toggleMonthYearSelector(): void;
|
|
257
|
+
/**
|
|
258
|
+
* @description Select a month from the month selector
|
|
259
|
+
*/
|
|
260
|
+
selectMonth(monthIndex: number): void;
|
|
261
|
+
/**
|
|
262
|
+
* @description Select a date from the calendar
|
|
263
|
+
*/
|
|
264
|
+
selectDate(dayInfo: {
|
|
265
|
+
day: number;
|
|
266
|
+
isCurrentMonth: boolean;
|
|
267
|
+
isSelected: boolean;
|
|
268
|
+
isToday: boolean;
|
|
269
|
+
date: Date;
|
|
270
|
+
}): void;
|
|
189
271
|
static ɵfac: i0.ɵɵFactoryDeclaration<CideInputComponent, never>;
|
|
190
272
|
static ɵcmp: i0.ɵɵComponentDeclaration<CideInputComponent, "cide-ele-input", never, { "fill": { "alias": "fill"; "required": false; }; "label": { "alias": "label"; "required": false; }; "labelHide": { "alias": "labelHide"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "clearInput": { "alias": "clearInput"; "required": false; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; }; "labelDir": { "alias": "labelDir"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "leadingIcon": { "alias": "leadingIcon"; "required": false; }; "trailingIcon": { "alias": "trailingIcon"; "required": false; }; "helperText": { "alias": "helperText"; "required": false; }; "helperTextCollapse": { "alias": "helperTextCollapse"; "required": false; }; "hideHelperAndErrorText": { "alias": "hideHelperAndErrorText"; "required": false; }; "errorText": { "alias": "errorText"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "required": { "alias": "required"; "required": false; }; "autocapitalize": { "alias": "autocapitalize"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "type": { "alias": "type"; "required": false; }; "width": { "alias": "width"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ngModel": { "alias": "ngModel"; "required": false; }; "option": { "alias": "option"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "ngModelChange": "ngModelChange"; }, never, never, true, never>;
|
|
191
273
|
}
|
|
@@ -754,11 +836,8 @@ interface TemplateContext<T = Record<string, unknown>> {
|
|
|
754
836
|
column: GridColumn;
|
|
755
837
|
}
|
|
756
838
|
type TemplateRenderer<T = Record<string, unknown>> = TemplateRef<TemplateContext<T>>;
|
|
757
|
-
type StringRenderer<T = Record<string, unknown>> = (value: unknown, row: T) => string;
|
|
758
|
-
type Renderer<T = Record<string, unknown>> = StringRenderer<T> | TemplateRenderer<T>;
|
|
759
839
|
declare class CideEleDataGridComponent<T = Record<string, unknown>> implements OnInit, OnChanges, OnDestroy {
|
|
760
840
|
config: GridConfiguration<T>;
|
|
761
|
-
customRenderers: Record<string, StringRenderer<T>>;
|
|
762
841
|
templateRenderers: Record<string, unknown>;
|
|
763
842
|
customFormatters: Record<string, (value: unknown, format?: string) => string>;
|
|
764
843
|
actionHandlers: Record<string, (data: T, action?: GridAction) => void>;
|
|
@@ -961,11 +1040,8 @@ declare class CideEleDataGridComponent<T = Record<string, unknown>> implements O
|
|
|
961
1040
|
private formatDate;
|
|
962
1041
|
private formatCurrency;
|
|
963
1042
|
private formatPercentage;
|
|
964
|
-
renderCustomCell(value: unknown, row: T, column: GridColumn): string;
|
|
965
1043
|
isTemplateRenderer(rendererKey: string): boolean;
|
|
966
|
-
isStringRenderer(rendererKey: string): boolean;
|
|
967
1044
|
getTemplateRenderer(rendererKey: string): TemplateRenderer<T> | null;
|
|
968
|
-
getStringRenderer(rendererKey: string): StringRenderer<T> | null;
|
|
969
1045
|
getTemplateContext(value: unknown, row: T, column: GridColumn): TemplateContext<T>;
|
|
970
1046
|
getColumnWidthClass(width?: ColumnWidth): string;
|
|
971
1047
|
getColumnMaxWidthClass(width?: ColumnWidth): string;
|
|
@@ -985,7 +1061,7 @@ declare class CideEleDataGridComponent<T = Record<string, unknown>> implements O
|
|
|
985
1061
|
get loadingConfig(): cloud_ide_element.GridLoadingConfig;
|
|
986
1062
|
get scrollConfig(): cloud_ide_element.GridScrollConfig | undefined;
|
|
987
1063
|
static ɵfac: i0.ɵɵFactoryDeclaration<CideEleDataGridComponent<any>, never>;
|
|
988
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CideEleDataGridComponent<any>, "cide-ele-data-grid", never, { "config": { "alias": "config"; "required": false; }; "
|
|
1064
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CideEleDataGridComponent<any>, "cide-ele-data-grid", never, { "config": { "alias": "config"; "required": false; }; "templateRenderers": { "alias": "templateRenderers"; "required": false; }; "customFormatters": { "alias": "customFormatters"; "required": false; }; "actionHandlers": { "alias": "actionHandlers"; "required": false; }; "serverSidePagination": { "alias": "serverSidePagination"; "required": false; }; "totalServerItems": { "alias": "totalServerItems"; "required": false; }; "currentServerPage": { "alias": "currentServerPage"; "required": false; }; "currentServerPageSize": { "alias": "currentServerPageSize"; "required": false; }; "dragDropEnabled": { "alias": "dragDropEnabled"; "required": false; }; }, { "gridEvent": "gridEvent"; }, never, never, true, never>;
|
|
989
1065
|
}
|
|
990
1066
|
|
|
991
1067
|
interface DropdownItem {
|
|
@@ -1010,6 +1086,7 @@ interface DropdownConfig {
|
|
|
1010
1086
|
forcePosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
1011
1087
|
offsetX?: number;
|
|
1012
1088
|
offsetY?: number;
|
|
1089
|
+
usePortal?: boolean;
|
|
1013
1090
|
}
|
|
1014
1091
|
interface DropdownPosition {
|
|
1015
1092
|
vertical: 'top' | 'bottom';
|
|
@@ -1024,9 +1101,13 @@ interface DropdownPosition {
|
|
|
1024
1101
|
declare class CideEleDropdownComponent implements OnInit, OnDestroy {
|
|
1025
1102
|
private destroyRef;
|
|
1026
1103
|
private dropdownManager;
|
|
1104
|
+
private portalService;
|
|
1105
|
+
private viewContainerRef;
|
|
1027
1106
|
private dropdownId;
|
|
1107
|
+
private portalId;
|
|
1028
1108
|
dropdownContainer: i0.Signal<ElementRef<any>>;
|
|
1029
1109
|
dropdownMenu: i0.Signal<ElementRef<any> | undefined>;
|
|
1110
|
+
dropdownMenuTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
1030
1111
|
set items(value: DropdownItem[]);
|
|
1031
1112
|
get items(): DropdownItem[];
|
|
1032
1113
|
private _items;
|
|
@@ -1042,7 +1123,6 @@ declare class CideEleDropdownComponent implements OnInit, OnDestroy {
|
|
|
1042
1123
|
isOpen: i0.WritableSignal<boolean>;
|
|
1043
1124
|
currentPosition: i0.WritableSignal<DropdownPosition>;
|
|
1044
1125
|
ngOnInit(): void;
|
|
1045
|
-
ngOnDestroy(): void;
|
|
1046
1126
|
getTriggerClasses(): string;
|
|
1047
1127
|
getTriggerIconClasses(): string;
|
|
1048
1128
|
getMenuClasses(): string;
|
|
@@ -1054,10 +1134,13 @@ declare class CideEleDropdownComponent implements OnInit, OnDestroy {
|
|
|
1054
1134
|
private openDropdown;
|
|
1055
1135
|
testMouseDown(item: DropdownItem): void;
|
|
1056
1136
|
onItemClick(item: DropdownItem, event: Event): void;
|
|
1137
|
+
private createPortalDropdown;
|
|
1138
|
+
private destroyPortalDropdown;
|
|
1057
1139
|
closeDropdown(): void;
|
|
1058
1140
|
getItemClasses(item: DropdownItem): string;
|
|
1059
1141
|
onWindowResize(): void;
|
|
1060
1142
|
onWindowScroll(): void;
|
|
1143
|
+
ngOnDestroy(): void;
|
|
1061
1144
|
static ɵfac: i0.ɵɵFactoryDeclaration<CideEleDropdownComponent, never>;
|
|
1062
1145
|
static ɵcmp: i0.ɵɵComponentDeclaration<CideEleDropdownComponent, "cide-ele-dropdown", never, { "items": { "alias": "items"; "required": false; }; "config": { "alias": "config"; "required": false; }; "triggerTemplate": { "alias": "triggerTemplate"; "required": false; }; "menuTemplate": { "alias": "menuTemplate"; "required": false; }; }, { "itemClick": "itemClick"; "dropdownToggle": "dropdownToggle"; }, never, never, true, never>;
|
|
1063
1146
|
}
|
|
@@ -1377,4 +1460,4 @@ declare class CideEleJsonEditorComponent implements OnInit, ControlValueAccessor
|
|
|
1377
1460
|
}
|
|
1378
1461
|
|
|
1379
1462
|
export { CideEleButtonComponent, CideEleConfirmationModalComponent, CideEleDataGridComponent, CideEleDropdownComponent, CideEleFileInputComponent, CideEleGlobalNotificationsComponent, CideEleJsonEditorComponent, CideEleResizerDirective, CideEleSkeletonLoaderComponent, CideEleTabComponent, CideEleToastNotificationComponent, CideElementsService, CideIconComponent, CideInputComponent, CideSelectComponent, CideSelectOptionComponent, CideSpinnerComponent, CideTextareaComponent, ConfirmationService, DEFAULT_GRID_CONFIG, DropdownManagerService, NotificationService, TooltipDirective };
|
|
1380
|
-
export type { ButtonElevation, ButtonShape, ButtonSize, ButtonType, ButtonVariant, CideEleResizerDirection, CideEleResizerDirectionTo, ColumnType, ColumnWidth, ConfirmationOptions, ConfirmationRequest, DropdownConfig, DropdownInstance, DropdownItem, DropdownPosition, ErrorValidationStatus, GridAction, GridColumn, GridConfiguration, GridCustomFormatter, GridCustomRenderer, GridDragDropConfig, GridEvent, GridEventHandler, GridExportConfig, GridFormatter, GridLoadingConfig, GridPaginationConfig, GridScrollConfig, GridSearchConfig, GridState, GridTreeConfig, JsonEditorConfig, JsonEditorError, NotificationItem, NotificationOptions,
|
|
1463
|
+
export type { ButtonElevation, ButtonShape, ButtonSize, ButtonType, ButtonVariant, CideEleResizerDirection, CideEleResizerDirectionTo, ColumnType, ColumnWidth, ConfirmationOptions, ConfirmationRequest, DropdownConfig, DropdownInstance, DropdownItem, DropdownPosition, ErrorValidationStatus, GridAction, GridColumn, GridConfiguration, GridCustomFormatter, GridCustomRenderer, GridDragDropConfig, GridEvent, GridEventHandler, GridExportConfig, GridFormatter, GridLoadingConfig, GridPaginationConfig, GridScrollConfig, GridSearchConfig, GridState, GridTreeConfig, JsonEditorConfig, JsonEditorError, NotificationItem, NotificationOptions, SelectOption, StatusConfig, TabItem, TemplateContext, TemplateRenderer, TextAlign, TooltipPlacement, TooltipType, ValidationStatus };
|