persagy-vant 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/es/bot-mobile/BotFab.d.ts +72 -0
- package/es/bot-mobile/BotFab.mjs +152 -0
- package/es/bot-mobile/BotHistoryDrawer.d.ts +72 -0
- package/es/bot-mobile/BotHistoryDrawer.mjs +97 -0
- package/es/bot-mobile/BotMobile.d.ts +83 -0
- package/es/bot-mobile/BotMobile.mjs +47 -0
- package/es/bot-mobile/BotMobileContextTags.d.ts +52 -0
- package/es/bot-mobile/BotMobileContextTags.mjs +52 -0
- package/es/bot-mobile/BotMobilePrompts.d.ts +54 -0
- package/es/bot-mobile/BotMobilePrompts.mjs +49 -0
- package/es/bot-mobile/BotMobileSheet.d.ts +92 -0
- package/es/bot-mobile/BotMobileSheet.mjs +50 -0
- package/es/bot-mobile/BotMobileView.d.ts +82 -0
- package/es/bot-mobile/BotMobileView.mjs +45 -0
- package/es/bot-mobile/BotSessionList.d.ts +71 -0
- package/es/bot-mobile/BotSessionList.mjs +99 -0
- package/es/bot-mobile/BotVoiceBar.d.ts +80 -0
- package/es/bot-mobile/BotVoiceBar.mjs +138 -0
- package/es/bot-mobile/fab-position.d.ts +9 -0
- package/es/bot-mobile/fab-position.mjs +10 -0
- package/es/bot-mobile/fab-position.test.mjs +29 -0
- package/es/bot-mobile/index.css +1 -0
- package/es/bot-mobile/index.d.ts +469 -0
- package/es/bot-mobile/index.less +464 -0
- package/es/bot-mobile/index.mjs +50 -0
- package/es/bot-mobile/session-filter.d.ts +6 -0
- package/es/bot-mobile/session-filter.mjs +15 -0
- package/es/bot-mobile/session-item.d.ts +15 -0
- package/es/bot-mobile/session-item.mjs +73 -0
- package/es/bot-mobile/style/index.mjs +15 -0
- package/es/bot-mobile/style/less.mjs +15 -0
- package/es/bot-mobile/types.d.ts +23 -0
- package/es/bot-mobile/types.mjs +0 -0
- package/es/bot-mobile/var.css +0 -0
- package/es/bot-mobile/var.less +58 -0
- package/es/bot-mobile/voice-zone.d.ts +6 -0
- package/es/bot-mobile/voice-zone.mjs +6 -0
- package/es/bot-mobile/voice-zone.test.mjs +19 -0
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/coupon-list/style/index.mjs +1 -1
- package/es/coupon-list/style/less.mjs +1 -1
- package/es/icon/base-iconfont.css +1 -0
- package/es/icon/base-iconfont.less +1144 -0
- package/es/icon/config.d.ts +7 -0
- package/es/icon/config.mjs +268 -0
- package/es/icon/index.less +1 -1
- package/es/icon/latest-iconfont.less +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/location-select/style/index.mjs +1 -1
- package/es/location-select/style/less.mjs +1 -1
- package/es/material-add/MaterialAdd.d.ts +1 -1
- package/es/material-add/index.d.ts +1 -1
- package/es/quantity-input/QuantityInput.d.ts +1 -1
- package/es/quantity-input/index.d.ts +2 -2
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/lib/bot-mobile/BotFab.d.ts +72 -0
- package/lib/bot-mobile/BotFab.js +171 -0
- package/lib/bot-mobile/BotHistoryDrawer.d.ts +72 -0
- package/lib/bot-mobile/BotHistoryDrawer.js +116 -0
- package/lib/bot-mobile/BotMobile.d.ts +83 -0
- package/lib/bot-mobile/BotMobile.js +66 -0
- package/lib/bot-mobile/BotMobileContextTags.d.ts +52 -0
- package/lib/bot-mobile/BotMobileContextTags.js +71 -0
- package/lib/bot-mobile/BotMobilePrompts.d.ts +54 -0
- package/lib/bot-mobile/BotMobilePrompts.js +68 -0
- package/lib/bot-mobile/BotMobileSheet.d.ts +92 -0
- package/lib/bot-mobile/BotMobileSheet.js +79 -0
- package/lib/bot-mobile/BotMobileView.d.ts +82 -0
- package/lib/bot-mobile/BotMobileView.js +64 -0
- package/lib/bot-mobile/BotSessionList.d.ts +71 -0
- package/lib/bot-mobile/BotSessionList.js +118 -0
- package/lib/bot-mobile/BotVoiceBar.d.ts +80 -0
- package/lib/bot-mobile/BotVoiceBar.js +157 -0
- package/lib/bot-mobile/fab-position.d.ts +9 -0
- package/lib/bot-mobile/fab-position.js +29 -0
- package/lib/bot-mobile/fab-position.test.js +29 -0
- package/lib/bot-mobile/index.css +1 -0
- package/lib/bot-mobile/index.d.ts +469 -0
- package/lib/bot-mobile/index.js +79 -0
- package/lib/bot-mobile/index.less +464 -0
- package/lib/bot-mobile/session-filter.d.ts +6 -0
- package/lib/bot-mobile/session-filter.js +34 -0
- package/lib/bot-mobile/session-item.d.ts +15 -0
- package/lib/bot-mobile/session-item.js +92 -0
- package/lib/bot-mobile/style/index.js +15 -0
- package/lib/bot-mobile/style/less.js +15 -0
- package/lib/bot-mobile/types.d.ts +23 -0
- package/lib/bot-mobile/types.js +15 -0
- package/lib/bot-mobile/var.css +0 -0
- package/lib/bot-mobile/var.less +58 -0
- package/lib/bot-mobile/voice-zone.d.ts +6 -0
- package/lib/bot-mobile/voice-zone.js +25 -0
- package/lib/bot-mobile/voice-zone.test.js +19 -0
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/coupon-list/style/index.js +1 -1
- package/lib/coupon-list/style/less.js +1 -1
- package/lib/icon/base-iconfont.css +1 -0
- package/lib/icon/base-iconfont.less +1144 -0
- package/lib/icon/config.d.ts +7 -0
- package/lib/icon/config.js +287 -0
- package/lib/icon/index.less +1 -1
- package/lib/icon/latest-iconfont.less +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/index.less +5 -4
- package/lib/location-select/style/index.js +1 -1
- package/lib/location-select/style/less.js +1 -1
- package/lib/material-add/MaterialAdd.d.ts +1 -1
- package/lib/material-add/index.d.ts +1 -1
- package/lib/quantity-input/QuantityInput.d.ts +1 -1
- package/lib/quantity-input/index.d.ts +2 -2
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/vant.cjs.js +1798 -1028
- package/lib/vant.es.js +1798 -1028
- package/lib/vant.js +21938 -10365
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/skills/use-persagy-vant/SKILL.md +2 -2
- package/skills/use-persagy-vant/references/business-component-catalog.md +1 -1
- package/skills/use-persagy-vant/references/component-catalog.md +1 -1
- package/es/action-bar/style/index.d.ts +0 -1
- package/es/action-bar/style/less.d.ts +0 -1
- package/es/action-sheet/style/index.d.ts +0 -1
- package/es/action-sheet/style/less.d.ts +0 -1
- package/es/address-edit/style/index.d.ts +0 -1
- package/es/address-edit/style/less.d.ts +0 -1
- package/es/address-list/style/index.d.ts +0 -1
- package/es/address-list/style/less.d.ts +0 -1
- package/es/area/style/index.d.ts +0 -1
- package/es/area/style/less.d.ts +0 -1
- package/es/background/style/index.d.ts +0 -1
- package/es/background/style/less.d.ts +0 -1
- package/es/badge/style/index.d.ts +0 -1
- package/es/badge/style/less.d.ts +0 -1
- package/es/blue-mark/style/index.d.ts +0 -1
- package/es/blue-mark/style/less.d.ts +0 -1
- package/es/bottom-action-bar/style/index.d.ts +0 -1
- package/es/bottom-action-bar/style/less.d.ts +0 -1
- package/es/button/style/index.d.ts +0 -1
- package/es/button/style/less.d.ts +0 -1
- package/es/calendar/style/index.d.ts +0 -1
- package/es/calendar/style/less.d.ts +0 -1
- package/es/card/style/index.d.ts +0 -1
- package/es/card/style/less.d.ts +0 -1
- package/es/cascader/style/index.d.ts +0 -1
- package/es/cascader/style/less.d.ts +0 -1
- package/es/cell/style/index.d.ts +0 -1
- package/es/cell/style/less.d.ts +0 -1
- package/es/cell-group/style/index.d.ts +0 -1
- package/es/cell-group/style/less.d.ts +0 -1
- package/es/checkbox/style/index.d.ts +0 -1
- package/es/checkbox/style/less.d.ts +0 -1
- package/es/checkbox-group/style/index.d.ts +0 -1
- package/es/checkbox-group/style/less.d.ts +0 -1
- package/es/checkbox-panel/style/index.d.ts +0 -1
- package/es/checkbox-panel/style/less.d.ts +0 -1
- package/es/circle/style/index.d.ts +0 -1
- package/es/circle/style/less.d.ts +0 -1
- package/es/col/style/index.d.ts +0 -1
- package/es/col/style/less.d.ts +0 -1
- package/es/collapse/style/index.d.ts +0 -1
- package/es/collapse/style/less.d.ts +0 -1
- package/es/collapse-item/style/index.d.ts +0 -1
- package/es/collapse-item/style/less.d.ts +0 -1
- package/es/config-provider/style/index.d.ts +0 -1
- package/es/config-provider/style/less.d.ts +0 -1
- package/es/contact-card/style/index.d.ts +0 -1
- package/es/contact-card/style/less.d.ts +0 -1
- package/es/contact-edit/style/index.d.ts +0 -1
- package/es/contact-edit/style/less.d.ts +0 -1
- package/es/contact-list/style/index.d.ts +0 -1
- package/es/contact-list/style/less.d.ts +0 -1
- package/es/count-down/style/index.d.ts +0 -1
- package/es/count-down/style/less.d.ts +0 -1
- package/es/coupon/style/index.d.ts +0 -1
- package/es/coupon/style/less.d.ts +0 -1
- package/es/coupon-cell/style/index.d.ts +0 -1
- package/es/coupon-cell/style/less.d.ts +0 -1
- package/es/coupon-list/style/index.d.ts +0 -1
- package/es/coupon-list/style/less.d.ts +0 -1
- package/es/datetime-picker/style/index.d.ts +0 -1
- package/es/datetime-picker/style/less.d.ts +0 -1
- package/es/dialog/style/index.d.ts +0 -1
- package/es/dialog/style/less.d.ts +0 -1
- package/es/divider/style/index.d.ts +0 -1
- package/es/divider/style/less.d.ts +0 -1
- package/es/dropdown-item/style/index.d.ts +0 -1
- package/es/dropdown-item/style/less.d.ts +0 -1
- package/es/dropdown-menu/style/index.d.ts +0 -1
- package/es/dropdown-menu/style/less.d.ts +0 -1
- package/es/empty/style/index.d.ts +0 -1
- package/es/empty/style/less.d.ts +0 -1
- package/es/field/style/index.d.ts +0 -1
- package/es/field/style/less.d.ts +0 -1
- package/es/filter-tag/style/index.d.ts +0 -1
- package/es/filter-tag/style/less.d.ts +0 -1
- package/es/floor-select/style/index.d.ts +0 -1
- package/es/floor-select/style/less.d.ts +0 -1
- package/es/form/style/index.d.ts +0 -1
- package/es/form/style/less.d.ts +0 -1
- package/es/form-panel/style/index.d.ts +0 -1
- package/es/form-panel/style/less.d.ts +0 -1
- package/es/friendly-tip/style/index.d.ts +0 -1
- package/es/friendly-tip/style/less.d.ts +0 -1
- package/es/grid/style/index.d.ts +0 -1
- package/es/grid/style/less.d.ts +0 -1
- package/es/grid-item/style/index.d.ts +0 -1
- package/es/grid-item/style/less.d.ts +0 -1
- package/es/icon/style/index.d.ts +0 -1
- package/es/icon/style/less.d.ts +0 -1
- package/es/image/style/index.d.ts +0 -1
- package/es/image/style/less.d.ts +0 -1
- package/es/image-preview/style/index.d.ts +0 -1
- package/es/image-preview/style/less.d.ts +0 -1
- package/es/index-anchor/style/index.d.ts +0 -1
- package/es/index-anchor/style/less.d.ts +0 -1
- package/es/index-bar/style/index.d.ts +0 -1
- package/es/index-bar/style/less.d.ts +0 -1
- package/es/lazyload/style/index.d.ts +0 -1
- package/es/lazyload/style/less.d.ts +0 -1
- package/es/list/style/index.d.ts +0 -1
- package/es/list/style/less.d.ts +0 -1
- package/es/loading/style/index.d.ts +0 -1
- package/es/loading/style/less.d.ts +0 -1
- package/es/locale/style/index.d.ts +0 -1
- package/es/locale/style/less.d.ts +0 -1
- package/es/location-select/style/index.d.ts +0 -1
- package/es/location-select/style/less.d.ts +0 -1
- package/es/material-add/style/index.d.ts +0 -1
- package/es/material-add/style/less.d.ts +0 -1
- package/es/multi-person-select/style/index.d.ts +0 -1
- package/es/multi-person-select/style/less.d.ts +0 -1
- package/es/nav-bar/style/index.d.ts +0 -1
- package/es/nav-bar/style/less.d.ts +0 -1
- package/es/notice-bar/style/index.d.ts +0 -1
- package/es/notice-bar/style/less.d.ts +0 -1
- package/es/notify/style/index.d.ts +0 -1
- package/es/notify/style/less.d.ts +0 -1
- package/es/number-keyboard/style/index.d.ts +0 -1
- package/es/number-keyboard/style/less.d.ts +0 -1
- package/es/object-select/style/index.d.ts +0 -1
- package/es/object-select/style/less.d.ts +0 -1
- package/es/overlay/style/index.d.ts +0 -1
- package/es/overlay/style/less.d.ts +0 -1
- package/es/pagination/style/index.d.ts +0 -1
- package/es/pagination/style/less.d.ts +0 -1
- package/es/password-input/style/index.d.ts +0 -1
- package/es/password-input/style/less.d.ts +0 -1
- package/es/picker/style/index.d.ts +0 -1
- package/es/picker/style/less.d.ts +0 -1
- package/es/popover/style/index.d.ts +0 -1
- package/es/popover/style/less.d.ts +0 -1
- package/es/popup/style/index.d.ts +0 -1
- package/es/popup/style/less.d.ts +0 -1
- package/es/progress/style/index.d.ts +0 -1
- package/es/progress/style/less.d.ts +0 -1
- package/es/pull-refresh/style/index.d.ts +0 -1
- package/es/pull-refresh/style/less.d.ts +0 -1
- package/es/quantity-input/style/index.d.ts +0 -1
- package/es/quantity-input/style/less.d.ts +0 -1
- package/es/radio/style/index.d.ts +0 -1
- package/es/radio/style/less.d.ts +0 -1
- package/es/radio-group/style/index.d.ts +0 -1
- package/es/radio-group/style/less.d.ts +0 -1
- package/es/radio-panel/style/index.d.ts +0 -1
- package/es/radio-panel/style/less.d.ts +0 -1
- package/es/rate/style/index.d.ts +0 -1
- package/es/rate/style/less.d.ts +0 -1
- package/es/row/style/index.d.ts +0 -1
- package/es/row/style/less.d.ts +0 -1
- package/es/search/style/index.d.ts +0 -1
- package/es/search/style/less.d.ts +0 -1
- package/es/share-sheet/style/index.d.ts +0 -1
- package/es/share-sheet/style/less.d.ts +0 -1
- package/es/sidebar/style/index.d.ts +0 -1
- package/es/sidebar/style/less.d.ts +0 -1
- package/es/sidebar-item/style/index.d.ts +0 -1
- package/es/sidebar-item/style/less.d.ts +0 -1
- package/es/single-person-select/style/index.d.ts +0 -1
- package/es/single-person-select/style/less.d.ts +0 -1
- package/es/skeleton/style/index.d.ts +0 -1
- package/es/skeleton/style/less.d.ts +0 -1
- package/es/slider/style/index.d.ts +0 -1
- package/es/slider/style/less.d.ts +0 -1
- package/es/space/style/index.d.ts +0 -1
- package/es/space/style/less.d.ts +0 -1
- package/es/step/style/index.d.ts +0 -1
- package/es/step/style/less.d.ts +0 -1
- package/es/stepper/style/index.d.ts +0 -1
- package/es/stepper/style/less.d.ts +0 -1
- package/es/steps/style/index.d.ts +0 -1
- package/es/steps/style/less.d.ts +0 -1
- package/es/sticky/style/index.d.ts +0 -1
- package/es/sticky/style/less.d.ts +0 -1
- package/es/submit-bar/style/index.d.ts +0 -1
- package/es/submit-bar/style/less.d.ts +0 -1
- package/es/swipe/style/index.d.ts +0 -1
- package/es/swipe/style/less.d.ts +0 -1
- package/es/swipe-cell/style/index.d.ts +0 -1
- package/es/swipe-cell/style/less.d.ts +0 -1
- package/es/swipe-item/style/index.d.ts +0 -1
- package/es/swipe-item/style/less.d.ts +0 -1
- package/es/switch/style/index.d.ts +0 -1
- package/es/switch/style/less.d.ts +0 -1
- package/es/tab/style/index.d.ts +0 -1
- package/es/tab/style/less.d.ts +0 -1
- package/es/tabbar/style/index.d.ts +0 -1
- package/es/tabbar/style/less.d.ts +0 -1
- package/es/tabbar-item/style/index.d.ts +0 -1
- package/es/tabbar-item/style/less.d.ts +0 -1
- package/es/tabs/style/index.d.ts +0 -1
- package/es/tabs/style/less.d.ts +0 -1
- package/es/tag/style/index.d.ts +0 -1
- package/es/tag/style/less.d.ts +0 -1
- package/es/toast/style/index.d.ts +0 -1
- package/es/toast/style/less.d.ts +0 -1
- package/es/tree-select/style/index.d.ts +0 -1
- package/es/tree-select/style/less.d.ts +0 -1
- package/es/uploader/style/index.d.ts +0 -1
- package/es/uploader/style/less.d.ts +0 -1
- package/es/video-preview/style/index.d.ts +0 -1
- package/es/video-preview/style/less.d.ts +0 -1
- package/es/work-order-card/style/index.d.ts +0 -1
- package/es/work-order-card/style/less.d.ts +0 -1
- package/es/work-order-filter/style/index.d.ts +0 -1
- package/es/work-order-filter/style/less.d.ts +0 -1
- package/lib/action-bar/style/index.d.ts +0 -1
- package/lib/action-bar/style/less.d.ts +0 -1
- package/lib/action-bar-button/style/index.d.ts +0 -1
- package/lib/action-bar-button/style/less.d.ts +0 -1
- package/lib/action-bar-icon/style/index.d.ts +0 -1
- package/lib/action-bar-icon/style/less.d.ts +0 -1
- package/lib/action-sheet/style/index.d.ts +0 -1
- package/lib/action-sheet/style/less.d.ts +0 -1
- package/lib/address-edit/style/index.d.ts +0 -1
- package/lib/address-edit/style/less.d.ts +0 -1
- package/lib/address-list/style/index.d.ts +0 -1
- package/lib/address-list/style/less.d.ts +0 -1
- package/lib/area/style/index.d.ts +0 -1
- package/lib/area/style/less.d.ts +0 -1
- package/lib/background/style/index.d.ts +0 -1
- package/lib/background/style/less.d.ts +0 -1
- package/lib/badge/style/index.d.ts +0 -1
- package/lib/badge/style/less.d.ts +0 -1
- package/lib/blue-mark/style/index.d.ts +0 -1
- package/lib/blue-mark/style/less.d.ts +0 -1
- package/lib/bottom-action-bar/style/index.d.ts +0 -1
- package/lib/bottom-action-bar/style/less.d.ts +0 -1
- package/lib/button/style/index.d.ts +0 -1
- package/lib/button/style/less.d.ts +0 -1
- package/lib/calendar/style/index.d.ts +0 -1
- package/lib/calendar/style/less.d.ts +0 -1
- package/lib/card/style/index.d.ts +0 -1
- package/lib/card/style/less.d.ts +0 -1
- package/lib/cascader/style/index.d.ts +0 -1
- package/lib/cascader/style/less.d.ts +0 -1
- package/lib/cell/style/index.d.ts +0 -1
- package/lib/cell/style/less.d.ts +0 -1
- package/lib/cell-group/style/index.d.ts +0 -1
- package/lib/cell-group/style/less.d.ts +0 -1
- package/lib/checkbox/style/index.d.ts +0 -1
- package/lib/checkbox/style/less.d.ts +0 -1
- package/lib/checkbox-group/style/index.d.ts +0 -1
- package/lib/checkbox-group/style/less.d.ts +0 -1
- package/lib/checkbox-panel/style/index.d.ts +0 -1
- package/lib/checkbox-panel/style/less.d.ts +0 -1
- package/lib/circle/style/index.d.ts +0 -1
- package/lib/circle/style/less.d.ts +0 -1
- package/lib/col/style/index.d.ts +0 -1
- package/lib/col/style/less.d.ts +0 -1
- package/lib/collapse/style/index.d.ts +0 -1
- package/lib/collapse/style/less.d.ts +0 -1
- package/lib/collapse-item/style/index.d.ts +0 -1
- package/lib/collapse-item/style/less.d.ts +0 -1
- package/lib/config-provider/style/index.d.ts +0 -1
- package/lib/config-provider/style/less.d.ts +0 -1
- package/lib/contact-card/style/index.d.ts +0 -1
- package/lib/contact-card/style/less.d.ts +0 -1
- package/lib/contact-edit/style/index.d.ts +0 -1
- package/lib/contact-edit/style/less.d.ts +0 -1
- package/lib/contact-list/style/index.d.ts +0 -1
- package/lib/contact-list/style/less.d.ts +0 -1
- package/lib/count-down/style/index.d.ts +0 -1
- package/lib/count-down/style/less.d.ts +0 -1
- package/lib/coupon/style/index.d.ts +0 -1
- package/lib/coupon/style/less.d.ts +0 -1
- package/lib/coupon-cell/style/index.d.ts +0 -1
- package/lib/coupon-cell/style/less.d.ts +0 -1
- package/lib/coupon-list/style/index.d.ts +0 -1
- package/lib/coupon-list/style/less.d.ts +0 -1
- package/lib/datetime-picker/style/index.d.ts +0 -1
- package/lib/datetime-picker/style/less.d.ts +0 -1
- package/lib/dialog/style/index.d.ts +0 -1
- package/lib/dialog/style/less.d.ts +0 -1
- package/lib/divider/style/index.d.ts +0 -1
- package/lib/divider/style/less.d.ts +0 -1
- package/lib/dropdown-item/style/index.d.ts +0 -1
- package/lib/dropdown-item/style/less.d.ts +0 -1
- package/lib/dropdown-menu/style/index.d.ts +0 -1
- package/lib/dropdown-menu/style/less.d.ts +0 -1
- package/lib/empty/style/index.d.ts +0 -1
- package/lib/empty/style/less.d.ts +0 -1
- package/lib/field/style/index.d.ts +0 -1
- package/lib/field/style/less.d.ts +0 -1
- package/lib/filter-tag/style/index.d.ts +0 -1
- package/lib/filter-tag/style/less.d.ts +0 -1
- package/lib/floor-select/style/index.d.ts +0 -1
- package/lib/floor-select/style/less.d.ts +0 -1
- package/lib/form/style/index.d.ts +0 -1
- package/lib/form/style/less.d.ts +0 -1
- package/lib/form-panel/style/index.d.ts +0 -1
- package/lib/form-panel/style/less.d.ts +0 -1
- package/lib/friendly-tip/style/index.d.ts +0 -1
- package/lib/friendly-tip/style/less.d.ts +0 -1
- package/lib/grid/style/index.d.ts +0 -1
- package/lib/grid/style/less.d.ts +0 -1
- package/lib/grid-item/style/index.d.ts +0 -1
- package/lib/grid-item/style/less.d.ts +0 -1
- package/lib/icon/style/index.d.ts +0 -1
- package/lib/icon/style/less.d.ts +0 -1
- package/lib/image/style/index.d.ts +0 -1
- package/lib/image/style/less.d.ts +0 -1
- package/lib/image-preview/style/index.d.ts +0 -1
- package/lib/image-preview/style/less.d.ts +0 -1
- package/lib/index-anchor/style/index.d.ts +0 -1
- package/lib/index-anchor/style/less.d.ts +0 -1
- package/lib/index-bar/style/index.d.ts +0 -1
- package/lib/index-bar/style/less.d.ts +0 -1
- package/lib/lazyload/style/index.d.ts +0 -1
- package/lib/lazyload/style/less.d.ts +0 -1
- package/lib/list/style/index.d.ts +0 -1
- package/lib/list/style/less.d.ts +0 -1
- package/lib/loading/style/index.d.ts +0 -1
- package/lib/loading/style/less.d.ts +0 -1
- package/lib/locale/style/index.d.ts +0 -1
- package/lib/locale/style/less.d.ts +0 -1
- package/lib/location-select/style/index.d.ts +0 -1
- package/lib/location-select/style/less.d.ts +0 -1
- package/lib/material-add/style/index.d.ts +0 -1
- package/lib/material-add/style/less.d.ts +0 -1
- package/lib/multi-person-select/style/index.d.ts +0 -1
- package/lib/multi-person-select/style/less.d.ts +0 -1
- package/lib/nav-bar/style/index.d.ts +0 -1
- package/lib/nav-bar/style/less.d.ts +0 -1
- package/lib/notice-bar/style/index.d.ts +0 -1
- package/lib/notice-bar/style/less.d.ts +0 -1
- package/lib/notify/style/index.d.ts +0 -1
- package/lib/notify/style/less.d.ts +0 -1
- package/lib/number-keyboard/style/index.d.ts +0 -1
- package/lib/number-keyboard/style/less.d.ts +0 -1
- package/lib/object-select/style/index.d.ts +0 -1
- package/lib/object-select/style/less.d.ts +0 -1
- package/lib/overlay/style/index.d.ts +0 -1
- package/lib/overlay/style/less.d.ts +0 -1
- package/lib/pagination/style/index.d.ts +0 -1
- package/lib/pagination/style/less.d.ts +0 -1
- package/lib/password-input/style/index.d.ts +0 -1
- package/lib/password-input/style/less.d.ts +0 -1
- package/lib/picker/style/index.d.ts +0 -1
- package/lib/picker/style/less.d.ts +0 -1
- package/lib/popover/style/index.d.ts +0 -1
- package/lib/popover/style/less.d.ts +0 -1
- package/lib/popup/style/index.d.ts +0 -1
- package/lib/popup/style/less.d.ts +0 -1
- package/lib/progress/style/index.d.ts +0 -1
- package/lib/progress/style/less.d.ts +0 -1
- package/lib/pull-refresh/style/index.d.ts +0 -1
- package/lib/pull-refresh/style/less.d.ts +0 -1
- package/lib/quantity-input/style/index.d.ts +0 -1
- package/lib/quantity-input/style/less.d.ts +0 -1
- package/lib/radio/style/index.d.ts +0 -1
- package/lib/radio/style/less.d.ts +0 -1
- package/lib/radio-group/style/index.d.ts +0 -1
- package/lib/radio-group/style/less.d.ts +0 -1
- package/lib/radio-panel/style/index.d.ts +0 -1
- package/lib/radio-panel/style/less.d.ts +0 -1
- package/lib/rate/style/index.d.ts +0 -1
- package/lib/rate/style/less.d.ts +0 -1
- package/lib/row/style/index.d.ts +0 -1
- package/lib/row/style/less.d.ts +0 -1
- package/lib/search/style/index.d.ts +0 -1
- package/lib/search/style/less.d.ts +0 -1
- package/lib/share-sheet/style/index.d.ts +0 -1
- package/lib/share-sheet/style/less.d.ts +0 -1
- package/lib/sidebar/style/index.d.ts +0 -1
- package/lib/sidebar/style/less.d.ts +0 -1
- package/lib/sidebar-item/style/index.d.ts +0 -1
- package/lib/sidebar-item/style/less.d.ts +0 -1
- package/lib/single-person-select/style/index.d.ts +0 -1
- package/lib/single-person-select/style/less.d.ts +0 -1
- package/lib/skeleton/style/index.d.ts +0 -1
- package/lib/skeleton/style/less.d.ts +0 -1
- package/lib/slider/style/index.d.ts +0 -1
- package/lib/slider/style/less.d.ts +0 -1
- package/lib/space/style/index.d.ts +0 -1
- package/lib/space/style/less.d.ts +0 -1
- package/lib/step/style/index.d.ts +0 -1
- package/lib/step/style/less.d.ts +0 -1
- package/lib/stepper/style/index.d.ts +0 -1
- package/lib/stepper/style/less.d.ts +0 -1
- package/lib/steps/style/index.d.ts +0 -1
- package/lib/steps/style/less.d.ts +0 -1
- package/lib/sticky/style/index.d.ts +0 -1
- package/lib/sticky/style/less.d.ts +0 -1
- package/lib/submit-bar/style/index.d.ts +0 -1
- package/lib/submit-bar/style/less.d.ts +0 -1
- package/lib/swipe/style/index.d.ts +0 -1
- package/lib/swipe/style/less.d.ts +0 -1
- package/lib/swipe-cell/style/index.d.ts +0 -1
- package/lib/swipe-cell/style/less.d.ts +0 -1
- package/lib/swipe-item/style/index.d.ts +0 -1
- package/lib/swipe-item/style/less.d.ts +0 -1
- package/lib/switch/style/index.d.ts +0 -1
- package/lib/switch/style/less.d.ts +0 -1
- package/lib/tab/style/index.d.ts +0 -1
- package/lib/tab/style/less.d.ts +0 -1
- package/lib/tabbar/style/index.d.ts +0 -1
- package/lib/tabbar/style/less.d.ts +0 -1
- package/lib/tabbar-item/style/index.d.ts +0 -1
- package/lib/tabbar-item/style/less.d.ts +0 -1
- package/lib/tabs/style/index.d.ts +0 -1
- package/lib/tabs/style/less.d.ts +0 -1
- package/lib/tag/style/index.d.ts +0 -1
- package/lib/tag/style/less.d.ts +0 -1
- package/lib/toast/style/index.d.ts +0 -1
- package/lib/toast/style/less.d.ts +0 -1
- package/lib/tree-select/style/index.d.ts +0 -1
- package/lib/tree-select/style/less.d.ts +0 -1
- package/lib/uploader/style/index.d.ts +0 -1
- package/lib/uploader/style/less.d.ts +0 -1
- package/lib/video-preview/style/index.d.ts +0 -1
- package/lib/video-preview/style/less.d.ts +0 -1
- package/lib/work-order-card/style/index.d.ts +0 -1
- package/lib/work-order-card/style/less.d.ts +0 -1
- package/lib/work-order-filter/style/index.d.ts +0 -1
- package/lib/work-order-filter/style/less.d.ts +0 -1
- /package/es/{action-bar-button/style/index.d.ts → bot-mobile/fab-position.test.d.ts} +0 -0
- /package/es/{action-bar-button/style/less.d.ts → bot-mobile/voice-zone.test.d.ts} +0 -0
- /package/{es/action-bar-icon/style/index.d.ts → lib/bot-mobile/fab-position.test.d.ts} +0 -0
- /package/{es/action-bar-icon/style/less.d.ts → lib/bot-mobile/voice-zone.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -42,25 +42,27 @@ pnpm up persagy-vant
|
|
|
42
42
|
|
|
43
43
|
完整的可转发说明见:[产品经理 AI 开发使用说明](./docs/markdown/product-manager-guide.zh-CN.md)。
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 包结构
|
|
46
46
|
|
|
47
47
|
```text
|
|
48
48
|
src/ 组件源码、单组件示例、测试与中英文 API 文档
|
|
49
49
|
docs/ 组件站点与设计文档
|
|
50
|
-
skills/
|
|
51
|
-
scripts/
|
|
50
|
+
skills/ 随 npm 包分发的 AI Skill
|
|
51
|
+
scripts/ 构建辅助脚本
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
## 开发
|
|
55
55
|
|
|
56
|
+
从仓库根目录执行:
|
|
57
|
+
|
|
56
58
|
```bash
|
|
57
59
|
pnpm install
|
|
58
|
-
pnpm dev
|
|
59
|
-
pnpm test
|
|
60
|
-
pnpm build
|
|
60
|
+
pnpm dev:mobile
|
|
61
|
+
pnpm test:mobile
|
|
62
|
+
pnpm build:mobile
|
|
61
63
|
```
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
本包的构建和发布配置见 [package.json](./package.json)。
|
|
64
66
|
|
|
65
67
|
## 产物管理
|
|
66
68
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
|
2
|
+
import { type FabSide } from './fab-position';
|
|
3
|
+
export interface BotFabPositionChangePayload {
|
|
4
|
+
side: FabSide;
|
|
5
|
+
top: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const botFabProps: {
|
|
8
|
+
icon: {
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
side: {
|
|
13
|
+
type: import("vue").PropType<FabSide>;
|
|
14
|
+
default: FabSide;
|
|
15
|
+
};
|
|
16
|
+
offsetBottom: {
|
|
17
|
+
type: NumberConstructor;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
draggable: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: true;
|
|
23
|
+
};
|
|
24
|
+
badge: (NumberConstructor | StringConstructor)[];
|
|
25
|
+
};
|
|
26
|
+
export declare type BotFabProps = ExtractPropTypes<typeof botFabProps>;
|
|
27
|
+
declare const _default: import("vue").DefineComponent<{
|
|
28
|
+
icon: {
|
|
29
|
+
type: import("vue").PropType<string>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
side: {
|
|
33
|
+
type: import("vue").PropType<FabSide>;
|
|
34
|
+
default: FabSide;
|
|
35
|
+
};
|
|
36
|
+
offsetBottom: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
default: number;
|
|
39
|
+
};
|
|
40
|
+
draggable: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: true;
|
|
43
|
+
};
|
|
44
|
+
badge: (NumberConstructor | StringConstructor)[];
|
|
45
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "positionChange")[], "click" | "positionChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
46
|
+
icon: {
|
|
47
|
+
type: import("vue").PropType<string>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
side: {
|
|
51
|
+
type: import("vue").PropType<FabSide>;
|
|
52
|
+
default: FabSide;
|
|
53
|
+
};
|
|
54
|
+
offsetBottom: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
default: number;
|
|
57
|
+
};
|
|
58
|
+
draggable: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: true;
|
|
61
|
+
};
|
|
62
|
+
badge: (NumberConstructor | StringConstructor)[];
|
|
63
|
+
}>> & {
|
|
64
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
onPositionChange?: ((...args: any[]) => any) | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
icon: string;
|
|
68
|
+
side: FabSide;
|
|
69
|
+
offsetBottom: number;
|
|
70
|
+
draggable: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { ref, computed, onMounted, defineComponent, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { clamp, truthProp, numericProp, makeStringProp, makeNumberProp, createNamespace } from "../utils/index.mjs";
|
|
3
|
+
import { Icon } from "../icon/index.mjs";
|
|
4
|
+
import { resolveSnapSide, isTapNotDrag } from "./fab-position.mjs";
|
|
5
|
+
const [name, bem] = createNamespace("bot-mobile-fab");
|
|
6
|
+
const FAB_SIZE = 56;
|
|
7
|
+
const botFabProps = {
|
|
8
|
+
icon: makeStringProp("chat-o"),
|
|
9
|
+
side: makeStringProp("right"),
|
|
10
|
+
offsetBottom: makeNumberProp(80),
|
|
11
|
+
draggable: truthProp,
|
|
12
|
+
badge: numericProp
|
|
13
|
+
};
|
|
14
|
+
function getSafeAreaInsetBottom() {
|
|
15
|
+
if (typeof document === "undefined") {
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
const probe = document.createElement("div");
|
|
19
|
+
probe.style.position = "fixed";
|
|
20
|
+
probe.style.left = "0";
|
|
21
|
+
probe.style.bottom = "0";
|
|
22
|
+
probe.style.height = "0";
|
|
23
|
+
probe.style.paddingBottom = "env(safe-area-inset-bottom)";
|
|
24
|
+
probe.style.visibility = "hidden";
|
|
25
|
+
probe.style.pointerEvents = "none";
|
|
26
|
+
document.body.appendChild(probe);
|
|
27
|
+
const value = parseFloat(getComputedStyle(probe).paddingBottom) || 0;
|
|
28
|
+
document.body.removeChild(probe);
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
var stdin_default = defineComponent({
|
|
32
|
+
name,
|
|
33
|
+
props: botFabProps,
|
|
34
|
+
emits: ["click", "positionChange"],
|
|
35
|
+
setup(props, {
|
|
36
|
+
emit
|
|
37
|
+
}) {
|
|
38
|
+
const side = ref(props.side);
|
|
39
|
+
const dragging = ref(false);
|
|
40
|
+
const dragLeft = ref(null);
|
|
41
|
+
const top = ref(typeof window === "undefined" ? 0 : window.innerHeight - FAB_SIZE - props.offsetBottom);
|
|
42
|
+
let safeAreaBottom = 0;
|
|
43
|
+
let pressing = false;
|
|
44
|
+
let moved = false;
|
|
45
|
+
let startX = 0;
|
|
46
|
+
let startY = 0;
|
|
47
|
+
let startTop = 0;
|
|
48
|
+
let startLeft = 0;
|
|
49
|
+
let elWidth = FAB_SIZE;
|
|
50
|
+
let elHeight = FAB_SIZE;
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
safeAreaBottom = getSafeAreaInsetBottom();
|
|
53
|
+
});
|
|
54
|
+
const onPointerDown = (event) => {
|
|
55
|
+
if (event.button !== 0) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const el = event.currentTarget;
|
|
59
|
+
try {
|
|
60
|
+
el.setPointerCapture(event.pointerId);
|
|
61
|
+
} catch (e) {
|
|
62
|
+
}
|
|
63
|
+
const rect = el.getBoundingClientRect();
|
|
64
|
+
pressing = true;
|
|
65
|
+
moved = false;
|
|
66
|
+
startX = event.clientX;
|
|
67
|
+
startY = event.clientY;
|
|
68
|
+
startTop = rect.top;
|
|
69
|
+
startLeft = rect.left;
|
|
70
|
+
elWidth = rect.width || FAB_SIZE;
|
|
71
|
+
elHeight = rect.height || FAB_SIZE;
|
|
72
|
+
if (props.draggable) {
|
|
73
|
+
top.value = startTop;
|
|
74
|
+
dragLeft.value = startLeft;
|
|
75
|
+
dragging.value = true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const onPointerMove = (event) => {
|
|
79
|
+
if (!pressing || !props.draggable) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const dx = event.clientX - startX;
|
|
83
|
+
const dy = event.clientY - startY;
|
|
84
|
+
if (!isTapNotDrag(dx, dy)) {
|
|
85
|
+
moved = true;
|
|
86
|
+
}
|
|
87
|
+
const maxLeft = Math.max(0, window.innerWidth - elWidth);
|
|
88
|
+
const maxTop = Math.max(0, window.innerHeight - elHeight - safeAreaBottom);
|
|
89
|
+
dragLeft.value = clamp(startLeft + dx, 0, maxLeft);
|
|
90
|
+
top.value = clamp(startTop + dy, 0, maxTop);
|
|
91
|
+
};
|
|
92
|
+
const finishGesture = (dx, dy, cancelled) => {
|
|
93
|
+
var _a;
|
|
94
|
+
if (!pressing) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
pressing = false;
|
|
98
|
+
if (props.draggable) {
|
|
99
|
+
dragging.value = false;
|
|
100
|
+
const currentLeft = (_a = dragLeft.value) != null ? _a : startLeft;
|
|
101
|
+
const nextSide = resolveSnapSide(currentLeft + elWidth / 2, window.innerWidth);
|
|
102
|
+
side.value = nextSide;
|
|
103
|
+
dragLeft.value = null;
|
|
104
|
+
emit("positionChange", {
|
|
105
|
+
side: nextSide,
|
|
106
|
+
top: top.value
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (!cancelled && !moved && isTapNotDrag(dx, dy)) {
|
|
110
|
+
emit("click");
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const onPointerUp = (event) => {
|
|
114
|
+
finishGesture(event.clientX - startX, event.clientY - startY, false);
|
|
115
|
+
};
|
|
116
|
+
const onPointerCancel = () => {
|
|
117
|
+
finishGesture(0, 0, true);
|
|
118
|
+
};
|
|
119
|
+
const fabStyle = computed(() => {
|
|
120
|
+
const style = {
|
|
121
|
+
top: `${top.value}px`
|
|
122
|
+
};
|
|
123
|
+
if (dragging.value && dragLeft.value !== null) {
|
|
124
|
+
style.left = `${dragLeft.value}px`;
|
|
125
|
+
} else {
|
|
126
|
+
style[side.value] = "0px";
|
|
127
|
+
}
|
|
128
|
+
return style;
|
|
129
|
+
});
|
|
130
|
+
return () => _createVNode("div", {
|
|
131
|
+
"class": bem({
|
|
132
|
+
dragging: dragging.value
|
|
133
|
+
}),
|
|
134
|
+
"style": fabStyle.value,
|
|
135
|
+
"role": "button",
|
|
136
|
+
"tabindex": 0,
|
|
137
|
+
"onPointerdown": onPointerDown,
|
|
138
|
+
"onPointermove": onPointerMove,
|
|
139
|
+
"onPointerup": onPointerUp,
|
|
140
|
+
"onPointercancel": onPointerCancel
|
|
141
|
+
}, [_createVNode(Icon, {
|
|
142
|
+
"class": bem("icon"),
|
|
143
|
+
"name": props.icon,
|
|
144
|
+
"size": 24,
|
|
145
|
+
"badge": props.badge
|
|
146
|
+
}, null)]);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
export {
|
|
150
|
+
botFabProps,
|
|
151
|
+
stdin_default as default
|
|
152
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { BotMobileSession } from './types';
|
|
3
|
+
export declare const botHistoryDrawerProps: {
|
|
4
|
+
show: BooleanConstructor;
|
|
5
|
+
sessions: {
|
|
6
|
+
type: import("vue").PropType<BotMobileSession[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
activeId: {
|
|
10
|
+
type: import("vue").PropType<string>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
searchable: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: true;
|
|
16
|
+
};
|
|
17
|
+
title: {
|
|
18
|
+
type: import("vue").PropType<string>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export declare type BotHistoryDrawerProps = ExtractPropTypes<typeof botHistoryDrawerProps>;
|
|
23
|
+
declare const _default: import("vue").DefineComponent<{
|
|
24
|
+
show: BooleanConstructor;
|
|
25
|
+
sessions: {
|
|
26
|
+
type: import("vue").PropType<BotMobileSession[]>;
|
|
27
|
+
default: () => never[];
|
|
28
|
+
};
|
|
29
|
+
activeId: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
searchable: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: true;
|
|
36
|
+
};
|
|
37
|
+
title: {
|
|
38
|
+
type: import("vue").PropType<string>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show" | "delete" | "rename" | "create")[], "select" | "update:show" | "delete" | "rename" | "create", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
42
|
+
show: BooleanConstructor;
|
|
43
|
+
sessions: {
|
|
44
|
+
type: import("vue").PropType<BotMobileSession[]>;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
activeId: {
|
|
48
|
+
type: import("vue").PropType<string>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
searchable: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: true;
|
|
54
|
+
};
|
|
55
|
+
title: {
|
|
56
|
+
type: import("vue").PropType<string>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
}>> & {
|
|
60
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
61
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
onDelete?: ((...args: any[]) => any) | undefined;
|
|
63
|
+
onRename?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
onCreate?: ((...args: any[]) => any) | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
title: string;
|
|
67
|
+
show: boolean;
|
|
68
|
+
activeId: string;
|
|
69
|
+
sessions: BotMobileSession[];
|
|
70
|
+
searchable: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ref, defineComponent, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { truthProp, makeArrayProp, makeStringProp, createNamespace } from "../utils/index.mjs";
|
|
3
|
+
import { Popup } from "../popup/index.mjs";
|
|
4
|
+
import { Icon } from "../icon/index.mjs";
|
|
5
|
+
import { Search } from "../search/index.mjs";
|
|
6
|
+
import { filterSessions } from "./session-filter.mjs";
|
|
7
|
+
import { renderSessionItem } from "./session-item.mjs";
|
|
8
|
+
const [name, bem] = createNamespace("bot-mobile-history-drawer");
|
|
9
|
+
const botHistoryDrawerProps = {
|
|
10
|
+
show: Boolean,
|
|
11
|
+
sessions: makeArrayProp(),
|
|
12
|
+
activeId: makeStringProp(""),
|
|
13
|
+
searchable: truthProp,
|
|
14
|
+
title: makeStringProp("\u5386\u53F2\u4F1A\u8BDD")
|
|
15
|
+
};
|
|
16
|
+
var stdin_default = defineComponent({
|
|
17
|
+
name,
|
|
18
|
+
props: botHistoryDrawerProps,
|
|
19
|
+
emits: ["update:show", "select", "rename", "delete", "create"],
|
|
20
|
+
setup(props, {
|
|
21
|
+
emit
|
|
22
|
+
}) {
|
|
23
|
+
const keyword = ref("");
|
|
24
|
+
const editingId = ref("");
|
|
25
|
+
const editingName = ref("");
|
|
26
|
+
const close = () => emit("update:show", false);
|
|
27
|
+
const startRename = (session) => {
|
|
28
|
+
editingId.value = session.id;
|
|
29
|
+
editingName.value = session.name;
|
|
30
|
+
};
|
|
31
|
+
const cancelRename = () => {
|
|
32
|
+
editingId.value = "";
|
|
33
|
+
editingName.value = "";
|
|
34
|
+
};
|
|
35
|
+
const commitRename = (session) => {
|
|
36
|
+
if (editingId.value !== session.id) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const nextName = editingName.value.trim();
|
|
40
|
+
cancelRename();
|
|
41
|
+
if (nextName && nextName !== session.name) {
|
|
42
|
+
emit("rename", {
|
|
43
|
+
session,
|
|
44
|
+
name: nextName
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return () => _createVNode(Popup, {
|
|
49
|
+
"show": props.show,
|
|
50
|
+
"class": bem(),
|
|
51
|
+
"position": "right",
|
|
52
|
+
"teleport": "body",
|
|
53
|
+
"onUpdate:show": (show) => emit("update:show", show)
|
|
54
|
+
}, {
|
|
55
|
+
default: () => [_createVNode("div", {
|
|
56
|
+
"class": bem("header")
|
|
57
|
+
}, [_createVNode(Icon, {
|
|
58
|
+
"name": "cross",
|
|
59
|
+
"class": bem("close"),
|
|
60
|
+
"onClick": close
|
|
61
|
+
}, null), _createVNode("div", {
|
|
62
|
+
"class": bem("title")
|
|
63
|
+
}, [props.title]), _createVNode(Icon, {
|
|
64
|
+
"name": "plus",
|
|
65
|
+
"class": bem("create"),
|
|
66
|
+
"onClick": () => emit("create")
|
|
67
|
+
}, null)]), props.searchable && _createVNode(Search, {
|
|
68
|
+
"modelValue": keyword.value,
|
|
69
|
+
"onUpdate:modelValue": ($event) => keyword.value = $event,
|
|
70
|
+
"class": bem("search"),
|
|
71
|
+
"shape": "round",
|
|
72
|
+
"placeholder": "\u641C\u7D22\u4F1A\u8BDD",
|
|
73
|
+
"clearable": true
|
|
74
|
+
}, null), _createVNode("div", {
|
|
75
|
+
"class": bem("list")
|
|
76
|
+
}, [filterSessions(props.sessions, keyword.value).map((session) => renderSessionItem({
|
|
77
|
+
key: session.id,
|
|
78
|
+
session,
|
|
79
|
+
active: session.id === props.activeId,
|
|
80
|
+
editing: editingId.value === session.id,
|
|
81
|
+
editingName: editingName.value,
|
|
82
|
+
onSelect: () => emit("select", session),
|
|
83
|
+
onStartRename: () => startRename(session),
|
|
84
|
+
onEditingNameInput: (value) => {
|
|
85
|
+
editingName.value = value;
|
|
86
|
+
},
|
|
87
|
+
onCommitRename: () => commitRename(session),
|
|
88
|
+
onCancelRename: cancelRename,
|
|
89
|
+
onDelete: () => emit("delete", session)
|
|
90
|
+
}))])]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
export {
|
|
95
|
+
botHistoryDrawerProps,
|
|
96
|
+
stdin_default as default
|
|
97
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type PropType, type ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const botMobileProps: {
|
|
3
|
+
gatewayBaseUrl: {
|
|
4
|
+
type: PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
businessContext: PropType<Record<string, unknown>>;
|
|
8
|
+
references: {
|
|
9
|
+
type: PropType<unknown[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
title: StringConstructor;
|
|
13
|
+
showHeader: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: true;
|
|
16
|
+
};
|
|
17
|
+
showFooter: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: true;
|
|
20
|
+
};
|
|
21
|
+
clientId: StringConstructor;
|
|
22
|
+
autoConnect: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare type BotMobileProps = ExtractPropTypes<typeof botMobileProps>;
|
|
28
|
+
declare const _default: import("vue").DefineComponent<{
|
|
29
|
+
gatewayBaseUrl: {
|
|
30
|
+
type: PropType<string>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
businessContext: PropType<Record<string, unknown>>;
|
|
34
|
+
references: {
|
|
35
|
+
type: PropType<unknown[]>;
|
|
36
|
+
default: () => never[];
|
|
37
|
+
};
|
|
38
|
+
title: StringConstructor;
|
|
39
|
+
showHeader: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: true;
|
|
42
|
+
};
|
|
43
|
+
showFooter: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: true;
|
|
46
|
+
};
|
|
47
|
+
clientId: StringConstructor;
|
|
48
|
+
autoConnect: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: true;
|
|
51
|
+
};
|
|
52
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
53
|
+
gatewayBaseUrl: {
|
|
54
|
+
type: PropType<string>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
businessContext: PropType<Record<string, unknown>>;
|
|
58
|
+
references: {
|
|
59
|
+
type: PropType<unknown[]>;
|
|
60
|
+
default: () => never[];
|
|
61
|
+
};
|
|
62
|
+
title: StringConstructor;
|
|
63
|
+
showHeader: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: true;
|
|
66
|
+
};
|
|
67
|
+
showFooter: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: true;
|
|
70
|
+
};
|
|
71
|
+
clientId: StringConstructor;
|
|
72
|
+
autoConnect: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: true;
|
|
75
|
+
};
|
|
76
|
+
}>>, {
|
|
77
|
+
gatewayBaseUrl: string;
|
|
78
|
+
references: unknown[];
|
|
79
|
+
showHeader: boolean;
|
|
80
|
+
showFooter: boolean;
|
|
81
|
+
autoConnect: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ref, defineComponent, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { BotContainerNanobot } from "meos-bot-web";
|
|
3
|
+
import { truthProp, makeStringProp, makeArrayProp, createNamespace } from "../utils/index.mjs";
|
|
4
|
+
import { useExpose } from "../composables/use-expose.mjs";
|
|
5
|
+
const [name, bem] = createNamespace("bot-mobile");
|
|
6
|
+
const botMobileProps = {
|
|
7
|
+
gatewayBaseUrl: makeStringProp(""),
|
|
8
|
+
businessContext: Object,
|
|
9
|
+
references: makeArrayProp(),
|
|
10
|
+
title: String,
|
|
11
|
+
showHeader: truthProp,
|
|
12
|
+
showFooter: truthProp,
|
|
13
|
+
clientId: String,
|
|
14
|
+
autoConnect: truthProp
|
|
15
|
+
};
|
|
16
|
+
var stdin_default = defineComponent({
|
|
17
|
+
name,
|
|
18
|
+
inheritAttrs: false,
|
|
19
|
+
props: botMobileProps,
|
|
20
|
+
setup(props, {
|
|
21
|
+
attrs
|
|
22
|
+
}) {
|
|
23
|
+
const botRef = ref();
|
|
24
|
+
useExpose({
|
|
25
|
+
botRef
|
|
26
|
+
});
|
|
27
|
+
return () => _createVNode("div", {
|
|
28
|
+
"class": bem()
|
|
29
|
+
}, [_createVNode(BotContainerNanobot, _mergeProps({
|
|
30
|
+
"ref": botRef,
|
|
31
|
+
"gatewayBaseUrl": props.gatewayBaseUrl,
|
|
32
|
+
"businessContext": props.businessContext,
|
|
33
|
+
"references": props.references,
|
|
34
|
+
"title": props.title,
|
|
35
|
+
"showHeader": props.showHeader,
|
|
36
|
+
"showFooter": props.showFooter,
|
|
37
|
+
"clientId": props.clientId,
|
|
38
|
+
"autoConnect": props.autoConnect
|
|
39
|
+
}, attrs, {
|
|
40
|
+
"mode": "mobile"
|
|
41
|
+
}), null)]);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
botMobileProps,
|
|
46
|
+
stdin_default as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { BotMobileContextTag } from './types';
|
|
3
|
+
export declare const botMobileContextTagsProps: {
|
|
4
|
+
tags: {
|
|
5
|
+
type: import("vue").PropType<BotMobileContextTag[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: import("vue").PropType<string[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
max: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare type BotMobileContextTagsProps = ExtractPropTypes<typeof botMobileContextTagsProps>;
|
|
18
|
+
declare const _default: import("vue").DefineComponent<{
|
|
19
|
+
tags: {
|
|
20
|
+
type: import("vue").PropType<BotMobileContextTag[]>;
|
|
21
|
+
default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: import("vue").PropType<string[]>;
|
|
25
|
+
default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
max: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
32
|
+
tags: {
|
|
33
|
+
type: import("vue").PropType<BotMobileContextTag[]>;
|
|
34
|
+
default: () => never[];
|
|
35
|
+
};
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: import("vue").PropType<string[]>;
|
|
38
|
+
default: () => never[];
|
|
39
|
+
};
|
|
40
|
+
max: {
|
|
41
|
+
type: NumberConstructor;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
}>> & {
|
|
45
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
max: number;
|
|
49
|
+
tags: BotMobileContextTag[];
|
|
50
|
+
modelValue: string[];
|
|
51
|
+
}>;
|
|
52
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { makeArrayProp, makeNumberProp, createNamespace } from "../utils/index.mjs";
|
|
3
|
+
const [name, bem] = createNamespace("bot-mobile-context-tags");
|
|
4
|
+
const botMobileContextTagsProps = {
|
|
5
|
+
tags: makeArrayProp(),
|
|
6
|
+
modelValue: makeArrayProp(),
|
|
7
|
+
max: makeNumberProp(0)
|
|
8
|
+
};
|
|
9
|
+
var stdin_default = defineComponent({
|
|
10
|
+
name,
|
|
11
|
+
props: botMobileContextTagsProps,
|
|
12
|
+
emits: ["update:modelValue", "change"],
|
|
13
|
+
setup(props, {
|
|
14
|
+
emit
|
|
15
|
+
}) {
|
|
16
|
+
const toggle = (tag) => {
|
|
17
|
+
const selectedIds = props.modelValue;
|
|
18
|
+
const isSelected = selectedIds.includes(tag.id);
|
|
19
|
+
let nextIds;
|
|
20
|
+
if (isSelected) {
|
|
21
|
+
nextIds = selectedIds.filter((id) => id !== tag.id);
|
|
22
|
+
} else if (props.max === 1) {
|
|
23
|
+
nextIds = [tag.id];
|
|
24
|
+
} else if (props.max > 0 && selectedIds.length >= props.max) {
|
|
25
|
+
return;
|
|
26
|
+
} else {
|
|
27
|
+
nextIds = selectedIds.concat(tag.id);
|
|
28
|
+
}
|
|
29
|
+
emit("update:modelValue", nextIds);
|
|
30
|
+
emit("change", props.tags.filter((item) => nextIds.includes(item.id)));
|
|
31
|
+
};
|
|
32
|
+
const renderTag = (tag) => {
|
|
33
|
+
const selected = props.modelValue.includes(tag.id);
|
|
34
|
+
return _createVNode("div", {
|
|
35
|
+
"role": "button",
|
|
36
|
+
"tabindex": 0,
|
|
37
|
+
"key": tag.id,
|
|
38
|
+
"class": bem("item", {
|
|
39
|
+
selected
|
|
40
|
+
}),
|
|
41
|
+
"onClick": () => toggle(tag)
|
|
42
|
+
}, [tag.label]);
|
|
43
|
+
};
|
|
44
|
+
return () => _createVNode("div", {
|
|
45
|
+
"class": bem()
|
|
46
|
+
}, [props.tags.map(renderTag)]);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
botMobileContextTagsProps,
|
|
51
|
+
stdin_default as default
|
|
52
|
+
};
|