@livinglogic/livingapi 1.24.0 → 1.25.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/.claude/settings.local.json +7 -0
- package/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-npm/livingapi.js +1 -1
- package/dist/esm-npm/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 +52 -9
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -1730,6 +1730,49 @@ Field.prototype._ul4attrs = new Set(["control", "record", "label", "description"
|
|
|
1730
1730
|
Field.prototype._inputevent = "input";
|
|
1731
1731
|
|
|
1732
1732
|
|
|
1733
|
+
class PlaceholderFieldType extends FieldType
|
|
1734
|
+
{
|
|
1735
|
+
instancecheck(obj)
|
|
1736
|
+
{
|
|
1737
|
+
return obj instanceof PlaceholderField;
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
let placeholderfieldtype = new PlaceholderFieldType("la", "PlaceholderField", "Holds the value of a field with placeholder support of a record (and related information)");
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
export class PlaceholderField extends Field
|
|
1745
|
+
{
|
|
1746
|
+
constructor(control, record, value)
|
|
1747
|
+
{
|
|
1748
|
+
super(control, record, value);
|
|
1749
|
+
this._placeholder = null;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
[ul4.symbols.type]()
|
|
1753
|
+
{
|
|
1754
|
+
return placeholderfieldtype;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
get placeholder()
|
|
1758
|
+
{
|
|
1759
|
+
if (this._placeholder !== null)
|
|
1760
|
+
return this._placeholder;
|
|
1761
|
+
return this.control.placeholder;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
set placeholder(value)
|
|
1765
|
+
{
|
|
1766
|
+
this._placeholder = value;
|
|
1767
|
+
if (this._in_form())
|
|
1768
|
+
this._dom_control.placeholder = this.placeholder ?? "";
|
|
1769
|
+
}
|
|
1770
|
+
};
|
|
1771
|
+
|
|
1772
|
+
PlaceholderField.prototype._ul4onattrs = [...Field.prototype._ul4onattrs, "_placeholder"];
|
|
1773
|
+
PlaceholderField.prototype._ul4attrs = new Set([...Field.prototype._ul4attrs, "placeholder"]);
|
|
1774
|
+
|
|
1775
|
+
|
|
1733
1776
|
class BoolFieldType extends FieldType
|
|
1734
1777
|
{
|
|
1735
1778
|
instancecheck(obj)
|
|
@@ -1897,7 +1940,7 @@ export class IntField extends Field
|
|
|
1897
1940
|
};
|
|
1898
1941
|
|
|
1899
1942
|
|
|
1900
|
-
class NumberFieldType extends
|
|
1943
|
+
class NumberFieldType extends PlaceholderFieldType
|
|
1901
1944
|
{
|
|
1902
1945
|
instancecheck(obj)
|
|
1903
1946
|
{
|
|
@@ -1908,7 +1951,7 @@ class NumberFieldType extends FieldType
|
|
|
1908
1951
|
let numberfieldtype = new NumberFieldType("la", "NumberField", "Holds the value of a number field of a record (and related information)");
|
|
1909
1952
|
|
|
1910
1953
|
|
|
1911
|
-
export class NumberField extends
|
|
1954
|
+
export class NumberField extends PlaceholderField
|
|
1912
1955
|
{
|
|
1913
1956
|
[ul4.symbols.type]()
|
|
1914
1957
|
{
|
|
@@ -2091,7 +2134,7 @@ export class NumberField extends Field
|
|
|
2091
2134
|
};
|
|
2092
2135
|
|
|
2093
2136
|
|
|
2094
|
-
class StringFieldType extends
|
|
2137
|
+
class StringFieldType extends PlaceholderFieldType
|
|
2095
2138
|
{
|
|
2096
2139
|
instancecheck(obj)
|
|
2097
2140
|
{
|
|
@@ -2102,7 +2145,7 @@ class StringFieldType extends FieldType
|
|
|
2102
2145
|
let stringfieldtype = new StringFieldType("la", "StringField", "Holds the value of a string field of a record (and related information)");
|
|
2103
2146
|
|
|
2104
2147
|
|
|
2105
|
-
export class StringField extends
|
|
2148
|
+
export class StringField extends PlaceholderField
|
|
2106
2149
|
{
|
|
2107
2150
|
[ul4.symbols.type]()
|
|
2108
2151
|
{
|
|
@@ -2496,7 +2539,7 @@ export class FileSignatureField extends FileField
|
|
|
2496
2539
|
};
|
|
2497
2540
|
|
|
2498
2541
|
|
|
2499
|
-
class DateFieldBaseType extends
|
|
2542
|
+
class DateFieldBaseType extends PlaceholderFieldType
|
|
2500
2543
|
{
|
|
2501
2544
|
instancecheck(obj)
|
|
2502
2545
|
{
|
|
@@ -2507,7 +2550,7 @@ class DateFieldBaseType extends FieldType
|
|
|
2507
2550
|
let datefieldbasetype = new DateFieldBaseType("la", "DateFieldBase", "Holds the value of a date field of a record (and related information)");
|
|
2508
2551
|
|
|
2509
2552
|
|
|
2510
|
-
export class DateFieldBase extends
|
|
2553
|
+
export class DateFieldBase extends PlaceholderField
|
|
2511
2554
|
{
|
|
2512
2555
|
[ul4.symbols.type]()
|
|
2513
2556
|
{
|
|
@@ -4160,9 +4203,9 @@ class PlaceholderControl extends Control
|
|
|
4160
4203
|
get placeholder()
|
|
4161
4204
|
{
|
|
4162
4205
|
let view_control = this._view_control();
|
|
4163
|
-
if (view_control
|
|
4164
|
-
return
|
|
4165
|
-
return
|
|
4206
|
+
if (view_control !== null)
|
|
4207
|
+
return view_control.placeholder;
|
|
4208
|
+
return this._placeholder;
|
|
4166
4209
|
}
|
|
4167
4210
|
};
|
|
4168
4211
|
|