@jsonforms/angular-material 3.2.0-alpha.4 → 3.2.0-beta.1

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 (240) hide show
  1. package/lib/LICENSE +22 -0
  2. package/lib/README.md +137 -0
  3. package/lib/esm2022/jsonforms-angular-material.mjs +5 -0
  4. package/lib/esm2022/library/controls/autocomplete.renderer.mjs +171 -0
  5. package/lib/esm2022/library/controls/boolean.renderer.mjs +84 -0
  6. package/lib/esm2022/library/controls/date.renderer.mjs +93 -0
  7. package/lib/esm2022/library/controls/index.mjs +33 -0
  8. package/lib/esm2022/library/controls/number.renderer.mjs +173 -0
  9. package/lib/esm2022/library/controls/range.renderer.mjs +104 -0
  10. package/lib/esm2022/library/controls/text.renderer.mjs +98 -0
  11. package/lib/esm2022/library/controls/textarea.renderer.mjs +80 -0
  12. package/lib/esm2022/library/controls/toggle.renderer.mjs +86 -0
  13. package/lib/esm2022/library/index.mjs +69 -0
  14. package/lib/esm2022/library/layouts/array-layout.renderer.mjs +259 -0
  15. package/lib/esm2022/library/layouts/categorization-layout.renderer.mjs +105 -0
  16. package/lib/esm2022/library/layouts/group-layout.renderer.mjs +78 -0
  17. package/lib/esm2022/library/layouts/horizontal-layout.renderer.mjs +73 -0
  18. package/lib/esm2022/library/layouts/index.mjs +30 -0
  19. package/lib/esm2022/library/layouts/layout.renderer.mjs +86 -0
  20. package/lib/esm2022/library/layouts/vertical-layout.renderer.mjs +67 -0
  21. package/lib/esm2022/library/module.mjs +239 -0
  22. package/lib/esm2022/library/other/index.mjs +29 -0
  23. package/lib/esm2022/library/other/label.renderer.mjs +61 -0
  24. package/lib/esm2022/library/other/master-detail/detail.mjs +59 -0
  25. package/lib/esm2022/library/other/master-detail/index.mjs +27 -0
  26. package/lib/esm2022/library/other/master-detail/master.mjs +250 -0
  27. package/lib/esm2022/library/other/object.renderer.mjs +84 -0
  28. package/lib/esm2022/library/other/table.renderer.mjs +314 -0
  29. package/lib/esm2022/public_api.mjs +2 -0
  30. package/lib/fesm2022/jsonforms-angular-material.mjs +2564 -0
  31. package/lib/fesm2022/jsonforms-angular-material.mjs.map +1 -0
  32. package/lib/index.d.ts +6 -0
  33. package/lib/jsonforms-angular-material.d.ts.map +1 -0
  34. package/lib/{cjs → library}/controls/autocomplete.renderer.d.ts +3 -3
  35. package/lib/library/controls/autocomplete.renderer.d.ts.map +1 -0
  36. package/lib/{esm → library}/controls/boolean.renderer.d.ts +1 -0
  37. package/lib/library/controls/boolean.renderer.d.ts.map +1 -0
  38. package/lib/{cjs → library}/controls/date.renderer.d.ts +1 -0
  39. package/lib/library/controls/date.renderer.d.ts.map +1 -0
  40. package/lib/{cjs → library}/controls/index.d.ts +1 -0
  41. package/lib/library/controls/index.d.ts.map +1 -0
  42. package/lib/{esm → library}/controls/number.renderer.d.ts +1 -0
  43. package/lib/library/controls/number.renderer.d.ts.map +1 -0
  44. package/lib/{esm → library}/controls/range.renderer.d.ts +2 -1
  45. package/lib/library/controls/range.renderer.d.ts.map +1 -0
  46. package/lib/{esm → library}/controls/text.renderer.d.ts +1 -0
  47. package/lib/library/controls/text.renderer.d.ts.map +1 -0
  48. package/lib/{esm → library}/controls/textarea.renderer.d.ts +1 -0
  49. package/lib/library/controls/textarea.renderer.d.ts.map +1 -0
  50. package/lib/{cjs → library}/controls/toggle.renderer.d.ts +1 -0
  51. package/lib/library/controls/toggle.renderer.d.ts.map +1 -0
  52. package/lib/{cjs → library}/index.d.ts +1 -0
  53. package/lib/library/index.d.ts.map +1 -0
  54. package/lib/{esm → library}/layouts/array-layout.renderer.d.ts +1 -0
  55. package/lib/library/layouts/array-layout.renderer.d.ts.map +1 -0
  56. package/lib/{esm → library}/layouts/categorization-layout.renderer.d.ts +1 -0
  57. package/lib/library/layouts/categorization-layout.renderer.d.ts.map +1 -0
  58. package/lib/{cjs → library}/layouts/group-layout.renderer.d.ts +1 -0
  59. package/lib/library/layouts/group-layout.renderer.d.ts.map +1 -0
  60. package/lib/{esm → library}/layouts/horizontal-layout.renderer.d.ts +1 -0
  61. package/lib/library/layouts/horizontal-layout.renderer.d.ts.map +1 -0
  62. package/lib/{esm → library}/layouts/index.d.ts +1 -0
  63. package/lib/library/layouts/index.d.ts.map +1 -0
  64. package/lib/{esm → library}/layouts/layout.renderer.d.ts +1 -0
  65. package/lib/library/layouts/layout.renderer.d.ts.map +1 -0
  66. package/lib/{cjs → library}/layouts/vertical-layout.renderer.d.ts +1 -0
  67. package/lib/library/layouts/vertical-layout.renderer.d.ts.map +1 -0
  68. package/lib/{cjs → library}/module.d.ts +11 -11
  69. package/lib/library/module.d.ts.map +1 -0
  70. package/lib/{esm → library}/other/index.d.ts +1 -0
  71. package/lib/library/other/index.d.ts.map +1 -0
  72. package/lib/{esm → library}/other/label.renderer.d.ts +1 -0
  73. package/lib/library/other/label.renderer.d.ts.map +1 -0
  74. package/lib/{esm → library}/other/master-detail/detail.d.ts +2 -1
  75. package/lib/library/other/master-detail/detail.d.ts.map +1 -0
  76. package/lib/{cjs → library}/other/master-detail/index.d.ts +1 -0
  77. package/lib/library/other/master-detail/index.d.ts.map +1 -0
  78. package/lib/{esm → library}/other/master-detail/master.d.ts +1 -0
  79. package/lib/library/other/master-detail/master.d.ts.map +1 -0
  80. package/lib/{esm → library}/other/object.renderer.d.ts +1 -0
  81. package/lib/library/other/object.renderer.d.ts.map +1 -0
  82. package/lib/{cjs → library}/other/table.renderer.d.ts +1 -0
  83. package/lib/library/other/table.renderer.d.ts.map +1 -0
  84. package/lib/package.json +75 -0
  85. package/lib/public_api.d.ts +2 -0
  86. package/lib/public_api.d.ts.map +1 -0
  87. package/package.json +40 -53
  88. package/src/index.ts +1 -121
  89. package/src/{controls → library/controls}/autocomplete.renderer.ts +13 -3
  90. package/src/{controls → library/controls}/boolean.renderer.ts +16 -6
  91. package/src/{controls → library/controls}/date.renderer.ts +12 -1
  92. package/src/{controls → library/controls}/number.renderer.ts +12 -1
  93. package/src/{controls → library/controls}/range.renderer.ts +16 -3
  94. package/src/{controls → library/controls}/text.renderer.ts +12 -1
  95. package/src/{controls → library/controls}/textarea.renderer.ts +12 -1
  96. package/src/{controls → library/controls}/toggle.renderer.ts +1 -1
  97. package/src/library/index.ts +121 -0
  98. package/src/{layouts → library/layouts}/array-layout.renderer.ts +21 -12
  99. package/src/{layouts → library/layouts}/categorization-layout.renderer.ts +4 -1
  100. package/src/{layouts → library/layouts}/group-layout.renderer.ts +18 -2
  101. package/src/{layouts → library/layouts}/horizontal-layout.renderer.ts +16 -5
  102. package/src/{layouts → library/layouts}/vertical-layout.renderer.ts +13 -2
  103. package/src/{module.ts → library/module.ts} +0 -3
  104. package/src/{other → library/other}/label.renderer.ts +8 -1
  105. package/src/{other → library/other}/master-detail/master.ts +4 -4
  106. package/src/{other → library/other}/object.renderer.ts +8 -1
  107. package/src/public_api.ts +1 -0
  108. package/lib/cjs/controls/autocomplete.renderer.js +0 -122
  109. package/lib/cjs/controls/autocomplete.renderer.js.map +0 -1
  110. package/lib/cjs/controls/boolean.renderer.d.ts +0 -14
  111. package/lib/cjs/controls/boolean.renderer.js +0 -67
  112. package/lib/cjs/controls/boolean.renderer.js.map +0 -1
  113. package/lib/cjs/controls/date.renderer.js +0 -63
  114. package/lib/cjs/controls/date.renderer.js.map +0 -1
  115. package/lib/cjs/controls/index.js +0 -36
  116. package/lib/cjs/controls/index.js.map +0 -1
  117. package/lib/cjs/controls/number.renderer.d.ts +0 -23
  118. package/lib/cjs/controls/number.renderer.js +0 -140
  119. package/lib/cjs/controls/number.renderer.js.map +0 -1
  120. package/lib/cjs/controls/range.renderer.d.ts +0 -17
  121. package/lib/cjs/controls/range.renderer.js +0 -70
  122. package/lib/cjs/controls/range.renderer.js.map +0 -1
  123. package/lib/cjs/controls/text.renderer.d.ts +0 -12
  124. package/lib/cjs/controls/text.renderer.js +0 -78
  125. package/lib/cjs/controls/text.renderer.js.map +0 -1
  126. package/lib/cjs/controls/textarea.renderer.d.ts +0 -11
  127. package/lib/cjs/controls/textarea.renderer.js +0 -62
  128. package/lib/cjs/controls/textarea.renderer.js.map +0 -1
  129. package/lib/cjs/controls/toggle.renderer.js +0 -64
  130. package/lib/cjs/controls/toggle.renderer.js.map +0 -1
  131. package/lib/cjs/index.js +0 -73
  132. package/lib/cjs/index.js.map +0 -1
  133. package/lib/cjs/layouts/array-layout.renderer.d.ts +0 -29
  134. package/lib/cjs/layouts/array-layout.renderer.js +0 -103
  135. package/lib/cjs/layouts/array-layout.renderer.js.map +0 -1
  136. package/lib/cjs/layouts/categorization-layout.renderer.d.ts +0 -17
  137. package/lib/cjs/layouts/categorization-layout.renderer.js +0 -78
  138. package/lib/cjs/layouts/categorization-layout.renderer.js.map +0 -1
  139. package/lib/cjs/layouts/group-layout.renderer.js +0 -59
  140. package/lib/cjs/layouts/group-layout.renderer.js.map +0 -1
  141. package/lib/cjs/layouts/horizontal-layout.renderer.d.ts +0 -11
  142. package/lib/cjs/layouts/horizontal-layout.renderer.js +0 -58
  143. package/lib/cjs/layouts/horizontal-layout.renderer.js.map +0 -1
  144. package/lib/cjs/layouts/index.d.ts +0 -5
  145. package/lib/cjs/layouts/index.js +0 -33
  146. package/lib/cjs/layouts/index.js.map +0 -1
  147. package/lib/cjs/layouts/layout.renderer.d.ts +0 -22
  148. package/lib/cjs/layouts/layout.renderer.js +0 -94
  149. package/lib/cjs/layouts/layout.renderer.js.map +0 -1
  150. package/lib/cjs/layouts/vertical-layout.renderer.js +0 -58
  151. package/lib/cjs/layouts/vertical-layout.renderer.js.map +0 -1
  152. package/lib/cjs/module.js +0 -254
  153. package/lib/cjs/module.js.map +0 -1
  154. package/lib/cjs/other/index.d.ts +0 -4
  155. package/lib/cjs/other/index.js +0 -32
  156. package/lib/cjs/other/index.js.map +0 -1
  157. package/lib/cjs/other/label.renderer.d.ts +0 -16
  158. package/lib/cjs/other/label.renderer.js +0 -70
  159. package/lib/cjs/other/label.renderer.js.map +0 -1
  160. package/lib/cjs/other/master-detail/detail.d.ts +0 -9
  161. package/lib/cjs/other/master-detail/detail.js +0 -61
  162. package/lib/cjs/other/master-detail/detail.js.map +0 -1
  163. package/lib/cjs/other/master-detail/index.js +0 -30
  164. package/lib/cjs/other/master-detail/index.js.map +0 -1
  165. package/lib/cjs/other/master-detail/master.d.ts +0 -27
  166. package/lib/cjs/other/master-detail/master.js +0 -153
  167. package/lib/cjs/other/master-detail/master.js.map +0 -1
  168. package/lib/cjs/other/object.renderer.d.ts +0 -11
  169. package/lib/cjs/other/object.renderer.js +0 -77
  170. package/lib/cjs/other/object.renderer.js.map +0 -1
  171. package/lib/cjs/other/table.renderer.js +0 -147
  172. package/lib/cjs/other/table.renderer.js.map +0 -1
  173. package/lib/esm/controls/autocomplete.renderer.d.ts +0 -49
  174. package/lib/esm/controls/autocomplete.renderer.js +0 -119
  175. package/lib/esm/controls/autocomplete.renderer.js.map +0 -1
  176. package/lib/esm/controls/boolean.renderer.js +0 -64
  177. package/lib/esm/controls/boolean.renderer.js.map +0 -1
  178. package/lib/esm/controls/date.renderer.d.ts +0 -11
  179. package/lib/esm/controls/date.renderer.js +0 -60
  180. package/lib/esm/controls/date.renderer.js.map +0 -1
  181. package/lib/esm/controls/index.d.ts +0 -8
  182. package/lib/esm/controls/index.js +0 -33
  183. package/lib/esm/controls/index.js.map +0 -1
  184. package/lib/esm/controls/number.renderer.js +0 -137
  185. package/lib/esm/controls/number.renderer.js.map +0 -1
  186. package/lib/esm/controls/range.renderer.js +0 -67
  187. package/lib/esm/controls/range.renderer.js.map +0 -1
  188. package/lib/esm/controls/text.renderer.js +0 -75
  189. package/lib/esm/controls/text.renderer.js.map +0 -1
  190. package/lib/esm/controls/textarea.renderer.js +0 -59
  191. package/lib/esm/controls/textarea.renderer.js.map +0 -1
  192. package/lib/esm/controls/toggle.renderer.d.ts +0 -14
  193. package/lib/esm/controls/toggle.renderer.js +0 -61
  194. package/lib/esm/controls/toggle.renderer.js.map +0 -1
  195. package/lib/esm/index.d.ts +0 -10
  196. package/lib/esm/index.js +0 -69
  197. package/lib/esm/index.js.map +0 -1
  198. package/lib/esm/layouts/array-layout.renderer.js +0 -100
  199. package/lib/esm/layouts/array-layout.renderer.js.map +0 -1
  200. package/lib/esm/layouts/categorization-layout.renderer.js +0 -75
  201. package/lib/esm/layouts/categorization-layout.renderer.js.map +0 -1
  202. package/lib/esm/layouts/group-layout.renderer.d.ts +0 -11
  203. package/lib/esm/layouts/group-layout.renderer.js +0 -56
  204. package/lib/esm/layouts/group-layout.renderer.js.map +0 -1
  205. package/lib/esm/layouts/horizontal-layout.renderer.js +0 -55
  206. package/lib/esm/layouts/horizontal-layout.renderer.js.map +0 -1
  207. package/lib/esm/layouts/index.js +0 -30
  208. package/lib/esm/layouts/index.js.map +0 -1
  209. package/lib/esm/layouts/layout.renderer.js +0 -91
  210. package/lib/esm/layouts/layout.renderer.js.map +0 -1
  211. package/lib/esm/layouts/vertical-layout.renderer.d.ts +0 -11
  212. package/lib/esm/layouts/vertical-layout.renderer.js +0 -55
  213. package/lib/esm/layouts/vertical-layout.renderer.js.map +0 -1
  214. package/lib/esm/module.d.ts +0 -48
  215. package/lib/esm/module.js +0 -250
  216. package/lib/esm/module.js.map +0 -1
  217. package/lib/esm/other/index.js +0 -29
  218. package/lib/esm/other/index.js.map +0 -1
  219. package/lib/esm/other/label.renderer.js +0 -67
  220. package/lib/esm/other/label.renderer.js.map +0 -1
  221. package/lib/esm/other/master-detail/detail.js +0 -57
  222. package/lib/esm/other/master-detail/detail.js.map +0 -1
  223. package/lib/esm/other/master-detail/index.d.ts +0 -2
  224. package/lib/esm/other/master-detail/index.js +0 -27
  225. package/lib/esm/other/master-detail/index.js.map +0 -1
  226. package/lib/esm/other/master-detail/master.js +0 -149
  227. package/lib/esm/other/master-detail/master.js.map +0 -1
  228. package/lib/esm/other/object.renderer.js +0 -74
  229. package/lib/esm/other/object.renderer.js.map +0 -1
  230. package/lib/esm/other/table.renderer.d.ts +0 -36
  231. package/lib/esm/other/table.renderer.js +0 -143
  232. package/lib/esm/other/table.renderer.js.map +0 -1
  233. /package/src/{controls → library/controls}/index.ts +0 -0
  234. /package/src/{layouts → library/layouts}/index.ts +0 -0
  235. /package/src/{layouts → library/layouts}/layout.renderer.ts +0 -0
  236. /package/src/{other → library/other}/index.ts +0 -0
  237. /package/src/{other → library/other}/master-detail/detail.ts +0 -0
  238. /package/src/{other → library/other}/master-detail/index.ts +0 -0
  239. /package/src/{other → library/other}/table.renderer.ts +0 -0
  240. /package/src/{other → library/other}/util.ts +0 -0
@@ -1,147 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.controlWithoutLabel = exports.TableRendererTester = exports.TableRenderer = void 0;
4
- var tslib_1 = require("tslib");
5
- /*
6
- The MIT License
7
-
8
- Copyright (c) 2017-2019 EclipseSource Munich
9
- https://github.com/eclipsesource/jsonforms
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in
19
- all copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- THE SOFTWARE.
28
- */
29
- var startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
30
- var core_1 = require("@angular/core");
31
- var angular_1 = require("@jsonforms/angular");
32
- var core_2 = require("@jsonforms/core");
33
- var i0 = tslib_1.__importStar(require("@angular/core"));
34
- var i1 = tslib_1.__importStar(require("@jsonforms/angular"));
35
- var i2 = tslib_1.__importStar(require("@angular/common"));
36
- var i3 = tslib_1.__importStar(require("@angular/material/button"));
37
- var i4 = tslib_1.__importStar(require("@angular/material/icon"));
38
- var i5 = tslib_1.__importStar(require("@angular/material/table"));
39
- var i6 = tslib_1.__importStar(require("@angular/material/tooltip"));
40
- var TableRenderer = /** @class */ (function (_super) {
41
- tslib_1.__extends(TableRenderer, _super);
42
- function TableRenderer(jsonformsService) {
43
- var _this = _super.call(this, jsonformsService) || this;
44
- _this.columnsToIgnore = ['array', 'object'];
45
- _this.generateCells = function (schema, rowPath) {
46
- if (schema.type === 'object') {
47
- return _this.getValidColumnProps(schema).map(function (prop) {
48
- var encProp = (0, core_2.encode)(prop);
49
- var uischema = (0, exports.controlWithoutLabel)("#/properties/".concat(encProp));
50
- if (!_this.isEnabled()) {
51
- (0, core_2.setReadonly)(uischema);
52
- }
53
- return {
54
- property: prop,
55
- header: (0, startCase_1.default)(prop),
56
- props: {
57
- schema: schema,
58
- uischema: uischema,
59
- path: rowPath,
60
- },
61
- };
62
- });
63
- }
64
- // needed to correctly render input control for multi attributes
65
- return [
66
- {
67
- property: 'DUMMY',
68
- header: _this.label,
69
- props: {
70
- schema: schema,
71
- uischema: (0, exports.controlWithoutLabel)("#"),
72
- path: rowPath,
73
- },
74
- },
75
- ];
76
- };
77
- _this.getValidColumnProps = function (scopedSchema) {
78
- if (scopedSchema.type === 'object') {
79
- return Object.keys(scopedSchema.properties).filter(function (prop) {
80
- var types = (0, core_2.deriveTypes)(scopedSchema.properties[prop]);
81
- if (types.length > 1) {
82
- return false;
83
- }
84
- return _this.columnsToIgnore.indexOf(types[0]) === -1;
85
- });
86
- }
87
- // primitives
88
- return [''];
89
- };
90
- return _this;
91
- }
92
- TableRenderer.prototype.trackElement = function (index, _element) {
93
- return index ? index : null;
94
- };
95
- TableRenderer.prototype.mapAdditionalProps = function (props) {
96
- this.items = this.generateCells(props.schema, props.path);
97
- this.displayedColumns = this.items.map(function (item) { return item.property; });
98
- if (this.isEnabled()) {
99
- this.displayedColumns.push('action');
100
- }
101
- this.translations = props.translations;
102
- };
103
- TableRenderer.prototype.getProps = function (index, props) {
104
- var rowPath = core_2.Paths.compose(props.path, "".concat(index));
105
- return {
106
- schema: props.schema,
107
- uischema: props.uischema,
108
- path: rowPath,
109
- };
110
- };
111
- TableRenderer.prototype.remove = function (index) {
112
- this.removeItems(this.propsPath, [index])();
113
- };
114
- TableRenderer.prototype.add = function () {
115
- this.addItem(this.propsPath, (0, core_2.createDefaultValue)(this.scopedSchema, this.rootSchema))();
116
- };
117
- TableRenderer.prototype.up = function (index) {
118
- this.moveItemUp(this.propsPath, index)();
119
- };
120
- TableRenderer.prototype.down = function (index) {
121
- this.moveItemDown(this.propsPath, index)();
122
- };
123
- TableRenderer.prototype.ngOnInit = function () {
124
- _super.prototype.ngOnInit.call(this);
125
- var _a = (0, core_2.mapDispatchToArrayControlProps)(this.jsonFormsService.updateCore.bind(this.jsonFormsService)), addItem = _a.addItem, removeItems = _a.removeItems, moveUp = _a.moveUp, moveDown = _a.moveDown;
126
- this.addItem = addItem;
127
- this.moveItemUp = moveUp;
128
- this.moveItemDown = moveDown;
129
- this.removeItems = removeItems;
130
- };
131
- TableRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
132
- TableRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TableRenderer, selector: "TableRenderer", usesInheritance: true, ngImport: i0, template: "\n <table\n mat-table\n [dataSource]=\"data\"\n class=\"mat-elevation-z8\"\n [trackBy]=\"trackElement\"\n >\n <ng-container matColumnDef=\"action\">\n <tr>\n <th mat-header-cell *matHeaderCellDef>\n <button\n mat-button\n color=\"primary\"\n (click)=\"add()\"\n [disabled]=\"!isEnabled()\"\n [matTooltip]=\"translations.addTooltip\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </th>\n </tr>\n <tr>\n <td\n mat-cell\n *matCellDef=\"\n let row;\n let i = index;\n let first = first;\n let last = last\n \"\n >\n <button\n *ngIf=\"uischema?.options?.showSortButtons\"\n class=\"item-up\"\n mat-button\n [disabled]=\"first\"\n (click)=\"up(i)\"\n [matTooltip]=\"translations.upAriaLabel\"\n matTooltipPosition=\"right\"\n >\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button\n *ngIf=\"uischema?.options?.showSortButtons\"\n class=\"item-down\"\n mat-button\n [disabled]=\"last\"\n (click)=\"down(i)\"\n [matTooltip]=\"translations.downAriaLabel\"\n matTooltipPosition=\"right\"\n >\n <mat-icon>arrow_downward</mat-icon>\n </button>\n <button\n mat-button\n color=\"warn\"\n (click)=\"remove(i)\"\n [disabled]=\"!isEnabled()\"\n matTooltipPosition=\"right\"\n [matTooltip]=\"translations.removeTooltip\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </tr>\n\n <tr></tr\n ></ng-container>\n\n <ng-container\n *ngFor=\"let item of items\"\n matColumnDef=\"{{ item.property }}\"\n >\n <th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>\n <td mat-cell *matCellDef=\"let index = index\">\n <jsonforms-outlet\n [renderProps]=\"getProps(index, item.props)\"\n ></jsonforms-outlet>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n ", isInline: true, styles: ["table {width: 100%;}", ".cdk-column-action { width: 15%}"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.JsonFormsOutlet, selector: "jsonforms-outlet", inputs: ["renderProps"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
133
- return TableRenderer;
134
- }(angular_1.JsonFormsArrayControl));
135
- exports.TableRenderer = TableRenderer;
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TableRenderer, decorators: [{
137
- type: core_1.Component,
138
- args: [{ selector: 'TableRenderer', template: "\n <table\n mat-table\n [dataSource]=\"data\"\n class=\"mat-elevation-z8\"\n [trackBy]=\"trackElement\"\n >\n <ng-container matColumnDef=\"action\">\n <tr>\n <th mat-header-cell *matHeaderCellDef>\n <button\n mat-button\n color=\"primary\"\n (click)=\"add()\"\n [disabled]=\"!isEnabled()\"\n [matTooltip]=\"translations.addTooltip\"\n >\n <mat-icon>add</mat-icon>\n </button>\n </th>\n </tr>\n <tr>\n <td\n mat-cell\n *matCellDef=\"\n let row;\n let i = index;\n let first = first;\n let last = last\n \"\n >\n <button\n *ngIf=\"uischema?.options?.showSortButtons\"\n class=\"item-up\"\n mat-button\n [disabled]=\"first\"\n (click)=\"up(i)\"\n [matTooltip]=\"translations.upAriaLabel\"\n matTooltipPosition=\"right\"\n >\n <mat-icon>arrow_upward</mat-icon>\n </button>\n <button\n *ngIf=\"uischema?.options?.showSortButtons\"\n class=\"item-down\"\n mat-button\n [disabled]=\"last\"\n (click)=\"down(i)\"\n [matTooltip]=\"translations.downAriaLabel\"\n matTooltipPosition=\"right\"\n >\n <mat-icon>arrow_downward</mat-icon>\n </button>\n <button\n mat-button\n color=\"warn\"\n (click)=\"remove(i)\"\n [disabled]=\"!isEnabled()\"\n matTooltipPosition=\"right\"\n [matTooltip]=\"translations.removeTooltip\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </tr>\n\n <tr></tr\n ></ng-container>\n\n <ng-container\n *ngFor=\"let item of items\"\n matColumnDef=\"{{ item.property }}\"\n >\n <th mat-header-cell *matHeaderCellDef>{{ item.header }}</th>\n <td mat-cell *matCellDef=\"let index = index\">\n <jsonforms-outlet\n [renderProps]=\"getProps(index, item.props)\"\n ></jsonforms-outlet>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n ", styles: ["table {width: 100%;}", ".cdk-column-action { width: 15%}"] }]
139
- }], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; } });
140
- exports.TableRendererTester = (0, core_2.rankWith)(3, (0, core_2.or)(core_2.isObjectArrayControl, core_2.isPrimitiveArrayControl));
141
- var controlWithoutLabel = function (scope) { return ({
142
- type: 'Control',
143
- scope: scope,
144
- label: false,
145
- }); };
146
- exports.controlWithoutLabel = controlWithoutLabel;
147
- //# sourceMappingURL=table.renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"table.renderer.js","sourceRoot":"","sources":["../../../src/other/table.renderer.ts"],"names":[],"mappings":"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"}
@@ -1,49 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import type { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
3
- import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
4
- import { OwnPropsOfControl, RankedTester } from '@jsonforms/core';
5
- import type { Observable } from 'rxjs';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * To use this component you will need to add your own tester:
9
- * <pre><code>
10
- * ...
11
- * export const AutocompleteControlRendererTester: RankedTester = rankWith(2, isEnumControl);
12
- * ...
13
- * </code></pre>
14
- * Add the tester and renderer to JSONForms registry:
15
- * <pre><code>
16
- * ...
17
- * { tester: AutocompleteControlRendererTester, renderer: AutocompleteControlRenderer },
18
- * ...
19
- * </code></pre>
20
- * Furthermore you need to update your module.
21
- * <pre><code>
22
- * ...
23
- * imports: [JsonFormsAngularMaterialModule, MatAutocompleteModule],
24
- * declarations: [AutocompleteControlRenderer],
25
- * entryComponents: [AutocompleteControlRenderer]
26
- * ...
27
- * </code></pre>
28
- *
29
- */
30
- export declare class AutocompleteControlRenderer extends JsonFormsControl implements OnInit {
31
- options: string[];
32
- filteredOptions: Observable<string[]>;
33
- shouldFilter: boolean;
34
- focused: boolean;
35
- constructor(jsonformsService: JsonFormsAngularService);
36
- getEventValue: (event: any) => any;
37
- ngOnInit(): void;
38
- updateFilter(event: any): void;
39
- onSelect(ev: MatAutocompleteSelectedEvent): void;
40
- filter(val: string): string[];
41
- protected getOwnProps(): OwnPropsOfAutoComplete;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteControlRenderer, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteControlRenderer, "AutocompleteControlRenderer", never, { "options": "options"; }, {}, never, never, false, never>;
44
- }
45
- export declare const enumControlTester: RankedTester;
46
- interface OwnPropsOfAutoComplete extends OwnPropsOfControl {
47
- options: string[];
48
- }
49
- export {};
@@ -1,119 +0,0 @@
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 { ChangeDetectionStrategy, Component, Input, } from '@angular/core';
27
- import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
28
- import { Actions, composeWithUi, isEnumControl, rankWith, } from '@jsonforms/core';
29
- import { map, startWith } from 'rxjs/operators';
30
- import * as i0 from "@angular/core";
31
- import * as i1 from "@jsonforms/angular";
32
- import * as i2 from "@angular/common";
33
- import * as i3 from "@angular/material/form-field";
34
- import * as i4 from "@angular/material/input";
35
- import * as i5 from "@angular/forms";
36
- import * as i6 from "@angular/flex-layout/flex";
37
- import * as i7 from "@angular/flex-layout/extended";
38
- import * as i8 from "@angular/material/core";
39
- import * as i9 from "@angular/material/autocomplete";
40
- /**
41
- * To use this component you will need to add your own tester:
42
- * <pre><code>
43
- * ...
44
- * export const AutocompleteControlRendererTester: RankedTester = rankWith(2, isEnumControl);
45
- * ...
46
- * </code></pre>
47
- * Add the tester and renderer to JSONForms registry:
48
- * <pre><code>
49
- * ...
50
- * { tester: AutocompleteControlRendererTester, renderer: AutocompleteControlRenderer },
51
- * ...
52
- * </code></pre>
53
- * Furthermore you need to update your module.
54
- * <pre><code>
55
- * ...
56
- * imports: [JsonFormsAngularMaterialModule, MatAutocompleteModule],
57
- * declarations: [AutocompleteControlRenderer],
58
- * entryComponents: [AutocompleteControlRenderer]
59
- * ...
60
- * </code></pre>
61
- *
62
- */
63
- var AutocompleteControlRenderer = /** @class */ (function (_super) {
64
- __extends(AutocompleteControlRenderer, _super);
65
- function AutocompleteControlRenderer(jsonformsService) {
66
- var _this = _super.call(this, jsonformsService) || this;
67
- _this.focused = false;
68
- _this.getEventValue = function (event) { return event.target.value; };
69
- return _this;
70
- }
71
- AutocompleteControlRenderer.prototype.ngOnInit = function () {
72
- var _this = this;
73
- _super.prototype.ngOnInit.call(this);
74
- this.shouldFilter = false;
75
- this.filteredOptions = this.form.valueChanges.pipe(startWith(''), map(function (val) { return _this.filter(val); }));
76
- };
77
- AutocompleteControlRenderer.prototype.updateFilter = function (event) {
78
- // ENTER
79
- if (event.keyCode === 13) {
80
- this.shouldFilter = false;
81
- }
82
- else {
83
- this.shouldFilter = true;
84
- }
85
- };
86
- AutocompleteControlRenderer.prototype.onSelect = function (ev) {
87
- var path = composeWithUi(this.uischema, this.path);
88
- this.shouldFilter = false;
89
- this.jsonFormsService.updateCore(Actions.update(path, function () { return ev.option.value; }));
90
- this.triggerValidation();
91
- };
92
- AutocompleteControlRenderer.prototype.filter = function (val) {
93
- var _this = this;
94
- return (this.options || this.scopedSchema.enum || []).filter(function (option) {
95
- return !_this.shouldFilter ||
96
- !val ||
97
- option.toLowerCase().indexOf(val.toLowerCase()) === 0;
98
- });
99
- };
100
- AutocompleteControlRenderer.prototype.getOwnProps = function () {
101
- return __assign(__assign({}, _super.prototype.getOwnProps.call(this)), { options: this.options });
102
- };
103
- AutocompleteControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutocompleteControlRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
104
- AutocompleteControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AutocompleteControlRenderer, selector: "AutocompleteControlRenderer", inputs: { options: "options" }, usesInheritance: true, ngImport: i0, template: "\n <mat-form-field fxFlex [fxHide]=\"hidden\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n type=\"text\"\n (change)=\"onChange($event)\"\n [id]=\"id\"\n [formControl]=\"form\"\n [matAutocomplete]=\"auto\"\n (keydown)=\"updateFilter($event)\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-autocomplete\n autoActiveFirstOption\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onSelect($event)\"\n >\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n >\n {{ option }}\n </mat-option>\n </mat-autocomplete>\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ", isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i7.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "component", type: i8.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i9.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i9.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
105
- return AutocompleteControlRenderer;
106
- }(JsonFormsControl));
107
- export { AutocompleteControlRenderer };
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AutocompleteControlRenderer, decorators: [{
109
- type: Component,
110
- args: [{
111
- selector: 'AutocompleteControlRenderer',
112
- template: "\n <mat-form-field fxFlex [fxHide]=\"hidden\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n type=\"text\"\n (change)=\"onChange($event)\"\n [id]=\"id\"\n [formControl]=\"form\"\n [matAutocomplete]=\"auto\"\n (keydown)=\"updateFilter($event)\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-autocomplete\n autoActiveFirstOption\n #auto=\"matAutocomplete\"\n (optionSelected)=\"onSelect($event)\"\n >\n <mat-option\n *ngFor=\"let option of filteredOptions | async\"\n [value]=\"option\"\n >\n {{ option }}\n </mat-option>\n </mat-autocomplete>\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ",
113
- changeDetection: ChangeDetectionStrategy.OnPush,
114
- }]
115
- }], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; }, propDecorators: { options: [{
116
- type: Input
117
- }] } });
118
- export var enumControlTester = rankWith(2, isEnumControl);
119
- //# sourceMappingURL=autocomplete.renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autocomplete.renderer.js","sourceRoot":"","sources":["../../../src/controls/autocomplete.renderer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,KAAK,GAEN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EACL,OAAO,EACP,aAAa,EAEb,aAAa,EAGb,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;;;AAEhD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IAqCU,+CAAgB;IAQxB,qCAAY,gBAAyC;QAArD,YACE,kBAAM,gBAAgB,CAAC,SACxB;QAJD,aAAO,GAAG,KAAK,CAAC;QAKhB,mBAAa,GAAG,UAAC,KAAU,IAAK,OAAA,KAAK,CAAC,MAAM,CAAC,KAAK,EAAlB,CAAkB,CAAC;;IADnD,CAAC;IAGD,8CAAQ,GAAR;QAAA,iBAOC;QANC,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAChD,SAAS,CAAC,EAAE,CAAC,EACb,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,KAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAhB,CAAgB,CAAC,CAC/B,CAAC;IACJ,CAAC;IAED,kDAAY,GAAZ,UAAa,KAAU;QACrB,QAAQ;QACR,IAAI,KAAK,CAAC,OAAO,KAAK,EAAE,EAAE;YACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;SAC3B;aAAM;YACL,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;SAC1B;IACH,CAAC;IAED,8CAAQ,GAAR,UAAS,EAAgC;QACvC,IAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,QAA0B,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACvE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAC9B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,cAAM,OAAA,EAAE,CAAC,MAAM,CAAC,KAAK,EAAf,CAAe,CAAC,CAC5C,CAAC;QACF,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAED,4CAAM,GAAN,UAAO,GAAW;QAAlB,iBAOC;QANC,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,MAAM,CAC1D,UAAC,MAAM;YACL,OAAA,CAAC,KAAI,CAAC,YAAY;gBAClB,CAAC,GAAG;gBACJ,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC;QAFrD,CAEqD,CACxD,CAAC;IACJ,CAAC;IACS,iDAAW,GAArB;QACE,6BACK,iBAAM,WAAW,WAAE,KACtB,OAAO,EAAE,IAAI,CAAC,OAAO,IACrB;IACJ,CAAC;6HAtDU,2BAA2B;iHAA3B,2BAA2B,0HAlC5B,s6BA+BT;sCApGH;CA8JC,AA3FD,CAqCU,gBAAgB,GAsDzB;SAvDY,2BAA2B;4FAA3B,2BAA2B;kBApCvC,SAAS;mBAAC;oBACT,QAAQ,EAAE,6BAA6B;oBACvC,QAAQ,EAAE,s6BA+BT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8GAKU,OAAO;sBAAf,KAAK;;AAqDR,MAAM,CAAC,IAAM,iBAAiB,GAAiB,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC"}
@@ -1,64 +0,0 @@
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 { ChangeDetectionStrategy, ChangeDetectorRef, Component, } from '@angular/core';
27
- import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
28
- import { isBooleanControl, rankWith } from '@jsonforms/core';
29
- import * as i0 from "@angular/core";
30
- import * as i1 from "@jsonforms/angular";
31
- import * as i2 from "@angular/common";
32
- import * as i3 from "@angular/material/form-field";
33
- import * as i4 from "@angular/material/checkbox";
34
- import * as i5 from "@angular/flex-layout/flex";
35
- import * as i6 from "@angular/flex-layout/extended";
36
- var BooleanControlRenderer = /** @class */ (function (_super) {
37
- __extends(BooleanControlRenderer, _super);
38
- function BooleanControlRenderer(jsonformsService, changeDetectionRef) {
39
- var _this = _super.call(this, jsonformsService) || this;
40
- _this.changeDetectionRef = changeDetectionRef;
41
- _this.isChecked = function () { return _this.data || false; };
42
- _this.getEventValue = function (event) { return event.checked; };
43
- return _this;
44
- }
45
- BooleanControlRenderer.prototype.mapAdditionalProps = function () {
46
- if (!this.changeDetectionRef.destroyed) {
47
- this.changeDetectionRef.markForCheck();
48
- }
49
- };
50
- BooleanControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BooleanControlRenderer, deps: [{ token: i1.JsonFormsAngularService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
51
- BooleanControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: BooleanControlRenderer, selector: "BooleanControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <div\n [fxHide]=\"hidden\"\n fxLayout=\"column\"\n fxLayoutAlign=\"center\"\n style=\"height:100%\"\n >\n <mat-checkbox\n (change)=\"onChange($event)\"\n [checked]=\"isChecked()\"\n [disabled]=\"!isEnabled()\"\n [id]=\"id\"\n >\n {{ label }}\n </mat-checkbox>\n <mat-hint class=\"mat-caption\" *ngIf=\"shouldShowUnfocusedDescription()\">{{\n description\n }}</mat-hint>\n <mat-error class=\"mat-caption\">{{ error }}</mat-error>\n </div>\n ", isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i6.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
52
- return BooleanControlRenderer;
53
- }(JsonFormsControl));
54
- export { BooleanControlRenderer };
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BooleanControlRenderer, decorators: [{
56
- type: Component,
57
- args: [{
58
- selector: 'BooleanControlRenderer',
59
- template: "\n <div\n [fxHide]=\"hidden\"\n fxLayout=\"column\"\n fxLayoutAlign=\"center\"\n style=\"height:100%\"\n >\n <mat-checkbox\n (change)=\"onChange($event)\"\n [checked]=\"isChecked()\"\n [disabled]=\"!isEnabled()\"\n [id]=\"id\"\n >\n {{ label }}\n </mat-checkbox>\n <mat-hint class=\"mat-caption\" *ngIf=\"shouldShowUnfocusedDescription()\">{{\n description\n }}</mat-hint>\n <mat-error class=\"mat-caption\">{{ error }}</mat-error>\n </div>\n ",
60
- changeDetection: ChangeDetectionStrategy.OnPush,
61
- }]
62
- }], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }, { type: i0.ChangeDetectorRef }]; } });
63
- export var booleanControlTester = rankWith(2, isBooleanControl);
64
- //# sourceMappingURL=boolean.renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boolean.renderer.js","sourceRoot":"","sources":["../../../src/controls/boolean.renderer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,GAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAgB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;;;;;;;;AAE3E;IAyB4C,0CAAgB;IAC1D,gCACE,gBAAyC,EACjC,kBAAqC;QAF/C,YAIE,kBAAM,gBAAgB,CAAC,SACxB;QAHS,wBAAkB,GAAlB,kBAAkB,CAAmB;QAI/C,eAAS,GAAG,cAAM,OAAA,KAAI,CAAC,IAAI,IAAI,KAAK,EAAlB,CAAkB,CAAC;QACrC,mBAAa,GAAG,UAAC,KAAU,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,CAAC;;IAF9C,CAAC;IAID,mDAAkB,GAAlB;QACE,IAAI,CAAE,IAAI,CAAC,kBAA8B,CAAC,SAAS,EAAE;YACnD,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;SACxC;IACH,CAAC;wHAdU,sBAAsB;4GAAtB,sBAAsB,qFAvBvB,miBAoBT;iCAvDH;CAyEC,AAxCD,CAyB4C,gBAAgB,GAe3D;SAfY,sBAAsB;4FAAtB,sBAAsB;kBAzBlC,SAAS;mBAAC;oBACT,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE,miBAoBT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;AAkBD,MAAM,CAAC,IAAM,oBAAoB,GAAiB,QAAQ,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- import { RankedTester } from '@jsonforms/core';
2
- import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
3
- import * as i0 from "@angular/core";
4
- export declare class DateControlRenderer extends JsonFormsControl {
5
- focused: boolean;
6
- constructor(jsonformsService: JsonFormsAngularService);
7
- getEventValue: (event: any) => any;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<DateControlRenderer, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<DateControlRenderer, "DateControlRenderer", never, {}, {}, never, never, false, never>;
10
- }
11
- export declare const DateControlRendererTester: RankedTester;
@@ -1,60 +0,0 @@
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 { Component, ChangeDetectionStrategy } from '@angular/core';
27
- import { isDateControl, rankWith } from '@jsonforms/core';
28
- import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
29
- import * as i0 from "@angular/core";
30
- import * as i1 from "@jsonforms/angular";
31
- import * as i2 from "@angular/common";
32
- import * as i3 from "@angular/material/form-field";
33
- import * as i4 from "@angular/material/input";
34
- import * as i5 from "@angular/material/datepicker";
35
- import * as i6 from "@angular/forms";
36
- import * as i7 from "@angular/flex-layout/flex";
37
- import * as i8 from "@angular/flex-layout/extended";
38
- var DateControlRenderer = /** @class */ (function (_super) {
39
- __extends(DateControlRenderer, _super);
40
- function DateControlRenderer(jsonformsService) {
41
- var _this = _super.call(this, jsonformsService) || this;
42
- _this.focused = false;
43
- _this.getEventValue = function (event) { return event.value.toISOString().substr(0, 10); };
44
- return _this;
45
- }
46
- DateControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateControlRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
47
- DateControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DateControlRenderer, selector: "DateControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <mat-form-field fxFlex [fxHide]=\"hidden\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n (dateChange)=\"onChange($event)\"\n [id]=\"id\"\n [formControl]=\"form\"\n [matDatepicker]=\"datepicker\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-datepicker-toggle\n matSuffix\n [for]=\"datepicker\"\n ></mat-datepicker-toggle>\n <mat-datepicker #datepicker></mat-datepicker>\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ", isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i7.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i8.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
48
- return DateControlRenderer;
49
- }(JsonFormsControl));
50
- export { DateControlRenderer };
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateControlRenderer, decorators: [{
52
- type: Component,
53
- args: [{
54
- selector: 'DateControlRenderer',
55
- template: "\n <mat-form-field fxFlex [fxHide]=\"hidden\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n (dateChange)=\"onChange($event)\"\n [id]=\"id\"\n [formControl]=\"form\"\n [matDatepicker]=\"datepicker\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-datepicker-toggle\n matSuffix\n [for]=\"datepicker\"\n ></mat-datepicker-toggle>\n <mat-datepicker #datepicker></mat-datepicker>\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ",
56
- changeDetection: ChangeDetectionStrategy.OnPush,
57
- }]
58
- }], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; } });
59
- export var DateControlRendererTester = rankWith(2, isDateControl);
60
- //# sourceMappingURL=date.renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.renderer.js","sourceRoot":"","sources":["../../../src/controls/date.renderer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,aAAa,EAAgB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;;;;;;;;;;AAE/E;IA2ByC,uCAAgB;IAGvD,6BAAY,gBAAyC;QAArD,YACE,kBAAM,gBAAgB,CAAC,SACxB;QAJD,aAAO,GAAG,KAAK,CAAC;QAMhB,mBAAa,GAAG,UAAC,KAAU,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,EAAvC,CAAuC,CAAC;;IAFxE,CAAC;qHALU,mBAAmB;yGAAnB,mBAAmB,kFAzBpB,yrBAsBT;8BApDH;CA+DC,AAnCD,CA2ByC,gBAAgB,GAQxD;SARY,mBAAmB;4FAAnB,mBAAmB;kBA3B/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,qBAAqB;oBAC/B,QAAQ,EAAE,yrBAsBT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;AAWD,MAAM,CAAC,IAAM,yBAAyB,GAAiB,QAAQ,CAC7D,CAAC,EACD,aAAa,CACd,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from './boolean.renderer';
2
- export * from './text.renderer';
3
- export * from './textarea.renderer';
4
- export * from './number.renderer';
5
- export * from './range.renderer';
6
- export * from './date.renderer';
7
- export * from './toggle.renderer';
8
- export * from './autocomplete.renderer';
@@ -1,33 +0,0 @@
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
- export * from './boolean.renderer';
26
- export * from './text.renderer';
27
- export * from './textarea.renderer';
28
- export * from './number.renderer';
29
- export * from './range.renderer';
30
- export * from './date.renderer';
31
- export * from './toggle.renderer';
32
- export * from './autocomplete.renderer';
33
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}