@jsonforms/core 2.5.2-alpha.0 → 3.0.0-alpha.2

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.
Files changed (273) hide show
  1. package/README.md +1 -1
  2. package/docs/assets/js/search.json +1 -1
  3. package/docs/enums/ruleeffect.html +4 -4
  4. package/docs/globals.html +1061 -1120
  5. package/docs/index.html +64 -91
  6. package/docs/interfaces/addcellrendereraction.html +3 -3
  7. package/docs/interfaces/addrendereraction.html +3 -3
  8. package/docs/interfaces/adduischemaaction.html +3 -3
  9. package/docs/interfaces/andcondition.html +2 -2
  10. package/docs/interfaces/arraycontrolprops.html +22 -22
  11. package/docs/interfaces/arraylayoutprops.html +22 -22
  12. package/docs/interfaces/categorization.html +5 -5
  13. package/docs/interfaces/category.html +5 -5
  14. package/docs/interfaces/cellprops.html +14 -14
  15. package/docs/interfaces/combinatorrendererprops.html +13 -13
  16. package/docs/interfaces/combinatorsubschemarenderinfo.html +3 -3
  17. package/docs/interfaces/composablecondition.html +2 -2
  18. package/docs/interfaces/condition.html +1 -1
  19. package/docs/interfaces/controlelement.html +5 -5
  20. package/docs/interfaces/controlprops.html +17 -17
  21. package/docs/interfaces/controlstate.html +2 -2
  22. package/docs/interfaces/controlwithdetailprops.html +18 -18
  23. package/docs/interfaces/dispatchcellprops.html +13 -13
  24. package/docs/interfaces/dispatchcellstateprops.html +13 -13
  25. package/docs/interfaces/dispatchpropsofarraycontrol.html +4 -4
  26. package/docs/interfaces/dispatchpropsofcontrol.html +1 -1
  27. package/docs/interfaces/dispatchpropsofmultienumcontrol.html +2 -2
  28. package/docs/interfaces/enumcellprops.html +15 -15
  29. package/docs/interfaces/enumoption.html +2 -2
  30. package/docs/interfaces/formatted.html +2 -2
  31. package/docs/interfaces/grouplayout.html +5 -5
  32. package/docs/interfaces/horizontallayout.html +4 -4
  33. package/docs/interfaces/initaction.html +6 -6
  34. package/docs/interfaces/initactionoptions.html +3 -17
  35. package/docs/interfaces/jsonformscellrendererregistryentry.html +2 -2
  36. package/docs/interfaces/jsonformscore.html +7 -21
  37. package/docs/interfaces/jsonformsdefaultdataregistryentry.html +2 -2
  38. package/docs/interfaces/jsonformsextendedstate.html +1 -1
  39. package/docs/interfaces/{jsonformslocalestate.html → jsonformsi18nstate.html} +20 -20
  40. package/docs/interfaces/jsonformsprops.html +9 -24
  41. package/docs/interfaces/jsonformsrendererregistryentry.html +2 -2
  42. package/docs/interfaces/jsonformsstate.html +1 -1
  43. package/docs/interfaces/jsonformsstore.html +5 -5
  44. package/docs/interfaces/jsonformssubstates.html +18 -8
  45. package/docs/interfaces/jsonformsuischemaregistryentry.html +2 -2
  46. package/docs/interfaces/labeldescription.html +2 -2
  47. package/docs/interfaces/labelelement.html +4 -4
  48. package/docs/interfaces/layout.html +4 -4
  49. package/docs/interfaces/layoutprops.html +10 -10
  50. package/docs/interfaces/leafcondition.html +3 -3
  51. package/docs/interfaces/orcondition.html +2 -2
  52. package/docs/interfaces/ownpropsofcell.html +10 -10
  53. package/docs/interfaces/ownpropsofcontrol.html +9 -9
  54. package/docs/interfaces/ownpropsofenum.html +1 -1
  55. package/docs/interfaces/ownpropsofenumcell.html +11 -11
  56. package/docs/interfaces/ownpropsofjsonformsrenderer.html +8 -8
  57. package/docs/interfaces/ownpropsoflayout.html +9 -9
  58. package/docs/interfaces/ownpropsofmasterlistitem.html +6 -6
  59. package/docs/interfaces/ownpropsofrenderer.html +8 -8
  60. package/docs/interfaces/registerdefaultdataaction.html +3 -3
  61. package/docs/interfaces/removecellrendereraction.html +3 -3
  62. package/docs/interfaces/removerendereraction.html +3 -3
  63. package/docs/interfaces/removeuischemaaction.html +2 -2
  64. package/docs/interfaces/rendererprops.html +9 -9
  65. package/docs/interfaces/rule.html +2 -2
  66. package/docs/interfaces/schemabasedcondition.html +3 -3
  67. package/docs/interfaces/scopable.html +1 -1
  68. package/docs/interfaces/setajvaction.html +3 -3
  69. package/docs/interfaces/setconfigaction.html +2 -2
  70. package/docs/interfaces/setlocaleaction.html +3 -3
  71. package/docs/interfaces/setschemaaction.html +2 -2
  72. package/docs/interfaces/{setlocalizeduischemasaction.html → settranslatoraction.html} +29 -15
  73. package/docs/interfaces/setuischemaaction.html +2 -2
  74. package/docs/interfaces/setvalidationmodeaction.html +2 -2
  75. package/docs/interfaces/statepropsofarraycontrol.html +18 -18
  76. package/docs/interfaces/statepropsofarraylayout.html +18 -18
  77. package/docs/interfaces/statepropsofcell.html +13 -13
  78. package/docs/interfaces/statepropsofcombinator.html +12 -12
  79. package/docs/interfaces/statepropsofcontrol.html +16 -16
  80. package/docs/interfaces/statepropsofcontrolwithdetail.html +17 -17
  81. package/docs/interfaces/statepropsofenumcell.html +14 -14
  82. package/docs/interfaces/statepropsofjsonformsrenderer.html +9 -23
  83. package/docs/interfaces/statepropsoflayout.html +10 -10
  84. package/docs/interfaces/statepropsofmasteritem.html +7 -7
  85. package/docs/interfaces/statepropsofrenderer.html +9 -9
  86. package/docs/interfaces/statepropsofscopedrenderer.html +12 -12
  87. package/docs/interfaces/uischemaelement.html +3 -3
  88. package/docs/interfaces/unregisterdefaultdataaction.html +2 -2
  89. package/docs/interfaces/updateaction.html +3 -3
  90. package/docs/interfaces/updatecoreaction.html +6 -6
  91. package/docs/interfaces/updateerrorsaction.html +2 -2
  92. package/docs/interfaces/{setlocalizedschemasaction.html → updatei18naction.html} +43 -15
  93. package/docs/interfaces/verticallayout.html +4 -4
  94. package/docs/interfaces/withclassname.html +1 -1
  95. package/lib/Helpers.d.ts +5 -0
  96. package/lib/Helpers.js +33 -0
  97. package/lib/Helpers.js.map +1 -0
  98. package/lib/actions/actions.d.ts +181 -0
  99. package/lib/actions/actions.js +173 -0
  100. package/lib/actions/actions.js.map +1 -0
  101. package/lib/actions/index.d.ts +1 -180
  102. package/lib/actions/index.js +26 -122
  103. package/lib/actions/index.js.map +1 -1
  104. package/lib/configDefault.js +2 -1
  105. package/lib/configDefault.js.map +1 -1
  106. package/lib/generators/Generate.d.ts +6 -0
  107. package/lib/generators/Generate.js +35 -0
  108. package/lib/generators/Generate.js.map +1 -0
  109. package/lib/generators/index.d.ts +3 -10
  110. package/lib/generators/index.js +28 -9
  111. package/lib/generators/index.js.map +1 -1
  112. package/lib/generators/schema.d.ts +1 -1
  113. package/lib/generators/schema.js +3 -1
  114. package/lib/generators/schema.js.map +1 -1
  115. package/lib/generators/uischema.d.ts +1 -2
  116. package/lib/generators/uischema.js +12 -10
  117. package/lib/generators/uischema.js.map +1 -1
  118. package/lib/i18n/i18nTypes.d.ts +15 -0
  119. package/lib/i18n/i18nTypes.js +3 -0
  120. package/lib/i18n/i18nTypes.js.map +1 -0
  121. package/lib/i18n/i18nUtil.d.ts +11 -0
  122. package/lib/i18n/i18nUtil.js +58 -0
  123. package/lib/i18n/i18nUtil.js.map +1 -0
  124. package/lib/i18n/index.d.ts +2 -0
  125. package/lib/i18n/index.js +6 -0
  126. package/lib/i18n/index.js.map +1 -0
  127. package/lib/index.d.ts +6 -18
  128. package/lib/index.js +10 -15
  129. package/lib/index.js.map +1 -1
  130. package/lib/jsonforms-core.js +9 -12
  131. package/lib/jsonforms-core.js.map +1 -1
  132. package/lib/models/draft4.js +2 -1
  133. package/lib/models/draft4.js.map +1 -1
  134. package/lib/models/index.d.ts +5 -0
  135. package/lib/models/index.js +33 -0
  136. package/lib/models/index.js.map +1 -0
  137. package/lib/models/jsonSchema.js +24 -0
  138. package/lib/models/jsonSchema.js.map +1 -1
  139. package/lib/models/uischema.js +29 -2
  140. package/lib/models/uischema.js.map +1 -1
  141. package/lib/reducers/cells.d.ts +1 -1
  142. package/lib/reducers/cells.js +27 -1
  143. package/lib/reducers/cells.js.map +1 -1
  144. package/lib/reducers/config.d.ts +1 -1
  145. package/lib/reducers/config.js +5 -3
  146. package/lib/reducers/config.js.map +1 -1
  147. package/lib/reducers/core.d.ts +5 -7
  148. package/lib/reducers/core.js +78 -63
  149. package/lib/reducers/core.js.map +1 -1
  150. package/lib/reducers/default-data.d.ts +1 -1
  151. package/lib/reducers/default-data.js +6 -3
  152. package/lib/reducers/default-data.js.map +1 -1
  153. package/lib/reducers/i18n.d.ts +8 -11
  154. package/lib/reducers/i18n.js +40 -23
  155. package/lib/reducers/i18n.js.map +1 -1
  156. package/lib/reducers/index.d.ts +9 -49
  157. package/lib/reducers/index.js +33 -91
  158. package/lib/reducers/index.js.map +1 -1
  159. package/lib/reducers/reducers.d.ts +37 -0
  160. package/lib/reducers/reducers.js +107 -0
  161. package/lib/reducers/reducers.js.map +1 -0
  162. package/lib/reducers/renderers.d.ts +1 -1
  163. package/lib/reducers/renderers.js +27 -1
  164. package/lib/reducers/renderers.js.map +1 -1
  165. package/lib/reducers/selectors.d.ts +15 -0
  166. package/lib/reducers/selectors.js +56 -0
  167. package/lib/reducers/selectors.js.map +1 -0
  168. package/lib/reducers/uischemas.d.ts +2 -2
  169. package/lib/reducers/uischemas.js +9 -6
  170. package/lib/reducers/uischemas.js.map +1 -1
  171. package/lib/store.d.ts +5 -8
  172. package/lib/store.js +24 -0
  173. package/lib/store.js.map +1 -1
  174. package/lib/testers/index.d.ts +1 -204
  175. package/lib/testers/index.js +3 -376
  176. package/lib/testers/index.js.map +1 -1
  177. package/lib/testers/testers.d.ts +203 -0
  178. package/lib/testers/testers.js +421 -0
  179. package/lib/testers/testers.js.map +1 -0
  180. package/lib/util/Formatted.js +24 -0
  181. package/lib/util/Formatted.js.map +1 -1
  182. package/lib/util/array.js +25 -0
  183. package/lib/util/array.js.map +1 -1
  184. package/lib/util/cell.d.ts +11 -4
  185. package/lib/util/cell.js +61 -17
  186. package/lib/util/cell.js.map +1 -1
  187. package/lib/util/combinators.d.ts +2 -3
  188. package/lib/util/combinators.js +5 -2
  189. package/lib/util/combinators.js.map +1 -1
  190. package/lib/util/ids.js +8 -4
  191. package/lib/util/ids.js.map +1 -1
  192. package/lib/util/index.d.ts +11 -45
  193. package/lib/util/index.js +14 -104
  194. package/lib/util/index.js.map +1 -1
  195. package/lib/util/label.d.ts +1 -2
  196. package/lib/util/label.js +7 -4
  197. package/lib/util/label.js.map +1 -1
  198. package/lib/util/path.d.ts +2 -1
  199. package/lib/util/path.js +12 -6
  200. package/lib/util/path.js.map +1 -1
  201. package/lib/util/renderer.d.ts +17 -17
  202. package/lib/util/renderer.js +163 -76
  203. package/lib/util/renderer.js.map +1 -1
  204. package/lib/util/resolvers.d.ts +1 -14
  205. package/lib/util/resolvers.js +9 -215
  206. package/lib/util/resolvers.js.map +1 -1
  207. package/lib/util/runtime.d.ts +12 -2
  208. package/lib/util/runtime.js +59 -17
  209. package/lib/util/runtime.js.map +1 -1
  210. package/lib/util/schema.js +27 -1
  211. package/lib/util/schema.js.map +1 -1
  212. package/lib/util/uischema.d.ts +1 -1
  213. package/lib/util/uischema.js +11 -7
  214. package/lib/util/uischema.js.map +1 -1
  215. package/lib/util/util.d.ts +31 -0
  216. package/lib/util/util.js +112 -0
  217. package/lib/util/util.js.map +1 -0
  218. package/lib/util/validator.d.ts +3 -2
  219. package/lib/util/validator.js +6 -5
  220. package/lib/util/validator.js.map +1 -1
  221. package/package.json +7 -9
  222. package/src/Helpers.ts +38 -0
  223. package/src/actions/actions.ts +345 -0
  224. package/src/actions/index.ts +1 -312
  225. package/src/configDefault.ts +1 -0
  226. package/src/generators/Generate.ts +43 -0
  227. package/src/generators/index.ts +3 -21
  228. package/src/generators/schema.ts +1 -1
  229. package/src/generators/uischema.ts +4 -4
  230. package/src/i18n/i18nTypes.ts +17 -0
  231. package/src/i18n/i18nUtil.ts +76 -0
  232. package/src/i18n/index.ts +2 -0
  233. package/src/index.ts +7 -31
  234. package/src/models/draft4.ts +1 -0
  235. package/src/models/index.ts +30 -0
  236. package/src/models/jsonSchema.ts +1 -0
  237. package/src/models/uischema.ts +1 -0
  238. package/src/reducers/cells.ts +2 -1
  239. package/src/reducers/config.ts +2 -1
  240. package/src/reducers/core.ts +74 -81
  241. package/src/reducers/default-data.ts +2 -1
  242. package/src/reducers/i18n.ts +42 -35
  243. package/src/reducers/index.ts +9 -158
  244. package/src/reducers/reducers.ts +148 -0
  245. package/src/reducers/renderers.ts +2 -1
  246. package/src/reducers/selectors.ts +65 -0
  247. package/src/reducers/uischemas.ts +4 -2
  248. package/src/store.ts +11 -8
  249. package/src/testers/index.ts +1 -516
  250. package/src/testers/testers.ts +547 -0
  251. package/src/util/Formatted.ts +1 -0
  252. package/src/util/array.ts +25 -0
  253. package/src/util/cell.ts +91 -19
  254. package/src/util/combinators.ts +2 -4
  255. package/src/util/ids.ts +1 -0
  256. package/src/util/index.ts +11 -126
  257. package/src/util/label.ts +2 -2
  258. package/src/util/path.ts +4 -1
  259. package/src/util/renderer.ts +168 -85
  260. package/src/util/resolvers.ts +2 -261
  261. package/src/util/runtime.ts +46 -2
  262. package/src/util/schema.ts +26 -1
  263. package/src/util/uischema.ts +2 -1
  264. package/src/util/util.ts +127 -0
  265. package/src/util/validator.ts +5 -8
  266. package/test/reducers/core.test.ts +31 -223
  267. package/test/util/cell.test.ts +33 -2
  268. package/test/util/renderer.test.ts +483 -3
  269. package/test/util/resolvers.test.ts +1 -59
  270. package/test/util/runtime.test.ts +264 -4
  271. package/docs/interfaces/labels.html +0 -157
  272. package/docs/interfaces/schemaref.html +0 -160
  273. package/docs/interfaces/schemarefs.html +0 -138
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  /*
4
3
  The MIT License
5
4
 
@@ -24,8 +23,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
24
23
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
24
  THE SOFTWARE.
26
25
  */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.extractDefaultData = exports.defaultDataReducer = void 0;
27
28
  var actions_1 = require("../actions");
28
- exports.defaultDataReducer = function (state, action) {
29
+ var defaultDataReducer = function (state, action) {
29
30
  if (state === void 0) { state = []; }
30
31
  switch (action.type) {
31
32
  case actions_1.ADD_DEFAULT_DATA:
@@ -38,5 +39,7 @@ exports.defaultDataReducer = function (state, action) {
38
39
  return state;
39
40
  }
40
41
  };
41
- exports.extractDefaultData = function (state) { return state; };
42
+ exports.defaultDataReducer = defaultDataReducer;
43
+ var extractDefaultData = function (state) { return state; };
44
+ exports.extractDefaultData = extractDefaultData;
42
45
  //# sourceMappingURL=default-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-data.js","sourceRoot":"","sources":["../../src/reducers/default-data.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,sCAKoB;AAYP,QAAA,kBAAkB,GAA0E,UACvG,KAAU,EACV,MAAM;IADN,sBAAA,EAAA,UAAU;IAGV,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,0BAAgB;YACnB,OAAO,KAAK,CAAC,MAAM,CAAC;gBAClB,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;aACrD,CAAC,CAAC;QACL,KAAK,6BAAmB;YACtB,OAAO,KAAK,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU,EAAlC,CAAkC,CAAC,CAAC;QAC/D;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAChC,KAA0C,IACF,OAAA,KAAK,EAAL,CAAK,CAAC"}
1
+ {"version":3,"file":"default-data.js","sourceRoot":"","sources":["../../src/reducers/default-data.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;;;AAEF,sCAKoB;AAYb,IAAM,kBAAkB,GAA0E,UACvG,KAAU,EACV,MAAM;IADN,sBAAA,EAAA,UAAU;IAGV,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,0BAAgB;YACnB,OAAO,KAAK,CAAC,MAAM,CAAC;gBAClB,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;aACrD,CAAC,CAAC;QACL,KAAK,6BAAmB;YACtB,OAAO,KAAK,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU,EAAlC,CAAkC,CAAC,CAAC;QAC/D;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC;AAdW,QAAA,kBAAkB,sBAc7B;AAEK,IAAM,kBAAkB,GAAG,UAChC,KAA0C,IACF,OAAA,KAAK,EAAL,CAAK,CAAC;AAFnC,QAAA,kBAAkB,sBAEiB"}
@@ -1,11 +1,8 @@
1
- import { JsonSchema, UISchemaElement } from '..';
2
- import { Reducer } from '../util/type';
3
- export interface JsonFormsLocaleState {
4
- locale?: string;
5
- localizedSchemas: Map<string, JsonSchema>;
6
- localizedUISchemas: Map<string, UISchemaElement>;
7
- }
8
- export declare const i18nReducer: Reducer<any, any>;
9
- export declare const fetchLocale: (state?: JsonFormsLocaleState) => string;
10
- export declare const findLocalizedSchema: (locale: string) => (state?: JsonFormsLocaleState) => JsonSchema;
11
- export declare const findLocalizedUISchema: (locale: string) => (state?: JsonFormsLocaleState) => UISchemaElement;
1
+ import { JsonFormsI18nState } from '../i18n';
2
+ import { I18nActions } from '../actions';
3
+ import { Reducer } from '../util';
4
+ export declare const defaultJsonFormsI18nState: JsonFormsI18nState;
5
+ export declare const i18nReducer: Reducer<JsonFormsI18nState, I18nActions>;
6
+ export declare const fetchLocale: (state?: JsonFormsI18nState) => string;
7
+ export declare const fetchTranslator: (state?: JsonFormsI18nState) => import("../i18n").Translator;
8
+ export declare const fetchErrorTranslator: (state?: JsonFormsI18nState) => import("../i18n").ErrorTranslator;
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
2
  /*
5
3
  The MIT License
6
4
 
@@ -25,42 +23,61 @@ var tslib_1 = require("tslib");
25
23
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
24
  THE SOFTWARE.
27
25
  */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.fetchErrorTranslator = exports.fetchTranslator = exports.fetchLocale = exports.i18nReducer = exports.defaultJsonFormsI18nState = void 0;
28
+ var tslib_1 = require("tslib");
29
+ var i18n_1 = require("../i18n");
28
30
  var actions_1 = require("../actions");
29
- var __1 = require("..");
30
- var initState = {
31
- locale: undefined,
32
- localizedSchemas: new Map(),
33
- localizedUISchemas: new Map()
31
+ exports.defaultJsonFormsI18nState = {
32
+ locale: 'en',
33
+ translate: i18n_1.defaultTranslator,
34
+ translateError: i18n_1.defaultErrorTranslator
34
35
  };
35
- exports.i18nReducer = function (state, action) {
36
- if (state === void 0) { state = initState; }
36
+ var i18nReducer = function (state, action) {
37
+ var _a, _b, _c, _d, _e, _f;
38
+ if (state === void 0) { state = exports.defaultJsonFormsI18nState; }
37
39
  switch (action.type) {
38
- case actions_1.SET_LOCALIZED_SCHEMAS:
39
- return tslib_1.__assign(tslib_1.__assign({}, state), { localizedSchemas: action.localizedSchemas });
40
- case __1.SET_LOCALIZED_UISCHEMAS:
41
- return tslib_1.__assign(tslib_1.__assign({}, state), { localizedUISchemas: action.localizedUISchemas });
40
+ case actions_1.UPDATE_I18N: {
41
+ var locale = (_a = action.locale) !== null && _a !== void 0 ? _a : exports.defaultJsonFormsI18nState.locale;
42
+ var translate = (_b = action.translator) !== null && _b !== void 0 ? _b : exports.defaultJsonFormsI18nState.translate;
43
+ var translateError = (_c = action.errorTranslator) !== null && _c !== void 0 ? _c : exports.defaultJsonFormsI18nState.translateError;
44
+ if (locale !== state.locale ||
45
+ translate !== state.translate ||
46
+ translateError !== state.translateError) {
47
+ return tslib_1.__assign(tslib_1.__assign({}, state), { locale: locale,
48
+ translate: translate,
49
+ translateError: translateError });
50
+ }
51
+ return state;
52
+ }
53
+ case actions_1.SET_TRANSLATOR:
54
+ return tslib_1.__assign(tslib_1.__assign({}, state), { translate: (_d = action.translator) !== null && _d !== void 0 ? _d : i18n_1.defaultTranslator, translateError: (_e = action.errorTranslator) !== null && _e !== void 0 ? _e : i18n_1.defaultErrorTranslator });
42
55
  case actions_1.SET_LOCALE:
43
- return tslib_1.__assign(tslib_1.__assign({}, state), { locale: action.locale === undefined ? navigator.languages[0] : action.locale });
56
+ return tslib_1.__assign(tslib_1.__assign({}, state), { locale: (_f = action.locale) !== null && _f !== void 0 ? _f : navigator.languages[0] });
44
57
  default:
45
58
  return state;
46
59
  }
47
60
  };
48
- exports.fetchLocale = function (state) {
61
+ exports.i18nReducer = i18nReducer;
62
+ var fetchLocale = function (state) {
49
63
  if (state === undefined) {
50
64
  return undefined;
51
65
  }
52
66
  return state.locale;
53
67
  };
54
- exports.findLocalizedSchema = function (locale) { return function (state) {
68
+ exports.fetchLocale = fetchLocale;
69
+ var fetchTranslator = function (state) {
55
70
  if (state === undefined) {
56
- return undefined;
71
+ return i18n_1.defaultTranslator;
57
72
  }
58
- return state.localizedSchemas.get(locale);
59
- }; };
60
- exports.findLocalizedUISchema = function (locale) { return function (state) {
73
+ return state.translate;
74
+ };
75
+ exports.fetchTranslator = fetchTranslator;
76
+ var fetchErrorTranslator = function (state) {
61
77
  if (state === undefined) {
62
- return undefined;
78
+ return i18n_1.defaultErrorTranslator;
63
79
  }
64
- return state.localizedUISchemas.get(locale);
65
- }; };
80
+ return state.translateError;
81
+ };
82
+ exports.fetchErrorTranslator = fetchErrorTranslator;
66
83
  //# sourceMappingURL=i18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/reducers/i18n.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,sCAA+D;AAC/D,wBAA0E;AAS1E,IAAM,SAAS,GAAyB;IACtC,MAAM,EAAE,SAAS;IACjB,gBAAgB,EAAE,IA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eAqCtB;AAEK,IAAM,WAAW,GAAG,UAAC,KAA0B;IACpD,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,KAAK,CAAC,MAAM,CAAC;AACtB,CAAC,CAAC;AALW,QAAA,WAAW,eAKtB;AAEK,IAAM,eAAe,GAAG,UAAC,KAA0B;IACxD,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,wBAAiB,CAAC;KAC1B;IACD,OAAO,KAAK,CAAC,SAAS,CAAC;AACzB,CAAC,CAAA;AALY,QAAA,eAAe,mBAK3B;AAEM,IAAM,oBAAoB,GAAG,UAAC,KAA0B;IAC7D,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,6BAAsB,CAAC;KAC/B;IACD,OAAO,KAAK,CAAC,cAAc,CAAC;AAC9B,CAAC,CAAA;AALY,QAAA,oBAAoB,wBAKhC"}
@@ -1,49 +1,9 @@
1
- import { ControlElement, UISchemaElement } from '../models/uischema';
2
- import { coreReducer, errorsAt, JsonFormsCore, ValidationMode } from './core';
3
- import { JsonFormsDefaultDataRegistryEntry } from './default-data';
4
- import { JsonFormsRendererRegistryEntry, rendererReducer } from './renderers';
5
- import { JsonFormsState } from '../store';
6
- import { findMatchingUISchema, JsonFormsUISchemaRegistryEntry, uischemaRegistryReducer, UISchemaTester } from './uischemas';
7
- import { i18nReducer } from './i18n';
8
- import { JsonFormsCellRendererRegistryEntry } from './cells';
9
- import { JsonSchema } from '../models/jsonSchema';
10
- import RefParser from 'json-schema-ref-parser';
11
- import { cellReducer } from './cells';
12
- import { configReducer } from './config';
13
- import { Ajv } from 'ajv';
14
- export { rendererReducer, cellReducer, coreReducer, i18nReducer, configReducer, UISchemaTester, uischemaRegistryReducer, findMatchingUISchema, JsonFormsUISchemaRegistryEntry };
15
- export { JsonFormsCore, ValidationMode };
16
- export declare const jsonFormsReducerConfig: {
17
- core: import("..").Reducer<JsonFormsCore, import("..").CoreActions>;
18
- renderers: import("..").Reducer<JsonFormsRendererRegistryEntry[], import("..").AddRendererAction | import("..").RemoveRendererAction>;
19
- cells: import("..").Reducer<import("./cells").JsonFormsCellRendererRegistryState, import("..").AddCellRendererAction | import("..").RemoveCellRendererAction>;
20
- config: import("..").Reducer<any, import("..").SetConfigAction>;
21
- uischemas: import("..").Reducer<JsonFormsUISchemaRegistryEntry[], import("..").UISchemaActions>;
22
- defaultData: import("..").Reducer<JsonFormsDefaultDataRegistryEntry[], import("..").RegisterDefaultDataAction | import("..").UnregisterDefaultDataAction>;
23
- i18n: import("..").Reducer<any, any>;
24
- };
25
- export declare const getData: (state: JsonFormsState) => any;
26
- export declare const getSchema: (state: JsonFormsState) => JsonSchema;
27
- export declare const getUiSchema: (state: JsonFormsState) => UISchemaElement;
28
- export declare const getRefParserOptions: (state: JsonFormsState) => RefParser.Options;
29
- export declare const getAjv: (state: JsonFormsState) => Ajv;
30
- export declare const getDefaultData: (state: JsonFormsState) => JsonFormsDefaultDataRegistryEntry[];
31
- export declare const getRenderers: (state: JsonFormsState) => JsonFormsRendererRegistryEntry[];
32
- export declare const getCells: (state: JsonFormsState) => JsonFormsCellRendererRegistryEntry[];
33
- export declare const getUISchemas: (state: JsonFormsState) => JsonFormsUISchemaRegistryEntry[];
34
- /**
35
- * Finds a registered UI schema to use, if any.
36
- * @param schema the JSON schema describing the data to be rendered
37
- * @param schemaPath the according schema path
38
- * @param path the instance path
39
- * @param fallbackLayoutType the type of the layout to use
40
- * @param control may be checked for embedded inline uischema options
41
- */
42
- export declare const findUISchema: (uischemas: JsonFormsUISchemaRegistryEntry[], schema: JsonSchema, schemaPath: string, path: string, fallbackLayoutType?: string, control?: ControlElement, rootSchema?: JsonSchema) => UISchemaElement;
43
- export declare const getErrorAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject[];
44
- export { errorsAt };
45
- export declare const getSubErrorsAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject[];
46
- export declare const getConfig: (state: JsonFormsState) => any;
47
- export declare const getLocale: (state: JsonFormsState) => string;
48
- export declare const getLocalizedSchema: (locale: string) => (state: JsonFormsState) => JsonSchema;
49
- export declare const getLocalizedUISchema: (locale: string) => (state: JsonFormsState) => UISchemaElement;
1
+ export * from './cells';
2
+ export * from './config';
3
+ export * from './core';
4
+ export * from './default-data';
5
+ export * from './i18n';
6
+ export * from './reducers';
7
+ export * from './renderers';
8
+ export * from './selectors';
9
+ export * from './uischemas';
@@ -1,95 +1,37 @@
1
1
  "use strict";
2
+ /*
3
+ The MIT License
4
+
5
+ Copyright (c) 2017-2019 EclipseSource Munich
6
+ https://github.com/eclipsesource/jsonforms
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+ */
2
26
  Object.defineProperty(exports, "__esModule", { value: true });
3
27
  var tslib_1 = require("tslib");
4
- var core_1 = require("./core");
5
- exports.coreReducer = core_1.coreReducer;
6
- exports.errorsAt = core_1.errorsAt;
7
- var default_data_1 = require("./default-data");
8
- var default_data_2 = require("../reducers/default-data");
9
- var renderers_1 = require("./renderers");
10
- exports.rendererReducer = renderers_1.rendererReducer;
11
- var uischemas_1 = require("./uischemas");
12
- exports.findMatchingUISchema = uischemas_1.findMatchingUISchema;
13
- exports.uischemaRegistryReducer = uischemas_1.uischemaRegistryReducer;
14
- var i18n_1 = require("./i18n");
15
- exports.i18nReducer = i18n_1.i18nReducer;
16
- var generators_1 = require("../generators");
17
- var cells_1 = require("./cells");
18
- exports.cellReducer = cells_1.cellReducer;
19
- var config_1 = require("./config");
20
- exports.configReducer = config_1.configReducer;
21
- var get_1 = tslib_1.__importDefault(require("lodash/get"));
22
- exports.jsonFormsReducerConfig = {
23
- core: core_1.coreReducer,
24
- renderers: renderers_1.rendererReducer,
25
- cells: cells_1.cellReducer,
26
- config: config_1.configReducer,
27
- uischemas: uischemas_1.uischemaRegistryReducer,
28
- defaultData: default_data_2.defaultDataReducer,
29
- i18n: i18n_1.i18nReducer
30
- };
31
- exports.getData = function (state) {
32
- return core_1.extractData(get_1.default(state, 'jsonforms.core'));
33
- };
34
- exports.getSchema = function (state) {
35
- return core_1.extractSchema(get_1.default(state, 'jsonforms.core'));
36
- };
37
- exports.getUiSchema = function (state) {
38
- return core_1.extractUiSchema(get_1.default(state, 'jsonforms.core'));
39
- };
40
- exports.getRefParserOptions = function (state) {
41
- return core_1.extractRefParserOptions(get_1.default(state, 'jsonforms.core'));
42
- };
43
- exports.getAjv = function (state) { return core_1.extractAjv(get_1.default(state, 'jsonforms.core')); };
44
- exports.getDefaultData = function (state) {
45
- return default_data_1.extractDefaultData(get_1.default(state, 'jsonforms.defaultData'));
46
- };
47
- exports.getRenderers = function (state) { return get_1.default(state, 'jsonforms.renderers'); };
48
- exports.getCells = function (state) { return get_1.default(state, 'jsonforms.cells'); };
49
- exports.getUISchemas = function (state) { return get_1.default(state, 'jsonforms.uischemas'); };
50
- /**
51
- * Finds a registered UI schema to use, if any.
52
- * @param schema the JSON schema describing the data to be rendered
53
- * @param schemaPath the according schema path
54
- * @param path the instance path
55
- * @param fallbackLayoutType the type of the layout to use
56
- * @param control may be checked for embedded inline uischema options
57
- */
58
- exports.findUISchema = function (uischemas, schema, schemaPath, path, fallbackLayoutType, control, rootSchema) {
59
- if (fallbackLayoutType === void 0) { fallbackLayoutType = 'VerticalLayout'; }
60
- // handle options
61
- if (control && control.options && control.options.detail) {
62
- if (typeof control.options.detail === 'string') {
63
- if (control.options.detail.toUpperCase() === 'GENERATE') {
64
- // force generation of uischema
65
- return generators_1.Generate.uiSchema(schema, fallbackLayoutType);
66
- }
67
- }
68
- else if (typeof control.options.detail === 'object') {
69
- // check if detail is a valid uischema
70
- if (control.options.detail.type &&
71
- typeof control.options.detail.type === 'string') {
72
- return control.options.detail;
73
- }
74
- }
75
- }
76
- // default
77
- var uiSchema = uischemas_1.findMatchingUISchema(uischemas)(schema, schemaPath, path);
78
- if (uiSchema === undefined) {
79
- return generators_1.Generate.uiSchema(schema, fallbackLayoutType, '#', rootSchema);
80
- }
81
- return uiSchema;
82
- };
83
- exports.getErrorAt = function (instancePath, schema) { return function (state) {
84
- return core_1.errorAt(instancePath, schema)(state.jsonforms.core);
85
- }; };
86
- exports.getSubErrorsAt = function (instancePath, schema) { return function (state) { return core_1.subErrorsAt(instancePath, schema)(state.jsonforms.core); }; };
87
- exports.getConfig = function (state) { return state.jsonforms.config; };
88
- exports.getLocale = function (state) {
89
- return i18n_1.fetchLocale(get_1.default(state, 'jsonforms.i18n'));
90
- };
91
- exports.getLocalizedSchema = function (locale) { return function (state) { return i18n_1.findLocalizedSchema(locale)(get_1.default(state, 'jsonforms.i18n')); }; };
92
- exports.getLocalizedUISchema = function (locale) { return function (state) {
93
- return i18n_1.findLocalizedUISchema(locale)(get_1.default(state, 'jsonforms.i18n'));
94
- }; };
28
+ tslib_1.__exportStar(require("./cells"), exports);
29
+ tslib_1.__exportStar(require("./config"), exports);
30
+ tslib_1.__exportStar(require("./core"), exports);
31
+ tslib_1.__exportStar(require("./default-data"), exports);
32
+ tslib_1.__exportStar(require("./i18n"), exports);
33
+ tslib_1.__exportStar(require("./reducers"), exports);
34
+ tslib_1.__exportStar(require("./renderers"), exports);
35
+ tslib_1.__exportStar(require("./selectors"), exports);
36
+ tslib_1.__exportStar(require("./uischemas"), exports);
95
37
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":";;;AAyBA,+BAYgB;AAkCd,sBA7CA,kBAAW,CA6CA;AA6FJ,mBAxIP,eAAQ,CAwIO;AA9HjB,+CAGwB;AACxB,yDAA8D;AAC9D,yCAA8E;AA0B5E,0BA1BuC,2BAAe,CA0BvC;AAxBjB,yCAKqB;AA0BnB,+BA9BA,gCAAoB,CA8BA;AADpB,kCA3BA,mCAAuB,CA2BA;AAxBzB,+BAKgB;AAgBd,sBAjBA,kBAAW,CAiBA;AAdb,4CAAyC;AAKzC,iCAAsC;AAOpC,sBAPO,mBAAW,CAOP;AANb,mCAAyC;AASvC,wBATO,sBAAa,CASP;AARf,2DAA6B;AAgBhB,QAAA,sBAAsB,GAAG;IACpC,IAAI,EAAE,kBAAW;IACjB,SAAS,EAAE,2BAAe;IAC1B,KAAK,EAAE,mBAAW;IAClB,MAAM,EAAE,sBAAa;IACrB,SAAS,EAAE,mCAAuB;IAClC,WAAW,EAAE,iCAAkB;IAC/B,IAAI,EAAE,kBAAW;CAClB,CAAC;AAEW,QAAA,OAAO,GAAG,UAAC,KAAqB;IAC3C,OAAA,kBAAW,CAAC,aAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAAzC,CAAyC,CAAC;AAC/B,QAAA,SAAS,GAAG,UAAC,KAAqB;IAC7C,OAAA,oBAAa,CAAC,aAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAA3C,CAA2C,CAAC;AACjC,QAAA,WAAW,GAAG,UAAC,KAAqB;IAC/C,O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AAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAAzC,CAAyC,CAAC;AAE/B,QAAA,kBAAkB,GAAG,UAAC,MAAc,IAAK,OAAA,UACpD,KAAqB,IACN,OAAA,0BAAmB,CAAC,MAAM,CAAC,CAAC,aAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,EAAzD,CAAyD,EAFpB,CAEoB,CAAC;AAE9D,QAAA,oBAAoB,GAAG,UAAC,MAAc,IAAK,OAAA,UACtD,KAAqB;IAErB,OAAA,4BAAqB,CAAC,MAAM,CAAC,CAAC,aAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;AAA3D,CAA2D,EAHL,CAGK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reducers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;;;AAEF,kDAAwB;AACxB,mDAAyB;AACzB,iDAAuB;AACvB,yDAA+B;AAC/B,iDAAuB;AACvB,qDAA2B;AAC3B,sDAA4B;AAC5B,sDAA4B;AAC5B,sDAA4B"}
@@ -0,0 +1,37 @@
1
+ import { ControlElement, UISchemaElement } from '../models';
2
+ import { coreReducer, errorsAt, getControlPath, JsonFormsCore, ValidationMode } from './core';
3
+ import { rendererReducer } from './renderers';
4
+ import { JsonFormsState } from '../store';
5
+ import { findMatchingUISchema, JsonFormsUISchemaRegistryEntry, uischemaRegistryReducer, UISchemaTester } from './uischemas';
6
+ import { i18nReducer } from './i18n';
7
+ import { JsonSchema } from '../models/jsonSchema';
8
+ import { cellReducer } from './cells';
9
+ import { configReducer } from './config';
10
+ import { ErrorTranslator, Translator } from '../i18n';
11
+ export { rendererReducer, cellReducer, coreReducer, i18nReducer, configReducer, UISchemaTester, uischemaRegistryReducer, findMatchingUISchema, JsonFormsUISchemaRegistryEntry };
12
+ export { JsonFormsCore, ValidationMode };
13
+ export declare const jsonFormsReducerConfig: {
14
+ core: import("..").Reducer<JsonFormsCore, import("..").CoreActions>;
15
+ renderers: import("..").Reducer<import("./renderers").JsonFormsRendererRegistryEntry[], import("..").AddRendererAction | import("..").RemoveRendererAction>;
16
+ cells: import("..").Reducer<import("./cells").JsonFormsCellRendererRegistryState, import("..").AddCellRendererAction | import("..").RemoveCellRendererAction>;
17
+ config: import("..").Reducer<any, import("..").SetConfigAction>;
18
+ uischemas: import("..").Reducer<JsonFormsUISchemaRegistryEntry[], import("..").UISchemaActions>;
19
+ defaultData: import("..").Reducer<import("./default-data").JsonFormsDefaultDataRegistryEntry[], import("..").RegisterDefaultDataAction | import("..").UnregisterDefaultDataAction>;
20
+ i18n: import("..").Reducer<import("../i18n").JsonFormsI18nState, import("..").I18nActions>;
21
+ };
22
+ /**
23
+ * Finds a registered UI schema to use, if any.
24
+ * @param schema the JSON schema describing the data to be rendered
25
+ * @param schemaPath the according schema path
26
+ * @param path the instance path
27
+ * @param fallbackLayoutType the type of the layout to use
28
+ * @param control may be checked for embedded inline uischema options
29
+ */
30
+ export declare const findUISchema: (uischemas: JsonFormsUISchemaRegistryEntry[], schema: JsonSchema, schemaPath: string, path: string, fallbackLayoutType?: string, control?: ControlElement, rootSchema?: JsonSchema) => UISchemaElement;
31
+ export declare const getErrorAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject<string, Record<string, any>, unknown>[];
32
+ export { errorsAt, getControlPath };
33
+ export declare const getSubErrorsAt: (instancePath: string, schema: JsonSchema) => (state: JsonFormsState) => import("ajv").ErrorObject<string, Record<string, any>, unknown>[];
34
+ export declare const getConfig: (state: JsonFormsState) => any;
35
+ export declare const getLocale: (state: JsonFormsState) => string;
36
+ export declare const getTranslator: () => (state: JsonFormsState) => Translator;
37
+ export declare const getErrorTranslator: () => (state: JsonFormsState) => ErrorTranslator;
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ /*
3
+ The MIT License
4
+
5
+ Copyright (c) 2017-2019 EclipseSource Munich
6
+ https://github.com/eclipsesource/jsonforms
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+ */
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.getErrorTranslator = exports.getTranslator = exports.getLocale = exports.getConfig = exports.getSubErrorsAt = exports.getControlPath = exports.errorsAt = exports.getErrorAt = exports.findUISchema = exports.jsonFormsReducerConfig = exports.findMatchingUISchema = exports.uischemaRegistryReducer = exports.configReducer = exports.i18nReducer = exports.coreReducer = exports.cellReducer = exports.rendererReducer = void 0;
28
+ var tslib_1 = require("tslib");
29
+ var core_1 = require("./core");
30
+ Object.defineProperty(exports, "coreReducer", { enumerable: true, get: function () { return core_1.coreReducer; } });
31
+ Object.defineProperty(exports, "errorsAt", { enumerable: true, get: function () { return core_1.errorsAt; } });
32
+ Object.defineProperty(exports, "getControlPath", { enumerable: true, get: function () { return core_1.getControlPath; } });
33
+ var default_data_1 = require("./default-data");
34
+ var renderers_1 = require("./renderers");
35
+ Object.defineProperty(exports, "rendererReducer", { enumerable: true, get: function () { return renderers_1.rendererReducer; } });
36
+ var uischemas_1 = require("./uischemas");
37
+ Object.defineProperty(exports, "findMatchingUISchema", { enumerable: true, get: function () { return uischemas_1.findMatchingUISchema; } });
38
+ Object.defineProperty(exports, "uischemaRegistryReducer", { enumerable: true, get: function () { return uischemas_1.uischemaRegistryReducer; } });
39
+ var i18n_1 = require("./i18n");
40
+ Object.defineProperty(exports, "i18nReducer", { enumerable: true, get: function () { return i18n_1.i18nReducer; } });
41
+ var generators_1 = require("../generators");
42
+ var cells_1 = require("./cells");
43
+ Object.defineProperty(exports, "cellReducer", { enumerable: true, get: function () { return cells_1.cellReducer; } });
44
+ var config_1 = require("./config");
45
+ Object.defineProperty(exports, "configReducer", { enumerable: true, get: function () { return config_1.configReducer; } });
46
+ var get_1 = tslib_1.__importDefault(require("lodash/get"));
47
+ var _1 = require(".");
48
+ exports.jsonFormsReducerConfig = {
49
+ core: core_1.coreReducer,
50
+ renderers: renderers_1.rendererReducer,
51
+ cells: cells_1.cellReducer,
52
+ config: config_1.configReducer,
53
+ uischemas: uischemas_1.uischemaRegistryReducer,
54
+ defaultData: default_data_1.defaultDataReducer,
55
+ i18n: i18n_1.i18nReducer
56
+ };
57
+ /**
58
+ * Finds a registered UI schema to use, if any.
59
+ * @param schema the JSON schema describing the data to be rendered
60
+ * @param schemaPath the according schema path
61
+ * @param path the instance path
62
+ * @param fallbackLayoutType the type of the layout to use
63
+ * @param control may be checked for embedded inline uischema options
64
+ */
65
+ var findUISchema = function (uischemas, schema, schemaPath, path, fallbackLayoutType, control, rootSchema) {
66
+ if (fallbackLayoutType === void 0) { fallbackLayoutType = 'VerticalLayout'; }
67
+ // handle options
68
+ if (control && control.options && control.options.detail) {
69
+ if (typeof control.options.detail === 'string') {
70
+ if (control.options.detail.toUpperCase() === 'GENERATE') {
71
+ // force generation of uischema
72
+ return generators_1.Generate.uiSchema(schema, fallbackLayoutType);
73
+ }
74
+ }
75
+ else if (typeof control.options.detail === 'object') {
76
+ // check if detail is a valid uischema
77
+ if (control.options.detail.type &&
78
+ typeof control.options.detail.type === 'string') {
79
+ return control.options.detail;
80
+ }
81
+ }
82
+ }
83
+ // default
84
+ var uiSchema = uischemas_1.findMatchingUISchema(uischemas)(schema, schemaPath, path);
85
+ if (uiSchema === undefined) {
86
+ return generators_1.Generate.uiSchema(schema, fallbackLayoutType, '#', rootSchema);
87
+ }
88
+ return uiSchema;
89
+ };
90
+ exports.findUISchema = findUISchema;
91
+ var getErrorAt = function (instancePath, schema) { return function (state) {
92
+ return core_1.errorAt(instancePath, schema)(state.jsonforms.core);
93
+ }; };
94
+ exports.getErrorAt = getErrorAt;
95
+ var getSubErrorsAt = function (instancePath, schema) { return function (state) { return core_1.subErrorsAt(instancePath, schema)(state.jsonforms.core); }; };
96
+ exports.getSubErrorsAt = getSubErrorsAt;
97
+ var getConfig = function (state) { return state.jsonforms.config; };
98
+ exports.getConfig = getConfig;
99
+ var getLocale = function (state) {
100
+ return i18n_1.fetchLocale(get_1.default(state, 'jsonforms.i18n'));
101
+ };
102
+ exports.getLocale = getLocale;
103
+ var getTranslator = function () { return function (state) { return _1.fetchTranslator(get_1.default(state, 'jsonforms.i18n')); }; };
104
+ exports.getTranslator = getTranslator;
105
+ var getErrorTranslator = function () { return function (state) { return i18n_1.fetchErrorTranslator(get_1.default(state, 'jsonforms.i18n')); }; };
106
+ exports.getErrorTranslator = getErrorTranslator;
107
+ //# sourceMappingURL=reducers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducers.js","sourceRoot":"","sources":["../../src/reducers/reducers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;;;;AAGF,+BAQgB;AA4Bd,4FAnCA,kBAAW,OAmCA;AAoEJ,yFArGP,eAAQ,OAqGO;AAAE,+FApGjB,qBAAc,OAoGiB;AA/FjC,+CAAoD;AACpD,yCAA8C;AAwB5C,gGAxBO,2BAAe,OAwBP;AAtBjB,yCAKqB;AAwBnB,qG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QAAA,aAAa,iBAEqC;AAExD,IAAM,kBAAkB,GAAG,cAAM,OAAA,UACtC,KAAqB,IACD,OAAA,2BAAoB,CAAC,aAAG,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,EAAlD,CAAkD,EAFhC,CAEgC,CAAC;AAF5D,QAAA,kBAAkB,sBAE0C"}
@@ -1,6 +1,6 @@
1
1
  import { RankedTester } from '../testers';
2
2
  import { AddRendererAction, RemoveRendererAction } from '../actions';
3
- import { Reducer } from '../util/type';
3
+ import { Reducer } from '../util';
4
4
  export interface JsonFormsRendererRegistryEntry {
5
5
  tester: RankedTester;
6
6
  renderer: any;
@@ -1,7 +1,32 @@
1
1
  "use strict";
2
+ /*
3
+ The MIT License
4
+
5
+ Copyright (c) 2017-2019 EclipseSource Munich
6
+ https://github.com/eclipsesource/jsonforms
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+ */
2
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.rendererReducer = void 0;
3
28
  var actions_1 = require("../actions");
4
- exports.rendererReducer = function (state, action) {
29
+ var rendererReducer = function (state, action) {
5
30
  if (state === void 0) { state = []; }
6
31
  switch (action.type) {
7
32
  case actions_1.ADD_RENDERER:
@@ -14,4 +39,5 @@ exports.rendererReducer = function (state, action) {
14
39
  return state;
15
40
  }
16
41
  };
42
+ exports.rendererReducer = rendererReducer;
17
43
  //# sourceMappingURL=renderers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderers.js","sourceRoot":"","sources":["../../src/reducers/renderers.ts"],"names":[],"mappings":";;AAyBA,sCAKoB;AAUP,QAAA,eAAe,GAA2E,UACrG,KAAU,EACV,MAAM;IADN,sBAAA,EAAA,UAAU;IAGV,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,sBAAY;YACf,OAAO,KAAK,CAAC,MAAM,CAAC;gBAClB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;aACrD,CAAC,CAAC;QACL,KAAK,yBAAe;YAClB,OAAO,KAAK,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAA1B,CAA0B,CAAC,CAAC;QACvD;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"renderers.js","sourceRoot":"","sources":["../../src/reducers/renderers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;;;AAGF,sCAKoB;AAUb,IAAM,eAAe,GAA2E,UACrG,KAAU,EACV,MAAM;IADN,sBAAA,EAAA,UAAU;IAGV,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,sBAAY;YACf,OAAO,KAAK,CAAC,MAAM,CAAC;gBAClB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE;aACrD,CAAC,CAAC;QACL,KAAK,yBAAe;YAClB,OAAO,KAAK,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAA1B,CAA0B,CAAC,CAAC;QACvD;YACE,OAAO,KAAK,CAAC;KAChB;AACH,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B"}
@@ -0,0 +1,15 @@
1
+ import Ajv from 'ajv';
2
+ import { JsonFormsState } from '../store';
3
+ import { JsonSchema, UISchemaElement } from '../models';
4
+ import { JsonFormsDefaultDataRegistryEntry } from './default-data';
5
+ import { JsonFormsRendererRegistryEntry } from './renderers';
6
+ import { JsonFormsCellRendererRegistryEntry } from './cells';
7
+ import { JsonFormsUISchemaRegistryEntry } from './uischemas';
8
+ export declare const getData: (state: JsonFormsState) => any;
9
+ export declare const getSchema: (state: JsonFormsState) => JsonSchema;
10
+ export declare const getUiSchema: (state: JsonFormsState) => UISchemaElement;
11
+ export declare const getAjv: (state: JsonFormsState) => Ajv;
12
+ export declare const getDefaultData: (state: JsonFormsState) => JsonFormsDefaultDataRegistryEntry[];
13
+ export declare const getRenderers: (state: JsonFormsState) => JsonFormsRendererRegistryEntry[];
14
+ export declare const getCells: (state: JsonFormsState) => JsonFormsCellRendererRegistryEntry[];
15
+ export declare const getUISchemas: (state: JsonFormsState) => JsonFormsUISchemaRegistryEntry[];