@livinglogic/livingapi 1.34.0 → 1.36.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.34.0",
3
+ "version": "1.36.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
package/src/livingapi.js CHANGED
@@ -2,8 +2,8 @@
2
2
  * LivingAPI JavaScript Library
3
3
  * https://my.living-apps.de/docs/LivingAPI.html
4
4
  *
5
- * Copyright 2017-2025 by LivingLogic AG, Bayreuth/Germany
6
- * Copyright 2017-2025 by Walter Dörwald
5
+ * Copyright 2017-2026 by LivingLogic AG, Bayreuth/Germany
6
+ * Copyright 2017-2026 by Walter Dörwald
7
7
  *
8
8
  * All Rights Reserved
9
9
  *
@@ -889,14 +889,7 @@ export class AppLang extends LangBase
889
889
  this.name = null;
890
890
  this.description = null;
891
891
  this.typename_grammatical_gender = null;
892
- this.typename_nominative_singular = null;
893
- this.typename_genitive_singular = null;
894
- this.typename_dative_singular = null;
895
- this.typename_accusative_singular = null;
896
- this.typename_nominative_plural = null;
897
- this.typename_genitive_plural = null;
898
- this.typename_dative_plural = null;
899
- this.typename_accusative_plural = null;
892
+ this.typenames = new Map();
900
893
  }
901
894
 
902
895
  [ul4.symbols.type]()
@@ -904,15 +897,37 @@ export class AppLang extends LangBase
904
897
  return applangtype;
905
898
  }
906
899
 
900
+ [ul4.symbols.setattr](name, value)
901
+ {
902
+ if (name === "typenames")
903
+ {
904
+ if (ul4._isobject(value))
905
+ value = new Map(Object.entries(value));
906
+ else if (value !== null && !(value instanceof Map))
907
+ throw new ul4.ArgumentError(name + " must be None or a dict");
908
+ this.typenames = value;
909
+ }
910
+ else
911
+ super[ul4.symbols.setattr](name, value);
912
+ }
913
+
914
+ _setDefaultUL4ONAttr(name)
915
+ {
916
+ if (name === "typenames")
917
+ this.typenames = new Map();
918
+ else
919
+ super._setDefaultUL4ONAttr(name);
920
+ }
921
+
907
922
  [ul4.symbols.repr]()
908
923
  {
909
924
  return "<AppLang lang=" + ul4._repr(this.lang) + " name=" + ul4._repr(this.name) + ">";
910
925
  }
911
926
  };
912
927
 
913
- AppLang.prototype._ul4onattrs = ["app", "lang", "name", "description", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural"];
914
- AppLang.prototype._ul4attrs = new Set(["id", "app", "lang", "name", "description", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural"]);
915
- AppLang.prototype._settableattrs = new Set(["name", "description", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural"]);
928
+ AppLang.prototype._ul4onattrs = ["app", "lang", "name", "description", "typename_grammatical_gender", "typenames"];
929
+ AppLang.prototype._ul4attrs = new Set(["id", "app", "lang", "name", "description", "typename_grammatical_gender", "typenames"]);
930
+ AppLang.prototype._settableattrs = new Set(["name", "description", "typename_grammatical_gender", "typenames"]);
916
931
 
917
932
 
918
933
  class AppGroupLangType extends ul4.Type
@@ -1108,8 +1123,12 @@ export class App extends WithAttachments
1108
1123
  get typename_nominative_singular()
1109
1124
  {
1110
1125
  let translation = this.translations.get();
1111
- if (translation !== null && translation.typename_nominative_singular !== null)
1112
- return translation.typename_nominative_singular;
1126
+ if (translation !== null && translation.typenames !== null)
1127
+ {
1128
+ let value = translation.typenames.get("nom_sin");
1129
+ if (value !== null && value !== undefined)
1130
+ return value;
1131
+ }
1113
1132
  return this._typename_nominative_singular;
1114
1133
  }
1115
1134
 
@@ -1121,8 +1140,12 @@ export class App extends WithAttachments
1121
1140
  get typename_genitive_singular()
1122
1141
  {
1123
1142
  let translation = this.translations.get();
1124
- if (translation !== null && translation.typename_genitive_singular !== null)
1125
- return translation.typename_genitive_singular;
1143
+ if (translation !== null && translation.typenames !== null)
1144
+ {
1145
+ let value = translation.typenames.get("gen_sin");
1146
+ if (value !== null && value !== undefined)
1147
+ return value;
1148
+ }
1126
1149
  return this._typename_genitive_singular;
1127
1150
  }
1128
1151
 
@@ -1134,8 +1157,12 @@ export class App extends WithAttachments
1134
1157
  get typename_dative_singular()
1135
1158
  {
1136
1159
  let translation = this.translations.get();
1137
- if (translation !== null && translation.typename_dative_singular !== null)
1138
- return translation.typename_dative_singular;
1160
+ if (translation !== null && translation.typenames !== null)
1161
+ {
1162
+ let value = translation.typenames.get("dat_sin");
1163
+ if (value !== null && value !== undefined)
1164
+ return value;
1165
+ }
1139
1166
  return this._typename_dative_singular;
1140
1167
  }
1141
1168
 
@@ -1147,8 +1174,12 @@ export class App extends WithAttachments
1147
1174
  get typename_accusative_singular()
1148
1175
  {
1149
1176
  let translation = this.translations.get();
1150
- if (translation !== null && translation.typename_accusative_singular !== null)
1151
- return translation.typename_accusative_singular;
1177
+ if (translation !== null && translation.typenames !== null)
1178
+ {
1179
+ let value = translation.typenames.get("acc_sin");
1180
+ if (value !== null && value !== undefined)
1181
+ return value;
1182
+ }
1152
1183
  return this._typename_accusative_singular;
1153
1184
  }
1154
1185
 
@@ -1160,8 +1191,12 @@ export class App extends WithAttachments
1160
1191
  get typename_nominative_plural()
1161
1192
  {
1162
1193
  let translation = this.translations.get();
1163
- if (translation !== null && translation.typename_nominative_plural !== null)
1164
- return translation.typename_nominative_plural;
1194
+ if (translation !== null && translation.typenames !== null)
1195
+ {
1196
+ let value = translation.typenames.get("nom_plu");
1197
+ if (value !== null && value !== undefined)
1198
+ return value;
1199
+ }
1165
1200
  return this._typename_nominative_plural;
1166
1201
  }
1167
1202
 
@@ -1173,8 +1208,12 @@ export class App extends WithAttachments
1173
1208
  get typename_genitive_plural()
1174
1209
  {
1175
1210
  let translation = this.translations.get();
1176
- if (translation !== null && translation.typename_genitive_plural !== null)
1177
- return translation.typename_genitive_plural;
1211
+ if (translation !== null && translation.typenames !== null)
1212
+ {
1213
+ let value = translation.typenames.get("gen_plu");
1214
+ if (value !== null && value !== undefined)
1215
+ return value;
1216
+ }
1178
1217
  return this._typename_genitive_plural;
1179
1218
  }
1180
1219
 
@@ -1186,8 +1225,12 @@ export class App extends WithAttachments
1186
1225
  get typename_dative_plural()
1187
1226
  {
1188
1227
  let translation = this.translations.get();
1189
- if (translation !== null && translation.typename_dative_plural !== null)
1190
- return translation.typename_dative_plural;
1228
+ if (translation !== null && translation.typenames !== null)
1229
+ {
1230
+ let value = translation.typenames.get("dat_plu");
1231
+ if (value !== null && value !== undefined)
1232
+ return value;
1233
+ }
1191
1234
  return this._typename_dative_plural;
1192
1235
  }
1193
1236
 
@@ -1199,8 +1242,12 @@ export class App extends WithAttachments
1199
1242
  get typename_accusative_plural()
1200
1243
  {
1201
1244
  let translation = this.translations.get();
1202
- if (translation !== null && translation.typename_accusative_plural !== null)
1203
- return translation.typename_accusative_plural;
1245
+ if (translation !== null && translation.typenames !== null)
1246
+ {
1247
+ let value = translation.typenames.get("acc_plu");
1248
+ if (value !== null && value !== undefined)
1249
+ return value;
1250
+ }
1204
1251
  return this._typename_accusative_plural;
1205
1252
  }
1206
1253
 
@@ -1209,6 +1256,17 @@ export class App extends WithAttachments
1209
1256
  this._typename_accusative_plural = value;
1210
1257
  }
1211
1258
 
1259
+ get typenames()
1260
+ {
1261
+ let translation = this.translations.get();
1262
+ if (translation !== null && translation.typenames !== null && translation.typenames.size !== 0)
1263
+ return translation.typenames;
1264
+ translation = this.translations.get(this.lang);
1265
+ if (translation !== null && translation.typenames !== null && translation.typenames.size !== 0)
1266
+ return translation.typenames;
1267
+ return null;
1268
+ }
1269
+
1212
1270
  _dumpUL4ONAttr(name)
1213
1271
  {
1214
1272
  if (name === "translations")
@@ -1433,7 +1491,7 @@ export class App extends WithAttachments
1433
1491
 
1434
1492
  App.prototype._ul4onattrs = ["globals", "internal_id", "_name", "_description", "lang", "appgroup", "_typename_grammatical_gender", "_typename_nominative_singular", "_typename_genitive_singular", "_typename_dative_singular", "_typename_accusative_singular", "_typename_nominative_plural", "_typename_genitive_plural", "_typename_dative_plural", "_typename_accusative_plural",
1435
1493
  "startlink", "image", "createdby", "controls", "records", "record_start", "record_count", "record_total", "installation", "categories", "params", "views", "datamanagement_identifier", "basetable", "primarykey", "insertprocedure", "updateprocedure", "deleteprocedure", "templates", "createdat", "updatedat", "updatedby", "superid", "favorite", "_active_view", "datasource", "main", "ai_generated", "viewtemplates", "filter_default", "sort_default", "filter_owndata", "_permissions", "data_actions", "attachments", "order", "translations"];
1436
- App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "translations", "lang", "appgroup", "group", "main", "order", "ai_generated", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural", "startlink", "image", "createdat", "createdby", "updatedat", "updatedby", "controls", "layout_controls", "records", "record_start", "record_count", "record_total", "installation", "categories", "params", "views", "menus", "panels", "datasource", "datamanagement_identifier", "insert", "favorite", "_active_view", "filter_default", "sort_default", "filter_owndata", "permissions", "data_actions", "attachments", "template_url", "new_embedded_url", "new_standalone_url", "home_url", "datamanagement_url", "import_url", "tasks_url", /*"formbuilder_url", "tasks_config_url",*/ "datamanagement_config_url", "permissions_url", "datamanageview_url"]);
1494
+ App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "translations", "lang", "appgroup", "group", "main", "order", "ai_generated", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural", "typenames", "startlink", "image", "createdat", "createdby", "updatedat", "updatedby", "controls", "layout_controls", "records", "record_start", "record_count", "record_total", "installation", "categories", "params", "views", "menus", "panels", "datasource", "datamanagement_identifier", "insert", "favorite", "_active_view", "filter_default", "sort_default", "filter_owndata", "permissions", "data_actions", "attachments", "template_url", "new_embedded_url", "new_standalone_url", "home_url", "datamanagement_url", "import_url", "tasks_url", /*"formbuilder_url", "tasks_config_url",*/ "datamanagement_config_url", "permissions_url", "datamanageview_url"]);
1437
1495
  ul4.expose(App.prototype[ul4.symbols.call], ["values", "**"], {"needsobject": true});
1438
1496
  ul4.expose(App.prototype.insert, ["values", "**"], {"needsobject": true});
1439
1497
  ul4.expose(App.prototype.template_url, ["identifier", "p", "record", "p=", null, "params", "**"]);