Add text import export for toolbox modules
This commit is contained in:
parent
a9b5ca423a
commit
117b7b79e1
27 changed files with 1430 additions and 181 deletions
|
|
@ -116,6 +116,8 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
const imageAnnotationModule = await readFile("website/src/features/toolboxes/modules/ImageAnnotationModule.jsx", "utf8");
|
||||
const linksModule = await readFile("website/src/features/toolboxes/modules/LinksModule.jsx", "utf8");
|
||||
const textImportModal = await readFile("website/src/features/toolboxes/modules/TextImportModal.jsx", "utf8");
|
||||
const textExchangeActions = await readFile("website/src/features/toolboxes/modules/TextExchangeActions.jsx", "utf8");
|
||||
const textExchangeHook = await readFile("website/src/features/toolboxes/modules/useTextExchange.js", "utf8");
|
||||
const countersModule = await readFile("website/src/features/toolboxes/modules/CountersModule.jsx", "utf8");
|
||||
const textImport = await readFile("website/src/features/toolboxes/modules/textImport.js", "utf8");
|
||||
const imageViewer = await readFile("website/src/components/ImageViewer.jsx", "utf8");
|
||||
|
|
@ -133,7 +135,7 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(moduleRegistry, /CombosModule/);
|
||||
assert.match(moduleRegistry, /calculator:/);
|
||||
assert.match(moduleRegistry, /table:/);
|
||||
assert.match(moduleRegistry, /table: \{ label: "Tableau", icon: "table", Component: TableModule, editable: false, scrollable: true \}/);
|
||||
assert.match(moduleRegistry, /table: \{ label: "Tableau", icon: "table", Component: TableModule, editable: true, scrollable: true \}/);
|
||||
assert.match(moduleRegistry, /timer:/);
|
||||
assert.match(moduleRegistry, /taskPlanner:/);
|
||||
assert.match(moduleRegistry, /equipmentPlanner:/);
|
||||
|
|
@ -224,6 +226,7 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(tableModule, /ArrowRight/);
|
||||
assert.match(tableModule, /function HeaderLabelInput/);
|
||||
assert.match(tableModule, /useInlineEdit/);
|
||||
assert.match(tableModule, /TextExchangeActions/);
|
||||
assert.match(tableModule, /event\.target\.select/);
|
||||
assert.match(tableFormulaEngine, /export function evaluateTableCell/);
|
||||
assert.doesNotMatch(tableFormulaEngine, /Function\(/);
|
||||
|
|
@ -235,6 +238,7 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(timerModule, /useInlineEdit/);
|
||||
assert.match(timerModule, /useDraftForm/);
|
||||
assert.match(timerModule, /normalizeTimerData/);
|
||||
assert.match(timerModule, /TextExchangeActions/);
|
||||
assert.match(taskPlannerModule, /export function TaskPlannerModule/);
|
||||
assert.match(taskPlannerModule, /normalizeTaskPlannerData/);
|
||||
assert.match(taskPlannerModule, /applyDueResets/);
|
||||
|
|
@ -247,6 +251,7 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(taskPlannerModule, /useInlineEdit/);
|
||||
assert.match(taskPlannerModule, /useDraftForm/);
|
||||
assert.match(taskPlannerModule, /commitOnEnter: false/);
|
||||
assert.match(taskPlannerModule, /TextExchangeActions/);
|
||||
assert.match(taskPlannerModule, /reorderFeatures/);
|
||||
assert.doesNotMatch(taskPlannerModule, /canMoveItem:/);
|
||||
assert.doesNotMatch(taskPlannerModule, /canMoveGroup:/);
|
||||
|
|
@ -257,18 +262,14 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(equipmentPlannerModule, /socketLinks/);
|
||||
assert.match(equipmentPlannerModule, /useGroupedReorder/);
|
||||
assert.match(equipmentPlannerModule, /reorderFeatures/);
|
||||
assert.match(equipmentPlannerModule, /TextExchangeActions/);
|
||||
assert.match(checklistModule, /export function ChecklistModule/);
|
||||
assert.match(checklistModule, /TextImportModal/);
|
||||
assert.match(checklistModule, /Icon name="import"/);
|
||||
assert.match(checklistModule, /TextExchangeActions/);
|
||||
assert.match(checklistModule, /editing &&/);
|
||||
assert.match(checklistModule, /ChecklistItem/);
|
||||
assert.match(checklistModule, /ChecklistSection/);
|
||||
assert.match(checklistModule, /parseChecklistImport/);
|
||||
assert.match(checklistModule, /parseColonImportLines/);
|
||||
assert.match(checklistModule, /startsWith\("#"\)/);
|
||||
assert.match(checklistModule, /chevron-down/);
|
||||
assert.match(checklistModule, /chevron-up/);
|
||||
assert.match(checklistModule, /Number\.parseInt/);
|
||||
assert.match(checklistModule, /checklist-qty-current/);
|
||||
assert.match(checklistModule, /checklist-delete-button danger/);
|
||||
assert.match(checklistModule, /useGroupedReorder/);
|
||||
|
|
@ -282,12 +283,21 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(checklistModule, /moveChecklistItemToCategory/);
|
||||
assert.match(textImportModal, /createPortal/);
|
||||
assert.match(textImportModal, /lockBodyScroll/);
|
||||
assert.match(textImportModal, /has-error/);
|
||||
assert.match(textExchangeActions, /export function TextExchangeActions/);
|
||||
assert.match(textExchangeActions, /Icon name="import"/);
|
||||
assert.match(textExchangeActions, /Icon name="export"/);
|
||||
assert.match(textExchangeActions, /useTextExchange/);
|
||||
assert.match(textExchangeHook, /export function useTextExchange/);
|
||||
assert.match(textExchangeHook, /importModuleText/);
|
||||
assert.match(textExchangeHook, /exportModuleText/);
|
||||
assert.match(imagesModule, /export function ImagesModule/);
|
||||
assert.match(imagesModule, /useGroupedReorder/);
|
||||
assert.match(imagesModule, /orientation: "horizontal"/);
|
||||
assert.match(imagesModule, /editing &&/);
|
||||
assert.match(imagesModule, /clipboardData/);
|
||||
assert.match(imagesModule, /createImageAnnotationModule/);
|
||||
assert.match(imagesModule, /TextExchangeActions/);
|
||||
assert.match(imagesModule, /image-annotate-button/);
|
||||
assert.match(imagesModule, /dataTransfer\.files/);
|
||||
assert.match(imageAnnotationModule, /export function ImageAnnotationModule/);
|
||||
|
|
@ -297,14 +307,12 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(imageAnnotationModule, /context\.setImage/);
|
||||
assert.match(imageAnnotationModule, /createMarkerId/);
|
||||
assert.match(imageAnnotationModule, /<Icon name="zoom"/);
|
||||
assert.match(imageAnnotationModule, /TextExchangeActions/);
|
||||
assert.match(linksModule, /export function LinksModule/);
|
||||
assert.match(linksModule, /TextImportModal/);
|
||||
assert.match(linksModule, /Icon name="import"/);
|
||||
assert.match(linksModule, /TextExchangeActions/);
|
||||
assert.match(linksModule, /editing &&/);
|
||||
assert.match(linksModule, /normalizeUrl/);
|
||||
assert.match(linksModule, /copyText/);
|
||||
assert.match(linksModule, /parseColonImportLines/);
|
||||
assert.match(linksModule, /context\.normalizeUrl/);
|
||||
assert.match(linksModule, /useGroupedReorder/);
|
||||
assert.match(linksModule, /useDraftForm/);
|
||||
assert.match(linksModule, /linkDraft\.getFieldProps/);
|
||||
|
|
@ -317,11 +325,15 @@ test("toolbox module registry and modules expose expected behavior", async () =>
|
|||
assert.match(countersModule, /counterDraft\.getFieldProps/);
|
||||
assert.match(countersModule, /orientation: "horizontal"/);
|
||||
assert.match(countersModule, /counter-drag-handle/);
|
||||
assert.match(countersModule, /TextExchangeActions/);
|
||||
assert.match(timerModule, /useGroupedReorder/);
|
||||
assert.match(timerModule, /reorderEnabled=\{!data\.sortResults\}/);
|
||||
assert.match(timerModule, /parentId=\{moduleId\}/);
|
||||
assert.match(timerModule, /timer-drag-handle/);
|
||||
assert.match(textImport, /export function parseColonImportLines/);
|
||||
assert.match(textImport, /export function exportModuleText/);
|
||||
assert.match(textImport, /export function importModuleText/);
|
||||
assert.match(textImport, /export function hasTextExchangeContent/);
|
||||
assert.match(textImport, /line\.indexOf\(":\"\)/);
|
||||
assert.match(imageViewer, /image-viewer-media/);
|
||||
assert.match(imageViewer, /image-viewer-image-frame/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue