@flamingo-stack/openframe-frontend-core 0.0.797 → 0.0.799
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-VFCPLZFY.cjs → chunk-247LDSQE.cjs} +61 -61
- package/dist/{chunk-UKLSEI7S.cjs → chunk-2KEBGXA4.cjs} +4 -4
- package/dist/{chunk-GAFNJDZV.cjs → chunk-3MRK7X6Z.cjs} +3 -3
- package/dist/{chunk-7GFKJGWH.cjs → chunk-4RK62AMV.cjs} +68 -68
- package/dist/{chunk-PBL66EVT.cjs → chunk-6CB3AXZM.cjs} +30 -30
- package/dist/{chunk-BUCCV72E.cjs → chunk-6EDOASF4.cjs} +11 -11
- package/dist/{chunk-NBUHCGGG.cjs → chunk-AVAE5B2A.cjs} +2 -2
- package/dist/{chunk-YHCC3BLP.cjs → chunk-B3X4J4HQ.cjs} +14 -14
- package/dist/{chunk-ZPTHTGHK.cjs → chunk-BSBCZIPQ.cjs} +39 -39
- package/dist/{chunk-CO6FB4DR.cjs → chunk-CS2KLF4O.cjs} +13 -13
- package/dist/{chunk-FFEE2ON2.cjs → chunk-DBRXZC2I.cjs} +139 -129
- package/dist/{chunk-5CEXT3V7.cjs → chunk-FDDM5Z52.cjs} +2 -2
- package/dist/{chunk-QKXXHOOD.cjs → chunk-FIKIPO4F.cjs} +13 -0
- package/dist/{chunk-3H3CQ7BQ.cjs → chunk-GRNTIKPD.cjs} +54 -44
- package/dist/{chunk-LAJNO2EW.cjs → chunk-HB7FVY46.cjs} +32 -32
- package/dist/{chunk-RD57WBJK.cjs → chunk-IJGIWG6G.cjs} +4 -4
- package/dist/{chunk-OZUUCVDZ.cjs → chunk-O6KQ64RI.cjs} +2 -2
- package/dist/{chunk-KWINW3FC.cjs → chunk-PO5IIN4S.cjs} +11 -11
- package/dist/{chunk-YMWK7GOC.cjs → chunk-PPORXZI7.cjs} +139 -119
- package/dist/{chunk-IS77JFF6.cjs → chunk-SDV335EO.cjs} +4 -4
- package/dist/{chunk-7MLK7BGF.cjs → chunk-T5OCU3EL.cjs} +4 -4
- package/dist/{chunk-4M5JIVAH.cjs → chunk-TETW5NR4.cjs} +3 -3
- package/dist/{chunk-CHF6PHOR.cjs → chunk-UFCKY7OL.cjs} +16 -16
- package/dist/{chunk-7AMU2ZD2.cjs → chunk-XJD7IZR2.cjs} +48 -48
- package/dist/{chunk-NX4QOEPJ.cjs → chunk-ZOK4OWMJ.cjs} +2 -2
- package/dist/{cloud-tenants-THCY3N2P.cjs → cloud-tenants-BQAVRN44.cjs} +6 -6
- package/dist/components/case-studies/index.cjs +20 -20
- package/dist/components/chat/entity-cards/roadmap-card.d.ts +5 -0
- package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/roadmap-card.js +16 -1
- package/dist/components/chat/index.cjs +5 -5
- package/dist/components/chat/types/entities/roadmap-item.d.ts +8 -0
- package/dist/components/chat/types/entities/roadmap-item.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +7 -7
- package/dist/components/docs/index.cjs +10 -10
- package/dist/components/embeds/index.cjs +7 -7
- package/dist/components/faq/index.cjs +8 -8
- package/dist/components/features/index.cjs +6 -6
- package/dist/components/help-center-pages/index.cjs +82 -82
- package/dist/components/index.cjs +52 -52
- package/dist/components/loading/loading-fallback.d.ts +27 -3
- package/dist/components/loading/loading-fallback.d.ts.map +1 -1
- package/dist/components/loading/loading-fallback.js +17 -9
- package/dist/components/meeting-scheduler/index.cjs +38 -38
- package/dist/components/navigation/index.cjs +9 -9
- package/dist/components/onboarding-guides/index.cjs +9 -9
- package/dist/components/product-demo/index.cjs +15 -15
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/tickets/index.cjs +13 -13
- package/dist/components/ui/feature-card.d.ts +1 -1
- package/dist/components/ui/feature-card.d.ts.map +1 -1
- package/dist/components/ui/feature-card.js +1 -0
- package/dist/components/ui/index.cjs +6 -6
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +9 -1
- package/dist/components/ui/markdown-editor.d.ts.map +1 -1
- package/dist/components/ui/trendline.d.ts +1 -1
- package/dist/components/ui/trendline.d.ts.map +1 -1
- package/dist/components/ui/trendline.js +11 -2
- package/dist/{devices-N4EF5QDS.cjs → devices-KDT5ZGSG.cjs} +7 -7
- package/dist/{embeddable-chat-7Z2OQK3X.cjs → embeddable-chat-ODKTSW3C.cjs} +62 -62
- package/dist/index.cjs +12 -10
- package/dist/{knowledge-TL4DSXYQ.cjs → knowledge-4NLP77HP.cjs} +7 -7
- package/dist/loading-standard/engine.d.mts +22 -4
- package/dist/loading-standard/engine.d.mts.map +1 -1
- package/dist/loading-standard/rule-examples.d.mts.map +1 -1
- package/dist/{logs-4VRUBGKE.cjs → logs-U6VMTY4N.cjs} +14 -14
- package/dist/{policies-TLNVCQGG.cjs → policies-TBLFBRFM.cjs} +10 -10
- package/dist/{scripts-4LFWHIMH.cjs → scripts-ZMNJWX7I.cjs} +11 -11
- package/dist/{software-update-J4ZXQABW.cjs → software-update-Q5AEQ4A4.cjs} +9 -9
- package/dist/utils/clickup-drop-down.cjs +22 -0
- package/dist/utils/clickup-drop-down.d.ts +26 -0
- package/dist/utils/clickup-drop-down.d.ts.map +1 -0
- package/dist/utils/clickup-drop-down.js +20 -0
- package/dist/utils/index.cjs +20 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +7 -1
- package/src/components/chat/entity-cards/roadmap-card.tsx +18 -1
- package/src/components/chat/types/entities/roadmap-item.ts +8 -0
- package/src/components/loading/loading-fallback.tsx +52 -12
- package/src/components/ui/feature-card.tsx +2 -1
- package/src/components/ui/index.ts +13 -1
- package/src/components/ui/markdown-editor.tsx +1 -0
- package/src/components/ui/trendline.tsx +27 -10
- package/src/loading-standard/engine.mjs +170 -14
- package/src/loading-standard/rule-examples.mjs +50 -0
- package/src/utils/clickup-drop-down.ts +41 -0
- package/src/utils/index.ts +1 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a ClickUp drop-down custom field off a task (pure, server-safe).
|
|
3
|
+
*
|
|
4
|
+
* ClickUp sends a task's custom fields with each field's options as they are now: a drop-down's `value` is the chosen
|
|
5
|
+
* option's POSITION (`orderindex`), and newer answers may send the option's id. The option's id is stable; its name
|
|
6
|
+
* changes when the field's owner renames it (the Team field's "Design" became "Product"), so a reader resolves the
|
|
7
|
+
* chosen option's id first and its name from the field's own options.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export interface ClickUpDropDownOption {
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
orderindex?: number | string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ClickUpCustomFieldValue {
|
|
17
|
+
id?: string;
|
|
18
|
+
value?: unknown;
|
|
19
|
+
type_config?: { options?: ClickUpDropDownOption[] };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function optionsOf(field: ClickUpCustomFieldValue | undefined): ClickUpDropDownOption[] {
|
|
23
|
+
return Array.isArray(field?.type_config?.options) ? field.type_config.options : [];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function fieldOf(fields: unknown, fieldId: string): ClickUpCustomFieldValue | undefined {
|
|
27
|
+
return Array.isArray(fields) ? (fields as ClickUpCustomFieldValue[]).find(f => f?.id === fieldId) : undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** The chosen option of a drop-down field, or null when the task has no value (or one its options do not hold). */
|
|
31
|
+
export function clickUpDropDownOption(fields: unknown, fieldId: string): { id: string; name: string | null } | null {
|
|
32
|
+
const field = fieldOf(fields, fieldId);
|
|
33
|
+
const value = field?.value;
|
|
34
|
+
if (value === null || value === undefined || value === '') return null;
|
|
35
|
+
const options = optionsOf(field);
|
|
36
|
+
const byId = typeof value === 'string' ? options.find(o => o.id === value) : undefined;
|
|
37
|
+
const position = Number(value);
|
|
38
|
+
const option = byId ?? (Number.isFinite(position) ? options.find(o => Number(o.orderindex) === position) : undefined);
|
|
39
|
+
if (!option?.id) return null;
|
|
40
|
+
return { id: option.id, name: option.name?.trim() || null };
|
|
41
|
+
}
|
package/src/utils/index.ts
CHANGED
|
@@ -71,6 +71,7 @@ export { SEO_DESCRIPTION_MAX_LENGTH } from './seo-description';
|
|
|
71
71
|
// consumers (e.g. company-hub deck) don't ship their own copies of the marks.
|
|
72
72
|
export * from './brand-marks';
|
|
73
73
|
export * from './design-doc-readiness';
|
|
74
|
+
export * from './clickup-drop-down';
|
|
74
75
|
export * from './platform-config';
|
|
75
76
|
export * from './os-platforms';
|
|
76
77
|
export * from './access-code-client';
|