LoVullo dropped support for IE<9, so getters can now be used to
lazy-load modules.
This also means that, during the transition from LoVullo's internal
rating-fw repo to liza, and broken require paths (program/, mainly)
will not cause problems unless the module containing those requires is
explicitly requested.
* tools/gen-index.js: Generate getters.
The individual commits contain more useful detail, but since there's a
lot of _new_ code, you might be okay with looking at the full diff.
This adds support to Liza for considering classification changes when
detecting field fixes. It can be boiled down to: abstract the bucket
diff array into a `Store`, which can also handle classification diffs,
and have `ValidStateMonitor` check that instead of the original
array. The diff data format is unchanged.
- The diff portion of it comes together in `system/client.js` where it
constructs the Store.
- `ValidStateMonitor` is what performs the validations, and existed
previously; it was modified to support Promises and be
async. `DataValidator` extracts some logic (much less than I had
hoped to) from `Client` in the `rating-fw` repository and glues it
together. If it doesn't look coherent, that's because the process
is a bit of a mess; the overall architecture _did not_ change with
this.
A lot of the project design changed or was abandoned upfront before
code was written: I committed my design notes in the new `liza-notes`
repo. It notes a lot of my thoughts and design decisions, and shows a
lot of what was abandoned or simplified.
* src/validate/DataValidator.js
(validate): New `classes' parameter. API BC break from previous
commits.
(populateStore, updateFailures): Generalize methods.
* test/validate/DataValidatorTest.js:
Add associated test.
Refactor existing tests to adhere to new API/expectations.
DEV-2206
See the description in the test case. This is a bug fix.
* src/validate/ValidStateMonitor.js
(_checkCauseFix): Do not consider an empty diff on a past failure to
be a fix.
* test/validate/ValidStateMonitorTest.js: Add test.
DEV-2296
Life is so much less miserable now that the project is supporting ES6.
* src/store/PatternProxy.js: Add trait.
* src/store/StorePatternError.js: Add Error.
* test/store/PatternProxyTest.js: Add test case.
DEV-2296
This will contain various factories (compounded in some cases) to
instantiate various parts of a coherent system. It aims to replace
(as one of many pieces) the ClientDependencyFactory that's referenced
in the code, which is still part of rating-fw (internal LoVullo repo
from which liza is being liberated).
* src/system/client.js: Add module.
* test/system/clientTest.js: Add functional test case.
DEV-2296
ValidStateMonitor now uses a Store in place of the original primitive
object-based diff format. The original format is translated by
DataValidator. The code is in a transitional state, and considering
the amount of time we spend on various areas of this project, will
likely stay this way for a while.
* src/validate/DataValidator.js
(__construct): Accept Store factory parameter.
(_store_factory): Add field.
(_createStores): Add method.
(_validate): Handle Store.
(updateFailures): Add method.
(_populateStore): Add method.
* test/validate/DataValidatorTest.js: Add tests.
* src/validate/ValidStateMonitor.js
(update): Enforce Store diff.
Wait to process failures until fixes are calculated.
(_checkFailureFix): Handle asynchronous, Promise-based diff.
(_checkCauseFix): Extract logic from _checkCauseFix.
* test/validate/ValidStateMonitorTest.js:
Modify test cases to be Promise-based and handle async calls where
appropriate. That was a friggin' expensive mess.
DEV-2296
This extracts some gross code from Client in the rating-fw repo, which
is responsible for gluing change validations together.
* src/validate/DataValidator.js: Add class.
* test/validate/DataValidatorTest.js: Add test case.
DEV-2296
Stepping stone to async. fix checks.
* src/validate/ValidStateMonitor.js
(update, detectFixes, _checkFailureFix): Return Promise.
* test/validate/ValidStateMonitorTest.js: Update to use promises.
DEV-2296
In newer versions of node, this flag goes away and it is enabled by
default.
* Makefile.am (test): Add NODE_DESTRUCTURE to mocha invocation.
* configure.ac (NODE, NODE_DESTRUCTURE): Add variables.
DEV-2296
Nice and trivial with the new easejs transparent error subtyping!
* src/store/StoreMissError.js: Add error class.
* src/store/MemoryStore.js (get): Use it.
* test/store/MemoryStoreTest.js (#get): Modify test to expect type.
This is a much more general solution.
* src/validate/formatter/Currency.js: Remove trait.
* test/validate/formatter/CurrencyTest.js: Remove test case.
* src/validate/formatter/StringFormat.js: Add trait.
* test/validate/formatter/StringFormatTest.js: Add test case.
* src/ui/step/GeneralStepUi.js (scrollTo):
Will now abort after each error rather than falling through.
Visibility error message will now show field index.
* test/ui/step/GeneralStepUiTest.js: Added respective test cases
This defaults to the global jQuery just so we don't break
everything (BC); that'll be removed in the future.
* src/ui/step/GeneralStepUi.js (__construct): Accept jQuery.
(setContent): Use jQuery instance passed via ctor
This can now be handled with the existing formatters, specifically the
MultiDimension trait. Specifically, multitext simply handled the
styling of vectors.
* src/ui/ElementStyler.js (_answerStylers): Remove multilimit