@abyss-project/commons-front-core 20.0.0 → 20.1.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/CHANGELOG.md +10 -0
- package/catalog/pages/DeliveryHistory.tsx +142 -142
- package/catalog/pages/DeliverySubscriptions.tsx +127 -127
- package/catalog/pages/ScheduledTasks.tsx +117 -117
- package/catalog/pages/Toolbar.tsx +3 -0
- package/catalog/specs/captures.spec.ts +145 -145
- package/catalog/specs/write-capture-index.ts +81 -81
- package/dist/components/inputs/CopyField/CopyField.d.ts +6 -1
- package/dist/index.js +3269 -3218
- package/package.json +1 -1
- package/test-results/catalog/.last-run.json +0 -4
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
2
|
-
import { resolve } from 'path';
|
|
3
|
-
import { CAPTURES, CAPTURES_DIR } from '../captures-plan';
|
|
4
|
-
import type { Capture, CaptureState } from '../captures-plan';
|
|
5
|
-
import type { CatalogFamily } from '../catalog-entries';
|
|
6
|
-
|
|
7
|
-
// Global teardown of the catalog run: writes `index.md` next to the screenshots, from the capture
|
|
8
|
-
// plan, listing only the files present on disk.
|
|
9
|
-
|
|
10
|
-
const FAMILY_TITLES: Record<CatalogFamily, string> = {
|
|
11
|
-
scenes: 'Scènes composées (à regarder en premier)',
|
|
12
|
-
structure: 'Structure',
|
|
13
|
-
mobile: 'Mobile',
|
|
14
|
-
states: 'États',
|
|
15
|
-
data: 'Données',
|
|
16
|
-
meaning: 'Sens',
|
|
17
|
-
business: 'Métier',
|
|
18
|
-
layers: 'Couches',
|
|
19
|
-
navigation: 'Navigation',
|
|
20
|
-
inputs: 'Saisie',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const STATE_LABEL: Record<CaptureState, string> = {
|
|
24
|
-
arrival: '',
|
|
25
|
-
'sheet-open': ', feuille ouverte',
|
|
26
|
-
'list-open': ', liste ouverte',
|
|
27
|
-
'calendar-open': ', calendrier ouvert',
|
|
28
|
-
'panel-open': ', panneau ouvert',
|
|
29
|
-
'menu-open': ', menu ouvert',
|
|
30
|
-
'settings-open': ', réglages ouverts',
|
|
31
|
-
'form-open': ', formulaire ouvert',
|
|
32
|
-
'secret-shown': ', secret affiché une fois',
|
|
33
|
-
'delete-confirm': ', confirmation de suppression',
|
|
34
|
-
'detail-open': ', détail ouvert',
|
|
35
|
-
'runs-open': ', exécutions ouvertes',
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const describe = (capture: Capture): string =>
|
|
39
|
-
`${capture.theme === 'dark' ? 'sombre' : 'clair'}, ${capture.width} px${
|
|
40
|
-
STATE_LABEL[capture.state]
|
|
41
|
-
}`;
|
|
42
|
-
|
|
43
|
-
const writeCaptureIndex = (): void => {
|
|
44
|
-
mkdirSync(CAPTURES_DIR, { recursive: true });
|
|
45
|
-
const present = CAPTURES.filter((capture) =>
|
|
46
|
-
existsSync(resolve(CAPTURES_DIR, capture.file)),
|
|
47
|
-
);
|
|
48
|
-
const families = Object.keys(FAMILY_TITLES) as CatalogFamily[];
|
|
49
|
-
const sections = families
|
|
50
|
-
.map((family) => {
|
|
51
|
-
const lines = present
|
|
52
|
-
.filter((capture) => capture.entry.family === family)
|
|
53
|
-
.map(
|
|
54
|
-
(capture) =>
|
|
55
|
-
`- \`${capture.file}\` : ${capture.entry.name}, ${describe(
|
|
56
|
-
capture,
|
|
57
|
-
)}`,
|
|
58
|
-
);
|
|
59
|
-
return lines.length === 0
|
|
60
|
-
? ''
|
|
61
|
-
: `## ${FAMILY_TITLES[family]}\n\n${lines.join('\n')}\n`;
|
|
62
|
-
})
|
|
63
|
-
.filter((section) => section !== '');
|
|
64
|
-
const missing = CAPTURES.length - present.length;
|
|
65
|
-
const content = [
|
|
66
|
-
'# Captures du catalogue du core (#286)',
|
|
67
|
-
'',
|
|
68
|
-
'Produites par `pnpm --filter @abyss-project/commons-front-core catalog:test` (`catalog/specs/captures.spec.ts`).',
|
|
69
|
-
'Chaque composant en clair et en sombre à 1440 px ; à 390 px aussi ceux qui changent de forme sous 768 px ;',
|
|
70
|
-
'le shell et la scène bureau aussi à 768 px (rail d’icônes).',
|
|
71
|
-
'',
|
|
72
|
-
`${present.length} fichiers${
|
|
73
|
-
missing > 0 ? `, ${missing} manquants (lancement partiel)` : ''
|
|
74
|
-
}.`,
|
|
75
|
-
'',
|
|
76
|
-
...sections,
|
|
77
|
-
].join('\n');
|
|
78
|
-
writeFileSync(resolve(CAPTURES_DIR, 'index.md'), content);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default writeCaptureIndex;
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
2
|
+
import { resolve } from 'path';
|
|
3
|
+
import { CAPTURES, CAPTURES_DIR } from '../captures-plan';
|
|
4
|
+
import type { Capture, CaptureState } from '../captures-plan';
|
|
5
|
+
import type { CatalogFamily } from '../catalog-entries';
|
|
6
|
+
|
|
7
|
+
// Global teardown of the catalog run: writes `index.md` next to the screenshots, from the capture
|
|
8
|
+
// plan, listing only the files present on disk.
|
|
9
|
+
|
|
10
|
+
const FAMILY_TITLES: Record<CatalogFamily, string> = {
|
|
11
|
+
scenes: 'Scènes composées (à regarder en premier)',
|
|
12
|
+
structure: 'Structure',
|
|
13
|
+
mobile: 'Mobile',
|
|
14
|
+
states: 'États',
|
|
15
|
+
data: 'Données',
|
|
16
|
+
meaning: 'Sens',
|
|
17
|
+
business: 'Métier',
|
|
18
|
+
layers: 'Couches',
|
|
19
|
+
navigation: 'Navigation',
|
|
20
|
+
inputs: 'Saisie',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const STATE_LABEL: Record<CaptureState, string> = {
|
|
24
|
+
arrival: '',
|
|
25
|
+
'sheet-open': ', feuille ouverte',
|
|
26
|
+
'list-open': ', liste ouverte',
|
|
27
|
+
'calendar-open': ', calendrier ouvert',
|
|
28
|
+
'panel-open': ', panneau ouvert',
|
|
29
|
+
'menu-open': ', menu ouvert',
|
|
30
|
+
'settings-open': ', réglages ouverts',
|
|
31
|
+
'form-open': ', formulaire ouvert',
|
|
32
|
+
'secret-shown': ', secret affiché une fois',
|
|
33
|
+
'delete-confirm': ', confirmation de suppression',
|
|
34
|
+
'detail-open': ', détail ouvert',
|
|
35
|
+
'runs-open': ', exécutions ouvertes',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const describe = (capture: Capture): string =>
|
|
39
|
+
`${capture.theme === 'dark' ? 'sombre' : 'clair'}, ${capture.width} px${
|
|
40
|
+
STATE_LABEL[capture.state]
|
|
41
|
+
}`;
|
|
42
|
+
|
|
43
|
+
const writeCaptureIndex = (): void => {
|
|
44
|
+
mkdirSync(CAPTURES_DIR, { recursive: true });
|
|
45
|
+
const present = CAPTURES.filter((capture) =>
|
|
46
|
+
existsSync(resolve(CAPTURES_DIR, capture.file)),
|
|
47
|
+
);
|
|
48
|
+
const families = Object.keys(FAMILY_TITLES) as CatalogFamily[];
|
|
49
|
+
const sections = families
|
|
50
|
+
.map((family) => {
|
|
51
|
+
const lines = present
|
|
52
|
+
.filter((capture) => capture.entry.family === family)
|
|
53
|
+
.map(
|
|
54
|
+
(capture) =>
|
|
55
|
+
`- \`${capture.file}\` : ${capture.entry.name}, ${describe(
|
|
56
|
+
capture,
|
|
57
|
+
)}`,
|
|
58
|
+
);
|
|
59
|
+
return lines.length === 0
|
|
60
|
+
? ''
|
|
61
|
+
: `## ${FAMILY_TITLES[family]}\n\n${lines.join('\n')}\n`;
|
|
62
|
+
})
|
|
63
|
+
.filter((section) => section !== '');
|
|
64
|
+
const missing = CAPTURES.length - present.length;
|
|
65
|
+
const content = [
|
|
66
|
+
'# Captures du catalogue du core (#286)',
|
|
67
|
+
'',
|
|
68
|
+
'Produites par `pnpm --filter @abyss-project/commons-front-core catalog:test` (`catalog/specs/captures.spec.ts`).',
|
|
69
|
+
'Chaque composant en clair et en sombre à 1440 px ; à 390 px aussi ceux qui changent de forme sous 768 px ;',
|
|
70
|
+
'le shell et la scène bureau aussi à 768 px (rail d’icônes).',
|
|
71
|
+
'',
|
|
72
|
+
`${present.length} fichiers${
|
|
73
|
+
missing > 0 ? `, ${missing} manquants (lancement partiel)` : ''
|
|
74
|
+
}.`,
|
|
75
|
+
'',
|
|
76
|
+
...sections,
|
|
77
|
+
].join('\n');
|
|
78
|
+
writeFileSync(resolve(CAPTURES_DIR, 'index.md'), content);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default writeCaptureIndex;
|
|
@@ -5,6 +5,11 @@ interface CopyFieldBaseProps {
|
|
|
5
5
|
onReveal?(): void;
|
|
6
6
|
/** Label of the copy button, named after what it copies ("Copier la clé"). */
|
|
7
7
|
copyLabel: string;
|
|
8
|
+
/**
|
|
9
|
+
* Below 768 px, the shown value wraps onto as many lines as it needs instead of being cut by an
|
|
10
|
+
* ellipsis: for an identifier read on a phone to be typed elsewhere. Wider, it stays one line.
|
|
11
|
+
*/
|
|
12
|
+
wrapOnPhone?: boolean;
|
|
8
13
|
}
|
|
9
14
|
/** The value is known up front. */
|
|
10
15
|
interface CopyFieldValueProps extends CopyFieldBaseProps {
|
|
@@ -31,5 +36,5 @@ export declare const COPY_FEEDBACK_MS = 2000;
|
|
|
31
36
|
* a polite live region; a success turns the copy icon into a check mark for a moment, a failure is
|
|
32
37
|
* also written under the field.
|
|
33
38
|
*/
|
|
34
|
-
export declare function CopyField({ value: givenValue, loadValue, masked, onReveal, copyLabel, }: CopyFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function CopyField({ value: givenValue, loadValue, masked, onReveal, copyLabel, wrapOnPhone, }: CopyFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
35
40
|
export {};
|