spitfirepm 23.9600.8 → 23.9600.9

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/README.md CHANGED
@@ -25,6 +25,8 @@ apiResult.then( (a) => {
25
25
  ### Change Log
26
26
 
27
27
  ```
28
+ 23.9600.9 - Adds BuildWCCInfoTableHTML
29
+ 23.9600.8 - Project SOP links and Send Log Endpoint
28
30
  23.9600.5 - SignalR monkey unload to pagehide
29
31
  23.9600.3 - Adds PresetSearch ShowTree
30
32
  23.9600.1 - Constructing a view model of 3000 records and many fields improved
@@ -831,6 +831,10 @@ export declare class sfRestClient {
831
831
  /** returns the primary key for this page */
832
832
  GetPagePK(): string;
833
833
  GetPageProjectKey(pageTypeName?: PageTypeName): string;
834
+ /** builds the WCC info table HTML string
835
+ * @returns raw HTML string for the WCC list table
836
+ */
837
+ BuildWCCInfoTableHTML(): string;
834
838
  /** display support panel */
835
839
  InvokeSupportPanel(): void;
836
840
  /** sets the OS clipboard
@@ -7,7 +7,7 @@ const BrowserExtensionChecker_1 = require("./BrowserExtensionChecker");
7
7
  const RESTClientBase = require("./APIClientBase"); // avoid conflict with same in SwaggerClient when loaded by classic UI
8
8
  const string_extensions_1 = require("./string.extensions");
9
9
  //import {dialog} from "jquery-ui";
10
- const ClientPackageVersion = "23.9600.8";
10
+ const ClientPackageVersion = "23.9600.9";
11
11
  // 2021 originally modified for typescript and linter requirements by Uladzislau Kumakou of XB Software
12
12
  var LoggingLevels;
13
13
  (function (LoggingLevels) {
@@ -3224,6 +3224,7 @@ class sfRestClient {
3224
3224
  result = this.PageTypeNames.UserAccountRecovery;
3225
3225
  break;
3226
3226
  case "PLVP":
3227
+ case "poke":
3227
3228
  result = this.PageTypeNames.PopupAdminTool;
3228
3229
  break;
3229
3230
  case "PUP":
@@ -3460,26 +3461,16 @@ class sfRestClient {
3460
3461
  }
3461
3462
  return Context;
3462
3463
  }
3463
- /** display support panel */
3464
- InvokeSupportPanel() {
3465
- this.heartbeat();
3466
- var RESTClient = this;
3467
- if (!top)
3468
- this.DisplayUserNotification("Missing Window Context...");
3469
- var $DVI = self.$("<div class='sfUIShowDevInfo' style='font-size:0.9em'/>");
3470
- $DVI.html("Loading....");
3471
- //width: window.top.$(window.top).width() * 0.88
3472
- $DVI.dialog({
3473
- title: 'WCC Info', height: "auto", width: "auto", position: "bottom of window",
3474
- show: { effect: "blind", duration: 100 }
3475
- });
3476
- var $tbl = self.$("<ul class='WCCList' />");
3477
- var sortPad = "";
3478
- self.$.each(sfRestClient._WCC, function (index, rItemRaw) {
3479
- var isJS = false;
3480
- var isGuid = false;
3481
- var isSkipped = false;
3482
- var rItem;
3464
+ /** builds the WCC info table HTML string
3465
+ * @returns raw HTML string for the WCC list table
3466
+ */
3467
+ BuildWCCInfoTableHTML() {
3468
+ let htmlItems = [];
3469
+ Object.entries(sfRestClient._WCC).forEach(([index, rItemRaw]) => {
3470
+ let isJS = false;
3471
+ let isGuid = false;
3472
+ let isSkipped = false;
3473
+ let rItem;
3483
3474
  if (typeof rItemRaw === "string") {
3484
3475
  isJS = rItemRaw.startsWith("javascript:");
3485
3476
  isGuid = rItemRaw.length === 36;
@@ -3491,18 +3482,41 @@ class sfRestClient {
3491
3482
  rItem = `${rItemRaw}`;
3492
3483
  else
3493
3484
  rItem = `Unexpected ${typeof rItemRaw}`;
3494
- sortPad = ((isGuid || (index.endsWith("ID")) || isJS) ? "" : " ");
3485
+ const sortPad = ((isGuid || (index.endsWith("ID")) || isJS) ? "" : " ");
3495
3486
  if (isJS) {
3496
3487
  rItem = `<i class="fas fa-boxes sfShowPointer" data-js="${rItem.substring(11)}"></i>`;
3497
3488
  }
3498
- else if (isGuid && rItem !== RESTClient.EmptyKey) {
3489
+ else if (isGuid && rItem !== this.EmptyKey) {
3499
3490
  rItem = `${rItem} &nbsp;<i class="far fa-clipboard clsEnabledImgBtn" title="Copy" data-text="${rItem}"></i>`;
3500
3491
  }
3501
3492
  else if (index === "Likeness")
3502
3493
  isSkipped = true;
3503
- if (!isSkipped)
3504
- $tbl.append("<li>" + sortPad + `${index} = ${rItem}</li>`); // avoid trim of sortPad
3494
+ if (!isSkipped) {
3495
+ htmlItems.push(`<li>${sortPad}${index} = ${rItem}</li>`);
3496
+ }
3497
+ });
3498
+ htmlItems.sort((a, b) => {
3499
+ const textA = a.replace(/<[^>]*>/g, "").toUpperCase();
3500
+ const textB = b.replace(/<[^>]*>/g, "").toUpperCase();
3501
+ return textB < textA ? 1 : -1;
3502
+ });
3503
+ return `<ul class='WCCList'>${htmlItems.join("")}</ul>`;
3504
+ }
3505
+ /** display support panel */
3506
+ InvokeSupportPanel() {
3507
+ this.heartbeat();
3508
+ var RESTClient = this;
3509
+ if (!top)
3510
+ this.DisplayUserNotification("Missing Window Context...");
3511
+ var $DVI = self.$("<div class='sfUIShowDevInfo' style='font-size:0.9em'/>");
3512
+ $DVI.html("Loading....");
3513
+ //width: window.top.$(window.top).width() * 0.88
3514
+ $DVI.dialog({
3515
+ title: 'WCC Info', height: "auto", width: "auto", position: "bottom of window",
3516
+ show: { effect: "blind", duration: 100 }
3505
3517
  });
3518
+ var tableHtml = RESTClient.BuildWCCInfoTableHTML();
3519
+ var $tbl = self.$(tableHtml);
3506
3520
  //$tbl.append(`<li><i class="fas fa-pump-soap clsEnabledImgBtn" title="Clear cache (safe)"></i>Clear local cache</li>`);
3507
3521
  RESTClient.AddDialogTitleButton($DVI, "btnDeleteLocalDB", "Discard Local Configuration", "ui-icon-trash").on("click", function () {
3508
3522
  var $A = RESTClient.jqAlert("Warning! This blows away all user settings, including grid columns, home dashboard layout, etc)!", "Discard User Settings");
@@ -3528,9 +3542,6 @@ class sfRestClient {
3528
3542
  this.ClearCache(true);
3529
3543
  this.DisplayUserNotification("Cache has been cleared", 4321);
3530
3544
  });
3531
- var SortedList = ($tbl.find("li")).sort(function (a, b) { return (self.$(b).text().toUpperCase()) < (self.$(a).text().toUpperCase()) ? 1 : -1; });
3532
- $tbl.html("").append(SortedList);
3533
- //$tbl.append(`<li><i class="fas fa-dumpster-fire clsEnabledImgBtn" title="Warning!"></i> Discard all settings</li>`);
3534
3545
  $DVI.html("");
3535
3546
  $tbl.appendTo($DVI);
3536
3547
  $tbl.find("i.fa-clipboard").on("click", (event) => {