UNPKG

@dspacev-bundle/vue-cesium

Version:
1 lines 4.42 kB
{"version":3,"file":"defaultProps.mjs","sources":["../../../../../../packages/components/controls/navigation/defaultProps.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-10-27 15:54:13\n * @LastEditTime: 2022-08-19 22:40:04\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\controls\\navigation\\defaultProps.ts\n */\nimport { positionProps } from '@vue-cesium/composables/private/use-position'\nimport { getDefaultOptionByProps } from '@vue-cesium/utils/util'\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport { defaultProps as compassDefaultProps } from '../compass/defaultProps'\nimport { defaultProps as zoomDefaultProps } from '../zoom-control/defaultProps'\nimport printDefaultProps from '../print/defaultProps'\nimport locationDefaultProps from '../my-location/defaultProps'\nimport statusBarDefaultProps from '../status-bar/defaultProps'\nimport distancelegendDefaultProps from '../distance-legend/defaultProps'\nimport { VcCompassProps } from '../compass'\nimport { VcZoomControlProps } from '../zoom-control'\nimport { VcPrintProps } from '../print'\nimport { VcMyLocationProps } from '../my-location'\nimport { VcStatusBarProps } from '../status-bar'\nimport { VcDistanceLegendProps } from '../distance-legend'\n\nexport interface VcNavigationOtherOpts {\n position?: string\n offset?: Array<number>\n statusBarOpts?: VcStatusBarProps\n distancelegendOpts?: VcDistanceLegendProps\n}\n\nconst defaultProps = {\n ...positionProps,\n compassOpts: {\n // compassOptions\n type: [Object, Boolean] as PropType<false | VcCompassProps>,\n default: () => getDefaultOptionByProps<VcCompassProps>(compassDefaultProps, ['position', 'offset'])\n },\n zoomOpts: {\n type: [Object, Boolean] as PropType<false | VcZoomControlProps>,\n default: () => getDefaultOptionByProps<VcZoomControlProps>(zoomDefaultProps, ['position', 'offset'])\n },\n printOpts: {\n type: [Object, Boolean] as PropType<false | VcPrintProps>,\n default: () => getDefaultOptionByProps<VcPrintProps>(printDefaultProps, ['position', 'offset'])\n },\n locationOpts: {\n type: [Object, Boolean] as PropType<false | VcMyLocationProps>,\n default: () => getDefaultOptionByProps<VcMyLocationProps>(locationDefaultProps, ['position', 'offset'])\n },\n otherOpts: {\n // otherControlOptions\n type: [Object, Boolean] as PropType<false | VcNavigationOtherOpts>,\n default: () =>\n ({\n position: 'bottom-right',\n offset: [2, 3],\n statusBarOpts: getDefaultOptionByProps(statusBarDefaultProps, ['position', 'offset']) as VcStatusBarProps,\n distancelegendOpts: getDefaultOptionByProps(distancelegendDefaultProps, ['position', 'offset']) as VcDistanceLegendProps\n } as VcNavigationOtherOpts)\n },\n customClass: {\n type: String,\n default: ''\n },\n teleportToViewer: {\n type: Boolean,\n default: true\n }\n}\nexport type VcNavigationProps = ExtractPropTypes<typeof defaultProps>\nconst defaultOptions = getDefaultOptionByProps<VcNavigationProps>(defaultProps)\nexport { defaultProps, defaultOptions }\n"],"names":["compassDefaultProps","zoomDefaultProps"],"mappings":";;;;;;;;;;AA+BA,MAAM,YAAe,GAAA;AAAA,EACnB,GAAG,aAAA;AAAA,EACH,WAAa,EAAA;AAAA;AAAA,IAEX,IAAA,EAAM,CAAC,MAAA,EAAQ,OAAO,CAAA;AAAA,IACtB,SAAS,MAAM,uBAAA,CAAwCA,gBAAqB,CAAC,UAAA,EAAY,QAAQ,CAAC,CAAA;AAAA,GACpG;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAA,EAAM,CAAC,MAAA,EAAQ,OAAO,CAAA;AAAA,IACtB,SAAS,MAAM,uBAAA,CAA4CC,gBAAkB,CAAC,UAAA,EAAY,QAAQ,CAAC,CAAA;AAAA,GACrG;AAAA,EACA,SAAW,EAAA;AAAA,IACT,IAAA,EAAM,CAAC,MAAA,EAAQ,OAAO,CAAA;AAAA,IACtB,SAAS,MAAM,uBAAA,CAAsC,mBAAmB,CAAC,UAAA,EAAY,QAAQ,CAAC,CAAA;AAAA,GAChG;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,IAAA,EAAM,CAAC,MAAA,EAAQ,OAA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