@inploi/plugin-job-search 9.0.8 → 9.1.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/README.md +142 -0
- package/cdn/index.js +14 -14
- package/cdn/style.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +112 -3
- package/dist/index.d.ts +112 -3
- package/dist/index.js +211 -204
- package/dist/{job-search-C1jNeCI0.js → job-search-B1b-rnEA.js} +3257 -2888
- package/dist/job-search-C3GQfRuS.cjs +44 -0
- package/dist/{map-BdK-wTC4.js → map-B07rie_d.js} +2 -2
- package/dist/{map-CA2GQNlw.cjs → map-f6ktiM4h.cjs} +1 -1
- package/dist/{mapbox-gl-DU8p4eb-.js → mapbox-gl-CWJ5zGOw.js} +1 -1
- package/dist/{mapbox-gl-SSZZLm3u.cjs → mapbox-gl-DaVFW41r.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.cts +59 -2
- package/dist/utils.d.ts +59 -2
- package/dist/utils.js +1 -1
- package/package.json +4 -4
- package/dist/job-search-TQDgitmM.cjs +0 -44
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,18 @@ export declare const createJobSearchDomManager: (logger: Logger) => {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
declare const createTFunction: <T extends {
|
|
24
|
+
readonly save_job: "Save {{title}}";
|
|
25
|
+
readonly remove_saved_job: "Remove {{title}} from saved jobs";
|
|
26
|
+
readonly view_saved_jobs: "Saved jobs";
|
|
27
|
+
readonly view_saved_jobs_count: "Saved jobs ({{count}})";
|
|
28
|
+
readonly saved_jobs_title: "Your saved jobs";
|
|
29
|
+
readonly saved_job_unavailable: "No longer available";
|
|
30
|
+
readonly remove_unavailable_saved_job: "Remove unavailable job {{id}} from saved jobs";
|
|
31
|
+
readonly remove: "Remove";
|
|
32
|
+
readonly no_saved_jobs: "No saved jobs";
|
|
33
|
+
readonly unavailable_saved_jobs: "Some saved jobs are unavailable in this view. Your bookmarks have been kept.";
|
|
34
|
+
readonly search_jobs: "Search Jobs";
|
|
35
|
+
readonly search: "Search";
|
|
24
36
|
readonly type_to_search_jobs: "Type to search jobs";
|
|
25
37
|
readonly type_to_search: "Type to search";
|
|
26
38
|
readonly jobs_found: {
|
|
@@ -103,6 +115,18 @@ declare const createTFunction: <T extends {
|
|
|
103
115
|
readonly 'job.location_type.REMOTE': "Remote";
|
|
104
116
|
readonly 'job.location_type.HYBRID': "Hybrid";
|
|
105
117
|
} = {
|
|
118
|
+
readonly save_job: "Save {{title}}";
|
|
119
|
+
readonly remove_saved_job: "Remove {{title}} from saved jobs";
|
|
120
|
+
readonly view_saved_jobs: "Saved jobs";
|
|
121
|
+
readonly view_saved_jobs_count: "Saved jobs ({{count}})";
|
|
122
|
+
readonly saved_jobs_title: "Your saved jobs";
|
|
123
|
+
readonly saved_job_unavailable: "No longer available";
|
|
124
|
+
readonly remove_unavailable_saved_job: "Remove unavailable job {{id}} from saved jobs";
|
|
125
|
+
readonly remove: "Remove";
|
|
126
|
+
readonly no_saved_jobs: "No saved jobs";
|
|
127
|
+
readonly unavailable_saved_jobs: "Some saved jobs are unavailable in this view. Your bookmarks have been kept.";
|
|
128
|
+
readonly search_jobs: "Search Jobs";
|
|
129
|
+
readonly search: "Search";
|
|
106
130
|
readonly type_to_search_jobs: "Type to search jobs";
|
|
107
131
|
readonly type_to_search: "Type to search";
|
|
108
132
|
readonly jobs_found: {
|
|
@@ -186,6 +210,18 @@ declare const createTFunction: <T extends {
|
|
|
186
210
|
readonly 'job.location_type.HYBRID': "Hybrid";
|
|
187
211
|
}>(options: {
|
|
188
212
|
overrides: Partial<TranslationDict< {
|
|
213
|
+
readonly save_job: "Save {{title}}";
|
|
214
|
+
readonly remove_saved_job: "Remove {{title}} from saved jobs";
|
|
215
|
+
readonly view_saved_jobs: "Saved jobs";
|
|
216
|
+
readonly view_saved_jobs_count: "Saved jobs ({{count}})";
|
|
217
|
+
readonly saved_jobs_title: "Your saved jobs";
|
|
218
|
+
readonly saved_job_unavailable: "No longer available";
|
|
219
|
+
readonly remove_unavailable_saved_job: "Remove unavailable job {{id}} from saved jobs";
|
|
220
|
+
readonly remove: "Remove";
|
|
221
|
+
readonly no_saved_jobs: "No saved jobs";
|
|
222
|
+
readonly unavailable_saved_jobs: "Some saved jobs are unavailable in this view. Your bookmarks have been kept.";
|
|
223
|
+
readonly search_jobs: "Search Jobs";
|
|
224
|
+
readonly search: "Search";
|
|
189
225
|
readonly type_to_search_jobs: "Type to search jobs";
|
|
190
226
|
readonly type_to_search: "Type to search";
|
|
191
227
|
readonly jobs_found: {
|
|
@@ -274,6 +310,18 @@ declare const createTFunction: <T extends {
|
|
|
274
310
|
export declare type CustomDataKey = `custom_data.${string}`;
|
|
275
311
|
|
|
276
312
|
export declare const defaultTerms: {
|
|
313
|
+
readonly save_job: "Save {{title}}";
|
|
314
|
+
readonly remove_saved_job: "Remove {{title}} from saved jobs";
|
|
315
|
+
readonly view_saved_jobs: "Saved jobs";
|
|
316
|
+
readonly view_saved_jobs_count: "Saved jobs ({{count}})";
|
|
317
|
+
readonly saved_jobs_title: "Your saved jobs";
|
|
318
|
+
readonly saved_job_unavailable: "No longer available";
|
|
319
|
+
readonly remove_unavailable_saved_job: "Remove unavailable job {{id}} from saved jobs";
|
|
320
|
+
readonly remove: "Remove";
|
|
321
|
+
readonly no_saved_jobs: "No saved jobs";
|
|
322
|
+
readonly unavailable_saved_jobs: "Some saved jobs are unavailable in this view. Your bookmarks have been kept.";
|
|
323
|
+
readonly search_jobs: "Search Jobs";
|
|
324
|
+
readonly search: "Search";
|
|
277
325
|
readonly type_to_search_jobs: "Type to search jobs";
|
|
278
326
|
readonly type_to_search: "Type to search";
|
|
279
327
|
readonly jobs_found: {
|
|
@@ -360,7 +408,7 @@ export declare const defaultTerms: {
|
|
|
360
408
|
export declare type DisplayableFilterProperty = {
|
|
361
409
|
key: /** Enter any key or traverse any custom_data object returned by the job with dot-separated keys.
|
|
362
410
|
* @example `custom_data.location.city`
|
|
363
|
-
*/ FilterKey | CustomDataKey;
|
|
411
|
+
*/ FilterKey | CustomDataKey | 'external_id';
|
|
364
412
|
transform?: (value: unknown) => string | string[] | null;
|
|
365
413
|
};
|
|
366
414
|
|
|
@@ -393,6 +441,8 @@ export declare type FilterProperty = {
|
|
|
393
441
|
* @default false
|
|
394
442
|
*/
|
|
395
443
|
searchable?: boolean;
|
|
444
|
+
/** Always offer these unselected values without a keyword, including at zero matches. */
|
|
445
|
+
pinnedValues?: string[];
|
|
396
446
|
/** Whether users can select one or multiple values.
|
|
397
447
|
* @default `'one'`
|
|
398
448
|
*/
|
|
@@ -493,6 +543,7 @@ declare const getJobSearchResults: ({ rpcClient, signal, state, page, t, priorit
|
|
|
493
543
|
employment_type: string;
|
|
494
544
|
id: number;
|
|
495
545
|
company_name: string;
|
|
546
|
+
external_id?: string | null | undefined;
|
|
496
547
|
company_logo: string | null;
|
|
497
548
|
pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null;
|
|
498
549
|
pay_currency: string;
|
|
@@ -527,13 +578,21 @@ declare const getJobSearchResults: ({ rpcClient, signal, state, page, t, priorit
|
|
|
527
578
|
}[];
|
|
528
579
|
}>;
|
|
529
580
|
|
|
581
|
+
/** Scope is the tenant's publishable key, never an analytics/visitor id. Reads never write. */
|
|
582
|
+
export declare function getSavedJobIds(scope: string): number[];
|
|
583
|
+
|
|
584
|
+
/** Build an absolute saved-view URL from a hub URL, preserving its other parameters and fragment. */
|
|
585
|
+
export declare function getSavedJobsUrl(hubUrl: string | URL): string;
|
|
586
|
+
|
|
530
587
|
declare type HintedString<KnownValues> = (string & {}) | KnownValues;
|
|
531
588
|
|
|
532
|
-
declare type IconName = 'briefcase' | 'brand' | 'building' | 'circles' | 'clock' | 'filter' | 'globe' | 'magnifier' | 'magnifierSimple' | 'mapPin' | 'pay' | 'sunset' | 'x' | 'plus' | 'chevron-right' | 'ai' | 'target-location' | 'warning' | 'map' | 'list';
|
|
589
|
+
declare type IconName = 'bookmark' | 'bookmark-filled' | 'briefcase' | 'brand' | 'building' | 'circles' | 'clock' | 'filter' | 'globe' | 'magnifier' | 'magnifierSimple' | 'mapPin' | 'pay' | 'sunset' | 'x' | 'plus' | 'chevron-right' | 'ai' | 'target-location' | 'warning' | 'map' | 'list';
|
|
590
|
+
|
|
591
|
+
export declare function isJobSaved(scope: string, id: number): boolean;
|
|
533
592
|
|
|
534
593
|
export declare type JobSearchDomManager = ReturnType<typeof createJobSearchDomManager>;
|
|
535
594
|
|
|
536
|
-
export declare const jobSearchPlugin: () => ({ apiClient, rpcClient, logger, analytics }: {
|
|
595
|
+
export declare const jobSearchPlugin: () => ({ apiClient, rpcClient, logger, analytics, publishableKey }: {
|
|
537
596
|
apiClient: ApiClient;
|
|
538
597
|
rpcClient: InploiRpcClient;
|
|
539
598
|
logger: Logger;
|
|
@@ -574,6 +633,7 @@ export declare const jobSearchPlugin: () => ({ apiClient, rpcClient, logger, ana
|
|
|
574
633
|
employment_type: string;
|
|
575
634
|
id: number;
|
|
576
635
|
company_name: string;
|
|
636
|
+
external_id?: string | null | undefined;
|
|
577
637
|
company_logo: string | null;
|
|
578
638
|
pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null;
|
|
579
639
|
pay_currency: string;
|
|
@@ -655,6 +715,18 @@ export declare interface JobSearchPluginParams {
|
|
|
655
715
|
/** Array of properties because _order matters_ to display them. */
|
|
656
716
|
properties: FilterProperty[];
|
|
657
717
|
jobCard: {
|
|
718
|
+
/** Optional reference or other info text above the title. Uses the same transforms as subheading. */
|
|
719
|
+
eyebrow?: DisplayableFilterProperty;
|
|
720
|
+
/** First exact scalar/array match wins. Invalid colours suppress the accent. Off by default. */
|
|
721
|
+
accent?: {
|
|
722
|
+
rules: {
|
|
723
|
+
key: string;
|
|
724
|
+
value: string;
|
|
725
|
+
color: string;
|
|
726
|
+
}[];
|
|
727
|
+
/** Decorative 4px top band (default) or left edge. Keep the meaning visible in text too. */
|
|
728
|
+
style?: 'band' | 'edge';
|
|
729
|
+
};
|
|
658
730
|
subheading: DisplayableFilterProperty | null;
|
|
659
731
|
infoTags: DisplayableFilterProperty[];
|
|
660
732
|
logo?: 'hidden' | '1:1' | '2:1';
|
|
@@ -684,6 +756,13 @@ export declare interface JobSearchPluginParams {
|
|
|
684
756
|
initialState: JobSearchState | ((params: Omit<JobSearchPluginParams, 'initialState'>) => JobSearchState);
|
|
685
757
|
/** Enables searching for jobs by keyword */
|
|
686
758
|
enableKeywordSearch?: boolean;
|
|
759
|
+
/** Stage edits and facets until Search/Enter. Reset always applies immediately. @default 'change' */
|
|
760
|
+
applyFiltersOn?: 'change' | 'submit';
|
|
761
|
+
/** Tenant-scoped bookmarks. Off by default. */
|
|
762
|
+
savedJobs?: {
|
|
763
|
+
enabled: boolean; /** Show the saved-view entry button. @default true */
|
|
764
|
+
showEntry?: boolean;
|
|
765
|
+
};
|
|
687
766
|
geolocation?: {
|
|
688
767
|
enabled: boolean;
|
|
689
768
|
distanceUnit?: 'miles' | 'km';
|
|
@@ -763,6 +842,9 @@ export declare interface RenderJobSearchPluginParams extends JobSearchPluginPara
|
|
|
763
842
|
onStateChange: (partialState: Partial<JobSearchState>) => void;
|
|
764
843
|
}
|
|
765
844
|
|
|
845
|
+
/** Same-page and other-tab changes; subscribing itself performs no storage write. */
|
|
846
|
+
export declare function subscribeSavedJobs(scope: string, cb: (ids: number[]) => void): () => void;
|
|
847
|
+
|
|
766
848
|
/** Preact's `TargetedEvent`, spelled out so the published types don't need Preact's: the DOM event, with `currentTarget` typed. */
|
|
767
849
|
declare type TargetedEvent<Target extends EventTarget, TypedEvent extends Event> = Omit<TypedEvent, 'currentTarget'> & {
|
|
768
850
|
readonly currentTarget: Target;
|
|
@@ -793,6 +875,9 @@ declare interface TFn<TTerms extends Terms> {
|
|
|
793
875
|
|
|
794
876
|
declare type TFunction = ReturnType<typeof useTranslation>['t'];
|
|
795
877
|
|
|
878
|
+
/** Returns whether the job is now saved. Storage denial keeps changes in this page's memory. */
|
|
879
|
+
export declare function toggleSavedJob(scope: string, id: number): boolean;
|
|
880
|
+
|
|
796
881
|
declare type TranslationDict<TTerms extends Terms> = {
|
|
797
882
|
[K in keyof TTerms]: TTerms[K] extends TranslationWithPlurals ? {
|
|
798
883
|
[J in keyof TTerms[K]]: HintedString<TTerms[K][J]>;
|
|
@@ -806,6 +891,18 @@ declare type TranslationKeyWithParams<TTerms extends Terms> = {
|
|
|
806
891
|
declare type TranslationWithPlurals = Partial<Record<Intl.LDMLPluralRule, string>>;
|
|
807
892
|
|
|
808
893
|
declare const useTranslation: <T extends {
|
|
894
|
+
readonly save_job: "Save {{title}}";
|
|
895
|
+
readonly remove_saved_job: "Remove {{title}} from saved jobs";
|
|
896
|
+
readonly view_saved_jobs: "Saved jobs";
|
|
897
|
+
readonly view_saved_jobs_count: "Saved jobs ({{count}})";
|
|
898
|
+
readonly saved_jobs_title: "Your saved jobs";
|
|
899
|
+
readonly saved_job_unavailable: "No longer available";
|
|
900
|
+
readonly remove_unavailable_saved_job: "Remove unavailable job {{id}} from saved jobs";
|
|
901
|
+
readonly remove: "Remove";
|
|
902
|
+
readonly no_saved_jobs: "No saved jobs";
|
|
903
|
+
readonly unavailable_saved_jobs: "Some saved jobs are unavailable in this view. Your bookmarks have been kept.";
|
|
904
|
+
readonly search_jobs: "Search Jobs";
|
|
905
|
+
readonly search: "Search";
|
|
809
906
|
readonly type_to_search_jobs: "Type to search jobs";
|
|
810
907
|
readonly type_to_search: "Type to search";
|
|
811
908
|
readonly jobs_found: {
|
|
@@ -888,6 +985,18 @@ declare const useTranslation: <T extends {
|
|
|
888
985
|
readonly 'job.location_type.REMOTE': "Remote";
|
|
889
986
|
readonly 'job.location_type.HYBRID': "Hybrid";
|
|
890
987
|
} = {
|
|
988
|
+
readonly save_job: "Save {{title}}";
|
|
989
|
+
readonly remove_saved_job: "Remove {{title}} from saved jobs";
|
|
990
|
+
readonly view_saved_jobs: "Saved jobs";
|
|
991
|
+
readonly view_saved_jobs_count: "Saved jobs ({{count}})";
|
|
992
|
+
readonly saved_jobs_title: "Your saved jobs";
|
|
993
|
+
readonly saved_job_unavailable: "No longer available";
|
|
994
|
+
readonly remove_unavailable_saved_job: "Remove unavailable job {{id}} from saved jobs";
|
|
995
|
+
readonly remove: "Remove";
|
|
996
|
+
readonly no_saved_jobs: "No saved jobs";
|
|
997
|
+
readonly unavailable_saved_jobs: "Some saved jobs are unavailable in this view. Your bookmarks have been kept.";
|
|
998
|
+
readonly search_jobs: "Search Jobs";
|
|
999
|
+
readonly search: "Search";
|
|
891
1000
|
readonly type_to_search_jobs: "Type to search jobs";
|
|
892
1001
|
readonly type_to_search: "Type to search";
|
|
893
1002
|
readonly jobs_found: {
|