@things-factory/inquiry 10.1.259 → 10.1.260
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/dist-client/pages/inquiry-list.d.ts +0 -3
- package/dist-client/pages/inquiry-list.js +30 -47
- package/dist-client/pages/inquiry-list.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/inquiry-list-query.d.ts +15 -0
- package/dist-client/utils/inquiry-list-query.js +19 -0
- package/dist-client/utils/inquiry-list-query.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The grid's filters as the inquiries query takes them: `scope` is its own argument (a cleared one is all). Pure. */
|
|
2
|
+
export declare function inquiryQueryOf(filters: readonly {
|
|
3
|
+
name: string;
|
|
4
|
+
operator: string;
|
|
5
|
+
value?: any;
|
|
6
|
+
}[]): {
|
|
7
|
+
filters: {
|
|
8
|
+
name: string;
|
|
9
|
+
operator: string;
|
|
10
|
+
value?: any;
|
|
11
|
+
}[];
|
|
12
|
+
scope: string;
|
|
13
|
+
};
|
|
14
|
+
/** The list's address with `id` set to an inquiry (its thread) or taken away (the list) - the list's query kept. Pure. */
|
|
15
|
+
export declare function inquiryAddress(search: string, id: string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The inquiry list's query as its grid keeps it (FOOTER-BUTTON-REVIEW G09). Pure - no imports, so a test holds it.
|
|
3
|
+
*/
|
|
4
|
+
/** The grid's filters as the inquiries query takes them: `scope` is its own argument (a cleared one is all). Pure. */
|
|
5
|
+
export function inquiryQueryOf(filters) {
|
|
6
|
+
const scope = filters.find(one => one.name === 'scope')?.value;
|
|
7
|
+
return { filters: filters.filter(one => one.name !== 'scope'), scope: scope ? String(scope) : 'all' };
|
|
8
|
+
}
|
|
9
|
+
/** The list's address with `id` set to an inquiry (its thread) or taken away (the list) - the list's query kept. Pure. */
|
|
10
|
+
export function inquiryAddress(search, id) {
|
|
11
|
+
const params = new URLSearchParams(search);
|
|
12
|
+
if (id)
|
|
13
|
+
params.set('id', id);
|
|
14
|
+
else
|
|
15
|
+
params.delete('id');
|
|
16
|
+
const rest = params.toString();
|
|
17
|
+
return rest ? `inquiry-list?${rest}` : 'inquiry-list';
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=inquiry-list-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inquiry-list-query.js","sourceRoot":"","sources":["../../client/utils/inquiry-list-query.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,sHAAsH;AACtH,MAAM,UAAU,cAAc,CAAC,OAAmE;IAChG,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,KAAK,CAAA;IAC9D,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAA;AACvG,CAAC;AAED,0HAA0H;AAC1H,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,EAAU;IACvD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;IAC1C,IAAI,EAAE;QAAE,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;;QACvB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACxB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;IAC9B,OAAO,IAAI,CAAC,CAAC,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,CAAC,cAAc,CAAA;AACvD,CAAC","sourcesContent":["/*\n * The inquiry list's query as its grid keeps it (FOOTER-BUTTON-REVIEW G09). Pure - no imports, so a test holds it.\n */\n\n/** The grid's filters as the inquiries query takes them: `scope` is its own argument (a cleared one is all). Pure. */\nexport function inquiryQueryOf(filters: readonly { name: string; operator: string; value?: any }[]) {\n const scope = filters.find(one => one.name === 'scope')?.value\n return { filters: filters.filter(one => one.name !== 'scope'), scope: scope ? String(scope) : 'all' }\n}\n\n/** The list's address with `id` set to an inquiry (its thread) or taken away (the list) - the list's query kept. Pure. */\nexport function inquiryAddress(search: string, id: string) {\n const params = new URLSearchParams(search)\n if (id) params.set('id', id)\n else params.delete('id')\n const rest = params.toString()\n return rest ? `inquiry-list?${rest}` : 'inquiry-list'\n}\n"]}
|