@gisce/ooui 0.2.9 → 0.2.10

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,7 +1,6 @@
1
1
  var parseOnChange = function (onChangeString) {
2
2
  var splitted = onChangeString
3
3
  .replace(/\s/g, "")
4
- .replace(/'/g, "")
5
4
  .replace(")", "")
6
5
  .split("(");
7
6
  var method = splitted[0];
@@ -1 +1 @@
1
- {"version":3,"file":"onChangeParser.js","sourceRoot":"","sources":["../../src/helpers/onChangeParser.ts"],"names":[],"mappings":"AAAA,IAAM,aAAa,GAAG,UAAC,cAAsB;IAC3C,IAAM,QAAQ,GAAG,cAAc;SAC5B,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SACjB,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;SAChB,KAAK,CAAC,GAAG,CAAC,CAAC;IAEd,IAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1C,OAAO;QACL,MAAM,QAAA;QACN,IAAI,EAAE,YAAY;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"onChangeParser.js","sourceRoot":"","sources":["../../src/helpers/onChangeParser.ts"],"names":[],"mappings":"AAAA,IAAM,aAAa,GAAG,UAAC,cAAsB;IAC3C,IAAM,QAAQ,GAAG,cAAc;SAC5B,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;SAClB,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;SAChB,KAAK,CAAC,GAAG,CAAC,CAAC;IAEd,IAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAM,YAAY,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1C,OAAO;QACL,MAAM,QAAA;QACN,IAAI,EAAE,YAAY;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/ooui",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "dependencies": {},
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,6 @@
1
1
  const parseOnChange = (onChangeString: string) => {
2
2
  const splitted = onChangeString
3
3
  .replace(/\s/g, "")
4
- .replace(/'/g, "")
5
4
  .replace(")", "")
6
5
  .split("(");
7
6
 
@@ -915,7 +915,7 @@ describe("A Form", () => {
915
915
  const xmlViewForm = `<?xml version="1.0"?>
916
916
  <form string="Form1">
917
917
  <field name="field_id" colspan="4" nolabel="1" />
918
- <field name="field_char" on_change="on_change_partner_address_id(partner_address_id, context)" colspan="4" nolabel="1" />
918
+ <field name="field_char" on_change="on_change_partner_address_id(partner_address_id, 'foo', context)" colspan="4" nolabel="1" />
919
919
  </form>`;
920
920
  const form = new Form(fields);
921
921
  form.parse(xmlViewForm, {
@@ -935,7 +935,10 @@ describe("A Form", () => {
935
935
  expect(form.onChangeFields!["field_char"].args[0]).toBe(
936
936
  "partner_address_id"
937
937
  );
938
- expect(form.onChangeFields!["field_char"].args[1]).toBe("context");
938
+ expect(form.onChangeFields!["field_char"].args[1]).toBe(
939
+ "'foo'"
940
+ );
941
+ expect(form.onChangeFields!["field_char"].args[2]).toBe("context");
939
942
  });
940
943
 
941
944
  it("should be able to parse domain for the whole form", () => {