@livinglogic/livingapi 1.25.0 → 1.26.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 +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 +44 -85
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -1730,49 +1730,6 @@ 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
|
-
|
|
1776
1733
|
class BoolFieldType extends FieldType
|
|
1777
1734
|
{
|
|
1778
1735
|
instancecheck(obj)
|
|
@@ -1940,7 +1897,7 @@ export class IntField extends Field
|
|
|
1940
1897
|
};
|
|
1941
1898
|
|
|
1942
1899
|
|
|
1943
|
-
class NumberFieldType extends
|
|
1900
|
+
class NumberFieldType extends FieldType
|
|
1944
1901
|
{
|
|
1945
1902
|
instancecheck(obj)
|
|
1946
1903
|
{
|
|
@@ -1951,7 +1908,7 @@ class NumberFieldType extends PlaceholderFieldType
|
|
|
1951
1908
|
let numberfieldtype = new NumberFieldType("la", "NumberField", "Holds the value of a number field of a record (and related information)");
|
|
1952
1909
|
|
|
1953
1910
|
|
|
1954
|
-
export class NumberField extends
|
|
1911
|
+
export class NumberField extends Field
|
|
1955
1912
|
{
|
|
1956
1913
|
[ul4.symbols.type]()
|
|
1957
1914
|
{
|
|
@@ -2134,7 +2091,7 @@ export class NumberField extends PlaceholderField
|
|
|
2134
2091
|
};
|
|
2135
2092
|
|
|
2136
2093
|
|
|
2137
|
-
class StringFieldType extends
|
|
2094
|
+
class StringFieldType extends FieldType
|
|
2138
2095
|
{
|
|
2139
2096
|
instancecheck(obj)
|
|
2140
2097
|
{
|
|
@@ -2145,13 +2102,33 @@ class StringFieldType extends PlaceholderFieldType
|
|
|
2145
2102
|
let stringfieldtype = new StringFieldType("la", "StringField", "Holds the value of a string field of a record (and related information)");
|
|
2146
2103
|
|
|
2147
2104
|
|
|
2148
|
-
export class StringField extends
|
|
2105
|
+
export class StringField extends Field
|
|
2149
2106
|
{
|
|
2107
|
+
constructor(control, record, value)
|
|
2108
|
+
{
|
|
2109
|
+
super(control, record, value);
|
|
2110
|
+
this._placeholder = null;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2150
2113
|
[ul4.symbols.type]()
|
|
2151
2114
|
{
|
|
2152
2115
|
return stringfieldtype;
|
|
2153
2116
|
}
|
|
2154
2117
|
|
|
2118
|
+
get placeholder()
|
|
2119
|
+
{
|
|
2120
|
+
if (this._placeholder !== null)
|
|
2121
|
+
return this._placeholder;
|
|
2122
|
+
return this.control.placeholder;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
set placeholder(value)
|
|
2126
|
+
{
|
|
2127
|
+
this._placeholder = value;
|
|
2128
|
+
if (this._in_form())
|
|
2129
|
+
this._dom_control.placeholder = this.placeholder ?? "";
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2155
2132
|
_validate(change)
|
|
2156
2133
|
{
|
|
2157
2134
|
if (change.value === null || change.value === "")
|
|
@@ -2198,6 +2175,9 @@ export class StringField extends PlaceholderField
|
|
|
2198
2175
|
}
|
|
2199
2176
|
};
|
|
2200
2177
|
|
|
2178
|
+
StringField.prototype._ul4onattrs = [...Field.prototype._ul4onattrs, "_placeholder"];
|
|
2179
|
+
StringField.prototype._ul4attrs = new Set([...Field.prototype._ul4attrs, "placeholder"]);
|
|
2180
|
+
|
|
2201
2181
|
|
|
2202
2182
|
class PasswordFieldType extends StringFieldType
|
|
2203
2183
|
{
|
|
@@ -2539,7 +2519,7 @@ export class FileSignatureField extends FileField
|
|
|
2539
2519
|
};
|
|
2540
2520
|
|
|
2541
2521
|
|
|
2542
|
-
class DateFieldBaseType extends
|
|
2522
|
+
class DateFieldBaseType extends FieldType
|
|
2543
2523
|
{
|
|
2544
2524
|
instancecheck(obj)
|
|
2545
2525
|
{
|
|
@@ -2550,7 +2530,7 @@ class DateFieldBaseType extends PlaceholderFieldType
|
|
|
2550
2530
|
let datefieldbasetype = new DateFieldBaseType("la", "DateFieldBase", "Holds the value of a date field of a record (and related information)");
|
|
2551
2531
|
|
|
2552
2532
|
|
|
2553
|
-
export class DateFieldBase extends
|
|
2533
|
+
export class DateFieldBase extends Field
|
|
2554
2534
|
{
|
|
2555
2535
|
[ul4.symbols.type]()
|
|
2556
2536
|
{
|
|
@@ -4182,37 +4162,7 @@ IntControl.prototype.type = "int";
|
|
|
4182
4162
|
IntControl.prototype.fieldtype = IntField;
|
|
4183
4163
|
|
|
4184
4164
|
|
|
4185
|
-
class
|
|
4186
|
-
{
|
|
4187
|
-
instancecheck(obj)
|
|
4188
|
-
{
|
|
4189
|
-
return obj instanceof PlaceholderControld;
|
|
4190
|
-
}
|
|
4191
|
-
};
|
|
4192
|
-
|
|
4193
|
-
let placeholdercontroltype = new PlaceholderControlType("la", "PlaceholderControl", "A LivingApps field that has a placeholder");
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
class PlaceholderControl extends Control
|
|
4197
|
-
{
|
|
4198
|
-
[ul4.symbols.type]()
|
|
4199
|
-
{
|
|
4200
|
-
return placeholdercontroltype;
|
|
4201
|
-
}
|
|
4202
|
-
|
|
4203
|
-
get placeholder()
|
|
4204
|
-
{
|
|
4205
|
-
let view_control = this._view_control();
|
|
4206
|
-
if (view_control !== null)
|
|
4207
|
-
return view_control.placeholder;
|
|
4208
|
-
return this._placeholder;
|
|
4209
|
-
}
|
|
4210
|
-
};
|
|
4211
|
-
|
|
4212
|
-
PlaceholderControl.prototype._ul4attrs = new Set([...Control.prototype._ul4attrs, "placeholder"]);
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
class NumberControlType extends PlaceholderControlType
|
|
4165
|
+
class NumberControlType extends ControlType
|
|
4216
4166
|
{
|
|
4217
4167
|
instancecheck(obj)
|
|
4218
4168
|
{
|
|
@@ -4223,7 +4173,7 @@ class NumberControlType extends PlaceholderControlType
|
|
|
4223
4173
|
let numbercontroltype = new NumberControlType("la", "NumberControl", "A LivingApps number field (type 'number')");
|
|
4224
4174
|
|
|
4225
4175
|
|
|
4226
|
-
export class NumberControl extends
|
|
4176
|
+
export class NumberControl extends Control
|
|
4227
4177
|
{
|
|
4228
4178
|
[ul4.symbols.type]()
|
|
4229
4179
|
{
|
|
@@ -4253,7 +4203,7 @@ NumberControl.prototype._ul4onattrs = [...Control.prototype._ul4onattrs, "precis
|
|
|
4253
4203
|
NumberControl.prototype._ul4attrs = new Set([...Control.prototype._ul4attrs, "precision", "minimum", "maximum"]);
|
|
4254
4204
|
|
|
4255
4205
|
|
|
4256
|
-
class StringControlType extends
|
|
4206
|
+
class StringControlType extends ControlType
|
|
4257
4207
|
{
|
|
4258
4208
|
instancecheck(obj)
|
|
4259
4209
|
{
|
|
@@ -4264,13 +4214,21 @@ class StringControlType extends PlaceholderControlType
|
|
|
4264
4214
|
let stringcontroltype = new StringControlType("la", "StringControl", "A LivingApps number field (type 'string')");
|
|
4265
4215
|
|
|
4266
4216
|
|
|
4267
|
-
export class StringControl extends
|
|
4217
|
+
export class StringControl extends Control
|
|
4268
4218
|
{
|
|
4269
4219
|
[ul4.symbols.type]()
|
|
4270
4220
|
{
|
|
4271
4221
|
return stringcontroltype;
|
|
4272
4222
|
}
|
|
4273
4223
|
|
|
4224
|
+
get placeholder()
|
|
4225
|
+
{
|
|
4226
|
+
let view_control = this._view_control();
|
|
4227
|
+
if (view_control !== null)
|
|
4228
|
+
return view_control.placeholder;
|
|
4229
|
+
return this._placeholder;
|
|
4230
|
+
}
|
|
4231
|
+
|
|
4274
4232
|
_user_placeholder(user, placeholder)
|
|
4275
4233
|
{
|
|
4276
4234
|
if (placeholder === null)
|
|
@@ -4379,6 +4337,7 @@ export class StringControl extends PlaceholderControl
|
|
|
4379
4337
|
};
|
|
4380
4338
|
|
|
4381
4339
|
StringControl.prototype.type = "string";
|
|
4340
|
+
StringControl.prototype._ul4attrs = new Set([...Control.prototype._ul4attrs, "minlength", "maxlength", "placeholder"]);
|
|
4382
4341
|
|
|
4383
4342
|
|
|
4384
4343
|
class TextControlType extends StringControlType
|
|
@@ -4560,7 +4519,7 @@ HTMLControl.prototype.subtype = "html";
|
|
|
4560
4519
|
HTMLControl.prototype.fieldtype = HTMLField;
|
|
4561
4520
|
|
|
4562
4521
|
|
|
4563
|
-
class DateControlType extends
|
|
4522
|
+
class DateControlType extends ControlType
|
|
4564
4523
|
{
|
|
4565
4524
|
instancecheck(obj)
|
|
4566
4525
|
{
|
|
@@ -4571,7 +4530,7 @@ class DateControlType extends PlaceholderControlType
|
|
|
4571
4530
|
let datecontroltype = new DateControlType("la", "DateControl", "A LivingApps date field (type 'date/date')");
|
|
4572
4531
|
|
|
4573
4532
|
|
|
4574
|
-
export class DateControl extends
|
|
4533
|
+
export class DateControl extends Control
|
|
4575
4534
|
{
|
|
4576
4535
|
[ul4.symbols.type]()
|
|
4577
4536
|
{
|