@colijnit/corecomponents_v12 259.1.4 → 259.1.5
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/bundles/colijnit-corecomponents_v12.umd.js +38 -178
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +16 -17
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +17 -18
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +15 -18
- package/fesm2015/colijnit-corecomponents_v12.js +15 -143
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +7 -9
- package/package.json +1 -1
|
@@ -17,7 +17,6 @@ import { CoDocument } from '@colijnit/mainapi/build/model/co-document.bo';
|
|
|
17
17
|
import * as i1 from '@angular/cdk/overlay';
|
|
18
18
|
import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
|
|
19
19
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
20
|
-
import * as XLSX from 'xlsx';
|
|
21
20
|
import { UserRightType } from '@colijnit/ioneconnector/build/enum/user-right-type.enum';
|
|
22
21
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
23
22
|
import { ArrayUtils as ArrayUtils$1 } from '@colijnit/ioneconnector/build/utils/array-utils';
|
|
@@ -9381,138 +9380,12 @@ BaseSimpleGridComponent.propDecorators = {
|
|
|
9381
9380
|
handleMouseUp: [{ type: HostListener, args: ['document:mouseup', ['$event'],] }]
|
|
9382
9381
|
};
|
|
9383
9382
|
|
|
9384
|
-
class ExcelExportService {
|
|
9385
|
-
/**
|
|
9386
|
-
* Export data to Excel file
|
|
9387
|
-
* @param data - Array of objects to export
|
|
9388
|
-
* @param columns - Column configuration (optional)
|
|
9389
|
-
* @param fileName - Name of the exported file
|
|
9390
|
-
* @param sheetName - Name of the Excel sheet
|
|
9391
|
-
*/
|
|
9392
|
-
exportToExcel(data, columns, fileName = 'export', sheetName = 'Sheet1') {
|
|
9393
|
-
// If columns are specified, transform data to match column structure
|
|
9394
|
-
let exportData = data;
|
|
9395
|
-
if (columns && columns.length > 0) {
|
|
9396
|
-
exportData = data.map(item => {
|
|
9397
|
-
const newItem = {};
|
|
9398
|
-
columns.forEach(col => {
|
|
9399
|
-
newItem[col.header] = this.getFlatValue(item, col.key);
|
|
9400
|
-
});
|
|
9401
|
-
return newItem;
|
|
9402
|
-
});
|
|
9403
|
-
}
|
|
9404
|
-
// Create workbook and worksheet
|
|
9405
|
-
const wb = XLSX.utils.book_new();
|
|
9406
|
-
const ws = XLSX.utils.json_to_sheet(exportData);
|
|
9407
|
-
// Set column widths if specified
|
|
9408
|
-
if (columns && columns.some(col => col.width)) {
|
|
9409
|
-
const colWidths = columns.map(col => ({ wch: col.width || 20 }));
|
|
9410
|
-
ws['!cols'] = colWidths;
|
|
9411
|
-
}
|
|
9412
|
-
// Add worksheet to workbook
|
|
9413
|
-
XLSX.utils.book_append_sheet(wb, ws, sheetName);
|
|
9414
|
-
// Save file
|
|
9415
|
-
XLSX.writeFile(wb, `${fileName}.xlsx`);
|
|
9416
|
-
}
|
|
9417
|
-
/**
|
|
9418
|
-
* Export multiple sheets to one Excel file
|
|
9419
|
-
* @param sheets - Array of sheet data
|
|
9420
|
-
* @param fileName - Name of the exported file
|
|
9421
|
-
*/
|
|
9422
|
-
exportMultipleSheets(sheets, fileName = 'multi-sheet-export') {
|
|
9423
|
-
const wb = XLSX.utils.book_new();
|
|
9424
|
-
sheets.forEach(sheet => {
|
|
9425
|
-
let exportData = sheet.data;
|
|
9426
|
-
if (sheet.columns && sheet.columns.length > 0) {
|
|
9427
|
-
exportData = sheet.data.map(item => {
|
|
9428
|
-
const newItem = {};
|
|
9429
|
-
sheet.columns.forEach(col => {
|
|
9430
|
-
newItem[col.header] = this.getNestedValue(item, col.key);
|
|
9431
|
-
});
|
|
9432
|
-
return newItem;
|
|
9433
|
-
});
|
|
9434
|
-
}
|
|
9435
|
-
const ws = XLSX.utils.json_to_sheet(exportData);
|
|
9436
|
-
if (sheet.columns && sheet.columns.some(col => col.width)) {
|
|
9437
|
-
const colWidths = sheet.columns.map(col => ({ wch: col.width || 20 }));
|
|
9438
|
-
ws['!cols'] = colWidths;
|
|
9439
|
-
}
|
|
9440
|
-
XLSX.utils.book_append_sheet(wb, ws, sheet.sheetName);
|
|
9441
|
-
});
|
|
9442
|
-
XLSX.writeFile(wb, `${fileName}.xlsx`);
|
|
9443
|
-
}
|
|
9444
|
-
/**
|
|
9445
|
-
* Export HTML table to Excel
|
|
9446
|
-
* @param tableId - ID of the HTML table element
|
|
9447
|
-
* @param fileName - Name of the exported file
|
|
9448
|
-
* @param sheetName - Name of the Excel sheet
|
|
9449
|
-
*/
|
|
9450
|
-
exportTableToExcel(tableId, fileName = 'table-export', sheetName = 'Sheet1') {
|
|
9451
|
-
const table = document.getElementById(tableId);
|
|
9452
|
-
if (!table) {
|
|
9453
|
-
console.error(`Table with ID '${tableId}' not found`);
|
|
9454
|
-
return;
|
|
9455
|
-
}
|
|
9456
|
-
const wb = XLSX.utils.book_new();
|
|
9457
|
-
const ws = XLSX.utils.table_to_sheet(table);
|
|
9458
|
-
XLSX.utils.book_append_sheet(wb, ws, sheetName);
|
|
9459
|
-
XLSX.writeFile(wb, `${fileName}.xlsx`);
|
|
9460
|
-
}
|
|
9461
|
-
/**
|
|
9462
|
-
* Get nested object value using dot notation
|
|
9463
|
-
* @param obj - Object to search in
|
|
9464
|
-
* @param path - Dot notation path (e.g., 'user.address.city')
|
|
9465
|
-
*/
|
|
9466
|
-
getNestedValue(obj, path) {
|
|
9467
|
-
return path.split('.').reduce((current, key) => {
|
|
9468
|
-
return current && current[key] !== undefined ? current[key] : '';
|
|
9469
|
-
}, obj);
|
|
9470
|
-
}
|
|
9471
|
-
getFlatValue(obj, key) {
|
|
9472
|
-
return obj && obj[key] !== undefined ? obj[key] : '';
|
|
9473
|
-
}
|
|
9474
|
-
/**
|
|
9475
|
-
* Format date for Excel export
|
|
9476
|
-
* @param date - Date to format
|
|
9477
|
-
* @param format - Format string (default: 'MM/DD/YYYY')
|
|
9478
|
-
*/
|
|
9479
|
-
formatDateForExport(date, format = 'MM/DD/YYYY') {
|
|
9480
|
-
if (!date) {
|
|
9481
|
-
return '';
|
|
9482
|
-
}
|
|
9483
|
-
const d = new Date(date);
|
|
9484
|
-
if (isNaN(d.getTime())) {
|
|
9485
|
-
return '';
|
|
9486
|
-
}
|
|
9487
|
-
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
|
9488
|
-
const day = d.getDate().toString().padStart(2, '0');
|
|
9489
|
-
const year = d.getFullYear();
|
|
9490
|
-
switch (format) {
|
|
9491
|
-
case 'MM/DD/YYYY':
|
|
9492
|
-
return `${month}/${day}/${year}`;
|
|
9493
|
-
case 'DD/MM/YYYY':
|
|
9494
|
-
return `${day}/${month}/${year}`;
|
|
9495
|
-
case 'YYYY-MM-DD':
|
|
9496
|
-
return `${year}-${month}-${day}`;
|
|
9497
|
-
default:
|
|
9498
|
-
return d.toLocaleDateString();
|
|
9499
|
-
}
|
|
9500
|
-
}
|
|
9501
|
-
}
|
|
9502
|
-
ExcelExportService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ExcelExportService_Factory() { return new ExcelExportService(); }, token: ExcelExportService, providedIn: "root" });
|
|
9503
|
-
ExcelExportService.decorators = [
|
|
9504
|
-
{ type: Injectable, args: [{
|
|
9505
|
-
providedIn: 'root'
|
|
9506
|
-
},] }
|
|
9507
|
-
];
|
|
9508
|
-
|
|
9509
9383
|
class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
9510
|
-
constructor(icons, _changeDetection, _formMaster
|
|
9384
|
+
constructor(icons, _changeDetection, _formMaster) {
|
|
9511
9385
|
super();
|
|
9512
9386
|
this.icons = icons;
|
|
9513
9387
|
this._changeDetection = _changeDetection;
|
|
9514
9388
|
this._formMaster = _formMaster;
|
|
9515
|
-
this.excelExportService = excelExportService;
|
|
9516
9389
|
this.defaultTextAlign = ColumnAlign.Left;
|
|
9517
9390
|
this.showAdd = false;
|
|
9518
9391
|
this.showDelete = false;
|
|
@@ -9881,6 +9754,18 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
9881
9754
|
// 'Sheet1'
|
|
9882
9755
|
// );
|
|
9883
9756
|
}
|
|
9757
|
+
goToPreviousPage() {
|
|
9758
|
+
this.currentPage -= 1;
|
|
9759
|
+
}
|
|
9760
|
+
goToNextPage() {
|
|
9761
|
+
this.currentPage += 1;
|
|
9762
|
+
}
|
|
9763
|
+
setCurrentPage(page) {
|
|
9764
|
+
this.currentPage = page;
|
|
9765
|
+
}
|
|
9766
|
+
get isNewRow() {
|
|
9767
|
+
return this._newRow;
|
|
9768
|
+
}
|
|
9884
9769
|
_filterSelectedOrReturnAll(items) {
|
|
9885
9770
|
const hasSelectedTrue = items.some(item => item.selected === true);
|
|
9886
9771
|
return hasSelectedTrue ? items.filter(item => item.selected === true) : items;
|
|
@@ -10022,15 +9907,6 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
10022
9907
|
}
|
|
10023
9908
|
this._detectChanges();
|
|
10024
9909
|
}
|
|
10025
|
-
goToPreviousPage() {
|
|
10026
|
-
this.currentPage -= 1;
|
|
10027
|
-
}
|
|
10028
|
-
goToNextPage() {
|
|
10029
|
-
this.currentPage += 1;
|
|
10030
|
-
}
|
|
10031
|
-
setCurrentPage(page) {
|
|
10032
|
-
this.currentPage = page;
|
|
10033
|
-
}
|
|
10034
9910
|
_detectChanges() {
|
|
10035
9911
|
this._changeDetection.detectChanges();
|
|
10036
9912
|
}
|
|
@@ -10042,9 +9918,6 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
10042
9918
|
this.editing = false;
|
|
10043
9919
|
this.rowToEdit = undefined;
|
|
10044
9920
|
}
|
|
10045
|
-
get isNewRow() {
|
|
10046
|
-
return this._newRow;
|
|
10047
|
-
}
|
|
10048
9921
|
}
|
|
10049
9922
|
SimpleGridComponent.decorators = [
|
|
10050
9923
|
{ type: Component, args: [{
|
|
@@ -10229,8 +10102,7 @@ SimpleGridComponent.decorators = [
|
|
|
10229
10102
|
SimpleGridComponent.ctorParameters = () => [
|
|
10230
10103
|
{ type: IconCacheService },
|
|
10231
10104
|
{ type: ChangeDetectorRef },
|
|
10232
|
-
{ type: FormMasterService }
|
|
10233
|
-
{ type: ExcelExportService }
|
|
10105
|
+
{ type: FormMasterService }
|
|
10234
10106
|
];
|
|
10235
10107
|
SimpleGridComponent.propDecorators = {
|
|
10236
10108
|
headerCells: [{ type: ViewChildren, args: ['headerCell',] }],
|
|
@@ -15054,5 +14926,5 @@ HourSchedulingExpandableComponentModule.decorators = [
|
|
|
15054
14926
|
* Generated bundle index. Do not edit.
|
|
15055
14927
|
*/
|
|
15056
14928
|
|
|
15057
|
-
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb,
|
|
14929
|
+
export { ArticleTileComponent, ArticleTileModule, BaseInputComponent, BaseInputDatePickerDirective, BaseModuleScreenConfigService, BaseModuleService, ButtonComponent, ButtonModule, CalendarComponent, CalendarModule, CardComponent, CardModule, Carousel3dComponent, Carousel3dModule, CarouselComponent, CarouselHammerConfig, CarouselModule, CheckmarkOverlayModule, ClickoutsideModule, CoDialogComponent, CoDialogModule, CoDialogWizardComponent, CoDialogWizardModule, CoDirection, CoOrientation, CollapsibleComponent, CollapsibleModule, ColorPickerComponent, ColorPickerModule, ColorSequenceService, ColumnAlign, ContentViewMode, CoreComponentsIcon, CoreComponentsTranslationModule, CoreComponentsTranslationService, CoreDialogModule, CoreDialogService, DoubleCalendarComponent, DoubleCalendarModule, FilterItemComponent, FilterItemMode, FilterItemModule, FilterItemViewmodel, FilterPipe, FilterPipeModule, FilterViewmodel, FormComponent, FormInputUserModelChangeListenerService, FormMasterService, FormModule, GridToolbarButtonComponent, GridToolbarButtonModule, GridToolbarComponent, GridToolbarModule, HourSchedulingComponent, HourSchedulingComponentModule, HourSchedulingExpandableComponent, HourSchedulingExpandableComponentModule, HourSchedulingExpandableTemplateComponent, IconCacheService, IconCollapseHandleComponent, IconCollapseHandleModule, IconComponent, IconModule, ImageComponent, ImageModule, InputCheckboxComponent, InputCheckboxModule, InputDatePickerComponent, InputDatePickerModule, InputDateRangePickerComponent, InputDateRangePickerModule, InputNumberPickerComponent, InputNumberPickerModule, InputRadioButtonComponent, InputRadioButtonModule, InputScannerComponent, InputScannerModule, InputSearchComponent, InputSearchModule, InputTextComponent, InputTextModule, InputTextareaComponent, InputTextareaModule, LevelIndicatorComponent, LevelIndicatorModule, ListOfIconsComponent, ListOfIconsModule, ListOfValuesComponent, ListOfValuesModule, ListOfValuesPopupComponent, LoaderComponent, LoaderModule, NgZoneWrapperService, ObserveVisibilityModule, OrientationOfDirection, OverlayModule, OverlayService, PaginationBarComponent, PaginationBarModule, PaginationComponent, PaginationModule, PopupButtonsComponent, PopupMessageDisplayComponent, PopupModule, PopupWindowShellComponent, PriceDisplayPipe, PriceDisplayPipeModule, PromptService, ResponsiveTextComponent, ResponsiveTextModule, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, ScreenConfigurationDirective, ScreenConfigurationModule, SimpleGridColumnDirective, SimpleGridComponent, SimpleGridModule, TemplateWrapperDirective, TemplateWrapperModule, TextInputPopupComponent, TileComponent, TileModule, TileSelectComponent, TileSelectModule, TooltipDirectiveModule, ViewModeButtonsComponent, ViewModeButtonsModule, emailValidator, equalValidator, getValidatePasswordErrorString, maxStringLengthValidator, passwordValidator, precisionScaleValidator, requiredValidator, showHideDialog, InputBoolean as ɵa, RippleModule as ɵb, PaginationService as ɵba, PaginatePipe as ɵbb, SimpleGridCellComponent as ɵbc, ListOfValuesMultiselectPopupComponent as ɵbd, ConfirmationDialogComponent as ɵbe, DialogBaseComponent as ɵbf, CoreDynamicComponentService as ɵbg, PrependPipeModule as ɵbh, PrependPipe as ɵbi, CheckmarkOverlayComponent as ɵbj, ScannerService as ɵbk, TooltipModule as ɵbl, TooltipComponent as ɵbm, TooltipDirective as ɵbn, HourSchedulingTestObjectComponent as ɵbo, MD_RIPPLE_GLOBAL_OPTIONS as ɵc, CoRippleDirective as ɵd, CoViewportRulerService as ɵe, CoScrollDispatcherService as ɵf, CoScrollableDirective as ɵg, StopClickModule as ɵh, StopClickDirective as ɵi, BaseModule as ɵj, AppendPipeModule as ɵk, AppendPipe as ɵl, ValidationErrorModule as ɵm, OverlayDirective as ɵn, OverlayParentDirective as ɵo, CoreLocalizePipe as ɵp, CoreDictionaryService as ɵq, ValidationErrorComponent as ɵr, CommitButtonsModule as ɵs, CommitButtonsComponent as ɵt, ClickOutsideDirective as ɵu, ClickOutsideMasterService as ɵv, CalendarTemplateComponent as ɵw, PopupShowerService as ɵx, BaseSimpleGridComponent as ɵy, ObserveVisibilityDirective as ɵz };
|
|
15058
14930
|
//# sourceMappingURL=colijnit-corecomponents_v12.js.map
|