@colijnit/corecomponents_v12 258.1.5 → 258.1.6

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.
@@ -1015,6 +1015,7 @@ var CoreComponentsIcon;
1015
1015
  CoreComponentsIcon["ArrowScrollRight"] = "arrow_scroll_right";
1016
1016
  CoreComponentsIcon["ArrowScrollUp"] = "arrow_scroll_up";
1017
1017
  CoreComponentsIcon["ArrowUp"] = "arrow_up";
1018
+ CoreComponentsIcon["ArrowUpArrowDown"] = "arrow_up_arrow_down";
1018
1019
  CoreComponentsIcon["Article"] = "article";
1019
1020
  CoreComponentsIcon["ArticleWithFold"] = "article_with_fold";
1020
1021
  CoreComponentsIcon["AsteriskSmall"] = "asterisk_small";
@@ -1112,6 +1113,7 @@ var CoreComponentsIcon;
1112
1113
  CoreComponentsIcon["GlobalSearch"] = "global_search";
1113
1114
  CoreComponentsIcon["Globe"] = "globe";
1114
1115
  CoreComponentsIcon["GreaterThan"] = "greater_than";
1116
+ CoreComponentsIcon["GripDotsVerticalSolid"] = "grip_dots_vertical_solid";
1115
1117
  CoreComponentsIcon["Groupby"] = "groupby";
1116
1118
  CoreComponentsIcon["Hamburger"] = "hamburger";
1117
1119
  CoreComponentsIcon["HandPointer"] = "hand_pointer";
@@ -1316,6 +1318,7 @@ const CoreComponentsIconSvg = {
1316
1318
  "arrow_scroll_right": "<svg xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 50 50\" viewBox=\"0 0 50 50\" y=\"0px\" x=\"0px\" version=\"1.1\"><metadata ><rdf:RDF><cc:Work rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs /><polygon fill=\"#000000\" transform=\"matrix(0,-1,1,0,0,50)\" points=\"41.5,15.8 45,19.4 25,34.2 5,19.4 8.5,15.8 25,27.3 \" /></svg>",
1317
1319
  "arrow_scroll_up": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><polygon fill=\"#29363E\" points=\"5,30.6 8.5,34.2 25,22.7 41.5,34.2 45,30.6 25,15.8 \"/></svg>",
1318
1320
  "arrow_up": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><polygon points=\"27.5 19.4 27.5 38 23.4 38 23.4 19.4 23.4 19.4 19.1 19.4 25.4 13 31.8 19.4 27.5 19.4\" fill=\"#2a363b\"/></svg>",
1321
+ "arrow_up_arrow_down": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M529 377c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55L440 56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 342.1-55-55c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l96 96c9.4 9.4 24.6 9.4 33.9 0l96-96zM177 39c-9.4-9.4-24.6-9.4-33.9 0L47 135c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55L136 456c0 13.3 10.7 24 24 24s24-10.7 24-24l0-342.1 55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L177 39z\"/></svg>",
1319
1322
  "article": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M37.43,15.14H12.57A2.57,2.57,0,0,0,10,17.71V32.29a2.57,2.57,0,0,0,2.57,2.57H37.43A2.57,2.57,0,0,0,40,32.29V17.71A2.57,2.57,0,0,0,37.43,15.14ZM14.29,32.71H12.15V17.29h2.14Zm2,0H15V17.29h1.29Zm2.57,0H17.54V17.29h1.29Zm3.52,0H20.2V17.29h2.15Zm2,0H23.11V17.29H24.4Zm2.06,0H25.17V17.29h1.29Zm2.66,0H27.83V17.29h1.29Zm3.51,0H31.34V17.29h1.29Zm3.34,0H33.4V17.29H36Zm2.32,0H37V17.29h1.29Z\" fill=\"#484f60\"/></svg>",
1320
1323
  "article_with_fold": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.51,35.5H12a.5.5,0,0,1-.5-.5V15a.5.5,0,0,1,.5-.5H38a.5.5,0,0,1,.5.5V28.73H40V15a2,2,0,0,0-2-2H12a2,2,0,0,0-2,2V35a2,2,0,0,0,2,2H31.51Z\" fill=\"#484f60\"/><path d=\"M40,28.73H33.56c-1.78,0-2.05.27-2.05,2.05V37Z\" fill=\"#484f60\"/><rect x=\"14.5\" y=\"18.5\" width=\"6\" height=\"5\" fill=\"#484f60\"/><rect x=\"14.5\" y=\"30.5\" width=\"15\" height=\"1\" fill=\"#484f60\"/><rect x=\"14.5\" y=\"26.5\" width=\"15\" height=\"1\" fill=\"#484f60\"/><rect x=\"22.5\" y=\"22.5\" width=\"13\" height=\"1\" fill=\"#484f60\"/><rect x=\"22.5\" y=\"18.5\" width=\"13\" height=\"1\" fill=\"#484f60\"/></svg>",
1321
1324
  "asterisk_small": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"22\" width=\"30\" height=\"6\" transform=\"translate(15.85 -9.15) rotate(30)\" fill=\"#484f60\"/><rect x=\"10\" y=\"22\" width=\"30\" height=\"6\" transform=\"translate(0 50) rotate(-90)\" fill=\"#484f60\"/><rect x=\"10\" y=\"22\" width=\"30\" height=\"6\" transform=\"translate(-9.15 15.85) rotate(-30)\" fill=\"#484f60\"/></svg>",
@@ -1413,6 +1416,7 @@ const CoreComponentsIconSvg = {
1413
1416
  "global_search": "<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 50\" enable-background=\"new 0 0 50 50\" ><g><path opacity=\"0.75\" fill=\"#29363E\" d=\"M33.5,21.5c0.1-0.1,0.2-0.1,0.3,0l0.8,0.6c0.1,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1,0l-0.2,0.7c0,0.1-0.1,0.1-0.2,0.1l-0.7,0c-0.1,0-0.1,0,0,0.1l0.6,0.4c0.1,0,0.1,0.1,0.1,0.2l-0.2,0.7c0,0.1,0,0.1,0.1,0.1L24,20.8z\"/><path fill=\"#29363E\" d=\"M25.5,27.7l0.3-0.8c-0.8,0.6-1.7,1-2.6,1.2l1.7,0C25.1,28.1,25.4,27.9,25.5,27.7z\"/><path fill=\"#29363E\" d=\"M22.5,28.4c-0.1-0.1-0.1-0.1-0.1-0.1c-1.9,0.2-3.9-0.4-5.4-1.9c-2.6-2.6-2.6-6.8,0-9.4c2.6-2.6,6.8-2.6,9.4,0c1.8,1.8,2.4,4.5,1.6,6.8l1.3,0c0.2,0,0.5-0.2,0.5-0.4l0.5-1.4c0.1-2.3-0.8-4.7-2.5-6.4c-3.4-3.4-8.9-3.4-12.3,0c-3.4,3.4-3.4,8.9,0,12.3c2.4,2.4,5.9,3.1,8.9,2.1c0,0,0,0-0.1-0.1L22.5,28.4z\"/><path fill=\"#29363E\" d=\"M27.6,28c0.1-0.1,0.2-0.1,0.2-0.2c0.4-0.4,0.7-0.8,1-1.2L29,26c0.1-0.2,0-0.5-0.2-0.6l-1.1-0.8c-0.2,0.5-0.6,1-1,1.4l0.6,1.7C27.3,27.8,27.4,27.9,27.6,28z\"/><path fill=\"#29363E\" d=\"M36.4,32.8l-4.3-4.3c-0.6-0.6-1.6-0.7-2.3-0.4l0.4,0c0.2,0,0.3,0.1,0.1,0.3l-1.9,1.4c-0.2,0.1-0.3,0.4-0.2,0.7l0.6,1.8l4.1,4.1c0.8,0.8,2.1,0.8,2.9,0l0.7-0.7C37.2,34.9,37.2,33.6,36.4,32.8z\"/></g></svg>",
1414
1417
  "globe": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M25.86,37.19a14.53,14.53,0,0,1-8.31-2.75V40H34.18V34.44A14.54,14.54,0,0,1,25.86,37.19Z\" fill=\"#484f60\"/><path d=\"M25.81,36a12.39,12.39,0,0,1-12-9.41l0-.13L15,24.83l.11.65A10.92,10.92,0,1,0,21.22,13.7l-.21.1-.87-1.24.3-.14a12.14,12.14,0,0,1,5.37-1.24,12.42,12.42,0,1,1,0,24.83Z\" fill=\"#484f60\"/><polygon points=\"19.48 13.58 18.1 17.41 14.21 18.59 17.42 21.09 17.34 25.15 20.71 22.86 24.55 24.2 23.42 20.29 25.86 17.05 21.8 16.92 19.48 13.58\" fill=\"#484f60\"/><polygon points=\"11.9 14.69 13.84 14.34 15.27 15.68 15.54 13.73 17.26 12.79 15.49 11.93 15.12 10 13.76 11.42 11.81 11.17 12.74 12.91 11.9 14.69\" fill=\"#484f60\"/><polygon points=\"15.02 21.84 13.82 22.23 12.79 21.49 12.78 22.75 11.77 23.5 12.96 23.9 13.36 25.09 14.11 24.08 15.37 24.07 14.63 23.05 15.02 21.84\" fill=\"#484f60\"/><path d=\"M33.27,29.27l-.74-.56a8.46,8.46,0,0,0-2.36-12.35l.48-.8a9.32,9.32,0,0,1,4.54,8A9.23,9.23,0,0,1,33.27,29.27Z\" fill=\"#484f60\"/><rect x=\"14.36\" y=\"38\" width=\"23\" height=\"2\" fill=\"#484f60\"/></svg>",
1415
1418
  "greater_than": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M18.63,13.81l14.65,9.58a.48.48,0,0,1,.23.42v2.38a.48.48,0,0,1-.23.42L18.63,36.19a.5.5,0,0,1-.69-.14L16.57,34a.49.49,0,0,1,.15-.69l12-7.84a.5.5,0,0,0,0-.84l-12-7.84a.49.49,0,0,1-.15-.69L17.94,14A.5.5,0,0,1,18.63,13.81Z\" fill=\"#484f60\"/></svg>",
1419
+ "grip_dots_vertical_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 512\"><path d=\"M48 144c26.5 0 48-21.5 48-48s-21.5-48-48-48S0 69.5 0 96s21.5 48 48 48zm0 160c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48zM96 416c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM208 144c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48zm48 112c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM208 464c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48z\"/></svg>",
1416
1420
  "groupby": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"10\" y=\"11.17\" width=\"8\" height=\"3\" fill=\"#484f60\"/><rect x=\"10\" y=\"26.17\" width=\"8\" height=\"3\" fill=\"#484f60\"/><rect x=\"22\" y=\"11.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"22\" y=\"16.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"22\" y=\"21.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"22\" y=\"26.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"22\" y=\"31.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"32\" y=\"11.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"32\" y=\"16.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"32\" y=\"21.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"32\" y=\"26.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"32\" y=\"31.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"22\" y=\"36.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"32\" y=\"36.17\" width=\"8\" height=\"3\" fill=\"#484f60\" opacity=\"0.25\"/><rect x=\"19.5\" y=\"11.17\" width=\"1\" height=\"28\" fill=\"#484f60\"/></svg>",
1417
1421
  "hamburger": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"14\" y=\"15.17\" width=\"22\" height=\"4\" fill=\"#484f60\"/><rect x=\"14\" y=\"23.17\" width=\"22\" height=\"4\" fill=\"#484f60\"/><rect x=\"14\" y=\"31.17\" width=\"22\" height=\"4\" fill=\"#484f60\"/></svg>",
1418
1422
  "hand_pointer": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M24.16,20.4,23,19.8l-2-3.19-1.56-2-.82-1.08-1.93-2L14,10H12.58l-.89.89L12.21,12l3.11,2.79L16,16.34l2.15,3.42,1,2.86.08.93.11,3-.3-1.08-1.22-1.19-1-1.22-2.22-2.23-1.34-.44-1.11.29-.89.78L13,23.29l2,2.49,2.71,4.71L20.45,33l2.3,1.45,3.08,1.33,2.41,1.27,2.53,1.3.3,1.63,7.61-7.57V31.27S37.53,30,37.42,30a20.15,20.15,0,0,1-1-2.08l-.6-2.42-.44-1.22-1.67-2.12-1.08-1.41-.63-1-1.12-1.45-1-1-1.68-1.09-.27.54,1.75,2.68-1.18-.59-1.09-1.87-1.69-1.75L24.35,15l0,.76L27,19.65l-1.19-.6L23.5,15.39,22,14.3l-1.63.15.22.71Z\" fill=\"#484f60\"/></svg>",
@@ -9484,6 +9488,7 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
9484
9488
  this.rightToolbar = false;
9485
9489
  this.showGridSettings = false;
9486
9490
  this.rowsPerPage = 1000;
9491
+ this.showColumnSort = false;
9487
9492
  this.editing = false;
9488
9493
  this.isSettingsMenuOpen = false;
9489
9494
  this.editRowIndex = -1;
@@ -9704,46 +9709,42 @@ class SimpleGridComponent extends BaseSimpleGridComponent {
9704
9709
  return obj !== col;
9705
9710
  });
9706
9711
  }
9707
- // TODO Fix this sort method
9708
- // public sortColumn(col: any, columnValue: string): void {
9709
- // console.log(col);
9710
- // console.log("columnValue " + columnValue);
9711
- // col.isSelected = false;
9712
- //
9713
- // if (this.sortColumnValue === columnValue) {
9714
- // this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
9715
- // } else {
9716
- // this.sortColumnValue = columnValue;
9717
- // this.sortDirection = 'asc';
9718
- // }
9719
- //
9720
- // console.log(this.data);
9721
- // // this.data = this._sortData(this.data);
9722
- //
9723
- //
9724
- // this.data.sort((a, b) => {
9725
- // const sign = this.sortDirection === 'asc' ? 1 : -1;
9726
- //
9727
- // console.log("a " + a);
9728
- // console.log("b " + b);
9729
- // console.log(a[this.sortColumnValue]);
9730
- // console.log(b[this.sortColumnValue]);
9731
- // console.log("sign " + sign);
9732
- //
9733
- // if (a[this.sortColumnValue] < b[this.sortColumnValue]) {
9734
- // return -1 * sign;
9735
- // } else if (a[this.sortColumnValue] > b[this.sortColumnValue]) {
9736
- // return 1 * sign;
9737
- // }
9738
- // return 0;
9739
- // });
9740
- //
9741
- //
9742
- //
9743
- // this._detectChanges();
9744
- // // this.data.sort((a, b) => a[this.sortColumnValue] - b[this.sortColumnValue]);
9745
- // console.log(this.data);
9746
- // }
9712
+ sortColumn(col, columnValue) {
9713
+ col.isSelected = false;
9714
+ if (this.sortColumnValue === columnValue) {
9715
+ this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc';
9716
+ }
9717
+ else {
9718
+ this.sortColumnValue = columnValue;
9719
+ this.sortDirection = 'asc';
9720
+ }
9721
+ const direction = this.sortDirection === 'asc' ? 1 : -1;
9722
+ const sorted = [...this.data].sort((a, b) => {
9723
+ let valA = a[columnValue];
9724
+ let valB = b[columnValue];
9725
+ if (valA == null && valB == null)
9726
+ return 0;
9727
+ if (valA == null)
9728
+ return -1 * direction;
9729
+ if (valB == null)
9730
+ return 1 * direction;
9731
+ // Handle ISO date string
9732
+ const isDateA = typeof valA === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(valA);
9733
+ const isDateB = typeof valB === 'string' && /^\d{4}-\d{2}-\d{2}T/.test(valB);
9734
+ if (isDateA && isDateB) {
9735
+ const timeA = new Date(valA).getTime();
9736
+ const timeB = new Date(valB).getTime();
9737
+ return (timeA - timeB) * direction;
9738
+ }
9739
+ // Fallback for numbers/strings
9740
+ if (typeof valA === 'string' && typeof valB === 'string') {
9741
+ return valA.localeCompare(valB) * direction;
9742
+ }
9743
+ return (valA > valB ? 1 : valA < valB ? -1 : 0) * direction;
9744
+ });
9745
+ this.data = sorted;
9746
+ this._detectChanges();
9747
+ }
9747
9748
  _sortData(tableData) {
9748
9749
  return tableData.sort((a, b) => {
9749
9750
  const sign = this.sortDirection === 'asc' ? 1 : -1;
@@ -9959,15 +9960,22 @@ SimpleGridComponent.decorators = [
9959
9960
  <div class="simple-grid-column-header-label"
9960
9961
  [ngClass]="column.textAlign ? column.textAlign : defaultTextAlign"
9961
9962
  [class.with-menu]="showGridSettings"
9963
+ [class.with-sort]="showColumnSort"
9962
9964
  [textContent]="column.headerText || '&nbsp;'"
9963
- (click)="toggleColumnMenu(column)">
9965
+ (click)="showColumnSort ? sortColumn(column, column.field) : toggleColumnMenu(column)">
9966
+ </div>
9967
+
9968
+ <div class="sort-column" *ngIf="showColumnSort">
9969
+ <co-button (click)="sortColumn(column, column?.field)"
9970
+ [iconData]="icons.getIcon(Icons.ArrowUpArrowDown)">
9971
+ </co-button>
9964
9972
  </div>
9965
9973
 
9966
9974
  <div class="column-menu" *ngIf="column.isSelected">
9967
9975
  <h3 [textContent]="'COLUMN_OPTIONS' | coreLocalize"></h3>
9968
9976
  <ul>
9969
9977
  <li (click)="hideColumn(column)">Hide Column</li>
9970
- <!-- <li (click)="sortColumn(column, column.field)">Sort Column</li>-->
9978
+ <li (click)="sortColumn(column, column.field)">Sort Column</li>
9971
9979
  </ul>
9972
9980
  </div>
9973
9981
  </ng-template>
@@ -10070,6 +10078,7 @@ SimpleGridComponent.propDecorators = {
10070
10078
  showGridSettings: [{ type: Input }],
10071
10079
  rowsPerPage: [{ type: Input }],
10072
10080
  rowDisabledFn: [{ type: Input }],
10081
+ showColumnSort: [{ type: Input }],
10073
10082
  canRowBeEdittedFn: [{ type: Input }],
10074
10083
  showClass: [{ type: HostBinding, args: ['class.co-simple-grid',] }],
10075
10084
  handleKeyDown: [{ type: HostListener, args: ['keydown', ['$event'],] }]