@phatvu/web-component-poc 1.0.0
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/LICENSE +21 -0
- package/dist/components/fast-button.d.ts +11 -0
- package/dist/components/fast-carousel.d.ts +11 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/jobs-list-only-ui.d.ts +11 -0
- package/dist/types/components/button/button.d.ts +23 -0
- package/dist/types/components/fast-carousel/carousel.d.ts +54 -0
- package/dist/types/components/jobs-list-only-ui/jobs-list-only-ui.d.ts +35 -0
- package/dist/types/components.d.ts +398 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/mock/jobs-list-only.mock.d.ts +7 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types/jobs-list.d.ts +58 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/web-component-poc/fast-button.entry.js +47 -0
- package/dist/web-component-poc/fast-button.entry.js.map +1 -0
- package/dist/web-component-poc/fast-carousel.entry.js +1910 -0
- package/dist/web-component-poc/fast-carousel.entry.js.map +1 -0
- package/dist/web-component-poc/index-B0WZf8UB.js +4585 -0
- package/dist/web-component-poc/index-B0WZf8UB.js.map +1 -0
- package/dist/web-component-poc/index.esm.js +18 -0
- package/dist/web-component-poc/index.esm.js.map +1 -0
- package/dist/web-component-poc/jobs-list-only-ui.entry.js +173 -0
- package/dist/web-component-poc/jobs-list-only-ui.entry.js.map +1 -0
- package/dist/web-component-poc/web-component-poc.esm.js +50 -0
- package/dist/web-component-poc/web-component-poc.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +59 -0
- package/readme.md +111 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface FastButton extends Components.FastButton, HTMLElement {}
|
|
4
|
+
export const FastButton: {
|
|
5
|
+
prototype: FastButton;
|
|
6
|
+
new (): FastButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface FastCarousel extends Components.FastCarousel, HTMLElement {}
|
|
4
|
+
export const FastCarousel: {
|
|
5
|
+
prototype: FastCarousel;
|
|
6
|
+
new (): FastCarousel;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to manually set the base path where assets can be found.
|
|
9
|
+
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
10
|
+
* such as "setAssetPath(import.meta.url)". Other options include
|
|
11
|
+
* "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
|
|
12
|
+
* dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
|
|
13
|
+
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
14
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
15
|
+
* will have to ensure the static assets are copied to its build directory.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setAssetPath: (path: string) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
21
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
22
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
23
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
24
|
+
* will result in the same behavior.
|
|
25
|
+
*/
|
|
26
|
+
export declare const setNonce: (nonce: string) => void
|
|
27
|
+
|
|
28
|
+
export interface SetPlatformOptions {
|
|
29
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
30
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
31
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
34
|
+
|
|
35
|
+
export * from '../types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface JobsListOnlyUi extends Components.JobsListOnlyUi, HTMLElement {}
|
|
4
|
+
export const JobsListOnlyUi: {
|
|
5
|
+
prototype: JobsListOnlyUi;
|
|
6
|
+
new (): JobsListOnlyUi;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'text';
|
|
3
|
+
export type ButtonType = 'button' | 'submit';
|
|
4
|
+
export declare class CustomButton {
|
|
5
|
+
/**
|
|
6
|
+
* Visual variant of the button.
|
|
7
|
+
*/
|
|
8
|
+
variant: ButtonVariant;
|
|
9
|
+
/**
|
|
10
|
+
* Native button type (button or submit).
|
|
11
|
+
*/
|
|
12
|
+
type: ButtonType;
|
|
13
|
+
/**
|
|
14
|
+
* When true, the button is disabled and does not emit events.
|
|
15
|
+
*/
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Emitted when the button is clicked (not emitted when disabled).
|
|
19
|
+
*/
|
|
20
|
+
buttonClick: EventEmitter<MouseEvent>;
|
|
21
|
+
private handleClick;
|
|
22
|
+
render(): any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare class AppCarousel {
|
|
2
|
+
el: HTMLElement;
|
|
3
|
+
/** Optional list of items to render as slides (each item in a slide). When set, slot is ignored. Accepts array or JSON string. */
|
|
4
|
+
items: unknown[] | string | undefined;
|
|
5
|
+
/** Whether the carousel loops. */
|
|
6
|
+
loop: boolean;
|
|
7
|
+
/** Extra class for the root carousel element. */
|
|
8
|
+
class: string;
|
|
9
|
+
/** Extra class for the controls container. */
|
|
10
|
+
controlClass: string;
|
|
11
|
+
/** Extra class for the slide viewport. */
|
|
12
|
+
slideClass: string;
|
|
13
|
+
/** Extra class for each slide item (items mode only). */
|
|
14
|
+
itemClass: string;
|
|
15
|
+
private viewportRef;
|
|
16
|
+
private containerRef;
|
|
17
|
+
private slotRef;
|
|
18
|
+
private prevBtnRef;
|
|
19
|
+
private nextBtnRef;
|
|
20
|
+
private dotsRef;
|
|
21
|
+
private embla;
|
|
22
|
+
private movedNodes;
|
|
23
|
+
private prevClickHandler;
|
|
24
|
+
private nextClickHandler;
|
|
25
|
+
private dotClickHandlers;
|
|
26
|
+
private slotNodesMoved;
|
|
27
|
+
/**
|
|
28
|
+
* Go to the previous slide.
|
|
29
|
+
*/
|
|
30
|
+
scrollPrev(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Go to the next slide.
|
|
33
|
+
*/
|
|
34
|
+
scrollNext(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Go to slide by index (0-based).
|
|
37
|
+
*/
|
|
38
|
+
goToSlide(index: number): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Get the Embla API instance (if initialized). Returns null before init or after destroy.
|
|
41
|
+
*/
|
|
42
|
+
getEmbla(): Promise<unknown>;
|
|
43
|
+
private moveSlotNodesIntoContainer;
|
|
44
|
+
private initScheduled;
|
|
45
|
+
private scheduleEmblaInit;
|
|
46
|
+
private moveSlotNodesBack;
|
|
47
|
+
private initEmbla;
|
|
48
|
+
private destroyEmbla;
|
|
49
|
+
private onSlotChange;
|
|
50
|
+
componentDidRender(): void;
|
|
51
|
+
disconnectedCallback(): void;
|
|
52
|
+
private getItemsArray;
|
|
53
|
+
render(): any;
|
|
54
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { JobSummary } from '../../types/jobs-list';
|
|
2
|
+
export declare class JobsListOnlyUI {
|
|
3
|
+
/**
|
|
4
|
+
* When "true", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent.
|
|
5
|
+
*/
|
|
6
|
+
mockData: boolean;
|
|
7
|
+
/** 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
|
+
/** Show loading spinner. Ignored when mock-data="true" (mock shows data immediately). */
|
|
10
|
+
loading: boolean;
|
|
11
|
+
/** Total job count (for screen readers / schema). */
|
|
12
|
+
totalJob: number;
|
|
13
|
+
noResultsLine1: string;
|
|
14
|
+
noResultsLine2: string;
|
|
15
|
+
applyButtonText: string;
|
|
16
|
+
showBrand: boolean;
|
|
17
|
+
showReference: boolean;
|
|
18
|
+
showEmploymentType: boolean;
|
|
19
|
+
streetFormat: string;
|
|
20
|
+
multiLocationText: string;
|
|
21
|
+
remoteLocationText: string;
|
|
22
|
+
enableKilometers: boolean;
|
|
23
|
+
/** Extra CSS class on the root element (avoid prop name "class" / "classname" reserved). */
|
|
24
|
+
rootClass: string;
|
|
25
|
+
showSuggestions: boolean;
|
|
26
|
+
clearResultSuggestionsTitleText: string;
|
|
27
|
+
clearResultSuggestionsLine1: string;
|
|
28
|
+
clearResultSuggestionsLine2: string;
|
|
29
|
+
clearResultSuggestionsLine3: string;
|
|
30
|
+
clearResultSuggestionsLine4: string;
|
|
31
|
+
private getJobsArray;
|
|
32
|
+
private formatDistance;
|
|
33
|
+
private renderJobItem;
|
|
34
|
+
render(): any;
|
|
35
|
+
}
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
+
import { ButtonType, ButtonVariant } from "./components/button/button";
|
|
9
|
+
import { JobSummary } from "./types/jobs-list";
|
|
10
|
+
export { ButtonType, ButtonVariant } from "./components/button/button";
|
|
11
|
+
export { JobSummary } from "./types/jobs-list";
|
|
12
|
+
export namespace Components {
|
|
13
|
+
interface FastButton {
|
|
14
|
+
/**
|
|
15
|
+
* When true, the button is disabled and does not emit events.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
"disabled": boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Native button type (button or submit).
|
|
21
|
+
* @default 'button'
|
|
22
|
+
*/
|
|
23
|
+
"type": ButtonType;
|
|
24
|
+
/**
|
|
25
|
+
* Visual variant of the button.
|
|
26
|
+
* @default 'primary'
|
|
27
|
+
*/
|
|
28
|
+
"variant": ButtonVariant;
|
|
29
|
+
}
|
|
30
|
+
interface FastCarousel {
|
|
31
|
+
/**
|
|
32
|
+
* Extra class for the root carousel element.
|
|
33
|
+
*/
|
|
34
|
+
"class": string;
|
|
35
|
+
/**
|
|
36
|
+
* Extra class for the controls container.
|
|
37
|
+
*/
|
|
38
|
+
"controlClass": string;
|
|
39
|
+
/**
|
|
40
|
+
* Get the Embla API instance (if initialized). Returns null before init or after destroy.
|
|
41
|
+
*/
|
|
42
|
+
"getEmbla": () => Promise<unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Go to slide by index (0-based).
|
|
45
|
+
*/
|
|
46
|
+
"goToSlide": (index: number) => Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Extra class for each slide item (items mode only).
|
|
49
|
+
*/
|
|
50
|
+
"itemClass": string;
|
|
51
|
+
/**
|
|
52
|
+
* Optional list of items to render as slides (each item in a slide). When set, slot is ignored. Accepts array or JSON string.
|
|
53
|
+
*/
|
|
54
|
+
"items": unknown[] | string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the carousel loops.
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
"loop": boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Go to the next slide.
|
|
62
|
+
*/
|
|
63
|
+
"scrollNext": () => Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Go to the previous slide.
|
|
66
|
+
*/
|
|
67
|
+
"scrollPrev": () => Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Extra class for the slide viewport.
|
|
70
|
+
*/
|
|
71
|
+
"slideClass": string;
|
|
72
|
+
}
|
|
73
|
+
interface JobsListOnlyUi {
|
|
74
|
+
/**
|
|
75
|
+
* @default 'Apply Now'
|
|
76
|
+
*/
|
|
77
|
+
"applyButtonText": string;
|
|
78
|
+
/**
|
|
79
|
+
* @default 'Try different keywords'
|
|
80
|
+
*/
|
|
81
|
+
"clearResultSuggestionsLine1": string;
|
|
82
|
+
/**
|
|
83
|
+
* @default 'Make sure everything is spelled correctly'
|
|
84
|
+
*/
|
|
85
|
+
"clearResultSuggestionsLine2": string;
|
|
86
|
+
/**
|
|
87
|
+
* @default 'Try other locations'
|
|
88
|
+
*/
|
|
89
|
+
"clearResultSuggestionsLine3": string;
|
|
90
|
+
/**
|
|
91
|
+
* @default ''
|
|
92
|
+
*/
|
|
93
|
+
"clearResultSuggestionsLine4": string;
|
|
94
|
+
/**
|
|
95
|
+
* @default 'Suggestions'
|
|
96
|
+
*/
|
|
97
|
+
"clearResultSuggestionsTitleText": string;
|
|
98
|
+
/**
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
"enableKilometers": boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 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".
|
|
104
|
+
* @default []
|
|
105
|
+
*/
|
|
106
|
+
"jobs": JobSummary[] | string;
|
|
107
|
+
/**
|
|
108
|
+
* Show loading spinner. Ignored when mock-data="true" (mock shows data immediately).
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
"loading": boolean;
|
|
112
|
+
/**
|
|
113
|
+
* When "true", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent.
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
"mockData": boolean;
|
|
117
|
+
/**
|
|
118
|
+
* @default 'More locations'
|
|
119
|
+
*/
|
|
120
|
+
"multiLocationText": string;
|
|
121
|
+
/**
|
|
122
|
+
* @default defaultNoResultsLine1
|
|
123
|
+
*/
|
|
124
|
+
"noResultsLine1": string;
|
|
125
|
+
/**
|
|
126
|
+
* @default defaultNoResultsLine2
|
|
127
|
+
*/
|
|
128
|
+
"noResultsLine2": string;
|
|
129
|
+
/**
|
|
130
|
+
* @default 'Remote'
|
|
131
|
+
*/
|
|
132
|
+
"remoteLocationText": string;
|
|
133
|
+
/**
|
|
134
|
+
* Extra CSS class on the root element (avoid prop name "class" / "classname" reserved).
|
|
135
|
+
* @default ''
|
|
136
|
+
*/
|
|
137
|
+
"rootClass": string;
|
|
138
|
+
/**
|
|
139
|
+
* @default true
|
|
140
|
+
*/
|
|
141
|
+
"showBrand": boolean;
|
|
142
|
+
/**
|
|
143
|
+
* @default true
|
|
144
|
+
*/
|
|
145
|
+
"showEmploymentType": boolean;
|
|
146
|
+
/**
|
|
147
|
+
* @default false
|
|
148
|
+
*/
|
|
149
|
+
"showReference": boolean;
|
|
150
|
+
/**
|
|
151
|
+
* @default false
|
|
152
|
+
*/
|
|
153
|
+
"showSuggestions": boolean;
|
|
154
|
+
/**
|
|
155
|
+
* @default '{street}, {city_state_abbr}'
|
|
156
|
+
*/
|
|
157
|
+
"streetFormat": string;
|
|
158
|
+
/**
|
|
159
|
+
* Total job count (for screen readers / schema).
|
|
160
|
+
* @default 0
|
|
161
|
+
*/
|
|
162
|
+
"totalJob": number;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
export interface FastButtonCustomEvent<T> extends CustomEvent<T> {
|
|
166
|
+
detail: T;
|
|
167
|
+
target: HTMLFastButtonElement;
|
|
168
|
+
}
|
|
169
|
+
declare global {
|
|
170
|
+
interface HTMLFastButtonElementEventMap {
|
|
171
|
+
"buttonClick": MouseEvent;
|
|
172
|
+
}
|
|
173
|
+
interface HTMLFastButtonElement extends Components.FastButton, HTMLStencilElement {
|
|
174
|
+
addEventListener<K extends keyof HTMLFastButtonElementEventMap>(type: K, listener: (this: HTMLFastButtonElement, ev: FastButtonCustomEvent<HTMLFastButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
175
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
176
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
177
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
178
|
+
removeEventListener<K extends keyof HTMLFastButtonElementEventMap>(type: K, listener: (this: HTMLFastButtonElement, ev: FastButtonCustomEvent<HTMLFastButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
179
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
180
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
181
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
182
|
+
}
|
|
183
|
+
var HTMLFastButtonElement: {
|
|
184
|
+
prototype: HTMLFastButtonElement;
|
|
185
|
+
new (): HTMLFastButtonElement;
|
|
186
|
+
};
|
|
187
|
+
interface HTMLFastCarouselElement extends Components.FastCarousel, HTMLStencilElement {
|
|
188
|
+
}
|
|
189
|
+
var HTMLFastCarouselElement: {
|
|
190
|
+
prototype: HTMLFastCarouselElement;
|
|
191
|
+
new (): HTMLFastCarouselElement;
|
|
192
|
+
};
|
|
193
|
+
interface HTMLJobsListOnlyUiElement extends Components.JobsListOnlyUi, HTMLStencilElement {
|
|
194
|
+
}
|
|
195
|
+
var HTMLJobsListOnlyUiElement: {
|
|
196
|
+
prototype: HTMLJobsListOnlyUiElement;
|
|
197
|
+
new (): HTMLJobsListOnlyUiElement;
|
|
198
|
+
};
|
|
199
|
+
interface HTMLElementTagNameMap {
|
|
200
|
+
"fast-button": HTMLFastButtonElement;
|
|
201
|
+
"fast-carousel": HTMLFastCarouselElement;
|
|
202
|
+
"jobs-list-only-ui": HTMLJobsListOnlyUiElement;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
declare namespace LocalJSX {
|
|
206
|
+
interface FastButton {
|
|
207
|
+
/**
|
|
208
|
+
* When true, the button is disabled and does not emit events.
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
"disabled"?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Emitted when the button is clicked (not emitted when disabled).
|
|
214
|
+
*/
|
|
215
|
+
"onButtonClick"?: (event: FastButtonCustomEvent<MouseEvent>) => void;
|
|
216
|
+
/**
|
|
217
|
+
* Native button type (button or submit).
|
|
218
|
+
* @default 'button'
|
|
219
|
+
*/
|
|
220
|
+
"type"?: ButtonType;
|
|
221
|
+
/**
|
|
222
|
+
* Visual variant of the button.
|
|
223
|
+
* @default 'primary'
|
|
224
|
+
*/
|
|
225
|
+
"variant"?: ButtonVariant;
|
|
226
|
+
}
|
|
227
|
+
interface FastCarousel {
|
|
228
|
+
/**
|
|
229
|
+
* Extra class for the root carousel element.
|
|
230
|
+
*/
|
|
231
|
+
"class"?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Extra class for the controls container.
|
|
234
|
+
*/
|
|
235
|
+
"controlClass"?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Extra class for each slide item (items mode only).
|
|
238
|
+
*/
|
|
239
|
+
"itemClass"?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Optional list of items to render as slides (each item in a slide). When set, slot is ignored. Accepts array or JSON string.
|
|
242
|
+
*/
|
|
243
|
+
"items"?: unknown[] | string | undefined;
|
|
244
|
+
/**
|
|
245
|
+
* Whether the carousel loops.
|
|
246
|
+
* @default true
|
|
247
|
+
*/
|
|
248
|
+
"loop"?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Extra class for the slide viewport.
|
|
251
|
+
*/
|
|
252
|
+
"slideClass"?: string;
|
|
253
|
+
}
|
|
254
|
+
interface JobsListOnlyUi {
|
|
255
|
+
/**
|
|
256
|
+
* @default 'Apply Now'
|
|
257
|
+
*/
|
|
258
|
+
"applyButtonText"?: string;
|
|
259
|
+
/**
|
|
260
|
+
* @default 'Try different keywords'
|
|
261
|
+
*/
|
|
262
|
+
"clearResultSuggestionsLine1"?: string;
|
|
263
|
+
/**
|
|
264
|
+
* @default 'Make sure everything is spelled correctly'
|
|
265
|
+
*/
|
|
266
|
+
"clearResultSuggestionsLine2"?: string;
|
|
267
|
+
/**
|
|
268
|
+
* @default 'Try other locations'
|
|
269
|
+
*/
|
|
270
|
+
"clearResultSuggestionsLine3"?: string;
|
|
271
|
+
/**
|
|
272
|
+
* @default ''
|
|
273
|
+
*/
|
|
274
|
+
"clearResultSuggestionsLine4"?: string;
|
|
275
|
+
/**
|
|
276
|
+
* @default 'Suggestions'
|
|
277
|
+
*/
|
|
278
|
+
"clearResultSuggestionsTitleText"?: string;
|
|
279
|
+
/**
|
|
280
|
+
* @default false
|
|
281
|
+
*/
|
|
282
|
+
"enableKilometers"?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* 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".
|
|
285
|
+
* @default []
|
|
286
|
+
*/
|
|
287
|
+
"jobs"?: JobSummary[] | string;
|
|
288
|
+
/**
|
|
289
|
+
* Show loading spinner. Ignored when mock-data="true" (mock shows data immediately).
|
|
290
|
+
* @default false
|
|
291
|
+
*/
|
|
292
|
+
"loading"?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* When "true", use built-in mock data (for local/dev/docs). Otherwise use `jobs` from API/parent.
|
|
295
|
+
* @default false
|
|
296
|
+
*/
|
|
297
|
+
"mockData"?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* @default 'More locations'
|
|
300
|
+
*/
|
|
301
|
+
"multiLocationText"?: string;
|
|
302
|
+
/**
|
|
303
|
+
* @default defaultNoResultsLine1
|
|
304
|
+
*/
|
|
305
|
+
"noResultsLine1"?: string;
|
|
306
|
+
/**
|
|
307
|
+
* @default defaultNoResultsLine2
|
|
308
|
+
*/
|
|
309
|
+
"noResultsLine2"?: string;
|
|
310
|
+
/**
|
|
311
|
+
* @default 'Remote'
|
|
312
|
+
*/
|
|
313
|
+
"remoteLocationText"?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Extra CSS class on the root element (avoid prop name "class" / "classname" reserved).
|
|
316
|
+
* @default ''
|
|
317
|
+
*/
|
|
318
|
+
"rootClass"?: string;
|
|
319
|
+
/**
|
|
320
|
+
* @default true
|
|
321
|
+
*/
|
|
322
|
+
"showBrand"?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* @default true
|
|
325
|
+
*/
|
|
326
|
+
"showEmploymentType"?: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* @default false
|
|
329
|
+
*/
|
|
330
|
+
"showReference"?: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* @default false
|
|
333
|
+
*/
|
|
334
|
+
"showSuggestions"?: boolean;
|
|
335
|
+
/**
|
|
336
|
+
* @default '{street}, {city_state_abbr}'
|
|
337
|
+
*/
|
|
338
|
+
"streetFormat"?: string;
|
|
339
|
+
/**
|
|
340
|
+
* Total job count (for screen readers / schema).
|
|
341
|
+
* @default 0
|
|
342
|
+
*/
|
|
343
|
+
"totalJob"?: number;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface FastButtonAttributes {
|
|
347
|
+
"variant": ButtonVariant;
|
|
348
|
+
"type": ButtonType;
|
|
349
|
+
"disabled": boolean;
|
|
350
|
+
}
|
|
351
|
+
interface FastCarouselAttributes {
|
|
352
|
+
"items": unknown[] | string | undefined;
|
|
353
|
+
"loop": boolean;
|
|
354
|
+
"class": string;
|
|
355
|
+
"controlClass": string;
|
|
356
|
+
"slideClass": string;
|
|
357
|
+
"itemClass": string;
|
|
358
|
+
}
|
|
359
|
+
interface JobsListOnlyUiAttributes {
|
|
360
|
+
"mockData": boolean;
|
|
361
|
+
"jobs": JobSummary[] | string;
|
|
362
|
+
"loading": boolean;
|
|
363
|
+
"totalJob": number;
|
|
364
|
+
"noResultsLine1": string;
|
|
365
|
+
"noResultsLine2": string;
|
|
366
|
+
"applyButtonText": string;
|
|
367
|
+
"showBrand": boolean;
|
|
368
|
+
"showReference": boolean;
|
|
369
|
+
"showEmploymentType": boolean;
|
|
370
|
+
"streetFormat": string;
|
|
371
|
+
"multiLocationText": string;
|
|
372
|
+
"remoteLocationText": string;
|
|
373
|
+
"enableKilometers": boolean;
|
|
374
|
+
"rootClass": string;
|
|
375
|
+
"showSuggestions": boolean;
|
|
376
|
+
"clearResultSuggestionsTitleText": string;
|
|
377
|
+
"clearResultSuggestionsLine1": string;
|
|
378
|
+
"clearResultSuggestionsLine2": string;
|
|
379
|
+
"clearResultSuggestionsLine3": string;
|
|
380
|
+
"clearResultSuggestionsLine4": string;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
interface IntrinsicElements {
|
|
384
|
+
"fast-button": Omit<FastButton, keyof FastButtonAttributes> & { [K in keyof FastButton & keyof FastButtonAttributes]?: FastButton[K] } & { [K in keyof FastButton & keyof FastButtonAttributes as `attr:${K}`]?: FastButtonAttributes[K] } & { [K in keyof FastButton & keyof FastButtonAttributes as `prop:${K}`]?: FastButton[K] };
|
|
385
|
+
"fast-carousel": Omit<FastCarousel, keyof FastCarouselAttributes> & { [K in keyof FastCarousel & keyof FastCarouselAttributes]?: FastCarousel[K] } & { [K in keyof FastCarousel & keyof FastCarouselAttributes as `attr:${K}`]?: FastCarouselAttributes[K] } & { [K in keyof FastCarousel & keyof FastCarouselAttributes as `prop:${K}`]?: FastCarousel[K] };
|
|
386
|
+
"jobs-list-only-ui": Omit<JobsListOnlyUi, keyof JobsListOnlyUiAttributes> & { [K in keyof JobsListOnlyUi & keyof JobsListOnlyUiAttributes]?: JobsListOnlyUi[K] } & { [K in keyof JobsListOnlyUi & keyof JobsListOnlyUiAttributes as `attr:${K}`]?: JobsListOnlyUiAttributes[K] } & { [K in keyof JobsListOnlyUi & keyof JobsListOnlyUiAttributes as `prop:${K}`]?: JobsListOnlyUi[K] };
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
export { LocalJSX as JSX };
|
|
390
|
+
declare module "@stencil/core" {
|
|
391
|
+
export namespace JSX {
|
|
392
|
+
interface IntrinsicElements {
|
|
393
|
+
"fast-button": LocalJSX.IntrinsicElements["fast-button"] & JSXBase.HTMLAttributes<HTMLFastButtonElement>;
|
|
394
|
+
"fast-carousel": LocalJSX.IntrinsicElements["fast-carousel"] & JSXBase.HTMLAttributes<HTMLFastCarouselElement>;
|
|
395
|
+
"jobs-list-only-ui": LocalJSX.IntrinsicElements["jobs-list-only-ui"] & JSXBase.HTMLAttributes<HTMLJobsListOnlyUiElement>;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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';
|
|
11
|
+
export type * from './components.d.ts';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JobSummary } from '../types/jobs-list';
|
|
2
|
+
/**
|
|
3
|
+
* Mock jobs for local development and docs.
|
|
4
|
+
* Use in www or static HTML: jobs='...' (JSON.stringify(mockJobs)).
|
|
5
|
+
*/
|
|
6
|
+
export declare const mockJobsListOnly: JobSummary[];
|
|
7
|
+
export declare function getMockJobsJson(): string;
|