@universis/ngx-tables 6.13.3 → 6.13.4

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.
@@ -2084,6 +2084,8 @@
2084
2084
  this.beforeServerData = new i0.EventEmitter();
2085
2085
  this.afterServerData = new i0.EventEmitter();
2086
2086
  this.loading = new i0.EventEmitter();
2087
+ this.showDetails = new i0.EventEmitter();
2088
+ this.hideDetails = new i0.EventEmitter();
2087
2089
  this.scrollable = true;
2088
2090
  this.serverSide = true;
2089
2091
  this.lengthMenu = [50, 100, 200, 500];
@@ -2879,6 +2881,64 @@
2879
2881
  }
2880
2882
  });
2881
2883
  }
2884
+ // display row details
2885
+ if (this.detailsTemplate) {
2886
+ /** @type {?} */
2887
+ var detailsString_1 = this._translateService.instant('Tables.RowDetails');
2888
+ /** @type {?} */
2889
+ var firstColumn = this.config.columns[0];
2890
+ /** @type {?} */
2891
+ var showDetailsColumnDefinition = {
2892
+ className: 'details-control pl-4 pr-0',
2893
+ data: firstColumn.property || firstColumn.name,
2894
+ defaultContent: '',
2895
+ title: '',
2896
+ sortable: false,
2897
+ visible: !this.customSelect,
2898
+ name: firstColumn.name,
2899
+ render: function () {
2900
+ return "<button role=\"button\" title=\"" + detailsString_1 + "\" arial-label=\"" + detailsString_1 + "\"></button>";
2901
+ },
2902
+ };
2903
+ // and finally add column
2904
+ // and finally add column
2905
+ tableColumns_1.unshift(showDetailsColumnDefinition);
2906
+ // user interface additions
2907
+ // Add event listener for opening and closing details
2908
+ // user interface additions
2909
+ // Add event listener for opening and closing details
2910
+ tableElement_1.on('click', 'td.details-control', function (e) {
2911
+ /** @type {?} */
2912
+ var tr = e.target.closest('tr');
2913
+ /** @type {?} */
2914
+ var row = self.dataTable.row(tr);
2915
+ /** @type {?} */
2916
+ var container = document.createElement('div');
2917
+ /** @type {?} */
2918
+ var detailsViewRef = _this._viewContainerRef.createEmbeddedView(_this.detailsTemplate, {
2919
+ rowData: row.data(),
2920
+ });
2921
+ detailsViewRef.detectChanges();
2922
+ if (detailsViewRef.rootNodes.length !== 1) {
2923
+ throw new Error('DetailsTemplate must have exactly one root node.');
2924
+ }
2925
+ container.appendChild(detailsViewRef.rootNodes[0]);
2926
+ if (row.child.isShown()) {
2927
+ // This row is already open - close it
2928
+ // This row is already open - close it
2929
+ _this.hideDetails.emit();
2930
+ row.child.hide();
2931
+ detailsViewRef.destroy();
2932
+ }
2933
+ else {
2934
+ // Open this row
2935
+ // Open this row
2936
+ _this.showDetails.emit({ row: row });
2937
+ row.child(container).show();
2938
+ row.child().addClass('dt-child');
2939
+ }
2940
+ });
2941
+ }
2882
2942
  /** @type {?} */
2883
2943
  var settings = {
2884
2944
  // set length menu
@@ -3879,7 +3939,7 @@
3879
3939
  selector: 'app-advanced-table',
3880
3940
  template: "\n <table #table class=\"dataTable\">\n </table>\n <div #emptyTable class=\"d-none\">\n <div>\n <div class=\"mt-4\">\n <div class=\"icon-circle bg-gray-300 border-gray-100\"></div>\n </div>\n <div class=\"mt-4\">\n <h4 class=\"font-3xl text-dark\" [translate]=\"'Tables.EmptyTableTitle'\"></h4>\n <p class=\"font-lg text-dark\" [translate]=\"'Tables.EmptyTableMessage'\"></p>\n </div>\n </div>\n </div>\n <div #errorTemplate class=\"d-none error-message\">\n <div class=\"text-center\">\n <div class=\"mt-4\">\n <div class=\"icon-circle bg-danger border-gray-100\"></div>\n </div>\n <div class=\"mt-4\">\n <h4 class=\"font-3xl text-secondary\" [translate]=\"'Tables.DataError.Title'\"></h4>\n <p class=\"font-lg text-secondary mb-1\" [translate]=\"'Tables.DataError.Message'\"></p>\n <p class=\"font-lg text-secondary error-inner-message\">\n <small></small>\n </p>\n </div>\n </div>\n </div>\n ",
3881
3941
  encapsulation: i0.ViewEncapsulation.None,
3882
- styles: ["div.dataTables_processing>div:last-child>div{background-color:var(--secondary)}table.dataTable thead .sorting{background-image:none}table.dataTable thead tr th{border-bottom:none;font-weight:500;font-size:.75rem}table.dataTable thead th{color:#73818e;font-size:.75rem;font-weight:600;padding-top:16px;padding-bottom:4px;border-bottom:none;padding-left:8px}table.dataTable tbody tr:first-child td:first-child{border-radius:6px 0}table.dataTable tbody tr:first-child td:last-child{border-radius:0 6px}table.dataTable tbody tr{border-radius:6px}table.dataTable tbody tr td:first-child{border-left:1px solid #c2cfd6}table.dataTable tbody tr td:last-child{border-right:1px solid #c2cfd6}table.dataTable tbody tr td{padding-top:8px;padding-bottom:8px;border-top:1px solid #c2cfd6}table.dataTable tbody tr:last-child td:first-child{border-radius:0 0 0 6px}table.dataTable tbody tr:last-child td:last-child{border-radius:0 0 6px}table.dataTable tbody tr:last-child td{border-bottom:1px solid #c2cfd6}table.dataTable tbody tr.dtrg-group.dtrg-start th{border:2px solid #c2cfd6;border-bottom:1px solid #c2cfd6;color:#3e515b;background-color:#f0f3f5}table.dataTable tbody tr.dtrg-group.dtrg-end th{border-top:2px solid #c2cfd6;border-right:2px solid #c2cfd6;border-left:2px solid #c2cfd6;color:#3e515b;background-color:#f0f3f5}table.dataTable tbody tr:nth-last-child(1) th{border-bottom:2px solid #c2cfd6}table.dataTable td.dataTables_empty{border:none!important}table.dataTable .error-inner-message>small{overflow-wrap:break-word}table.dataTable.no-footer{border-bottom:none}.dataTables_paginate .btn.previous{margin-right:8px}.dataTables_paginate .btn.next{margin-left:8px}.dataTables_info,.dataTables_paginate{margin-top:1rem}.dataTables_paginate span .btn{border-radius:1.5rem}.dataTables_filter{display:none}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:0;overflow:auto}.dataTables_paginate{display:none}.dataTable.processing{opacity:15%}.dataTables_wrapper .dataTables_processing{background:0 0;position:absolute;display:inline-block;top:25%;z-index:5;color:#73818e}.text-decoration-line-through{text-decoration:line-through!important}tr.removed .checkbox+label{visibility:hidden}"]
3942
+ styles: ["div.dataTables_processing>div:last-child>div{background-color:var(--secondary)}table.dataTable thead .sorting{background-image:none}table.dataTable thead tr th{border-bottom:none;font-weight:500;font-size:.75rem}table.dataTable thead th{color:#73818e;font-size:.75rem;font-weight:600;padding-top:16px;padding-bottom:4px;border-bottom:none;padding-left:8px}table.dataTable tbody tr:first-child td:first-child{border-radius:6px 0}table.dataTable tbody tr:first-child td:last-child{border-radius:0 6px}table.dataTable tbody tr{border-radius:6px}table.dataTable tbody tr td:first-child{border-left:1px solid #c2cfd6}table.dataTable tbody tr td:last-child{border-right:1px solid #c2cfd6}table.dataTable tbody tr td{padding-top:8px;padding-bottom:8px;border-top:1px solid #c2cfd6}table.dataTable tbody tr:last-child td:first-child{border-radius:0 0 0 6px}table.dataTable tbody tr:last-child td:last-child{border-radius:0 0 6px}table.dataTable tbody tr:last-child td{border-bottom:1px solid #c2cfd6}table.dataTable tbody tr.dtrg-group.dtrg-start th{border:2px solid #c2cfd6;border-bottom:1px solid #c2cfd6;color:#3e515b;background-color:#f0f3f5}table.dataTable tbody tr.dtrg-group.dtrg-end th{border-top:2px solid #c2cfd6;border-right:2px solid #c2cfd6;border-left:2px solid #c2cfd6;color:#3e515b;background-color:#f0f3f5}table.dataTable tbody tr:nth-last-child(1) th{border-bottom:2px solid #c2cfd6}table.dataTable td.dataTables_empty{border:none!important}table.dataTable .error-inner-message>small{overflow-wrap:break-word}table.dataTable.no-footer{border-bottom:none}.dataTables_paginate .btn.previous{margin-right:8px}.dataTables_paginate .btn.next{margin-left:8px}.dataTables_info,.dataTables_paginate{margin-top:1rem}.dataTables_paginate span .btn{border-radius:1.5rem}.dataTables_filter{display:none}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:0;overflow:auto}.dataTables_paginate{display:none}.dataTable.processing{opacity:15%}.dataTables_wrapper .dataTables_processing{background:0 0;position:absolute;display:inline-block;top:25%;z-index:5;color:#73818e}.text-decoration-line-through{text-decoration:line-through!important}tr.removed .checkbox+label{visibility:hidden}table.dataTable td.details-control{cursor:pointer}table.dataTable td.details-control button{border:none;background-color:inherit;outline:0}table.dataTable td.details-control button::after{content:'\\25B7'}table.dataTable tr.dt-hasChild td.details-control button::after{content:'\\25BD'}"]
3883
3943
  }] }
3884
3944
  ];
3885
3945
  /** @nocollapse */
@@ -3923,6 +3983,8 @@
3923
3983
  beforeServerData: [{ type: i0.Output, args: ['beforeServerData',] }],
3924
3984
  afterServerData: [{ type: i0.Output, args: ['afterServerData',] }],
3925
3985
  loading: [{ type: i0.Output, args: ['loading',] }],
3986
+ showDetails: [{ type: i0.Output, args: ['showDetails',] }],
3987
+ hideDetails: [{ type: i0.Output, args: ['hideDetails',] }],
3926
3988
  scrollable: [{ type: i0.Input }],
3927
3989
  serverSide: [{ type: i0.Input }],
3928
3990
  lengthMenu: [{ type: i0.Input }],
@@ -3942,6 +4004,7 @@
3942
4004
  rowGroup: [{ type: i0.Input }],
3943
4005
  headerTemplate: [{ type: i0.Input }],
3944
4006
  footerTemplate: [{ type: i0.Input }],
4007
+ detailsTemplate: [{ type: i0.Input }],
3945
4008
  header: [{ type: i0.ViewChild, args: ['header',] }],
3946
4009
  footer: [{ type: i0.ViewChild, args: ['footer',] }],
3947
4010
  config: [{ type: i0.Input, args: ['config',] }],
@@ -7567,7 +7630,8 @@
7567
7630
  },
7568
7631
  "ExportList": "Εξαγωγή λίστας",
7569
7632
  "ExportLimitExceeded": "Το πλήθος των στοιχείων προς εξαγωγή ({{dataLength}}) ξεπερνάει το μέγιστο επιτρεπτό ({{exportLimit}}). Παρακαλούμε προσαρμόστε τα φίλτρα της αναζήτησης και προσπαθήστε ξανά.",
7570
- "ExportResults": "Δεδομένα λίστας"
7633
+ "ExportResults": "Δεδομένα λίστας",
7634
+ "RowDetails": "Λεπτομέρειες"
7571
7635
  },
7572
7636
  "TrueFalse": {
7573
7637
  "long": {
@@ -7698,7 +7762,8 @@
7698
7762
  },
7699
7763
  "ExportList": "Export list",
7700
7764
  "ExportLimitExceeded": "The number of items that are to be exported ({{dataLength}}) exceeds the export limit ({{exportLimit}}). Please apply more specific filters to the search.",
7701
- "ExportResults": "Exported list"
7765
+ "ExportResults": "Exported list",
7766
+ "RowDetails": "Details"
7702
7767
  },
7703
7768
  "TrueFalse": {
7704
7769
  "long": {