@@ -42,43 +42,59 @@ <h2 slot="title">
42
42
</ div >
43
43
44
44
< ul class ="slds-var-m-top_medium ">
45
- < template for:each ={attachments} for:item ="attachment ">
46
- < li key ={attachment.Id} class ="forceContentVirtualRelatedListStencil forceRecordLayout ">
45
+ <!-- Skeleton Loading -->
46
+ < template if:false ={loaded} >
47
+ < li class ="forceContentVirtualRelatedListStencil forceRecordLayout ">
47
48
< div class ="slds-list_horizontal slds-media_center slds-var-p-vertical_xx-small ">
48
49
< div class ="slds-show_inline-block slds-align-middle thumbnailImg ">
49
- < lightning-icon icon-name ={attachment.icon} alternative-text ="Doctype file " data-id ={attachment.Id} title ="Doctype "> </ lightning-icon >
50
- < img src ={attachment.src} class ="thumbnailImg slds-hide " data-id ={attachment.Id} onload ={handleLoad}/ >
50
+ < c-stencil width ="100% " height ="30px " radius ="2px "> </ c-stencil >
51
51
</ div >
52
- < div class ="slds-show_inline-block slds-var-p-left_x-small slds-truncate slds-var-m-right_x-small ">
53
- < a class =" itemTitle uiOutputText " onclick = {openPreview} data-id = {attachment.ContentDocumentId} > {attachment.ContentDocument.Title} </ a >
52
+ < div class ="slds-show_inline-block slds-var-p-left_x-small slds-truncate slds-var-m-right_x-small " style =" width: 100%; " >
53
+ < c-stencil width =" 100% " height =" 10px " animated =" true " radius =" 30px " > </ c-stencil >
54
54
< p class ="slds-m-around_none secondaryFields slds-text-body_small slds-truncate ">
55
- < span >
56
- < lightning-formatted-date-time value ={attachment.ContentDocument.CreatedDate} > </ lightning-formatted-date-time >
57
- </ span >
58
- < span > {attachment.size}</ span >
59
- < span > {attachment.ContentDocument.FileExtension}</ span >
55
+ < c-stencil width ="100% " height ="10px " animated ="true " radius ="30px "> </ c-stencil >
56
+ </ p >
57
+ </ div >
58
+ </ div >
59
+ </ li >
60
+ < li class ="forceContentVirtualRelatedListStencil forceRecordLayout ">
61
+ < div class ="slds-list_horizontal slds-media_center slds-var-p-vertical_xx-small ">
62
+ < div class ="slds-show_inline-block slds-align-middle thumbnailImg ">
63
+ < c-stencil width ="100% " height ="30px " radius ="2px "> </ c-stencil >
64
+ </ div >
65
+ < div class ="slds-show_inline-block slds-var-p-left_x-small slds-truncate slds-var-m-right_x-small " style ="width: 100%; ">
66
+ < c-stencil width ="100% " height ="10px " animated ="true " radius ="30px "> </ c-stencil >
67
+ < p class ="slds-m-around_none secondaryFields slds-text-body_small slds-truncate ">
68
+ < c-stencil width ="100% " height ="10px " animated ="true " radius ="30px "> </ c-stencil >
60
69
</ p >
61
70
</ div >
62
71
</ div >
63
72
</ li >
64
73
</ template >
65
- </ ul >
66
- <!-- Drop Zone Custom -->
67
- <!-- <div class="drop-zone-container slds-var-p-around_x-small slds-var-m-around_medium">
68
- <div class="drop-zone drop-zone-border slds-color__text_gray-7 slds-text-align_center placeholder slds-is-relative" ondrop={handleDrop} ondragenter={handleDragEnter} ondragleave={handleDragLeave}>
69
- <template if:false={fileCreated}>
70
- Uploading file... <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
71
- </template>
72
- <template if:true={fileCreated}>
73
- <template if:true={inDropZone}>
74
- <span style="font-weight: bold;color: #639bd0;">Drop it here!</span>
75
- </template>
76
- <template if:false={inDropZone}>
77
- Drop a file here to upload it.
78
- </template>
74
+
75
+ < template if:true ={loaded} >
76
+ < template for:each ={attachments} for:item ="attachment ">
77
+ < li key ={attachment.Id} class ="forceContentVirtualRelatedListStencil forceRecordLayout ">
78
+ < div class ="slds-list_horizontal slds-media_center slds-var-p-vertical_xx-small ">
79
+ < div class ="slds-show_inline-block slds-align-middle thumbnailImg ">
80
+ < lightning-icon icon-name ={attachment.icon} alternative-text ="Doctype file " data-id ={attachment.Id} title ="Doctype "> </ lightning-icon >
81
+ < img src ={attachment.src} class ="thumbnailImg slds-hide " data-id ={attachment.Id} onload ={handleLoad}/ >
82
+ </ div >
83
+ < div class ="slds-show_inline-block slds-var-p-left_x-small slds-truncate slds-var-m-right_x-small ">
84
+ < a class ="itemTitle uiOutputText " onclick ={openPreview} data-id ={attachment.ContentDocumentId} > {attachment.ContentDocument.Title}</ a >
85
+ < p class ="slds-m-around_none secondaryFields slds-text-body_small slds-truncate ">
86
+ < span >
87
+ < lightning-formatted-date-time value ={attachment.ContentDocument.CreatedDate} > </ lightning-formatted-date-time >
88
+ </ span >
89
+ < span > {attachment.size}</ span >
90
+ < span > {attachment.ContentDocument.FileExtension}</ span >
91
+ </ p >
92
+ </ div >
93
+ </ div >
94
+ </ li >
79
95
</ template >
80
- </div >
81
- </div> -- >
96
+ </ template >
97
+ </ ul >
82
98
< div style ="text-align: center; ">
83
99
< lightning-file-upload
84
100
class ="file-upload forceContentRelatedListPreviewFileList "
@@ -94,7 +110,14 @@ <h2 slot="title">
94
110
< template if:true ={moreRecords} >
95
111
< a onclick ={loadMore} >
96
112
< div class ="slds-card__footer ">
97
- < span > View More</ span >
113
+ < template if:true ={moreLoaded} >
114
+ < span > View More</ span >
115
+ </ template >
116
+ < template if:false ={moreLoaded} >
117
+ < div style ="position: relative; min-height:50px; ">
118
+ < lightning-spinner alternative-text ="Loading " size ="small "> </ lightning-spinner >
119
+ </ div >
120
+ </ template >
98
121
</ div >
99
122
</ a >
100
123
</ template >
0 commit comments