/******/ (function() { // webpackBootstrap
/******/ 	"use strict";
/******/ 	// The require scope
/******/ 	var __webpack_require__ = {};
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	!function() {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = function(module) {
/******/ 			var getter = module && module.__esModule ?
/******/ 				function() { return module['default']; } :
/******/ 				function() { return module; };
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	!function() {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = function(exports) {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return /* binding */ common_input; }
});

;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/common-input/src/main.vue?vue&type=template&id=2a6503de&
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c("span", {
    staticClass: "jdf-common-input"
  }, [_vm.isEdit || _vm.exceptionalTypes.includes(_vm.elType) ? [_vm._t("prependText"), _c("jdf-render", _vm._g({
    attrs: {
      id: _vm.id,
      item: _vm.getItem()
    },
    model: {
      value: _vm.inputValue,
      callback: function callback($$v) {
        _vm.inputValue = $$v;
      },
      expression: "inputValue"
    }
  }, _vm.$listeners)), _vm._t("appendText"), _vm._t("appendIcon")] : _c("span", {
    class: _vm.attrs.type
  }, [_vm._t("default")], 2)], 2);
};
var staticRenderFns = [];
render._withStripped = true;

;// CONCATENATED MODULE: ./packages/common-input/src/main.vue?vue&type=template&id=2a6503de&

;// CONCATENATED MODULE: external "@babel/runtime/helpers/defineProperty"
var defineProperty_namespaceObject = require("@babel/runtime/helpers/defineProperty");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isEmpty"
var isEmpty_namespaceObject = require("lodash/isEmpty");
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty_namespaceObject);
;// CONCATENATED MODULE: external "lodash/omit"
var omit_namespaceObject = require("lodash/omit");
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
;// CONCATENATED MODULE: external "lodash/isString"
var isString_namespaceObject = require("lodash/isString");
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/toConsumableArray"
var toConsumableArray_namespaceObject = require("@babel/runtime/helpers/toConsumableArray");
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_namespaceObject);
;// CONCATENATED MODULE: external "@babel/runtime/helpers/slicedToArray"
var slicedToArray_namespaceObject = require("@babel/runtime/helpers/slicedToArray");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray_namespaceObject);
;// CONCATENATED MODULE: external "uuid"
var external_uuid_namespaceObject = require("uuid");
;// CONCATENATED MODULE: ./packages/render/src/SlotContent.js
/*
 * @Author: lirl
 * @Date: 2023-02-07 17:16:13
 * @Description: 处理插槽
 */
/* harmony default export */ var SlotContent = ({
  name: 'SlotContent',
  functional: true,
  props: {
    render: {
      type: Function,
      required: true
    },
    data: Object
  },
  // eslint-disable-next-line arrow-body-style
  render: function render(h, ctx) {
    // 函数式组件中没有this, 所有可用的API都提供在ctx中
    return ctx.props.render(h, ctx.props.data);
  }
});
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/render/src/main.vue?vue&type=script&lang=js&



function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }




/**
 * 渲染插槽
 */
var renderSlots = function renderSlots(h, $scopedSlots) {
  var slots = $scopedSlots.map(function (_ref) {
    var _ref2 = slicedToArray_default()(_ref, 2),
      name = _ref2[0],
      slot = _ref2[1];
    return h('slot-content', {
      props: {
        render: slot
      },
      slot: name,
      key: name
    });
  });
  return slots;
};
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
  name: 'JdfRender',
  components: {
    SlotContent: SlotContent
  },
  props: {
    item: Object // formItems中的子项
  },
  render: function render(h) {
    var _item$childNodes, _item$childNodes2;
    var item = this.item;
    if (item.render) {
      return item.render;
    }
    var $scopedSlots = Object.entries(item.$scopedSlots).filter(function (_ref3) {
      var _ref4 = slicedToArray_default()(_ref3, 1),
        name = _ref4[0];
      return name;
    });
    var slotsVNode = isEmpty_default()($scopedSlots) ? [] : renderSlots(h, $scopedSlots);
    return h(item.type, {
      class: _objectSpread({}, item.classObj),
      style: _objectSpread({}, item.styleObj),
      on: _objectSpread(_objectSpread({}, this.$listeners), item.on),
      attrs: _objectSpread(_objectSpread(_objectSpread({}, this.$attrs), item.attrs), {}, {
        autocomplete: 'on',
        autoComplete: 'on',
        name: (0,external_uuid_namespaceObject.v4)()
      }),
      props: _objectSpread({}, item.props),
      domProps: _objectSpread({}, item.domProps)
      // 作用域插槽的格式为
      // { name: props => VNode | Array<VNode> }
      // scopedSlots: {
      //   default: (p) => h('span', p.option),
      // },
      // // 如果组件是其它组件的子组件，需为插槽指定名称
      // slot: 'name-of-slot',
      // // 其它特殊顶层 property
      // key: 'myKey',
      // ref: 'myRef',
      // // 如果你在渲染函数中给多个元素都应用了相同的 ref 名，
      // // 那么 `$refs.myRef` 会变成一个数组。
      // refInFor: true
    }, [].concat(toConsumableArray_default()(slotsVNode), toConsumableArray_default()((_item$childNodes = (_item$childNodes2 = item.childNodes) === null || _item$childNodes2 === void 0 ? void 0 : _item$childNodes2.call(item, h)) !== null && _item$childNodes !== void 0 ? _item$childNodes : [])));
  }
});
;// CONCATENATED MODULE: ./packages/render/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent(
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */,
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options =
    typeof scriptExports === 'function' ? scriptExports.options : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) {
    // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
          injectStyles.call(
            this,
            (options.functional ? this.parent : this).$root.$options.shadowRoot
          )
        }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection(h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}

;// CONCATENATED MODULE: ./packages/render/src/main.vue
var main_render, main_staticRenderFns
;



/* normalize component */
;
var component = normalizeComponent(
  src_mainvue_type_script_lang_js_,
  main_render,
  main_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var main = (component.exports);
;// CONCATENATED MODULE: external "dayjs"
var external_dayjs_namespaceObject = require("dayjs");
var external_dayjs_default = /*#__PURE__*/__webpack_require__.n(external_dayjs_namespaceObject);
;// CONCATENATED MODULE: ./src/utils/day-util.js
/*
 * @Author: lirl
 * @Date: 2020-04-21 10:08:54
 * @LastEditTime: 2022-04-21 09:40:22
 * @Description: 日期转换工具方法
 */


/**
 * 将毫秒值的时间格式化为format格式.
 * @param {Number} millisecond 毫秒
 * @param {String} format 要转换的格式
 */
var formatMillisecondToString = function formatMillisecondToString(millisecond) {
  var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'YYYY-MM-DD HH:mm:ss';
  return millisecond ? external_dayjs_default()(millisecond).format(format) : '';
};

/**
 * 获取当前时间的毫秒值
 */
var getCurrentMillisecond = function getCurrentMillisecond() {
  return dayjs().valueOf();
};

;// CONCATENATED MODULE: ./packages/common-input/src/distributeComponents.js

/*
 * @Author: lirl
 * @Date: 2023-03-03 15:21:13
 * @Description: 渲染组件配置
 */


// 组件类型渲染配置
var distributeComponents = {
  // 普通输入框
  input: 'el-input',
  // 时间选择器
  TimePicker: 'el-time-picker',
  // 下拉选择时间
  TimeSelect: 'el-time-select',
  // 日期选择器
  DatePicker: 'el-date-picker',
  // 附件上传
  uploadFile: 'jdf-upload-file',
  // 表单动态行
  formDynamicTable: 'jdf-form-dynamic-table',
  // 动态表格
  dynamicTable: 'jdf-dynamic-table',
  // 动态表格
  optimizeDynamicTable: 'jdf-optimize-dynamic-table',
  // 单选复选联动选择
  singleCheckSelection: 'jdf-single-check-selection',
  // 多行意见展示
  opinions: 'jdf-opinions',
  // 提示信息展示
  prompt: 'jdf-prompt',
  // 数字输入框
  number: 'el-input-number',
  // 下拉框
  select: {
    type: 'el-select',
    childNodes: function childNodes(_ref) {
      var options = _ref.options,
        labelKey = _ref.labelKey,
        valueKey = _ref.valueKey;
      return function (h) {
        return options.map(function (o, i) {
          return h('el-option', {
            props: {
              label: o[labelKey],
              value: o[valueKey],
              key: i,
              disabled: o.disabled
            }
          });
        });
      };
    }
  },
  // 复选框
  checkbox: {
    type: 'el-checkbox-group',
    childNodes: function childNodes(_ref2) {
      var options = _ref2.options,
        labelKey = _ref2.labelKey,
        valueKey = _ref2.valueKey;
      return function (h) {
        return options.map(function (o, i) {
          return h('el-checkbox', {
            props: {
              label: o[valueKey],
              key: i,
              disabled: o.disabled
            }
          }, o[labelKey]);
        });
      };
    }
  },
  // 单选按钮
  radio: {
    type: 'el-radio-group',
    childNodes: function childNodes(_ref3) {
      var options = _ref3.options,
        labelKey = _ref3.labelKey,
        valueKey = _ref3.valueKey;
      return function (h) {
        return options.map(function (o, i) {
          return h('el-radio', {
            props: {
              label: o[valueKey],
              key: i,
              disabled: o.disabled
            }
          }, o[labelKey]);
        });
      };
    }
  },
  // 描述文本
  opnContent: {
    type: 'div',
    classObj: {
      'jdf-description': true
    },
    childNodes: function childNodes(_ref4) {
      var value = _ref4.value,
        attrs = _ref4.attrs;
      return function (h) {
        var timeType = attrs.timeType;
        var signs = {
          name: h('span', {
            class: {
              'description-sign-text': true,
              'description-sign-user': true
            }
          }, value.name),
          org: h('span', {
            class: {
              'description-sign-text': true,
              'description-sign-dept': true
            }
          }, value.org ? "\uFF08".concat(value.org, "\uFF09") : ''),
          time: h('span', {
            class: {
              'description-sign-text': true,
              'description-time-text': true
            }
          }, timeType ? formatMillisecondToString(value.time, timeType) : value.time)
        };
        var displaySigns = attrs.displaySigns || ['name', 'org', 'time'];
        return [h('div', {
          class: {
            'description-content': true
          }
        }, value.content), h('div', {
          class: {
            'description-sign': true
          }
        }, toConsumableArray_default()(displaySigns.map(function (s) {
          return signs[s];
        })))];
      };
    }
  }
};
/* harmony default export */ var src_distributeComponents = (distributeComponents);
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./packages/common-input/src/main.vue?vue&type=script&lang=js&

function mainvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function mainvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? mainvue_type_script_lang_js_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : mainvue_type_script_lang_js_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }





/* harmony default export */ var common_input_src_mainvue_type_script_lang_js_ = ({
  // 本组件的根属性不继承父组件的attribute
  inheritAttrs: false,
  name: 'JdfCommonInput',
  components: {
    JdfRender: main
  },
  model: {
    prop: 'value',
    // 此处使用自定义事件名change-v，避免使用change会与组件的事件名change冲突，会导致change执行两次的问题
    event: 'change-v'
  },
  props: {
    /**
     * 类型
     *  - select
     *  - radio
     *  - checkbox
     *  - number
     *  - (text，textarea 和其他 原生 input 的 type 值)
     * ....等
     */
    elType: {
      type: String,
      default: 'input'
    },
    value: [String, Number, Boolean, Array, Date, Object],
    // id
    id: String,
    // 当type = select|radio|checkbox 时，可选列表
    options: {
      type: Array,
      default: function _default() {
        return [];
      }
    },
    // select|radio|checkbox中值的value的key
    valueKey: {
      type: String,
      default: 'value'
    },
    // select|radio|checkbox中label的key
    labelKey: {
      type: String,
      default: 'label'
    },
    // 是否可编辑
    isEdit: {
      type: Boolean,
      default: true
    },
    // 是否显示图标说明文字
    showPlaceholderIcon: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    inputValue: {
      get: function get() {
        return this.value;
      },
      set: function set(val) {
        this.$emit('change-v', val);
      }
    },
    attrs: function attrs() {
      return omit_default()(this.$attrs, ['id']);
    }
  },
  data: function data() {
    return {
      exceptionalTypes: ['uploadFile', 'formDynamicTable', 'optimizeDynamicTable', 'opnContent', 'opinions', 'prompt']
    };
  },
  methods: {
    /**
     * 根据组件类型获取组件配置
     */
    getItem: function getItem() {
      var _componentsName$elTyp, _componentsObj$childN;
      var options = this.options,
        labelKey = this.labelKey,
        valueKey = this.valueKey,
        elType = this.elType,
        value = this.value;
      // 获取组件配置信息
      var componentsObj = (_componentsName$elTyp = src_distributeComponents[elType]) !== null && _componentsName$elTyp !== void 0 ? _componentsName$elTyp : src_distributeComponents.input;
      var item = {
        type: isString_default()(componentsObj) ? componentsObj : componentsObj.type,
        on: this.$listeners,
        attrs: mainvue_type_script_lang_js_objectSpread(mainvue_type_script_lang_js_objectSpread({}, this.attrs), {}, {
          isEdit: this.isEdit,
          showPlaceholderIcon: this.showPlaceholderIcon
        }),
        classObj: componentsObj.classObj,
        $scopedSlots: omit_default()(this.$scopedSlots, ['default', 'prependText', 'appendText']),
        props: mainvue_type_script_lang_js_objectSpread({
          id: this.id
        }, componentsObj.props),
        childNodes: (_componentsObj$childN = componentsObj.childNodes) === null || _componentsObj$childN === void 0 ? void 0 : _componentsObj$childN.call(componentsObj, {
          options: options,
          labelKey: labelKey,
          valueKey: valueKey,
          value: value,
          attrs: this.$attrs
        })
      };
      if (!isEmpty_default()(options)) {
        item.props.options = this.options;
      }
      return item;
    }
  }
});
;// CONCATENATED MODULE: ./packages/common-input/src/main.vue?vue&type=script&lang=js&
 /* harmony default export */ var packages_common_input_src_mainvue_type_script_lang_js_ = (common_input_src_mainvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./packages/common-input/src/main.vue





/* normalize component */
;
var main_component = normalizeComponent(
  packages_common_input_src_mainvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var src_main = (main_component.exports);
;// CONCATENATED MODULE: ./packages/common-input/index.js

src_main.install = function (Vue) {
  Vue.component(src_main.name, src_main);
};
/* harmony default export */ var common_input = (src_main);
module.exports = __webpack_exports__;
/******/ })()
;