@jsonforms/angular-material 3.2.0-beta.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/LICENSE +22 -0
- package/lib/README.md +137 -0
- package/lib/esm2022/jsonforms-angular-material.mjs +5 -0
- package/lib/esm2022/library/controls/autocomplete.renderer.mjs +171 -0
- package/lib/esm2022/library/controls/boolean.renderer.mjs +84 -0
- package/lib/esm2022/library/controls/date.renderer.mjs +93 -0
- package/lib/esm2022/library/controls/index.mjs +33 -0
- package/lib/esm2022/library/controls/number.renderer.mjs +173 -0
- package/lib/esm2022/library/controls/range.renderer.mjs +104 -0
- package/lib/esm2022/library/controls/text.renderer.mjs +98 -0
- package/lib/esm2022/library/controls/textarea.renderer.mjs +80 -0
- package/lib/esm2022/library/controls/toggle.renderer.mjs +86 -0
- package/lib/esm2022/library/index.mjs +69 -0
- package/lib/esm2022/library/layouts/array-layout.renderer.mjs +259 -0
- package/lib/esm2022/library/layouts/categorization-layout.renderer.mjs +105 -0
- package/lib/esm2022/library/layouts/group-layout.renderer.mjs +78 -0
- package/lib/esm2022/library/layouts/horizontal-layout.renderer.mjs +73 -0
- package/lib/esm2022/library/layouts/index.mjs +30 -0
- package/lib/esm2022/library/layouts/layout.renderer.mjs +86 -0
- package/lib/esm2022/library/layouts/vertical-layout.renderer.mjs +67 -0
- package/lib/esm2022/library/module.mjs +239 -0
- package/lib/esm2022/library/other/index.mjs +29 -0
- package/lib/esm2022/library/other/label.renderer.mjs +61 -0
- package/lib/esm2022/library/other/master-detail/detail.mjs +59 -0
- package/lib/esm2022/library/other/master-detail/index.mjs +27 -0
- package/lib/esm2022/library/other/master-detail/master.mjs +250 -0
- package/lib/esm2022/library/other/object.renderer.mjs +84 -0
- package/lib/esm2022/library/other/table.renderer.mjs +314 -0
- package/lib/esm2022/public_api.mjs +2 -0
- package/lib/fesm2022/jsonforms-angular-material.mjs +2564 -0
- package/lib/fesm2022/jsonforms-angular-material.mjs.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/jsonforms-angular-material.d.ts.map +1 -0
- package/lib/{cjs → library}/controls/autocomplete.renderer.d.ts +1 -0
- package/lib/library/controls/autocomplete.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/controls/boolean.renderer.d.ts +1 -0
- package/lib/library/controls/boolean.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/controls/date.renderer.d.ts +1 -0
- package/lib/library/controls/date.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/controls/index.d.ts +1 -0
- package/lib/library/controls/index.d.ts.map +1 -0
- package/lib/{esm → library}/controls/number.renderer.d.ts +1 -0
- package/lib/library/controls/number.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/controls/range.renderer.d.ts +1 -0
- package/lib/library/controls/range.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/controls/text.renderer.d.ts +1 -0
- package/lib/library/controls/text.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/controls/textarea.renderer.d.ts +1 -0
- package/lib/library/controls/textarea.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/controls/toggle.renderer.d.ts +1 -0
- package/lib/library/controls/toggle.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/index.d.ts +1 -0
- package/lib/library/index.d.ts.map +1 -0
- package/lib/{cjs → library}/layouts/array-layout.renderer.d.ts +1 -0
- package/lib/library/layouts/array-layout.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/layouts/categorization-layout.renderer.d.ts +1 -0
- package/lib/library/layouts/categorization-layout.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/layouts/group-layout.renderer.d.ts +1 -0
- package/lib/library/layouts/group-layout.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/layouts/horizontal-layout.renderer.d.ts +1 -0
- package/lib/library/layouts/horizontal-layout.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/layouts/index.d.ts +1 -0
- package/lib/library/layouts/index.d.ts.map +1 -0
- package/lib/{esm → library}/layouts/layout.renderer.d.ts +1 -0
- package/lib/library/layouts/layout.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/layouts/vertical-layout.renderer.d.ts +1 -0
- package/lib/library/layouts/vertical-layout.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/module.d.ts +1 -0
- package/lib/library/module.d.ts.map +1 -0
- package/lib/{esm → library}/other/index.d.ts +1 -0
- package/lib/library/other/index.d.ts.map +1 -0
- package/lib/{esm → library}/other/label.renderer.d.ts +1 -0
- package/lib/library/other/label.renderer.d.ts.map +1 -0
- package/lib/{esm → library}/other/master-detail/detail.d.ts +1 -0
- package/lib/library/other/master-detail/detail.d.ts.map +1 -0
- package/lib/{cjs → library}/other/master-detail/index.d.ts +1 -0
- package/lib/library/other/master-detail/index.d.ts.map +1 -0
- package/lib/{esm → library}/other/master-detail/master.d.ts +1 -0
- package/lib/library/other/master-detail/master.d.ts.map +1 -0
- package/lib/{esm → library}/other/object.renderer.d.ts +1 -0
- package/lib/library/other/object.renderer.d.ts.map +1 -0
- package/lib/{cjs → library}/other/table.renderer.d.ts +1 -0
- package/lib/library/other/table.renderer.d.ts.map +1 -0
- package/lib/package.json +75 -0
- package/lib/public_api.d.ts +2 -0
- package/lib/public_api.d.ts.map +1 -0
- package/package.json +12 -20
- package/src/index.ts +1 -121
- package/src/library/index.ts +121 -0
- package/src/public_api.ts +1 -0
- package/lib/cjs/controls/autocomplete.renderer.js +0 -115
- package/lib/cjs/controls/autocomplete.renderer.js.map +0 -1
- package/lib/cjs/controls/boolean.renderer.d.ts +0 -14
- package/lib/cjs/controls/boolean.renderer.js +0 -61
- package/lib/cjs/controls/boolean.renderer.js.map +0 -1
- package/lib/cjs/controls/date.renderer.js +0 -57
- package/lib/cjs/controls/date.renderer.js.map +0 -1
- package/lib/cjs/controls/index.js +0 -36
- package/lib/cjs/controls/index.js.map +0 -1
- package/lib/cjs/controls/number.renderer.d.ts +0 -23
- package/lib/cjs/controls/number.renderer.js +0 -134
- package/lib/cjs/controls/number.renderer.js.map +0 -1
- package/lib/cjs/controls/range.renderer.d.ts +0 -17
- package/lib/cjs/controls/range.renderer.js +0 -64
- package/lib/cjs/controls/range.renderer.js.map +0 -1
- package/lib/cjs/controls/text.renderer.d.ts +0 -12
- package/lib/cjs/controls/text.renderer.js +0 -72
- package/lib/cjs/controls/text.renderer.js.map +0 -1
- package/lib/cjs/controls/textarea.renderer.d.ts +0 -11
- package/lib/cjs/controls/textarea.renderer.js +0 -56
- package/lib/cjs/controls/textarea.renderer.js.map +0 -1
- package/lib/cjs/controls/toggle.renderer.js +0 -63
- package/lib/cjs/controls/toggle.renderer.js.map +0 -1
- package/lib/cjs/index.js +0 -73
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/layouts/array-layout.renderer.js +0 -101
- package/lib/cjs/layouts/array-layout.renderer.js.map +0 -1
- package/lib/cjs/layouts/categorization-layout.renderer.d.ts +0 -17
- package/lib/cjs/layouts/categorization-layout.renderer.js +0 -77
- package/lib/cjs/layouts/categorization-layout.renderer.js.map +0 -1
- package/lib/cjs/layouts/group-layout.renderer.js +0 -53
- package/lib/cjs/layouts/group-layout.renderer.js.map +0 -1
- package/lib/cjs/layouts/horizontal-layout.renderer.d.ts +0 -11
- package/lib/cjs/layouts/horizontal-layout.renderer.js +0 -52
- package/lib/cjs/layouts/horizontal-layout.renderer.js.map +0 -1
- package/lib/cjs/layouts/index.d.ts +0 -5
- package/lib/cjs/layouts/index.js +0 -33
- package/lib/cjs/layouts/index.js.map +0 -1
- package/lib/cjs/layouts/layout.renderer.d.ts +0 -22
- package/lib/cjs/layouts/layout.renderer.js +0 -94
- package/lib/cjs/layouts/layout.renderer.js.map +0 -1
- package/lib/cjs/layouts/vertical-layout.renderer.js +0 -52
- package/lib/cjs/layouts/vertical-layout.renderer.js.map +0 -1
- package/lib/cjs/module.d.ts +0 -47
- package/lib/cjs/module.js +0 -247
- package/lib/cjs/module.js.map +0 -1
- package/lib/cjs/other/index.d.ts +0 -4
- package/lib/cjs/other/index.js +0 -32
- package/lib/cjs/other/index.js.map +0 -1
- package/lib/cjs/other/label.renderer.d.ts +0 -16
- package/lib/cjs/other/label.renderer.js +0 -66
- package/lib/cjs/other/label.renderer.js.map +0 -1
- package/lib/cjs/other/master-detail/detail.d.ts +0 -9
- package/lib/cjs/other/master-detail/detail.js +0 -61
- package/lib/cjs/other/master-detail/detail.js.map +0 -1
- package/lib/cjs/other/master-detail/index.js +0 -30
- package/lib/cjs/other/master-detail/index.js.map +0 -1
- package/lib/cjs/other/master-detail/master.d.ts +0 -27
- package/lib/cjs/other/master-detail/master.js +0 -152
- package/lib/cjs/other/master-detail/master.js.map +0 -1
- package/lib/cjs/other/object.renderer.d.ts +0 -11
- package/lib/cjs/other/object.renderer.js +0 -73
- package/lib/cjs/other/object.renderer.js.map +0 -1
- package/lib/cjs/other/table.renderer.js +0 -147
- package/lib/cjs/other/table.renderer.js.map +0 -1
- package/lib/esm/controls/autocomplete.renderer.d.ts +0 -48
- package/lib/esm/controls/autocomplete.renderer.js +0 -112
- package/lib/esm/controls/autocomplete.renderer.js.map +0 -1
- package/lib/esm/controls/boolean.renderer.js +0 -58
- package/lib/esm/controls/boolean.renderer.js.map +0 -1
- package/lib/esm/controls/date.renderer.d.ts +0 -11
- package/lib/esm/controls/date.renderer.js +0 -54
- package/lib/esm/controls/date.renderer.js.map +0 -1
- package/lib/esm/controls/index.d.ts +0 -8
- package/lib/esm/controls/index.js +0 -33
- package/lib/esm/controls/index.js.map +0 -1
- package/lib/esm/controls/number.renderer.js +0 -131
- package/lib/esm/controls/number.renderer.js.map +0 -1
- package/lib/esm/controls/range.renderer.js +0 -61
- package/lib/esm/controls/range.renderer.js.map +0 -1
- package/lib/esm/controls/text.renderer.js +0 -69
- package/lib/esm/controls/text.renderer.js.map +0 -1
- package/lib/esm/controls/textarea.renderer.js +0 -53
- package/lib/esm/controls/textarea.renderer.js.map +0 -1
- package/lib/esm/controls/toggle.renderer.d.ts +0 -14
- package/lib/esm/controls/toggle.renderer.js +0 -60
- package/lib/esm/controls/toggle.renderer.js.map +0 -1
- package/lib/esm/index.d.ts +0 -10
- package/lib/esm/index.js +0 -69
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/layouts/array-layout.renderer.d.ts +0 -29
- package/lib/esm/layouts/array-layout.renderer.js +0 -98
- package/lib/esm/layouts/array-layout.renderer.js.map +0 -1
- package/lib/esm/layouts/categorization-layout.renderer.js +0 -74
- package/lib/esm/layouts/categorization-layout.renderer.js.map +0 -1
- package/lib/esm/layouts/group-layout.renderer.d.ts +0 -11
- package/lib/esm/layouts/group-layout.renderer.js +0 -50
- package/lib/esm/layouts/group-layout.renderer.js.map +0 -1
- package/lib/esm/layouts/horizontal-layout.renderer.js +0 -49
- package/lib/esm/layouts/horizontal-layout.renderer.js.map +0 -1
- package/lib/esm/layouts/index.js +0 -30
- package/lib/esm/layouts/index.js.map +0 -1
- package/lib/esm/layouts/layout.renderer.js +0 -91
- package/lib/esm/layouts/layout.renderer.js.map +0 -1
- package/lib/esm/layouts/vertical-layout.renderer.d.ts +0 -11
- package/lib/esm/layouts/vertical-layout.renderer.js +0 -49
- package/lib/esm/layouts/vertical-layout.renderer.js.map +0 -1
- package/lib/esm/module.js +0 -243
- package/lib/esm/module.js.map +0 -1
- package/lib/esm/other/index.js +0 -29
- package/lib/esm/other/index.js.map +0 -1
- package/lib/esm/other/label.renderer.js +0 -63
- package/lib/esm/other/label.renderer.js.map +0 -1
- package/lib/esm/other/master-detail/detail.js +0 -57
- package/lib/esm/other/master-detail/detail.js.map +0 -1
- package/lib/esm/other/master-detail/index.d.ts +0 -2
- package/lib/esm/other/master-detail/index.js +0 -27
- package/lib/esm/other/master-detail/index.js.map +0 -1
- package/lib/esm/other/master-detail/master.js +0 -148
- package/lib/esm/other/master-detail/master.js.map +0 -1
- package/lib/esm/other/object.renderer.js +0 -70
- package/lib/esm/other/object.renderer.js.map +0 -1
- package/lib/esm/other/table.renderer.d.ts +0 -36
- package/lib/esm/other/table.renderer.js +0 -143
- package/lib/esm/other/table.renderer.js.map +0 -1
- /package/src/{controls → library/controls}/autocomplete.renderer.ts +0 -0
- /package/src/{controls → library/controls}/boolean.renderer.ts +0 -0
- /package/src/{controls → library/controls}/date.renderer.ts +0 -0
- /package/src/{controls → library/controls}/index.ts +0 -0
- /package/src/{controls → library/controls}/number.renderer.ts +0 -0
- /package/src/{controls → library/controls}/range.renderer.ts +0 -0
- /package/src/{controls → library/controls}/text.renderer.ts +0 -0
- /package/src/{controls → library/controls}/textarea.renderer.ts +0 -0
- /package/src/{controls → library/controls}/toggle.renderer.ts +0 -0
- /package/src/{layouts → library/layouts}/array-layout.renderer.ts +0 -0
- /package/src/{layouts → library/layouts}/categorization-layout.renderer.ts +0 -0
- /package/src/{layouts → library/layouts}/group-layout.renderer.ts +0 -0
- /package/src/{layouts → library/layouts}/horizontal-layout.renderer.ts +0 -0
- /package/src/{layouts → library/layouts}/index.ts +0 -0
- /package/src/{layouts → library/layouts}/layout.renderer.ts +0 -0
- /package/src/{layouts → library/layouts}/vertical-layout.renderer.ts +0 -0
- /package/src/{module.ts → library/module.ts} +0 -0
- /package/src/{other → library/other}/index.ts +0 -0
- /package/src/{other → library/other}/label.renderer.ts +0 -0
- /package/src/{other → library/other}/master-detail/detail.ts +0 -0
- /package/src/{other → library/other}/master-detail/index.ts +0 -0
- /package/src/{other → library/other}/master-detail/master.ts +0 -0
- /package/src/{other → library/other}/object.renderer.ts +0 -0
- /package/src/{other → library/other}/table.renderer.ts +0 -0
- /package/src/{other → library/other}/util.ts +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.booleanControlTester = exports.BooleanControlRenderer = 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 core_1 = require("@angular/core");
|
|
30
|
-
var angular_1 = require("@jsonforms/angular");
|
|
31
|
-
var core_2 = require("@jsonforms/core");
|
|
32
|
-
var i0 = tslib_1.__importStar(require("@angular/core"));
|
|
33
|
-
var i1 = tslib_1.__importStar(require("@jsonforms/angular"));
|
|
34
|
-
var i2 = tslib_1.__importStar(require("@angular/common"));
|
|
35
|
-
var i3 = tslib_1.__importStar(require("@angular/material/form-field"));
|
|
36
|
-
var i4 = tslib_1.__importStar(require("@angular/material/checkbox"));
|
|
37
|
-
var BooleanControlRenderer = /** @class */ (function (_super) {
|
|
38
|
-
tslib_1.__extends(BooleanControlRenderer, _super);
|
|
39
|
-
function BooleanControlRenderer(jsonformsService, changeDetectionRef) {
|
|
40
|
-
var _this = _super.call(this, jsonformsService) || this;
|
|
41
|
-
_this.changeDetectionRef = changeDetectionRef;
|
|
42
|
-
_this.isChecked = function () { return _this.data || false; };
|
|
43
|
-
_this.getEventValue = function (event) { return event.checked; };
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
BooleanControlRenderer.prototype.mapAdditionalProps = function () {
|
|
47
|
-
if (!this.changeDetectionRef.destroyed) {
|
|
48
|
-
this.changeDetectionRef.markForCheck();
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
BooleanControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BooleanControlRenderer, deps: [{ token: i1.JsonFormsAngularService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
-
BooleanControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BooleanControlRenderer, selector: "BooleanControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <div [ngStyle]=\"{ display: hidden ? 'none' : '' }\" class=\"boolean-control\">\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, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n .boolean-control {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n }\n "], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
-
return BooleanControlRenderer;
|
|
54
|
-
}(angular_1.JsonFormsControl));
|
|
55
|
-
exports.BooleanControlRenderer = BooleanControlRenderer;
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BooleanControlRenderer, decorators: [{
|
|
57
|
-
type: core_1.Component,
|
|
58
|
-
args: [{ selector: 'BooleanControlRenderer', template: "\n <div [ngStyle]=\"{ display: hidden ? 'none' : '' }\" class=\"boolean-control\">\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 ", changeDetection: core_1.ChangeDetectionStrategy.OnPush, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n .boolean-control {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100%;\n }\n "] }]
|
|
59
|
-
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }, { type: i0.ChangeDetectorRef }]; } });
|
|
60
|
-
exports.booleanControlTester = (0, core_2.rankWith)(2, core_2.isBooleanControl);
|
|
61
|
-
//# 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,sCAKuB;AACvB,8CAA+E;AAC/E,wCAA2E;;;;;;AAE3E;IAmC4C,kDAAgB;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,qFAjCvB,ofAeT;iCAlDH;CAmFC,AAlDD,CAmC4C,0BAAgB,GAe3D;AAfY,wDAAsB;4FAAtB,sBAAsB;kBAnClC,gBAAS;+BACE,wBAAwB,YACxB,ofAeT,mBAgBgB,8BAAuB,CAAC,MAAM;;AAmBpC,QAAA,oBAAoB,GAAiB,IAAA,eAAQ,EAAC,CAAC,EAAE,uBAAgB,CAAC,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DateControlRendererTester = exports.DateControlRenderer = 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 core_1 = require("@angular/core");
|
|
30
|
-
var core_2 = require("@jsonforms/core");
|
|
31
|
-
var angular_1 = require("@jsonforms/angular");
|
|
32
|
-
var i0 = tslib_1.__importStar(require("@angular/core"));
|
|
33
|
-
var i1 = tslib_1.__importStar(require("@jsonforms/angular"));
|
|
34
|
-
var i2 = tslib_1.__importStar(require("@angular/common"));
|
|
35
|
-
var i3 = tslib_1.__importStar(require("@angular/material/form-field"));
|
|
36
|
-
var i4 = tslib_1.__importStar(require("@angular/material/input"));
|
|
37
|
-
var i5 = tslib_1.__importStar(require("@angular/material/datepicker"));
|
|
38
|
-
var i6 = tslib_1.__importStar(require("@angular/forms"));
|
|
39
|
-
var DateControlRenderer = /** @class */ (function (_super) {
|
|
40
|
-
tslib_1.__extends(DateControlRenderer, _super);
|
|
41
|
-
function DateControlRenderer(jsonformsService) {
|
|
42
|
-
var _this = _super.call(this, jsonformsService) || this;
|
|
43
|
-
_this.focused = false;
|
|
44
|
-
_this.getEventValue = function (event) { return event.value.toISOString().substr(0, 10); };
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
DateControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateControlRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
DateControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DateControlRenderer, selector: "DateControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <mat-form-field [ngStyle]=\"{ display: hidden ? 'none' : '' }\">\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, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n mat-form-field {\n flex: 1 1 auto;\n }\n "], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
|
-
return DateControlRenderer;
|
|
50
|
-
}(angular_1.JsonFormsControl));
|
|
51
|
-
exports.DateControlRenderer = DateControlRenderer;
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateControlRenderer, decorators: [{
|
|
53
|
-
type: core_1.Component,
|
|
54
|
-
args: [{ selector: 'DateControlRenderer', template: "\n <mat-form-field [ngStyle]=\"{ display: hidden ? 'none' : '' }\">\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 ", changeDetection: core_1.ChangeDetectionStrategy.OnPush, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n mat-form-field {\n flex: 1 1 auto;\n }\n "] }]
|
|
55
|
-
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; } });
|
|
56
|
-
exports.DateControlRendererTester = (0, core_2.rankWith)(2, core_2.isDateControl);
|
|
57
|
-
//# 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,sCAAmE;AACnE,wCAAwE;AACxE,8CAA+E;;;;;;;;AAE/E;IAsCyC,+CAAgB;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,kFApCpB,8sBAsBT;8BApDH;CA0EC,AA9CD,CAsCyC,0BAAgB,GAQxD;AARY,kDAAmB;4FAAnB,mBAAmB;kBAtC/B,gBAAS;+BACE,qBAAqB,YACrB,8sBAsBT,mBAYgB,8BAAuB,CAAC,MAAM;;AAYpC,QAAA,yBAAyB,GAAiB,IAAA,eAAQ,EAC7D,CAAC,EACD,oBAAa,CACd,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var tslib_1 = require("tslib");
|
|
4
|
-
/*
|
|
5
|
-
The MIT License
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2019 EclipseSource Munich
|
|
8
|
-
https://github.com/eclipsesource/jsonforms
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in
|
|
18
|
-
all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
-
THE SOFTWARE.
|
|
27
|
-
*/
|
|
28
|
-
tslib_1.__exportStar(require("./boolean.renderer"), exports);
|
|
29
|
-
tslib_1.__exportStar(require("./text.renderer"), exports);
|
|
30
|
-
tslib_1.__exportStar(require("./textarea.renderer"), exports);
|
|
31
|
-
tslib_1.__exportStar(require("./number.renderer"), exports);
|
|
32
|
-
tslib_1.__exportStar(require("./range.renderer"), exports);
|
|
33
|
-
tslib_1.__exportStar(require("./date.renderer"), exports);
|
|
34
|
-
tslib_1.__exportStar(require("./toggle.renderer"), exports);
|
|
35
|
-
tslib_1.__exportStar(require("./autocomplete.renderer"), exports);
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,6DAAmC;AACnC,0DAAgC;AAChC,8DAAoC;AACpC,4DAAkC;AAClC,2DAAiC;AACjC,0DAAgC;AAChC,4DAAkC;AAClC,kEAAwC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
|
|
2
|
-
import { RankedTester, StatePropsOfControl } from '@jsonforms/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NumberControlRenderer extends JsonFormsControl {
|
|
5
|
-
private readonly MAXIMUM_FRACTIONAL_DIGITS;
|
|
6
|
-
oldValue: string;
|
|
7
|
-
min: number;
|
|
8
|
-
max: number;
|
|
9
|
-
multipleOf: number;
|
|
10
|
-
locale: string;
|
|
11
|
-
numberFormat: Intl.NumberFormat;
|
|
12
|
-
decimalSeparator: string;
|
|
13
|
-
focused: boolean;
|
|
14
|
-
constructor(jsonformsService: JsonFormsAngularService);
|
|
15
|
-
onChange(ev: any): void;
|
|
16
|
-
getEventValue: (event: any) => any;
|
|
17
|
-
getValue: () => any;
|
|
18
|
-
mapAdditionalProps(props: StatePropsOfControl): void;
|
|
19
|
-
private determineDecimalSeparator;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NumberControlRenderer, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NumberControlRenderer, "NumberControlRenderer", never, {}, {}, never, never, false, never>;
|
|
22
|
-
}
|
|
23
|
-
export declare const NumberControlRendererTester: RankedTester;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NumberControlRendererTester = exports.NumberControlRenderer = 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 core_1 = require("@angular/core");
|
|
30
|
-
var angular_1 = require("@jsonforms/angular");
|
|
31
|
-
var core_2 = require("@jsonforms/core");
|
|
32
|
-
var merge_1 = tslib_1.__importDefault(require("lodash/merge"));
|
|
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/form-field"));
|
|
37
|
-
var i4 = tslib_1.__importStar(require("@angular/material/input"));
|
|
38
|
-
var i5 = tslib_1.__importStar(require("@angular/forms"));
|
|
39
|
-
var NumberControlRenderer = /** @class */ (function (_super) {
|
|
40
|
-
tslib_1.__extends(NumberControlRenderer, _super);
|
|
41
|
-
function NumberControlRenderer(jsonformsService) {
|
|
42
|
-
var _this = _super.call(this, jsonformsService) || this;
|
|
43
|
-
_this.MAXIMUM_FRACTIONAL_DIGITS = 20;
|
|
44
|
-
_this.focused = false;
|
|
45
|
-
_this.getEventValue = function (event) {
|
|
46
|
-
var cleanPattern = new RegExp("[^-+0-9".concat(_this.decimalSeparator, "]"), 'g');
|
|
47
|
-
var cleaned = event.target.value.replace(cleanPattern, '');
|
|
48
|
-
var normalized = cleaned.replace(_this.decimalSeparator, '.');
|
|
49
|
-
if (normalized === '') {
|
|
50
|
-
return undefined;
|
|
51
|
-
}
|
|
52
|
-
// convert to number
|
|
53
|
-
var number = +normalized;
|
|
54
|
-
// if not a number just return the string
|
|
55
|
-
if (Number.isNaN(number)) {
|
|
56
|
-
return event.target.value;
|
|
57
|
-
}
|
|
58
|
-
return number;
|
|
59
|
-
};
|
|
60
|
-
_this.getValue = function () {
|
|
61
|
-
if (_this.data !== undefined && _this.data !== null) {
|
|
62
|
-
if (typeof _this.data === 'number') {
|
|
63
|
-
return _this.numberFormat.format(_this.data);
|
|
64
|
-
}
|
|
65
|
-
return _this.data;
|
|
66
|
-
}
|
|
67
|
-
return '';
|
|
68
|
-
};
|
|
69
|
-
return _this;
|
|
70
|
-
}
|
|
71
|
-
NumberControlRenderer.prototype.onChange = function (ev) {
|
|
72
|
-
var data = this.oldValue
|
|
73
|
-
? ev.target.value.replace(this.oldValue, '')
|
|
74
|
-
: ev.target.value;
|
|
75
|
-
// ignore these
|
|
76
|
-
if (data === '.' ||
|
|
77
|
-
data === ',' ||
|
|
78
|
-
data === ' ' ||
|
|
79
|
-
// if the value is 0 and we already have a value then we ignore
|
|
80
|
-
(data === '0' &&
|
|
81
|
-
this.getValue() !== '' &&
|
|
82
|
-
// a 0 in the first place
|
|
83
|
-
((ev.target.selectionStart === 1 && ev.target.selectionEnd === 1) ||
|
|
84
|
-
// or in the last place as this doesn't change the value (when there is a separator)
|
|
85
|
-
(ev.target.selectionStart === ev.target.value.length &&
|
|
86
|
-
ev.target.selectionEnd === ev.target.value.length &&
|
|
87
|
-
ev.target.value.indexOf(this.decimalSeparator) !== -1)))) {
|
|
88
|
-
this.oldValue = ev.target.value;
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
_super.prototype.onChange.call(this, ev);
|
|
92
|
-
this.oldValue = this.getValue();
|
|
93
|
-
};
|
|
94
|
-
NumberControlRenderer.prototype.mapAdditionalProps = function (props) {
|
|
95
|
-
if (this.scopedSchema) {
|
|
96
|
-
var testerContext = {
|
|
97
|
-
rootSchema: this.rootSchema,
|
|
98
|
-
config: props.config,
|
|
99
|
-
};
|
|
100
|
-
var defaultStep = (0, core_2.isNumberControl)(this.uischema, this.rootSchema, testerContext)
|
|
101
|
-
? 0.1
|
|
102
|
-
: 1;
|
|
103
|
-
this.min = this.scopedSchema.minimum;
|
|
104
|
-
this.max = this.scopedSchema.maximum;
|
|
105
|
-
this.multipleOf = this.scopedSchema.multipleOf || defaultStep;
|
|
106
|
-
var appliedUiSchemaOptions = (0, merge_1.default)({}, props.config, this.uischema.options);
|
|
107
|
-
var currentLocale = this.jsonFormsService.getLocale();
|
|
108
|
-
if (this.locale === undefined || this.locale !== currentLocale) {
|
|
109
|
-
this.locale = currentLocale;
|
|
110
|
-
this.numberFormat = new Intl.NumberFormat(this.locale, {
|
|
111
|
-
useGrouping: appliedUiSchemaOptions.useGrouping,
|
|
112
|
-
maximumFractionDigits: this.MAXIMUM_FRACTIONAL_DIGITS,
|
|
113
|
-
});
|
|
114
|
-
this.determineDecimalSeparator();
|
|
115
|
-
this.oldValue = this.getValue();
|
|
116
|
-
}
|
|
117
|
-
this.form.setValue(this.getValue());
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
NumberControlRenderer.prototype.determineDecimalSeparator = function () {
|
|
121
|
-
var example = this.numberFormat.format(1.1);
|
|
122
|
-
this.decimalSeparator = example.charAt(1);
|
|
123
|
-
};
|
|
124
|
-
NumberControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumberControlRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
-
NumberControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NumberControlRenderer, selector: "NumberControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <mat-form-field [ngStyle]=\"{ display: hidden ? 'none' : '' }\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n (input)=\"onChange($event)\"\n [value]=\"getValue()\"\n [id]=\"id\"\n [formControl]=\"form\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"multipleOf\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ", isInline: true, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n mat-form-field {\n flex: 1 1 auto;\n }\n "], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
126
|
-
return NumberControlRenderer;
|
|
127
|
-
}(angular_1.JsonFormsControl));
|
|
128
|
-
exports.NumberControlRenderer = NumberControlRenderer;
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumberControlRenderer, decorators: [{
|
|
130
|
-
type: core_1.Component,
|
|
131
|
-
args: [{ selector: 'NumberControlRenderer', template: "\n <mat-form-field [ngStyle]=\"{ display: hidden ? 'none' : '' }\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n (input)=\"onChange($event)\"\n [value]=\"getValue()\"\n [id]=\"id\"\n [formControl]=\"form\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"multipleOf\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ", changeDetection: core_1.ChangeDetectionStrategy.OnPush, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n mat-form-field {\n flex: 1 1 auto;\n }\n "] }]
|
|
132
|
-
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; } });
|
|
133
|
-
exports.NumberControlRendererTester = (0, core_2.rankWith)(2, (0, core_2.or)(core_2.isNumberControl, core_2.isIntegerControl));
|
|
134
|
-
//# sourceMappingURL=number.renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.renderer.js","sourceRoot":"","sources":["../../../src/controls/number.renderer.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
|
|
3
|
-
import { RankedTester } from '@jsonforms/core';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class RangeControlRenderer extends JsonFormsControl {
|
|
6
|
-
private changeDetectorRef;
|
|
7
|
-
min: number;
|
|
8
|
-
max: number;
|
|
9
|
-
multipleOf: number;
|
|
10
|
-
focused: boolean;
|
|
11
|
-
constructor(jsonformsService: JsonFormsAngularService, changeDetectorRef: ChangeDetectorRef);
|
|
12
|
-
getEventValue: (event: number) => number;
|
|
13
|
-
mapAdditionalProps(): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RangeControlRenderer, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RangeControlRenderer, "RangeControlRenderer", never, {}, {}, never, never, false, never>;
|
|
16
|
-
}
|
|
17
|
-
export declare const RangeControlRendererTester: RankedTester;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RangeControlRendererTester = exports.RangeControlRenderer = 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 core_1 = require("@angular/core");
|
|
30
|
-
var angular_1 = require("@jsonforms/angular");
|
|
31
|
-
var core_2 = require("@jsonforms/core");
|
|
32
|
-
var i0 = tslib_1.__importStar(require("@angular/core"));
|
|
33
|
-
var i1 = tslib_1.__importStar(require("@jsonforms/angular"));
|
|
34
|
-
var i2 = tslib_1.__importStar(require("@angular/common"));
|
|
35
|
-
var i3 = tslib_1.__importStar(require("@angular/material/form-field"));
|
|
36
|
-
var i4 = tslib_1.__importStar(require("@angular/material/slider"));
|
|
37
|
-
var RangeControlRenderer = /** @class */ (function (_super) {
|
|
38
|
-
tslib_1.__extends(RangeControlRenderer, _super);
|
|
39
|
-
function RangeControlRenderer(jsonformsService, changeDetectorRef) {
|
|
40
|
-
var _this = _super.call(this, jsonformsService) || this;
|
|
41
|
-
_this.changeDetectorRef = changeDetectorRef;
|
|
42
|
-
_this.focused = false;
|
|
43
|
-
_this.getEventValue = function (event) { return Number(event); };
|
|
44
|
-
return _this;
|
|
45
|
-
}
|
|
46
|
-
RangeControlRenderer.prototype.mapAdditionalProps = function () {
|
|
47
|
-
if (this.scopedSchema) {
|
|
48
|
-
this.min = this.scopedSchema.minimum;
|
|
49
|
-
this.max = this.scopedSchema.maximum;
|
|
50
|
-
this.multipleOf = this.scopedSchema.multipleOf || 1;
|
|
51
|
-
}
|
|
52
|
-
this.changeDetectorRef.markForCheck();
|
|
53
|
-
};
|
|
54
|
-
RangeControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RangeControlRenderer, deps: [{ token: i1.JsonFormsAngularService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
-
RangeControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RangeControlRenderer, selector: "RangeControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <div [ngStyle]=\"{ display: hidden ? 'none' : '' }\" class=\"range-control\">\n <label class=\"mat-caption\" style=\"color:rgba(0,0,0,.54)\">{{\n label\n }}</label>\n <mat-slider\n [disabled]=\"!isEnabled()\"\n [max]=\"max\"\n [min]=\"min\"\n [step]=\"multipleOf\"\n [discrete]=\"true\"\n [id]=\"id\"\n showTickMarks\n #ngSlider\n >\n <input matSliderThumb (valueChange)=\"onChange($event)\" />\n </mat-slider>\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, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n .range-control {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n }\n "], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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.MatSlider, selector: "mat-slider", inputs: ["color", "disableRipple", "disabled", "discrete", "showTickMarks", "min", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i4.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
56
|
-
return RangeControlRenderer;
|
|
57
|
-
}(angular_1.JsonFormsControl));
|
|
58
|
-
exports.RangeControlRenderer = RangeControlRenderer;
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RangeControlRenderer, decorators: [{
|
|
60
|
-
type: core_1.Component,
|
|
61
|
-
args: [{ selector: 'RangeControlRenderer', template: "\n <div [ngStyle]=\"{ display: hidden ? 'none' : '' }\" class=\"range-control\">\n <label class=\"mat-caption\" style=\"color:rgba(0,0,0,.54)\">{{\n label\n }}</label>\n <mat-slider\n [disabled]=\"!isEnabled()\"\n [max]=\"max\"\n [min]=\"min\"\n [step]=\"multipleOf\"\n [discrete]=\"true\"\n [id]=\"id\"\n showTickMarks\n #ngSlider\n >\n <input matSliderThumb (valueChange)=\"onChange($event)\" />\n </mat-slider>\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 ", changeDetection: core_1.ChangeDetectionStrategy.OnPush, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n .range-control {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n }\n "] }]
|
|
62
|
-
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }, { type: i0.ChangeDetectorRef }]; } });
|
|
63
|
-
exports.RangeControlRendererTester = (0, core_2.rankWith)(4, core_2.isRangeControl);
|
|
64
|
-
//# sourceMappingURL=range.renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"range.renderer.js","sourceRoot":"","sources":["../../../src/controls/range.renderer.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,sCAIuB;AACvB,8CAA+E;AAC/E,wCAAyE;;;;;;AAEzE;IAwC0C,gDAAgB;IAMxD,8BACE,gBAAyC,EACjC,iBAAoC;QAF9C,YAIE,kBAAM,gBAAgB,CAAC,SACxB;QAHS,uBAAiB,GAAjB,iBAAiB,CAAmB;QAJ9C,aAAO,GAAG,KAAK,CAAC;QAQhB,mBAAa,GAAG,UAAC,KAAa,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa,CAAC;;IADjD,CAAC;IAED,iDAAkB,GAAlB;QACE,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;YACrC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;YACrC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,IAAI,CAAC,CAAC;SACrD;QACD,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;IACxC,CAAC;sHApBU,oBAAoB;0GAApB,oBAAoB,mFAtCrB,gtBAsBT;+BAxDH;CA6FC,AA7DD,CAwC0C,0BAAgB,GAqBzD;AArBY,oDAAoB;4FAApB,oBAAoB;kBAxChC,gBAAS;+BACE,sBAAsB,YACtB,gtBAsBT,mBAcgB,8BAAuB,CAAC,MAAM;;AAwBpC,QAAA,0BAA0B,GAAiB,IAAA,eAAQ,EAC9D,CAAC,EACD,qBAAc,CACf,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
|
|
2
|
-
import { RankedTester } from '@jsonforms/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TextControlRenderer extends JsonFormsControl {
|
|
5
|
-
focused: boolean;
|
|
6
|
-
constructor(jsonformsService: JsonFormsAngularService);
|
|
7
|
-
getEventValue: (event: any) => any;
|
|
8
|
-
getType: () => string;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextControlRenderer, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextControlRenderer, "TextControlRenderer", never, {}, {}, never, never, false, never>;
|
|
11
|
-
}
|
|
12
|
-
export declare const TextControlRendererTester: RankedTester;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextControlRendererTester = exports.TextControlRenderer = 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 core_1 = require("@angular/core");
|
|
30
|
-
var angular_1 = require("@jsonforms/angular");
|
|
31
|
-
var core_2 = require("@jsonforms/core");
|
|
32
|
-
var i0 = tslib_1.__importStar(require("@angular/core"));
|
|
33
|
-
var i1 = tslib_1.__importStar(require("@jsonforms/angular"));
|
|
34
|
-
var i2 = tslib_1.__importStar(require("@angular/common"));
|
|
35
|
-
var i3 = tslib_1.__importStar(require("@angular/material/form-field"));
|
|
36
|
-
var i4 = tslib_1.__importStar(require("@angular/material/input"));
|
|
37
|
-
var i5 = tslib_1.__importStar(require("@angular/forms"));
|
|
38
|
-
var TextControlRenderer = /** @class */ (function (_super) {
|
|
39
|
-
tslib_1.__extends(TextControlRenderer, _super);
|
|
40
|
-
function TextControlRenderer(jsonformsService) {
|
|
41
|
-
var _this = _super.call(this, jsonformsService) || this;
|
|
42
|
-
_this.focused = false;
|
|
43
|
-
_this.getEventValue = function (event) { return event.target.value || undefined; };
|
|
44
|
-
_this.getType = function () {
|
|
45
|
-
if (_this.uischema.options && _this.uischema.options.format) {
|
|
46
|
-
return _this.uischema.options.format;
|
|
47
|
-
}
|
|
48
|
-
if (_this.scopedSchema && _this.scopedSchema.format) {
|
|
49
|
-
switch (_this.scopedSchema.format) {
|
|
50
|
-
case 'email':
|
|
51
|
-
return 'email';
|
|
52
|
-
case 'tel':
|
|
53
|
-
return 'tel';
|
|
54
|
-
default:
|
|
55
|
-
return 'text';
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return 'text';
|
|
59
|
-
};
|
|
60
|
-
return _this;
|
|
61
|
-
}
|
|
62
|
-
TextControlRenderer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextControlRenderer, deps: [{ token: i1.JsonFormsAngularService }], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
-
TextControlRenderer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextControlRenderer, selector: "TextControlRenderer", usesInheritance: true, ngImport: i0, template: "\n <mat-form-field [ngStyle]=\"{ display: hidden ? 'none' : '' }\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n [type]=\"getType()\"\n (input)=\"onChange($event)\"\n [id]=\"id\"\n [formControl]=\"form\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ", isInline: true, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n mat-form-field {\n flex: 1 1 auto;\n }\n "], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
64
|
-
return TextControlRenderer;
|
|
65
|
-
}(angular_1.JsonFormsControl));
|
|
66
|
-
exports.TextControlRenderer = TextControlRenderer;
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextControlRenderer, decorators: [{
|
|
68
|
-
type: core_1.Component,
|
|
69
|
-
args: [{ selector: 'TextControlRenderer', template: "\n <mat-form-field [ngStyle]=\"{ display: hidden ? 'none' : '' }\">\n <mat-label>{{ label }}</mat-label>\n <input\n matInput\n [type]=\"getType()\"\n (input)=\"onChange($event)\"\n [id]=\"id\"\n [formControl]=\"form\"\n (focus)=\"focused = true\"\n (focusout)=\"focused = false\"\n />\n <mat-hint *ngIf=\"shouldShowUnfocusedDescription() || focused\">{{\n description\n }}</mat-hint>\n <mat-error>{{ error }}</mat-error>\n </mat-form-field>\n ", changeDetection: core_1.ChangeDetectionStrategy.OnPush, styles: ["\n :host {\n display: flex;\n flex-direction: row;\n }\n mat-form-field {\n flex: 1 1 auto;\n }\n "] }]
|
|
70
|
-
}], ctorParameters: function () { return [{ type: i1.JsonFormsAngularService }]; } });
|
|
71
|
-
exports.TextControlRendererTester = (0, core_2.rankWith)(1, core_2.isStringControl);
|
|
72
|
-
//# sourceMappingURL=text.renderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.renderer.js","sourceRoot":"","sources":["../../../src/controls/text.renderer.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AACF,sCAAmE;AACnE,8CAA+E;AAC/E,wCAA0E;;;;;;;AAE1E;IAiCyC,+CAAgB;IAEvD,6BAAY,gBAAyC;QAArD,YACE,kBAAM,gBAAgB,CAAC,SACxB;QAHD,aAAO,GAAG,KAAK,CAAC;QAIhB,mBAAa,GAAG,UAAC,KAAU,IAAK,OAAA,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS,EAA/B,CAA+B,CAAC;QAChE,aAAO,GAAG;YACR,IAAI,KAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE;gBACzD,OAAO,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;aACrC;YACD,IAAI,KAAI,CAAC,YAAY,IAAI,KAAI,CAAC,YAAY,CAAC,MAAM,EAAE;gBACjD,QAAQ,KAAI,CAAC,YAAY,CAAC,MAAM,EAAE;oBAChC,KAAK,OAAO;wBACV,OAAO,OAAO,CAAC;oBACjB,KAAK,KAAK;wBACR,OAAO,KAAK,CAAC;oBACf;wBACE,OAAO,MAAM,CAAC;iBACjB;aACF;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;;IAjBF,CAAC;qHAJU,mBAAmB;yGAAnB,mBAAmB,kFA/BpB,0hBAiBT;8BA/CH;CAmFC,AAvDD,CAiCyC,0BAAgB,GAsBxD;AAtBY,kDAAmB;4FAAnB,mBAAmB;kBAjC/B,gBAAS;+BACE,qBAAqB,YACrB,0hBAiBT,mBAYgB,8BAAuB,CAAC,MAAM;;AAyBpC,QAAA,yBAAyB,GAAiB,IAAA,eAAQ,EAC7D,CAAC,EACD,sBAAe,CAChB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JsonFormsAngularService, JsonFormsControl } from '@jsonforms/angular';
|
|
2
|
-
import { RankedTester } from '@jsonforms/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TextAreaRenderer extends JsonFormsControl {
|
|
5
|
-
focused: boolean;
|
|
6
|
-
constructor(jsonformsService: JsonFormsAngularService);
|
|
7
|
-
getEventValue: (event: any) => any;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TextAreaRenderer, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextAreaRenderer, "TextAreaRenderer", never, {}, {}, never, never, false, never>;
|
|
10
|
-
}
|
|
11
|
-
export declare const TextAreaRendererTester: RankedTester;
|