@flamingo-stack/openframe-frontend-core 0.0.745 → 0.0.748
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-7PQOZLVP.cjs → chunk-46EIXJFC.cjs} +20 -20
- package/dist/{chunk-FNIFUCXU.cjs → chunk-4AZHFLOM.cjs} +5 -5
- package/dist/{chunk-YJRMCFX3.cjs → chunk-4MGZYY6U.cjs} +7 -7
- package/dist/{chunk-QES5NV4T.cjs → chunk-6XP6RNFD.cjs} +1040 -1010
- package/dist/{chunk-75BF7YJR.cjs → chunk-7Y3VMMJB.cjs} +13 -13
- package/dist/{chunk-GAGNKWOC.cjs → chunk-BBM2ICOY.cjs} +2 -2
- package/dist/{chunk-DJO7YMT3.cjs → chunk-BBTSJYTR.cjs} +232 -227
- package/dist/{chunk-4N7KGOBS.cjs → chunk-BEC43GHL.cjs} +3 -3
- package/dist/{chunk-NFINQ7IZ.cjs → chunk-D4XZL27V.cjs} +6 -6
- package/dist/{chunk-PM5ELQBL.cjs → chunk-EH3LOWGY.cjs} +32 -32
- package/dist/{chunk-7KHQHYXL.cjs → chunk-G2ELX3DG.cjs} +18 -18
- package/dist/{chunk-M4FKV2U5.cjs → chunk-GE4PCDNZ.cjs} +12 -12
- package/dist/{chunk-GEEKJ7SH.cjs → chunk-H34A2765.cjs} +74 -74
- package/dist/{chunk-URVIPSAJ.cjs → chunk-HNLI4OU5.cjs} +14 -14
- package/dist/{chunk-ABLUMGCI.cjs → chunk-JHQNUWFM.cjs} +83 -33
- package/dist/{chunk-3LX5AGZO.cjs → chunk-JNBOQ7F2.cjs} +24 -24
- package/dist/{chunk-RIGSZEXS.cjs → chunk-JOPFX3PJ.cjs} +90 -90
- package/dist/{chunk-UY6A6TEY.cjs → chunk-L2IQESTQ.cjs} +2 -2
- package/dist/{chunk-HVR7DPAY.cjs → chunk-OZUJYBQ2.cjs} +4 -4
- package/dist/{chunk-LJ46XYYP.cjs → chunk-P7KTAXXE.cjs} +41 -27
- package/dist/{chunk-OWGLRE74.cjs → chunk-PSIKUDUV.cjs} +8 -8
- package/dist/{chunk-4A6OF4HI.cjs → chunk-PSSGIZXZ.cjs} +44 -44
- package/dist/{chunk-YIOWV7LS.cjs → chunk-QPSQ5WLG.cjs} +2 -2
- package/dist/{chunk-GQ2TRIOV.cjs → chunk-TRXCQADV.cjs} +35 -35
- package/dist/{chunk-U2O5YQRP.cjs → chunk-U6XWGK53.cjs} +33 -33
- package/dist/{chunk-HMSCUL4R.cjs → chunk-UNR74CAC.cjs} +4 -4
- package/dist/{chunk-JGZEHBBD.cjs → chunk-YIRX6C7V.cjs} +10 -10
- package/dist/{chunk-6IQDQQ56.cjs → chunk-YKJQM2O6.cjs} +38 -38
- package/dist/{chunk-5TCIRWHL.cjs → chunk-YRULLK7N.cjs} +5 -5
- package/dist/{chunk-GOTEXQZN.cjs → chunk-ZNUSYMH7.cjs} +80 -80
- package/dist/{cloud-tenants-DECPWIYQ.cjs → cloud-tenants-V5727B7F.cjs} +13 -13
- package/dist/components/case-studies/index.cjs +31 -29
- package/dist/components/case-studies/share-experience-section.d.ts.map +1 -1
- package/dist/components/case-studies/share-experience-section.js +6 -5
- 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 +121 -125
- package/dist/components/layout/page-heading.d.ts +16 -0
- package/dist/components/layout/page-heading.d.ts.map +1 -1
- package/dist/components/layout/page-heading.js +16 -2
- 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 +15 -13
- package/dist/components/ui/layout-hold.d.ts +4 -3
- package/dist/components/ui/layout-hold.d.ts.map +1 -1
- package/dist/components/ui/layout-hold.js +29 -9
- 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-WWMXIIHI.cjs} +14 -14
- package/dist/{embeddable-chat-3SKFBO2P.cjs → embeddable-chat-IJHCGQ24.cjs} +80 -80
- package/dist/index.cjs +22 -18
- package/dist/{knowledge-NH2CGY2C.cjs → knowledge-JZP4RIXB.cjs} +14 -14
- package/dist/{logs-KZYIDYQK.cjs → logs-WIRYFNUC.cjs} +21 -21
- package/dist/{policies-UAVTPIKM.cjs → policies-X7OJYA7G.cjs} +17 -17
- package/dist/{remote-session-N4PJB5FW.cjs → remote-session-IYT4LWJC.cjs} +7 -7
- package/dist/{scripts-FRPY43KU.cjs → scripts-GRMT2NGW.cjs} +20 -20
- package/dist/{software-update-AEJJNLX5.cjs → software-update-G3QOB7RT.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 +123 -72
- 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/markdown-to-plain.d.ts.map +1 -1
- package/dist/utils/markdown-to-plain.js +12 -7
- 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 +7 -2
- package/src/components/case-studies/share-experience-section.tsx +9 -6
- package/src/components/layout/page-heading.tsx +52 -11
- package/src/components/ui/filter-checkbox-item.tsx +21 -5
- package/src/components/ui/layout-hold.tsx +38 -10
- 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/markdown-to-plain.ts +25 -16
- 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
|
@@ -6,21 +6,18 @@ var clsx = require('clsx');
|
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var libphonenumberJs = require('libphonenumber-js');
|
|
8
8
|
var lucideReact = require('lucide-react');
|
|
9
|
+
var hastUtilRaw = require('hast-util-raw');
|
|
9
10
|
var hastUtilToText = require('hast-util-to-text');
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
11
|
+
var mdastUtilFromMarkdown = require('mdast-util-from-markdown');
|
|
12
|
+
var mdastUtilGfm = require('mdast-util-gfm');
|
|
13
|
+
var mdastUtilNewlineToBreak = require('mdast-util-newline-to-break');
|
|
14
|
+
var mdastUtilToHast = require('mdast-util-to-hast');
|
|
15
|
+
var micromarkExtensionGfm = require('micromark-extension-gfm');
|
|
15
16
|
var unistUtilVisit = require('unist-util-visit');
|
|
16
17
|
|
|
17
18
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
19
|
|
|
19
20
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
20
|
-
var rehypeRaw__default = /*#__PURE__*/_interopDefault(rehypeRaw);
|
|
21
|
-
var remarkBreaks__default = /*#__PURE__*/_interopDefault(remarkBreaks);
|
|
22
|
-
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
23
|
-
var remarkRehype__default = /*#__PURE__*/_interopDefault(remarkRehype);
|
|
24
21
|
|
|
25
22
|
var __defProp = Object.defineProperty;
|
|
26
23
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -80142,35 +80139,85 @@ if (_orderIdx("flamingo") > _orderIdx("universal") || getPlatformByHostname("fla
|
|
|
80142
80139
|
}
|
|
80143
80140
|
|
|
80144
80141
|
// 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 = {
|
|
80142
|
+
var VENDOR_CLASSIFICATION_COPY = {
|
|
80153
80143
|
openframe_selected: {
|
|
80154
|
-
word: "Selected",
|
|
80155
80144
|
label: "OpenFrame Selected",
|
|
80156
|
-
|
|
80145
|
+
word: "Selected",
|
|
80146
|
+
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.",
|
|
80147
|
+
group: "openframe",
|
|
80148
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
80149
|
+
},
|
|
80150
|
+
openframe_connect: {
|
|
80151
|
+
label: "OpenFrame Connect",
|
|
80152
|
+
word: "Connect",
|
|
80153
|
+
description: "Services OpenFrame connects to and manages for every client, such as Microsoft 365 and Google Workspace, beside devices and tickets.",
|
|
80154
|
+
group: "openframe",
|
|
80155
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
80157
80156
|
},
|
|
80158
80157
|
openframe_shipped: {
|
|
80159
|
-
word: "Shipped",
|
|
80160
80158
|
label: "OpenFrame Shipped",
|
|
80161
|
-
|
|
80159
|
+
word: "Shipped",
|
|
80160
|
+
description: "Tools and OpenFrame products that are in the released OpenFrame product today, not on the roadmap.",
|
|
80161
|
+
group: "openframe",
|
|
80162
|
+
icon: { name: "openframe-logo", tone: "accent" }
|
|
80162
80163
|
},
|
|
80163
|
-
|
|
80164
|
-
|
|
80165
|
-
|
|
80166
|
-
|
|
80164
|
+
open_source: {
|
|
80165
|
+
label: "Open Source",
|
|
80166
|
+
description: "Released under an OSI-approved open-source license.",
|
|
80167
|
+
group: "license",
|
|
80168
|
+
icon: { name: "code", tone: "accent" }
|
|
80169
|
+
},
|
|
80170
|
+
source_available: {
|
|
80171
|
+
label: "Source-available",
|
|
80172
|
+
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).",
|
|
80173
|
+
group: "license",
|
|
80174
|
+
icon: { name: "file-code", tone: "neutral" }
|
|
80175
|
+
},
|
|
80176
|
+
commercial: {
|
|
80177
|
+
label: "Commercial",
|
|
80178
|
+
description: "Proprietary software sold by the vendor.",
|
|
80179
|
+
group: "license",
|
|
80180
|
+
icon: { name: "dollar", tone: "neutral" }
|
|
80181
|
+
},
|
|
80182
|
+
end_of_life: {
|
|
80183
|
+
label: "End of life",
|
|
80184
|
+
description: "The vendor has discontinued or retired the product. No new releases.",
|
|
80185
|
+
group: "lifecycle",
|
|
80186
|
+
icon: { name: "alert-triangle", tone: "warning" }
|
|
80187
|
+
},
|
|
80188
|
+
end_of_support: {
|
|
80189
|
+
label: "End of support",
|
|
80190
|
+
description: "The vendor no longer provides support or security fixes, though the product can still be obtained.",
|
|
80191
|
+
group: "lifecycle",
|
|
80192
|
+
icon: { name: "clock", tone: "warning" }
|
|
80193
|
+
},
|
|
80194
|
+
unmaintained: {
|
|
80195
|
+
label: "Unmaintained",
|
|
80196
|
+
description: "No release for years and no official end-of-life notice.",
|
|
80197
|
+
group: "lifecycle",
|
|
80198
|
+
icon: { name: "pause-circle", tone: "warning" }
|
|
80167
80199
|
}
|
|
80168
80200
|
};
|
|
80169
|
-
function
|
|
80170
|
-
|
|
80201
|
+
function vendorClassificationCopy(value) {
|
|
80202
|
+
if (!value || !Object.prototype.hasOwnProperty.call(VENDOR_CLASSIFICATION_COPY, value)) return void 0;
|
|
80203
|
+
return VENDOR_CLASSIFICATION_COPY[value];
|
|
80204
|
+
}
|
|
80205
|
+
function vendorClassificationGroup(value) {
|
|
80206
|
+
return vendorClassificationCopy(value)?.group;
|
|
80171
80207
|
}
|
|
80172
80208
|
function isOpenFrameClassification(value) {
|
|
80173
|
-
return
|
|
80209
|
+
return vendorClassificationGroup(value) === "openframe";
|
|
80210
|
+
}
|
|
80211
|
+
var DISPLAY_ORDER = Object.keys(VENDOR_CLASSIFICATION_COPY);
|
|
80212
|
+
function compareVendorClassifications(a, b) {
|
|
80213
|
+
const ia = DISPLAY_ORDER.indexOf(a);
|
|
80214
|
+
const ib = DISPLAY_ORDER.indexOf(b);
|
|
80215
|
+
if (ia !== -1 || ib !== -1) {
|
|
80216
|
+
if (ia === -1) return 1;
|
|
80217
|
+
if (ib === -1) return -1;
|
|
80218
|
+
return ia - ib;
|
|
80219
|
+
}
|
|
80220
|
+
return a.localeCompare(b);
|
|
80174
80221
|
}
|
|
80175
80222
|
|
|
80176
80223
|
// src/utils/format.ts
|
|
@@ -80568,8 +80615,7 @@ function stripHtml(html) {
|
|
|
80568
80615
|
return noTags.replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/'/g, "'").replace(/'/g, "'").replace(/&/g, "&").replace(/\s+/g, " ").trim();
|
|
80569
80616
|
}
|
|
80570
80617
|
function formatClassification(classification) {
|
|
80571
|
-
|
|
80572
|
-
return formatUnderscoreText(classification);
|
|
80618
|
+
return vendorClassificationCopy(classification)?.label ?? formatUnderscoreText(classification);
|
|
80573
80619
|
}
|
|
80574
80620
|
function formatPricingModel(pricingModel) {
|
|
80575
80621
|
const customMappings = {
|
|
@@ -82573,9 +82619,9 @@ function createLocalStorageAdapter(options) {
|
|
|
82573
82619
|
const storage = getStorage(backend);
|
|
82574
82620
|
if (!storage) return null;
|
|
82575
82621
|
try {
|
|
82576
|
-
const
|
|
82577
|
-
if (!
|
|
82578
|
-
const parsed = JSON.parse(
|
|
82622
|
+
const raw2 = storage.getItem(resolveKey());
|
|
82623
|
+
if (!raw2) return null;
|
|
82624
|
+
const parsed = JSON.parse(raw2);
|
|
82579
82625
|
if (options.validate && !options.validate(parsed)) return null;
|
|
82580
82626
|
return parsed;
|
|
82581
82627
|
} catch (err) {
|
|
@@ -83760,10 +83806,10 @@ async function readLeadingDecisionFrame(response) {
|
|
|
83760
83806
|
throw new Error("readLeadingDecisionFrame: text-body sentinel arrived before leading frame");
|
|
83761
83807
|
}
|
|
83762
83808
|
if (nullIdx !== -1) {
|
|
83763
|
-
const
|
|
83809
|
+
const raw2 = buffer.slice(0, nullIdx);
|
|
83764
83810
|
let parsed;
|
|
83765
83811
|
try {
|
|
83766
|
-
parsed = JSON.parse(
|
|
83812
|
+
parsed = JSON.parse(raw2);
|
|
83767
83813
|
} catch (err) {
|
|
83768
83814
|
throw new Error(`readLeadingDecisionFrame: leading JSON parse failed: ${err.message}`);
|
|
83769
83815
|
}
|
|
@@ -83866,11 +83912,11 @@ function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
|
83866
83912
|
}
|
|
83867
83913
|
|
|
83868
83914
|
// src/components/chat/utils/flatten-assistant-content.ts
|
|
83869
|
-
function flattenAssistantContent(
|
|
83870
|
-
if (typeof
|
|
83871
|
-
if (!Array.isArray(
|
|
83915
|
+
function flattenAssistantContent(raw2) {
|
|
83916
|
+
if (typeof raw2 === "string") return raw2;
|
|
83917
|
+
if (!Array.isArray(raw2)) return "";
|
|
83872
83918
|
const parts = [];
|
|
83873
|
-
for (const seg of
|
|
83919
|
+
for (const seg of raw2) {
|
|
83874
83920
|
if (seg && typeof seg === "object" && seg.type === "text") {
|
|
83875
83921
|
const t = seg.text;
|
|
83876
83922
|
if (typeof t === "string" && t.length > 0) parts.push(t);
|
|
@@ -83884,8 +83930,8 @@ var SCROLL_ANCHOR = { TOP: "top", BOTTOM: "bottom" };
|
|
|
83884
83930
|
|
|
83885
83931
|
// src/components/chat/utils/scroll-anchor.ts
|
|
83886
83932
|
var SCROLL_ANCHOR_WIRE_KEY = "scrollAnchor";
|
|
83887
|
-
function parseScrollAnchor(
|
|
83888
|
-
return
|
|
83933
|
+
function parseScrollAnchor(raw2) {
|
|
83934
|
+
return raw2 === SCROLL_ANCHOR.TOP || raw2 === SCROLL_ANCHOR.BOTTOM ? raw2 : null;
|
|
83889
83935
|
}
|
|
83890
83936
|
|
|
83891
83937
|
// src/components/chat/utils/slash-dispatch-utils.ts
|
|
@@ -83894,10 +83940,10 @@ var WIRE_ID_REGEX = /^[A-Za-z0-9._:/-]+$/;
|
|
|
83894
83940
|
var WIRE_TABLE_ID_MAX = 60;
|
|
83895
83941
|
var WIRE_ID_MAX = 200;
|
|
83896
83942
|
var WIRE_QUERY_MAX = 2e3;
|
|
83897
|
-
function parseWireCommandOverride(
|
|
83898
|
-
if (!
|
|
83943
|
+
function parseWireCommandOverride(raw2) {
|
|
83944
|
+
if (!raw2 || typeof raw2 !== "object") return null;
|
|
83899
83945
|
const out = {};
|
|
83900
|
-
const r =
|
|
83946
|
+
const r = raw2;
|
|
83901
83947
|
if (r.entityIdFilter && typeof r.entityIdFilter === "object") {
|
|
83902
83948
|
const f = r.entityIdFilter;
|
|
83903
83949
|
if (typeof f.tableId === "string" && f.tableId.length > 0 && f.tableId.length <= WIRE_TABLE_ID_MAX && WIRE_TABLE_ID_REGEX.test(f.tableId) && typeof f.id === "string" && f.id.length > 0 && f.id.length <= WIRE_ID_MAX && WIRE_ID_REGEX.test(f.id)) {
|
|
@@ -84228,8 +84274,8 @@ function scrollElementIntoView(target, options = {}) {
|
|
|
84228
84274
|
};
|
|
84229
84275
|
const computeTarget = () => {
|
|
84230
84276
|
const offset = Math.max(headerOffset, declaredScrollMarginTop(target));
|
|
84231
|
-
const
|
|
84232
|
-
const adjusted = adjustTargetY ? adjustTargetY(
|
|
84277
|
+
const raw2 = container ? container.scrollTop + (target.getBoundingClientRect().top - container.getBoundingClientRect().top) - offset : target.getBoundingClientRect().top + window.scrollY - offset;
|
|
84278
|
+
const adjusted = adjustTargetY ? adjustTargetY(raw2) : raw2;
|
|
84233
84279
|
const maxScroll = container ? Math.max(0, container.scrollHeight - container.clientHeight) : Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
|
|
84234
84280
|
return Math.min(Math.max(0, adjusted), maxScroll);
|
|
84235
84281
|
};
|
|
@@ -84372,14 +84418,14 @@ function scanHeadings(content, options = {}) {
|
|
|
84372
84418
|
}
|
|
84373
84419
|
if (includeRawHtml && line.indexOf("<") !== -1) {
|
|
84374
84420
|
RAW_HEADING_RE.lastIndex = 0;
|
|
84375
|
-
let
|
|
84421
|
+
let raw2;
|
|
84376
84422
|
let matched = false;
|
|
84377
|
-
while ((
|
|
84423
|
+
while ((raw2 = RAW_HEADING_RE.exec(line)) !== null) {
|
|
84378
84424
|
matched = true;
|
|
84379
84425
|
out.push({
|
|
84380
84426
|
line: i + 1,
|
|
84381
|
-
level: Number(
|
|
84382
|
-
text:
|
|
84427
|
+
level: Number(raw2[1]),
|
|
84428
|
+
text: raw2[2].replace(/<[^>]*>/g, "").trim()
|
|
84383
84429
|
});
|
|
84384
84430
|
}
|
|
84385
84431
|
if (matched) {
|
|
@@ -84417,8 +84463,8 @@ function createHeadingIdDeduper() {
|
|
|
84417
84463
|
}
|
|
84418
84464
|
|
|
84419
84465
|
// src/utils/anchor-id.ts
|
|
84420
|
-
function normalizeAnchorId(
|
|
84421
|
-
return slugifyHeadingText(
|
|
84466
|
+
function normalizeAnchorId(raw2) {
|
|
84467
|
+
return slugifyHeadingText(raw2).replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
84422
84468
|
}
|
|
84423
84469
|
var HEADING_SELECTOR = "h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]";
|
|
84424
84470
|
var DUPLICATE_SUFFIX_RE = /^(.+)-(\d+)$/;
|
|
@@ -85028,9 +85074,9 @@ function sanitizeRescueValues(values) {
|
|
|
85028
85074
|
if (!values || typeof values !== "object") return out;
|
|
85029
85075
|
for (const key of FORM_RESCUE_VALUE_FIELDS) {
|
|
85030
85076
|
if (isExcludedRescueField(key)) continue;
|
|
85031
|
-
const
|
|
85032
|
-
if (typeof
|
|
85033
|
-
const trimmed =
|
|
85077
|
+
const raw2 = values[key];
|
|
85078
|
+
if (typeof raw2 !== "string") continue;
|
|
85079
|
+
const trimmed = raw2.trim().slice(0, FORM_RESCUE_MAX_VALUE_CHARS);
|
|
85034
85080
|
if (trimmed) out[key] = trimmed;
|
|
85035
85081
|
}
|
|
85036
85082
|
return out;
|
|
@@ -85318,11 +85364,15 @@ function formatMarkdownLink({ text, url, rel }) {
|
|
|
85318
85364
|
function stripInlineMarkdown(s) {
|
|
85319
85365
|
return s.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/`([^`]+)`/g, "$1");
|
|
85320
85366
|
}
|
|
85321
|
-
var toHtmlTree = remark.remark().use(remarkGfm__default.default).use(remarkBreaks__default.default).use(remarkRehype__default.default, { allowDangerousHtml: true }).use(rehypeRaw__default.default);
|
|
85322
85367
|
var NOT_PROSE = /* @__PURE__ */ new Set(["pre", "img"]);
|
|
85323
85368
|
var TABLE_SECTIONS = /* @__PURE__ */ new Set(["thead", "tbody", "tfoot"]);
|
|
85369
|
+
function htmlTree(markdown) {
|
|
85370
|
+
const mdast = mdastUtilFromMarkdown.fromMarkdown(markdown, { extensions: [micromarkExtensionGfm.gfm()], mdastExtensions: [mdastUtilGfm.gfmFromMarkdown()] });
|
|
85371
|
+
mdastUtilNewlineToBreak.newlineToBreak(mdast);
|
|
85372
|
+
return hastUtilRaw.raw(mdastUtilToHast.toHast(mdast, { allowDangerousHtml: true }));
|
|
85373
|
+
}
|
|
85324
85374
|
function proseTree(markdown) {
|
|
85325
|
-
const tree =
|
|
85375
|
+
const tree = htmlTree(markdown);
|
|
85326
85376
|
unistUtilVisit.visit(tree, "element", (node, index, parent) => {
|
|
85327
85377
|
if (NOT_PROSE.has(node.tagName) && parent && index !== void 0) {
|
|
85328
85378
|
parent.children.splice(index, 1);
|
|
@@ -85627,12 +85677,12 @@ async function fileContentKey(file) {
|
|
|
85627
85677
|
}
|
|
85628
85678
|
|
|
85629
85679
|
// src/utils/search-params.ts
|
|
85630
|
-
function positiveInt(
|
|
85680
|
+
function positiveInt(raw2, fallback, { min = 1, max } = {}) {
|
|
85631
85681
|
const capped = (v) => max == null ? v : Math.min(v, max);
|
|
85632
|
-
if (
|
|
85682
|
+
if (raw2 === null || raw2 === void 0 || raw2 === "") {
|
|
85633
85683
|
return typeof fallback === "number" ? capped(fallback) : fallback;
|
|
85634
85684
|
}
|
|
85635
|
-
const n = Math.trunc(Number(
|
|
85685
|
+
const n = Math.trunc(Number(raw2));
|
|
85636
85686
|
if (!Number.isFinite(n) || n < min) {
|
|
85637
85687
|
return typeof fallback === "number" ? capped(fallback) : fallback;
|
|
85638
85688
|
}
|
|
@@ -85660,32 +85710,32 @@ function firstParamValue(input, key) {
|
|
|
85660
85710
|
}
|
|
85661
85711
|
function allParamValues(input, key) {
|
|
85662
85712
|
if (!input) return [];
|
|
85663
|
-
const
|
|
85664
|
-
const list = Array.isArray(
|
|
85713
|
+
const raw2 = input instanceof URLSearchParams ? input.getAll(key) : input[key];
|
|
85714
|
+
const list = Array.isArray(raw2) ? raw2 : raw2 === void 0 ? [] : [raw2];
|
|
85665
85715
|
if (list.length === 1 && list[0]?.includes(",")) return list[0].split(",").filter(Boolean);
|
|
85666
85716
|
return list.filter((v) => v !== void 0 && v !== "");
|
|
85667
85717
|
}
|
|
85668
|
-
function coerceScalar(
|
|
85669
|
-
if (
|
|
85718
|
+
function coerceScalar(raw2, config) {
|
|
85719
|
+
if (raw2 === void 0 || raw2 === "") return void 0;
|
|
85670
85720
|
switch (config.type) {
|
|
85671
85721
|
case "int": {
|
|
85672
85722
|
const int = config;
|
|
85673
|
-
return positiveInt(
|
|
85723
|
+
return positiveInt(raw2, int.default, { min: int.min, max: int.max });
|
|
85674
85724
|
}
|
|
85675
85725
|
case "number": {
|
|
85676
|
-
const n = Number(
|
|
85726
|
+
const n = Number(raw2);
|
|
85677
85727
|
return Number.isFinite(n) ? n : void 0;
|
|
85678
85728
|
}
|
|
85679
85729
|
case "boolean":
|
|
85680
|
-
return
|
|
85730
|
+
return raw2 === "true" || raw2 === "1";
|
|
85681
85731
|
case "object":
|
|
85682
85732
|
try {
|
|
85683
|
-
return JSON.parse(
|
|
85733
|
+
return JSON.parse(raw2);
|
|
85684
85734
|
} catch {
|
|
85685
85735
|
return void 0;
|
|
85686
85736
|
}
|
|
85687
85737
|
default:
|
|
85688
|
-
return
|
|
85738
|
+
return raw2;
|
|
85689
85739
|
}
|
|
85690
85740
|
}
|
|
85691
85741
|
function parseSchemaParams(schema, input, options) {
|
|
@@ -86082,7 +86132,6 @@ exports.ODS_SPACING_TOKENS = ODS_SPACING_TOKENS;
|
|
|
86082
86132
|
exports.ODS_SPACING_TOKEN_PATTERN = ODS_SPACING_TOKEN_PATTERN;
|
|
86083
86133
|
exports.ODS_STEM_CLASSES = ODS_STEM_CLASSES;
|
|
86084
86134
|
exports.ODS_STEM_TOKENS = ODS_STEM_TOKENS;
|
|
86085
|
-
exports.OPENFRAME_CLASSIFICATIONS = OPENFRAME_CLASSIFICATIONS;
|
|
86086
86135
|
exports.OPENFRAME_DEV_SECTIONS = OPENFRAME_DEV_SECTIONS;
|
|
86087
86136
|
exports.OS_PLATFORMS = OS_PLATFORMS;
|
|
86088
86137
|
exports.PAGE_PARAM_LIMITS = PAGE_PARAM_LIMITS;
|
|
@@ -86108,7 +86157,7 @@ exports.TICKET_OPEN_PARAM = TICKET_OPEN_PARAM;
|
|
|
86108
86157
|
exports.TICKET_STATUS_OPTIONS = TICKET_STATUS_OPTIONS;
|
|
86109
86158
|
exports.TOKEN_RATE_EMPTY = TOKEN_RATE_EMPTY;
|
|
86110
86159
|
exports.TRIAL_TERMS = TRIAL_TERMS;
|
|
86111
|
-
exports.
|
|
86160
|
+
exports.VENDOR_CLASSIFICATION_COPY = VENDOR_CLASSIFICATION_COPY;
|
|
86112
86161
|
exports.VIEWER_TIMEZONE = VIEWER_TIMEZONE;
|
|
86113
86162
|
exports.WALKTHROUGH_OPEN_QUERY_PARAM = WALKTHROUGH_OPEN_QUERY_PARAM;
|
|
86114
86163
|
exports.WALKTHROUGH_VIDEO_DISMISS_KEY = WALKTHROUGH_VIDEO_DISMISS_KEY;
|
|
@@ -86143,6 +86192,7 @@ exports.clearLegacyAnnouncementCache = clearLegacyAnnouncementCache;
|
|
|
86143
86192
|
exports.clearWalkthroughDismissal = clearWalkthroughDismissal;
|
|
86144
86193
|
exports.clickupTaskUrl = clickupTaskUrl;
|
|
86145
86194
|
exports.cn = cn;
|
|
86195
|
+
exports.compareVendorClassifications = compareVendorClassifications;
|
|
86146
86196
|
exports.complianceStandardForName = complianceStandardForName;
|
|
86147
86197
|
exports.consumeAccessCode = consumeAccessCode;
|
|
86148
86198
|
exports.copyrightLine = copyrightLine;
|
|
@@ -86350,7 +86400,6 @@ exports.isValidEmailDomain = isValidEmailDomain;
|
|
|
86350
86400
|
exports.isValidPathPattern = isValidPathPattern;
|
|
86351
86401
|
exports.isValidSchedulingSlug = isValidSchedulingSlug;
|
|
86352
86402
|
exports.isValidToolType = isValidToolType;
|
|
86353
|
-
exports.isVendorClassification = isVendorClassification;
|
|
86354
86403
|
exports.isVideoMedia = isVideoMedia;
|
|
86355
86404
|
exports.isWalkthroughDismissed = isWalkthroughDismissed;
|
|
86356
86405
|
exports.isWithinMinutes = isWithinMinutes;
|
|
@@ -86472,6 +86521,8 @@ exports.validateAndConsumeAccessCode = validateAndConsumeAccessCode;
|
|
|
86472
86521
|
exports.validateEmailDomain = validateEmailDomain;
|
|
86473
86522
|
exports.validateEmailDomainList = validateEmailDomainList;
|
|
86474
86523
|
exports.validatePhoneNumber = validatePhoneNumber;
|
|
86524
|
+
exports.vendorClassificationCopy = vendorClassificationCopy;
|
|
86525
|
+
exports.vendorClassificationGroup = vendorClassificationGroup;
|
|
86475
86526
|
exports.walkthroughDismissCookieName = walkthroughDismissCookieName;
|
|
86476
86527
|
exports.webinarTiming = webinarTiming;
|
|
86477
86528
|
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,E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;AAKlC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AAIvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAG1C,cAAc,cAAc,CAAC;AAK7B,cAAc,qBAAqB,CAAC;AAEpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAE9B,cAAc,OAAO,CAAC;AAEtB,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMhH,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGjG,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,cAAc,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-to-plain.d.ts","sourceRoot":"","sources":["../../src/utils/markdown-to-plain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-to-plain.d.ts","sourceRoot":"","sources":["../../src/utils/markdown-to-plain.ts"],"names":[],"mappings":"AAiCA,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;gFAEgF;AAChF,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMrD;AAyCD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,MAAM,CAmBlG"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
+
import { raw } from "hast-util-raw";
|
|
1
2
|
import { toText } from "hast-util-to-text";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
4
|
+
import { gfmFromMarkdown } from "mdast-util-gfm";
|
|
5
|
+
import { newlineToBreak } from "mdast-util-newline-to-break";
|
|
6
|
+
import { toHast } from "mdast-util-to-hast";
|
|
7
|
+
import { gfm } from "micromark-extension-gfm";
|
|
7
8
|
import { SKIP, visit } from "unist-util-visit";
|
|
8
9
|
function stripInlineMarkdown(s) {
|
|
9
10
|
return s.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/`([^`]+)`/g, "$1");
|
|
10
11
|
}
|
|
11
|
-
const toHtmlTree = remark().use(remarkGfm).use(remarkBreaks).use(remarkRehype, { allowDangerousHtml: true }).use(rehypeRaw);
|
|
12
12
|
const NOT_PROSE = /* @__PURE__ */ new Set(["pre", "img"]);
|
|
13
13
|
const TABLE_SECTIONS = /* @__PURE__ */ new Set(["thead", "tbody", "tfoot"]);
|
|
14
|
+
function htmlTree(markdown) {
|
|
15
|
+
const mdast = fromMarkdown(markdown, { extensions: [gfm()], mdastExtensions: [gfmFromMarkdown()] });
|
|
16
|
+
newlineToBreak(mdast);
|
|
17
|
+
return raw(toHast(mdast, { allowDangerousHtml: true }));
|
|
18
|
+
}
|
|
14
19
|
function proseTree(markdown) {
|
|
15
|
-
const tree =
|
|
20
|
+
const tree = htmlTree(markdown);
|
|
16
21
|
visit(tree, "element", (node, index, parent) => {
|
|
17
22
|
if (NOT_PROSE.has(node.tagName) && parent && index !== void 0) {
|
|
18
23
|
parent.children.splice(index, 1);
|
|
@@ -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"}
|