@livinglogic/livingapi 1.5.0 → 1.7.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 +17 -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-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 +42 -19
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -98,17 +98,6 @@ export function url_with_params(url, ...params)
|
|
|
98
98
|
return url;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/*
|
|
102
|
-
let urlparams = new URLSearchParams({"template": identifier});
|
|
103
|
-
for (let [name, value] of params)
|
|
104
|
-
{
|
|
105
|
-
if (Object.prototype.toString.call(v) === "[object Array]")
|
|
106
|
-
{
|
|
107
|
-
for (let [n, v])
|
|
108
|
-
}
|
|
109
|
-
urlparams.append()
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
101
|
export class Base extends ul4.Proto
|
|
113
102
|
{
|
|
114
103
|
constructor(id)
|
|
@@ -474,32 +463,32 @@ export class Globals extends Base
|
|
|
474
463
|
}
|
|
475
464
|
}
|
|
476
465
|
|
|
477
|
-
log_debug(
|
|
466
|
+
log_debug(message)
|
|
478
467
|
{
|
|
479
468
|
this._start_log_message();
|
|
480
469
|
if (console && console.debug)
|
|
481
|
-
console.debug(this._make_log_message(message))
|
|
470
|
+
console.debug(this._make_log_message(message));
|
|
482
471
|
}
|
|
483
472
|
|
|
484
|
-
log_info(
|
|
473
|
+
log_info(message)
|
|
485
474
|
{
|
|
486
475
|
this._start_log_message();
|
|
487
476
|
if (console && console.info)
|
|
488
|
-
console.info(this._make_log_message(message))
|
|
477
|
+
console.info(this._make_log_message(message));
|
|
489
478
|
}
|
|
490
479
|
|
|
491
|
-
log_warning(
|
|
480
|
+
log_warning(message)
|
|
492
481
|
{
|
|
493
482
|
this._start_log_message();
|
|
494
483
|
if (console && console.warn)
|
|
495
|
-
console.warn(this._make_log_message(message))
|
|
484
|
+
console.warn(this._make_log_message(message));
|
|
496
485
|
}
|
|
497
486
|
|
|
498
|
-
log_error(
|
|
487
|
+
log_error(message)
|
|
499
488
|
{
|
|
500
489
|
this._start_log_message();
|
|
501
490
|
if (console && console.error)
|
|
502
|
-
console.error(this._make_log_message(message))
|
|
491
|
+
console.error(this._make_log_message(message));
|
|
503
492
|
}
|
|
504
493
|
|
|
505
494
|
my_apps_url()
|
|
@@ -1094,6 +1083,28 @@ export class Record extends Base
|
|
|
1094
1083
|
return url_with_params(url, params);
|
|
1095
1084
|
}
|
|
1096
1085
|
|
|
1086
|
+
edit_url(params)
|
|
1087
|
+
{
|
|
1088
|
+
return this.app[ul4.symbols.getattr]("pv_la_default_form_variant") === "standalone" ? this.edit_standalone_url(params) : this.edit_embedded_url(params);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
display_embedded_url(params)
|
|
1092
|
+
{
|
|
1093
|
+
let url = "https://" + this.app.globals.hostname + "/dateneingabe/" + this.app.id + "/" + this.id + "/display";
|
|
1094
|
+
return url_with_params(url, params);
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
display_standalone_url(params)
|
|
1098
|
+
{
|
|
1099
|
+
let url = "https://" + this.app.globals.hostname + "/gateway/apps/" + this.app.id + "/" + this.id + "/display";
|
|
1100
|
+
return url_with_params(url, params);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
display_url(params)
|
|
1104
|
+
{
|
|
1105
|
+
return this.app[ul4.symbols.getattr]("pv_la_default_form_variant") === "standalone" ? this.display_standalone_url(params) : this.display_embedded_url(params);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1097
1108
|
search(search)
|
|
1098
1109
|
{
|
|
1099
1110
|
for (let identifier in search)
|
|
@@ -2969,6 +2980,8 @@ export class LookupChoiceField extends LookupField
|
|
|
2969
2980
|
}
|
|
2970
2981
|
};
|
|
2971
2982
|
|
|
2983
|
+
LookupChoiceField.prototype._inputevent = "llchoice";
|
|
2984
|
+
|
|
2972
2985
|
|
|
2973
2986
|
class MultipleLookupFieldType extends LookupFieldBaseType
|
|
2974
2987
|
{
|
|
@@ -3160,6 +3173,8 @@ export class MultipleLookupChoiceField extends MultipleLookupField
|
|
|
3160
3173
|
}
|
|
3161
3174
|
};
|
|
3162
3175
|
|
|
3176
|
+
MultipleLookupChoiceField.prototype._inputevent = "llchoice";
|
|
3177
|
+
|
|
3163
3178
|
|
|
3164
3179
|
class AppLookupFieldBaseType extends FieldType
|
|
3165
3180
|
{
|
|
@@ -3378,6 +3393,8 @@ export class AppLookupChoiceField extends AppLookupField
|
|
|
3378
3393
|
}
|
|
3379
3394
|
};
|
|
3380
3395
|
|
|
3396
|
+
AppLookupChoiceField.prototype._inputevent = "llchoice";
|
|
3397
|
+
|
|
3381
3398
|
|
|
3382
3399
|
class MultipleAppLookupFieldType extends AppLookupFieldBaseType
|
|
3383
3400
|
{
|
|
@@ -3503,6 +3520,8 @@ export class MultipleAppLookupChoiceField extends MultipleAppLookupField
|
|
|
3503
3520
|
}
|
|
3504
3521
|
};
|
|
3505
3522
|
|
|
3523
|
+
MultipleAppLookupChoiceField.prototype._inputevent = "llchoice";
|
|
3524
|
+
|
|
3506
3525
|
|
|
3507
3526
|
class ControlType extends ul4.Type
|
|
3508
3527
|
{
|
|
@@ -4468,6 +4487,7 @@ export class LookupChoiceControl extends LookupControl
|
|
|
4468
4487
|
|
|
4469
4488
|
LookupChoiceControl.prototype.subtype = "choice";
|
|
4470
4489
|
LookupChoiceControl.prototype.fieldtype = LookupChoiceField;
|
|
4490
|
+
LookupChoiceControl.prototype._cssclass_control = "select";
|
|
4471
4491
|
|
|
4472
4492
|
|
|
4473
4493
|
class AppLookupControlType extends ControlType
|
|
@@ -4596,6 +4616,7 @@ export class AppLookupChoiceControl extends AppLookupControl
|
|
|
4596
4616
|
|
|
4597
4617
|
AppLookupChoiceControl.prototype.subtype = "choice";
|
|
4598
4618
|
AppLookupChoiceControl.prototype.fieldtype = AppLookupChoiceField;
|
|
4619
|
+
AppLookupChoiceControl.prototype._cssclass_control = "select";
|
|
4599
4620
|
|
|
4600
4621
|
|
|
4601
4622
|
class MultipleLookupControlType extends LookupControlType
|
|
@@ -4723,6 +4744,7 @@ export class MultipleLookupChoiceControl extends MultipleLookupControl
|
|
|
4723
4744
|
|
|
4724
4745
|
MultipleLookupChoiceControl.prototype.subtype = "choice";
|
|
4725
4746
|
MultipleLookupChoiceControl.prototype.fieldtype = MultipleLookupChoiceField;
|
|
4747
|
+
MultipleLookupChoiceControl.prototype._cssclass_control = "select";
|
|
4726
4748
|
|
|
4727
4749
|
|
|
4728
4750
|
class MultipleAppLookupControlType extends AppLookupControlType
|
|
@@ -4837,6 +4859,7 @@ export class MultipleAppLookupChoiceControl extends MultipleAppLookupControl
|
|
|
4837
4859
|
|
|
4838
4860
|
MultipleAppLookupChoiceControl.prototype.subtype = "choice";
|
|
4839
4861
|
MultipleAppLookupChoiceControl.prototype.fieldtype = MultipleAppLookupChoiceField;
|
|
4862
|
+
MultipleAppLookupChoiceControl.prototype._cssclass_control = "select";
|
|
4840
4863
|
|
|
4841
4864
|
|
|
4842
4865
|
class GeoControlType extends ControlType
|