"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var InputMeta = {
  group: '低代码组件',
  componentName: 'Input',
  title: '输入框',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  category: '信息输入',
  npm: {
    "package": '@dckj-npm/dc-material',
    version: '0.1.0',
    exportName: 'Input',
    main: 'src\\index.tsx',
    destructuring: true,
    subName: ''
  },
  configure: {
    component: {
      isContainer: false,
      disableBehaviors: ['copy']
    },
    props: [{
      name: 'value',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '数据源绑定',
          en_US: 'Data Binding'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: value | 说明: 绑定到 this.state 中的字段（会自动生成 onChange 回写，并初始化 state 默认值）',
          en_US: 'prop: value | description: bind to this.state (auto generate onChange and init state)'
        }
      },
      description: '数据源绑定',
      setter: {
        componentName: 'SetterFormVariable',
        props: {
          attributes: [{
            label: '输入框的当前值',
            value: 'value'
          }]
        }
      }
    }, {
      name: 'defaultValue',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '默认值',
          en_US: 'DefaultValue'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: defaultValue | 说明: 非受控模式下的默认值',
          en_US: 'prop: defaultValue | description: default value in uncontrolled mode'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'label',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '标签文本',
          en_US: 'Label'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: label | 说明: 标签文本内容',
          en_US: 'prop: label | description: label content'
        }
      },
      supportVariable: true,
      description: 'label',
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'placeholder',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '输入提示',
          en_US: 'Placeholder'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: placeholder | 说明: 输入提示',
          en_US: 'prop: placeholder | description: placeholder'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: '请输入'
      }
    }, {
      name: 'state',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '状态',
          en_US: 'State'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: state | 说明: 状态\n@enumdesc 错误, 校验中, 成功, 警告',
          en_US: 'prop: state | description: input state'
        }
      },
      setter: {
        componentName: 'RadioGroupSetter',
        props: {
          options: [{
            value: 'error',
            title: 'error'
          }, {
            value: 'loading',
            title: 'loading'
          }, {
            value: 'success',
            title: 'success'
          }, {
            value: 'warning',
            title: 'warning'
          }, {
            value: '',
            title: '默认'
          }]
        }
      }
    }, {
      name: 'size',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '尺寸',
          en_US: 'Size'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: size | 说明: 尺寸\n@enumdesc 小, 中, 大',
          en_US: 'prop: size | description: size'
        }
      },
      setter: {
        componentName: 'RadioGroupSetter',
        props: {
          options: ['small', 'medium', 'large']
        }
      },
      defaultValue: 'medium'
    }, {
      name: 'maxLength',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '最大长度',
          en_US: 'MaxLength'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: maxLength | 说明: 最大长度',
          en_US: 'prop: maxLength | description: max length'
        }
      },
      supportVariable: true,
      description: '最大长度',
      setter: {
        componentName: 'NumberSetter',
        isRequired: false
      }
    }, {
      name: 'hasClear',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '显示清除',
          en_US: 'Show Clear'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: hasClear | 说明: 是否出现清除按钮',
          en_US: 'prop: hasClear | description: show clear icon'
        }
      },
      supportVariable: true,
      description: '是否出现清除按钮',
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'disabled',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '是否禁用',
          en_US: 'Disabled'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: disabled | 说明: 是否被禁用',
          en_US: 'prop: disabled | description: disabled'
        }
      },
      supportVariable: true,
      description: '是否禁用',
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'hasLimitHint',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '展示限制',
          en_US: 'ShowLimit'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: hasLimitHint | 说明: 是否展现最大长度样式',
          en_US: 'prop: hasLimitHint | description: hasLimitHint'
        }
      },
      supportVariable: true,
      description: '是否展现最大长度样式',
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'cutString',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '是否截断',
          en_US: 'Cut Off'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: cutString | 说明: 是否截断超出字符串',
          en_US: 'prop: cutString | description: whether cut off string'
        }
      },
      supportVariable: true,
      description: '是否截断超出字符串',
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'readOnly',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '是否只读',
          en_US: 'ReadOnly'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: readOnly | 说明: 是否只读',
          en_US: 'prop: readOnly | description: ReadOnly'
        }
      },
      supportVariable: true,
      description: '是否只读',
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'trim',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '是否 Trim',
          en_US: 'Trim'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: trim | 说明: onChange 返回会自动去除头尾空字符',
          en_US: 'prop: trim | description: whether trim when onChange called'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'hasBorder',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '显示边框',
          en_US: 'ShowBorder'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: hasBorder | 说明: 是否有边框',
          en_US: 'prop: hasBorder | description: HasBorder'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: true
      }
    }, {
      name: 'autoFocus',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '自动聚焦',
          en_US: 'Auto Focus'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: autoFocus | 说明: 自动聚焦',
          en_US: 'prop: autoFocus | description: autoFocus'
        }
      },
      supportVariable: true,
      description: '自动聚焦',
      setter: {
        componentName: 'BoolSetter',
        isRequired: false,
        initialValue: false
      }
    }, {
      name: 'hint',
      title: {
        label: {
          type: 'i18n',
          zh_CN: 'Icon 水印',
          en_US: 'IconHint'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: hint | 说明: Icon 水印（Icon 的 type，和 hasClear 占用同一位置）',
          en_US: 'prop: hint | description: Icon hint'
        }
      },
      setter: {
        componentName: 'IconSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'innerBefore',
      display: 'block',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '文字前附加内容',
          en_US: 'Inner Before'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: innerBefore | 说明: 文字前附加内容',
          en_US: 'prop: innerBefore | description: innerBefore'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'innerAfter',
      display: 'block',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '文字后附加内容',
          en_US: 'Inner After'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: innerAfter | 说明: 文字后附加内容',
          en_US: 'prop: innerAfter | description: innerAfter'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'addonBefore',
      display: 'block',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '输入框前附加内容',
          en_US: 'Addon Before'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: addonBefore | 说明: 输入框前附加内容',
          en_US: 'prop: addonBefore | description: addonBefore'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'addonAfter',
      display: 'block',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '输入框后附加内容',
          en_US: 'Addon After'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: addonAfter | 说明: 输入框后附加内容',
          en_US: 'prop: addonAfter | description: addonAfter'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'addonTextBefore',
      display: 'block',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '输入框前附加文字',
          en_US: 'Text Before'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: addonTextBefore | 说明: 输入框前附加文字',
          en_US: 'prop: addonTextBefore | description: addonTextBefore'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      name: 'addonTextAfter',
      display: 'block',
      title: {
        label: {
          type: 'i18n',
          zh_CN: '输入框后附加文字',
          en_US: 'Text After'
        },
        tip: {
          type: 'i18n',
          zh_CN: '属性: addonTextAfter | 说明: 输入框后附加文字',
          en_US: 'prop: addonTextAfter | description: addonTextAfter'
        }
      },
      supportVariable: true,
      setter: {
        componentName: 'StringSetter',
        isRequired: false,
        initialValue: ''
      }
    }, {
      title: '高级',
      type: 'group',
      display: 'block',
      items: [{
        name: 'id',
        title: {
          label: {
            type: 'i18n',
            zh_CN: '唯一标识',
            en_US: 'ID'
          },
          tip: {
            type: 'i18n',
            zh_CN: '属性: id | 说明: 唯一标识',
            en_US: 'prop: id | description: id'
          }
        },
        supportVariable: true,
        setter: {
          componentName: 'StringSetter',
          isRequired: false,
          initialValue: ''
        }
      }, {
        name: 'name',
        title: {
          label: {
            type: 'i18n',
            zh_CN: '表单标识',
            en_US: 'Name'
          },
          tip: {
            type: 'i18n',
            zh_CN: '属性: name | 说明: 表单标识',
            en_US: 'prop: name | description: name'
          }
        },
        supportVariable: true,
        setter: {
          componentName: 'StringSetter',
          isRequired: false,
          initialValue: ''
        }
      }]
    }],
    supports: {
      style: true,
      events: [{
        name: 'onPressEnter'
      }, {
        name: 'onChange'
      }, {
        name: 'onClear'
      }, {
        name: 'onKeyDown'
      }, {
        name: 'onFocus'
      }, {
        name: 'onBlur'
      }]
    }
  }
};
var snippets = [{
  title: '输入框',
  screenshot: '',
  schema: {
    componentName: 'Input',
    props: {
      placeholder: '请输入',
      size: 'medium',
      hasClear: false,
      disabled: false,
      readOnly: false,
      hasBorder: true,
      autoFocus: false,
      state: ''
    }
  }
}];
var _default = exports["default"] = (0, _extends2["default"])({}, InputMeta, {
  snippets: snippets
});