@opengis/fastify-table 2.5.62 → 2.5.64

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/helper.d.ts CHANGED
@@ -8,6 +8,7 @@ export declare function injectWithHeaders(opts: any): Promise<{
8
8
  [k: string]: string;
9
9
  };
10
10
  statusCode: number;
11
+ textStream(): ReadableStream<string>;
11
12
  ok: boolean;
12
13
  status: number;
13
14
  statusText: string;
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../helper.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,QAAA,MAAQ,MAAM,KAAoB,CAAC;AAInC,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;;;;;;;GAiChD;AAED,wBAAsB,KAAK,kBAI1B;AAGD,wBAAsB,QAAQ,kBAW7B;AAED,wBAAsB,KAAK,iBA+B1B;AAED,OAAO,EAEL,MAAM,EACN,MAAM,EACN,SAAS,GACV,CAAC"}
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../helper.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,QAAA,MAAQ,MAAM,KAAoB,CAAC;AAInC,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,GAAG;;;;;;;;;;;;;;;;;;;;GAiChD;AAED,wBAAsB,KAAK,kBAI1B;AAGD,wBAAsB,QAAQ,kBAW7B;AAED,wBAAsB,KAAK,iBA+B1B;AAED,OAAO,EAEL,MAAM,EACN,MAAM,EACN,SAAS,GACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getFilterList.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/getFilterSQLParametrized/getFilterList.ts"],"names":[],"mappings":"AAyBA,wBAA8B,aAAa,CACzC,EACE,KAAK,EACL,GAAG,EACH,UAAU,EACV,cAAc,EACd,YAAiB,GAClB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CACrC,EACD,EAAE,MAAmB,kBAqFtB"}
1
+ {"version":3,"file":"getFilterList.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/getFilterSQLParametrized/getFilterList.ts"],"names":[],"mappings":"AAyBA,wBAA8B,aAAa,CACzC,EACE,KAAK,EACL,GAAG,EACH,UAAU,EACV,cAAc,EACd,YAAiB,GAClB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CACrC,EACD,EAAE,MAAmB,kBA8FtB"}
@@ -23,6 +23,9 @@ export default async function getFilterList({ table, uid, filterList, extraDataT
23
23
  table,
24
24
  user: { uid },
25
25
  }, null);
26
+ const customClsList = await pg
27
+ .queryCache("select array_agg(name) from admin.user_cls where parent is null and type=$1", { table: "admin.user_cls", args: ["json"] })
28
+ .then((r) => r.rows?.[0]?.array_agg || []);
26
29
  return Promise.all((filterList || [])
27
30
  .concat(filterResponse?.inline || [])
28
31
  .concat(filterResponse?.custom || [])
@@ -79,7 +82,7 @@ export default async function getFilterList({ table, uid, filterList, extraDataT
79
82
  Object.assign(el, {
80
83
  cls: el.data,
81
84
  options: cls.arr,
82
- select: `select code, name from admin.cls where parent='${el.data}'`,
85
+ select: `select code, name from ${customClsList.includes(el.data) ? "admin.user_cls" : "admin.cls"} where parent='${el.data}'`,
83
86
  });
84
87
  }
85
88
  else if (typeof (cls?.sql || cls) === "string") {
@@ -1,6 +1,6 @@
1
1
  const keySchema = {
2
2
  type: "string",
3
- pattern: "^([А-Яа-яҐґЄєІіЇї\\d\\w\\s_.\\-:—!?%@#$,'\"; ]+)$",
3
+ pattern: "^([А-Яа-яҐґЄєІіЇї\\d\\w\\s_.\\-:—–!?%@#$,'\"; №/()«»’“”]+)$",
4
4
  };
5
5
  const tableDataSchema = {
6
6
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/fastify-table",
3
- "version": "2.5.62",
3
+ "version": "2.5.64",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [