@phatvu/web-component-poc 1.0.5 → 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
|
@@ -2128,7 +2128,7 @@ const JobsListOnly = class {
|
|
|
2128
2128
|
const totalJob = this.mockData ? jobsArray.length : (this.totalJob || jobsArray.length);
|
|
2129
2129
|
const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
|
|
2130
2130
|
const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
|
|
2131
|
-
return (index.h("div", { key: '
|
|
2131
|
+
return (index.h("div", { key: 'c22b59e35668df06633c8c11ae8a51b463e06b19', class: `jobs-list-root ${this.rootClass}`.trim() }, index.h("div", { key: 'e2b5b1bf68b75dd958b906c18c258faa8f4e1e25', class: "results-container" }, index.h("div", { key: '923d2402d2951d9de47a69c5fd87a80fda382b6e', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (index.h("div", { key: '000c2c2d512f1b48999d628a2517701fc061dd11', class: "card" }, index.h("ul", { key: '7028fc4f1b007eb9ff9bc205201af986c6d0a9ae', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (index.h("div", { key: '4f567c7ddbf7d393469886ce3b4865dcb9f4e761', class: "share-jobs__no-results" }, index.h("h2", { key: '5f1ae77afeca0c37183dc681a9cc42eebaf0e510' }, this.noResultsLine1), index.h("h3", { key: '6f8a754181cabf1befc6a9a4cf811417075af918' }, this.noResultsLine2))), showSuggestionsBlock && (index.h("div", { key: 'a09cc45fbed615bb8672f8e77c2a8793efec2dc5', class: "card primary-color" }, index.h("h4", { key: '9e53bb60ec086f42845d90c807dbd1cb6a88721d', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), index.h("ul", { key: '0769ebd6367255dad56e688cd36a65cc41f1f366', class: "results-list front" }, index.h("li", { key: '7032fc1d77ca040be7d2c949c7bc755c62ef4df3', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), index.h("li", { key: '49e0c6d4cad62448abc42124708472d8c268c7d9', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), index.h("li", { key: 'ad76dbdad20e8de716613baa2bd1e745b6749fa7', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (index.h("li", { key: 'b141b94ceeacd5de8fd430cc9e5e05063953130a', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
|
|
2132
2132
|
}
|
|
2133
2133
|
};
|
|
2134
2134
|
JobsListOnly.style = jobsListOnlyCss();
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-B2BTpdbN.js');
|
|
4
|
+
|
|
5
|
+
const jobCardCss = () => `.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}}`;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Helper function to get formatted location label from location object
|
|
9
|
+
*/
|
|
10
|
+
function getLocationLabel(loc) {
|
|
11
|
+
if (loc.cityStateAbbr)
|
|
12
|
+
return loc.cityStateAbbr;
|
|
13
|
+
const parts = [loc.streetAddress, loc.city, loc.stateAbbr || loc.state, loc.countryAbbr || loc.country].filter(Boolean);
|
|
14
|
+
return parts.join(', ') || loc.locationText || '';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Helper function to get the first location from job locations
|
|
18
|
+
*/
|
|
19
|
+
function getFirstLocation(job) {
|
|
20
|
+
const locs = job.locations;
|
|
21
|
+
if (!locs?.length)
|
|
22
|
+
return undefined;
|
|
23
|
+
return locs[0];
|
|
24
|
+
}
|
|
25
|
+
const JobCard = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
index.registerInstance(this, hostRef);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The job data object to display. Accepts either a Job object or a JSON string.
|
|
31
|
+
*/
|
|
32
|
+
job;
|
|
33
|
+
/**
|
|
34
|
+
* Index of the job in a list (used for accessibility)
|
|
35
|
+
*/
|
|
36
|
+
index = 0;
|
|
37
|
+
/**
|
|
38
|
+
* Text for the apply button
|
|
39
|
+
*/
|
|
40
|
+
applyButtonText = 'Apply Now';
|
|
41
|
+
/**
|
|
42
|
+
* Whether to show the brand/company name
|
|
43
|
+
*/
|
|
44
|
+
showBrand = true;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to show the reference number
|
|
47
|
+
*/
|
|
48
|
+
showReference = false;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show employment type
|
|
51
|
+
*/
|
|
52
|
+
showEmploymentType = true;
|
|
53
|
+
/**
|
|
54
|
+
* Text shown for multiple locations
|
|
55
|
+
*/
|
|
56
|
+
multiLocationText = 'More locations';
|
|
57
|
+
/**
|
|
58
|
+
* Text shown for remote jobs
|
|
59
|
+
*/
|
|
60
|
+
remoteLocationText = 'Remote';
|
|
61
|
+
/**
|
|
62
|
+
* Whether to show distances in kilometers instead of miles
|
|
63
|
+
*/
|
|
64
|
+
enableKilometers = false;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to show commute time
|
|
67
|
+
*/
|
|
68
|
+
showCommuteTime = false;
|
|
69
|
+
/**
|
|
70
|
+
* Format string for street address (not used in base web component)
|
|
71
|
+
*/
|
|
72
|
+
streetFormat = '{street}, {city_state_abbr}';
|
|
73
|
+
/** Extra CSS class on the root inner element (avoid prop name "className", reserved on HTMLElement). */
|
|
74
|
+
rootClass = '';
|
|
75
|
+
/**
|
|
76
|
+
* Custom extra fields configuration
|
|
77
|
+
*/
|
|
78
|
+
extraFieldsConfig = [];
|
|
79
|
+
/**
|
|
80
|
+
* Format distance with unit
|
|
81
|
+
*/
|
|
82
|
+
formatDistance(distance) {
|
|
83
|
+
const value = this.enableKilometers ? distance * 1.60934 : distance;
|
|
84
|
+
const unit = this.enableKilometers ? 'Km' : 'Miles';
|
|
85
|
+
const str = `${value.toFixed(1)} ${unit}`.replace('.0', '');
|
|
86
|
+
return str;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Is Empty utility
|
|
90
|
+
*/
|
|
91
|
+
isEmpty(value) {
|
|
92
|
+
if (value === null || value === undefined || value === '') {
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Parse job data from prop - handles both object and JSON string
|
|
102
|
+
*/
|
|
103
|
+
getJobData() {
|
|
104
|
+
if (!this.job)
|
|
105
|
+
return null;
|
|
106
|
+
if (typeof this.job === 'string') {
|
|
107
|
+
try {
|
|
108
|
+
return JSON.parse(this.job);
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
console.warn('job-card: Failed to parse job JSON string');
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return this.job;
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
const job = this.getJobData();
|
|
119
|
+
if (!job)
|
|
120
|
+
return null;
|
|
121
|
+
const firstLoc = getFirstLocation(job);
|
|
122
|
+
const locationLabel = firstLoc ? getLocationLabel(firstLoc) : '';
|
|
123
|
+
const distance = firstLoc?.distance ?? 0;
|
|
124
|
+
const distanceLabel = distance > 0 ? this.formatDistance(distance) : '';
|
|
125
|
+
const applyHref = job.applyURL ||
|
|
126
|
+
(job.originalURL ? `${typeof window !== 'undefined' ? window.location.origin : ''}${job.originalURL}` : '#');
|
|
127
|
+
const applyLabel = `${this.applyButtonText}, ${job.title || ''}`;
|
|
128
|
+
const locs = job.locations ?? [];
|
|
129
|
+
const hasMultipleLocations = locs.length > 1;
|
|
130
|
+
return (index.h("div", { class: `job-card ${this.rootClass}`.trim() }, index.h("div", { class: "job-card__header" }, index.h("h3", { class: "job-card__title" }, index.h("a", { class: "job-card__title--link", href: applyHref, target: "_blank", rel: "noopener noreferrer" }, job.title || ''), this.showReference && (index.h("span", { class: `job-card__reference ${job.reference ? '' : 'job-card__reference--empty'}` }, job.reference || '')), job.isRemote && (index.h("span", { class: this.remoteLocationText ? 'job-card__remote' : 'job-card__remote job-card__remote--empty' }, this.remoteLocationText))), distanceLabel && (index.h("div", { class: "job-card__distance" }, index.h("span", { class: "job-card__distance--icon" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z" }), index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 8v4l2 2" }))), index.h("span", { class: "job-card__distance--label" }, distanceLabel)))), index.h("div", { class: "job-card__content" }, index.h("div", { class: "job-card__info" }, index.h("div", { class: locs.length ? 'job-card__street' : 'job-card__street job-card__street--empty' }, index.h("div", { class: "job-card__street--label__wrapper" }, index.h("span", { class: "job-card__street--icon" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, index.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" }), index.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" }))), index.h("span", { class: "job-card__street--label" }, locationLabel || '—')), hasMultipleLocations && (index.h("div", { class: "job-card__street--more-locations__wrapper" }, index.h("span", { class: "job-card__street--amount" }, "+", locs.length - 1), index.h("span", { class: "job-card__street--more-locations" }, this.multiLocationText)))), this.showBrand && (index.h("div", { class: job.brandName ? 'job-card__brand' : 'job-card__brand job-card__brand--empty' }, index.h("span", { class: "job-card__brand--icon" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, index.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" }))), index.h("span", { class: "job-card__brand--label" }, job.brandName || '—'))), this.showEmploymentType && (index.h("div", { class: job.employmentType?.length
|
|
131
|
+
? 'job-card__employment-type'
|
|
132
|
+
: 'job-card__employment-type job-card__employment-type--empty' }, index.h("span", { class: "job-card__employment-type--icon" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5" }, index.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) => (index.h("span", { key: type, class: "job-card__employment-type--label" }, type)))) : (index.h("span", { class: "job-card__employment-type--label" }, "\u2014")))), (job.jobCardExtraFields ?? []).length > 0 &&
|
|
133
|
+
job.jobCardExtraFields?.map((field, idx) => (index.h("div", { key: idx, class: !this.isEmpty(field.value) ? `${field.classname}` : `${field.classname}--empty` }, Array.isArray(field.value) ? (field.value.map((item, itemIdx) => (index.h("span", { key: itemIdx, class: `${field.classname}--label` }, item)))) : (index.h("span", { class: `${field.classname}--label` }, field.value)))))), index.h("a", { class: "job-card__apply", href: applyHref, target: "_blank", rel: "noopener noreferrer", "aria-label": applyLabel }, index.h("span", { class: "job-card__apply--label" }, this.applyButtonText), index.h("span", { class: "job-card__apply--icon" }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, index.h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3" })))))));
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
JobCard.style = jobCardCss();
|
|
137
|
+
|
|
138
|
+
exports.job_card = JobCard;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["fast-button_4.cjs",[[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"]}],[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[772,"fast-carousel",{"items":[1],"loop":[4],"class":[1],"controlClass":[1,"control-class"],"slideClass":[1,"slide-class"],"itemClass":[1,"item-class"],"scrollPrev":[64],"scrollNext":[64],"goToSlide":[64],"getEmbla":[64]}],[512,"jobs-item",{"job":[16],"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"]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["job-card.cjs",[[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]}]]],["fast-button_4.cjs",[[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"]}],[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[772,"fast-carousel",{"items":[1],"loop":[4],"class":[1],"controlClass":[1,"control-class"],"slideClass":[1,"slide-class"],"itemClass":[1,"item-class"],"scrollPrev":[64],"scrollNext":[64],"goToSlide":[64],"getEmbla":[64]}],[512,"jobs-item",{"job":[16],"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"]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["fast-button_4.cjs",[[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"]}],[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[772,"fast-carousel",{"items":[1],"loop":[4],"class":[1],"controlClass":[1,"control-class"],"slideClass":[1,"slide-class"],"itemClass":[1,"item-class"],"scrollPrev":[64],"scrollNext":[64],"goToSlide":[64],"getEmbla":[64]}],[512,"jobs-item",{"job":[16],"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"]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["job-card.cjs",[[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]}]]],["fast-button_4.cjs",[[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"]}],[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}],[772,"fast-carousel",{"items":[1],"loop":[4],"class":[1],"controlClass":[1,"control-class"],"slideClass":[1,"slide-class"],"itemClass":[1,"item-class"],"scrollPrev":[64],"scrollNext":[64],"goToSlide":[64],"getEmbla":[64]}],[512,"jobs-item",{"job":[16],"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"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -53,7 +53,7 @@ export class CustomButton {
|
|
|
53
53
|
"references": {
|
|
54
54
|
"ButtonVariant": {
|
|
55
55
|
"location": "local",
|
|
56
|
-
"path": "/Users/phat.vu/Documents/Paradox/web-component-poc/src/components/button/button.tsx",
|
|
56
|
+
"path": "/Users/phat.vu/Documents/Paradox/ui-library/web-component-poc/src/components/button/button.tsx",
|
|
57
57
|
"id": "src/components/button/button.tsx::ButtonVariant"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -79,7 +79,7 @@ export class CustomButton {
|
|
|
79
79
|
"references": {
|
|
80
80
|
"ButtonType": {
|
|
81
81
|
"location": "local",
|
|
82
|
-
"path": "/Users/phat.vu/Documents/Paradox/web-component-poc/src/components/button/button.tsx",
|
|
82
|
+
"path": "/Users/phat.vu/Documents/Paradox/ui-library/web-component-poc/src/components/button/button.tsx",
|
|
83
83
|
"id": "src/components/button/button.tsx::ButtonType"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -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
|
+
}
|