@inploi/plugin-job-alerts 5.2.1 → 5.3.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 +2 -2
- package/cdn/index.js +10 -11
- package/dist/index.d.ts +104 -1
- package/dist/plugin-job-alerts.cjs +304 -541
- package/dist/plugin-job-alerts.js +305 -542
- package/package.json +10 -9
- package/dist/index.cdn.d.ts +0 -9
- package/dist/job-alerts.constants.d.ts +0 -6
- package/dist/job-alerts.d.ts +0 -66
- package/dist/job-alerts.dev.d.ts +0 -1
- package/dist/job-alerts.terms.d.ts +0 -18
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
import { AnalyticsService } from '@inploi/sdk';
|
|
2
|
+
import { ApiClient } from '@inploi/sdk';
|
|
3
|
+
import { InploiRpcClient } from '@inploi/sdk';
|
|
4
|
+
import { InploiSdkEnvironment } from '@inploi/sdk';
|
|
5
|
+
import { JobAlertsFilters } from '@inploi/sdk';
|
|
6
|
+
import { Logger } from '@inploi/sdk';
|
|
7
|
+
|
|
8
|
+
export declare const createJobAlertsDomManager: () => {
|
|
9
|
+
getRenderTargetElement: () => Element;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** English defaults for every job alerts term. Kept free of type imports so the published declarations stand alone. */
|
|
13
|
+
export declare const defaultTerms: {
|
|
14
|
+
readonly DAILY: "Daily";
|
|
15
|
+
readonly WEEKLY: "Weekly";
|
|
16
|
+
readonly MONTHLY: "Monthly";
|
|
17
|
+
readonly email: "Email";
|
|
18
|
+
readonly email_placeholder: "jane.doe@example.com";
|
|
19
|
+
readonly name: "Name";
|
|
20
|
+
readonly name_placeholder: "Jane Doe";
|
|
21
|
+
readonly save: "Save";
|
|
22
|
+
readonly save_alert: "Save Alert";
|
|
23
|
+
readonly frequency: "Frequency";
|
|
24
|
+
readonly create_alert: "Create Alert";
|
|
25
|
+
readonly create_alert_error: "Failed to create alert. Please try again later.";
|
|
26
|
+
readonly privacy_policy_link: "How we use your personal data";
|
|
27
|
+
readonly alert_notice_sender: "{{company}} will email you new jobs matching this search, as often as you choose. Every email has an unsubscribe link.";
|
|
28
|
+
readonly alert_notice: "You'll get new jobs matching this search by email, as often as you choose. Every email has an unsubscribe link.";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export declare type JobAlertsConfig = {
|
|
32
|
+
/** Button label */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Header to be displayed above the form */
|
|
35
|
+
headerText: string;
|
|
36
|
+
/** Linked under the form, before the candidate confirms, so they can read how their personal data is used. */
|
|
37
|
+
privacyPolicyUrl?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Who sends the alert emails, named in the notice above the submit button. Pass the company's display name, the
|
|
40
|
+
* same name the emails come from. Without it the notice still says what arrives and how to unsubscribe.
|
|
41
|
+
*/
|
|
42
|
+
employerName?: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type JobAlertsDomManager = ReturnType<typeof createJobAlertsDomManager>;
|
|
46
|
+
|
|
47
|
+
export { JobAlertsFilters }
|
|
48
|
+
|
|
49
|
+
export declare const jobAlertsPlugin: () => ({ rpcClient, logger, analytics }: {
|
|
50
|
+
apiClient: ApiClient;
|
|
51
|
+
rpcClient: InploiRpcClient;
|
|
52
|
+
logger: Logger;
|
|
53
|
+
analytics: AnalyticsService;
|
|
54
|
+
publishableKey?: string;
|
|
55
|
+
env?: InploiSdkEnvironment;
|
|
56
|
+
}) => {
|
|
57
|
+
/** Returns a string with the initial rendering state of the UI.
|
|
58
|
+
* Useful when server-side rendering to avoid CLS.
|
|
59
|
+
*/
|
|
60
|
+
prerender: (params: JobAlertsPluginParams) => Promise<{
|
|
61
|
+
html: string;
|
|
62
|
+
}>;
|
|
63
|
+
/** Renders the Job Alerts Plugin inside the container element. */
|
|
64
|
+
render: (params: JobAlertsPluginParams) => Promise<void>;
|
|
65
|
+
setFilters: (newFilters: JobAlertsFilters) => {
|
|
66
|
+
[x: string]: string | string[] | {
|
|
67
|
+
type: "provided";
|
|
68
|
+
lat: number;
|
|
69
|
+
lng: number;
|
|
70
|
+
radius: number;
|
|
71
|
+
unit?: "miles" | "km" | undefined;
|
|
72
|
+
label?: string | undefined;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
setConfig: (newConfig: JobAlertsConfig | ((oldConfig: JobAlertsConfig) => JobAlertsConfig)) => JobAlertsConfig;
|
|
76
|
+
'~brand': "@inploi/plugin-job-alerts";
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export declare type jobAlertsPlugin = ReturnType<typeof jobAlertsPlugin>;
|
|
80
|
+
|
|
81
|
+
export declare type JobAlertsPluginParams = {
|
|
82
|
+
theme: {
|
|
83
|
+
mode: 'light' | 'dark';
|
|
84
|
+
corners: 'rounded' | 'soft' | 'sharp';
|
|
85
|
+
highlights: 'stroke' | 'fill';
|
|
86
|
+
accent: {
|
|
87
|
+
/** Number between 0 and 360. Number above or below range will loop. */
|
|
88
|
+
hue: number;
|
|
89
|
+
/** Float between 0 and 2. Acts as a multiplier to the original generated palette. */
|
|
90
|
+
chroma: number;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
config: JobAlertsConfig;
|
|
94
|
+
initialFilters: JobAlertsFilters;
|
|
95
|
+
terms?: JobAlertsTranslationTerms;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** Visual theme for the Job Alerts UI. */
|
|
99
|
+
export declare type JobAlertsTheme = JobAlertsPluginParams['theme'];
|
|
100
|
+
|
|
101
|
+
/** Host overrides for any job alerts term. */
|
|
102
|
+
export declare type JobAlertsTranslationTerms = Partial<Record<keyof typeof defaultTerms, string>>;
|
|
103
|
+
|
|
104
|
+
export { }
|