@jsonforms/core 3.0.0-beta.5 → 3.0.0-rc.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/docs/assets/js/search.json +1 -1
- package/docs/globals.html +206 -101
- package/docs/index.html +21 -3
- package/docs/interfaces/arraycontrolprops.html +21 -21
- package/docs/interfaces/arraylayoutprops.html +21 -21
- package/docs/interfaces/categorization.html +1 -1
- package/docs/interfaces/category.html +1 -1
- package/docs/interfaces/cellprops.html +12 -12
- package/docs/interfaces/combinatorrendererprops.html +18 -18
- package/docs/interfaces/controlelement.html +2 -2
- package/docs/interfaces/controlprops.html +16 -16
- package/docs/interfaces/controlstate.html +2 -2
- package/docs/interfaces/controlwithdetailprops.html +17 -17
- package/docs/interfaces/dispatchcellprops.html +10 -10
- package/docs/interfaces/dispatchcellstateprops.html +10 -10
- package/docs/interfaces/dispatchpropsofarraycontrol.html +4 -4
- package/docs/interfaces/dispatchpropsofcontrol.html +1 -1
- package/docs/interfaces/dispatchpropsofmultienumcontrol.html +2 -2
- package/docs/interfaces/enumcellprops.html +13 -13
- package/docs/interfaces/enumoption.html +2 -2
- package/docs/interfaces/grouplayout.html +2 -2
- package/docs/interfaces/internationalizable.html +3 -0
- package/docs/interfaces/jsonformsprops.html +24 -9
- package/docs/interfaces/{lableable.html → labelable.html} +7 -7
- package/docs/interfaces/labeled.html +2 -2
- package/docs/interfaces/labelelement.html +18 -0
- package/docs/interfaces/labelprops.html +339 -0
- package/docs/interfaces/layoutprops.html +25 -10
- package/docs/interfaces/ownpropsofcell.html +9 -9
- package/docs/interfaces/ownpropsofcontrol.html +9 -9
- package/docs/interfaces/ownpropsofenum.html +1 -1
- package/docs/interfaces/ownpropsofenumcell.html +10 -10
- package/docs/interfaces/ownpropsofjsonformsrenderer.html +8 -8
- package/docs/interfaces/ownpropsoflabel.html +286 -0
- package/docs/interfaces/ownpropsoflayout.html +9 -9
- package/docs/interfaces/ownpropsofmasterlistitem.html +6 -6
- package/docs/interfaces/ownpropsofrenderer.html +11 -8
- package/docs/interfaces/rendererprops.html +9 -9
- package/docs/interfaces/statepropsofarraycontrol.html +17 -17
- package/docs/interfaces/statepropsofarraylayout.html +17 -17
- package/docs/interfaces/statepropsofcell.html +11 -11
- package/docs/interfaces/statepropsofcombinator.html +17 -17
- package/docs/interfaces/statepropsofcontrol.html +15 -15
- package/docs/interfaces/statepropsofcontrolwithdetail.html +16 -16
- package/docs/interfaces/statepropsofenumcell.html +12 -12
- package/docs/interfaces/statepropsofjsonformsrenderer.html +23 -9
- package/docs/interfaces/statepropsoflabel.html +343 -0
- package/docs/interfaces/statepropsoflayout.html +24 -10
- package/docs/interfaces/statepropsofmasteritem.html +7 -7
- package/docs/interfaces/statepropsofrenderer.html +12 -9
- package/docs/interfaces/statepropsofscopedrenderer.html +12 -12
- package/docs/interfaces/testercontext.html +184 -0
- package/docs/interfaces/withclassname.html +1 -1
- package/lib/i18n/i18nUtil.d.ts +9 -4
- package/lib/jsonforms-core.cjs.js +61 -32
- package/lib/jsonforms-core.cjs.js.map +1 -1
- package/lib/jsonforms-core.esm.js +59 -33
- package/lib/jsonforms-core.esm.js.map +1 -1
- package/lib/models/uischema.d.ts +7 -7
- package/lib/reducers/i18n.d.ts +1 -1
- package/lib/testers/testers.d.ts +15 -6
- package/lib/util/renderer.d.ts +18 -1
- package/package.json +2 -2
- package/src/i18n/i18nUtil.ts +24 -7
- package/src/models/uischema.ts +8 -8
- package/src/reducers/i18n.ts +1 -1
- package/src/testers/testers.ts +33 -23
- package/src/util/renderer.ts +52 -25
- package/stats.html +1 -1
- package/test/testers.test.ts +40 -23
- package/test/util/renderer.test.ts +105 -7
package/stats.html
CHANGED
|
@@ -3259,7 +3259,7 @@ var drawChart = (function (exports) {
|
|
|
3259
3259
|
</script>
|
|
3260
3260
|
<script>
|
|
3261
3261
|
/*<!--*/
|
|
3262
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"jsonforms-core.esm.js","children":[{"name":"src","children":[{"name":"generators","children":[{"uid":"3a16-1","name":"schema.ts"},{"uid":"3a16-59","name":"uischema.ts"},{"uid":"3a16-61","name":"Generate.ts"}]},{"name":"models","children":[{"uid":"3a16-3","name":"draft4.ts"},{"uid":"3a16-5","name":"uischema.ts"}]},{"name":"util","children":[{"uid":"3a16-7","name":"array.ts"},{"uid":"3a16-35","name":"path.ts"},{"uid":"3a16-37","name":"resolvers.ts"},{"uid":"3a16-39","name":"runtime.ts"},{"uid":"3a16-41","name":"util.ts"},{"uid":"3a16-43","name":"label.ts"},{"uid":"3a16-45","name":"renderer.ts"},{"uid":"3a16-47","name":"cell.ts"},{"uid":"3a16-49","name":"combinators.ts"},{"uid":"3a16-51","name":"ids.ts"},{"uid":"3a16-53","name":"schema.ts"},{"uid":"3a16-55","name":"uischema.ts"},{"uid":"3a16-57","name":"validator.ts"}]},{"name":"reducers","children":[{"uid":"3a16-9","name":"cells.ts"},{"uid":"3a16-13","name":"config.ts"},{"uid":"3a16-15","name":"core.ts"},{"uid":"3a16-17","name":"default-data.ts"},{"uid":"3a16-21","name":"i18n.ts"},{"uid":"3a16-23","name":"renderers.ts"},{"uid":"3a16-29","name":"uischemas.ts"},{"uid":"3a16-31","name":"reducers.ts"},{"uid":"3a16-33","name":"selectors.ts"}]},{"uid":"3a16-11","name":"configDefault.ts"},{"name":"i18n/i18nUtil.ts","uid":"3a16-19"},{"name":"testers","children":[{"uid":"3a16-25","name":"testers.ts"},{"uid":"3a16-27","name":"index.ts"}]},{"name":"actions","children":[{"uid":"3a16-63","name":"actions.ts"},{"uid":"3a16-65","name":"index.ts"}]},{"uid":"3a16-67","name":"Helpers.ts"},{"uid":"3a16-69","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"3a16-1":{"renderedLength":3843,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-0"},"3a16-3":{"renderedLength":4050,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-2"},"3a16-5":{"renderedLength":755,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-4"},"3a16-7":{"renderedLength":421,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-6"},"3a16-9":{"renderedLength":294,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-8"},"3a16-11":{"renderedLength":133,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-10"},"3a16-13":{"renderedLength":322,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-12"},"3a16-15":{"renderedLength":10156,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-14"},"3a16-17":{"renderedLength":434,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-16"},"3a16-19":{"renderedLength":2075,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-18"},"3a16-21":{"renderedLength":1754,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-20"},"3a16-23":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-22"},"3a16-25":{"renderedLength":8391,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-24"},"3a16-27":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-26"},"3a16-29":{"renderedLength":783,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-28"},"3a16-31":{"renderedLength":1846,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-30"},"3a16-33":{"renderedLength":573,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-32"},"3a16-35":{"renderedLength":1333,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-34"},"3a16-37":{"renderedLength":3040,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-36"},"3a16-39":{"renderedLength":3621,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-38"},"3a16-41":{"renderedLength":1498,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-40"},"3a16-43":{"renderedLength":1289,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-42"},"3a16-45":{"renderedLength":13284,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-44"},"3a16-47":{"renderedLength":2622,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-46"},"3a16-49":{"renderedLength":671,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-48"},"3a16-51":{"renderedLength":621,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-50"},"3a16-53":{"renderedLength":365,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-52"},"3a16-55":{"renderedLength":609,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-54"},"3a16-57":{"renderedLength":196,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-56"},"3a16-59":{"renderedLength":3310,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-58"},"3a16-61":{"renderedLength":137,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-60"},"3a16-63":{"renderedLength":3051,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-62"},"3a16-65":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-64"},"3a16-67":{"renderedLength":80,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-66"},"3a16-69":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"3a16-68"}},"nodeMetas":{"3a16-0":{"id":"/src/generators/schema.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-1"},"imported":[],"importedBy":[{"uid":"3a16-70"},{"uid":"3a16-60"}]},"3a16-2":{"id":"/src/models/draft4.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-3"},"imported":[],"importedBy":[{"uid":"3a16-71"}]},"3a16-4":{"id":"/src/models/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-5"},"imported":[],"importedBy":[{"uid":"3a16-71"}]},"3a16-6":{"id":"/src/util/array.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-7"},"imported":[],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-44"}]},"3a16-8":{"id":"/src/reducers/cells.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-9"},"imported":[{"uid":"3a16-64"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"}]},"3a16-10":{"id":"/src/configDefault.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-11"},"imported":[],"importedBy":[{"uid":"3a16-12"}]},"3a16-12":{"id":"/src/reducers/config.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-13"},"imported":[{"uid":"3a16-85"},{"uid":"3a16-64"},{"uid":"3a16-10"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"}]},"3a16-14":{"id":"/src/reducers/core.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-15"},"imported":[{"uid":"3a16-86"},{"uid":"3a16-87"},{"uid":"3a16-88"},{"uid":"3a16-89"},{"uid":"3a16-90"},{"uid":"3a16-91"},{"uid":"3a16-64"},{"uid":"3a16-73"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"},{"uid":"3a16-32"}]},"3a16-16":{"id":"/src/reducers/default-data.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-17"},"imported":[{"uid":"3a16-64"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"},{"uid":"3a16-32"}]},"3a16-18":{"id":"/src/i18n/i18nUtil.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-19"},"imported":[{"uid":"3a16-71"},{"uid":"3a16-72"},{"uid":"3a16-73"}],"importedBy":[{"uid":"3a16-75"}]},"3a16-20":{"id":"/src/reducers/i18n.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-21"},"imported":[{"uid":"3a16-75"},{"uid":"3a16-64"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"}]},"3a16-22":{"id":"/src/reducers/renderers.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-23"},"imported":[{"uid":"3a16-64"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"}]},"3a16-24":{"id":"/src/testers/testers.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-25"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-88"},{"uid":"3a16-94"},{"uid":"3a16-95"},{"uid":"3a16-96"},{"uid":"3a16-97"},{"uid":"3a16-98"},{"uid":"3a16-99"},{"uid":"3a16-73"}],"importedBy":[{"uid":"3a16-26"}]},"3a16-26":{"id":"/src/testers/index.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-27"},"imported":[{"uid":"3a16-24"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-28"}]},"3a16-28":{"id":"/src/reducers/uischemas.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-29"},"imported":[{"uid":"3a16-92"},{"uid":"3a16-93"},{"uid":"3a16-64"},{"uid":"3a16-26"}],"importedBy":[{"uid":"3a16-72"},{"uid":"3a16-30"}]},"3a16-30":{"id":"/src/reducers/reducers.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-31"},"imported":[{"uid":"3a16-14"},{"uid":"3a16-16"},{"uid":"3a16-22"},{"uid":"3a16-28"},{"uid":"3a16-20"},{"uid":"3a16-70"},{"uid":"3a16-8"},{"uid":"3a16-12"},{"uid":"3a16-88"},{"uid":"3a16-72"}],"importedBy":[{"uid":"3a16-72"}]},"3a16-32":{"id":"/src/reducers/selectors.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-33"},"imported":[{"uid":"3a16-88"},{"uid":"3a16-14"},{"uid":"3a16-16"}],"importedBy":[{"uid":"3a16-72"}]},"3a16-34":{"id":"/src/util/path.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-35"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-101"},{"uid":"3a16-71"}],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-42"},{"uid":"3a16-44"},{"uid":"3a16-36"},{"uid":"3a16-38"},{"uid":"3a16-40"}]},"3a16-36":{"id":"/src/util/resolvers.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-37"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-88"},{"uid":"3a16-34"}],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-38"},{"uid":"3a16-40"}]},"3a16-38":{"id":"/src/util/runtime.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-39"},"imported":[{"uid":"3a16-103"},{"uid":"3a16-71"},{"uid":"3a16-36"},{"uid":"3a16-34"},{"uid":"3a16-72"}],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-46"},{"uid":"3a16-44"},{"uid":"3a16-40"}]},"3a16-40":{"id":"/src/util/util.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-41"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-96"},{"uid":"3a16-99"},{"uid":"3a16-102"},{"uid":"3a16-36"},{"uid":"3a16-34"},{"uid":"3a16-38"}],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-46"},{"uid":"3a16-48"},{"uid":"3a16-44"}]},"3a16-42":{"id":"/src/util/label.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-43"},"imported":[{"uid":"3a16-83"},{"uid":"3a16-34"}],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-44"}]},"3a16-44":{"id":"/src/util/renderer.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-45"},"imported":[{"uid":"3a16-88"},{"uid":"3a16-102"},{"uid":"3a16-72"},{"uid":"3a16-38"},{"uid":"3a16-42"},{"uid":"3a16-6"},{"uid":"3a16-40"},{"uid":"3a16-34"},{"uid":"3a16-64"},{"uid":"3a16-75"}],"importedBy":[{"uid":"3a16-73"},{"uid":"3a16-46"}]},"3a16-46":{"id":"/src/util/cell.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-47"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-100"},{"uid":"3a16-72"},{"uid":"3a16-40"},{"uid":"3a16-38"},{"uid":"3a16-44"},{"uid":"3a16-75"}],"importedBy":[{"uid":"3a16-73"}]},"3a16-48":{"id":"/src/util/combinators.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-49"},"imported":[{"uid":"3a16-72"},{"uid":"3a16-40"}],"importedBy":[{"uid":"3a16-73"}]},"3a16-50":{"id":"/src/util/ids.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-51"},"imported":[],"importedBy":[{"uid":"3a16-73"}]},"3a16-52":{"id":"/src/util/schema.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-53"},"imported":[{"uid":"3a16-102"}],"importedBy":[{"uid":"3a16-73"}]},"3a16-54":{"id":"/src/util/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-55"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-71"}],"importedBy":[{"uid":"3a16-73"}]},"3a16-56":{"id":"/src/util/validator.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-57"},"imported":[{"uid":"3a16-104"},{"uid":"3a16-105"}],"importedBy":[{"uid":"3a16-73"}]},"3a16-58":{"id":"/src/generators/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-59"},"imported":[{"uid":"3a16-82"},{"uid":"3a16-83"},{"uid":"3a16-84"},{"uid":"3a16-71"},{"uid":"3a16-73"}],"importedBy":[{"uid":"3a16-70"},{"uid":"3a16-60"}]},"3a16-60":{"id":"/src/generators/Generate.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-61"},"imported":[{"uid":"3a16-0"},{"uid":"3a16-58"}],"importedBy":[{"uid":"3a16-70"}]},"3a16-62":{"id":"/src/actions/actions.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-63"},"imported":[{"uid":"3a16-70"}],"importedBy":[{"uid":"3a16-64"}]},"3a16-64":{"id":"/src/actions/index.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-65"},"imported":[{"uid":"3a16-62"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-8"},{"uid":"3a16-12"},{"uid":"3a16-14"},{"uid":"3a16-16"},{"uid":"3a16-20"},{"uid":"3a16-22"},{"uid":"3a16-28"},{"uid":"3a16-44"}]},"3a16-66":{"id":"/src/Helpers.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-67"},"imported":[{"uid":"3a16-73"}],"importedBy":[{"uid":"3a16-68"}]},"3a16-68":{"id":"/src/index.ts","moduleParts":{"jsonforms-core.esm.js":"3a16-69"},"imported":[{"uid":"3a16-64"},{"uid":"3a16-70"},{"uid":"3a16-71"},{"uid":"3a16-72"},{"uid":"3a16-26"},{"uid":"3a16-73"},{"uid":"3a16-66"},{"uid":"3a16-74"},{"uid":"3a16-75"}],"importedBy":[],"isEntry":true},"3a16-70":{"id":"/src/generators/index.ts","moduleParts":{},"imported":[{"uid":"3a16-60"},{"uid":"3a16-0"},{"uid":"3a16-58"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-62"},{"uid":"3a16-30"}]},"3a16-71":{"id":"/src/models/index.ts","moduleParts":{},"imported":[{"uid":"3a16-2"},{"uid":"3a16-76"},{"uid":"3a16-77"},{"uid":"3a16-78"},{"uid":"3a16-4"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-58"},{"uid":"3a16-34"},{"uid":"3a16-38"},{"uid":"3a16-54"},{"uid":"3a16-18"}]},"3a16-72":{"id":"/src/reducers/index.ts","moduleParts":{},"imported":[{"uid":"3a16-8"},{"uid":"3a16-12"},{"uid":"3a16-14"},{"uid":"3a16-16"},{"uid":"3a16-20"},{"uid":"3a16-30"},{"uid":"3a16-22"},{"uid":"3a16-32"},{"uid":"3a16-28"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-30"},{"uid":"3a16-46"},{"uid":"3a16-48"},{"uid":"3a16-44"},{"uid":"3a16-38"},{"uid":"3a16-18"}]},"3a16-73":{"id":"/src/util/index.ts","moduleParts":{},"imported":[{"uid":"3a16-6"},{"uid":"3a16-46"},{"uid":"3a16-48"},{"uid":"3a16-79"},{"uid":"3a16-50"},{"uid":"3a16-42"},{"uid":"3a16-34"},{"uid":"3a16-44"},{"uid":"3a16-36"},{"uid":"3a16-38"},{"uid":"3a16-52"},{"uid":"3a16-80"},{"uid":"3a16-54"},{"uid":"3a16-40"},{"uid":"3a16-56"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-66"},{"uid":"3a16-58"},{"uid":"3a16-14"},{"uid":"3a16-24"},{"uid":"3a16-18"}]},"3a16-74":{"id":"/src/store.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-68"}]},"3a16-75":{"id":"/src/i18n/index.ts","moduleParts":{},"imported":[{"uid":"3a16-81"},{"uid":"3a16-18"}],"importedBy":[{"uid":"3a16-68"},{"uid":"3a16-20"},{"uid":"3a16-46"},{"uid":"3a16-44"}]},"3a16-76":{"id":"/src/models/jsonSchema.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-71"}]},"3a16-77":{"id":"/src/models/jsonSchema4.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-71"}]},"3a16-78":{"id":"/src/models/jsonSchema7.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-71"}]},"3a16-79":{"id":"/src/util/Formatted.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-73"}]},"3a16-80":{"id":"/src/util/type.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-73"}]},"3a16-81":{"id":"/src/i18n/i18nTypes.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-75"}]},"3a16-82":{"id":"lodash/isEmpty","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-58"},{"uid":"3a16-24"},{"uid":"3a16-46"},{"uid":"3a16-34"},{"uid":"3a16-36"},{"uid":"3a16-54"},{"uid":"3a16-40"}],"isExternal":true},"3a16-83":{"id":"lodash/startCase","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-58"},{"uid":"3a16-42"}],"isExternal":true},"3a16-84":{"id":"lodash/keys","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-58"}],"isExternal":true},"3a16-85":{"id":"lodash/merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-12"}],"isExternal":true},"3a16-86":{"id":"lodash/cloneDeep","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-14"}],"isExternal":true},"3a16-87":{"id":"lodash/fp/set","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-14"}],"isExternal":true},"3a16-88":{"id":"lodash/get","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-14"},{"uid":"3a16-30"},{"uid":"3a16-32"},{"uid":"3a16-24"},{"uid":"3a16-44"},{"uid":"3a16-36"}],"isExternal":true},"3a16-89":{"id":"lodash/filter","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-14"}],"isExternal":true},"3a16-90":{"id":"lodash/isEqual","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-14"}],"isExternal":true},"3a16-91":{"id":"lodash/isFunction","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-14"}],"isExternal":true},"3a16-92":{"id":"lodash/maxBy","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-28"}],"isExternal":true},"3a16-93":{"id":"lodash/remove","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-28"}],"isExternal":true},"3a16-94":{"id":"lodash/endsWith","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-24"}],"isExternal":true},"3a16-95":{"id":"lodash/last","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-24"}],"isExternal":true},"3a16-96":{"id":"lodash/isArray","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-24"},{"uid":"3a16-40"}],"isExternal":true},"3a16-97":{"id":"lodash/reduce","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-24"}],"isExternal":true},"3a16-98":{"id":"lodash/toPairs","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-24"}],"isExternal":true},"3a16-99":{"id":"lodash/includes","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-24"},{"uid":"3a16-40"}],"isExternal":true},"3a16-100":{"id":"lodash/union","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-46"}],"isExternal":true},"3a16-101":{"id":"lodash/range","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-34"}],"isExternal":true},"3a16-102":{"id":"lodash/find","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-44"},{"uid":"3a16-52"},{"uid":"3a16-40"}],"isExternal":true},"3a16-103":{"id":"lodash/has","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-38"}],"isExternal":true},"3a16-104":{"id":"ajv","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-56"}],"isExternal":true},"3a16-105":{"id":"ajv-formats","moduleParts":{},"imported":[],"importedBy":[{"uid":"3a16-56"}],"isExternal":true}},"env":{"rollup":"2.61.1"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
3262
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"jsonforms-core.esm.js","children":[{"name":"src","children":[{"name":"generators","children":[{"uid":"79f9-1","name":"schema.ts"},{"uid":"79f9-59","name":"uischema.ts"},{"uid":"79f9-61","name":"Generate.ts"}]},{"name":"models","children":[{"uid":"79f9-3","name":"draft4.ts"},{"uid":"79f9-5","name":"uischema.ts"}]},{"name":"util","children":[{"uid":"79f9-7","name":"array.ts"},{"uid":"79f9-35","name":"path.ts"},{"uid":"79f9-37","name":"resolvers.ts"},{"uid":"79f9-39","name":"runtime.ts"},{"uid":"79f9-41","name":"util.ts"},{"uid":"79f9-43","name":"label.ts"},{"uid":"79f9-45","name":"renderer.ts"},{"uid":"79f9-47","name":"cell.ts"},{"uid":"79f9-49","name":"combinators.ts"},{"uid":"79f9-51","name":"ids.ts"},{"uid":"79f9-53","name":"schema.ts"},{"uid":"79f9-55","name":"uischema.ts"},{"uid":"79f9-57","name":"validator.ts"}]},{"name":"reducers","children":[{"uid":"79f9-9","name":"cells.ts"},{"uid":"79f9-13","name":"config.ts"},{"uid":"79f9-15","name":"core.ts"},{"uid":"79f9-17","name":"default-data.ts"},{"uid":"79f9-21","name":"i18n.ts"},{"uid":"79f9-23","name":"renderers.ts"},{"uid":"79f9-29","name":"uischemas.ts"},{"uid":"79f9-31","name":"reducers.ts"},{"uid":"79f9-33","name":"selectors.ts"}]},{"uid":"79f9-11","name":"configDefault.ts"},{"name":"i18n/i18nUtil.ts","uid":"79f9-19"},{"name":"testers","children":[{"uid":"79f9-25","name":"testers.ts"},{"uid":"79f9-27","name":"index.ts"}]},{"name":"actions","children":[{"uid":"79f9-63","name":"actions.ts"},{"uid":"79f9-65","name":"index.ts"}]},{"uid":"79f9-67","name":"Helpers.ts"},{"uid":"79f9-69","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"79f9-1":{"renderedLength":3843,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-0"},"79f9-3":{"renderedLength":4050,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-2"},"79f9-5":{"renderedLength":756,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-4"},"79f9-7":{"renderedLength":421,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-6"},"79f9-9":{"renderedLength":294,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-8"},"79f9-11":{"renderedLength":133,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-10"},"79f9-13":{"renderedLength":322,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-12"},"79f9-15":{"renderedLength":10156,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-14"},"79f9-17":{"renderedLength":434,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-16"},"79f9-19":{"renderedLength":2719,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-18"},"79f9-21":{"renderedLength":1754,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-20"},"79f9-23":{"renderedLength":370,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-22"},"79f9-25":{"renderedLength":8403,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-24"},"79f9-27":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-26"},"79f9-29":{"renderedLength":783,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-28"},"79f9-31":{"renderedLength":1846,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-30"},"79f9-33":{"renderedLength":573,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-32"},"79f9-35":{"renderedLength":1333,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-34"},"79f9-37":{"renderedLength":3040,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-36"},"79f9-39":{"renderedLength":3621,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-38"},"79f9-41":{"renderedLength":1498,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-40"},"79f9-43":{"renderedLength":1289,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-42"},"79f9-45":{"renderedLength":13910,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-44"},"79f9-47":{"renderedLength":2622,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-46"},"79f9-49":{"renderedLength":671,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-48"},"79f9-51":{"renderedLength":621,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-50"},"79f9-53":{"renderedLength":365,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-52"},"79f9-55":{"renderedLength":609,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-54"},"79f9-57":{"renderedLength":196,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-56"},"79f9-59":{"renderedLength":3310,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-58"},"79f9-61":{"renderedLength":137,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-60"},"79f9-63":{"renderedLength":3051,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-62"},"79f9-65":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-64"},"79f9-67":{"renderedLength":80,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-66"},"79f9-69":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"79f9-68"}},"nodeMetas":{"79f9-0":{"id":"/src/generators/schema.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-1"},"imported":[],"importedBy":[{"uid":"79f9-70"},{"uid":"79f9-60"}]},"79f9-2":{"id":"/src/models/draft4.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-3"},"imported":[],"importedBy":[{"uid":"79f9-71"}]},"79f9-4":{"id":"/src/models/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-5"},"imported":[],"importedBy":[{"uid":"79f9-71"}]},"79f9-6":{"id":"/src/util/array.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-7"},"imported":[],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-44"}]},"79f9-8":{"id":"/src/reducers/cells.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-9"},"imported":[{"uid":"79f9-64"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"}]},"79f9-10":{"id":"/src/configDefault.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-11"},"imported":[],"importedBy":[{"uid":"79f9-12"}]},"79f9-12":{"id":"/src/reducers/config.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-13"},"imported":[{"uid":"79f9-85"},{"uid":"79f9-64"},{"uid":"79f9-10"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"}]},"79f9-14":{"id":"/src/reducers/core.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-15"},"imported":[{"uid":"79f9-86"},{"uid":"79f9-87"},{"uid":"79f9-88"},{"uid":"79f9-89"},{"uid":"79f9-90"},{"uid":"79f9-91"},{"uid":"79f9-64"},{"uid":"79f9-73"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"},{"uid":"79f9-32"}]},"79f9-16":{"id":"/src/reducers/default-data.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-17"},"imported":[{"uid":"79f9-64"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"},{"uid":"79f9-32"}]},"79f9-18":{"id":"/src/i18n/i18nUtil.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-19"},"imported":[{"uid":"79f9-71"},{"uid":"79f9-72"},{"uid":"79f9-73"}],"importedBy":[{"uid":"79f9-75"}]},"79f9-20":{"id":"/src/reducers/i18n.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-21"},"imported":[{"uid":"79f9-75"},{"uid":"79f9-64"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"}]},"79f9-22":{"id":"/src/reducers/renderers.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-23"},"imported":[{"uid":"79f9-64"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"}]},"79f9-24":{"id":"/src/testers/testers.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-25"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-88"},{"uid":"79f9-94"},{"uid":"79f9-95"},{"uid":"79f9-96"},{"uid":"79f9-97"},{"uid":"79f9-98"},{"uid":"79f9-99"},{"uid":"79f9-73"}],"importedBy":[{"uid":"79f9-26"}]},"79f9-26":{"id":"/src/testers/index.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-27"},"imported":[{"uid":"79f9-24"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-28"}]},"79f9-28":{"id":"/src/reducers/uischemas.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-29"},"imported":[{"uid":"79f9-92"},{"uid":"79f9-93"},{"uid":"79f9-64"},{"uid":"79f9-26"}],"importedBy":[{"uid":"79f9-72"},{"uid":"79f9-30"}]},"79f9-30":{"id":"/src/reducers/reducers.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-31"},"imported":[{"uid":"79f9-14"},{"uid":"79f9-16"},{"uid":"79f9-22"},{"uid":"79f9-28"},{"uid":"79f9-20"},{"uid":"79f9-70"},{"uid":"79f9-8"},{"uid":"79f9-12"},{"uid":"79f9-88"},{"uid":"79f9-72"}],"importedBy":[{"uid":"79f9-72"}]},"79f9-32":{"id":"/src/reducers/selectors.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-33"},"imported":[{"uid":"79f9-88"},{"uid":"79f9-14"},{"uid":"79f9-16"}],"importedBy":[{"uid":"79f9-72"}]},"79f9-34":{"id":"/src/util/path.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-35"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-101"},{"uid":"79f9-71"}],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-42"},{"uid":"79f9-44"},{"uid":"79f9-36"},{"uid":"79f9-38"},{"uid":"79f9-40"}]},"79f9-36":{"id":"/src/util/resolvers.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-37"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-88"},{"uid":"79f9-34"}],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-38"},{"uid":"79f9-40"}]},"79f9-38":{"id":"/src/util/runtime.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-39"},"imported":[{"uid":"79f9-103"},{"uid":"79f9-71"},{"uid":"79f9-36"},{"uid":"79f9-34"},{"uid":"79f9-72"}],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-46"},{"uid":"79f9-44"},{"uid":"79f9-40"}]},"79f9-40":{"id":"/src/util/util.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-41"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-96"},{"uid":"79f9-99"},{"uid":"79f9-102"},{"uid":"79f9-36"},{"uid":"79f9-34"},{"uid":"79f9-38"}],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-46"},{"uid":"79f9-48"},{"uid":"79f9-44"}]},"79f9-42":{"id":"/src/util/label.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-43"},"imported":[{"uid":"79f9-83"},{"uid":"79f9-34"}],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-44"}]},"79f9-44":{"id":"/src/util/renderer.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-45"},"imported":[{"uid":"79f9-88"},{"uid":"79f9-71"},{"uid":"79f9-102"},{"uid":"79f9-72"},{"uid":"79f9-38"},{"uid":"79f9-42"},{"uid":"79f9-6"},{"uid":"79f9-40"},{"uid":"79f9-34"},{"uid":"79f9-64"},{"uid":"79f9-75"}],"importedBy":[{"uid":"79f9-73"},{"uid":"79f9-46"}]},"79f9-46":{"id":"/src/util/cell.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-47"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-100"},{"uid":"79f9-72"},{"uid":"79f9-40"},{"uid":"79f9-38"},{"uid":"79f9-44"},{"uid":"79f9-75"}],"importedBy":[{"uid":"79f9-73"}]},"79f9-48":{"id":"/src/util/combinators.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-49"},"imported":[{"uid":"79f9-72"},{"uid":"79f9-40"}],"importedBy":[{"uid":"79f9-73"}]},"79f9-50":{"id":"/src/util/ids.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-51"},"imported":[],"importedBy":[{"uid":"79f9-73"}]},"79f9-52":{"id":"/src/util/schema.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-53"},"imported":[{"uid":"79f9-102"}],"importedBy":[{"uid":"79f9-73"}]},"79f9-54":{"id":"/src/util/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-55"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-71"}],"importedBy":[{"uid":"79f9-73"}]},"79f9-56":{"id":"/src/util/validator.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-57"},"imported":[{"uid":"79f9-104"},{"uid":"79f9-105"}],"importedBy":[{"uid":"79f9-73"}]},"79f9-58":{"id":"/src/generators/uischema.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-59"},"imported":[{"uid":"79f9-82"},{"uid":"79f9-83"},{"uid":"79f9-84"},{"uid":"79f9-71"},{"uid":"79f9-73"}],"importedBy":[{"uid":"79f9-70"},{"uid":"79f9-60"}]},"79f9-60":{"id":"/src/generators/Generate.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-61"},"imported":[{"uid":"79f9-0"},{"uid":"79f9-58"}],"importedBy":[{"uid":"79f9-70"}]},"79f9-62":{"id":"/src/actions/actions.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-63"},"imported":[{"uid":"79f9-70"}],"importedBy":[{"uid":"79f9-64"}]},"79f9-64":{"id":"/src/actions/index.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-65"},"imported":[{"uid":"79f9-62"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-8"},{"uid":"79f9-12"},{"uid":"79f9-14"},{"uid":"79f9-16"},{"uid":"79f9-20"},{"uid":"79f9-22"},{"uid":"79f9-28"},{"uid":"79f9-44"}]},"79f9-66":{"id":"/src/Helpers.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-67"},"imported":[{"uid":"79f9-73"}],"importedBy":[{"uid":"79f9-68"}]},"79f9-68":{"id":"/src/index.ts","moduleParts":{"jsonforms-core.esm.js":"79f9-69"},"imported":[{"uid":"79f9-64"},{"uid":"79f9-70"},{"uid":"79f9-71"},{"uid":"79f9-72"},{"uid":"79f9-26"},{"uid":"79f9-73"},{"uid":"79f9-66"},{"uid":"79f9-74"},{"uid":"79f9-75"}],"importedBy":[],"isEntry":true},"79f9-70":{"id":"/src/generators/index.ts","moduleParts":{},"imported":[{"uid":"79f9-60"},{"uid":"79f9-0"},{"uid":"79f9-58"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-62"},{"uid":"79f9-30"}]},"79f9-71":{"id":"/src/models/index.ts","moduleParts":{},"imported":[{"uid":"79f9-2"},{"uid":"79f9-76"},{"uid":"79f9-77"},{"uid":"79f9-78"},{"uid":"79f9-4"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-58"},{"uid":"79f9-34"},{"uid":"79f9-44"},{"uid":"79f9-38"},{"uid":"79f9-54"},{"uid":"79f9-18"}]},"79f9-72":{"id":"/src/reducers/index.ts","moduleParts":{},"imported":[{"uid":"79f9-8"},{"uid":"79f9-12"},{"uid":"79f9-14"},{"uid":"79f9-16"},{"uid":"79f9-20"},{"uid":"79f9-30"},{"uid":"79f9-22"},{"uid":"79f9-32"},{"uid":"79f9-28"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-30"},{"uid":"79f9-46"},{"uid":"79f9-48"},{"uid":"79f9-44"},{"uid":"79f9-38"},{"uid":"79f9-18"}]},"79f9-73":{"id":"/src/util/index.ts","moduleParts":{},"imported":[{"uid":"79f9-6"},{"uid":"79f9-46"},{"uid":"79f9-48"},{"uid":"79f9-79"},{"uid":"79f9-50"},{"uid":"79f9-42"},{"uid":"79f9-34"},{"uid":"79f9-44"},{"uid":"79f9-36"},{"uid":"79f9-38"},{"uid":"79f9-52"},{"uid":"79f9-80"},{"uid":"79f9-54"},{"uid":"79f9-40"},{"uid":"79f9-56"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-66"},{"uid":"79f9-58"},{"uid":"79f9-14"},{"uid":"79f9-24"},{"uid":"79f9-18"}]},"79f9-74":{"id":"/src/store.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-68"}]},"79f9-75":{"id":"/src/i18n/index.ts","moduleParts":{},"imported":[{"uid":"79f9-81"},{"uid":"79f9-18"}],"importedBy":[{"uid":"79f9-68"},{"uid":"79f9-20"},{"uid":"79f9-46"},{"uid":"79f9-44"}]},"79f9-76":{"id":"/src/models/jsonSchema.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-71"}]},"79f9-77":{"id":"/src/models/jsonSchema4.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-71"}]},"79f9-78":{"id":"/src/models/jsonSchema7.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-71"}]},"79f9-79":{"id":"/src/util/Formatted.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-73"}]},"79f9-80":{"id":"/src/util/type.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-73"}]},"79f9-81":{"id":"/src/i18n/i18nTypes.ts","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-75"}]},"79f9-82":{"id":"lodash/isEmpty","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-58"},{"uid":"79f9-24"},{"uid":"79f9-46"},{"uid":"79f9-34"},{"uid":"79f9-36"},{"uid":"79f9-54"},{"uid":"79f9-40"}],"isExternal":true},"79f9-83":{"id":"lodash/startCase","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-58"},{"uid":"79f9-42"}],"isExternal":true},"79f9-84":{"id":"lodash/keys","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-58"}],"isExternal":true},"79f9-85":{"id":"lodash/merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-12"}],"isExternal":true},"79f9-86":{"id":"lodash/cloneDeep","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-14"}],"isExternal":true},"79f9-87":{"id":"lodash/fp/set","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-14"}],"isExternal":true},"79f9-88":{"id":"lodash/get","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-14"},{"uid":"79f9-30"},{"uid":"79f9-32"},{"uid":"79f9-24"},{"uid":"79f9-44"},{"uid":"79f9-36"}],"isExternal":true},"79f9-89":{"id":"lodash/filter","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-14"}],"isExternal":true},"79f9-90":{"id":"lodash/isEqual","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-14"}],"isExternal":true},"79f9-91":{"id":"lodash/isFunction","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-14"}],"isExternal":true},"79f9-92":{"id":"lodash/maxBy","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-28"}],"isExternal":true},"79f9-93":{"id":"lodash/remove","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-28"}],"isExternal":true},"79f9-94":{"id":"lodash/endsWith","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-24"}],"isExternal":true},"79f9-95":{"id":"lodash/last","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-24"}],"isExternal":true},"79f9-96":{"id":"lodash/isArray","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-24"},{"uid":"79f9-40"}],"isExternal":true},"79f9-97":{"id":"lodash/reduce","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-24"}],"isExternal":true},"79f9-98":{"id":"lodash/toPairs","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-24"}],"isExternal":true},"79f9-99":{"id":"lodash/includes","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-24"},{"uid":"79f9-40"}],"isExternal":true},"79f9-100":{"id":"lodash/union","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-46"}],"isExternal":true},"79f9-101":{"id":"lodash/range","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-34"}],"isExternal":true},"79f9-102":{"id":"lodash/find","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-44"},{"uid":"79f9-52"},{"uid":"79f9-40"}],"isExternal":true},"79f9-103":{"id":"lodash/has","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-38"}],"isExternal":true},"79f9-104":{"id":"ajv","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-56"}],"isExternal":true},"79f9-105":{"id":"ajv-formats","moduleParts":{},"imported":[],"importedBy":[{"uid":"79f9-56"}],"isExternal":true}},"env":{"rollup":"2.61.1"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
3263
3263
|
|
|
3264
3264
|
const run = () => {
|
|
3265
3265
|
const width = window.innerWidth;
|
package/test/testers.test.ts
CHANGED
|
@@ -46,7 +46,8 @@ import {
|
|
|
46
46
|
scopeEndIs,
|
|
47
47
|
scopeEndsWith,
|
|
48
48
|
uiTypeIs,
|
|
49
|
-
isOneOfEnumControl
|
|
49
|
+
isOneOfEnumControl,
|
|
50
|
+
TesterContext
|
|
50
51
|
} from '../src/testers';
|
|
51
52
|
import {
|
|
52
53
|
ControlElement,
|
|
@@ -57,6 +58,9 @@ import {
|
|
|
57
58
|
|
|
58
59
|
const test = anyTest as TestInterface<{ uischema: ControlElement }>;
|
|
59
60
|
|
|
61
|
+
const createTesterContext =
|
|
62
|
+
(rootSchema: JsonSchema, config?: any): TesterContext => ({ rootSchema, config });
|
|
63
|
+
|
|
60
64
|
test.beforeEach(t => {
|
|
61
65
|
t.context.uischema = {
|
|
62
66
|
type: 'Control',
|
|
@@ -75,8 +79,9 @@ test('schemaTypeIs should check type sub-schema of control', t => {
|
|
|
75
79
|
type: 'Control',
|
|
76
80
|
scope: '#/properties/foo'
|
|
77
81
|
};
|
|
78
|
-
|
|
79
|
-
t.
|
|
82
|
+
const testerContext = createTesterContext(schema);
|
|
83
|
+
t.true(schemaTypeIs('string')(uischema, schema, testerContext));
|
|
84
|
+
t.false(schemaTypeIs('integer')(uischema, schema, testerContext));
|
|
80
85
|
});
|
|
81
86
|
|
|
82
87
|
test('schemaTypeIs should return false for non-control UI schema elements', t => {
|
|
@@ -90,7 +95,8 @@ test('schemaTypeIs should return false for non-control UI schema elements', t =>
|
|
|
90
95
|
type: 'Label',
|
|
91
96
|
text: 'some text'
|
|
92
97
|
};
|
|
93
|
-
|
|
98
|
+
const testerContext = createTesterContext(schema);
|
|
99
|
+
t.false(schemaTypeIs('integer')(label, schema, testerContext));
|
|
94
100
|
});
|
|
95
101
|
|
|
96
102
|
test('schemaTypeIs should return false for control pointing to invalid sub-schema', t => {
|
|
@@ -104,7 +110,8 @@ test('schemaTypeIs should return false for control pointing to invalid sub-schem
|
|
|
104
110
|
foo: { type: 'string' }
|
|
105
111
|
}
|
|
106
112
|
};
|
|
107
|
-
|
|
113
|
+
const testerContext = createTesterContext(schema);
|
|
114
|
+
t.false(schemaTypeIs('string')(uischema, schema, testerContext));
|
|
108
115
|
});
|
|
109
116
|
|
|
110
117
|
test('schemaTypeIs should return true for array type', t => {
|
|
@@ -118,8 +125,9 @@ test('schemaTypeIs should return true for array type', t => {
|
|
|
118
125
|
type: 'Control',
|
|
119
126
|
scope: '#/properties/foo'
|
|
120
127
|
};
|
|
121
|
-
|
|
122
|
-
t.true(schemaTypeIs('
|
|
128
|
+
const testerContext = createTesterContext(schema);
|
|
129
|
+
t.true(schemaTypeIs('string')(uischema, schema, testerContext));
|
|
130
|
+
t.true(schemaTypeIs('integer')(uischema, schema, testerContext));
|
|
123
131
|
});
|
|
124
132
|
|
|
125
133
|
test('formatIs should check the format of a resolved sub-schema', t => {
|
|
@@ -136,7 +144,8 @@ test('formatIs should check the format of a resolved sub-schema', t => {
|
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
146
|
};
|
|
139
|
-
|
|
147
|
+
const testerContext = createTesterContext(schema);
|
|
148
|
+
t.true(formatIs('date-time')(uischema, schema, testerContext));
|
|
140
149
|
});
|
|
141
150
|
|
|
142
151
|
test('uiTypeIs', t => {
|
|
@@ -183,8 +192,9 @@ test('schemaMatches should check type sub-schema of control via predicate', t =>
|
|
|
183
192
|
type: 'Control',
|
|
184
193
|
scope: '#/properties/foo'
|
|
185
194
|
};
|
|
195
|
+
const testerContext = createTesterContext(schema);
|
|
186
196
|
t.true(
|
|
187
|
-
schemaMatches(subSchema => subSchema.type === 'string')(uischema, schema,
|
|
197
|
+
schemaMatches(subSchema => subSchema.type === 'string')(uischema, schema, testerContext)
|
|
188
198
|
);
|
|
189
199
|
});
|
|
190
200
|
|
|
@@ -198,8 +208,9 @@ test('schemaMatches should check type sub-schema of control via predicate also w
|
|
|
198
208
|
type: 'Control',
|
|
199
209
|
scope: '#/properties/foo'
|
|
200
210
|
};
|
|
211
|
+
const testerContext = createTesterContext(schema);
|
|
201
212
|
t.true(
|
|
202
|
-
schemaMatches(subSchema => subSchema.type === 'string')(uischema, schema,
|
|
213
|
+
schemaMatches(subSchema => subSchema.type === 'string')(uischema, schema, testerContext)
|
|
203
214
|
);
|
|
204
215
|
});
|
|
205
216
|
|
|
@@ -214,7 +225,8 @@ test('schemaMatches should return false for non-control UI schema elements', t =
|
|
|
214
225
|
type: 'Label',
|
|
215
226
|
text: 'some text'
|
|
216
227
|
};
|
|
217
|
-
|
|
228
|
+
const testerContext = createTesterContext(schema);
|
|
229
|
+
t.false(schemaMatches(() => false)(label, schema, testerContext));
|
|
218
230
|
});
|
|
219
231
|
|
|
220
232
|
test('schemaMatches should return false for control pointing to invalid subschema', t => {
|
|
@@ -228,7 +240,8 @@ test('schemaMatches should return false for control pointing to invalid subschem
|
|
|
228
240
|
type: 'Control',
|
|
229
241
|
scope: '#/properties/bar'
|
|
230
242
|
};
|
|
231
|
-
|
|
243
|
+
const testerContext = createTesterContext(schema);
|
|
244
|
+
t.false(schemaMatches(() => false)(uischema, schema, testerContext));
|
|
232
245
|
});
|
|
233
246
|
|
|
234
247
|
test('scopeEndsWith checks whether the ref of a control ends with a certain string', t => {
|
|
@@ -274,7 +287,8 @@ test('and should allow to compose multiple testers', t => {
|
|
|
274
287
|
type: 'Control',
|
|
275
288
|
scope: '#/properties/foo'
|
|
276
289
|
};
|
|
277
|
-
|
|
290
|
+
const testerContext = createTesterContext(schema);
|
|
291
|
+
t.true(and(schemaTypeIs('string'), scopeEndIs('foo'))(uischema, schema, testerContext));
|
|
278
292
|
});
|
|
279
293
|
|
|
280
294
|
test('or should allow to compose multiple testers', t => {
|
|
@@ -288,8 +302,9 @@ test('or should allow to compose multiple testers', t => {
|
|
|
288
302
|
type: 'Control',
|
|
289
303
|
scope: '#/properties/foo'
|
|
290
304
|
};
|
|
305
|
+
const testerContext = createTesterContext(schema);
|
|
291
306
|
t.true(
|
|
292
|
-
or(schemaTypeIs('integer'), optionIs('slider', true))(uischema, schema,
|
|
307
|
+
or(schemaTypeIs('integer'), optionIs('slider', true))(uischema, schema, testerContext)
|
|
293
308
|
);
|
|
294
309
|
});
|
|
295
310
|
|
|
@@ -308,7 +323,7 @@ test('tester isPrimitiveArrayControl', t => {
|
|
|
308
323
|
}
|
|
309
324
|
};
|
|
310
325
|
t.true(
|
|
311
|
-
isPrimitiveArrayControl(control, schema, schema),
|
|
326
|
+
isPrimitiveArrayControl(control, schema, createTesterContext(schema)),
|
|
312
327
|
`Primitive array tester was not triggered for 'integer' schema type`
|
|
313
328
|
);
|
|
314
329
|
const schemaWithRefs = {
|
|
@@ -322,7 +337,7 @@ test('tester isPrimitiveArrayControl', t => {
|
|
|
322
337
|
}
|
|
323
338
|
};
|
|
324
339
|
t.true(
|
|
325
|
-
isPrimitiveArrayControl(control, schemaWithRefs, schemaWithRefs),
|
|
340
|
+
isPrimitiveArrayControl(control, schemaWithRefs, createTesterContext(schemaWithRefs)),
|
|
326
341
|
`Primitive array tester was not triggered for 'integer' schema type with refs`
|
|
327
342
|
);
|
|
328
343
|
const objectSchema = {
|
|
@@ -335,7 +350,7 @@ test('tester isPrimitiveArrayControl', t => {
|
|
|
335
350
|
}
|
|
336
351
|
};
|
|
337
352
|
t.false(
|
|
338
|
-
isPrimitiveArrayControl(control, objectSchema, objectSchema),
|
|
353
|
+
isPrimitiveArrayControl(control, objectSchema, createTesterContext(objectSchema)),
|
|
339
354
|
`Primitive array tester was not triggered for 'object' schema type`
|
|
340
355
|
);
|
|
341
356
|
});
|
|
@@ -401,7 +416,7 @@ test('tester isObjectArrayControl', t => {
|
|
|
401
416
|
}
|
|
402
417
|
}
|
|
403
418
|
};
|
|
404
|
-
t.true(isObjectArrayControl(control, schema, schema));
|
|
419
|
+
t.true(isObjectArrayControl(control, schema, createTesterContext(schema)));
|
|
405
420
|
const schema_noType: JsonSchema = {
|
|
406
421
|
type: 'object',
|
|
407
422
|
properties: {
|
|
@@ -416,7 +431,7 @@ test('tester isObjectArrayControl', t => {
|
|
|
416
431
|
}
|
|
417
432
|
}
|
|
418
433
|
};
|
|
419
|
-
t.true(isObjectArrayControl(control, schema_noType, schema_noType));
|
|
434
|
+
t.true(isObjectArrayControl(control, schema_noType, createTesterContext(schema_noType)));
|
|
420
435
|
const schema_innerAllOf: JsonSchema = {
|
|
421
436
|
type: 'object',
|
|
422
437
|
properties: {
|
|
@@ -439,7 +454,7 @@ test('tester isObjectArrayControl', t => {
|
|
|
439
454
|
}
|
|
440
455
|
}
|
|
441
456
|
};
|
|
442
|
-
t.true(isObjectArrayControl(control, schema_innerAllOf, schema_innerAllOf));
|
|
457
|
+
t.true(isObjectArrayControl(control, schema_innerAllOf, createTesterContext(schema_innerAllOf)));
|
|
443
458
|
|
|
444
459
|
const schemaWithRefs = {
|
|
445
460
|
definitions: {
|
|
@@ -461,7 +476,8 @@ test('tester isObjectArrayControl', t => {
|
|
|
461
476
|
}
|
|
462
477
|
}
|
|
463
478
|
}
|
|
464
|
-
|
|
479
|
+
const testerContext = createTesterContext(schemaWithRefs);
|
|
480
|
+
t.true(isObjectArrayControl(control, schemaWithRefs, testerContext));
|
|
465
481
|
});
|
|
466
482
|
|
|
467
483
|
test('isBooleanControl', t => {
|
|
@@ -801,7 +817,7 @@ test('tester isObjectArrayWithNesting', t => {
|
|
|
801
817
|
t.true(isObjectArrayWithNesting(uischema, nestedSchema, undefined));
|
|
802
818
|
t.true(isObjectArrayWithNesting(uischema, nestedSchema2, undefined));
|
|
803
819
|
t.true(isObjectArrayWithNesting(uischema, nestedSchema3, undefined));
|
|
804
|
-
t.true(isObjectArrayWithNesting(uischema, nestedSchemaWithRef, nestedSchemaWithRef));
|
|
820
|
+
t.true(isObjectArrayWithNesting(uischema, nestedSchemaWithRef, createTesterContext(nestedSchemaWithRef)));
|
|
805
821
|
|
|
806
822
|
t.false(isObjectArrayWithNesting(uischemaOptions.default, schema, undefined));
|
|
807
823
|
t.true(isObjectArrayWithNesting(uischemaOptions.generate, schema, undefined));
|
|
@@ -872,5 +888,6 @@ test('tester isOneOfEnumControl', t => {
|
|
|
872
888
|
}
|
|
873
889
|
}
|
|
874
890
|
}
|
|
875
|
-
|
|
891
|
+
const testerContext = createTesterContext(schemaWithRefs);
|
|
892
|
+
t.true(isOneOfEnumControl(control, schemaWithRefs, testerContext));
|
|
876
893
|
});
|
|
@@ -32,10 +32,9 @@ import { JsonFormsState } from '../../src/store';
|
|
|
32
32
|
import { coreReducer, JsonFormsCore } from '../../src/reducers/core';
|
|
33
33
|
import { Dispatch } from '../../src/util/type';
|
|
34
34
|
import { CoreActions, init, setValidationMode, update, UpdateAction, UPDATE_DATA } from '../../src/actions/actions';
|
|
35
|
-
import { ControlElement, RuleEffect, UISchemaElement } from '../../src/models/uischema';
|
|
36
|
-
import { computeLabel, createDefaultValue, mapDispatchToArrayControlProps, mapDispatchToControlProps, mapDispatchToMultiEnumProps, mapStateToAnyOfProps, mapStateToArrayLayoutProps, mapStateToControlProps, mapStateToEnumControlProps, mapStateToJsonFormsRendererProps, mapStateToLayoutProps, mapStateToMultiEnumControlProps, mapStateToOneOfEnumControlProps, mapStateToOneOfProps, OwnPropsOfControl } from '../../src/util/renderer';
|
|
35
|
+
import { ControlElement, LabelElement, RuleEffect, UISchemaElement } from '../../src/models/uischema';
|
|
36
|
+
import { computeLabel, createDefaultValue, mapDispatchToArrayControlProps, mapDispatchToControlProps, mapDispatchToMultiEnumProps, mapStateToAnyOfProps, mapStateToArrayLayoutProps, mapStateToControlProps, mapStateToEnumControlProps, mapStateToJsonFormsRendererProps, mapStateToLabelProps, mapStateToLayoutProps, mapStateToMultiEnumControlProps, mapStateToOneOfEnumControlProps, mapStateToOneOfProps, OwnPropsOfControl } from '../../src/util/renderer';
|
|
37
37
|
import { clearAllIds } from '../../src/util/ids';
|
|
38
|
-
import { generateDefaultUISchema } from '../../src/generators/uischema';
|
|
39
38
|
import { JsonSchema } from '../../src/models/jsonSchema';
|
|
40
39
|
import { rankWith } from '../../src/testers/testers';
|
|
41
40
|
import { createAjv } from '../../src/util/validator';
|
|
@@ -495,7 +494,7 @@ test('createDefaultValue', t => {
|
|
|
495
494
|
t.deepEqual(createDefaultValue({ type: 'something' }), {});
|
|
496
495
|
});
|
|
497
496
|
|
|
498
|
-
test(`
|
|
497
|
+
test(`mapStateToJsonFormsRendererProps should use registered UI schema given ownProps schema`, t => {
|
|
499
498
|
const store = mockStore(createState(coreUISchema));
|
|
500
499
|
const schema = {
|
|
501
500
|
type: 'object',
|
|
@@ -507,16 +506,16 @@ test(`mapStateToDispatchRendererProps should generate UI schema given ownProps s
|
|
|
507
506
|
};
|
|
508
507
|
|
|
509
508
|
const props = mapStateToJsonFormsRendererProps(store.getState(), { schema });
|
|
510
|
-
t.deepEqual(props.uischema,
|
|
509
|
+
t.deepEqual(props.uischema, coreUISchema);
|
|
511
510
|
});
|
|
512
511
|
|
|
513
|
-
test(`
|
|
512
|
+
test(`mapStateToJsonFormsRendererProps should use registered UI schema given no ownProps`, t => {
|
|
514
513
|
const store = mockStore(createState(coreUISchema));
|
|
515
514
|
const props = mapStateToJsonFormsRendererProps(store.getState(), {});
|
|
516
515
|
t.deepEqual(props.uischema, coreUISchema);
|
|
517
516
|
});
|
|
518
517
|
|
|
519
|
-
test(`
|
|
518
|
+
test(`mapStateToJsonFormsRendererProps should use UI schema if given via ownProps`, t => {
|
|
520
519
|
const store = mockStore(createState(coreUISchema));
|
|
521
520
|
const schema = {
|
|
522
521
|
type: 'object',
|
|
@@ -1730,3 +1729,102 @@ test('mapStateToOneOfEnumControlProps - i18n - i18n key translation', t => {
|
|
|
1730
1729
|
const props = mapStateToOneOfEnumControlProps(state, ownProps);
|
|
1731
1730
|
t.is(props.options[0].label, 'my message');
|
|
1732
1731
|
});
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
|
+
test('mapStateToLabelProps - i18n - should not crash without i18n', t => {
|
|
1735
|
+
const labelUISchema : LabelElement = {
|
|
1736
|
+
type: 'Label',
|
|
1737
|
+
text: 'foo',
|
|
1738
|
+
i18n: 'bar'
|
|
1739
|
+
}
|
|
1740
|
+
const ownProps = {
|
|
1741
|
+
uischema: labelUISchema
|
|
1742
|
+
};
|
|
1743
|
+
const state: JsonFormsState = createState(labelUISchema);
|
|
1744
|
+
state.jsonforms.i18n = undefined;
|
|
1745
|
+
|
|
1746
|
+
const props = mapStateToLabelProps(state, ownProps);
|
|
1747
|
+
t.is(props.text, 'foo');
|
|
1748
|
+
});
|
|
1749
|
+
|
|
1750
|
+
test('mapStateToLabelProps - i18n - default translation has no effect', t => {
|
|
1751
|
+
const labelUISchema : LabelElement = {
|
|
1752
|
+
type: 'Label',
|
|
1753
|
+
text: 'foo',
|
|
1754
|
+
i18n: 'bar'
|
|
1755
|
+
}
|
|
1756
|
+
const ownProps = {
|
|
1757
|
+
uischema: labelUISchema
|
|
1758
|
+
};
|
|
1759
|
+
const state: JsonFormsState = createState(labelUISchema);
|
|
1760
|
+
state.jsonforms.i18n = defaultJsonFormsI18nState;
|
|
1761
|
+
|
|
1762
|
+
const props = mapStateToLabelProps(state, ownProps);
|
|
1763
|
+
t.is(props.text, 'foo');
|
|
1764
|
+
});
|
|
1765
|
+
|
|
1766
|
+
test('mapStateToLabelProps - i18n - default key translation', t => {
|
|
1767
|
+
const labelUISchema : LabelElement = {
|
|
1768
|
+
type: 'Label',
|
|
1769
|
+
text: 'foo'
|
|
1770
|
+
}
|
|
1771
|
+
const ownProps = {
|
|
1772
|
+
uischema: labelUISchema
|
|
1773
|
+
};
|
|
1774
|
+
const state: JsonFormsState = createState(labelUISchema);
|
|
1775
|
+
state.jsonforms.i18n = defaultJsonFormsI18nState;
|
|
1776
|
+
state.jsonforms.i18n.translate = (key: string, defaultMessage: string | undefined) => {
|
|
1777
|
+
switch(key){
|
|
1778
|
+
case 'foo': return 'my message';
|
|
1779
|
+
default: return defaultMessage;
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
const props = mapStateToLabelProps(state, ownProps);
|
|
1784
|
+
t.is(props.text, 'my message');
|
|
1785
|
+
});
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
test('mapStateToLabelProps - i18n - default message translation', t => {
|
|
1789
|
+
const labelUISchema : LabelElement = {
|
|
1790
|
+
type: 'Label',
|
|
1791
|
+
text: 'foo',
|
|
1792
|
+
i18n: 'bar'
|
|
1793
|
+
}
|
|
1794
|
+
const ownProps = {
|
|
1795
|
+
uischema: labelUISchema
|
|
1796
|
+
};
|
|
1797
|
+
const state: JsonFormsState = createState(labelUISchema);
|
|
1798
|
+
state.jsonforms.i18n = defaultJsonFormsI18nState;
|
|
1799
|
+
state.jsonforms.i18n.translate = (_key: string, defaultMessage: string | undefined) => {
|
|
1800
|
+
switch(defaultMessage){
|
|
1801
|
+
case 'foo': return 'my message';
|
|
1802
|
+
default: return defaultMessage;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
const props = mapStateToLabelProps(state, ownProps);
|
|
1807
|
+
t.is(props.text, 'my message');
|
|
1808
|
+
});
|
|
1809
|
+
|
|
1810
|
+
test('mapStateToLabelProps - i18n - i18n key translation', t => {
|
|
1811
|
+
const labelUISchema : LabelElement = {
|
|
1812
|
+
type: 'Label',
|
|
1813
|
+
text: 'foo',
|
|
1814
|
+
i18n: 'bar'
|
|
1815
|
+
}
|
|
1816
|
+
const ownProps = {
|
|
1817
|
+
uischema: labelUISchema
|
|
1818
|
+
};
|
|
1819
|
+
const state: JsonFormsState = createState(labelUISchema);
|
|
1820
|
+
state.jsonforms.i18n = defaultJsonFormsI18nState;
|
|
1821
|
+
state.jsonforms.i18n.translate = (key: string, defaultMessage: string | undefined): string | undefined => {
|
|
1822
|
+
switch(key){
|
|
1823
|
+
case 'bar.text': return 'my message';
|
|
1824
|
+
default: return defaultMessage;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
const props = mapStateToLabelProps(state, ownProps);
|
|
1829
|
+
t.is(props.text, 'my message');
|
|
1830
|
+
});
|