rb-document-form-constructor 0.9.26 → 0.9.27

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.
@@ -243,54 +243,29 @@ let fcInputs = {
243
243
  propsData: {},
244
244
  defaultValue: null
245
245
  },
246
- date: {
247
- text: 'Дата',
248
- name: 'date',
249
- type: 'rb-date-picker-input',
250
- props: {
251
- minCurrentDate: {
252
- type: 'boolean',
253
- default: false,
254
- label: 'Установить текущую дату как минимальную',
255
- visible: true
256
- },
257
- minDate: {
258
- type: 'date',
259
- default: null,
260
- label: 'Установить минимальную дату',
261
- visible: true
262
- },
263
- maxDate: {
264
- type: 'date',
265
- default: null,
266
- label: 'Установить максимальную дату',
267
- visible: true
268
- }
269
- },
270
- propsData: {},
271
- defaultValue: null
272
- },
273
- datetime: {
274
- text: 'Дата и вермя',
275
- name: 'date',
276
- type: 'rb-date-picker-input',
277
- props: {
278
- minDate: {
279
- type: 'date',
280
- default: null,
281
- label: 'Установить минимальную дату',
282
- visible: true
283
- },
284
- maxDate: {
285
- type: 'date',
286
- default: null,
287
- label: 'Установить максимальную дату',
288
- visible: true
289
- }
290
- },
291
- propsData: {},
292
- defaultValue: null
293
- },
246
+ // date: {
247
+ // text: 'Дата',
248
+ // name: 'date',
249
+ // type: 'rb-date-picker-input',
250
+ // props: {
251
+ // minCurrentDate: {type: 'boolean', default: false, label: 'Установить текущую дату как минимальную', visible: true},
252
+ // minDate: {type: 'date', default: null, label: 'Установить минимальную дату', visible: true},
253
+ // maxDate: {type: 'date', default: null, label: 'Установить максимальную дату', visible: true},
254
+ // },
255
+ // propsData: {},
256
+ // defaultValue: null,
257
+ // },
258
+ // datetime: {
259
+ // text: 'Дата и вермя',
260
+ // name: 'date',
261
+ // type: 'rb-date-picker-input',
262
+ // props: {
263
+ // minDate: {type: 'date', default: null, label: 'Установить минимальную дату', visible: true},
264
+ // maxDate: {type: 'date', default: null, label: 'Установить максимальную дату', visible: true},
265
+ // },
266
+ // propsData: {},
267
+ // defaultValue: null,
268
+ // },
294
269
  phone: {
295
270
  text: 'Телефон',
296
271
  name: 'phone',
@@ -345,8 +320,12 @@ let fcPrimitiveInputs = {
345
320
  float: [__clone(fcInputs.string), __clone(fcInputs.number)],
346
321
  integer: [__clone(fcInputs.string), __clone(fcInputs.number)],
347
322
  long: [__clone(fcInputs.string), __clone(fcInputs.number)],
348
- date: [__clone(fcInputs.date)],
349
- datetime: [__clone(fcInputs.datetime)],
323
+ // date: [
324
+ // __clone(fcInputs.date)
325
+ // ],
326
+ // datetime: [
327
+ // __clone(fcInputs.datetime)
328
+ // ],
350
329
  boolean: [__clone(fcInputs.boolean)],
351
330
  email: [__clone(fcInputs.email)]
352
331
  };
@@ -1,4 +1,4 @@
1
- var RbDocumentFormConstructor=function(Vue){"use strict";function _interopDefaultLegacy(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Vue__default=_interopDefaultLegacy(Vue);function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty$1(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty$1(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(i.push(o.value),!e||i.length!==e);a=!0);}catch(t){l=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw r}}return i}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var UtFormConfig={findField:function(t,e){if(!e||!e.sections)return null;var n=null;return e.sections.every((function(e){if(e.columns&&e.columns.every((function(e){if(e.fields.forEach((function(e){e.name===t&&(n=e)})),n)return!1})),n)return!1})),n},findRule:function(t,e){if(!e||!e.sections)return null;var n=null;return e.sections.every((function(e){if(e.columns&&e.columns.every((function(e){if(e.fields.every((function(e){if(e.rules&&e.rules.forEach((function(e){e.id===t&&(n=e)})),n)return!1})),n)return!1})),n)return!1})),n},getFields:function(t){var e=[];return t.sections.forEach((function(t){t.columns&&t.columns.forEach((function(t){t.fields&&t.fields.forEach((function(t){e.push(t)}))}))})),e},parseFacets:function(t){var e=[];return t.sections.forEach((function(t){t.columns.forEach((function(t){t.fields.forEach((function(t){e.indexOf(t.facet)<0&&e.push(t.facet)}))}))})),e}},__clone=function(t){return JSON.parse(JSON.stringify(t))},_assign=function(){return _assign=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},_assign.apply(this,arguments)},__mergeInputInMapOfArrays=function(t,e){for(var n in e){var o=t[n];o?__mergeInputsInArray(o,e[n]):t[n]=e[n]}},__mergeInputsInMap=function(t,e){for(var n in e)t[n]=_assign(t[n]?t[n]:{},e[n]?e[n]:{})},__mergeInputsInArray=function(t,e){e.forEach((function(e){var n=t.findIndex((function(t){return t.name===e.name}));n>=0?t[n]=e:t.push(e)}))},__applyDefaultProps=function(t,e){for(var n in t.props)e&&e.input&&e.input.propsData&&n in e.input.propsData?t.propsData[n]=e.input.propsData[n]:t.propsData[n]=t.props[n].default},__applyRefProps=function(t,e){if(null!=e&&e.propsData)for(var n in e.propsData)t.propsData[n]=e.propsData[n]},__filterInputsByMultiple=function(t,e){return t.filter((function(t){return t.multiple&&e||!t.multiple&&!e}))},fcInputs={string:{text:"Текст",name:"string",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"text",label:"Тип данных",visible:!0}},propsData:{},defaultValue:null},number:{text:"Число",name:"number",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"number",label:"Тип данных",visible:!0},min:{type:"number",default:null,label:"Минимальное значение",visible:!0}},propsData:{},defaultValue:null},memo:{text:"Большой текст",name:"memo",type:"b-form-textarea",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},max:{type:"number",default:30,label:"Максимальное значение",visible:!0}},propsData:{},defaultValue:null},date:{text:"Дата",name:"date",type:"rb-date-picker-input",props:{minCurrentDate:{type:"boolean",default:!1,label:"Установить текущую дату как минимальную",visible:!0},minDate:{type:"date",default:null,label:"Установить минимальную дату",visible:!0},maxDate:{type:"date",default:null,label:"Установить максимальную дату",visible:!0}},propsData:{},defaultValue:null},datetime:{text:"Дата и вермя",name:"date",type:"rb-date-picker-input",props:{minDate:{type:"date",default:null,label:"Установить минимальную дату",visible:!0},maxDate:{type:"date",default:null,label:"Установить максимальную дату",visible:!0}},propsData:{},defaultValue:null},phone:{text:"Телефон",name:"phone",type:"rb-phone-input",props:{placeholder:{type:"string",default:"Телефон",label:"Надпись внутри",visible:!0}},propsData:{},defaultValue:null},boolean:{text:"Булевое",name:"boolean",type:"rb-boolean-single-option-input",props:{block:{type:"boolean",default:!0,label:"Растянуть",visible:!0},bordered:{type:"boolean",label:"Граница вокруг",default:!0,visible:!0}},propsData:{},defaultValue:null},email:{text:"Email",name:"email",type:"rb-email-input",props:{},propsData:{},defaultValue:[],multiple:!0}},fcPrimitiveInputs={string:[__clone(fcInputs.string),__clone(fcInputs.number),__clone(fcInputs.memo),__clone(fcInputs.phone)],memo:[__clone(fcInputs.memo),__clone(fcInputs.string)],number:[__clone(fcInputs.string),__clone(fcInputs.number)],double:[__clone(fcInputs.string),__clone(fcInputs.number)],float:[__clone(fcInputs.string),__clone(fcInputs.number)],integer:[__clone(fcInputs.string),__clone(fcInputs.number)],long:[__clone(fcInputs.string),__clone(fcInputs.number)],date:[__clone(fcInputs.date)],datetime:[__clone(fcInputs.datetime)],boolean:[__clone(fcInputs.boolean)],email:[__clone(fcInputs.email)]},fcDictInputs=[],fcRefInputs={},fcRefInputConfigs={},baseConfig={inputs:__clone(fcInputs),primitiveInputs:__clone(fcPrimitiveInputs),dictInputs:__clone(fcDictInputs),refInputs:__clone(fcRefInputs),refInputConfigs:__clone(fcRefInputConfigs),rules:[],icons:{iconExpandFacet:"icon-chevron-down",iconCollapseFacet:"icon-chevron-up",iconCloseFieldSidebar:"icon-chevron-right",iconOpenFieldSidebar:"icon-chevron-left",iconAdd:"icon-add",iconEdit:"icon-edit",iconDelete:"icon-delete",iconDrag:"icon-reorder"},ruleContext:{}},UtFormConstructor={config:{},init:function(t){this.config=__clone(baseConfig),t&&(t.inputs&&__mergeInputsInMap(this.config.inputs,t.inputs),t.primitiveInputs&&__mergeInputInMapOfArrays(this.config.primitiveInputs,t.primitiveInputs),t.dictInputs&&__mergeInputsInArray(this.config.dictInputs,t.dictInputs),t.refInputs&&__mergeInputInMapOfArrays(this.config.refInputs,t.refInputs),t.refInputConfigs&&(this.config.refInputConfigs=t.refInputConfigs),t.icons&&(this.config.icons=_assign(this.config.icons,t.icons)),t.rules&&(this.config.rules=t.rules),t.ruleContext&&(this.config.ruleContext=t.ruleContext))},getInputTypes:function(t){var e=[];return t?e=t.dict&&!this.config.refInputs[t.ref]?__filterInputsByMultiple(this.config.dictInputs,t.multiple):t.ref?__filterInputsByMultiple(this.config.refInputs[t.ref],t.multiple):__filterInputsByMultiple(this.config.primitiveInputs[t.type],t.multiple):e},hasMultipleInputTypes:function(t){var e=this.getInputTypes(_objectSpread2(_objectSpread2({},t),{},{multiple:!0}));return e&&e.length>0},getDefaultInput:function(t){var e=null,n=this.getInputTypes(t);return n||(e=this.primitiveInputs[0]),t.ref&&this.config.refInputs[t.ref]?(e=__clone(n[0]),__applyDefaultProps(e),this.config.refInputConfigs[t.ref]&&this.config.refInputConfigs[t.ref][e.name]&&__applyRefProps(e,this.config.refInputConfigs[t.ref][e.name])):t.dict?((e=__clone(n[0])).props.dict.default=t.ref,__applyDefaultProps(e)):(e=__clone(n[0]),__applyDefaultProps(e)),e},getInputTypeByName:function(t,e){var n=__clone(this.config.inputs[t]),o=e.input&&e.input.propsData?_objectSpread2({},e.input.propsData):{};return e.ref&&this.config.refInputs[e.ref]?(__applyDefaultProps(n,e),this.config.refInputConfigs[e.ref]&&this.config.refInputConfigs[e.ref][n.name]&&__applyRefProps(n,this.config.refInputConfigs[e.ref][n.name])):e.dict?(n.props.dict.default=e.ref,__applyDefaultProps(n,e)):__applyDefaultProps(n,e),o&&Object.assign(n.propsData,o),n.propsData.ref=e.name,n},getAvailableFieldRules:function(t){return this.config.rules.filter((function(e){return!e.fields||0===e.fields.length||e.fields.indexOf(t.name)>=0}))},getRuleContext:function(){return this.config.ruleContext},runRule:function runRule(context,script){context=context||{},context.console=console,context.Date=Date,context.Math=Math;var appendScript="";for(var v in context)appendScript+="var ".concat(v," = this.").concat(v,";\n");appendScript=appendScript?appendScript+"\n":"";var func=function func(script){return eval(script)};func.call(context,appendScript+script)}},script$5={name:"DocTemplateSectionModal",props:{section:Object,mode:{type:String,default:"ins"},onAfterOk:{type:Function,default:function(){}}},data:function(){return{id:"rb-doc-template-section-modal",label:{}}},computed:{title:function(){return"ins"===this.mode?"Добавление секции":"Редактирование секции"}},watch:{section:function(){this.section&&(this.label=this.section)}},methods:{onOk:function(){var t=this;this.section=this.label,this.onAfterOk&&this.onAfterOk(),this.$nextTick((function(){t.$bvModal.hide(t.id)}))}},created:function(){this.section&&(this.label=this.section)}};function normalizeComponent(t,e,n,o,r,i,a,l,s,c){"boolean"!=typeof a&&(s=l,l=a,a=!1);const u="function"==typeof n?n.options:n;let d;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),o&&(u._scopeId=o),i?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,s(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=d):e&&(d=a?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,l(t))}),d)if(u.functional){const t=u.render;u.render=function(e,n){return d.call(n),t(e,n)}}else{const t=u.beforeCreate;u.beforeCreate=t?[].concat(t,d):[d]}return n}var __vue_script__$5=script$5,__vue_render__$5=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-modal",{attrs:{id:"rb-doc-template-section-modal","modal-class":"rb-doc-template-section-modal","ok-title":"Сохранить изменения","cancel-variant":"outline-gray","cancel-title":"Отмена",title:t.title},on:{ok:function(e){return e.preventDefault(),t.onOk.apply(null,arguments)}}},[n("b-form",{on:{submit:function(e){return e.preventDefault(),t.onOk.apply(null,arguments)}}},[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Наименование секции"}},[n("rb-multi-lang-input",{model:{value:t.label,callback:function(e){t.label=e},expression:"label"}})],1)],1)],1)],1)],1)},__vue_staticRenderFns__$5=[],__vue_inject_styles__$5=void 0,__vue_scope_id__$5=void 0,__vue_module_identifier__$5=void 0,__vue_is_functional_template__$5=!1,__vue_component__$6=normalizeComponent({render:__vue_render__$5,staticRenderFns:__vue_staticRenderFns__$5},__vue_inject_styles__$5,__vue_script__$5,__vue_scope_id__$5,__vue_is_functional_template__$5,__vue_module_identifier__$5,!1,void 0,void 0,void 0),DocTemplateSectionModal=__vue_component__$6,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return commonjsRequire(t,null==e?n.path:e)}},n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
1
+ var RbDocumentFormConstructor=function(Vue){"use strict";function _interopDefaultLegacy(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Vue__default=_interopDefaultLegacy(Vue);function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty$1(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty$1(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,r,i=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(o=n.next()).done)&&(i.push(o.value),!e||i.length!==e);a=!0);}catch(t){l=!0,r=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw r}}return i}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var UtFormConfig={findField:function(t,e){if(!e||!e.sections)return null;var n=null;return e.sections.every((function(e){if(e.columns&&e.columns.every((function(e){if(e.fields.forEach((function(e){e.name===t&&(n=e)})),n)return!1})),n)return!1})),n},findRule:function(t,e){if(!e||!e.sections)return null;var n=null;return e.sections.every((function(e){if(e.columns&&e.columns.every((function(e){if(e.fields.every((function(e){if(e.rules&&e.rules.forEach((function(e){e.id===t&&(n=e)})),n)return!1})),n)return!1})),n)return!1})),n},getFields:function(t){var e=[];return t.sections.forEach((function(t){t.columns&&t.columns.forEach((function(t){t.fields&&t.fields.forEach((function(t){e.push(t)}))}))})),e},parseFacets:function(t){var e=[];return t.sections.forEach((function(t){t.columns.forEach((function(t){t.fields.forEach((function(t){e.indexOf(t.facet)<0&&e.push(t.facet)}))}))})),e}},__clone=function(t){return JSON.parse(JSON.stringify(t))},_assign=function(){return _assign=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},_assign.apply(this,arguments)},__mergeInputInMapOfArrays=function(t,e){for(var n in e){var o=t[n];o?__mergeInputsInArray(o,e[n]):t[n]=e[n]}},__mergeInputsInMap=function(t,e){for(var n in e)t[n]=_assign(t[n]?t[n]:{},e[n]?e[n]:{})},__mergeInputsInArray=function(t,e){e.forEach((function(e){var n=t.findIndex((function(t){return t.name===e.name}));n>=0?t[n]=e:t.push(e)}))},__applyDefaultProps=function(t,e){for(var n in t.props)e&&e.input&&e.input.propsData&&n in e.input.propsData?t.propsData[n]=e.input.propsData[n]:t.propsData[n]=t.props[n].default},__applyRefProps=function(t,e){if(null!=e&&e.propsData)for(var n in e.propsData)t.propsData[n]=e.propsData[n]},__filterInputsByMultiple=function(t,e){return t.filter((function(t){return t.multiple&&e||!t.multiple&&!e}))},fcInputs={string:{text:"Текст",name:"string",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"text",label:"Тип данных",visible:!0}},propsData:{},defaultValue:null},number:{text:"Число",name:"number",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"number",label:"Тип данных",visible:!0},min:{type:"number",default:null,label:"Минимальное значение",visible:!0}},propsData:{},defaultValue:null},memo:{text:"Большой текст",name:"memo",type:"b-form-textarea",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},max:{type:"number",default:30,label:"Максимальное значение",visible:!0}},propsData:{},defaultValue:null},phone:{text:"Телефон",name:"phone",type:"rb-phone-input",props:{placeholder:{type:"string",default:"Телефон",label:"Надпись внутри",visible:!0}},propsData:{},defaultValue:null},boolean:{text:"Булевое",name:"boolean",type:"rb-boolean-single-option-input",props:{block:{type:"boolean",default:!0,label:"Растянуть",visible:!0},bordered:{type:"boolean",label:"Граница вокруг",default:!0,visible:!0}},propsData:{},defaultValue:null},email:{text:"Email",name:"email",type:"rb-email-input",props:{},propsData:{},defaultValue:[],multiple:!0}},fcPrimitiveInputs={string:[__clone(fcInputs.string),__clone(fcInputs.number),__clone(fcInputs.memo),__clone(fcInputs.phone)],memo:[__clone(fcInputs.memo),__clone(fcInputs.string)],number:[__clone(fcInputs.string),__clone(fcInputs.number)],double:[__clone(fcInputs.string),__clone(fcInputs.number)],float:[__clone(fcInputs.string),__clone(fcInputs.number)],integer:[__clone(fcInputs.string),__clone(fcInputs.number)],long:[__clone(fcInputs.string),__clone(fcInputs.number)],boolean:[__clone(fcInputs.boolean)],email:[__clone(fcInputs.email)]},fcDictInputs=[],fcRefInputs={},fcRefInputConfigs={},baseConfig={inputs:__clone(fcInputs),primitiveInputs:__clone(fcPrimitiveInputs),dictInputs:__clone(fcDictInputs),refInputs:__clone(fcRefInputs),refInputConfigs:__clone(fcRefInputConfigs),rules:[],icons:{iconExpandFacet:"icon-chevron-down",iconCollapseFacet:"icon-chevron-up",iconCloseFieldSidebar:"icon-chevron-right",iconOpenFieldSidebar:"icon-chevron-left",iconAdd:"icon-add",iconEdit:"icon-edit",iconDelete:"icon-delete",iconDrag:"icon-reorder"},ruleContext:{}},UtFormConstructor={config:{},init:function(t){this.config=__clone(baseConfig),t&&(t.inputs&&__mergeInputsInMap(this.config.inputs,t.inputs),t.primitiveInputs&&__mergeInputInMapOfArrays(this.config.primitiveInputs,t.primitiveInputs),t.dictInputs&&__mergeInputsInArray(this.config.dictInputs,t.dictInputs),t.refInputs&&__mergeInputInMapOfArrays(this.config.refInputs,t.refInputs),t.refInputConfigs&&(this.config.refInputConfigs=t.refInputConfigs),t.icons&&(this.config.icons=_assign(this.config.icons,t.icons)),t.rules&&(this.config.rules=t.rules),t.ruleContext&&(this.config.ruleContext=t.ruleContext))},getInputTypes:function(t){var e=[];return t?e=t.dict&&!this.config.refInputs[t.ref]?__filterInputsByMultiple(this.config.dictInputs,t.multiple):t.ref?__filterInputsByMultiple(this.config.refInputs[t.ref],t.multiple):__filterInputsByMultiple(this.config.primitiveInputs[t.type],t.multiple):e},hasMultipleInputTypes:function(t){var e=this.getInputTypes(_objectSpread2(_objectSpread2({},t),{},{multiple:!0}));return e&&e.length>0},getDefaultInput:function(t){var e=null,n=this.getInputTypes(t);return n||(e=this.primitiveInputs[0]),t.ref&&this.config.refInputs[t.ref]?(e=__clone(n[0]),__applyDefaultProps(e),this.config.refInputConfigs[t.ref]&&this.config.refInputConfigs[t.ref][e.name]&&__applyRefProps(e,this.config.refInputConfigs[t.ref][e.name])):t.dict?((e=__clone(n[0])).props.dict.default=t.ref,__applyDefaultProps(e)):(e=__clone(n[0]),__applyDefaultProps(e)),e},getInputTypeByName:function(t,e){var n=__clone(this.config.inputs[t]),o=e.input&&e.input.propsData?_objectSpread2({},e.input.propsData):{};return e.ref&&this.config.refInputs[e.ref]?(__applyDefaultProps(n,e),this.config.refInputConfigs[e.ref]&&this.config.refInputConfigs[e.ref][n.name]&&__applyRefProps(n,this.config.refInputConfigs[e.ref][n.name])):e.dict?(n.props.dict.default=e.ref,__applyDefaultProps(n,e)):__applyDefaultProps(n,e),o&&Object.assign(n.propsData,o),n.propsData.ref=e.name,n},getAvailableFieldRules:function(t){return this.config.rules.filter((function(e){return!e.fields||0===e.fields.length||e.fields.indexOf(t.name)>=0}))},getRuleContext:function(){return this.config.ruleContext},runRule:function runRule(context,script){context=context||{},context.console=console,context.Date=Date,context.Math=Math;var appendScript="";for(var v in context)appendScript+="var ".concat(v," = this.").concat(v,";\n");appendScript=appendScript?appendScript+"\n":"";var func=function func(script){return eval(script)};func.call(context,appendScript+script)}},script$5={name:"DocTemplateSectionModal",props:{section:Object,mode:{type:String,default:"ins"},onAfterOk:{type:Function,default:function(){}}},data:function(){return{id:"rb-doc-template-section-modal",label:{}}},computed:{title:function(){return"ins"===this.mode?"Добавление секции":"Редактирование секции"}},watch:{section:function(){this.section&&(this.label=this.section)}},methods:{onOk:function(){var t=this;this.section=this.label,this.onAfterOk&&this.onAfterOk(),this.$nextTick((function(){t.$bvModal.hide(t.id)}))}},created:function(){this.section&&(this.label=this.section)}};function normalizeComponent(t,e,n,o,r,i,a,l,s,c){"boolean"!=typeof a&&(s=l,l=a,a=!1);const u="function"==typeof n?n.options:n;let d;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),o&&(u._scopeId=o),i?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,s(t)),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=d):e&&(d=a?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,l(t))}),d)if(u.functional){const t=u.render;u.render=function(e,n){return d.call(n),t(e,n)}}else{const t=u.beforeCreate;u.beforeCreate=t?[].concat(t,d):[d]}return n}var __vue_script__$5=script$5,__vue_render__$5=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-modal",{attrs:{id:"rb-doc-template-section-modal","modal-class":"rb-doc-template-section-modal","ok-title":"Сохранить изменения","cancel-variant":"outline-gray","cancel-title":"Отмена",title:t.title},on:{ok:function(e){return e.preventDefault(),t.onOk.apply(null,arguments)}}},[n("b-form",{on:{submit:function(e){return e.preventDefault(),t.onOk.apply(null,arguments)}}},[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Наименование секции"}},[n("rb-multi-lang-input",{model:{value:t.label,callback:function(e){t.label=e},expression:"label"}})],1)],1)],1)],1)],1)},__vue_staticRenderFns__$5=[],__vue_inject_styles__$5=void 0,__vue_scope_id__$5=void 0,__vue_module_identifier__$5=void 0,__vue_is_functional_template__$5=!1,__vue_component__$6=normalizeComponent({render:__vue_render__$5,staticRenderFns:__vue_staticRenderFns__$5},__vue_inject_styles__$5,__vue_script__$5,__vue_scope_id__$5,__vue_is_functional_template__$5,__vue_module_identifier__$5,!1,void 0,void 0,void 0),DocTemplateSectionModal=__vue_component__$6,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return commonjsRequire(t,null==e?n.path:e)}},n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}
2
2
  /**!
3
3
  * Sortable 1.10.2
4
4
  * @author RubaXa <trash@rubaxa.org>
@@ -349,54 +349,29 @@ var fcInputs = {
349
349
  propsData: {},
350
350
  defaultValue: null
351
351
  },
352
- date: {
353
- text: 'Дата',
354
- name: 'date',
355
- type: 'rb-date-picker-input',
356
- props: {
357
- minCurrentDate: {
358
- type: 'boolean',
359
- default: false,
360
- label: 'Установить текущую дату как минимальную',
361
- visible: true
362
- },
363
- minDate: {
364
- type: 'date',
365
- default: null,
366
- label: 'Установить минимальную дату',
367
- visible: true
368
- },
369
- maxDate: {
370
- type: 'date',
371
- default: null,
372
- label: 'Установить максимальную дату',
373
- visible: true
374
- }
375
- },
376
- propsData: {},
377
- defaultValue: null
378
- },
379
- datetime: {
380
- text: 'Дата и вермя',
381
- name: 'date',
382
- type: 'rb-date-picker-input',
383
- props: {
384
- minDate: {
385
- type: 'date',
386
- default: null,
387
- label: 'Установить минимальную дату',
388
- visible: true
389
- },
390
- maxDate: {
391
- type: 'date',
392
- default: null,
393
- label: 'Установить максимальную дату',
394
- visible: true
395
- }
396
- },
397
- propsData: {},
398
- defaultValue: null
399
- },
352
+ // date: {
353
+ // text: 'Дата',
354
+ // name: 'date',
355
+ // type: 'rb-date-picker-input',
356
+ // props: {
357
+ // minCurrentDate: {type: 'boolean', default: false, label: 'Установить текущую дату как минимальную', visible: true},
358
+ // minDate: {type: 'date', default: null, label: 'Установить минимальную дату', visible: true},
359
+ // maxDate: {type: 'date', default: null, label: 'Установить максимальную дату', visible: true},
360
+ // },
361
+ // propsData: {},
362
+ // defaultValue: null,
363
+ // },
364
+ // datetime: {
365
+ // text: 'Дата и вермя',
366
+ // name: 'date',
367
+ // type: 'rb-date-picker-input',
368
+ // props: {
369
+ // minDate: {type: 'date', default: null, label: 'Установить минимальную дату', visible: true},
370
+ // maxDate: {type: 'date', default: null, label: 'Установить максимальную дату', visible: true},
371
+ // },
372
+ // propsData: {},
373
+ // defaultValue: null,
374
+ // },
400
375
  phone: {
401
376
  text: 'Телефон',
402
377
  name: 'phone',
@@ -451,8 +426,12 @@ var fcPrimitiveInputs = {
451
426
  float: [__clone(fcInputs.string), __clone(fcInputs.number)],
452
427
  integer: [__clone(fcInputs.string), __clone(fcInputs.number)],
453
428
  long: [__clone(fcInputs.string), __clone(fcInputs.number)],
454
- date: [__clone(fcInputs.date)],
455
- datetime: [__clone(fcInputs.datetime)],
429
+ // date: [
430
+ // __clone(fcInputs.date)
431
+ // ],
432
+ // datetime: [
433
+ // __clone(fcInputs.datetime)
434
+ // ],
456
435
  boolean: [__clone(fcInputs.boolean)],
457
436
  email: [__clone(fcInputs.email)]
458
437
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rb-document-form-constructor",
3
- "version": "0.9.26",
3
+ "version": "0.9.27",
4
4
  "description": "",
5
5
  "main": "dist/rb-document-form-constructor.ssr.js",
6
6
  "browser": "dist/rb-document-form-constructor.esm.js",
@@ -58,4 +58,4 @@
58
58
  "engines": {
59
59
  "node": ">=12"
60
60
  }
61
- }
61
+ }