@gisce/react-ooui 1.1.10 → 1.1.12

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":"RootView.d.ts","sourceRoot":"","sources":["RootView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAcf,aAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;;AA0dF,wBAAoC"}
1
+ {"version":3,"file":"RootView.d.ts","sourceRoot":"","sources":["RootView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAcf,aAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;;AA8dF,wBAAoC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Integer.d.ts","sourceRoot":"","sources":["Integer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,aAAK,YAAY,GAAG,WAAW,GAAG;IAChC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,YAAY,gBA0B1C,CAAC"}
1
+ {"version":3,"file":"Integer.d.ts","sourceRoot":"","sources":["Integer.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC,aAAK,YAAY,GAAG,WAAW,GAAG;IAChC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,OAAO,UAAW,YAAY,gBA2B1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAY,MAAM,SAAS,CAAC;;AAkWnD,wBAAqC"}
1
+ {"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAY,MAAM,SAAS,CAAC;;AAsWnD,wBAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "files": [
5
5
  "dist",
6
6
  "src",
@@ -39,13 +39,14 @@ export default {
39
39
  task_id: false,
40
40
  user_id: [1, "Administrator"],
41
41
  workdones_ids: [],
42
+ integer: 40003.23,
42
43
  },
43
44
  form: {
44
- arch:
45
- '<form string="Casos">\n <group col="8" colspan="4">\n <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" select="1"/>\n <field colspan="3" name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" select="2"/>\n \n <field colspan="3" name="email_from" select="2"/>\n <button name="remind_partner" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n <field name="user_id" select="1" domain="[(\'id\',\'!=\', 0)]"/>\n <button name="autoassign" string="Assigna-me\'l" type="object"/>\n <button name="remind_user" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n </group><field name="state" select="1"/></form>',
45
+ arch: '<form string="Casos">\n <field name="integer" /> <group col="8" colspan="4">\n <field colspan="4" name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" select="1"/>\n <field colspan="3" name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" select="2"/>\n \n <field colspan="3" name="email_from" select="2"/>\n <button name="remind_partner" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n <field name="user_id" select="1" domain="[(\'id\',\'!=\', 0)]"/>\n <button name="autoassign" string="Assigna-me\'l" type="object"/>\n <button name="remind_user" states="open,pending" string="Envia notificaci\u00f3" type="object"/>\n </group><field name="state" select="1"/></form>',
46
46
 
47
47
  field_parent: false,
48
48
  fields: {
49
+ integer: { string: "Integer", type: "integer" },
49
50
  active: { string: "Actiu", type: "boolean", views: {} },
50
51
  canal_id: {
51
52
  context: "",
@@ -138,8 +139,7 @@ export default {
138
139
  type: "one2many",
139
140
  views: {
140
141
  form: {
141
- arch:
142
- '<form string="Historial de comunicaci&#xF3;">\n <group col="6" colspan="4">\n <field name="date" select="1"/>\n <field name="email" select="1"/>\n <field name="canal_id" select="2"/>\n </group>\n <newline/>\n <field colspan="4" name="description" nolabel="1" select="2"/>\n </form>\n ',
142
+ arch: '<form string="Historial de comunicaci&#xF3;">\n <group col="6" colspan="4">\n <field name="date" select="1"/>\n <field name="email" select="1"/>\n <field name="canal_id" select="2"/>\n </group>\n <newline/>\n <field colspan="4" name="description" nolabel="1" select="2"/>\n </form>\n ',
143
143
  fields: {
144
144
  canal_id: {
145
145
  context: "",
@@ -160,8 +160,7 @@ export default {
160
160
  },
161
161
  },
162
162
  tree: {
163
- arch:
164
- '<tree string="Historial de comunicaci&#xF3;">\n <field name="note"/>\n </tree>\n ',
163
+ arch: '<tree string="Historial de comunicaci&#xF3;">\n <field name="note"/>\n </tree>\n ',
165
164
  fields: {
166
165
  note: {
167
166
  digits: [16, 2],
@@ -185,8 +184,7 @@ export default {
185
184
  type: "one2many",
186
185
  views: {
187
186
  form: {
188
- arch:
189
- '<form string="Accions">\n <separator colspan="4" string="Informaci\u00f3 de l\'acci\u00f3"/>\n <field colspan="4" name="name"/>\n <field name="date" select="2"/>\n <field name="fefe_id" select="2"/>\n <field name="som" select="2"/>\n <field name="canal_id"/>\n </form>\n ',
187
+ arch: '<form string="Accions">\n <separator colspan="4" string="Informaci\u00f3 de l\'acci\u00f3"/>\n <field colspan="4" name="name"/>\n <field name="date" select="2"/>\n <field name="fefe_id" select="2"/>\n <field name="som" select="2"/>\n <field name="canal_id"/>\n </form>\n ',
190
188
  fields: {
191
189
  canal_id: {
192
190
  context: "",
@@ -389,8 +387,7 @@ export default {
389
387
  type: "one2many",
390
388
  views: {
391
389
  tree: {
392
- arch:
393
- '<tree editable="top">\n <field name="date"/>\n <field name="type_id"/>\n <field name="hours" sum="Time spent" widget="float_time"/>\n \n <field name="name"/> \n </tree>\n ',
390
+ arch: '<tree editable="top">\n <field name="date"/>\n <field name="type_id"/>\n <field name="hours" sum="Time spent" widget="float_time"/>\n \n <field name="name"/> \n </tree>\n ',
394
391
  fields: {
395
392
  date: { string: "Data", type: "datetime", views: {} },
396
393
  hours: { string: "Temps dedicat", type: "float", views: {} },
@@ -437,6 +437,10 @@ function RootView(props: RootViewProps, ref: any) {
437
437
  },
438
438
  });
439
439
  } else {
440
+ const formattedInitialView = initialView && Array.isArray(initialView.id)
441
+ ? { ...initialView, id: initialView.id[0] }
442
+ : initialView;
443
+
440
444
  addNewTab({
441
445
  title,
442
446
  action: {
@@ -454,7 +458,7 @@ function RootView(props: RootViewProps, ref: any) {
454
458
  context={{ ...rootContext, ...context }}
455
459
  domain={domain}
456
460
  setCanWeClose={registerViewCloseFn}
457
- initialView={initialView}
461
+ initialView={formattedInitialView}
458
462
  res_id={res_id}
459
463
  formDefaultValues={values}
460
464
  formForcedValues={forced_values}
@@ -32,6 +32,7 @@ export const Integer = (props: IntegerProps) => {
32
32
  }}
33
33
  defaultValue={0}
34
34
  onBlur={elementHasLostFocus}
35
+ precision={0}
35
36
  />
36
37
  </Field>
37
38
  );
@@ -308,6 +308,10 @@ function Dashboard(props: DashboardProps, ref: any) {
308
308
  />
309
309
  );
310
310
  } else if (initialView !== undefined) {
311
+ const formattedInitialView =
312
+ initialView && Array.isArray(initialView.id)
313
+ ? { ...initialView, id: initialView.id[0] }
314
+ : initialView;
311
315
  childContent = (
312
316
  <ActionView
313
317
  action_id={actionId}
@@ -319,7 +323,7 @@ function Dashboard(props: DashboardProps, ref: any) {
319
323
  context={context}
320
324
  domain={domain}
321
325
  setCanWeClose={() => {}}
322
- initialView={initialView}
326
+ initialView={formattedInitialView}
323
327
  limit={limit}
324
328
  />
325
329
  );