cilog-lib 1.12.24 → 1.12.26

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.
@@ -33,6 +33,8 @@ import * as i6 from 'primeng/toggleswitch';
33
33
  import { ToggleSwitchModule } from 'primeng/toggleswitch';
34
34
  import * as Excel from 'exceljs';
35
35
  import * as FileSaver from 'file-saver';
36
+ import { AgGridAngular } from 'ag-grid-angular';
37
+ import { themeQuartz, ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
36
38
  import * as i2$1 from 'primeng/treetable';
37
39
  import { TreeTableModule } from 'primeng/treetable';
38
40
  import * as i2$2 from 'primeng/editor';
@@ -506,8 +508,8 @@ class ExportService {
506
508
  key: col.id,
507
509
  style: this.getStyleByType(col.type)
508
510
  };
509
- if (col.width != null && col.width.includes('px')) {
510
- const px = parseInt(col.width.replace('px', '').trim(), 10);
511
+ if (col.width != null && col.width.toString().includes('px')) {
512
+ const px = parseInt(col.width.toString().replace('px', '').trim(), 10);
511
513
  const excelWidth = px / 7;
512
514
  colExcel.width = parseFloat(excelWidth.toFixed(2));
513
515
  }
@@ -1339,6 +1341,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
1339
1341
  args: ['inputNumber']
1340
1342
  }] } });
1341
1343
 
1344
+ const myTheme = themeQuartz
1345
+ .withParams({
1346
+ backgroundColor: '#ffffff',
1347
+ foregroundColor: '#1a1a1a',
1348
+ headerBackgroundColor: '#795548',
1349
+ headerTextColor: 'white',
1350
+ headerFontWeight: 'bold',
1351
+ spacing: 10,
1352
+ fontSize: 12,
1353
+ headerFontSize: 14,
1354
+ });
1355
+ class CilogGridComponent {
1356
+ gridApi;
1357
+ theme = myTheme;
1358
+ options = input.required(...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
1359
+ columns = model.required(...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
1360
+ values = model.required(...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
1361
+ constructor() {
1362
+ ModuleRegistry.registerModules([AllCommunityModule]);
1363
+ }
1364
+ defaultColDef = {
1365
+ sortable: false,
1366
+ suppressMovable: true
1367
+ };
1368
+ colDefs = computed(() => {
1369
+ let cols = [];
1370
+ this.columns().forEach(col => {
1371
+ let colDef = {
1372
+ field: col.id,
1373
+ headerName: col.libelle,
1374
+ pinned: col.frozen ? true : false,
1375
+ hide: col.invisible ? true : false,
1376
+ initialWidth: col.width,
1377
+ suppressSizeToFit: col.width != null ? true : false,
1378
+ headerTooltip: col.libelle,
1379
+ valueGetter: (params) => {
1380
+ if (!params.data || !params.data[params.colDef.field] || !params.data[params.colDef.field].value)
1381
+ return '';
1382
+ return params.data[params.colDef.field].value;
1383
+ }
1384
+ };
1385
+ cols.push(colDef);
1386
+ });
1387
+ return cols;
1388
+ }, ...(ngDevMode ? [{ debugName: "colDefs" }] : /* istanbul ignore next */ []));
1389
+ onGridReady(params) {
1390
+ this.gridApi = params.api;
1391
+ this.gridApi.sizeColumnsToFit();
1392
+ window.addEventListener('resize', () => {
1393
+ setTimeout(() => {
1394
+ this.gridApi.sizeColumnsToFit();
1395
+ });
1396
+ });
1397
+ }
1398
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CilogGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1399
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: CilogGridComponent, isStandalone: true, selector: "cilog-grid", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { columns: "columnsChange", values: "valuesChange" }, ngImport: i0, template: "<ag-grid-angular style=\"width: 100%;\"\r\n [style.height]=\"options().scrollHeight ? options().scrollHeight : 'auto'\"\r\n [domLayout]=\"options().scrollHeight != null ? 'normal' : 'autoHeight'\"\r\n [theme]=\"theme\"\r\n [rowData]=\"values()\"\r\n [columnDefs]=\"colDefs()\"\r\n (gridReady)=\"onGridReady($event)\"\r\n [defaultColDef]=\"defaultColDef\">\r\n</ag-grid-angular>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: AgGridAngular, selector: "ag-grid-angular", inputs: ["gridOptions", "modules", "toolbar", "statusBar", "sideBar", "suppressContextMenu", "preventDefaultOnContextMenu", "allowContextMenuWithControlKey", "columnMenu", "suppressMenuHide", "enableBrowserTooltips", "tooltipTrigger", "tooltipShowDelay", "tooltipSwitchShowDelay", "tooltipHideDelay", "tooltipMouseTrack", "tooltipShowMode", "tooltipInteraction", "popupParent", "copyHeadersToClipboard", "copyGroupHeadersToClipboard", "clipboardDelimiter", "suppressCopyRowsToClipboard", "suppressCopySingleCellRanges", "suppressLastEmptyLineOnPaste", "suppressClipboardPaste", "suppressClipboardApi", "suppressCutToClipboard", "columnDefs", "defaultColDef", "defaultColGroupDef", "columnTypes", "dataTypeDefinitions", "calculatedColumns", "maintainColumnOrder", "enableStrictPivotColumnOrder", "suppressFieldDotNotation", "headerHeight", "groupHeaderHeight", "floatingFiltersHeight", "pivotHeaderHeight", "pivotGroupHeaderHeight", "hidePaddedHeaderRows", "allowDragFromColumnsToolPanel", "suppressMovableColumns", "suppressColumnMoveAnimation", "suppressMoveWhenColumnDragging", "suppressDragLeaveHidesColumns", "suppressGroupChangesColumnVisibility", "suppressMakeColumnVisibleAfterUnGroup", "suppressRowGroupHidesColumns", "colResizeDefault", "suppressAutoSize", "autoSizePadding", "skipHeaderOnAutoSize", "autoSizeStrategy", "animateColumnResizing", "components", "editType", "suppressStartEditOnTab", "getFullRowEditValidationErrors", "invalidEditValueMode", "singleClickEdit", "suppressClickEdit", "readOnlyEdit", "stopEditingWhenCellsLoseFocus", "enterNavigatesVertically", "enterNavigatesVerticallyAfterEdit", "enableCellEditingOnBackspace", "undoRedoCellEditing", "undoRedoCellEditingLimit", "defaultCsvExportParams", "suppressCsvExport", "defaultExcelExportParams", "suppressExcelExport", "excelStyles", "findSearchValue", "findOptions", "quickFilterText", "cacheQuickFilter", "includeHiddenColumnsInQuickFilter", "quickFilterParser", "quickFilterMatcher", "applyQuickFilterBeforePivotOrAgg", "excludeChildrenWhenTreeDataFiltering", "enableAdvancedFilter", "alwaysPassFilter", "includeHiddenColumnsInAdvancedFilter", "advancedFilterParent", "advancedFilterBuilderParams", "advancedFilterParams", "suppressAdvancedFilterEval", "suppressSetFilterByDefault", "enableFilterHandlers", "filterHandlers", "enableCharts", "chartThemes", "customChartThemes", "chartThemeOverrides", "chartToolPanelsDef", "chartMenuItems", "loadingCellRenderer", "loadingCellRendererParams", "loadingCellRendererSelector", "localeText", "masterDetail", "keepDetailRows", "keepDetailRowsCount", "detailCellRenderer", "detailCellRendererParams", "detailRowHeight", "detailRowAutoHeight", "context", "alignedGrids", "tabIndex", "rowBuffer", "valueCache", "valueCacheNeverExpires", "enableCellExpressions", "suppressTouch", "suppressFocusAfterRefresh", "suppressBrowserResizeObserver", "suppressPropertyNamesCheck", "suppressChangeDetection", "debug", "loading", "overlayLoadingTemplate", "loadingOverlayComponent", "loadingOverlayComponentParams", "suppressLoadingOverlay", "overlayNoRowsTemplate", "noRowsOverlayComponent", "noRowsOverlayComponentParams", "suppressNoRowsOverlay", "suppressOverlays", "overlayComponent", "overlayComponentParams", "overlayComponentSelector", "activeOverlay", "activeOverlayParams", "processFileInput", "pagination", "paginationPageSize", "paginationPageSizeSelector", "paginationAutoPageSize", "paginateChildRows", "suppressPaginationPanel", "paginationPanels", "pivotMode", "pivotPanelShow", "pivotMaxGeneratedColumns", "pivotDefaultExpanded", "pivotColumnGroupTotals", "pivotRowTotals", "pivotSuppressAutoColumn", "suppressExpandablePivotGroups", "functionsReadOnly", "aggFuncs", "formulaDataSource", "notesDataSource", "noteTrigger", "noteShowDelay", "noteHideDelay", "formulaFuncs", "suppressAggFuncInHeader", "alwaysAggregateAtRootLevel", "aggregateOnlyChangedColumns", "suppressAggFilteredOnly", "removePivotHeaderRowWhenSingleValueColumn", "animateRows", "cellFlashDuration", "cellFadeDuration", "allowShowChangeAfterFilter", "domLayout", "ensureDomOrder", "enableCellSpan", "enableRtl", "suppressColumnVirtualisation", "suppressMaxRenderedRowRestriction", "suppressRowVirtualisation", "rowDragManaged", "refreshAfterGroupEdit", "rowDragInsertDelay", "suppressRowDrag", "suppressMoveWhenRowDragging", "rowDragEntireRow", "rowDragMultiRow", "rowDragText", "dragAndDropImageComponent", "dragAndDropImageComponentParams", "fullWidthCellRenderer", "fullWidthCellRendererParams", "embedFullWidthRows", "groupDisplayType", "groupDefaultExpanded", "autoGroupColumnDef", "groupMaintainOrder", "groupSelectsChildren", "groupLockGroupColumns", "groupAggFiltering", "groupTotalRow", "grandTotalRow", "suppressStickyTotalRow", "groupSuppressBlankHeader", "groupSelectsFiltered", "showOpenedGroup", "groupHideParentOfSingleChild", "groupRemoveSingleChildren", "groupRemoveLowestSingleChildren", "groupHideOpenParents", "groupHideColumnsUntilExpanded", "groupAllowUnbalanced", "rowGroupPanelShow", "groupRowRenderer", "groupRowRendererParams", "treeData", "treeDataChildrenField", "treeDataParentIdField", "rowGroupPanelSuppressSort", "suppressGroupRowsSticky", "groupHierarchyConfig", "pinnedTopRowData", "pinnedBottomRowData", "enableRowPinning", "isRowPinnable", "isRowPinned", "rowModelType", "rowData", "asyncTransactionWaitMillis", "suppressModelUpdateAfterUpdateTransaction", "datasource", "cacheOverflowSize", "infiniteInitialRowCount", "serverSideInitialRowCount", "suppressServerSideFullWidthLoadingRow", "cacheBlockSize", "maxBlocksInCache", "maxConcurrentDatasourceRequests", "blockLoadDebounceMillis", "purgeClosedRowNodes", "serverSideDatasource", "serverSideSortAllLevels", "serverSideEnableClientSideSort", "serverSideOnlyRefreshFilteredGroups", "serverSidePivotResultFieldSeparator", "viewportDatasource", "viewportRowModelPageSize", "viewportRowModelBufferSize", "alwaysShowHorizontalScroll", "alwaysShowVerticalScroll", "debounceVerticalScrollbar", "suppressHorizontalScroll", "suppressScrollOnNewData", "suppressScrollWhenPopupsAreOpen", "suppressAnimationFrame", "suppressMiddleClickScrolls", "suppressPreventDefaultOnMouseWheel", "scrollbarWidth", "rowSelection", "cellSelection", "rowMultiSelectWithClick", "suppressRowDeselection", "suppressRowClickSelection", "suppressCellFocus", "suppressHeaderFocus", "selectionColumnDef", "rowNumbers", "suppressMultiRangeSelection", "enableCellTextSelection", "enableRangeSelection", "enableRangeHandle", "enableFillHandle", "fillHandleDirection", "suppressClearOnFillReduction", "sortingOrder", "accentedSort", "unSortIcon", "suppressMultiSort", "alwaysMultiSort", "multiSortKey", "suppressMaintainUnsortedOrder", "icons", "rowHeight", "rowStyle", "rowClass", "rowClassRules", "suppressRowHoverHighlight", "suppressRowTransform", "suppressContentVisibilityAuto", "columnHoverHighlight", "gridId", "deltaSort", "treeDataDisplayType", "enableGroupEdit", "initialState", "theme", "loadThemeGoogleFonts", "themeCssLayer", "styleNonce", "themeStyleContainer", "getContextMenuItems", "getMainMenuItems", "postProcessPopup", "processUnpinnedColumns", "processCellForClipboard", "processHeaderForClipboard", "processGroupHeaderForClipboard", "processCellFromClipboard", "sendToClipboard", "processDataFromClipboard", "isExternalFilterPresent", "doesExternalFilterPass", "getChartToolbarItems", "createChartContainer", "focusGridInnerElement", "navigateToNextHeader", "tabToNextHeader", "navigateToNextCell", "tabToNextCell", "tabToNextGridContainer", "getLocaleText", "getDocument", "paginationNumberFormatter", "getGroupRowAgg", "isGroupOpenByDefault", "ssrmExpandAllAffectsAllRows", "initialGroupOrderComparator", "processPivotResultColDef", "processPivotResultColGroupDef", "getDataPath", "getChildCount", "getServerSideGroupLevelParams", "isServerSideGroupOpenByDefault", "isApplyServerSideTransaction", "isServerSideGroup", "getServerSideGroupKey", "getBusinessKeyForNode", "getRowId", "resetRowDataOnUpdate", "autoGenerateColumnDefs", "processAutoGeneratedColumnDefs", "processRowPostCreate", "isRowSelectable", "isRowMaster", "fillOperation", "postSortRows", "getRowStyle", "getRowClass", "getRowHeight", "isFullWidthRow", "isRowValidDropPosition"], outputs: ["toolPanelVisibleChanged", "toolPanelSizeChanged", "columnMenuVisibleChanged", "contextMenuVisibleChanged", "cutStart", "cutEnd", "pasteStart", "pasteEnd", "calculatedColumnCreated", "calculatedColumnExpressionChanged", "calculatedColumnRemoved", "calculatedColumnValidationStateChanged", "columnVisible", "columnPinned", "columnResized", "columnMoved", "columnValueChanged", "columnPivotModeChanged", "columnPivotChanged", "columnGroupOpened", "newColumnsLoaded", "gridColumnsChanged", "displayedColumnsChanged", "virtualColumnsChanged", "columnEverythingChanged", "columnsReset", "columnHeaderMouseOver", "columnHeaderMouseLeave", "columnHeaderClicked", "columnHeaderContextMenu", "componentStateChanged", "cellValueChanged", "cellEditRequest", "rowValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "bulkEditingStarted", "bulkEditingStopped", "batchEditingStarted", "batchEditingStopped", "undoStarted", "undoEnded", "redoStarted", "redoEnded", "cellSelectionDeleteStart", "cellSelectionDeleteEnd", "rangeDeleteStart", "rangeDeleteEnd", "fillStart", "fillEnd", "filterOpened", "filterChanged", "filterModified", "filterUiChanged", "floatingFilterUiChanged", "advancedFilterBuilderVisibleChanged", "findChanged", "chartCreated", "chartRangeSelectionChanged", "chartOptionsChanged", "chartDestroyed", "cellKeyDown", "gridReady", "firstDataRendered", "gridSizeChanged", "modelUpdated", "virtualRowRemoved", "viewportChanged", "bodyScroll", "bodyScrollEnd", "dragStarted", "dragStopped", "dragCancelled", "stateUpdated", "paginationChanged", "rowDragEnter", "rowDragMove", "rowDragLeave", "rowDragEnd", "rowDragCancel", "rowResizeStarted", "rowResizeEnded", "columnRowGroupChanged", "rowGroupOpened", "expandOrCollapseAll", "pivotMaxColumnsExceeded", "pinnedRowDataChanged", "pinnedRowsChanged", "rowDataUpdated", "asyncTransactionsFlushed", "storeRefreshed", "headerFocused", "cellClicked", "cellDoubleClicked", "cellFocused", "cellMouseOver", "cellMouseOut", "cellMouseDown", "rowClicked", "rowDoubleClicked", "rowSelected", "selectionChanged", "cellContextMenu", "rangeSelectionChanged", "cellSelectionChanged", "tooltipShow", "tooltipHide", "sortChanged"] }] });
1400
+ }
1401
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: CilogGridComponent, decorators: [{
1402
+ type: Component,
1403
+ args: [{ selector: 'cilog-grid', imports: [
1404
+ CommonModule,
1405
+ FormsModule,
1406
+ AgGridAngular
1407
+ ], template: "<ag-grid-angular style=\"width: 100%;\"\r\n [style.height]=\"options().scrollHeight ? options().scrollHeight : 'auto'\"\r\n [domLayout]=\"options().scrollHeight != null ? 'normal' : 'autoHeight'\"\r\n [theme]=\"theme\"\r\n [rowData]=\"values()\"\r\n [columnDefs]=\"colDefs()\"\r\n (gridReady)=\"onGridReady($event)\"\r\n [defaultColDef]=\"defaultColDef\">\r\n</ag-grid-angular>\r\n" }]
1408
+ }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }, { type: i0.Output, args: ["columnsChange"] }], values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: true }] }, { type: i0.Output, args: ["valuesChange"] }] } });
1409
+
1342
1410
  class CilogTreetableComponent {
1343
1411
  options = input.required(...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
1344
1412
  columns = model.required(...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
@@ -1656,5 +1724,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
1656
1724
  * Generated bundle index. Do not edit.
1657
1725
  */
1658
1726
 
1659
- export { CilogEditorComponent, CilogInputNumberComponent, CilogLibComponent, CilogLibService, CilogMessageComponent, CilogMessageService, CilogTableComponent, CilogTableService, CilogTreetableComponent, ColType, DocumentationContextuelleComponent, ExportService, ModeCalendar, ModeSelection, Position, Severity, ThemeGrille };
1727
+ export { CilogEditorComponent, CilogGridComponent, CilogInputNumberComponent, CilogLibComponent, CilogLibService, CilogMessageComponent, CilogMessageService, CilogTableComponent, CilogTableService, CilogTreetableComponent, ColType, DocumentationContextuelleComponent, ExportService, ModeCalendar, ModeSelection, Position, Severity, ThemeGrille };
1660
1728
  //# sourceMappingURL=cilog-lib.mjs.map