@phatvu/web-component-poc 1.0.4 → 1.0.6
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_4.cjs.entry.js +1 -1
- package/dist/cjs/job-card.cjs.entry.js +138 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-component-poc.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/button/button.js +2 -2
- 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 +6 -6
- package/dist/components/job-card.d.ts +11 -0
- package/dist/components/job-card.js +1 -0
- package/dist/components/jobs-list-only.js +1 -1
- package/dist/esm/fast-button_4.entry.js +1 -1
- package/dist/esm/job-card.entry.js +136 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-component-poc.js +1 -1
- 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 +2 -2
- package/dist/types/components.d.ts +246 -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-52c85341.entry.js +1 -0
- package/dist/web-component-poc/{p-df843533.entry.js → p-96761988.entry.js} +1 -1
- package/dist/web-component-poc/web-component-poc.esm.js +1 -1
- package/hydrate/index.js +181 -1
- package/hydrate/index.mjs +181 -1
- package/package.json +5 -1
- package/dist/web-component-poc/index-pJKMKO-T.js.map +0 -1
- package/dist/web-component-poc/index.esm.js.map +0 -1
- package/dist/web-component-poc/web-component-poc.esm.js.map +0 -1
|
@@ -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
|
},
|
|
@@ -58,7 +58,7 @@ export class JobsListOnly {
|
|
|
58
58
|
const totalJob = this.mockData ? jobsArray.length : (this.totalJob || jobsArray.length);
|
|
59
59
|
const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
|
|
60
60
|
const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
|
|
61
|
-
return (h("div", { key: '
|
|
61
|
+
return (h("div", { key: 'c22b59e35668df06633c8c11ae8a51b463e06b19', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: 'e2b5b1bf68b75dd958b906c18c258faa8f4e1e25', class: "results-container" }, h("div", { key: '923d2402d2951d9de47a69c5fd87a80fda382b6e', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (h("div", { key: '000c2c2d512f1b48999d628a2517701fc061dd11', class: "card" }, h("ul", { key: '7028fc4f1b007eb9ff9bc205201af986c6d0a9ae', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '4f567c7ddbf7d393469886ce3b4865dcb9f4e761', class: "share-jobs__no-results" }, h("h2", { key: '5f1ae77afeca0c37183dc681a9cc42eebaf0e510' }, this.noResultsLine1), h("h3", { key: '6f8a754181cabf1befc6a9a4cf811417075af918' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: 'a09cc45fbed615bb8672f8e77c2a8793efec2dc5', class: "card primary-color" }, h("h4", { key: '9e53bb60ec086f42845d90c807dbd1cb6a88721d', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: '0769ebd6367255dad56e688cd36a65cc41f1f366', class: "results-list front" }, h("li", { key: '7032fc1d77ca040be7d2c949c7bc755c62ef4df3', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '49e0c6d4cad62448abc42124708472d8c268c7d9', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: 'ad76dbdad20e8de716613baa2bd1e745b6749fa7', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: 'b141b94ceeacd5de8fd430cc9e5e05063953130a', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
|
|
62
62
|
}
|
|
63
63
|
static get is() { return "jobs-list-only"; }
|
|
64
64
|
static get originalStyleUrls() {
|
|
@@ -97,14 +97,14 @@ export class JobsListOnly {
|
|
|
97
97
|
"type": "string",
|
|
98
98
|
"mutable": false,
|
|
99
99
|
"complexType": {
|
|
100
|
-
"original": "
|
|
101
|
-
"resolved": "
|
|
100
|
+
"original": "Job[] | string",
|
|
101
|
+
"resolved": "Job[] | string",
|
|
102
102
|
"references": {
|
|
103
|
-
"
|
|
103
|
+
"Job": {
|
|
104
104
|
"location": "import",
|
|
105
105
|
"path": "../../types/jobs-list",
|
|
106
|
-
"id": "src/types/jobs-list.ts::
|
|
107
|
-
"referenceLocation": "
|
|
106
|
+
"id": "src/types/jobs-list.ts::Job",
|
|
107
|
+
"referenceLocation": "Job"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JobCard extends Components.JobCard, HTMLElement {}
|
|
4
|
+
export const JobCard: {
|
|
5
|
+
prototype: JobCard;
|
|
6
|
+
new (): JobCard;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as o,H as t,h as r}from"./p-UM9TUfe3.js";const a=o(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;showCommuteTime=!1;streetFormat="{street}, {city_state_abbr}";rootClass="";extraFieldsConfig=[];formatDistance(e){const o=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*e:e).toFixed(1)} ${o}`.replace(".0","")}isEmpty(e){return null==e||""===e||!(!Array.isArray(e)||0!==e.length)}getJobData(){if(!this.job)return null;if("string"==typeof this.job)try{return JSON.parse(this.job)}catch{return console.warn("job-card: Failed to parse job JSON string"),null}return this.job}render(){const e=this.getJobData();if(!e)return null;const o=function(e){const o=e.locations;if(o?.length)return o[0]}(e),t=o?function(e){return e.cityStateAbbr?e.cityStateAbbr:[e.streetAddress,e.city,e.stateAbbr||e.state,e.countryAbbr||e.country].filter(Boolean).join(", ")||e.locationText||""}(o):"",a=o?.distance??0,n=a>0?this.formatDistance(a):"",s=e.applyURL||(e.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${e.originalURL}`:"#"),i=`${this.applyButtonText}, ${e.title||""}`,c=e.locations??[],l=c.length>1;return r("div",{class:("job-card "+this.rootClass).trim()},r("div",{class:"job-card__header"},r("h3",{class:"job-card__title"},r("a",{class:"job-card__title--link",href:s,target:"_blank",rel:"noopener noreferrer"},e.title||""),this.showReference&&r("span",{class:"job-card__reference "+(e.reference?"":"job-card__reference--empty")},e.reference||""),e.isRemote&&r("span",{class:this.remoteLocationText?"job-card__remote":"job-card__remote job-card__remote--empty"},this.remoteLocationText)),n&&r("div",{class:"job-card__distance"},r("span",{class:"job-card__distance--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),r("span",{class:"job-card__distance--label"},n))),r("div",{class:"job-card__content"},r("div",{class:"job-card__info"},r("div",{class:c.length?"job-card__street":"job-card__street job-card__street--empty"},r("div",{class:"job-card__street--label__wrapper"},r("span",{class:"job-card__street--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),r("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"}))),r("span",{class:"job-card__street--label"},t||"—")),l&&r("div",{class:"job-card__street--more-locations__wrapper"},r("span",{class:"job-card__street--amount"},"+",c.length-1),r("span",{class:"job-card__street--more-locations"},this.multiLocationText))),this.showBrand&&r("div",{class:e.brandName?"job-card__brand":"job-card__brand job-card__brand--empty"},r("span",{class:"job-card__brand--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("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"}))),r("span",{class:"job-card__brand--label"},e.brandName||"—")),this.showEmploymentType&&r("div",{class:e.employmentType?.length?"job-card__employment-type":"job-card__employment-type job-card__employment-type--empty"},r("span",{class:"job-card__employment-type--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},r("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"}))),e.employmentType?.length?e.employmentType?.map((e=>r("span",{key:e,class:"job-card__employment-type--label"},e))):r("span",{class:"job-card__employment-type--label"},"—")),(e.jobCardExtraFields??[]).length>0&&e.jobCardExtraFields?.map(((e,o)=>r("div",{key:o,class:this.isEmpty(e.value)?e.classname+"--empty":""+e.classname},Array.isArray(e.value)?e.value.map(((o,t)=>r("span",{key:t,class:e.classname+"--label"},o))):r("span",{class:e.classname+"--label"},e.value))))),r("a",{class:"job-card__apply",href:s,target:"_blank",rel:"noopener noreferrer","aria-label":i},r("span",{class:"job-card__apply--label"},this.applyButtonText),r("span",{class:"job-card__apply--icon"},r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))))))}static get style(){return".job-card{display:block;padding:16px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);transition:box-shadow 0.2s ease, border-color 0.2s ease}.job-card:hover{box-shadow:0 4px 8px rgba(0, 0, 0, 0.12);border-color:#d0d0d0}.job-card__header{margin-bottom:12px}.job-card__title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.job-card__title--link{text-decoration:none;color:#1f9755;transition:color 0.2s ease}.job-card__title--link:hover{text-decoration:underline;color:#1a7a43}.job-card__reference{font-size:0.875em;color:#666;background-color:#f5f5f5;padding:2px 6px;border-radius:3px}.job-card__reference--empty{display:none}.job-card__remote{background:#e8f5e9;color:#2e7d32;border-radius:100px;padding:4px 12px;text-transform:uppercase;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}.job-card__remote--empty{display:none}.job-card__distance{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;font-weight:500;color:#555}.job-card__distance--icon{display:inline-flex;align-items:center}.job-card__distance--icon svg{width:16px;height:16px;color:#1f9755}.job-card__content{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-card__info{flex:1;display:flex;flex-direction:column;gap:8px}.job-card__street,.job-card__brand,.job-card__employment-type{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:14px}.job-card__street--empty,.job-card__brand--empty,.job-card__employment-type--empty{color:#999}.job-card__street--icon,.job-card__brand--icon,.job-card__employment-type--icon{display:inline-flex;align-items:center;flex-shrink:0}.job-card__street--icon svg,.job-card__brand--icon svg,.job-card__employment-type--icon svg{width:16px;height:16px;color:#666}.job-card__street--label,.job-card__brand--label,.job-card__employment-type--label{color:#333}.job-card__street--label__wrapper{display:flex;align-items:center;gap:6px}.job-card__street--more-locations__wrapper{display:flex;align-items:center;gap:2px;font-size:12px;margin-left:2px}.job-card__street--amount{font-weight:600;color:#1f9755}.job-card__street--more-locations{color:#999}.job-card__apply{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;background-color:#198754;color:#fff;border-radius:4px;text-decoration:none;font-weight:600;font-size:14px;transition:background-color 0.2s ease, transform 0.1s ease;white-space:nowrap;flex-shrink:0}.job-card__apply:hover{background-color:#1a6f47;transform:translateY(-1px)}.job-card__apply:active{transform:translateY(0)}.job-card__apply--icon{display:inline-flex;align-items:center}.job-card__apply--icon svg{width:14px;height:14px}@media (max-width: 768px){.job-card{padding:12px}.job-card__content{flex-direction:column;gap:10px}.job-card__apply{width:100%;justify-content:center}.job-card__title{font-size:16px}}@media (max-width: 480px){.job-card{padding:10px}.job-card__title{font-size:15px}.job-card__distance{font-size:12px}.job-card__street,.job-card__brand,.job-card__employment-type{font-size:13px}}"}},[512,"job-card",{job:[1],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],showCommuteTime:[4,"show-commute-time"],streetFormat:[1,"street-format"],rootClass:[1,"root-class"],extraFieldsConfig:[16]}]);function n(){"undefined"!=typeof customElements&&["job-card"].forEach((o=>{"job-card"===o&&(customElements.get(e(o))||customElements.define(e(o),a))}))}n();const s=a,i=n;export{s as JobCard,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,h as o}from"./p-UM9TUfe3.js";import{d as r}from"./p-ClQDwJJB.js";const i=[{title:"Senior Software Engineer",reference:"REF-001",originalURL:"/jobs/senior-software-engineer",applyURL:"https://apply.example.com/1",brandName:"Engineering",isRemote:!1,locations:[{city:"San Francisco",stateAbbr:"CA",countryAbbr:"US",distance:5.2,streetAddress:"123 Market St",cityStateAbbr:"San Francisco, CA"}],employmentType:["Full-time","Permanent"]},{title:"Product Manager",reference:"",originalURL:"/jobs/product-manager",brandName:"Product",isRemote:!0,locations:[],employmentType:["Full-time"]},{title:"UX Designer",reference:"REF-003",originalURL:"/jobs/ux-designer",brandName:"Design",isRemote:!1,locations:[{city:"New York",stateAbbr:"NY",countryAbbr:"US",distance:0,cityStateAbbr:"New York, NY"},{city:"Boston",stateAbbr:"MA",countryAbbr:"US",cityStateAbbr:"Boston, MA"}],employmentType:["Full-time","Contract"]}],n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost()}mockData=!1;jobs=[];loading=!1;totalJob=0;noResultsLine1="Sorry, we're not able to load results for your search.";noResultsLine2="Please refine your keywords in the search bar above and try again.";applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;streetFormat="{street}, {city_state_abbr}";multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;rootClass="";showSuggestions=!1;clearResultSuggestionsTitleText="Suggestions";clearResultSuggestionsLine1="Try different keywords";clearResultSuggestionsLine2="Make sure everything is spelled correctly";clearResultSuggestionsLine3="Try other locations";clearResultSuggestionsLine4="";getJobsArray(){if(this.mockData)return i;const e=this.jobs;if(Array.isArray(e))return e;if("string"==typeof e)try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}return[]}renderJobItem(e,t){return o("jobs-item",{job:e,index:t,applyButtonText:this.applyButtonText,showBrand:this.showBrand,showReference:this.showReference,showEmploymentType:this.showEmploymentType,multiLocationText:this.multiLocationText,remoteLocationText:this.remoteLocationText,enableKilometers:this.enableKilometers})}render(){const e=this.getJobsArray(),t=!this.mockData&&this.loading,s=this.mockData?e.length:this.totalJob||e.length,r=!t&&0===s&&!this.showSuggestions,i=!t&&0===s&&this.showSuggestions;return o("div",{key:"
|
|
1
|
+
import{t as e,p as t,H as s,h as o}from"./p-UM9TUfe3.js";import{d as r}from"./p-ClQDwJJB.js";const i=[{title:"Senior Software Engineer",reference:"REF-001",originalURL:"/jobs/senior-software-engineer",applyURL:"https://apply.example.com/1",brandName:"Engineering",isRemote:!1,locations:[{city:"San Francisco",stateAbbr:"CA",countryAbbr:"US",distance:5.2,streetAddress:"123 Market St",cityStateAbbr:"San Francisco, CA"}],employmentType:["Full-time","Permanent"]},{title:"Product Manager",reference:"",originalURL:"/jobs/product-manager",brandName:"Product",isRemote:!0,locations:[],employmentType:["Full-time"]},{title:"UX Designer",reference:"REF-003",originalURL:"/jobs/ux-designer",brandName:"Design",isRemote:!1,locations:[{city:"New York",stateAbbr:"NY",countryAbbr:"US",distance:0,cityStateAbbr:"New York, NY"},{city:"Boston",stateAbbr:"MA",countryAbbr:"US",cityStateAbbr:"Boston, MA"}],employmentType:["Full-time","Contract"]}],n=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost()}mockData=!1;jobs=[];loading=!1;totalJob=0;noResultsLine1="Sorry, we're not able to load results for your search.";noResultsLine2="Please refine your keywords in the search bar above and try again.";applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;streetFormat="{street}, {city_state_abbr}";multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;rootClass="";showSuggestions=!1;clearResultSuggestionsTitleText="Suggestions";clearResultSuggestionsLine1="Try different keywords";clearResultSuggestionsLine2="Make sure everything is spelled correctly";clearResultSuggestionsLine3="Try other locations";clearResultSuggestionsLine4="";getJobsArray(){if(this.mockData)return i;const e=this.jobs;if(Array.isArray(e))return e;if("string"==typeof e)try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}return[]}renderJobItem(e,t){return o("jobs-item",{job:e,index:t,applyButtonText:this.applyButtonText,showBrand:this.showBrand,showReference:this.showReference,showEmploymentType:this.showEmploymentType,multiLocationText:this.multiLocationText,remoteLocationText:this.remoteLocationText,enableKilometers:this.enableKilometers})}render(){const e=this.getJobsArray(),t=!this.mockData&&this.loading,s=this.mockData?e.length:this.totalJob||e.length,r=!t&&0===s&&!this.showSuggestions,i=!t&&0===s&&this.showSuggestions;return o("div",{key:"c22b59e35668df06633c8c11ae8a51b463e06b19",class:("jobs-list-root "+this.rootClass).trim()},o("div",{key:"e2b5b1bf68b75dd958b906c18c258faa8f4e1e25",class:"results-container"},o("div",{key:"923d2402d2951d9de47a69c5fd87a80fda382b6e",class:t?"loader":"loader hide","aria-hidden":!t}),s>0&&o("div",{key:"000c2c2d512f1b48999d628a2517701fc061dd11",class:"card"},o("ul",{key:"7028fc4f1b007eb9ff9bc205201af986c6d0a9ae",class:"results-list front"},e.map(((e,t)=>this.renderJobItem(e,t))))),r&&o("div",{key:"4f567c7ddbf7d393469886ce3b4865dcb9f4e761",class:"share-jobs__no-results"},o("h2",{key:"5f1ae77afeca0c37183dc681a9cc42eebaf0e510"},this.noResultsLine1),o("h3",{key:"6f8a754181cabf1befc6a9a4cf811417075af918"},this.noResultsLine2)),i&&o("div",{key:"a09cc45fbed615bb8672f8e77c2a8793efec2dc5",class:"card primary-color"},o("h4",{key:"9e53bb60ec086f42845d90c807dbd1cb6a88721d",class:"result-suggestions-title"},this.clearResultSuggestionsTitleText,":"),o("ul",{key:"0769ebd6367255dad56e688cd36a65cc41f1f366",class:"results-list front"},o("li",{key:"7032fc1d77ca040be7d2c949c7bc755c62ef4df3",class:"result-suggestions-line"},this.clearResultSuggestionsLine1),o("li",{key:"49e0c6d4cad62448abc42124708472d8c268c7d9",class:"result-suggestions-line"},this.clearResultSuggestionsLine2),o("li",{key:"ad76dbdad20e8de716613baa2bd1e745b6749fa7",class:"result-suggestions-line"},this.clearResultSuggestionsLine3),this.clearResultSuggestionsLine4&&o("li",{key:"b141b94ceeacd5de8fd430cc9e5e05063953130a",class:"result-suggestions-line"},this.clearResultSuggestionsLine4)))))}static get style(){return":host{display:block}.jobs-list-root{list-style:none}.results-container{position:relative}.loader{display:inline-block;width:24px;height:24px;border:2px solid #ddd;border-top-color:#1f9755;border-radius:50%;animation:jobs-list-spin 0.8s linear infinite}.loader.hide{display:none}@keyframes jobs-list-spin{to{transform:rotate(360deg)}}.card{border:0}.results-list{list-style:none;margin:0;padding:0;display:block}.results-list.front{margin:3px 0}.share-jobs__no-results{padding:24px;text-align:center}.share-jobs__no-results h2,.share-jobs__no-results h3{margin:8px 0;font-weight:600}.card.primary-color{padding:16px;border-radius:4px;background:#f8f9fa}.result-suggestions-title{margin:0 0 12px 0;font-size:16px}.results-list .result-suggestions-line{list-style:none;margin:4px 0}"}},[512,"jobs-list-only",{mockData:[4,"mock-data"],jobs:[1],loading:[4],totalJob:[2,"total-job"],noResultsLine1:[1,"no-results-line-1"],noResultsLine2:[1,"no-results-line-2"],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],streetFormat:[1,"street-format"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],rootClass:[1,"root-class"],showSuggestions:[4,"show-suggestions"],clearResultSuggestionsTitleText:[1,"clear-result-suggestions-title-text"],clearResultSuggestionsLine1:[1,"clear-result-suggestions-line-1"],clearResultSuggestionsLine2:[1,"clear-result-suggestions-line-2"],clearResultSuggestionsLine3:[1,"clear-result-suggestions-line-3"],clearResultSuggestionsLine4:[1,"clear-result-suggestions-line-4"]}]);function a(){"undefined"!=typeof customElements&&["jobs-list-only","jobs-item"].forEach((t=>{switch(t){case"jobs-list-only":customElements.get(e(t))||customElements.define(e(t),n);break;case"jobs-item":customElements.get(e(t))||r()}}))}a();const l=n,c=a;export{l as JobsListOnly,c as defineCustomElement}
|
|
@@ -2126,7 +2126,7 @@ const JobsListOnly = class {
|
|
|
2126
2126
|
const totalJob = this.mockData ? jobsArray.length : (this.totalJob || jobsArray.length);
|
|
2127
2127
|
const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
|
|
2128
2128
|
const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
|
|
2129
|
-
return (h("div", { key: '
|
|
2129
|
+
return (h("div", { key: 'c22b59e35668df06633c8c11ae8a51b463e06b19', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: 'e2b5b1bf68b75dd958b906c18c258faa8f4e1e25', class: "results-container" }, h("div", { key: '923d2402d2951d9de47a69c5fd87a80fda382b6e', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (h("div", { key: '000c2c2d512f1b48999d628a2517701fc061dd11', class: "card" }, h("ul", { key: '7028fc4f1b007eb9ff9bc205201af986c6d0a9ae', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '4f567c7ddbf7d393469886ce3b4865dcb9f4e761', class: "share-jobs__no-results" }, h("h2", { key: '5f1ae77afeca0c37183dc681a9cc42eebaf0e510' }, this.noResultsLine1), h("h3", { key: '6f8a754181cabf1befc6a9a4cf811417075af918' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: 'a09cc45fbed615bb8672f8e77c2a8793efec2dc5', class: "card primary-color" }, h("h4", { key: '9e53bb60ec086f42845d90c807dbd1cb6a88721d', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: '0769ebd6367255dad56e688cd36a65cc41f1f366', class: "results-list front" }, h("li", { key: '7032fc1d77ca040be7d2c949c7bc755c62ef4df3', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '49e0c6d4cad62448abc42124708472d8c268c7d9', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: 'ad76dbdad20e8de716613baa2bd1e745b6749fa7', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: 'b141b94ceeacd5de8fd430cc9e5e05063953130a', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
|
|
2130
2130
|
}
|
|
2131
2131
|
};
|
|
2132
2132
|
JobsListOnly.style = jobsListOnlyCss();
|