@gisce/react-ooui 1.1.2-rc.1 → 1.1.2-rc.2

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":"ActionView.d.ts","sourceRoot":"","sources":["ActionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,EAIL,eAAe,EAGf,QAAQ,EACT,MAAM,eAAe,CAAC;AAiBvB,aAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;;AA2aF,wBAAsC"}
1
+ {"version":3,"file":"ActionView.d.ts","sourceRoot":"","sources":["ActionView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,EAIL,eAAe,EAGf,QAAQ,EACT,MAAM,eAAe,CAAC;AAiBvB,aAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,eAAe,CAAC;IAC7B,iBAAiB,CAAC,EAAE,GAAG,CAAC;IACxB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;;AA0aF,wBAAsC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Binary.d.ts","sourceRoot":"","sources":["Binary.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAmBnD,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,MAAM,UAAW,KAAK,gBASlC,CAAC;AAEF,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,WAAW,UAAW,gBAAgB,gBAiGlD,CAAC"}
1
+ {"version":3,"file":"Binary.d.ts","sourceRoot":"","sources":["Binary.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAmBnD,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,MAAM,UAAW,KAAK,gBASlC,CAAC;AAEF,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,WAAW,UAAW,gBAAgB,gBAkGlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"One2manyInput.d.ts","sourceRoot":"","sources":["One2manyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAWvD,OAAO,EAAE,KAAK,EAAY,MAAM,SAAS,CAAC;AAiB1C,aAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC5B,CAAC;AAQF,aAAK,YAAY,GAAG;IAClB,SAAS,CAAC,EACN,UAAU,GACV,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,UAAU,kBAAkB;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;CACd;AAWD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2kB/C,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"One2manyInput.d.ts","sourceRoot":"","sources":["One2manyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAWvD,OAAO,EAAE,KAAK,EAAY,MAAM,SAAS,CAAC;AAiB1C,aAAK,aAAa,GAAG;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC5B,CAAC;AAQF,aAAK,YAAY,GAAG;IAClB,SAAS,CAAC,EACN,UAAU,GACV,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,UAAU,kBAAkB;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;CACd;AAWD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwkB/C,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.1.2-rc.1",
3
+ "version": "1.1.2-rc.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "src",
@@ -23,7 +23,10 @@
23
23
  "access": "public"
24
24
  },
25
25
  "scripts": {
26
+ "preminor": "npm version preminor --preid rc",
26
27
  "prerelease": "npm version prerelease --preid rc",
28
+ "prepatch": "npm version prepatch --preid rc",
29
+ "premajor": "npm version premajor --preid rc",
27
30
  "start": "while :; do vite build --watch --force; done",
28
31
  "build:tailwind": "postcss src/tailwind.css -o src/tailwind.generated.css",
29
32
  "build": "vite build",
@@ -33,7 +36,7 @@
33
36
  },
34
37
  "dependencies": {
35
38
  "@ant-design/plots": "^1.0.9",
36
- "@gisce/ooui": "^0.17.6",
39
+ "@gisce/ooui": "^0.17.7",
37
40
  "@gisce/react-formiga-table": "^0.5.0",
38
41
  "@monaco-editor/react": "^4.4.5",
39
42
  "@tabler/icons": "^1.96.0",
@@ -128,6 +128,17 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
128
128
  }
129
129
  }, [availableViews]);
130
130
 
131
+ useEffect(() => {
132
+ if (
133
+ previousView?.view_id === currentView.view_id &&
134
+ availableViews.length > 1
135
+ ) {
136
+ setPreviousView(
137
+ availableViews.filter((view) => view.view_id !== currentView.view_id)[0]
138
+ );
139
+ }
140
+ }, [currentView]);
141
+
131
142
  const callOnFormSave = () => {
132
143
  (formRef.current as any)?.submitForm();
133
144
  };
@@ -95,9 +95,9 @@ const ContentRootProvider = (
95
95
  return;
96
96
  }
97
97
 
98
- const { ids, ...datasource } = datas || {};
98
+ const { ids } = datas || {};
99
99
 
100
- let idsToExecute = ids;
100
+ let idsToExecute = ids || [];
101
101
 
102
102
  const reportContextParsed =
103
103
  typeof reportContext === "string"
@@ -108,23 +108,6 @@ const ContentRootProvider = (
108
108
  })
109
109
  : reportContext;
110
110
 
111
- if (!idsToExecute) {
112
- const results = await ConnectionProvider.getHandler().searchAllIds({
113
- params: [],
114
- model: datasource.model || model,
115
- totalItems: 1,
116
- context: { ...context, ...reportContextParsed },
117
- });
118
-
119
- if (results.length === 0) {
120
- showErrorDialog("Nothing to print");
121
- return;
122
- }
123
-
124
- idsToExecute = results;
125
- datas.id = results[0];
126
- }
127
-
128
111
  try {
129
112
  const newReportId = await ConnectionProvider.getHandler().createReport({
130
113
  model,
@@ -160,22 +160,6 @@ function sortResults({
160
160
  return resultsToSort.sort(sortFn);
161
161
  }
162
162
 
163
- function sortResultsWithOrder(results: any[], order: number[]) {
164
- if (!order) {
165
- const sortResultsById = results.sort((a: any, b: any) => {
166
- return a.id - b.id;
167
- });
168
- return sortResultsById;
169
- }
170
-
171
- const sortedResults = results.sort((a: any, b: any) => {
172
- const aIndex = order.indexOf(a.id);
173
- const bIndex = order.indexOf(b.id);
174
- return aIndex - bIndex;
175
- });
176
- return sortedResults;
177
- }
178
-
179
163
  export {
180
164
  getTableColumns,
181
165
  getTableItems,
@@ -184,5 +168,4 @@ export {
184
168
  itemHasBooleans,
185
169
  getColorMap,
186
170
  sortResults,
187
- sortResultsWithOrder,
188
171
  };
@@ -49,8 +49,7 @@ export default {
49
49
  tv: false,
50
50
  },
51
51
  form: {
52
- arch:
53
- '<form string="CUPS">\n <notebook colspan="4">\n <page string="Corbes"> <group colspan="4"> <group string="Validada" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Facturada" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Autoconsumida" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Generada Neta" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Quart-Horària" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> </group> </page> <page string="General">\n <field name="name" select="1" size="25"/>\n <field name="active" select="1"/>\n <field name="distribuidora_id" domain="[(\'supplier\',\'=\',True)]" context="{\'task\': \'test\'}" required="1" select="1"/>\n <field name="id_municipi" select="1"/>\n <field name="id_provincia"/>\n <field name="id_poblacio" select="1" domain="[(\'municipi_id.id\', \'=\', id_municipi)]"/>\n <field name="dp"/>\n <field name="direccio" select="1" colspan="4"/>\n <field name="polissa_polissa" select="1"/>\n <field name="polissa_comptador" select="1"/>\n <field name="polissa_potencia"/>\n <field name="potencia_adscrita" attrs="{\'readonly\':[(\'force_potencia_adscrita\',\'=\',0)]}"/>\n <field name="force_potencia_adscrita"/>\n <group colspan="4" string="Adreces">\n <notebook colspan="4">\n <page string="Principal">\n <separator string="Zona urbana" colspan="4"/>\n <field name="tv"/>\n <field name="nv" select="1"/>\n <field name="pnp" select="1"/>\n <field name="bq" select="1"/>\n <field name="es" select="1"/>\n <field name="pt" select="1"/>\n <field name="pu" select="1"/>\n <field name="aclarador" colspan="4" select="1"/>\n <separator string="Zona industrial" colspan="4"/>\n <field name="cpo" select="1"/>\n <field name="cpa" select="1"/>\n </page>\n <page string="Cadastre">\n <separator string="Zona urbana" colspan="4"/>\n <field name="catas_np"/>\n <field name="catas_nm"/>\n <field name="ref_catastral" select="1"/>\n <button type="object" name="update_dir_from_ref" string="Obtenir del Cadastre"/>\n <button type="object" name="delete_dir_ref" string="Eliminar dades del Cadastre" confirm="Està segur que vol eliminar les dades que s\'han obtingut del cadastre?"/>\n <field name="catas_ldt" colspan="4"/>\n <field name="catas_tv"/>\n <field name="catas_nv"/>\n <field name="catas_pnp"/>\n <field name="catas_bq"/>\n <field name="catas_es"/>\n <field name="catas_pt"/>\n <field name="catas_pu"/>\n <field name="catas_dp"/>\n <separator string="Zona industrial" colspan="4"/>\n <field name="catas_cpo"/>\n <field name="catas_cpa"/>\n <separator string="Sincronització amb el cadastre" colspan="4"/>\n <label colspan="2" string="Si disposa de la referencia cadastral pot copiar les dades del cadastre a l\'adreça principal mitjançant aquest botó"/>\n <button type="object" name="copy_to_alternative" string="Copiar a la principal"/>\n </page>\n <page string="Notes">\n <field name="notes" colspan="4" nolabel="1"/>\n </page>\n </notebook>\n </group>\n </page>\n <page string="Autoconsum">\n <field name="autoconsum_id" readonly="1" colspan="4"/>\n <field name="coef_repartiment" readonly="1" colspan="4"/>\n </page>\n <page string="Butlletins">\n <field name="butlletins" colspan="4" nolabel="1" context="{\'cups_id\': active_id}"/>\n </page>\n <page string="Històric d\'autoconsums">\n <field name="hist_autoconsum" nolabel="1" context="{\'default_cups_id\': active_id}" readonly="1"/>\n </page>\n <page string="Històric de pòlisses">\n <field name="polisses" nolabel="1" colspan="4">\n </field>\n </page>\n </notebook>\n </form>',
52
+ arch: '<form string="CUPS">\n <notebook colspan="4">\n <page string="Corbes"> <group colspan="4"> <group string="Validada" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Facturada" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Autoconsumida" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Generada Neta" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> <group string="Quart-Horària" colspan="2"> <field name="bq" string="Última corba"/> <field name="bq" string="Format"/> </group> </group> </page> <page string="General">\n <field name="name" select="1" size="25"/>\n <field name="active" select="1"/>\n <field name="distribuidora_id" domain="[(\'supplier\',\'=\',True)]" context="{\'task\': \'test\'}" required="1" select="1"/>\n <field name="id_municipi" select="1"/>\n <field name="id_provincia"/>\n <field name="id_poblacio" select="1" domain="[(\'municipi_id.id\', \'=\', id_municipi)]"/>\n <field name="dp"/>\n <field name="direccio" select="1" colspan="4"/>\n <field name="polissa_polissa" select="1"/>\n <field name="polissa_comptador" select="1"/>\n <field name="polissa_potencia"/>\n <field name="potencia_adscrita" attrs="{\'readonly\':[(\'force_potencia_adscrita\',\'=\',0)]}"/>\n <field name="force_potencia_adscrita"/>\n <group colspan="4" string="Adreces">\n <notebook colspan="4">\n <page string="Principal">\n <separator string="Zona urbana" colspan="4"/>\n <field name="tv"/>\n <field name="nv" select="1"/>\n <field name="pnp" select="1"/>\n <field name="bq" select="1"/>\n <field name="es" select="1"/>\n <field name="pt" select="1"/>\n <field name="pu" select="1"/>\n <field name="aclarador" colspan="4" select="1"/>\n <separator string="Zona industrial" colspan="4"/>\n <field name="cpo" select="1"/>\n <field name="cpa" select="1"/>\n </page>\n <page string="Cadastre">\n <separator string="Zona urbana" colspan="4"/>\n <field name="catas_np"/>\n <field name="catas_nm"/>\n <field name="ref_catastral" select="1"/>\n <button type="object" name="update_dir_from_ref" string="Obtenir del Cadastre"/>\n <button type="object" name="delete_dir_ref" string="Eliminar dades del Cadastre" confirm="Està segur que vol eliminar les dades que s\'han obtingut del cadastre?"/>\n <field name="catas_ldt" colspan="4"/>\n <field name="catas_tv"/>\n <field name="catas_nv"/>\n <field name="catas_pnp"/>\n <field name="catas_bq"/>\n <field name="catas_es"/>\n <field name="catas_pt"/>\n <field name="catas_pu"/>\n <field name="catas_dp"/>\n <separator string="Zona industrial" colspan="4"/>\n <field name="catas_cpo"/>\n <field name="catas_cpa"/>\n <separator string="Sincronització amb el cadastre" colspan="4"/>\n <label colspan="2" string="Si disposa de la referencia cadastral pot copiar les dades del cadastre a l\'adreça principal mitjançant aquest botó"/>\n <button type="object" name="copy_to_alternative" string="Copiar a la principal"/>\n </page>\n <page string="Notes">\n <field name="notes" colspan="4" nolabel="1"/>\n </page>\n </notebook>\n </group>\n </page>\n <page string="Autoconsum">\n <field name="autoconsum_id" readonly="1" colspan="4"/>\n <field name="coef_repartiment" readonly="1" colspan="4"/>\n </page>\n <page string="Butlletins">\n <field name="butlletins" colspan="4" nolabel="1" context="{\'cups_id\': active_id}"/>\n </page>\n <page string="Històric d\'autoconsums">\n <field name="hist_autoconsum" nolabel="1" context="{\'default_cups_id\': active_id}" readonly="1"/>\n </page>\n <page string="Històric de pòlisses">\n <field name="polisses" nolabel="1" colspan="4">\n </field>\n </page>\n </notebook>\n </form>',
54
53
  field_parent: false,
55
54
  fields: {
56
55
  aclarador: {
@@ -113,7 +112,7 @@ export default {
113
112
  readonly: true,
114
113
  size: 5,
115
114
  string: "Codi Postal (c)",
116
- type: "char",
115
+ type: "integer",
117
116
  views: {},
118
117
  },
119
118
  catas_es: {
@@ -218,7 +217,7 @@ export default {
218
217
  dp: {
219
218
  size: 5,
220
219
  string: "Codi Postal",
221
- type: "char",
220
+ type: "float",
222
221
  views: {},
223
222
  },
224
223
  es: {
@@ -332,8 +331,7 @@ export default {
332
331
  type: "one2many",
333
332
  views: {
334
333
  tree: {
335
- arch:
336
- '<tree string="Modificacions contractuals">\n <field name="polissa_id"/>\n <field name="comptadors_periode"/>\n <field name="titular"/>\n <field name="tarifa"/>\n <field name="potencia"/>\n <field name="tensio_normalitzada"/>\n <field name="name"/>\n <field name="tipus"/>\n <field name="data_inici"/>\n <field name="data_final"/>\n <field name="state"/>\n </tree>\n ',
334
+ arch: '<tree string="Modificacions contractuals">\n <field name="polissa_id"/>\n <field name="comptadors_periode"/>\n <field name="titular"/>\n <field name="tarifa"/>\n <field name="potencia"/>\n <field name="tensio_normalitzada"/>\n <field name="name"/>\n <field name="tipus"/>\n <field name="data_inici"/>\n <field name="data_final"/>\n <field name="state"/>\n </tree>\n ',
337
335
  fields: {
338
336
  comptadors_periode: {
339
337
  digits: [16, 2],
@@ -667,8 +665,7 @@ export default {
667
665
  view_id: 458,
668
666
  },
669
667
  tree: {
670
- arch:
671
- '<tree string="CUPS">\n <field name="distribuidora_id"/>\n <field name="name"/>\n <field name="polissa_polissa"/>\n <field name="polissa_comptador"/>\n <field name="polissa_potencia" sum="Potència contractada (kW)"/>\n <field name="active"/>\n <field name="direccio"/>\n <field name="id_municipi"/>\n </tree>',
668
+ arch: '<tree string="CUPS">\n <field name="distribuidora_id"/>\n <field name="name"/>\n <field name="polissa_polissa"/>\n <field name="polissa_comptador"/>\n <field name="polissa_potencia" sum="Potència contractada (kW)"/>\n <field name="active"/>\n <field name="direccio"/>\n <field name="id_municipi"/>\n </tree>',
672
669
  field_parent: false,
673
670
  fields: {
674
671
  active: {
@@ -401,7 +401,6 @@ function ActionView(props: Props, ref: any) {
401
401
  formView={
402
402
  availableViews.find((v) => v.type === "form") as FormView
403
403
  }
404
- limit={limit}
405
404
  />
406
405
  );
407
406
  }
@@ -62,9 +62,10 @@ export const BinaryInput = (props: BinaryInputProps) => {
62
62
  const linkSource = `data:${fileType?.mime};base64,${value}`;
63
63
  const downloadLink = document.createElement("a");
64
64
  const fileName = getFieldValue(filenameField);
65
+ const name = getFieldValue("name");
65
66
 
66
67
  downloadLink.href = linkSource;
67
- downloadLink.download = fileName;
68
+ downloadLink.download = fileName || name;
68
69
  downloadLink.click();
69
70
  }
70
71
 
@@ -24,7 +24,7 @@ export const Integer = (props: IntegerProps) => {
24
24
  className={"w-full " + requiredClass}
25
25
  disabled={readOnly}
26
26
  formatter={(value) => {
27
- return `${value}`.replace(/[^0-9]+/g, "");
27
+ return `${value}`.replace(/[^0-9\-]+/g, "");
28
28
  }}
29
29
  onChange={(newValue: any) => {
30
30
  const newNumber = newValue as number;
@@ -25,7 +25,7 @@ import { One2manyTopBar } from "@/widgets/base/one2many/One2manyTopBar";
25
25
  import { readObjectValues, getNextPendingId } from "@/helpers/one2manyHelper";
26
26
  import { SearchModal } from "@/widgets/modals/SearchModal";
27
27
  import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
28
- import { sortResults, sortResultsWithOrder } from "@/helpers/treeHelper";
28
+ import { sortResults } from "@/helpers/treeHelper";
29
29
 
30
30
  type One2manyValue = {
31
31
  fields?: any;
@@ -546,10 +546,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
546
546
  ...(views.get("form")?.fields || {}),
547
547
  },
548
548
  })
549
- : sortResultsWithOrder(
550
- itemsToShow.map((item) => item.treeValues),
551
- originalSortItemIds.current!
552
- );
549
+ : itemsToShow.map((item) => item.treeValues);
553
550
 
554
551
  if (currentView === "tree") {
555
552
  return (
package/src/.eslintcache DELETED
@@ -1 +0,0 @@
1
- [{"/Users/marc/development/react-ooui/src/stories/Button.stories.js":"1","/Users/marc/development/react-ooui/src/stories/Char.stories.js":"2","/Users/marc/development/react-ooui/src/stories/Selection.stories.js":"3","/Users/marc/development/react-ooui/src/stories/ManyToOne.stories.js":"4","/Users/marc/development/react-ooui/src/stories/Checkbox.stories.js":"5","/Users/marc/development/react-ooui/src/widgets/Checkbox.tsx":"6","/Users/marc/development/react-ooui/src/widgets/ManyToOne.tsx":"7","/Users/marc/development/react-ooui/src/widgets/Selection.tsx":"8","/Users/marc/development/react-ooui/src/widgets/Button.tsx":"9","/Users/marc/development/react-ooui/src/widgets/Char.tsx":"10","/Users/marc/development/react-ooui/src/index.ts":"11","/Users/marc/development/react-ooui/src/helpers/TreeHelper.ts":"12","/Users/marc/development/react-ooui/src/widgets/Tree.tsx":"13","/Users/marc/development/react-ooui/src/stories/Tree.stories.js":"14"},{"size":721,"mtime":1611223665948,"results":"15","hashOfConfig":"16"},{"size":432,"mtime":1611223665949,"results":"17","hashOfConfig":"16"},{"size":539,"mtime":1611223665952,"results":"18","hashOfConfig":"16"},{"size":599,"mtime":1611223665950,"results":"19","hashOfConfig":"16"},{"size":464,"mtime":1611223665949,"results":"20","hashOfConfig":"16"},{"size":671,"mtime":1611223665953,"results":"21","hashOfConfig":"16"},{"size":1308,"mtime":1611223665954,"results":"22","hashOfConfig":"16"},{"size":706,"mtime":1611223665954,"results":"23","hashOfConfig":"16"},{"size":639,"mtime":1611223665953,"results":"24","hashOfConfig":"16"},{"size":741,"mtime":1611223665953,"results":"25","hashOfConfig":"16"},{"size":385,"mtime":1611227468105,"results":"26","hashOfConfig":"16"},{"size":1966,"mtime":1611306565063,"results":"27","hashOfConfig":"16"},{"size":1681,"mtime":1611227447728,"results":"28","hashOfConfig":"16"},{"size":3152,"mtime":1611308351200,"results":"29","hashOfConfig":"16"},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"i1ix4w",{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"39","messages":"40","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"49"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"/Users/marc/development/react-ooui/src/stories/Button.stories.js",[],[],"/Users/marc/development/react-ooui/src/stories/Char.stories.js",[],"/Users/marc/development/react-ooui/src/stories/Selection.stories.js",[],"/Users/marc/development/react-ooui/src/stories/ManyToOne.stories.js",[],"/Users/marc/development/react-ooui/src/stories/Checkbox.stories.js",[],"/Users/marc/development/react-ooui/src/widgets/Checkbox.tsx",[],"/Users/marc/development/react-ooui/src/widgets/ManyToOne.tsx",[],"/Users/marc/development/react-ooui/src/widgets/Selection.tsx",[],"/Users/marc/development/react-ooui/src/widgets/Button.tsx",[],[],"/Users/marc/development/react-ooui/src/widgets/Char.tsx",[],"/Users/marc/development/react-ooui/src/index.ts",[],"/Users/marc/development/react-ooui/src/helpers/TreeHelper.ts",[],"/Users/marc/development/react-ooui/src/widgets/Tree.tsx",[],"/Users/marc/development/react-ooui/src/stories/Tree.stories.js",[]]