bruce-models 7.1.94 → 7.1.96

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.
@@ -7973,8 +7973,9 @@
7973
7973
  return { result: null, attrPath: null, eValue: null };
7974
7974
  }
7975
7975
  function _getGradientTrace(value, entity, defaultToMin) {
7976
- const min = +value.points[0].position;
7977
- const max = +value.points[value.points.length - 1].position;
7976
+ const points = value.points.slice().sort((a, b) => +a.position - +b.position);
7977
+ const min = +points[0].position;
7978
+ const max = +points[points.length - 1].position;
7978
7979
  const attrPaths = parseLegacyPath(value.field);
7979
7980
  for (let i = 0; i < attrPaths.length; i++) {
7980
7981
  const attrPath = attrPaths[i];
@@ -7989,14 +7990,14 @@
7989
7990
  continue;
7990
7991
  }
7991
7992
  if (eValue >= max) {
7992
- return { result: exports.Color.ColorFromStr(value.points[value.points.length - 1].color), attrPath, eValue };
7993
+ return { result: exports.Color.ColorFromStr(points[points.length - 1].color), attrPath, eValue };
7993
7994
  }
7994
7995
  else if (eValue <= min) {
7995
- return { result: exports.Color.ColorFromStr(value.points[0].color), attrPath, eValue };
7996
+ return { result: exports.Color.ColorFromStr(points[0].color), attrPath, eValue };
7996
7997
  }
7997
- for (let j = 0; j < value.points.length - 1; j++) {
7998
- const pointA = value.points[j];
7999
- const pointB = value.points[j + 1];
7998
+ for (let j = 0; j < points.length - 1; j++) {
7999
+ const pointA = points[j];
8000
+ const pointB = points[j + 1];
8000
8001
  if (eValue >= pointA.position && eValue <= pointB.position) {
8001
8002
  if (pointA.position == pointB.position) {
8002
8003
  return { result: exports.Color.ColorFromStr(pointA.color), attrPath, eValue };
@@ -8018,7 +8019,7 @@
8018
8019
  }
8019
8020
  }
8020
8021
  // Fallback to min (static, no data path resolved).
8021
- return { result: exports.Color.ColorFromStr(value.points[0].color), attrPath: null, eValue: null };
8022
+ return { result: exports.Color.ColorFromStr(points[0].color), attrPath: null, eValue: null };
8022
8023
  }
8023
8024
  /**
8024
8025
  * Like Calculate, but also returns an 'effective' key describing how the value
@@ -16619,6 +16620,24 @@
16619
16620
  })(exports.EntityTypeRelation || (exports.EntityTypeRelation = {}));
16620
16621
 
16621
16622
  (function (EntityTypeTrigger) {
16623
+ let EType;
16624
+ (function (EType) {
16625
+ EType["DataLabQuery"] = "DataLabQuery";
16626
+ EType["WorkflowTicket"] = "WorkflowTicket";
16627
+ })(EType = EntityTypeTrigger.EType || (EntityTypeTrigger.EType = {}));
16628
+ function BuildWorkflowTicketSettings(params) {
16629
+ var _a;
16630
+ const settings = Object.assign(Object.assign({}, ((_a = params.extraSettings) !== null && _a !== void 0 ? _a : {})), { Condition: params.condition, WorkflowTicket: {
16631
+ "Workflow.ItemType.ID": params.workflowItemTypeId,
16632
+ "Workflow.Queue.ID": params.queueId,
16633
+ "Workflow.ItemStatus.ID": params.statusId
16634
+ } });
16635
+ if (params.description != null && params.description !== "") {
16636
+ settings.WorkflowTicket.Description = params.description;
16637
+ }
16638
+ return settings;
16639
+ }
16640
+ EntityTypeTrigger.BuildWorkflowTicketSettings = BuildWorkflowTicketSettings;
16622
16641
  /**
16623
16642
  * Gets a single Entity Type Trigger record.
16624
16643
  * @param params
@@ -18465,9 +18484,6 @@
18465
18484
  urlInstance.searchParams.set("fingerprint", this.currentAuth.fingerprint);
18466
18485
  }
18467
18486
  // Plugin IDs the active Project View has switched on.
18468
- if (this.currentAuth.enabledPluginIds) {
18469
- urlInstance.searchParams.set("enabledPluginIds", this.currentAuth.enabledPluginIds.join(","));
18470
- }
18471
18487
  // Add apiBaseUrl if provided (for anonymous access)
18472
18488
  if (this.currentAuth.apiBaseUrl) {
18473
18489
  urlInstance.searchParams.set("apiBaseUrl", this.currentAuth.apiBaseUrl);
@@ -23141,7 +23157,7 @@
23141
23157
  })(exports.UrlUtils || (exports.UrlUtils = {}));
23142
23158
 
23143
23159
  // This is updated with the package.json version on build.
23144
- const VERSION = "7.1.94";
23160
+ const VERSION = "7.1.96";
23145
23161
 
23146
23162
  exports.VERSION = VERSION;
23147
23163
  exports.AbstractApi = AbstractApi;