@singi-labs/sifa-sdk 0.10.17 → 0.10.18
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 +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -800,11 +800,19 @@ var PLATFORM_LABELS = {
|
|
|
800
800
|
orcid: "ORCID",
|
|
801
801
|
keyoxide: "Keyoxide"
|
|
802
802
|
};
|
|
803
|
+
var PLATFORM_TOKEN_PREFIX = "id.sifa.defs#platform";
|
|
804
|
+
function normalizePlatformId(platform) {
|
|
805
|
+
if (platform.startsWith(PLATFORM_TOKEN_PREFIX)) {
|
|
806
|
+
return platform.slice(PLATFORM_TOKEN_PREFIX.length).toLowerCase();
|
|
807
|
+
}
|
|
808
|
+
return platform;
|
|
809
|
+
}
|
|
803
810
|
function isKnownPlatform(platform) {
|
|
804
811
|
return platform in PLATFORM_LABELS;
|
|
805
812
|
}
|
|
806
813
|
function getPlatformLabel(platform) {
|
|
807
|
-
|
|
814
|
+
const normalized = normalizePlatformId(platform);
|
|
815
|
+
return isKnownPlatform(normalized) ? PLATFORM_LABELS[normalized] : PLATFORM_LABELS.website;
|
|
808
816
|
}
|
|
809
817
|
var EXCLUDED_FROM_DROPDOWN = /* @__PURE__ */ new Set(["bluesky", "dns", "tangled"]);
|
|
810
818
|
var PLATFORM_OPTIONS = Object.entries(PLATFORM_LABELS).filter(([value]) => !EXCLUDED_FROM_DROPDOWN.has(value)).map(([value, label]) => ({ value, label }));
|
|
@@ -2332,7 +2340,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
2332
2340
|
});
|
|
2333
2341
|
|
|
2334
2342
|
// src/index.ts
|
|
2335
|
-
var SIFA_SDK_VERSION = "0.10.
|
|
2343
|
+
var SIFA_SDK_VERSION = "0.10.18";
|
|
2336
2344
|
|
|
2337
2345
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
2338
2346
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -2446,6 +2454,7 @@ exports.makeGraphFollowRecordSchema = makeGraphFollowRecordSchema;
|
|
|
2446
2454
|
exports.maxGraphemes = maxGraphemes;
|
|
2447
2455
|
exports.meetsContrastAA = meetsContrastAA;
|
|
2448
2456
|
exports.normalizeOpenTo = normalizeOpenTo;
|
|
2457
|
+
exports.normalizePlatformId = normalizePlatformId;
|
|
2449
2458
|
exports.normalizeWorkplaceTypes = normalizeWorkplaceTypes;
|
|
2450
2459
|
exports.openToTokenToValue = openToTokenToValue;
|
|
2451
2460
|
exports.openToValueToToken = openToValueToToken;
|