@abyss-project/commons-front-core 9.4.1 → 9.5.0
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/README.md +18 -0
- package/catalog/captures-plan.ts +5 -1
- package/catalog/catalog-entries.ts +8 -1
- package/catalog/pages/AnchoredPanel.tsx +67 -0
- package/catalog/pages/ExpressionSearch.tsx +65 -0
- package/catalog/pages/FacetPanel.tsx +81 -0
- package/catalog/pages/PageState.tsx +17 -0
- package/catalog/pages/PreviewDrawer.tsx +120 -0
- package/catalog/pages/ProductTour.tsx +9 -1
- package/catalog/pages/Section.tsx +10 -0
- package/catalog/pages/StatTile.tsx +13 -0
- package/catalog/pages/ValueMenu.tsx +40 -0
- package/catalog/pages/index.ts +10 -0
- package/catalog/specs/captures.spec.ts +7 -0
- package/catalog/specs/expression-search-scroll.spec.ts +33 -0
- package/catalog/specs/preview-drawer-trail.spec.ts +38 -0
- package/catalog/specs/write-capture-index.ts +1 -0
- package/dist/{AbyssCookieConsentProvider-L42RPb5f.js → AbyssCookieConsentProvider-jMv5bvVK.js} +412 -312
- package/dist/{CookieConsentSettings.component-CkhtQuGU.js → CookieConsentSettings.component-B6i65LtJ.js} +1 -1
- package/dist/components/data/FacetPanel/FacetPanel.d.ts +30 -0
- package/dist/components/data/FacetPanel/FacetPanel.spec.d.ts +1 -0
- package/dist/components/data/FacetPanel/facet-terms.d.ts +16 -0
- package/dist/components/data/StatTile/StatTile.d.ts +4 -1
- package/dist/components/data/index.d.ts +1 -0
- package/dist/components/inputs/ExpressionSearch/ExpressionSearch.d.ts +30 -0
- package/dist/components/inputs/ExpressionSearch/ExpressionSearch.spec.d.ts +1 -0
- package/dist/components/inputs/ExpressionSearch/suggestion-context.d.ts +20 -0
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/layers/AnchoredPanel/AnchoredPanel.d.ts +25 -0
- package/dist/components/layers/AnchoredPanel/AnchoredPanel.spec.d.ts +1 -0
- package/dist/components/layers/PreviewDrawer/PreviewDrawer.d.ts +18 -0
- package/dist/components/layers/PreviewDrawer/PreviewDrawer.spec.d.ts +1 -0
- package/dist/components/layers/PreviewDrawer/usePreviewStack.d.ts +32 -0
- package/dist/components/layers/ProductTour/ProductTour.d.ts +3 -3
- package/dist/components/layers/ProductTour/product-tour-geometry.d.ts +9 -3
- package/dist/components/layers/index.d.ts +4 -0
- package/dist/components/layers/layers-kbd.spec.d.ts +1 -0
- package/dist/components/meaning/ValueMenu/ValueMenu.d.ts +25 -0
- package/dist/components/meaning/ValueMenu/ValueMenu.spec.d.ts +1 -0
- package/dist/components/meaning/index.d.ts +1 -0
- package/dist/components/states/PageState/PageState.d.ts +9 -2
- package/dist/components/structure/Section/Section.d.ts +3 -1
- package/dist/cookie-consent.js +2 -2
- package/dist/{design-theme-C3DcD-kA.js → design-theme-CykIb-Gz.js} +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +102 -2
- package/dist/{index-sI8PQFKF.js → index-7S_OHK4f.js} +3 -3
- package/dist/{index-BowQxHAl.js → index-B4xjMC7O.js} +2 -2
- package/dist/{index-DrSNFgIl.js → index-B9kzX70T.js} +2 -2
- package/dist/{index-BhRgGLuD.js → index-BEQgBOwt.js} +2 -2
- package/dist/{index-CvT5zdz7.js → index-BOm9JgH7.js} +2 -2
- package/dist/{index-5hIRSHTc.js → index-BPGHypMd.js} +2 -2
- package/dist/{index-BLN9Vvdr.js → index-BS7CgEyj.js} +2 -2
- package/dist/{index-C0jOpBPq.js → index-Bd0oB0x3.js} +2 -2
- package/dist/{index-Dyp_SF7H.js → index-Bgrp5kC3.js} +2 -2
- package/dist/{index-BAO0d8HL.js → index-BveBtqZP.js} +4 -4
- package/dist/{index-gVg-FLmC.js → index-CKD84DUx.js} +1 -1
- package/dist/{index-Bi1ITcfD.js → index-CLxMgDwa.js} +2 -2
- package/dist/{index-DZ5svQvp.js → index-Cqn_LfL2.js} +2 -2
- package/dist/{index-Y46rQdc3.js → index-Cy8fNdNL.js} +2 -2
- package/dist/{index-Cny_hr56.js → index-DXYvHlFM.js} +2 -2
- package/dist/{index-yTDpH9la.js → index-DebUlRoE.js} +2 -2
- package/dist/{index-DyhinvD5.js → index-IhTCIvj6.js} +3 -3
- package/dist/{index-CuOhAUX-.js → index-Lub7dhvT.js} +28 -28
- package/dist/{index-B-D0LQjw.js → index-_nt9c97v.js} +3 -3
- package/dist/{index-DBKoCefj.js → index-f_oWcs8w.js} +4 -4
- package/dist/{index-CMTzmSRJ.js → index-mNiLojvx.js} +4 -4
- package/dist/{index-DXLyOn3D.js → index-rfJiqJxI.js} +3 -3
- package/dist/index.js +5523 -4455
- package/dist/legacy.js +4 -4
- package/dist/theme/tokens/choice-swatches.d.ts +8 -0
- package/dist/translations/en.d.ts +51 -1
- package/dist/translations/fr.d.ts +51 -1
- package/package.json +5 -5
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { expect, test } from '@playwright/test';
|
|
2
|
+
import { ThemeMode } from '../../src/theme/tokens/primitives';
|
|
3
|
+
import { openCatalogPage } from './catalog-page';
|
|
4
|
+
|
|
5
|
+
// ExpressionSearch in a narrow field: the underlined character of a syntax error must be inside
|
|
6
|
+
// the visible part of the field when the error appears (jsdom has no layout, so this is checked
|
|
7
|
+
// in a real browser).
|
|
8
|
+
|
|
9
|
+
const PHONE = { width: 390, height: 844 };
|
|
10
|
+
|
|
11
|
+
test('the underlined error character is in view in a 390 px field', async ({
|
|
12
|
+
page,
|
|
13
|
+
}) => {
|
|
14
|
+
await openCatalogPage(page, 'ExpressionSearch', ThemeMode.Light, PHONE);
|
|
15
|
+
const mark = page.locator('[data-expression-error]').first();
|
|
16
|
+
const input = page.getByRole('combobox').nth(1);
|
|
17
|
+
await expect(mark).toBeAttached();
|
|
18
|
+
|
|
19
|
+
const box = async (locator: typeof mark) => {
|
|
20
|
+
const rect = await locator.evaluate((element) => {
|
|
21
|
+
const { left, right } = element.getBoundingClientRect();
|
|
22
|
+
return { left, right };
|
|
23
|
+
});
|
|
24
|
+
return rect;
|
|
25
|
+
};
|
|
26
|
+
const markBox = await box(mark);
|
|
27
|
+
const inputBox = await box(input);
|
|
28
|
+
expect(await input.evaluate((element) => element.scrollLeft)).toBeGreaterThan(
|
|
29
|
+
0,
|
|
30
|
+
);
|
|
31
|
+
expect(markBox.left).toBeGreaterThanOrEqual(inputBox.left - 1);
|
|
32
|
+
expect(markBox.right).toBeLessThanOrEqual(inputBox.right + 1);
|
|
33
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { expect, test } from '@playwright/test';
|
|
2
|
+
import { ThemeMode } from '../../src/theme/tokens/primitives';
|
|
3
|
+
import { openCatalogPage } from './catalog-page';
|
|
4
|
+
|
|
5
|
+
// PreviewDrawer: the catalog opens four levels on arrival (request, session, log, release). The
|
|
6
|
+
// trail lists all four on a desktop and folds to « … » and the last two on a phone.
|
|
7
|
+
|
|
8
|
+
const trailItems = (page: Parameters<typeof openCatalogPage>[0]) =>
|
|
9
|
+
page
|
|
10
|
+
.getByRole('navigation', { name: 'Fil des aperçus' })
|
|
11
|
+
.getByRole('listitem');
|
|
12
|
+
|
|
13
|
+
test('the trail lists the four levels at 1440 px', async ({ page }) => {
|
|
14
|
+
await openCatalogPage(page, 'PreviewDrawer', ThemeMode.Light, {
|
|
15
|
+
width: 1440,
|
|
16
|
+
height: 900,
|
|
17
|
+
});
|
|
18
|
+
await expect(trailItems(page)).toHaveText([
|
|
19
|
+
'GET /api/invoices',
|
|
20
|
+
'Session b41d07ce',
|
|
21
|
+
'Log e7a90b14',
|
|
22
|
+
'Version 2.14.0',
|
|
23
|
+
]);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('the trail folds to an ellipsis and the last two levels at 390 px', async ({
|
|
27
|
+
page,
|
|
28
|
+
}) => {
|
|
29
|
+
await openCatalogPage(page, 'PreviewDrawer', ThemeMode.Light, {
|
|
30
|
+
width: 390,
|
|
31
|
+
height: 844,
|
|
32
|
+
});
|
|
33
|
+
await expect(trailItems(page)).toHaveText([
|
|
34
|
+
'…',
|
|
35
|
+
'Log e7a90b14',
|
|
36
|
+
'Version 2.14.0',
|
|
37
|
+
]);
|
|
38
|
+
});
|