@singi-labs/sifa-sdk 0.19.28 → 0.19.29
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/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2574,6 +2574,22 @@ function formatDateRange(start, end, showPresent = true) {
|
|
|
2574
2574
|
return `${formattedStart} - ${formattedEnd}`;
|
|
2575
2575
|
}
|
|
2576
2576
|
|
|
2577
|
+
// src/format/collapse-contributors.ts
|
|
2578
|
+
function collapseContributors(contributors, options = {}) {
|
|
2579
|
+
const list = contributors ?? [];
|
|
2580
|
+
const max = options.max ?? 10;
|
|
2581
|
+
if (list.length <= max + 2) return { visible: [...list], hiddenCount: 0 };
|
|
2582
|
+
const visible2 = list.slice(0, max);
|
|
2583
|
+
const ownerIndex = options.isOwner ? list.findIndex(options.isOwner) : -1;
|
|
2584
|
+
const owner = ownerIndex >= max ? list[ownerIndex] : void 0;
|
|
2585
|
+
if (owner !== void 0) {
|
|
2586
|
+
if (ownerIndex > max) visible2.push(null);
|
|
2587
|
+
visible2.push(owner);
|
|
2588
|
+
}
|
|
2589
|
+
const shown = visible2.filter((c) => c !== null).length;
|
|
2590
|
+
return { visible: visible2, hiddenCount: list.length - shown };
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2577
2593
|
// src/format/summarize-deliveries.ts
|
|
2578
2594
|
var CANCELLED_STATUS = "community.lexicon.calendar.event#cancelled";
|
|
2579
2595
|
var KEYNOTE_ROLE = "id.sifa.defs#keynote";
|
|
@@ -6645,7 +6661,7 @@ function describeSifaRecord(collection, value) {
|
|
|
6645
6661
|
}
|
|
6646
6662
|
|
|
6647
6663
|
// src/index.ts
|
|
6648
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
6664
|
+
var SIFA_SDK_VERSION = "0.19.29";
|
|
6649
6665
|
|
|
6650
6666
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
6651
6667
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -6768,6 +6784,7 @@ exports.categoryForApp = categoryForApp;
|
|
|
6768
6784
|
exports.certDateExtractor = certDateExtractor;
|
|
6769
6785
|
exports.cidSchema = cidSchema;
|
|
6770
6786
|
exports.classifyEntityRef = classifyEntityRef;
|
|
6787
|
+
exports.collapseContributors = collapseContributors;
|
|
6771
6788
|
exports.completenessPercent = completenessPercent;
|
|
6772
6789
|
exports.completenessScore = completenessScore;
|
|
6773
6790
|
exports.contrastRatio = contrastRatio;
|