@ebuilding/bi 2.3.9
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/LICENSE +0 -0
- package/README.md +0 -0
- package/basic/index.d.ts +1 -0
- package/basic/src/components/basic.service.d.ts +19 -0
- package/basic/src/components/card1/index.d.ts +19 -0
- package/basic/src/components/card2/index.d.ts +19 -0
- package/basic/src/components/card3/index.d.ts +19 -0
- package/basic/src/components/card4/index.d.ts +19 -0
- package/basic/src/components/image/index.d.ts +17 -0
- package/basic/src/components/line1/index.d.ts +13 -0
- package/basic/src/components/line2/index.d.ts +13 -0
- package/basic/src/components/number/index.d.ts +18 -0
- package/basic/src/components/table/index.d.ts +18 -0
- package/basic/src/components/text/index.d.ts +16 -0
- package/basic/src/components/time1/index.d.ts +22 -0
- package/basic/src/components/time2/index.d.ts +23 -0
- package/basic/src/default/index.d.ts +20 -0
- package/basic/src/index.module.d.ts +19 -0
- package/basic/src/public_api.d.ts +2 -0
- package/border/index.d.ts +1 -0
- package/border/src/components/1/index.d.ts +17 -0
- package/border/src/components/10/index.d.ts +16 -0
- package/border/src/components/11/index.d.ts +20 -0
- package/border/src/components/12/index.d.ts +18 -0
- package/border/src/components/2/index.d.ts +19 -0
- package/border/src/components/3/index.d.ts +21 -0
- package/border/src/components/4/index.d.ts +27 -0
- package/border/src/components/5/index.d.ts +23 -0
- package/border/src/components/6/index.d.ts +29 -0
- package/border/src/components/7/index.d.ts +24 -0
- package/border/src/components/8/index.d.ts +18 -0
- package/border/src/components/9/index.d.ts +17 -0
- package/border/src/components/basic.service.d.ts +28 -0
- package/border/src/default/index.d.ts +21 -0
- package/border/src/index.module.d.ts +19 -0
- package/border/src/public_api.d.ts +2 -0
- package/decorator/index.d.ts +1 -0
- package/decorator/src/components/1/index.d.ts +15 -0
- package/decorator/src/components/10/index.d.ts +19 -0
- package/decorator/src/components/11/index.d.ts +15 -0
- package/decorator/src/components/12/index.d.ts +15 -0
- package/decorator/src/components/13/index.d.ts +22 -0
- package/decorator/src/components/2/index.d.ts +15 -0
- package/decorator/src/components/3/index.d.ts +15 -0
- package/decorator/src/components/4/index.d.ts +15 -0
- package/decorator/src/components/5/index.d.ts +15 -0
- package/decorator/src/components/6/index.d.ts +15 -0
- package/decorator/src/components/7/index.d.ts +18 -0
- package/decorator/src/components/8/index.d.ts +15 -0
- package/decorator/src/components/9/index.d.ts +19 -0
- package/decorator/src/components/basic.service.d.ts +19 -0
- package/decorator/src/default/index.d.ts +21 -0
- package/decorator/src/index.module.d.ts +20 -0
- package/decorator/src/public_api.d.ts +2 -0
- package/fesm2022/bi.basic.mjs +888 -0
- package/fesm2022/bi.basic.mjs.map +1 -0
- package/fesm2022/bi.border.mjs +1383 -0
- package/fesm2022/bi.border.mjs.map +1 -0
- package/fesm2022/bi.decorator.mjs +1340 -0
- package/fesm2022/bi.decorator.mjs.map +1 -0
- package/fesm2022/ebuilding-bi.mjs +3580 -0
- package/fesm2022/ebuilding-bi.mjs.map +1 -0
- package/index.d.ts +3 -0
- package/package.json +32 -0
|
@@ -0,0 +1,888 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Directive, Component, ViewContainerRef, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule, DecimalPipe, DatePipe } from '@angular/common';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i3 from '@ebuilding/base/shared.pipe';
|
|
7
|
+
import { GramPipeModule } from '@ebuilding/base/shared.pipe';
|
|
8
|
+
import * as i1 from '@ebuilding/base/shared.srv/global.event';
|
|
9
|
+
|
|
10
|
+
class BasicService {
|
|
11
|
+
globalSrv;
|
|
12
|
+
_data = null;
|
|
13
|
+
transform = null;
|
|
14
|
+
width = 0;
|
|
15
|
+
height = 0;
|
|
16
|
+
set data(value) {
|
|
17
|
+
this._data = value;
|
|
18
|
+
this.initPageData(value);
|
|
19
|
+
}
|
|
20
|
+
get data() {
|
|
21
|
+
return this._data;
|
|
22
|
+
}
|
|
23
|
+
set rd(value) {
|
|
24
|
+
if (value != undefined && value != null) {
|
|
25
|
+
this.initPageData(this.data);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
constructor(globalSrv) {
|
|
29
|
+
this.globalSrv = globalSrv;
|
|
30
|
+
}
|
|
31
|
+
ngOnDestroy() {
|
|
32
|
+
}
|
|
33
|
+
initPageData(value) {
|
|
34
|
+
if (value) {
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
initStyle() {
|
|
38
|
+
let template = '';
|
|
39
|
+
if (this.data && this.data.font) {
|
|
40
|
+
if (this.data.font.type) {
|
|
41
|
+
template = `${template} font-style: ${this.data.font.type};`;
|
|
42
|
+
}
|
|
43
|
+
if (this.data.font.spacing) {
|
|
44
|
+
template = `${template} letter-spacing: ${this.data.font.spacing}px;`;
|
|
45
|
+
}
|
|
46
|
+
if (this.data.font.size) {
|
|
47
|
+
template = `${template} font-size: ${this.data.font.size}px;`;
|
|
48
|
+
}
|
|
49
|
+
if (this.data.font.weight) {
|
|
50
|
+
template = `${template} font-weight: ${this.data.font.weight};`;
|
|
51
|
+
}
|
|
52
|
+
if (this.data.font.align) {
|
|
53
|
+
template = `${template} text-align: ${this.data.font.align};`;
|
|
54
|
+
}
|
|
55
|
+
if (this.data.font.colorType == 'single') {
|
|
56
|
+
template = `${template} color: ${this.data.font.color}; `;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
template = `${template} background: linear-gradient(${this.data.font.direction},${this.data.font.color0},${this.data.font.color1});-webkit-background-clip: text !important; -webkit-text-fill-color: transparent;`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return template;
|
|
63
|
+
}
|
|
64
|
+
getPageValue() {
|
|
65
|
+
let value = "";
|
|
66
|
+
if (this.data.source.type == 'dynamic') {
|
|
67
|
+
if (this.data?.source?.value != undefined && this.data?.source?.value != null && this.data?.source?.value != "") {
|
|
68
|
+
value = this.data?.source?.value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (this.data?.source?.staticValue != undefined && this.data?.source?.staticValue != null && this.data?.source?.staticValue != "") {
|
|
73
|
+
value = this.data?.source?.staticValue;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (value == undefined || value == null) {
|
|
77
|
+
value = "";
|
|
78
|
+
}
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
82
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: BasicService, isStandalone: true, inputs: { data: "data", rd: "rd" }, ngImport: i0 });
|
|
83
|
+
}
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicService, decorators: [{
|
|
85
|
+
type: Directive
|
|
86
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }], propDecorators: { data: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], rd: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}] } });
|
|
91
|
+
|
|
92
|
+
class BasicTextComponent extends BasicService {
|
|
93
|
+
globalSrv;
|
|
94
|
+
width = 200;
|
|
95
|
+
height = 60;
|
|
96
|
+
svgTemplate = ``;
|
|
97
|
+
constructor(globalSrv) {
|
|
98
|
+
super(globalSrv);
|
|
99
|
+
this.globalSrv = globalSrv;
|
|
100
|
+
}
|
|
101
|
+
ngOnInit() {
|
|
102
|
+
}
|
|
103
|
+
initPageData(value) {
|
|
104
|
+
this.svgTemplate = this.initTemplate();
|
|
105
|
+
}
|
|
106
|
+
initTemplate() {
|
|
107
|
+
let value = this.getPageValue();
|
|
108
|
+
let template = `<div style="${this.initStyle()}">${value}</div>`;
|
|
109
|
+
return template;
|
|
110
|
+
}
|
|
111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTextComponent, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicTextComponent, isStandalone: true, selector: "basic-text", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"content-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .content-box{width:100%;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
113
|
+
}
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTextComponent, decorators: [{
|
|
115
|
+
type: Component,
|
|
116
|
+
args: [{ selector: 'basic-text', imports: [
|
|
117
|
+
CommonModule,
|
|
118
|
+
FormsModule, ReactiveFormsModule,
|
|
119
|
+
GramPipeModule
|
|
120
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"content-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .content-box{width:100%;text-align:center}\n"] }]
|
|
121
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
122
|
+
|
|
123
|
+
class BasicNumberComponent extends BasicService {
|
|
124
|
+
decimalPipe;
|
|
125
|
+
globalSrv;
|
|
126
|
+
width = 200;
|
|
127
|
+
height = 60;
|
|
128
|
+
svgTemplate = ``;
|
|
129
|
+
constructor(decimalPipe, globalSrv) {
|
|
130
|
+
super(globalSrv);
|
|
131
|
+
this.decimalPipe = decimalPipe;
|
|
132
|
+
this.globalSrv = globalSrv;
|
|
133
|
+
}
|
|
134
|
+
ngOnInit() {
|
|
135
|
+
}
|
|
136
|
+
initPageData(value) {
|
|
137
|
+
this.svgTemplate = this.initTemplate();
|
|
138
|
+
}
|
|
139
|
+
initTemplate() {
|
|
140
|
+
let value = this.getPageValue();
|
|
141
|
+
if (value != undefined && value != null && value != "") {
|
|
142
|
+
if (this.data?.font?.thousands == true) {
|
|
143
|
+
let formattedNumber = this.decimalPipe.transform(value, '1.0-0');
|
|
144
|
+
return `<div style="${this.initStyle()}">${formattedNumber}</div>`;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
return `<div style="${this.initStyle()}">${value}</div>`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicNumberComponent, deps: [{ token: i2.DecimalPipe }, { token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
155
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicNumberComponent, isStandalone: true, selector: "basic-number", providers: [DecimalPipe], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-box{width:100%;text-align:center;font-family:ds-digitalbold}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
156
|
+
}
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicNumberComponent, decorators: [{
|
|
158
|
+
type: Component,
|
|
159
|
+
args: [{ selector: 'basic-number', imports: [
|
|
160
|
+
CommonModule,
|
|
161
|
+
FormsModule, ReactiveFormsModule,
|
|
162
|
+
GramPipeModule
|
|
163
|
+
], providers: [DecimalPipe], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-box{width:100%;text-align:center;font-family:ds-digitalbold}\n"] }]
|
|
164
|
+
}], ctorParameters: () => [{ type: i2.DecimalPipe }, { type: i1.GramGlobalService }] });
|
|
165
|
+
|
|
166
|
+
class BasicLine1Component extends BasicService {
|
|
167
|
+
globalSrv;
|
|
168
|
+
width = 300;
|
|
169
|
+
height = 40;
|
|
170
|
+
constructor(globalSrv) {
|
|
171
|
+
super(globalSrv);
|
|
172
|
+
this.globalSrv = globalSrv;
|
|
173
|
+
}
|
|
174
|
+
ngOnInit() {
|
|
175
|
+
}
|
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicLine1Component, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
177
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicLine1Component, isStandalone: true, selector: "basic-line1", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div class=\"custom-border-box\"\r\n style=\"height: 4px; opacity: 100; background-image: linear-gradient(to right, rgb(131, 191, 246), rgb(24, 141, 240));\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep .control-box{width:100%;text-align:center;-webkit-background-clip:text;-webkit-text-fill-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }] });
|
|
178
|
+
}
|
|
179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicLine1Component, decorators: [{
|
|
180
|
+
type: Component,
|
|
181
|
+
args: [{ selector: 'basic-line1', imports: [
|
|
182
|
+
CommonModule,
|
|
183
|
+
FormsModule, ReactiveFormsModule,
|
|
184
|
+
GramPipeModule
|
|
185
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div class=\"custom-border-box\"\r\n style=\"height: 4px; opacity: 100; background-image: linear-gradient(to right, rgb(131, 191, 246), rgb(24, 141, 240));\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep .control-box{width:100%;text-align:center;-webkit-background-clip:text;-webkit-text-fill-color:transparent}\n"] }]
|
|
186
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
187
|
+
|
|
188
|
+
class BasicLine2Component extends BasicService {
|
|
189
|
+
globalSrv;
|
|
190
|
+
width = 40;
|
|
191
|
+
height = 300;
|
|
192
|
+
constructor(globalSrv) {
|
|
193
|
+
super(globalSrv);
|
|
194
|
+
this.globalSrv = globalSrv;
|
|
195
|
+
}
|
|
196
|
+
ngOnInit() {
|
|
197
|
+
}
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicLine2Component, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicLine2Component, isStandalone: true, selector: "basic-line2", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div class=\"custom-border-box\"\r\n style=\"width: 4px; opacity: 100; background-image: linear-gradient(rgb(131, 191, 246), rgb(24, 141, 240));\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep .control-box{width:100%;text-align:center;-webkit-background-clip:text;-webkit-text-fill-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }] });
|
|
200
|
+
}
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicLine2Component, decorators: [{
|
|
202
|
+
type: Component,
|
|
203
|
+
args: [{ selector: 'basic-line2', imports: [
|
|
204
|
+
CommonModule,
|
|
205
|
+
FormsModule, ReactiveFormsModule,
|
|
206
|
+
GramPipeModule
|
|
207
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div class=\"custom-border-box\"\r\n style=\"width: 4px; opacity: 100; background-image: linear-gradient(rgb(131, 191, 246), rgb(24, 141, 240));\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep .control-box{width:100%;text-align:center;-webkit-background-clip:text;-webkit-text-fill-color:transparent}\n"] }]
|
|
208
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
209
|
+
|
|
210
|
+
class BasicCardComponent1 extends BasicService {
|
|
211
|
+
globalSrv;
|
|
212
|
+
width = 300;
|
|
213
|
+
height = 120;
|
|
214
|
+
svgTemplate = ``;
|
|
215
|
+
constructor(globalSrv) {
|
|
216
|
+
super(globalSrv);
|
|
217
|
+
this.globalSrv = globalSrv;
|
|
218
|
+
}
|
|
219
|
+
ngOnInit() {
|
|
220
|
+
}
|
|
221
|
+
initPageData(value) {
|
|
222
|
+
this.svgTemplate = this.initTemplate();
|
|
223
|
+
}
|
|
224
|
+
initTemplate() {
|
|
225
|
+
let value = this.getPageValue();
|
|
226
|
+
let template = `
|
|
227
|
+
<div class="info-box" style="${this.initBgStyle()}">
|
|
228
|
+
<div class="info-value" style="${this.initValueStyle()}">${value}</div>
|
|
229
|
+
<div class="info-second" style="${this.initSecondStyle()}">${this.data.source?.secondValue}</div>
|
|
230
|
+
</div>
|
|
231
|
+
`;
|
|
232
|
+
return template;
|
|
233
|
+
}
|
|
234
|
+
initBgStyle() {
|
|
235
|
+
let template = '';
|
|
236
|
+
if (this.data && this.data.font) {
|
|
237
|
+
if (this.data.font?.bgColorType == 'single') {
|
|
238
|
+
template = `background: ${this.data.font.color};`;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
template = `background-image: linear-gradient(${this.data.font?.bgDirection},${this.data.font?.bgColor0},${this.data.font?.bgColor1});`;
|
|
242
|
+
}
|
|
243
|
+
template = `${template} width:${this.data.width}px;height:${this.data.height}px;display: flex;`;
|
|
244
|
+
}
|
|
245
|
+
return template;
|
|
246
|
+
}
|
|
247
|
+
initValueStyle() {
|
|
248
|
+
let template = '';
|
|
249
|
+
if (this.data && this.data.font) {
|
|
250
|
+
if (this.data.font?.type) {
|
|
251
|
+
template = `${template} font-style: ${this.data.font.type};`;
|
|
252
|
+
}
|
|
253
|
+
if (this.data.font?.size) {
|
|
254
|
+
template = `${template} font-size: ${this.data.font.size}px;`;
|
|
255
|
+
}
|
|
256
|
+
if (this.data.font?.weight) {
|
|
257
|
+
template = `${template} font-weight: ${this.data.font.weight};`;
|
|
258
|
+
}
|
|
259
|
+
if (this.data.font?.color) {
|
|
260
|
+
template = `${template} color: ${this.data.font.color};`;
|
|
261
|
+
}
|
|
262
|
+
if (this.data.font?.lineDistance) {
|
|
263
|
+
template = `${template} margin-bottom: ${this.data.font.lineDistance}px;`;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return template;
|
|
267
|
+
}
|
|
268
|
+
initSecondStyle() {
|
|
269
|
+
let template = '';
|
|
270
|
+
if (this.data && this.data.font) {
|
|
271
|
+
if (this.data.font?.secondType) {
|
|
272
|
+
template = `${template} font-style: ${this.data.font.secondType};`;
|
|
273
|
+
}
|
|
274
|
+
if (this.data.font?.secondSize) {
|
|
275
|
+
template = `${template} font-size: ${this.data.font.secondSize}px;`;
|
|
276
|
+
}
|
|
277
|
+
if (this.data.font?.secondWeight) {
|
|
278
|
+
template = `${template} font-weight: ${this.data.font.secondWeight};`;
|
|
279
|
+
}
|
|
280
|
+
if (this.data.font?.secondColor) {
|
|
281
|
+
template = `${template} color: ${this.data.font.secondColor};`;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return template;
|
|
285
|
+
}
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent1, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
287
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicCardComponent1, isStandalone: true, selector: "basic-card1", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex:1;width:100%;height:100%;justify-content:center;flex-direction:column;text-align:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
288
|
+
}
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent1, decorators: [{
|
|
290
|
+
type: Component,
|
|
291
|
+
args: [{ selector: 'basic-card1', imports: [
|
|
292
|
+
CommonModule,
|
|
293
|
+
FormsModule, ReactiveFormsModule,
|
|
294
|
+
GramPipeModule
|
|
295
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex:1;width:100%;height:100%;justify-content:center;flex-direction:column;text-align:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}\n"] }]
|
|
296
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
297
|
+
|
|
298
|
+
class BasicCardComponent2 extends BasicService {
|
|
299
|
+
globalSrv;
|
|
300
|
+
width = 300;
|
|
301
|
+
height = 120;
|
|
302
|
+
svgTemplate = ``;
|
|
303
|
+
constructor(globalSrv) {
|
|
304
|
+
super(globalSrv);
|
|
305
|
+
this.globalSrv = globalSrv;
|
|
306
|
+
}
|
|
307
|
+
ngOnInit() {
|
|
308
|
+
}
|
|
309
|
+
initPageData(value) {
|
|
310
|
+
this.svgTemplate = this.initTemplate();
|
|
311
|
+
}
|
|
312
|
+
initTemplate() {
|
|
313
|
+
let value = this.getPageValue();
|
|
314
|
+
let template = `
|
|
315
|
+
<div class="info-box" style="${this.initBgStyle()}">
|
|
316
|
+
<div class="info-second" style="${this.initSecondStyle()}">${this.data.source?.secondValue}</div>
|
|
317
|
+
<div class="info-value" style="${this.initValueStyle()}">${value}</div>
|
|
318
|
+
</div>
|
|
319
|
+
`;
|
|
320
|
+
return template;
|
|
321
|
+
}
|
|
322
|
+
initBgStyle() {
|
|
323
|
+
let template = '';
|
|
324
|
+
if (this.data && this.data.font) {
|
|
325
|
+
if (this.data.font?.bgColorType == 'single') {
|
|
326
|
+
template = `background: ${this.data.font.color};`;
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
template = `background-image: linear-gradient(${this.data.font?.bgDirection},${this.data.font?.bgColor0},${this.data.font?.bgColor1});`;
|
|
330
|
+
}
|
|
331
|
+
template = `${template} width:${this.data.width}px;height:${this.data.height}px;display: flex;`;
|
|
332
|
+
}
|
|
333
|
+
return template;
|
|
334
|
+
}
|
|
335
|
+
initValueStyle() {
|
|
336
|
+
let template = '';
|
|
337
|
+
if (this.data && this.data.font) {
|
|
338
|
+
if (this.data.font?.type) {
|
|
339
|
+
template = `${template} font-style: ${this.data.font.type};`;
|
|
340
|
+
}
|
|
341
|
+
if (this.data.font?.size) {
|
|
342
|
+
template = `${template} font-size: ${this.data.font.size}px;`;
|
|
343
|
+
}
|
|
344
|
+
if (this.data.font?.weight) {
|
|
345
|
+
template = `${template} font-weight: ${this.data.font.weight};`;
|
|
346
|
+
}
|
|
347
|
+
if (this.data.font?.color) {
|
|
348
|
+
template = `${template} color: ${this.data.font.color};`;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return template;
|
|
352
|
+
}
|
|
353
|
+
initSecondStyle() {
|
|
354
|
+
let template = '';
|
|
355
|
+
if (this.data && this.data.font) {
|
|
356
|
+
if (this.data.font?.secondType) {
|
|
357
|
+
template = `${template} font-style: ${this.data.font.secondType};`;
|
|
358
|
+
}
|
|
359
|
+
if (this.data.font?.secondSize) {
|
|
360
|
+
template = `${template} font-size: ${this.data.font.secondSize}px;`;
|
|
361
|
+
}
|
|
362
|
+
if (this.data.font?.secondWeight) {
|
|
363
|
+
template = `${template} font-weight: ${this.data.font.secondWeight};`;
|
|
364
|
+
}
|
|
365
|
+
if (this.data.font?.secondColor) {
|
|
366
|
+
template = `${template} color: ${this.data.font.secondColor};`;
|
|
367
|
+
}
|
|
368
|
+
if (this.data.font?.lineDistance) {
|
|
369
|
+
template = `${template} margin-bottom: ${this.data.font.lineDistance}px;`;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return template;
|
|
373
|
+
}
|
|
374
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent2, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
375
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicCardComponent2, isStandalone: true, selector: "basic-card2", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex:1;width:100%;height:100%;justify-content:center;flex-direction:column;text-align:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}:host ::ng-deep .info-second{padding:15px 0 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
376
|
+
}
|
|
377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent2, decorators: [{
|
|
378
|
+
type: Component,
|
|
379
|
+
args: [{ selector: 'basic-card2', imports: [
|
|
380
|
+
CommonModule,
|
|
381
|
+
FormsModule, ReactiveFormsModule,
|
|
382
|
+
GramPipeModule
|
|
383
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex:1;width:100%;height:100%;justify-content:center;flex-direction:column;text-align:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}:host ::ng-deep .info-second{padding:15px 0 0}\n"] }]
|
|
384
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
385
|
+
|
|
386
|
+
class BasicCardComponent3 extends BasicService {
|
|
387
|
+
globalSrv;
|
|
388
|
+
width = 300;
|
|
389
|
+
height = 120;
|
|
390
|
+
svgTemplate = ``;
|
|
391
|
+
constructor(globalSrv) {
|
|
392
|
+
super(globalSrv);
|
|
393
|
+
this.globalSrv = globalSrv;
|
|
394
|
+
}
|
|
395
|
+
ngOnInit() {
|
|
396
|
+
}
|
|
397
|
+
initPageData(value) {
|
|
398
|
+
this.svgTemplate = this.initTemplate();
|
|
399
|
+
}
|
|
400
|
+
initTemplate() {
|
|
401
|
+
let value = this.getPageValue();
|
|
402
|
+
let template = `
|
|
403
|
+
<div class="info-box" style="${this.initBgStyle()}">
|
|
404
|
+
<div class="info-box-left">
|
|
405
|
+
<div style="width: 60px; height: 60px;">
|
|
406
|
+
<img src="/assets/images/design/basic/cardicon.png" style="object-fit: contain;">
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
<div class="info-box-right">
|
|
410
|
+
<div class="info-value" style="${this.initValueStyle()}">${value}</div>
|
|
411
|
+
<div class="info-second" style="${this.initSecondStyle()}">${this.data.source?.secondValue}</div>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
`;
|
|
415
|
+
return template;
|
|
416
|
+
}
|
|
417
|
+
initBgStyle() {
|
|
418
|
+
let template = '';
|
|
419
|
+
if (this.data && this.data.font) {
|
|
420
|
+
if (this.data.font?.bgColorType == 'single') {
|
|
421
|
+
template = `background: ${this.data.font.color};`;
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
template = `background-image: linear-gradient(${this.data.font?.bgDirection},${this.data.font?.bgColor0},${this.data.font?.bgColor1});`;
|
|
425
|
+
}
|
|
426
|
+
template = `${template} width:${this.data.width}px;height:${this.data.height}px;display: flex;`;
|
|
427
|
+
}
|
|
428
|
+
return template;
|
|
429
|
+
}
|
|
430
|
+
initValueStyle() {
|
|
431
|
+
let template = '';
|
|
432
|
+
if (this.data && this.data.font) {
|
|
433
|
+
if (this.data.font?.type) {
|
|
434
|
+
template = `${template} font-style: ${this.data.font.type};`;
|
|
435
|
+
}
|
|
436
|
+
if (this.data.font?.size) {
|
|
437
|
+
template = `${template} font-size: ${this.data.font.size}px;`;
|
|
438
|
+
}
|
|
439
|
+
if (this.data.font?.weight) {
|
|
440
|
+
template = `${template} font-weight: ${this.data.font.weight};`;
|
|
441
|
+
}
|
|
442
|
+
if (this.data.font?.color) {
|
|
443
|
+
template = `${template} color: ${this.data.font.color};`;
|
|
444
|
+
}
|
|
445
|
+
if (this.data.font?.lineDistance) {
|
|
446
|
+
template = `${template} margin-bottom: ${this.data.font.lineDistance}px;`;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return template;
|
|
450
|
+
}
|
|
451
|
+
initSecondStyle() {
|
|
452
|
+
let template = '';
|
|
453
|
+
if (this.data && this.data.font) {
|
|
454
|
+
if (this.data.font?.secondType) {
|
|
455
|
+
template = `${template} font-style: ${this.data.font.secondType};`;
|
|
456
|
+
}
|
|
457
|
+
if (this.data.font?.secondSize) {
|
|
458
|
+
template = `${template} font-size: ${this.data.font.secondSize}px;`;
|
|
459
|
+
}
|
|
460
|
+
if (this.data.font?.secondWeight) {
|
|
461
|
+
template = `${template} font-weight: ${this.data.font.secondWeight};`;
|
|
462
|
+
}
|
|
463
|
+
if (this.data.font?.secondColor) {
|
|
464
|
+
template = `${template} color: ${this.data.font.secondColor};`;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
return template;
|
|
468
|
+
}
|
|
469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent3, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
470
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicCardComponent3, isStandalone: true, selector: "basic-card3", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative}:host ::ng-deep .info-box-left{margin-right:30px;display:flex;flex-direction:row;height:100%;align-items:center}:host ::ng-deep .info-box-left img{width:100%;height:100%}:host ::ng-deep .info-box-right{position:relative;display:flex;flex-direction:column;height:100%;justify-content:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
471
|
+
}
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent3, decorators: [{
|
|
473
|
+
type: Component,
|
|
474
|
+
args: [{ selector: 'basic-card3', imports: [
|
|
475
|
+
CommonModule,
|
|
476
|
+
FormsModule, ReactiveFormsModule,
|
|
477
|
+
GramPipeModule
|
|
478
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative}:host ::ng-deep .info-box-left{margin-right:30px;display:flex;flex-direction:row;height:100%;align-items:center}:host ::ng-deep .info-box-left img{width:100%;height:100%}:host ::ng-deep .info-box-right{position:relative;display:flex;flex-direction:column;height:100%;justify-content:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}\n"] }]
|
|
479
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
480
|
+
|
|
481
|
+
class BasicCardComponent4 extends BasicService {
|
|
482
|
+
globalSrv;
|
|
483
|
+
width = 300;
|
|
484
|
+
height = 120;
|
|
485
|
+
svgTemplate = ``;
|
|
486
|
+
constructor(globalSrv) {
|
|
487
|
+
super(globalSrv);
|
|
488
|
+
this.globalSrv = globalSrv;
|
|
489
|
+
}
|
|
490
|
+
ngOnInit() {
|
|
491
|
+
}
|
|
492
|
+
initPageData(value) {
|
|
493
|
+
this.svgTemplate = this.initTemplate();
|
|
494
|
+
}
|
|
495
|
+
initTemplate() {
|
|
496
|
+
let value = this.getPageValue();
|
|
497
|
+
let template = `
|
|
498
|
+
<div class="info-box" style="${this.initBgStyle()}">
|
|
499
|
+
<div class="info-box-left">
|
|
500
|
+
<div style="width: 60px; height: 60px;">
|
|
501
|
+
<img src="/assets/images/design/basic/cardicon.png" style="object-fit: contain;">
|
|
502
|
+
</div>
|
|
503
|
+
</div>
|
|
504
|
+
<div class="info-box-right">
|
|
505
|
+
<div class="info-second" style="${this.initSecondStyle()}">${this.data.source?.secondValue}</div>
|
|
506
|
+
<div class="info-value" style="${this.initValueStyle()}">${value}</div>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
`;
|
|
510
|
+
return template;
|
|
511
|
+
}
|
|
512
|
+
initBgStyle() {
|
|
513
|
+
let template = '';
|
|
514
|
+
if (this.data && this.data.font) {
|
|
515
|
+
if (this.data.font?.bgColorType == 'single') {
|
|
516
|
+
template = `background: ${this.data.font.color};`;
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
template = `background-image: linear-gradient(${this.data.font?.bgDirection},${this.data.font?.bgColor0},${this.data.font?.bgColor1});`;
|
|
520
|
+
}
|
|
521
|
+
template = `${template} width:${this.data.width}px;height:${this.data.height}px;display: flex;`;
|
|
522
|
+
}
|
|
523
|
+
return template;
|
|
524
|
+
}
|
|
525
|
+
initValueStyle() {
|
|
526
|
+
let template = '';
|
|
527
|
+
if (this.data && this.data.font) {
|
|
528
|
+
if (this.data.font?.type) {
|
|
529
|
+
template = `${template} font-style: ${this.data.font.type};`;
|
|
530
|
+
}
|
|
531
|
+
if (this.data.font?.size) {
|
|
532
|
+
template = `${template} font-size: ${this.data.font.size}px;`;
|
|
533
|
+
}
|
|
534
|
+
if (this.data.font?.weight) {
|
|
535
|
+
template = `${template} font-weight: ${this.data.font.weight};`;
|
|
536
|
+
}
|
|
537
|
+
if (this.data.font?.color) {
|
|
538
|
+
template = `${template} color: ${this.data.font.color};`;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
return template;
|
|
542
|
+
}
|
|
543
|
+
initSecondStyle() {
|
|
544
|
+
let template = '';
|
|
545
|
+
if (this.data && this.data.font) {
|
|
546
|
+
if (this.data.font?.secondType) {
|
|
547
|
+
template = `${template} font-style: ${this.data.font.secondType};`;
|
|
548
|
+
}
|
|
549
|
+
if (this.data.font?.secondSize) {
|
|
550
|
+
template = `${template} font-size: ${this.data.font.secondSize}px;`;
|
|
551
|
+
}
|
|
552
|
+
if (this.data.font?.secondWeight) {
|
|
553
|
+
template = `${template} font-weight: ${this.data.font.secondWeight};`;
|
|
554
|
+
}
|
|
555
|
+
if (this.data.font?.secondColor) {
|
|
556
|
+
template = `${template} color: ${this.data.font.secondColor};`;
|
|
557
|
+
}
|
|
558
|
+
if (this.data.font?.lineDistance) {
|
|
559
|
+
template = `${template} margin-bottom: ${this.data.font.lineDistance}px;`;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return template;
|
|
563
|
+
}
|
|
564
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent4, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
565
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicCardComponent4, isStandalone: true, selector: "basic-card4", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative}:host ::ng-deep .info-box-left{margin-right:30px;display:flex;flex-direction:row;height:100%;align-items:center}:host ::ng-deep .info-box-left img{width:100%;height:100%}:host ::ng-deep .info-box-right{position:relative;display:flex;flex-direction:column;height:100%;justify-content:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}:host ::ng-deep .info-second{padding:15px 0 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
566
|
+
}
|
|
567
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicCardComponent4, decorators: [{
|
|
568
|
+
type: Component,
|
|
569
|
+
args: [{ selector: 'basic-card4', imports: [
|
|
570
|
+
CommonModule,
|
|
571
|
+
FormsModule, ReactiveFormsModule,
|
|
572
|
+
GramPipeModule
|
|
573
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\">\r\n </div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;width:100%;height:100%}:host ::ng-deep .control-box{display:flex;flex:1;width:100%;height:100%}:host ::ng-deep .info-box{display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative}:host ::ng-deep .info-box-left{margin-right:30px;display:flex;flex-direction:row;height:100%;align-items:center}:host ::ng-deep .info-box-left img{width:100%;height:100%}:host ::ng-deep .info-box-right{position:relative;display:flex;flex-direction:column;height:100%;justify-content:center}:host ::ng-deep .info-value{font-family:ds-digitalbold}:host ::ng-deep .info-second{padding:15px 0 0}\n"] }]
|
|
574
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
575
|
+
|
|
576
|
+
//当前时间
|
|
577
|
+
class BasicTimeComponent1 extends BasicService {
|
|
578
|
+
datePipe;
|
|
579
|
+
globalSrv;
|
|
580
|
+
width = 300;
|
|
581
|
+
height = 60;
|
|
582
|
+
currentTime;
|
|
583
|
+
interval;
|
|
584
|
+
svgTemplate = ``;
|
|
585
|
+
constructor(datePipe, globalSrv) {
|
|
586
|
+
super(globalSrv);
|
|
587
|
+
this.datePipe = datePipe;
|
|
588
|
+
this.globalSrv = globalSrv;
|
|
589
|
+
this.updateTime();
|
|
590
|
+
}
|
|
591
|
+
ngOnInit() {
|
|
592
|
+
this.interval = setInterval(() => {
|
|
593
|
+
this.updateTime();
|
|
594
|
+
}, 1000);
|
|
595
|
+
}
|
|
596
|
+
updateTime() {
|
|
597
|
+
const now = new Date();
|
|
598
|
+
this.currentTime = this.datePipe.transform(now, 'yyyy-MM-dd HH:mm:ss');
|
|
599
|
+
this.initPageData(null);
|
|
600
|
+
}
|
|
601
|
+
// 清理定时器
|
|
602
|
+
ngOnDestroy() {
|
|
603
|
+
if (this.interval) {
|
|
604
|
+
clearInterval(this.interval);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
initPageData(value) {
|
|
608
|
+
this.svgTemplate = this.initTemplate();
|
|
609
|
+
}
|
|
610
|
+
initTemplate() {
|
|
611
|
+
let template = `<div style="${this.initStyle()}">${this.currentTime}</div>`;
|
|
612
|
+
return template;
|
|
613
|
+
}
|
|
614
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTimeComponent1, deps: [{ token: i2.DatePipe }, { token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
615
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicTimeComponent1, isStandalone: true, selector: "basic-time1", providers: [DatePipe], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-box{width:100%;text-align:center;font-family:ds-digitalbold}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
616
|
+
}
|
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTimeComponent1, decorators: [{
|
|
618
|
+
type: Component,
|
|
619
|
+
args: [{ selector: 'basic-time1', imports: [
|
|
620
|
+
CommonModule,
|
|
621
|
+
FormsModule, ReactiveFormsModule,
|
|
622
|
+
GramPipeModule
|
|
623
|
+
], providers: [DatePipe], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-box{width:100%;text-align:center;font-family:ds-digitalbold}\n"] }]
|
|
624
|
+
}], ctorParameters: () => [{ type: i2.DatePipe }, { type: i1.GramGlobalService }] });
|
|
625
|
+
|
|
626
|
+
//倒计时
|
|
627
|
+
class BasicTimeComponent2 extends BasicService {
|
|
628
|
+
globalSrv;
|
|
629
|
+
width = 300;
|
|
630
|
+
height = 60;
|
|
631
|
+
countdown = 0; //172800; // 设置倒计时总秒数(例如2天 = 172800秒)
|
|
632
|
+
displayTime = '';
|
|
633
|
+
interval;
|
|
634
|
+
svgTemplate = ``;
|
|
635
|
+
constructor(globalSrv) {
|
|
636
|
+
super(globalSrv);
|
|
637
|
+
this.globalSrv = globalSrv;
|
|
638
|
+
}
|
|
639
|
+
ngOnInit() {
|
|
640
|
+
this.startCountdown();
|
|
641
|
+
}
|
|
642
|
+
// 开始倒计时
|
|
643
|
+
startCountdown() {
|
|
644
|
+
this.updateDisplayTime();
|
|
645
|
+
this.interval = setInterval(() => {
|
|
646
|
+
if (this.countdown > 0) {
|
|
647
|
+
this.countdown--; // 每秒减少1秒
|
|
648
|
+
this.updateDisplayTime();
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
clearInterval(this.interval);
|
|
652
|
+
}
|
|
653
|
+
}, 1000);
|
|
654
|
+
}
|
|
655
|
+
// 更新显示的时间
|
|
656
|
+
updateDisplayTime() {
|
|
657
|
+
if (this.data?.endTime) {
|
|
658
|
+
const currentTime = new Date().getTime();
|
|
659
|
+
const targetDate = new Date(this.data.endTime).getTime();
|
|
660
|
+
const timeDifference = targetDate - currentTime;
|
|
661
|
+
if (timeDifference > 0) {
|
|
662
|
+
this.countdown = Math.floor(timeDifference / 1000);
|
|
663
|
+
const days = Math.floor(this.countdown / 86400); // 天数
|
|
664
|
+
const hours = Math.floor((this.countdown % 86400) / 3600); // 小时数
|
|
665
|
+
const minutes = Math.floor((this.countdown % 3600) / 60); // 分钟数
|
|
666
|
+
const seconds = this.countdown % 60; // 秒数
|
|
667
|
+
this.displayTime = `${this.padZero(days)}天 ${this.padZero(hours)}小时 ${this.padZero(minutes)}分钟 ${this.padZero(seconds)}秒`;
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
this.displayTime = `<span style="color:red;">已过期</span>`;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
this.displayTime = "";
|
|
675
|
+
}
|
|
676
|
+
this.initPageData(null);
|
|
677
|
+
}
|
|
678
|
+
// 补零函数,保证时间格式为 2 位数
|
|
679
|
+
padZero(num) {
|
|
680
|
+
return num < 10 ? '0' + num : num.toString();
|
|
681
|
+
}
|
|
682
|
+
// 清理定时器
|
|
683
|
+
ngOnDestroy() {
|
|
684
|
+
if (this.interval) {
|
|
685
|
+
clearInterval(this.interval);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
initPageData(value) {
|
|
689
|
+
this.svgTemplate = this.initTemplate();
|
|
690
|
+
}
|
|
691
|
+
initTemplate() {
|
|
692
|
+
let template = `<div style="${this.initStyle()}">${this.displayTime}</div>`;
|
|
693
|
+
return template;
|
|
694
|
+
}
|
|
695
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTimeComponent2, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
696
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicTimeComponent2, isStandalone: true, selector: "basic-time2", providers: [], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-box{width:100%;text-align:center;font-family:ds-digitalbold}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] });
|
|
697
|
+
}
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTimeComponent2, decorators: [{
|
|
699
|
+
type: Component,
|
|
700
|
+
args: [{ selector: 'basic-time2', imports: [
|
|
701
|
+
CommonModule,
|
|
702
|
+
FormsModule, ReactiveFormsModule,
|
|
703
|
+
GramPipeModule
|
|
704
|
+
], providers: [], template: "<ng-container *ngIf=\"data!!\">\r\n <div [innerHTML]=\"svgTemplate | safeHtml\" class=\"control-box\"></div>\r\n</ng-container>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-box{width:100%;text-align:center;font-family:ds-digitalbold}\n"] }]
|
|
705
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
706
|
+
|
|
707
|
+
class BasicImageComponent extends BasicService {
|
|
708
|
+
globalSrv;
|
|
709
|
+
width = 280;
|
|
710
|
+
height = 200;
|
|
711
|
+
svgTemplate = ``;
|
|
712
|
+
src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFBklEQVR4nO3dz08jZRzHcaYtpS2FAmUTL7KJHBVNVkIU1gPyD0jC3+A/YEw8ejf+H8ZwMISLJoSDgl7WixrXhCbGJbsmGoFSKWWmUz/PZseQhfaZaefH8/D9vBLSZyZkl873zZR2GnDGSDQGIBwDEI4BCMcAhGMAwjEA4RiAcAxAOAYgHAMQjgEIxwCEYwDCMQDhGIBwDEA4BiAcAxCOAQinDWB7e/vj8fHxt3K53JzjOAXsIsP1ej2v2+3+5Xnez1tbW59hV1/aAHZ2dr5Qw8eSLOP7/j8I4ZPNzc3fx/rQBrC7u/sNbshSrut+yAAEK5fLn25sbBxieSsGcMclFsDx8XGp0WhM5vP53tLSUrNWq3nYfUPcn0fRJBbA3t7ePdw8h2G5y8vLp1jeEPfnUTQMQLjEAlCn7KOjo2qhUPAHnbLj/jyKJrEAyA4MQDgGIBwDEI4BCDdyAAcHBx/hhiyFK7lfrqysPMHyVgzgjmMAwjEA4RiAcAxAOAYgHAMQjgEIxwCEYwDCMQDhGIBwDEA4BiAcAxCOAQjHAIRjAMIxAOEYgHDWBdDr9YoXFxevXV1d3fd9v4xdY47jeLgjTyuVym/5fP5f7KKQcNzsCUAN//T09CEGP43NG1QIU1NT3+JOnWGTQsCxsieAk5OT9/sNP6AiqNVq+zwThGNNAO12ewGn/gdYauFOPZmenn6EJWngWNkRwNnZ2Tue572CpZY6C8zNze1iSRrWBBDm9H9dvV7/CjekYU0A+OHvvW63W8cyFAYQjjUBNJvNt13XfRVLrVwu156dnf0aS9KwJgA8758/Pz9/iKVWqVR6PDk5+RhL0rAmACXMWQDf/c2ZmZnv8IPgFTZJw6oAlEERcPjRWReAoh4OLi8v1UvBFWyqp31usVh8Wi6X/8AmRWBlABQfBiAcAxCOAQjHAIRjAMIxgCGoN6Z0Op06rk7O4/pEDbv+VygU/sZT0mc4sFa8KQVfJwMISw2+1Wq9gdchFrA5EF6UauMl6V9Nf22CAYSk3pCCjzcRQaQ/jadCqFarP+BAG3lGwNfFAHRwEepBmO/6fvBKpVepVB7hjPAMm0ZhABqjDv86RPCjaQ8JDGCAOIcfMC0CBtBHEsMPmBQBA7hFksMPmBIBA3hJGsMPmBABA7gmzeEHso6AAbyQxfADWUbAACDL4QeyikB8ACYMP5BFBKIDMGn4gbQjEBuAicMPpBmByABMHn4grQjEBWDD8ANpRGB0ABjUPC7BLna73XvBZVh1ZQ1f9FC/Dsam4QdwPxONAMfSzABardZSp9NZxLKvKAfHxuEHotzPqIwMIMqwJiYmGtVq9Scsb4UzR7HZbK6ot29h01pJRWBcAFGGH1DvukEIR/j4M3hYcF23hjPIAv6t+70XDx+2SyICowIYZvjSxB2BMQFw+OHFGYERAXD40cUVQeYBcPjDiyOCTAPg8Ec3agSZBcDhx2eUCDIJgMOP37ARpB4Ah5+cYSJINQAOP3lRI0gtAA4/PVEiSCUADj99YSNIPAAOPzthIlhbW/scN31pAzg8PPwAF1sWsbyBw8/eoAgcx2msrq4O/KXa2gD29/dL+A/e9X3/dYQwgV3PcfjmeDkCDL6DK6i/tNvt79fX1y+xqy9tAHS3MQDhGIBwDEA4BiAcAxCOAQjHAIRjAMIxAOEYgHAMQDgGIBwDEI4BCMcAhGMAwjEA4RiAcAxAuP8A/aX6rh4U9AMAAAAASUVORK5CYII=";
|
|
713
|
+
src2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAFBklEQVR4nO3dz08jZRzHcaYtpS2FAmUTL7KJHBVNVkIU1gPyD0jC3+A/YEw8ejf+H8ZwMISLJoSDgl7WixrXhCbGJbsmGoFSKWWmUz/PZseQhfaZaefH8/D9vBLSZyZkl873zZR2GnDGSDQGIBwDEI4BCMcAhGMAwjEA4RiAcAxAOAYgHAMQjgEIxwCEYwDCMQDhGIBwDEA4BiAcAxCOAQinDWB7e/vj8fHxt3K53JzjOAXsIsP1ej2v2+3+5Xnez1tbW59hV1/aAHZ2dr5Qw8eSLOP7/j8I4ZPNzc3fx/rQBrC7u/sNbshSrut+yAAEK5fLn25sbBxieSsGcMclFsDx8XGp0WhM5vP53tLSUrNWq3nYfUPcn0fRJBbA3t7ePdw8h2G5y8vLp1jeEPfnUTQMQLjEAlCn7KOjo2qhUPAHnbLj/jyKJrEAyA4MQDgGIBwDEI4BCDdyAAcHBx/hhiyFK7lfrqysPMHyVgzgjmMAwjEA4RiAcAxAOAYgHAMQjgEIxwCEYwDCMQDhGIBwDEA4BiAcAxCOAQjHAIRjAMIxAOEYgHDWBdDr9YoXFxevXV1d3fd9v4xdY47jeLgjTyuVym/5fP5f7KKQcNzsCUAN//T09CEGP43NG1QIU1NT3+JOnWGTQsCxsieAk5OT9/sNP6AiqNVq+zwThGNNAO12ewGn/gdYauFOPZmenn6EJWngWNkRwNnZ2Tue572CpZY6C8zNze1iSRrWBBDm9H9dvV7/CjekYU0A+OHvvW63W8cyFAYQjjUBNJvNt13XfRVLrVwu156dnf0aS9KwJgA8758/Pz9/iKVWqVR6PDk5+RhL0rAmACXMWQDf/c2ZmZnv8IPgFTZJw6oAlEERcPjRWReAoh4OLi8v1UvBFWyqp31usVh8Wi6X/8AmRWBlABQfBiAcAxCOAQjHAIRjAMIxgCGoN6Z0Op06rk7O4/pEDbv+VygU/sZT0mc4sFa8KQVfJwMISw2+1Wq9gdchFrA5EF6UauMl6V9Nf22CAYSk3pCCjzcRQaQ/jadCqFarP+BAG3lGwNfFAHRwEepBmO/6fvBKpVepVB7hjPAMm0ZhABqjDv86RPCjaQ8JDGCAOIcfMC0CBtBHEsMPmBQBA7hFksMPmBIBA3hJGsMPmBABA7gmzeEHso6AAbyQxfADWUbAACDL4QeyikB8ACYMP5BFBKIDMGn4gbQjEBuAicMPpBmByABMHn4grQjEBWDD8ANpRGB0ABjUPC7BLna73XvBZVh1ZQ1f9FC/Dsam4QdwPxONAMfSzABardZSp9NZxLKvKAfHxuEHotzPqIwMIMqwJiYmGtVq9Scsb4UzR7HZbK6ot29h01pJRWBcAFGGH1DvukEIR/j4M3hYcF23hjPIAv6t+70XDx+2SyICowIYZvjSxB2BMQFw+OHFGYERAXD40cUVQeYBcPjDiyOCTAPg8Ec3agSZBcDhx2eUCDIJgMOP37ARpB4Ah5+cYSJINQAOP3lRI0gtAA4/PVEiSCUADj99YSNIPAAOPzthIlhbW/scN31pAzg8PPwAF1sWsbyBw8/eoAgcx2msrq4O/KXa2gD29/dL+A/e9X3/dYQwgV3PcfjmeDkCDL6DK6i/tNvt79fX1y+xqy9tAHS3MQDhGIBwDEA4BiAcAxCOAQjHAIRjAMIxAOEYgHAMQDgGIBwDEI4BCMcAhGMAwjEA4RiAcAxAuP8A/aX6rh4U9AMAAAAASUVORK5CYII=";
|
|
714
|
+
constructor(globalSrv) {
|
|
715
|
+
super(globalSrv);
|
|
716
|
+
this.globalSrv = globalSrv;
|
|
717
|
+
}
|
|
718
|
+
ngOnInit() {
|
|
719
|
+
}
|
|
720
|
+
initPageData(value) {
|
|
721
|
+
if (this.data?.image?.url) {
|
|
722
|
+
this.src = this.data?.image?.url;
|
|
723
|
+
}
|
|
724
|
+
else {
|
|
725
|
+
this.src = this.src2;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicImageComponent, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
729
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicImageComponent, isStandalone: true, selector: "basic-image", providers: [], usesInheritance: true, ngImport: i0, template: "<div class=\"control-image\" [ngStyle]=\"{'opacity':data?.image?.opacity}\">\r\n <img [src]=\"src\" style=\"object-fit: fill;\">\r\n</div>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-image{width:100%;height:100%;opacity:1;position:relative;display:inline-block;overflow:hidden}:host ::ng-deep img{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
730
|
+
}
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicImageComponent, decorators: [{
|
|
732
|
+
type: Component,
|
|
733
|
+
args: [{ selector: 'basic-image', imports: [
|
|
734
|
+
CommonModule,
|
|
735
|
+
FormsModule, ReactiveFormsModule
|
|
736
|
+
], providers: [], template: "<div class=\"control-image\" [ngStyle]=\"{'opacity':data?.image?.opacity}\">\r\n <img [src]=\"src\" style=\"object-fit: fill;\">\r\n</div>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-image{width:100%;height:100%;opacity:1;position:relative;display:inline-block;overflow:hidden}:host ::ng-deep img{width:100%;height:100%}\n"] }]
|
|
737
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
738
|
+
|
|
739
|
+
class BasicTableComponent extends BasicService {
|
|
740
|
+
globalSrv;
|
|
741
|
+
width = 600;
|
|
742
|
+
height = 400;
|
|
743
|
+
headerData = ["排名", "关键词", "用户数", "搜索次数"];
|
|
744
|
+
bodyData = [
|
|
745
|
+
{ index: 1, keyWord: "中国", userCnt: "110", searchCnt: 1927 },
|
|
746
|
+
{ index: 2, keyWord: "朝鲜", userCnt: "81", searchCnt: 1000 },
|
|
747
|
+
{ index: 3, keyWord: "美国", userCnt: "63", searchCnt: 8547 },
|
|
748
|
+
{ index: 4, keyWord: "法国", userCnt: "55", searchCnt: 7896 },
|
|
749
|
+
{ index: 5, keyWord: "印度", userCnt: "88", searchCnt: 1234 },
|
|
750
|
+
{ index: 6, keyWord: "日本", userCnt: "10", searchCnt: 3214 },
|
|
751
|
+
{ index: 7, keyWord: "乌克兰", userCnt: "12", searchCnt: 6542 },
|
|
752
|
+
{ index: 8, keyWord: "俄罗斯", userCnt: "16", searchCnt: 3785 },
|
|
753
|
+
{ index: 9, keyWord: "英格兰", userCnt: "33", searchCnt: 1025 },
|
|
754
|
+
{ index: 10, keyWord: "巴基斯坦", userCnt: "44", searchCnt: 9999 }
|
|
755
|
+
];
|
|
756
|
+
getKeys(item) {
|
|
757
|
+
return Object.keys(item);
|
|
758
|
+
}
|
|
759
|
+
constructor(globalSrv) {
|
|
760
|
+
super(globalSrv);
|
|
761
|
+
this.globalSrv = globalSrv;
|
|
762
|
+
}
|
|
763
|
+
ngOnInit() {
|
|
764
|
+
}
|
|
765
|
+
initPageData(value) {
|
|
766
|
+
}
|
|
767
|
+
initTemplate() {
|
|
768
|
+
}
|
|
769
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTableComponent, deps: [{ token: i1.GramGlobalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
770
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: BasicTableComponent, isStandalone: true, selector: "basic-table", providers: [], usesInheritance: true, ngImport: i0, template: "<div class=\"control-table\">\r\n <table>\r\n <thead>\r\n <ng-container *ngFor=\"let item of headerData\">\r\n <th\r\n [ngStyle]=\"{'background-color':data?.table?.headerBgColor,'font-size':data?.table?.headerFontSize+'px','color':data?.table?.headerFontColor}\">\r\n {{item}}\r\n </th>\r\n </ng-container>\r\n </thead>\r\n <tbody [ngStyle]=\"{'background-color':data?.table?.bodyBgColor}\">\r\n <ng-container *ngFor=\"let item of bodyData; let i = index\">\r\n <tr [ngStyle]=\" {'background-color': i % 2===0 ? data?.table?.evenBgColor : data?.table?.oddBgColor}\">\r\n <ng-container *ngFor=\"let key of getKeys(item)\">\r\n <td [ngStyle]=\"{'font-size':data?.table?.bodyFontSize+'px','color':data?.table?.bodyFontColor}\">\r\n {{item[key]}}</td>\r\n </ng-container>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</div>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-table{width:100%;height:100%}:host ::ng-deep table{width:100%;height:100%}:host ::ng-deep table th{font-weight:500;padding:15px 0;background-color:#232832}:host ::ng-deep table th,:host ::ng-deep table td{text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
771
|
+
}
|
|
772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BasicTableComponent, decorators: [{
|
|
773
|
+
type: Component,
|
|
774
|
+
args: [{ selector: 'basic-table', imports: [
|
|
775
|
+
CommonModule,
|
|
776
|
+
FormsModule, ReactiveFormsModule
|
|
777
|
+
], providers: [], template: "<div class=\"control-table\">\r\n <table>\r\n <thead>\r\n <ng-container *ngFor=\"let item of headerData\">\r\n <th\r\n [ngStyle]=\"{'background-color':data?.table?.headerBgColor,'font-size':data?.table?.headerFontSize+'px','color':data?.table?.headerFontColor}\">\r\n {{item}}\r\n </th>\r\n </ng-container>\r\n </thead>\r\n <tbody [ngStyle]=\"{'background-color':data?.table?.bodyBgColor}\">\r\n <ng-container *ngFor=\"let item of bodyData; let i = index\">\r\n <tr [ngStyle]=\" {'background-color': i % 2===0 ? data?.table?.evenBgColor : data?.table?.oddBgColor}\">\r\n <ng-container *ngFor=\"let key of getKeys(item)\">\r\n <td [ngStyle]=\"{'font-size':data?.table?.bodyFontSize+'px','color':data?.table?.bodyFontColor}\">\r\n {{item[key]}}</td>\r\n </ng-container>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</div>", styles: [":host ::ng-deep{display:flex;justify-content:center;align-items:center;height:100%;width:100%}:host ::ng-deep .control-table{width:100%;height:100%}:host ::ng-deep table{width:100%;height:100%}:host ::ng-deep table th{font-weight:500;padding:15px 0;background-color:#232832}:host ::ng-deep table th,:host ::ng-deep table td{text-align:center}\n"] }]
|
|
778
|
+
}], ctorParameters: () => [{ type: i1.GramGlobalService }] });
|
|
779
|
+
|
|
780
|
+
const dynamicComponents = {
|
|
781
|
+
text: BasicTextComponent,
|
|
782
|
+
number: BasicNumberComponent,
|
|
783
|
+
line1: BasicLine1Component,
|
|
784
|
+
line2: BasicLine2Component,
|
|
785
|
+
card1: BasicCardComponent1,
|
|
786
|
+
card2: BasicCardComponent2,
|
|
787
|
+
card3: BasicCardComponent3,
|
|
788
|
+
card4: BasicCardComponent4,
|
|
789
|
+
time1: BasicTimeComponent1,
|
|
790
|
+
time2: BasicTimeComponent2,
|
|
791
|
+
image: BasicImageComponent,
|
|
792
|
+
table: BasicTableComponent
|
|
793
|
+
};
|
|
794
|
+
class GramBiBasicComponent {
|
|
795
|
+
componentFactoryResolver;
|
|
796
|
+
_data = null;
|
|
797
|
+
component;
|
|
798
|
+
//@Input() data: any;
|
|
799
|
+
set data(value) {
|
|
800
|
+
this._data = value;
|
|
801
|
+
this.renderComponent();
|
|
802
|
+
}
|
|
803
|
+
get data() {
|
|
804
|
+
return this._data;
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* 动态子组件
|
|
808
|
+
*/
|
|
809
|
+
componentHost;
|
|
810
|
+
ngOnInit() { }
|
|
811
|
+
constructor(componentFactoryResolver) {
|
|
812
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
813
|
+
}
|
|
814
|
+
ngOnChanges(changes) {
|
|
815
|
+
// console.log("[]", this.data);
|
|
816
|
+
// if (changes["data"]) {
|
|
817
|
+
// console.log(this.data);
|
|
818
|
+
// if (this.data && this.data?.secondType) {
|
|
819
|
+
// this.renderComponent();
|
|
820
|
+
// }
|
|
821
|
+
// }
|
|
822
|
+
}
|
|
823
|
+
renderComponent() {
|
|
824
|
+
if (this.componentHost && this.data && this.data?.secondType) {
|
|
825
|
+
this.componentHost.clear();
|
|
826
|
+
const compFactory = this.componentFactoryResolver.resolveComponentFactory(dynamicComponents[this.data.secondType]);
|
|
827
|
+
this.component = this.componentHost.createComponent(compFactory);
|
|
828
|
+
this.component.instance['data'] = this.data;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBiBasicComponent, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
|
|
832
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: GramBiBasicComponent, isStandalone: true, selector: "gram-bi-basic", inputs: { data: "data" }, viewQueries: [{ propertyName: "componentHost", first: true, predicate: ["componentHost"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container #componentHost></ng-container>", styles: [":host ::ng-deep{width:100%;height:100%;display:inline-block}:host ::ng-deep svg{transform-origin:left top}\n"] });
|
|
833
|
+
}
|
|
834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBiBasicComponent, decorators: [{
|
|
835
|
+
type: Component,
|
|
836
|
+
args: [{ selector: 'gram-bi-basic', template: "<ng-container #componentHost></ng-container>", styles: [":host ::ng-deep{width:100%;height:100%;display:inline-block}:host ::ng-deep svg{transform-origin:left top}\n"] }]
|
|
837
|
+
}], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }], propDecorators: { data: [{
|
|
838
|
+
type: Input
|
|
839
|
+
}], componentHost: [{
|
|
840
|
+
type: ViewChild,
|
|
841
|
+
args: ['componentHost', { read: ViewContainerRef, static: true }]
|
|
842
|
+
}] } });
|
|
843
|
+
|
|
844
|
+
const COMPONENTS = [GramBiBasicComponent];
|
|
845
|
+
const COMPONENTS_NOROUNT = [
|
|
846
|
+
BasicTextComponent,
|
|
847
|
+
BasicNumberComponent,
|
|
848
|
+
BasicLine1Component,
|
|
849
|
+
BasicLine2Component,
|
|
850
|
+
BasicCardComponent1,
|
|
851
|
+
BasicCardComponent2,
|
|
852
|
+
BasicCardComponent3,
|
|
853
|
+
BasicCardComponent4,
|
|
854
|
+
BasicTimeComponent1,
|
|
855
|
+
BasicTimeComponent2,
|
|
856
|
+
BasicImageComponent,
|
|
857
|
+
BasicTableComponent
|
|
858
|
+
];
|
|
859
|
+
class GramBiBasicModule {
|
|
860
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBiBasicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
861
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: GramBiBasicModule, imports: [GramBiBasicComponent, BasicTextComponent,
|
|
862
|
+
BasicNumberComponent,
|
|
863
|
+
BasicLine1Component,
|
|
864
|
+
BasicLine2Component,
|
|
865
|
+
BasicCardComponent1,
|
|
866
|
+
BasicCardComponent2,
|
|
867
|
+
BasicCardComponent3,
|
|
868
|
+
BasicCardComponent4,
|
|
869
|
+
BasicTimeComponent1,
|
|
870
|
+
BasicTimeComponent2,
|
|
871
|
+
BasicImageComponent,
|
|
872
|
+
BasicTableComponent], exports: [GramBiBasicComponent] });
|
|
873
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBiBasicModule, imports: [COMPONENTS_NOROUNT] });
|
|
874
|
+
}
|
|
875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: GramBiBasicModule, decorators: [{
|
|
876
|
+
type: NgModule,
|
|
877
|
+
args: [{
|
|
878
|
+
imports: [...COMPONENTS, ...COMPONENTS_NOROUNT],
|
|
879
|
+
exports: [...COMPONENTS],
|
|
880
|
+
}]
|
|
881
|
+
}] });
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Generated bundle index. Do not edit.
|
|
885
|
+
*/
|
|
886
|
+
|
|
887
|
+
export { GramBiBasicComponent, GramBiBasicModule };
|
|
888
|
+
//# sourceMappingURL=bi.basic.mjs.map
|