@theseam/ui-common 0.3.14-beta.2 → 0.3.15-beta.0

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.
@@ -459,7 +459,7 @@
459
459
  { type: i0.Component, args: [{
460
460
  selector: 'seam-datatable-action-menu',
461
461
  template: "<seam-menu #menu\n menuClass=\"list-group py-0 border-0 seam-datatable-action-menu\"\n animationType=\"fade\">\n\n <ng-container *ngFor=\"let item of items\">\n <ng-container *ngIf=\"(item.routerLink || item.href) && !item.confirmDialog; else noRouterLink\">\n <a *ngIf=\"item.href; else noHref\"\n seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [disabled]=\"item.disabled\"\n [attr.href]=\"item.href\"\n [target]=\"item.target\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n <ng-template #noHref>\n <a seamMenuItem\n class=\"list-group-item list-group-item-action py-1\"\n [disabled]=\"item.disabled\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"$any(item.fragment)\"\n [queryParamsHandling]=\"item.queryParamsHandling\"\n [preserveFragment]=\"$any(item.preserveFragment)\"\n [skipLocationChange]=\"$any(item.skipLocationChange)\"\n [replaceUrl]=\"$any(item.replaceUrl)\"\n [state]=\"$any(item.state)\"\n [routerLink]=\"item.routerLink\"\n [target]=\"$any(item.target)\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </a>\n </ng-template>\n </ng-container>\n <ng-template #noRouterLink>\n <button seamMenuItem\n type=\"button\"\n class=\"list-group-item list-group-item-action py-1\"\n [disabled]=\"item.disabled\"\n (click)=\"activateItem($event, item)\">\n {{ item.label }}\n </button>\n </ng-template>\n </ng-container>\n</seam-menu>\n\n<button type=\"button\" class=\"datatable-action-button btn\"\n [seamMenuToggle]=\"menu\"\n [positions]=\"_actionMenuPositions || []\"\n title=\"Row Actions\">\n <seam-icon [icon]=\"faEllipsisH\"></seam-icon>\n</button>\n",
462
- styles: [":host{display:block;position:relative}.datatable-action-button::ng-deep .svg-inline--fa{vertical-align:middle}\n"]
462
+ styles: [":host{position:relative;display:flex;align-items:center;justify-content:center;height:100%}.datatable-action-button::ng-deep .svg-inline--fa{vertical-align:middle}\n"]
463
463
  },] }
464
464
  ];
465
465
  DatatableActionMenuComponent.ctorParameters = function () { return [
@@ -1095,7 +1095,13 @@
1095
1095
  finally { if (e_1) throw e_1.error; }
1096
1096
  }
1097
1097
  if (this._shouldAddRowActionColumn()) {
1098
- cols.push(createActionMenuColumn(this._actionMenuCellTpl, this._blankHeaderTpl, this._rowActionColumnIsFrozenLeft(), this._rowActionColumnIsFrozenRight()));
1098
+ var actionMenuColumn = createActionMenuColumn(this._actionMenuCellTpl, this._blankHeaderTpl, this._rowActionColumnIsFrozenLeft(), this._rowActionColumnIsFrozenRight());
1099
+ if (this._rowActionColumnIsStaticLeft()) {
1100
+ cols.unshift(actionMenuColumn);
1101
+ }
1102
+ else {
1103
+ cols.push(actionMenuColumn);
1104
+ }
1099
1105
  }
1100
1106
  // Make sure the default for any missing props are set.
1101
1107
  // TODO: Determine if this should be done earlier, because I don't like
@@ -1198,6 +1204,12 @@
1198
1204
  ColumnsManagerService.prototype._rowActionColumnIsFrozenRight = function () {
1199
1205
  return this._actionItemColumnPosition === 'frozenRight';
1200
1206
  };
1207
+ ColumnsManagerService.prototype._rowActionColumnIsStaticLeft = function () {
1208
+ return this._actionItemColumnPosition === 'staticLeft';
1209
+ };
1210
+ ColumnsManagerService.prototype._rowActionColumnIsStaticRight = function () {
1211
+ return this._actionItemColumnPosition === 'staticRight';
1212
+ };
1201
1213
  ColumnsManagerService.prototype._shouldAddTreeToggleColumn = function (column) {
1202
1214
  return column.isTreeColumn !== undefined && column.isTreeColumn &&
1203
1215
  (!utils.hasProperty(column, 'treeToggleTemplate') || !utils.notNullOrUndefined(column.treeToggleTemplate));
@@ -1881,6 +1893,11 @@
1881
1893
  return alterations;
1882
1894
  }
1883
1895
 
1896
+ var ActionItemColumnPosition = ['frozenLeft', 'frozenRight', 'staticLeft', 'staticRight'];
1897
+ function isActionItemColumnPosition(input) {
1898
+ return ActionItemColumnPosition.indexOf(input) != -1;
1899
+ }
1900
+
1884
1901
  /**
1885
1902
  * Intended for internal classes declared by the `TheSeamDatatableModule`.
1886
1903
  */
@@ -1951,6 +1968,7 @@
1951
1968
  this.footerHeight = 40;
1952
1969
  this.scrollbarV = true;
1953
1970
  this.scrollbarH = true;
1971
+ this._actionItemColumnPosition = 'frozenRight';
1954
1972
  this.scroll = new i0.EventEmitter();
1955
1973
  this.activate = new i0.EventEmitter();
1956
1974
  this.select = new i0.EventEmitter();
@@ -2115,9 +2133,16 @@
2115
2133
  configurable: true
2116
2134
  });
2117
2135
  Object.defineProperty(DatatableComponent.prototype, "actionItemColumnPosition", {
2136
+ /**
2137
+ * Sets position behavior for optional Action Menu Button column.
2138
+ *
2139
+ * Defaults to `frozenRight`.
2140
+ */
2118
2141
  get: function () { return this._actionItemColumnPosition; },
2119
2142
  set: function (value) {
2120
- this._actionItemColumnPosition = value;
2143
+ if (value && isActionItemColumnPosition(value)) {
2144
+ this._actionItemColumnPosition = value;
2145
+ }
2121
2146
  this._columnsManager.setActionItemColumnPosition(this._actionItemColumnPosition);
2122
2147
  },
2123
2148
  enumerable: false,