@stemy/ngx-dynamic-form 10.2.29 → 10.2.32

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.
@@ -568,9 +568,10 @@
568
568
 
569
569
  var DynamicFormService = /** @class */ (function (_super) {
570
570
  __extends(DynamicFormService, _super);
571
- function DynamicFormService(cs, vs, openApi) {
571
+ function DynamicFormService(cs, vs, openApi, injector) {
572
572
  var _this = _super.call(this, cs, vs) || this;
573
573
  _this.openApi = openApi;
574
+ _this.injector = injector;
574
575
  _this.onDetectChanges = new core$1.EventEmitter();
575
576
  return _this;
576
577
  }
@@ -777,6 +778,7 @@
777
778
  DynamicFormService.prototype.getFormModelForSchema = function (name, customizeModel) {
778
779
  return __awaiter(this, void 0, void 0, function () {
779
780
  var _c, customizeModels;
781
+ var _this = this;
780
782
  return __generator(this, function (_d) {
781
783
  switch (_d.label) {
782
784
  case 0:
@@ -789,7 +791,7 @@
789
791
  var model = new modelType(config);
790
792
  if (!ngxUtils.ObjectUtils.isFunction(customizeModel))
791
793
  return [model];
792
- var res = customizeModel(property, schema, model, config);
794
+ var res = customizeModel(property, schema, model, config, _this.injector);
793
795
  return Array.isArray(res) ? res : [res];
794
796
  };
795
797
  return [2 /*return*/, this.getFormModelForSchemaDef(this.schemas[name], customizeModels)];
@@ -879,7 +881,7 @@
879
881
  };
880
882
  DynamicFormService.prototype.getFormInputConfig = function (property, schema) {
881
883
  var _a;
882
- var inputType = ngxUtils.StringUtils.has(property.id, "password", "Password") ? "password" : (((_a = property.items) === null || _a === void 0 ? void 0 : _a.type) || property.type);
884
+ var inputType = ngxUtils.StringUtils.has(property.id, "password", "Password") ? "password" : (property.format || ((_a = property.items) === null || _a === void 0 ? void 0 : _a.type) || property.type);
883
885
  switch (inputType) {
884
886
  case "boolean":
885
887
  inputType = "checkbox";
@@ -904,6 +906,7 @@
904
906
  max: isNaN(sub.maximum) ? Number.MAX_SAFE_INTEGER : sub.maximum,
905
907
  minLength: isNaN(sub.minLength) ? Number.MIN_SAFE_INTEGER : sub.minLength,
906
908
  maxLength: isNaN(sub.maxLength) ? Number.MAX_SAFE_INTEGER : sub.maxLength,
909
+ placeholder: property.placeholder || ""
907
910
  });
908
911
  };
909
912
  DynamicFormService.prototype.getFormTextareaConfig = function (property, schema) {
@@ -1086,7 +1089,8 @@
1086
1089
  DynamicFormService.ctorParameters = function () { return [
1087
1090
  { type: core.DynamicFormComponentService },
1088
1091
  { type: core.DynamicFormValidationService },
1089
- { type: ngxUtils.OpenApiService }
1092
+ { type: ngxUtils.OpenApiService, decorators: [{ type: core$1.Inject, args: [ngxUtils.OpenApiService,] }] },
1093
+ { type: core$1.Injector, decorators: [{ type: core$1.Inject, args: [core$1.Injector,] }] }
1090
1094
  ]; };
1091
1095
 
1092
1096
  var AsyncSubmitDirective = /** @class */ (function () {