@inploi/plugin-job-search 3.0.5 → 3.1.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/cdn/index.js +140 -140
- package/dist/components/button.d.ts +4 -4
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/error-boundary.d.ts +1 -1
- package/dist/components/filter-content.active.d.ts +16 -16
- package/dist/components/icon.d.ts +2 -2
- package/dist/components/job-card.d.ts +5 -5
- package/dist/components/job-search.d.ts +1 -1
- package/dist/components/results-list.d.ts +2 -1
- package/dist/components/results-map.d.ts +2 -1
- package/dist/components/results.d.ts +1 -0
- package/dist/components/roving-text.d.ts +1 -1
- package/dist/components/tag.d.ts +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.js +49 -47
- package/dist/job-search.api.d.ts +6 -122
- package/dist/job-search.d.ts +5 -0
- package/dist/job-search.schemas.d.ts +2 -60
- package/dist/lib/match.d.ts +21 -21
- package/dist/lib/sort.d.ts +2 -5
- package/dist/lib/utils.d.ts +3 -3
- package/dist/{map-50bfc50f.cjs → map-64ec961e.cjs} +2 -2
- package/dist/{map-17e3b445.js → map-fbedb49e.js} +1 -1
- package/dist/style/theme.d.ts +1 -1
- package/dist/style/tokens.d.ts +9 -9
- package/dist/utils-3f841c29.cjs +60 -0
- package/dist/{utils-5efb427d.js → utils-7ba5134e.js} +2967 -2880
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +4 -3
- package/dist/utils-232f3bc5.cjs +0 -60
package/dist/lib/match.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
/** Simple object pattern matching. A smaller, shittier version of ts-pattern */
|
|
2
2
|
export declare const match: <M extends object>(subject: M) => {
|
|
3
|
-
with: <const P extends Partial<M>, Fn extends (pattern: M & P extends infer T ? { [k in keyof T]:
|
|
4
|
-
with: <const P_1 extends Partial<Exclude<M, P>>, Fn_1 extends (pattern: Exclude<M, P> & P_1 extends infer
|
|
5
|
-
with: <const P_2 extends Partial<Exclude<Exclude<M, P>, P_1>>, Fn_2 extends (pattern: Exclude<Exclude<M, P>, P_1> & P_2 extends infer
|
|
6
|
-
with: <const P_3 extends Partial<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>>, Fn_3 extends (pattern: Exclude<Exclude<Exclude<M, P>, P_1>, P_2> & P_3 extends infer
|
|
7
|
-
with: <const P_4 extends Partial<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>>, Fn_4 extends (pattern: Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3> & P_4 extends infer
|
|
8
|
-
with: <const P_5 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>>, Fn_5 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4> & P_5 extends infer
|
|
9
|
-
with: <const P_6 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>>, Fn_6 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5> & P_6 extends infer
|
|
10
|
-
with: <const P_7 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>>, Fn_7 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6> & P_7 extends infer
|
|
11
|
-
with: <const P_8 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>>, Fn_8 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7> & P_8 extends infer
|
|
12
|
-
with: <const P_9 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>>, Fn_9 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8> & P_9 extends infer
|
|
13
|
-
with: <const P_10 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>, P_9>>, Fn_10 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>, P_9> & P_10 extends infer
|
|
3
|
+
with: <const P extends Partial<M>, Fn extends (pattern: M & P extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P, fn: Fn) => {
|
|
4
|
+
with: <const P_1 extends Partial<Exclude<M, P>>, Fn_1 extends (pattern: Exclude<M, P> & P_1 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_1, fn: Fn_1) => {
|
|
5
|
+
with: <const P_2 extends Partial<Exclude<Exclude<M, P>, P_1>>, Fn_2 extends (pattern: Exclude<Exclude<M, P>, P_1> & P_2 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_2, fn: Fn_2) => {
|
|
6
|
+
with: <const P_3 extends Partial<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>>, Fn_3 extends (pattern: Exclude<Exclude<Exclude<M, P>, P_1>, P_2> & P_3 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_3, fn: Fn_3) => {
|
|
7
|
+
with: <const P_4 extends Partial<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>>, Fn_4 extends (pattern: Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3> & P_4 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_4, fn: Fn_4) => {
|
|
8
|
+
with: <const P_5 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>>, Fn_5 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4> & P_5 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_5, fn: Fn_5) => {
|
|
9
|
+
with: <const P_6 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>>, Fn_6 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5> & P_6 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_6, fn: Fn_6) => {
|
|
10
|
+
with: <const P_7 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>>, Fn_7 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6> & P_7 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_7, fn: Fn_7) => {
|
|
11
|
+
with: <const P_8 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>>, Fn_8 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7> & P_8 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_8, fn: Fn_8) => {
|
|
12
|
+
with: <const P_9 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>>, Fn_9 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8> & P_9 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_9, fn: Fn_9) => {
|
|
13
|
+
with: <const P_10 extends Partial<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>, P_9>>, Fn_10 extends (pattern: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>, P_9> & P_10 extends infer T ? { [k in keyof T]: T[k]; } : never) => any>(pattern: P_10, fn: Fn_10) => /*elided*/ any;
|
|
14
14
|
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>, P_9>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<Fn_4> | ReturnType<Fn_5> | ReturnType<Fn_6> | ReturnType<Fn_7> | ReturnType<Fn_8> | ReturnType<Fn_9> | ReturnType<O>;
|
|
15
15
|
};
|
|
16
|
-
otherwise: <
|
|
16
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>, P_8>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<Fn_4> | ReturnType<Fn_5> | ReturnType<Fn_6> | ReturnType<Fn_7> | ReturnType<Fn_8> | ReturnType<O>;
|
|
17
17
|
};
|
|
18
|
-
otherwise: <
|
|
18
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>, P_7>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<Fn_4> | ReturnType<Fn_5> | ReturnType<Fn_6> | ReturnType<Fn_7> | ReturnType<O>;
|
|
19
19
|
};
|
|
20
|
-
otherwise: <
|
|
20
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>, P_6>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<Fn_4> | ReturnType<Fn_5> | ReturnType<Fn_6> | ReturnType<O>;
|
|
21
21
|
};
|
|
22
|
-
otherwise: <
|
|
22
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>, P_5>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<Fn_4> | ReturnType<Fn_5> | ReturnType<O>;
|
|
23
23
|
};
|
|
24
|
-
otherwise: <
|
|
24
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>, P_4>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<Fn_4> | ReturnType<O>;
|
|
25
25
|
};
|
|
26
|
-
otherwise: <
|
|
26
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<Exclude<M, P>, P_1>, P_2>, P_3>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<Fn_3> | ReturnType<O>;
|
|
27
27
|
};
|
|
28
|
-
otherwise: <
|
|
28
|
+
otherwise: <O extends (subject: Exclude<Exclude<Exclude<M, P>, P_1>, P_2>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<Fn_2> | ReturnType<O>;
|
|
29
29
|
};
|
|
30
|
-
otherwise: <
|
|
30
|
+
otherwise: <O extends (subject: Exclude<Exclude<M, P>, P_1>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<Fn_1> | ReturnType<O>;
|
|
31
31
|
};
|
|
32
|
-
otherwise: <
|
|
32
|
+
otherwise: <O extends (subject: Exclude<M, P>) => any = () => never>(fallback?: O | undefined) => ReturnType<Fn> | ReturnType<O>;
|
|
33
33
|
};
|
|
34
|
-
otherwise: <
|
|
34
|
+
otherwise: <O extends (subject: M) => any = () => never>(fallback?: O | undefined) => ReturnType<O>;
|
|
35
35
|
};
|
package/dist/lib/sort.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
+
import { GetAvailableFiltersResponse } from '../job-search.api';
|
|
1
2
|
import { FilterProperty } from '..';
|
|
2
3
|
|
|
3
|
-
export declare const sortResults: <T extends
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
jobs: number;
|
|
7
|
-
}[]>(results: T, sort?: FilterProperty['sortSuggestions']) => T[number][];
|
|
4
|
+
export declare const sortResults: <T extends GetAvailableFiltersResponse[string]>(results: T, sort?: FilterProperty["sortSuggestions"]) => T[number][];
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ import { FilterProperty, JobSearchPluginParams } from '..';
|
|
|
4
4
|
|
|
5
5
|
/** Reads from search params provided and adds to list of filters. */
|
|
6
6
|
export declare const getStatefulPropertiesFromSearchParams: (properties: FilterProperty[], searchParams: URLSearchParams) => FilterProperty[];
|
|
7
|
-
export declare const getModeFromSearchParams: (searchParams: URLSearchParams) => JobSearchState[
|
|
8
|
-
export declare const getViewFromSearchParams: (searchParams: URLSearchParams) => JobSearchState[
|
|
7
|
+
export declare const getModeFromSearchParams: (searchParams: URLSearchParams) => JobSearchState["mode"];
|
|
8
|
+
export declare const getViewFromSearchParams: (searchParams: URLSearchParams) => JobSearchState["view"];
|
|
9
9
|
/** Returns a function that can be used to get the initial state of the widget from the search params. */
|
|
10
10
|
export declare const getWidgetStateFromSearchParams: ({ searchParams }: {
|
|
11
11
|
searchParams: URLSearchParams;
|
|
12
|
-
}) => JobSearchPluginParams[
|
|
12
|
+
}) => JobSearchPluginParams["initialState"];
|
|
13
13
|
/** Modifies the searchParams instance in place to reflect the current state of the widget. */
|
|
14
14
|
export declare const setWidgetStateToSearchParams: (partialState: Partial<JobSearchState>, searchParams: URLSearchParams) => void;
|
|
15
15
|
export declare const getGeolocationFromSearchParams: (searchParams: URLSearchParams) => GeoSearchFilter | undefined;
|