@ifsworld/granite-components 3.0.0-beta.8 → 4.0.0-beta.2

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.
Files changed (69) hide show
  1. package/bundles/ifsworld-granite-components.umd.js +112 -151
  2. package/bundles/ifsworld-granite-components.umd.js.map +1 -1
  3. package/bundles/ifsworld-granite-components.umd.min.js +3 -3
  4. package/bundles/ifsworld-granite-components.umd.min.js.map +1 -1
  5. package/esm2015/ifsworld-granite-components.js +3 -0
  6. package/esm2015/ifsworld-granite-components.js.map +1 -1
  7. package/esm2015/ifsworld-granite-components.metadata.json +1 -1
  8. package/esm2015/index.js +3 -4
  9. package/esm2015/index.js.map +1 -1
  10. package/esm2015/index.metadata.json +1 -1
  11. package/esm2015/lib/menu/menu.component.js +1 -1
  12. package/esm2015/lib/menu/menu.component.metadata.json +1 -1
  13. package/esm2015/lib/table/cell/cell.js +12 -0
  14. package/esm2015/lib/table/cell/cell.js.map +1 -0
  15. package/esm2015/lib/table/cell/cell.metadata.json +1 -0
  16. package/esm2015/lib/table/cell/table-data-cell.component.js +20 -0
  17. package/esm2015/lib/table/cell/table-data-cell.component.js.map +1 -0
  18. package/esm2015/lib/table/cell/table-data-cell.component.metadata.json +1 -0
  19. package/esm2015/lib/table/cell/table-header-cell.component.js +13 -0
  20. package/esm2015/lib/table/cell/table-header-cell.component.js.map +1 -0
  21. package/esm2015/lib/table/cell/table-header-cell.component.metadata.json +1 -0
  22. package/esm2015/lib/table/column/table-column.directive.js +21 -0
  23. package/esm2015/lib/table/column/table-column.directive.js.map +1 -0
  24. package/esm2015/lib/table/column/table-column.directive.metadata.json +1 -0
  25. package/esm2015/lib/table/table-constants.library.js +4 -0
  26. package/esm2015/lib/table/table-constants.library.js.map +1 -0
  27. package/esm2015/lib/table/table-constants.library.metadata.json +1 -0
  28. package/esm2015/lib/table/table.component.js +26 -0
  29. package/esm2015/lib/table/table.component.js.map +1 -0
  30. package/esm2015/lib/table/table.component.metadata.json +1 -0
  31. package/esm2015/lib/table/table.module.js +23 -0
  32. package/esm2015/lib/table/table.module.js.map +1 -0
  33. package/esm2015/lib/table/table.module.metadata.json +1 -0
  34. package/esm2015/lib/toggle-switch/toggle-switch.component.js +3 -4
  35. package/esm2015/lib/toggle-switch/toggle-switch.component.js.map +1 -1
  36. package/esm2015/lib/toggle-switch/toggle-switch.component.metadata.json +1 -1
  37. package/fesm2015/ifsworld-granite-components.js +86 -129
  38. package/fesm2015/ifsworld-granite-components.js.map +1 -1
  39. package/ifsworld-granite-components.d.ts +3 -0
  40. package/ifsworld-granite-components.metadata.json +1 -1
  41. package/index.d.ts +3 -4
  42. package/lib/table/cell/cell.d.ts +5 -0
  43. package/lib/table/cell/table-data-cell.component.d.ts +10 -0
  44. package/lib/table/cell/table-header-cell.component.d.ts +3 -0
  45. package/lib/table/column/table-column.directive.d.ts +13 -0
  46. package/lib/table/table-constants.library.d.ts +3 -0
  47. package/lib/table/table.component.d.ts +15 -0
  48. package/lib/table/table.module.d.ts +2 -0
  49. package/lib/toggle-switch/toggle-switch.component.d.ts +1 -1
  50. package/package.json +1 -1
  51. package/src/lib/core/style/_mixins.scss +5 -17
  52. package/src/lib/core/style/_overlay.scss +2 -3
  53. package/src/lib/core/style/_responsive.scss +1 -0
  54. package/esm2015/lib/form-field/form-field.component.js +0 -16
  55. package/esm2015/lib/form-field/form-field.component.js.map +0 -1
  56. package/esm2015/lib/form-field/form-field.component.metadata.json +0 -1
  57. package/esm2015/lib/form-field/form-field.module.js +0 -13
  58. package/esm2015/lib/form-field/form-field.module.js.map +0 -1
  59. package/esm2015/lib/form-field/form-field.module.metadata.json +0 -1
  60. package/esm2015/lib/input-field/input-field.component.js +0 -110
  61. package/esm2015/lib/input-field/input-field.component.js.map +0 -1
  62. package/esm2015/lib/input-field/input-field.component.metadata.json +0 -1
  63. package/esm2015/lib/input-field/input-field.module.js +0 -15
  64. package/esm2015/lib/input-field/input-field.module.js.map +0 -1
  65. package/esm2015/lib/input-field/input-field.module.metadata.json +0 -1
  66. package/lib/form-field/form-field.component.d.ts +0 -2
  67. package/lib/form-field/form-field.module.d.ts +0 -2
  68. package/lib/input-field/input-field.component.d.ts +0 -34
  69. package/lib/input-field/input-field.module.d.ts +0 -2
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/testing'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/cdk/keycodes'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/cdk/platform')) :
3
- typeof define === 'function' && define.amd ? define('@ifsworld/granite-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/cdk/testing', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/cdk/keycodes', '@angular/animations', '@angular/cdk/bidi', '@angular/cdk/platform'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ifsworld = global.ifsworld || {}, global.ifsworld['granite-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.cdk.testing, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.cdk.keycodes, global.ng.animations, global.ng.cdk.bidi, global.ng.cdk.platform));
5
- }(this, (function (exports, core, common, coercion, rxjs, operators, testing, overlay, portal, a11y, keycodes, animations, bidi, platform) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/testing'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/cdk/keycodes'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/cdk/platform'), require('@angular/cdk/table')) :
3
+ typeof define === 'function' && define.amd ? define('@ifsworld/granite-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/cdk/testing', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/cdk/keycodes', '@angular/animations', '@angular/cdk/bidi', '@angular/cdk/platform', '@angular/cdk/table'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ifsworld = global.ifsworld || {}, global.ifsworld['granite-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.cdk.testing, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.cdk.keycodes, global.ng.animations, global.ng.cdk.bidi, global.ng.cdk.platform, global.ng.cdk.table));
5
+ }(this, (function (exports, core, common, coercion, rxjs, operators, testing, overlay, portal, a11y, keycodes, animations, bidi, platform, table) { 'use strict';
6
6
 
7
7
  var GraniteArrangeGridItemComponent = /** @class */ (function () {
8
8
  function GraniteArrangeGridItemComponent(element) {
@@ -1502,7 +1502,7 @@
1502
1502
  providers: [
1503
1503
  { provide: GRANITE_MENU_PANEL, useExisting: GraniteMenuComponent },
1504
1504
  ],
1505
- styles: [".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:calc(var(--granite-spacing-m) * 7)}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - var(--granite-spacing-m) * 7)}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]
1505
+ styles: [".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:calc(var(--granite-spacing-m) * 7);overflow-x:hidden;overflow-y:hidden}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu:not(.granite-device-output-touch):hover{overflow-y:auto}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar{width:var(--granite-spacing-xs)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-thumb{background-color:var(--granite-color-border-hard);border-radius:calc(var(--granite-spacing-m) * .125)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-track{background-color:var(--granite-color-background-hover)}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - var(--granite-spacing-m) * 7)}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]
1506
1506
  },] }
1507
1507
  ];
1508
1508
 
@@ -2571,8 +2571,7 @@
2571
2571
  this.ariaLabelledby = null;
2572
2572
  this.valueChange = new core.EventEmitter();
2573
2573
  this.toggleChange = new core.EventEmitter();
2574
- // eslint-disable-next-line @angular-eslint/no-output-native
2575
- this.blur = new core.EventEmitter();
2574
+ this.toggleBlur = new core.EventEmitter();
2576
2575
  this._positionBefore = false;
2577
2576
  this._toggleSwitchDisabled = false;
2578
2577
  }
@@ -2601,7 +2600,7 @@
2601
2600
  this._focusMonitor.focusVia(this._getInputElement(), origin, options);
2602
2601
  };
2603
2602
  GraniteToggleSwitchComponent.prototype._onBlur = function () {
2604
- this.blur.emit();
2603
+ this.toggleBlur.emit();
2605
2604
  };
2606
2605
  GraniteToggleSwitchComponent.prototype._toggleSwitchChange = function () {
2607
2606
  this.checked = this._getInputElement().checked;
@@ -2644,7 +2643,7 @@
2644
2643
  ariaLabelledby: [{ type: core.Input, args: ['aria-labelledby',] }],
2645
2644
  valueChange: [{ type: core.Output }],
2646
2645
  toggleChange: [{ type: core.Output }],
2647
- blur: [{ type: core.Output }],
2646
+ toggleBlur: [{ type: core.Output }],
2648
2647
  _inputElement: [{ type: core.ViewChild, args: ['input',] }]
2649
2648
  };
2650
2649
 
@@ -2806,165 +2805,125 @@
2806
2805
  },] }
2807
2806
  ];
2808
2807
 
2809
- var GraniteFormFieldComponent = /** @class */ (function () {
2810
- function GraniteFormFieldComponent() {
2808
+ var GraniteTableColumnDirective = /** @class */ (function () {
2809
+ function GraniteTableColumnDirective() {
2810
+ this.name = '';
2811
+ this.title = '';
2812
+ this.staticType = 'text';
2811
2813
  }
2812
- return GraniteFormFieldComponent;
2814
+ return GraniteTableColumnDirective;
2813
2815
  }());
2814
- GraniteFormFieldComponent.decorators = [
2815
- { type: core.Component, args: [{
2816
- selector: 'granite-form-field',
2817
- exportAs: 'graniteFormField',
2818
- template: "<ng-content></ng-content>\n",
2819
- host: {
2820
- class: 'granite-form-field',
2821
- },
2822
- encapsulation: core.ViewEncapsulation.None,
2823
- styles: [""]
2816
+ GraniteTableColumnDirective.decorators = [
2817
+ { type: core.Directive, args: [{
2818
+ // eslint-disable-next-line @angular-eslint/directive-selector
2819
+ selector: 'granite-table-column',
2824
2820
  },] }
2825
2821
  ];
2822
+ GraniteTableColumnDirective.propDecorators = {
2823
+ name: [{ type: core.Input }],
2824
+ title: [{ type: core.Input }],
2825
+ staticType: [{ type: core.Input }],
2826
+ tableCellTemplateRef: [{ type: core.ContentChild, args: ['graniteTableCellTemplate', { static: false },] }]
2827
+ };
2826
2828
 
2827
- var GraniteFormFieldModule = /** @class */ (function () {
2828
- function GraniteFormFieldModule() {
2829
+ var TableConstants = /** @class */ (function () {
2830
+ function TableConstants() {
2829
2831
  }
2830
- return GraniteFormFieldModule;
2832
+ return TableConstants;
2831
2833
  }());
2832
- GraniteFormFieldModule.decorators = [
2833
- { type: core.NgModule, args: [{
2834
- imports: [common.CommonModule],
2835
- declarations: [GraniteFormFieldComponent],
2836
- exports: [GraniteFormFieldComponent],
2837
- },] }
2838
- ];
2834
+ TableConstants.CELL_ID_PREFIX = 'granite-cell';
2839
2835
 
2840
- var GRANITE_INPUT_INCLUDES = ['text', 'number', 'password', 'textArea'];
2841
- var GraniteInputFieldComponent = /** @class */ (function () {
2842
- function GraniteInputFieldComponent() {
2843
- this.id = '';
2844
- this.name = '';
2845
- this.value = null;
2846
- this.isRequired = false;
2847
- this.isReadOnly = false;
2848
- this.isInvalid = false;
2849
- this.isDisabled = false;
2850
- this.placeholderText = '';
2851
- this.prefixIcon = '';
2852
- this.maxLength = 255;
2853
- this.enableCharacterCount = false;
2854
- this.ariaLabel = null;
2855
- this.ariaLabelledby = null;
2856
- this.valueChange = new core.EventEmitter();
2857
- this.isSupported = true;
2858
- this.isEmpty = false;
2859
- this.passwordFieldIcon = 'view';
2860
- this.currentCharCount = 0;
2861
- this._type = 'text';
2862
- this._hasError = false;
2836
+ var GraniteTableComponent = /** @class */ (function () {
2837
+ function GraniteTableComponent() {
2838
+ this.cellIdPrefix = TableConstants.CELL_ID_PREFIX;
2863
2839
  }
2864
- Object.defineProperty(GraniteInputFieldComponent.prototype, "type", {
2865
- get: function () {
2866
- return this._type;
2867
- },
2868
- set: function (value) {
2869
- this._type = value || 'text';
2870
- this._validateType();
2871
- },
2872
- enumerable: false,
2873
- configurable: true
2874
- });
2875
- Object.defineProperty(GraniteInputFieldComponent.prototype, "hasError", {
2876
- get: function () {
2877
- return this._hasError;
2878
- },
2879
- enumerable: false,
2880
- configurable: true
2881
- });
2882
- GraniteInputFieldComponent.prototype.ngOnChanges = function (changes) {
2883
- if (changes.value) {
2884
- this.isEmpty = this.value == null || this.value === '';
2885
- }
2886
- };
2887
- GraniteInputFieldComponent.prototype.ngOnInit = function () {
2888
- this.isEmpty = this.value == null || this.value === '';
2840
+ GraniteTableComponent.prototype.ngAfterContentInit = function () {
2841
+ this.columns = this.tableColumnsComponent.toArray();
2842
+ this.renderedColumns = this.columns.map(function (column) { return column.name; });
2889
2843
  };
2890
- GraniteInputFieldComponent.prototype.togglePassword = function () {
2891
- if (this.isPasswordToggled) {
2892
- this.isPasswordToggled = false;
2893
- this._type = 'password';
2894
- this.passwordFieldIcon = 'view';
2895
- }
2896
- else {
2897
- this.isPasswordToggled = true;
2898
- this._type = 'text';
2899
- this.passwordFieldIcon = 'view-disabled';
2900
- }
2901
- };
2902
- GraniteInputFieldComponent.prototype.onKeyUp = function (event) {
2903
- var inputElement = event.target;
2904
- this.applyCharacterCount(event);
2905
- this.valueChange.emit(inputElement.value);
2906
- };
2907
- GraniteInputFieldComponent.prototype.onInput = function (event) {
2908
- var inputElement = event.target;
2909
- this.valueChange.emit(inputElement.value);
2910
- };
2911
- GraniteInputFieldComponent.prototype.applyCharacterCount = function (event) {
2912
- var inputElement = event.target;
2913
- if (this.enableCharacterCount) {
2914
- this.currentCharCount = inputElement.value.length;
2915
- if (this.currentCharCount > this.maxLength) {
2916
- inputElement.value = inputElement.value.slice(0, this.maxLength);
2917
- this.currentCharCount = this.maxLength;
2918
- }
2919
- }
2920
- };
2921
- GraniteInputFieldComponent.prototype._validateType = function () {
2922
- if (GRANITE_INPUT_INCLUDES.indexOf(this.type) < 0) {
2923
- this.isSupported = false;
2924
- throw Error("Input type \"" + this.type + "\" isn't supported by graniteInputField.");
2925
- }
2926
- };
2927
- return GraniteInputFieldComponent;
2844
+ return GraniteTableComponent;
2928
2845
  }());
2929
- GraniteInputFieldComponent.decorators = [
2846
+ GraniteTableComponent.decorators = [
2930
2847
  { type: core.Component, args: [{
2931
- selector: 'granite-input-field',
2932
- exportAs: 'graniteInputField',
2933
- template: "<div class=\"granite-input-container\" *ngIf=\"isSupported\">\n <div class=\"granite-input-top-row\">\n <div class=\"granite-input-prepend\" *ngIf=\"prefixIcon != ''\">\n <granite-icon>{{ prefixIcon }}</granite-icon>\n </div>\n\n <input\n [id]=\"id\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"isRequired\"\n [readonly]=\"isReadOnly\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"placeholderText\"\n [value]=\"value\"\n [maxLength]=\"maxLength\"\n (keyup)=\"onKeyUp($event)\"\n (input)=\"onInput($event)\"\n *ngIf=\"type != 'textArea'\"\n class=\"input-base\"\n [class.invalid]=\"isInvalid\"\n [class.empty]=\"isEmpty\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"isInvalid\"\n />\n\n <button\n class=\"granite-input-append\"\n *ngIf=\"type == 'password' || isPasswordToggled != null\"\n (click)=\"togglePassword()\"\n >\n <granite-icon> {{ passwordFieldIcon }}</granite-icon>\n </button>\n\n <textarea\n *ngIf=\"type === 'textArea'\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.type]=\"type\"\n [required]=\"isRequired\"\n [readonly]=\"isReadOnly\"\n [disabled]=\"isDisabled\"\n [placeholder]=\"placeholderText\"\n [value]=\"value\"\n [maxLength]=\"maxLength\"\n (keyup)=\"onKeyUp($event)\"\n (input)=\"onInput($event)\"\n class=\"input-base\"\n [class.invalid]=\"isInvalid\"\n [class.empty]=\"isEmpty\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-required]=\"isRequired\"\n [attr.aria-invalid]=\"isInvalid\"\n ></textarea>\n </div>\n\n <div class=\"granite-input-bottom-row\">\n <div class=\"granite-input-char-count\" *ngIf=\"enableCharacterCount\">\n {{ currentCharCount }}/{{ maxLength }}\n </div>\n </div>\n\n <div><br /></div>\n</div>\n",
2934
- host: {
2935
- class: 'granite-input-field',
2936
- },
2937
- styles: [":host{transition:all .2s ease-out;width:14.5rem}.granite-input-container{height:2rem;width:inherit;font-size:.75rem}.granite-input-container :hover{box-shadow:0 .0625rem 0 var(--granite-color-focus)}.granite-input-container .input-base{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background);padding:.5rem 0 .5rem .5rem;width:inherit;color:var(--granite-color-text);font:inherit;font-weight:400;line-height:.75rem}.granite-input-container .input-base.invalid{color:var(--granite-color-signal-failure);box-shadow:0 .0625rem 0 var(--granite-color-signal-failure)}.granite-input-container .input-base:required.empty{background-color:var(--granite-color-background-failure)}.granite-input-container .input-base:-moz-read-only{background-color:var(--granite-color-background-variant-2)}.granite-input-container .input-base:read-only{background-color:var(--granite-color-background-variant-2)}.granite-input-container .input-base::-moz-placeholder{color:#a2a2a5}.granite-input-container .input-base:-ms-input-placeholder{color:#a2a2a5}.granite-input-container .input-base::placeholder{color:#a2a2a5}.granite-input-container .granite-input-top-row{display:inline-flex;background:var(--granite-color-background);width:inherit}.granite-input-container .granite-input-top-row :focus-within{box-shadow:0 -.0625rem 0 var(--granite-color-focus),-.0625rem 0 0 var(--granite-color-focus),.0625rem 0 0 var(--granite-color-focus),0 .0625rem 0 var(--granite-color-focus)}.granite-input-container .granite-input-top-row :focus-within.invalid{box-shadow:0 -.0625rem 0 var(--granite-color-focus),-.0625rem 0 0 var(--granite-color-focus),.0625rem 0 0 var(--granite-color-focus),0 .0625rem 0 var(--granite-color-signal-failure)}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 .5rem;background:var(--granite-color-background)}.granite-input-container .granite-input-prepend :hover{box-shadow:none}.granite-input-container .granite-input-append{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;-webkit-margin-start:.05rem;margin-inline-start:.05rem;background:var(--granite-color-background);position:relative}.granite-input-container .granite-input-append :hover{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:.5rem;background-size:contain;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}"]
2848
+ selector: 'granite-table',
2849
+ template: "<cdk-table [dataSource]=\"dataSource\" multiTemplateDataRows [trackBy]=\"trackBy\">\n <ng-container\n *ngFor=\"let column of columns; index as columnI\"\n [cdkColumnDef]=\"column.name\"\n >\n <!-- Cell Header -->\n <cdk-header-cell *cdkHeaderCellDef graniteTableHeaderCell>\n {{ column.title }}\n </cdk-header-cell>\n\n <!-- Cell Data -->\n <cdk-cell\n graniteTableDataCell\n *cdkCellDef=\"let element; let rowI = dataIndex\"\n [id]=\"cellIdPrefix + '-' + rowI + '-' + columnI\"\n [value]=\"element[column.name]\"\n [rowIndex]=\"rowI\"\n [columnIndex]=\"columnI\"\n [staticType]=\"column.staticType\"\n [column]=\"column\"\n [tableCellTemplateRef]=\"column.tableCellTemplateRef\"\n >\n </cdk-cell>\n </ng-container>\n\n <cdk-header-row *cdkHeaderRowDef=\"renderedColumns\"></cdk-header-row>\n <cdk-row *cdkRowDef=\"let row; columns: renderedColumns\"></cdk-row>\n</cdk-table>\n",
2850
+ changeDetection: core.ChangeDetectionStrategy.OnPush,
2851
+ styles: [":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}cdk-table{flex-direction:column;background-color:var(--granite-color-background-variant)}cdk-header-row,cdk-row,cdk-table{display:flex}cdk-cell,cdk-header-cell{flex:1}cdk-cell{height:calc(var(--granite-spacing-m) * 2.5);border-top:1px solid var(--granite-color-border-soft)}"]
2938
2852
  },] }
2939
2853
  ];
2940
- GraniteInputFieldComponent.propDecorators = {
2854
+ GraniteTableComponent.propDecorators = {
2855
+ dataSource: [{ type: core.Input }],
2856
+ trackBy: [{ type: core.Input }],
2857
+ tableColumnsComponent: [{ type: core.ContentChildren, args: [GraniteTableColumnDirective,] }]
2858
+ };
2859
+
2860
+ var GraniteCell = /** @class */ (function () {
2861
+ function GraniteCell() {
2862
+ }
2863
+ return GraniteCell;
2864
+ }());
2865
+ GraniteCell.decorators = [
2866
+ { type: core.Directive }
2867
+ ];
2868
+ GraniteCell.propDecorators = {
2941
2869
  id: [{ type: core.Input }],
2942
- name: [{ type: core.Input }],
2870
+ column: [{ type: core.Input }]
2871
+ };
2872
+
2873
+ var GraniteTableDataCellComponent = /** @class */ (function (_super) {
2874
+ __extends(GraniteTableDataCellComponent, _super);
2875
+ function GraniteTableDataCellComponent() {
2876
+ return _super !== null && _super.apply(this, arguments) || this;
2877
+ }
2878
+ return GraniteTableDataCellComponent;
2879
+ }(GraniteCell));
2880
+ GraniteTableDataCellComponent.decorators = [
2881
+ { type: core.Component, args: [{
2882
+ // eslint-disable-next-line @angular-eslint/component-selector
2883
+ selector: 'cdk-cell[graniteTableDataCell]',
2884
+ template: "<span class=\"granite-table-data-cell-static-container\">\n <ng-template\n [ngTemplateOutlet]=\"tableCellTemplateRef || defaultTableCellTemplate\"\n [ngTemplateOutletContext]=\"{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column\n }\"\n ></ng-template>\n</span>\n\n<ng-template #defaultTableCellTemplate>\n <ng-container *ngIf=\"staticType === 'text'\">\n {{ value }}\n </ng-container>\n <ng-container *ngIf=\"staticType === 'badge'\">\n <granite-badge>{{ value }}</granite-badge>\n </ng-container>\n</ng-template>\n",
2885
+ styles: [".granite-table-data-cell-static-container{padding:var(--granite-spacing-s);height:var(--granite-spacing-l);font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;color:var(--granite-color-text)}"]
2886
+ },] }
2887
+ ];
2888
+ GraniteTableDataCellComponent.propDecorators = {
2943
2889
  value: [{ type: core.Input }],
2944
- isRequired: [{ type: core.Input }],
2945
- isReadOnly: [{ type: core.Input }],
2946
- isInvalid: [{ type: core.Input }],
2947
- isDisabled: [{ type: core.Input }],
2948
- placeholderText: [{ type: core.Input }],
2949
- prefixIcon: [{ type: core.Input }],
2950
- maxLength: [{ type: core.Input }],
2951
- enableCharacterCount: [{ type: core.Input }],
2952
- ariaLabel: [{ type: core.Input, args: ['aria-label',] }],
2953
- ariaLabelledby: [{ type: core.Input, args: ['aria-labelledby',] }],
2954
- valueChange: [{ type: core.Output }],
2955
- type: [{ type: core.Input }]
2890
+ staticType: [{ type: core.Input }],
2891
+ rowIndex: [{ type: core.Input }],
2892
+ columnIndex: [{ type: core.Input }],
2893
+ tableCellTemplateRef: [{ type: core.Input }]
2956
2894
  };
2957
2895
 
2958
- var GraniteInputFieldModule = /** @class */ (function () {
2959
- function GraniteInputFieldModule() {
2896
+ var GraniteTableHeaderCellComponent = /** @class */ (function (_super) {
2897
+ __extends(GraniteTableHeaderCellComponent, _super);
2898
+ function GraniteTableHeaderCellComponent() {
2899
+ return _super !== null && _super.apply(this, arguments) || this;
2900
+ }
2901
+ return GraniteTableHeaderCellComponent;
2902
+ }(GraniteCell));
2903
+ GraniteTableHeaderCellComponent.decorators = [
2904
+ { type: core.Component, args: [{
2905
+ // eslint-disable-next-line @angular-eslint/component-selector
2906
+ selector: 'cdk-header-cell[graniteTableHeaderCell]',
2907
+ template: "<span class=\"granite-table-header-cell-title\">\n <ng-content></ng-content>\n</span>\n",
2908
+ styles: [".granite-table-header-cell-title{padding:var(--granite-spacing-s);height:var(--granite-spacing-l);font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;display:flex;justify-content:center;align-items:center;color:var(--granite-color-text-weak)}"]
2909
+ },] }
2910
+ ];
2911
+
2912
+ var GraniteTableModule = /** @class */ (function () {
2913
+ function GraniteTableModule() {
2960
2914
  }
2961
- return GraniteInputFieldModule;
2915
+ return GraniteTableModule;
2962
2916
  }());
2963
- GraniteInputFieldModule.decorators = [
2917
+ GraniteTableModule.decorators = [
2964
2918
  { type: core.NgModule, args: [{
2965
- imports: [common.CommonModule, GraniteIconModule, GraniteButtonModule],
2966
- declarations: [GraniteInputFieldComponent],
2967
- exports: [GraniteInputFieldComponent],
2919
+ declarations: [
2920
+ GraniteTableComponent,
2921
+ GraniteTableDataCellComponent,
2922
+ GraniteTableHeaderCellComponent,
2923
+ GraniteTableColumnDirective,
2924
+ ],
2925
+ imports: [common.CommonModule, table.CdkTableModule, GraniteBadgeModule],
2926
+ exports: [GraniteTableComponent, GraniteTableColumnDirective],
2968
2927
  },] }
2969
2928
  ];
2970
2929
 
@@ -3104,15 +3063,11 @@
3104
3063
  exports.GraniteButtonModule = GraniteButtonModule;
3105
3064
  exports.GraniteCoreModule = GraniteCoreModule;
3106
3065
  exports.GraniteDividerDirective = GraniteDividerDirective;
3107
- exports.GraniteFormFieldComponent = GraniteFormFieldComponent;
3108
- exports.GraniteFormFieldModule = GraniteFormFieldModule;
3109
3066
  exports.GraniteGridComponent = GraniteGridComponent;
3110
3067
  exports.GraniteGridItemComponent = GraniteGridItemComponent;
3111
3068
  exports.GraniteGridModule = GraniteGridModule;
3112
3069
  exports.GraniteIconComponent = GraniteIconComponent;
3113
3070
  exports.GraniteIconModule = GraniteIconModule;
3114
- exports.GraniteInputFieldComponent = GraniteInputFieldComponent;
3115
- exports.GraniteInputFieldModule = GraniteInputFieldModule;
3116
3071
  exports.GraniteMenuComponent = GraniteMenuComponent;
3117
3072
  exports.GraniteMenuHarness = GraniteMenuHarness;
3118
3073
  exports.GraniteMenuItemComponent = GraniteMenuItemComponent;
@@ -3121,6 +3076,9 @@
3121
3076
  exports.GraniteMenuTouchCloseComponent = GraniteMenuTouchCloseComponent;
3122
3077
  exports.GraniteMenuTouchTitleItemComponent = GraniteMenuTouchTitleItemComponent;
3123
3078
  exports.GraniteMenuTriggerForDirective = GraniteMenuTriggerForDirective;
3079
+ exports.GraniteTableColumnDirective = GraniteTableColumnDirective;
3080
+ exports.GraniteTableComponent = GraniteTableComponent;
3081
+ exports.GraniteTableModule = GraniteTableModule;
3124
3082
  exports.GraniteToggleSwitchComponent = GraniteToggleSwitchComponent;
3125
3083
  exports.GraniteToggleSwitchModule = GraniteToggleSwitchModule;
3126
3084
  exports._MenuBaseComponent = _MenuBaseComponent;
@@ -3133,6 +3091,9 @@
3133
3091
  exports.ɵa = GRANITE_MENU_PANEL;
3134
3092
  exports.ɵc = getEaseOutSteep;
3135
3093
  exports.ɵd = getEaseLinear;
3094
+ exports.ɵe = GraniteTableDataCellComponent;
3095
+ exports.ɵf = GraniteCell;
3096
+ exports.ɵg = GraniteTableHeaderCellComponent;
3136
3097
 
3137
3098
  Object.defineProperty(exports, '__esModule', { value: true });
3138
3099