NmPlatformConfigJsonEdits mixin

The JSON edits of an NmPlatformConfigEditor over current's in-memory files: selectors, mapping, nested values and lists, counties and transformation overrides.

The class supplies the state (current, scope, testField) and configEdited, called after every edit with the changed file name (dirty tracking, validation, notifyListeners).

Implemented types

Properties

current → NmPlatformConfig?
The selected platform, or null.
no setterinherited
dbColumns → List<String>
Columns of the target database (mapping targets).
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
hasSample → bool
Whether a sample page is loaded for selector tests.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleIds → List<({String id, String text})>
Record ids found in the sample.
no setterinherited
sampleLabel → String
Label of the loaded sample.
no setterinherited
scope ↔ String?
County key being edited, or null for the base config.
getter/setter pairinherited-getter
selectedId → String?
Id of the selected platform.
no setterinherited
tests → Map<String, List<NmSelectorTestResult>>
Selector test results per field, for the selected platform and scope.
no setterinherited

Methods

addField(String name) → void
Adds a field to the selectors.
override
addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
applyRawJson(String file, String text) → String?
Replaces file with parsed text; returns an error text or null.
inherited
configEdited(String file) → void
Called after an edit changed file (a config file name without .json).
createTransformationOverride(String countyKey) → void
Creates a per-county transformations.json override by deep-copying the effective default section (a new override never starts from a blank pipeline).
override
insertJsonList(String file, List<Object> path, Object value, {int? at}) → void
Inserts into the list at path in file.
override
moveJsonList(String file, List<Object> path, int from, int to) → void
Moves an item of the list at path in file.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rawJsonFor(String file) → String
Pretty JSON of file.
inherited
removeCounty(String key) → void
Removes a county row; clears scope if that county was selected.
override
removeField(String name) → void
Removes a field from the selectors.
override
removeJsonKey(String file, List<Object> path) → void
Removes a map key at path's last element (the map complement of removeJsonList).
override
removeJsonList(String file, List<Object> path, int index) → void
Removes item index of the list at path in file.
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
revertField(String field) → void
Drops the county override of field.
override
revertTransformationOverride(String countyKey) → void
Deletes a county's transformations.json override, so the default section applies.
override
selectorList(String field) → List<String>
Fallback selectors of field in the current scope.
override
setJsonValue(String file, List<Object> path, Object? value) → void
Writes into a nested JSON object / list while preserving all sibling keys; missing containers are created (a list when the next path element is an int).
override
setMapping(String field, String column) → void
Maps a source field to a database column.
override
setScope(String? key) → void
Selects a county scope (null = base config).
inherited
setValue(String file, List<String> path, Object? value) → void
Writes a scalar into a nested map inside one config file.
override
testField(String field) → void
Re-runs the selector test of field.
inherited
toString() → String
A string representation of this object.
inherited
upsertCounty(String key, Map<String, dynamic> row) → void
Adds a county row (or replaces an existing key entirely).
override
writeSelector(String field, List<String> values) → void
Writes the fallback selectors of field.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited