rb-document-form-constructor 0.8.80 → 0.8.81

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.
@@ -128,8 +128,9 @@ let __applyDefaultProps = function (input, field) {
128
128
  for (let propName in input.props) {
129
129
  if (field) {
130
130
  if (field.input.propsData[propName]) {
131
+ var _input$propsData, _input$props;
131
132
  input.propsData[propName] = field.input.propsData[propName];
132
- if (input.propsData?.type && input.props?.type?.default) {
133
+ if ((_input$propsData = input.propsData) !== null && _input$propsData !== void 0 && _input$propsData.type && (_input$props = input.props) !== null && _input$props !== void 0 && (_input$props = _input$props.type) !== null && _input$props !== void 0 && _input$props.default) {
133
134
  input.propsData.type = input.props.type.default;
134
135
  }
135
136
  }
@@ -139,7 +140,7 @@ let __applyDefaultProps = function (input, field) {
139
140
  }
140
141
  };
141
142
  let __applyRefProps = function (input, refConfig) {
142
- if (refConfig?.propsData) {
143
+ if (refConfig !== null && refConfig !== void 0 && refConfig.propsData) {
143
144
  for (let propName in refConfig.propsData) {
144
145
  input.propsData[propName] = refConfig.propsData[propName];
145
146
  }
@@ -8619,10 +8620,11 @@ var script$3 = {
8619
8620
  UtFormConstructor.runRule(this.createRuleContext(context), rule.script);
8620
8621
  },
8621
8622
  isValueEmpty(fieldName) {
8623
+ var _this$doc$fieldName;
8622
8624
  if (this.doc[fieldName] == null) {
8623
8625
  return true;
8624
8626
  }
8625
- if (Array.isArray(this.doc[fieldName]) && !this.doc[fieldName]?.length) {
8627
+ if (Array.isArray(this.doc[fieldName]) && !((_this$doc$fieldName = this.doc[fieldName]) !== null && _this$doc$fieldName !== void 0 && _this$doc$fieldName.length)) {
8626
8628
  return true;
8627
8629
  }
8628
8630
  if (_typeof(this.doc[fieldName] === 'string') && this.doc[fieldName] === '') {
@@ -8632,7 +8634,8 @@ var script$3 = {
8632
8634
  },
8633
8635
  isValueLessThanMax(fieldname, max) {
8634
8636
  if (this.doc[fieldname] && max) {
8635
- return this.doc[fieldname]?.length > parseInt(max);
8637
+ var _this$doc$fieldname;
8638
+ return ((_this$doc$fieldname = this.doc[fieldname]) === null || _this$doc$fieldname === void 0 ? void 0 : _this$doc$fieldname.length) > parseInt(max);
8636
8639
  }
8637
8640
  return false;
8638
8641
  },
@@ -8646,6 +8649,7 @@ var script$3 = {
8646
8649
  this.formConfig.sections.forEach(s => {
8647
8650
  s.columns.forEach(c => {
8648
8651
  c.fields.forEach(f => {
8652
+ var _f$input$propsData;
8649
8653
  let feedback = '';
8650
8654
  if (f.required && this.isValueEmpty(f.name)) {
8651
8655
  feedback += i18n.t('validate.required', {
@@ -8658,8 +8662,9 @@ var script$3 = {
8658
8662
  })}`;
8659
8663
  }
8660
8664
  // TODO: Костыль так как на бэке нету типа memo
8661
- if (f.input.type === 'b-form-textarea' && this.isValueLessThanMax(f.name, f.input.propsData?.max)) {
8662
- feedback += `\nМаксимальное значение для этого поля ${f.input.propsData?.max}`;
8665
+ if (f.input.type === 'b-form-textarea' && this.isValueLessThanMax(f.name, (_f$input$propsData = f.input.propsData) === null || _f$input$propsData === void 0 ? void 0 : _f$input$propsData.max)) {
8666
+ var _f$input$propsData2;
8667
+ feedback += `\nМаксимальное значение для этого поля ${(_f$input$propsData2 = f.input.propsData) === null || _f$input$propsData2 === void 0 ? void 0 : _f$input$propsData2.max}`;
8663
8668
  }
8664
8669
  if (feedback) {
8665
8670
  Vue$1.set(this.validationState, f.name, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rb-document-form-constructor",
3
- "version": "0.8.80",
3
+ "version": "0.8.81",
4
4
  "description": "",
5
5
  "main": "dist/rb-document-form-constructor.ssr.js",
6
6
  "browser": "dist/rb-document-form-constructor.esm.js",