{"version":3,"file":"config.mjs","sources":["../../../../../../packages/components/cascader-panel/src/config.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { NOOP } from '@vue/shared'\n\nimport type { PropType } from 'vue'\nimport type {\n  CascaderValue,\n  CascaderOption,\n  CascaderConfig,\n  CascaderProps,\n} from './types'\n\nexport const CommonProps = {\n  /**\n   * @description specify which key of node object is used as the node's value\n   */\n  modelValue: [Number, String, Array] as PropType<CascaderValue>,\n  /**\n   * @description data of the options, the key of `value` and `label` can be customize by `CascaderProps`.\n   */\n  options: {\n    type: Array as PropType<CascaderOption[]>,\n    default: () => ([] as CascaderOption[]),\n  },\n  /**\n   * @description configuration options, see the following `CascaderProps` table.\n   */\n  props: {\n    type: Object as PropType<CascaderProps>,\n    default: () => ({} as CascaderProps),\n  },\n}\n\nexport const DefaultProps: CascaderConfig = {\n  /**\n   * @description trigger mode of expanding options\n   */\n  expandTrigger: 'click',\n  /**\n   * @description whether multiple selection is enabled\n   */\n  multiple: false,\n  /**\n   * @description whether checked state of a node not affects its parent and child nodes\n   */\n  checkStrictly: false, // whether all nodes can be selected\n  /**\n   * @description when checked nodes change, whether to emit an array of node's path, if false, only emit the value of node.\n   */\n  emitPath: true, // wether to emit an array of all levels value in which node is located\n  /**\n   * @description whether to dynamic load child nodes, use with `lazyload` attribute\n   */\n  lazy: false,\n  /**\n   * @description method for loading child nodes data, only works when `lazy` is true\n   */\n  lazyLoad: NOOP,\n  /**\n   * @description specify which key of node object is used as the node's value\n   */\n  value: 'value',\n  /**\n   * @description specify which key of node object is used as the node's label\n   */\n  label: 'label',\n  /**\n   * @description specify which key of node object is used as the node's children\n   */\n  children: 'children',\n  /**\n   * @description specify which key of node object is used as the node's leaf\n   */\n  leaf: 'leaf',\n  /**\n   * @description specify which key of node object is used as the node's disabled\n   */\n  disabled: 'disabled',\n  /**\n   * @description hover threshold of expanding options\n   */\n  hoverThreshold: 500,\n}\n\nexport const useCascaderConfig = (props: { props: CascaderProps; }) => {\n  return computed(() => ({\n    ...DefaultProps,\n    ...props.props,\n  }))\n}\n"],"names":[],"mappings":";;;AAEY,MAAC,WAAW,GAAG;AAC3B,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;AACrC,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACU,MAAC,YAAY,GAAG;AAC5B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,aAAa,EAAE,KAAK;AACtB,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,IAAI,EAAE,KAAK;AACb,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,cAAc,EAAE,GAAG;AACrB,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,KAAK,KAAK;AAC5C,EAAE,OAAO,QAAQ,CAAC,OAAO;AACzB,IAAI,GAAG,YAAY;AACnB,IAAI,GAAG,KAAK,CAAC,KAAK;AAClB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}