@phatvu/web-component-poc 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/fast-button_2.cjs.entry.js +211 -0
- package/dist/cjs/fast-carousel.cjs.entry.js +1909 -0
- package/dist/cjs/index-C756SOR-.js +2225 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/web-component-poc.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +15 -0
- package/dist/collection/components/button/button.css +76 -0
- package/dist/collection/components/button/button.js +145 -0
- package/dist/collection/components/fast-carousel/carousel.css +98 -0
- package/dist/collection/components/fast-carousel/carousel.js +439 -0
- package/dist/collection/components/jobs-list-only-ui/jobs-list-only-ui.css +228 -0
- package/dist/collection/components/jobs-list-only-ui/jobs-list-only-ui.js +543 -0
- package/dist/collection/index.js +10 -0
- package/dist/collection/mock/jobs-list-only.mock.js +60 -0
- package/dist/collection/types/jobs-list.js +1 -0
- package/dist/collection/utils/utils.js +3 -0
- package/dist/components/fast-button.js +1 -0
- package/dist/components/fast-carousel.js +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/jobs-list-only-ui.js +1 -0
- package/dist/components/p-Cw2MJ5l2.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/{web-component-poc/jobs-list-only-ui.entry.js → esm/fast-button_2.entry.js} +44 -9
- package/dist/{web-component-poc → esm}/fast-carousel.entry.js +1 -4
- package/dist/esm/index-D7_MJBO8.js +2217 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/web-component-poc.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/web-component-poc/index-xE9n11HX.js.map +1 -0
- package/dist/web-component-poc/index.esm.js +1 -18
- package/dist/web-component-poc/p-0bc6d45d.entry.js +1 -0
- package/dist/web-component-poc/p-8ab359cc.entry.js +1 -0
- package/dist/web-component-poc/p-D7_MJBO8.js +2 -0
- package/dist/web-component-poc/p-DQuL1Twl.js +1 -0
- package/dist/web-component-poc/web-component-poc.esm.js +1 -50
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +25150 -0
- package/hydrate/index.mjs +25140 -0
- package/hydrate/package.json +12 -0
- package/package.json +11 -2
- package/dist/web-component-poc/fast-button.entry.js +0 -47
- package/dist/web-component-poc/fast-button.entry.js.map +0 -1
- package/dist/web-component-poc/fast-carousel.entry.js.map +0 -1
- package/dist/web-component-poc/index-B0WZf8UB.js +0 -4585
- package/dist/web-component-poc/index-B0WZf8UB.js.map +0 -1
- package/dist/web-component-poc/jobs-list-only-ui.entry.js.map +0 -1
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { mockJobsListOnly } from "../../mock/jobs-list-only.mock";
|
|
3
|
+
const defaultNoResultsLine1 = "Sorry, we're not able to load results for your search.";
|
|
4
|
+
const defaultNoResultsLine2 = 'Please refine your keywords in the search bar above and try again.';
|
|
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
|
+
function getFirstLocation(job) {
|
|
12
|
+
const locs = job.locations;
|
|
13
|
+
if (!locs?.length)
|
|
14
|
+
return undefined;
|
|
15
|
+
return locs[0];
|
|
16
|
+
}
|
|
17
|
+
export class JobsListOnlyUI {
|
|
18
|
+
/**
|
|
19
|
+
* When "true", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent.
|
|
20
|
+
*/
|
|
21
|
+
mockData = false;
|
|
22
|
+
/** List of jobs to display. Pass as JSON string from attribute or as array via property (e.g. from React). Ignored when mock-data="true". */
|
|
23
|
+
jobs = [];
|
|
24
|
+
/** Show loading spinner. Ignored when mock-data="true" (mock shows data immediately). */
|
|
25
|
+
loading = false;
|
|
26
|
+
/** Total job count (for screen readers / schema). */
|
|
27
|
+
totalJob = 0;
|
|
28
|
+
noResultsLine1 = defaultNoResultsLine1;
|
|
29
|
+
noResultsLine2 = defaultNoResultsLine2;
|
|
30
|
+
applyButtonText = 'Apply Now';
|
|
31
|
+
showBrand = true;
|
|
32
|
+
showReference = false;
|
|
33
|
+
showEmploymentType = true;
|
|
34
|
+
streetFormat = '{street}, {city_state_abbr}';
|
|
35
|
+
multiLocationText = 'More locations';
|
|
36
|
+
remoteLocationText = 'Remote';
|
|
37
|
+
enableKilometers = false;
|
|
38
|
+
/** Extra CSS class on the root element (avoid prop name "class" / "classname" reserved). */
|
|
39
|
+
rootClass = '';
|
|
40
|
+
showSuggestions = false;
|
|
41
|
+
clearResultSuggestionsTitleText = 'Suggestions';
|
|
42
|
+
clearResultSuggestionsLine1 = 'Try different keywords';
|
|
43
|
+
clearResultSuggestionsLine2 = 'Make sure everything is spelled correctly';
|
|
44
|
+
clearResultSuggestionsLine3 = 'Try other locations';
|
|
45
|
+
clearResultSuggestionsLine4 = '';
|
|
46
|
+
getJobsArray() {
|
|
47
|
+
if (this.mockData) {
|
|
48
|
+
return mockJobsListOnly;
|
|
49
|
+
}
|
|
50
|
+
const j = this.jobs;
|
|
51
|
+
if (Array.isArray(j))
|
|
52
|
+
return j;
|
|
53
|
+
if (typeof j === 'string') {
|
|
54
|
+
try {
|
|
55
|
+
const parsed = JSON.parse(j);
|
|
56
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
formatDistance(distance) {
|
|
65
|
+
const value = this.enableKilometers ? distance * 1.60934 : distance;
|
|
66
|
+
const unit = this.enableKilometers ? 'Km' : 'Miles';
|
|
67
|
+
const str = `${value.toFixed(1)} ${unit}`.replace('.0', '');
|
|
68
|
+
return str;
|
|
69
|
+
}
|
|
70
|
+
renderJobItem(job, _index) {
|
|
71
|
+
const firstLoc = getFirstLocation(job);
|
|
72
|
+
const locationLabel = firstLoc ? getLocationLabel(firstLoc) : '';
|
|
73
|
+
const distance = firstLoc?.distance ?? 0;
|
|
74
|
+
const distanceLabel = distance > 0 ? this.formatDistance(distance) : '';
|
|
75
|
+
const applyHref = job.applyURL || (job.originalURL ? `${typeof window !== 'undefined' ? window.location.origin : ''}${job.originalURL}` : '#');
|
|
76
|
+
const applyLabel = `${this.applyButtonText}, ${job.title || ''}`;
|
|
77
|
+
const locs = job.locations ?? [];
|
|
78
|
+
const hasMultipleLocations = locs.length > 1;
|
|
79
|
+
return (h("li", { class: "results-list__item" }, h("div", { class: "results-list__item-header" }, h("h3", { class: "results-list__item-title" }, h("a", { class: "results-list__item-title--link", href: applyHref, target: "_blank", rel: "noopener noreferrer" }, job.title || ''), this.showReference && (h("span", { class: `reference ${job.reference ? '' : 'empty'}` }, job.reference || '')), job.isRemote && (h("span", { class: this.remoteLocationText ? 'remote' : 'remote remote--empty' }, this.remoteLocationText))), distanceLabel && (h("div", { class: "results-list__item-distance" }, h("span", { class: "results-list__item-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: "results-list__item-distance--label" }, distanceLabel)))), h("div", { class: "results-list__item-content" }, h("div", { class: "results-list__item-info" }, h("div", { class: locs.length
|
|
80
|
+
? 'results-list__item-street'
|
|
81
|
+
: 'results-list__item-street results-list__item-street--empty' }, h("div", { class: "results-list__item-street--label__wrapper" }, h("span", { class: "results-list__item-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: "results-list__item-street--label" }, locationLabel || '—')), hasMultipleLocations && (h("div", { class: "results-list__item-street--more-locations__wrapper" }, h("span", { class: "results-list__item-street--amount" }, "+", locs.length - 1), h("span", { class: "results-list__item-street--more-locations" }, this.multiLocationText)))), this.showBrand && (h("div", { class: job.brandName
|
|
82
|
+
? 'results-list__item-brand'
|
|
83
|
+
: 'results-list__item-brand results-list__item-brand--empty' }, h("span", { class: "results-list__item-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: "results-list__item-brand--label" }, job.brandName || '—'))), this.showEmploymentType && (h("div", { class: job.employmentType?.length
|
|
84
|
+
? 'results-list__item-employment-type'
|
|
85
|
+
: 'results-list__item-employment-type results-list__item-employment-type--empty' }, h("span", { class: "results-list__item-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
|
|
86
|
+
? job.employmentType
|
|
87
|
+
: ['—']).map((type) => (h("span", { key: type, class: "results-list__item-employment-type--label" }, type))))), (job.jobCardExtraFields ?? []).map((field, i) => (h("div", { key: i, class: (Array.isArray(field.value) ? field.value.length : field.value)
|
|
88
|
+
? field.classname
|
|
89
|
+
: `${field.classname}--empty` }, Array.isArray(field.value)
|
|
90
|
+
? field.value.map((v, j) => (h("span", { key: j, class: `${field.classname}--label` }, v)))
|
|
91
|
+
: (h("span", { class: `${field.classname}--label` }, String(field.value))))))), h("a", { class: "results-list__item-apply", href: applyHref, target: "_blank", rel: "noopener noreferrer", "aria-label": applyLabel }, h("span", { class: "results-list__item-apply--label" }, this.applyButtonText), h("span", { class: "results-list__item-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 7l5 5m0 0l-5 5m5-5H6" })))))));
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
const jobsArray = this.getJobsArray();
|
|
95
|
+
const loading = this.mockData ? false : this.loading;
|
|
96
|
+
const totalJob = this.mockData ? jobsArray.length : (this.totalJob || jobsArray.length);
|
|
97
|
+
const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
|
|
98
|
+
const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
|
|
99
|
+
return (h("div", { key: 'c2e9c9146a24f0869cbd75588b2718c94f62bbbc', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: 'b2f3dffe7e17797b378bd648f54e46bb31e2d374', class: "results-container" }, h("div", { key: '4733870b035ec307b6e691f1d62ed8568e93fd1f', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (h("div", { key: 'a9438f079041e0121fafdcb42089f27482475491', class: "card" }, h("ul", { key: '3bd7dcc64f46aec24945a25df7345766606a51bd', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '1996476568c745e0ada31b47bb1a1be2efaf6917', class: "share-jobs__no-results" }, h("h2", { key: '8d2a79881428d89d783b05f26d06abbef94f5c2e' }, this.noResultsLine1), h("h3", { key: '855704ea47b06a701c0e59a8bb43fb405ad3bb96' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: '74da6e8243423dc9770f4dc67f46f5627c352349', class: "card primary-color" }, h("h4", { key: 'd3fb2ef03a656331f97afe3692b05bbe064ed124', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: '63914647653930e6c686a38d779af20e7e5c17d5', class: "results-list front" }, h("li", { key: '82063c023701d0c42ca2787f382d42a80f569b6a', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '7645d7a7435f76854b8eeb0d693a883fc341764e', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: '060675d017137e8b23342c92efadc769e2bae1c2', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: '0f6ef00a4f6267dc9ad2441e16f02c82b0994d03', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
|
|
100
|
+
}
|
|
101
|
+
static get is() { return "jobs-list-only-ui"; }
|
|
102
|
+
static get originalStyleUrls() {
|
|
103
|
+
return {
|
|
104
|
+
"$": ["jobs-list-only-ui.css"]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
static get styleUrls() {
|
|
108
|
+
return {
|
|
109
|
+
"$": ["jobs-list-only-ui.css"]
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
static get properties() {
|
|
113
|
+
return {
|
|
114
|
+
"mockData": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "boolean",
|
|
119
|
+
"resolved": "boolean",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "When \"true\", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent."
|
|
127
|
+
},
|
|
128
|
+
"getter": false,
|
|
129
|
+
"setter": false,
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"attribute": "mock-data",
|
|
132
|
+
"defaultValue": "false"
|
|
133
|
+
},
|
|
134
|
+
"jobs": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"mutable": false,
|
|
137
|
+
"complexType": {
|
|
138
|
+
"original": "JobSummary[] | string",
|
|
139
|
+
"resolved": "JobSummary[] | string",
|
|
140
|
+
"references": {
|
|
141
|
+
"JobSummary": {
|
|
142
|
+
"location": "import",
|
|
143
|
+
"path": "../../types/jobs-list",
|
|
144
|
+
"id": "src/types/jobs-list.ts::JobSummary",
|
|
145
|
+
"referenceLocation": "JobSummary"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "List of jobs to display. Pass as JSON string from attribute or as array via property (e.g. from React). Ignored when mock-data=\"true\"."
|
|
154
|
+
},
|
|
155
|
+
"getter": false,
|
|
156
|
+
"setter": false,
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"attribute": "jobs",
|
|
159
|
+
"defaultValue": "[]"
|
|
160
|
+
},
|
|
161
|
+
"loading": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "boolean",
|
|
166
|
+
"resolved": "boolean",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Show loading spinner. Ignored when mock-data=\"true\" (mock shows data immediately)."
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"reflect": false,
|
|
178
|
+
"attribute": "loading",
|
|
179
|
+
"defaultValue": "false"
|
|
180
|
+
},
|
|
181
|
+
"totalJob": {
|
|
182
|
+
"type": "number",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "number",
|
|
186
|
+
"resolved": "number",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": "Total job count (for screen readers / schema)."
|
|
194
|
+
},
|
|
195
|
+
"getter": false,
|
|
196
|
+
"setter": false,
|
|
197
|
+
"reflect": false,
|
|
198
|
+
"attribute": "total-job",
|
|
199
|
+
"defaultValue": "0"
|
|
200
|
+
},
|
|
201
|
+
"noResultsLine1": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"mutable": false,
|
|
204
|
+
"complexType": {
|
|
205
|
+
"original": "string",
|
|
206
|
+
"resolved": "string",
|
|
207
|
+
"references": {}
|
|
208
|
+
},
|
|
209
|
+
"required": false,
|
|
210
|
+
"optional": false,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": ""
|
|
214
|
+
},
|
|
215
|
+
"getter": false,
|
|
216
|
+
"setter": false,
|
|
217
|
+
"reflect": false,
|
|
218
|
+
"attribute": "no-results-line-1",
|
|
219
|
+
"defaultValue": "defaultNoResultsLine1"
|
|
220
|
+
},
|
|
221
|
+
"noResultsLine2": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"mutable": false,
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "string",
|
|
226
|
+
"resolved": "string",
|
|
227
|
+
"references": {}
|
|
228
|
+
},
|
|
229
|
+
"required": false,
|
|
230
|
+
"optional": false,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [],
|
|
233
|
+
"text": ""
|
|
234
|
+
},
|
|
235
|
+
"getter": false,
|
|
236
|
+
"setter": false,
|
|
237
|
+
"reflect": false,
|
|
238
|
+
"attribute": "no-results-line-2",
|
|
239
|
+
"defaultValue": "defaultNoResultsLine2"
|
|
240
|
+
},
|
|
241
|
+
"applyButtonText": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "string",
|
|
246
|
+
"resolved": "string",
|
|
247
|
+
"references": {}
|
|
248
|
+
},
|
|
249
|
+
"required": false,
|
|
250
|
+
"optional": false,
|
|
251
|
+
"docs": {
|
|
252
|
+
"tags": [],
|
|
253
|
+
"text": ""
|
|
254
|
+
},
|
|
255
|
+
"getter": false,
|
|
256
|
+
"setter": false,
|
|
257
|
+
"reflect": false,
|
|
258
|
+
"attribute": "apply-button-text",
|
|
259
|
+
"defaultValue": "'Apply Now'"
|
|
260
|
+
},
|
|
261
|
+
"showBrand": {
|
|
262
|
+
"type": "boolean",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "boolean",
|
|
266
|
+
"resolved": "boolean",
|
|
267
|
+
"references": {}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": false,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": ""
|
|
274
|
+
},
|
|
275
|
+
"getter": false,
|
|
276
|
+
"setter": false,
|
|
277
|
+
"reflect": false,
|
|
278
|
+
"attribute": "show-brand",
|
|
279
|
+
"defaultValue": "true"
|
|
280
|
+
},
|
|
281
|
+
"showReference": {
|
|
282
|
+
"type": "boolean",
|
|
283
|
+
"mutable": false,
|
|
284
|
+
"complexType": {
|
|
285
|
+
"original": "boolean",
|
|
286
|
+
"resolved": "boolean",
|
|
287
|
+
"references": {}
|
|
288
|
+
},
|
|
289
|
+
"required": false,
|
|
290
|
+
"optional": false,
|
|
291
|
+
"docs": {
|
|
292
|
+
"tags": [],
|
|
293
|
+
"text": ""
|
|
294
|
+
},
|
|
295
|
+
"getter": false,
|
|
296
|
+
"setter": false,
|
|
297
|
+
"reflect": false,
|
|
298
|
+
"attribute": "show-reference",
|
|
299
|
+
"defaultValue": "false"
|
|
300
|
+
},
|
|
301
|
+
"showEmploymentType": {
|
|
302
|
+
"type": "boolean",
|
|
303
|
+
"mutable": false,
|
|
304
|
+
"complexType": {
|
|
305
|
+
"original": "boolean",
|
|
306
|
+
"resolved": "boolean",
|
|
307
|
+
"references": {}
|
|
308
|
+
},
|
|
309
|
+
"required": false,
|
|
310
|
+
"optional": false,
|
|
311
|
+
"docs": {
|
|
312
|
+
"tags": [],
|
|
313
|
+
"text": ""
|
|
314
|
+
},
|
|
315
|
+
"getter": false,
|
|
316
|
+
"setter": false,
|
|
317
|
+
"reflect": false,
|
|
318
|
+
"attribute": "show-employment-type",
|
|
319
|
+
"defaultValue": "true"
|
|
320
|
+
},
|
|
321
|
+
"streetFormat": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"mutable": false,
|
|
324
|
+
"complexType": {
|
|
325
|
+
"original": "string",
|
|
326
|
+
"resolved": "string",
|
|
327
|
+
"references": {}
|
|
328
|
+
},
|
|
329
|
+
"required": false,
|
|
330
|
+
"optional": false,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": ""
|
|
334
|
+
},
|
|
335
|
+
"getter": false,
|
|
336
|
+
"setter": false,
|
|
337
|
+
"reflect": false,
|
|
338
|
+
"attribute": "street-format",
|
|
339
|
+
"defaultValue": "'{street}, {city_state_abbr}'"
|
|
340
|
+
},
|
|
341
|
+
"multiLocationText": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"mutable": false,
|
|
344
|
+
"complexType": {
|
|
345
|
+
"original": "string",
|
|
346
|
+
"resolved": "string",
|
|
347
|
+
"references": {}
|
|
348
|
+
},
|
|
349
|
+
"required": false,
|
|
350
|
+
"optional": false,
|
|
351
|
+
"docs": {
|
|
352
|
+
"tags": [],
|
|
353
|
+
"text": ""
|
|
354
|
+
},
|
|
355
|
+
"getter": false,
|
|
356
|
+
"setter": false,
|
|
357
|
+
"reflect": false,
|
|
358
|
+
"attribute": "multi-location-text",
|
|
359
|
+
"defaultValue": "'More locations'"
|
|
360
|
+
},
|
|
361
|
+
"remoteLocationText": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"mutable": false,
|
|
364
|
+
"complexType": {
|
|
365
|
+
"original": "string",
|
|
366
|
+
"resolved": "string",
|
|
367
|
+
"references": {}
|
|
368
|
+
},
|
|
369
|
+
"required": false,
|
|
370
|
+
"optional": false,
|
|
371
|
+
"docs": {
|
|
372
|
+
"tags": [],
|
|
373
|
+
"text": ""
|
|
374
|
+
},
|
|
375
|
+
"getter": false,
|
|
376
|
+
"setter": false,
|
|
377
|
+
"reflect": false,
|
|
378
|
+
"attribute": "remote-location-text",
|
|
379
|
+
"defaultValue": "'Remote'"
|
|
380
|
+
},
|
|
381
|
+
"enableKilometers": {
|
|
382
|
+
"type": "boolean",
|
|
383
|
+
"mutable": false,
|
|
384
|
+
"complexType": {
|
|
385
|
+
"original": "boolean",
|
|
386
|
+
"resolved": "boolean",
|
|
387
|
+
"references": {}
|
|
388
|
+
},
|
|
389
|
+
"required": false,
|
|
390
|
+
"optional": false,
|
|
391
|
+
"docs": {
|
|
392
|
+
"tags": [],
|
|
393
|
+
"text": ""
|
|
394
|
+
},
|
|
395
|
+
"getter": false,
|
|
396
|
+
"setter": false,
|
|
397
|
+
"reflect": false,
|
|
398
|
+
"attribute": "enable-kilometers",
|
|
399
|
+
"defaultValue": "false"
|
|
400
|
+
},
|
|
401
|
+
"rootClass": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"mutable": false,
|
|
404
|
+
"complexType": {
|
|
405
|
+
"original": "string",
|
|
406
|
+
"resolved": "string",
|
|
407
|
+
"references": {}
|
|
408
|
+
},
|
|
409
|
+
"required": false,
|
|
410
|
+
"optional": false,
|
|
411
|
+
"docs": {
|
|
412
|
+
"tags": [],
|
|
413
|
+
"text": "Extra CSS class on the root element (avoid prop name \"class\" / \"classname\" reserved)."
|
|
414
|
+
},
|
|
415
|
+
"getter": false,
|
|
416
|
+
"setter": false,
|
|
417
|
+
"reflect": false,
|
|
418
|
+
"attribute": "root-class",
|
|
419
|
+
"defaultValue": "''"
|
|
420
|
+
},
|
|
421
|
+
"showSuggestions": {
|
|
422
|
+
"type": "boolean",
|
|
423
|
+
"mutable": false,
|
|
424
|
+
"complexType": {
|
|
425
|
+
"original": "boolean",
|
|
426
|
+
"resolved": "boolean",
|
|
427
|
+
"references": {}
|
|
428
|
+
},
|
|
429
|
+
"required": false,
|
|
430
|
+
"optional": false,
|
|
431
|
+
"docs": {
|
|
432
|
+
"tags": [],
|
|
433
|
+
"text": ""
|
|
434
|
+
},
|
|
435
|
+
"getter": false,
|
|
436
|
+
"setter": false,
|
|
437
|
+
"reflect": false,
|
|
438
|
+
"attribute": "show-suggestions",
|
|
439
|
+
"defaultValue": "false"
|
|
440
|
+
},
|
|
441
|
+
"clearResultSuggestionsTitleText": {
|
|
442
|
+
"type": "string",
|
|
443
|
+
"mutable": false,
|
|
444
|
+
"complexType": {
|
|
445
|
+
"original": "string",
|
|
446
|
+
"resolved": "string",
|
|
447
|
+
"references": {}
|
|
448
|
+
},
|
|
449
|
+
"required": false,
|
|
450
|
+
"optional": false,
|
|
451
|
+
"docs": {
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": ""
|
|
454
|
+
},
|
|
455
|
+
"getter": false,
|
|
456
|
+
"setter": false,
|
|
457
|
+
"reflect": false,
|
|
458
|
+
"attribute": "clear-result-suggestions-title-text",
|
|
459
|
+
"defaultValue": "'Suggestions'"
|
|
460
|
+
},
|
|
461
|
+
"clearResultSuggestionsLine1": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "string",
|
|
466
|
+
"resolved": "string",
|
|
467
|
+
"references": {}
|
|
468
|
+
},
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": false,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [],
|
|
473
|
+
"text": ""
|
|
474
|
+
},
|
|
475
|
+
"getter": false,
|
|
476
|
+
"setter": false,
|
|
477
|
+
"reflect": false,
|
|
478
|
+
"attribute": "clear-result-suggestions-line-1",
|
|
479
|
+
"defaultValue": "'Try different keywords'"
|
|
480
|
+
},
|
|
481
|
+
"clearResultSuggestionsLine2": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"mutable": false,
|
|
484
|
+
"complexType": {
|
|
485
|
+
"original": "string",
|
|
486
|
+
"resolved": "string",
|
|
487
|
+
"references": {}
|
|
488
|
+
},
|
|
489
|
+
"required": false,
|
|
490
|
+
"optional": false,
|
|
491
|
+
"docs": {
|
|
492
|
+
"tags": [],
|
|
493
|
+
"text": ""
|
|
494
|
+
},
|
|
495
|
+
"getter": false,
|
|
496
|
+
"setter": false,
|
|
497
|
+
"reflect": false,
|
|
498
|
+
"attribute": "clear-result-suggestions-line-2",
|
|
499
|
+
"defaultValue": "'Make sure everything is spelled correctly'"
|
|
500
|
+
},
|
|
501
|
+
"clearResultSuggestionsLine3": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"mutable": false,
|
|
504
|
+
"complexType": {
|
|
505
|
+
"original": "string",
|
|
506
|
+
"resolved": "string",
|
|
507
|
+
"references": {}
|
|
508
|
+
},
|
|
509
|
+
"required": false,
|
|
510
|
+
"optional": false,
|
|
511
|
+
"docs": {
|
|
512
|
+
"tags": [],
|
|
513
|
+
"text": ""
|
|
514
|
+
},
|
|
515
|
+
"getter": false,
|
|
516
|
+
"setter": false,
|
|
517
|
+
"reflect": false,
|
|
518
|
+
"attribute": "clear-result-suggestions-line-3",
|
|
519
|
+
"defaultValue": "'Try other locations'"
|
|
520
|
+
},
|
|
521
|
+
"clearResultSuggestionsLine4": {
|
|
522
|
+
"type": "string",
|
|
523
|
+
"mutable": false,
|
|
524
|
+
"complexType": {
|
|
525
|
+
"original": "string",
|
|
526
|
+
"resolved": "string",
|
|
527
|
+
"references": {}
|
|
528
|
+
},
|
|
529
|
+
"required": false,
|
|
530
|
+
"optional": false,
|
|
531
|
+
"docs": {
|
|
532
|
+
"tags": [],
|
|
533
|
+
"text": ""
|
|
534
|
+
},
|
|
535
|
+
"getter": false,
|
|
536
|
+
"setter": false,
|
|
537
|
+
"reflect": false,
|
|
538
|
+
"attribute": "clear-result-suggestions-line-4",
|
|
539
|
+
"defaultValue": "''"
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview entry point for your component library
|
|
3
|
+
*
|
|
4
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
5
|
+
* constants or data structure that accompany your components.
|
|
6
|
+
*
|
|
7
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
8
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
9
|
+
*/
|
|
10
|
+
export { format } from './utils/utils';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock jobs for local development and docs.
|
|
3
|
+
* Use in www or static HTML: jobs='...' (JSON.stringify(mockJobs)).
|
|
4
|
+
*/
|
|
5
|
+
export const mockJobsListOnly = [
|
|
6
|
+
{
|
|
7
|
+
title: 'Senior Software Engineer',
|
|
8
|
+
reference: 'REF-001',
|
|
9
|
+
originalURL: '/jobs/senior-software-engineer',
|
|
10
|
+
applyURL: 'https://apply.example.com/1',
|
|
11
|
+
brandName: 'Engineering',
|
|
12
|
+
isRemote: false,
|
|
13
|
+
locations: [
|
|
14
|
+
{
|
|
15
|
+
city: 'San Francisco',
|
|
16
|
+
stateAbbr: 'CA',
|
|
17
|
+
countryAbbr: 'US',
|
|
18
|
+
distance: 5.2,
|
|
19
|
+
streetAddress: '123 Market St',
|
|
20
|
+
cityStateAbbr: 'San Francisco, CA',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
employmentType: ['Full-time', 'Permanent'],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Product Manager',
|
|
27
|
+
reference: '',
|
|
28
|
+
originalURL: '/jobs/product-manager',
|
|
29
|
+
brandName: 'Product',
|
|
30
|
+
isRemote: true,
|
|
31
|
+
locations: [],
|
|
32
|
+
employmentType: ['Full-time'],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: 'UX Designer',
|
|
36
|
+
reference: 'REF-003',
|
|
37
|
+
originalURL: '/jobs/ux-designer',
|
|
38
|
+
brandName: 'Design',
|
|
39
|
+
isRemote: false,
|
|
40
|
+
locations: [
|
|
41
|
+
{
|
|
42
|
+
city: 'New York',
|
|
43
|
+
stateAbbr: 'NY',
|
|
44
|
+
countryAbbr: 'US',
|
|
45
|
+
distance: 0,
|
|
46
|
+
cityStateAbbr: 'New York, NY',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
city: 'Boston',
|
|
50
|
+
stateAbbr: 'MA',
|
|
51
|
+
countryAbbr: 'US',
|
|
52
|
+
cityStateAbbr: 'Boston, MA',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
employmentType: ['Full-time', 'Contract'],
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
export function getMockJobsJson() {
|
|
59
|
+
return JSON.stringify(mockJobsListOnly);
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,p as o,H as s,c as n,h as e}from"./p-Cw2MJ5l2.js";const c=o(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.buttonClick=n(this,"buttonClick")}variant="primary";type="button";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return e("button",{key:"b373f44e11e651d0371ce3cade98b4650ccdd727",type:this.type,class:{"custom-button":!0,["custom-button--"+this.variant]:!0,"custom-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},e("slot",{key:"2a046bc70af051c04f4549def87dac7044b41e04"}))}static get style(){return":host{display:inline-block}.custom-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.custom-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.custom-button:focus:not(:focus-visible){outline:none}.custom-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.custom-button--primary:hover:not(.custom-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.custom-button--primary:active:not(.custom-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.custom-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.custom-button--secondary:hover:not(.custom-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.custom-button--secondary:active:not(.custom-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.custom-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.custom-button--text:hover:not(.custom-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.custom-button--text:active:not(.custom-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.custom-button--disabled,.custom-button:disabled{opacity:0.6;cursor:not-allowed}"}},[769,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function u(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),c))}))}u();const r=c,a=u;export{r as FastButton,a as defineCustomElement}
|