sf-i-events 1.0.830 → 1.0.832

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
@@ -22,7 +22,7 @@
22
22
  import {SfISubSelect} from 'https://esm.run/sf-i-sub-select@1.0.83/sf-i-sub-select.js';
23
23
  import {SfIForm} from 'https://esm.run/sf-i-form@1.0.184/sf-i-form.js';
24
24
  import {SfIElasticText} from 'https://esm.run/sf-i-elastic-text@1.0.17/sf-i-elastic-text.js';
25
- import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.108/sf-i-uploader.js';
25
+ import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.110/sf-i-uploader.js';
26
26
  import {SfIMultitextarea} from 'https://esm.run/sf-i-multitextarea@1.0.23/sf-i-multitextarea.js';
27
27
  import {SfIReporting} from 'https://esm.run/sf-i-reporting@1.0.73/sf-i-reporting.js';
28
28
  import {SfIBricks} from 'https://esm.run/sf-i-bricks@1.0.8/sf-i-bricks.js';
@@ -38,7 +38,7 @@
38
38
  // import {SfIForm} from 'https://unpkg.com/sf-i-form@1.0.184/sf-i-form.js?module';
39
39
  // import {SfIEvents} from 'https://unpkg.com/sf-i-events@1.0.423/sf-i-events.js?module';
40
40
  // import {SfIElasticText} from 'https://unpkg.com/sf-i-elastic-text@1.0.7/sf-i-elastic-text.js?module';
41
- // import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.108/sf-i-uploader.js?module';
41
+ // import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.110/sf-i-uploader.js?module';
42
42
  // import {SfRandomText} from 'https://unpkg.com/sf-random-text@1.0.2/sf-random-text.js?module';
43
43
  // import {SfNewFeature} from 'https://unpkg.com/sf-new-feature@1.0.1/sf-new-feature.js?module';
44
44
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.830",
4
+ "version": "1.0.832",
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
@@ -9776,20 +9776,28 @@ let SfIEvents = class SfIEvents extends LitElement {
9776
9776
  for (var i = 0; i < basicFields.length; i++) {
9777
9777
  if (!this.getEventPreviewFields().includes(basicFields[i])) {
9778
9778
  if (!this.getEventHideFields().includes(basicFields[i])) {
9779
- html += '<div class="m-20">';
9780
- html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9781
9779
  console.log('basicFields', event[basicFields[i]] + "");
9782
9780
  if (basicFields[i] == 'attachment') {
9783
- let attachment = JSON.parse(event[basicFields[i]] + "");
9784
- html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader>`;
9781
+ if (event[basicFields[i]].length > 0) {
9782
+ let attachment = JSON.parse(event[basicFields[i]] + "");
9783
+ html += '<div class="m-20">';
9784
+ html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9785
+ html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
9786
+ html += '</div>';
9787
+ }
9785
9788
  }
9786
9789
  else if ((event[basicFields[i]] + "").indexOf("[") >= 0) {
9790
+ html += '<div class="m-20">';
9791
+ html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9787
9792
  html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
9793
+ html += '</div>';
9788
9794
  }
9789
9795
  else {
9796
+ html += '<div class="m-20">';
9797
+ html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>';
9790
9798
  html += '<sf-i-elastic-text text="' + (event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0] + '" minLength="80"></sf-i-elastic-text>';
9799
+ html += '</div>';
9791
9800
  }
9792
- html += '</div>';
9793
9801
  }
9794
9802
  }
9795
9803
  }
@@ -10017,10 +10025,10 @@ let SfIEvents = class SfIEvents extends LitElement {
10017
10025
  }
10018
10026
  this._SfDetailContainer.innerHTML = html;
10019
10027
  this._SfDetailContainer.style.display = 'block';
10020
- let attachmentUploaders = this._SfDetailContainer.querySelectorAll('.event-attachment');
10021
- for (let attachmentUploader of attachmentUploaders) {
10022
- attachmentUploader.loadMode();
10023
- }
10028
+ // let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
10029
+ // for(let attachmentUploader of attachmentUploaders){
10030
+ // attachmentUploader.loadMode();
10031
+ // }
10024
10032
  (_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
10025
10033
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
10026
10034
  this.setSuccess('Deleted successfully!');
@@ -13405,18 +13405,26 @@ export class SfIEvents extends LitElement {
13405
13405
 
13406
13406
  if(!this.getEventHideFields().includes(basicFields[i])) {
13407
13407
 
13408
- html += '<div class="m-20">';
13409
- html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13410
13408
  console.log('basicFields', event[basicFields[i]] + "");
13411
- if(basicFields[i] == 'attachment') {
13412
- let attachment = JSON.parse(event[basicFields[i]] + "");
13413
- html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{"key":attachment.key,"ext":attachment.ext}]).replace(/"/g,'&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader>`
13409
+ if(basicFields[i] == 'attachment'){
13410
+ if(event[basicFields[i]].length > 0) {
13411
+ let attachment = JSON.parse(event[basicFields[i]] + "");
13412
+ html += '<div class="m-20">';
13413
+ html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13414
+ html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{"key":attachment.key,"ext":attachment.ext}]).replace(/"/g,'&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
13415
+ html += '</div>';
13416
+ }
13414
13417
  } else if((event[basicFields[i]] + "").indexOf("[") >= 0) {
13418
+ html += '<div class="m-20">';
13419
+ html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13415
13420
  html += this.getEventTexts(basicFields[i], JSON.parse(event[basicFields[i]]), event).replace(/ *\([^)]*\) */g, "").trim();
13421
+ html += '</div>';
13416
13422
  } else {
13423
+ html += '<div class="m-20">';
13424
+ html += '<div part="detail-head"><strong>'+basicFields[i]+'</strong></div>'
13417
13425
  html += '<sf-i-elastic-text text="'+(event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0]+'" minLength="80"></sf-i-elastic-text>';
13426
+ html += '</div>';
13418
13427
  }
13419
- html += '</div>';
13420
13428
 
13421
13429
  }
13422
13430
  }
@@ -13704,10 +13712,10 @@ export class SfIEvents extends LitElement {
13704
13712
 
13705
13713
  (this._SfDetailContainer as HTMLDivElement).innerHTML = html;
13706
13714
  (this._SfDetailContainer as HTMLDivElement).style.display = 'block';
13707
- let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
13708
- for(let attachmentUploader of attachmentUploaders){
13709
- attachmentUploader.loadMode();
13710
- }
13715
+ // let attachmentUploaders = (this._SfDetailContainer as HTMLDivElement).querySelectorAll('.event-attachment') as NodeListOf<SfIUploader>
13716
+ // for(let attachmentUploader of attachmentUploaders){
13717
+ // attachmentUploader.loadMode();
13718
+ // }
13711
13719
  (this._SfDetailContainer as HTMLDivElement).querySelector('.button-delete')?.addEventListener('click', async () => {
13712
13720
 
13713
13721
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);