sf-i-reporting 1.0.72 → 1.0.74
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-reporting.d.ts.map +1 -1
- package/sf-i-reporting.js +110 -23
- package/sf-i-reporting.js.map +1 -1
- package/src/sf-i-reporting.ts +109 -21
package/package.json
CHANGED
package/sf-i-reporting.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sf-i-reporting.d.ts","sourceRoot":"","sources":["src/sf-i-reporting.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,UAAU,EAAa,gBAAgB,EAAC,MAAM,KAAK,CAAC;AAO5D,OAAO,EAAC,UAAU,EAAE,eAAe,EAA6D,MAAM,eAAe,CAAC;AAYtH;;;;;;;;;;GAUG;AACH,qBACa,YAAa,SAAQ,UAAU;IAE1C,KAAK,EAAE,MAAM,CAAM;IAGnB,aAAa,EAAE,MAAM,CAAM;IAG3B,SAAS,EAAE,MAAM,CAAM;IAGvB,WAAW,EAAE,MAAM,CAAM;IAGzB,UAAU,EAAE,MAAM,CAAQ;IAO1B,aAAa,YAGZ;IAGD,kBAAkB,EAAE,MAAM,CAAQ;IAGlC,kBAAkB,YAEjB;IAGD,IAAI,EAAE,MAAM,CAAM;IAGlB,IAAI,EAAE,MAAM,CAAM;IAGlB,IAAI,EAAE,MAAM,CAAe;IAG3B,iBAAiB,EAAE,MAAM,CAAQ;IAGjC,WAAW,EAAE,MAAM,CAAM;IAEzB,oBAAoB,YAEnB;IAGD,OAAO,EAAE,MAAM,CAAO;IAEtB,UAAU,YAET;IAGD,aAAa,EAAE,MAAM,CAAa;IAElC,SAAS,EAAE,GAAG,EAAE,CAAM;IAEtB,IAAI,EAAE,GAAG,EAAE,CAAM;IAEjB,SAAS,EAAE,OAAO,CAAS;IAE3B,qBAAqB,EAAE,MAAM,CAAK;IAClC,qBAAqB,EAAE,MAAM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AAC,GAAG,IAAI;IAMnG,iBAAiB;IAIjB,MAAM;CAyKhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
|
package/sf-i-reporting.js
CHANGED
|
@@ -218,6 +218,7 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
218
218
|
};
|
|
219
219
|
this.newClick = () => {
|
|
220
220
|
console.log('new clicked');
|
|
221
|
+
this.prepopulateValJson = "[]";
|
|
221
222
|
this.flow = "new";
|
|
222
223
|
this.loadMode();
|
|
223
224
|
};
|
|
@@ -721,17 +722,17 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
721
722
|
for (let [indexDate, historyDate] of Object.keys(this.getPrepopulateJson().history).entries()) {
|
|
722
723
|
console.log('history', historyDate);
|
|
723
724
|
html += `
|
|
724
|
-
<div class="d-flex flex-col" part="section-container"><div id="history-date-${indexDate}" class="history-section-head section-head d-flex align-center justify-between" part="section-head-collapsed"><h3 part="section-title-collapsed" id="section-history-title-${indexDate}">${historyDate}</h3><div class="material-icons" id="section-history-icon-${indexDate}">keyboard_arrow_down</div></div><div id="section-history-body-${indexDate}" class="section-body d-flex ${this.formviewclass} hide" part="section-body">
|
|
725
|
+
<div class="d-flex flex-col" part="section-container"><div id="history-date-${indexDate}" class="history-section-head section-head d-flex align-center justify-between" part="section-head-collapsed"><h3 part="section-title-collapsed" class="section-history-title" id="section-history-title-${indexDate}">${historyDate}</h3><div class="section-history-icon material-icons" id="section-history-icon-${indexDate}">keyboard_arrow_down</div></div><div id="section-history-body-${indexDate}" class="section-history-body section-body d-flex ${this.formviewclass} hide" part="section-body">
|
|
725
726
|
`;
|
|
726
727
|
for (let [index, historyItem] of this.getPrepopulateJson().history[historyDate].entries()) {
|
|
727
|
-
html += `<sf-i-reporting name="" id="history-reporting-${historyDate}-${index}" class="history-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head" name="Notice Details" mode="view" editdisable="true" formviewclass="flex-wrap" prepopulatevaljson="${JSON.stringify(historyItem.object).replace(/"/g, '"')}"></sf-i-reporting>`;
|
|
728
|
+
html += `<sf-i-reporting name="" id="history-reporting-${historyDate}-${index}" class="history-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head" name="Notice Details" mode="view" editdisable="true" formviewclass="flex-wrap" configjson="${JSON.stringify(historyItem.schema)}" prepopulatevaljson="${JSON.stringify(historyItem.object).replace(/"/g, '"')}"></sf-i-reporting>`;
|
|
728
729
|
let comments = (_a = historyItem.object.comments) !== null && _a !== void 0 ? _a : [];
|
|
729
730
|
if (historyItem.object.documents != null && historyItem.object.documents.length > 0) {
|
|
730
731
|
html += '<div class="d-flex justify-between mb-20">';
|
|
731
732
|
html += '<h3 part="history-docs-title" class="m-0"><br />Documents</h3>';
|
|
732
733
|
html += '</div>';
|
|
733
734
|
html += `
|
|
734
|
-
<sf-i-uploader prepopulatedInputArr="${JSON.stringify(historyItem.object.documents).replace(/"/g, '"')}" exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader
|
|
735
|
+
<sf-i-uploader prepopulatedInputArr="${JSON.stringify(historyItem.object.documents).replace(/"/g, '"')}" exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader-sf-upload-message, sf-upload-submessage: uploader-sf-upload-submessage, doctype-verify-badge: uploader-doctype-verify-badge, details-controls-container: uploader-details-controls-container, button-icon: uploader-button-icon, pdf-controls-container: uploader-pdf-controls-container, pdf-pages: uploader-pdf-pages, pdf-page-num: uploader-pdf-page-num, pdf-page-count: uploader-pdf-page-count, pdf-canvas: uploader-pdf-canvas, image-container: uploader-image-container, image-component: uploader-image-component, pdf-thumbnail-container: uploader-pdf-thumbnail-container, pdf-canvas-thumbnail: uploader-pdf-canvas-thumbnail, sf-uploader-download-message: uploader-sf-uploader-download-message, input: uploader-input, upload-buttons-container: uploader-upload-buttons-container, doctype-badge: uploader-doctype-badge, upload-status: uploader-upload-status, ext-badge:uploader-ext-badge, extracted-meta: uploader-extracted-meta, extracted-text-chip: uploader-extracted-text-chip, extracted-text-chip-parsed: uploader-extracted-text-chip-parsed, extracted-text-chip-failed: uploader-extracted-text-chip-failed, matches-title: uploader-matches-title, matches:uploader-matches, extracted-title: uploader-extracted-title, extracted-text: uploader-extracted-text, disclaimer-message-container: uploader-disclaimer-message-container, message-container: uploader-message-container, button: uploader-button" class="reporting-sf-i-uploader" part="input-sf-i-uploader" id="history-doc-uploader-${index}" maximize="yes" max="${historyItem.object.documents.length}" apiid="${this.apiIdUploader}" projectid="${this.projectid}" mode="view"></sf-i-uploader>
|
|
735
736
|
`;
|
|
736
737
|
}
|
|
737
738
|
html += '<div class="d-flex justify-between mb-20">';
|
|
@@ -774,6 +775,7 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
774
775
|
}
|
|
775
776
|
html += '</div>';
|
|
776
777
|
}
|
|
778
|
+
html += `<div part="history-status" class="d-flex history-status p-5 hide">History Status</div>`;
|
|
777
779
|
html += '</div>';
|
|
778
780
|
formContainer.insertAdjacentHTML('beforeend', html);
|
|
779
781
|
let sectionHistory = formContainer.querySelector('#history');
|
|
@@ -799,29 +801,43 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
799
801
|
sectionHistoryDate.addEventListener('click', () => {
|
|
800
802
|
let id = sectionHistoryDate.id;
|
|
801
803
|
let dateIndex = id.split('-')[2];
|
|
802
|
-
let
|
|
803
|
-
let
|
|
804
|
-
let
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
sectionHistoryDateBody.
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
804
|
+
let sectionHistoryDateBodies = formContainer.querySelectorAll('.section-history-body');
|
|
805
|
+
let sectionHistoryDateTitles = formContainer.querySelectorAll('.section-history-title');
|
|
806
|
+
let sectionHistoryDateIcons = formContainer.querySelectorAll('.section-history-icon');
|
|
807
|
+
let historyStatus = formContainer.querySelector('.history-status');
|
|
808
|
+
for (let [i, sectionHistoryDateBody] of sectionHistoryDateBodies.entries()) {
|
|
809
|
+
if (sectionHistoryDateBody.id == ("section-history-body-" + dateIndex)) {
|
|
810
|
+
if (sectionHistoryDateBody.style.display == 'block') {
|
|
811
|
+
historyStatus.style.display = 'none';
|
|
812
|
+
sectionHistoryDate.setAttribute('part', 'section-head-collapsed');
|
|
813
|
+
sectionHistoryDateBody.style.display = 'none';
|
|
814
|
+
sectionHistoryDateTitles[i].setAttribute('part', 'section-title-collapsed');
|
|
815
|
+
sectionHistoryDateIcons[i].innerHTML = 'keyboard_arrow_down';
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
historyStatus.innerHTML = "History : " + sectionHistoryDateTitles[i].innerHTML;
|
|
819
|
+
historyStatus.style.display = 'flex';
|
|
820
|
+
sectionHistoryDate.setAttribute('part', 'section-head-expanded');
|
|
821
|
+
sectionHistoryDateBody.style.display = 'block';
|
|
822
|
+
sectionHistoryDateTitles[i].setAttribute('part', 'section-title-expanded');
|
|
823
|
+
sectionHistoryDateIcons[i].innerHTML = 'keyboard_arrow_up';
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
sectionHistoryDate.setAttribute('part', 'section-head-collapsed');
|
|
828
|
+
sectionHistoryDateBody.style.display = 'none';
|
|
829
|
+
sectionHistoryDateTitles[i].setAttribute('part', 'section-title-collapsed');
|
|
830
|
+
sectionHistoryDateIcons[i].innerHTML = 'keyboard_arrow_down';
|
|
831
|
+
}
|
|
816
832
|
}
|
|
817
833
|
});
|
|
818
834
|
}
|
|
819
835
|
let historyReportings = formContainer.querySelectorAll('.history-reporting');
|
|
820
836
|
for (let historyReporting of historyReportings) {
|
|
821
837
|
let id = historyReporting.id;
|
|
822
|
-
let date = id.split('-')[2]
|
|
823
|
-
let index = id.split('-')[
|
|
824
|
-
console.log('historyConfigJSON',
|
|
838
|
+
let date = id.split('-')[2];
|
|
839
|
+
let index = id.split('-')[3];
|
|
840
|
+
console.log('historyConfigJSON', id);
|
|
825
841
|
historyReporting.configjson = JSON.stringify(this.getPrepopulateJson().history[date][index].schema);
|
|
826
842
|
// historyReporting.loadMode();
|
|
827
843
|
}
|
|
@@ -1522,7 +1538,7 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
1522
1538
|
elementHtml += `<div part="uploader-container" class="d-flex flex-col flex-grow">
|
|
1523
1539
|
<label id="${dataObj.id}-label" part="date-label">${elementLabel}</label>
|
|
1524
1540
|
<div part="td-body-2"><sf-i-elastic-text text="${dataObj.hint}" minLength="50"></sf-i-elastic-text></div>
|
|
1525
|
-
<sf-i-uploader exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader
|
|
1541
|
+
<sf-i-uploader exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader-sf-upload-message, sf-upload-submessage: uploader-sf-upload-submessage, doctype-verify-badge: uploader-doctype-verify-badge, details-controls-container: uploader-details-controls-container, button-icon: uploader-button-icon, pdf-controls-container: uploader-pdf-controls-container, pdf-pages: uploader-pdf-pages, pdf-page-num: uploader-pdf-page-num, pdf-page-count: uploader-pdf-page-count, pdf-canvas: uploader-pdf-canvas, image-container: uploader-image-container, image-component: uploader-image-component, pdf-thumbnail-container: uploader-pdf-thumbnail-container, pdf-canvas-thumbnail: uploader-pdf-canvas-thumbnail, sf-uploader-download-message: uploader-sf-uploader-download-message, input: uploader-input, upload-buttons-container: uploader-upload-buttons-container, doctype-badge: uploader-doctype-badge, upload-status: uploader-upload-status, ext-badge:uploader-ext-badge, extracted-meta: uploader-extracted-meta, extracted-text-chip: uploader-extracted-text-chip, extracted-text-chip-parsed: uploader-extracted-text-chip-parsed, extracted-text-chip-failed: uploader-extracted-text-chip-failed, matches-title: uploader-matches-title, matches:uploader-matches, extracted-title: uploader-extracted-title, extracted-text: uploader-extracted-text, disclaimer-message-container: uploader-disclaimer-message-container, message-container: uploader-message-container, button: uploader-button" class="reporting-sf-i-uploader" part="input-sf-i-uploader" id="${dataObj.id}" max="${dataObj.maxselect}" apiid="${dataObj.apiid}" allowedextensions="${dataObj.allowedextensions}" extract="${dataObj.extract}" projectid="${this.projectid}" maxsize="${dataObj.maxsize}" allowdownload="${dataObj.allowdownload}"></sf-i-uploader>
|
|
1526
1542
|
</div>`;
|
|
1527
1543
|
}
|
|
1528
1544
|
return elementHtml;
|
|
@@ -1587,6 +1603,7 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
1587
1603
|
let index = target.id.split('-')[2];
|
|
1588
1604
|
this.reopenedItem = this.list[index];
|
|
1589
1605
|
let oldObj = this.reopenedItem;
|
|
1606
|
+
this.showLoader();
|
|
1590
1607
|
console.log('item selected', this.reopenedItem);
|
|
1591
1608
|
await this.fetchSchema();
|
|
1592
1609
|
this.published = (_a = this.list[index].published) !== null && _a !== void 0 ? _a : false;
|
|
@@ -1616,17 +1633,22 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
1616
1633
|
let target = ev.target;
|
|
1617
1634
|
let index = target.id.split('-')[2];
|
|
1618
1635
|
this.selectedItem = this.list[index];
|
|
1636
|
+
this.showLoader();
|
|
1619
1637
|
console.log('item selected', this.selectedItem);
|
|
1620
|
-
|
|
1621
|
-
|
|
1638
|
+
setTimeout(() => {
|
|
1639
|
+
this.flow = "details";
|
|
1640
|
+
this.loadMode();
|
|
1641
|
+
}, 3000);
|
|
1622
1642
|
});
|
|
1623
1643
|
}
|
|
1624
1644
|
let buttonNew = this._SfReportingContainer.querySelector('#button-new');
|
|
1625
1645
|
buttonNew.addEventListener('click', () => {
|
|
1646
|
+
this.showLoader();
|
|
1626
1647
|
this.newClick();
|
|
1627
1648
|
});
|
|
1628
1649
|
let customEvent = new CustomEvent('valueChanged');
|
|
1629
1650
|
this.dispatchEvent(customEvent);
|
|
1651
|
+
this.hideLoader();
|
|
1630
1652
|
};
|
|
1631
1653
|
this.loadMode = async () => {
|
|
1632
1654
|
console.log('loadmode', this.mode, this.flow);
|
|
@@ -1981,12 +2003,14 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
1981
2003
|
let loaderContainer = this._SfIReportingCCopy;
|
|
1982
2004
|
loaderContainer.style.backgroundColor = "#efefef";
|
|
1983
2005
|
loaderContainer.style.display = 'flex';
|
|
2006
|
+
console.log('showing loader', loaderContainer.style.display);
|
|
1984
2007
|
}
|
|
1985
2008
|
};
|
|
1986
2009
|
this.hideLoader = async () => {
|
|
1987
2010
|
if (this._SfIReportingCCopy != null) {
|
|
1988
2011
|
let loaderContainer = this._SfIReportingCCopy;
|
|
1989
2012
|
loaderContainer.style.display = 'none';
|
|
2013
|
+
console.log('hiding loader', loaderContainer.style.display);
|
|
1990
2014
|
}
|
|
1991
2015
|
};
|
|
1992
2016
|
}
|
|
@@ -2134,6 +2158,9 @@ let SfIReporting = class SfIReporting extends LitElement {
|
|
|
2134
2158
|
return html `
|
|
2135
2159
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
2136
2160
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0..1,0" />
|
|
2161
|
+
<div part="reporting-container-outer-copy" class="SfIReportingCCopy align-center d-flex flex-col justify-center hide">
|
|
2162
|
+
<div class="lds-dual-ring"></div>
|
|
2163
|
+
</div>
|
|
2137
2164
|
<div part="reporting-container-outer" class="SfIReportingC d-flex flex-col align-center">
|
|
2138
2165
|
<div class="d-flex justify-between w-100-m-0">
|
|
2139
2166
|
<div id="reporting-container" part="reporting-container" class="w-100-m-0 hide"></div>
|
|
@@ -2212,6 +2239,9 @@ SfIReporting.styles = css `
|
|
|
2212
2239
|
.ml-10{
|
|
2213
2240
|
margin-left: 10px
|
|
2214
2241
|
}
|
|
2242
|
+
.mr-20{
|
|
2243
|
+
margin-right: 20px
|
|
2244
|
+
}
|
|
2215
2245
|
.flex-grow {
|
|
2216
2246
|
flex-grow: 1;
|
|
2217
2247
|
}
|
|
@@ -2288,6 +2318,9 @@ SfIReporting.styles = css `
|
|
|
2288
2318
|
.p-10{
|
|
2289
2319
|
padding: 10px
|
|
2290
2320
|
}
|
|
2321
|
+
.p-5{
|
|
2322
|
+
padding: 5px
|
|
2323
|
+
}
|
|
2291
2324
|
|
|
2292
2325
|
.lds-dual-ring {
|
|
2293
2326
|
display: inline-block;
|
|
@@ -2494,6 +2527,60 @@ SfIReporting.styles = css `
|
|
|
2494
2527
|
top: 0px;
|
|
2495
2528
|
z-index: 10;
|
|
2496
2529
|
}
|
|
2530
|
+
.commentbox {
|
|
2531
|
+
padding: 10px;
|
|
2532
|
+
border: solid 1px gray;
|
|
2533
|
+
border-radius: 10px;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
.reporterbox {
|
|
2537
|
+
width: 90%;
|
|
2538
|
+
margin-right: 10%;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
.approverbox {
|
|
2542
|
+
width: 90%;
|
|
2543
|
+
margin-left: 5%;
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
.box-large {
|
|
2547
|
+
height: 150px;
|
|
2548
|
+
width: 100%;
|
|
2549
|
+
background: linear-gradient(-45deg, transparent 10%, #ccc 5%, transparent 60%);
|
|
2550
|
+
background-size: 300%;
|
|
2551
|
+
background-position-x: 100%;
|
|
2552
|
+
animation: shimmer 1.5s infinite linear;
|
|
2553
|
+
margin-top: 20px;
|
|
2554
|
+
margin-bottom: 20px;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
.box {
|
|
2559
|
+
margin-top: 20px;
|
|
2560
|
+
height: 10px;
|
|
2561
|
+
width: 100%;
|
|
2562
|
+
background: linear-gradient(-45deg, transparent 10%, #ccc 5%, transparent 60%);
|
|
2563
|
+
background-size: 300%;
|
|
2564
|
+
background-position-x: 100%;
|
|
2565
|
+
animation: shimmer 1.5s infinite linear;
|
|
2566
|
+
margin-bottom: 20px;
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
@keyframes shimmer {
|
|
2570
|
+
to {
|
|
2571
|
+
background-position-x: 0%
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
.history-status {
|
|
2576
|
+
position: absolute;
|
|
2577
|
+
top:10px;
|
|
2578
|
+
right: 0;
|
|
2579
|
+
left: 0;
|
|
2580
|
+
margin-left: auto;
|
|
2581
|
+
margin-right: auto;
|
|
2582
|
+
width: fit-content;
|
|
2583
|
+
}
|
|
2497
2584
|
`;
|
|
2498
2585
|
__decorate([
|
|
2499
2586
|
property()
|