@livinglogic/livingapi 1.7.0 → 1.8.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/CHANGELOG.md +5 -0
- package/HOWTO-release.md +2 -2
- package/README.md +1 -1
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-static/livingapi.js +1 -1
- package/dist/esm-static/livingapi.js.map +1 -1
- package/dist/umd/livingapi.js +1 -1
- package/dist/umd/livingapi.js.map +1 -1
- package/package.json +1 -1
- package/src/livingapi.js +15 -2
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -1208,6 +1208,7 @@ export class Field extends Base
|
|
|
1208
1208
|
this._enabled = true;
|
|
1209
1209
|
this._writable = true;
|
|
1210
1210
|
this._visible = true;
|
|
1211
|
+
this._required = null;
|
|
1211
1212
|
}
|
|
1212
1213
|
|
|
1213
1214
|
[ul4.symbols.type]()
|
|
@@ -1449,6 +1450,16 @@ export class Field extends Base
|
|
|
1449
1450
|
this._visible = value;
|
|
1450
1451
|
}
|
|
1451
1452
|
|
|
1453
|
+
get required()
|
|
1454
|
+
{
|
|
1455
|
+
return this._required ?? this.control.required;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
set required(value)
|
|
1459
|
+
{
|
|
1460
|
+
this._required = value;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1452
1463
|
get enabled()
|
|
1453
1464
|
{
|
|
1454
1465
|
if (this._in_form())
|
|
@@ -1501,13 +1512,15 @@ export class Field extends Base
|
|
|
1501
1512
|
this.enabled = ul4._bool(value);
|
|
1502
1513
|
else if (name === "writable")
|
|
1503
1514
|
this.writable = ul4._bool(value);
|
|
1515
|
+
else if (name === "required")
|
|
1516
|
+
this.required = ul4._bool(value);
|
|
1504
1517
|
else
|
|
1505
1518
|
super[ul4.symbols.setattr](name, value);
|
|
1506
1519
|
}
|
|
1507
1520
|
};
|
|
1508
1521
|
|
|
1509
|
-
Field.prototype._ul4onattrs = ["control", "record", "label", "value", "errors", "_visible", "_enabled", "_writable"];
|
|
1510
|
-
Field.prototype._ul4attrs = new Set(["control", "record", "label", "value", "errors", "visible", "enabled", "writable"]);
|
|
1522
|
+
Field.prototype._ul4onattrs = ["control", "record", "label", "value", "errors", "_visible", "_enabled", "_writable", "_required"];
|
|
1523
|
+
Field.prototype._ul4attrs = new Set(["control", "record", "label", "value", "errors", "visible", "enabled", "writable", "required"]);
|
|
1511
1524
|
Field.prototype._inputevent = "input";
|
|
1512
1525
|
|
|
1513
1526
|
|