rb-document-form-constructor 0.3.9 → 0.4.3

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.
@@ -87,7 +87,7 @@ const UtFormConfig = {
87
87
  formConfig.sections.every(section => {
88
88
  section.columns.every(c => {
89
89
  c.fields.forEach(f => {
90
- if (!facets.indexOf(f.facet)) {
90
+ if (facets.indexOf(f.facet) < 0) {
91
91
  facets.push(f.facet);
92
92
  }
93
93
  });
@@ -4950,6 +4950,39 @@ let fcInputs = {
4950
4950
  },
4951
4951
  propsData: {},
4952
4952
  defaultValue: null
4953
+ },
4954
+ boolean: {
4955
+ text: 'Булевое',
4956
+ name: 'boolean',
4957
+ type: 'rb-boolean-button-input',
4958
+ props: {
4959
+ label: {
4960
+ type: 'string',
4961
+ default: 'Выбрать',
4962
+ label: 'Название',
4963
+ visible: true
4964
+ },
4965
+ showCheckbox: {
4966
+ type: 'boolean',
4967
+ label: 'Показать чекбокс',
4968
+ default: false,
4969
+ visible: true
4970
+ },
4971
+ block: {
4972
+ type: 'boolean',
4973
+ default: true,
4974
+ label: 'Растянуть',
4975
+ visible: true
4976
+ },
4977
+ bordered: {
4978
+ type: 'boolean',
4979
+ label: 'Граница вокруг',
4980
+ default: true,
4981
+ visible: true
4982
+ }
4983
+ },
4984
+ propsData: {},
4985
+ defaultValue: null
4953
4986
  }
4954
4987
  };
4955
4988
  let fcPrimitiveInputs = {
@@ -4961,7 +4994,8 @@ let fcPrimitiveInputs = {
4961
4994
  integer: [__clone(fcInputs.string), __clone(fcInputs.number)],
4962
4995
  long: [__clone(fcInputs.string), __clone(fcInputs.number)],
4963
4996
  date: [__clone(fcInputs.date)],
4964
- datetime: [__clone(fcInputs.datetime)]
4997
+ datetime: [__clone(fcInputs.datetime)],
4998
+ boolean: [__clone(fcInputs.boolean)]
4965
4999
  };
4966
5000
  let fcDictInputs = [];
4967
5001
  let fcRefInputs = {};
@@ -5018,8 +5052,6 @@ const UtFormConstructor = {
5018
5052
 
5019
5053
  if (formConfig.rules) {
5020
5054
  this.config.rules = formConfig.rules;
5021
- console.log("THIS.CONFIG", this.config);
5022
- console.log("THIS.CONFIG.RULES", this.config.rules);
5023
5055
  }
5024
5056
 
5025
5057
  if (formConfig.ruleContext) {
@@ -11025,7 +11057,7 @@ var script$3 = {
11025
11057
 
11026
11058
  methods: {
11027
11059
  onEventFired(eventName, event, field) {
11028
- if (eventName === 'input' && field.ref) {
11060
+ if (eventName === 'input' && field.ref && !field.multiple) {
11029
11061
  let dataField = null;
11030
11062
 
11031
11063
  if (field.name.lastIndexOf(this.refSuffix) >= 0) {
@@ -11225,7 +11257,6 @@ var script$2 = {
11225
11257
  },
11226
11258
 
11227
11259
  rulePresets() {
11228
- console.log("rulePresets", UtFormConstructor.getAvailableFieldRules(this.field));
11229
11260
  return UtFormConstructor.getAvailableFieldRules(this.field);
11230
11261
  }
11231
11262