@unhingged/vizu-core 0.1.19 → 0.1.20
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/auto.cjs +40 -8
- package/dist/auto.cjs.map +1 -1
- package/dist/auto.js +40 -8
- package/dist/auto.js.map +1 -1
- package/dist/index.cjs +40 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +40 -8
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +9 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +7 -0
- package/dist/internal.d.ts +7 -0
- package/dist/internal.js +9 -3
- package/dist/internal.js.map +1 -1
- package/dist/vizu.min.js +34 -31
- package/dist/vizu.min.js.map +1 -1
- package/package.json +1 -1
package/dist/internal.cjs
CHANGED
|
@@ -1264,6 +1264,7 @@ var Sidebar = class {
|
|
|
1264
1264
|
if (f && f !== this.filter) {
|
|
1265
1265
|
this.filter = f;
|
|
1266
1266
|
this.render(this.lastComments);
|
|
1267
|
+
this.callbacks.onFilterChange?.(f);
|
|
1267
1268
|
}
|
|
1268
1269
|
return;
|
|
1269
1270
|
}
|
|
@@ -1328,7 +1329,7 @@ var Sidebar = class {
|
|
|
1328
1329
|
const orphans = comments.filter((c) => conf.get(c.id) === "orphaned");
|
|
1329
1330
|
const anchored = comments.filter((c) => conf.get(c.id) !== "orphaned");
|
|
1330
1331
|
const statusOf = (c) => c.status ?? "open";
|
|
1331
|
-
const visible = this.filter === "
|
|
1332
|
+
const visible = this.filter === "all" ? anchored : anchored.filter((c) => statusOf(c) === this.filter);
|
|
1332
1333
|
const visibleOrphans = this.filter === "all" ? orphans : [];
|
|
1333
1334
|
const counts = countByStatus(comments);
|
|
1334
1335
|
if (visible.length === 0 && visibleOrphans.length === 0) {
|
|
@@ -1339,7 +1340,9 @@ var Sidebar = class {
|
|
|
1339
1340
|
const closed = counts.resolved + counts.wontfix;
|
|
1340
1341
|
emptyCopy = `<strong>Nothing open.</strong>${closed} closed comment${closed === 1 ? "" : "s"} hidden. Switch to <em>All</em> to see them.`;
|
|
1341
1342
|
} else if (this.filter === "resolved") {
|
|
1342
|
-
emptyCopy = `<strong>Nothing resolved.</strong
|
|
1343
|
+
emptyCopy = `<strong>Nothing resolved.</strong>Switch to <em>Open</em> or <em>All</em> to see more.`;
|
|
1344
|
+
} else if (this.filter === "wontfix") {
|
|
1345
|
+
emptyCopy = `<strong>Nothing marked won't fix.</strong>Switch to <em>Open</em> or <em>All</em> to see more.`;
|
|
1343
1346
|
} else {
|
|
1344
1347
|
emptyCopy = "<strong>No comments yet</strong>Click any element on the page to leave one.";
|
|
1345
1348
|
}
|
|
@@ -1439,7 +1442,10 @@ var Sidebar = class {
|
|
|
1439
1442
|
Open <span class="vz-sidebar-filter-count">${counts.open}</span>
|
|
1440
1443
|
</button>
|
|
1441
1444
|
<button class="vz-sidebar-filter ${this.filter === "resolved" ? "is-active" : ""}" data-vz="filter" data-filter="resolved" role="tab" aria-selected="${this.filter === "resolved"}">
|
|
1442
|
-
Resolved <span class="vz-sidebar-filter-count">${counts.resolved
|
|
1445
|
+
Resolved <span class="vz-sidebar-filter-count">${counts.resolved}</span>
|
|
1446
|
+
</button>
|
|
1447
|
+
<button class="vz-sidebar-filter ${this.filter === "wontfix" ? "is-active" : ""}" data-vz="filter" data-filter="wontfix" role="tab" aria-selected="${this.filter === "wontfix"}">
|
|
1448
|
+
Won't fix <span class="vz-sidebar-filter-count">${counts.wontfix}</span>
|
|
1443
1449
|
</button>
|
|
1444
1450
|
<button class="vz-sidebar-filter ${this.filter === "all" ? "is-active" : ""}" data-vz="filter" data-filter="all" role="tab" aria-selected="${this.filter === "all"}">
|
|
1445
1451
|
All <span class="vz-sidebar-filter-count">${total}</span>
|