@testgorilla/tgo-ui 0.0.2 → 0.0.5
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/README.md +8 -2
- package/components/navbar/navbar.component.d.ts +35 -0
- package/components/navbar/navbar.component.module.d.ts +12 -0
- package/components/navbar/navbar.types.d.ts +4 -0
- package/components/paginator/paginator.component.d.ts +31 -0
- package/components/paginator/paginator.component.module.d.ts +9 -0
- package/components/table/table.component.d.ts +23 -9
- package/components/table/table.component.module.d.ts +3 -2
- package/components/table/table.types.d.ts +14 -3
- package/esm2020/components/navbar/navbar.component.mjs +56 -0
- package/esm2020/components/navbar/navbar.component.module.mjs +23 -0
- package/esm2020/components/navbar/navbar.types.mjs +2 -0
- package/esm2020/components/paginator/paginator.component.mjs +48 -0
- package/esm2020/components/paginator/paginator.component.module.mjs +20 -0
- package/esm2020/components/table/table.component.mjs +30 -9
- package/esm2020/components/table/table.component.module.mjs +6 -5
- package/esm2020/components/table/table.types.mjs +7 -1
- package/esm2020/public-api.mjs +11 -2
- package/esm2020/shared/pipes/dataPropertyGetter.mjs +1 -1
- package/fesm2015/testgorilla-tgo-ui.mjs +208 -18
- package/fesm2015/testgorilla-tgo-ui.mjs.map +1 -1
- package/fesm2020/testgorilla-tgo-ui.mjs +208 -18
- package/fesm2020/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +4 -2
- package/public-api.d.ts +7 -1
- package/shared/pipes/dataPropertyGetter.d.ts +6 -6
- package/src/assets/images/testgorilla.svg +1 -0
- package/src/theme/_variables.scss +2 -2
- package/src/theme/base.scss +4 -2
|
@@ -1,20 +1,190 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule, Pipe, ViewChild } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/toolbar';
|
|
4
|
+
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
1
5
|
import * as i4 from '@angular/common';
|
|
2
6
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
7
|
+
import * as i3 from '@angular/material/core';
|
|
8
|
+
import { MatRippleModule } from '@angular/material/core';
|
|
9
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
10
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
+
import * as i1$1 from '@angular/material/paginator';
|
|
12
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
13
|
+
import * as i3$1 from '@angular/material/sort';
|
|
6
14
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
7
15
|
import * as i2 from '@angular/material/table';
|
|
8
16
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
17
|
+
import * as i5 from 'ngx-date-fns';
|
|
18
|
+
import { DateFnsModule } from 'ngx-date-fns';
|
|
19
|
+
|
|
20
|
+
class NavbarComponent {
|
|
21
|
+
constructor() {
|
|
22
|
+
// TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13
|
|
23
|
+
// https://github.com/storybookjs/storybook/issues/16865
|
|
24
|
+
// https://github.com/storybookjs/storybook/issues/17004
|
|
25
|
+
/**
|
|
26
|
+
* Routes object
|
|
27
|
+
*
|
|
28
|
+
* @type {IRoute}
|
|
29
|
+
* @memberof NavbarComponent
|
|
30
|
+
* @ignore
|
|
31
|
+
*/
|
|
32
|
+
this.routes = [];
|
|
33
|
+
/**
|
|
34
|
+
* Actived route id
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof NavbarComponent
|
|
38
|
+
*/
|
|
39
|
+
this.activedRoute = '';
|
|
40
|
+
/**
|
|
41
|
+
* User first name and last name initials
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof NavbarComponent
|
|
45
|
+
*/
|
|
46
|
+
this.userInitials = '';
|
|
47
|
+
/**
|
|
48
|
+
* @ignore
|
|
49
|
+
*/
|
|
50
|
+
this.navigateEvent = new EventEmitter();
|
|
51
|
+
}
|
|
52
|
+
navigate(routeId) {
|
|
53
|
+
this.navigateEvent.emit(`/${routeId}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
NavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
NavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NavbarComponent, selector: "ui-navbar", inputs: { routes: "routes", activedRoute: "activedRoute", userInitials: "userInitials" }, outputs: { navigateEvent: "navigateEvent" }, ngImport: i0, template: "<mat-toolbar>\n <div class=\"custom-toolbar row\">\n <div class=\"init-gradient\"></div>\n <div class=\"content row\">\n <img class=\"logo\" src=\"/images/testgorilla.svg\" (click)=\"navigate('')\">\n <div class=\"navigation row\">\n <a *ngFor=\"let route of routes\" (click)=\"navigate(route.id)\" [ngClass]=\"{'active': activedRoute === route.id}\">\n <span>{{ route.title }}</span>\n </a>\n </div>\n <div class=\"actions\">\n <!-- <button mat-icon-button>\n <mat-icon>help_outline</mat-icon>\n </button> -->\n <div class=\"profile-circle\" matRipple [matRippleUnbounded]=\"true\" [matRippleCentered]=\"true\">\n {{ userInitials }}\n </div>\n </div>\n </div>\n <div class=\"final-gradient\"></div>\n </div>\n</mat-toolbar>\n", styles: [".mat-toolbar{height:80px!important}.mat-toolbar .custom-toolbar{width:100%;height:100%}.mat-toolbar .custom-toolbar .init-gradient{width:160px;height:100%;background:linear-gradient(270deg,rgb(233,240,241) 0%,rgba(233,240,241,0) 100%)}.mat-toolbar .custom-toolbar .content{background-color:#e9f0f1;width:100%}.mat-toolbar .custom-toolbar .content .logo{width:140px;margin-left:28px;cursor:pointer}.mat-toolbar .custom-toolbar .content .navigation{height:100%;margin-left:70px}.mat-toolbar .custom-toolbar .content .navigation a{display:flex;align-items:center;height:100%;width:161px;background:#fff;cursor:pointer}.mat-toolbar .custom-toolbar .content .navigation a.active{box-shadow:inset 0 5px 0 -1px #46a997}.mat-toolbar .custom-toolbar .content .navigation a span{width:100%;text-align:center;font-weight:400;font-size:16px}.mat-toolbar .custom-toolbar .content .actions{width:100%;display:flex;align-items:center;justify-content:flex-end}.mat-toolbar .custom-toolbar .content .actions .profile-circle{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;width:32px;height:32px;background:#D4E0E4;border-radius:128px;font-weight:600;font-size:14px;text-align:center;margin-left:32px}.mat-toolbar .custom-toolbar .final-gradient{width:160px;height:100%;background:linear-gradient(90deg,rgb(233,240,241) 0%,rgba(233,240,241,0) 100%)}.row{display:flex;flex-direction:row}\n"], components: [{ type: i1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }], directives: [{ type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavbarComponent, decorators: [{
|
|
59
|
+
type: Component,
|
|
60
|
+
args: [{ selector: 'ui-navbar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<mat-toolbar>\n <div class=\"custom-toolbar row\">\n <div class=\"init-gradient\"></div>\n <div class=\"content row\">\n <img class=\"logo\" src=\"/images/testgorilla.svg\" (click)=\"navigate('')\">\n <div class=\"navigation row\">\n <a *ngFor=\"let route of routes\" (click)=\"navigate(route.id)\" [ngClass]=\"{'active': activedRoute === route.id}\">\n <span>{{ route.title }}</span>\n </a>\n </div>\n <div class=\"actions\">\n <!-- <button mat-icon-button>\n <mat-icon>help_outline</mat-icon>\n </button> -->\n <div class=\"profile-circle\" matRipple [matRippleUnbounded]=\"true\" [matRippleCentered]=\"true\">\n {{ userInitials }}\n </div>\n </div>\n </div>\n <div class=\"final-gradient\"></div>\n </div>\n</mat-toolbar>\n", styles: [".mat-toolbar{height:80px!important}.mat-toolbar .custom-toolbar{width:100%;height:100%}.mat-toolbar .custom-toolbar .init-gradient{width:160px;height:100%;background:linear-gradient(270deg,rgb(233,240,241) 0%,rgba(233,240,241,0) 100%)}.mat-toolbar .custom-toolbar .content{background-color:#e9f0f1;width:100%}.mat-toolbar .custom-toolbar .content .logo{width:140px;margin-left:28px;cursor:pointer}.mat-toolbar .custom-toolbar .content .navigation{height:100%;margin-left:70px}.mat-toolbar .custom-toolbar .content .navigation a{display:flex;align-items:center;height:100%;width:161px;background:#fff;cursor:pointer}.mat-toolbar .custom-toolbar .content .navigation a.active{box-shadow:inset 0 5px 0 -1px #46a997}.mat-toolbar .custom-toolbar .content .navigation a span{width:100%;text-align:center;font-weight:400;font-size:16px}.mat-toolbar .custom-toolbar .content .actions{width:100%;display:flex;align-items:center;justify-content:flex-end}.mat-toolbar .custom-toolbar .content .actions .profile-circle{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;width:32px;height:32px;background:#D4E0E4;border-radius:128px;font-weight:600;font-size:14px;text-align:center;margin-left:32px}.mat-toolbar .custom-toolbar .final-gradient{width:160px;height:100%;background:linear-gradient(90deg,rgb(233,240,241) 0%,rgba(233,240,241,0) 100%)}.row{display:flex;flex-direction:row}\n"] }]
|
|
61
|
+
}], ctorParameters: function () { return []; }, propDecorators: { routes: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], activedRoute: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], userInitials: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], navigateEvent: [{
|
|
68
|
+
type: Output
|
|
69
|
+
}] } });
|
|
70
|
+
|
|
71
|
+
class NavbarComponentModule {
|
|
72
|
+
}
|
|
73
|
+
NavbarComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavbarComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
74
|
+
NavbarComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavbarComponentModule, declarations: [NavbarComponent], imports: [CommonModule, MatToolbarModule, MatIconModule, MatButtonModule, MatRippleModule], exports: [NavbarComponent] });
|
|
75
|
+
NavbarComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavbarComponentModule, providers: [], imports: [[CommonModule, MatToolbarModule, MatIconModule, MatButtonModule, MatRippleModule]] });
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NavbarComponentModule, decorators: [{
|
|
77
|
+
type: NgModule,
|
|
78
|
+
args: [{
|
|
79
|
+
declarations: [NavbarComponent],
|
|
80
|
+
imports: [CommonModule, MatToolbarModule, MatIconModule, MatButtonModule, MatRippleModule],
|
|
81
|
+
exports: [NavbarComponent],
|
|
82
|
+
providers: [],
|
|
83
|
+
}]
|
|
84
|
+
}] });
|
|
85
|
+
|
|
86
|
+
class PaginatorComponent {
|
|
87
|
+
constructor() {
|
|
88
|
+
// TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13
|
|
89
|
+
// https://github.com/storybookjs/storybook/issues/16865
|
|
90
|
+
// https://github.com/storybookjs/storybook/issues/17004
|
|
91
|
+
/**
|
|
92
|
+
* Data length
|
|
93
|
+
*
|
|
94
|
+
* @type {number}
|
|
95
|
+
* @memberof PaginatorComponent
|
|
96
|
+
*/
|
|
97
|
+
this.length = 0;
|
|
98
|
+
/**
|
|
99
|
+
* Default page size
|
|
100
|
+
*
|
|
101
|
+
* @type {number}
|
|
102
|
+
* @memberof PaginatorComponent
|
|
103
|
+
*/
|
|
104
|
+
this.defaultPageSize = 10;
|
|
105
|
+
/**
|
|
106
|
+
* @ignore
|
|
107
|
+
*/
|
|
108
|
+
this.paginatorChangedEvent = new EventEmitter();
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @ignore
|
|
112
|
+
*/
|
|
113
|
+
ngOnInit() { }
|
|
114
|
+
paginatorChanged(paginator) {
|
|
115
|
+
this.paginatorChangedEvent.emit(paginator);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
PaginatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
119
|
+
PaginatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PaginatorComponent, selector: "ui-paginator", inputs: { length: "length", defaultPageSize: "defaultPageSize" }, outputs: { paginatorChangedEvent: "paginatorChangedEvent" }, ngImport: i0, template: "<mat-paginator [length]=\"length\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"[10, 25, 50]\"\n (page)=\"paginatorChanged($event)\">\n</mat-paginator>", styles: ["mat-paginator{border-radius:0 0 8px 8px}mat-paginator .mat-paginator-outer-container{border-radius:0 0 8px 8px;background:rgba(233,240,241,.5);font-weight:400;font-size:14px;line-height:16px;color:#000}mat-paginator .mat-paginator-outer-container .mat-paginator-container{padding:0}mat-paginator .mat-paginator-outer-container .mat-paginator-container .mat-select-value-text{font-size:14px}mat-paginator .mat-paginator-outer-container .mat-paginator-container .mat-paginator-range-actions{height:100%}mat-paginator .mat-paginator-outer-container .mat-paginator-container .mat-paginator-range-actions button{background:rgba(233,240,241,.5);height:100%;width:70px;border-radius:0}\n"], components: [{ type: i1$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
121
|
+
type: Component,
|
|
122
|
+
args: [{ selector: 'ui-paginator', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<mat-paginator [length]=\"length\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"[10, 25, 50]\"\n (page)=\"paginatorChanged($event)\">\n</mat-paginator>", styles: ["mat-paginator{border-radius:0 0 8px 8px}mat-paginator .mat-paginator-outer-container{border-radius:0 0 8px 8px;background:rgba(233,240,241,.5);font-weight:400;font-size:14px;line-height:16px;color:#000}mat-paginator .mat-paginator-outer-container .mat-paginator-container{padding:0}mat-paginator .mat-paginator-outer-container .mat-paginator-container .mat-select-value-text{font-size:14px}mat-paginator .mat-paginator-outer-container .mat-paginator-container .mat-paginator-range-actions{height:100%}mat-paginator .mat-paginator-outer-container .mat-paginator-container .mat-paginator-range-actions button{background:rgba(233,240,241,.5);height:100%;width:70px;border-radius:0}\n"] }]
|
|
123
|
+
}], ctorParameters: function () { return []; }, propDecorators: { length: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], defaultPageSize: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], paginatorChangedEvent: [{
|
|
128
|
+
type: Output
|
|
129
|
+
}] } });
|
|
130
|
+
|
|
131
|
+
class PaginatorComponentModule {
|
|
132
|
+
}
|
|
133
|
+
PaginatorComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginatorComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
134
|
+
PaginatorComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginatorComponentModule, declarations: [PaginatorComponent], imports: [CommonModule, MatPaginatorModule], exports: [PaginatorComponent] });
|
|
135
|
+
PaginatorComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginatorComponentModule, providers: [], imports: [[CommonModule, MatPaginatorModule]] });
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginatorComponentModule, decorators: [{
|
|
137
|
+
type: NgModule,
|
|
138
|
+
args: [{
|
|
139
|
+
declarations: [PaginatorComponent],
|
|
140
|
+
imports: [CommonModule, MatPaginatorModule],
|
|
141
|
+
exports: [PaginatorComponent],
|
|
142
|
+
providers: [],
|
|
143
|
+
}]
|
|
144
|
+
}] });
|
|
11
145
|
|
|
12
146
|
var DataType;
|
|
13
147
|
(function (DataType) {
|
|
14
148
|
DataType["Date"] = "date";
|
|
15
149
|
DataType["String"] = "string";
|
|
16
150
|
DataType["Label"] = "label";
|
|
151
|
+
DataType["Percentage"] = "percentage";
|
|
17
152
|
})(DataType || (DataType = {}));
|
|
153
|
+
var DateFormat;
|
|
154
|
+
(function (DateFormat) {
|
|
155
|
+
DateFormat["Short"] = "short";
|
|
156
|
+
DateFormat["TimeAgo"] = "timeAgo";
|
|
157
|
+
})(DateFormat || (DateFormat = {}));
|
|
158
|
+
|
|
159
|
+
class DataPropertyGetterPipe {
|
|
160
|
+
transform(object, keyName) {
|
|
161
|
+
return this.getDeepVal(object, keyName);
|
|
162
|
+
}
|
|
163
|
+
getDeepVal(obj, path) {
|
|
164
|
+
if (typeof obj === 'undefined' || obj === null) {
|
|
165
|
+
return '';
|
|
166
|
+
}
|
|
167
|
+
const splittedPath = path.split(/[\.\[\]\"\']{1,2}/);
|
|
168
|
+
for (let i = 0, l = splittedPath.length; i < l; i++) {
|
|
169
|
+
if (splittedPath[i] === '') {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
obj = obj[splittedPath[i]];
|
|
173
|
+
if (typeof obj === 'undefined' || obj === null) {
|
|
174
|
+
return '';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return obj;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
DataPropertyGetterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DataPropertyGetterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
181
|
+
DataPropertyGetterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DataPropertyGetterPipe, name: "dataPropertyGetter" });
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DataPropertyGetterPipe, decorators: [{
|
|
183
|
+
type: Pipe,
|
|
184
|
+
args: [{
|
|
185
|
+
name: 'dataPropertyGetter',
|
|
186
|
+
}]
|
|
187
|
+
}] });
|
|
18
188
|
|
|
19
189
|
class TableComponent {
|
|
20
190
|
constructor(dataPropertyGetterPipe) {
|
|
@@ -22,6 +192,12 @@ class TableComponent {
|
|
|
22
192
|
// TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13
|
|
23
193
|
// https://github.com/storybookjs/storybook/issues/16865
|
|
24
194
|
// https://github.com/storybookjs/storybook/issues/17004
|
|
195
|
+
/**
|
|
196
|
+
* @ignore
|
|
197
|
+
*/
|
|
198
|
+
this.timeAgoOptions = {
|
|
199
|
+
addSuffix: true,
|
|
200
|
+
};
|
|
25
201
|
/**
|
|
26
202
|
* @ignore
|
|
27
203
|
*/
|
|
@@ -34,6 +210,10 @@ class TableComponent {
|
|
|
34
210
|
* @ignore
|
|
35
211
|
*/
|
|
36
212
|
this.DataType = DataType;
|
|
213
|
+
/**
|
|
214
|
+
* @ignore
|
|
215
|
+
*/
|
|
216
|
+
this.DateFormat = DateFormat;
|
|
37
217
|
/**
|
|
38
218
|
* Data structure to select which columns should be rendered and their capabilities
|
|
39
219
|
*
|
|
@@ -41,6 +221,12 @@ class TableComponent {
|
|
|
41
221
|
* @memberof TableComponent
|
|
42
222
|
*/
|
|
43
223
|
this.tableColumns = [];
|
|
224
|
+
/**
|
|
225
|
+
* @type {IStatusOptions}
|
|
226
|
+
* @memberof TableComponent
|
|
227
|
+
* @ignore
|
|
228
|
+
*/
|
|
229
|
+
this.statusOptions = [];
|
|
44
230
|
/**
|
|
45
231
|
* @ignore
|
|
46
232
|
*/
|
|
@@ -57,11 +243,10 @@ class TableComponent {
|
|
|
57
243
|
* @memberof TableComponent
|
|
58
244
|
*/
|
|
59
245
|
set tableData(data) {
|
|
60
|
-
|
|
246
|
+
if (data?.length) {
|
|
247
|
+
this.setTableDataSource(data);
|
|
248
|
+
}
|
|
61
249
|
}
|
|
62
|
-
/**
|
|
63
|
-
* @ignore
|
|
64
|
-
*/
|
|
65
250
|
ngOnInit() {
|
|
66
251
|
this.displayedColumns = this.tableColumns.map((tableColumn) => tableColumn.name);
|
|
67
252
|
}
|
|
@@ -75,6 +260,9 @@ class TableComponent {
|
|
|
75
260
|
onRowClick(rowParams) {
|
|
76
261
|
this.onRowClickEvent.emit(rowParams);
|
|
77
262
|
}
|
|
263
|
+
getStatus(key) {
|
|
264
|
+
return this.statusOptions.find(status => status.id === key);
|
|
265
|
+
}
|
|
78
266
|
/**
|
|
79
267
|
* @ignore
|
|
80
268
|
*/
|
|
@@ -84,18 +272,20 @@ class TableComponent {
|
|
|
84
272
|
this.dataSource.sort = this.sort;
|
|
85
273
|
}
|
|
86
274
|
}
|
|
87
|
-
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponent, deps: [{ token:
|
|
88
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TableComponent, selector: "ui-table", inputs: { tableData: "tableData", tableColumns: "tableColumns" }, outputs: { onSortEvent: "onSortEvent", onRowClickEvent: "onRowClickEvent" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSort($event)\">\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\n <ng-container *ngIf=\"tableColumn.sortable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef=\"let element\" [mat-sort-header]=\"tableColumn.dataKey\" arrowPosition=\"after\">\n {{tableColumn.name}}\n </th>\n </ng-container>\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef>\n {{tableColumn.name}}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" (click)=\"onRowClick(element)\">\n <ng-container [ngSwitch]=\"tableColumn.dataType\">\n <ng-container *ngSwitchCase=\"DataType.String\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Date\">\n {{(element | dataPropertyGetter: tableColumn.dataKey) |
|
|
275
|
+
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponent, deps: [{ token: DataPropertyGetterPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
276
|
+
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: TableComponent, selector: "ui-table", inputs: { tableData: "tableData", tableColumns: "tableColumns", statusOptions: "statusOptions" }, outputs: { onSortEvent: "onSortEvent", onRowClickEvent: "onRowClickEvent" }, viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }], ngImport: i0, template: "<table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSort($event)\">\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\n <ng-container *ngIf=\"tableColumn.sortable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef=\"let element\" [mat-sort-header]=\"tableColumn.dataKey\" arrowPosition=\"after\">\n {{tableColumn.name | uppercase}}\n </th>\n </ng-container>\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef>\n {{tableColumn.name | uppercase}}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" (click)=\"onRowClick(element)\">\n <ng-container [ngSwitch]=\"tableColumn.dataType\">\n <ng-container *ngSwitchCase=\"DataType.String\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Date\">\n <span *ngIf=\"tableColumn.dateFormat === DateFormat.Short\">{{(element | dataPropertyGetter:\n tableColumn.dataKey) | dfnsParseIso | dfnsFormat: 'dd MMM yyyy'}}</span>\n <span *ngIf=\"tableColumn.dateFormat === DateFormat.TimeAgo\">{{(element | dataPropertyGetter:\n tableColumn.dataKey) | dfnsParseIso | dfnsFormatDistanceToNow: timeAgoOptions}}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Percentage\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}%\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Label\">\n <ng-container *ngTemplateOutlet=\"label; context: {label: getStatus(element | dataPropertyGetter: tableColumn.dataKey)}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n\n<ng-template #label let-label=\"label\">\n <span class=\"label\" [ngStyle]=\"{'background-color': label?.backgroundColor, 'color': label?.color}\">\n {{ label?.title }}\n </span>\n</ng-template>", styles: ["table{width:100%;overflow:hidden;border-radius:8px 8px 0 0}table .mat-header-cell{font-weight:700;color:#000;background:rgba(233,240,241,.5)}table td,table th,table .mat-row{border:none}table ::ng-deep .mat-sort-header-arrow{color:#276678}table .label.active{background-color:#46a997;color:#fff}table .label{padding:0 8px;width:-moz-fit-content;width:fit-content;font-weight:600;font-size:10px;border-radius:4px;background-color:#e9f0f1;color:#000}\n"], components: [{ type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i3$1.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }], directives: [{ type: i3$1.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i2.MatCellDef, selector: "[matCellDef]" }, { type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "uppercase": i4.UpperCasePipe, "dataPropertyGetter": DataPropertyGetterPipe, "dfnsFormat": i5.FormatPipe, "dfnsParseIso": i5.ParseIsoPipe, "dfnsFormatDistanceToNow": i5.FormatDistanceToNowPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
89
277
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponent, decorators: [{
|
|
90
278
|
type: Component,
|
|
91
|
-
args: [{ selector: 'ui-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSort($event)\">\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\n <ng-container *ngIf=\"tableColumn.sortable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef=\"let element\" [mat-sort-header]=\"tableColumn.dataKey\" arrowPosition=\"after\">\n {{tableColumn.name}}\n </th>\n </ng-container>\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef>\n {{tableColumn.name}}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" (click)=\"onRowClick(element)\">\n <ng-container [ngSwitch]=\"tableColumn.dataType\">\n <ng-container *ngSwitchCase=\"DataType.String\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Date\">\n {{(element | dataPropertyGetter: tableColumn.dataKey) |
|
|
92
|
-
}], ctorParameters: function () { return [{ type:
|
|
279
|
+
args: [{ selector: 'ui-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSort($event)\">\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\n <ng-container *ngIf=\"tableColumn.sortable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef=\"let element\" [mat-sort-header]=\"tableColumn.dataKey\" arrowPosition=\"after\">\n {{tableColumn.name | uppercase}}\n </th>\n </ng-container>\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef>\n {{tableColumn.name | uppercase}}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" (click)=\"onRowClick(element)\">\n <ng-container [ngSwitch]=\"tableColumn.dataType\">\n <ng-container *ngSwitchCase=\"DataType.String\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Date\">\n <span *ngIf=\"tableColumn.dateFormat === DateFormat.Short\">{{(element | dataPropertyGetter:\n tableColumn.dataKey) | dfnsParseIso | dfnsFormat: 'dd MMM yyyy'}}</span>\n <span *ngIf=\"tableColumn.dateFormat === DateFormat.TimeAgo\">{{(element | dataPropertyGetter:\n tableColumn.dataKey) | dfnsParseIso | dfnsFormatDistanceToNow: timeAgoOptions}}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Percentage\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}%\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Label\">\n <ng-container *ngTemplateOutlet=\"label; context: {label: getStatus(element | dataPropertyGetter: tableColumn.dataKey)}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n\n<ng-template #label let-label=\"label\">\n <span class=\"label\" [ngStyle]=\"{'background-color': label?.backgroundColor, 'color': label?.color}\">\n {{ label?.title }}\n </span>\n</ng-template>", styles: ["table{width:100%;overflow:hidden;border-radius:8px 8px 0 0}table .mat-header-cell{font-weight:700;color:#000;background:rgba(233,240,241,.5)}table td,table th,table .mat-row{border:none}table ::ng-deep .mat-sort-header-arrow{color:#276678}table .label.active{background-color:#46a997;color:#fff}table .label{padding:0 8px;width:-moz-fit-content;width:fit-content;font-weight:600;font-size:10px;border-radius:4px;background-color:#e9f0f1;color:#000}\n"] }]
|
|
280
|
+
}], ctorParameters: function () { return [{ type: DataPropertyGetterPipe }]; }, propDecorators: { sort: [{
|
|
93
281
|
type: ViewChild,
|
|
94
282
|
args: [MatSort, { static: true }]
|
|
95
283
|
}], tableData: [{
|
|
96
284
|
type: Input
|
|
97
285
|
}], tableColumns: [{
|
|
98
286
|
type: Input
|
|
287
|
+
}], statusOptions: [{
|
|
288
|
+
type: Input
|
|
99
289
|
}], onSortEvent: [{
|
|
100
290
|
type: Output
|
|
101
291
|
}], onRowClickEvent: [{
|
|
@@ -105,23 +295,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
105
295
|
class TableComponentModule {
|
|
106
296
|
}
|
|
107
297
|
TableComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
108
|
-
TableComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponentModule, declarations: [TableComponent, DataPropertyGetterPipe], imports: [CommonModule, MatTableModule, MatSortModule], exports: [TableComponent] });
|
|
109
|
-
TableComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponentModule, providers: [DataPropertyGetterPipe], imports: [[CommonModule, MatTableModule, MatSortModule]] });
|
|
298
|
+
TableComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponentModule, declarations: [TableComponent, DataPropertyGetterPipe], imports: [CommonModule, MatTableModule, MatSortModule, DateFnsModule], exports: [TableComponent] });
|
|
299
|
+
TableComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponentModule, providers: [DataPropertyGetterPipe], imports: [[CommonModule, MatTableModule, MatSortModule, DateFnsModule]] });
|
|
110
300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TableComponentModule, decorators: [{
|
|
111
301
|
type: NgModule,
|
|
112
302
|
args: [{
|
|
113
303
|
declarations: [TableComponent, DataPropertyGetterPipe],
|
|
114
|
-
imports: [CommonModule, MatTableModule, MatSortModule],
|
|
304
|
+
imports: [CommonModule, MatTableModule, MatSortModule, DateFnsModule],
|
|
115
305
|
exports: [TableComponent],
|
|
116
306
|
providers: [DataPropertyGetterPipe],
|
|
117
307
|
}]
|
|
118
308
|
}] });
|
|
119
309
|
|
|
120
|
-
//
|
|
310
|
+
// Navbar Component
|
|
121
311
|
|
|
122
312
|
/**
|
|
123
313
|
* Generated bundle index. Do not edit.
|
|
124
314
|
*/
|
|
125
315
|
|
|
126
|
-
export { DataType, TableComponent, TableComponentModule };
|
|
316
|
+
export { DataPropertyGetterPipe, DataType, DateFormat, NavbarComponent, NavbarComponentModule, PaginatorComponent, PaginatorComponentModule, TableComponent, TableComponentModule };
|
|
127
317
|
//# sourceMappingURL=testgorilla-tgo-ui.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui.mjs","sources":["../../../src/components/table/table.types.ts","../../../src/components/table/table.component.ts","../../../src/components/table/table.component.html","../../../src/components/table/table.component.module.ts","../../../src/public-api.ts","../../../src/testgorilla-tgo-ui.ts"],"sourcesContent":["export type IDataSource = {\n [key: string]: IDataSource | string | number;\n};\n\nexport interface ITableColumn {\n name: string;\n dataKey: string;\n sortable?: boolean;\n dataType?: DataType;\n dateFormat?: string;\n}\n\nexport enum DataType {\n Date = 'date',\n String = 'string',\n Label = 'label',\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { MatSort, Sort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { DataPropertyGetterPipe } from 'src/shared/pipes/dataPropertyGetter';\nimport { DataType, IDataSource, ITableColumn } from './table.types';\n\n@Component({\n selector: 'ui-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent implements OnInit {\n // TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13\n // https://github.com/storybookjs/storybook/issues/16865\n // https://github.com/storybookjs/storybook/issues/17004\n\n /**\n * @ignore\n */\n dataSource = new MatTableDataSource<any>([]);\n\n /**\n * @ignore\n */\n displayedColumns: string[] = [];\n\n /**\n * @ignore\n */\n DataType = DataType;\n\n /**\n * @ignore\n */\n @ViewChild(MatSort, { static: true }) sort!: MatSort;\n\n /**\n * Data to be rendered\n *\n * @type {IDataSource}\n * @memberof TableComponent\n */\n @Input() set tableData(data: IDataSource[]) {\n this.setTableDataSource(data);\n }\n\n /**\n * Data structure to select which columns should be rendered and their capabilities\n *\n * @type {ITableColumn}\n * @memberof TableComponent\n */\n @Input() tableColumns: ITableColumn[] = [];\n\n /**\n * @ignore\n */\n @Output() onSortEvent: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n /**\n * @ignore\n */\n @Output() onRowClickEvent: EventEmitter<any> = new EventEmitter<any>();\n\n /**\n * @ignore\n */\n ngOnInit(): void {\n this.displayedColumns = this.tableColumns.map((tableColumn: ITableColumn) => tableColumn.name);\n }\n\n constructor(private dataPropertyGetterPipe: DataPropertyGetterPipe) {}\n\n onSort(sortParams: Sort) {\n const column = this.tableColumns.find((column: ITableColumn) => column.name === sortParams.active);\n if (column?.dataKey) {\n sortParams.active = column?.dataKey;\n }\n this.onSortEvent.emit(sortParams);\n }\n\n onRowClick(rowParams: any) {\n this.onRowClickEvent.emit(rowParams);\n }\n\n /**\n * @ignore\n */\n private setTableDataSource(data: IDataSource[]) {\n this.dataSource = new MatTableDataSource<any>(data);\n this.dataSource.sortingDataAccessor = (item, property) => this.dataPropertyGetterPipe.transform(item, property);\n this.dataSource.sort = this.sort;\n }\n}\n","<table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSort($event)\">\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\n <ng-container *ngIf=\"tableColumn.sortable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef=\"let element\" [mat-sort-header]=\"tableColumn.dataKey\" arrowPosition=\"after\">\n {{tableColumn.name}}\n </th>\n </ng-container>\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef>\n {{tableColumn.name}}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" (click)=\"onRowClick(element)\">\n <ng-container [ngSwitch]=\"tableColumn.dataType\">\n <ng-container *ngSwitchCase=\"DataType.String\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Date\">\n {{(element | dataPropertyGetter: tableColumn.dataKey) | date: tableColumn.dateFormat}}\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\nimport { DataPropertyGetterPipe } from 'src/shared/pipes/dataPropertyGetter';\nimport { TableComponent } from './table.component';\n\n@NgModule({\n declarations: [TableComponent, DataPropertyGetterPipe],\n imports: [CommonModule, MatTableModule, MatSortModule],\n exports: [TableComponent],\n providers: [DataPropertyGetterPipe],\n})\nexport class TableComponentModule {}\n","// Table Component\nexport * from './components/table/table.component.module';\nexport * from './components/table/table.component';\nexport * from './components/table/table.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;IAYY,SAIX;AAJD,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACjB,CAAC,EAJW,QAAQ,KAAR,QAAQ,GAInB,EAAA,CAAA,CAAA;;MCJY,cAAc,CAAA;AA4DzB,IAAA,WAAA,CAAoB,sBAA8C,EAAA;QAA9C,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB,CAAwB;;;;AAvDlE;;AAEG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,kBAAkB,CAAM,EAAE,CAAC,CAAC;AAE7C;;AAEG;QACH,IAAgB,CAAA,gBAAA,GAAa,EAAE,CAAC;AAEhC;;AAEG;QACH,IAAQ,CAAA,QAAA,GAAG,QAAQ,CAAC;AAiBpB;;;;;AAKG;QACM,IAAY,CAAA,YAAA,GAAmB,EAAE,CAAC;AAE3C;;AAEG;AACO,QAAA,IAAA,CAAA,WAAW,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAErE;;AAEG;AACO,QAAA,IAAA,CAAA,eAAe,GAAsB,IAAI,YAAY,EAAO,CAAC;KASD;AAnCtE;;;;;AAKG;IACH,IAAa,SAAS,CAAC,IAAmB,EAAA;AACxC,QAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAC/B;AAoBD;;AAEG;IACH,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CA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.mjs","sources":["../../../src/components/navbar/navbar.component.ts","../../../src/components/navbar/navbar.component.html","../../../src/components/navbar/navbar.component.module.ts","../../../src/components/paginator/paginator.component.ts","../../../src/components/paginator/paginator.component.html","../../../src/components/paginator/paginator.component.module.ts","../../../src/components/table/table.types.ts","../../../src/shared/pipes/dataPropertyGetter.ts","../../../src/components/table/table.component.ts","../../../src/components/table/table.component.html","../../../src/components/table/table.component.module.ts","../../../src/public-api.ts","../../../src/testgorilla-tgo-ui.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { IRoute } from './navbar.types';\n\n@Component({\n selector: 'ui-navbar',\n templateUrl: './navbar.component.html',\n styleUrls: ['./navbar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class NavbarComponent {\n // TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13\n // https://github.com/storybookjs/storybook/issues/16865\n // https://github.com/storybookjs/storybook/issues/17004\n\n /**\n * Routes object\n *\n * @type {IRoute}\n * @memberof NavbarComponent\n * @ignore\n */\n @Input() routes: IRoute[] = [];\n\n /**\n * Actived route id\n *\n * @type {string}\n * @memberof NavbarComponent\n */\n @Input() activedRoute = '';\n\n /**\n * User first name and last name initials\n *\n * @type {string}\n * @memberof NavbarComponent\n */\n @Input() userInitials = '';\n\n /**\n * @ignore\n */\n @Output() navigateEvent: EventEmitter<string> = new EventEmitter<string>();\n\n constructor() {}\n\n navigate(routeId: string) {\n this.navigateEvent.emit(`/${routeId}`);\n }\n}\n","<mat-toolbar>\n <div class=\"custom-toolbar row\">\n <div class=\"init-gradient\"></div>\n <div class=\"content row\">\n <img class=\"logo\" src=\"/images/testgorilla.svg\" (click)=\"navigate('')\">\n <div class=\"navigation row\">\n <a *ngFor=\"let route of routes\" (click)=\"navigate(route.id)\" [ngClass]=\"{'active': activedRoute === route.id}\">\n <span>{{ route.title }}</span>\n </a>\n </div>\n <div class=\"actions\">\n <!-- <button mat-icon-button>\n <mat-icon>help_outline</mat-icon>\n </button> -->\n <div class=\"profile-circle\" matRipple [matRippleUnbounded]=\"true\" [matRippleCentered]=\"true\">\n {{ userInitials }}\n </div>\n </div>\n </div>\n <div class=\"final-gradient\"></div>\n </div>\n</mat-toolbar>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { NavbarComponent } from './navbar.component';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatRippleModule } from '@angular/material/core';\n\n@NgModule({\n declarations: [NavbarComponent],\n imports: [CommonModule, MatToolbarModule, MatIconModule, MatButtonModule, MatRippleModule],\n exports: [NavbarComponent],\n providers: [],\n})\nexport class NavbarComponentModule {}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\n@Component({\n selector: 'ui-paginator',\n templateUrl: './paginator.component.html',\n styleUrls: ['./paginator.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class PaginatorComponent implements OnInit {\n // TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13\n // https://github.com/storybookjs/storybook/issues/16865\n // https://github.com/storybookjs/storybook/issues/17004\n\n /**\n * Data length\n *\n * @type {number}\n * @memberof PaginatorComponent\n */\n @Input() length = 0;\n\n /**\n * Default page size\n *\n * @type {number}\n * @memberof PaginatorComponent\n */\n @Input() defaultPageSize = 10;\n\n /**\n * @ignore\n */\n @Output() paginatorChangedEvent: EventEmitter<PageEvent> = new EventEmitter<PageEvent>();\n\n /**\n * @ignore\n */\n ngOnInit(): void {}\n\n constructor() {}\n\n paginatorChanged(paginator: PageEvent) {\n this.paginatorChangedEvent.emit(paginator);\n }\n}\n","<mat-paginator [length]=\"length\"\n [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"[10, 25, 50]\"\n (page)=\"paginatorChanged($event)\">\n</mat-paginator>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { PaginatorComponent } from './paginator.component';\n\n@NgModule({\n declarations: [PaginatorComponent],\n imports: [CommonModule, MatPaginatorModule],\n exports: [PaginatorComponent],\n providers: [],\n})\nexport class PaginatorComponentModule {}\n","export type IDataSource = {\n [key: string]: any;\n};\n\nexport interface ITableColumn {\n name: string;\n dataKey: string;\n sortable?: boolean;\n dataType?: DataType;\n dateFormat?: DateFormat;\n}\n\nexport interface IStatusOptions {\n id: string;\n title: string;\n color: string;\n backgroundColor: string;\n}\n\nexport enum DataType {\n Date = 'date',\n String = 'string',\n Label = 'label',\n Percentage = 'percentage',\n}\n\nexport enum DateFormat {\n Short = 'short',\n TimeAgo = 'timeAgo',\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { IDataSource } from '../../components/table/table.types';\n\n// TODO: Check type (backend could return a number)\ntype DataPropertyGetterType = string;\n\n@Pipe({\n name: 'dataPropertyGetter',\n})\nexport class DataPropertyGetterPipe<T extends IDataSource> implements PipeTransform {\n transform(object: T, keyName: string): DataPropertyGetterType {\n return this.getDeepVal(object, keyName);\n }\n\n private getDeepVal(obj: any, path: string): DataPropertyGetterType {\n if (typeof obj === 'undefined' || obj === null) {\n return '';\n }\n const splittedPath = path.split(/[\\.\\[\\]\\\"\\']{1,2}/);\n for (let i = 0, l = splittedPath.length; i < l; i++) {\n if (splittedPath[i] === '') {\n continue;\n }\n obj = obj[splittedPath[i]];\n if (typeof obj === 'undefined' || obj === null) {\n return '';\n }\n }\n return obj;\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { MatSort, Sort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { DataPropertyGetterPipe } from '../../shared/pipes/dataPropertyGetter';\nimport { DataType, DateFormat, IDataSource, IStatusOptions, ITableColumn } from './table.types';\n\n@Component({\n selector: 'ui-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent<T extends IDataSource> implements OnInit {\n // TODO: Some properties and methods are ignored on purpose because of a current issue with compodoc and angular 13\n // https://github.com/storybookjs/storybook/issues/16865\n // https://github.com/storybookjs/storybook/issues/17004\n\n /**\n * @ignore\n */\n readonly timeAgoOptions = {\n addSuffix: true,\n };\n\n /**\n * @ignore\n */\n dataSource = new MatTableDataSource<any>([]);\n\n /**\n * @ignore\n */\n displayedColumns: string[] = [];\n\n /**\n * @ignore\n */\n DataType = DataType;\n\n /**\n * @ignore\n */\n DateFormat = DateFormat;\n\n /**\n * @ignore\n */\n @ViewChild(MatSort, { static: true }) sort!: MatSort;\n\n /**\n * Data to be rendered\n *\n * @type {IDataSource}\n * @memberof TableComponent\n */\n @Input() set tableData(data: T[] | null) {\n if (data?.length) {\n this.setTableDataSource(data);\n }\n }\n\n /**\n * Data structure to select which columns should be rendered and their capabilities\n *\n * @type {ITableColumn}\n * @memberof TableComponent\n */\n @Input() tableColumns: ITableColumn[] = [];\n\n /**\n * @type {IStatusOptions}\n * @memberof TableComponent\n * @ignore\n */\n @Input() statusOptions: IStatusOptions[] = [];\n\n /**\n * @ignore\n */\n @Output() onSortEvent: EventEmitter<Sort> = new EventEmitter<Sort>();\n\n /**\n * @ignore\n */\n @Output() onRowClickEvent: EventEmitter<any> = new EventEmitter<any>();\n\n ngOnInit(): void {\n this.displayedColumns = this.tableColumns.map((tableColumn: ITableColumn) => tableColumn.name);\n }\n\n constructor(private dataPropertyGetterPipe: DataPropertyGetterPipe<T>) {}\n\n onSort(sortParams: Sort) {\n const column = this.tableColumns.find((column: ITableColumn) => column.name === sortParams.active);\n if (column?.dataKey) {\n sortParams.active = column?.dataKey;\n }\n this.onSortEvent.emit(sortParams);\n }\n\n onRowClick(rowParams: any) {\n this.onRowClickEvent.emit(rowParams);\n }\n\n getStatus(key: string) {\n return this.statusOptions.find(status => status.id === key);\n }\n\n /**\n * @ignore\n */\n private setTableDataSource(data: T[]) {\n this.dataSource = new MatTableDataSource<any>(data);\n this.dataSource.sortingDataAccessor = (item, property) => this.dataPropertyGetterPipe.transform(item, property);\n this.dataSource.sort = this.sort;\n }\n}\n","<table mat-table [dataSource]=\"dataSource\" matSort (matSortChange)=\"onSort($event)\">\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\n <ng-container *ngIf=\"tableColumn.sortable; else notSortable\">\n <th mat-header-cell *matHeaderCellDef=\"let element\" [mat-sort-header]=\"tableColumn.dataKey\" arrowPosition=\"after\">\n {{tableColumn.name | uppercase}}\n </th>\n </ng-container>\n <ng-template #notSortable>\n <th mat-header-cell *matHeaderCellDef>\n {{tableColumn.name | uppercase}}\n </th>\n </ng-template>\n <td mat-cell *matCellDef=\"let element\" (click)=\"onRowClick(element)\">\n <ng-container [ngSwitch]=\"tableColumn.dataType\">\n <ng-container *ngSwitchCase=\"DataType.String\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Date\">\n <span *ngIf=\"tableColumn.dateFormat === DateFormat.Short\">{{(element | dataPropertyGetter:\n tableColumn.dataKey) | dfnsParseIso | dfnsFormat: 'dd MMM yyyy'}}</span>\n <span *ngIf=\"tableColumn.dateFormat === DateFormat.TimeAgo\">{{(element | dataPropertyGetter:\n tableColumn.dataKey) | dfnsParseIso | dfnsFormatDistanceToNow: timeAgoOptions}}</span>\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Percentage\">\n {{element | dataPropertyGetter: tableColumn.dataKey}}%\n </ng-container>\n <ng-container *ngSwitchCase=\"DataType.Label\">\n <ng-container *ngTemplateOutlet=\"label; context: {label: getStatus(element | dataPropertyGetter: tableColumn.dataKey)}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n {{element | dataPropertyGetter: tableColumn.dataKey}}\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n</table>\n\n<ng-template #label let-label=\"label\">\n <span class=\"label\" [ngStyle]=\"{'background-color': label?.backgroundColor, 'color': label?.color}\">\n {{ label?.title }}\n </span>\n</ng-template>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\nimport { DateFnsModule } from 'ngx-date-fns';\nimport { DataPropertyGetterPipe } from '../../shared/pipes/dataPropertyGetter';\nimport { TableComponent } from './table.component';\n\n@NgModule({\n declarations: [TableComponent, DataPropertyGetterPipe],\n imports: [CommonModule, MatTableModule, MatSortModule, DateFnsModule],\n exports: [TableComponent],\n providers: [DataPropertyGetterPipe],\n})\nexport class TableComponentModule {}\n","// Navbar Component\nexport * from './components/navbar/navbar.component';\nexport * from './components/navbar/navbar.component.module';\nexport * from './components/navbar/navbar.types';\n// Paginator Component\nexport * from './components/paginator/paginator.component';\nexport * from './components/paginator/paginator.component.module';\n// Table Component\nexport * from './components/table/table.component';\nexport * from './components/table/table.component.module';\nexport * from './components/table/table.types';\n// Pipes\nexport * from './shared/pipes/dataPropertyGetter';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1","i1.DataPropertyGetterPipe","i3"],"mappings":";;;;;;;;;;;;;;;;;;;MAUa,eAAe,CAAA;AAmC1B,IAAA,WAAA,GAAA;;;;AA9BA;;;;;;AAMG;QACM,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAE/B;;;;;AAKG;QACM,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;AAE3B;;;;;AAKG;QACM,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;AAE3B;;AAEG;AACO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slint --fix",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"@angular/platform-browser-dynamic": "^13.3.4",
|
|
28
28
|
"@angular/router": "^13.3.4",
|
|
29
29
|
"rxjs": "^7.5.5",
|
|
30
|
-
"zone.js": "^0.11.5"
|
|
30
|
+
"zone.js": "^0.11.5",
|
|
31
|
+
"date-fns": "^2.28.0",
|
|
32
|
+
"ngx-date-fns": "^9.0.0"
|
|
31
33
|
},
|
|
32
34
|
"module": "fesm2015/testgorilla-tgo-ui.mjs",
|
|
33
35
|
"es2020": "fesm2020/testgorilla-tgo-ui.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export * from './components/
|
|
1
|
+
export * from './components/navbar/navbar.component';
|
|
2
|
+
export * from './components/navbar/navbar.component.module';
|
|
3
|
+
export * from './components/navbar/navbar.types';
|
|
4
|
+
export * from './components/paginator/paginator.component';
|
|
5
|
+
export * from './components/paginator/paginator.component.module';
|
|
2
6
|
export * from './components/table/table.component';
|
|
7
|
+
export * from './components/table/table.component.module';
|
|
3
8
|
export * from './components/table/table.types';
|
|
9
|
+
export * from './shared/pipes/dataPropertyGetter';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { IDataSource } from '
|
|
2
|
+
import { IDataSource } from '../../components/table/table.types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
declare type DataPropertyGetterType = string
|
|
5
|
-
export declare class DataPropertyGetterPipe implements PipeTransform {
|
|
6
|
-
transform(object:
|
|
4
|
+
declare type DataPropertyGetterType = string;
|
|
5
|
+
export declare class DataPropertyGetterPipe<T extends IDataSource> implements PipeTransform {
|
|
6
|
+
transform(object: T, keyName: string): DataPropertyGetterType;
|
|
7
7
|
private getDeepVal;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DataPropertyGetterPipe
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<DataPropertyGetterPipe
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataPropertyGetterPipe<any>, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DataPropertyGetterPipe<any>, "dataPropertyGetter">;
|
|
10
10
|
}
|
|
11
11
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 390"><defs><style>.cls-1{fill:#ccc;}.cls-2{fill:#fff;}</style></defs><title>Artboard 1</title><path class="cls-1" d="M191.72,317.52c0,4.56-22.8,8.25-50.93,8.25s-50.92-3.69-50.92-8.25,22.8-8.26,50.92-8.26S191.72,313,191.72,317.52Z"/><path d="M87.79,231.82V95.75L89,94.27c4.75-6,25.93-14.64,51.82-14.64s47.06,8.65,51.81,14.64l1.18,1.48V231.82l-53,56.27Z"/><path class="cls-2" d="M174.11,180.39c6.32-5.18,12.78-14.58,12.78-31.37,0-13.41-7-13.58-16.33-13.58H111c-9.34,0-16.33.17-16.33,13.58,0,16.79,6.47,26.19,12.79,31.37C98.53,191,93.23,204.27,93.23,217v19.68l47.56,49.25,47.55-49.25V217C188.34,204.27,183,191,174.11,180.39Z"/><polygon points="120.47 264.87 140.79 285.91 161.1 264.87 120.47 264.87"/><path d="M181.22,79.16c-11.85-4.47-26.2-6.93-40.43-6.93s-28.58,2.46-40.43,6.93c-9.11,3.44-20,9.29-20,17.64V232.21a6.44,6.44,0,0,0,1.75,4.4l54,57.32a6.42,6.42,0,0,0,9.35,0l54-57.32a6.44,6.44,0,0,0,1.75-4.4V96.8C201.19,88.45,190.33,82.6,181.22,79.16Zm7.12,150.5-47.55,50.5-47.56-50.5v-132c3.13-4,22.22-12.59,47.56-12.59s44.42,8.64,47.55,12.59Z"/><path d="M140.79,239.81a258.93,258.93,0,0,1-55.07-5.95,5.14,5.14,0,0,1,2.18-10,247.55,247.55,0,0,0,105.77,0,5.14,5.14,0,1,1,2.18,10A258.91,258.91,0,0,1,140.79,239.81Z"/><path d="M138.23,183.26a5.79,5.79,0,1,1-5.79-5.79A5.79,5.79,0,0,1,138.23,183.26Z"/><path d="M154.92,183.26a5.79,5.79,0,1,1-5.79-5.79A5.79,5.79,0,0,1,154.92,183.26Z"/><path d="M131.67,163.13a5.08,5.08,0,0,1-1.94-.38,21.41,21.41,0,0,0-16.84,0,5.14,5.14,0,1,1-3.88-9.51,31.6,31.6,0,0,1,24.59,0,5.13,5.13,0,0,1-1.93,9.89Z"/><path d="M170.62,163.13a5.06,5.06,0,0,1-1.93-.38,21.44,21.44,0,0,0-16.85,0,5.13,5.13,0,1,1-3.87-9.51,31.6,31.6,0,0,1,24.59,0,5.13,5.13,0,0,1-1.94,9.89Z"/><path d="M301.79,160.48H275.35V248a2.58,2.58,0,0,1-2.44,2.71h-7.46A2.58,2.58,0,0,1,263,248V160.48H236.56c-1.49,0-2.71-.67-2.71-2.17v-6a2.58,2.58,0,0,1,2.71-2.44h65.23a2.39,2.39,0,0,1,2.58,2.44v6C304.37,159.67,303.28,160.48,301.79,160.48Z"/><path d="M373.26,217.17H327.82v1.9c0,16.14,6.38,22.11,18.86,22.11a185.54,185.54,0,0,0,24.13-1.49h.68a1.92,1.92,0,0,1,2.17,1.89v4.62c0,1.76-.54,2.71-2.71,3.12a123.13,123.13,0,0,1-24.27,2.3c-15.6,0-30.79-7.33-30.79-32.55V206.86c0-19.39,10.71-31.73,30.11-31.73,19.8,0,29.83,12.48,29.83,31.73v7.33C375.83,216,374.88,217.17,373.26,217.17Zm-9.5-10.31c0-15.32-5.83-21.29-17.76-21.29-11.67,0-18.18,6.65-18.18,21.29v1.23h35.94Z"/><path d="M413.93,251.62c-5,0-14.78-.41-21.43-2-1.76-.4-2.84-1.21-2.84-2.71v-4.75a2.2,2.2,0,0,1,2.44-2h.54c6.51.82,16.41,1.49,21.29,1.49,8.82,0,13.43-2.3,13.43-9.62,0-4.07-2.44-6.65-10.17-11.26l-13.7-8.14c-8.27-5-13.83-10.85-13.83-19.39,0-14.11,10.58-18,24.55-18a127.53,127.53,0,0,1,21.15,1.76c1.76.28,2.58,1.22,2.58,2.72v4.47a2.08,2.08,0,0,1-2.31,2.31h-.41c-4.74-.41-13.42-1.09-21-1.09s-12.62.95-12.62,7.87c0,4.07,3.12,6.64,9.36,10.3l13.43,8c11.25,6.64,14.91,12.47,14.91,20.48C439.29,245.79,429.12,251.62,413.93,251.62Z"/><path d="M492.45,250.94a65.47,65.47,0,0,1-8.82.68c-12.47,0-18.44-3.25-18.44-18.17V186.12L452,184.62c-1.49-.13-2.57-.94-2.57-2.44v-3.66a2.38,2.38,0,0,1,2.57-2.44h13.16V162.79a2.76,2.76,0,0,1,2.44-2.71l7.05-1.09h.41a2.16,2.16,0,0,1,2,2.31v14.78h14.65a2.72,2.72,0,0,1,2.71,2.71v4.61a2.73,2.73,0,0,1-2.71,2.72H477.12v47.33c0,7.46,1.9,8.54,7.33,8.54H492c1.9,0,2.85.54,2.85,1.9v4.74C494.89,249.86,494.21,250.67,492.45,250.94Z"/><path d="M585.31,170h-.41c-6.51-.27-16.68-1.09-28.21-1.09-11,0-17.77,5.29-17.77,23.06v17c0,18.72,8.55,23.06,15.19,23.06,3.8,0,7.19-.14,10.45-.41V200.36a2.61,2.61,0,0,1,2.57-2.72h17.36a2.74,2.74,0,0,1,2.72,2.72v45.56c0,1.9-.68,2.71-2.72,3.12a147.18,147.18,0,0,1-30.38,2.85c-15.45,0-38.65-8.81-38.65-43.13V192c0-34.59,21.57-43.27,41.23-43.27A128.12,128.12,0,0,1,585,151.81c1.35.27,2.3.81,2.3,2v14.38C587.34,169.71,586.53,170,585.31,170Z"/><path d="M636.16,251.89c-22,0-34-13.7-34-35.26v-9.49c0-21.57,12.06-35.26,34-35.26s33.9,13.69,33.9,35.26v9.49C670.06,238.19,658.12,251.89,636.16,251.89Zm12.07-44.75c0-11-4.21-16.55-12.07-16.55S624,196.15,624,207.14v9.49c0,11,4.34,16.68,12.21,16.68s12.07-5.69,12.07-16.68Z"/><path d="M724.7,190.05h-1.08a36.55,36.55,0,0,0-17.5,4.74v53a2.83,2.83,0,0,1-2.71,2.85H687a3,3,0,0,1-2.84-2.85V175.67a2.72,2.72,0,0,1,2.71-2.71H703a2.72,2.72,0,0,1,2.71,2.71v2.72A29,29,0,0,1,724,171.88a2.72,2.72,0,0,1,2.71,2.71v12.88C726.74,188.69,725.93,190.05,724.7,190.05Z"/><path d="M758.2,164.15H740.57a2.72,2.72,0,0,1-2.71-2.72V148.82a2.71,2.71,0,0,1,2.71-2.71H758.2a2.72,2.72,0,0,1,2.71,2.71v12.61A2.73,2.73,0,0,1,758.2,164.15Zm-.55,86.52H741.11A2.72,2.72,0,0,1,738.4,248V175.67a2.72,2.72,0,0,1,2.71-2.71h16.54a2.72,2.72,0,0,1,2.72,2.71V248A2.72,2.72,0,0,1,757.65,250.67Z"/><path d="M796.57,250.67H780a3,3,0,0,1-2.85-2.85V149.36a2.84,2.84,0,0,1,2.85-2.71h16.54a2.6,2.6,0,0,1,2.58,2.71v98.46A2.72,2.72,0,0,1,796.57,250.67Z"/><path d="M834.81,250.67H818.27a3,3,0,0,1-2.85-2.85V149.36a2.84,2.84,0,0,1,2.85-2.71h16.54a2.6,2.6,0,0,1,2.58,2.71v98.46A2.72,2.72,0,0,1,834.81,250.67Z"/><path d="M910.89,250.67H895.7A2.72,2.72,0,0,1,893,248v-2.17a29.93,29.93,0,0,1-18.85,6.1c-11.8,0-23.19-5.69-23.19-23.33v-1.22c0-15.86,10.17-22.92,33.36-22.92h7.33v-4.88c0-7.73-3.8-9.36-10.18-9.36-8.68,0-18.31.55-22.51.95h-.68a2.21,2.21,0,0,1-2.44-2.44v-11a3,3,0,0,1,2.58-3,109.33,109.33,0,0,1,23.46-2.84c19.53,0,31.74,7.86,31.74,27.66V248A2.73,2.73,0,0,1,910.89,250.67ZM892,217.44h-7.73c-9.49,0-11.93,3.26-11.93,9.9v1.22c0,5.7,2.85,6.79,8.54,6.79a25.05,25.05,0,0,0,11.12-3Z"/></svg>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* global */
|
|
2
|
+
$background: #ffffff;
|
package/src/theme/base.scss
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
@use "palette.scss"
|
|
1
|
+
@use "palette.scss" as *;
|
|
2
|
+
@use "variables.scss" as *;
|
|
2
3
|
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap");
|
|
4
|
+
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
|
|
3
5
|
|
|
4
6
|
body {
|
|
5
7
|
margin: 0;
|
|
6
|
-
background:
|
|
8
|
+
background: $background;
|
|
7
9
|
font-size: 14px;
|
|
8
10
|
color: #888888;
|
|
9
11
|
|