sf-i-events 1.0.942 → 1.0.944

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/dev/index.html CHANGED
@@ -824,7 +824,7 @@
824
824
  allowdownload="yes"></sf-i-uploader></div>
825
825
  <div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
826
826
  </sf-i-events> -->
827
- <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
827
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
828
828
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
829
829
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
830
830
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -849,8 +849,8 @@
849
849
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
850
850
  </div>
851
851
 
852
- </sf-i-events> -->
853
- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
852
+ </sf-i-events>
853
+ <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
854
854
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
855
855
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
856
856
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -879,7 +879,7 @@
879
879
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
880
880
  </div>
881
881
 
882
- </sf-i-events>
882
+ </sf-i-events> -->
883
883
  <!-- <sf-i-events projectid="5a05b884-d7ed-4f63-b623-4d305ea2cfd6" projectname="Standard Radiators Private Limited"
884
884
  mode="onboarding"
885
885
  locations="{&quot;India&quot;:{&quot;Punjab&quot;:[&quot;Punjab Warehouse&quot;],&quot;Gujarat&quot;:[&quot;RO &amp; Unit I&quot;,&quot;Unit II&quot;]}}"
@@ -1084,7 +1084,7 @@
1084
1084
  disablesignoff="yes" disableclientresponse="yes">
1085
1085
 
1086
1086
  </sf-i-events> -->
1087
- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
1087
+ <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
1088
1088
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
1089
1089
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
1090
1090
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -1112,7 +1112,7 @@
1112
1112
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
1113
1113
  </div>
1114
1114
 
1115
- </sf-i-events>
1115
+ </sf-i-events> -->
1116
1116
  <script>
1117
1117
 
1118
1118
  function setCookie(name, value, days) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.942",
4
+ "version": "1.0.944",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.js CHANGED
@@ -2577,7 +2577,8 @@ let SfIEvents = class SfIEvents extends LitElement {
2577
2577
  // const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
2578
2578
  const showReportingButton = !hasReportFormat && !hasCustomReporting && event.concise != null && !isReportedLocation;
2579
2579
  const showLocationRisk = event.concise != null;
2580
- const showReview = event.concise != null;
2580
+ const configHome = Util.getProjectConfigHome();
2581
+ const showReview = event.concise != null && configHome.features != null && configHome.features.indexOf("understood") >= 0;
2581
2582
  const showLastUpdated = event.concise == null && lastUpdated.length > 0;
2582
2583
  // console.log('showReportingButton', showReportingButton)
2583
2584
  console.log('isReportedLocation', isReportedLocation, 'showCheckbox', showCheckbox, 'showReportingButton', showReportingButton, 'showLocationRisk', showLocationRisk, 'showLastUpdated', showLastUpdated);
@@ -2918,7 +2919,9 @@ let SfIEvents = class SfIEvents extends LitElement {
2918
2919
  let approverStr = event.concise == null ? this.getApproverStringFromEvent(event) : "";
2919
2920
  let graphParam = this.getGraphParam(event);
2920
2921
  // console.log("graphParam", graphParam.split(';')[0]);
2921
- html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true))) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span>&nbsp;&nbsp;Mark Understood</button>')) : '') + '</div>';
2922
+ const configHome = Util.getProjectConfigHome();
2923
+ const configFlag = configHome.features != null && configHome.features.indexOf("understood") >= 0;
2924
+ html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true))) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span>&nbsp;&nbsp;Mark Understood</button>')) : '') + '</div>';
2922
2925
  // }
2923
2926
  return html;
2924
2927
  };
@@ -4978,12 +4981,16 @@ let SfIEvents = class SfIEvents extends LitElement {
4978
4981
  if (indexNext < titleArr.length - 1) {
4979
4982
  if (Util.isVisible(titleArr[indexNext + 1])) {
4980
4983
  nextString = titleArr[indexNext + 1].id;
4984
+ console.log('prev nextString', nextString);
4981
4985
  let nextIdArr = nextString.split("-");
4986
+ console.log('prev nextArr', nextIdArr);
4982
4987
  if (((_b = nextIdArr[7]) !== null && _b !== void 0 ? _b : "") == "reportedlocations") {
4983
4988
  nextString = "";
4989
+ console.log('prev nextString2', nextString);
4984
4990
  indexNext++;
4985
4991
  }
4986
4992
  else {
4993
+ console.log('prev nextString3', nextString);
4987
4994
  flagNext = false;
4988
4995
  }
4989
4996
  }
@@ -4996,7 +5003,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4996
5003
  }
4997
5004
  }
4998
5005
  // this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, null);
4999
- this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer);
5006
+ this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer, prevString, nextString);
5000
5007
  }
5001
5008
  });
5002
5009
  }
@@ -13174,10 +13181,10 @@ let SfIEvents = class SfIEvents extends LitElement {
13174
13181
  reportingReporting.configjson = reportingSchemaJson;
13175
13182
  if (reportingSchemaValues != "")
13176
13183
  reportingReporting.prepopulateValJson = reportingSchemaValues;
13177
- reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view";
13178
- reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true";
13179
- // reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
13180
- // reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
13184
+ // reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
13185
+ // reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
13186
+ reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view";
13187
+ reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true";
13181
13188
  reportingReporting.flow = "reporting";
13182
13189
  setTimeout(() => {
13183
13190
  reportingReporting.loadMode();
@@ -13264,8 +13271,8 @@ let SfIEvents = class SfIEvents extends LitElement {
13264
13271
  }
13265
13272
  let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues));
13266
13273
  console.log('reportformatvalues', reportformatvalues, comparedObj);
13267
- // await this.sendSuggestions(listEvent.id, comparedObj);
13268
- // return;
13274
+ await this.sendSuggestions(listEvent.id, comparedObj);
13275
+ return;
13269
13276
  var clickEvent = new MouseEvent("click", {
13270
13277
  "view": window,
13271
13278
  "bubbles": true,
@@ -13879,6 +13886,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13879
13886
  var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
13880
13887
  console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
13881
13888
  console.log('previousid', previousId, 'nextid', nextId);
13889
+ console.log('confighome', Util.getProjectConfigHome());
13882
13890
  let comments, docs, approved, /*dateOfCompletion,*/ makercheckers, docsOptional, documentType;
13883
13891
  let entityId = "";
13884
13892
  let locationId = "";
@@ -22023,7 +22031,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22023
22031
  }
22024
22032
  };
22025
22033
  this.sendSuggestions = async (eventid, eventdelta) => {
22026
- let url = "https://" + this.apiId + "/sendsuggestions";
22034
+ let url = "https://" + this.apiIdRCMResources + "/sendsuggestions";
22027
22035
  const body = {
22028
22036
  "projectid": this.projectId,
22029
22037
  "objectid": eventid,
@@ -4808,7 +4808,8 @@ export class SfIEvents extends LitElement {
4808
4808
  // const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
4809
4809
  const showReportingButton = !hasReportFormat && !hasCustomReporting && event.concise != null && !isReportedLocation;
4810
4810
  const showLocationRisk = event.concise != null;
4811
- const showReview = event.concise != null;
4811
+ const configHome = Util.getProjectConfigHome();
4812
+ const showReview = event.concise != null && configHome.features != null && configHome.features.indexOf("understood") >= 0;
4812
4813
  const showLastUpdated = event.concise == null && lastUpdated.length > 0;
4813
4814
  // console.log('showReportingButton', showReportingButton)
4814
4815
  console.log('isReportedLocation', isReportedLocation, 'showCheckbox', showCheckbox, 'showReportingButton', showReportingButton, 'showLocationRisk', showLocationRisk, 'showLastUpdated', showLastUpdated);
@@ -5191,7 +5192,9 @@ export class SfIEvents extends LitElement {
5191
5192
 
5192
5193
  let graphParam = this.getGraphParam(event);
5193
5194
  // console.log("graphParam", graphParam.split(';')[0]);
5194
- html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true))) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span>&nbsp;&nbsp;Mark Understood</button>')) : '') + '</div>';
5195
+ const configHome = Util.getProjectConfigHome();
5196
+ const configFlag = configHome.features != null && configHome.features.indexOf("understood") >= 0
5197
+ html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true))) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span>&nbsp;&nbsp;Mark Understood</button>')) : '') + '</div>';
5195
5198
  // }
5196
5199
 
5197
5200
  return html;
@@ -7421,11 +7424,15 @@ export class SfIEvents extends LitElement {
7421
7424
  if (indexNext < titleArr.length - 1) {
7422
7425
  if (Util.isVisible((titleArr[indexNext + 1] as HTMLButtonElement))) {
7423
7426
  nextString = (titleArr[indexNext + 1] as HTMLButtonElement).id;
7427
+ console.log('prev nextString', nextString)
7424
7428
  let nextIdArr = nextString.split("-")
7429
+ console.log('prev nextArr', nextIdArr)
7425
7430
  if ((nextIdArr[7] ?? "") == "reportedlocations") {
7426
7431
  nextString = "";
7432
+ console.log('prev nextString2', nextString)
7427
7433
  indexNext++;
7428
7434
  } else {
7435
+ console.log('prev nextString3', nextString)
7429
7436
  flagNext = false;
7430
7437
  }
7431
7438
  } else {
@@ -7437,7 +7444,7 @@ export class SfIEvents extends LitElement {
7437
7444
  }
7438
7445
 
7439
7446
  // this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, null);
7440
- this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer);
7447
+ this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer, prevString, nextString);
7441
7448
  }
7442
7449
  })
7443
7450
 
@@ -17015,10 +17022,10 @@ export class SfIEvents extends LitElement {
17015
17022
  if (reportingSchemaJson != "" && reportingReporting != null) {
17016
17023
  reportingReporting.configjson = reportingSchemaJson;
17017
17024
  if (reportingSchemaValues != "") reportingReporting.prepopulateValJson = reportingSchemaValues
17018
- reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
17019
- reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
17020
- // reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
17021
- // reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
17025
+ // reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
17026
+ // reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
17027
+ reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
17028
+ reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
17022
17029
  reportingReporting.flow = "reporting"
17023
17030
  setTimeout(() => {
17024
17031
  reportingReporting.loadMode();
@@ -17114,8 +17121,8 @@ export class SfIEvents extends LitElement {
17114
17121
  }
17115
17122
  let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues))
17116
17123
  console.log('reportformatvalues', reportformatvalues, comparedObj)
17117
- // await this.sendSuggestions(listEvent.id, comparedObj);
17118
- // return;
17124
+ await this.sendSuggestions(listEvent.id, comparedObj);
17125
+ return;
17119
17126
  var clickEvent = new MouseEvent("click", {
17120
17127
  "view": window,
17121
17128
  "bubbles": true,
@@ -17810,6 +17817,7 @@ export class SfIEvents extends LitElement {
17810
17817
  renderEventDetail = (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string, nextId: string) => {
17811
17818
  console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
17812
17819
  console.log('previousid', previousId, 'nextid', nextId);
17820
+ console.log('confighome', Util.getProjectConfigHome())
17813
17821
  let comments, docs, approved, /*dateOfCompletion,*/ makercheckers: Array<string>, docsOptional: boolean | any, documentType: string | any;
17814
17822
  let entityId: string = "";
17815
17823
  let locationId: string = "";
@@ -27854,7 +27862,7 @@ export class SfIEvents extends LitElement {
27854
27862
  }
27855
27863
 
27856
27864
  sendSuggestions = async (eventid: string, eventdelta:any) => {
27857
- let url = "https://" + this.apiId + "/sendsuggestions";
27865
+ let url = "https://" + this.apiIdRCMResources + "/sendsuggestions";
27858
27866
 
27859
27867
  const body = {
27860
27868
  "projectid": this.projectId,
package/src/util.ts CHANGED
@@ -506,6 +506,12 @@ function getUsermap() {
506
506
  return userMapHome;
507
507
  }
508
508
 
509
+ function getProjectConfigHome() {
510
+ let userinfo = JSON.parse(localStorage.getItem('userinfo') ?? "{}");
511
+ let projectConfigHome = JSON.parse(JSON.parse((userinfo.project.data.value.confighome)));
512
+ return projectConfigHome;
513
+ }
514
+
509
515
  function getProjectUsermap() {
510
516
  let projectUsermap = JSON.parse((localStorage.getItem('projectusermap') ?? "{}").replace(/_QUOTES_/g, "\\\""));
511
517
  return projectUsermap;
@@ -577,19 +583,26 @@ function isJSONParsable(str: unknown): boolean {
577
583
  function isVisible(el: HTMLElement): boolean {
578
584
  const style = window.getComputedStyle(el);
579
585
  const rect = el.getBoundingClientRect();
580
- console.log('previous style', style.display, rect, el.id);
586
+ console.log('previous style', style.display, rect, el.id, (
587
+ rect.height > 0 &&
588
+ rect.width > 0
589
+ ) && (
590
+ style.display !== "none" &&
591
+ style.visibility !== "hidden" &&
592
+ style.opacity !== "0"
593
+ ));
581
594
 
582
595
  return (
583
596
  rect.height > 0 &&
584
- rect.width >= 0
597
+ rect.width > 0
585
598
  ) && (
586
- style.display !== "none" &&
587
- style.visibility !== "hidden" &&
588
- style.opacity !== "0"
589
- );
599
+ style.display !== "none" &&
600
+ style.visibility !== "hidden" &&
601
+ style.opacity !== "0"
602
+ );
590
603
  }
591
604
 
592
- function compareObjects (obj1: any, obj2: any): any {
605
+ function compareObjects(obj1: any, obj2: any): any {
593
606
  if (obj1 === obj2) return {};
594
607
 
595
608
  // If both are arrays
@@ -624,7 +637,7 @@ function compareObjects (obj1: any, obj2: any): any {
624
637
 
625
638
  for (const key of keys) {
626
639
  if (!(key in obj1)) {
627
- diff[key] = [null,(obj2 as any)[key]];
640
+ diff[key] = [null, (obj2 as any)[key]];
628
641
  } else if (!(key in obj2)) {
629
642
  diff[key] = [(obj1 as any)[key], null];
630
643
  } else {
@@ -646,10 +659,10 @@ function compareObjects (obj1: any, obj2: any): any {
646
659
  }
647
660
 
648
661
  // Primitive comparison
649
- return obj1 !== obj2 ? [obj1,obj2] : [];
662
+ return obj1 !== obj2 ? [obj1, obj2] : [];
650
663
  }
651
664
  const exportFunctions = {
652
- callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable, isVisible, compareObjects
665
+ callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, getProjectConfigHome, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable, isVisible, compareObjects
653
666
  };
654
667
 
655
668
  export default exportFunctions;
package/util.d.ts CHANGED
@@ -18,6 +18,7 @@ declare function percentageString(val: number, valTotal: number): string;
18
18
  declare function getCurrentFiscal(): number;
19
19
  declare function getDateTimeStrings(unixTimestamp: number): string;
20
20
  declare function getUsermap(): any;
21
+ declare function getProjectConfigHome(): any;
21
22
  declare function getProjectUsermap(): any;
22
23
  declare function setFeatures(features: any): void;
23
24
  declare function getFeatures(): any;
@@ -48,6 +49,7 @@ declare const exportFunctions: {
48
49
  getCurrentFiscal: typeof getCurrentFiscal;
49
50
  getDateTimeStrings: typeof getDateTimeStrings;
50
51
  getUsermap: typeof getUsermap;
52
+ getProjectConfigHome: typeof getProjectConfigHome;
51
53
  setFeatures: typeof setFeatures;
52
54
  getFeatures: typeof getFeatures;
53
55
  getProjectUsermap: typeof getProjectUsermap;
package/util.js CHANGED
@@ -425,6 +425,12 @@ function getUsermap() {
425
425
  let userMapHome = JSON.parse(JSON.parse((userinfo.user.usermap.S).replace(/_QUOTES_/g, "\\\"")));
426
426
  return userMapHome;
427
427
  }
428
+ function getProjectConfigHome() {
429
+ var _a;
430
+ let userinfo = JSON.parse((_a = localStorage.getItem('userinfo')) !== null && _a !== void 0 ? _a : "{}");
431
+ let projectConfigHome = JSON.parse(JSON.parse((userinfo.project.data.value.confighome)));
432
+ return projectConfigHome;
433
+ }
428
434
  function getProjectUsermap() {
429
435
  var _a;
430
436
  let projectUsermap = JSON.parse(((_a = localStorage.getItem('projectusermap')) !== null && _a !== void 0 ? _a : "{}").replace(/_QUOTES_/g, "\\\""));
@@ -489,9 +495,12 @@ function isJSONParsable(str) {
489
495
  function isVisible(el) {
490
496
  const style = window.getComputedStyle(el);
491
497
  const rect = el.getBoundingClientRect();
492
- console.log('previous style', style.display, rect, el.id);
498
+ console.log('previous style', style.display, rect, el.id, (rect.height > 0 &&
499
+ rect.width > 0) && (style.display !== "none" &&
500
+ style.visibility !== "hidden" &&
501
+ style.opacity !== "0"));
493
502
  return (rect.height > 0 &&
494
- rect.width >= 0) && (style.display !== "none" &&
503
+ rect.width > 0) && (style.display !== "none" &&
495
504
  style.visibility !== "hidden" &&
496
505
  style.opacity !== "0");
497
506
  }
@@ -550,7 +559,7 @@ function compareObjects(obj1, obj2) {
550
559
  return obj1 !== obj2 ? [obj1, obj2] : [];
551
560
  }
552
561
  const exportFunctions = {
553
- callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable, isVisible, compareObjects
562
+ callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings, getUsermap, getProjectConfigHome, setFeatures, getFeatures, getProjectUsermap, downloadExcelFromCSV, isJSONParsable, isVisible, compareObjects
554
563
  };
555
564
  export default exportFunctions;
556
565
  //# sourceMappingURL=util.js.map