@rxap/form-system 12.0.11 → 12.1.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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@rxap/utilities'), require('@angular/forms'), require('@rxap/forms'), require('@rxap/data-source'), require('@rxap/mixin'), require('@rxap/utilities/reflect-metadata'), require('rxjs/operators'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@rxap/form-system', ['exports', '@angular/core', '@rxap/utilities', '@angular/forms', '@rxap/forms', '@rxap/data-source', '@rxap/mixin', '@rxap/utilities/reflect-metadata', 'rxjs/operators', 'rxjs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap['form-system'] = {}), global.ng.core, global.utilities, global.ng.forms, global.forms, global.i2, global.mixin, global.reflectMetadata, global.rxjs.operators, global.rxjs));
5
- }(this, (function (exports, i0, utilities, i1, forms, i2, mixin, reflectMetadata, operators, rxjs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@rxap/utilities'), require('@angular/forms'), require('@rxap/forms'), require('@rxap/data-source'), require('@rxap/mixin'), require('@rxap/utilities/reflect-metadata'), require('rxjs/operators'), require('rxjs'), require('@angular/material/form-field')) :
3
+ typeof define === 'function' && define.amd ? define('@rxap/form-system', ['exports', '@angular/core', '@rxap/utilities', '@angular/forms', '@rxap/forms', '@rxap/data-source', '@rxap/mixin', '@rxap/utilities/reflect-metadata', 'rxjs/operators', 'rxjs', '@angular/material/form-field'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap['form-system'] = {}), global.ng.core, global.utilities, global.ng.forms, global.forms, global.i2, global.mixin, global.reflectMetadata, global.rxjs.operators, global.rxjs, global.ng.material.formField));
5
+ }(this, (function (exports, i0, utilities, i1, forms, i2, mixin, reflectMetadata, operators, rxjs, i3) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -27,6 +27,7 @@
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
28
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
29
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
30
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
31
 
31
32
  /*! *****************************************************************************
32
33
  Copyright (c) Microsoft Corporation.
@@ -857,28 +858,31 @@
857
858
  function InputSelectOptionsDirective(template, dataSourceLoader, viewContainerRef, injector, cdr,
858
859
  // The ngControl could be unknown on construction
859
860
  // bc it is available after the content is init
860
- ngControl) {
861
+ ngControl, matFormField) {
861
862
  if (ngControl === void 0) { ngControl = null; }
863
+ if (matFormField === void 0) { matFormField = null; }
862
864
  this.template = template;
863
865
  this.dataSourceLoader = dataSourceLoader;
864
866
  this.viewContainerRef = viewContainerRef;
865
867
  this.injector = injector;
866
868
  this.cdr = cdr;
867
869
  this.ngControl = ngControl;
870
+ this.matFormField = matFormField;
868
871
  this.viewer = { id: '[rxapInputSelectOptions]' };
869
872
  this.subscription = new rxjs.Subscription();
870
873
  }
871
- InputSelectOptionsDirective.prototype.extractControl = function (ngControl) {
872
- if (ngControl === void 0) { ngControl = this.ngControl; }
873
- if (!ngControl) {
874
- throw new Error('The ngControl is not defined!');
875
- }
876
- this.ngControl = ngControl;
877
- var control = this.ngControl.control;
878
- if (!(control instanceof forms.RxapFormControl)) {
879
- throw new Error('Control is not a RxapFormControl!');
874
+ InputSelectOptionsDirective.prototype.ngAfterViewInit = function () {
875
+ this.extractControl();
876
+ this.extractDatasource();
877
+ this.viewer = {
878
+ id: '[rxapInputSelectOptions]' + this.control.controlId,
879
+ viewChange: this.control.value$,
880
+ control: this.control,
881
+ };
882
+ this.loadOptions();
883
+ if (this.matAutocomplete) {
884
+ this.matAutocomplete.displayWith = this.toDisplay.bind(this);
880
885
  }
881
- return this.control = control;
882
886
  };
883
887
  InputSelectOptionsDirective.prototype.extractDatasource = function (control) {
884
888
  if (control === void 0) { control = this.control; }
@@ -907,10 +911,27 @@
907
911
  }
908
912
  return this.dataSource = dataSource;
909
913
  };
910
- InputSelectOptionsDirective.prototype.ngOnInit = function () {
911
- this.extractControl();
912
- this.extractDatasource();
913
- this.loadOptions();
914
+ InputSelectOptionsDirective.prototype.toDisplay = function (value) {
915
+ var _a, _b, _c;
916
+ if (!value) {
917
+ return '';
918
+ }
919
+ return (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find(function (option) { return option.value === value; })) === null || _b === void 0 ? void 0 : _b.display) !== null && _c !== void 0 ? _c : 'to display error';
920
+ };
921
+ InputSelectOptionsDirective.prototype.extractControl = function (ngControl) {
922
+ var _a, _b, _c, _d;
923
+ if (ngControl === void 0) {
924
+ ngControl = (_d = (_a = this.ngControl) !== null && _a !== void 0 ? _a : (_c = (_b = this.matFormField) === null || _b === void 0 ? void 0 : _b._control) === null || _c === void 0 ? void 0 : _c.ngControl) !== null && _d !== void 0 ? _d : null;
925
+ }
926
+ if (!ngControl) {
927
+ throw new Error('The ngControl is not defined!');
928
+ }
929
+ this.ngControl = ngControl;
930
+ var control = this.ngControl.control;
931
+ if (!(control instanceof forms.RxapFormControl)) {
932
+ throw new Error('Control is not a RxapFormControl!');
933
+ }
934
+ return this.control = control;
914
935
  };
915
936
  InputSelectOptionsDirective.prototype.ngOnDestroy = function () {
916
937
  var _a;
@@ -922,21 +943,21 @@
922
943
  this.subscription.add(dataSource.connect(this.viewer).pipe(operators.tap(function (options) { return _this.renderTemplate(_this.options = options); })).subscribe());
923
944
  };
924
945
  InputSelectOptionsDirective.prototype.renderTemplate = function (options) {
925
- var e_1, _b, e_2, _c;
946
+ var e_1, _e, e_2, _f;
926
947
  if (options === void 0) { options = this.options; }
927
948
  this.viewContainerRef.clear();
928
949
  if (options) {
929
950
  if (!Array.isArray(options)) {
930
951
  try {
931
- for (var _d = __values(Object.entries(options)), _e = _d.next(); !_e.done; _e = _d.next()) {
932
- var _f = __read(_e.value, 2), value = _f[0], display = _f[1];
952
+ for (var _g = __values(Object.entries(options)), _h = _g.next(); !_h.done; _h = _g.next()) {
953
+ var _j = __read(_h.value, 2), value = _j[0], display = _j[1];
933
954
  this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value: value, display: display } });
934
955
  }
935
956
  }
936
957
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
937
958
  finally {
938
959
  try {
939
- if (_e && !_e.done && (_b = _d.return)) _b.call(_d);
960
+ if (_h && !_h.done && (_e = _g.return)) _e.call(_g);
940
961
  }
941
962
  finally { if (e_1) throw e_1.error; }
942
963
  }
@@ -951,7 +972,7 @@
951
972
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
952
973
  finally {
953
974
  try {
954
- if (options_1_1 && !options_1_1.done && (_c = options_1.return)) _c.call(options_1);
975
+ if (options_1_1 && !options_1_1.done && (_f = options_1.return)) _f.call(options_1);
955
976
  }
956
977
  finally { if (e_2) throw e_2.error; }
957
978
  }
@@ -966,8 +987,8 @@
966
987
  };
967
988
  return InputSelectOptionsDirective;
968
989
  }());
969
- exports.InputSelectOptionsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: exports.InputSelectOptionsDirective, deps: [{ token: i0.TemplateRef }, { token: i2.DataSourceLoader }, { token: i0.ViewContainerRef }, { token: i0.INJECTOR }, { token: i0.ChangeDetectorRef }, { token: i1.NgControl, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
970
- exports.InputSelectOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: exports.InputSelectOptionsDirective, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"] }, ngImport: i0__namespace });
990
+ exports.InputSelectOptionsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: exports.InputSelectOptionsDirective, deps: [{ token: i0.TemplateRef }, { token: i2.DataSourceLoader }, { token: i0.ViewContainerRef }, { token: i0.INJECTOR }, { token: i0.ChangeDetectorRef }, { token: i1.NgControl, optional: true }, { token: i3.MAT_FORM_FIELD, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
991
+ exports.InputSelectOptionsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: exports.InputSelectOptionsDirective, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"], matAutocomplete: ["rxapInputSelectOptionsMatAutocomplete", "matAutocomplete"] }, ngImport: i0__namespace });
971
992
  __decorate([
972
993
  utilities.Required,
973
994
  __metadata("design:type", forms.RxapFormControl)
@@ -986,7 +1007,7 @@
986
1007
  i2.DataSourceLoader,
987
1008
  i0.ViewContainerRef,
988
1009
  i0.Injector,
989
- i0.ChangeDetectorRef, Object])
1010
+ i0.ChangeDetectorRef, Object, Object])
990
1011
  ], exports.InputSelectOptionsDirective);
991
1012
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: exports.InputSelectOptionsDirective, decorators: [{
992
1013
  type: i0.Directive,
@@ -1014,6 +1035,11 @@
1014
1035
  }, {
1015
1036
  type: i0.Inject,
1016
1037
  args: [i1.NgControl]
1038
+ }] }, { type: i3__namespace.MatFormField, decorators: [{
1039
+ type: i0.Optional
1040
+ }, {
1041
+ type: i0.Inject,
1042
+ args: [i3.MAT_FORM_FIELD]
1017
1043
  }] }];
1018
1044
  }, propDecorators: { viewer: [{
1019
1045
  type: i0.Input,
@@ -1021,6 +1047,9 @@
1021
1047
  }], metadata: [{
1022
1048
  type: i0.Input,
1023
1049
  args: ['rxapInputSelectOptionsMetadata']
1050
+ }], matAutocomplete: [{
1051
+ type: i0.Input,
1052
+ args: ['rxapInputSelectOptionsMatAutocomplete']
1024
1053
  }], control: [], dataSource: [], options: [] } });
1025
1054
  var InputSelectOptionsDirectiveModule = /** @class */ (function () {
1026
1055
  function InputSelectOptionsDirectiveModule() {
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-form-system.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../libs/form-system/src/lib/error.ts","../../../../libs/form-system/src/lib/decorators/metadata-keys.ts","../../../../libs/form-system/src/lib/mixins/extract-data-sources.mixin.ts","../../../../libs/form-system/src/lib/form-system-control.directive.ts","../../../../libs/form-system/src/lib/form-system.module.ts","../../../../libs/form-system/src/lib/control-data-source.ts","../../../../libs/form-system/src/lib/mixins/extract-control.mixin.ts","../../../../libs/form-system/src/lib/mixins/extract-form-definition.mixin.ts","../../../../libs/form-system/src/lib/decorators/use-component.ts","../../../../libs/form-system/src/lib/decorators/use-data-source.ts","../../../../libs/form-system/src/lib/decorators/use-form-component.ts","../../../../libs/form-system/src/lib/directives/control-hide-show.directive.ts","../../../../libs/form-system/src/lib/directives/input-select-options.directive.ts","../../../../libs/form-system/src/lib/directives/form-directives.module.ts","../../../../libs/form-system/src/lib/validators/is-equal-to.ts","../../../../libs/form-system/src/index.ts","../../../../libs/form-system/src/rxap-form-system.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { RxapError } from '@rxap/utilities';\n\nexport class RxapFormSystemError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/form-system', message, code, className);\n }\n\n}\n","export enum FormSystemMetadataKeys {\n COMPONENTS = 'rxap/form-system/components',\n DATA_SOURCES = 'rxap/form-system/data-sources',\n COMPONENTS_PROPERTIES = 'rxap/form-system/components-properties',\n FORM_COMPONENT = 'rxap/window-form-system/form-component',\n}\n","import { FormDefinition } from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\nimport { FormSystemMetadataKeys } from '../decorators/metadata-keys';\nimport { UseDataSourceValue } from '../decorators/use-data-source';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport class ExtractDataSourcesMixin {\n\n protected extractDataSources(formDefinition: FormDefinition, controlId: string): Map<string, UseDataSourceValue> {\n const map = getMetadata<Map<string, Map<string, UseDataSourceValue>>>(\n FormSystemMetadataKeys.DATA_SOURCES,\n Object.getPrototypeOf(formDefinition)\n );\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');\n }\n\n if (!map.has(controlId)) {\n throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');\n }\n\n return map.get(controlId)!;\n }\n\n}\n","import {\n Input,\n Inject,\n OnInit,\n ComponentFactoryResolver,\n ViewContainerRef,\n Directive,\n ComponentRef,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n Required,\n Constructor\n} from '@rxap/utilities';\nimport {\n ControlContainer,\n ControlValueAccessor\n} from '@angular/forms';\nimport { RxapFormSystemError } from './error';\nimport {\n RxapFormControl,\n FormDefinition\n} from '@rxap/forms';\nimport { FormSystemMetadataKeys } from './decorators/metadata-keys';\nimport { ControlWithDataSource } from './control-with-data-source';\nimport {\n DataSourceLoader,\n PipeDataSource\n} from '@rxap/data-source';\nimport { Mixin } from '@rxap/mixin';\nimport { ExtractDataSourcesMixin } from './mixins/extract-data-sources.mixin';\nimport { map } from 'rxjs/operators';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport interface FormSystemControlDirective<T> extends ExtractDataSourcesMixin, ControlValueAccessor, OnInit {}\n\n@Mixin(ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapFormSystemControl]'\n})\nexport class FormSystemControlDirective<T> implements ControlValueAccessor, OnInit {\n\n /**\n * Defines the form control id\n */\n @Input()\n @Required\n public controlId!: string;\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected componentRef!: ComponentRef<ControlValueAccessor & Partial<ControlWithDataSource>>;\n\n constructor(\n @Inject(ControlContainer)\n private readonly parent: ControlContainer,\n @Inject(ComponentFactoryResolver)\n private readonly cfr: ComponentFactoryResolver,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(DataSourceLoader)\n private readonly dataSourceLoader: DataSourceLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector\n ) {}\n\n public ngOnInit() {\n\n this.control = this.extractControl();\n\n const formDefinition = this.extractFormDefinition();\n\n this.componentRef = this.createComponent(formDefinition);\n\n this.setDataSources(formDefinition, this.componentRef.instance);\n this.setComponentProperties(formDefinition, this.componentRef.instance);\n\n this.viewContainerRef.insert(this.componentRef.hostView);\n\n }\n\n public registerOnChange(fn: (value: (any | null)) => void): void {\n this.componentRef.instance.registerOnChange(fn);\n }\n\n public registerOnTouched(fn: () => void): void {\n this.componentRef.instance.registerOnTouched(fn);\n }\n\n public writeValue(value: any): void {\n this.componentRef.instance.writeValue(value);\n }\n\n public setDisabledState(isDisabled: boolean): void {\n if (this.componentRef.instance.setDisabledState) {\n this.componentRef.instance.setDisabledState(isDisabled);\n }\n }\n\n private setDataSources(formDefinition: FormDefinition, component: Partial<ControlWithDataSource>): void {\n\n if (!component.setDataSource) {\n throw new RxapFormSystemError(\n 'The ControlWithDataSource interface is not implemented for the control component, but the control has defined data sources',\n ''\n );\n }\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, this.controlId);\n\n for (const [ name, useDataSourceValue ] of useDataSourceValueMap.entries()) {\n\n let dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource);\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n component.setDataSource(name, dataSource, useDataSourceValue.settings);\n\n }\n\n }\n\n private setComponentProperties(formDefinition: FormDefinition, component: any) {\n const componentProperties = this.extractComponentProperties(formDefinition);\n\n for (const [ key, value ] of Object.entries(componentProperties)) {\n Reflect.set(component, key, value);\n }\n\n }\n\n private createComponent(formDefinition: FormDefinition): ComponentRef<ControlValueAccessor> {\n const component = this.extractComponent(formDefinition);\n const componentFactory = this.cfr.resolveComponentFactory(component);\n return componentFactory.create(this.injector);\n }\n\n private extractControl(): RxapFormControl {\n if (!this.parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = this.parent.control.get(this.controlId);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n private extractFormDefinition(): FormDefinition {\n const formDefinition = (this.control as any).rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n private extractComponent(formDefinition: FormDefinition): Constructor<ControlValueAccessor> {\n const map = getMetadata<Map<string, Constructor<ControlValueAccessor>>>(FormSystemMetadataKeys.COMPONENTS, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n private extractComponentProperties(formDefinition: FormDefinition): Record<string, any> {\n const map = getMetadata<Map<string, Record<string, any>>>(FormSystemMetadataKeys.COMPONENTS_PROPERTIES, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component properties map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { FormSystemControlDirective } from './form-system-control.directive';\n\n\n@NgModule({\n declarations: [ FormSystemControlDirective ],\n exports: [ FormSystemControlDirective ],\n imports: []\n})\nexport class FormSystemModule {}\n","import {\n BaseDataSource,\n BaseDataSourceMetadata,\n RXAP_DATA_SOURCE_METADATA,\n} from '@rxap/data-source';\nimport { Injectable, Inject, InjectionToken, Optional } from '@angular/core';\nimport { AbstractControl } from '@rxap/forms';\nimport { startWith, shareReplay, distinctUntilChanged } from 'rxjs/operators';\nimport { equals } from '@rxap/utilities';\n\nexport const RXAP_FORM_CONTROL_SOURCE = new InjectionToken(\n 'rxap/forms/data-source'\n);\n\n@Injectable()\nexport class ControlDataSource extends BaseDataSource {\n constructor(\n @Inject(RXAP_FORM_CONTROL_SOURCE)\n private readonly control: AbstractControl,\n @Optional()\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: BaseDataSourceMetadata | null = null\n ) {\n super(metadata);\n }\n\n public init() {\n if (this._initialised) {\n return;\n }\n super.init();\n\n console.log(this.control);\n\n this._data$ = this.control.valueChanges.pipe(\n startWith(this.control.value),\n distinctUntilChanged((a, b) => equals(a, b)),\n shareReplay(1)\n );\n }\n}\n\nexport function controlDataSource(control: AbstractControl): ControlDataSource {\n // TODO : remove as any (wait for @rxap/forms update)\n return new ControlDataSource(control, { id: (control as any).controlId });\n}\n","import { ControlContainer } from '@angular/forms';\nimport {\n RxapFormControl,\n AbstractControl,\n RxapFormGroup,\n RxapFormArray,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractControlMixin {\n\n protected extractControl(parent: ControlContainer, controlPath: string): AbstractControl {\n if (!controlPath) {\n throw new RxapFormSystemError('The control path is empty', '');\n }\n\n if (!parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = parent.control.get(controlPath);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl) && !(control instanceof RxapFormGroup) && !(control instanceof RxapFormArray)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n}\n","import {\n FormDefinition,\n AbstractControl,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractFormDefinitionMixin {\n\n // TODO : change to AbstractControl from @rxap/forms\n protected extractFormDefinition(control: AbstractControl): FormDefinition {\n const formDefinition = control.rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { setMetadataMap } from '@rxap/utilities/reflect-metadata';\n\nexport function UseComponent<Component extends ControlValueAccessor>(\n component: Constructor<Component>,\n setProperties: Partial<Record<keyof Component, any>> = {}\n) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, component, FormSystemMetadataKeys.COMPONENTS, target);\n setMetadataMap(propertyKey, setProperties, FormSystemMetadataKeys.COMPONENTS_PROPERTIES, target);\n };\n}\n","import { BaseDataSource } from '@rxap/data-source';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { setMetadataMapMap } from '@rxap/utilities/reflect-metadata';\n\nexport interface UseDataSourceSettings<Source = any, Target = any> {\n transformer: (source: Source) => Target;\n}\n\nexport interface UseDataSourceValue<Source = any, Target = any> {\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: UseDataSourceSettings<Source, Target>,\n}\n\nexport function UseDataSource<Data>(dataSource: IdOrInstanceOrToken<BaseDataSource<Data>>, name: string, settings?: UseDataSourceSettings) {\n return function(target: any, propertyKey: string) {\n const value: UseDataSourceValue<Data> = { dataSource, settings };\n setMetadataMapMap(propertyKey, name, value, FormSystemMetadataKeys.DATA_SOURCES, target);\n };\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { setMetadata } from '@rxap/utilities/reflect-metadata';\n\n/**\n * Links a component with a form definition\n *\n * @param component\n */\nexport function UseFormComponent(component: Constructor) {\n return function (target: any) {\n setMetadata(FormSystemMetadataKeys.FORM_COMPONENT, component, target);\n };\n}\n","import {\n Directive,\n Input,\n Inject,\n OnInit,\n Renderer2,\n ElementRef,\n OnDestroy,\n NgModule,\n Optional,\n Self\n} from '@angular/core';\nimport {\n FormDefinition,\n AbstractControl,\n RxapFormControl\n} from '@rxap/forms';\nimport {\n ControlContainer,\n NgControl\n} from '@angular/forms';\nimport { Mixin } from '@rxap/mixin';\nimport {\n Subscription,\n of\n} from 'rxjs';\nimport {\n tap,\n startWith,\n catchError\n} from 'rxjs/operators';\nimport { ExtractControlMixin } from '../mixins/extract-control.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n setMetadataMap,\n getMetadata\n} from '@rxap/utilities/reflect-metadata';\n\nexport const RXAP_FORM_SYSTEM_SHOW_METADATA = 'rxap/form-system/show-function';\nexport const RXAP_FORM_SYSTEM_HIDE_METADATA = 'rxap/form-system/hide-function';\nexport const RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS = 'rxap/form-system/hide-show-options';\n\nexport type ControlHideShowFunction<T = any> = (this: T, control: AbstractControl) => boolean | null;\n\nexport interface ControlHideShowOptions {\n /**\n * Weather the hide/showFunction should be called on root group changes\n */\n rootChange?: boolean;\n}\n\nexport function UseHideFunction(hideFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, hideFunction, RXAP_FORM_SYSTEM_HIDE_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport function UseShowFunction(showFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, showFunction, RXAP_FORM_SYSTEM_SHOW_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport interface ControlHideShowDirective extends ExtractControlMixin,\n ExtractFormDefinitionMixin {}\n\n@Mixin(ExtractControlMixin, ExtractFormDefinitionMixin)\n@Directive({\n selector: '[rxapControlHideShow]'\n})\nexport class ControlHideShowDirective implements OnInit, OnDestroy {\n\n @Input('rxapControlHideShow')\n public controlId?: string;\n\n public control!: RxapFormControl;\n\n private subscription = new Subscription();\n\n constructor(\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef,\n @Optional()\n @Inject(ControlContainer)\n private readonly parent: ControlContainer | null,\n @Self()\n @Optional()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null\n ) { }\n\n public ngOnInit() {\n\n if (!this.ngControl && !this.parent) {\n throw new Error('Easier the ControlContainer or NgControl must be injectable');\n }\n\n if (!this.ngControl && !this.controlId) {\n throw new Error('If the NgControl is not injectable then the control id must be defined!');\n }\n\n const control = this.ngControl?.control ?? this.extractControl(this.parent!, this.controlId!);\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The control is not an instance of RxapFormControl');\n }\n\n this.control = control;\n\n const formDefinition = this.extractFormDefinition(control);\n\n const hideFunction = this.extractHideFunction(formDefinition);\n\n const showFunction = this.extractShowFunction(formDefinition);\n\n const options = this.extractOptions(formDefinition);\n\n let changeTrigger = formDefinition.rxapFormGroup.valueChanges;\n\n if (options.rootChange) {\n changeTrigger = formDefinition.rxapFormGroup.root.valueChanges;\n }\n\n changeTrigger = changeTrigger.pipe(startWith(null));\n\n if (showFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the showFunction throws an error\n const show = showFunction.call(formDefinition, control);\n\n switch (show) {\n\n case true:\n this.show();\n break;\n\n case false:\n this.hide();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n if (hideFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the hideFunction throws an error\n const hide = hideFunction.call(formDefinition, control);\n\n switch (hide) {\n\n case true:\n this.hide();\n break;\n\n case false:\n this.show();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n }\n\n public ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private extractOptions(formDefinition: FormDefinition): ControlHideShowOptions {\n const map = getMetadata<Map<string, ControlHideShowOptions>>(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return {};\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractHideFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractShowFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private hide() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');\n }\n\n private show() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'block');\n }\n\n private reset() {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'display');\n }\n\n\n}\n\n@NgModule({\n declarations: [ ControlHideShowDirective ],\n exports: [ ControlHideShowDirective ]\n})\nexport class ControlHideShowDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n OnInit,\n Inject,\n ViewContainerRef,\n Input,\n OnDestroy,\n Injector,\n INJECTOR,\n Optional,\n ChangeDetectorRef,\n NgModule,\n isDevMode\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport {\n DataSourceLoader,\n BaseDataSource,\n BaseDataSourceViewer,\n BaseDataSourceMetadata,\n PipeDataSource\n} from '@rxap/data-source';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n ControlOptions,\n ControlOption,\n Required\n} from '@rxap/utilities';\nimport { Mixin } from '@rxap/mixin';\nimport { Subscription } from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n UseDataSource,\n UseDataSourceSettings\n} from '../decorators/use-data-source';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\nexport interface InputSelectOptionsTemplateContext {\n $implicit: ControlOption;\n}\n\nexport interface InputSelectOptionsSettings<Source> extends UseDataSourceSettings<Source, ControlOptions | Record<string, any>> {}\n\n\nexport const DATA_SOURCE_NAME = 'options';\n\nexport function ComposeOptionsTransformers(...fnc: Array<(value: any) => any>): (value: any) => any {\n return base => fnc.reduce((source, transform) => transform(source), base);\n}\n\n// tslint:disable-next-line:max-line-length\nexport function UseOptionsDataSource<Source>(\n dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>,\n settings?: InputSelectOptionsSettings<Source>\n): (\n target: any,\n propertyKey: string\n) => any;\nexport function UseOptionsDataSource(\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: InputSelectOptionsSettings<ControlOptions>\n) {\n return function(target: any, propertyKey: string) {\n UseDataSource(dataSource, DATA_SOURCE_NAME, settings)(target, propertyKey);\n };\n}\n\nexport interface InputSelectOptionsDirective extends OnInit,\n ExtractFormDefinitionMixin,\n ExtractDataSourcesMixin {}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapInputSelectOptions]'\n})\nexport class InputSelectOptionsDirective implements OnInit, OnDestroy {\n\n @Input('rxapInputSelectOptionsViewer')\n public viewer: BaseDataSourceViewer = { id: '[rxapInputSelectOptions]' };\n\n @Input('rxapInputSelectOptionsMetadata')\n public metadata?: BaseDataSourceMetadata;\n\n protected readonly subscription = new Subscription();\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n @Required\n protected options!: ControlOptions | Record<string, any> | null;\n\n constructor(\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n // The ngControl could be unknown on construction\n // bc it is available after the content is init\n @Optional()\n @Inject(NgControl)\n protected ngControl: NgControl | null = null\n ) { }\n\n protected extractControl(ngControl: NgControl | null = this.ngControl): RxapFormControl {\n\n if (!ngControl) {\n throw new Error('The ngControl is not defined!');\n }\n\n this.ngControl = ngControl;\n\n const control = this.ngControl.control;\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('Control is not a RxapFormControl!');\n }\n\n return this.control = control;\n }\n\n protected extractDatasource(control: RxapFormControl = this.control): BaseDataSource<ControlOptions | Record<string, any>> {\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(DATA_SOURCE_NAME)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n const useDataSourceValue = useDataSourceValueMap.get(DATA_SOURCE_NAME)!;\n\n let dataSource: BaseDataSource;\n\n try {\n\n dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector\n );\n\n } catch (e) {\n\n if (e.name && e.name === 'NullInjectorError') {\n if (isDevMode()) {\n console.error('Cloud not inject the options data source', useDataSourceValue);\n }\n throw new Error('Cloud not inject the options data source:\\n' + e.message);\n }\n\n throw e;\n\n }\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n public ngOnInit() {\n this.extractControl();\n this.extractDatasource();\n this.loadOptions();\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n private loadOptions(dataSource: BaseDataSource<ControlOptions | Record<string, any>> = this.dataSource) {\n this.subscription.add(dataSource.connect(this.viewer).pipe(\n tap(options => this.renderTemplate(this.options = options))\n ).subscribe());\n }\n\n protected renderTemplate(options: ControlOptions | Record<string, any> | null = this.options) {\n this.viewContainerRef.clear();\n\n if (options) {\n if (!Array.isArray(options)) {\n\n for (const [ value, display ] of Object.entries(options)) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value, display } });\n }\n\n } else {\n\n for (const option of options) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });\n }\n\n }\n } else {\n if (isDevMode()) {\n console.warn(`The options for the control ${this.control.fullControlPath} is empty/null/undefined!`);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n}\n\n@NgModule({\n declarations: [ InputSelectOptionsDirective ],\n exports: [ InputSelectOptionsDirective ]\n})\nexport class InputSelectOptionsDirectiveModule {}\n","import { NgModule } from '@angular/core';\nimport { InputSelectOptionsDirectiveModule } from './input-select-options.directive';\nimport { ControlHideShowDirectiveModule } from './control-hide-show.directive';\n\n@NgModule({\n exports: [\n InputSelectOptionsDirectiveModule,\n ControlHideShowDirectiveModule\n ]\n})\nexport class FormSystemDirectivesModule {}\n","import {\n Directive,\n forwardRef,\n Input,\n NgModule\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { Required } from '@rxap/utilities';\n\n@Directive({\n selector: '[rxapIsEqualTo]',\n providers: [\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: forwardRef(() => IsEqualToDirective)\n }\n ]\n})\nexport class IsEqualToDirective implements Validator {\n\n @Input('rxapIsEqualTo')\n @Required\n public set equalTo(value: any) {\n this._equalTo = value;\n if (this._onChange) {\n this._onChange();\n }\n }\n\n private _onChange!: () => void;\n\n\n private _equalTo!: any;\n\n public validate(control: AbstractControl): ValidationErrors | null {\n if (this._equalTo === null || this._equalTo === control.value) {\n return null;\n }\n return { isEqualTo: { value: this._equalTo, actualValue: control.value } };\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n public registerOnValidatorChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n}\n\n@NgModule({\n declarations: [ IsEqualToDirective ],\n exports: [ IsEqualToDirective ]\n})\nexport class IsEqualToDirectiveModule {\n}\n","export * from './lib/form-system.module';\n\nexport * from './lib/error';\nexport * from './lib/control-data-source';\n\n// region mixin\n\nexport * from './lib/mixins/extract-data-sources.mixin';\nexport * from './lib/mixins/extract-control.mixin';\nexport * from './lib/mixins/extract-form-definition.mixin';\n\n// endregion\n\n// region components\n\nexport * from './lib/form-system-control.directive';\n\n\n// endregion\n\n// region decorators\n\nexport * from './lib/decorators/metadata-keys';\nexport * from './lib/decorators/use-component';\nexport * from './lib/decorators/use-data-source';\nexport * from './lib/decorators/use-form-component';\n\n// endregion\n\n// region directives\n\nexport * from './lib/directives/control-hide-show.directive';\nexport * from './lib/directives/form-directives.module';\nexport * from './lib/directives/input-select-options.directive';\n\n// endregion\n\n// region validators\n\nexport * from './lib/validators/is-equal-to';\n\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["RxapError","FormSystemMetadataKeys","getMetadata","FormSystemControlDirective","PipeDataSource","map","RxapFormControl","ControlContainer","ComponentFactoryResolver","ViewContainerRef","DataSourceLoader","INJECTOR","Required","ComponentRef","Mixin","Injector","Directive","Inject","Input","NgModule","InjectionToken","startWith","distinctUntilChanged","equals","shareReplay","BaseDataSource","RXAP_DATA_SOURCE_METADATA","Injectable","Optional","RxapFormGroup","RxapFormArray","setMetadataMap","setMetadataMapMap","setMetadata","ControlHideShowDirective","Subscription","tap","catchError","of","Renderer2","ElementRef","NgControl","Self","InputSelectOptionsDirective","isDevMode","TemplateRef","ChangeDetectorRef","NG_VALIDATORS","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,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CxB;;;;+IAAa,wBAAwB;gJAAxB,wBAAwB,iBAvCxB,kBAAkB,aAAlB,kBAAkB;gJAuClB,wBAAwB;qHAAxB,wBAAwB;sBAJpCC,WAAQ;uBAAC;wBACR,YAAY,EAAE,CAAE,kBAAkB,CAAE;wBACpC,OAAO,EAAO,CAAE,kBAAkB,CAAE;qBACrC;;;ICrBD;;ICzCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"rxap-form-system.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../libs/form-system/src/lib/error.ts","../../../../libs/form-system/src/lib/decorators/metadata-keys.ts","../../../../libs/form-system/src/lib/mixins/extract-data-sources.mixin.ts","../../../../libs/form-system/src/lib/form-system-control.directive.ts","../../../../libs/form-system/src/lib/form-system.module.ts","../../../../libs/form-system/src/lib/control-data-source.ts","../../../../libs/form-system/src/lib/mixins/extract-control.mixin.ts","../../../../libs/form-system/src/lib/mixins/extract-form-definition.mixin.ts","../../../../libs/form-system/src/lib/decorators/use-component.ts","../../../../libs/form-system/src/lib/decorators/use-data-source.ts","../../../../libs/form-system/src/lib/decorators/use-form-component.ts","../../../../libs/form-system/src/lib/directives/control-hide-show.directive.ts","../../../../libs/form-system/src/lib/directives/input-select-options.directive.ts","../../../../libs/form-system/src/lib/directives/form-directives.module.ts","../../../../libs/form-system/src/lib/validators/is-equal-to.ts","../../../../libs/form-system/src/index.ts","../../../../libs/form-system/src/rxap-form-system.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { RxapError } from '@rxap/utilities';\n\nexport class RxapFormSystemError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/form-system', message, code, className);\n }\n\n}\n","export enum FormSystemMetadataKeys {\n COMPONENTS = 'rxap/form-system/components',\n DATA_SOURCES = 'rxap/form-system/data-sources',\n COMPONENTS_PROPERTIES = 'rxap/form-system/components-properties',\n FORM_COMPONENT = 'rxap/window-form-system/form-component',\n}\n","import { FormDefinition } from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\nimport { FormSystemMetadataKeys } from '../decorators/metadata-keys';\nimport { UseDataSourceValue } from '../decorators/use-data-source';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport class ExtractDataSourcesMixin {\n\n protected extractDataSources(formDefinition: FormDefinition, controlId: string): Map<string, UseDataSourceValue> {\n const map = getMetadata<Map<string, Map<string, UseDataSourceValue>>>(\n FormSystemMetadataKeys.DATA_SOURCES,\n Object.getPrototypeOf(formDefinition)\n );\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');\n }\n\n if (!map.has(controlId)) {\n throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');\n }\n\n return map.get(controlId)!;\n }\n\n}\n","import {\n Input,\n Inject,\n OnInit,\n ComponentFactoryResolver,\n ViewContainerRef,\n Directive,\n ComponentRef,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n Required,\n Constructor\n} from '@rxap/utilities';\nimport {\n ControlContainer,\n ControlValueAccessor\n} from '@angular/forms';\nimport { RxapFormSystemError } from './error';\nimport {\n RxapFormControl,\n FormDefinition\n} from '@rxap/forms';\nimport { FormSystemMetadataKeys } from './decorators/metadata-keys';\nimport { ControlWithDataSource } from './control-with-data-source';\nimport {\n DataSourceLoader,\n PipeDataSource\n} from '@rxap/data-source';\nimport { Mixin } from '@rxap/mixin';\nimport { ExtractDataSourcesMixin } from './mixins/extract-data-sources.mixin';\nimport { map } from 'rxjs/operators';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport interface FormSystemControlDirective<T> extends ExtractDataSourcesMixin, ControlValueAccessor, OnInit {}\n\n@Mixin(ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapFormSystemControl]'\n})\nexport class FormSystemControlDirective<T> implements ControlValueAccessor, OnInit {\n\n /**\n * Defines the form control id\n */\n @Input()\n @Required\n public controlId!: string;\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected componentRef!: ComponentRef<ControlValueAccessor & Partial<ControlWithDataSource>>;\n\n constructor(\n @Inject(ControlContainer)\n private readonly parent: ControlContainer,\n @Inject(ComponentFactoryResolver)\n private readonly cfr: ComponentFactoryResolver,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(DataSourceLoader)\n private readonly dataSourceLoader: DataSourceLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector\n ) {}\n\n public ngOnInit() {\n\n this.control = this.extractControl();\n\n const formDefinition = this.extractFormDefinition();\n\n this.componentRef = this.createComponent(formDefinition);\n\n this.setDataSources(formDefinition, this.componentRef.instance);\n this.setComponentProperties(formDefinition, this.componentRef.instance);\n\n this.viewContainerRef.insert(this.componentRef.hostView);\n\n }\n\n public registerOnChange(fn: (value: (any | null)) => void): void {\n this.componentRef.instance.registerOnChange(fn);\n }\n\n public registerOnTouched(fn: () => void): void {\n this.componentRef.instance.registerOnTouched(fn);\n }\n\n public writeValue(value: any): void {\n this.componentRef.instance.writeValue(value);\n }\n\n public setDisabledState(isDisabled: boolean): void {\n if (this.componentRef.instance.setDisabledState) {\n this.componentRef.instance.setDisabledState(isDisabled);\n }\n }\n\n private setDataSources(formDefinition: FormDefinition, component: Partial<ControlWithDataSource>): void {\n\n if (!component.setDataSource) {\n throw new RxapFormSystemError(\n 'The ControlWithDataSource interface is not implemented for the control component, but the control has defined data sources',\n ''\n );\n }\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, this.controlId);\n\n for (const [ name, useDataSourceValue ] of useDataSourceValueMap.entries()) {\n\n let dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource);\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n component.setDataSource(name, dataSource, useDataSourceValue.settings);\n\n }\n\n }\n\n private setComponentProperties(formDefinition: FormDefinition, component: any) {\n const componentProperties = this.extractComponentProperties(formDefinition);\n\n for (const [ key, value ] of Object.entries(componentProperties)) {\n Reflect.set(component, key, value);\n }\n\n }\n\n private createComponent(formDefinition: FormDefinition): ComponentRef<ControlValueAccessor> {\n const component = this.extractComponent(formDefinition);\n const componentFactory = this.cfr.resolveComponentFactory(component);\n return componentFactory.create(this.injector);\n }\n\n private extractControl(): RxapFormControl {\n if (!this.parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = this.parent.control.get(this.controlId);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n private extractFormDefinition(): FormDefinition {\n const formDefinition = (this.control as any).rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n private extractComponent(formDefinition: FormDefinition): Constructor<ControlValueAccessor> {\n const map = getMetadata<Map<string, Constructor<ControlValueAccessor>>>(FormSystemMetadataKeys.COMPONENTS, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n private extractComponentProperties(formDefinition: FormDefinition): Record<string, any> {\n const map = getMetadata<Map<string, Record<string, any>>>(FormSystemMetadataKeys.COMPONENTS_PROPERTIES, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component properties map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { FormSystemControlDirective } from './form-system-control.directive';\n\n\n@NgModule({\n declarations: [ FormSystemControlDirective ],\n exports: [ FormSystemControlDirective ],\n imports: []\n})\nexport class FormSystemModule {}\n","import {\n BaseDataSource,\n BaseDataSourceMetadata,\n RXAP_DATA_SOURCE_METADATA,\n} from '@rxap/data-source';\nimport { Injectable, Inject, InjectionToken, Optional } from '@angular/core';\nimport { AbstractControl } from '@rxap/forms';\nimport { startWith, shareReplay, distinctUntilChanged } from 'rxjs/operators';\nimport { equals } from '@rxap/utilities';\n\nexport const RXAP_FORM_CONTROL_SOURCE = new InjectionToken(\n 'rxap/forms/data-source'\n);\n\n@Injectable()\nexport class ControlDataSource extends BaseDataSource {\n constructor(\n @Inject(RXAP_FORM_CONTROL_SOURCE)\n private readonly control: AbstractControl,\n @Optional()\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: BaseDataSourceMetadata | null = null\n ) {\n super(metadata);\n }\n\n public init() {\n if (this._initialised) {\n return;\n }\n super.init();\n\n console.log(this.control);\n\n this._data$ = this.control.valueChanges.pipe(\n startWith(this.control.value),\n distinctUntilChanged((a, b) => equals(a, b)),\n shareReplay(1)\n );\n }\n}\n\nexport function controlDataSource(control: AbstractControl): ControlDataSource {\n // TODO : remove as any (wait for @rxap/forms update)\n return new ControlDataSource(control, { id: (control as any).controlId });\n}\n","import { ControlContainer } from '@angular/forms';\nimport {\n RxapFormControl,\n AbstractControl,\n RxapFormGroup,\n RxapFormArray,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractControlMixin {\n\n protected extractControl(parent: ControlContainer, controlPath: string): AbstractControl {\n if (!controlPath) {\n throw new RxapFormSystemError('The control path is empty', '');\n }\n\n if (!parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = parent.control.get(controlPath);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl) && !(control instanceof RxapFormGroup) && !(control instanceof RxapFormArray)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n}\n","import {\n FormDefinition,\n AbstractControl,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractFormDefinitionMixin {\n\n // TODO : change to AbstractControl from @rxap/forms\n protected extractFormDefinition(control: AbstractControl): FormDefinition {\n const formDefinition = control.rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { setMetadataMap } from '@rxap/utilities/reflect-metadata';\n\nexport function UseComponent<Component extends ControlValueAccessor>(\n component: Constructor<Component>,\n setProperties: Partial<Record<keyof Component, any>> = {}\n) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, component, FormSystemMetadataKeys.COMPONENTS, target);\n setMetadataMap(propertyKey, setProperties, FormSystemMetadataKeys.COMPONENTS_PROPERTIES, target);\n };\n}\n","import { BaseDataSource } from '@rxap/data-source';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { setMetadataMapMap } from '@rxap/utilities/reflect-metadata';\n\nexport interface UseDataSourceSettings<Source = any, Target = any> {\n transformer: (source: Source) => Target;\n}\n\nexport interface UseDataSourceValue<Source = any, Target = any> {\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: UseDataSourceSettings<Source, Target>,\n}\n\nexport function UseDataSource<Data>(dataSource: IdOrInstanceOrToken<BaseDataSource<Data>>, name: string, settings?: UseDataSourceSettings) {\n return function(target: any, propertyKey: string) {\n const value: UseDataSourceValue<Data> = { dataSource, settings };\n setMetadataMapMap(propertyKey, name, value, FormSystemMetadataKeys.DATA_SOURCES, target);\n };\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { setMetadata } from '@rxap/utilities/reflect-metadata';\n\n/**\n * Links a component with a form definition\n *\n * @param component\n */\nexport function UseFormComponent(component: Constructor) {\n return function (target: any) {\n setMetadata(FormSystemMetadataKeys.FORM_COMPONENT, component, target);\n };\n}\n","import {\n Directive,\n Input,\n Inject,\n OnInit,\n Renderer2,\n ElementRef,\n OnDestroy,\n NgModule,\n Optional,\n Self\n} from '@angular/core';\nimport {\n FormDefinition,\n AbstractControl,\n RxapFormControl\n} from '@rxap/forms';\nimport {\n ControlContainer,\n NgControl\n} from '@angular/forms';\nimport { Mixin } from '@rxap/mixin';\nimport {\n Subscription,\n of\n} from 'rxjs';\nimport {\n tap,\n startWith,\n catchError\n} from 'rxjs/operators';\nimport { ExtractControlMixin } from '../mixins/extract-control.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n setMetadataMap,\n getMetadata\n} from '@rxap/utilities/reflect-metadata';\n\nexport const RXAP_FORM_SYSTEM_SHOW_METADATA = 'rxap/form-system/show-function';\nexport const RXAP_FORM_SYSTEM_HIDE_METADATA = 'rxap/form-system/hide-function';\nexport const RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS = 'rxap/form-system/hide-show-options';\n\nexport type ControlHideShowFunction<T = any> = (this: T, control: AbstractControl) => boolean | null;\n\nexport interface ControlHideShowOptions {\n /**\n * Weather the hide/showFunction should be called on root group changes\n */\n rootChange?: boolean;\n}\n\nexport function UseHideFunction(hideFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, hideFunction, RXAP_FORM_SYSTEM_HIDE_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport function UseShowFunction(showFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, showFunction, RXAP_FORM_SYSTEM_SHOW_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport interface ControlHideShowDirective extends ExtractControlMixin,\n ExtractFormDefinitionMixin {}\n\n@Mixin(ExtractControlMixin, ExtractFormDefinitionMixin)\n@Directive({\n selector: '[rxapControlHideShow]'\n})\nexport class ControlHideShowDirective implements OnInit, OnDestroy {\n\n @Input('rxapControlHideShow')\n public controlId?: string;\n\n public control!: RxapFormControl;\n\n private subscription = new Subscription();\n\n constructor(\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef,\n @Optional()\n @Inject(ControlContainer)\n private readonly parent: ControlContainer | null,\n @Self()\n @Optional()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null\n ) { }\n\n public ngOnInit() {\n\n if (!this.ngControl && !this.parent) {\n throw new Error('Easier the ControlContainer or NgControl must be injectable');\n }\n\n if (!this.ngControl && !this.controlId) {\n throw new Error('If the NgControl is not injectable then the control id must be defined!');\n }\n\n const control = this.ngControl?.control ?? this.extractControl(this.parent!, this.controlId!);\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The control is not an instance of RxapFormControl');\n }\n\n this.control = control;\n\n const formDefinition = this.extractFormDefinition(control);\n\n const hideFunction = this.extractHideFunction(formDefinition);\n\n const showFunction = this.extractShowFunction(formDefinition);\n\n const options = this.extractOptions(formDefinition);\n\n let changeTrigger = formDefinition.rxapFormGroup.valueChanges;\n\n if (options.rootChange) {\n changeTrigger = formDefinition.rxapFormGroup.root.valueChanges;\n }\n\n changeTrigger = changeTrigger.pipe(startWith(null));\n\n if (showFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the showFunction throws an error\n const show = showFunction.call(formDefinition, control);\n\n switch (show) {\n\n case true:\n this.show();\n break;\n\n case false:\n this.hide();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n if (hideFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the hideFunction throws an error\n const hide = hideFunction.call(formDefinition, control);\n\n switch (hide) {\n\n case true:\n this.hide();\n break;\n\n case false:\n this.show();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n }\n\n public ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private extractOptions(formDefinition: FormDefinition): ControlHideShowOptions {\n const map = getMetadata<Map<string, ControlHideShowOptions>>(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return {};\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractHideFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractShowFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private hide() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');\n }\n\n private show() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'block');\n }\n\n private reset() {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'display');\n }\n\n\n}\n\n@NgModule({\n declarations: [ ControlHideShowDirective ],\n exports: [ ControlHideShowDirective ]\n})\nexport class ControlHideShowDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n OnInit,\n Inject,\n ViewContainerRef,\n Input,\n OnDestroy,\n Injector,\n INJECTOR,\n Optional,\n ChangeDetectorRef,\n NgModule,\n isDevMode,\n AfterViewInit\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport {\n DataSourceLoader,\n BaseDataSource,\n BaseDataSourceViewer,\n BaseDataSourceMetadata,\n PipeDataSource\n} from '@rxap/data-source';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n ControlOptions,\n ControlOption,\n Required\n} from '@rxap/utilities';\nimport { Mixin } from '@rxap/mixin';\nimport { Subscription } from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n UseDataSource,\n UseDataSourceSettings\n} from '../decorators/use-data-source';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport {\n MAT_FORM_FIELD,\n MatFormField\n} from '@angular/material/form-field';\nimport { MatAutocomplete } from '@angular/material/autocomplete';\n\nexport interface InputSelectOptionsTemplateContext {\n $implicit: ControlOption;\n}\n\nexport interface InputSelectOptionsSettings<Source> extends UseDataSourceSettings<Source, ControlOptions | Record<string, any>> {}\n\n\nexport const DATA_SOURCE_NAME = 'options';\n\nexport function ComposeOptionsTransformers(...fnc: Array<(value: any) => any>): (value: any) => any {\n return base => fnc.reduce((source, transform) => transform(source), base);\n}\n\n// tslint:disable-next-line:max-line-length\nexport function UseOptionsDataSource<Source>(\n dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>,\n settings?: InputSelectOptionsSettings<Source>\n): (\n target: any,\n propertyKey: string\n) => any;\nexport function UseOptionsDataSource(\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: InputSelectOptionsSettings<ControlOptions>\n) {\n return function(target: any, propertyKey: string) {\n UseDataSource(dataSource, DATA_SOURCE_NAME, settings)(target, propertyKey);\n };\n}\n\nexport interface InputSelectOptionsDirective extends OnInit,\n ExtractFormDefinitionMixin,\n ExtractDataSourcesMixin {}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapInputSelectOptions]'\n})\nexport class InputSelectOptionsDirective implements OnDestroy, AfterViewInit {\n\n @Input('rxapInputSelectOptionsViewer')\n public viewer: BaseDataSourceViewer = { id: '[rxapInputSelectOptions]' };\n\n @Input('rxapInputSelectOptionsMetadata')\n public metadata?: BaseDataSourceMetadata;\n\n @Input('rxapInputSelectOptionsMatAutocomplete')\n public matAutocomplete?: MatAutocomplete;\n\n protected readonly subscription = new Subscription();\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n @Required\n protected options!: ControlOptions | Record<string, any> | null;\n\n constructor(\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n // The ngControl could be unknown on construction\n // bc it is available after the content is init\n @Optional()\n @Inject(NgControl)\n protected ngControl: NgControl | null = null,\n @Optional()\n @Inject(MAT_FORM_FIELD)\n protected matFormField: MatFormField | null = null,\n ) { }\n\n public ngAfterViewInit() {\n this.extractControl();\n this.extractDatasource();\n this.viewer = {\n id: '[rxapInputSelectOptions]' + this.control.controlId,\n viewChange: this.control.value$,\n control: this.control,\n }\n this.loadOptions();\n if (this.matAutocomplete) {\n this.matAutocomplete.displayWith = this.toDisplay.bind(this);\n }\n }\n\n protected extractDatasource(control: RxapFormControl = this.control): BaseDataSource<ControlOptions | Record<string, any>> {\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(DATA_SOURCE_NAME)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n const useDataSourceValue = useDataSourceValueMap.get(DATA_SOURCE_NAME)!;\n\n let dataSource: BaseDataSource;\n\n try {\n\n dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector\n );\n\n } catch (e) {\n\n if (e.name && e.name === 'NullInjectorError') {\n if (isDevMode()) {\n console.error('Cloud not inject the options data source', useDataSourceValue);\n }\n throw new Error('Cloud not inject the options data source:\\n' + e.message);\n }\n\n throw e;\n\n }\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n public toDisplay(value: any): string {\n if (!value) {\n return '';\n }\n return this.options?.find((option: any) => option.value === value)?.display ?? 'to display error';\n }\n\n protected extractControl(ngControl: NgControl | null = this.ngControl ?? this.matFormField?._control?.ngControl ?? null): RxapFormControl {\n\n if (!ngControl) {\n throw new Error('The ngControl is not defined!');\n }\n\n this.ngControl = ngControl;\n\n const control = this.ngControl.control;\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('Control is not a RxapFormControl!');\n }\n\n return this.control = control;\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n private loadOptions(dataSource: BaseDataSource<ControlOptions | Record<string, any>> = this.dataSource) {\n this.subscription.add(dataSource.connect(this.viewer).pipe(\n tap(options => this.renderTemplate(this.options = options))\n ).subscribe());\n }\n\n protected renderTemplate(options: ControlOptions | Record<string, any> | null = this.options) {\n this.viewContainerRef.clear();\n\n if (options) {\n if (!Array.isArray(options)) {\n\n for (const [ value, display ] of Object.entries(options)) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value, display } });\n }\n\n } else {\n\n for (const option of options) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });\n }\n\n }\n } else {\n if (isDevMode()) {\n console.warn(`The options for the control ${this.control.fullControlPath} is empty/null/undefined!`);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n}\n\n@NgModule({\n declarations: [ InputSelectOptionsDirective ],\n exports: [ InputSelectOptionsDirective ]\n})\nexport class InputSelectOptionsDirectiveModule {}\n","import { NgModule } from '@angular/core';\nimport { InputSelectOptionsDirectiveModule } from './input-select-options.directive';\nimport { ControlHideShowDirectiveModule } from './control-hide-show.directive';\n\n@NgModule({\n exports: [\n InputSelectOptionsDirectiveModule,\n ControlHideShowDirectiveModule\n ]\n})\nexport class FormSystemDirectivesModule {}\n","import {\n Directive,\n forwardRef,\n Input,\n NgModule\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { Required } from '@rxap/utilities';\n\n@Directive({\n selector: '[rxapIsEqualTo]',\n providers: [\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: forwardRef(() => IsEqualToDirective)\n }\n ]\n})\nexport class IsEqualToDirective implements Validator {\n\n @Input('rxapIsEqualTo')\n @Required\n public set equalTo(value: any) {\n this._equalTo = value;\n if (this._onChange) {\n this._onChange();\n }\n }\n\n private _onChange!: () => void;\n\n\n private _equalTo!: any;\n\n public validate(control: AbstractControl): ValidationErrors | null {\n if (this._equalTo === null || this._equalTo === control.value) {\n return null;\n }\n return { isEqualTo: { value: this._equalTo, actualValue: control.value } };\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n public registerOnValidatorChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n}\n\n@NgModule({\n declarations: [ IsEqualToDirective ],\n exports: [ IsEqualToDirective ]\n})\nexport class IsEqualToDirectiveModule {\n}\n","export * from './lib/form-system.module';\n\nexport * from './lib/error';\nexport * from './lib/control-data-source';\n\n// region mixin\n\nexport * from './lib/mixins/extract-data-sources.mixin';\nexport * from './lib/mixins/extract-control.mixin';\nexport * from './lib/mixins/extract-form-definition.mixin';\n\n// endregion\n\n// region components\n\nexport * from './lib/form-system-control.directive';\n\n\n// endregion\n\n// region decorators\n\nexport * from './lib/decorators/metadata-keys';\nexport * from './lib/decorators/use-component';\nexport * from './lib/decorators/use-data-source';\nexport * from './lib/decorators/use-form-component';\n\n// endregion\n\n// region directives\n\nexport * from './lib/directives/control-hide-show.directive';\nexport * from './lib/directives/form-directives.module';\nexport * from './lib/directives/input-select-options.directive';\n\n// endregion\n\n// region validators\n\nexport * from './lib/validators/is-equal-to';\n\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["RxapError","FormSystemMetadataKeys","getMetadata","FormSystemControlDirective","PipeDataSource","map","RxapFormControl","ControlContainer","ComponentFactoryResolver","ViewContainerRef","DataSourceLoader","INJECTOR","Required","ComponentRef","Mixin","Injector","Directive","Inject","Input","NgModule","InjectionToken","startWith","distinctUntilChanged","equals","shareReplay","BaseDataSource","RXAP_DATA_SOURCE_METADATA","Injectable","Optional","RxapFormGroup","RxapFormArray","setMetadataMap","setMetadataMapMap","setMetadata","ControlHideShowDirective","Subscription","tap","catchError","of","Renderer2","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B,WAAW,EAAEC,aAAU,CAAC,uCAAwB,GAAA,CAAC;6BAClD;yBACF;qBACF;kCAKY,OAAO;0BAFjB/B,QAAK;2BAAC,eAAe;;;QAqCxB;;;;+IAAa,wBAAwB;gJAAxB,wBAAwB,iBAvCxB,kBAAkB,aAAlB,kBAAkB;gJAuClB,wBAAwB;qHAAxB,wBAAwB;sBAJpCC,WAAQ;uBAAC;wBACR,YAAY,EAAE,CAAE,kBAAkB,CAAE;wBACpC,OAAO,EAAO,CAAE,kBAAkB,CAAE;qBACrC;;;ICrBD;;ICzCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -10,9 +10,12 @@ import { tap, map } from 'rxjs/operators';
10
10
  import { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';
11
11
  import { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';
12
12
  import { UseDataSource } from '../decorators/use-data-source';
13
+ import { MAT_FORM_FIELD } from '@angular/material/form-field';
14
+ import { MatAutocomplete } from '@angular/material/autocomplete';
13
15
  import * as i0 from "@angular/core";
14
16
  import * as i1 from "@rxap/data-source";
15
17
  import * as i2 from "@angular/forms";
18
+ import * as i3 from "@angular/material/form-field";
16
19
  export const DATA_SOURCE_NAME = 'options';
17
20
  export function ComposeOptionsTransformers(...fnc) {
18
21
  return base => fnc.reduce((source, transform) => transform(source), base);
@@ -26,26 +29,29 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
26
29
  constructor(template, dataSourceLoader, viewContainerRef, injector, cdr,
27
30
  // The ngControl could be unknown on construction
28
31
  // bc it is available after the content is init
29
- ngControl = null) {
32
+ ngControl = null, matFormField = null) {
30
33
  this.template = template;
31
34
  this.dataSourceLoader = dataSourceLoader;
32
35
  this.viewContainerRef = viewContainerRef;
33
36
  this.injector = injector;
34
37
  this.cdr = cdr;
35
38
  this.ngControl = ngControl;
39
+ this.matFormField = matFormField;
36
40
  this.viewer = { id: '[rxapInputSelectOptions]' };
37
41
  this.subscription = new Subscription();
38
42
  }
39
- extractControl(ngControl = this.ngControl) {
40
- if (!ngControl) {
41
- throw new Error('The ngControl is not defined!');
42
- }
43
- this.ngControl = ngControl;
44
- const control = this.ngControl.control;
45
- if (!(control instanceof RxapFormControl)) {
46
- throw new Error('Control is not a RxapFormControl!');
43
+ ngAfterViewInit() {
44
+ this.extractControl();
45
+ this.extractDatasource();
46
+ this.viewer = {
47
+ id: '[rxapInputSelectOptions]' + this.control.controlId,
48
+ viewChange: this.control.value$,
49
+ control: this.control,
50
+ };
51
+ this.loadOptions();
52
+ if (this.matAutocomplete) {
53
+ this.matAutocomplete.displayWith = this.toDisplay.bind(this);
47
54
  }
48
- return this.control = control;
49
55
  }
50
56
  extractDatasource(control = this.control) {
51
57
  const formDefinition = this.extractFormDefinition(control);
@@ -73,10 +79,25 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
73
79
  }
74
80
  return this.dataSource = dataSource;
75
81
  }
76
- ngOnInit() {
77
- this.extractControl();
78
- this.extractDatasource();
79
- this.loadOptions();
82
+ toDisplay(value) {
83
+ var _a, _b, _c;
84
+ if (!value) {
85
+ return '';
86
+ }
87
+ return (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => option.value === value)) === null || _b === void 0 ? void 0 : _b.display) !== null && _c !== void 0 ? _c : 'to display error';
88
+ }
89
+ extractControl(ngControl) {
90
+ var _a, _b, _c, _d;
91
+ if (ngControl === void 0) { ngControl = (_d = (_a = this.ngControl) !== null && _a !== void 0 ? _a : (_c = (_b = this.matFormField) === null || _b === void 0 ? void 0 : _b._control) === null || _c === void 0 ? void 0 : _c.ngControl) !== null && _d !== void 0 ? _d : null; }
92
+ if (!ngControl) {
93
+ throw new Error('The ngControl is not defined!');
94
+ }
95
+ this.ngControl = ngControl;
96
+ const control = this.ngControl.control;
97
+ if (!(control instanceof RxapFormControl)) {
98
+ throw new Error('Control is not a RxapFormControl!');
99
+ }
100
+ return this.control = control;
80
101
  }
81
102
  ngOnDestroy() {
82
103
  var _a;
@@ -107,8 +128,8 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
107
128
  this.cdr.detectChanges();
108
129
  }
109
130
  };
110
- InputSelectOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputSelectOptionsDirective, deps: [{ token: TemplateRef }, { token: DataSourceLoader }, { token: ViewContainerRef }, { token: INJECTOR }, { token: ChangeDetectorRef }, { token: NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
111
- InputSelectOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: InputSelectOptionsDirective, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"] }, ngImport: i0 });
131
+ InputSelectOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputSelectOptionsDirective, deps: [{ token: TemplateRef }, { token: DataSourceLoader }, { token: ViewContainerRef }, { token: INJECTOR }, { token: ChangeDetectorRef }, { token: NgControl, optional: true }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
132
+ InputSelectOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: InputSelectOptionsDirective, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"], matAutocomplete: ["rxapInputSelectOptionsMatAutocomplete", "matAutocomplete"] }, ngImport: i0 });
112
133
  __decorate([
113
134
  Required,
114
135
  __metadata("design:type", RxapFormControl)
@@ -127,7 +148,7 @@ InputSelectOptionsDirective = __decorate([
127
148
  DataSourceLoader,
128
149
  ViewContainerRef,
129
150
  Injector,
130
- ChangeDetectorRef, Object])
151
+ ChangeDetectorRef, Object, Object])
131
152
  ], InputSelectOptionsDirective);
132
153
  export { InputSelectOptionsDirective };
133
154
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputSelectOptionsDirective, decorators: [{
@@ -155,12 +176,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
155
176
  }, {
156
177
  type: Inject,
157
178
  args: [NgControl]
179
+ }] }, { type: i3.MatFormField, decorators: [{
180
+ type: Optional
181
+ }, {
182
+ type: Inject,
183
+ args: [MAT_FORM_FIELD]
158
184
  }] }]; }, propDecorators: { viewer: [{
159
185
  type: Input,
160
186
  args: ['rxapInputSelectOptionsViewer']
161
187
  }], metadata: [{
162
188
  type: Input,
163
189
  args: ['rxapInputSelectOptionsMetadata']
190
+ }], matAutocomplete: [{
191
+ type: Input,
192
+ args: ['rxapInputSelectOptionsMatAutocomplete']
164
193
  }], control: [], dataSource: [], options: [] } });
165
194
  export class InputSelectOptionsDirectiveModule {
166
195
  }
@@ -1 +1 @@
1
- {"version":3,"file":"input-select-options.directive.js","sourceRoot":"","sources":["../../../../../../libs/form-system/src/lib/directives/input-select-options.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEX,MAAM,EACN,gBAAgB,EAChB,KAAK,EAEL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,cAAc,EAGd,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAGL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM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B,MAAM,OAAO,iCAAiC;;8HAAjC,iCAAiC;+HAAjC,iCAAiC,iBAjJjC,2BAA2B,aAA3B,2BAA2B;+HAiJ3B,iCAAiC;2FAAjC,iCAAiC;kBAJ7C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,2BAA2B,CAAE;oBAC7C,OAAO,EAAO,CAAE,2BAA2B,CAAE;iBAC9C","sourcesContent":["import {\n Directive,\n TemplateRef,\n OnInit,\n Inject,\n ViewContainerRef,\n Input,\n OnDestroy,\n Injector,\n INJECTOR,\n Optional,\n ChangeDetectorRef,\n NgModule,\n isDevMode\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport {\n DataSourceLoader,\n BaseDataSource,\n BaseDataSourceViewer,\n BaseDataSourceMetadata,\n PipeDataSource\n} from '@rxap/data-source';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n ControlOptions,\n ControlOption,\n Required\n} from '@rxap/utilities';\nimport { Mixin } from '@rxap/mixin';\nimport { Subscription } from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n UseDataSource,\n UseDataSourceSettings\n} from '../decorators/use-data-source';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\nexport interface InputSelectOptionsTemplateContext {\n $implicit: ControlOption;\n}\n\nexport interface InputSelectOptionsSettings<Source> extends UseDataSourceSettings<Source, ControlOptions | Record<string, any>> {}\n\n\nexport const DATA_SOURCE_NAME = 'options';\n\nexport function ComposeOptionsTransformers(...fnc: Array<(value: any) => any>): (value: any) => any {\n return base => fnc.reduce((source, transform) => transform(source), base);\n}\n\n// tslint:disable-next-line:max-line-length\nexport function UseOptionsDataSource<Source>(\n dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>,\n settings?: InputSelectOptionsSettings<Source>\n): (\n target: any,\n propertyKey: string\n) => any;\nexport function UseOptionsDataSource(\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: InputSelectOptionsSettings<ControlOptions>\n) {\n return function(target: any, propertyKey: string) {\n UseDataSource(dataSource, DATA_SOURCE_NAME, settings)(target, propertyKey);\n };\n}\n\nexport interface InputSelectOptionsDirective extends OnInit,\n ExtractFormDefinitionMixin,\n ExtractDataSourcesMixin {}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapInputSelectOptions]'\n})\nexport class InputSelectOptionsDirective implements OnInit, OnDestroy {\n\n @Input('rxapInputSelectOptionsViewer')\n public viewer: BaseDataSourceViewer = { id: '[rxapInputSelectOptions]' };\n\n @Input('rxapInputSelectOptionsMetadata')\n public metadata?: BaseDataSourceMetadata;\n\n protected readonly subscription = new Subscription();\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n @Required\n protected options!: ControlOptions | Record<string, any> | null;\n\n constructor(\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n // The ngControl could be unknown on construction\n // bc it is available after the content is init\n @Optional()\n @Inject(NgControl)\n protected ngControl: NgControl | null = null\n ) { }\n\n protected extractControl(ngControl: NgControl | null = this.ngControl): RxapFormControl {\n\n if (!ngControl) {\n throw new Error('The ngControl is not defined!');\n }\n\n this.ngControl = ngControl;\n\n const control = this.ngControl.control;\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('Control is not a RxapFormControl!');\n }\n\n return this.control = control;\n }\n\n protected extractDatasource(control: RxapFormControl = this.control): BaseDataSource<ControlOptions | Record<string, any>> {\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(DATA_SOURCE_NAME)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n const useDataSourceValue = useDataSourceValueMap.get(DATA_SOURCE_NAME)!;\n\n let dataSource: BaseDataSource;\n\n try {\n\n dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector\n );\n\n } catch (e) {\n\n if (e.name && e.name === 'NullInjectorError') {\n if (isDevMode()) {\n console.error('Cloud not inject the options data source', useDataSourceValue);\n }\n throw new Error('Cloud not inject the options data source:\\n' + e.message);\n }\n\n throw e;\n\n }\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n public ngOnInit() {\n this.extractControl();\n this.extractDatasource();\n this.loadOptions();\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n private loadOptions(dataSource: BaseDataSource<ControlOptions | Record<string, any>> = this.dataSource) {\n this.subscription.add(dataSource.connect(this.viewer).pipe(\n tap(options => this.renderTemplate(this.options = options))\n ).subscribe());\n }\n\n protected renderTemplate(options: ControlOptions | Record<string, any> | null = this.options) {\n this.viewContainerRef.clear();\n\n if (options) {\n if (!Array.isArray(options)) {\n\n for (const [ value, display ] of Object.entries(options)) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value, display } });\n }\n\n } else {\n\n for (const option of options) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });\n }\n\n }\n } else {\n if (isDevMode()) {\n console.warn(`The options for the control ${this.control.fullControlPath} is empty/null/undefined!`);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n}\n\n@NgModule({\n declarations: [ InputSelectOptionsDirective ],\n exports: [ InputSelectOptionsDirective ]\n})\nexport class InputSelectOptionsDirectiveModule {}\n"]}
1
+ {"version":3,"file":"input-select-options.directive.js","sourceRoot":"","sources":["../../../../../../libs/form-system/src/lib/directives/input-select-options.directive.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,WAAW,EAEX,MAAM,EACN,gBAAgB,EAChB,KAAK,EAEL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,SAAS,EAEV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,cAAc,EAGd,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAGL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,GAAG,EACH,GAAG,EACJ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EACL,aAAa,EAEd,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,cAAc,EAEf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;;;;;AASjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAE1C,MAAM,UAAU,0BAA0B,CAAC,GAAG,GAA+B;IAC3E,OAAO,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;AAC5E,CAAC;AAUD,MAAM,UAAU,oBAAoB,CAClC,UAA+C,EAC/C,QAAqD;IAErD,OAAO,UAAS,MAAW,EAAE,WA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;;0BAIxB,QAAQ;;0BACR,MAAM;2BAAC,SAAS;;0BAEhB,QAAQ;;0BACR,MAAM;2BAAC,cAAc;4CApCjB,MAAM;sBADZ,KAAK;uBAAC,8BAA8B;gBAI9B,QAAQ;sBADd,KAAK;uBAAC,gCAAgC;gBAIhC,eAAe;sBADrB,KAAK;uBAAC,uCAAuC;gBAMpC,OAAO,MAGP,UAAU,MAGV,OAAO;AAkJnB,MAAM,OAAO,iCAAiC;;8HAAjC,iCAAiC;+HAAjC,iCAAiC,iBAtKjC,2BAA2B,aAA3B,2BAA2B;+HAsK3B,iCAAiC;2FAAjC,iCAAiC;kBAJ7C,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,2BAA2B,CAAE;oBAC7C,OAAO,EAAO,CAAE,2BAA2B,CAAE;iBAC9C","sourcesContent":["import {\n Directive,\n TemplateRef,\n OnInit,\n Inject,\n ViewContainerRef,\n Input,\n OnDestroy,\n Injector,\n INJECTOR,\n Optional,\n ChangeDetectorRef,\n NgModule,\n isDevMode,\n AfterViewInit\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport {\n DataSourceLoader,\n BaseDataSource,\n BaseDataSourceViewer,\n BaseDataSourceMetadata,\n PipeDataSource\n} from '@rxap/data-source';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n ControlOptions,\n ControlOption,\n Required\n} from '@rxap/utilities';\nimport { Mixin } from '@rxap/mixin';\nimport { Subscription } from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n UseDataSource,\n UseDataSourceSettings\n} from '../decorators/use-data-source';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport {\n MAT_FORM_FIELD,\n MatFormField\n} from '@angular/material/form-field';\nimport { MatAutocomplete } from '@angular/material/autocomplete';\n\nexport interface InputSelectOptionsTemplateContext {\n $implicit: ControlOption;\n}\n\nexport interface InputSelectOptionsSettings<Source> extends UseDataSourceSettings<Source, ControlOptions | Record<string, any>> {}\n\n\nexport const DATA_SOURCE_NAME = 'options';\n\nexport function ComposeOptionsTransformers(...fnc: Array<(value: any) => any>): (value: any) => any {\n return base => fnc.reduce((source, transform) => transform(source), base);\n}\n\n// tslint:disable-next-line:max-line-length\nexport function UseOptionsDataSource<Source>(\n dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>,\n settings?: InputSelectOptionsSettings<Source>\n): (\n target: any,\n propertyKey: string\n) => any;\nexport function UseOptionsDataSource(\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: InputSelectOptionsSettings<ControlOptions>\n) {\n return function(target: any, propertyKey: string) {\n UseDataSource(dataSource, DATA_SOURCE_NAME, settings)(target, propertyKey);\n };\n}\n\nexport interface InputSelectOptionsDirective extends OnInit,\n ExtractFormDefinitionMixin,\n ExtractDataSourcesMixin {}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapInputSelectOptions]'\n})\nexport class InputSelectOptionsDirective implements OnDestroy, AfterViewInit {\n\n @Input('rxapInputSelectOptionsViewer')\n public viewer: BaseDataSourceViewer = { id: '[rxapInputSelectOptions]' };\n\n @Input('rxapInputSelectOptionsMetadata')\n public metadata?: BaseDataSourceMetadata;\n\n @Input('rxapInputSelectOptionsMatAutocomplete')\n public matAutocomplete?: MatAutocomplete;\n\n protected readonly subscription = new Subscription();\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n @Required\n protected options!: ControlOptions | Record<string, any> | null;\n\n constructor(\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n // The ngControl could be unknown on construction\n // bc it is available after the content is init\n @Optional()\n @Inject(NgControl)\n protected ngControl: NgControl | null = null,\n @Optional()\n @Inject(MAT_FORM_FIELD)\n protected matFormField: MatFormField | null = null,\n ) { }\n\n public ngAfterViewInit() {\n this.extractControl();\n this.extractDatasource();\n this.viewer = {\n id: '[rxapInputSelectOptions]' + this.control.controlId,\n viewChange: this.control.value$,\n control: this.control,\n }\n this.loadOptions();\n if (this.matAutocomplete) {\n this.matAutocomplete.displayWith = this.toDisplay.bind(this);\n }\n }\n\n protected extractDatasource(control: RxapFormControl = this.control): BaseDataSource<ControlOptions | Record<string, any>> {\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(DATA_SOURCE_NAME)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n const useDataSourceValue = useDataSourceValueMap.get(DATA_SOURCE_NAME)!;\n\n let dataSource: BaseDataSource;\n\n try {\n\n dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector\n );\n\n } catch (e) {\n\n if (e.name && e.name === 'NullInjectorError') {\n if (isDevMode()) {\n console.error('Cloud not inject the options data source', useDataSourceValue);\n }\n throw new Error('Cloud not inject the options data source:\\n' + e.message);\n }\n\n throw e;\n\n }\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n public toDisplay(value: any): string {\n if (!value) {\n return '';\n }\n return this.options?.find((option: any) => option.value === value)?.display ?? 'to display error';\n }\n\n protected extractControl(ngControl: NgControl | null = this.ngControl ?? this.matFormField?._control?.ngControl ?? null): RxapFormControl {\n\n if (!ngControl) {\n throw new Error('The ngControl is not defined!');\n }\n\n this.ngControl = ngControl;\n\n const control = this.ngControl.control;\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('Control is not a RxapFormControl!');\n }\n\n return this.control = control;\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n private loadOptions(dataSource: BaseDataSource<ControlOptions | Record<string, any>> = this.dataSource) {\n this.subscription.add(dataSource.connect(this.viewer).pipe(\n tap(options => this.renderTemplate(this.options = options))\n ).subscribe());\n }\n\n protected renderTemplate(options: ControlOptions | Record<string, any> | null = this.options) {\n this.viewContainerRef.clear();\n\n if (options) {\n if (!Array.isArray(options)) {\n\n for (const [ value, display ] of Object.entries(options)) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value, display } });\n }\n\n } else {\n\n for (const option of options) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });\n }\n\n }\n } else {\n if (isDevMode()) {\n console.warn(`The options for the control ${this.control.fullControlPath} is empty/null/undefined!`);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n}\n\n@NgModule({\n declarations: [ InputSelectOptionsDirective ],\n exports: [ InputSelectOptionsDirective ]\n})\nexport class InputSelectOptionsDirectiveModule {}\n"]}
@@ -11,6 +11,9 @@ import { Mixin } from '@rxap/mixin';
11
11
  import { getMetadata, setMetadataMap, setMetadataMapMap, setMetadata } from '@rxap/utilities/reflect-metadata';
12
12
  import { map, startWith, distinctUntilChanged, shareReplay, tap, catchError } from 'rxjs/operators';
13
13
  import { Subscription, of } from 'rxjs';
14
+ import * as i3 from '@angular/material/form-field';
15
+ import { MAT_FORM_FIELD } from '@angular/material/form-field';
16
+ import '@angular/material/autocomplete';
14
17
 
15
18
  class RxapFormSystemError extends RxapError {
16
19
  constructor(message, code, className) {
@@ -470,26 +473,29 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
470
473
  constructor(template, dataSourceLoader, viewContainerRef, injector, cdr,
471
474
  // The ngControl could be unknown on construction
472
475
  // bc it is available after the content is init
473
- ngControl = null) {
476
+ ngControl = null, matFormField = null) {
474
477
  this.template = template;
475
478
  this.dataSourceLoader = dataSourceLoader;
476
479
  this.viewContainerRef = viewContainerRef;
477
480
  this.injector = injector;
478
481
  this.cdr = cdr;
479
482
  this.ngControl = ngControl;
483
+ this.matFormField = matFormField;
480
484
  this.viewer = { id: '[rxapInputSelectOptions]' };
481
485
  this.subscription = new Subscription();
482
486
  }
483
- extractControl(ngControl = this.ngControl) {
484
- if (!ngControl) {
485
- throw new Error('The ngControl is not defined!');
486
- }
487
- this.ngControl = ngControl;
488
- const control = this.ngControl.control;
489
- if (!(control instanceof RxapFormControl)) {
490
- throw new Error('Control is not a RxapFormControl!');
487
+ ngAfterViewInit() {
488
+ this.extractControl();
489
+ this.extractDatasource();
490
+ this.viewer = {
491
+ id: '[rxapInputSelectOptions]' + this.control.controlId,
492
+ viewChange: this.control.value$,
493
+ control: this.control,
494
+ };
495
+ this.loadOptions();
496
+ if (this.matAutocomplete) {
497
+ this.matAutocomplete.displayWith = this.toDisplay.bind(this);
491
498
  }
492
- return this.control = control;
493
499
  }
494
500
  extractDatasource(control = this.control) {
495
501
  const formDefinition = this.extractFormDefinition(control);
@@ -517,10 +523,25 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
517
523
  }
518
524
  return this.dataSource = dataSource;
519
525
  }
520
- ngOnInit() {
521
- this.extractControl();
522
- this.extractDatasource();
523
- this.loadOptions();
526
+ toDisplay(value) {
527
+ var _a, _b, _c;
528
+ if (!value) {
529
+ return '';
530
+ }
531
+ return (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => option.value === value)) === null || _b === void 0 ? void 0 : _b.display) !== null && _c !== void 0 ? _c : 'to display error';
532
+ }
533
+ extractControl(ngControl) {
534
+ var _a, _b, _c, _d;
535
+ if (ngControl === void 0) { ngControl = (_d = (_a = this.ngControl) !== null && _a !== void 0 ? _a : (_c = (_b = this.matFormField) === null || _b === void 0 ? void 0 : _b._control) === null || _c === void 0 ? void 0 : _c.ngControl) !== null && _d !== void 0 ? _d : null; }
536
+ if (!ngControl) {
537
+ throw new Error('The ngControl is not defined!');
538
+ }
539
+ this.ngControl = ngControl;
540
+ const control = this.ngControl.control;
541
+ if (!(control instanceof RxapFormControl)) {
542
+ throw new Error('Control is not a RxapFormControl!');
543
+ }
544
+ return this.control = control;
524
545
  }
525
546
  ngOnDestroy() {
526
547
  var _a;
@@ -551,8 +572,8 @@ let InputSelectOptionsDirective = class InputSelectOptionsDirective {
551
572
  this.cdr.detectChanges();
552
573
  }
553
574
  };
554
- InputSelectOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputSelectOptionsDirective, deps: [{ token: TemplateRef }, { token: DataSourceLoader }, { token: ViewContainerRef }, { token: INJECTOR }, { token: ChangeDetectorRef }, { token: NgControl, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
555
- InputSelectOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: InputSelectOptionsDirective, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"] }, ngImport: i0 });
575
+ InputSelectOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputSelectOptionsDirective, deps: [{ token: TemplateRef }, { token: DataSourceLoader }, { token: ViewContainerRef }, { token: INJECTOR }, { token: ChangeDetectorRef }, { token: NgControl, optional: true }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
576
+ InputSelectOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: InputSelectOptionsDirective, selector: "[rxapInputSelectOptions]", inputs: { viewer: ["rxapInputSelectOptionsViewer", "viewer"], metadata: ["rxapInputSelectOptionsMetadata", "metadata"], matAutocomplete: ["rxapInputSelectOptionsMatAutocomplete", "matAutocomplete"] }, ngImport: i0 });
556
577
  __decorate([
557
578
  Required,
558
579
  __metadata("design:type", RxapFormControl)
@@ -571,7 +592,7 @@ InputSelectOptionsDirective = __decorate([
571
592
  DataSourceLoader,
572
593
  ViewContainerRef,
573
594
  Injector,
574
- ChangeDetectorRef, Object])
595
+ ChangeDetectorRef, Object, Object])
575
596
  ], InputSelectOptionsDirective);
576
597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: InputSelectOptionsDirective, decorators: [{
577
598
  type: Directive,
@@ -598,12 +619,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
598
619
  }, {
599
620
  type: Inject,
600
621
  args: [NgControl]
622
+ }] }, { type: i3.MatFormField, decorators: [{
623
+ type: Optional
624
+ }, {
625
+ type: Inject,
626
+ args: [MAT_FORM_FIELD]
601
627
  }] }]; }, propDecorators: { viewer: [{
602
628
  type: Input,
603
629
  args: ['rxapInputSelectOptionsViewer']
604
630
  }], metadata: [{
605
631
  type: Input,
606
632
  args: ['rxapInputSelectOptionsMetadata']
633
+ }], matAutocomplete: [{
634
+ type: Input,
635
+ args: ['rxapInputSelectOptionsMatAutocomplete']
607
636
  }], control: [], dataSource: [], options: [] } });
608
637
  class InputSelectOptionsDirectiveModule {
609
638
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-form-system.js","sources":["../../../../libs/form-system/src/lib/error.ts","../../../../libs/form-system/src/lib/decorators/metadata-keys.ts","../../../../libs/form-system/src/lib/mixins/extract-data-sources.mixin.ts","../../../../libs/form-system/src/lib/form-system-control.directive.ts","../../../../libs/form-system/src/lib/form-system.module.ts","../../../../libs/form-system/src/lib/control-data-source.ts","../../../../libs/form-system/src/lib/mixins/extract-control.mixin.ts","../../../../libs/form-system/src/lib/mixins/extract-form-definition.mixin.ts","../../../../libs/form-system/src/lib/decorators/use-component.ts","../../../../libs/form-system/src/lib/decorators/use-data-source.ts","../../../../libs/form-system/src/lib/decorators/use-form-component.ts","../../../../libs/form-system/src/lib/directives/control-hide-show.directive.ts","../../../../libs/form-system/src/lib/directives/input-select-options.directive.ts","../../../../libs/form-system/src/lib/directives/form-directives.module.ts","../../../../libs/form-system/src/lib/validators/is-equal-to.ts","../../../../libs/form-system/src/index.ts","../../../../libs/form-system/src/rxap-form-system.ts"],"sourcesContent":["import { RxapError } from '@rxap/utilities';\n\nexport class RxapFormSystemError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/form-system', message, code, className);\n }\n\n}\n","export enum FormSystemMetadataKeys {\n COMPONENTS = 'rxap/form-system/components',\n DATA_SOURCES = 'rxap/form-system/data-sources',\n COMPONENTS_PROPERTIES = 'rxap/form-system/components-properties',\n FORM_COMPONENT = 'rxap/window-form-system/form-component',\n}\n","import { FormDefinition } from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\nimport { FormSystemMetadataKeys } from '../decorators/metadata-keys';\nimport { UseDataSourceValue } from '../decorators/use-data-source';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport class ExtractDataSourcesMixin {\n\n protected extractDataSources(formDefinition: FormDefinition, controlId: string): Map<string, UseDataSourceValue> {\n const map = getMetadata<Map<string, Map<string, UseDataSourceValue>>>(\n FormSystemMetadataKeys.DATA_SOURCES,\n Object.getPrototypeOf(formDefinition)\n );\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');\n }\n\n if (!map.has(controlId)) {\n throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');\n }\n\n return map.get(controlId)!;\n }\n\n}\n","import {\n Input,\n Inject,\n OnInit,\n ComponentFactoryResolver,\n ViewContainerRef,\n Directive,\n ComponentRef,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n Required,\n Constructor\n} from '@rxap/utilities';\nimport {\n ControlContainer,\n ControlValueAccessor\n} from '@angular/forms';\nimport { RxapFormSystemError } from './error';\nimport {\n RxapFormControl,\n FormDefinition\n} from '@rxap/forms';\nimport { FormSystemMetadataKeys } from './decorators/metadata-keys';\nimport { ControlWithDataSource } from './control-with-data-source';\nimport {\n DataSourceLoader,\n PipeDataSource\n} from '@rxap/data-source';\nimport { Mixin } from '@rxap/mixin';\nimport { ExtractDataSourcesMixin } from './mixins/extract-data-sources.mixin';\nimport { map } from 'rxjs/operators';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport interface FormSystemControlDirective<T> extends ExtractDataSourcesMixin, ControlValueAccessor, OnInit {}\n\n@Mixin(ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapFormSystemControl]'\n})\nexport class FormSystemControlDirective<T> implements ControlValueAccessor, OnInit {\n\n /**\n * Defines the form control id\n */\n @Input()\n @Required\n public controlId!: string;\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected componentRef!: ComponentRef<ControlValueAccessor & Partial<ControlWithDataSource>>;\n\n constructor(\n @Inject(ControlContainer)\n private readonly parent: ControlContainer,\n @Inject(ComponentFactoryResolver)\n private readonly cfr: ComponentFactoryResolver,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(DataSourceLoader)\n private readonly dataSourceLoader: DataSourceLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector\n ) {}\n\n public ngOnInit() {\n\n this.control = this.extractControl();\n\n const formDefinition = this.extractFormDefinition();\n\n this.componentRef = this.createComponent(formDefinition);\n\n this.setDataSources(formDefinition, this.componentRef.instance);\n this.setComponentProperties(formDefinition, this.componentRef.instance);\n\n this.viewContainerRef.insert(this.componentRef.hostView);\n\n }\n\n public registerOnChange(fn: (value: (any | null)) => void): void {\n this.componentRef.instance.registerOnChange(fn);\n }\n\n public registerOnTouched(fn: () => void): void {\n this.componentRef.instance.registerOnTouched(fn);\n }\n\n public writeValue(value: any): void {\n this.componentRef.instance.writeValue(value);\n }\n\n public setDisabledState(isDisabled: boolean): void {\n if (this.componentRef.instance.setDisabledState) {\n this.componentRef.instance.setDisabledState(isDisabled);\n }\n }\n\n private setDataSources(formDefinition: FormDefinition, component: Partial<ControlWithDataSource>): void {\n\n if (!component.setDataSource) {\n throw new RxapFormSystemError(\n 'The ControlWithDataSource interface is not implemented for the control component, but the control has defined data sources',\n ''\n );\n }\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, this.controlId);\n\n for (const [ name, useDataSourceValue ] of useDataSourceValueMap.entries()) {\n\n let dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource);\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n component.setDataSource(name, dataSource, useDataSourceValue.settings);\n\n }\n\n }\n\n private setComponentProperties(formDefinition: FormDefinition, component: any) {\n const componentProperties = this.extractComponentProperties(formDefinition);\n\n for (const [ key, value ] of Object.entries(componentProperties)) {\n Reflect.set(component, key, value);\n }\n\n }\n\n private createComponent(formDefinition: FormDefinition): ComponentRef<ControlValueAccessor> {\n const component = this.extractComponent(formDefinition);\n const componentFactory = this.cfr.resolveComponentFactory(component);\n return componentFactory.create(this.injector);\n }\n\n private extractControl(): RxapFormControl {\n if (!this.parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = this.parent.control.get(this.controlId);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n private extractFormDefinition(): FormDefinition {\n const formDefinition = (this.control as any).rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n private extractComponent(formDefinition: FormDefinition): Constructor<ControlValueAccessor> {\n const map = getMetadata<Map<string, Constructor<ControlValueAccessor>>>(FormSystemMetadataKeys.COMPONENTS, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n private extractComponentProperties(formDefinition: FormDefinition): Record<string, any> {\n const map = getMetadata<Map<string, Record<string, any>>>(FormSystemMetadataKeys.COMPONENTS_PROPERTIES, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component properties map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { FormSystemControlDirective } from './form-system-control.directive';\n\n\n@NgModule({\n declarations: [ FormSystemControlDirective ],\n exports: [ FormSystemControlDirective ],\n imports: []\n})\nexport class FormSystemModule {}\n","import {\n BaseDataSource,\n BaseDataSourceMetadata,\n RXAP_DATA_SOURCE_METADATA,\n} from '@rxap/data-source';\nimport { Injectable, Inject, InjectionToken, Optional } from '@angular/core';\nimport { AbstractControl } from '@rxap/forms';\nimport { startWith, shareReplay, distinctUntilChanged } from 'rxjs/operators';\nimport { equals } from '@rxap/utilities';\n\nexport const RXAP_FORM_CONTROL_SOURCE = new InjectionToken(\n 'rxap/forms/data-source'\n);\n\n@Injectable()\nexport class ControlDataSource extends BaseDataSource {\n constructor(\n @Inject(RXAP_FORM_CONTROL_SOURCE)\n private readonly control: AbstractControl,\n @Optional()\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: BaseDataSourceMetadata | null = null\n ) {\n super(metadata);\n }\n\n public init() {\n if (this._initialised) {\n return;\n }\n super.init();\n\n console.log(this.control);\n\n this._data$ = this.control.valueChanges.pipe(\n startWith(this.control.value),\n distinctUntilChanged((a, b) => equals(a, b)),\n shareReplay(1)\n );\n }\n}\n\nexport function controlDataSource(control: AbstractControl): ControlDataSource {\n // TODO : remove as any (wait for @rxap/forms update)\n return new ControlDataSource(control, { id: (control as any).controlId });\n}\n","import { ControlContainer } from '@angular/forms';\nimport {\n RxapFormControl,\n AbstractControl,\n RxapFormGroup,\n RxapFormArray,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractControlMixin {\n\n protected extractControl(parent: ControlContainer, controlPath: string): AbstractControl {\n if (!controlPath) {\n throw new RxapFormSystemError('The control path is empty', '');\n }\n\n if (!parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = parent.control.get(controlPath);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl) && !(control instanceof RxapFormGroup) && !(control instanceof RxapFormArray)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n}\n","import {\n FormDefinition,\n AbstractControl,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractFormDefinitionMixin {\n\n // TODO : change to AbstractControl from @rxap/forms\n protected extractFormDefinition(control: AbstractControl): FormDefinition {\n const formDefinition = control.rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { setMetadataMap } from '@rxap/utilities/reflect-metadata';\n\nexport function UseComponent<Component extends ControlValueAccessor>(\n component: Constructor<Component>,\n setProperties: Partial<Record<keyof Component, any>> = {}\n) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, component, FormSystemMetadataKeys.COMPONENTS, target);\n setMetadataMap(propertyKey, setProperties, FormSystemMetadataKeys.COMPONENTS_PROPERTIES, target);\n };\n}\n","import { BaseDataSource } from '@rxap/data-source';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { setMetadataMapMap } from '@rxap/utilities/reflect-metadata';\n\nexport interface UseDataSourceSettings<Source = any, Target = any> {\n transformer: (source: Source) => Target;\n}\n\nexport interface UseDataSourceValue<Source = any, Target = any> {\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: UseDataSourceSettings<Source, Target>,\n}\n\nexport function UseDataSource<Data>(dataSource: IdOrInstanceOrToken<BaseDataSource<Data>>, name: string, settings?: UseDataSourceSettings) {\n return function(target: any, propertyKey: string) {\n const value: UseDataSourceValue<Data> = { dataSource, settings };\n setMetadataMapMap(propertyKey, name, value, FormSystemMetadataKeys.DATA_SOURCES, target);\n };\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { setMetadata } from '@rxap/utilities/reflect-metadata';\n\n/**\n * Links a component with a form definition\n *\n * @param component\n */\nexport function UseFormComponent(component: Constructor) {\n return function (target: any) {\n setMetadata(FormSystemMetadataKeys.FORM_COMPONENT, component, target);\n };\n}\n","import {\n Directive,\n Input,\n Inject,\n OnInit,\n Renderer2,\n ElementRef,\n OnDestroy,\n NgModule,\n Optional,\n Self\n} from '@angular/core';\nimport {\n FormDefinition,\n AbstractControl,\n RxapFormControl\n} from '@rxap/forms';\nimport {\n ControlContainer,\n NgControl\n} from '@angular/forms';\nimport { Mixin } from '@rxap/mixin';\nimport {\n Subscription,\n of\n} from 'rxjs';\nimport {\n tap,\n startWith,\n catchError\n} from 'rxjs/operators';\nimport { ExtractControlMixin } from '../mixins/extract-control.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n setMetadataMap,\n getMetadata\n} from '@rxap/utilities/reflect-metadata';\n\nexport const RXAP_FORM_SYSTEM_SHOW_METADATA = 'rxap/form-system/show-function';\nexport const RXAP_FORM_SYSTEM_HIDE_METADATA = 'rxap/form-system/hide-function';\nexport const RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS = 'rxap/form-system/hide-show-options';\n\nexport type ControlHideShowFunction<T = any> = (this: T, control: AbstractControl) => boolean | null;\n\nexport interface ControlHideShowOptions {\n /**\n * Weather the hide/showFunction should be called on root group changes\n */\n rootChange?: boolean;\n}\n\nexport function UseHideFunction(hideFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, hideFunction, RXAP_FORM_SYSTEM_HIDE_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport function UseShowFunction(showFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, showFunction, RXAP_FORM_SYSTEM_SHOW_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport interface ControlHideShowDirective extends ExtractControlMixin,\n ExtractFormDefinitionMixin {}\n\n@Mixin(ExtractControlMixin, ExtractFormDefinitionMixin)\n@Directive({\n selector: '[rxapControlHideShow]'\n})\nexport class ControlHideShowDirective implements OnInit, OnDestroy {\n\n @Input('rxapControlHideShow')\n public controlId?: string;\n\n public control!: RxapFormControl;\n\n private subscription = new Subscription();\n\n constructor(\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef,\n @Optional()\n @Inject(ControlContainer)\n private readonly parent: ControlContainer | null,\n @Self()\n @Optional()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null\n ) { }\n\n public ngOnInit() {\n\n if (!this.ngControl && !this.parent) {\n throw new Error('Easier the ControlContainer or NgControl must be injectable');\n }\n\n if (!this.ngControl && !this.controlId) {\n throw new Error('If the NgControl is not injectable then the control id must be defined!');\n }\n\n const control = this.ngControl?.control ?? this.extractControl(this.parent!, this.controlId!);\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The control is not an instance of RxapFormControl');\n }\n\n this.control = control;\n\n const formDefinition = this.extractFormDefinition(control);\n\n const hideFunction = this.extractHideFunction(formDefinition);\n\n const showFunction = this.extractShowFunction(formDefinition);\n\n const options = this.extractOptions(formDefinition);\n\n let changeTrigger = formDefinition.rxapFormGroup.valueChanges;\n\n if (options.rootChange) {\n changeTrigger = formDefinition.rxapFormGroup.root.valueChanges;\n }\n\n changeTrigger = changeTrigger.pipe(startWith(null));\n\n if (showFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the showFunction throws an error\n const show = showFunction.call(formDefinition, control);\n\n switch (show) {\n\n case true:\n this.show();\n break;\n\n case false:\n this.hide();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n if (hideFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the hideFunction throws an error\n const hide = hideFunction.call(formDefinition, control);\n\n switch (hide) {\n\n case true:\n this.hide();\n break;\n\n case false:\n this.show();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n }\n\n public ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private extractOptions(formDefinition: FormDefinition): ControlHideShowOptions {\n const map = getMetadata<Map<string, ControlHideShowOptions>>(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return {};\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractHideFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractShowFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private hide() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');\n }\n\n private show() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'block');\n }\n\n private reset() {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'display');\n }\n\n\n}\n\n@NgModule({\n declarations: [ ControlHideShowDirective ],\n exports: [ ControlHideShowDirective ]\n})\nexport class ControlHideShowDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n OnInit,\n Inject,\n ViewContainerRef,\n Input,\n OnDestroy,\n Injector,\n INJECTOR,\n Optional,\n ChangeDetectorRef,\n NgModule,\n isDevMode\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport {\n DataSourceLoader,\n BaseDataSource,\n BaseDataSourceViewer,\n BaseDataSourceMetadata,\n PipeDataSource\n} from '@rxap/data-source';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n ControlOptions,\n ControlOption,\n Required\n} from '@rxap/utilities';\nimport { Mixin } from '@rxap/mixin';\nimport { Subscription } from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n UseDataSource,\n UseDataSourceSettings\n} from '../decorators/use-data-source';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\nexport interface InputSelectOptionsTemplateContext {\n $implicit: ControlOption;\n}\n\nexport interface InputSelectOptionsSettings<Source> extends UseDataSourceSettings<Source, ControlOptions | Record<string, any>> {}\n\n\nexport const DATA_SOURCE_NAME = 'options';\n\nexport function ComposeOptionsTransformers(...fnc: Array<(value: any) => any>): (value: any) => any {\n return base => fnc.reduce((source, transform) => transform(source), base);\n}\n\n// tslint:disable-next-line:max-line-length\nexport function UseOptionsDataSource<Source>(\n dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>,\n settings?: InputSelectOptionsSettings<Source>\n): (\n target: any,\n propertyKey: string\n) => any;\nexport function UseOptionsDataSource(\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: InputSelectOptionsSettings<ControlOptions>\n) {\n return function(target: any, propertyKey: string) {\n UseDataSource(dataSource, DATA_SOURCE_NAME, settings)(target, propertyKey);\n };\n}\n\nexport interface InputSelectOptionsDirective extends OnInit,\n ExtractFormDefinitionMixin,\n ExtractDataSourcesMixin {}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapInputSelectOptions]'\n})\nexport class InputSelectOptionsDirective implements OnInit, OnDestroy {\n\n @Input('rxapInputSelectOptionsViewer')\n public viewer: BaseDataSourceViewer = { id: '[rxapInputSelectOptions]' };\n\n @Input('rxapInputSelectOptionsMetadata')\n public metadata?: BaseDataSourceMetadata;\n\n protected readonly subscription = new Subscription();\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n @Required\n protected options!: ControlOptions | Record<string, any> | null;\n\n constructor(\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n // The ngControl could be unknown on construction\n // bc it is available after the content is init\n @Optional()\n @Inject(NgControl)\n protected ngControl: NgControl | null = null\n ) { }\n\n protected extractControl(ngControl: NgControl | null = this.ngControl): RxapFormControl {\n\n if (!ngControl) {\n throw new Error('The ngControl is not defined!');\n }\n\n this.ngControl = ngControl;\n\n const control = this.ngControl.control;\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('Control is not a RxapFormControl!');\n }\n\n return this.control = control;\n }\n\n protected extractDatasource(control: RxapFormControl = this.control): BaseDataSource<ControlOptions | Record<string, any>> {\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(DATA_SOURCE_NAME)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n const useDataSourceValue = useDataSourceValueMap.get(DATA_SOURCE_NAME)!;\n\n let dataSource: BaseDataSource;\n\n try {\n\n dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector\n );\n\n } catch (e) {\n\n if (e.name && e.name === 'NullInjectorError') {\n if (isDevMode()) {\n console.error('Cloud not inject the options data source', useDataSourceValue);\n }\n throw new Error('Cloud not inject the options data source:\\n' + e.message);\n }\n\n throw e;\n\n }\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n public ngOnInit() {\n this.extractControl();\n this.extractDatasource();\n this.loadOptions();\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n private loadOptions(dataSource: BaseDataSource<ControlOptions | Record<string, any>> = this.dataSource) {\n this.subscription.add(dataSource.connect(this.viewer).pipe(\n tap(options => this.renderTemplate(this.options = options))\n ).subscribe());\n }\n\n protected renderTemplate(options: ControlOptions | Record<string, any> | null = this.options) {\n this.viewContainerRef.clear();\n\n if (options) {\n if (!Array.isArray(options)) {\n\n for (const [ value, display ] of Object.entries(options)) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value, display } });\n }\n\n } else {\n\n for (const option of options) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });\n }\n\n }\n } else {\n if (isDevMode()) {\n console.warn(`The options for the control ${this.control.fullControlPath} is empty/null/undefined!`);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n}\n\n@NgModule({\n declarations: [ InputSelectOptionsDirective ],\n exports: [ InputSelectOptionsDirective ]\n})\nexport class InputSelectOptionsDirectiveModule {}\n","import { NgModule } from '@angular/core';\nimport { InputSelectOptionsDirectiveModule } from './input-select-options.directive';\nimport { ControlHideShowDirectiveModule } from './control-hide-show.directive';\n\n@NgModule({\n exports: [\n InputSelectOptionsDirectiveModule,\n ControlHideShowDirectiveModule\n ]\n})\nexport class FormSystemDirectivesModule {}\n","import {\n Directive,\n forwardRef,\n Input,\n NgModule\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { Required } from '@rxap/utilities';\n\n@Directive({\n selector: '[rxapIsEqualTo]',\n providers: [\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: forwardRef(() => IsEqualToDirective)\n }\n ]\n})\nexport class IsEqualToDirective implements Validator {\n\n @Input('rxapIsEqualTo')\n @Required\n public set equalTo(value: any) {\n this._equalTo = value;\n if (this._onChange) {\n this._onChange();\n }\n }\n\n private _onChange!: () => void;\n\n\n private _equalTo!: any;\n\n public validate(control: AbstractControl): ValidationErrors | null {\n if (this._equalTo === null || this._equalTo === control.value) {\n return null;\n }\n return { isEqualTo: { value: this._equalTo, actualValue: control.value } };\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n public registerOnValidatorChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n}\n\n@NgModule({\n declarations: [ IsEqualToDirective ],\n exports: [ IsEqualToDirective ]\n})\nexport class IsEqualToDirectiveModule {\n}\n","export * from './lib/form-system.module';\n\nexport * from './lib/error';\nexport * from './lib/control-data-source';\n\n// region mixin\n\nexport * from './lib/mixins/extract-data-sources.mixin';\nexport * from './lib/mixins/extract-control.mixin';\nexport * from './lib/mixins/extract-form-definition.mixin';\n\n// endregion\n\n// region components\n\nexport * from './lib/form-system-control.directive';\n\n\n// endregion\n\n// region decorators\n\nexport * from './lib/decorators/metadata-keys';\nexport * from './lib/decorators/use-component';\nexport * from './lib/decorators/use-data-source';\nexport * from './lib/decorators/use-form-component';\n\n// endregion\n\n// region directives\n\nexport * from './lib/directives/control-hide-show.directive';\nexport * from './lib/directives/form-directives.module';\nexport * from './lib/directives/input-select-options.directive';\n\n// endregion\n\n// region validators\n\nexport * from './lib/validators/is-equal-to';\n\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAEa,mBAAoB,SAAQ,SAAS;IAEhD,YAAY,OAAe,EAAE,IAAY,EAAE,SAAkB;QAC3D,KAAK,CAAC,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;KACtD;;;ICNS;AAAZ,WAAY,sBAAsB;IAChC,oEAAqD,CAAA;IACrD,wEAAuD,CAAA;IACvD,0FAAgE,CAAA;IAChE,mFAAyD,CAAA;AAC3D,CAAC,EALW,sBAAsB,KAAtB,sBAAsB;;MCMrB,uBAAuB;IAExB,kBAAkB,CAAC,cAA8B,EAAE,SAAiB;QAC5E,MAAM,GAAG,GAAG,WAAW,CACrB,sBAAsB,CAAC,YAAY,EACnC,MAAM,CAAC,cAAc,CAAC,cAAc,CAAC,CACtC,CAAC;QAEF,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,mBAAmB,CAAC,6EAA6E,EAAE,EAAE,CAAC,CAAC;SAClH;QAED,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YACvB,MAAM,IAAI,mBAAmB,CAAC,8EAA8E,EAAE,EAAE,CAAC,CAAC;SACnH;QAED,OAAO,GAAG,CAAC,GAAG,CAAC,SAAS,CAAE,CAAC;KAC5B;;;ICkBU,0BAA0B,SAA1B,0BAA0B;IAerC,YAEmB,MAAwB,EAExB,GAA6B,EAE7B,gBAAkC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CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KAC5E;;;;;;;IAQM,yBAAyB,CAAC,EAAc;QAC7C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;KACrB;;+GA/BU,kBAAkB;mGAAlB,kBAAkB,6FARlB;QACT;YACE,OAAO,EAAM,aAAa;YAC1B,KAAK,EAAQ,IAAI;YACjB,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAkB,CAAC;SAClD;KACF;AAMD;IADC,QAAQ;;;iDAMR;2FATU,kBAAkB;kBAV9B,SAAS;mBAAC;oBACT,QAAQ,EAAG,iBAAiB;oBAC5B,SAAS,EAAE;wBACT;4BACE,OAAO,EAAM,aAAa;4BAC1B,KAAK,EAAQ,IAAI;4BACjB,WAAW,EAAE,UAAU,CAAC,wBAAwB,CAAC;yBAClD;qBACF;iBACF;8BAKY,OAAO;sBAFjB,KAAK;uBAAC,eAAe;;MAqCX,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,iBAvCxB,kBAAkB,aAAlB,kBAAkB;sHAuClB,wBAAwB;2FAAxB,wBAAwB;kBAJpC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,kBAAkB,CAAE;oBACpC,OAAO,EAAO,CAAE,kBAAkB,CAAE;iBACrC;;;ACrBD;;ACzCA;;;;;;"}
1
+ {"version":3,"file":"rxap-form-system.js","sources":["../../../../libs/form-system/src/lib/error.ts","../../../../libs/form-system/src/lib/decorators/metadata-keys.ts","../../../../libs/form-system/src/lib/mixins/extract-data-sources.mixin.ts","../../../../libs/form-system/src/lib/form-system-control.directive.ts","../../../../libs/form-system/src/lib/form-system.module.ts","../../../../libs/form-system/src/lib/control-data-source.ts","../../../../libs/form-system/src/lib/mixins/extract-control.mixin.ts","../../../../libs/form-system/src/lib/mixins/extract-form-definition.mixin.ts","../../../../libs/form-system/src/lib/decorators/use-component.ts","../../../../libs/form-system/src/lib/decorators/use-data-source.ts","../../../../libs/form-system/src/lib/decorators/use-form-component.ts","../../../../libs/form-system/src/lib/directives/control-hide-show.directive.ts","../../../../libs/form-system/src/lib/directives/input-select-options.directive.ts","../../../../libs/form-system/src/lib/directives/form-directives.module.ts","../../../../libs/form-system/src/lib/validators/is-equal-to.ts","../../../../libs/form-system/src/index.ts","../../../../libs/form-system/src/rxap-form-system.ts"],"sourcesContent":["import { RxapError } from '@rxap/utilities';\n\nexport class RxapFormSystemError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/form-system', message, code, className);\n }\n\n}\n","export enum FormSystemMetadataKeys {\n COMPONENTS = 'rxap/form-system/components',\n DATA_SOURCES = 'rxap/form-system/data-sources',\n COMPONENTS_PROPERTIES = 'rxap/form-system/components-properties',\n FORM_COMPONENT = 'rxap/window-form-system/form-component',\n}\n","import { FormDefinition } from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\nimport { FormSystemMetadataKeys } from '../decorators/metadata-keys';\nimport { UseDataSourceValue } from '../decorators/use-data-source';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport class ExtractDataSourcesMixin {\n\n protected extractDataSources(formDefinition: FormDefinition, controlId: string): Map<string, UseDataSourceValue> {\n const map = getMetadata<Map<string, Map<string, UseDataSourceValue>>>(\n FormSystemMetadataKeys.DATA_SOURCES,\n Object.getPrototypeOf(formDefinition)\n );\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use data source map from the form definition instance', '');\n }\n\n if (!map.has(controlId)) {\n throw new RxapFormSystemError('A use data source definition does not exists in the form definition metadata', '');\n }\n\n return map.get(controlId)!;\n }\n\n}\n","import {\n Input,\n Inject,\n OnInit,\n ComponentFactoryResolver,\n ViewContainerRef,\n Directive,\n ComponentRef,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n Required,\n Constructor\n} from '@rxap/utilities';\nimport {\n ControlContainer,\n ControlValueAccessor\n} from '@angular/forms';\nimport { RxapFormSystemError } from './error';\nimport {\n RxapFormControl,\n FormDefinition\n} from '@rxap/forms';\nimport { FormSystemMetadataKeys } from './decorators/metadata-keys';\nimport { ControlWithDataSource } from './control-with-data-source';\nimport {\n DataSourceLoader,\n PipeDataSource\n} from '@rxap/data-source';\nimport { Mixin } from '@rxap/mixin';\nimport { ExtractDataSourcesMixin } from './mixins/extract-data-sources.mixin';\nimport { map } from 'rxjs/operators';\nimport { getMetadata } from '@rxap/utilities/reflect-metadata';\n\nexport interface FormSystemControlDirective<T> extends ExtractDataSourcesMixin, ControlValueAccessor, OnInit {}\n\n@Mixin(ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapFormSystemControl]'\n})\nexport class FormSystemControlDirective<T> implements ControlValueAccessor, OnInit {\n\n /**\n * Defines the form control id\n */\n @Input()\n @Required\n public controlId!: string;\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected componentRef!: ComponentRef<ControlValueAccessor & Partial<ControlWithDataSource>>;\n\n constructor(\n @Inject(ControlContainer)\n private readonly parent: ControlContainer,\n @Inject(ComponentFactoryResolver)\n private readonly cfr: ComponentFactoryResolver,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(DataSourceLoader)\n private readonly dataSourceLoader: DataSourceLoader,\n @Inject(INJECTOR)\n private readonly injector: Injector\n ) {}\n\n public ngOnInit() {\n\n this.control = this.extractControl();\n\n const formDefinition = this.extractFormDefinition();\n\n this.componentRef = this.createComponent(formDefinition);\n\n this.setDataSources(formDefinition, this.componentRef.instance);\n this.setComponentProperties(formDefinition, this.componentRef.instance);\n\n this.viewContainerRef.insert(this.componentRef.hostView);\n\n }\n\n public registerOnChange(fn: (value: (any | null)) => void): void {\n this.componentRef.instance.registerOnChange(fn);\n }\n\n public registerOnTouched(fn: () => void): void {\n this.componentRef.instance.registerOnTouched(fn);\n }\n\n public writeValue(value: any): void {\n this.componentRef.instance.writeValue(value);\n }\n\n public setDisabledState(isDisabled: boolean): void {\n if (this.componentRef.instance.setDisabledState) {\n this.componentRef.instance.setDisabledState(isDisabled);\n }\n }\n\n private setDataSources(formDefinition: FormDefinition, component: Partial<ControlWithDataSource>): void {\n\n if (!component.setDataSource) {\n throw new RxapFormSystemError(\n 'The ControlWithDataSource interface is not implemented for the control component, but the control has defined data sources',\n ''\n );\n }\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, this.controlId);\n\n for (const [ name, useDataSourceValue ] of useDataSourceValueMap.entries()) {\n\n let dataSource = this.dataSourceLoader.load(useDataSourceValue.dataSource);\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n component.setDataSource(name, dataSource, useDataSourceValue.settings);\n\n }\n\n }\n\n private setComponentProperties(formDefinition: FormDefinition, component: any) {\n const componentProperties = this.extractComponentProperties(formDefinition);\n\n for (const [ key, value ] of Object.entries(componentProperties)) {\n Reflect.set(component, key, value);\n }\n\n }\n\n private createComponent(formDefinition: FormDefinition): ComponentRef<ControlValueAccessor> {\n const component = this.extractComponent(formDefinition);\n const componentFactory = this.cfr.resolveComponentFactory(component);\n return componentFactory.create(this.injector);\n }\n\n private extractControl(): RxapFormControl {\n if (!this.parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = this.parent.control.get(this.controlId);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n private extractFormDefinition(): FormDefinition {\n const formDefinition = (this.control as any).rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n private extractComponent(formDefinition: FormDefinition): Constructor<ControlValueAccessor> {\n const map = getMetadata<Map<string, Constructor<ControlValueAccessor>>>(FormSystemMetadataKeys.COMPONENTS, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n private extractComponentProperties(formDefinition: FormDefinition): Record<string, any> {\n const map = getMetadata<Map<string, Record<string, any>>>(FormSystemMetadataKeys.COMPONENTS_PROPERTIES, Object.getPrototypeOf(formDefinition));\n\n if (!map) {\n throw new RxapFormSystemError('Could not extract the use component properties map from the form definition instance', '');\n }\n\n if (!map.has(this.controlId)) {\n throw new RxapFormSystemError('A use component definition does not exists in the form definition metadata', '');\n }\n\n return map.get(this.controlId)!;\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { FormSystemControlDirective } from './form-system-control.directive';\n\n\n@NgModule({\n declarations: [ FormSystemControlDirective ],\n exports: [ FormSystemControlDirective ],\n imports: []\n})\nexport class FormSystemModule {}\n","import {\n BaseDataSource,\n BaseDataSourceMetadata,\n RXAP_DATA_SOURCE_METADATA,\n} from '@rxap/data-source';\nimport { Injectable, Inject, InjectionToken, Optional } from '@angular/core';\nimport { AbstractControl } from '@rxap/forms';\nimport { startWith, shareReplay, distinctUntilChanged } from 'rxjs/operators';\nimport { equals } from '@rxap/utilities';\n\nexport const RXAP_FORM_CONTROL_SOURCE = new InjectionToken(\n 'rxap/forms/data-source'\n);\n\n@Injectable()\nexport class ControlDataSource extends BaseDataSource {\n constructor(\n @Inject(RXAP_FORM_CONTROL_SOURCE)\n private readonly control: AbstractControl,\n @Optional()\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: BaseDataSourceMetadata | null = null\n ) {\n super(metadata);\n }\n\n public init() {\n if (this._initialised) {\n return;\n }\n super.init();\n\n console.log(this.control);\n\n this._data$ = this.control.valueChanges.pipe(\n startWith(this.control.value),\n distinctUntilChanged((a, b) => equals(a, b)),\n shareReplay(1)\n );\n }\n}\n\nexport function controlDataSource(control: AbstractControl): ControlDataSource {\n // TODO : remove as any (wait for @rxap/forms update)\n return new ControlDataSource(control, { id: (control as any).controlId });\n}\n","import { ControlContainer } from '@angular/forms';\nimport {\n RxapFormControl,\n AbstractControl,\n RxapFormGroup,\n RxapFormArray,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractControlMixin {\n\n protected extractControl(parent: ControlContainer, controlPath: string): AbstractControl {\n if (!controlPath) {\n throw new RxapFormSystemError('The control path is empty', '');\n }\n\n if (!parent.control) {\n throw new RxapFormSystemError('The control property of ControlContainer is not defined', '');\n }\n\n const control = parent.control.get(controlPath);\n\n if (!control) {\n throw new RxapFormSystemError('Could not find the control instance', '');\n }\n\n if (!(control instanceof RxapFormControl) && !(control instanceof RxapFormGroup) && !(control instanceof RxapFormArray)) {\n throw new RxapFormSystemError('The extracted control is not a RxapFormControl', '');\n }\n\n return control;\n }\n\n}\n","import {\n FormDefinition,\n AbstractControl,\n} from '@rxap/forms';\nimport { RxapFormSystemError } from '../error';\n\nexport class ExtractFormDefinitionMixin {\n\n // TODO : change to AbstractControl from @rxap/forms\n protected extractFormDefinition(control: AbstractControl): FormDefinition {\n const formDefinition = control.rxapFormDefinition;\n\n if (!formDefinition) {\n throw new RxapFormSystemError('Could not find the form definition instance', '');\n }\n\n return formDefinition;\n }\n\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { setMetadataMap } from '@rxap/utilities/reflect-metadata';\n\nexport function UseComponent<Component extends ControlValueAccessor>(\n component: Constructor<Component>,\n setProperties: Partial<Record<keyof Component, any>> = {}\n) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, component, FormSystemMetadataKeys.COMPONENTS, target);\n setMetadataMap(propertyKey, setProperties, FormSystemMetadataKeys.COMPONENTS_PROPERTIES, target);\n };\n}\n","import { BaseDataSource } from '@rxap/data-source';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport { setMetadataMapMap } from '@rxap/utilities/reflect-metadata';\n\nexport interface UseDataSourceSettings<Source = any, Target = any> {\n transformer: (source: Source) => Target;\n}\n\nexport interface UseDataSourceValue<Source = any, Target = any> {\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: UseDataSourceSettings<Source, Target>,\n}\n\nexport function UseDataSource<Data>(dataSource: IdOrInstanceOrToken<BaseDataSource<Data>>, name: string, settings?: UseDataSourceSettings) {\n return function(target: any, propertyKey: string) {\n const value: UseDataSourceValue<Data> = { dataSource, settings };\n setMetadataMapMap(propertyKey, name, value, FormSystemMetadataKeys.DATA_SOURCES, target);\n };\n}\n","import { Constructor } from '@rxap/utilities';\nimport { FormSystemMetadataKeys } from './metadata-keys';\nimport { setMetadata } from '@rxap/utilities/reflect-metadata';\n\n/**\n * Links a component with a form definition\n *\n * @param component\n */\nexport function UseFormComponent(component: Constructor) {\n return function (target: any) {\n setMetadata(FormSystemMetadataKeys.FORM_COMPONENT, component, target);\n };\n}\n","import {\n Directive,\n Input,\n Inject,\n OnInit,\n Renderer2,\n ElementRef,\n OnDestroy,\n NgModule,\n Optional,\n Self\n} from '@angular/core';\nimport {\n FormDefinition,\n AbstractControl,\n RxapFormControl\n} from '@rxap/forms';\nimport {\n ControlContainer,\n NgControl\n} from '@angular/forms';\nimport { Mixin } from '@rxap/mixin';\nimport {\n Subscription,\n of\n} from 'rxjs';\nimport {\n tap,\n startWith,\n catchError\n} from 'rxjs/operators';\nimport { ExtractControlMixin } from '../mixins/extract-control.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n setMetadataMap,\n getMetadata\n} from '@rxap/utilities/reflect-metadata';\n\nexport const RXAP_FORM_SYSTEM_SHOW_METADATA = 'rxap/form-system/show-function';\nexport const RXAP_FORM_SYSTEM_HIDE_METADATA = 'rxap/form-system/hide-function';\nexport const RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS = 'rxap/form-system/hide-show-options';\n\nexport type ControlHideShowFunction<T = any> = (this: T, control: AbstractControl) => boolean | null;\n\nexport interface ControlHideShowOptions {\n /**\n * Weather the hide/showFunction should be called on root group changes\n */\n rootChange?: boolean;\n}\n\nexport function UseHideFunction(hideFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, hideFunction, RXAP_FORM_SYSTEM_HIDE_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport function UseShowFunction(showFunction: ControlHideShowFunction, options: ControlHideShowOptions = {}) {\n return function(target: any, propertyKey: string) {\n setMetadataMap(propertyKey, showFunction, RXAP_FORM_SYSTEM_SHOW_METADATA, target);\n if (Object.keys(options).length) {\n setMetadataMap(propertyKey, options, RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, target);\n }\n };\n}\n\nexport interface ControlHideShowDirective extends ExtractControlMixin,\n ExtractFormDefinitionMixin {}\n\n@Mixin(ExtractControlMixin, ExtractFormDefinitionMixin)\n@Directive({\n selector: '[rxapControlHideShow]'\n})\nexport class ControlHideShowDirective implements OnInit, OnDestroy {\n\n @Input('rxapControlHideShow')\n public controlId?: string;\n\n public control!: RxapFormControl;\n\n private subscription = new Subscription();\n\n constructor(\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef,\n @Optional()\n @Inject(ControlContainer)\n private readonly parent: ControlContainer | null,\n @Self()\n @Optional()\n @Inject(NgControl)\n private readonly ngControl: NgControl | null\n ) { }\n\n public ngOnInit() {\n\n if (!this.ngControl && !this.parent) {\n throw new Error('Easier the ControlContainer or NgControl must be injectable');\n }\n\n if (!this.ngControl && !this.controlId) {\n throw new Error('If the NgControl is not injectable then the control id must be defined!');\n }\n\n const control = this.ngControl?.control ?? this.extractControl(this.parent!, this.controlId!);\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('The control is not an instance of RxapFormControl');\n }\n\n this.control = control;\n\n const formDefinition = this.extractFormDefinition(control);\n\n const hideFunction = this.extractHideFunction(formDefinition);\n\n const showFunction = this.extractShowFunction(formDefinition);\n\n const options = this.extractOptions(formDefinition);\n\n let changeTrigger = formDefinition.rxapFormGroup.valueChanges;\n\n if (options.rootChange) {\n changeTrigger = formDefinition.rxapFormGroup.root.valueChanges;\n }\n\n changeTrigger = changeTrigger.pipe(startWith(null));\n\n if (showFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the showFunction throws an error\n const show = showFunction.call(formDefinition, control);\n\n switch (show) {\n\n case true:\n this.show();\n break;\n\n case false:\n this.hide();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n if (hideFunction) {\n this.subscription.add(\n changeTrigger.pipe(\n tap(() => {\n // TODO : resubscribe if the hideFunction throws an error\n const hide = hideFunction.call(formDefinition, control);\n\n switch (hide) {\n\n case true:\n this.hide();\n break;\n\n case false:\n this.show();\n break;\n\n case null:\n this.reset();\n break;\n\n }\n\n }),\n catchError(err => {\n console.error(err);\n return of(null);\n }),\n ).subscribe(),\n );\n }\n\n }\n\n public ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private extractOptions(formDefinition: FormDefinition): ControlHideShowOptions {\n const map = getMetadata<Map<string, ControlHideShowOptions>>(RXAP_FORM_SYSTEM_HIDE_SHOW_OPTIONS, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return {};\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractHideFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_HIDE_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private extractShowFunction(formDefinition: FormDefinition): ControlHideShowFunction | null {\n const map = getMetadata<Map<string, ControlHideShowFunction>>(RXAP_FORM_SYSTEM_SHOW_METADATA, Object.getPrototypeOf(formDefinition)) ?? null;\n\n if (!map || !map.has(this.control.controlId)) {\n return null;\n }\n\n return map.get(this.control.controlId)!;\n\n }\n\n private hide() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');\n }\n\n private show() {\n this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'block');\n }\n\n private reset() {\n this.renderer.removeStyle(this.elementRef.nativeElement, 'display');\n }\n\n\n}\n\n@NgModule({\n declarations: [ ControlHideShowDirective ],\n exports: [ ControlHideShowDirective ]\n})\nexport class ControlHideShowDirectiveModule {}\n","import {\n Directive,\n TemplateRef,\n OnInit,\n Inject,\n ViewContainerRef,\n Input,\n OnDestroy,\n Injector,\n INJECTOR,\n Optional,\n ChangeDetectorRef,\n NgModule,\n isDevMode,\n AfterViewInit\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport {\n DataSourceLoader,\n BaseDataSource,\n BaseDataSourceViewer,\n BaseDataSourceMetadata,\n PipeDataSource\n} from '@rxap/data-source';\nimport { RxapFormControl } from '@rxap/forms';\nimport {\n ControlOptions,\n ControlOption,\n Required\n} from '@rxap/utilities';\nimport { Mixin } from '@rxap/mixin';\nimport { Subscription } from 'rxjs';\nimport {\n tap,\n map\n} from 'rxjs/operators';\nimport { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';\nimport { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';\nimport {\n UseDataSource,\n UseDataSourceSettings\n} from '../decorators/use-data-source';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\nimport {\n MAT_FORM_FIELD,\n MatFormField\n} from '@angular/material/form-field';\nimport { MatAutocomplete } from '@angular/material/autocomplete';\n\nexport interface InputSelectOptionsTemplateContext {\n $implicit: ControlOption;\n}\n\nexport interface InputSelectOptionsSettings<Source> extends UseDataSourceSettings<Source, ControlOptions | Record<string, any>> {}\n\n\nexport const DATA_SOURCE_NAME = 'options';\n\nexport function ComposeOptionsTransformers(...fnc: Array<(value: any) => any>): (value: any) => any {\n return base => fnc.reduce((source, transform) => transform(source), base);\n}\n\n// tslint:disable-next-line:max-line-length\nexport function UseOptionsDataSource<Source>(\n dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>,\n settings?: InputSelectOptionsSettings<Source>\n): (\n target: any,\n propertyKey: string\n) => any;\nexport function UseOptionsDataSource(\n dataSource: IdOrInstanceOrToken<BaseDataSource>,\n settings?: InputSelectOptionsSettings<ControlOptions>\n) {\n return function(target: any, propertyKey: string) {\n UseDataSource(dataSource, DATA_SOURCE_NAME, settings)(target, propertyKey);\n };\n}\n\nexport interface InputSelectOptionsDirective extends OnInit,\n ExtractFormDefinitionMixin,\n ExtractDataSourcesMixin {}\n\n@Mixin(ExtractFormDefinitionMixin, ExtractDataSourcesMixin)\n@Directive({\n selector: '[rxapInputSelectOptions]'\n})\nexport class InputSelectOptionsDirective implements OnDestroy, AfterViewInit {\n\n @Input('rxapInputSelectOptionsViewer')\n public viewer: BaseDataSourceViewer = { id: '[rxapInputSelectOptions]' };\n\n @Input('rxapInputSelectOptionsMetadata')\n public metadata?: BaseDataSourceMetadata;\n\n @Input('rxapInputSelectOptionsMatAutocomplete')\n public matAutocomplete?: MatAutocomplete;\n\n protected readonly subscription = new Subscription();\n\n @Required\n protected control!: RxapFormControl;\n\n @Required\n protected dataSource!: BaseDataSource<ControlOptions | Record<string, any>>;\n\n @Required\n protected options!: ControlOptions | Record<string, any> | null;\n\n constructor(\n @Inject(TemplateRef)\n protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>,\n @Inject(DataSourceLoader)\n protected readonly dataSourceLoader: DataSourceLoader,\n @Inject(ViewContainerRef)\n protected readonly viewContainerRef: ViewContainerRef,\n @Inject(INJECTOR)\n protected readonly injector: Injector,\n @Inject(ChangeDetectorRef)\n protected readonly cdr: ChangeDetectorRef,\n // The ngControl could be unknown on construction\n // bc it is available after the content is init\n @Optional()\n @Inject(NgControl)\n protected ngControl: NgControl | null = null,\n @Optional()\n @Inject(MAT_FORM_FIELD)\n protected matFormField: MatFormField | null = null,\n ) { }\n\n public ngAfterViewInit() {\n this.extractControl();\n this.extractDatasource();\n this.viewer = {\n id: '[rxapInputSelectOptions]' + this.control.controlId,\n viewChange: this.control.value$,\n control: this.control,\n }\n this.loadOptions();\n if (this.matAutocomplete) {\n this.matAutocomplete.displayWith = this.toDisplay.bind(this);\n }\n }\n\n protected extractDatasource(control: RxapFormControl = this.control): BaseDataSource<ControlOptions | Record<string, any>> {\n const formDefinition = this.extractFormDefinition(control);\n\n const useDataSourceValueMap = this.extractDataSources(formDefinition, control.controlId);\n\n if (!useDataSourceValueMap.has(DATA_SOURCE_NAME)) {\n throw new Error(`The data source with the name 'options' is not defined`);\n }\n\n const useDataSourceValue = useDataSourceValueMap.get(DATA_SOURCE_NAME)!;\n\n let dataSource: BaseDataSource;\n\n try {\n\n dataSource = this.dataSourceLoader.load(\n useDataSourceValue.dataSource,\n this.metadata,\n this.injector\n );\n\n } catch (e) {\n\n if (e.name && e.name === 'NullInjectorError') {\n if (isDevMode()) {\n console.error('Cloud not inject the options data source', useDataSourceValue);\n }\n throw new Error('Cloud not inject the options data source:\\n' + e.message);\n }\n\n throw e;\n\n }\n\n const settings = useDataSourceValue.settings;\n\n if (settings?.transformer) {\n dataSource = new PipeDataSource(dataSource, map(settings.transformer));\n }\n\n return this.dataSource = dataSource;\n }\n\n public toDisplay(value: any): string {\n if (!value) {\n return '';\n }\n return this.options?.find((option: any) => option.value === value)?.display ?? 'to display error';\n }\n\n protected extractControl(ngControl: NgControl | null = this.ngControl ?? this.matFormField?._control?.ngControl ?? null): RxapFormControl {\n\n if (!ngControl) {\n throw new Error('The ngControl is not defined!');\n }\n\n this.ngControl = ngControl;\n\n const control = this.ngControl.control;\n\n if (!(control instanceof RxapFormControl)) {\n throw new Error('Control is not a RxapFormControl!');\n }\n\n return this.control = control;\n }\n\n public ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n\n private loadOptions(dataSource: BaseDataSource<ControlOptions | Record<string, any>> = this.dataSource) {\n this.subscription.add(dataSource.connect(this.viewer).pipe(\n tap(options => this.renderTemplate(this.options = options))\n ).subscribe());\n }\n\n protected renderTemplate(options: ControlOptions | Record<string, any> | null = this.options) {\n this.viewContainerRef.clear();\n\n if (options) {\n if (!Array.isArray(options)) {\n\n for (const [ value, display ] of Object.entries(options)) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: { value, display } });\n }\n\n } else {\n\n for (const option of options) {\n this.viewContainerRef.createEmbeddedView(this.template, { $implicit: option });\n }\n\n }\n } else {\n if (isDevMode()) {\n console.warn(`The options for the control ${this.control.fullControlPath} is empty/null/undefined!`);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n}\n\n@NgModule({\n declarations: [ InputSelectOptionsDirective ],\n exports: [ InputSelectOptionsDirective ]\n})\nexport class InputSelectOptionsDirectiveModule {}\n","import { NgModule } from '@angular/core';\nimport { InputSelectOptionsDirectiveModule } from './input-select-options.directive';\nimport { ControlHideShowDirectiveModule } from './control-hide-show.directive';\n\n@NgModule({\n exports: [\n InputSelectOptionsDirectiveModule,\n ControlHideShowDirectiveModule\n ]\n})\nexport class FormSystemDirectivesModule {}\n","import {\n Directive,\n forwardRef,\n Input,\n NgModule\n} from '@angular/core';\nimport {\n AbstractControl,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { Required } from '@rxap/utilities';\n\n@Directive({\n selector: '[rxapIsEqualTo]',\n providers: [\n {\n provide: NG_VALIDATORS,\n multi: true,\n useExisting: forwardRef(() => IsEqualToDirective)\n }\n ]\n})\nexport class IsEqualToDirective implements Validator {\n\n @Input('rxapIsEqualTo')\n @Required\n public set equalTo(value: any) {\n this._equalTo = value;\n if (this._onChange) {\n this._onChange();\n }\n }\n\n private _onChange!: () => void;\n\n\n private _equalTo!: any;\n\n public validate(control: AbstractControl): ValidationErrors | null {\n if (this._equalTo === null || this._equalTo === control.value) {\n return null;\n }\n return { isEqualTo: { value: this._equalTo, actualValue: control.value } };\n }\n\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n public registerOnValidatorChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n}\n\n@NgModule({\n declarations: [ IsEqualToDirective ],\n exports: [ IsEqualToDirective ]\n})\nexport class IsEqualToDirectiveModule {\n}\n","export * from './lib/form-system.module';\n\nexport * from './lib/error';\nexport * from './lib/control-data-source';\n\n// region mixin\n\nexport * from './lib/mixins/extract-data-sources.mixin';\nexport * from './lib/mixins/extract-control.mixin';\nexport * from './lib/mixins/extract-form-definition.mixin';\n\n// endregion\n\n// region components\n\nexport * from './lib/form-system-control.directive';\n\n\n// endregion\n\n// region decorators\n\nexport * from './lib/decorators/metadata-keys';\nexport * from './lib/decorators/use-component';\nexport * from './lib/decorators/use-data-source';\nexport * from './lib/decorators/use-form-component';\n\n// endregion\n\n// region directives\n\nexport * from './lib/directives/control-hide-show.directive';\nexport * from './lib/directives/form-directives.module';\nexport * from './lib/directives/input-select-options.directive';\n\n// endregion\n\n// region validators\n\nexport * from './lib/validators/is-equal-to';\n\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAEa,mBAAoB,SAAQ,SAAS;IAEhD,YAAY,OAAe,EAAE,IAAY,EAAE,SAAkB;QAC3D,KAAK,CAAC,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;KACtD;;;ICNS;AAAZ,WAAY,sBAAsB;IAChC,oEAAqD,CAAA;IACrD,wEAAuD,CAAA;IACvD,0FAAgE,CAAA;IAChE,mFAAyD,CAAA;AAC3D,CAAC,EALW,sBAAsB,KAAtB,sBAAsB;;MCMrB,uBAAuB;IAExB,kBAAkB,CAAC,cAA8B,EAAE,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YAC7D,OAAO,IAAI,CAAC;SACb;QACD,OAAO,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;KAC5E;;;;;;;IAQM,yBAAyB,CAAC,EAAc;QAC7C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;KACrB;;+GA/BU,kBAAkB;mGAAlB,kBAAkB,6FARlB;QACT;YACE,OAAO,EAAM,aAAa;YAC1B,KAAK,EAAQ,IAAI;YACjB,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAkB,CAAC;SAClD;KACF;AAMD;IADC,QAAQ;;;iDAMR;2FATU,kBAAkB;kBAV9B,SAAS;mBAAC;oBACT,QAAQ,EAAG,iBAAiB;oBAC5B,SAAS,EAAE;wBACT;4BACE,OAAO,EAAM,aAAa;4BAC1B,KAAK,EAAQ,IAAI;4BACjB,WAAW,EAAE,UAAU,CAAC,wBAAwB,CAAC;yBAClD;qBACF;iBACF;8BAKY,OAAO;sBAFjB,KAAK;uBAAC,eAAe;;MAqCX,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,iBAvCxB,kBAAkB,aAAlB,kBAAkB;sHAuClB,wBAAwB;2FAAxB,wBAAwB;kBAJpC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,kBAAkB,CAAE;oBACpC,OAAO,EAAO,CAAE,kBAAkB,CAAE;iBACrC;;;ACrBD;;ACzCA;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { TemplateRef, OnInit, ViewContainerRef, OnDestroy, Injector, ChangeDetectorRef } from '@angular/core';
1
+ import { TemplateRef, OnInit, ViewContainerRef, OnDestroy, Injector, ChangeDetectorRef, AfterViewInit } from '@angular/core';
2
2
  import { NgControl } from '@angular/forms';
3
3
  import { DataSourceLoader, BaseDataSource, BaseDataSourceViewer, BaseDataSourceMetadata } from '@rxap/data-source';
4
4
  import { RxapFormControl } from '@rxap/forms';
@@ -8,6 +8,8 @@ import { ExtractDataSourcesMixin } from '../mixins/extract-data-sources.mixin';
8
8
  import { ExtractFormDefinitionMixin } from '../mixins/extract-form-definition.mixin';
9
9
  import { UseDataSourceSettings } from '../decorators/use-data-source';
10
10
  import { IdOrInstanceOrToken } from '@rxap/definition';
11
+ import { MatFormField } from '@angular/material/form-field';
12
+ import { MatAutocomplete } from '@angular/material/autocomplete';
11
13
  import * as i0 from "@angular/core";
12
14
  export interface InputSelectOptionsTemplateContext {
13
15
  $implicit: ControlOption;
@@ -19,28 +21,31 @@ export declare function ComposeOptionsTransformers(...fnc: Array<(value: any) =>
19
21
  export declare function UseOptionsDataSource<Source>(dataSource: IdOrInstanceOrToken<BaseDataSource<Source>>, settings?: InputSelectOptionsSettings<Source>): (target: any, propertyKey: string) => any;
20
22
  export interface InputSelectOptionsDirective extends OnInit, ExtractFormDefinitionMixin, ExtractDataSourcesMixin {
21
23
  }
22
- export declare class InputSelectOptionsDirective implements OnInit, OnDestroy {
24
+ export declare class InputSelectOptionsDirective implements OnDestroy, AfterViewInit {
23
25
  protected readonly template: TemplateRef<InputSelectOptionsTemplateContext>;
24
26
  protected readonly dataSourceLoader: DataSourceLoader;
25
27
  protected readonly viewContainerRef: ViewContainerRef;
26
28
  protected readonly injector: Injector;
27
29
  protected readonly cdr: ChangeDetectorRef;
28
30
  protected ngControl: NgControl | null;
31
+ protected matFormField: MatFormField | null;
29
32
  viewer: BaseDataSourceViewer;
30
33
  metadata?: BaseDataSourceMetadata;
34
+ matAutocomplete?: MatAutocomplete;
31
35
  protected readonly subscription: Subscription;
32
36
  protected control: RxapFormControl;
33
37
  protected dataSource: BaseDataSource<ControlOptions | Record<string, any>>;
34
38
  protected options: ControlOptions | Record<string, any> | null;
35
- constructor(template: TemplateRef<InputSelectOptionsTemplateContext>, dataSourceLoader: DataSourceLoader, viewContainerRef: ViewContainerRef, injector: Injector, cdr: ChangeDetectorRef, ngControl?: NgControl | null);
36
- protected extractControl(ngControl?: NgControl | null): RxapFormControl;
39
+ constructor(template: TemplateRef<InputSelectOptionsTemplateContext>, dataSourceLoader: DataSourceLoader, viewContainerRef: ViewContainerRef, injector: Injector, cdr: ChangeDetectorRef, ngControl?: NgControl | null, matFormField?: MatFormField | null);
40
+ ngAfterViewInit(): void;
37
41
  protected extractDatasource(control?: RxapFormControl): BaseDataSource<ControlOptions | Record<string, any>>;
38
- ngOnInit(): void;
42
+ toDisplay(value: any): string;
43
+ protected extractControl(ngControl?: NgControl | null): RxapFormControl;
39
44
  ngOnDestroy(): void;
40
45
  private loadOptions;
41
46
  protected renderTemplate(options?: ControlOptions | Record<string, any> | null): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<InputSelectOptionsDirective, [null, null, null, null, null, { optional: true; }]>;
43
- static ɵdir: i0.ɵɵDirectiveDeclaration<InputSelectOptionsDirective, "[rxapInputSelectOptions]", never, { "viewer": "rxapInputSelectOptionsViewer"; "metadata": "rxapInputSelectOptionsMetadata"; }, {}, never>;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputSelectOptionsDirective, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
48
+ static ɵdir: i0.ɵɵDirectiveDeclaration<InputSelectOptionsDirective, "[rxapInputSelectOptions]", never, { "viewer": "rxapInputSelectOptionsViewer"; "metadata": "rxapInputSelectOptionsMetadata"; "matAutocomplete": "rxapInputSelectOptionsMatAutocomplete"; }, {}, never>;
44
49
  }
45
50
  export declare class InputSelectOptionsDirectiveModule {
46
51
  static ɵfac: i0.ɵɵFactoryDeclaration<InputSelectOptionsDirectiveModule, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxap/form-system",
3
- "version": "12.0.11",
3
+ "version": "12.1.0",
4
4
  "private": false,
5
5
  "author": "Merzough Münker",
6
6
  "homepage": "https://gitlab.com/rxap/packages/libs/form-system",
@@ -18,19 +18,21 @@
18
18
  "description": "Provides the FormSystem concept for RxAP.",
19
19
  "license": "MIT",
20
20
  "peerDependencies": {
21
+ "@angular-devkit/schematics": "^12.2.9",
21
22
  "@angular/cdk": "^12.0.1",
22
23
  "@angular/common": "^12.0.1",
23
24
  "@angular/core": "^12.0.1",
24
25
  "@angular/forms": "^12.0.1",
26
+ "@angular/material": "^12.0.1",
25
27
  "@angular/platform-browser": "^12.0.1",
26
28
  "@angular/router": "^12.0.1",
27
- "@rxap/data-source": "^12.1.1",
29
+ "@rxap/data-source": "^12.1.3",
28
30
  "@rxap/definition": "^12.0.8",
29
- "@rxap/directives": "^12.1.2",
30
- "@rxap/forms": "^12.5.0",
31
+ "@rxap/directives": "^12.2.0",
32
+ "@rxap/forms": "^12.6.1",
31
33
  "@rxap/mixin": "^12.0.7",
32
- "@rxap/services": "^12.0.7",
33
- "@rxap/utilities": "^12.2.1",
34
+ "@rxap/services": "^12.0.8",
35
+ "@rxap/utilities": "^12.2.2",
34
36
  "reflect-metadata": "^0.1.13",
35
37
  "rxjs": "^6.5.5"
36
38
  },
@@ -56,7 +58,7 @@
56
58
  "save": "dependencies"
57
59
  },
58
60
  "dependencies": {
59
- "@rxap/schematics-utilities": "^12.6.0",
61
+ "@rxap/schematics-utilities": "^12.7.0",
60
62
  "tslib": "^2.2.0",
61
63
  "uuid": "8.3.2",
62
64
  "@rxap/validator": "0.0.2"