@colijnit/corecomponents_v12 259.1.3 → 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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/cdk/drag-drop'), require('@colijnit/mainapi/build/model/co-document.bo'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('xlsx'), require('@colijnit/ioneconnector/build/enum/user-right-type.enum'), require('@angular/cdk/scrolling'), require('@colijnit/ioneconnector/build/utils/array-utils'), require('@colijnit/ioneconnector/build/model/default-get-object-configurations-params'), require('@colijnit/ioneconnector/build/model/object-configuration')) :
3
- typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/forms', 'rxjs', '@angular/platform-browser', '@angular/animations', '@angular/common', '@angular/common/http', 'rxjs/operators', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/cdk/drag-drop', '@colijnit/mainapi/build/model/co-document.bo', '@angular/cdk/overlay', '@angular/cdk/portal', 'xlsx', '@colijnit/ioneconnector/build/enum/user-right-type.enum', '@angular/cdk/scrolling', '@colijnit/ioneconnector/build/utils/array-utils', '@colijnit/ioneconnector/build/model/default-get-object-configurations-params', '@colijnit/ioneconnector/build/model/object-configuration'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.forms, global.rxjs, global.ng.platformBrowser, global.ng.animations, global.ng.common, global.ng.common.http, global.rxjs.operators, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.cdk.dragDrop, global.coDocument_bo, global.ng.cdk.overlay, global.ng.cdk.portal, global.XLSX, global.userRightType_enum, global.ng.cdk.scrolling, global.arrayUtils, global.defaultGetObjectConfigurationsParams, global.objectConfiguration));
5
- })(this, (function (exports, i0, forms, rxjs, platformBrowser, animations, common, http, operators, three, CSS3DRenderer, TWEEN, hammerjs, dragDrop, coDocument_bo, i1, portal, XLSX, userRightType_enum, scrolling, arrayUtils, defaultGetObjectConfigurationsParams, objectConfiguration) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('rxjs'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('three'), require('three/examples/jsm/renderers/CSS3DRenderer'), require('@tweenjs/tween.js'), require('hammerjs'), require('@angular/cdk/drag-drop'), require('@colijnit/mainapi/build/model/co-document.bo'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@colijnit/ioneconnector/build/enum/user-right-type.enum'), require('@angular/cdk/scrolling'), require('@colijnit/ioneconnector/build/utils/array-utils'), require('@colijnit/ioneconnector/build/model/default-get-object-configurations-params'), require('@colijnit/ioneconnector/build/model/object-configuration')) :
3
+ typeof define === 'function' && define.amd ? define('@colijnit/corecomponents_v12', ['exports', '@angular/core', '@angular/forms', 'rxjs', '@angular/platform-browser', '@angular/animations', '@angular/common', '@angular/common/http', 'rxjs/operators', 'three', 'three/examples/jsm/renderers/CSS3DRenderer', '@tweenjs/tween.js', 'hammerjs', '@angular/cdk/drag-drop', '@colijnit/mainapi/build/model/co-document.bo', '@angular/cdk/overlay', '@angular/cdk/portal', '@colijnit/ioneconnector/build/enum/user-right-type.enum', '@angular/cdk/scrolling', '@colijnit/ioneconnector/build/utils/array-utils', '@colijnit/ioneconnector/build/model/default-get-object-configurations-params', '@colijnit/ioneconnector/build/model/object-configuration'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.corecomponents_v12 = {}), global.ng.core, global.ng.forms, global.rxjs, global.ng.platformBrowser, global.ng.animations, global.ng.common, global.ng.common.http, global.rxjs.operators, global.three, global.CSS3DRenderer, global.TWEEN, null, global.ng.cdk.dragDrop, global.coDocument_bo, global.ng.cdk.overlay, global.ng.cdk.portal, global.userRightType_enum, global.ng.cdk.scrolling, global.arrayUtils, global.defaultGetObjectConfigurationsParams, global.objectConfiguration));
5
+ })(this, (function (exports, i0, forms, rxjs, platformBrowser, animations, common, http, operators, three, CSS3DRenderer, TWEEN, hammerjs, dragDrop, coDocument_bo, i1, portal, userRightType_enum, scrolling, arrayUtils, defaultGetObjectConfigurationsParams, objectConfiguration) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -25,7 +25,6 @@
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var TWEEN__namespace = /*#__PURE__*/_interopNamespace(TWEEN);
27
27
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
- var XLSX__namespace = /*#__PURE__*/_interopNamespace(XLSX);
29
28
 
30
29
  /******************************************************************************
31
30
  Copyright (c) Microsoft Corporation.
@@ -9795,6 +9794,7 @@
9795
9794
  this.headerColumns = [];
9796
9795
  this.headerColumnsCopy = [];
9797
9796
  this._data = [];
9797
+ this._exportData = [];
9798
9798
  this.disabledRows = [];
9799
9799
  this._prepared = false;
9800
9800
  }
@@ -9818,6 +9818,16 @@
9818
9818
  enumerable: false,
9819
9819
  configurable: true
9820
9820
  });
9821
+ Object.defineProperty(BaseSimpleGridComponent.prototype, "exportData", {
9822
+ get: function () {
9823
+ return this._exportData;
9824
+ },
9825
+ set: function (value) {
9826
+ this._exportData = value;
9827
+ },
9828
+ enumerable: false,
9829
+ configurable: true
9830
+ });
9821
9831
  Object.defineProperty(BaseSimpleGridComponent.prototype, "extraColumns", {
9822
9832
  set: function (value) {
9823
9833
  this._setColumns(value);
@@ -9926,6 +9936,7 @@
9926
9936
  BaseSimpleGridComponent.propDecorators = {
9927
9937
  content: [{ type: i0.ContentChildren, args: [SimpleGridColumnDirective,] }],
9928
9938
  data: [{ type: i0.Input }],
9939
+ exportData: [{ type: i0.Input }],
9929
9940
  dragDropEnabled: [{ type: i0.Input }],
9930
9941
  resizable: [{ type: i0.Input }],
9931
9942
  inlineEdit: [{ type: i0.Input }],
@@ -9945,150 +9956,13 @@
9945
9956
  handleMouseUp: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
9946
9957
  };
9947
9958
 
9948
- var ExcelExportService = /** @class */ (function () {
9949
- function ExcelExportService() {
9950
- }
9951
- /**
9952
- * Export data to Excel file
9953
- * @param data - Array of objects to export
9954
- * @param columns - Column configuration (optional)
9955
- * @param fileName - Name of the exported file
9956
- * @param sheetName - Name of the Excel sheet
9957
- */
9958
- ExcelExportService.prototype.exportToExcel = function (data, columns, fileName, sheetName) {
9959
- var _this = this;
9960
- if (fileName === void 0) { fileName = 'export'; }
9961
- if (sheetName === void 0) { sheetName = 'Sheet1'; }
9962
- // If columns are specified, transform data to match column structure
9963
- var exportData = data;
9964
- if (columns && columns.length > 0) {
9965
- exportData = data.map(function (item) {
9966
- var newItem = {};
9967
- columns.forEach(function (col) {
9968
- newItem[col.header] = _this.getFlatValue(item, col.key);
9969
- });
9970
- return newItem;
9971
- });
9972
- }
9973
- // Create workbook and worksheet
9974
- var wb = XLSX__namespace.utils.book_new();
9975
- var ws = XLSX__namespace.utils.json_to_sheet(exportData);
9976
- // Set column widths if specified
9977
- if (columns && columns.some(function (col) { return col.width; })) {
9978
- var colWidths = columns.map(function (col) { return ({ wch: col.width || 20 }); });
9979
- ws['!cols'] = colWidths;
9980
- }
9981
- // Add worksheet to workbook
9982
- XLSX__namespace.utils.book_append_sheet(wb, ws, sheetName);
9983
- // Save file
9984
- XLSX__namespace.writeFile(wb, fileName + ".xlsx");
9985
- };
9986
- /**
9987
- * Export multiple sheets to one Excel file
9988
- * @param sheets - Array of sheet data
9989
- * @param fileName - Name of the exported file
9990
- */
9991
- ExcelExportService.prototype.exportMultipleSheets = function (sheets, fileName) {
9992
- var _this = this;
9993
- if (fileName === void 0) { fileName = 'multi-sheet-export'; }
9994
- var wb = XLSX__namespace.utils.book_new();
9995
- sheets.forEach(function (sheet) {
9996
- var exportData = sheet.data;
9997
- if (sheet.columns && sheet.columns.length > 0) {
9998
- exportData = sheet.data.map(function (item) {
9999
- var newItem = {};
10000
- sheet.columns.forEach(function (col) {
10001
- newItem[col.header] = _this.getNestedValue(item, col.key);
10002
- });
10003
- return newItem;
10004
- });
10005
- }
10006
- var ws = XLSX__namespace.utils.json_to_sheet(exportData);
10007
- if (sheet.columns && sheet.columns.some(function (col) { return col.width; })) {
10008
- var colWidths = sheet.columns.map(function (col) { return ({ wch: col.width || 20 }); });
10009
- ws['!cols'] = colWidths;
10010
- }
10011
- XLSX__namespace.utils.book_append_sheet(wb, ws, sheet.sheetName);
10012
- });
10013
- XLSX__namespace.writeFile(wb, fileName + ".xlsx");
10014
- };
10015
- /**
10016
- * Export HTML table to Excel
10017
- * @param tableId - ID of the HTML table element
10018
- * @param fileName - Name of the exported file
10019
- * @param sheetName - Name of the Excel sheet
10020
- */
10021
- ExcelExportService.prototype.exportTableToExcel = function (tableId, fileName, sheetName) {
10022
- if (fileName === void 0) { fileName = 'table-export'; }
10023
- if (sheetName === void 0) { sheetName = 'Sheet1'; }
10024
- var table = document.getElementById(tableId);
10025
- if (!table) {
10026
- console.error("Table with ID '" + tableId + "' not found");
10027
- return;
10028
- }
10029
- var wb = XLSX__namespace.utils.book_new();
10030
- var ws = XLSX__namespace.utils.table_to_sheet(table);
10031
- XLSX__namespace.utils.book_append_sheet(wb, ws, sheetName);
10032
- XLSX__namespace.writeFile(wb, fileName + ".xlsx");
10033
- };
10034
- /**
10035
- * Get nested object value using dot notation
10036
- * @param obj - Object to search in
10037
- * @param path - Dot notation path (e.g., 'user.address.city')
10038
- */
10039
- ExcelExportService.prototype.getNestedValue = function (obj, path) {
10040
- return path.split('.').reduce(function (current, key) {
10041
- return current && current[key] !== undefined ? current[key] : '';
10042
- }, obj);
10043
- };
10044
- ExcelExportService.prototype.getFlatValue = function (obj, key) {
10045
- return obj && obj[key] !== undefined ? obj[key] : '';
10046
- };
10047
- /**
10048
- * Format date for Excel export
10049
- * @param date - Date to format
10050
- * @param format - Format string (default: 'MM/DD/YYYY')
10051
- */
10052
- ExcelExportService.prototype.formatDateForExport = function (date, format) {
10053
- if (format === void 0) { format = 'MM/DD/YYYY'; }
10054
- if (!date) {
10055
- return '';
10056
- }
10057
- var d = new Date(date);
10058
- if (isNaN(d.getTime())) {
10059
- return '';
10060
- }
10061
- var month = (d.getMonth() + 1).toString().padStart(2, '0');
10062
- var day = d.getDate().toString().padStart(2, '0');
10063
- var year = d.getFullYear();
10064
- switch (format) {
10065
- case 'MM/DD/YYYY':
10066
- return month + "/" + day + "/" + year;
10067
- case 'DD/MM/YYYY':
10068
- return day + "/" + month + "/" + year;
10069
- case 'YYYY-MM-DD':
10070
- return year + "-" + month + "-" + day;
10071
- default:
10072
- return d.toLocaleDateString();
10073
- }
10074
- };
10075
- return ExcelExportService;
10076
- }());
10077
- ExcelExportService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ExcelExportService_Factory() { return new ExcelExportService(); }, token: ExcelExportService, providedIn: "root" });
10078
- ExcelExportService.decorators = [
10079
- { type: i0.Injectable, args: [{
10080
- providedIn: 'root'
10081
- },] }
10082
- ];
10083
-
10084
9959
  var SimpleGridComponent = /** @class */ (function (_super) {
10085
9960
  __extends(SimpleGridComponent, _super);
10086
- function SimpleGridComponent(icons, _changeDetection, _formMaster, excelExportService) {
9961
+ function SimpleGridComponent(icons, _changeDetection, _formMaster) {
10087
9962
  var _this = _super.call(this) || this;
10088
9963
  _this.icons = icons;
10089
9964
  _this._changeDetection = _changeDetection;
10090
9965
  _this._formMaster = _formMaster;
10091
- _this.excelExportService = excelExportService;
10092
9966
  _this.defaultTextAlign = exports.ColumnAlign.Left;
10093
9967
  _this.showAdd = false;
10094
9968
  _this.showDelete = false;
@@ -10461,7 +10335,7 @@
10461
10335
  };
10462
10336
  SimpleGridComponent.prototype.exportToExcel = function () {
10463
10337
  this.isSettingsMenuOpen = false;
10464
- var exportData = this._filterSelectedOrReturnAll(this.data);
10338
+ var exportData = this.exportData.length > 0 ? this._filterSelectedOrReturnAll(this.exportData) : this._filterSelectedOrReturnAll(this.data);
10465
10339
  var columns = this.headerColumnsCopy.map(function (column) {
10466
10340
  return ({
10467
10341
  key: column.field,
@@ -10518,6 +10392,22 @@
10518
10392
  // 'Sheet1'
10519
10393
  // );
10520
10394
  };
10395
+ SimpleGridComponent.prototype.goToPreviousPage = function () {
10396
+ this.currentPage -= 1;
10397
+ };
10398
+ SimpleGridComponent.prototype.goToNextPage = function () {
10399
+ this.currentPage += 1;
10400
+ };
10401
+ SimpleGridComponent.prototype.setCurrentPage = function (page) {
10402
+ this.currentPage = page;
10403
+ };
10404
+ Object.defineProperty(SimpleGridComponent.prototype, "isNewRow", {
10405
+ get: function () {
10406
+ return this._newRow;
10407
+ },
10408
+ enumerable: false,
10409
+ configurable: true
10410
+ });
10521
10411
  SimpleGridComponent.prototype._filterSelectedOrReturnAll = function (items) {
10522
10412
  var hasSelectedTrue = items.some(function (item) { return item.selected === true; });
10523
10413
  return hasSelectedTrue ? items.filter(function (item) { return item.selected === true; }) : items;
@@ -10665,15 +10555,6 @@
10665
10555
  }
10666
10556
  this._detectChanges();
10667
10557
  };
10668
- SimpleGridComponent.prototype.goToPreviousPage = function () {
10669
- this.currentPage -= 1;
10670
- };
10671
- SimpleGridComponent.prototype.goToNextPage = function () {
10672
- this.currentPage += 1;
10673
- };
10674
- SimpleGridComponent.prototype.setCurrentPage = function (page) {
10675
- this.currentPage = page;
10676
- };
10677
10558
  SimpleGridComponent.prototype._detectChanges = function () {
10678
10559
  this._changeDetection.detectChanges();
10679
10560
  };
@@ -10685,13 +10566,6 @@
10685
10566
  this.editing = false;
10686
10567
  this.rowToEdit = undefined;
10687
10568
  };
10688
- Object.defineProperty(SimpleGridComponent.prototype, "isNewRow", {
10689
- get: function () {
10690
- return this._newRow;
10691
- },
10692
- enumerable: false,
10693
- configurable: true
10694
- });
10695
10569
  return SimpleGridComponent;
10696
10570
  }(BaseSimpleGridComponent));
10697
10571
  SimpleGridComponent.decorators = [
@@ -10706,8 +10580,7 @@
10706
10580
  SimpleGridComponent.ctorParameters = function () { return [
10707
10581
  { type: IconCacheService },
10708
10582
  { type: i0.ChangeDetectorRef },
10709
- { type: FormMasterService },
10710
- { type: ExcelExportService }
10583
+ { type: FormMasterService }
10711
10584
  ]; };
10712
10585
  SimpleGridComponent.propDecorators = {
10713
10586
  headerCells: [{ type: i0.ViewChildren, args: ['headerCell',] }],
@@ -15403,22 +15276,21 @@
15403
15276
  exports.showHideDialog = showHideDialog;
15404
15277
  exports["ɵa"] = InputBoolean;
15405
15278
  exports["ɵb"] = RippleModule;
15406
- exports["ɵba"] = ObserveVisibilityDirective;
15407
- exports["ɵbb"] = PaginationService;
15408
- exports["ɵbc"] = PaginatePipe;
15409
- exports["ɵbd"] = SimpleGridCellComponent;
15410
- exports["ɵbe"] = ListOfValuesMultiselectPopupComponent;
15411
- exports["ɵbf"] = ConfirmationDialogComponent;
15412
- exports["ɵbg"] = DialogBaseComponent;
15413
- exports["ɵbh"] = CoreDynamicComponentService;
15414
- exports["ɵbi"] = PrependPipeModule;
15415
- exports["ɵbj"] = PrependPipe;
15416
- exports["ɵbk"] = CheckmarkOverlayComponent;
15417
- exports["ɵbl"] = ScannerService;
15418
- exports["ɵbm"] = TooltipModule;
15419
- exports["ɵbn"] = TooltipComponent;
15420
- exports["ɵbo"] = TooltipDirective;
15421
- exports["ɵbp"] = HourSchedulingTestObjectComponent;
15279
+ exports["ɵba"] = PaginationService;
15280
+ exports["ɵbb"] = PaginatePipe;
15281
+ exports["ɵbc"] = SimpleGridCellComponent;
15282
+ exports["ɵbd"] = ListOfValuesMultiselectPopupComponent;
15283
+ exports["ɵbe"] = ConfirmationDialogComponent;
15284
+ exports["ɵbf"] = DialogBaseComponent;
15285
+ exports["ɵbg"] = CoreDynamicComponentService;
15286
+ exports["ɵbh"] = PrependPipeModule;
15287
+ exports["ɵbi"] = PrependPipe;
15288
+ exports["ɵbj"] = CheckmarkOverlayComponent;
15289
+ exports["ɵbk"] = ScannerService;
15290
+ exports["ɵbl"] = TooltipModule;
15291
+ exports["ɵbm"] = TooltipComponent;
15292
+ exports["ɵbn"] = TooltipDirective;
15293
+ exports["ɵbo"] = HourSchedulingTestObjectComponent;
15422
15294
  exports["ɵc"] = MD_RIPPLE_GLOBAL_OPTIONS;
15423
15295
  exports["ɵd"] = CoRippleDirective;
15424
15296
  exports["ɵe"] = CoViewportRulerService;
@@ -15442,7 +15314,7 @@
15442
15314
  exports["ɵw"] = CalendarTemplateComponent;
15443
15315
  exports["ɵx"] = PopupShowerService;
15444
15316
  exports["ɵy"] = BaseSimpleGridComponent;
15445
- exports["ɵz"] = ExcelExportService;
15317
+ exports["ɵz"] = ObserveVisibilityDirective;
15446
15318
 
15447
15319
  Object.defineProperty(exports, '__esModule', { value: true });
15448
15320