bruce-models 3.3.4 → 3.3.7

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.
@@ -1414,6 +1414,21 @@
1414
1414
  }
1415
1415
  });
1416
1416
  }
1417
+ /**
1418
+ * Creates a message broker instance and returns it.
1419
+ * If an instance is already created, it will return that one.
1420
+ * @warning This will await the loading promise to avoid using data that isn't ready.
1421
+ */
1422
+ ConnectWebsocket() {
1423
+ return __awaiter(this, void 0, void 0, function* () {
1424
+ yield this.loadProm;
1425
+ if (this.messageBroker) {
1426
+ return this.messageBroker;
1427
+ }
1428
+ this.messageBroker = new exports.MessageBroker.WebSocketBroker(this.baseUrl, this.env);
1429
+ return this.messageBroker;
1430
+ });
1431
+ }
1417
1432
  /**
1418
1433
  * Warning: This method does not wait for init to finish loading.
1419
1434
  * This means the url could be changed once fully initialized.
@@ -9825,6 +9840,14 @@
9825
9840
  // Assumes existence of line that is used to anchor it.
9826
9841
  EType["Callout"] = "callout";
9827
9842
  })(EType = Div.EType || (Div.EType = {}));
9843
+ let EAnchorDivSide;
9844
+ (function (EAnchorDivSide) {
9845
+ // “absolute” is now deprecated and a legacy value for TopLeft
9846
+ EAnchorDivSide["TopLeft"] = "TopLeft";
9847
+ EAnchorDivSide["BottomLeft"] = "BottomLeft";
9848
+ EAnchorDivSide["BottomRight"] = "BottomRight";
9849
+ EAnchorDivSide["TopRight"] = "TopRight";
9850
+ })(EAnchorDivSide = Div.EAnchorDivSide || (Div.EAnchorDivSide = {}));
9828
9851
  // Describes expected content of a row cell.
9829
9852
  let EItemType;
9830
9853
  (function (EItemType) {
@@ -10220,40 +10243,40 @@
10220
10243
  window[paramsId] = pluginParams ? pluginParams : {};
10221
10244
  const disposeId = exports.ObjectUtils.UId();
10222
10245
  const elementId = exports.ObjectUtils.UId();
10223
- let script = `
10224
- function run() {
10225
- ${fileContent}
10226
-
10227
- const paramsId = "${paramsId}";
10228
- const containerId = "${containerId}";
10229
- let container;
10230
- if (containerId) {
10231
- container = document.getElementById("${containerId}");
10232
- }
10233
-
10234
- let pluginHTML = null;
10235
- if (container) {
10236
- pluginHTML = document.createElement("div");
10237
- pluginHTML.id = "${elementId}";
10238
- container.appendChild(pluginHTML);
10239
- }
10240
-
10241
- {TEMPLATE_CODE}
10242
- const params = window["${paramsId}"];
10243
-
10244
- window["${disposeId}"] = Run({
10245
- element: pluginHTML,
10246
- container: container,
10247
- pluginParams: params
10248
- });
10249
- }
10250
- run();
10246
+ let script = `
10247
+ function run() {
10248
+ ${fileContent}
10249
+
10250
+ const paramsId = "${paramsId}";
10251
+ const containerId = "${containerId}";
10252
+ let container;
10253
+ if (containerId) {
10254
+ container = document.getElementById("${containerId}");
10255
+ }
10256
+
10257
+ let pluginHTML = null;
10258
+ if (container) {
10259
+ pluginHTML = document.createElement("div");
10260
+ pluginHTML.id = "${elementId}";
10261
+ container.appendChild(pluginHTML);
10262
+ }
10263
+
10264
+ {TEMPLATE_CODE}
10265
+ const params = window["${paramsId}"];
10266
+
10267
+ window["${disposeId}"] = Run({
10268
+ element: pluginHTML,
10269
+ container: container,
10270
+ pluginParams: params
10271
+ });
10272
+ }
10273
+ run();
10251
10274
  `;
10252
10275
  if (script.includes("var template")) {
10253
- script = script.replace("{TEMPLATE_CODE}", `
10254
- if (pluginHTML && template) {
10255
- pluginHTML.innerHTML = template;
10256
- }
10276
+ script = script.replace("{TEMPLATE_CODE}", `
10277
+ if (pluginHTML && template) {
10278
+ pluginHTML.innerHTML = template;
10279
+ }
10257
10280
  `);
10258
10281
  }
10259
10282
  else {
@@ -10432,7 +10455,7 @@
10432
10455
  DataSource.GetList = GetList;
10433
10456
  })(exports.DataSource || (exports.DataSource = {}));
10434
10457
 
10435
- const VERSION = "3.3.4";
10458
+ const VERSION = "3.3.5";
10436
10459
 
10437
10460
  exports.VERSION = VERSION;
10438
10461
  exports.AbstractApi = AbstractApi;