@phatvu/web-component-poc 1.0.5 → 1.0.7
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/dist/cjs/fast-button.cjs.entry.js +46 -0
- package/dist/cjs/{fast-button_4.cjs.entry.js → fast-carousel.cjs.entry.js} +1 -231
- package/dist/cjs/fast-input_4.cjs.entry.js +499 -0
- package/dist/cjs/{index-B2BTpdbN.js → index-BEvZs91D.js} +2 -2
- package/dist/cjs/job-card.cjs.entry.js +138 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/web-component-poc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/fast-input/fast-input.css +55 -0
- package/dist/collection/components/fast-input/fast-input.js +335 -0
- package/dist/collection/components/job-card/job-card.css +247 -0
- package/dist/collection/components/job-card/job-card.js +435 -0
- package/dist/collection/components/jobs-item/jobs-item.js +5 -5
- package/dist/collection/components/jobs-list-only/jobs-list-only.js +185 -8
- package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.css +8 -0
- package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +203 -0
- package/dist/components/fast-button.js +1 -1
- package/dist/components/fast-carousel.js +1 -1
- package/dist/components/fast-input.d.ts +11 -0
- package/dist/components/fast-input.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/job-card.d.ts +11 -0
- package/dist/components/job-card.js +1 -0
- package/dist/components/jobs-item.js +1 -1
- package/dist/components/jobs-list-only.js +1 -1
- package/dist/components/jobs-list-reactive.d.ts +11 -0
- package/dist/components/jobs-list-reactive.js +1 -0
- package/dist/components/{p-ClQDwJJB.js → p-DQiaLjLf.js} +1 -1
- package/dist/esm/fast-button.entry.js +44 -0
- package/dist/esm/{fast-button_4.entry.js → fast-carousel.entry.js} +2 -229
- package/dist/esm/fast-input_4.entry.js +494 -0
- package/dist/esm/{index-Dk5CvWmb.js → index-C_ZLQIpp.js} +2 -2
- package/dist/esm/job-card.entry.js +136 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/web-component-poc.js +3 -3
- package/dist/types/components/fast-input/fast-input.d.ts +37 -0
- package/dist/types/components/job-card/job-card.d.ts +93 -0
- package/dist/types/components/jobs-item/jobs-item.d.ts +2 -2
- package/dist/types/components/jobs-list-only/jobs-list-only.d.ts +24 -2
- package/dist/types/components/jobs-list-reactive/jobs-list-reactive.d.ts +26 -0
- package/dist/types/components.d.ts +469 -7
- package/dist/types/mock/jobs-list-only.mock.d.ts +2 -2
- package/dist/types/types/jobs-list.d.ts +6 -2
- package/dist/web-component-poc/p-618fba28.entry.js +1 -0
- package/dist/web-component-poc/p-7d45772f.entry.js +1 -0
- package/dist/web-component-poc/p-bef7c8e2.entry.js +1 -0
- package/dist/web-component-poc/p-cfb9aed9.entry.js +1 -0
- package/dist/web-component-poc/web-component-poc.esm.js +1 -1
- package/hydrate/index.js +534 -6
- package/hydrate/index.mjs +534 -6
- package/package.json +9 -1
- package/dist/web-component-poc/p-df843533.entry.js +0 -1
- /package/dist/components/{p-UM9TUfe3.js → p-BiaJAQXY.js} +0 -0
- /package/dist/web-component-poc/{p-Dk5CvWmb.js → p-C_ZLQIpp.js} +0 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/* Job Card Component Styles */
|
|
2
|
+
|
|
3
|
+
.job-card {
|
|
4
|
+
display: block;
|
|
5
|
+
padding: 16px;
|
|
6
|
+
border: 1px solid #e0e0e0;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
|
|
10
|
+
transition: box-shadow 0.2s ease, border-color 0.2s ease;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.job-card:hover {
|
|
14
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
|
|
15
|
+
border-color: #d0d0d0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Header Section */
|
|
19
|
+
.job-card__header {
|
|
20
|
+
margin-bottom: 12px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.job-card__title {
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-size: 18px;
|
|
26
|
+
font-weight: 700;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
gap: 8px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.job-card__title--link {
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
color: #1f9755;
|
|
36
|
+
transition: color 0.2s ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.job-card__title--link:hover {
|
|
40
|
+
text-decoration: underline;
|
|
41
|
+
color: #1a7a43;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.job-card__reference {
|
|
45
|
+
font-size: 0.875em;
|
|
46
|
+
color: #666;
|
|
47
|
+
background-color: #f5f5f5;
|
|
48
|
+
padding: 2px 6px;
|
|
49
|
+
border-radius: 3px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.job-card__reference--empty {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.job-card__remote {
|
|
57
|
+
background: #e8f5e9;
|
|
58
|
+
color: #2e7d32;
|
|
59
|
+
border-radius: 100px;
|
|
60
|
+
padding: 4px 12px;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
font-size: 11px;
|
|
63
|
+
font-weight: 700;
|
|
64
|
+
line-height: 1.5;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.job-card__remote--empty {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Distance Badge */
|
|
73
|
+
.job-card__distance {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 4px;
|
|
77
|
+
margin-top: 6px;
|
|
78
|
+
font-size: 13px;
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
color: #555;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.job-card__distance--icon {
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.job-card__distance--icon svg {
|
|
89
|
+
width: 16px;
|
|
90
|
+
height: 16px;
|
|
91
|
+
color: #1f9755;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Content Section */
|
|
95
|
+
.job-card__content {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: flex-start;
|
|
98
|
+
justify-content: space-between;
|
|
99
|
+
gap: 12px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.job-card__info {
|
|
103
|
+
flex: 1;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
gap: 8px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Info Rows - Location, Brand, Employment Type */
|
|
110
|
+
.job-card__street,
|
|
111
|
+
.job-card__brand,
|
|
112
|
+
.job-card__employment-type {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
flex-wrap: wrap;
|
|
116
|
+
gap: 4px 6px;
|
|
117
|
+
font-size: 14px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.job-card__street--empty,
|
|
121
|
+
.job-card__brand--empty,
|
|
122
|
+
.job-card__employment-type--empty {
|
|
123
|
+
color: #999;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.job-card__street--icon,
|
|
127
|
+
.job-card__brand--icon,
|
|
128
|
+
.job-card__employment-type--icon {
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.job-card__street--icon svg,
|
|
135
|
+
.job-card__brand--icon svg,
|
|
136
|
+
.job-card__employment-type--icon svg {
|
|
137
|
+
width: 16px;
|
|
138
|
+
height: 16px;
|
|
139
|
+
color: #666;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.job-card__street--label,
|
|
143
|
+
.job-card__brand--label,
|
|
144
|
+
.job-card__employment-type--label {
|
|
145
|
+
color: #333;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.job-card__street--label__wrapper {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 6px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.job-card__street--more-locations__wrapper {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: 2px;
|
|
158
|
+
font-size: 12px;
|
|
159
|
+
margin-left: 2px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.job-card__street--amount {
|
|
163
|
+
font-weight: 600;
|
|
164
|
+
color: #1f9755;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.job-card__street--more-locations {
|
|
168
|
+
color: #999;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Apply Button */
|
|
172
|
+
.job-card__apply {
|
|
173
|
+
display: inline-flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
gap: 6px;
|
|
177
|
+
padding: 10px 16px;
|
|
178
|
+
background-color: #198754;
|
|
179
|
+
color: #fff;
|
|
180
|
+
border-radius: 4px;
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
font-weight: 600;
|
|
183
|
+
font-size: 14px;
|
|
184
|
+
transition: background-color 0.2s ease, transform 0.1s ease;
|
|
185
|
+
white-space: nowrap;
|
|
186
|
+
flex-shrink: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.job-card__apply:hover {
|
|
190
|
+
background-color: #1a6f47;
|
|
191
|
+
transform: translateY(-1px);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.job-card__apply:active {
|
|
195
|
+
transform: translateY(0);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.job-card__apply--icon {
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.job-card__apply--icon svg {
|
|
204
|
+
width: 14px;
|
|
205
|
+
height: 14px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Responsive Design */
|
|
209
|
+
@media (max-width: 768px) {
|
|
210
|
+
.job-card {
|
|
211
|
+
padding: 12px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.job-card__content {
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
gap: 10px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.job-card__apply {
|
|
220
|
+
width: 100%;
|
|
221
|
+
justify-content: center;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.job-card__title {
|
|
225
|
+
font-size: 16px;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (max-width: 480px) {
|
|
230
|
+
.job-card {
|
|
231
|
+
padding: 10px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.job-card__title {
|
|
235
|
+
font-size: 15px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.job-card__distance {
|
|
239
|
+
font-size: 12px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.job-card__street,
|
|
243
|
+
.job-card__brand,
|
|
244
|
+
.job-card__employment-type {
|
|
245
|
+
font-size: 13px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to get formatted location label from location object
|
|
4
|
+
*/
|
|
5
|
+
function getLocationLabel(loc) {
|
|
6
|
+
if (loc.cityStateAbbr)
|
|
7
|
+
return loc.cityStateAbbr;
|
|
8
|
+
const parts = [loc.streetAddress, loc.city, loc.stateAbbr || loc.state, loc.countryAbbr || loc.country].filter(Boolean);
|
|
9
|
+
return parts.join(', ') || loc.locationText || '';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Helper function to get the first location from job locations
|
|
13
|
+
*/
|
|
14
|
+
function getFirstLocation(job) {
|
|
15
|
+
const locs = job.locations;
|
|
16
|
+
if (!locs?.length)
|
|
17
|
+
return undefined;
|
|
18
|
+
return locs[0];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* JobCard Component
|
|
22
|
+
*
|
|
23
|
+
* A reusable card component for displaying job information based on the React JobItem component.
|
|
24
|
+
* Features include:
|
|
25
|
+
* - Job title with apply link
|
|
26
|
+
* - Location with distance
|
|
27
|
+
* - Brand/company name
|
|
28
|
+
* - Employment type
|
|
29
|
+
* - Reference number (optional)
|
|
30
|
+
* - Remote indicator (optional)
|
|
31
|
+
* - Multi-location support
|
|
32
|
+
* - Custom extra fields
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <job-card
|
|
37
|
+
* .job={jobData}
|
|
38
|
+
* applyButtonText="Apply"
|
|
39
|
+
* showBrand="true"
|
|
40
|
+
* showEmploymentType="true"
|
|
41
|
+
* ></job-card>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class JobCard {
|
|
45
|
+
/**
|
|
46
|
+
* The job data object to display. Accepts either a Job object or a JSON string.
|
|
47
|
+
*/
|
|
48
|
+
job;
|
|
49
|
+
/**
|
|
50
|
+
* Index of the job in a list (used for accessibility)
|
|
51
|
+
*/
|
|
52
|
+
index = 0;
|
|
53
|
+
/**
|
|
54
|
+
* Text for the apply button
|
|
55
|
+
*/
|
|
56
|
+
applyButtonText = 'Apply Now';
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show the brand/company name
|
|
59
|
+
*/
|
|
60
|
+
showBrand = true;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to show the reference number
|
|
63
|
+
*/
|
|
64
|
+
showReference = false;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to show employment type
|
|
67
|
+
*/
|
|
68
|
+
showEmploymentType = true;
|
|
69
|
+
/**
|
|
70
|
+
* Text shown for multiple locations
|
|
71
|
+
*/
|
|
72
|
+
multiLocationText = 'More locations';
|
|
73
|
+
/**
|
|
74
|
+
* Text shown for remote jobs
|
|
75
|
+
*/
|
|
76
|
+
remoteLocationText = 'Remote';
|
|
77
|
+
/**
|
|
78
|
+
* Whether to show distances in kilometers instead of miles
|
|
79
|
+
*/
|
|
80
|
+
enableKilometers = false;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to show commute time
|
|
83
|
+
*/
|
|
84
|
+
showCommuteTime = false;
|
|
85
|
+
/**
|
|
86
|
+
* Format string for street address (not used in base web component)
|
|
87
|
+
*/
|
|
88
|
+
streetFormat = '{street}, {city_state_abbr}';
|
|
89
|
+
/** Extra CSS class on the root inner element (avoid prop name "className", reserved on HTMLElement). */
|
|
90
|
+
rootClass = '';
|
|
91
|
+
/**
|
|
92
|
+
* Custom extra fields configuration
|
|
93
|
+
*/
|
|
94
|
+
extraFieldsConfig = [];
|
|
95
|
+
/**
|
|
96
|
+
* Format distance with unit
|
|
97
|
+
*/
|
|
98
|
+
formatDistance(distance) {
|
|
99
|
+
const value = this.enableKilometers ? distance * 1.60934 : distance;
|
|
100
|
+
const unit = this.enableKilometers ? 'Km' : 'Miles';
|
|
101
|
+
const str = `${value.toFixed(1)} ${unit}`.replace('.0', '');
|
|
102
|
+
return str;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Is Empty utility
|
|
106
|
+
*/
|
|
107
|
+
isEmpty(value) {
|
|
108
|
+
if (value === null || value === undefined || value === '') {
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Parse job data from prop - handles both object and JSON string
|
|
118
|
+
*/
|
|
119
|
+
getJobData() {
|
|
120
|
+
if (!this.job)
|
|
121
|
+
return null;
|
|
122
|
+
if (typeof this.job === 'string') {
|
|
123
|
+
try {
|
|
124
|
+
return JSON.parse(this.job);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
console.warn('job-card: Failed to parse job JSON string');
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return this.job;
|
|
132
|
+
}
|
|
133
|
+
render() {
|
|
134
|
+
const job = this.getJobData();
|
|
135
|
+
if (!job)
|
|
136
|
+
return null;
|
|
137
|
+
const firstLoc = getFirstLocation(job);
|
|
138
|
+
const locationLabel = firstLoc ? getLocationLabel(firstLoc) : '';
|
|
139
|
+
const distance = firstLoc?.distance ?? 0;
|
|
140
|
+
const distanceLabel = distance > 0 ? this.formatDistance(distance) : '';
|
|
141
|
+
const applyHref = job.applyURL ||
|
|
142
|
+
(job.originalURL ? `${typeof window !== 'undefined' ? window.location.origin : ''}${job.originalURL}` : '#');
|
|
143
|
+
const applyLabel = `${this.applyButtonText}, ${job.title || ''}`;
|
|
144
|
+
const locs = job.locations ?? [];
|
|
145
|
+
const hasMultipleLocations = locs.length > 1;
|
|
146
|
+
return (h("div", { class: `job-card ${this.rootClass}`.trim() }, h("div", { class: "job-card__header" }, h("h3", { class: "job-card__title" }, h("a", { class: "job-card__title--link", href: applyHref, target: "_blank", rel: "noopener noreferrer" }, job.title || ''), this.showReference && (h("span", { class: `job-card__reference ${job.reference ? '' : 'job-card__reference--empty'}` }, job.reference || '')), job.isRemote && (h("span", { class: this.remoteLocationText ? 'job-card__remote' : 'job-card__remote job-card__remote--empty' }, this.remoteLocationText))), distanceLabel && (h("div", { class: "job-card__distance" }, h("span", { class: "job-card__distance--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 8v4l2 2" }))), h("span", { class: "job-card__distance--label" }, distanceLabel)))), h("div", { class: "job-card__content" }, h("div", { class: "job-card__info" }, h("div", { class: locs.length ? 'job-card__street' : 'job-card__street job-card__street--empty' }, h("div", { class: "job-card__street--label__wrapper" }, h("span", { class: "job-card__street--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z" }), h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z" }))), h("span", { class: "job-card__street--label" }, locationLabel || '—')), hasMultipleLocations && (h("div", { class: "job-card__street--more-locations__wrapper" }, h("span", { class: "job-card__street--amount" }, "+", locs.length - 1), h("span", { class: "job-card__street--more-locations" }, this.multiLocationText)))), this.showBrand && (h("div", { class: job.brandName ? 'job-card__brand' : 'job-card__brand job-card__brand--empty' }, h("span", { class: "job-card__brand--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z" }))), h("span", { class: "job-card__brand--label" }, job.brandName || '—'))), this.showEmploymentType && (h("div", { class: job.employmentType?.length
|
|
147
|
+
? 'job-card__employment-type'
|
|
148
|
+
: 'job-card__employment-type job-card__employment-type--empty' }, h("span", { class: "job-card__employment-type--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z" }))), job.employmentType?.length ? (job.employmentType?.map((type) => (h("span", { key: type, class: "job-card__employment-type--label" }, type)))) : (h("span", { class: "job-card__employment-type--label" }, "\u2014")))), (job.jobCardExtraFields ?? []).length > 0 &&
|
|
149
|
+
job.jobCardExtraFields?.map((field, idx) => (h("div", { key: idx, class: !this.isEmpty(field.value) ? `${field.classname}` : `${field.classname}--empty` }, Array.isArray(field.value) ? (field.value.map((item, itemIdx) => (h("span", { key: itemIdx, class: `${field.classname}--label` }, item)))) : (h("span", { class: `${field.classname}--label` }, field.value)))))), h("a", { class: "job-card__apply", href: applyHref, target: "_blank", rel: "noopener noreferrer", "aria-label": applyLabel }, h("span", { class: "job-card__apply--label" }, this.applyButtonText), h("span", { class: "job-card__apply--icon" }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3" })))))));
|
|
150
|
+
}
|
|
151
|
+
static get is() { return "job-card"; }
|
|
152
|
+
static get originalStyleUrls() {
|
|
153
|
+
return {
|
|
154
|
+
"$": ["job-card.css"]
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
static get styleUrls() {
|
|
158
|
+
return {
|
|
159
|
+
"$": ["job-card.css"]
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
static get properties() {
|
|
163
|
+
return {
|
|
164
|
+
"job": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "Job | string",
|
|
169
|
+
"resolved": "Job | string",
|
|
170
|
+
"references": {
|
|
171
|
+
"Job": {
|
|
172
|
+
"location": "import",
|
|
173
|
+
"path": "../../types/jobs-list",
|
|
174
|
+
"id": "src/types/jobs-list.ts::Job",
|
|
175
|
+
"referenceLocation": "Job"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "The job data object to display. Accepts either a Job object or a JSON string."
|
|
184
|
+
},
|
|
185
|
+
"getter": false,
|
|
186
|
+
"setter": false,
|
|
187
|
+
"reflect": false,
|
|
188
|
+
"attribute": "job"
|
|
189
|
+
},
|
|
190
|
+
"index": {
|
|
191
|
+
"type": "number",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "number",
|
|
195
|
+
"resolved": "number",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "Index of the job in a list (used for accessibility)"
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"attribute": "index",
|
|
208
|
+
"defaultValue": "0"
|
|
209
|
+
},
|
|
210
|
+
"applyButtonText": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "string",
|
|
215
|
+
"resolved": "string",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": false,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Text for the apply button"
|
|
223
|
+
},
|
|
224
|
+
"getter": false,
|
|
225
|
+
"setter": false,
|
|
226
|
+
"reflect": false,
|
|
227
|
+
"attribute": "apply-button-text",
|
|
228
|
+
"defaultValue": "'Apply Now'"
|
|
229
|
+
},
|
|
230
|
+
"showBrand": {
|
|
231
|
+
"type": "boolean",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "boolean",
|
|
235
|
+
"resolved": "boolean",
|
|
236
|
+
"references": {}
|
|
237
|
+
},
|
|
238
|
+
"required": false,
|
|
239
|
+
"optional": false,
|
|
240
|
+
"docs": {
|
|
241
|
+
"tags": [],
|
|
242
|
+
"text": "Whether to show the brand/company name"
|
|
243
|
+
},
|
|
244
|
+
"getter": false,
|
|
245
|
+
"setter": false,
|
|
246
|
+
"reflect": false,
|
|
247
|
+
"attribute": "show-brand",
|
|
248
|
+
"defaultValue": "true"
|
|
249
|
+
},
|
|
250
|
+
"showReference": {
|
|
251
|
+
"type": "boolean",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "boolean",
|
|
255
|
+
"resolved": "boolean",
|
|
256
|
+
"references": {}
|
|
257
|
+
},
|
|
258
|
+
"required": false,
|
|
259
|
+
"optional": false,
|
|
260
|
+
"docs": {
|
|
261
|
+
"tags": [],
|
|
262
|
+
"text": "Whether to show the reference number"
|
|
263
|
+
},
|
|
264
|
+
"getter": false,
|
|
265
|
+
"setter": false,
|
|
266
|
+
"reflect": false,
|
|
267
|
+
"attribute": "show-reference",
|
|
268
|
+
"defaultValue": "false"
|
|
269
|
+
},
|
|
270
|
+
"showEmploymentType": {
|
|
271
|
+
"type": "boolean",
|
|
272
|
+
"mutable": false,
|
|
273
|
+
"complexType": {
|
|
274
|
+
"original": "boolean",
|
|
275
|
+
"resolved": "boolean",
|
|
276
|
+
"references": {}
|
|
277
|
+
},
|
|
278
|
+
"required": false,
|
|
279
|
+
"optional": false,
|
|
280
|
+
"docs": {
|
|
281
|
+
"tags": [],
|
|
282
|
+
"text": "Whether to show employment type"
|
|
283
|
+
},
|
|
284
|
+
"getter": false,
|
|
285
|
+
"setter": false,
|
|
286
|
+
"reflect": false,
|
|
287
|
+
"attribute": "show-employment-type",
|
|
288
|
+
"defaultValue": "true"
|
|
289
|
+
},
|
|
290
|
+
"multiLocationText": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"mutable": false,
|
|
293
|
+
"complexType": {
|
|
294
|
+
"original": "string",
|
|
295
|
+
"resolved": "string",
|
|
296
|
+
"references": {}
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"optional": false,
|
|
300
|
+
"docs": {
|
|
301
|
+
"tags": [],
|
|
302
|
+
"text": "Text shown for multiple locations"
|
|
303
|
+
},
|
|
304
|
+
"getter": false,
|
|
305
|
+
"setter": false,
|
|
306
|
+
"reflect": false,
|
|
307
|
+
"attribute": "multi-location-text",
|
|
308
|
+
"defaultValue": "'More locations'"
|
|
309
|
+
},
|
|
310
|
+
"remoteLocationText": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "string",
|
|
315
|
+
"resolved": "string",
|
|
316
|
+
"references": {}
|
|
317
|
+
},
|
|
318
|
+
"required": false,
|
|
319
|
+
"optional": false,
|
|
320
|
+
"docs": {
|
|
321
|
+
"tags": [],
|
|
322
|
+
"text": "Text shown for remote jobs"
|
|
323
|
+
},
|
|
324
|
+
"getter": false,
|
|
325
|
+
"setter": false,
|
|
326
|
+
"reflect": false,
|
|
327
|
+
"attribute": "remote-location-text",
|
|
328
|
+
"defaultValue": "'Remote'"
|
|
329
|
+
},
|
|
330
|
+
"enableKilometers": {
|
|
331
|
+
"type": "boolean",
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "boolean",
|
|
335
|
+
"resolved": "boolean",
|
|
336
|
+
"references": {}
|
|
337
|
+
},
|
|
338
|
+
"required": false,
|
|
339
|
+
"optional": false,
|
|
340
|
+
"docs": {
|
|
341
|
+
"tags": [],
|
|
342
|
+
"text": "Whether to show distances in kilometers instead of miles"
|
|
343
|
+
},
|
|
344
|
+
"getter": false,
|
|
345
|
+
"setter": false,
|
|
346
|
+
"reflect": false,
|
|
347
|
+
"attribute": "enable-kilometers",
|
|
348
|
+
"defaultValue": "false"
|
|
349
|
+
},
|
|
350
|
+
"showCommuteTime": {
|
|
351
|
+
"type": "boolean",
|
|
352
|
+
"mutable": false,
|
|
353
|
+
"complexType": {
|
|
354
|
+
"original": "boolean",
|
|
355
|
+
"resolved": "boolean",
|
|
356
|
+
"references": {}
|
|
357
|
+
},
|
|
358
|
+
"required": false,
|
|
359
|
+
"optional": false,
|
|
360
|
+
"docs": {
|
|
361
|
+
"tags": [],
|
|
362
|
+
"text": "Whether to show commute time"
|
|
363
|
+
},
|
|
364
|
+
"getter": false,
|
|
365
|
+
"setter": false,
|
|
366
|
+
"reflect": false,
|
|
367
|
+
"attribute": "show-commute-time",
|
|
368
|
+
"defaultValue": "false"
|
|
369
|
+
},
|
|
370
|
+
"streetFormat": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"mutable": false,
|
|
373
|
+
"complexType": {
|
|
374
|
+
"original": "string",
|
|
375
|
+
"resolved": "string",
|
|
376
|
+
"references": {}
|
|
377
|
+
},
|
|
378
|
+
"required": false,
|
|
379
|
+
"optional": false,
|
|
380
|
+
"docs": {
|
|
381
|
+
"tags": [],
|
|
382
|
+
"text": "Format string for street address (not used in base web component)"
|
|
383
|
+
},
|
|
384
|
+
"getter": false,
|
|
385
|
+
"setter": false,
|
|
386
|
+
"reflect": false,
|
|
387
|
+
"attribute": "street-format",
|
|
388
|
+
"defaultValue": "'{street}, {city_state_abbr}'"
|
|
389
|
+
},
|
|
390
|
+
"rootClass": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"mutable": false,
|
|
393
|
+
"complexType": {
|
|
394
|
+
"original": "string",
|
|
395
|
+
"resolved": "string",
|
|
396
|
+
"references": {}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": "Extra CSS class on the root inner element (avoid prop name \"className\", reserved on HTMLElement)."
|
|
403
|
+
},
|
|
404
|
+
"getter": false,
|
|
405
|
+
"setter": false,
|
|
406
|
+
"reflect": false,
|
|
407
|
+
"attribute": "root-class",
|
|
408
|
+
"defaultValue": "''"
|
|
409
|
+
},
|
|
410
|
+
"extraFieldsConfig": {
|
|
411
|
+
"type": "unknown",
|
|
412
|
+
"mutable": false,
|
|
413
|
+
"complexType": {
|
|
414
|
+
"original": "Array<{ name: string; value: string }>",
|
|
415
|
+
"resolved": "{ name: string; value: string; }[]",
|
|
416
|
+
"references": {
|
|
417
|
+
"Array": {
|
|
418
|
+
"location": "global",
|
|
419
|
+
"id": "global::Array"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": false,
|
|
424
|
+
"optional": false,
|
|
425
|
+
"docs": {
|
|
426
|
+
"tags": [],
|
|
427
|
+
"text": "Custom extra fields configuration"
|
|
428
|
+
},
|
|
429
|
+
"getter": false,
|
|
430
|
+
"setter": false,
|
|
431
|
+
"defaultValue": "[]"
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
}
|
|
@@ -68,14 +68,14 @@ export class JobsItem {
|
|
|
68
68
|
"type": "unknown",
|
|
69
69
|
"mutable": false,
|
|
70
70
|
"complexType": {
|
|
71
|
-
"original": "
|
|
72
|
-
"resolved": "
|
|
71
|
+
"original": "Job",
|
|
72
|
+
"resolved": "Job",
|
|
73
73
|
"references": {
|
|
74
|
-
"
|
|
74
|
+
"Job": {
|
|
75
75
|
"location": "import",
|
|
76
76
|
"path": "../../types/jobs-list",
|
|
77
|
-
"id": "src/types/jobs-list.ts::
|
|
78
|
-
"referenceLocation": "
|
|
77
|
+
"id": "src/types/jobs-list.ts::Job",
|
|
78
|
+
"referenceLocation": "Job"
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
},
|