@phatvu/web-component-poc 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/fast-button.cjs.entry.js +46 -0
- package/dist/cjs/{fast-button_4.cjs.entry.js → fast-carousel.cjs.entry.js} +1 -231
- package/dist/cjs/fast-input_4.cjs.entry.js +499 -0
- package/dist/cjs/{index-B2BTpdbN.js → index-BEvZs91D.js} +2 -2
- package/dist/cjs/job-card.cjs.entry.js +138 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/web-component-poc.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/button/button.js +2 -2
- package/dist/collection/components/fast-input/fast-input.css +55 -0
- package/dist/collection/components/fast-input/fast-input.js +335 -0
- package/dist/collection/components/job-card/job-card.css +247 -0
- package/dist/collection/components/job-card/job-card.js +435 -0
- package/dist/collection/components/jobs-item/jobs-item.js +5 -5
- package/dist/collection/components/jobs-list-only/jobs-list-only.js +185 -8
- package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.css +8 -0
- package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +203 -0
- package/dist/components/fast-button.js +1 -1
- package/dist/components/fast-carousel.js +1 -1
- package/dist/components/fast-input.d.ts +11 -0
- package/dist/components/fast-input.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/job-card.d.ts +11 -0
- package/dist/components/job-card.js +1 -0
- package/dist/components/jobs-item.js +1 -1
- package/dist/components/jobs-list-only.js +1 -1
- package/dist/components/jobs-list-reactive.d.ts +11 -0
- package/dist/components/jobs-list-reactive.js +1 -0
- package/dist/components/{p-ClQDwJJB.js → p-DQiaLjLf.js} +1 -1
- package/dist/esm/fast-button.entry.js +44 -0
- package/dist/esm/{fast-button_4.entry.js → fast-carousel.entry.js} +2 -229
- package/dist/esm/fast-input_4.entry.js +494 -0
- package/dist/esm/{index-Dk5CvWmb.js → index-C_ZLQIpp.js} +2 -2
- package/dist/esm/job-card.entry.js +136 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/web-component-poc.js +3 -3
- package/dist/types/components/fast-input/fast-input.d.ts +37 -0
- package/dist/types/components/job-card/job-card.d.ts +93 -0
- package/dist/types/components/jobs-item/jobs-item.d.ts +2 -2
- package/dist/types/components/jobs-list-only/jobs-list-only.d.ts +24 -2
- package/dist/types/components/jobs-list-reactive/jobs-list-reactive.d.ts +26 -0
- package/dist/types/components.d.ts +469 -7
- package/dist/types/mock/jobs-list-only.mock.d.ts +2 -2
- package/dist/types/types/jobs-list.d.ts +6 -2
- package/dist/web-component-poc/p-618fba28.entry.js +1 -0
- package/dist/web-component-poc/p-7d45772f.entry.js +1 -0
- package/dist/web-component-poc/p-bef7c8e2.entry.js +1 -0
- package/dist/web-component-poc/p-cfb9aed9.entry.js +1 -0
- package/dist/web-component-poc/web-component-poc.esm.js +1 -1
- package/hydrate/index.js +534 -6
- package/hydrate/index.mjs +534 -6
- package/package.json +9 -1
- package/dist/web-component-poc/p-df843533.entry.js +0 -1
- /package/dist/components/{p-UM9TUfe3.js → p-BiaJAQXY.js} +0 -0
- /package/dist/web-component-poc/{p-Dk5CvWmb.js → p-C_ZLQIpp.js} +0 -0
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-C_ZLQIpp.js';
|
|
2
|
+
export { s as setNonce } from './index-C_ZLQIpp.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["fast-
|
|
8
|
+
return bootstrapLazy([["fast-button",[[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}]]],["fast-carousel",[[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]}]]],["job-card",[[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-input_4",[[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"],"showCountText":[1,"show-count-text"],"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"],"autoFetch":[4,"auto-fetch"],"apiUrl":[1,"api-url"],"watchParams":[1,"watch-params"],"fetchedJobs":[32],"fetchedTotal":[32],"fetchLoading":[32]}],[512,"fast-input",{"placeholder":[1],"value":[1],"paramName":[1,"param-name"],"enableAutocomplete":[4,"enable-autocomplete"],"autocompleteUrl":[1,"autocomplete-url"],"targetPath":[1,"target-path"],"debounceMs":[2,"debounce-ms"],"minChars":[2,"min-chars"],"inputValue":[32],"suggestions":[32],"showDropdown":[32],"autocompleteLoading":[32]}],[772,"jobs-list-reactive",{"apiUrl":[1,"api-url"],"watchParams":[1,"watch-params"],"loadingClass":[1,"loading-class"],"isLoading":[32]}],[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
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-C_ZLQIpp.js';
|
|
2
|
+
export { s as setNonce } from './index-C_ZLQIpp.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["fast-
|
|
20
|
+
return bootstrapLazy([["fast-button",[[772,"fast-button",{"variant":[1],"type":[1],"disabled":[4]}]]],["fast-carousel",[[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]}]]],["job-card",[[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-input_4",[[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"],"showCountText":[1,"show-count-text"],"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"],"autoFetch":[4,"auto-fetch"],"apiUrl":[1,"api-url"],"watchParams":[1,"watch-params"],"fetchedJobs":[32],"fetchedTotal":[32],"fetchLoading":[32]}],[512,"fast-input",{"placeholder":[1],"value":[1],"paramName":[1,"param-name"],"enableAutocomplete":[4,"enable-autocomplete"],"autocompleteUrl":[1,"autocomplete-url"],"targetPath":[1,"target-path"],"debounceMs":[2,"debounce-ms"],"minChars":[2,"min-chars"],"inputValue":[32],"suggestions":[32],"showDropdown":[32],"autocompleteLoading":[32]}],[772,"jobs-list-reactive",{"apiUrl":[1,"api-url"],"watchParams":[1,"watch-params"],"loadingClass":[1,"loading-class"],"isLoading":[32]}],[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);
|
|
21
21
|
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class FastInput {
|
|
3
|
+
placeholder: string;
|
|
4
|
+
value: string;
|
|
5
|
+
paramName: string;
|
|
6
|
+
enableAutocomplete: boolean;
|
|
7
|
+
autocompleteUrl: string;
|
|
8
|
+
targetPath: string | undefined;
|
|
9
|
+
debounceMs: number;
|
|
10
|
+
minChars: number;
|
|
11
|
+
searchExecuted: EventEmitter<{
|
|
12
|
+
keyword: string;
|
|
13
|
+
}>;
|
|
14
|
+
inputChanged: EventEmitter<{
|
|
15
|
+
value: string;
|
|
16
|
+
}>;
|
|
17
|
+
inputValue: string;
|
|
18
|
+
suggestions: Array<{
|
|
19
|
+
title: string;
|
|
20
|
+
}>;
|
|
21
|
+
showDropdown: boolean;
|
|
22
|
+
autocompleteLoading: boolean;
|
|
23
|
+
private debounceTimer;
|
|
24
|
+
private popstateHandler;
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
disconnectedCallback(): void;
|
|
27
|
+
private getUrlParam;
|
|
28
|
+
private updateUrlParam;
|
|
29
|
+
private submit;
|
|
30
|
+
private handleInput;
|
|
31
|
+
private handleKeydown;
|
|
32
|
+
private handleBlur;
|
|
33
|
+
private scheduleAutocomplete;
|
|
34
|
+
private fetchSuggestions;
|
|
35
|
+
private selectSuggestion;
|
|
36
|
+
render(): any;
|
|
37
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { Job } from '../../types/jobs-list';
|
|
2
|
+
/**
|
|
3
|
+
* JobCard Component
|
|
4
|
+
*
|
|
5
|
+
* A reusable card component for displaying job information based on the React JobItem component.
|
|
6
|
+
* Features include:
|
|
7
|
+
* - Job title with apply link
|
|
8
|
+
* - Location with distance
|
|
9
|
+
* - Brand/company name
|
|
10
|
+
* - Employment type
|
|
11
|
+
* - Reference number (optional)
|
|
12
|
+
* - Remote indicator (optional)
|
|
13
|
+
* - Multi-location support
|
|
14
|
+
* - Custom extra fields
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <job-card
|
|
19
|
+
* .job={jobData}
|
|
20
|
+
* applyButtonText="Apply"
|
|
21
|
+
* showBrand="true"
|
|
22
|
+
* showEmploymentType="true"
|
|
23
|
+
* ></job-card>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class JobCard {
|
|
27
|
+
/**
|
|
28
|
+
* The job data object to display. Accepts either a Job object or a JSON string.
|
|
29
|
+
*/
|
|
30
|
+
job: Job | string;
|
|
31
|
+
/**
|
|
32
|
+
* Index of the job in a list (used for accessibility)
|
|
33
|
+
*/
|
|
34
|
+
index: number;
|
|
35
|
+
/**
|
|
36
|
+
* Text for the apply button
|
|
37
|
+
*/
|
|
38
|
+
applyButtonText: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to show the brand/company name
|
|
41
|
+
*/
|
|
42
|
+
showBrand: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to show the reference number
|
|
45
|
+
*/
|
|
46
|
+
showReference: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to show employment type
|
|
49
|
+
*/
|
|
50
|
+
showEmploymentType: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Text shown for multiple locations
|
|
53
|
+
*/
|
|
54
|
+
multiLocationText: string;
|
|
55
|
+
/**
|
|
56
|
+
* Text shown for remote jobs
|
|
57
|
+
*/
|
|
58
|
+
remoteLocationText: string;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to show distances in kilometers instead of miles
|
|
61
|
+
*/
|
|
62
|
+
enableKilometers: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to show commute time
|
|
65
|
+
*/
|
|
66
|
+
showCommuteTime: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Format string for street address (not used in base web component)
|
|
69
|
+
*/
|
|
70
|
+
streetFormat: string;
|
|
71
|
+
/** Extra CSS class on the root inner element (avoid prop name "className", reserved on HTMLElement). */
|
|
72
|
+
rootClass: string;
|
|
73
|
+
/**
|
|
74
|
+
* Custom extra fields configuration
|
|
75
|
+
*/
|
|
76
|
+
extraFieldsConfig: Array<{
|
|
77
|
+
name: string;
|
|
78
|
+
value: string;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Format distance with unit
|
|
82
|
+
*/
|
|
83
|
+
private formatDistance;
|
|
84
|
+
/**
|
|
85
|
+
* Is Empty utility
|
|
86
|
+
*/
|
|
87
|
+
private isEmpty;
|
|
88
|
+
/**
|
|
89
|
+
* Parse job data from prop - handles both object and JSON string
|
|
90
|
+
*/
|
|
91
|
+
private getJobData;
|
|
92
|
+
render(): any;
|
|
93
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { Job } from '../../types/jobs-list';
|
|
2
3
|
export declare class JobsListOnly {
|
|
3
4
|
/**
|
|
4
5
|
* When "true", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent.
|
|
5
6
|
*/
|
|
6
7
|
mockData: boolean;
|
|
7
8
|
/** 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". */
|
|
8
|
-
jobs:
|
|
9
|
+
jobs: Job[] | string;
|
|
9
10
|
/** Show loading spinner. Ignored when mock-data="true" (mock shows data immediately). */
|
|
10
11
|
loading: boolean;
|
|
11
12
|
/** Total job count (for screen readers / schema). */
|
|
@@ -22,12 +23,33 @@ export declare class JobsListOnly {
|
|
|
22
23
|
enableKilometers: boolean;
|
|
23
24
|
/** Extra CSS class on the root element (avoid prop name "class" / "classname" reserved). */
|
|
24
25
|
rootClass: string;
|
|
26
|
+
/** Template string for count display. Tokens: {count} = jobs on page, {total} = total from API. */
|
|
27
|
+
showCountText: string;
|
|
25
28
|
showSuggestions: boolean;
|
|
26
29
|
clearResultSuggestionsTitleText: string;
|
|
27
30
|
clearResultSuggestionsLine1: string;
|
|
28
31
|
clearResultSuggestionsLine2: string;
|
|
29
32
|
clearResultSuggestionsLine3: string;
|
|
30
33
|
clearResultSuggestionsLine4: string;
|
|
34
|
+
/** When true, component manages its own data fetching */
|
|
35
|
+
autoFetch: boolean;
|
|
36
|
+
/** Jobs search endpoint */
|
|
37
|
+
apiUrl: string;
|
|
38
|
+
/** Comma-separated URL param names to watch and forward to the API */
|
|
39
|
+
watchParams: string;
|
|
40
|
+
fetchedJobs: any[];
|
|
41
|
+
fetchedTotal: number;
|
|
42
|
+
fetchLoading: boolean;
|
|
43
|
+
fetchComplete: EventEmitter<{
|
|
44
|
+
jobs: any[];
|
|
45
|
+
totalJob: number;
|
|
46
|
+
}>;
|
|
47
|
+
private searchExecutedHandler;
|
|
48
|
+
private popstateHandler;
|
|
49
|
+
connectedCallback(): void;
|
|
50
|
+
disconnectedCallback(): void;
|
|
51
|
+
private fetchJobs;
|
|
52
|
+
private renderCountText;
|
|
31
53
|
private getJobsArray;
|
|
32
54
|
private renderJobItem;
|
|
33
55
|
render(): any;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { Job } from '../../types/jobs-list';
|
|
3
|
+
export declare class JobsListReactive {
|
|
4
|
+
el: HTMLElement;
|
|
5
|
+
/** Jobs search endpoint */
|
|
6
|
+
apiUrl: string;
|
|
7
|
+
/** Comma-separated URL param names to watch and forward to the API */
|
|
8
|
+
watchParams: string;
|
|
9
|
+
/** CSS class added to container while fetching */
|
|
10
|
+
loadingClass: string;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
fetchComplete: EventEmitter<{
|
|
13
|
+
jobs: Job[];
|
|
14
|
+
totalJob: number;
|
|
15
|
+
}>;
|
|
16
|
+
private templateEl;
|
|
17
|
+
private searchExecutedHandler;
|
|
18
|
+
private popstateHandler;
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
disconnectedCallback(): void;
|
|
21
|
+
private buildQueryString;
|
|
22
|
+
private fetchJobs;
|
|
23
|
+
private renderJobs;
|
|
24
|
+
private updateCountElements;
|
|
25
|
+
render(): any;
|
|
26
|
+
}
|