@abyss-project/commons-front-core 10.0.0 → 10.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/README.md +334 -319
- package/catalog/catalog-entries.ts +2 -0
- package/catalog/pages/MarkdownEditor.tsx +48 -0
- package/catalog/pages/PdfEditor.tsx +153 -0
- package/catalog/pages/index.ts +4 -0
- package/dist/AbyssCloud-IuD91X6C.js +2949 -0
- package/dist/{AbyssCookieConsentProvider-BypueFP-.js → AbyssCookieConsentProvider-DTHchhfw.js} +2012 -1383
- package/dist/{CookieConsentSettings.component-CYmew9vg.js → CookieConsentSettings.component-D13TqxZl.js} +1 -1
- package/dist/Tabs-CZQ1JYlW.js +2315 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/components/editors/MarkdownEditor/MarkdownEditor.d.ts +19 -0
- package/dist/components/editors/MarkdownEditor/crepe-labels.d.ts +17 -0
- package/dist/components/editors/MarkdownEditor/index.d.ts +2 -0
- package/dist/components/editors/MarkdownEditor/markdown-theme.d.ts +7 -0
- package/dist/components/editors/PdfEditor/PdfEditor.d.ts +9 -0
- package/dist/components/editors/PdfEditor/engine/open-pdf-document.d.ts +8 -0
- package/dist/components/editors/PdfEditor/engine/operations/reducer.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/engine/operations/rotate-coords.spec.d.ts +1 -0
- package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/types.d.ts +1 -1
- package/dist/components/editors/PdfEditor/index.d.ts +3 -0
- package/dist/components/editors/PdfEditor/pdf-colors.d.ts +26 -0
- package/dist/components/editors/PdfEditor/pdf-colors.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/signature/SignatureDrawPad.d.ts +15 -0
- package/dist/components/editors/PdfEditor/signature/SignaturePicker.d.ts +31 -0
- package/dist/components/editors/PdfEditor/signature/SignaturePicker.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/signature/SignatureSaveButton.d.ts +14 -0
- package/dist/components/editors/PdfEditor/signature/SignatureSavedList.d.ts +19 -0
- package/dist/components/editors/PdfEditor/signature/SignatureUploadPanel.d.ts +14 -0
- package/dist/components/editors/PdfEditor/signature/resolve-asset.d.ts +19 -0
- package/dist/components/editors/PdfEditor/signature/resolve-asset.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/signature/test-support/pdf-editor-test-harness.d.ts +28 -0
- package/dist/components/editors/PdfEditor/toolbar/EraserIcon.d.ts +3 -0
- package/dist/components/editors/PdfEditor/toolbar/GroupPanel.d.ts +17 -0
- package/dist/components/editors/PdfEditor/toolbar/PanelRow.d.ts +14 -0
- package/dist/components/editors/PdfEditor/toolbar/PdfToolbar.d.ts +65 -0
- package/dist/components/editors/PdfEditor/toolbar/PdfToolbar.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/toolbar/SavedAssets.d.ts +24 -0
- package/dist/components/editors/PdfEditor/toolbar/ToolGroupButton.d.ts +20 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-groups.d.ts +34 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/DrawOptions.d.ts +6 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/FillFieldsOptions.d.ts +13 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/HighlightOptions.d.ts +6 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/RedactOptions.d.ts +6 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/ShapeOptions.d.ts +6 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/SignatureOptions.d.ts +5 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/TextOptions.d.ts +6 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/ToolOptions.d.ts +14 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-options/swatches.d.ts +2 -0
- package/dist/components/editors/PdfEditor/toolbar/tool-settings.d.ts +14 -0
- package/dist/components/editors/PdfEditor/viewer/InsertPagesButton.d.ts +14 -0
- package/dist/components/editors/PdfEditor/viewer/InsertPagesButton.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/viewer/InsertPagesDialog.d.ts +28 -0
- package/dist/components/editors/PdfEditor/viewer/PageOverlay.d.ts +37 -0
- package/dist/components/editors/PdfEditor/viewer/PageOverlay.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/viewer/PageSidebar.d.ts +16 -0
- package/dist/components/editors/PdfEditor/viewer/PageSidebar.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/viewer/PageThumbnail.d.ts +16 -0
- package/dist/components/editors/PdfEditor/viewer/PdfCanvas.d.ts +26 -0
- package/dist/components/editors/PdfEditor/viewer/PdfCanvas.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/viewer/ViewerControls.d.ts +21 -0
- package/dist/components/editors/PdfEditor/viewer/ViewerControls.spec.d.ts +1 -0
- package/dist/components/editors/PdfEditor/viewer/test-support/viewer-test-harness.d.ts +30 -0
- package/dist/components/editors/editors-guard.spec.d.ts +1 -0
- package/dist/components/editors/index.d.ts +2 -0
- package/dist/cookie-consent.js +2 -2
- package/dist/{design-theme-uRG0VfEo.js → design-theme-BGMTwRaP.js} +9302 -12244
- package/dist/editors.d.ts +1 -0
- package/dist/editors.js +5151 -0
- package/dist/hooks/use-rich-intl.hook.d.ts +632 -0
- package/dist/{index-BXr7rmpX.js → index-40JUFFwY.js} +3 -3
- package/dist/{index-B2hC6MII.js → index-B9pFhQQG.js} +2 -2
- package/dist/{index-DMm4DUwE.js → index-BFBonBC2.js} +4 -4
- package/dist/{index-eDLp-yzn.js → index-BUqYHWKw.js} +3 -3
- package/dist/{index-cCCQwSgM.js → index-BcRgJqSB.js} +2 -2
- package/dist/{index-B-o5nMSp.js → index-BlhbGVkk.js} +2 -2
- package/dist/{index-DSxaBHTZ.js → index-BsOQZ-n8.js} +2 -2
- package/dist/{index-1XaO6yqN.js → index-CBrydj4V.js} +2 -2
- package/dist/{index-D6SwHpGJ.js → index-CM-90k5s.js} +3 -3
- package/dist/{index-BWlJEtPU.js → index-Cccq9d1E.js} +2 -2
- package/dist/{index-Cn4VznqA.js → index-CdL2MLmd.js} +3 -3
- package/dist/{index-Bzvs4paS.js → index-D0EC1_iy.js} +4 -4
- package/dist/{index-B-gziyiQ.js → index-D7AFc1sX.js} +2 -2
- package/dist/{index-BlOn2KR_.js → index-Dk1JTU4K.js} +2 -2
- package/dist/{index-oTUDJjQw.js → index-Dop3xXC3.js} +1 -1
- package/dist/{index-QOUuevuY.js → index-DqAkOKf8.js} +2 -2
- package/dist/{index-CxRoV826.js → index-JEsamj6m.js} +2 -2
- package/dist/{index-C7vs9FFj.js → index-kfzQWNLP.js} +2 -2
- package/dist/{index-BGFuwS_Q.js → index-oBWWShwb.js} +2 -2
- package/dist/{index-D_FaSb6y.js → index-s2djh_x_.js} +2 -2
- package/dist/{index-BqwZB633.js → index-tN8hz-IX.js} +4 -4
- package/dist/index.js +5676 -7907
- package/dist/legacy/components/PdfEditor/PdfEditor.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/index.d.ts +2 -2
- package/dist/legacy/components/PdfEditor/signature/SignatureDrawCanvas.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/signature/SignaturePicker.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/signature/SignatureSaveButton.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/signature/SignatureSavedList.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/signature/SignatureUploadDropzone.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/signature/resolve-asset.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/tools/FillFieldsTool.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/tools/ShapeTool.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/tools/SignatureTool.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/tools/TextTool.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/tools/Toolbar.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/viewer/InsertPagesButton.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/viewer/PageOverlay.d.ts +1 -1
- package/dist/legacy/components/PdfEditor/viewer/PageSidebar.d.ts +2 -2
- package/dist/legacy/components/PdfEditor/viewer/PageThumbnail.d.ts +2 -2
- package/dist/legacy/components/PdfEditor/viewer/PdfCanvas.d.ts +1 -1
- package/dist/legacy.js +26787 -209
- package/dist/sortable.esm-DM2HNEC7.js +69322 -0
- package/dist/translations/editors-i18n.spec.d.ts +1 -0
- package/dist/translations/en.d.ts +316 -0
- package/dist/translations/fr.d.ts +316 -0
- package/package.json +8 -1
- package/vite.config.ts +4 -0
- package/dist/index-DXsaB2jy.js +0 -95929
- /package/dist/{legacy/components/PdfEditor/operations/apply.spec.d.ts → components/editors/MarkdownEditor/MarkdownEditor.spec.d.ts} +0 -0
- /package/dist/{legacy/components/PdfEditor/operations/compute-page-order.spec.d.ts → components/editors/PdfEditor/PdfEditor.spec.d.ts} +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/hooks/use-acro-form-fields.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/hooks/use-export.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/hooks/use-page-order.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/hooks/use-pdf-document.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/hooks/use-undo-redo.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/hooks/use-uploaded-docs.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/actions.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/apply.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor/operations/extract.spec.d.ts → components/editors/PdfEditor/engine/operations/apply.spec.d.ts} +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/compute-page-order.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor/operations/redact.spec.d.ts → components/editors/PdfEditor/engine/operations/compute-page-order.spec.d.ts} +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/extract.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor/operations/reducer.spec.d.ts → components/editors/PdfEditor/engine/operations/extract.spec.d.ts} +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/pdf-data-url.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/rasterize.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/redact.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor/operations/rotate-coords.spec.d.ts → components/editors/PdfEditor/engine/operations/redact.spec.d.ts} +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/reducer.d.ts +0 -0
- /package/dist/{legacy/components/PdfEditor → components/editors/PdfEditor/engine}/operations/rotate-coords.d.ts +0 -0
|
@@ -116,6 +116,8 @@ export const CATALOG_ENTRIES: CatalogEntry[] = [
|
|
|
116
116
|
entry('ContextSelector', 'inputs', 'context-selector', RESPONSIVE),
|
|
117
117
|
entry('DropZone', 'inputs', 'drop-zone', RESPONSIVE),
|
|
118
118
|
entry('ImportButton', 'inputs', 'import-button'),
|
|
119
|
+
entry('MarkdownEditor', 'inputs', 'markdown-editor', RESPONSIVE),
|
|
120
|
+
entry('PdfEditor', 'inputs', 'pdf-editor', RESPONSIVE),
|
|
119
121
|
entry('ExpressionSearch', 'inputs', 'expression-search', {
|
|
120
122
|
mobileCapture: true,
|
|
121
123
|
}),
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MarkdownEditor } from '../../src/components/editors/MarkdownEditor/MarkdownEditor';
|
|
2
|
+
import { Example, LastEvent, Showcase, useEventLog } from '../frame';
|
|
3
|
+
|
|
4
|
+
const NOTE = `# Compte rendu de la revue
|
|
5
|
+
|
|
6
|
+
Les points à **retenir** : le budget reste *stable*, et le lien vers le [tableau de bord](https://abyss.example) est à jour.
|
|
7
|
+
|
|
8
|
+
- Valider le périmètre
|
|
9
|
+
- Relire les \`conditions\`
|
|
10
|
+
- Envoyer le résumé
|
|
11
|
+
|
|
12
|
+
> La prochaine revue a lieu jeudi.
|
|
13
|
+
|
|
14
|
+
\`\`\`ts
|
|
15
|
+
const total = lignes.reduce((somme, ligne) => somme + ligne.montant, 0);
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
| Poste | Montant |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| Hébergement | 1 200 |
|
|
21
|
+
| Licences | 840 |
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const MarkdownEditorPage = () => {
|
|
25
|
+
const { log } = useEventLog();
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Showcase
|
|
29
|
+
family="Saisie"
|
|
30
|
+
name="MarkdownEditor"
|
|
31
|
+
description="Éditeur Markdown de l'écosystème : Crepe, aux couleurs et aux polices du design system, libellés traduits. Un « / » ouvre le menu des blocs ; la poignée à gauche d'un bloc l'ajoute ou le déplace. Sur un écran tactile, la poignée et les boutons font 44 px."
|
|
32
|
+
>
|
|
33
|
+
<Example title="Édition d'une note" maxWidth={880}>
|
|
34
|
+
<MarkdownEditor
|
|
35
|
+
defaultValue={NOTE}
|
|
36
|
+
onChange={(markdown) => log(`${markdown.length} caractères`)}
|
|
37
|
+
/>
|
|
38
|
+
</Example>
|
|
39
|
+
<Example title="Document vide" maxWidth={880}>
|
|
40
|
+
<MarkdownEditor />
|
|
41
|
+
</Example>
|
|
42
|
+
<Example title="Lecture seule" maxWidth={880}>
|
|
43
|
+
<MarkdownEditor defaultValue={NOTE} readOnly />
|
|
44
|
+
</Example>
|
|
45
|
+
<LastEvent />
|
|
46
|
+
</Showcase>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import { AssetKind } from '@abyss-project/main';
|
|
3
|
+
import { PDFDocument, StandardFonts } from 'pdf-lib';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { PdfEditor } from '../../src/components/editors/PdfEditor/PdfEditor';
|
|
6
|
+
import { hairline, px } from '../../src/theme/components/shared';
|
|
7
|
+
import type {
|
|
8
|
+
AssetPalette,
|
|
9
|
+
ExportRequest,
|
|
10
|
+
OperationsAdapter,
|
|
11
|
+
PdfSource,
|
|
12
|
+
} from '../../src/components/editors/PdfEditor/engine/types';
|
|
13
|
+
import { Example, LastEvent, Showcase, useEventLog } from '../frame';
|
|
14
|
+
|
|
15
|
+
const FILE_NAME = 'contrat-de-prestation.pdf';
|
|
16
|
+
|
|
17
|
+
const PARAGRAPHS = [
|
|
18
|
+
'Article 1 : objet du contrat',
|
|
19
|
+
'Le prestataire réalise la refonte du portail client.',
|
|
20
|
+
'Article 2 : durée',
|
|
21
|
+
'Le contrat prend effet à la signature, pour douze mois.',
|
|
22
|
+
'Article 3 : prix',
|
|
23
|
+
'Le prix est payé en trois échéances égales.',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/** A three-page A4 contract, built in the browser so the catalog needs no fixture file. */
|
|
27
|
+
const buildContract = async (): Promise<ArrayBuffer> => {
|
|
28
|
+
const doc = await PDFDocument.create();
|
|
29
|
+
const font = await doc.embedFont(StandardFonts.Helvetica);
|
|
30
|
+
const bold = await doc.embedFont(StandardFonts.HelveticaBold);
|
|
31
|
+
for (let index = 0; index < 3; index += 1) {
|
|
32
|
+
const page = doc.addPage([595.28, 841.89]);
|
|
33
|
+
page.drawText(`Contrat de prestation, page ${index + 1}`, {
|
|
34
|
+
x: 56,
|
|
35
|
+
y: 780,
|
|
36
|
+
size: 18,
|
|
37
|
+
font: bold,
|
|
38
|
+
});
|
|
39
|
+
PARAGRAPHS.forEach((line, row) => {
|
|
40
|
+
page.drawText(line, { x: 56, y: 720 - row * 28, size: 12, font });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const bytes = await doc.save();
|
|
44
|
+
return bytes.slice().buffer;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** A drawn signature, as the saved assets of a signed-in user would carry one. */
|
|
48
|
+
const SIGNATURE_SVG = `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
49
|
+
"<svg xmlns='http://www.w3.org/2000/svg' width='240' height='80'><path d='M10 60 C 40 10, 60 10, 80 50 S 130 80, 150 30 S 200 20, 230 55' fill='none' stroke='navy' stroke-width='3'/></svg>",
|
|
50
|
+
)}`;
|
|
51
|
+
|
|
52
|
+
const PALETTE: AssetPalette = {
|
|
53
|
+
personal: [
|
|
54
|
+
{
|
|
55
|
+
id: 'signature',
|
|
56
|
+
kind: AssetKind.SIGNATURE,
|
|
57
|
+
name: 'Signature',
|
|
58
|
+
downloadUrl: SIGNATURE_SVG,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 'mention',
|
|
62
|
+
kind: AssetKind.TEXT_BLOCK,
|
|
63
|
+
name: 'Mention',
|
|
64
|
+
downloadUrl: null,
|
|
65
|
+
textContent: 'Lu et approuvé',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
organizations: [{ id: 'acme', name: 'Acme', items: [] }],
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const Frame = styled('div')(({ theme }) => ({
|
|
72
|
+
height: 720,
|
|
73
|
+
border: hairline(theme.design.tokens['border.subtle']),
|
|
74
|
+
borderRadius: px(theme.design.radii.md),
|
|
75
|
+
overflow: 'hidden',
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
export const PdfEditorPage = () => {
|
|
79
|
+
const { log } = useEventLog();
|
|
80
|
+
const [source, setSource] = useState<PdfSource | null>(null);
|
|
81
|
+
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
let cancelled = false;
|
|
84
|
+
void buildContract().then((data) => {
|
|
85
|
+
if (!cancelled) {
|
|
86
|
+
setSource({ kind: 'BLOB', data, fileName: FILE_NAME });
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return () => {
|
|
90
|
+
cancelled = true;
|
|
91
|
+
};
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
94
|
+
const onExport = useCallback(
|
|
95
|
+
async (request: ExportRequest) => log(`export ${request.kind}`),
|
|
96
|
+
[log],
|
|
97
|
+
);
|
|
98
|
+
const operationsAdapter = useCallback<OperationsAdapter>(
|
|
99
|
+
async ({ operations }) => log(`${operations.length} opérations`),
|
|
100
|
+
[log],
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Showcase
|
|
105
|
+
family="Saisie"
|
|
106
|
+
name="PdfEditor"
|
|
107
|
+
description="Éditeur PDF de l'écosystème : barre en groupes (Annoter, Signer et remplir, Pages, Sécurité, Fichier), pages et vignettes blanches dans les deux thèmes, signatures dessinées, importées ou enregistrées. Sous 768 px, un groupe s'ouvre en feuille du bas et les pages passent en tiroir."
|
|
108
|
+
>
|
|
109
|
+
{source !== null && (
|
|
110
|
+
<>
|
|
111
|
+
<Example title="Session connectée, éléments enregistrés et AbyssCloud">
|
|
112
|
+
<Frame>
|
|
113
|
+
<PdfEditor
|
|
114
|
+
source={source}
|
|
115
|
+
mode="session-cloud-bridge"
|
|
116
|
+
exportOptions={['DOWNLOAD', 'CLOUD_NEW_FILE']}
|
|
117
|
+
onExport={onExport}
|
|
118
|
+
operationsAdapter={operationsAdapter}
|
|
119
|
+
assetPalette={PALETTE}
|
|
120
|
+
onSaveSignature={async ({ name }) =>
|
|
121
|
+
log(`signature enregistrée : ${name}`)
|
|
122
|
+
}
|
|
123
|
+
manageAssetsUrl="https://abyss.example/account/assets"
|
|
124
|
+
/>
|
|
125
|
+
</Frame>
|
|
126
|
+
</Example>
|
|
127
|
+
<Example title="Page publique, sans compte">
|
|
128
|
+
<Frame>
|
|
129
|
+
<PdfEditor
|
|
130
|
+
source={source}
|
|
131
|
+
mode="anonymous-client"
|
|
132
|
+
exportOptions={['DOWNLOAD']}
|
|
133
|
+
onExport={onExport}
|
|
134
|
+
/>
|
|
135
|
+
</Frame>
|
|
136
|
+
</Example>
|
|
137
|
+
<Example title="Lecture seule">
|
|
138
|
+
<Frame>
|
|
139
|
+
<PdfEditor
|
|
140
|
+
source={source}
|
|
141
|
+
mode="anonymous-shared"
|
|
142
|
+
exportOptions={['DOWNLOAD']}
|
|
143
|
+
onExport={onExport}
|
|
144
|
+
readOnly
|
|
145
|
+
/>
|
|
146
|
+
</Frame>
|
|
147
|
+
</Example>
|
|
148
|
+
</>
|
|
149
|
+
)}
|
|
150
|
+
<LastEvent />
|
|
151
|
+
</Showcase>
|
|
152
|
+
);
|
|
153
|
+
};
|
package/catalog/pages/index.ts
CHANGED
|
@@ -36,6 +36,7 @@ import { ImportButtonPage } from './ImportButton';
|
|
|
36
36
|
import { ImportFromCloudModalPage } from './ImportFromCloudModal';
|
|
37
37
|
import { InfectedDownloadModalPage } from './InfectedDownloadModal';
|
|
38
38
|
import { KeyValueListPage } from './KeyValueList';
|
|
39
|
+
import { MarkdownEditorPage } from './MarkdownEditor';
|
|
39
40
|
import { MenuPage } from './Menu';
|
|
40
41
|
import { MethodBadgePage } from './MethodBadge';
|
|
41
42
|
import { MobileShellPage } from './MobileShell';
|
|
@@ -43,6 +44,7 @@ import { ModalPage } from './Modal';
|
|
|
43
44
|
import { NotificationsMenuPage } from './NotificationsMenu';
|
|
44
45
|
import { NumberFieldPage } from './NumberField';
|
|
45
46
|
import { PageHeaderPage } from './PageHeader';
|
|
47
|
+
import { PdfEditorPage } from './PdfEditor';
|
|
46
48
|
import { PageStatePage } from './PageState';
|
|
47
49
|
import { PreviewDrawerPage } from './PreviewDrawer';
|
|
48
50
|
import { ProductTourPage } from './ProductTour';
|
|
@@ -108,6 +110,7 @@ export const CATALOG_PAGES: Record<string, ComponentType> = {
|
|
|
108
110
|
ImportFromCloudModal: ImportFromCloudModalPage,
|
|
109
111
|
InfectedDownloadModal: InfectedDownloadModalPage,
|
|
110
112
|
KeyValueList: KeyValueListPage,
|
|
113
|
+
MarkdownEditor: MarkdownEditorPage,
|
|
111
114
|
Menu: MenuPage,
|
|
112
115
|
MethodBadge: MethodBadgePage,
|
|
113
116
|
MobileShell: MobileShellPage,
|
|
@@ -115,6 +118,7 @@ export const CATALOG_PAGES: Record<string, ComponentType> = {
|
|
|
115
118
|
NotificationsMenu: NotificationsMenuPage,
|
|
116
119
|
NumberField: NumberFieldPage,
|
|
117
120
|
PageHeader: PageHeaderPage,
|
|
121
|
+
PdfEditor: PdfEditorPage,
|
|
118
122
|
PageState: PageStatePage,
|
|
119
123
|
PreviewDrawer: PreviewDrawerPage,
|
|
120
124
|
ProductTour: ProductTourPage,
|