@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,439 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import EmblaCarousel from "embla-carousel";
|
|
3
|
+
export class AppCarousel {
|
|
4
|
+
el;
|
|
5
|
+
/** Optional list of items to render as slides (each item in a slide). When set, slot is ignored. Accepts array or JSON string. */
|
|
6
|
+
items;
|
|
7
|
+
/** Whether the carousel loops. */
|
|
8
|
+
loop = true;
|
|
9
|
+
/** Extra class for the root carousel element. */
|
|
10
|
+
class;
|
|
11
|
+
/** Extra class for the controls container. */
|
|
12
|
+
controlClass;
|
|
13
|
+
/** Extra class for the slide viewport. */
|
|
14
|
+
slideClass;
|
|
15
|
+
/** Extra class for each slide item (items mode only). */
|
|
16
|
+
itemClass;
|
|
17
|
+
viewportRef;
|
|
18
|
+
containerRef;
|
|
19
|
+
slotRef;
|
|
20
|
+
prevBtnRef;
|
|
21
|
+
nextBtnRef;
|
|
22
|
+
dotsRef;
|
|
23
|
+
embla = null;
|
|
24
|
+
movedNodes = [];
|
|
25
|
+
prevClickHandler = null;
|
|
26
|
+
nextClickHandler = null;
|
|
27
|
+
dotClickHandlers = [];
|
|
28
|
+
slotNodesMoved = false;
|
|
29
|
+
/**
|
|
30
|
+
* Go to the previous slide.
|
|
31
|
+
*/
|
|
32
|
+
async scrollPrev() {
|
|
33
|
+
this.embla?.scrollPrev();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Go to the next slide.
|
|
37
|
+
*/
|
|
38
|
+
async scrollNext() {
|
|
39
|
+
this.embla?.scrollNext();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Go to slide by index (0-based).
|
|
43
|
+
*/
|
|
44
|
+
async goToSlide(index) {
|
|
45
|
+
this.embla?.scrollTo(index);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get the Embla API instance (if initialized). Returns null before init or after destroy.
|
|
49
|
+
*/
|
|
50
|
+
async getEmbla() {
|
|
51
|
+
return this.embla;
|
|
52
|
+
}
|
|
53
|
+
moveSlotNodesIntoContainer() {
|
|
54
|
+
if (!this.slotRef || !this.containerRef || this.slotNodesMoved)
|
|
55
|
+
return;
|
|
56
|
+
const nodes = this.slotRef
|
|
57
|
+
.assignedNodes()
|
|
58
|
+
.filter((n) => n.nodeType === Node.ELEMENT_NODE);
|
|
59
|
+
if (nodes.length === 0)
|
|
60
|
+
return;
|
|
61
|
+
this.movedNodes = [];
|
|
62
|
+
nodes.forEach((n) => {
|
|
63
|
+
this.containerRef.appendChild(n);
|
|
64
|
+
this.movedNodes.push(n);
|
|
65
|
+
});
|
|
66
|
+
this.slotNodesMoved = true;
|
|
67
|
+
this.scheduleEmblaInit();
|
|
68
|
+
}
|
|
69
|
+
initScheduled = false;
|
|
70
|
+
scheduleEmblaInit() {
|
|
71
|
+
if (this.initScheduled)
|
|
72
|
+
return;
|
|
73
|
+
this.initScheduled = true;
|
|
74
|
+
requestAnimationFrame(() => {
|
|
75
|
+
this.initScheduled = false;
|
|
76
|
+
this.destroyEmbla();
|
|
77
|
+
this.initEmbla();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
moveSlotNodesBack() {
|
|
81
|
+
const host = this.el;
|
|
82
|
+
this.movedNodes.forEach((n) => host.appendChild(n));
|
|
83
|
+
this.movedNodes = [];
|
|
84
|
+
}
|
|
85
|
+
initEmbla() {
|
|
86
|
+
if (!this.viewportRef || !this.containerRef)
|
|
87
|
+
return;
|
|
88
|
+
const itemsArr = this.getItemsArray();
|
|
89
|
+
const hasSlides = itemsArr !== undefined
|
|
90
|
+
? itemsArr.length > 0
|
|
91
|
+
: this.containerRef.children.length > 0;
|
|
92
|
+
if (!hasSlides)
|
|
93
|
+
return;
|
|
94
|
+
this.embla = EmblaCarousel(this.viewportRef, {
|
|
95
|
+
loop: this.loop,
|
|
96
|
+
align: 'center',
|
|
97
|
+
containScroll: 'trimSnaps',
|
|
98
|
+
});
|
|
99
|
+
const prevBtn = this.prevBtnRef;
|
|
100
|
+
const nextBtn = this.nextBtnRef;
|
|
101
|
+
const dotsNode = this.dotsRef;
|
|
102
|
+
const togglePrevNext = () => {
|
|
103
|
+
if (prevBtn) {
|
|
104
|
+
if (this.embla?.canScrollPrev())
|
|
105
|
+
prevBtn.removeAttribute('disabled');
|
|
106
|
+
else
|
|
107
|
+
prevBtn.setAttribute('disabled', '');
|
|
108
|
+
}
|
|
109
|
+
if (nextBtn) {
|
|
110
|
+
if (this.embla?.canScrollNext())
|
|
111
|
+
nextBtn.removeAttribute('disabled');
|
|
112
|
+
else
|
|
113
|
+
nextBtn.setAttribute('disabled', '');
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
this.embla.on('init', togglePrevNext);
|
|
117
|
+
this.embla.on('reInit', togglePrevNext);
|
|
118
|
+
this.embla.on('select', togglePrevNext);
|
|
119
|
+
if (prevBtn && nextBtn) {
|
|
120
|
+
this.prevClickHandler = () => this.embla?.scrollPrev();
|
|
121
|
+
this.nextClickHandler = () => this.embla?.scrollNext();
|
|
122
|
+
prevBtn.addEventListener('click', this.prevClickHandler);
|
|
123
|
+
nextBtn.addEventListener('click', this.nextClickHandler);
|
|
124
|
+
}
|
|
125
|
+
if (dotsNode) {
|
|
126
|
+
const count = this.embla.scrollSnapList().length;
|
|
127
|
+
dotsNode.innerHTML = '';
|
|
128
|
+
for (let i = 0; i < count; i++) {
|
|
129
|
+
const btn = document.createElement('button');
|
|
130
|
+
btn.type = 'button';
|
|
131
|
+
btn.setAttribute('aria-label', `Go to slide ${i + 1}`);
|
|
132
|
+
btn.className = 'carousel__dot';
|
|
133
|
+
if (i === 0)
|
|
134
|
+
btn.classList.add('current');
|
|
135
|
+
const dot = document.createElement('div');
|
|
136
|
+
dot.className = 'carousel__dot-inner';
|
|
137
|
+
btn.appendChild(dot);
|
|
138
|
+
const index = i;
|
|
139
|
+
const handler = () => this.embla?.scrollTo(index);
|
|
140
|
+
this.dotClickHandlers.push(handler);
|
|
141
|
+
btn.addEventListener('click', handler);
|
|
142
|
+
dotsNode.appendChild(btn);
|
|
143
|
+
}
|
|
144
|
+
const updateDots = () => {
|
|
145
|
+
const selected = this.embla?.selectedScrollSnap() ?? 0;
|
|
146
|
+
const buttons = dotsNode.querySelectorAll('button');
|
|
147
|
+
buttons.forEach((b, i) => {
|
|
148
|
+
b.classList.toggle('current', i === selected);
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
this.embla.on('select', updateDots);
|
|
152
|
+
}
|
|
153
|
+
togglePrevNext();
|
|
154
|
+
}
|
|
155
|
+
destroyEmbla() {
|
|
156
|
+
if (this.prevBtnRef && this.prevClickHandler) {
|
|
157
|
+
this.prevBtnRef.removeEventListener('click', this.prevClickHandler);
|
|
158
|
+
this.prevClickHandler = null;
|
|
159
|
+
}
|
|
160
|
+
if (this.nextBtnRef && this.nextClickHandler) {
|
|
161
|
+
this.nextBtnRef.removeEventListener('click', this.nextClickHandler);
|
|
162
|
+
this.nextClickHandler = null;
|
|
163
|
+
}
|
|
164
|
+
this.dotClickHandlers = [];
|
|
165
|
+
if (this.dotsRef)
|
|
166
|
+
this.dotsRef.innerHTML = '';
|
|
167
|
+
this.embla?.destroy();
|
|
168
|
+
this.embla = null;
|
|
169
|
+
}
|
|
170
|
+
onSlotChange = () => {
|
|
171
|
+
if (this.getItemsArray() !== undefined)
|
|
172
|
+
return;
|
|
173
|
+
this.moveSlotNodesIntoContainer();
|
|
174
|
+
};
|
|
175
|
+
componentDidRender() {
|
|
176
|
+
if (this.getItemsArray() === undefined) {
|
|
177
|
+
if (this.slotRef) {
|
|
178
|
+
this.slotRef.removeEventListener('slotchange', this.onSlotChange);
|
|
179
|
+
this.slotRef.addEventListener('slotchange', this.onSlotChange);
|
|
180
|
+
}
|
|
181
|
+
requestAnimationFrame(() => {
|
|
182
|
+
this.moveSlotNodesIntoContainer();
|
|
183
|
+
if (!this.slotNodesMoved) {
|
|
184
|
+
this.destroyEmbla();
|
|
185
|
+
this.initEmbla();
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
this.destroyEmbla();
|
|
191
|
+
this.initEmbla();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
disconnectedCallback() {
|
|
195
|
+
if (this.slotRef) {
|
|
196
|
+
this.slotRef.removeEventListener('slotchange', this.onSlotChange);
|
|
197
|
+
}
|
|
198
|
+
this.destroyEmbla();
|
|
199
|
+
if (this.getItemsArray() === undefined) {
|
|
200
|
+
this.moveSlotNodesBack();
|
|
201
|
+
this.slotNodesMoved = false;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
getItemsArray() {
|
|
205
|
+
if (this.items === undefined)
|
|
206
|
+
return undefined;
|
|
207
|
+
if (Array.isArray(this.items))
|
|
208
|
+
return this.items;
|
|
209
|
+
if (typeof this.items === 'string') {
|
|
210
|
+
try {
|
|
211
|
+
const parsed = JSON.parse(this.items);
|
|
212
|
+
return Array.isArray(parsed) ? parsed : undefined;
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
return undefined;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return undefined;
|
|
219
|
+
}
|
|
220
|
+
render() {
|
|
221
|
+
const itemsArray = this.getItemsArray();
|
|
222
|
+
const useItems = itemsArray !== undefined && itemsArray.length > 0;
|
|
223
|
+
return (h("div", { key: '313c58e9c1ea3b9c0d0fd4b9d6354336682d9353', class: `carousel ${this.class || ''}`.trim() }, h("div", { key: '14ad75526a24ed38df053fa221e2fafef6d532ed', class: `carousel__viewport ${this.slideClass || ''}`.trim(), ref: (el) => (this.viewportRef = el) }, h("div", { key: '1d3a771598c382592b789289494f2439fea56918', class: "carousel__container", ref: (el) => (this.containerRef = el) }, useItems && itemsArray
|
|
224
|
+
? itemsArray.map((item, i) => (h("div", { key: i, class: `carousel__slide ${this.itemClass || ''}`.trim() }, typeof item === 'object' &&
|
|
225
|
+
item !== null &&
|
|
226
|
+
'content' in item
|
|
227
|
+
? item.content
|
|
228
|
+
: String(item))))
|
|
229
|
+
: null)), !useItems && (h("div", { key: 'cdecd3275ac3c5ffe7a0f46153d3e59ad0d4ba9d', style: { display: 'none' }, "aria-hidden": "true" }, h("slot", { key: '450dd5b90f20166a4d6ef4a0d46d208ad47bbf4b', ref: (el) => (this.slotRef = el) }))), h("div", { key: 'ad4eab3f45204170308d8021799d227eaff36d71', class: `carousel__controls ${this.controlClass || ''}`.trim() }, h("button", { key: '1a4ef7209ea768a55892f4d928da3f6100faab4b', type: "button", "aria-label": "Previous", class: "carousel__prev", ref: (el) => (this.prevBtnRef = el) }, h("svg", { key: '7d579cb030149947791db565bc1520ef2707c360', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { key: 'fdca1a876d4967c39286bddba6122351fbf0d925', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }))), h("div", { key: '4d9a30f1988f2ce04f271967f1dd39c5287273f2', class: "carousel__dots", ref: (el) => (this.dotsRef = el) }), h("button", { key: 'c8bc7787821f3277c6d038e3ff1240b3ce936825', type: "button", "aria-label": "Next", class: "carousel__next", ref: (el) => (this.nextBtnRef = el) }, h("svg", { key: 'e6e4eff954b1b08711cc843de558e00a8257e9f8', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { key: '37b394093f327bdc46f8da1dcf78ec609a585a0a', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }))))));
|
|
230
|
+
}
|
|
231
|
+
static get is() { return "fast-carousel"; }
|
|
232
|
+
static get encapsulation() { return "shadow"; }
|
|
233
|
+
static get originalStyleUrls() {
|
|
234
|
+
return {
|
|
235
|
+
"$": ["carousel.css"]
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
static get styleUrls() {
|
|
239
|
+
return {
|
|
240
|
+
"$": ["carousel.css"]
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
static get properties() {
|
|
244
|
+
return {
|
|
245
|
+
"items": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"mutable": false,
|
|
248
|
+
"complexType": {
|
|
249
|
+
"original": "unknown[] | string | undefined",
|
|
250
|
+
"resolved": "string | unknown[]",
|
|
251
|
+
"references": {}
|
|
252
|
+
},
|
|
253
|
+
"required": false,
|
|
254
|
+
"optional": false,
|
|
255
|
+
"docs": {
|
|
256
|
+
"tags": [],
|
|
257
|
+
"text": "Optional list of items to render as slides (each item in a slide). When set, slot is ignored. Accepts array or JSON string."
|
|
258
|
+
},
|
|
259
|
+
"getter": false,
|
|
260
|
+
"setter": false,
|
|
261
|
+
"reflect": false,
|
|
262
|
+
"attribute": "items"
|
|
263
|
+
},
|
|
264
|
+
"loop": {
|
|
265
|
+
"type": "boolean",
|
|
266
|
+
"mutable": false,
|
|
267
|
+
"complexType": {
|
|
268
|
+
"original": "boolean",
|
|
269
|
+
"resolved": "boolean",
|
|
270
|
+
"references": {}
|
|
271
|
+
},
|
|
272
|
+
"required": false,
|
|
273
|
+
"optional": false,
|
|
274
|
+
"docs": {
|
|
275
|
+
"tags": [],
|
|
276
|
+
"text": "Whether the carousel loops."
|
|
277
|
+
},
|
|
278
|
+
"getter": false,
|
|
279
|
+
"setter": false,
|
|
280
|
+
"reflect": false,
|
|
281
|
+
"attribute": "loop",
|
|
282
|
+
"defaultValue": "true"
|
|
283
|
+
},
|
|
284
|
+
"class": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"mutable": false,
|
|
287
|
+
"complexType": {
|
|
288
|
+
"original": "string",
|
|
289
|
+
"resolved": "string",
|
|
290
|
+
"references": {}
|
|
291
|
+
},
|
|
292
|
+
"required": false,
|
|
293
|
+
"optional": false,
|
|
294
|
+
"docs": {
|
|
295
|
+
"tags": [],
|
|
296
|
+
"text": "Extra class for the root carousel element."
|
|
297
|
+
},
|
|
298
|
+
"getter": false,
|
|
299
|
+
"setter": false,
|
|
300
|
+
"reflect": false,
|
|
301
|
+
"attribute": "class"
|
|
302
|
+
},
|
|
303
|
+
"controlClass": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"mutable": false,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "string",
|
|
308
|
+
"resolved": "string",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": false,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": "Extra class for the controls container."
|
|
316
|
+
},
|
|
317
|
+
"getter": false,
|
|
318
|
+
"setter": false,
|
|
319
|
+
"reflect": false,
|
|
320
|
+
"attribute": "control-class"
|
|
321
|
+
},
|
|
322
|
+
"slideClass": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "string",
|
|
327
|
+
"resolved": "string",
|
|
328
|
+
"references": {}
|
|
329
|
+
},
|
|
330
|
+
"required": false,
|
|
331
|
+
"optional": false,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": "Extra class for the slide viewport."
|
|
335
|
+
},
|
|
336
|
+
"getter": false,
|
|
337
|
+
"setter": false,
|
|
338
|
+
"reflect": false,
|
|
339
|
+
"attribute": "slide-class"
|
|
340
|
+
},
|
|
341
|
+
"itemClass": {
|
|
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": "Extra class for each slide item (items mode only)."
|
|
354
|
+
},
|
|
355
|
+
"getter": false,
|
|
356
|
+
"setter": false,
|
|
357
|
+
"reflect": false,
|
|
358
|
+
"attribute": "item-class"
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
static get methods() {
|
|
363
|
+
return {
|
|
364
|
+
"scrollPrev": {
|
|
365
|
+
"complexType": {
|
|
366
|
+
"signature": "() => Promise<void>",
|
|
367
|
+
"parameters": [],
|
|
368
|
+
"references": {
|
|
369
|
+
"Promise": {
|
|
370
|
+
"location": "global",
|
|
371
|
+
"id": "global::Promise"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"return": "Promise<void>"
|
|
375
|
+
},
|
|
376
|
+
"docs": {
|
|
377
|
+
"text": "Go to the previous slide.",
|
|
378
|
+
"tags": []
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"scrollNext": {
|
|
382
|
+
"complexType": {
|
|
383
|
+
"signature": "() => Promise<void>",
|
|
384
|
+
"parameters": [],
|
|
385
|
+
"references": {
|
|
386
|
+
"Promise": {
|
|
387
|
+
"location": "global",
|
|
388
|
+
"id": "global::Promise"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"return": "Promise<void>"
|
|
392
|
+
},
|
|
393
|
+
"docs": {
|
|
394
|
+
"text": "Go to the next slide.",
|
|
395
|
+
"tags": []
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"goToSlide": {
|
|
399
|
+
"complexType": {
|
|
400
|
+
"signature": "(index: number) => Promise<void>",
|
|
401
|
+
"parameters": [{
|
|
402
|
+
"name": "index",
|
|
403
|
+
"type": "number",
|
|
404
|
+
"docs": ""
|
|
405
|
+
}],
|
|
406
|
+
"references": {
|
|
407
|
+
"Promise": {
|
|
408
|
+
"location": "global",
|
|
409
|
+
"id": "global::Promise"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"return": "Promise<void>"
|
|
413
|
+
},
|
|
414
|
+
"docs": {
|
|
415
|
+
"text": "Go to slide by index (0-based).",
|
|
416
|
+
"tags": []
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"getEmbla": {
|
|
420
|
+
"complexType": {
|
|
421
|
+
"signature": "() => Promise<unknown>",
|
|
422
|
+
"parameters": [],
|
|
423
|
+
"references": {
|
|
424
|
+
"Promise": {
|
|
425
|
+
"location": "global",
|
|
426
|
+
"id": "global::Promise"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"return": "Promise<unknown>"
|
|
430
|
+
},
|
|
431
|
+
"docs": {
|
|
432
|
+
"text": "Get the Embla API instance (if initialized). Returns null before init or after destroy.",
|
|
433
|
+
"tags": []
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
static get elementRef() { return "el"; }
|
|
439
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/* Jobs list only - presentation styles (standalone / mock) */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.jobs-list-root {
|
|
7
|
+
list-style: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.results-container {
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.loader {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
width: 24px;
|
|
17
|
+
height: 24px;
|
|
18
|
+
border: 2px solid #ddd;
|
|
19
|
+
border-top-color: #1f9755;
|
|
20
|
+
border-radius: 50%;
|
|
21
|
+
animation: jobs-list-spin 0.8s linear infinite;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.loader.hide {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes jobs-list-spin {
|
|
29
|
+
to {
|
|
30
|
+
transform: rotate(360deg);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.card {
|
|
35
|
+
border: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.results-list {
|
|
39
|
+
list-style: none;
|
|
40
|
+
margin: 0;
|
|
41
|
+
padding: 0;
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.results-list.front {
|
|
46
|
+
margin: 3px 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.results-list__item {
|
|
50
|
+
list-style: none;
|
|
51
|
+
padding: 10px 0;
|
|
52
|
+
border-bottom: 1px solid #ddd;
|
|
53
|
+
margin: 15px 0;
|
|
54
|
+
display: inline-block;
|
|
55
|
+
width: 100%;
|
|
56
|
+
position: relative;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.results-list__item:last-child {
|
|
60
|
+
border-bottom: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.results-list__item-header {
|
|
64
|
+
margin: 10px 0;
|
|
65
|
+
font-size: 18px;
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.results-list__item-title {
|
|
72
|
+
margin: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.results-list__item-title--link {
|
|
76
|
+
text-decoration: none;
|
|
77
|
+
color: #1f9755;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.results-list__item-title--link:hover {
|
|
81
|
+
text-decoration: underline;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.reference {
|
|
85
|
+
margin-left: 8px;
|
|
86
|
+
font-size: 0.9em;
|
|
87
|
+
color: #666;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.reference.empty {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.remote {
|
|
95
|
+
background: #f3f3f3;
|
|
96
|
+
color: #808285;
|
|
97
|
+
border-radius: 100px;
|
|
98
|
+
padding: 6px 16px;
|
|
99
|
+
text-transform: uppercase;
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
line-height: 24px;
|
|
103
|
+
margin-left: 8px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.remote--empty {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.results-list__item-distance {
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 4px;
|
|
114
|
+
margin-top: 4px;
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
font-weight: 400;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.results-list__item-distance--icon {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.results-list__item-distance--icon svg {
|
|
124
|
+
width: 16px;
|
|
125
|
+
height: 16px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.results-list__item-content {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: flex-start;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
gap: 16px;
|
|
133
|
+
margin-top: 8px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.results-list__item-info {
|
|
137
|
+
flex: 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.results-list__item-street,
|
|
141
|
+
.results-list__item-brand,
|
|
142
|
+
.results-list__item-employment-type {
|
|
143
|
+
margin: 10px 0;
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-wrap: wrap;
|
|
146
|
+
align-items: center;
|
|
147
|
+
gap: 4px 8px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.results-list__item-street--empty,
|
|
151
|
+
.results-list__item-brand--empty,
|
|
152
|
+
.results-list__item-employment-type--empty {
|
|
153
|
+
color: #999;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.results-list__item-street--icon,
|
|
157
|
+
.results-list__item-brand--icon,
|
|
158
|
+
.results-list__item-employment-type--icon {
|
|
159
|
+
margin-right: 6px;
|
|
160
|
+
display: inline-flex;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.results-list__item-street--icon svg,
|
|
164
|
+
.results-list__item-brand--icon svg,
|
|
165
|
+
.results-list__item-employment-type--icon svg {
|
|
166
|
+
width: 16px;
|
|
167
|
+
height: 16px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.results-list__item-street--more-locations__wrapper {
|
|
171
|
+
margin-left: 8px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.results-list__item-street--amount {
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.results-list__item-apply {
|
|
179
|
+
margin: 10px 0;
|
|
180
|
+
padding: 10px 20px;
|
|
181
|
+
display: inline-flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
gap: 8px;
|
|
184
|
+
background-color: #198754;
|
|
185
|
+
color: #fff;
|
|
186
|
+
border-radius: 3px;
|
|
187
|
+
text-decoration: none;
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
flex-shrink: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.results-list__item-apply:hover {
|
|
193
|
+
background-color: #1f9755;
|
|
194
|
+
color: #fff;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.results-list__item-apply--icon svg {
|
|
198
|
+
width: 14px;
|
|
199
|
+
height: 14px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* No results & suggestions */
|
|
203
|
+
.share-jobs__no-results {
|
|
204
|
+
padding: 24px;
|
|
205
|
+
text-align: center;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.share-jobs__no-results h2,
|
|
209
|
+
.share-jobs__no-results h3 {
|
|
210
|
+
margin: 8px 0;
|
|
211
|
+
font-weight: 600;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.card.primary-color {
|
|
215
|
+
padding: 16px;
|
|
216
|
+
border-radius: 4px;
|
|
217
|
+
background: #f8f9fa;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.result-suggestions-title {
|
|
221
|
+
margin: 0 0 12px 0;
|
|
222
|
+
font-size: 16px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.results-list .result-suggestions-line {
|
|
226
|
+
list-style: none;
|
|
227
|
+
margin: 4px 0;
|
|
228
|
+
}
|