133 UI data row abstraction work#134
Conversation
|
Important Review skippedToo many files! This PR contains 194 files, which is 44 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (194)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR closes #133 by extracting and re-routing “test data schema row” / generation / help logic into shared UI modules so the embedded app test-data panel and the standalone generator UI can stay behaviorally aligned, while also extending safe faker argument parsing and domain keyword metadata.
Changes:
- Refactors core-ui test-data schema editing and generation into shared, unit-testable modules and updates imports across app + generator surfaces.
- Expands “safe faker literal args” support (arrays/objects + JS-style object literals) and enhances faker helper help metadata generation/overrides.
- Tightens domain keyword arg typing (e.g.,
integer,regexp) and adds broader interaction/parity test coverage for both UIs.
Reviewed changes
Copilot reviewed 182 out of 195 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/cross-surface-option-parity.test.js | Updates option catalog import to new generator options index. |
| scripts/generate-faker-help.js | Adds helper metadata overrides + path updates + formatting changes. |
| packages/core/src/tests/data_generation/unit/faker/hybridFakerCommandRunner.test.js | Adds coverage for JS-style object literal faker args. |
| packages/core/src/tests/data_generation/unit/faker/fakerTestDataRuleValidator.test.js | Validates helpers.mustache with object literal args. |
| packages/core/src/tests/data_generation/unit/domain/domainKeywords.test.js | Updates sample values to cover integer/regexp types. |
| packages/core/src/tests/data_generation/unit/domain/domain-param-invocation-coverage.test-helper.js | Adds regexp sample + pattern sample update. |
| packages/core/src/tests/data_generation/unit/domain/domain-keyword-params-usage.test.js | Adds regexp coercion expectation + removes prior runtime rejection special-case. |
| packages/core/src/tests/data_generation/unit/domain/domain-doc-param-examples.test.js | Makes docs-root resolution relative to test file; scopes param example assertions to curated examples. |
| packages/core/src/tests/data_generation/unit/domain/domain-doc-examples.test.js | Makes docs-root resolution relative to test file. |
| packages/core/src/tests/core-api/generateFromTextSpec.test.js | Adds validate/generate coverage for object literal faker args. |
| packages/core/src/index.js | Delegates safe faker args check to safe literal argument parser; updates validation message. |
| packages/core/js/domain/domain-keywords.js | Adds arg examples + integer/regexp type support + regexp coercion for optionsFromHelpArgs. |
| packages/core/js/domain/domain-faker-string-keyword-definitions.js | Adds arg examples; changes length type to integer. |
| packages/core/js/domain/domain-faker-phone-keyword-definitions.js | Adds examples for phone style. |
| packages/core/js/domain/domain-faker-number-keyword-definitions.js | Adds examples; changes fractionDigits type to integer. |
| packages/core/js/domain/domain-faker-internet-keyword-definitions.js | Adds examples; changes password length to integer and pattern to regexp. |
| packages/core/js/domain/domain-faker-finance-keyword-definitions.js | Adds examples; adjusts types and returnType for amount. |
| packages/core/js/domain/domain-faker-commerce-keyword-definitions.js | Adds examples; adjusts types and returnType for price. |
| packages/core/js/domain/domain-faker-color-keyword-definitions.js | Adds examples for color args. |
| packages/core/js/domain/domain-faker-airline-keyword-definitions.js | Adds examples for airline seat and aircraftType. |
| packages/core/js/domain/domain-custom-string-keyword-definitions.js | Adds examples; changes min/max types to integer. |
| packages/core/js/data_generation/faker/fakerCommandRunner.js | Switches safe parse path to safe literal argument parser. |
| packages/core-ui/src/tests/utils/timed-error-display.test.js | Updates import path for shared timed error display. |
| packages/core-ui/src/tests/utils/theme-toggle.test.js | Updates import path for shared theme toggle. |
| packages/core-ui/src/tests/utils/test-data-amend.test.js | Updates import path for relocated test-data amend module. |
| packages/core-ui/src/tests/utils/tabbed-text-control-mode.test.js | Updates import path for app tabbed text control. |
| packages/core-ui/src/tests/utils/options-catalog-adapter.test.js | Updates import path to generator options index. |
| packages/core-ui/src/tests/utils/modal-text-input.test.js | Updates import path for shared modal text input. |
| packages/core-ui/src/tests/utils/modal-confirm.test.js | Updates import path for shared modal confirm. |
| packages/core-ui/src/tests/utils/import-export-controls-mode.test.js | Updates import path for app import/export controls. |
| packages/core-ui/src/tests/utils/faker-command-help-metadata.test.js | Updates imports to shared faker commands/help; adds docsUrl + curated helper assertions. |
| packages/core-ui/src/tests/utils/export-controls.test.js | Updates imports to app/shared module locations. |
| packages/core-ui/src/tests/utils/drag-drop-control.test.js | Updates import path for app drag-drop control. |
| packages/core-ui/src/tests/utils/download.test.js | Updates import path for shared download helper. |
| packages/core-ui/src/tests/shared/ui-derived-state.test.js | Adds unit tests for shared pairwise eligibility helpers. |
| packages/core-ui/src/tests/shared/tabulator-draft-sync.test.js | Adds unit tests for tabulator draft sync helper. |
| packages/core-ui/src/tests/shared/schema-runtime.test.js | Adds unit tests for shared schema runtime adapter. |
| packages/core-ui/src/tests/shared/schema-row-mapper.test.js | Adds unit tests for shared schema row mapping functions. |
| packages/core-ui/src/tests/shared/schema-controller.test.js | Adds unit tests for schema controller/session behavior. |
| packages/core-ui/src/tests/shared/help-model-builder.test.js | Adds unit tests for shared schema help model builder. |
| packages/core-ui/src/tests/shared/generation-runtime.test.js | Adds unit tests for shared generation runtime helpers. |
| packages/core-ui/src/tests/shared/generation-controller.test.js | Adds unit tests for shared generation controller orchestration. |
| packages/core-ui/src/tests/shared/command-spec-parser.test.js | Adds unit tests for shared command+params extraction. |
| packages/core-ui/src/tests/shared/ag-grid-draft-sync.test.js | Adds unit tests for ag-grid draft sync helper. |
| packages/core-ui/src/tests/interaction/support/testing-library-dom-setup.js | Adds shared JSDOM global installer/cleanup for interaction tests. |
| packages/core-ui/src/tests/interaction/matrix/ui-schema-interaction-parity.test.js | Adds cross-UI parity matrix runner comparing app vs generator outputs. |
| packages/core-ui/src/tests/interaction/matrix/ui-scenario-parity-support.test.js | Adds tests for parity probing helpers. |
| packages/core-ui/src/tests/interaction/matrix/ui-scenario-parity-fixture.test.js | Adds optional fixture writer test gated by env var. |
| packages/core-ui/src/tests/interaction/matrix/support/ui-scenario-parity.js | Adds parity probing + minimal expect implementation for harness runs. |
| packages/core-ui/src/tests/interaction/matrix/support/deterministic-scenario-seed.js | Adds deterministic seed helper for scenario runs. |
| packages/core-ui/src/tests/interaction/matrix/schema-interaction-matrix-report.test.js | Adds tests for matrix report rendering/formatting. |
| packages/core-ui/src/tests/interaction/matrix/generator-schema-interaction-matrix.test.js | Adds generator-side scenario matrix runner. |
| packages/core-ui/src/tests/interaction/matrix/deterministic-scenario-seed.test.js | Adds tests for deterministic seeding behavior. |
| packages/core-ui/src/tests/interaction/matrix/app-schema-interaction-matrix.test.js | Adds app-side scenario matrix runner. |
| packages/core-ui/src/tests/interaction/generator-focused-schema-editing.test.js | Adds focused generator schema-editing flows via Testing Library. |
| packages/core-ui/src/tests/interaction/generator-focused-generation.test.js | Adds focused generator preview/export/pairwise flows via Testing Library. |
| packages/core-ui/src/tests/interaction/app-test-data-focused-schema-sync.test.js | Adds focused app schema sync flows via Testing Library. |
| packages/core-ui/src/tests/interaction/app-test-data-focused-generation.test.js | Adds focused app generation flows via Testing Library. |
| packages/core-ui/src/tests/grid/schema/test-data-grid-schema-text-sync.test.js | Adds unit tests for schema text sync module. |
| packages/core-ui/src/tests/grid/schema/test-data-grid-schema-row-mappers.test.js | Adds unit tests for app schema row mappers adapter. |
| packages/core-ui/src/tests/grid/schema/test-data-command-catalog.test.js | Updates command catalog tests to new command editor APIs and helper-only faker list. |
| packages/core-ui/src/tests/grid/host/test-data-grid-ui-bindings.test.js | Adds tests for test-data panel UI bindings. |
| packages/core-ui/src/tests/grid/host/test-data-grid-panel-coordinator.test.js | Adds tests for panel coordinator wiring/order. |
| packages/core-ui/src/tests/grid/host/test-data-grid-layout.test.js | Adds tests for panel layout styling logic. |
| packages/core-ui/src/tests/grid/host/test-data-grid-host.test.js | Adds tests for grid chrome creation/bindings. |
| packages/core-ui/src/tests/grid/guarded-column-edits.test.js | Updates tests to new shared guarded column edit adapter locations/names. |
| packages/core-ui/src/tests/grid/grid-extension-parity.test.js | Updates guarded column edits import to shared implementation. |
| packages/core-ui/src/tests/grid/controller/test-data-grid-generation-mode.test.js | Adds tests for generation mode default-count behavior. |
| packages/core-ui/src/tests/grid/controller/test-data-grid-action-adapter.test.js | Adds tests for action adapter delegating to generation service. |
| packages/core-ui/src/tests/generator/data-generator-schema-ui.test.js | Adds tests for generator schema UI rendering and handlers. |
| packages/core-ui/src/tests/generator/data-generator-page.test.js | Updates generator page imports and expectations (sourceType order; helpers-only faker list). |
| packages/core-ui/src/tests/generator/data-generator-page.exporter-integration.test.js | Updates generator page import to new generator index entrypoint. |
| packages/core-ui/src/tests/generator/data-generator-page-host.test.js | Adds tests for generator host coordinator composition. |
| packages/core-ui/src/tests/generator/data-generator-generation-actions.test.js | Adds tests for generator generation actions utilities. |
| packages/core-ui/js/script.js | Rewires app entry script imports to new module locations. |
| packages/core-ui/js/gui_components/shared/unref-timeout.js | Adds unref-capable timeout helper for Node/Jest. |
| packages/core-ui/js/gui_components/shared/timed-error-display.js | Uses scheduleTimeout to avoid keeping Node open. |
| packages/core-ui/js/gui_components/shared/theme-toggle.js | Adds shared theme toggle implementation supporting legacy + docusaurus keys. |
| packages/core-ui/js/gui_components/shared/test-data/ui/status-presenter.js | Adds shared status presenter with timed clear. |
| packages/core-ui/js/gui_components/shared/test-data/ui/index.js | Exports shared UI status presenter. |
| packages/core-ui/js/gui_components/shared/test-data/schema/schema-runtime.js | Adds shared schema runtime adapter + enum counting helper. |
| packages/core-ui/js/gui_components/shared/test-data/schema/schema-examples.js | Centralizes sample schema text constants. |
| packages/core-ui/js/gui_components/shared/test-data/schema/schema-error-text.js | Adds schema error normalization helper. |
| packages/core-ui/js/gui_components/shared/test-data/schema/schema-editor-core.js | Adds shared schema row/text mapping core. |
| packages/core-ui/js/gui_components/shared/test-data/schema/index.js | Shared schema module barrel exports. |
| packages/core-ui/js/gui_components/shared/test-data/schema/command-spec-parser.js | Adds shared faker/domain command+params extraction helpers. |
| packages/core-ui/js/gui_components/shared/test-data/help/index.js | Shared help module barrel exports. |
| packages/core-ui/js/gui_components/shared/test-data/help/domain-command-provider.js | Adds returnType-based domain command visibility filtering. |
| packages/core-ui/js/gui_components/shared/test-data/grid-sync/tabulator-draft-sync.js | Adds tabulator draft edit tracking helper. |
| packages/core-ui/js/gui_components/shared/test-data/grid-sync/index.js | Shared grid-sync barrel exports. |
| packages/core-ui/js/gui_components/shared/test-data/grid-sync/ag-grid-draft-sync.js | Adds ag-grid draft edit tracking helper. |
| packages/core-ui/js/gui_components/shared/test-data/generation/ui-derived-state.js | Adds shared derived-state for pairwise eligibility. |
| packages/core-ui/js/gui_components/shared/test-data/generation/index.js | Shared generation module barrel exports. |
| packages/core-ui/js/gui_components/shared/test-data/generation/generation-runtime.js | Adds shared normalization/table helpers + pairwise adapter + count parsing. |
| packages/core-ui/js/gui_components/shared/test-data/generation/generation-controller.js | Adds shared generator orchestration for schema text/rows. |
| packages/core-ui/js/gui_components/shared/schema-row-rule-mapper.js | Adds shared schema-row to ruleSpec mapping helpers/constants. |
| packages/core-ui/js/gui_components/shared/modal-text-input.js | Adds shared modal text input implementation. |
| packages/core-ui/js/gui_components/shared/modal-confirm.js | Adds shared modal confirm implementation. |
| packages/core-ui/js/gui_components/shared/html-escape.js | Adds shared HTML escaping helper. |
| packages/core-ui/js/gui_components/shared/faker-commands.js | Re-exports core faker command catalogs for UI. |
| packages/core-ui/js/gui_components/shared/faker-command-help-metadata.js | Re-exports core faker help metadata for UI. |
| packages/core-ui/js/gui_components/shared/download.js | Adds shared download helper. |
| packages/core-ui/js/gui_components/shared/domain-commands.js | Adds shared domain command catalogs/alias resolution for UI. |
| packages/core-ui/js/gui_components/shared/domain-command-help-metadata.js | Adds domain command help accessor for UI filtering/help. |
| packages/core-ui/js/gui_components/options_panels/options-test-framework-panel.js | Updates import path to generator options index. |
| packages/core-ui/js/gui_components/generator/schema/index.js | Adds generator schema module barrel export. |
| packages/core-ui/js/gui_components/generator/options/options-ui-schema.js | Adjusts relative imports for generator options UI schema. |
| packages/core-ui/js/gui_components/generator/options/options-catalog-adapter.js | Adds generator-scoped options catalog adapter (test frameworks, sanitization, subtasks). |
| packages/core-ui/js/gui_components/generator/options/index.js | Adds generator options barrel export. |
| packages/core-ui/js/gui_components/generator/index.js | Adds generator barrel export entrypoint. |
| packages/core-ui/js/gui_components/generator/host/index.js | Adds generator host barrel exports. |
| packages/core-ui/js/gui_components/generator/host/data-generator-page-coordinator.js | Adds generator host coordinator + event binding + status/error setup. |
| packages/core-ui/js/gui_components/generator/generation/index.js | Adds generator generation module barrel export. |
| packages/core-ui/js/gui_components/generator/controller/index.js | Adds generator controller barrel export. |
| packages/core-ui/js/gui_components/data-grid-editor/tabulator/main-display-grid.js | Refactors to shared guarded edits + shared modal + shared html escape. |
| packages/core-ui/js/gui_components/data-grid-editor/tabulator/guarded-tabulator-column-edits.js | Removes old Tabulator-specific guarded edits implementation (replaced by shared adapter). |
| packages/core-ui/js/gui_components/data-grid-editor/shared/index.js | Exports shared guarded column edit workflow/adapters. |
| packages/core-ui/js/gui_components/data-grid-editor/shared/guarded-tabulator-column-edit-adapter.js | Adds Tabulator adapter over shared guarded edit workflow. |
| packages/core-ui/js/gui_components/data-grid-editor/shared/guarded-column-edits.js | Adds shared id-based guarded edits implementation for AG-style grids. |
| packages/core-ui/js/gui_components/data-grid-editor/gridControl.js | Updates modal import to shared confirm modal. |
| packages/core-ui/js/gui_components/data-grid-editor/grid-error-surface.js | Updates timed error display import to shared implementation. |
| packages/core-ui/js/gui_components/data-grid-editor/ag-grid/customHeader-ag-grid.js | Updates guarded edits import to shared implementation. |
| packages/core-ui/js/gui_components/app/test-data-grid/ui/test-data-ui-status.js | Adds app-specific status wiring using shared presenter. |
| packages/core-ui/js/gui_components/app/test-data-grid/schema/test-data-grid-schema-text-sync.js | Adds schema text -> grid sync module with timed error display. |
| packages/core-ui/js/gui_components/app/test-data-grid/schema/test-data-grid-schema-row-mappers.js | Adds adapter export to shared schema mappers. |
| packages/core-ui/js/gui_components/app/test-data-grid/schema/test-data-command-catalog.js | Adds command catalog + editor values composition for schema grid. |
| packages/core-ui/js/gui_components/app/test-data-grid/schema/index.js | Adds app schema barrel export. |
| packages/core-ui/js/gui_components/app/test-data-grid/index.js | Adds app test-data grid barrel export. |
| packages/core-ui/js/gui_components/app/test-data-grid/host/test-data-grid-ui-bindings.js | Adds UI bindings module for embedded panel controls. |
| packages/core-ui/js/gui_components/app/test-data-grid/host/test-data-grid-panel-html.js | Adds embedded panel HTML renderer + sample schema loader. |
| packages/core-ui/js/gui_components/app/test-data-grid/host/test-data-grid-panel-coordinator.js | Adds coordinator controlling binding/initialization order. |
| packages/core-ui/js/gui_components/app/test-data-grid/host/test-data-grid-layout.js | Adds layout styling helper. |
| packages/core-ui/js/gui_components/app/test-data-grid/host/test-data-grid-host.js | Adds grid chrome element creation + add/delete handlers. |
| packages/core-ui/js/gui_components/app/test-data-grid/host/index.js | Adds host barrel exports. |
| packages/core-ui/js/gui_components/app/test-data-grid/grid-engines/test-data-grid-engine-setup.js | Adds engine selection (Ag Grid vs Tabulator) for schema editor. |
| packages/core-ui/js/gui_components/app/test-data-grid/grid-engines/test-data-grid-ag-grid-editor.js | Adds Ag Grid schema editor setup + normalized bridge/extras. |
| packages/core-ui/js/gui_components/app/test-data-grid/grid-engines/index.js | Adds grid engine barrel exports. |
| packages/core-ui/js/gui_components/app/test-data-grid/generation/test-data-amend.js | Extracts shared generation helpers + updates count parsing. |
| packages/core-ui/js/gui_components/app/test-data-grid/generation/index.js | Adds generation barrel exports for app panel. |
| packages/core-ui/js/gui_components/app/test-data-grid/controller/test-data-grid-generation-mode.js | Adds mode + default row count helpers. |
| packages/core-ui/js/gui_components/app/test-data-grid/controller/test-data-grid-action-adapter.js | Adds action adapter delegating UI button actions to service. |
| packages/core-ui/js/gui_components/app/test-data-grid/controller/index.js | Adds controller barrel exports. |
| packages/core-ui/js/gui_components/app/tabbed-text-control.js | Updates option adapter imports to generator options index. |
| packages/core-ui/js/gui_components/app/import-export-controls.js | Updates options + modal + timeout helpers to shared modules. |
| packages/core-ui/js/gui_components/app/exportControls.js | Updates Download + timeout helper imports; uses scheduleTimeout. |
| packages/core-ui/js/gui_components/app/drag-drop-control.js | Adds app-local DragDropControl module. |
| packages/core-ui/js/grid/guarded-column-edits.js | Removes legacy guarded edits implementation (replaced by shared workflow). |
| packages/core-ui/js/generator-script.js | Updates generator bootstrap imports to new shared modules. |
| package.json | Adds Testing Library deps; reorders @eslint/js; keeps pnpm config. |
| docs-src/docs/040-test-data/domain/250-string.md | Updates docs arg type names (number -> integer) for string domain keywords. |
| docs-src/docs/040-test-data/domain/210-number.md | Updates docs arg type name (fractionDigits -> integer) and example edits. |
| docs-src/docs/040-test-data/domain/160-internet.md | Updates password arg types (length integer, pattern regexp) and examples. |
| docs-src/docs/040-test-data/domain/110-finance.md | Updates finance.amount docs arg type and example section text. |
| docs-src/docs/040-test-data/domain/060-commerce.md | Updates commerce.price docs arg type and examples. |
| docs-src/docs/040-test-data/domain/020-airline.md | Updates airline.seat examples to match curated examples. |
| apps/web/styles.css | Renames selectors for schema textarea + dark theme styling updates. |
| apps/web/src/tests/jest/script-module-init.test.js | Updates module mocks to new app module import paths. |
| apps/web/src/tests/browser/app/abstractions/components/test-data-panel.component.js | Updates Playwright page-object locators to renamed IDs/classes. |
| apps/web/app.html | Renames test-data panel container class for updated UI structure. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| <div class="test-data-schema-edit-zone"> | ||
| <div class="test-data-schema-grid-container" id="testDataSchemaGrid" class="ag-theme-alpine"> | ||
| </div> |
| function bindGenerateCountInput() { | ||
| const generateCountInput = document.getElementById('generateCount'); | ||
| if (!generateCountInput) { | ||
| return; | ||
| } | ||
| generateCountInput.value = '1'; | ||
| generateCountInput.setAttribute('min', '1'); | ||
| generateCountInput.setAttribute('step', '1'); | ||
| generateCountInput.addEventListener('input', () => { | ||
| const parsedCount = Number.parseInt(generateCountInput.value, 10); | ||
| if (!Number.isFinite(parsedCount) || parsedCount < 1) { | ||
| generateCountInput.value = '1'; | ||
| } | ||
| }); |
| function coerceHelpArgValue(spec, value) { | ||
| const allowedTypes = String(spec?.type || '') | ||
| .split('|') | ||
| .map((entry) => entry.trim()) | ||
| .filter(Boolean); | ||
|
|
||
| if (allowedTypes.includes('regexp') && typeof value === 'string') { | ||
| return new RegExp(value); | ||
| } | ||
|
|
||
| return value; | ||
| } |
| function applyDeterministicScenarioSeed(scenarioId) { | ||
| const seed = hashScenarioId(scenarioId); | ||
| Math.random = createSeededRandom(seed); | ||
| faker.seed(seed); | ||
| return seed; | ||
| } | ||
|
|
||
| async function withDeterministicScenarioSeed(scenarioId, callback) { | ||
| const previousRandom = Math.random; | ||
| applyDeterministicScenarioSeed(scenarioId); | ||
| try { | ||
| return await callback(); | ||
| } finally { | ||
| Math.random = previousRandom; | ||
| } | ||
| } |
| const beginDraftTracking = (cell) => { | ||
| setTimeout(() => { | ||
| const editorElement = cell?.getElement?.()?.querySelector?.('input, select, textarea'); | ||
| const rowData = cell?.getRow?.()?.getData?.(); | ||
| const field = cell?.getField?.() || cell?.getColumn?.()?.getDefinition?.()?.field; | ||
| if (!editorElement || !rowData || !field) { | ||
| return; | ||
| } | ||
|
|
||
| setActiveDraftCellEdit({ | ||
| field, | ||
| rowData, | ||
| value: editorElement.value ?? '', | ||
| }); | ||
|
|
||
| const pushDraftValueToText = () => { | ||
| if (activeDraftCellEdit?.rowData !== rowData || activeDraftCellEdit?.field !== field) { | ||
| return; | ||
| } | ||
| setActiveDraftCellEdit({ | ||
| ...activeDraftCellEdit, | ||
| value: editorElement.value ?? '', | ||
| }); | ||
| onSchemaChanged(); | ||
| }; | ||
|
|
||
| editorElement.addEventListener('input', pushDraftValueToText); | ||
| editorElement.addEventListener('change', pushDraftValueToText); | ||
| pushDraftValueToText(); | ||
| }, 0); |
| const onCellEditingStarted = (event) => { | ||
| setTimeout(() => { | ||
| const editorHost = event?.eGridCell; | ||
| const editorElement = editorHost?.querySelector?.('input, select, textarea'); | ||
| const rowData = event?.data; | ||
| const field = event?.colDef?.field; | ||
| if (!editorElement || !rowData || !field) { | ||
| return; | ||
| } | ||
|
|
||
| setActiveDraftCellEdit({ | ||
| field, | ||
| rowData, | ||
| value: editorElement.value ?? '', | ||
| }); | ||
|
|
||
| const pushDraftValueToText = () => { | ||
| if (activeDraftCellEdit?.rowData !== rowData || activeDraftCellEdit?.field !== field) { | ||
| return; | ||
| } | ||
| setActiveDraftCellEdit({ | ||
| ...activeDraftCellEdit, | ||
| value: editorElement.value ?? '', | ||
| }); | ||
| onSchemaChanged(); | ||
| }; | ||
|
|
||
| editorElement.addEventListener('input', pushDraftValueToText); | ||
| editorElement.addEventListener('change', pushDraftValueToText); | ||
| pushDraftValueToText(); | ||
| }, 0); | ||
| }; | ||
|
|
||
| const onCellEditingStopped = () => { | ||
| setActiveDraftCellEdit(null); | ||
| onSchemaChanged(); | ||
| }; |
| "@testing-library/dom": "^10.4.1", | ||
| "@testing-library/jest-dom": "^6.9.1", | ||
| "@testing-library/user-event": "^14.6.1", |
closes #133