gauge-page-header 0.0.428 → 0.0.429

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.
@@ -2,119 +2,119 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bae56656.js');
5
+ const index = require('./index-7b8a2e69.js');
6
6
 
7
7
  const eswat2IoCss = "a{position:absolute;top:8px;right:8px;color:var(--clrs-gray)}:hover{fill:var(--clrs-navy)}";
8
8
 
9
9
  const url = 'https://eswat2.dev';
10
10
  const who = 'eswat2';
11
11
  const pawIcon = ({ hex = 'currentColor', size = 24 }) => {
12
- return (index.h("svg", { width: size, height: size, viewBox: "0 0 24 24" }, index.h("g", { fill: hex }, index.h("path", { d: "M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z" })), index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
12
+ return (index.h("svg", { width: size, height: size, viewBox: "0 0 24 24" }, index.h("g", { fill: hex }, index.h("path", { d: "M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z" })), index.h("path", { d: "M0 0h24v24H0z", fill: "none" })));
13
13
  };
14
14
  const Eswat2Io = class {
15
- constructor(hostRef) {
16
- index.registerInstance(this, hostRef);
17
- }
18
- render() {
19
- return (index.h("a", { href: url, "aria-label": who, title: who }, pawIcon({})));
20
- }
15
+ constructor(hostRef) {
16
+ index.registerInstance(this, hostRef);
17
+ }
18
+ render() {
19
+ return (index.h("a", { href: url, "aria-label": who, title: who }, pawIcon({})));
20
+ }
21
21
  };
22
22
  Eswat2Io.style = eswat2IoCss;
23
23
 
24
24
  const copyToClipboard = (text) => {
25
- if (!navigator.clipboard) {
26
- // Clipboard API not available
27
- return;
28
- }
29
- try {
30
- navigator.clipboard.writeText(text);
31
- }
32
- catch (err) {
33
- console.error('Failed to copy!', err);
34
- }
25
+ if (!navigator.clipboard) {
26
+ // Clipboard API not available
27
+ return;
28
+ }
29
+ try {
30
+ navigator.clipboard.writeText(text);
31
+ }
32
+ catch (err) {
33
+ console.error('Failed to copy!', err);
34
+ }
35
35
  };
36
36
 
37
37
  const gaugePageHeaderCss = ":host{--clrs-navy:#001f3f;--clrs-blue:#0074d9;--clrs-aqua:#7fdbff;--clrs-teal:#39cccc;--clrs-olive:#3d9970;--clrs-green:#2ecc40;--clrs-lime:#01ff70;--clrs-yellow:#ffdc00;--clrs-orange:#ff851b;--clrs-red:#ff4136;--clrs-maroon:#85144b;--clrs-fuchsia:#f012be;--clrs-purple:#b10dc9;--clrs-black:#111111;--clrs-gray:#aaaaaa;--clrs-silver:#dddddd;--clrs-bada55:#bada55;--clrs-slate:#708090;--clrs-slate4:#4e5964;--clrs-white:#ffffff}.gauge-page-header{padding:0 5px;display:flex;flex-direction:column;color:var(--clrs-navy)}.gauge-page-header *{font-family:'Roboto'}.gauge-page-header .year-make-model-container{height:35px;display:flex;align-items:center}.gauge-page-header #year-make-model-header{font-size:32px;font-weight:500;margin-left:0}.gauge-page-header .vehicle-identifier-info-container{height:30px;margin-bottom:5px;}.gauge-page-header #vehicle-identifier-info-header{font-weight:400;margin-top:8px}.gauge-page-header .vehicle-info-header-segment{margin-right:1em}.gauge-page-header .vehicle-info-header-segment.capitalize{text-transform:uppercase}.gauge-page-header .vehicle-info-header-segment:not(:last-child):after{padding-left:1em;content:'|'}.gauge-page-header .vehicle-info-segment{float:left;margin-right:30px;font-size:14px}.gauge-page-header .vehicle-data-container{display:flex;flex-direction:row}.gauge-page-header .segment-heading{color:var(--clrs-slate);font-size:14px;font-weight:400;margin-bottom:4px}.gauge-page-header .segment-value{margin-top:0;font-weight:400}.gauge-page-header .badge-set-container{display:flex;padding-left:8px}.gauge-page-header .badge{display:flex;align-items:center;justify-content:center;margin-left:8px;padding:3px 10px;font-size:12px;border-radius:1em;font-weight:600;border:solid 1px;}.gauge-page-header .badge.certified{background-color:#f9fffb;border-color:#5ebb47}.gauge-page-header .badge.certified [role='label']{color:#008629}.gauge-page-header .badge.not-certified{border-color:#46576f}.gauge-page-header .badge.not-certified [role='label']{color:#46576f}.gauge-page-header .badge.retail{background-color:#f6fcff;border-color:#0576b3}.gauge-page-header .badge.retail [role='label']{color:#0576b3}.gauge-page-header .badge.wholesale{background-color:#f6fcff;border-color:#0576b3}.gauge-page-header .badge.wholesale [role='label']{color:#0576b3}";
38
38
 
39
39
  const GaugePageHeader = class {
40
- constructor(hostRef) {
41
- index.registerInstance(this, hostRef);
42
- this.vehicleInfo = undefined;
43
- }
44
- yearMakeModel() {
45
- const { ModelYear, Make, Model } = this.vehicleInfo || {
46
- ModelYear: 2020,
47
- Make: '-',
48
- Model: '-',
49
- };
50
- return `${ModelYear} ${Make} ${Model}`;
51
- }
52
- isCertified() {
53
- const { IsCertified } = this.vehicleInfo || { IsCertified: false };
54
- return IsCertified;
55
- }
56
- isRetail() {
57
- const { RetailWholesale } = this.vehicleInfo || { RetailWholesale: 'R' };
58
- return RetailWholesale === 'R';
59
- }
60
- isNew() {
61
- const { NewUsed } = this.vehicleInfo || { NewUsed: 'N' };
62
- return NewUsed === 'N';
63
- }
64
- stockNumber() {
65
- const { StockNumber } = this.vehicleInfo || { StockNumber: '-' };
66
- return StockNumber;
67
- }
68
- vin() {
69
- const { Vin } = this.vehicleInfo || { Vin: '-' };
70
- return Vin;
71
- }
72
- daysInInventory() {
73
- const { DaysInInventory } = this.vehicleInfo || { DaysInInventory: 0 };
74
- return `${DaysInInventory} Days`;
75
- }
76
- mileage() {
77
- const { Odometer } = this.vehicleInfo || { Odometer: 0 };
78
- const label = Intl.NumberFormat().format(Odometer);
79
- return `${label} mi`;
80
- }
81
- body() {
82
- const { BodyDescription } = this.vehicleInfo || { BodyDescription: '-' };
83
- return BodyDescription;
84
- }
85
- exteriorColor() {
86
- const { ExteriorColor } = this.vehicleInfo || { ExteriorColor: '-' };
87
- return ExteriorColor;
88
- }
89
- interiorColor() {
90
- const { InteriorColor } = this.vehicleInfo || { InteriorColor: '-' };
91
- return InteriorColor;
92
- }
93
- driveTrain() {
94
- const { DriveTrainType } = this.vehicleInfo || { DriveTrainType: '-' };
95
- return DriveTrainType;
96
- }
97
- engine() {
98
- const { EngineDescription } = this.vehicleInfo || {
99
- EngineDescription: '-',
100
- };
101
- return EngineDescription;
102
- }
103
- transmission() {
104
- const { TransmissionDescription } = this.vehicleInfo || {
105
- TransmissionDescription: '- ',
106
- };
107
- return TransmissionDescription;
108
- }
109
- render() {
110
- var disposition = '';
111
- if (!this.isNew()) {
112
- disposition = this.isCertified() ? (index.h("span", { class: "certified badge" }, index.h("span", { role: "label" }, "Certified"))) : (index.h("span", { class: "not-certified badge" }, index.h("span", { role: "label" }, "Not Certified")));
113
- }
114
- return [
115
- index.h("div", { class: "gauge-page-header" }, index.h("eswat2-io", null), index.h("div", { class: "year-make-model-container", onClick: () => copyToClipboard(this.yearMakeModel()), title: "Click to Copy Year/Make/Model" }, index.h("h1", { id: "year-make-model-header" }, this.yearMakeModel()), index.h("span", { class: "badge-set-container" }, disposition, this.isRetail() ? (index.h("span", { class: "retail badge" }, index.h("span", { role: "label" }, "Retail"))) : (index.h("span", { class: "wholesale badge" }, index.h("span", { role: "label" }, "Wholesale"))))), index.h("div", { class: "vehicle-identifier-info-container", onClick: () => copyToClipboard(this.vin()), title: "Click to Copy VIN" }, index.h("h4", { id: "vehicle-identifier-info-header" }, index.h("span", { class: "vehicle-info-header-segment capitalize" }, this.stockNumber()), index.h("span", { class: "vehicle-info-header-segment capitalize" }, this.vin()), index.h("span", { class: "vehicle-info-header-segment" }, this.daysInInventory()), index.h("span", { class: "vehicle-info-header-segment" }, this.mileage()))), index.h("div", { class: "vehicle-data-container" }, index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Body"), index.h("p", { class: "segment-value" }, this.body())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Color"), index.h("p", { class: "segment-value" }, this.exteriorColor())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Int. Color"), index.h("p", { class: "segment-value" }, this.interiorColor())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Drive Train"), index.h("p", { class: "segment-value" }, this.driveTrain())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Engine"), index.h("p", { class: "segment-value" }, this.engine())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Transmission"), index.h("p", { class: "segment-value" }, this.transmission())))),
116
- ];
117
- }
40
+ constructor(hostRef) {
41
+ index.registerInstance(this, hostRef);
42
+ this.vehicleInfo = undefined;
43
+ }
44
+ yearMakeModel() {
45
+ const { ModelYear, Make, Model } = this.vehicleInfo || {
46
+ ModelYear: 2020,
47
+ Make: '-',
48
+ Model: '-',
49
+ };
50
+ return `${ModelYear} ${Make} ${Model}`;
51
+ }
52
+ isCertified() {
53
+ const { IsCertified } = this.vehicleInfo || { IsCertified: false };
54
+ return IsCertified;
55
+ }
56
+ isRetail() {
57
+ const { RetailWholesale } = this.vehicleInfo || { RetailWholesale: 'R' };
58
+ return RetailWholesale === 'R';
59
+ }
60
+ isNew() {
61
+ const { NewUsed } = this.vehicleInfo || { NewUsed: 'N' };
62
+ return NewUsed === 'N';
63
+ }
64
+ stockNumber() {
65
+ const { StockNumber } = this.vehicleInfo || { StockNumber: '-' };
66
+ return StockNumber;
67
+ }
68
+ vin() {
69
+ const { Vin } = this.vehicleInfo || { Vin: '-' };
70
+ return Vin;
71
+ }
72
+ daysInInventory() {
73
+ const { DaysInInventory } = this.vehicleInfo || { DaysInInventory: 0 };
74
+ return `${DaysInInventory} Days`;
75
+ }
76
+ mileage() {
77
+ const { Odometer } = this.vehicleInfo || { Odometer: 0 };
78
+ const label = Intl.NumberFormat().format(Odometer);
79
+ return `${label} mi`;
80
+ }
81
+ body() {
82
+ const { BodyDescription } = this.vehicleInfo || { BodyDescription: '-' };
83
+ return BodyDescription;
84
+ }
85
+ exteriorColor() {
86
+ const { ExteriorColor } = this.vehicleInfo || { ExteriorColor: '-' };
87
+ return ExteriorColor;
88
+ }
89
+ interiorColor() {
90
+ const { InteriorColor } = this.vehicleInfo || { InteriorColor: '-' };
91
+ return InteriorColor;
92
+ }
93
+ driveTrain() {
94
+ const { DriveTrainType } = this.vehicleInfo || { DriveTrainType: '-' };
95
+ return DriveTrainType;
96
+ }
97
+ engine() {
98
+ const { EngineDescription } = this.vehicleInfo || {
99
+ EngineDescription: '-',
100
+ };
101
+ return EngineDescription;
102
+ }
103
+ transmission() {
104
+ const { TransmissionDescription } = this.vehicleInfo || {
105
+ TransmissionDescription: '- ',
106
+ };
107
+ return TransmissionDescription;
108
+ }
109
+ render() {
110
+ var disposition = '';
111
+ if (!this.isNew()) {
112
+ disposition = this.isCertified() ? (index.h("span", { class: "certified badge" }, index.h("span", { role: "label" }, "Certified"))) : (index.h("span", { class: "not-certified badge" }, index.h("span", { role: "label" }, "Not Certified")));
113
+ }
114
+ return [
115
+ index.h("div", { class: "gauge-page-header" }, index.h("eswat2-io", null), index.h("div", { class: "year-make-model-container", onClick: () => copyToClipboard(this.yearMakeModel()), title: "Click to Copy Year/Make/Model" }, index.h("h1", { id: "year-make-model-header" }, this.yearMakeModel()), index.h("span", { class: "badge-set-container" }, disposition, this.isRetail() ? (index.h("span", { class: "retail badge" }, index.h("span", { role: "label" }, "Retail"))) : (index.h("span", { class: "wholesale badge" }, index.h("span", { role: "label" }, "Wholesale"))))), index.h("div", { class: "vehicle-identifier-info-container", onClick: () => copyToClipboard(this.vin()), title: "Click to Copy VIN" }, index.h("h4", { id: "vehicle-identifier-info-header" }, index.h("span", { class: "vehicle-info-header-segment capitalize" }, this.stockNumber()), index.h("span", { class: "vehicle-info-header-segment capitalize" }, this.vin()), index.h("span", { class: "vehicle-info-header-segment" }, this.daysInInventory()), index.h("span", { class: "vehicle-info-header-segment" }, this.mileage()))), index.h("div", { class: "vehicle-data-container" }, index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Body"), index.h("p", { class: "segment-value" }, this.body())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Color"), index.h("p", { class: "segment-value" }, this.exteriorColor())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Int. Color"), index.h("p", { class: "segment-value" }, this.interiorColor())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Drive Train"), index.h("p", { class: "segment-value" }, this.driveTrain())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Engine"), index.h("p", { class: "segment-value" }, this.engine())), index.h("div", { class: "vehicle-info-segment" }, index.h("h4", { class: "segment-heading" }, "Transmission"), index.h("p", { class: "segment-value" }, this.transmission())))),
116
+ ];
117
+ }
118
118
  };
119
119
  GaugePageHeader.style = gaugePageHeaderCss;
120
120
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bae56656.js');
5
+ const index = require('./index-7b8a2e69.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Browser v4.7.2 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.8.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchBrowser = () => {
11
11
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('gauge-page-header.cjs.js', document.baseURI).href));
@@ -405,7 +405,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
405
405
  elm[memberName] = newValue;
406
406
  }
407
407
  }
408
- catch (e) { }
408
+ catch (e) {
409
+ /**
410
+ * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
411
+ */
412
+ }
409
413
  }
410
414
  if (newValue == null || newValue === false) {
411
415
  if (newValue !== false || elm.getAttribute(memberName) === '') {
@@ -424,6 +428,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
424
428
  }
425
429
  };
426
430
  const parseClassListRegex = /\s/;
431
+ /**
432
+ * Parsed a string of classnames into an array
433
+ * @param value className string, e.g. "foo bar baz"
434
+ * @returns list of classes, e.g. ["foo", "bar", "baz"]
435
+ */
427
436
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
428
437
  const CAPTURE_EVENT_SUFFIX = 'Capture';
429
438
  const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
@@ -1122,10 +1131,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1122
1131
  * @returns a reference to the same constructor passed in (but now mutated)
1123
1132
  */
1124
1133
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1134
+ const prototype = Cstr.prototype;
1125
1135
  if (cmpMeta.$members$) {
1126
1136
  // It's better to have a const than two Object.entries()
1127
1137
  const members = Object.entries(cmpMeta.$members$);
1128
- const prototype = Cstr.prototype;
1129
1138
  members.map(([memberName, [memberFlags]]) => {
1130
1139
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1131
1140
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-bae56656.js');
5
+ const index = require('./index-7b8a2e69.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return undefined;
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "compiler": {
7
7
  "name": "@stencil/core",
8
- "version": "4.7.2",
8
+ "version": "4.8.0",
9
9
  "typescriptVersion": "5.2.2"
10
10
  },
11
11
  "collections": [],
@@ -2,22 +2,22 @@ import { h } from "@stencil/core";
2
2
  const url = 'https://eswat2.dev';
3
3
  const who = 'eswat2';
4
4
  const pawIcon = ({ hex = 'currentColor', size = 24 }) => {
5
- return (h("svg", { width: size, height: size, viewBox: "0 0 24 24" }, h("g", { fill: hex }, h("path", { d: "M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z" })), h("path", { d: "M0 0h24v24H0z", fill: "none" })));
5
+ return (h("svg", { width: size, height: size, viewBox: "0 0 24 24" }, h("g", { fill: hex }, h("path", { d: "M8.35,3C9.53,2.83 10.78,4.12 11.14,5.9C11.5,7.67 10.85,9.25\n 9.67,9.43C8.5,9.61 7.24,8.32 6.87,6.54C6.5,4.77 7.17,3.19\n 8.35,3M15.5,3C16.69,3.19 17.35,4.77 17,6.54C16.62,8.32 15.37,9.61\n 14.19,9.43C13,9.25 12.35,7.67 12.72,5.9C13.08,4.12 14.33,2.83\n 15.5,3M3,7.6C4.14,7.11 5.69,8 6.5,9.55C7.26,11.13 7,12.79\n 5.87,13.28C4.74,13.77 3.2,12.89 2.41,11.32C1.62,9.75 1.9,8.08\n 3,7.6M21,7.6C22.1,8.08 22.38,9.75 21.59,11.32C20.8,12.89 19.26,13.77\n 18.13,13.28C17,12.79 16.74,11.13 17.5,9.55C18.31,8 19.86,7.11\n 21,7.6M19.33,18.38C19.37,19.32 18.65,20.36 17.79,20.75C16,21.57\n 13.88,19.87 11.89,19.87C9.9,19.87 7.76,21.64 6,20.75C5,20.26 4.31,18.96\n 4.44,17.88C4.62,16.39 6.41,15.59 7.47,14.5C8.88,13.09 9.88,10.44\n 11.89,10.44C13.89,10.44 14.95,13.05 16.3,14.5C17.41,15.72 19.26,16.75\n 19.33,18.38Z" })), h("path", { d: "M0 0h24v24H0z", fill: "none" })));
6
6
  };
7
7
  export class Eswat2Io {
8
- render() {
9
- return (h("a", { href: url, "aria-label": who, title: who }, pawIcon({})));
10
- }
11
- static get is() { return "eswat2-io"; }
12
- static get encapsulation() { return "shadow"; }
13
- static get originalStyleUrls() {
14
- return {
15
- "$": ["./eswat2-io.css"]
16
- };
17
- }
18
- static get styleUrls() {
19
- return {
20
- "$": ["eswat2-io.css"]
21
- };
22
- }
8
+ render() {
9
+ return (h("a", { href: url, "aria-label": who, title: who }, pawIcon({})));
10
+ }
11
+ static get is() { return "eswat2-io"; }
12
+ static get encapsulation() { return "shadow"; }
13
+ static get originalStyleUrls() {
14
+ return {
15
+ "$": ["./eswat2-io.css"]
16
+ };
17
+ }
18
+ static get styleUrls() {
19
+ return {
20
+ "$": ["eswat2-io.css"]
21
+ };
22
+ }
23
23
  }
@@ -1,118 +1,118 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { copyToClipboard } from "../../utils";
3
3
  export class GaugePageHeader {
4
- constructor() {
5
- this.vehicleInfo = undefined;
6
- }
7
- yearMakeModel() {
8
- const { ModelYear, Make, Model } = this.vehicleInfo || {
9
- ModelYear: 2020,
10
- Make: '-',
11
- Model: '-',
12
- };
13
- return `${ModelYear} ${Make} ${Model}`;
14
- }
15
- isCertified() {
16
- const { IsCertified } = this.vehicleInfo || { IsCertified: false };
17
- return IsCertified;
18
- }
19
- isRetail() {
20
- const { RetailWholesale } = this.vehicleInfo || { RetailWholesale: 'R' };
21
- return RetailWholesale === 'R';
22
- }
23
- isNew() {
24
- const { NewUsed } = this.vehicleInfo || { NewUsed: 'N' };
25
- return NewUsed === 'N';
26
- }
27
- stockNumber() {
28
- const { StockNumber } = this.vehicleInfo || { StockNumber: '-' };
29
- return StockNumber;
30
- }
31
- vin() {
32
- const { Vin } = this.vehicleInfo || { Vin: '-' };
33
- return Vin;
34
- }
35
- daysInInventory() {
36
- const { DaysInInventory } = this.vehicleInfo || { DaysInInventory: 0 };
37
- return `${DaysInInventory} Days`;
38
- }
39
- mileage() {
40
- const { Odometer } = this.vehicleInfo || { Odometer: 0 };
41
- const label = Intl.NumberFormat().format(Odometer);
42
- return `${label} mi`;
43
- }
44
- body() {
45
- const { BodyDescription } = this.vehicleInfo || { BodyDescription: '-' };
46
- return BodyDescription;
47
- }
48
- exteriorColor() {
49
- const { ExteriorColor } = this.vehicleInfo || { ExteriorColor: '-' };
50
- return ExteriorColor;
51
- }
52
- interiorColor() {
53
- const { InteriorColor } = this.vehicleInfo || { InteriorColor: '-' };
54
- return InteriorColor;
55
- }
56
- driveTrain() {
57
- const { DriveTrainType } = this.vehicleInfo || { DriveTrainType: '-' };
58
- return DriveTrainType;
59
- }
60
- engine() {
61
- const { EngineDescription } = this.vehicleInfo || {
62
- EngineDescription: '-',
63
- };
64
- return EngineDescription;
65
- }
66
- transmission() {
67
- const { TransmissionDescription } = this.vehicleInfo || {
68
- TransmissionDescription: '- ',
69
- };
70
- return TransmissionDescription;
71
- }
72
- render() {
73
- var disposition = '';
74
- if (!this.isNew()) {
75
- disposition = this.isCertified() ? (h("span", { class: "certified badge" }, h("span", { role: "label" }, "Certified"))) : (h("span", { class: "not-certified badge" }, h("span", { role: "label" }, "Not Certified")));
76
- }
77
- return [
78
- h("div", { class: "gauge-page-header" }, h("eswat2-io", null), h("div", { class: "year-make-model-container", onClick: () => copyToClipboard(this.yearMakeModel()), title: "Click to Copy Year/Make/Model" }, h("h1", { id: "year-make-model-header" }, this.yearMakeModel()), h("span", { class: "badge-set-container" }, disposition, this.isRetail() ? (h("span", { class: "retail badge" }, h("span", { role: "label" }, "Retail"))) : (h("span", { class: "wholesale badge" }, h("span", { role: "label" }, "Wholesale"))))), h("div", { class: "vehicle-identifier-info-container", onClick: () => copyToClipboard(this.vin()), title: "Click to Copy VIN" }, h("h4", { id: "vehicle-identifier-info-header" }, h("span", { class: "vehicle-info-header-segment capitalize" }, this.stockNumber()), h("span", { class: "vehicle-info-header-segment capitalize" }, this.vin()), h("span", { class: "vehicle-info-header-segment" }, this.daysInInventory()), h("span", { class: "vehicle-info-header-segment" }, this.mileage()))), h("div", { class: "vehicle-data-container" }, h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Body"), h("p", { class: "segment-value" }, this.body())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Color"), h("p", { class: "segment-value" }, this.exteriorColor())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Int. Color"), h("p", { class: "segment-value" }, this.interiorColor())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Drive Train"), h("p", { class: "segment-value" }, this.driveTrain())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Engine"), h("p", { class: "segment-value" }, this.engine())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Transmission"), h("p", { class: "segment-value" }, this.transmission())))),
79
- ];
80
- }
81
- static get is() { return "gauge-page-header"; }
82
- static get encapsulation() { return "shadow"; }
83
- static get originalStyleUrls() {
84
- return {
85
- "$": ["gauge-page-header.css"]
86
- };
87
- }
88
- static get styleUrls() {
89
- return {
90
- "$": ["gauge-page-header.css"]
91
- };
92
- }
93
- static get properties() {
94
- return {
95
- "vehicleInfo": {
96
- "type": "unknown",
97
- "mutable": false,
98
- "complexType": {
99
- "original": "VehicleInfo",
100
- "resolved": "VehicleInfo",
101
- "references": {
102
- "VehicleInfo": {
103
- "location": "import",
104
- "path": "../../typings",
105
- "id": "src/typings/index.ts::VehicleInfo"
106
- }
107
- }
108
- },
109
- "required": false,
110
- "optional": false,
111
- "docs": {
112
- "tags": [],
113
- "text": ""
4
+ constructor() {
5
+ this.vehicleInfo = undefined;
6
+ }
7
+ yearMakeModel() {
8
+ const { ModelYear, Make, Model } = this.vehicleInfo || {
9
+ ModelYear: 2020,
10
+ Make: '-',
11
+ Model: '-',
12
+ };
13
+ return `${ModelYear} ${Make} ${Model}`;
14
+ }
15
+ isCertified() {
16
+ const { IsCertified } = this.vehicleInfo || { IsCertified: false };
17
+ return IsCertified;
18
+ }
19
+ isRetail() {
20
+ const { RetailWholesale } = this.vehicleInfo || { RetailWholesale: 'R' };
21
+ return RetailWholesale === 'R';
22
+ }
23
+ isNew() {
24
+ const { NewUsed } = this.vehicleInfo || { NewUsed: 'N' };
25
+ return NewUsed === 'N';
26
+ }
27
+ stockNumber() {
28
+ const { StockNumber } = this.vehicleInfo || { StockNumber: '-' };
29
+ return StockNumber;
30
+ }
31
+ vin() {
32
+ const { Vin } = this.vehicleInfo || { Vin: '-' };
33
+ return Vin;
34
+ }
35
+ daysInInventory() {
36
+ const { DaysInInventory } = this.vehicleInfo || { DaysInInventory: 0 };
37
+ return `${DaysInInventory} Days`;
38
+ }
39
+ mileage() {
40
+ const { Odometer } = this.vehicleInfo || { Odometer: 0 };
41
+ const label = Intl.NumberFormat().format(Odometer);
42
+ return `${label} mi`;
43
+ }
44
+ body() {
45
+ const { BodyDescription } = this.vehicleInfo || { BodyDescription: '-' };
46
+ return BodyDescription;
47
+ }
48
+ exteriorColor() {
49
+ const { ExteriorColor } = this.vehicleInfo || { ExteriorColor: '-' };
50
+ return ExteriorColor;
51
+ }
52
+ interiorColor() {
53
+ const { InteriorColor } = this.vehicleInfo || { InteriorColor: '-' };
54
+ return InteriorColor;
55
+ }
56
+ driveTrain() {
57
+ const { DriveTrainType } = this.vehicleInfo || { DriveTrainType: '-' };
58
+ return DriveTrainType;
59
+ }
60
+ engine() {
61
+ const { EngineDescription } = this.vehicleInfo || {
62
+ EngineDescription: '-',
63
+ };
64
+ return EngineDescription;
65
+ }
66
+ transmission() {
67
+ const { TransmissionDescription } = this.vehicleInfo || {
68
+ TransmissionDescription: '- ',
69
+ };
70
+ return TransmissionDescription;
71
+ }
72
+ render() {
73
+ var disposition = '';
74
+ if (!this.isNew()) {
75
+ disposition = this.isCertified() ? (h("span", { class: "certified badge" }, h("span", { role: "label" }, "Certified"))) : (h("span", { class: "not-certified badge" }, h("span", { role: "label" }, "Not Certified")));
114
76
  }
115
- }
116
- };
117
- }
77
+ return [
78
+ h("div", { class: "gauge-page-header" }, h("eswat2-io", null), h("div", { class: "year-make-model-container", onClick: () => copyToClipboard(this.yearMakeModel()), title: "Click to Copy Year/Make/Model" }, h("h1", { id: "year-make-model-header" }, this.yearMakeModel()), h("span", { class: "badge-set-container" }, disposition, this.isRetail() ? (h("span", { class: "retail badge" }, h("span", { role: "label" }, "Retail"))) : (h("span", { class: "wholesale badge" }, h("span", { role: "label" }, "Wholesale"))))), h("div", { class: "vehicle-identifier-info-container", onClick: () => copyToClipboard(this.vin()), title: "Click to Copy VIN" }, h("h4", { id: "vehicle-identifier-info-header" }, h("span", { class: "vehicle-info-header-segment capitalize" }, this.stockNumber()), h("span", { class: "vehicle-info-header-segment capitalize" }, this.vin()), h("span", { class: "vehicle-info-header-segment" }, this.daysInInventory()), h("span", { class: "vehicle-info-header-segment" }, this.mileage()))), h("div", { class: "vehicle-data-container" }, h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Body"), h("p", { class: "segment-value" }, this.body())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Color"), h("p", { class: "segment-value" }, this.exteriorColor())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Int. Color"), h("p", { class: "segment-value" }, this.interiorColor())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Drive Train"), h("p", { class: "segment-value" }, this.driveTrain())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Engine"), h("p", { class: "segment-value" }, this.engine())), h("div", { class: "vehicle-info-segment" }, h("h4", { class: "segment-heading" }, "Transmission"), h("p", { class: "segment-value" }, this.transmission())))),
79
+ ];
80
+ }
81
+ static get is() { return "gauge-page-header"; }
82
+ static get encapsulation() { return "shadow"; }
83
+ static get originalStyleUrls() {
84
+ return {
85
+ "$": ["gauge-page-header.css"]
86
+ };
87
+ }
88
+ static get styleUrls() {
89
+ return {
90
+ "$": ["gauge-page-header.css"]
91
+ };
92
+ }
93
+ static get properties() {
94
+ return {
95
+ "vehicleInfo": {
96
+ "type": "unknown",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "VehicleInfo",
100
+ "resolved": "VehicleInfo",
101
+ "references": {
102
+ "VehicleInfo": {
103
+ "location": "import",
104
+ "path": "../../typings",
105
+ "id": "src/typings/index.ts::VehicleInfo"
106
+ }
107
+ }
108
+ },
109
+ "required": false,
110
+ "optional": false,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": ""
114
+ }
115
+ }
116
+ };
117
+ }
118
118
  }
@@ -1,14 +1,14 @@
1
1
  const copyToClipboard = (text) => {
2
- if (!navigator.clipboard) {
3
- // Clipboard API not available
4
- return;
5
- }
6
- try {
7
- navigator.clipboard.writeText(text);
8
- }
9
- catch (err) {
10
- console.error('Failed to copy!', err);
11
- }
2
+ if (!navigator.clipboard) {
3
+ // Clipboard API not available
4
+ return;
5
+ }
6
+ try {
7
+ navigator.clipboard.writeText(text);
8
+ }
9
+ catch (err) {
10
+ console.error('Failed to copy!', err);
11
+ }
12
12
  };
13
13
  export { copyToClipboard };
14
14
  export default copyToClipboard;