sf-i-events 1.0.830 → 1.0.831
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/package.json +1 -1
- package/sf-i-events.js +13 -5
- package/src/sf-i-events.ts +14 -6
package/package.json
CHANGED
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
|
-
|
|
9784
|
-
|
|
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="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="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
|
}
|
package/src/sf-i-events.ts
CHANGED
|
@@ -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
|
-
|
|
13413
|
-
|
|
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="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{"key":attachment.key,"ext":attachment.ext}]).replace(/"/g,'"')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="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
|
}
|