@livinglogic/livingapi 1.10.0 → 1.11.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livinglogic/livingapi",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
package/src/livingapi.js CHANGED
@@ -1550,6 +1550,18 @@ export class Field extends Base
1550
1550
  this.writable = ul4._bool(value);
1551
1551
  else if (name === "required")
1552
1552
  this.required = ul4._bool(value);
1553
+ else if (name === "top")
1554
+ {
1555
+ if (value !== null && (typeof(value) !== "number"))
1556
+ throw new ul4.ArgumentError("top must be None or an int");
1557
+ this.top = value;
1558
+ }
1559
+ else if (name === "left")
1560
+ {
1561
+ if (value !== null && (typeof(value) !== "number"))
1562
+ throw new ul4.ArgumentError("left must be None or an int");
1563
+ this.left = value;
1564
+ }
1553
1565
  else
1554
1566
  super[ul4.symbols.setattr](name, value);
1555
1567
  }
@@ -3436,13 +3448,52 @@ let applookupchoicefieldtype = new AppLookupChoiceFieldType("la", "AppLookupChoi
3436
3448
 
3437
3449
  export class AppLookupChoiceField extends AppLookupField
3438
3450
  {
3451
+ constructor(control, record, value)
3452
+ {
3453
+ super(null);
3454
+ this._search_url = null;
3455
+ this._search_param_name = null;
3456
+ this._target_param_name = null;
3457
+ }
3458
+
3439
3459
  [ul4.symbols.type]()
3440
3460
  {
3441
3461
  return applookupchoicefieldtype;
3442
3462
  }
3463
+
3464
+ get search_url()
3465
+ {
3466
+ return this._search_url ?? this.control.search_url;
3467
+ }
3468
+
3469
+ set search_url(value)
3470
+ {
3471
+ this._search_url = value;
3472
+ }
3473
+
3474
+ get search_param_name()
3475
+ {
3476
+ return this._search_param_name ?? this.control.search_param_name;
3477
+ }
3478
+
3479
+ set search_param_name(value)
3480
+ {
3481
+ this._search_param_name = value;
3482
+ }
3483
+
3484
+ get target_param_name()
3485
+ {
3486
+ return this._target_param_name ?? this.control.target_param_name;
3487
+ }
3488
+
3489
+ set target_param_name(value)
3490
+ {
3491
+ this._target_param_name = value;
3492
+ }
3443
3493
  };
3444
3494
 
3445
3495
  AppLookupChoiceField.prototype._inputevent = "llchoice";
3496
+ AppLookupChoiceField.prototype._ul4attrs = new Set([...Field.prototype._ul4attrs, "search_url", "search_param_name", "target_param_name"]);
3446
3497
 
3447
3498
 
3448
3499
  class MultipleAppLookupFieldType extends AppLookupFieldBaseType
@@ -4661,11 +4712,27 @@ export class AppLookupChoiceControl extends AppLookupControl
4661
4712
  {
4662
4713
  return applookupchoicecontroltype;
4663
4714
  }
4715
+
4716
+ get search_url()
4717
+ {
4718
+ return "field_" + this.identifier + "_search";
4719
+ }
4720
+
4721
+ get search_param_name()
4722
+ {
4723
+ return "q";
4724
+ }
4725
+
4726
+ get target_param_name()
4727
+ {
4728
+ return "target";
4729
+ }
4664
4730
  };
4665
4731
 
4666
4732
  AppLookupChoiceControl.prototype.subtype = "choice";
4667
4733
  AppLookupChoiceControl.prototype.fieldtype = AppLookupChoiceField;
4668
4734
  AppLookupChoiceControl.prototype._cssclass_control = "select";
4735
+ AppLookupChoiceControl.prototype._ul4attrs = new Set([...AppLookupControl.prototype._ul4attrs, "search_url", "search_param_name", "target_param_name"]);
4669
4736
 
4670
4737
 
4671
4738
  class MultipleLookupControlType extends LookupControlType