@flamingo-stack/openframe-frontend-core 0.0.655 → 0.0.656-snapshot.20260922190407
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/{chunk-NJ4FE2W4.js → chunk-43UWVVPF.js} +5 -5
- package/dist/{chunk-SZDQIWTC.js → chunk-45UD5DWC.js} +3 -3
- package/dist/{chunk-243ZVXD3.js → chunk-64AZNJIZ.js} +2 -2
- package/dist/{chunk-XQAK6446.cjs → chunk-73G2JJZQ.cjs} +5 -5
- package/dist/{chunk-XQAK6446.cjs.map → chunk-73G2JJZQ.cjs.map} +1 -1
- package/dist/{chunk-DLCBFLIZ.js → chunk-ATVY6VKT.js} +11 -9
- package/dist/{chunk-DLCBFLIZ.js.map → chunk-ATVY6VKT.js.map} +1 -1
- package/dist/{chunk-R5RQYUQB.js → chunk-AYVTBCYB.js} +6 -6
- package/dist/{chunk-R5RQYUQB.js.map → chunk-AYVTBCYB.js.map} +1 -1
- package/dist/{chunk-KDAYNS3T.cjs → chunk-BACI3M4T.cjs} +15 -15
- package/dist/{chunk-KDAYNS3T.cjs.map → chunk-BACI3M4T.cjs.map} +1 -1
- package/dist/{chunk-GSN5PBPH.js → chunk-BLXMHTEO.js} +7 -7
- package/dist/{chunk-WQJQ734M.js → chunk-EA7W7OJZ.js} +2 -2
- package/dist/{chunk-WQJQ734M.js.map → chunk-EA7W7OJZ.js.map} +1 -1
- package/dist/{chunk-6AGN252G.cjs → chunk-FXVAUABF.cjs} +213 -211
- package/dist/chunk-FXVAUABF.cjs.map +1 -0
- package/dist/{chunk-DFI66ZIP.cjs → chunk-H4EVZRNR.cjs} +12 -12
- package/dist/{chunk-DFI66ZIP.cjs.map → chunk-H4EVZRNR.cjs.map} +1 -1
- package/dist/{chunk-6F3OIQ5G.js → chunk-HCCX6DMN.js} +6 -6
- package/dist/{chunk-5VO6GXC4.js → chunk-IXD25DBI.js} +5 -5
- package/dist/{chunk-FD3AKSPK.js → chunk-KIRDULVH.js} +3 -3
- package/dist/{chunk-H5DPPRPE.cjs → chunk-L6OYSRJT.cjs} +2 -2
- package/dist/{chunk-H5DPPRPE.cjs.map → chunk-L6OYSRJT.cjs.map} +1 -1
- package/dist/{chunk-WQOKYBZ3.js → chunk-LACNKEJO.js} +6 -6
- package/dist/{chunk-5AB3WBRE.js → chunk-LMJ47EPZ.js} +3 -3
- package/dist/{chunk-2NYIXH5Z.cjs → chunk-NLGTHKU3.cjs} +81 -81
- package/dist/{chunk-2NYIXH5Z.cjs.map → chunk-NLGTHKU3.cjs.map} +1 -1
- package/dist/{chunk-TMSJ2ZLN.cjs → chunk-OYLAWIUG.cjs} +59 -59
- package/dist/{chunk-TMSJ2ZLN.cjs.map → chunk-OYLAWIUG.cjs.map} +1 -1
- package/dist/{chunk-N65FRY67.js → chunk-PDMIYWKB.js} +3 -3
- package/dist/{chunk-5DQMNA6J.cjs → chunk-PEK6JBTK.cjs} +154 -154
- package/dist/{chunk-5DQMNA6J.cjs.map → chunk-PEK6JBTK.cjs.map} +1 -1
- package/dist/{chunk-XF5JOZJ2.cjs → chunk-PPQLBZ5X.cjs} +20 -20
- package/dist/{chunk-XF5JOZJ2.cjs.map → chunk-PPQLBZ5X.cjs.map} +1 -1
- package/dist/{chunk-IL7YVDTC.cjs → chunk-QQ72MAPB.cjs} +3 -3
- package/dist/{chunk-IL7YVDTC.cjs.map → chunk-QQ72MAPB.cjs.map} +1 -1
- package/dist/{chunk-E2TOBCK5.cjs → chunk-RNXQGKU3.cjs} +10 -10
- package/dist/{chunk-E2TOBCK5.cjs.map → chunk-RNXQGKU3.cjs.map} +1 -1
- package/dist/{chunk-KH37MORY.cjs → chunk-UQBOEQOK.cjs} +7 -7
- package/dist/{chunk-KH37MORY.cjs.map → chunk-UQBOEQOK.cjs.map} +1 -1
- package/dist/{chunk-SFVK5HWQ.cjs → chunk-WA7ZDMVF.cjs} +32 -32
- package/dist/{chunk-SFVK5HWQ.cjs.map → chunk-WA7ZDMVF.cjs.map} +1 -1
- package/dist/{chunk-XPRKHVBK.js → chunk-WL4QOUQN.js} +2 -2
- package/dist/{chunk-G7EIE3QC.js → chunk-WQ7GXPTR.js} +4 -4
- package/dist/{chunk-T7SXSES7.js → chunk-WWXQ7WUE.js} +3 -3
- package/dist/{chunk-TOKA3R7Q.js → chunk-XC4UQ4QP.js} +4 -4
- package/dist/{chunk-LI6JU6MI.cjs → chunk-XGOQZJ7O.cjs} +6 -6
- package/dist/{chunk-LI6JU6MI.cjs.map → chunk-XGOQZJ7O.cjs.map} +1 -1
- package/dist/{chunk-CCHTPV6X.cjs → chunk-XX6Z63VU.cjs} +28 -28
- package/dist/{chunk-CCHTPV6X.cjs.map → chunk-XX6Z63VU.cjs.map} +1 -1
- package/dist/{chunk-VS4IICOE.cjs → chunk-Y3Z2EO4C.cjs} +22 -22
- package/dist/{chunk-VS4IICOE.cjs.map → chunk-Y3Z2EO4C.cjs.map} +1 -1
- package/dist/{chunk-VPGW7KSI.cjs → chunk-YPNLR6L2.cjs} +33 -33
- package/dist/{chunk-VPGW7KSI.cjs.map → chunk-YPNLR6L2.cjs.map} +1 -1
- package/dist/{chunk-2CXJQG2X.js → chunk-ZHR5RWCF.js} +3 -3
- package/dist/{chunk-UVRXJHSQ.cjs → chunk-ZKS4OMO4.cjs} +29 -29
- package/dist/{chunk-UVRXJHSQ.cjs.map → chunk-ZKS4OMO4.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/filters-dropdown.d.ts.map +1 -1
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +54 -54
- package/dist/components/index.js +15 -15
- package/dist/components/meeting-scheduler/index.cjs +40 -40
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/index.js +3 -3
- package/dist/index.cjs +9 -9
- package/dist/index.js +7 -7
- package/dist/utils/index.cjs +4 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +1 -1
- package/src/components/features/__tests__/filters-dropdown-placement.test.tsx +88 -0
- package/src/components/features/filters-dropdown.tsx +15 -6
- package/src/utils/__tests__/list-url.test.ts +1 -1
- package/src/utils/list-url.ts +1 -1
- package/src/utils/source-icons.ts +3 -3
- package/dist/chunk-6AGN252G.cjs.map +0 -1
- /package/dist/{chunk-NJ4FE2W4.js.map → chunk-43UWVVPF.js.map} +0 -0
- /package/dist/{chunk-SZDQIWTC.js.map → chunk-45UD5DWC.js.map} +0 -0
- /package/dist/{chunk-243ZVXD3.js.map → chunk-64AZNJIZ.js.map} +0 -0
- /package/dist/{chunk-GSN5PBPH.js.map → chunk-BLXMHTEO.js.map} +0 -0
- /package/dist/{chunk-6F3OIQ5G.js.map → chunk-HCCX6DMN.js.map} +0 -0
- /package/dist/{chunk-5VO6GXC4.js.map → chunk-IXD25DBI.js.map} +0 -0
- /package/dist/{chunk-FD3AKSPK.js.map → chunk-KIRDULVH.js.map} +0 -0
- /package/dist/{chunk-WQOKYBZ3.js.map → chunk-LACNKEJO.js.map} +0 -0
- /package/dist/{chunk-5AB3WBRE.js.map → chunk-LMJ47EPZ.js.map} +0 -0
- /package/dist/{chunk-N65FRY67.js.map → chunk-PDMIYWKB.js.map} +0 -0
- /package/dist/{chunk-XPRKHVBK.js.map → chunk-WL4QOUQN.js.map} +0 -0
- /package/dist/{chunk-G7EIE3QC.js.map → chunk-WQ7GXPTR.js.map} +0 -0
- /package/dist/{chunk-T7SXSES7.js.map → chunk-WWXQ7WUE.js.map} +0 -0
- /package/dist/{chunk-TOKA3R7Q.js.map → chunk-XC4UQ4QP.js.map} +0 -0
- /package/dist/{chunk-2CXJQG2X.js.map → chunk-ZHR5RWCF.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1355,7 +1355,7 @@ const REF_GLYPH_CARD_CONFIGS: Record<string, GlyphCardConfig> = {
|
|
|
1355
1355
|
// held to, the repositories themselves, and one row per deployment
|
|
1356
1356
|
// environment. Glyph cards like their siblings — none of the three has a
|
|
1357
1357
|
// cover image, and a rule is read in the admin screen it links to.
|
|
1358
|
-
code_rule: { label: '
|
|
1358
|
+
code_rule: { label: 'Code rule', icon: () => <BracketCurlyCheckIcon size={24} /> },
|
|
1359
1359
|
code_repo: { label: 'Repository', icon: () => <CodingBranchIcon size={24} /> },
|
|
1360
1360
|
code_deployment: { label: 'Deployment', icon: () => <PackageIcon size={24} /> },
|
|
1361
1361
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pins where the panel hangs when the trigger is as wide as its column — a
|
|
3
|
+
* table's filter header is `w-full` of a `flex-1` cell. The auto-placement once
|
|
4
|
+
* measured the room past the trigger's FAR edge, so a wide trigger near the
|
|
5
|
+
* row's end flipped `bottom-start` to `bottom-end` and the panel landed at the
|
|
6
|
+
* far right, away from the label it belongs to. What has to fit is the panel's
|
|
7
|
+
* own width from the edge it hangs off.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
11
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
12
|
+
import { type FilterSection, FiltersDropdown } from '../filters-dropdown';
|
|
13
|
+
|
|
14
|
+
const SECTIONS: FilterSection[] = [
|
|
15
|
+
{
|
|
16
|
+
id: 'status',
|
|
17
|
+
title: 'Software Version',
|
|
18
|
+
type: 'checkbox',
|
|
19
|
+
options: [{ id: 'outdated', label: 'Outdated', value: 'outdated' }],
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const VIEWPORT_WIDTH = 1900;
|
|
24
|
+
|
|
25
|
+
function mockTriggerRect(left: number, right: number) {
|
|
26
|
+
vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({
|
|
27
|
+
left,
|
|
28
|
+
right,
|
|
29
|
+
top: 0,
|
|
30
|
+
bottom: 48,
|
|
31
|
+
width: right - left,
|
|
32
|
+
height: 48,
|
|
33
|
+
x: left,
|
|
34
|
+
y: 0,
|
|
35
|
+
toJSON: () => ({}),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function openAndReadPanel(placement: 'bottom-start' | 'bottom-end') {
|
|
40
|
+
render(
|
|
41
|
+
<FiltersDropdown
|
|
42
|
+
triggerElement={<div className="w-full">Software Version</div>}
|
|
43
|
+
sections={SECTIONS}
|
|
44
|
+
onApply={() => {}}
|
|
45
|
+
placement={placement}
|
|
46
|
+
className="!block w-full"
|
|
47
|
+
/>,
|
|
48
|
+
);
|
|
49
|
+
fireEvent.click(screen.getByText('Software Version'));
|
|
50
|
+
// Apply sits in the panel's own tree; the panel is the closest absolutely
|
|
51
|
+
// positioned element, which is where the placement class lands.
|
|
52
|
+
const panel = screen.getByRole('button', { name: 'Apply' }).closest('.absolute');
|
|
53
|
+
if (!panel) throw new Error('the panel did not open');
|
|
54
|
+
return panel;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
describe('FiltersDropdown auto-placement', () => {
|
|
58
|
+
beforeEach(() => {
|
|
59
|
+
Object.defineProperty(window, 'innerWidth', { value: VIEWPORT_WIDTH, configurable: true, writable: true });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
afterEach(() => {
|
|
63
|
+
vi.restoreAllMocks();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('keeps bottom-start under a column-wide trigger whose far edge is near the viewport edge', () => {
|
|
67
|
+
// The trigger spans 900–1800 of 1900: 100px past its right edge, but the
|
|
68
|
+
// panel hangs off its LEFT edge, where there is 1000px.
|
|
69
|
+
mockTriggerRect(900, 1800);
|
|
70
|
+
const panel = openAndReadPanel('bottom-start');
|
|
71
|
+
expect(panel.classList.contains('left-0')).toBe(true);
|
|
72
|
+
expect(panel.classList.contains('right-0')).toBe(false);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('flips bottom-start to bottom-end only when the panel would not fit from the left edge', () => {
|
|
76
|
+
// 1700 + 320 overshoots 1900; from the right edge it fits.
|
|
77
|
+
mockTriggerRect(1700, 1800);
|
|
78
|
+
const panel = openAndReadPanel('bottom-start');
|
|
79
|
+
expect(panel.classList.contains('right-0')).toBe(true);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('flips bottom-end to bottom-start only when the panel would not fit from the right edge', () => {
|
|
83
|
+
// 100 − 320 falls off the left; from the left edge it fits.
|
|
84
|
+
mockTriggerRect(20, 100);
|
|
85
|
+
const panel = openAndReadPanel('bottom-end');
|
|
86
|
+
expect(panel.classList.contains('left-0')).toBe(true);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
@@ -178,17 +178,26 @@ export const FiltersDropdown: FC<FiltersDropdownProps> = ({
|
|
|
178
178
|
const dropdownWidth = 320; // Fixed width from the dropdown
|
|
179
179
|
const viewportWidth = window.innerWidth;
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
// The panel hangs off ONE edge of the trigger — its left for `bottom-start`,
|
|
182
|
+
// its right for `bottom-end` — so what has to fit is the panel's own width
|
|
183
|
+
// from that edge, not the room beyond the trigger's far side. A trigger as
|
|
184
|
+
// wide as its column (a table's filter header, `w-full` of a `flex-1`
|
|
185
|
+
// cell) would otherwise report no room past its right edge while the
|
|
186
|
+
// panel, hung from its left, has the whole column to itself — and flip to
|
|
187
|
+
// the far end of the row, away from the label it belongs to.
|
|
188
|
+
const fitsFromLeft = triggerRect.left + dropdownWidth <= viewportWidth;
|
|
189
|
+
const fitsFromRight = triggerRect.right - dropdownWidth >= 0;
|
|
190
|
+
const center = (triggerRect.left + triggerRect.right) / 2;
|
|
191
|
+
const fitsCentered = center - dropdownWidth / 2 >= 0 && center + dropdownWidth / 2 <= viewportWidth;
|
|
183
192
|
|
|
184
193
|
let optimalPlacement = placement;
|
|
185
194
|
|
|
186
|
-
if (placement === 'bottom-start' &&
|
|
195
|
+
if (placement === 'bottom-start' && !fitsFromLeft && fitsFromRight) {
|
|
187
196
|
optimalPlacement = 'bottom-end';
|
|
188
|
-
} else if (placement === 'bottom-end' &&
|
|
197
|
+
} else if (placement === 'bottom-end' && !fitsFromRight && fitsFromLeft) {
|
|
189
198
|
optimalPlacement = 'bottom-start';
|
|
190
|
-
} else if (placement === 'bottom' &&
|
|
191
|
-
optimalPlacement =
|
|
199
|
+
} else if (placement === 'bottom' && !fitsCentered) {
|
|
200
|
+
optimalPlacement = !fitsFromLeft && fitsFromRight ? 'bottom-end' : 'bottom-start';
|
|
192
201
|
}
|
|
193
202
|
|
|
194
203
|
setActualPlacement(optimalPlacement);
|
|
@@ -58,7 +58,7 @@ const BASELINE: Record<string, string> = {
|
|
|
58
58
|
prospect_call: '/api/prospect-calls?ids=a,b',
|
|
59
59
|
// 2026-09: code intelligence — the review rules and the code graph as chat
|
|
60
60
|
// sources on product-hub.
|
|
61
|
-
code_rule: '/api/code-
|
|
61
|
+
code_rule: '/api/code-rules/cards?ids=a,b',
|
|
62
62
|
code_repo: '/api/code-graph/repos?ids=a,b',
|
|
63
63
|
code_deployment: '/api/code-graph/deployments?ids=a,b',
|
|
64
64
|
};
|
package/src/utils/list-url.ts
CHANGED
|
@@ -116,7 +116,7 @@ const BUILDERS: Record<string, (ids: string[], base: string) => string> = {
|
|
|
116
116
|
prospect_call: (ids, b) => `${b}/api/prospect-calls?ids=${ids.join(',')}`,
|
|
117
117
|
// Code intelligence — per-object card hydration, same `handleEntityCardList`
|
|
118
118
|
// shape as the internal objects above.
|
|
119
|
-
code_rule: (ids, b) => `${b}/api/code-
|
|
119
|
+
code_rule: (ids, b) => `${b}/api/code-rules/cards?ids=${ids.join(',')}`,
|
|
120
120
|
code_repo: (ids, b) => `${b}/api/code-graph/repos?ids=${ids.join(',')}`,
|
|
121
121
|
code_deployment: (ids, b) => `${b}/api/code-graph/deployments?ids=${ids.join(',')}`,
|
|
122
122
|
};
|
|
@@ -81,7 +81,7 @@ export const SOURCE_ICON_NAMES: Record<string, string> = {
|
|
|
81
81
|
'prospect-calls': 'phone',
|
|
82
82
|
|
|
83
83
|
// Code intelligence
|
|
84
|
-
'code-
|
|
84
|
+
'code-rules': 'check-square',
|
|
85
85
|
'code-graph-repos': 'github',
|
|
86
86
|
'code-graph-deployments': 'package',
|
|
87
87
|
};
|
|
@@ -168,7 +168,7 @@ export const SOURCE_LABELS_BY_TABLE: Record<string, string> = {
|
|
|
168
168
|
'prospect-calls': 'Prospect calls',
|
|
169
169
|
|
|
170
170
|
// Code intelligence
|
|
171
|
-
'code-
|
|
171
|
+
'code-rules': 'Code Rules',
|
|
172
172
|
'code-graph-repos': 'Repositories',
|
|
173
173
|
'code-graph-deployments': 'Deployments',
|
|
174
174
|
};
|
|
@@ -257,7 +257,7 @@ export const DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID: Record<string, string> = {
|
|
|
257
257
|
prospect_call: 'prospect-calls',
|
|
258
258
|
|
|
259
259
|
// Code intelligence
|
|
260
|
-
code_rule: 'code-
|
|
260
|
+
code_rule: 'code-rules',
|
|
261
261
|
code_repo: 'code-graph-repos',
|
|
262
262
|
code_deployment: 'code-graph-deployments',
|
|
263
263
|
};
|