@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.
Files changed (55) hide show
  1. package/dist/cjs/fast-button.cjs.entry.js +46 -0
  2. package/dist/cjs/{fast-button_4.cjs.entry.js → fast-carousel.cjs.entry.js} +1 -231
  3. package/dist/cjs/fast-input_4.cjs.entry.js +499 -0
  4. package/dist/cjs/{index-B2BTpdbN.js → index-BEvZs91D.js} +2 -2
  5. package/dist/cjs/job-card.cjs.entry.js +138 -0
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/web-component-poc.cjs.js +2 -2
  8. package/dist/collection/collection-manifest.json +4 -1
  9. package/dist/collection/components/button/button.js +2 -2
  10. package/dist/collection/components/fast-input/fast-input.css +55 -0
  11. package/dist/collection/components/fast-input/fast-input.js +335 -0
  12. package/dist/collection/components/job-card/job-card.css +247 -0
  13. package/dist/collection/components/job-card/job-card.js +435 -0
  14. package/dist/collection/components/jobs-item/jobs-item.js +5 -5
  15. package/dist/collection/components/jobs-list-only/jobs-list-only.js +185 -8
  16. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.css +8 -0
  17. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +203 -0
  18. package/dist/components/fast-button.js +1 -1
  19. package/dist/components/fast-carousel.js +1 -1
  20. package/dist/components/fast-input.d.ts +11 -0
  21. package/dist/components/fast-input.js +1 -0
  22. package/dist/components/index.js +1 -1
  23. package/dist/components/job-card.d.ts +11 -0
  24. package/dist/components/job-card.js +1 -0
  25. package/dist/components/jobs-item.js +1 -1
  26. package/dist/components/jobs-list-only.js +1 -1
  27. package/dist/components/jobs-list-reactive.d.ts +11 -0
  28. package/dist/components/jobs-list-reactive.js +1 -0
  29. package/dist/components/{p-ClQDwJJB.js → p-DQiaLjLf.js} +1 -1
  30. package/dist/esm/fast-button.entry.js +44 -0
  31. package/dist/esm/{fast-button_4.entry.js → fast-carousel.entry.js} +2 -229
  32. package/dist/esm/fast-input_4.entry.js +494 -0
  33. package/dist/esm/{index-Dk5CvWmb.js → index-C_ZLQIpp.js} +2 -2
  34. package/dist/esm/job-card.entry.js +136 -0
  35. package/dist/esm/loader.js +3 -3
  36. package/dist/esm/web-component-poc.js +3 -3
  37. package/dist/types/components/fast-input/fast-input.d.ts +37 -0
  38. package/dist/types/components/job-card/job-card.d.ts +93 -0
  39. package/dist/types/components/jobs-item/jobs-item.d.ts +2 -2
  40. package/dist/types/components/jobs-list-only/jobs-list-only.d.ts +24 -2
  41. package/dist/types/components/jobs-list-reactive/jobs-list-reactive.d.ts +26 -0
  42. package/dist/types/components.d.ts +469 -7
  43. package/dist/types/mock/jobs-list-only.mock.d.ts +2 -2
  44. package/dist/types/types/jobs-list.d.ts +6 -2
  45. package/dist/web-component-poc/p-618fba28.entry.js +1 -0
  46. package/dist/web-component-poc/p-7d45772f.entry.js +1 -0
  47. package/dist/web-component-poc/p-bef7c8e2.entry.js +1 -0
  48. package/dist/web-component-poc/p-cfb9aed9.entry.js +1 -0
  49. package/dist/web-component-poc/web-component-poc.esm.js +1 -1
  50. package/hydrate/index.js +534 -6
  51. package/hydrate/index.mjs +534 -6
  52. package/package.json +9 -1
  53. package/dist/web-component-poc/p-df843533.entry.js +0 -1
  54. /package/dist/components/{p-UM9TUfe3.js → p-BiaJAQXY.js} +0 -0
  55. /package/dist/web-component-poc/{p-Dk5CvWmb.js → p-C_ZLQIpp.js} +0 -0
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-Dk5CvWmb.js';
2
- export { s as setNonce } from './index-Dk5CvWmb.js';
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-button_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"],"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);
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-Dk5CvWmb.js';
2
- export { s as setNonce } from './index-Dk5CvWmb.js';
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-button_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"],"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);
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,6 +1,6 @@
1
- import type { JobSummary } from '../../types/jobs-list';
1
+ import type { Job } from '../../types/jobs-list';
2
2
  export declare class JobsItem {
3
- job: JobSummary;
3
+ job: Job;
4
4
  index: number;
5
5
  applyButtonText: string;
6
6
  showBrand: boolean;
@@ -1,11 +1,12 @@
1
- import type { JobSummary } from '../../types/jobs-list';
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: JobSummary[] | string;
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
+ }