@product7/product7-js 0.1.7 → 0.1.8
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/product7-js.js +41 -70
- package/dist/product7-js.js.map +1 -1
- package/dist/product7-js.min.js +1 -1
- package/dist/product7-js.min.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/messenger-core.js +7 -0
- package/src/styles/messenger-views.js +15 -34
- package/src/widgets/messenger/views/ChangelogView.js +7 -23
- package/src/widgets/messenger/views/ChatView.js +6 -8
- package/src/widgets/messenger/views/HelpView.js +6 -5
- package/types/index.d.ts +1 -0
package/dist/product7-js.js
CHANGED
|
@@ -4454,7 +4454,14 @@
|
|
|
4454
4454
|
margin-left: 0;
|
|
4455
4455
|
}
|
|
4456
4456
|
|
|
4457
|
+
.messenger-mobile-close-btn {
|
|
4458
|
+
display: none;
|
|
4459
|
+
}
|
|
4460
|
+
|
|
4457
4461
|
@media (max-width: 480px) {
|
|
4462
|
+
.messenger-mobile-close-btn {
|
|
4463
|
+
display: flex;
|
|
4464
|
+
}
|
|
4458
4465
|
.messenger-panel {
|
|
4459
4466
|
width: 100%;
|
|
4460
4467
|
height: 100%;
|
|
@@ -5481,42 +5488,35 @@
|
|
|
5481
5488
|
.messenger-changelog-list {
|
|
5482
5489
|
display: flex;
|
|
5483
5490
|
flex-direction: column;
|
|
5491
|
+
gap: var(--spacing-3);
|
|
5492
|
+
padding: var(--spacing-4) var(--spacing-5);
|
|
5484
5493
|
}
|
|
5485
5494
|
|
|
5486
5495
|
.messenger-changelog-card {
|
|
5487
5496
|
display: flex;
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5497
|
+
flex-direction: column;
|
|
5498
|
+
border: 1px solid var(--msg-border);
|
|
5499
|
+
border-radius: 10px;
|
|
5500
|
+
overflow: hidden;
|
|
5492
5501
|
cursor: pointer;
|
|
5493
|
-
transition:
|
|
5494
|
-
}
|
|
5495
|
-
|
|
5496
|
-
.messenger-changelog-card:last-child {
|
|
5497
|
-
border-bottom: none;
|
|
5502
|
+
transition: box-shadow var(--transition-base), transform var(--transition-base);
|
|
5498
5503
|
}
|
|
5499
5504
|
|
|
5500
5505
|
.messenger-changelog-card:hover {
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
.messenger-changelog-card:hover .messenger-changelog-arrow {
|
|
5505
|
-
color: var(--color-primary);
|
|
5506
|
-
transform: translateX(3px);
|
|
5506
|
+
box-shadow: var(--shadow-md);
|
|
5507
|
+
transform: translateY(-1px);
|
|
5507
5508
|
}
|
|
5508
5509
|
|
|
5509
5510
|
.messenger-changelog-card:active {
|
|
5510
|
-
transform: translateY(
|
|
5511
|
+
transform: translateY(0);
|
|
5511
5512
|
transition-duration: 100ms;
|
|
5512
5513
|
}
|
|
5513
5514
|
|
|
5514
5515
|
.messenger-changelog-content {
|
|
5515
|
-
flex: 1;
|
|
5516
|
-
min-width: 0;
|
|
5517
5516
|
display: flex;
|
|
5518
5517
|
flex-direction: column;
|
|
5519
|
-
gap:
|
|
5518
|
+
gap: var(--spacing-1);
|
|
5519
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
5520
5520
|
}
|
|
5521
5521
|
|
|
5522
5522
|
.messenger-changelog-meta {
|
|
@@ -5554,9 +5554,6 @@
|
|
|
5554
5554
|
font-weight: var(--font-weight-semibold);
|
|
5555
5555
|
color: var(--msg-text);
|
|
5556
5556
|
line-height: var(--line-height-snug);
|
|
5557
|
-
white-space: nowrap;
|
|
5558
|
-
overflow: hidden;
|
|
5559
|
-
text-overflow: ellipsis;
|
|
5560
5557
|
}
|
|
5561
5558
|
|
|
5562
5559
|
.messenger-changelog-description {
|
|
@@ -5571,26 +5568,17 @@
|
|
|
5571
5568
|
}
|
|
5572
5569
|
|
|
5573
5570
|
.messenger-changelog-thumb {
|
|
5574
|
-
width:
|
|
5575
|
-
height: 64px;
|
|
5576
|
-
flex-shrink: 0;
|
|
5577
|
-
border-radius: 8px;
|
|
5571
|
+
width: 100%;
|
|
5578
5572
|
overflow: hidden;
|
|
5579
|
-
border: 1px solid var(--msg-border);
|
|
5573
|
+
border-bottom: 1px solid var(--msg-border);
|
|
5580
5574
|
}
|
|
5581
5575
|
|
|
5582
5576
|
.messenger-changelog-thumb img {
|
|
5583
5577
|
width: 100%;
|
|
5584
|
-
height:
|
|
5578
|
+
height: 180px;
|
|
5585
5579
|
display: block;
|
|
5586
5580
|
object-fit: cover;
|
|
5587
5581
|
}
|
|
5588
|
-
|
|
5589
|
-
.messenger-changelog-arrow {
|
|
5590
|
-
flex-shrink: 0;
|
|
5591
|
-
color: var(--msg-text-tertiary);
|
|
5592
|
-
transition: all var(--transition-base);
|
|
5593
|
-
}
|
|
5594
5582
|
`;
|
|
5595
5583
|
|
|
5596
5584
|
const messengerStyles =
|
|
@@ -9026,8 +9014,8 @@
|
|
|
9026
9014
|
<div class="messenger-changelog-header">
|
|
9027
9015
|
<div class="messenger-changelog-header-top">
|
|
9028
9016
|
<h2>Latest Updates</h2>
|
|
9029
|
-
<button class="sdk-close-btn messenger-changelog-close-btn" aria-label="Close">
|
|
9030
|
-
<iconify-icon icon="ph:x
|
|
9017
|
+
<button class="sdk-close-btn messenger-changelog-close-btn messenger-mobile-close-btn" aria-label="Close">
|
|
9018
|
+
<iconify-icon icon="ph:x" width="18" height="18"></iconify-icon>
|
|
9031
9019
|
</button>
|
|
9032
9020
|
</div>
|
|
9033
9021
|
</div>
|
|
@@ -9067,30 +9055,13 @@
|
|
|
9067
9055
|
}
|
|
9068
9056
|
|
|
9069
9057
|
_renderChangelogCard(item) {
|
|
9070
|
-
const dateStr = this._formatDate(item.publishedAt || item.date);
|
|
9071
|
-
const labelsHtml =
|
|
9072
|
-
item.labels && item.labels.length > 0
|
|
9073
|
-
? item.labels
|
|
9074
|
-
.map((label) => {
|
|
9075
|
-
const bg = label.color || '#E5E7EB';
|
|
9076
|
-
const color = this._getContrastColor(bg);
|
|
9077
|
-
return `<span class="messenger-changelog-tag" style="background:${bg};color:${color};">${label.name}</span>`;
|
|
9078
|
-
})
|
|
9079
|
-
.join('')
|
|
9080
|
-
: '';
|
|
9081
|
-
|
|
9082
9058
|
return `
|
|
9083
9059
|
<div class="messenger-changelog-card" data-changelog-id="${item.id}">
|
|
9060
|
+
${item.coverImage ? `<div class="messenger-changelog-thumb"><img src="${item.coverImage}" alt="${item.title}" onerror="this.parentElement.style.display='none';" /></div>` : ''}
|
|
9084
9061
|
<div class="messenger-changelog-content">
|
|
9085
|
-
<div class="messenger-changelog-meta">
|
|
9086
|
-
${dateStr ? `<span class="messenger-changelog-date">${dateStr}</span>` : ''}
|
|
9087
|
-
${labelsHtml}
|
|
9088
|
-
</div>
|
|
9089
9062
|
<h3 class="messenger-changelog-title">${item.title}</h3>
|
|
9090
9063
|
${item.description ? `<p class="messenger-changelog-description">${this._stripHtml(item.description)}</p>` : ''}
|
|
9091
9064
|
</div>
|
|
9092
|
-
${item.coverImage ? `<div class="messenger-changelog-thumb"><img src="${item.coverImage}" alt="${item.title}" onerror="this.style.display='none';" /></div>` : ''}
|
|
9093
|
-
<iconify-icon icon="ph:caret-right" class="messenger-changelog-arrow" width="16" height="16"></iconify-icon>
|
|
9094
9065
|
</div>
|
|
9095
9066
|
`;
|
|
9096
9067
|
}
|
|
@@ -9133,11 +9104,12 @@
|
|
|
9133
9104
|
}
|
|
9134
9105
|
|
|
9135
9106
|
_attachEvents() {
|
|
9136
|
-
this.element
|
|
9137
|
-
|
|
9138
|
-
.addEventListener('click', () => {
|
|
9107
|
+
const mobileCloseBtn = this.element.querySelector('.messenger-changelog-close-btn');
|
|
9108
|
+
if (mobileCloseBtn) {
|
|
9109
|
+
mobileCloseBtn.addEventListener('click', () => {
|
|
9139
9110
|
this.state.setOpen(false);
|
|
9140
9111
|
});
|
|
9112
|
+
}
|
|
9141
9113
|
|
|
9142
9114
|
this._attachChangelogEvents();
|
|
9143
9115
|
}
|
|
@@ -9259,11 +9231,8 @@
|
|
|
9259
9231
|
<span class="messenger-chat-subtitle">The team can also help</span>
|
|
9260
9232
|
</div>
|
|
9261
9233
|
<div class="messenger-chat-header-actions">
|
|
9262
|
-
<button class="sdk-btn-icon" aria-label="
|
|
9263
|
-
<iconify-icon icon="ph:
|
|
9264
|
-
</button>
|
|
9265
|
-
<button class="sdk-close-btn" aria-label="Close">
|
|
9266
|
-
<iconify-icon icon="ph:x-duotone" width="18" height="18"></iconify-icon>
|
|
9234
|
+
<button class="sdk-btn-icon sdk-close-btn messenger-mobile-close-btn" aria-label="Close">
|
|
9235
|
+
<iconify-icon icon="ph:x" width="18" height="18"></iconify-icon>
|
|
9267
9236
|
</button>
|
|
9268
9237
|
</div>
|
|
9269
9238
|
</div>
|
|
@@ -9540,11 +9509,12 @@
|
|
|
9540
9509
|
this.state.setView('messages');
|
|
9541
9510
|
});
|
|
9542
9511
|
|
|
9543
|
-
this.element
|
|
9544
|
-
|
|
9545
|
-
.addEventListener('click', () => {
|
|
9512
|
+
const mobileCloseBtn = this.element.querySelector('.messenger-mobile-close-btn');
|
|
9513
|
+
if (mobileCloseBtn) {
|
|
9514
|
+
mobileCloseBtn.addEventListener('click', () => {
|
|
9546
9515
|
this.state.setOpen(false);
|
|
9547
9516
|
});
|
|
9517
|
+
}
|
|
9548
9518
|
|
|
9549
9519
|
const input = this.element.querySelector('.messenger-compose-input');
|
|
9550
9520
|
const sendBtn = this.element.querySelector('.messenger-compose-send');
|
|
@@ -10130,8 +10100,8 @@
|
|
|
10130
10100
|
<div class="messenger-help-header">
|
|
10131
10101
|
<div class="messenger-help-header-top">
|
|
10132
10102
|
<h2>Help</h2>
|
|
10133
|
-
<button class="sdk-close-btn messenger-help-close-btn" aria-label="Close">
|
|
10134
|
-
<iconify-icon icon="ph:x
|
|
10103
|
+
<button class="sdk-close-btn messenger-help-close-btn messenger-mobile-close-btn" aria-label="Close">
|
|
10104
|
+
<iconify-icon icon="ph:x" width="18" height="18"></iconify-icon>
|
|
10135
10105
|
</button>
|
|
10136
10106
|
</div>
|
|
10137
10107
|
<div class="messenger-help-search-wrap">
|
|
@@ -10298,11 +10268,12 @@
|
|
|
10298
10268
|
}
|
|
10299
10269
|
|
|
10300
10270
|
_attachEvents() {
|
|
10301
|
-
this.element
|
|
10302
|
-
|
|
10303
|
-
.addEventListener('click', () => {
|
|
10271
|
+
const mobileCloseBtn = this.element.querySelector('.messenger-help-close-btn');
|
|
10272
|
+
if (mobileCloseBtn) {
|
|
10273
|
+
mobileCloseBtn.addEventListener('click', () => {
|
|
10304
10274
|
this.state.setOpen(false);
|
|
10305
10275
|
});
|
|
10276
|
+
}
|
|
10306
10277
|
|
|
10307
10278
|
const searchInput = this.element.querySelector(
|
|
10308
10279
|
'.messenger-help-search-input'
|