@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
@@ -0,0 +1,29 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { JsonFormsI18nState, JsonFormsRendererRegistryEntry, JsonSchema, UISchemaElement, UISchemaTester, ValidationMode } from '@jsonforms/core';
3
+ import Ajv, { ErrorObject } from 'ajv';
4
+ import { JsonFormsAngularService } from './jsonforms.service';
5
+ export declare class JsonForms implements OnChanges, OnInit {
6
+ private jsonformsService;
7
+ uischema: UISchemaElement;
8
+ schema: JsonSchema;
9
+ data: any;
10
+ renderers: JsonFormsRendererRegistryEntry[];
11
+ uischemas: {
12
+ tester: UISchemaTester;
13
+ uischema: UISchemaElement;
14
+ }[];
15
+ dataChange: EventEmitter<any>;
16
+ readonly: boolean;
17
+ validationMode: ValidationMode;
18
+ ajv: Ajv;
19
+ config: any;
20
+ i18n: JsonFormsI18nState;
21
+ errors: EventEmitter<ErrorObject<string, Record<string, any>, unknown>[]>;
22
+ private previousData;
23
+ private previousErrors;
24
+ private initialized;
25
+ constructor(jsonformsService: JsonFormsAngularService);
26
+ ngOnInit(): void;
27
+ ngDoCheck(): void;
28
+ ngOnChanges(changes: SimpleChanges): void;
29
+ }
@@ -0,0 +1,135 @@
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
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
26
+ import { Actions } from '@jsonforms/core';
27
+ import Ajv from 'ajv';
28
+ import { JsonFormsAngularService, USE_STATE_VALUE } from './jsonforms.service';
29
+ var JsonForms = /** @class */ (function () {
30
+ function JsonForms(jsonformsService) {
31
+ this.jsonformsService = jsonformsService;
32
+ this.dataChange = new EventEmitter();
33
+ this.errors = new EventEmitter();
34
+ this.initialized = false;
35
+ }
36
+ JsonForms.prototype.ngOnInit = function () {
37
+ var _this = this;
38
+ this.jsonformsService.init({
39
+ core: {
40
+ data: this.data,
41
+ uischema: this.uischema,
42
+ schema: this.schema,
43
+ ajv: this.ajv,
44
+ validationMode: this.validationMode
45
+ },
46
+ uischemas: this.uischemas,
47
+ i18n: this.i18n,
48
+ renderers: this.renderers,
49
+ config: this.config,
50
+ readonly: this.readonly
51
+ });
52
+ this.jsonformsService.$state.subscribe(function (state) {
53
+ var _a, _b, _c, _d;
54
+ var data = (_b = (_a = state === null || state === void 0 ? void 0 : state.jsonforms) === null || _a === void 0 ? void 0 : _a.core) === null || _b === void 0 ? void 0 : _b.data;
55
+ var errors = (_d = (_c = state === null || state === void 0 ? void 0 : state.jsonforms) === null || _c === void 0 ? void 0 : _c.core) === null || _d === void 0 ? void 0 : _d.errors;
56
+ if (_this.previousData !== data) {
57
+ _this.previousData = data;
58
+ _this.dataChange.emit(data);
59
+ }
60
+ if (_this.previousErrors !== errors) {
61
+ _this.previousErrors = errors;
62
+ _this.errors.emit(errors);
63
+ }
64
+ });
65
+ this.initialized = true;
66
+ };
67
+ JsonForms.prototype.ngDoCheck = function () {
68
+ var _a, _b, _c;
69
+ // we can't use ngOnChanges as then nested i18n changes will not be detected
70
+ // the update will result in a no-op when the parameters did not change
71
+ this.jsonformsService.updateI18n(Actions.updateI18n((_a = this.i18n) === null || _a === void 0 ? void 0 : _a.locale, (_b = this.i18n) === null || _b === void 0 ? void 0 : _b.translate, (_c = this.i18n) === null || _c === void 0 ? void 0 : _c.translateError));
72
+ };
73
+ // tslint:disable-next-line: cyclomatic-complexity
74
+ JsonForms.prototype.ngOnChanges = function (changes) {
75
+ var _a, _b, _c;
76
+ if (!this.initialized) {
77
+ return;
78
+ }
79
+ var newData = changes.data;
80
+ var newSchema = changes.schema;
81
+ var newUiSchema = changes.uischema;
82
+ var newRenderers = changes.renderers;
83
+ var newUischemas = changes.uischemas;
84
+ var newI18n = changes.i18n;
85
+ var newReadonly = changes.readonly;
86
+ var newValidationMode = changes.validationMode;
87
+ var newAjv = changes.ajv;
88
+ var newConfig = changes.config;
89
+ if (newData || newSchema || newUiSchema || newValidationMode || newAjv) {
90
+ this.jsonformsService.updateCoreState(newData ? newData.currentValue : USE_STATE_VALUE, newSchema ? newSchema.currentValue : USE_STATE_VALUE, newUiSchema ? newUiSchema.currentValue : USE_STATE_VALUE, newAjv ? newAjv.currentValue : USE_STATE_VALUE, newValidationMode ? newValidationMode.currentValue : USE_STATE_VALUE);
91
+ }
92
+ if (newRenderers && !newRenderers.isFirstChange()) {
93
+ this.jsonformsService.setRenderers(newRenderers.currentValue);
94
+ }
95
+ if (newUischemas && !newUischemas.isFirstChange()) {
96
+ this.jsonformsService.setUiSchemas(newUischemas.currentValue);
97
+ }
98
+ if (newI18n && !newI18n.isFirstChange()) {
99
+ this.jsonformsService.updateI18n(Actions.updateI18n((_a = newI18n.currentValue) === null || _a === void 0 ? void 0 : _a.locale, (_b = newI18n.currentValue) === null || _b === void 0 ? void 0 : _b.translate, (_c = newI18n.currentValue) === null || _c === void 0 ? void 0 : _c.translateError));
100
+ }
101
+ if (newReadonly && !newReadonly.isFirstChange()) {
102
+ this.jsonformsService.setReadonly(newReadonly.currentValue);
103
+ }
104
+ if (newConfig && !newConfig.isFirstChange()) {
105
+ this.jsonformsService.updateConfig(Actions.setConfig(newConfig.currentValue));
106
+ }
107
+ };
108
+ JsonForms.decorators = [
109
+ { type: Component, args: [{
110
+ selector: 'jsonforms',
111
+ template: '<jsonforms-outlet></jsonforms-outlet>',
112
+ providers: [JsonFormsAngularService]
113
+ },] }
114
+ ];
115
+ JsonForms.ctorParameters = function () { return [
116
+ { type: JsonFormsAngularService }
117
+ ]; };
118
+ JsonForms.propDecorators = {
119
+ uischema: [{ type: Input }],
120
+ schema: [{ type: Input }],
121
+ data: [{ type: Input }],
122
+ renderers: [{ type: Input }],
123
+ uischemas: [{ type: Input }],
124
+ dataChange: [{ type: Output }],
125
+ readonly: [{ type: Input }],
126
+ validationMode: [{ type: Input }],
127
+ ajv: [{ type: Input }],
128
+ config: [{ type: Input }],
129
+ i18n: [{ type: Input }],
130
+ errors: [{ type: Output }]
131
+ };
132
+ return JsonForms;
133
+ }());
134
+ export { JsonForms };
135
+ //# sourceMappingURL=jsonforms-root.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonforms-root.component.js","sourceRoot":"","sources":["../../src/jsonforms-root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CAAC,WAAW,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;SAC/D;QAED,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE;YACzC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;SACjF;IACL,CAAC;;gBAjHJ,SAAS,SAAC;oBACP,QAAQ,EAAE,WAAW;oBACrB,QAAQ,EAAE,uCAAuC;oBACjD,SAAS,EAAE,CAAC,uBAAuB,CAAC;iBACvC;;;gBALQ,uBAAuB;;;2BAQ3B,KAAK;yBACL,KAAK;uBACL,KAAK;4BACL,KAAK;4BACL,KAAK;6BACL,MAAM;2BACN,KAAK;iCACL,KAAK;sBACL,KAAK;yBACL,KAAK;uBACL,KAAK;yBACL,MAAM;;IAgGX,gBAAC;CAAA,AAlHD,IAkHC;SA7GY,SAAS"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"JsonForms":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":30,"character":1},"arguments":[{"selector":"jsonforms","template":"<jsonforms-outlet></jsonforms-outlet>","providers":[{"__symbolic":"reference","module":"./jsonforms.service","name":"JsonFormsAngularService","line":33,"character":16}]}]}],"members":{"uischema":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":5}}]}],"schema":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":5}}]}],"data":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":5}}]}],"renderers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":5}}]}],"uischemas":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":5}}]}],"dataChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":5}}]}],"readonly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":5}}]}],"validationMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":5}}]}],"ajv":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":5}}]}],"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":5}}]}],"i18n":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":5}}]}],"errors":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":48,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./jsonforms.service","name":"JsonFormsAngularService","line":55,"character":42}]}],"ngOnInit":[{"__symbolic":"method"}],"ngDoCheck":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,16 @@
1
+ import { ComponentFactoryResolver, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
+ import { JsonFormsState, OwnPropsOfRenderer, UISchemaElement } from '@jsonforms/core';
3
+ import { JsonFormsBaseRenderer } from './base.renderer';
4
+ import { JsonFormsAngularService } from './jsonforms.service';
5
+ export declare class JsonFormsOutlet extends JsonFormsBaseRenderer<UISchemaElement> implements OnInit, OnDestroy {
6
+ private viewContainerRef;
7
+ private componentFactoryResolver;
8
+ private jsonformsService;
9
+ private subscription;
10
+ private previousProps;
11
+ constructor(viewContainerRef: ViewContainerRef, componentFactoryResolver: ComponentFactoryResolver, jsonformsService: JsonFormsAngularService);
12
+ set renderProps(renderProps: OwnPropsOfRenderer);
13
+ ngOnInit(): void;
14
+ update(state: JsonFormsState): void;
15
+ ngOnDestroy(): void;
16
+ }
@@ -0,0 +1,129 @@
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 maxBy from 'lodash/maxBy';
27
+ import { ComponentFactoryResolver, Directive, Input, ViewContainerRef } from '@angular/core';
28
+ import { createId, isControl, mapStateToJsonFormsRendererProps } from '@jsonforms/core';
29
+ import { UnknownRenderer } from './unknown.component';
30
+ import { JsonFormsBaseRenderer } from './base.renderer';
31
+ import { JsonFormsControl } from './control';
32
+ import { JsonFormsAngularService } from './jsonforms.service';
33
+ import { get, isEqual } from 'lodash';
34
+ var areEqual = function (prevProps, nextProps) {
35
+ return get(prevProps, 'renderers.length') === get(nextProps, 'renderers.length')
36
+ && get(prevProps, 'cells.length') === get(nextProps, 'cells.length')
37
+ && get(prevProps, 'uischemas.length') === get(nextProps, 'uischemas.length')
38
+ && get(prevProps, 'schema') === get(nextProps, 'schema')
39
+ && isEqual(get(prevProps, 'uischema'), get(nextProps, 'uischema'))
40
+ && get(prevProps, 'path') === get(nextProps, 'path');
41
+ };
42
+ var ɵ0 = areEqual;
43
+ var JsonFormsOutlet = /** @class */ (function (_super) {
44
+ __extends(JsonFormsOutlet, _super);
45
+ function JsonFormsOutlet(viewContainerRef, componentFactoryResolver, jsonformsService) {
46
+ var _this = _super.call(this) || this;
47
+ _this.viewContainerRef = viewContainerRef;
48
+ _this.componentFactoryResolver = componentFactoryResolver;
49
+ _this.jsonformsService = jsonformsService;
50
+ return _this;
51
+ }
52
+ Object.defineProperty(JsonFormsOutlet.prototype, "renderProps", {
53
+ set: function (renderProps) {
54
+ this.path = renderProps.path;
55
+ this.schema = renderProps.schema;
56
+ this.uischema = renderProps.uischema;
57
+ this.update(this.jsonformsService.getState());
58
+ },
59
+ enumerable: false,
60
+ configurable: true
61
+ });
62
+ JsonFormsOutlet.prototype.ngOnInit = function () {
63
+ var _this = this;
64
+ this.subscription = this.jsonformsService.$state.subscribe({
65
+ next: function (state) { return _this.update(state); }
66
+ });
67
+ };
68
+ JsonFormsOutlet.prototype.update = function (state) {
69
+ var props = mapStateToJsonFormsRendererProps(state, {
70
+ schema: this.schema,
71
+ uischema: this.uischema,
72
+ path: this.path
73
+ });
74
+ if (areEqual(this.previousProps, props)) {
75
+ return;
76
+ }
77
+ else {
78
+ this.previousProps = props;
79
+ }
80
+ var renderers = props.renderers;
81
+ var schema = this.schema || props.schema;
82
+ var uischema = this.uischema || props.uischema;
83
+ var renderer = maxBy(renderers, function (r) { return r.tester(uischema, schema); });
84
+ var bestComponent = UnknownRenderer;
85
+ if (renderer !== undefined && renderer.tester(uischema, schema) !== -1) {
86
+ bestComponent = renderer.renderer;
87
+ }
88
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(bestComponent);
89
+ this.viewContainerRef.clear();
90
+ var currentComponentRef = this.viewContainerRef.createComponent(componentFactory);
91
+ if (currentComponentRef.instance instanceof JsonFormsBaseRenderer) {
92
+ var instance = currentComponentRef.instance;
93
+ instance.uischema = uischema;
94
+ instance.schema = schema;
95
+ instance.path = this.path;
96
+ if (instance instanceof JsonFormsControl) {
97
+ var controlInstance = instance;
98
+ if (controlInstance.id === undefined) {
99
+ var id = isControl(props.uischema)
100
+ ? createId(props.uischema.scope)
101
+ : undefined;
102
+ instance.id = id;
103
+ }
104
+ }
105
+ }
106
+ };
107
+ JsonFormsOutlet.prototype.ngOnDestroy = function () {
108
+ if (this.subscription) {
109
+ this.subscription.unsubscribe();
110
+ }
111
+ };
112
+ JsonFormsOutlet.decorators = [
113
+ { type: Directive, args: [{
114
+ selector: 'jsonforms-outlet'
115
+ },] }
116
+ ];
117
+ JsonFormsOutlet.ctorParameters = function () { return [
118
+ { type: ViewContainerRef },
119
+ { type: ComponentFactoryResolver },
120
+ { type: JsonFormsAngularService }
121
+ ]; };
122
+ JsonFormsOutlet.propDecorators = {
123
+ renderProps: [{ type: Input }]
124
+ };
125
+ return JsonFormsOutlet;
126
+ }(JsonFormsBaseRenderer));
127
+ export { JsonFormsOutlet };
128
+ export { ɵ0 };
129
+ //# sourceMappingURL=jsonforms.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonforms.component.js","sourceRoot":"","sources":["../../src/jsonforms.component.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,KAAK,MAAM,cAAc,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,SAAS,EACT,KAAK,EAIL,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,SAAS,EA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,AA7ED,CAGqC,qBAAqB,GA0EzD;SA1EY,eAAe"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"ɵ0":{"__symbolic":"error","message":"Lambda not supported","line":53,"character":17},"JsonFormsOutlet":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./base.renderer","name":"JsonFormsBaseRenderer","line":65,"character":37},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":62,"character":1},"arguments":[{"selector":"jsonforms-outlet"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":71,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"ComponentFactoryResolver","line":72,"character":38},{"__symbolic":"reference","module":"./jsonforms.service","name":"JsonFormsAngularService","line":73,"character":30}]}],"renderProps":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":78,"character":3}}]}],"ngOnInit":[{"__symbolic":"method"}],"update":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}]
@@ -0,0 +1,2 @@
1
+ export declare class JsonFormsModule {
2
+ }
@@ -0,0 +1,42 @@
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
+ import { NgModule } from '@angular/core';
26
+ import { JsonForms } from './jsonforms-root.component';
27
+ import { JsonFormsOutlet } from './jsonforms.component';
28
+ import { UnknownRenderer } from './unknown.component';
29
+ var JsonFormsModule = /** @class */ (function () {
30
+ function JsonFormsModule() {
31
+ }
32
+ JsonFormsModule.decorators = [
33
+ { type: NgModule, args: [{
34
+ declarations: [JsonFormsOutlet, UnknownRenderer, JsonForms],
35
+ entryComponents: [UnknownRenderer],
36
+ exports: [JsonFormsOutlet, JsonForms]
37
+ },] }
38
+ ];
39
+ return JsonFormsModule;
40
+ }());
41
+ export { JsonFormsModule };
42
+ //# sourceMappingURL=jsonforms.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonforms.module.js","sourceRoot":"","sources":["../../src/jsonforms.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD;IAAA;IAK8B,CAAC;;gBAL9B,QAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,SAAS,CAAC;oBAC3D,eAAe,EAAE,CAAC,eAAe,CAAC;oBAClC,OAAO,EAAE,CAAC,eAAe,EAAE,SAAS,CAAC;iBACtC;;IAC6B,sBAAC;CAAA,AAL/B,IAK+B;SAAlB,eAAe"}
@@ -0,0 +1 @@
1
+ [{"__symbolic":"module","version":4,"metadata":{"JsonFormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":29,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./jsonforms.component","name":"JsonFormsOutlet","line":30,"character":17},{"__symbolic":"reference","module":"./unknown.component","name":"UnknownRenderer","line":30,"character":34},{"__symbolic":"reference","module":"./jsonforms-root.component","name":"JsonForms","line":30,"character":51}],"entryComponents":[{"__symbolic":"reference","module":"./unknown.component","name":"UnknownRenderer","line":31,"character":20}],"exports":[{"__symbolic":"reference","module":"./jsonforms.component","name":"JsonFormsOutlet","line":32,"character":12},{"__symbolic":"reference","module":"./jsonforms-root.component","name":"JsonForms","line":32,"character":29}]}]}]}}}]
@@ -0,0 +1,47 @@
1
+ import { CoreActions, JsonFormsRendererRegistryEntry, JsonFormsState, JsonFormsSubStates, JsonSchema, I18nActions, RankedTester, SetConfigAction, UISchemaActions, UISchemaElement, UISchemaTester, ValidationMode } from '@jsonforms/core';
2
+ import { Observable } from 'rxjs';
3
+ import { JsonFormsBaseRenderer } from './base.renderer';
4
+ import Ajv from 'ajv';
5
+ export declare const USE_STATE_VALUE: unique symbol;
6
+ export declare class JsonFormsAngularService {
7
+ private _state;
8
+ private state;
9
+ init(initialState?: JsonFormsSubStates): void;
10
+ get $state(): Observable<JsonFormsState>;
11
+ /**
12
+ * @deprecated use {@link JsonFormsAngularService.addRenderer}
13
+ */
14
+ registerRenderer(renderer: JsonFormsBaseRenderer<UISchemaElement>, tester: RankedTester): void;
15
+ addRenderer(renderer: JsonFormsBaseRenderer<UISchemaElement>, tester: RankedTester): void;
16
+ /**
17
+ * @deprecated use {@link JsonFormsAngularService.setRenderer}
18
+ */
19
+ registerRenderers(renderers: JsonFormsRendererRegistryEntry[]): void;
20
+ setRenderers(renderers: JsonFormsRendererRegistryEntry[]): void;
21
+ /**
22
+ * @deprecated use {@link JsonFormsAngularService.removeRenderer}
23
+ */
24
+ unregisterRenderer(tester: RankedTester): void;
25
+ removeRenderer(tester: RankedTester): void;
26
+ updateValidationMode(validationMode: ValidationMode): void;
27
+ updateI18n<T extends I18nActions>(i18nAction: T): T;
28
+ updateCore<T extends CoreActions>(coreAction: T): T;
29
+ /**
30
+ * @deprecated use {@link JsonFormsAngularService.setUiSchemas}
31
+ */
32
+ updateUiSchema<T extends UISchemaActions>(uischemaAction: T): T;
33
+ setUiSchemas(uischemas: {
34
+ tester: UISchemaTester;
35
+ uischema: UISchemaElement;
36
+ }[]): void;
37
+ updateConfig<T extends SetConfigAction>(setConfigAction: T): T;
38
+ setUiSchema(uischema: UISchemaElement | undefined): void;
39
+ setSchema(schema: JsonSchema | undefined): void;
40
+ setData(data: any): void;
41
+ setLocale(locale: string): void;
42
+ setReadonly(readonly: boolean): void;
43
+ getState(): JsonFormsState;
44
+ refresh(): void;
45
+ updateCoreState(data: any | typeof USE_STATE_VALUE, schema: JsonSchema | typeof USE_STATE_VALUE, uischema: UISchemaElement | typeof USE_STATE_VALUE, ajv: Ajv | typeof USE_STATE_VALUE, validationMode: ValidationMode | typeof USE_STATE_VALUE): void;
46
+ private updateSubject;
47
+ }
@@ -0,0 +1,179 @@
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
+ import { Actions, configReducer, coreReducer, generateDefaultUISchema, generateJsonSchema, i18nReducer, setConfig, uischemaRegistryReducer, updateI18n } from '@jsonforms/core';
26
+ import { BehaviorSubject } from 'rxjs';
27
+ import { cloneDeep } from 'lodash';
28
+ export var USE_STATE_VALUE = Symbol('Marker to use state value');
29
+ var JsonFormsAngularService = /** @class */ (function () {
30
+ function JsonFormsAngularService() {
31
+ }
32
+ JsonFormsAngularService.prototype.init = function (initialState) {
33
+ var _a, _b, _c, _d, _e;
34
+ if (initialState === void 0) { initialState = { core: { data: undefined, schema: undefined, uischema: undefined, validationMode: 'ValidateAndShow' } }; }
35
+ this._state = initialState;
36
+ this._state.config = configReducer(undefined, setConfig(this._state.config));
37
+ this._state.i18n = i18nReducer(this._state.i18n, 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));
38
+ this.state = new BehaviorSubject({ jsonforms: this._state });
39
+ var data = initialState.core.data;
40
+ var schema = (_d = initialState.core.schema) !== null && _d !== void 0 ? _d : generateJsonSchema(data);
41
+ var uischema = (_e = initialState.core.uischema) !== null && _e !== void 0 ? _e : generateDefaultUISchema(schema);
42
+ this.updateCore(Actions.init(data, schema, uischema));
43
+ };
44
+ Object.defineProperty(JsonFormsAngularService.prototype, "$state", {
45
+ get: function () {
46
+ if (!this.state) {
47
+ throw new Error('Please call init first!');
48
+ }
49
+ return this.state.asObservable();
50
+ },
51
+ enumerable: false,
52
+ configurable: true
53
+ });
54
+ /**
55
+ * @deprecated use {@link JsonFormsAngularService.addRenderer}
56
+ */
57
+ JsonFormsAngularService.prototype.registerRenderer = function (renderer, tester) {
58
+ this.addRenderer(renderer, tester);
59
+ };
60
+ JsonFormsAngularService.prototype.addRenderer = function (renderer, tester) {
61
+ this._state.renderers.push({ renderer: renderer, tester: tester });
62
+ this.updateSubject();
63
+ };
64
+ /**
65
+ * @deprecated use {@link JsonFormsAngularService.setRenderer}
66
+ */
67
+ JsonFormsAngularService.prototype.registerRenderers = function (renderers) {
68
+ this.setRenderers(renderers);
69
+ };
70
+ JsonFormsAngularService.prototype.setRenderers = function (renderers) {
71
+ this._state.renderers = renderers;
72
+ this.updateSubject();
73
+ };
74
+ /**
75
+ * @deprecated use {@link JsonFormsAngularService.removeRenderer}
76
+ */
77
+ JsonFormsAngularService.prototype.unregisterRenderer = function (tester) {
78
+ this.removeRenderer(tester);
79
+ };
80
+ JsonFormsAngularService.prototype.removeRenderer = function (tester) {
81
+ var findIndex = this._state.renderers.findIndex(function (v) { return v.tester === tester; });
82
+ if (findIndex === -1) {
83
+ return;
84
+ }
85
+ var renderers = this._state.renderers.filter(function (v) { return v.tester !== tester; });
86
+ this._state.renderers = renderers;
87
+ this.updateSubject();
88
+ };
89
+ JsonFormsAngularService.prototype.updateValidationMode = function (validationMode) {
90
+ var coreState = coreReducer(this._state.core, Actions.setValidationMode(validationMode));
91
+ this._state.core = coreState;
92
+ this.updateSubject();
93
+ };
94
+ JsonFormsAngularService.prototype.updateI18n = function (i18nAction) {
95
+ var i18nState = i18nReducer(this._state.i18n, i18nAction);
96
+ if (i18nState !== this._state.i18n) {
97
+ this._state.i18n = i18nState;
98
+ this.updateSubject();
99
+ }
100
+ return i18nAction;
101
+ };
102
+ JsonFormsAngularService.prototype.updateCore = function (coreAction) {
103
+ var coreState = coreReducer(this._state.core, coreAction);
104
+ if (coreState !== this._state.core) {
105
+ this._state.core = coreState;
106
+ this.updateSubject();
107
+ }
108
+ return coreAction;
109
+ };
110
+ /**
111
+ * @deprecated use {@link JsonFormsAngularService.setUiSchemas}
112
+ */
113
+ JsonFormsAngularService.prototype.updateUiSchema = function (uischemaAction) {
114
+ var uischemaState = uischemaRegistryReducer(this._state.uischemas, uischemaAction);
115
+ this._state.uischemas = uischemaState;
116
+ this.updateSubject();
117
+ return uischemaAction;
118
+ };
119
+ JsonFormsAngularService.prototype.setUiSchemas = function (uischemas) {
120
+ this._state.uischemas = uischemas;
121
+ this.updateSubject();
122
+ };
123
+ JsonFormsAngularService.prototype.updateConfig = function (setConfigAction) {
124
+ var configState = configReducer(this._state.config, setConfigAction);
125
+ this._state.config = configState;
126
+ this.updateSubject();
127
+ return setConfigAction;
128
+ };
129
+ JsonFormsAngularService.prototype.setUiSchema = function (uischema) {
130
+ var newUiSchema = uischema !== null && uischema !== void 0 ? uischema : generateDefaultUISchema(this._state.core.schema);
131
+ var coreState = coreReducer(this._state.core, Actions.updateCore(this._state.core.data, this._state.core.schema, newUiSchema));
132
+ if (coreState !== this._state.core) {
133
+ this._state.core = coreState;
134
+ this.updateSubject();
135
+ }
136
+ };
137
+ JsonFormsAngularService.prototype.setSchema = function (schema) {
138
+ var coreState = coreReducer(this._state.core, Actions.updateCore(this._state.core.data, schema !== null && schema !== void 0 ? schema : generateJsonSchema(this._state.core.data), this._state.core.uischema));
139
+ if (coreState !== this._state.core) {
140
+ this._state.core = coreState;
141
+ this.updateSubject();
142
+ }
143
+ };
144
+ JsonFormsAngularService.prototype.setData = function (data) {
145
+ var coreState = coreReducer(this._state.core, Actions.updateCore(data, this._state.core.schema, this._state.core.uischema));
146
+ if (coreState !== this._state.core) {
147
+ this._state.core = coreState;
148
+ this.updateSubject();
149
+ }
150
+ };
151
+ JsonFormsAngularService.prototype.setLocale = function (locale) {
152
+ this._state.i18n.locale = locale;
153
+ this.updateSubject();
154
+ };
155
+ JsonFormsAngularService.prototype.setReadonly = function (readonly) {
156
+ this._state.readonly = readonly;
157
+ this.updateSubject();
158
+ };
159
+ JsonFormsAngularService.prototype.getState = function () {
160
+ return cloneDeep({ jsonforms: this._state });
161
+ };
162
+ JsonFormsAngularService.prototype.refresh = function () {
163
+ this.updateSubject();
164
+ };
165
+ JsonFormsAngularService.prototype.updateCoreState = function (data, schema, uischema, ajv, validationMode) {
166
+ var newData = data === USE_STATE_VALUE ? this._state.core.data : data;
167
+ var newSchema = schema === USE_STATE_VALUE ? this._state.core.schema : schema !== null && schema !== void 0 ? schema : generateJsonSchema(newData);
168
+ var newUischema = uischema === USE_STATE_VALUE ? this._state.core.uischema : uischema !== null && uischema !== void 0 ? uischema : generateDefaultUISchema(newSchema);
169
+ var newAjv = ajv === USE_STATE_VALUE ? this._state.core.ajv : ajv;
170
+ var newValidationMode = validationMode === USE_STATE_VALUE ? this._state.core.validationMode : validationMode;
171
+ this.updateCore(Actions.updateCore(newData, newSchema, newUischema, { ajv: newAjv, validationMode: newValidationMode }));
172
+ };
173
+ JsonFormsAngularService.prototype.updateSubject = function () {
174
+ this.state.next({ jsonforms: this._state });
175
+ };
176
+ return JsonFormsAngularService;
177
+ }());
178
+ export { JsonFormsAngularService };
179
+ //# sourceMappingURL=jsonforms.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonforms.service.js","sourceRoot":"","sources":["../../src/jsonforms.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EACH,OAAO,EACP,aAAa,EAEb,WAAW,EACX,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EAOX,SAAS,EAIT,uBAAuB,EAGvB,UAAU,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAc,MAAM,MAAM,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAA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