@flamingo-stack/openframe-frontend-core 0.0.745 → 0.0.746
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/build/export-map.json +1 -1
- package/dist/{chunk-LJ46XYYP.cjs → chunk-2ZVNXD74.cjs} +24 -24
- package/dist/{chunk-75BF7YJR.cjs → chunk-3AUTORMB.cjs} +13 -13
- package/dist/{chunk-FNIFUCXU.cjs → chunk-3KVB5FQZ.cjs} +5 -5
- package/dist/{chunk-HMSCUL4R.cjs → chunk-3OAACQQG.cjs} +4 -4
- package/dist/{chunk-RIGSZEXS.cjs → chunk-5X3F2KL7.cjs} +90 -90
- package/dist/{chunk-M4FKV2U5.cjs → chunk-7AKFKPBV.cjs} +12 -12
- package/dist/{chunk-4N7KGOBS.cjs → chunk-B24U6KNJ.cjs} +3 -3
- package/dist/{chunk-7KHQHYXL.cjs → chunk-DJ4YDVBF.cjs} +18 -18
- package/dist/{chunk-NFINQ7IZ.cjs → chunk-FAN73OTP.cjs} +6 -6
- package/dist/{chunk-QES5NV4T.cjs → chunk-GPSHFEF2.cjs} +645 -635
- package/dist/{chunk-GOTEXQZN.cjs → chunk-GSFANY2L.cjs} +80 -80
- package/dist/{chunk-URVIPSAJ.cjs → chunk-HNLI4OU5.cjs} +14 -14
- package/dist/{chunk-6IQDQQ56.cjs → chunk-IRKUFXVV.cjs} +38 -38
- package/dist/{chunk-ABLUMGCI.cjs → chunk-JHQNUWFM.cjs} +83 -33
- package/dist/{chunk-4A6OF4HI.cjs → chunk-KVPSV4ZI.cjs} +44 -44
- package/dist/{chunk-UY6A6TEY.cjs → chunk-L2IQESTQ.cjs} +2 -2
- package/dist/{chunk-YIOWV7LS.cjs → chunk-NZMQIAQC.cjs} +2 -2
- package/dist/{chunk-YJRMCFX3.cjs → chunk-O4J4NIMB.cjs} +7 -7
- package/dist/{chunk-GAGNKWOC.cjs → chunk-OWABNVDV.cjs} +2 -2
- package/dist/{chunk-PM5ELQBL.cjs → chunk-PLBJ3XVC.cjs} +32 -32
- package/dist/{chunk-OWGLRE74.cjs → chunk-PSIKUDUV.cjs} +8 -8
- package/dist/{chunk-3LX5AGZO.cjs → chunk-SDDZHPVK.cjs} +24 -24
- package/dist/{chunk-GQ2TRIOV.cjs → chunk-SLODGX6D.cjs} +35 -35
- package/dist/{chunk-DJO7YMT3.cjs → chunk-TILK7SC4.cjs} +194 -194
- package/dist/{chunk-U2O5YQRP.cjs → chunk-U6XWGK53.cjs} +33 -33
- package/dist/{chunk-JGZEHBBD.cjs → chunk-VZGCSVH7.cjs} +10 -10
- package/dist/{chunk-GEEKJ7SH.cjs → chunk-X4Y74M5K.cjs} +74 -74
- package/dist/{chunk-HVR7DPAY.cjs → chunk-XQJOYPPN.cjs} +4 -4
- package/dist/{chunk-7PQOZLVP.cjs → chunk-YKF66VQY.cjs} +20 -20
- package/dist/{chunk-5TCIRWHL.cjs → chunk-YRULLK7N.cjs} +5 -5
- package/dist/{cloud-tenants-DECPWIYQ.cjs → cloud-tenants-OKUFSNPW.cjs} +13 -13
- package/dist/components/case-studies/index.cjs +25 -25
- package/dist/components/chat/index.cjs +9 -9
- package/dist/components/contact/index.cjs +14 -14
- package/dist/components/docs/index.cjs +17 -17
- package/dist/components/embeds/index.cjs +14 -14
- package/dist/components/faq/index.cjs +15 -15
- package/dist/components/features/index.cjs +13 -13
- package/dist/components/help-center-pages/index.cjs +116 -116
- package/dist/components/index.cjs +119 -125
- package/dist/components/meeting-scheduler/index.cjs +63 -63
- package/dist/components/navigation/index.cjs +16 -16
- package/dist/components/onboarding-guides/index.cjs +16 -16
- package/dist/components/product-demo/index.cjs +9 -9
- package/dist/components/related-content/index.cjs +7 -7
- package/dist/components/tickets/index.cjs +19 -19
- package/dist/components/ui/filter-checkbox-item.d.ts +8 -2
- package/dist/components/ui/filter-checkbox-item.d.ts.map +1 -1
- package/dist/components/ui/filter-checkbox-item.js +14 -4
- package/dist/components/ui/index.cjs +13 -13
- package/dist/components/unified-filter-logic.js +1 -1
- package/dist/components/vendor-tag.d.ts +12 -0
- package/dist/components/vendor-tag.d.ts.map +1 -1
- package/dist/components/vendor-tag.js +50 -47
- package/dist/{devices-HJKDRWQX.cjs → devices-URCDMYFU.cjs} +14 -14
- package/dist/{embeddable-chat-3SKFBO2P.cjs → embeddable-chat-B35GB5B6.cjs} +80 -80
- package/dist/index.cjs +20 -18
- package/dist/{knowledge-NH2CGY2C.cjs → knowledge-5MW2PREQ.cjs} +14 -14
- package/dist/{logs-KZYIDYQK.cjs → logs-LJJK5CK4.cjs} +21 -21
- package/dist/{policies-UAVTPIKM.cjs → policies-6TCEWQYG.cjs} +17 -17
- package/dist/{remote-session-N4PJB5FW.cjs → remote-session-IYT4LWJC.cjs} +7 -7
- package/dist/{scripts-FRPY43KU.cjs → scripts-ABB2P6PT.cjs} +20 -20
- package/dist/{software-update-AEJJNLX5.cjs → software-update-4427ZRMO.cjs} +17 -17
- package/dist/{tickets-board-O753S4ZB.cjs → tickets-board-4MT6ZB4F.cjs} +8 -8
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +2 -3
- package/dist/utils/index.cjs +74 -24
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +8 -6
- package/dist/utils/vendor-classification.d.ts +43 -17
- package/dist/utils/vendor-classification.d.ts.map +1 -1
- package/dist/utils/vendor-classification.js +73 -22
- package/package.json +1 -1
- package/src/components/ui/filter-checkbox-item.tsx +21 -5
- package/src/components/unified-filter-logic.tsx +1 -1
- package/src/components/vendor-tag.tsx +73 -69
- package/src/utils/format.ts +2 -3
- package/src/utils/index.ts +7 -5
- package/src/utils/vendor-classification.ts +113 -34
- package/dist/utils/format-text-stub.d.ts +0 -5
- package/dist/utils/format-text-stub.d.ts.map +0 -1
- package/dist/utils/format-text-stub.js +0 -20
- package/src/utils/format-text-stub.ts +0 -17
package/dist/utils/index.cjs
CHANGED
|
@@ -80142,35 +80142,85 @@ if (_orderIdx("flamingo") > _orderIdx("universal") || getPlatformByHostname("fla
|
|
|
80142
80142
|
}
|
|
80143
80143
|
|
|
80144
80144
|
// src/utils/vendor-classification.ts
|
|
80145
|
-
var
|
|
80146
|
-
"open_source",
|
|
80147
|
-
"commercial",
|
|
80148
|
-
"openframe_selected",
|
|
80149
|
-
"openframe_shipped",
|
|
80150
|
-
"openframe_connect"
|
|
80151
|
-
];
|
|
80152
|
-
var OPENFRAME_CLASSIFICATIONS = {
|
|
80145
|
+
var VENDOR_CLASSIFICATION_COPY = {
|
|
80153
80146
|
openframe_selected: {
|
|
80154
|
-
word: "Selected",
|
|
80155
80147
|
label: "OpenFrame Selected",
|
|
80156
|
-
|
|
80148
|
+
word: "Selected",
|
|
80149
|
+
description: "OpenFrame is a unified platform that integrates multiple open-source IT and security tools into a single dashboard for MSPs. This filter shows vendors selected by our team for their excellence, community support, and MSP-specific value.",
|
|
80150
|
+
group: "openframe",
|
|
80151
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
80152
|
+
},
|
|
80153
|
+
openframe_connect: {
|
|
80154
|
+
label: "OpenFrame Connect",
|
|
80155
|
+
word: "Connect",
|
|
80156
|
+
description: "Services OpenFrame connects to and manages for every client, such as Microsoft 365 and Google Workspace, beside devices and tickets.",
|
|
80157
|
+
group: "openframe",
|
|
80158
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
80157
80159
|
},
|
|
80158
80160
|
openframe_shipped: {
|
|
80159
|
-
word: "Shipped",
|
|
80160
80161
|
label: "OpenFrame Shipped",
|
|
80161
|
-
|
|
80162
|
+
word: "Shipped",
|
|
80163
|
+
description: "Tools and OpenFrame products that are in the released OpenFrame product today, not on the roadmap.",
|
|
80164
|
+
group: "openframe",
|
|
80165
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
80162
80166
|
},
|
|
80163
|
-
|
|
80164
|
-
|
|
80165
|
-
|
|
80166
|
-
|
|
80167
|
+
open_source: {
|
|
80168
|
+
label: "Open Source",
|
|
80169
|
+
description: "Released under an OSI-approved open-source license.",
|
|
80170
|
+
group: "license",
|
|
80171
|
+
icon: { name: "code", tone: "accent" }
|
|
80172
|
+
},
|
|
80173
|
+
source_available: {
|
|
80174
|
+
label: "Source-available",
|
|
80175
|
+
description: "The source code is public, but the license restricts how it may be used (for example SSPL, BSL, the Elastic License, or limits on company size or on offering it as a service).",
|
|
80176
|
+
group: "license",
|
|
80177
|
+
icon: { name: "file-code", tone: "neutral" }
|
|
80178
|
+
},
|
|
80179
|
+
commercial: {
|
|
80180
|
+
label: "Commercial",
|
|
80181
|
+
description: "Proprietary software sold by the vendor.",
|
|
80182
|
+
group: "license",
|
|
80183
|
+
icon: { name: "dollar", tone: "neutral" }
|
|
80184
|
+
},
|
|
80185
|
+
end_of_life: {
|
|
80186
|
+
label: "End of life",
|
|
80187
|
+
description: "The vendor has discontinued or retired the product. No new releases.",
|
|
80188
|
+
group: "lifecycle",
|
|
80189
|
+
icon: { name: "alert-triangle", tone: "warning" }
|
|
80190
|
+
},
|
|
80191
|
+
end_of_support: {
|
|
80192
|
+
label: "End of support",
|
|
80193
|
+
description: "The vendor no longer provides support or security fixes, though the product can still be obtained.",
|
|
80194
|
+
group: "lifecycle",
|
|
80195
|
+
icon: { name: "clock", tone: "warning" }
|
|
80196
|
+
},
|
|
80197
|
+
unmaintained: {
|
|
80198
|
+
label: "Unmaintained",
|
|
80199
|
+
description: "No release for years and no official end-of-life notice.",
|
|
80200
|
+
group: "lifecycle",
|
|
80201
|
+
icon: { name: "pause-circle", tone: "warning" }
|
|
80167
80202
|
}
|
|
80168
80203
|
};
|
|
80169
|
-
function
|
|
80170
|
-
|
|
80204
|
+
function vendorClassificationCopy(value) {
|
|
80205
|
+
if (!value || !Object.prototype.hasOwnProperty.call(VENDOR_CLASSIFICATION_COPY, value)) return void 0;
|
|
80206
|
+
return VENDOR_CLASSIFICATION_COPY[value];
|
|
80207
|
+
}
|
|
80208
|
+
function vendorClassificationGroup(value) {
|
|
80209
|
+
return vendorClassificationCopy(value)?.group;
|
|
80171
80210
|
}
|
|
80172
80211
|
function isOpenFrameClassification(value) {
|
|
80173
|
-
return
|
|
80212
|
+
return vendorClassificationGroup(value) === "openframe";
|
|
80213
|
+
}
|
|
80214
|
+
var DISPLAY_ORDER = Object.keys(VENDOR_CLASSIFICATION_COPY);
|
|
80215
|
+
function compareVendorClassifications(a, b) {
|
|
80216
|
+
const ia = DISPLAY_ORDER.indexOf(a);
|
|
80217
|
+
const ib = DISPLAY_ORDER.indexOf(b);
|
|
80218
|
+
if (ia !== -1 || ib !== -1) {
|
|
80219
|
+
if (ia === -1) return 1;
|
|
80220
|
+
if (ib === -1) return -1;
|
|
80221
|
+
return ia - ib;
|
|
80222
|
+
}
|
|
80223
|
+
return a.localeCompare(b);
|
|
80174
80224
|
}
|
|
80175
80225
|
|
|
80176
80226
|
// src/utils/format.ts
|
|
@@ -80568,8 +80618,7 @@ function stripHtml(html) {
|
|
|
80568
80618
|
return noTags.replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/'/g, "'").replace(/&/g, "&").replace(/\s+/g, " ").trim();
|
|
80569
80619
|
}
|
|
80570
80620
|
function formatClassification(classification) {
|
|
80571
|
-
|
|
80572
|
-
return formatUnderscoreText(classification);
|
|
80621
|
+
return vendorClassificationCopy(classification)?.label ?? formatUnderscoreText(classification);
|
|
80573
80622
|
}
|
|
80574
80623
|
function formatPricingModel(pricingModel) {
|
|
80575
80624
|
const customMappings = {
|
|
@@ -86082,7 +86131,6 @@ exports.ODS_SPACING_TOKENS = ODS_SPACING_TOKENS;
|
|
|
86082
86131
|
exports.ODS_SPACING_TOKEN_PATTERN = ODS_SPACING_TOKEN_PATTERN;
|
|
86083
86132
|
exports.ODS_STEM_CLASSES = ODS_STEM_CLASSES;
|
|
86084
86133
|
exports.ODS_STEM_TOKENS = ODS_STEM_TOKENS;
|
|
86085
|
-
exports.OPENFRAME_CLASSIFICATIONS = OPENFRAME_CLASSIFICATIONS;
|
|
86086
86134
|
exports.OPENFRAME_DEV_SECTIONS = OPENFRAME_DEV_SECTIONS;
|
|
86087
86135
|
exports.OS_PLATFORMS = OS_PLATFORMS;
|
|
86088
86136
|
exports.PAGE_PARAM_LIMITS = PAGE_PARAM_LIMITS;
|
|
@@ -86108,7 +86156,7 @@ exports.TICKET_OPEN_PARAM = TICKET_OPEN_PARAM;
|
|
|
86108
86156
|
exports.TICKET_STATUS_OPTIONS = TICKET_STATUS_OPTIONS;
|
|
86109
86157
|
exports.TOKEN_RATE_EMPTY = TOKEN_RATE_EMPTY;
|
|
86110
86158
|
exports.TRIAL_TERMS = TRIAL_TERMS;
|
|
86111
|
-
exports.
|
|
86159
|
+
exports.VENDOR_CLASSIFICATION_COPY = VENDOR_CLASSIFICATION_COPY;
|
|
86112
86160
|
exports.VIEWER_TIMEZONE = VIEWER_TIMEZONE;
|
|
86113
86161
|
exports.WALKTHROUGH_OPEN_QUERY_PARAM = WALKTHROUGH_OPEN_QUERY_PARAM;
|
|
86114
86162
|
exports.WALKTHROUGH_VIDEO_DISMISS_KEY = WALKTHROUGH_VIDEO_DISMISS_KEY;
|
|
@@ -86143,6 +86191,7 @@ exports.clearLegacyAnnouncementCache = clearLegacyAnnouncementCache;
|
|
|
86143
86191
|
exports.clearWalkthroughDismissal = clearWalkthroughDismissal;
|
|
86144
86192
|
exports.clickupTaskUrl = clickupTaskUrl;
|
|
86145
86193
|
exports.cn = cn;
|
|
86194
|
+
exports.compareVendorClassifications = compareVendorClassifications;
|
|
86146
86195
|
exports.complianceStandardForName = complianceStandardForName;
|
|
86147
86196
|
exports.consumeAccessCode = consumeAccessCode;
|
|
86148
86197
|
exports.copyrightLine = copyrightLine;
|
|
@@ -86350,7 +86399,6 @@ exports.isValidEmailDomain = isValidEmailDomain;
|
|
|
86350
86399
|
exports.isValidPathPattern = isValidPathPattern;
|
|
86351
86400
|
exports.isValidSchedulingSlug = isValidSchedulingSlug;
|
|
86352
86401
|
exports.isValidToolType = isValidToolType;
|
|
86353
|
-
exports.isVendorClassification = isVendorClassification;
|
|
86354
86402
|
exports.isVideoMedia = isVideoMedia;
|
|
86355
86403
|
exports.isWalkthroughDismissed = isWalkthroughDismissed;
|
|
86356
86404
|
exports.isWithinMinutes = isWithinMinutes;
|
|
@@ -86472,6 +86520,8 @@ exports.validateAndConsumeAccessCode = validateAndConsumeAccessCode;
|
|
|
86472
86520
|
exports.validateEmailDomain = validateEmailDomain;
|
|
86473
86521
|
exports.validateEmailDomainList = validateEmailDomainList;
|
|
86474
86522
|
exports.validatePhoneNumber = validatePhoneNumber;
|
|
86523
|
+
exports.vendorClassificationCopy = vendorClassificationCopy;
|
|
86524
|
+
exports.vendorClassificationGroup = vendorClassificationGroup;
|
|
86475
86525
|
exports.walkthroughDismissCookieName = walkthroughDismissCookieName;
|
|
86476
86526
|
exports.webinarTiming = webinarTiming;
|
|
86477
86527
|
exports.withFirstTouchAttribution = withFirstTouchAttribution;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { formatDate, formatNumber, formatPrice, formatBytes, formatUrlForDisplay
|
|
|
4
4
|
export * from './ai-providers';
|
|
5
5
|
export * from './model-token-rates';
|
|
6
6
|
export { TRIAL_TERMS, trialLabels, trialLengthLabel } from './trial';
|
|
7
|
-
export {
|
|
7
|
+
export { VENDOR_CLASSIFICATION_COPY, vendorClassificationCopy, vendorClassificationGroup, compareVendorClassifications, isOpenFrameClassification, type VendorClassificationValue, type VendorClassificationGroup, type VendorClassificationCopy, type VendorClassificationIconConfig, } from './vendor-classification';
|
|
8
8
|
export { PLAY_ICON_PATH } from '../components/icons-v2-generated/media-playback/play-icon';
|
|
9
9
|
export { getPlatformAccentColor, getCurrentPlatform, getPlatformConfig, usePlatformColors, switchPlatformTheme, getSemanticColor, type ColorCategory, HEX_PATTERN, getReadableTextColor, hexToRgb, rgbToHex, deriveHoverColor, deriveActiveColor, } from './ods-color-utils';
|
|
10
10
|
export { errorMessage, delay, generateRandomString, truncateString, deepClone, getSlackCommunityJoinUrl, serializeJsonLd, clamp, pick, NO_CLIENT_CACHE, } from './common';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAK1B,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACnG,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAK1B,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACnG,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,yBA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gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -13,9 +13,10 @@ export * from "./ai-providers.js";
|
|
|
13
13
|
export * from "./model-token-rates.js";
|
|
14
14
|
import { TRIAL_TERMS, trialLabels, trialLengthLabel } from "./trial.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
VENDOR_CLASSIFICATION_COPY,
|
|
17
|
+
vendorClassificationCopy,
|
|
18
|
+
vendorClassificationGroup,
|
|
19
|
+
compareVendorClassifications,
|
|
19
20
|
isOpenFrameClassification
|
|
20
21
|
} from "./vendor-classification.js";
|
|
21
22
|
import { PLAY_ICON_PATH } from "../components/icons-v2-generated/media-playback/play-icon.js";
|
|
@@ -286,7 +287,6 @@ export {
|
|
|
286
287
|
ICON_REGISTRY,
|
|
287
288
|
LOCATION_HASH_SYNC_EVENT,
|
|
288
289
|
NO_CLIENT_CACHE,
|
|
289
|
-
OPENFRAME_CLASSIFICATIONS,
|
|
290
290
|
PLAY_ICON_PATH,
|
|
291
291
|
PROGRAM_META_RENDERERS,
|
|
292
292
|
SCROLL_ANCHOR,
|
|
@@ -298,7 +298,7 @@ export {
|
|
|
298
298
|
STICKY_HEADER_OFFSET_PX,
|
|
299
299
|
TICKET_OPEN_PARAM,
|
|
300
300
|
TRIAL_TERMS,
|
|
301
|
-
|
|
301
|
+
VENDOR_CLASSIFICATION_COPY,
|
|
302
302
|
VIEWER_TIMEZONE,
|
|
303
303
|
applyProxyAuth,
|
|
304
304
|
buildAutoContinuationDirective,
|
|
@@ -314,6 +314,7 @@ export {
|
|
|
314
314
|
clearEmbedProxyAuth,
|
|
315
315
|
clickupTaskUrl,
|
|
316
316
|
cn,
|
|
317
|
+
compareVendorClassifications,
|
|
317
318
|
copyrightLine,
|
|
318
319
|
createSseSubscription,
|
|
319
320
|
createUTCTimestamp,
|
|
@@ -415,7 +416,6 @@ export {
|
|
|
415
416
|
isOrderedRange,
|
|
416
417
|
isScrollSyncedHash,
|
|
417
418
|
isToday,
|
|
418
|
-
isVendorClassification,
|
|
419
419
|
isWithinMinutes,
|
|
420
420
|
makeComposeContentUrl,
|
|
421
421
|
nameInitials,
|
|
@@ -458,5 +458,7 @@ export {
|
|
|
458
458
|
truncateString,
|
|
459
459
|
urlPathLooksLikeSvg,
|
|
460
460
|
usePlatformColors,
|
|
461
|
+
vendorClassificationCopy,
|
|
462
|
+
vendorClassificationGroup,
|
|
461
463
|
webinarTiming
|
|
462
464
|
};
|
|
@@ -1,26 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Vendor classifications:
|
|
2
|
+
* Vendor classifications: whatever `vendor_classification.classification` holds on the
|
|
3
|
+
* server. The database owns the vocabulary (its CHECK constraint is the list), the catalog
|
|
4
|
+
* builds its filters from the rows that exist, and nothing here limits which values are valid.
|
|
3
5
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* This module only ENRICHES the values we want to present specially: a curated label, a
|
|
7
|
+
* tooltip description and a group. A value with no entry still works everywhere, labelled
|
|
8
|
+
* by title case. To present a new value better, add an entry here; to make it exist, add it
|
|
9
|
+
* to the database.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
11
|
+
* Groups:
|
|
12
|
+
* - `license`: how the software is licensed.
|
|
13
|
+
* - `lifecycle`: where the product is in its life (a tag and a filter; a card's one tag stays the license).
|
|
14
|
+
* - `openframe`: drawn with the OpenFrame mark and ONE word (`word`).
|
|
11
15
|
*/
|
|
12
|
-
export
|
|
13
|
-
export type
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
/** The word drawn beside the OpenFrame mark. */
|
|
17
|
-
word: string;
|
|
18
|
-
/** The full name, for plain-text surfaces (a select option, an aria label). */
|
|
16
|
+
export type VendorClassificationValue = string;
|
|
17
|
+
export type VendorClassificationGroup = 'license' | 'lifecycle' | 'openframe';
|
|
18
|
+
export interface VendorClassificationCopy {
|
|
19
|
+
/** The label on a tag, a filter and a plain-text surface. */
|
|
19
20
|
label: string;
|
|
20
21
|
/** What the classification means, for a tooltip. */
|
|
21
22
|
description: string;
|
|
23
|
+
group: VendorClassificationGroup;
|
|
24
|
+
/** OpenFrame group only: the one word drawn beside the OpenFrame mark. */
|
|
25
|
+
word?: string;
|
|
26
|
+
/** The icon drawn beside the label, by name (resolved by the shared icon resolver), and its tone. */
|
|
27
|
+
icon?: VendorClassificationIconConfig;
|
|
22
28
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
/**
|
|
30
|
+
* A classification's icon, as data: `name` is any name the shared resolver knows (an alias such
|
|
31
|
+
* as `openframe-logo`, an icon of the design set by its kebab name, or a lucide name). `tone`:
|
|
32
|
+
* `accent` (the brand colour), `neutral` (secondary text on a tile) or `warning`.
|
|
33
|
+
*/
|
|
34
|
+
export interface VendorClassificationIconConfig {
|
|
35
|
+
name: string;
|
|
36
|
+
tone: 'accent' | 'neutral' | 'warning';
|
|
37
|
+
}
|
|
38
|
+
/** In display order: a filter list shows OpenFrame first, then license, then lifecycle. */
|
|
39
|
+
export declare const VENDOR_CLASSIFICATION_COPY: Readonly<Record<string, VendorClassificationCopy>>;
|
|
40
|
+
/** The enrichment of a classification, or undefined for a value we do not present specially. */
|
|
41
|
+
export declare function vendorClassificationCopy(value: string | null | undefined): VendorClassificationCopy | undefined;
|
|
42
|
+
/** The group of a classification, or undefined for a value with no enrichment. */
|
|
43
|
+
export declare function vendorClassificationGroup(value: string | null | undefined): VendorClassificationGroup | undefined;
|
|
44
|
+
/** A classification drawn with the OpenFrame mark (it has a `word`). */
|
|
45
|
+
export declare function isOpenFrameClassification(value: string | null | undefined): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Sort order for a list of classifications (a filter list): the enriched values in their
|
|
48
|
+
* display order (OpenFrame Selected, Connect, Shipped, then license, then lifecycle), then
|
|
49
|
+
* every other value the server holds, alphabetically.
|
|
50
|
+
*/
|
|
51
|
+
export declare function compareVendorClassifications(a: string, b: string): number;
|
|
26
52
|
//# sourceMappingURL=vendor-classification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-classification.d.ts","sourceRoot":"","sources":["../../src/utils/vendor-classification.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vendor-classification.d.ts","sourceRoot":"","sources":["../../src/utils/vendor-classification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAE/C,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAE9E,MAAM,WAAW,wBAAwB;IACvC,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,yBAAyB,CAAC;IACjC,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qGAAqG;IACrG,IAAI,CAAC,EAAE,8BAA8B,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;CACxC;AAED,2FAA2F;AAC3F,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CA6DzF,CAAC;AAEF,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,wBAAwB,GAAG,SAAS,CAG/G;AAED,kFAAkF;AAClF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,yBAAyB,GAAG,SAAS,CAEjH;AAED,wEAAwE;AACxE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEnF;AAID;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CASzE"}
|
|
@@ -1,36 +1,87 @@
|
|
|
1
|
-
const
|
|
2
|
-
"open_source",
|
|
3
|
-
"commercial",
|
|
4
|
-
"openframe_selected",
|
|
5
|
-
"openframe_shipped",
|
|
6
|
-
"openframe_connect"
|
|
7
|
-
];
|
|
8
|
-
const OPENFRAME_CLASSIFICATIONS = {
|
|
1
|
+
const VENDOR_CLASSIFICATION_COPY = {
|
|
9
2
|
openframe_selected: {
|
|
10
|
-
word: "Selected",
|
|
11
3
|
label: "OpenFrame Selected",
|
|
12
|
-
|
|
4
|
+
word: "Selected",
|
|
5
|
+
description: "OpenFrame is a unified platform that integrates multiple open-source IT and security tools into a single dashboard for MSPs. This filter shows vendors selected by our team for their excellence, community support, and MSP-specific value.",
|
|
6
|
+
group: "openframe",
|
|
7
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
8
|
+
},
|
|
9
|
+
openframe_connect: {
|
|
10
|
+
label: "OpenFrame Connect",
|
|
11
|
+
word: "Connect",
|
|
12
|
+
description: "Services OpenFrame connects to and manages for every client, such as Microsoft 365 and Google Workspace, beside devices and tickets.",
|
|
13
|
+
group: "openframe",
|
|
14
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
13
15
|
},
|
|
14
16
|
openframe_shipped: {
|
|
15
|
-
word: "Shipped",
|
|
16
17
|
label: "OpenFrame Shipped",
|
|
17
|
-
|
|
18
|
+
word: "Shipped",
|
|
19
|
+
description: "Tools and OpenFrame products that are in the released OpenFrame product today, not on the roadmap.",
|
|
20
|
+
group: "openframe",
|
|
21
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
18
22
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
open_source: {
|
|
24
|
+
label: "Open Source",
|
|
25
|
+
description: "Released under an OSI-approved open-source license.",
|
|
26
|
+
group: "license",
|
|
27
|
+
icon: { name: "code", tone: "accent" }
|
|
28
|
+
},
|
|
29
|
+
source_available: {
|
|
30
|
+
label: "Source-available",
|
|
31
|
+
description: "The source code is public, but the license restricts how it may be used (for example SSPL, BSL, the Elastic License, or limits on company size or on offering it as a service).",
|
|
32
|
+
group: "license",
|
|
33
|
+
icon: { name: "file-code", tone: "neutral" }
|
|
34
|
+
},
|
|
35
|
+
commercial: {
|
|
36
|
+
label: "Commercial",
|
|
37
|
+
description: "Proprietary software sold by the vendor.",
|
|
38
|
+
group: "license",
|
|
39
|
+
icon: { name: "dollar", tone: "neutral" }
|
|
40
|
+
},
|
|
41
|
+
end_of_life: {
|
|
42
|
+
label: "End of life",
|
|
43
|
+
description: "The vendor has discontinued or retired the product. No new releases.",
|
|
44
|
+
group: "lifecycle",
|
|
45
|
+
icon: { name: "alert-triangle", tone: "warning" }
|
|
46
|
+
},
|
|
47
|
+
end_of_support: {
|
|
48
|
+
label: "End of support",
|
|
49
|
+
description: "The vendor no longer provides support or security fixes, though the product can still be obtained.",
|
|
50
|
+
group: "lifecycle",
|
|
51
|
+
icon: { name: "clock", tone: "warning" }
|
|
52
|
+
},
|
|
53
|
+
unmaintained: {
|
|
54
|
+
label: "Unmaintained",
|
|
55
|
+
description: "No release for years and no official end-of-life notice.",
|
|
56
|
+
group: "lifecycle",
|
|
57
|
+
icon: { name: "pause-circle", tone: "warning" }
|
|
23
58
|
}
|
|
24
59
|
};
|
|
25
|
-
function
|
|
26
|
-
|
|
60
|
+
function vendorClassificationCopy(value) {
|
|
61
|
+
if (!value || !Object.prototype.hasOwnProperty.call(VENDOR_CLASSIFICATION_COPY, value)) return void 0;
|
|
62
|
+
return VENDOR_CLASSIFICATION_COPY[value];
|
|
63
|
+
}
|
|
64
|
+
function vendorClassificationGroup(value) {
|
|
65
|
+
return vendorClassificationCopy(value)?.group;
|
|
27
66
|
}
|
|
28
67
|
function isOpenFrameClassification(value) {
|
|
29
|
-
return
|
|
68
|
+
return vendorClassificationGroup(value) === "openframe";
|
|
69
|
+
}
|
|
70
|
+
const DISPLAY_ORDER = Object.keys(VENDOR_CLASSIFICATION_COPY);
|
|
71
|
+
function compareVendorClassifications(a, b) {
|
|
72
|
+
const ia = DISPLAY_ORDER.indexOf(a);
|
|
73
|
+
const ib = DISPLAY_ORDER.indexOf(b);
|
|
74
|
+
if (ia !== -1 || ib !== -1) {
|
|
75
|
+
if (ia === -1) return 1;
|
|
76
|
+
if (ib === -1) return -1;
|
|
77
|
+
return ia - ib;
|
|
78
|
+
}
|
|
79
|
+
return a.localeCompare(b);
|
|
30
80
|
}
|
|
31
81
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
82
|
+
VENDOR_CLASSIFICATION_COPY,
|
|
83
|
+
compareVendorClassifications,
|
|
34
84
|
isOpenFrameClassification,
|
|
35
|
-
|
|
85
|
+
vendorClassificationCopy,
|
|
86
|
+
vendorClassificationGroup
|
|
36
87
|
};
|
package/package.json
CHANGED
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
4
5
|
import { cn } from '../../utils/cn';
|
|
5
6
|
import { CheckboxCheckmarkIcon } from '../icons-v2-generated/signs-and-symbols/checkbox-checkmark-icon';
|
|
6
7
|
|
|
7
8
|
export interface FilterCheckboxItemProps {
|
|
8
|
-
label
|
|
9
|
+
/** Text, or a richer label (an icon with a word and a tooltip). */
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
/** The accessible name when `label` is not plain text. */
|
|
12
|
+
ariaLabel?: string;
|
|
9
13
|
checked: boolean;
|
|
10
14
|
onChange: (checked: boolean) => void;
|
|
11
15
|
count?: number;
|
|
16
|
+
/** Ignore clicks (e.g. while a navigation started by this filter is pending). */
|
|
17
|
+
disabled?: boolean;
|
|
12
18
|
className?: string;
|
|
13
19
|
}
|
|
14
20
|
|
|
15
|
-
export function FilterCheckboxItem({
|
|
21
|
+
export function FilterCheckboxItem({
|
|
22
|
+
label,
|
|
23
|
+
ariaLabel,
|
|
24
|
+
checked,
|
|
25
|
+
onChange,
|
|
26
|
+
count,
|
|
27
|
+
disabled,
|
|
28
|
+
className,
|
|
29
|
+
}: FilterCheckboxItemProps) {
|
|
16
30
|
return (
|
|
17
31
|
<div
|
|
18
32
|
className={cn(
|
|
19
33
|
'flex items-center gap-3 border-b border-ods-border bg-ods-card last:border-b-0',
|
|
20
|
-
'cursor-pointer transition-colors hover:bg-ods-bg-hover',
|
|
34
|
+
disabled ? 'cursor-wait opacity-70' : 'cursor-pointer transition-colors hover:bg-ods-bg-hover',
|
|
21
35
|
count !== undefined ? 'px-4 py-3' : 'p-3',
|
|
22
36
|
className,
|
|
23
37
|
)}
|
|
24
|
-
onClick={() => onChange(!checked)}
|
|
38
|
+
onClick={() => !disabled && onChange(!checked)}
|
|
25
39
|
>
|
|
26
40
|
<CheckboxPrimitive.Root
|
|
27
41
|
checked={checked}
|
|
42
|
+
disabled={disabled}
|
|
43
|
+
aria-label={ariaLabel ?? (typeof label === 'string' ? label : undefined)}
|
|
28
44
|
onCheckedChange={c => onChange(c === true)}
|
|
29
45
|
className={cn(
|
|
30
46
|
'h-6 w-6 shrink-0 rounded-[6px] border-2',
|
|
@@ -37,7 +53,7 @@ export function FilterCheckboxItem({ label, checked, onChange, count, className
|
|
|
37
53
|
<CheckboxCheckmarkIcon size={10} />
|
|
38
54
|
</CheckboxPrimitive.Indicator>
|
|
39
55
|
</CheckboxPrimitive.Root>
|
|
40
|
-
<span className="flex-1 text-ods-text-primary text-h4">{label}</span>
|
|
56
|
+
<span className="min-w-0 flex-1 text-ods-text-primary text-h4">{label}</span>
|
|
41
57
|
{count !== undefined && (
|
|
42
58
|
<span className="shrink-0 text-ods-text-secondary text-h5">{count.toLocaleString()}</span>
|
|
43
59
|
)}
|
|
@@ -397,7 +397,7 @@ export function useUnifiedFiltering(config: FilterConfig) {
|
|
|
397
397
|
};
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
import { formatClassification, formatPricingModel } from '../utils/format
|
|
400
|
+
import { formatClassification, formatPricingModel } from '../utils/format';
|
|
401
401
|
|
|
402
402
|
// Helper functions for filter labels
|
|
403
403
|
function getFilterLabel(filterKey: string): string {
|