@ifsworld/granite-components 3.1.0 → 3.2.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.
- package/bundles/ifsworld-granite-components.umd.js +164 -4
- package/bundles/ifsworld-granite-components.umd.js.map +1 -1
- package/bundles/ifsworld-granite-components.umd.min.js +3 -3
- package/bundles/ifsworld-granite-components.umd.min.js.map +1 -1
- package/esm2015/ifsworld-granite-components.js +5 -0
- package/esm2015/ifsworld-granite-components.js.map +1 -1
- package/esm2015/ifsworld-granite-components.metadata.json +1 -1
- package/esm2015/index.js +3 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/index.metadata.json +1 -1
- package/esm2015/lib/core/pipes/pure-pipes.module.js +11 -0
- package/esm2015/lib/core/pipes/pure-pipes.module.js.map +1 -0
- package/esm2015/lib/core/pipes/pure-pipes.module.metadata.json +1 -0
- package/esm2015/lib/core/pipes/title.pipe.js +17 -0
- package/esm2015/lib/core/pipes/title.pipe.js.map +1 -0
- package/esm2015/lib/core/pipes/title.pipe.metadata.json +1 -0
- package/esm2015/lib/table/cell/cell.js +12 -0
- package/esm2015/lib/table/cell/cell.js.map +1 -0
- package/esm2015/lib/table/cell/cell.metadata.json +1 -0
- package/esm2015/lib/table/cell/table-data-cell.component.js +20 -0
- package/esm2015/lib/table/cell/table-data-cell.component.js.map +1 -0
- package/esm2015/lib/table/cell/table-data-cell.component.metadata.json +1 -0
- package/esm2015/lib/table/cell/table-header-cell.component.js +13 -0
- package/esm2015/lib/table/cell/table-header-cell.component.js.map +1 -0
- package/esm2015/lib/table/cell/table-header-cell.component.metadata.json +1 -0
- package/esm2015/lib/table/column/table-column.directive.js +16 -0
- package/esm2015/lib/table/column/table-column.directive.js.map +1 -0
- package/esm2015/lib/table/column/table-column.directive.metadata.json +1 -0
- package/esm2015/lib/table/table-constants.library.js +4 -0
- package/esm2015/lib/table/table-constants.library.js.map +1 -0
- package/esm2015/lib/table/table-constants.library.metadata.json +1 -0
- package/esm2015/lib/table/table.component.js +28 -0
- package/esm2015/lib/table/table.component.js.map +1 -0
- package/esm2015/lib/table/table.component.metadata.json +1 -0
- package/esm2015/lib/table/table.module.js +24 -0
- package/esm2015/lib/table/table.module.js.map +1 -0
- package/esm2015/lib/table/table.module.metadata.json +1 -0
- package/fesm2015/ifsworld-granite-components.js +126 -2
- package/fesm2015/ifsworld-granite-components.js.map +1 -1
- package/ifsworld-granite-components.d.ts +5 -0
- package/ifsworld-granite-components.metadata.json +1 -1
- package/index.d.ts +3 -0
- package/lib/core/pipes/pure-pipes.module.d.ts +2 -0
- package/lib/core/pipes/title.pipe.d.ts +4 -0
- package/lib/table/cell/cell.d.ts +5 -0
- package/lib/table/cell/table-data-cell.component.d.ts +10 -0
- package/lib/table/cell/table-header-cell.component.d.ts +3 -0
- package/lib/table/column/table-column.directive.d.ts +13 -0
- package/lib/table/table-constants.library.d.ts +3 -0
- package/lib/table/table.component.d.ts +16 -0
- package/lib/table/table.module.d.ts +2 -0
- package/package.json +1 -1
- package/src/lib/core/style/_responsive.scss +1 -0
|
@@ -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'), require('@angular/cdk/collections')) :
|
|
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/collections'], 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.collections));
|
|
5
|
-
}(this, (function (exports, core, common, coercion, rxjs, operators, testing, overlay, portal, a11y, keycodes, animations, bidi, platform, collections) { '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/collections'), 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/collections', '@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.collections, global.ng.cdk.table));
|
|
5
|
+
}(this, (function (exports, core, common, coercion, rxjs, operators, testing, overlay, portal, a11y, keycodes, animations, bidi, platform, collections, table) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var GraniteArrangeGridItemComponent = /** @class */ (function () {
|
|
8
8
|
function GraniteArrangeGridItemComponent(element) {
|
|
@@ -2925,6 +2925,158 @@
|
|
|
2925
2925
|
},] }
|
|
2926
2926
|
];
|
|
2927
2927
|
|
|
2928
|
+
var GraniteTableColumnDirective = /** @class */ (function () {
|
|
2929
|
+
function GraniteTableColumnDirective() {
|
|
2930
|
+
}
|
|
2931
|
+
return GraniteTableColumnDirective;
|
|
2932
|
+
}());
|
|
2933
|
+
GraniteTableColumnDirective.decorators = [
|
|
2934
|
+
{ type: core.Directive, args: [{
|
|
2935
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2936
|
+
selector: 'granite-table-column',
|
|
2937
|
+
},] }
|
|
2938
|
+
];
|
|
2939
|
+
GraniteTableColumnDirective.propDecorators = {
|
|
2940
|
+
name: [{ type: core.Input }],
|
|
2941
|
+
title: [{ type: core.Input }],
|
|
2942
|
+
staticType: [{ type: core.Input }],
|
|
2943
|
+
tableCellTemplateRef: [{ type: core.ContentChild, args: ['graniteTableCellTemplate', { static: false },] }]
|
|
2944
|
+
};
|
|
2945
|
+
|
|
2946
|
+
var TableConstants = /** @class */ (function () {
|
|
2947
|
+
function TableConstants() {
|
|
2948
|
+
}
|
|
2949
|
+
return TableConstants;
|
|
2950
|
+
}());
|
|
2951
|
+
TableConstants.CELL_ID_PREFIX = 'granite-cell';
|
|
2952
|
+
|
|
2953
|
+
var GraniteTableComponent = /** @class */ (function () {
|
|
2954
|
+
function GraniteTableComponent() {
|
|
2955
|
+
this.ariaLabel = null;
|
|
2956
|
+
this.cellIdPrefix = TableConstants.CELL_ID_PREFIX;
|
|
2957
|
+
}
|
|
2958
|
+
GraniteTableComponent.prototype.ngAfterContentInit = function () {
|
|
2959
|
+
this.columns = this.tableColumnsComponent.toArray();
|
|
2960
|
+
this.renderedColumns = this.columns.map(function (column) { return column.name; });
|
|
2961
|
+
};
|
|
2962
|
+
return GraniteTableComponent;
|
|
2963
|
+
}());
|
|
2964
|
+
GraniteTableComponent.decorators = [
|
|
2965
|
+
{ type: core.Component, args: [{
|
|
2966
|
+
selector: 'granite-table',
|
|
2967
|
+
template: "<cdk-table\n [dataSource]=\"dataSource\"\n multiTemplateDataRows\n [trackBy]=\"trackBy\"\n [attr.aria-label]=\"ariaLabel\"\n>\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 ? column.title : column.name) | graniteTitle }}\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 ></cdk-cell>\n </ng-container>\n\n <cdk-header-row *cdkHeaderRowDef=\"renderedColumns\"></cdk-header-row>\n <cdk-row\n *cdkRowDef=\"let row; let rowI = dataIndex; columns: renderedColumns\"\n [attr.aria-rowindex]=\"rowI + 1\"\n ></cdk-row>\n</cdk-table>\n",
|
|
2968
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2969
|
+
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)}"]
|
|
2970
|
+
},] }
|
|
2971
|
+
];
|
|
2972
|
+
GraniteTableComponent.propDecorators = {
|
|
2973
|
+
dataSource: [{ type: core.Input }],
|
|
2974
|
+
trackBy: [{ type: core.Input }],
|
|
2975
|
+
ariaLabel: [{ type: core.Input, args: ['aria-label',] }],
|
|
2976
|
+
tableColumnsComponent: [{ type: core.ContentChildren, args: [GraniteTableColumnDirective,] }]
|
|
2977
|
+
};
|
|
2978
|
+
|
|
2979
|
+
var GraniteCell = /** @class */ (function () {
|
|
2980
|
+
function GraniteCell() {
|
|
2981
|
+
}
|
|
2982
|
+
return GraniteCell;
|
|
2983
|
+
}());
|
|
2984
|
+
GraniteCell.decorators = [
|
|
2985
|
+
{ type: core.Directive }
|
|
2986
|
+
];
|
|
2987
|
+
GraniteCell.propDecorators = {
|
|
2988
|
+
id: [{ type: core.Input }],
|
|
2989
|
+
column: [{ type: core.Input }]
|
|
2990
|
+
};
|
|
2991
|
+
|
|
2992
|
+
var GraniteTableDataCellComponent = /** @class */ (function (_super) {
|
|
2993
|
+
__extends(GraniteTableDataCellComponent, _super);
|
|
2994
|
+
function GraniteTableDataCellComponent() {
|
|
2995
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2996
|
+
}
|
|
2997
|
+
return GraniteTableDataCellComponent;
|
|
2998
|
+
}(GraniteCell));
|
|
2999
|
+
GraniteTableDataCellComponent.decorators = [
|
|
3000
|
+
{ type: core.Component, args: [{
|
|
3001
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
3002
|
+
selector: 'cdk-cell[graniteTableDataCell]',
|
|
3003
|
+
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 [ngSwitch]=\"staticType\">\n <ng-container *ngSwitchCase=\"'badge'\">\n <granite-badge>{{ value }}</granite-badge>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ value }}</ng-container>\n </ng-container>\n</ng-template>\n",
|
|
3004
|
+
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)}"]
|
|
3005
|
+
},] }
|
|
3006
|
+
];
|
|
3007
|
+
GraniteTableDataCellComponent.propDecorators = {
|
|
3008
|
+
value: [{ type: core.Input }],
|
|
3009
|
+
staticType: [{ type: core.Input }],
|
|
3010
|
+
rowIndex: [{ type: core.Input }],
|
|
3011
|
+
columnIndex: [{ type: core.Input }],
|
|
3012
|
+
tableCellTemplateRef: [{ type: core.Input }]
|
|
3013
|
+
};
|
|
3014
|
+
|
|
3015
|
+
var GraniteTableHeaderCellComponent = /** @class */ (function (_super) {
|
|
3016
|
+
__extends(GraniteTableHeaderCellComponent, _super);
|
|
3017
|
+
function GraniteTableHeaderCellComponent() {
|
|
3018
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3019
|
+
}
|
|
3020
|
+
return GraniteTableHeaderCellComponent;
|
|
3021
|
+
}(GraniteCell));
|
|
3022
|
+
GraniteTableHeaderCellComponent.decorators = [
|
|
3023
|
+
{ type: core.Component, args: [{
|
|
3024
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
3025
|
+
selector: 'cdk-header-cell[graniteTableHeaderCell]',
|
|
3026
|
+
template: "<span class=\"granite-table-header-cell-title\">\n <ng-content></ng-content>\n</span>\n",
|
|
3027
|
+
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)}"]
|
|
3028
|
+
},] }
|
|
3029
|
+
];
|
|
3030
|
+
|
|
3031
|
+
var GraniteTitlePipe = /** @class */ (function () {
|
|
3032
|
+
function GraniteTitlePipe() {
|
|
3033
|
+
}
|
|
3034
|
+
GraniteTitlePipe.prototype.transform = function (value) {
|
|
3035
|
+
var words = value.split(/(?=[A-Z ])/);
|
|
3036
|
+
return words
|
|
3037
|
+
.map(function (word) { return word.trim(); })
|
|
3038
|
+
.filter(Boolean)
|
|
3039
|
+
.map(function (word) { return word.charAt(0).toLocaleUpperCase() + word.slice(1); })
|
|
3040
|
+
.join(' ');
|
|
3041
|
+
};
|
|
3042
|
+
return GraniteTitlePipe;
|
|
3043
|
+
}());
|
|
3044
|
+
GraniteTitlePipe.decorators = [
|
|
3045
|
+
{ type: core.Pipe, args: [{
|
|
3046
|
+
name: 'graniteTitle',
|
|
3047
|
+
},] }
|
|
3048
|
+
];
|
|
3049
|
+
|
|
3050
|
+
var PurePipesModule = /** @class */ (function () {
|
|
3051
|
+
function PurePipesModule() {
|
|
3052
|
+
}
|
|
3053
|
+
return PurePipesModule;
|
|
3054
|
+
}());
|
|
3055
|
+
PurePipesModule.decorators = [
|
|
3056
|
+
{ type: core.NgModule, args: [{
|
|
3057
|
+
exports: [GraniteTitlePipe],
|
|
3058
|
+
declarations: [GraniteTitlePipe],
|
|
3059
|
+
},] }
|
|
3060
|
+
];
|
|
3061
|
+
|
|
3062
|
+
var GraniteTableModule = /** @class */ (function () {
|
|
3063
|
+
function GraniteTableModule() {
|
|
3064
|
+
}
|
|
3065
|
+
return GraniteTableModule;
|
|
3066
|
+
}());
|
|
3067
|
+
GraniteTableModule.decorators = [
|
|
3068
|
+
{ type: core.NgModule, args: [{
|
|
3069
|
+
declarations: [
|
|
3070
|
+
GraniteTableComponent,
|
|
3071
|
+
GraniteTableDataCellComponent,
|
|
3072
|
+
GraniteTableHeaderCellComponent,
|
|
3073
|
+
GraniteTableColumnDirective,
|
|
3074
|
+
],
|
|
3075
|
+
imports: [common.CommonModule, table.CdkTableModule, GraniteBadgeModule, PurePipesModule],
|
|
3076
|
+
exports: [GraniteTableComponent, GraniteTableColumnDirective],
|
|
3077
|
+
},] }
|
|
3078
|
+
];
|
|
3079
|
+
|
|
2928
3080
|
var ɵ0 = deviceDesktop.output;
|
|
2929
3081
|
/**
|
|
2930
3082
|
* Directive used to tell components and their sub components that client output
|
|
@@ -3076,6 +3228,9 @@
|
|
|
3076
3228
|
exports.GraniteMenuTriggerForDirective = GraniteMenuTriggerForDirective;
|
|
3077
3229
|
exports.GraniteRadioButtonComponent = GraniteRadioButtonComponent;
|
|
3078
3230
|
exports.GraniteRadioButtonModule = GraniteRadioButtonModule;
|
|
3231
|
+
exports.GraniteTableColumnDirective = GraniteTableColumnDirective;
|
|
3232
|
+
exports.GraniteTableComponent = GraniteTableComponent;
|
|
3233
|
+
exports.GraniteTableModule = GraniteTableModule;
|
|
3079
3234
|
exports.GraniteToggleSwitchComponent = GraniteToggleSwitchComponent;
|
|
3080
3235
|
exports.GraniteToggleSwitchModule = GraniteToggleSwitchModule;
|
|
3081
3236
|
exports._MenuBaseComponent = _MenuBaseComponent;
|
|
@@ -3088,6 +3243,11 @@
|
|
|
3088
3243
|
exports.ɵa = GRANITE_MENU_PANEL;
|
|
3089
3244
|
exports.ɵc = getEaseOutSteep;
|
|
3090
3245
|
exports.ɵd = getEaseLinear;
|
|
3246
|
+
exports.ɵe = GraniteTableDataCellComponent;
|
|
3247
|
+
exports.ɵf = GraniteCell;
|
|
3248
|
+
exports.ɵg = GraniteTableHeaderCellComponent;
|
|
3249
|
+
exports.ɵh = PurePipesModule;
|
|
3250
|
+
exports.ɵi = GraniteTitlePipe;
|
|
3091
3251
|
|
|
3092
3252
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3093
3253
|
|