@jsonforms/angular 3.0.0-alpha.0 → 3.0.0-beta.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.
Files changed (116) hide show
  1. package/README.md +1 -1
  2. package/docs/assets/js/search.json +1 -1
  3. package/docs/classes/jsonforms.html +54 -33
  4. package/docs/classes/jsonformsabstractcontrol.html +30 -30
  5. package/docs/classes/jsonformsangularservice.html +33 -33
  6. package/docs/classes/jsonformsarraycontrol.html +30 -30
  7. package/docs/classes/jsonformsbaserenderer.html +4 -4
  8. package/docs/classes/jsonformscontrol.html +30 -30
  9. package/docs/classes/jsonformscontrolwithdetail.html +30 -30
  10. package/docs/classes/jsonformsoutlet.html +14 -14
  11. package/docs/globals.html +2 -2
  12. package/docs/index.html +1 -1
  13. package/lib/{abstract-control.d.ts → cjs/abstract-control.d.ts} +0 -0
  14. package/lib/{abstract-control.js → cjs/abstract-control.js} +16 -13
  15. package/lib/cjs/abstract-control.js.map +1 -0
  16. package/lib/cjs/abstract-control.metadata.json +1 -0
  17. package/lib/{array-control.d.ts → cjs/array-control.d.ts} +0 -0
  18. package/lib/{array-control.js → cjs/array-control.js} +1 -0
  19. package/lib/cjs/array-control.js.map +1 -0
  20. package/lib/{array-control.metadata.json → cjs/array-control.metadata.json} +0 -0
  21. package/lib/{base.renderer.d.ts → cjs/base.renderer.d.ts} +0 -0
  22. package/lib/{base.renderer.js → cjs/base.renderer.js} +9 -13
  23. package/lib/cjs/base.renderer.js.map +1 -0
  24. package/lib/cjs/base.renderer.metadata.json +1 -0
  25. package/lib/{control.d.ts → cjs/control.d.ts} +0 -0
  26. package/lib/{control.js → cjs/control.js} +1 -0
  27. package/lib/cjs/control.js.map +1 -0
  28. package/lib/{control.metadata.json → cjs/control.metadata.json} +0 -0
  29. package/lib/{index.d.ts → cjs/index.d.ts} +1 -0
  30. package/lib/{index.js → cjs/index.js} +1 -0
  31. package/lib/cjs/index.js.map +1 -0
  32. package/lib/{index.metadata.json → cjs/index.metadata.json} +1 -1
  33. package/lib/{jsonforms-root.component.d.ts → cjs/jsonforms-root.component.d.ts} +5 -4
  34. package/lib/{jsonforms-root.component.js → cjs/jsonforms-root.component.js} +37 -60
  35. package/lib/cjs/jsonforms-root.component.js.map +1 -0
  36. package/lib/cjs/jsonforms-root.component.metadata.json +1 -0
  37. package/lib/{jsonforms.component.d.ts → cjs/jsonforms.component.d.ts} +0 -0
  38. package/lib/{jsonforms.component.js → cjs/jsonforms.component.js} +15 -14
  39. package/lib/cjs/jsonforms.component.js.map +1 -0
  40. package/lib/{jsonforms.component.metadata.json → cjs/jsonforms.component.metadata.json} +0 -0
  41. package/lib/{jsonforms.module.d.ts → cjs/jsonforms.module.d.ts} +0 -0
  42. package/lib/{jsonforms.module.js → cjs/jsonforms.module.js} +8 -8
  43. package/lib/cjs/jsonforms.module.js.map +1 -0
  44. package/lib/{jsonforms.module.metadata.json → cjs/jsonforms.module.metadata.json} +0 -0
  45. package/lib/{jsonforms.service.d.ts → cjs/jsonforms.service.d.ts} +3 -3
  46. package/lib/{jsonforms.service.js → cjs/jsonforms.service.js} +14 -10
  47. package/lib/cjs/jsonforms.service.js.map +1 -0
  48. package/lib/{jsonforms.service.metadata.json → cjs/jsonforms.service.metadata.json} +1 -1
  49. package/lib/{unknown.component.d.ts → cjs/unknown.component.d.ts} +0 -0
  50. package/lib/{unknown.component.js → cjs/unknown.component.js} +7 -7
  51. package/lib/cjs/unknown.component.js.map +1 -0
  52. package/lib/{unknown.component.metadata.json → cjs/unknown.component.metadata.json} +0 -0
  53. package/lib/esm/abstract-control.d.ts +35 -0
  54. package/lib/esm/abstract-control.js +133 -0
  55. package/lib/esm/abstract-control.js.map +1 -0
  56. package/lib/esm/abstract-control.metadata.json +1 -0
  57. package/lib/esm/array-control.d.ts +6 -0
  58. package/lib/esm/array-control.js +40 -0
  59. package/lib/esm/array-control.js.map +1 -0
  60. package/lib/esm/array-control.metadata.json +1 -0
  61. package/lib/esm/base.renderer.d.ts +7 -0
  62. package/lib/esm/base.renderer.js +47 -0
  63. package/lib/esm/base.renderer.js.map +1 -0
  64. package/lib/esm/base.renderer.metadata.json +1 -0
  65. package/lib/esm/control.d.ts +9 -0
  66. package/lib/esm/control.js +52 -0
  67. package/lib/esm/control.js.map +1 -0
  68. package/lib/esm/control.metadata.json +1 -0
  69. package/lib/esm/index.d.ts +9 -0
  70. package/lib/esm/index.js +34 -0
  71. package/lib/esm/index.js.map +1 -0
  72. package/lib/esm/index.metadata.json +1 -0
  73. package/lib/esm/jsonforms-root.component.d.ts +29 -0
  74. package/lib/esm/jsonforms-root.component.js +135 -0
  75. package/lib/esm/jsonforms-root.component.js.map +1 -0
  76. package/lib/esm/jsonforms-root.component.metadata.json +1 -0
  77. package/lib/esm/jsonforms.component.d.ts +16 -0
  78. package/lib/esm/jsonforms.component.js +129 -0
  79. package/lib/esm/jsonforms.component.js.map +1 -0
  80. package/lib/esm/jsonforms.component.metadata.json +1 -0
  81. package/lib/esm/jsonforms.module.d.ts +2 -0
  82. package/lib/esm/jsonforms.module.js +42 -0
  83. package/lib/esm/jsonforms.module.js.map +1 -0
  84. package/lib/esm/jsonforms.module.metadata.json +1 -0
  85. package/lib/esm/jsonforms.service.d.ts +47 -0
  86. package/lib/esm/jsonforms.service.js +179 -0
  87. package/lib/esm/jsonforms.service.js.map +1 -0
  88. package/lib/esm/jsonforms.service.metadata.json +1 -0
  89. package/lib/esm/unknown.component.d.ts +2 -0
  90. package/lib/esm/unknown.component.js +38 -0
  91. package/lib/esm/unknown.component.js.map +1 -0
  92. package/lib/esm/unknown.component.metadata.json +1 -0
  93. package/package.json +19 -21
  94. package/src/abstract-control.ts +5 -4
  95. package/src/base.renderer.ts +2 -1
  96. package/src/index.ts +1 -0
  97. package/src/jsonforms-root.component.ts +18 -9
  98. package/src/jsonforms.service.ts +14 -10
  99. package/tsconfig.cjs.json +9 -0
  100. package/tsconfig.json +3 -2
  101. package/lib/abstract-control.js.map +0 -1
  102. package/lib/abstract-control.metadata.json +0 -1
  103. package/lib/array-control.js.map +0 -1
  104. package/lib/base.renderer.js.map +0 -1
  105. package/lib/base.renderer.metadata.json +0 -1
  106. package/lib/control.js.map +0 -1
  107. package/lib/index.js.map +0 -1
  108. package/lib/jsonforms-angular.js +0 -1511
  109. package/lib/jsonforms-angular.js.map +0 -1
  110. package/lib/jsonforms-root.component.js.map +0 -1
  111. package/lib/jsonforms-root.component.metadata.json +0 -1
  112. package/lib/jsonforms.component.js.map +0 -1
  113. package/lib/jsonforms.module.js.map +0 -1
  114. package/lib/jsonforms.service.js.map +0 -1
  115. package/lib/unknown.component.js.map +0 -1
  116. package/webpack.build.js +0 -12
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
3
+ exports.JsonFormsModule = void 0;
4
4
  /*
5
5
  The MIT License
6
6
 
@@ -32,13 +32,13 @@ var unknown_component_1 = require("./unknown.component");
32
32
  var JsonFormsModule = /** @class */ (function () {
33
33
  function JsonFormsModule() {
34
34
  }
35
- JsonFormsModule = tslib_1.__decorate([
36
- core_1.NgModule({
37
- declarations: [jsonforms_component_1.JsonFormsOutlet, unknown_component_1.UnknownRenderer, jsonforms_root_component_1.JsonForms],
38
- entryComponents: [unknown_component_1.UnknownRenderer],
39
- exports: [jsonforms_component_1.JsonFormsOutlet, jsonforms_root_component_1.JsonForms]
40
- })
41
- ], JsonFormsModule);
35
+ JsonFormsModule.decorators = [
36
+ { type: core_1.NgModule, args: [{
37
+ declarations: [jsonforms_component_1.JsonFormsOutlet, unknown_component_1.UnknownRenderer, jsonforms_root_component_1.JsonForms],
38
+ entryComponents: [unknown_component_1.UnknownRenderer],
39
+ exports: [jsonforms_component_1.JsonFormsOutlet, jsonforms_root_component_1.JsonForms]
40
+ },] }
41
+ ];
42
42
  return JsonFormsModule;
43
43
  }());
44
44
  exports.JsonFormsModule = JsonFormsModule;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonforms.module.js","sourceRoot":"","sources":["../../src/jsonforms.module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,sCAAyC;AAEzC,uEAAuD;AACvD,6DAAwD;AACxD,yDAAsD;AACtD;IAAA;IAK8B,CAAC;;gBAL9B,eAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,qCAAe,EAAE,mCAAe,EAAE,oCAAS,CAAC;oBAC3D,eAAe,EAAE,CAAC,mCAAe,CAAC;oBAClC,OAAO,EAAE,CAAC,qCAAe,EAAE,oCAAS,CAAC;iBACtC;;IAC6B,sBAAC;CAAA,AAL/B,IAK+B;AAAlB,0CAAe"}
@@ -1,7 +1,7 @@
1
- import { CoreActions, JsonFormsRendererRegistryEntry, JsonFormsState, JsonFormsSubStates, JsonSchema, LocaleActions, RankedTester, SetConfigAction, UISchemaActions, UISchemaElement, UISchemaTester, ValidationMode } from '@jsonforms/core';
1
+ import { CoreActions, JsonFormsRendererRegistryEntry, JsonFormsState, JsonFormsSubStates, JsonSchema, I18nActions, RankedTester, SetConfigAction, UISchemaActions, UISchemaElement, UISchemaTester, ValidationMode } from '@jsonforms/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { JsonFormsBaseRenderer } from './base.renderer';
4
- import { Ajv } from 'ajv';
4
+ import Ajv from 'ajv';
5
5
  export declare const USE_STATE_VALUE: unique symbol;
6
6
  export declare class JsonFormsAngularService {
7
7
  private _state;
@@ -24,7 +24,7 @@ export declare class JsonFormsAngularService {
24
24
  unregisterRenderer(tester: RankedTester): void;
25
25
  removeRenderer(tester: RankedTester): void;
26
26
  updateValidationMode(validationMode: ValidationMode): void;
27
- updateLocale<T extends LocaleActions>(localeAction: T): T;
27
+ updateI18n<T extends I18nActions>(i18nAction: T): T;
28
28
  updateCore<T extends CoreActions>(coreAction: T): T;
29
29
  /**
30
30
  * @deprecated use {@link JsonFormsAngularService.setUiSchemas}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonFormsAngularService = exports.USE_STATE_VALUE = void 0;
3
4
  /*
4
5
  The MIT License
5
6
 
@@ -32,14 +33,15 @@ var JsonFormsAngularService = /** @class */ (function () {
32
33
  function JsonFormsAngularService() {
33
34
  }
34
35
  JsonFormsAngularService.prototype.init = function (initialState) {
35
- if (initialState === void 0) { initialState = { core: { data: undefined, schema: undefined, uischema: undefined } }; }
36
- var _a, _b;
36
+ var _a, _b, _c, _d, _e;
37
+ if (initialState === void 0) { initialState = { core: { data: undefined, schema: undefined, uischema: undefined, validationMode: 'ValidateAndShow' } }; }
37
38
  this._state = initialState;
38
39
  this._state.config = core_1.configReducer(undefined, core_1.setConfig(this._state.config));
40
+ this._state.i18n = core_1.i18nReducer(this._state.i18n, core_1.updateI18n((_a = this._state.i18n) === null || _a === void 0 ? void 0 : _a.locale, (_b = this._state.i18n) === null || _b === void 0 ? void 0 : _b.translate, (_c = this._state.i18n) === null || _c === void 0 ? void 0 : _c.translateError));
39
41
  this.state = new rxjs_1.BehaviorSubject({ jsonforms: this._state });
40
42
  var data = initialState.core.data;
41
- var schema = (_a = initialState.core.schema) !== null && _a !== void 0 ? _a : core_1.generateJsonSchema(data);
42
- var uischema = (_b = initialState.core.uischema) !== null && _b !== void 0 ? _b : core_1.generateDefaultUISchema(schema);
43
+ var schema = (_d = initialState.core.schema) !== null && _d !== void 0 ? _d : core_1.generateJsonSchema(data);
44
+ var uischema = (_e = initialState.core.uischema) !== null && _e !== void 0 ? _e : core_1.generateDefaultUISchema(schema);
43
45
  this.updateCore(core_1.Actions.init(data, schema, uischema));
44
46
  };
45
47
  Object.defineProperty(JsonFormsAngularService.prototype, "$state", {
@@ -49,7 +51,7 @@ var JsonFormsAngularService = /** @class */ (function () {
49
51
  }
50
52
  return this.state.asObservable();
51
53
  },
52
- enumerable: true,
54
+ enumerable: false,
53
55
  configurable: true
54
56
  });
55
57
  /**
@@ -92,11 +94,13 @@ var JsonFormsAngularService = /** @class */ (function () {
92
94
  this._state.core = coreState;
93
95
  this.updateSubject();
94
96
  };
95
- JsonFormsAngularService.prototype.updateLocale = function (localeAction) {
96
- var localeState = core_1.i18nReducer(this._state.i18n, localeAction);
97
- this._state.i18n = localeState;
98
- this.updateSubject();
99
- return localeAction;
97
+ JsonFormsAngularService.prototype.updateI18n = function (i18nAction) {
98
+ var i18nState = core_1.i18nReducer(this._state.i18n, i18nAction);
99
+ if (i18nState !== this._state.i18n) {
100
+ this._state.i18n = i18nState;
101
+ this.updateSubject();
102
+ }
103
+ return i18nAction;
100
104
  };
101
105
  JsonFormsAngularService.prototype.updateCore = function (coreAction) {
102
106
  var coreState = core_1.coreReducer(this._state.core, coreAction);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonforms.service.js","sourceRoot":"","sources":["../../src/jsonforms.service.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,wCAsByB;AACzB,6BAAmD;AAGnD,iCAAmC;AAGtB,QAAA,eAAe,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AACnE;IAAA;IA6KA,CAAC;IAxKG,sCAAI,GAAJ,UAAK,YAA2I;;QAA3I,6BAAA,EAAA,iBAAqC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,EAAE;QAC5I,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,oBAAa,CAAC,SAAS,EAAE,gBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,kBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,iBAAU,CAAC,MAAA,IAAI,CAAC,MAAM,CAAC,IAAI,0CAAE,MAAM,EAAE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CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACpE,IAAM,iBAAiB,GAAG,cAAc,KAAK,uBAAe,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;QAChH,IAAI,CAAC,UAAU,CACX,cAAO,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,EAAC,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAC,CAAC,CACxG,CAAC;IACN,CAAC;IAEO,+CAAa,GAArB;QACI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAEL,8BAAC;AAAD,CAAC,AA7KD,IA6KC;AA7KY,0DAAuB"}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"USE_STATE_VALUE":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["Marker to use state value"]},"JsonFormsAngularService":{"__symbolic":"class","members":{"init":[{"__symbolic":"method"}],"registerRenderer":[{"__symbolic":"method"}],"addRenderer":[{"__symbolic":"method"}],"registerRenderers":[{"__symbolic":"method"}],"setRenderers":[{"__symbolic":"method"}],"unregisterRenderer":[{"__symbolic":"method"}],"removeRenderer":[{"__symbolic":"method"}],"updateValidationMode":[{"__symbolic":"method"}],"updateLocale":[{"__symbolic":"method"}],"updateCore":[{"__symbolic":"method"}],"updateUiSchema":[{"__symbolic":"method"}],"setUiSchemas":[{"__symbolic":"method"}],"updateConfig":[{"__symbolic":"method"}],"setUiSchema":[{"__symbolic":"method"}],"setSchema":[{"__symbolic":"method"}],"setData":[{"__symbolic":"method"}],"setLocale":[{"__symbolic":"method"}],"setReadonly":[{"__symbolic":"method"}],"getState":[{"__symbolic":"method"}],"refresh":[{"__symbolic":"method"}],"updateCoreState":[{"__symbolic":"method"}],"updateSubject":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"USE_STATE_VALUE":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Symbol"},"arguments":["Marker to use state value"]},"JsonFormsAngularService":{"__symbolic":"class","members":{"init":[{"__symbolic":"method"}],"registerRenderer":[{"__symbolic":"method"}],"addRenderer":[{"__symbolic":"method"}],"registerRenderers":[{"__symbolic":"method"}],"setRenderers":[{"__symbolic":"method"}],"unregisterRenderer":[{"__symbolic":"method"}],"removeRenderer":[{"__symbolic":"method"}],"updateValidationMode":[{"__symbolic":"method"}],"updateI18n":[{"__symbolic":"method"}],"updateCore":[{"__symbolic":"method"}],"updateUiSchema":[{"__symbolic":"method"}],"setUiSchemas":[{"__symbolic":"method"}],"updateConfig":[{"__symbolic":"method"}],"setUiSchema":[{"__symbolic":"method"}],"setSchema":[{"__symbolic":"method"}],"setData":[{"__symbolic":"method"}],"setLocale":[{"__symbolic":"method"}],"setReadonly":[{"__symbolic":"method"}],"getState":[{"__symbolic":"method"}],"refresh":[{"__symbolic":"method"}],"updateCoreState":[{"__symbolic":"method"}],"updateSubject":[{"__symbolic":"method"}]}}}}]
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
3
+ exports.UnknownRenderer = void 0;
4
4
  /*
5
5
  The MIT License
6
6
 
@@ -29,12 +29,12 @@ var core_1 = require("@angular/core");
29
29
  var UnknownRenderer = /** @class */ (function () {
30
30
  function UnknownRenderer() {
31
31
  }
32
- UnknownRenderer = tslib_1.__decorate([
33
- core_1.Component({
34
- selector: 'unknown.renderer',
35
- template: 'No applicable renderer found!'
36
- })
37
- ], UnknownRenderer);
32
+ UnknownRenderer.decorators = [
33
+ { type: core_1.Component, args: [{
34
+ selector: 'unknown.renderer',
35
+ template: 'No applicable renderer found!'
36
+ },] }
37
+ ];
38
38
  return UnknownRenderer;
39
39
  }());
40
40
  exports.UnknownRenderer = UnknownRenderer;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unknown.component.js","sourceRoot":"","sources":["../../src/unknown.component.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,sCAA0C;AAC1C;IAAA;IAI8B,CAAC;;gBAJ9B,gBAAS,SAAC;oBACT,QAAQ,EAAE,kBAAkB;oBAC5B,QAAQ,EAAE,+BAA+B;iBAC1C;;IAC6B,sBAAC;CAAA,AAJ/B,IAI+B;AAAlB,0CAAe"}
@@ -0,0 +1,35 @@
1
+ import { ControlElement, JsonFormsState, JsonSchema, OwnPropsOfControl, StatePropsOfControl } from '@jsonforms/core';
2
+ import { OnDestroy, OnInit } from '@angular/core';
3
+ import { FormControl, ValidatorFn } from '@angular/forms';
4
+ import { Subscription } from 'rxjs';
5
+ import { JsonFormsBaseRenderer } from './base.renderer';
6
+ import { JsonFormsAngularService } from './jsonforms.service';
7
+ export declare abstract class JsonFormsAbstractControl<Props extends StatePropsOfControl> extends JsonFormsBaseRenderer<ControlElement> implements OnInit, OnDestroy {
8
+ protected jsonFormsService: JsonFormsAngularService;
9
+ id: string;
10
+ disabled: boolean;
11
+ visible: boolean;
12
+ form: FormControl;
13
+ subscription: Subscription;
14
+ data: any;
15
+ label: string;
16
+ description: string;
17
+ error: string | null;
18
+ scopedSchema: JsonSchema;
19
+ rootSchema: JsonSchema;
20
+ enabled: boolean;
21
+ hidden: boolean;
22
+ propsPath: string;
23
+ constructor(jsonFormsService: JsonFormsAngularService);
24
+ getEventValue: (event: any) => any;
25
+ onChange(ev: any): void;
26
+ shouldShowUnfocusedDescription(): boolean;
27
+ ngOnInit(): void;
28
+ validator: ValidatorFn;
29
+ mapAdditionalProps(props: Props): void;
30
+ ngOnDestroy(): void;
31
+ isEnabled(): boolean;
32
+ protected getOwnProps(): OwnPropsOfControl;
33
+ protected abstract mapToProps(state: JsonFormsState): Props;
34
+ protected triggerValidation(): void;
35
+ }
@@ -0,0 +1,133 @@
1
+ import { __extends } from "tslib";
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
+ import { Actions, computeLabel } from '@jsonforms/core';
27
+ import { Component, Input } from '@angular/core';
28
+ import { FormControl } from '@angular/forms';
29
+ import { JsonFormsBaseRenderer } from './base.renderer';
30
+ import { JsonFormsAngularService } from './jsonforms.service';
31
+ import merge from 'lodash/merge';
32
+ var JsonFormsAbstractControl = /** @class */ (function (_super) {
33
+ __extends(JsonFormsAbstractControl, _super);
34
+ function JsonFormsAbstractControl(jsonFormsService) {
35
+ var _this = _super.call(this) || this;
36
+ _this.jsonFormsService = jsonFormsService;
37
+ _this.getEventValue = function (event) { return event.value; };
38
+ _this.validator = function (_c) {
39
+ return _this.error ? { error: _this.error } : null;
40
+ };
41
+ _this.form = new FormControl({
42
+ value: '',
43
+ disabled: true
44
+ }, {
45
+ updateOn: 'change',
46
+ validators: _this.validator.bind(_this)
47
+ });
48
+ return _this;
49
+ }
50
+ JsonFormsAbstractControl.prototype.onChange = function (ev) {
51
+ var _this = this;
52
+ this.jsonFormsService.updateCore(Actions.update(this.propsPath, function () { return _this.getEventValue(ev); }));
53
+ this.triggerValidation();
54
+ };
55
+ JsonFormsAbstractControl.prototype.shouldShowUnfocusedDescription = function () {
56
+ var config = this.jsonFormsService.getState().jsonforms.config;
57
+ var appliedUiSchemaOptions = merge({}, config, this.uischema.options);
58
+ return !!appliedUiSchemaOptions.showUnfocusedDescription;
59
+ };
60
+ JsonFormsAbstractControl.prototype.ngOnInit = function () {
61
+ var _this = this;
62
+ this.jsonFormsService.$state.subscribe({
63
+ next: function (state) {
64
+ var props = _this.mapToProps(state);
65
+ var data = props.data, enabled = props.enabled, errors = props.errors, label = props.label, required = props.required, schema = props.schema, rootSchema = props.rootSchema, visible = props.visible, path = props.path, config = props.config;
66
+ _this.label = computeLabel(label, required, config ? config.hideRequiredAsterisk : false);
67
+ _this.data = data;
68
+ _this.error = errors;
69
+ _this.enabled = enabled;
70
+ _this.isEnabled() ? _this.form.enable() : _this.form.disable();
71
+ _this.hidden = !visible;
72
+ _this.scopedSchema = schema;
73
+ _this.rootSchema = rootSchema;
74
+ _this.description =
75
+ _this.scopedSchema !== undefined ? _this.scopedSchema.description : '';
76
+ _this.id = props.id;
77
+ _this.form.setValue(data);
78
+ _this.propsPath = path;
79
+ _this.mapAdditionalProps(props);
80
+ }
81
+ });
82
+ this.triggerValidation();
83
+ };
84
+ // @ts-ignore
85
+ JsonFormsAbstractControl.prototype.mapAdditionalProps = function (props) {
86
+ // do nothing by default
87
+ };
88
+ JsonFormsAbstractControl.prototype.ngOnDestroy = function () {
89
+ if (this.subscription) {
90
+ this.subscription.unsubscribe();
91
+ }
92
+ };
93
+ JsonFormsAbstractControl.prototype.isEnabled = function () {
94
+ return this.enabled;
95
+ };
96
+ JsonFormsAbstractControl.prototype.getOwnProps = function () {
97
+ var props = {
98
+ uischema: this.uischema,
99
+ schema: this.schema,
100
+ path: this.path,
101
+ id: this.id
102
+ };
103
+ if (this.disabled !== undefined) {
104
+ props.enabled = !this.disabled;
105
+ }
106
+ if (this.visible !== undefined) {
107
+ props.visible = this.visible;
108
+ }
109
+ return props;
110
+ };
111
+ JsonFormsAbstractControl.prototype.triggerValidation = function () {
112
+ // these cause the correct update of the error underline, seems to be
113
+ // related to ionic-team/ionic#11640
114
+ this.form.markAsTouched();
115
+ this.form.updateValueAndValidity();
116
+ };
117
+ JsonFormsAbstractControl.decorators = [
118
+ { type: Component, args: [{
119
+ template: ''
120
+ },] }
121
+ ];
122
+ JsonFormsAbstractControl.ctorParameters = function () { return [
123
+ { type: JsonFormsAngularService }
124
+ ]; };
125
+ JsonFormsAbstractControl.propDecorators = {
126
+ id: [{ type: Input }],
127
+ disabled: [{ type: Input }],
128
+ visible: [{ type: Input }]
129
+ };
130
+ return JsonFormsAbstractControl;
131
+ }(JsonFormsBaseRenderer));
132
+ export { JsonFormsAbstractControl };
133
+ //# sourceMappingURL=abstract-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstract-control.js","sourceRoot":"","sources":["../../src/abstract-control.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EACL,OAAO,EACP,YAAY,EAMb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,MAAM,eAAe,CAAC;AACpE,OAAO,EAEL,WAAW,EAGZ,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC;IAKU,4CAAqC;IAiB7C,kCAAsB,gBAAyC;QAA/D,YACE,iBAAO,SAWR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ic":"class","extends":{"__symbolic":"reference","module":"./base.renderer","name":"JsonFormsBaseRenderer","line":50,"character":10},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":45,"character":1},"arguments":[{"template":""}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"visible":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":53,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./jsonforms.service","name":"JsonFormsAngularService","line":67,"character":42}]}],"onChange":[{"__symbolic":"method"}],"shouldShowUnfocusedDescription":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"mapAdditionalProps":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"isEnabled":[{"__symbolic":"method"}],"getOwnProps":[{"__symbolic":"method"}],"mapToProps":[{"__symbolic":"method"}],"triggerValidation":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,6 @@
1
+ import { JsonFormsState, StatePropsOfArrayControl } from '@jsonforms/core';
2
+ import { OnDestroy, OnInit } from '@angular/core';
3
+ import { JsonFormsAbstractControl } from './abstract-control';
4
+ export declare class JsonFormsArrayControl extends JsonFormsAbstractControl<StatePropsOfArrayControl> implements OnInit, OnDestroy {
5
+ protected mapToProps(state: JsonFormsState): StatePropsOfArrayControl;
6
+ }
@@ -0,0 +1,40 @@
1
+ import { __assign, __extends } from "tslib";
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
+ import { mapStateToArrayControlProps } from '@jsonforms/core';
27
+ import { JsonFormsAbstractControl } from './abstract-control';
28
+ var JsonFormsArrayControl = /** @class */ (function (_super) {
29
+ __extends(JsonFormsArrayControl, _super);
30
+ function JsonFormsArrayControl() {
31
+ return _super !== null && _super.apply(this, arguments) || this;
32
+ }
33
+ JsonFormsArrayControl.prototype.mapToProps = function (state) {
34
+ var props = mapStateToArrayControlProps(state, this.getOwnProps());
35
+ return __assign({}, props);
36
+ };
37
+ return JsonFormsArrayControl;
38
+ }(JsonFormsAbstractControl));
39
+ export { JsonFormsArrayControl };
40
+ //# sourceMappingURL=array-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-control.js","sourceRoot":"","sources":["../../src/array-control.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EAEL,2BAA2B,EAE5B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;IACU,yCAAkD;IAD5D;;IAOA,CAAC;IAJW,0CAAU,GAApB,UAAqB,KAAqB;QACxC,IAAM,KAAK,GAAG,2BAA2B,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QACrE,oBAAY,KAAK,EAAG;IACtB,CAAC;IACH,4BAAC;AAAD,CAAC,AAPD,CACU,wBAAwB,GAMjC"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"JsonFormsArrayControl":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-control","name":"JsonFormsAbstractControl","line":33,"character":10},"members":{"mapToProps":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,7 @@
1
+ import { JsonSchema, OwnPropsOfRenderer, UISchemaElement } from '@jsonforms/core';
2
+ export declare class JsonFormsBaseRenderer<T extends UISchemaElement> {
3
+ uischema: T;
4
+ schema: JsonSchema;
5
+ path: string;
6
+ protected getOwnProps(): OwnPropsOfRenderer;
7
+ }
@@ -0,0 +1,47 @@
1
+ /*
2
+ The MIT License
3
+
4
+ Copyright (c) 2017-2019 EclipseSource Munich
5
+ https://github.com/eclipsesource/jsonforms
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
24
+ */
25
+ import { Directive, Input } from '@angular/core';
26
+ var JsonFormsBaseRenderer = /** @class */ (function () {
27
+ function JsonFormsBaseRenderer() {
28
+ }
29
+ JsonFormsBaseRenderer.prototype.getOwnProps = function () {
30
+ return {
31
+ uischema: this.uischema,
32
+ schema: this.schema,
33
+ path: this.path
34
+ };
35
+ };
36
+ JsonFormsBaseRenderer.decorators = [
37
+ { type: Directive }
38
+ ];
39
+ JsonFormsBaseRenderer.propDecorators = {
40
+ uischema: [{ type: Input }],
41
+ schema: [{ type: Input }],
42
+ path: [{ type: Input }]
43
+ };
44
+ return JsonFormsBaseRenderer;
45
+ }());
46
+ export { JsonFormsBaseRenderer };
47
+ //# sourceMappingURL=base.renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.renderer.js","sourceRoot":"","sources":["../../src/base.renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EAAG,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOlD;IAAA;IAaA,CAAC;IAPW,2CAAW,GAArB;QACE,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;;gBAZF,SAAS;;;2BAEP,KAAK;yBACL,KAAK;uBACL,KAAK;;IASR,4BAAC;CAAA,AAbD,IAaC;SAZY,qBAAqB"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"JsonFormsBaseRenderer":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":31,"character":1}}],"members":{"uischema":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":33,"character":3}}]}],"schema":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}}]}],"path":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"getOwnProps":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,9 @@
1
+ import { JsonFormsState, StatePropsOfControl, StatePropsOfControlWithDetail } from '@jsonforms/core';
2
+ import { OnDestroy, OnInit } from '@angular/core';
3
+ import { JsonFormsAbstractControl } from './abstract-control';
4
+ export declare class JsonFormsControl extends JsonFormsAbstractControl<StatePropsOfControl> implements OnInit, OnDestroy {
5
+ protected mapToProps(state: JsonFormsState): StatePropsOfControl;
6
+ }
7
+ export declare class JsonFormsControlWithDetail extends JsonFormsAbstractControl<StatePropsOfControlWithDetail> implements OnInit, OnDestroy {
8
+ protected mapToProps(state: JsonFormsState): StatePropsOfControlWithDetail;
9
+ }
@@ -0,0 +1,52 @@
1
+ import { __assign, __extends } from "tslib";
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
+ import { mapStateToControlProps, mapStateToControlWithDetailProps } from '@jsonforms/core';
27
+ import { JsonFormsAbstractControl } from './abstract-control';
28
+ var JsonFormsControl = /** @class */ (function (_super) {
29
+ __extends(JsonFormsControl, _super);
30
+ function JsonFormsControl() {
31
+ return _super !== null && _super.apply(this, arguments) || this;
32
+ }
33
+ JsonFormsControl.prototype.mapToProps = function (state) {
34
+ var props = mapStateToControlProps(state, this.getOwnProps());
35
+ return __assign({}, props);
36
+ };
37
+ return JsonFormsControl;
38
+ }(JsonFormsAbstractControl));
39
+ export { JsonFormsControl };
40
+ var JsonFormsControlWithDetail = /** @class */ (function (_super) {
41
+ __extends(JsonFormsControlWithDetail, _super);
42
+ function JsonFormsControlWithDetail() {
43
+ return _super !== null && _super.apply(this, arguments) || this;
44
+ }
45
+ JsonFormsControlWithDetail.prototype.mapToProps = function (state) {
46
+ var props = mapStateToControlWithDetailProps(state, this.getOwnProps());
47
+ return __assign({}, props);
48
+ };
49
+ return JsonFormsControlWithDetail;
50
+ }(JsonFormsAbstractControl));
51
+ export { JsonFormsControlWithDetail };
52
+ //# sourceMappingURL=control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control.js","sourceRoot":"","sources":["../../src/control.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EAEL,sBAAsB,EACtB,gCAAgC,EAGjC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;IACU,oCAA6C;IADvD;;IAOA,CAAC;IAJW,qCAAU,GAApB,UAAqB,KAAqB;QACxC,IAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAChE,oBAAY,KAAK,EAAG;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AAPD,CACU,wBAAwB,GAMjC;;AAED;IACU,8CAAuD;IADjE;;IAOA,CAAC;IAJW,+CAAU,GAApB,UAAqB,KAAqB;QACxC,IAAM,KAAK,GAAG,gCAAgC,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAC1E,oBAAY,KAAK,EAAG;IACtB,CAAC;IACH,iCAAC;AAAD,CAAC,AAPD,CACU,wBAAwB,GAMjC"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"JsonFormsControl":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-control","name":"JsonFormsAbstractControl","line":35,"character":10},"members":{"mapToProps":[{"__symbolic":"method"}]}},"JsonFormsControlWithDetail":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./abstract-control","name":"JsonFormsAbstractControl","line":44,"character":10},"members":{"mapToProps":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,9 @@
1
+ export * from './base.renderer';
2
+ export * from './control';
3
+ export * from './array-control';
4
+ export * from './jsonforms.component';
5
+ export * from './jsonforms.module';
6
+ export * from './unknown.component';
7
+ export * from './jsonforms.service';
8
+ export * from './jsonforms-root.component';
9
+ export * from './abstract-control';
@@ -0,0 +1,34 @@
1
+ /*
2
+ The MIT License
3
+
4
+ Copyright (c) 2017-2020 EclipseSource Munich
5
+ https://github.com/eclipsesource/jsonforms
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
24
+ */
25
+ export * from './base.renderer';
26
+ export * from './control';
27
+ export * from './array-control';
28
+ export * from './jsonforms.component';
29
+ export * from './jsonforms.module';
30
+ export * from './unknown.component';
31
+ export * from './jsonforms.service';
32
+ export * from './jsonforms-root.component';
33
+ export * from './abstract-control';
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./base.renderer"},{"from":"./control"},{"from":"./array-control"},{"from":"./jsonforms.component"},{"from":"./jsonforms.module"},{"from":"./unknown.component"},{"from":"./jsonforms.service"},{"from":"./jsonforms-root.component"},{"from":"./abstract-control"}]}]