@salla.sa/twilight-components 2.13.62 → 2.13.64
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/dist/cjs/app-globals-26c5d5d4.js.map +1 -1
- package/dist/cjs/salla-add-product-button_48.cjs.entry.js +8 -6
- package/dist/cjs/salla-add-product-button_48.cjs.entry.js.map +1 -1
- package/dist/collection/components/salla-comments/salla-comment-item.js +6 -4
- package/dist/collection/components/salla-comments/salla-comment-item.js.map +1 -1
- package/dist/collection/components/salla-comments/salla-comments.js +2 -2
- package/dist/collection/components/salla-comments/salla-comments.js.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-comment-item2.js +6 -4
- package/dist/components/salla-comment-item2.js.map +1 -1
- package/dist/components/salla-comments.js +2 -2
- package/dist/components/salla-comments.js.map +1 -1
- package/dist/components/salla-quick-buy2.js.map +1 -1
- package/dist/esm/app-globals-70ff1b77.js.map +1 -1
- package/dist/esm/salla-add-product-button_48.entry.js +8 -6
- package/dist/esm/salla-add-product-button_48.entry.js.map +1 -1
- package/dist/esm-es5/app-globals-70ff1b77.js.map +1 -1
- package/dist/esm-es5/salla-add-product-button_48.entry.js +3 -3
- package/dist/esm-es5/salla-add-product-button_48.entry.js.map +1 -1
- package/dist/twilight/{p-9deb641b.entry.js → p-3f21189a.entry.js} +2 -2
- package/dist/twilight/p-3f21189a.entry.js.map +1 -0
- package/dist/twilight/{p-4212388a.system.entry.js → p-5c56c9a8.system.entry.js} +2 -2
- package/dist/twilight/p-5c56c9a8.system.entry.js.map +1 -0
- package/dist/twilight/p-aac0f2a6.js.map +1 -1
- package/dist/twilight/p-b6075524.system.js.map +1 -1
- package/dist/twilight/p-edfb1f0b.system.js +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-4212388a.system.entry.js.map +0 -1
- package/dist/twilight/p-9deb641b.entry.js.map +0 -1
|
@@ -1820,13 +1820,15 @@ const SallaCommentItem = class {
|
|
|
1820
1820
|
return Array.isArray(this.comment.replies) ? this.comment.replies : [this.comment.replies];
|
|
1821
1821
|
}
|
|
1822
1822
|
getDate(dateString) {
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1823
|
+
const [datePart] = dateString.split(' ');
|
|
1824
|
+
const [year, month, day] = datePart.split('-');
|
|
1825
|
+
const formattedDate = `${parseInt(month, 10)}/${parseInt(day, 10)}/${parseInt(year, 10)}`;
|
|
1825
1826
|
return formattedDate;
|
|
1826
1827
|
}
|
|
1827
1828
|
getTime(dateString) {
|
|
1828
|
-
const
|
|
1829
|
-
const
|
|
1829
|
+
const [, timePart] = dateString.split(' ');
|
|
1830
|
+
const [hours, minutes] = timePart.split(':');
|
|
1831
|
+
const formattedTime = `${parseInt(hours, 10)}:${parseInt(minutes, 10)}`;
|
|
1830
1832
|
return formattedTime;
|
|
1831
1833
|
}
|
|
1832
1834
|
render() {
|
|
@@ -2001,9 +2003,9 @@ const SallaComments = class {
|
|
|
2001
2003
|
render() {
|
|
2002
2004
|
// We should show a different placeholder for pages and products (WIP)
|
|
2003
2005
|
if (this.showPlaceholder) {
|
|
2004
|
-
return (index.h("div", null, !!this.total && !this.hideTitle ? index.h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && index.h("salla-comment-form", {
|
|
2006
|
+
return (index.h("div", null, !!this.total && !this.hideTitle ? index.h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && index.h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }), index.h("div", { class: "no-content-placeholder--comments" }, index.h("i", { class: "sicon-chat-bubbles text-5xl block mb-5 text-gray-400" }), index.h("p", { class: "text-sm" }, this.noComments))));
|
|
2005
2007
|
}
|
|
2006
|
-
return (index.h("div", { class: `s-comments s-comments-${this.type}` }, index.h("div", { class: `${this.type == CommentType.PAGE ? "s-comments-page-container" : "s-comments-container"}` }, !!this.total && !this.hideTitle ? index.h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && index.h("salla-comment-form", { type: this.type, "item-id": this.itemId }), !!this.total && index.h("h2", { class: "s-comments-count-label", innerHTML: this.pluralize(this.comment_name, this.total) }), index.h("div", { ref: wrapper => this.wrapper = wrapper }), this.nextPage && (index.h("div", { class: "s-infinite-scroll-wrapper", ref: status => this.status = status }, index.h("button", { onClick: () => this.loadMore(), class: "s-infinite-scroll-btn s-button-btn s-button-primary" }, index.h("span", { class: "s-button-text s-infinite-scroll-btn-text" }, this.loadMoreText ? this.loadMoreText : salla.lang.get('common.elements.load_more')), index.h("span", { class: "s-button-loader s-button-loader-center s-infinite-scroll-btn-loader", ref: btnLoader => this.btnLoader = btnLoader, style: { "display": "none" } })))))));
|
|
2008
|
+
return (index.h("div", { class: `s-comments s-comments-${this.type}` }, index.h("div", { class: `${this.type == CommentType.PAGE ? "s-comments-page-container" : "s-comments-container"}` }, !!this.total && !this.hideTitle ? index.h("h2", { class: "s-comments-title" }, this.blockTitle ? this.blockTitle : this.comment_title) : '', !this.hideForm && index.h("salla-comment-form", { showAvatar: this.showFormAvatar, type: this.type, "item-id": this.itemId }), !!this.total && index.h("h2", { class: "s-comments-count-label", innerHTML: this.pluralize(this.comment_name, this.total) }), index.h("div", { ref: wrapper => this.wrapper = wrapper }), this.nextPage && (index.h("div", { class: "s-infinite-scroll-wrapper", ref: status => this.status = status }, index.h("button", { onClick: () => this.loadMore(), class: "s-infinite-scroll-btn s-button-btn s-button-primary" }, index.h("span", { class: "s-button-text s-infinite-scroll-btn-text" }, this.loadMoreText ? this.loadMoreText : salla.lang.get('common.elements.load_more')), index.h("span", { class: "s-button-loader s-button-loader-center s-infinite-scroll-btn-loader", ref: btnLoader => this.btnLoader = btnLoader, style: { "display": "none" } })))))));
|
|
2007
2009
|
}
|
|
2008
2010
|
async componentWillLoad() {
|
|
2009
2011
|
await this.loadInitialData(); // Load initial data before rendering the component
|