{"version":3,"file":"custom-searcher.mjs","sources":["../../../../../../packages/components/custom-searcher/src/custom-searcher.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\r\n\r\nimport { TooltipProps } from 'ant-design-vue'\r\nimport { SizeType } from 'ant-design-vue/es/config-provider'\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type CustomSearcher from './custom-searcher.vue'\r\n\r\nexport interface customSearcherFieldItem {\r\n  key: string // 字段名\r\n  // dataType: string // 数据类型\r\n  title: string // 查询别名\r\n  type: string // 组件类型\r\n  conditionType?: string // 运算符\r\n  props: {\r\n    [key: string]: any // 组件属性\r\n  }\r\n  [key: string]: any\r\n}\r\n\r\n// 定义组件props\r\nexport const customSearcherProps = buildProps({\r\n  open: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  fieldList: {\r\n    type: definePropType<customSearcherFieldItem[]>(Array),\r\n    default: () => [],\r\n  },\r\n  // 启用自定义运算符\r\n  operatorSelectable: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n  // 最大查询数量\r\n  maxSearchCount: {\r\n    type: Number,\r\n    default: 0,\r\n  },\r\n  // 开启徽标\r\n  useBadge: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n  // 激活状态\r\n  activeState: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  // 气泡框位置\r\n  placement: {\r\n    type: definePropType<TooltipProps['placement']>(String),\r\n  },\r\n  // 查询图标\r\n  searchIcon: {\r\n    type: String,\r\n  },\r\n  // 新增查询文本\r\n  addSearchText: {\r\n    type: String,\r\n  },\r\n  // 保存方案文本\r\n  saveSchemeText: {\r\n    type: String,\r\n  },\r\n  // 开启用户自定义方案（本地存储）\r\n  useLocalStorage: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n  size: {\r\n    type: definePropType<SizeType | number>([String, Number]),\r\n    default: 'large',\r\n  },\r\n  label: {\r\n    type: String,\r\n    default: '',\r\n  },\r\n  // 本地存储key\r\n  localKey: {\r\n    type: String,\r\n    default: '34',\r\n  },\r\n} as const)\r\n\r\n// props\r\nexport type CustomSearcherProps = ExtractPropTypes<typeof customSearcherProps>\r\n\r\n// instance\r\nexport type CustomSearcherInstance = InstanceType<typeof CustomSearcher>\r\n"],"names":[],"mappings":";;;;AAoBO,MAAM,sBAAsB,UAAA,CAAW;AAAA,EAC5C,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,eAA0C,KAAK,CAAA;AAAA,IACrD,OAAA,EAAS,MAAM;AAAC,GAClB;AAAA;AAAA,EAEA,kBAAA,EAAoB;AAAA,IAClB,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,eAA0C,MAAM;AAAA,GACxD;AAAA;AAAA,EAEA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAEA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAEA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM;AAAA,GACR;AAAA;AAAA,EAEA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,cAAA,CAAkC,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,IACxD,OAAA,EAAS;AAAA,GACX;AAAA,EACA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA,EAEA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA;AAEb,CAAU;;;;"}