@opengis/fastify-table 2.5.59 → 2.5.60

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.
@@ -1 +1 @@
1
- {"version":3,"file":"validateData.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/crud/funcs/validateData.ts"],"names":[],"mappings":"AAmJA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,IAAS,EACT,MAAW,EACX,MAAc,GACf,EAAE;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,OASA"}
1
+ {"version":3,"file":"validateData.d.ts","sourceRoot":"","sources":["../../../../../server/plugins/crud/funcs/validateData.ts"],"names":[],"mappings":"AAqJA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,IAAS,EACT,MAAW,EACX,MAAc,GACf,EAAE;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,OASA"}
@@ -99,7 +99,10 @@ function checkBody({ body = {}, arr = [], idx }) {
99
99
  const result = body[key]?.reduce?.((acc, item, i) => {
100
100
  const check = checkBody({
101
101
  body: item,
102
- arr: input.colModel,
102
+ arr: input.colModel.map((el) => ({
103
+ ...el,
104
+ key: el.key || el.name,
105
+ })),
103
106
  idx: i,
104
107
  });
105
108
  acc.push(check);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/metaFormat/index.ts"],"names":[],"mappings":"AAOA,wBAA8B,UAAU,CACtC,EACE,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,GAAQ,EACR,KAAU,EACV,KAAY,EACZ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,EAAE,MAAmB,gBAwGtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../server/plugins/table/funcs/metaFormat/index.ts"],"names":[],"mappings":"AAOA,wBAA8B,UAAU,CACtC,EACE,IAAI,EAAE,QAAQ,EACd,KAAK,EACL,GAAQ,EACR,KAAU,EACV,KAAY,EACZ,QAAe,GAChB,EAAE;IACD,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,EACD,EAAE,MAAmB,gBAiHtB"}
@@ -68,6 +68,15 @@ export default async function metaFormat({ rows: original, table, cls = {}, html
68
68
  if (!sufix) {
69
69
  Object.assign(el, { [attr.name]: val.text || val });
70
70
  }
71
+ else if (Array.isArray(val)) {
72
+ Object.assign(el, {
73
+ [val?.[0]?.color ? `${attr.name}_data` : `${attr.name}_text`]: val?.[0]?.color
74
+ ? val
75
+ : val?.[0]?.text
76
+ ? val.map((e) => e.text)
77
+ : val,
78
+ });
79
+ }
71
80
  else {
72
81
  Object.assign(el, {
73
82
  [val?.color ? `${attr.name}_data` : `${attr.name}_text`]: val.color ? val : val.text || val,
@@ -1 +1 @@
1
- {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../../../server/routes/crud/controllers/insert.ts"],"names":[],"mappings":"AAqBA,wBAA8B,MAAM,CAAC,GAAG,EAAE,GAAG,gBAgM5C"}
1
+ {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../../../server/routes/crud/controllers/insert.ts"],"names":[],"mappings":"AAmBA,wBAA8B,MAAM,CAAC,GAAG,EAAE,GAAG,gBAgM5C"}
@@ -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.59",
3
+ "version": "2.5.60",
4
4
  "type": "module",
5
5
  "description": "core-plugins",
6
6
  "keywords": [