sf-i-events 1.0.943 → 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.943",
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
@@ -4981,12 +4981,16 @@ let SfIEvents = class SfIEvents extends LitElement {
4981
4981
  if (indexNext < titleArr.length - 1) {
4982
4982
  if (Util.isVisible(titleArr[indexNext + 1])) {
4983
4983
  nextString = titleArr[indexNext + 1].id;
4984
+ console.log('prev nextString', nextString);
4984
4985
  let nextIdArr = nextString.split("-");
4986
+ console.log('prev nextArr', nextIdArr);
4985
4987
  if (((_b = nextIdArr[7]) !== null && _b !== void 0 ? _b : "") == "reportedlocations") {
4986
4988
  nextString = "";
4989
+ console.log('prev nextString2', nextString);
4987
4990
  indexNext++;
4988
4991
  }
4989
4992
  else {
4993
+ console.log('prev nextString3', nextString);
4990
4994
  flagNext = false;
4991
4995
  }
4992
4996
  }
@@ -4999,7 +5003,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4999
5003
  }
5000
5004
  }
5001
5005
  // this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, null);
5002
- this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer);
5006
+ this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer, prevString, nextString);
5003
5007
  }
5004
5008
  });
5005
5009
  }
@@ -13177,10 +13181,10 @@ let SfIEvents = class SfIEvents extends LitElement {
13177
13181
  reportingReporting.configjson = reportingSchemaJson;
13178
13182
  if (reportingSchemaValues != "")
13179
13183
  reportingReporting.prepopulateValJson = reportingSchemaValues;
13180
- reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view";
13181
- reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true";
13182
- // reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
13183
- // 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";
13184
13188
  reportingReporting.flow = "reporting";
13185
13189
  setTimeout(() => {
13186
13190
  reportingReporting.loadMode();
@@ -13267,8 +13271,8 @@ let SfIEvents = class SfIEvents extends LitElement {
13267
13271
  }
13268
13272
  let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues));
13269
13273
  console.log('reportformatvalues', reportformatvalues, comparedObj);
13270
- // await this.sendSuggestions(listEvent.id, comparedObj);
13271
- // return;
13274
+ await this.sendSuggestions(listEvent.id, comparedObj);
13275
+ return;
13272
13276
  var clickEvent = new MouseEvent("click", {
13273
13277
  "view": window,
13274
13278
  "bubbles": true,
@@ -22027,7 +22031,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22027
22031
  }
22028
22032
  };
22029
22033
  this.sendSuggestions = async (eventid, eventdelta) => {
22030
- let url = "https://" + this.apiId + "/sendsuggestions";
22034
+ let url = "https://" + this.apiIdRCMResources + "/sendsuggestions";
22031
22035
  const body = {
22032
22036
  "projectid": this.projectId,
22033
22037
  "objectid": eventid,
@@ -7424,11 +7424,15 @@ export class SfIEvents extends LitElement {
7424
7424
  if (indexNext < titleArr.length - 1) {
7425
7425
  if (Util.isVisible((titleArr[indexNext + 1] as HTMLButtonElement))) {
7426
7426
  nextString = (titleArr[indexNext + 1] as HTMLButtonElement).id;
7427
+ console.log('prev nextString', nextString)
7427
7428
  let nextIdArr = nextString.split("-")
7429
+ console.log('prev nextArr', nextIdArr)
7428
7430
  if ((nextIdArr[7] ?? "") == "reportedlocations") {
7429
7431
  nextString = "";
7432
+ console.log('prev nextString2', nextString)
7430
7433
  indexNext++;
7431
7434
  } else {
7435
+ console.log('prev nextString3', nextString)
7432
7436
  flagNext = false;
7433
7437
  }
7434
7438
  } else {
@@ -7440,7 +7444,7 @@ export class SfIEvents extends LitElement {
7440
7444
  }
7441
7445
 
7442
7446
  // this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, null);
7443
- this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer);
7447
+ this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, eventsContainer, prevString, nextString);
7444
7448
  }
7445
7449
  })
7446
7450
 
@@ -17018,10 +17022,10 @@ export class SfIEvents extends LitElement {
17018
17022
  if (reportingSchemaJson != "" && reportingReporting != null) {
17019
17023
  reportingReporting.configjson = reportingSchemaJson;
17020
17024
  if (reportingSchemaValues != "") reportingReporting.prepopulateValJson = reportingSchemaValues
17021
- reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
17022
- reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
17023
- // reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
17024
- // 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"
17025
17029
  reportingReporting.flow = "reporting"
17026
17030
  setTimeout(() => {
17027
17031
  reportingReporting.loadMode();
@@ -17117,8 +17121,8 @@ export class SfIEvents extends LitElement {
17117
17121
  }
17118
17122
  let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues))
17119
17123
  console.log('reportformatvalues', reportformatvalues, comparedObj)
17120
- // await this.sendSuggestions(listEvent.id, comparedObj);
17121
- // return;
17124
+ await this.sendSuggestions(listEvent.id, comparedObj);
17125
+ return;
17122
17126
  var clickEvent = new MouseEvent("click", {
17123
17127
  "view": window,
17124
17128
  "bubbles": true,
@@ -27858,7 +27862,7 @@ export class SfIEvents extends LitElement {
27858
27862
  }
27859
27863
 
27860
27864
  sendSuggestions = async (eventid: string, eventdelta:any) => {
27861
- let url = "https://" + this.apiId + "/sendsuggestions";
27865
+ let url = "https://" + this.apiIdRCMResources + "/sendsuggestions";
27862
27866
 
27863
27867
  const body = {
27864
27868
  "projectid": this.projectId,
package/src/util.ts CHANGED
@@ -583,11 +583,18 @@ function isJSONParsable(str: unknown): boolean {
583
583
  function isVisible(el: HTMLElement): boolean {
584
584
  const style = window.getComputedStyle(el);
585
585
  const rect = el.getBoundingClientRect();
586
- 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
+ ));
587
594
 
588
595
  return (
589
596
  rect.height > 0 &&
590
- rect.width >= 0
597
+ rect.width > 0
591
598
  ) && (
592
599
  style.display !== "none" &&
593
600
  style.visibility !== "hidden" &&
package/util.js CHANGED
@@ -495,9 +495,12 @@ function isJSONParsable(str) {
495
495
  function isVisible(el) {
496
496
  const style = window.getComputedStyle(el);
497
497
  const rect = el.getBoundingClientRect();
498
- 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"));
499
502
  return (rect.height > 0 &&
500
- rect.width >= 0) && (style.display !== "none" &&
503
+ rect.width > 0) && (style.display !== "none" &&
501
504
  style.visibility !== "hidden" &&
502
505
  style.opacity !== "0");
503
506
  }