giime 1.1.5 → 1.1.6
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/es/components/src/base/affix/Affix.vue.d.ts +2 -2
- package/es/components/src/base/alert/Alert.vue.d.ts +3 -3
- package/es/components/src/base/alert/index.d.ts +8 -8
- package/es/components/src/base/anchor/Anchor.vue.d.ts +1 -1
- package/es/components/src/base/anchor/index.d.ts +3 -3
- package/es/components/src/base/autocomplete/Autocomplete.vue.d.ts +11 -11
- package/es/components/src/base/autocomplete/autocomplete.d.ts +1 -1
- package/es/components/src/base/autocomplete/index.d.ts +30 -30
- package/es/components/src/base/badge/Badge.vue.d.ts +1 -1
- package/es/components/src/base/badge/index.d.ts +3 -3
- package/es/components/src/base/button/Button.vue.d.ts +9 -9
- package/es/components/src/base/button/button.d.ts +4 -4
- package/es/components/src/base/button/index.d.ts +23 -23
- package/es/components/src/base/buttonGroup/ButtonGroup.vue.d.ts +3 -3
- package/es/components/src/base/buttonGroup/buttonGroup.d.ts +1 -1
- package/es/components/src/base/buttonGroup/index.d.ts +7 -7
- package/es/components/src/base/carousel/Carousel.vue.d.ts +1 -1
- package/es/components/src/base/carousel/index.d.ts +3 -3
- package/es/components/src/base/cascader/Cascader.vue.d.ts +6 -6
- package/es/components/src/base/cascader/index.d.ts +18 -18
- package/es/components/src/base/chart/Chart.vue.d.ts +2 -2
- package/es/components/src/base/chart/index.d.ts +2 -2
- package/es/components/src/base/checkbox/Checkbox.vue.d.ts +2 -2
- package/es/components/src/base/checkbox/index.d.ts +6 -6
- package/es/components/src/base/checkboxButton/CheckboxButton.vue.d.ts +2 -2
- package/es/components/src/base/checkboxButton/index.d.ts +6 -6
- package/es/components/src/base/col/Col.vue.d.ts +1 -1
- package/es/components/src/base/col/index.d.ts +3 -3
- package/es/components/src/base/collapseItem/CollapseItem.vue.d.ts +1 -1
- package/es/components/src/base/collapseItem/index.d.ts +3 -3
- package/es/components/src/base/colorPicker/ColorPicker.vue.d.ts +6 -6
- package/es/components/src/base/colorPicker/index.d.ts +6 -6
- package/es/components/src/base/colorPickerPanel/ColorPickerPanel.vue.d.ts +1 -1
- package/es/components/src/base/colorPickerPanel/index.d.ts +1 -1
- package/es/components/src/base/datePicker/DatePicker.vue.d.ts +5 -5
- package/es/components/src/base/datePicker/index.d.ts +15 -15
- package/es/components/src/base/datePickerPanel/DatePickerPanel.vue.d.ts +1 -1
- package/es/components/src/base/datePickerPanel/index.d.ts +3 -3
- package/es/components/src/base/descriptions/Descriptions.vue.d.ts +1 -1
- package/es/components/src/base/descriptions/index.d.ts +3 -3
- package/es/components/src/base/descriptionsItem/DescriptionsItem.vue.d.ts +6 -6
- package/es/components/src/base/descriptionsItem/descriptionsItem.d.ts +2 -2
- package/es/components/src/base/descriptionsItem/index.d.ts +14 -14
- package/es/components/src/base/dialog/Dialog.vue.d.ts +3 -3
- package/es/components/src/base/dialog/index.d.ts +8 -8
- package/es/components/src/base/divider/Divider.vue.d.ts +3 -3
- package/es/components/src/base/divider/divider.d.ts +1 -1
- package/es/components/src/base/divider/index.d.ts +7 -7
- package/es/components/src/base/drawer/Drawer.vue.d.ts +4 -4
- package/es/components/src/base/drawer/index.d.ts +11 -11
- package/es/components/src/base/dropdown/Dropdown.vue.d.ts +7 -7
- package/es/components/src/base/dropdown/dropdown.d.ts +2 -2
- package/es/components/src/base/dropdown/index.d.ts +17 -17
- package/es/components/src/base/form/Form.vue.d.ts +1 -1
- package/es/components/src/base/form/index.d.ts +3 -3
- package/es/components/src/base/image/Image.vue.d.ts +3 -3
- package/es/components/src/base/image/index.d.ts +8 -8
- package/es/components/src/base/imageViewer/ImageViewer.vue.d.ts +2 -2
- package/es/components/src/base/imageViewer/index.d.ts +4 -4
- package/es/components/src/base/input/Input.vue.d.ts +14 -14
- package/es/components/src/base/input/index.d.ts +38 -38
- package/es/components/src/base/input/input.d.ts +1 -1
- package/es/components/src/base/inputNumber/InputNumber.vue.d.ts +12 -12
- package/es/components/src/base/inputNumber/index.d.ts +31 -31
- package/es/components/src/base/inputNumber/inputNumber.d.ts +2 -2
- package/es/components/src/base/inputTag/InputTag.vue.d.ts +6 -6
- package/es/components/src/base/inputTag/index.d.ts +17 -17
- package/es/components/src/base/link/Link.vue.d.ts +1 -1
- package/es/components/src/base/link/index.d.ts +3 -3
- package/es/components/src/base/mention/Mention.vue.d.ts +13 -13
- package/es/components/src/base/mention/index.d.ts +37 -37
- package/es/components/src/base/mention/mention.d.ts +1 -1
- package/es/components/src/base/menu/Menu.vue.d.ts +4 -4
- package/es/components/src/base/menu/index.d.ts +10 -10
- package/es/components/src/base/pagination/Pagination.vue.d.ts +1 -1
- package/es/components/src/base/pagination/index.d.ts +3 -3
- package/es/components/src/base/popconfirm/Popconfirm.vue.d.ts +8 -8
- package/es/components/src/base/popconfirm/index.d.ts +19 -19
- package/es/components/src/base/popconfirm/popconfirm.d.ts +2 -2
- package/es/components/src/base/popover/Popover.vue.d.ts +3 -3
- package/es/components/src/base/popover/index.d.ts +9 -9
- package/es/components/src/base/popper/Popper.vue.d.ts +3 -3
- package/es/components/src/base/popper/index.d.ts +7 -7
- package/es/components/src/base/popper/popper.d.ts +1 -1
- package/es/components/src/base/progress/Progress.vue.d.ts +2 -2
- package/es/components/src/base/progress/index.d.ts +6 -6
- package/es/components/src/base/radio/Radio.vue.d.ts +1 -1
- package/es/components/src/base/radio/index.d.ts +3 -3
- package/es/components/src/base/radioGroup/RadioGroup.vue.d.ts +1 -1
- package/es/components/src/base/radioGroup/index.d.ts +3 -3
- package/es/components/src/base/result/Result.vue.d.ts +1 -1
- package/es/components/src/base/result/index.d.ts +3 -3
- package/es/components/src/base/scrollbar/Scrollbar.vue.d.ts +3 -3
- package/es/components/src/base/scrollbar/index.d.ts +7 -7
- package/es/components/src/base/scrollbar/scrollbar.d.ts +1 -1
- package/es/components/src/base/segmented/Segmented.vue.d.ts +1 -1
- package/es/components/src/base/segmented/index.d.ts +3 -3
- package/es/components/src/base/select/Select.vue.d.ts +7 -7
- package/es/components/src/base/select/index.d.ts +21 -21
- package/es/components/src/base/selectV2/SelectV2.vue.d.ts +8 -8
- package/es/components/src/base/selectV2/index.d.ts +24 -24
- package/es/components/src/base/skeletonItem/SkeletonItem.vue.d.ts +3 -3
- package/es/components/src/base/skeletonItem/index.d.ts +7 -7
- package/es/components/src/base/skeletonItem/skeletonItem.d.ts +1 -1
- package/es/components/src/base/slider/Slider.vue.d.ts +2 -2
- package/es/components/src/base/slider/index.d.ts +5 -5
- package/es/components/src/base/space/Space.vue.d.ts +5 -5
- package/es/components/src/base/space/index.d.ts +13 -13
- package/es/components/src/base/space/space.d.ts +1 -1
- package/es/components/src/base/steps/Steps.vue.d.ts +1 -1
- package/es/components/src/base/steps/index.d.ts +3 -3
- package/es/components/src/base/switch/Switch.vue.d.ts +2 -2
- package/es/components/src/base/switch/index.d.ts +5 -5
- package/es/components/src/base/table/Table.vue.d.ts +5 -5
- package/es/components/src/base/table/index.d.ts +10 -10
- package/es/components/src/base/table/table.d.ts +2 -2
- package/es/components/src/base/tableColumn/TableColumn.vue.d.ts +4 -4
- package/es/components/src/base/tableColumn/index.d.ts +10 -10
- package/es/components/src/base/tableColumn/tableColumn.d.ts +1 -1
- package/es/components/src/base/tableV2/TableV2.vue.d.ts +3 -3
- package/es/components/src/base/tableV2/index.d.ts +7 -7
- package/es/components/src/base/tableV2/tableV2.d.ts +1 -1
- package/es/components/src/base/tag/Tag.vue.d.ts +3 -3
- package/es/components/src/base/tag/index.d.ts +8 -8
- package/es/components/src/base/text/Text.vue.d.ts +1 -1
- package/es/components/src/base/text/index.d.ts +3 -3
- package/es/components/src/base/timePicker/TimePicker.vue.d.ts +6 -6
- package/es/components/src/base/timePicker/index.d.ts +18 -18
- package/es/components/src/base/timeSelect/TimeSelect.vue.d.ts +6 -6
- package/es/components/src/base/timeSelect/index.d.ts +18 -18
- package/es/components/src/base/timelineItem/TimelineItem.vue.d.ts +3 -3
- package/es/components/src/base/timelineItem/index.d.ts +9 -9
- package/es/components/src/base/tooltip/Tooltip.vue.d.ts +5 -5
- package/es/components/src/base/tooltip/index.d.ts +13 -13
- package/es/components/src/base/tooltip/tooltip.d.ts +1 -1
- package/es/components/src/base/tour/Tour.vue.d.ts +1 -1
- package/es/components/src/base/tour/index.d.ts +3 -3
- package/es/components/src/base/tourStep/TourStep.vue.d.ts +1 -1
- package/es/components/src/base/tourStep/index.d.ts +3 -3
- package/es/components/src/base/treeSelect/TreeSelect.vue.d.ts +8 -8
- package/es/components/src/base/upload/Upload.vue.d.ts +6 -6
- package/es/components/src/base/upload/index.d.ts +16 -16
- package/es/components/src/base/upload/upload.d.ts +1 -1
- package/es/components/src/business/uploadItem/UploadItem.vue.d.ts +7 -7
- package/es/components/src/business/uploadItem/index.d.ts +19 -19
- package/es/components/src/business/uploadItem/uploadItem.d.ts +1 -1
- package/es/components/src/business/uploadPro/UploadPro.vue.d.ts +8 -8
- package/es/components/src/business/uploadPro/index.d.ts +22 -22
- package/es/components/src/business/uploadPro/uploadPro.d.ts +1 -1
- package/es/components/src/composite/dialogForm/DialogForm.vue.d.ts +14 -14
- package/es/components/src/composite/dialogForm/index.d.ts +40 -40
- package/es/components/src/composite/drawerForm/DrawerForm.vue.d.ts +18 -18
- package/es/components/src/composite/drawerForm/index.d.ts +52 -52
- package/es/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
- package/es/components/src/composite/fileComponent/index.d.ts +3 -3
- package/es/components/src/composite/fileList2/FileList.vue.d.ts +1 -1
- package/es/components/src/composite/fileList2/index.d.ts +3 -3
- package/es/components/src/composite/formItemModule/FormItemModule.vue.d.ts +3 -3
- package/es/components/src/composite/formItemModule/index.d.ts +3 -3
- package/es/components/src/composite/importDialog/ImportDialog.vue.d.ts +5 -5
- package/es/components/src/composite/importDialog/importDialog.d.ts +1 -1
- package/es/components/src/composite/importDialog/index.d.ts +13 -13
- package/es/components/src/composite/memoryForm/MemoryForm.vue.d.ts +1 -1
- package/es/components/src/composite/memoryForm/index.d.ts +3 -3
- package/es/components/src/composite/numberInterval/NumberInterval.vue.d.ts +1 -1
- package/es/components/src/composite/numberInterval/index.d.ts +1 -1
- package/es/components/src/composite/operateButton/OperateButton.vue.d.ts +3 -3
- package/es/components/src/composite/operateButton/index.d.ts +3 -3
- package/es/components/src/composite/operateButton/operateButton.d.ts +1 -1
- package/es/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
- package/es/components/src/composite/previewFile/index.d.ts +1 -1
- package/es/components/src/composite/ruleEditor/RuleEditor.vue.d.ts +1 -1
- package/es/components/src/composite/ruleEditor/index.d.ts +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue.d.ts +4 -4
- package/es/components/src/composite/searchForm/searchFormItems/cascader/index.d.ts +4 -4
- package/es/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue.d.ts +4 -4
- package/es/components/src/composite/searchForm/searchFormItems/datePicker/index.d.ts +4 -4
- package/es/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue.d.ts +6 -6
- package/es/components/src/composite/searchForm/searchFormItems/input/index.d.ts +6 -6
- package/es/components/src/composite/searchForm/searchFormItems/numberInterval/SearchFormNumberInterval.vue.d.ts +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/numberInterval/index.d.ts +1 -1
- package/es/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue.d.ts +5 -5
- package/es/components/src/composite/searchForm/searchFormItems/select/index.d.ts +5 -5
- package/es/components/src/composite/searchForm/searchFormItems/selectV2/SearchFormSelectV2.vue.d.ts +5 -5
- package/es/components/src/composite/searchForm/searchFormItems/selectV2/index.d.ts +5 -5
- package/es/components/src/composite/selectOptions/SelectOptions.vue.d.ts +6 -6
- package/es/components/src/composite/selectOptions/index.d.ts +18 -18
- package/es/components/src/composite/tableCustom/TableCustom.vue.d.ts +8 -8
- package/es/components/src/composite/tableCustom/customOperate/customOperate.d.ts +1 -1
- package/es/components/src/composite/tableCustom/index.d.ts +19 -19
- package/es/components/src/composite/tableCustom/tableCustom.d.ts +2 -2
- package/es/components/src/composite/tablePro/TablePro.vue.d.ts +8 -8
- package/es/components/src/composite/tablePro/index.d.ts +19 -19
- package/es/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +4 -4
- package/es/components/src/composite/tablePro/tableColumnPro/index.d.ts +10 -10
- package/es/components/src/composite/tablePro/tableColumnPro/tableColumnPro.d.ts +1 -1
- package/es/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +2 -2
- package/es/components/src/composite/tablePro/tablePagination/index.d.ts +2 -2
- package/es/components/src/composite/tablePro/tablePro.d.ts +2 -2
- package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +9 -9
- package/es/components/src/composite/uploadFile/index.d.ts +25 -25
- package/es/components/src/composite/uploadFile/uploadFile.d.ts +1 -1
- package/es/components/src/plugins/message/method.d.ts +4 -4
- package/es/constants/key.d.ts +9 -0
- package/es/constants/key.mjs.map +1 -1
- package/es/crx/src/login/LoginPrompt.vue.d.ts +1 -1
- package/es/giime/index.mjs +1 -0
- package/es/giime/index.mjs.map +1 -1
- package/es/giime/makeInstaller.mjs +5 -0
- package/es/giime/makeInstaller.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/track/__tests__/reliability.test.d.ts +1 -0
- package/es/track/__tests__/track.test.d.ts +1 -0
- package/es/track/axios.d.ts +1 -0
- package/es/track/html.d.ts +1 -0
- package/es/track/index.d.ts +16 -0
- package/es/track/src/adapters/axios.d.ts +19 -0
- package/es/track/src/adapters/html.d.ts +18 -0
- package/es/track/src/adapters/vue2.d.ts +35 -0
- package/es/track/src/adapters/vue3.d.ts +69 -0
- package/es/track/src/collectors/click.d.ts +10 -0
- package/es/track/src/collectors/error.d.ts +13 -0
- package/es/track/src/collectors/exposure.d.ts +9 -0
- package/es/track/src/collectors/formAndCopy.d.ts +10 -0
- package/es/track/src/collectors/hover.d.ts +10 -0
- package/es/track/src/collectors/lifecycle.d.ts +14 -0
- package/es/track/src/collectors/scrollAndPath.d.ts +10 -0
- package/es/track/src/core/pendingStore.d.ts +7 -0
- package/es/track/src/core/queue.d.ts +68 -0
- package/es/track/src/core/session.d.ts +138 -0
- package/es/track/src/core/singleton.d.ts +49 -0
- package/es/track/src/core/tracker.d.ts +226 -0
- package/es/track/src/types/index.d.ts +351 -0
- package/es/track/src/utils/browser.d.ts +16 -0
- package/es/track/src/utils/dom.d.ts +89 -0
- package/es/track/src/utils/env.d.ts +101 -0
- package/es/track/src/utils/id.d.ts +80 -0
- package/es/track/vue2.d.ts +1 -0
- package/es/track/vue3.d.ts +1 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.mjs +1 -0
- package/es/utils/index.mjs.map +1 -1
- package/es/utils/src/watermark/index.d.ts +191 -0
- package/es/utils/src/watermark/index.mjs +758 -0
- package/es/utils/src/watermark/index.mjs.map +1 -0
- package/es/watermark/__tests__/watermark.test.d.ts +1 -0
- package/es/watermark/auto.d.ts +7 -0
- package/es/watermark/index.d.ts +9 -0
- package/es/watermark/src/adapters/vue2.d.ts +18 -0
- package/es/watermark/src/adapters/vue3.d.ts +23 -0
- package/es/watermark/src/core.d.ts +148 -0
- package/es/watermark/src/iframe.d.ts +67 -0
- package/es/watermark/src/types.d.ts +182 -0
- package/es/watermark/src/user.d.ts +71 -0
- package/es/watermark/vue2.d.ts +10 -0
- package/es/watermark/vue3.d.ts +2 -0
- package/lib/components/src/base/affix/Affix.vue.d.ts +2 -2
- package/lib/components/src/base/alert/Alert.vue.d.ts +3 -3
- package/lib/components/src/base/alert/index.d.ts +8 -8
- package/lib/components/src/base/anchor/Anchor.vue.d.ts +1 -1
- package/lib/components/src/base/anchor/index.d.ts +3 -3
- package/lib/components/src/base/autocomplete/Autocomplete.vue.d.ts +11 -11
- package/lib/components/src/base/autocomplete/autocomplete.d.ts +1 -1
- package/lib/components/src/base/autocomplete/index.d.ts +30 -30
- package/lib/components/src/base/badge/Badge.vue.d.ts +1 -1
- package/lib/components/src/base/badge/index.d.ts +3 -3
- package/lib/components/src/base/button/Button.vue.d.ts +9 -9
- package/lib/components/src/base/button/button.d.ts +4 -4
- package/lib/components/src/base/button/index.d.ts +23 -23
- package/lib/components/src/base/buttonGroup/ButtonGroup.vue.d.ts +3 -3
- package/lib/components/src/base/buttonGroup/buttonGroup.d.ts +1 -1
- package/lib/components/src/base/buttonGroup/index.d.ts +7 -7
- package/lib/components/src/base/carousel/Carousel.vue.d.ts +1 -1
- package/lib/components/src/base/carousel/index.d.ts +3 -3
- package/lib/components/src/base/cascader/Cascader.vue.d.ts +6 -6
- package/lib/components/src/base/cascader/index.d.ts +18 -18
- package/lib/components/src/base/chart/Chart.vue.d.ts +2 -2
- package/lib/components/src/base/chart/index.d.ts +2 -2
- package/lib/components/src/base/checkbox/Checkbox.vue.d.ts +2 -2
- package/lib/components/src/base/checkbox/index.d.ts +6 -6
- package/lib/components/src/base/checkboxButton/CheckboxButton.vue.d.ts +2 -2
- package/lib/components/src/base/checkboxButton/index.d.ts +6 -6
- package/lib/components/src/base/col/Col.vue.d.ts +1 -1
- package/lib/components/src/base/col/index.d.ts +3 -3
- package/lib/components/src/base/collapseItem/CollapseItem.vue.d.ts +1 -1
- package/lib/components/src/base/collapseItem/index.d.ts +3 -3
- package/lib/components/src/base/colorPicker/ColorPicker.vue.d.ts +6 -6
- package/lib/components/src/base/colorPicker/index.d.ts +6 -6
- package/lib/components/src/base/colorPickerPanel/ColorPickerPanel.vue.d.ts +1 -1
- package/lib/components/src/base/colorPickerPanel/index.d.ts +1 -1
- package/lib/components/src/base/datePicker/DatePicker.vue.d.ts +5 -5
- package/lib/components/src/base/datePicker/index.d.ts +15 -15
- package/lib/components/src/base/datePickerPanel/DatePickerPanel.vue.d.ts +1 -1
- package/lib/components/src/base/datePickerPanel/index.d.ts +3 -3
- package/lib/components/src/base/descriptions/Descriptions.vue.d.ts +1 -1
- package/lib/components/src/base/descriptions/index.d.ts +3 -3
- package/lib/components/src/base/descriptionsItem/DescriptionsItem.vue.d.ts +6 -6
- package/lib/components/src/base/descriptionsItem/descriptionsItem.d.ts +2 -2
- package/lib/components/src/base/descriptionsItem/index.d.ts +14 -14
- package/lib/components/src/base/dialog/Dialog.vue.d.ts +3 -3
- package/lib/components/src/base/dialog/index.d.ts +8 -8
- package/lib/components/src/base/divider/Divider.vue.d.ts +3 -3
- package/lib/components/src/base/divider/divider.d.ts +1 -1
- package/lib/components/src/base/divider/index.d.ts +7 -7
- package/lib/components/src/base/drawer/Drawer.vue.d.ts +4 -4
- package/lib/components/src/base/drawer/index.d.ts +11 -11
- package/lib/components/src/base/dropdown/Dropdown.vue.d.ts +7 -7
- package/lib/components/src/base/dropdown/dropdown.d.ts +2 -2
- package/lib/components/src/base/dropdown/index.d.ts +17 -17
- package/lib/components/src/base/form/Form.vue.d.ts +1 -1
- package/lib/components/src/base/form/index.d.ts +3 -3
- package/lib/components/src/base/image/Image.vue.d.ts +3 -3
- package/lib/components/src/base/image/index.d.ts +8 -8
- package/lib/components/src/base/imageViewer/ImageViewer.vue.d.ts +2 -2
- package/lib/components/src/base/imageViewer/index.d.ts +4 -4
- package/lib/components/src/base/input/Input.vue.d.ts +14 -14
- package/lib/components/src/base/input/index.d.ts +38 -38
- package/lib/components/src/base/input/input.d.ts +1 -1
- package/lib/components/src/base/inputNumber/InputNumber.vue.d.ts +12 -12
- package/lib/components/src/base/inputNumber/index.d.ts +31 -31
- package/lib/components/src/base/inputNumber/inputNumber.d.ts +2 -2
- package/lib/components/src/base/inputTag/InputTag.vue.d.ts +6 -6
- package/lib/components/src/base/inputTag/index.d.ts +17 -17
- package/lib/components/src/base/link/Link.vue.d.ts +1 -1
- package/lib/components/src/base/link/index.d.ts +3 -3
- package/lib/components/src/base/mention/Mention.vue.d.ts +13 -13
- package/lib/components/src/base/mention/index.d.ts +37 -37
- package/lib/components/src/base/mention/mention.d.ts +1 -1
- package/lib/components/src/base/menu/Menu.vue.d.ts +4 -4
- package/lib/components/src/base/menu/index.d.ts +10 -10
- package/lib/components/src/base/pagination/Pagination.vue.d.ts +1 -1
- package/lib/components/src/base/pagination/index.d.ts +3 -3
- package/lib/components/src/base/popconfirm/Popconfirm.vue.d.ts +8 -8
- package/lib/components/src/base/popconfirm/index.d.ts +19 -19
- package/lib/components/src/base/popconfirm/popconfirm.d.ts +2 -2
- package/lib/components/src/base/popover/Popover.vue.d.ts +3 -3
- package/lib/components/src/base/popover/index.d.ts +9 -9
- package/lib/components/src/base/popper/Popper.vue.d.ts +3 -3
- package/lib/components/src/base/popper/index.d.ts +7 -7
- package/lib/components/src/base/popper/popper.d.ts +1 -1
- package/lib/components/src/base/progress/Progress.vue.d.ts +2 -2
- package/lib/components/src/base/progress/index.d.ts +6 -6
- package/lib/components/src/base/radio/Radio.vue.d.ts +1 -1
- package/lib/components/src/base/radio/index.d.ts +3 -3
- package/lib/components/src/base/radioGroup/RadioGroup.vue.d.ts +1 -1
- package/lib/components/src/base/radioGroup/index.d.ts +3 -3
- package/lib/components/src/base/result/Result.vue.d.ts +1 -1
- package/lib/components/src/base/result/index.d.ts +3 -3
- package/lib/components/src/base/scrollbar/Scrollbar.vue.d.ts +3 -3
- package/lib/components/src/base/scrollbar/index.d.ts +7 -7
- package/lib/components/src/base/scrollbar/scrollbar.d.ts +1 -1
- package/lib/components/src/base/segmented/Segmented.vue.d.ts +1 -1
- package/lib/components/src/base/segmented/index.d.ts +3 -3
- package/lib/components/src/base/select/Select.vue.d.ts +7 -7
- package/lib/components/src/base/select/index.d.ts +21 -21
- package/lib/components/src/base/selectV2/SelectV2.vue.d.ts +8 -8
- package/lib/components/src/base/selectV2/index.d.ts +24 -24
- package/lib/components/src/base/skeletonItem/SkeletonItem.vue.d.ts +3 -3
- package/lib/components/src/base/skeletonItem/index.d.ts +7 -7
- package/lib/components/src/base/skeletonItem/skeletonItem.d.ts +1 -1
- package/lib/components/src/base/slider/Slider.vue.d.ts +2 -2
- package/lib/components/src/base/slider/index.d.ts +5 -5
- package/lib/components/src/base/space/Space.vue.d.ts +5 -5
- package/lib/components/src/base/space/index.d.ts +13 -13
- package/lib/components/src/base/space/space.d.ts +1 -1
- package/lib/components/src/base/steps/Steps.vue.d.ts +1 -1
- package/lib/components/src/base/steps/index.d.ts +3 -3
- package/lib/components/src/base/switch/Switch.vue.d.ts +2 -2
- package/lib/components/src/base/switch/index.d.ts +5 -5
- package/lib/components/src/base/table/Table.vue.d.ts +5 -5
- package/lib/components/src/base/table/index.d.ts +10 -10
- package/lib/components/src/base/table/table.d.ts +2 -2
- package/lib/components/src/base/tableColumn/TableColumn.vue.d.ts +4 -4
- package/lib/components/src/base/tableColumn/index.d.ts +10 -10
- package/lib/components/src/base/tableColumn/tableColumn.d.ts +1 -1
- package/lib/components/src/base/tableV2/TableV2.vue.d.ts +3 -3
- package/lib/components/src/base/tableV2/index.d.ts +7 -7
- package/lib/components/src/base/tableV2/tableV2.d.ts +1 -1
- package/lib/components/src/base/tag/Tag.vue.d.ts +3 -3
- package/lib/components/src/base/tag/index.d.ts +8 -8
- package/lib/components/src/base/text/Text.vue.d.ts +1 -1
- package/lib/components/src/base/text/index.d.ts +3 -3
- package/lib/components/src/base/timePicker/TimePicker.vue.d.ts +6 -6
- package/lib/components/src/base/timePicker/index.d.ts +18 -18
- package/lib/components/src/base/timeSelect/TimeSelect.vue.d.ts +6 -6
- package/lib/components/src/base/timeSelect/index.d.ts +18 -18
- package/lib/components/src/base/timelineItem/TimelineItem.vue.d.ts +3 -3
- package/lib/components/src/base/timelineItem/index.d.ts +9 -9
- package/lib/components/src/base/tooltip/Tooltip.vue.d.ts +5 -5
- package/lib/components/src/base/tooltip/index.d.ts +13 -13
- package/lib/components/src/base/tooltip/tooltip.d.ts +1 -1
- package/lib/components/src/base/tour/Tour.vue.d.ts +1 -1
- package/lib/components/src/base/tour/index.d.ts +3 -3
- package/lib/components/src/base/tourStep/TourStep.vue.d.ts +1 -1
- package/lib/components/src/base/tourStep/index.d.ts +3 -3
- package/lib/components/src/base/treeSelect/TreeSelect.vue.d.ts +8 -8
- package/lib/components/src/base/upload/Upload.vue.d.ts +6 -6
- package/lib/components/src/base/upload/index.d.ts +16 -16
- package/lib/components/src/base/upload/upload.d.ts +1 -1
- package/lib/components/src/business/uploadItem/UploadItem.vue.d.ts +7 -7
- package/lib/components/src/business/uploadItem/index.d.ts +19 -19
- package/lib/components/src/business/uploadItem/uploadItem.d.ts +1 -1
- package/lib/components/src/business/uploadPro/UploadPro.vue.d.ts +8 -8
- package/lib/components/src/business/uploadPro/index.d.ts +22 -22
- package/lib/components/src/business/uploadPro/uploadPro.d.ts +1 -1
- package/lib/components/src/composite/dialogForm/DialogForm.vue.d.ts +14 -14
- package/lib/components/src/composite/dialogForm/index.d.ts +40 -40
- package/lib/components/src/composite/drawerForm/DrawerForm.vue.d.ts +18 -18
- package/lib/components/src/composite/drawerForm/index.d.ts +52 -52
- package/lib/components/src/composite/fileComponent/FileComponent.vue.d.ts +1 -1
- package/lib/components/src/composite/fileComponent/index.d.ts +3 -3
- package/lib/components/src/composite/fileList2/FileList.vue.d.ts +1 -1
- package/lib/components/src/composite/fileList2/index.d.ts +3 -3
- package/lib/components/src/composite/formItemModule/FormItemModule.vue.d.ts +3 -3
- package/lib/components/src/composite/formItemModule/index.d.ts +3 -3
- package/lib/components/src/composite/importDialog/ImportDialog.vue.d.ts +5 -5
- package/lib/components/src/composite/importDialog/importDialog.d.ts +1 -1
- package/lib/components/src/composite/importDialog/index.d.ts +13 -13
- package/lib/components/src/composite/memoryForm/MemoryForm.vue.d.ts +1 -1
- package/lib/components/src/composite/memoryForm/index.d.ts +3 -3
- package/lib/components/src/composite/numberInterval/NumberInterval.vue.d.ts +1 -1
- package/lib/components/src/composite/numberInterval/index.d.ts +1 -1
- package/lib/components/src/composite/operateButton/OperateButton.vue.d.ts +3 -3
- package/lib/components/src/composite/operateButton/index.d.ts +3 -3
- package/lib/components/src/composite/operateButton/operateButton.d.ts +1 -1
- package/lib/components/src/composite/previewFile/PreviewFile.vue.d.ts +1 -1
- package/lib/components/src/composite/previewFile/index.d.ts +1 -1
- package/lib/components/src/composite/ruleEditor/RuleEditor.vue.d.ts +1 -1
- package/lib/components/src/composite/ruleEditor/index.d.ts +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/cascader/SearchFormCascader.vue.d.ts +4 -4
- package/lib/components/src/composite/searchForm/searchFormItems/cascader/index.d.ts +4 -4
- package/lib/components/src/composite/searchForm/searchFormItems/datePicker/SearchFormDatePicker.vue.d.ts +4 -4
- package/lib/components/src/composite/searchForm/searchFormItems/datePicker/index.d.ts +4 -4
- package/lib/components/src/composite/searchForm/searchFormItems/input/SearchFormInput.vue.d.ts +6 -6
- package/lib/components/src/composite/searchForm/searchFormItems/input/index.d.ts +6 -6
- package/lib/components/src/composite/searchForm/searchFormItems/numberInterval/SearchFormNumberInterval.vue.d.ts +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/numberInterval/index.d.ts +1 -1
- package/lib/components/src/composite/searchForm/searchFormItems/select/SearchFormSelect.vue.d.ts +5 -5
- package/lib/components/src/composite/searchForm/searchFormItems/select/index.d.ts +5 -5
- package/lib/components/src/composite/searchForm/searchFormItems/selectV2/SearchFormSelectV2.vue.d.ts +5 -5
- package/lib/components/src/composite/searchForm/searchFormItems/selectV2/index.d.ts +5 -5
- package/lib/components/src/composite/selectOptions/SelectOptions.vue.d.ts +6 -6
- package/lib/components/src/composite/selectOptions/index.d.ts +18 -18
- package/lib/components/src/composite/tableCustom/TableCustom.vue.d.ts +8 -8
- package/lib/components/src/composite/tableCustom/customOperate/customOperate.d.ts +1 -1
- package/lib/components/src/composite/tableCustom/index.d.ts +19 -19
- package/lib/components/src/composite/tableCustom/tableCustom.d.ts +2 -2
- package/lib/components/src/composite/tablePro/TablePro.vue.d.ts +8 -8
- package/lib/components/src/composite/tablePro/index.d.ts +19 -19
- package/lib/components/src/composite/tablePro/tableColumnPro/TableColumnPro.vue.d.ts +4 -4
- package/lib/components/src/composite/tablePro/tableColumnPro/index.d.ts +10 -10
- package/lib/components/src/composite/tablePro/tableColumnPro/tableColumnPro.d.ts +1 -1
- package/lib/components/src/composite/tablePro/tablePagination/TablePagination.vue.d.ts +2 -2
- package/lib/components/src/composite/tablePro/tablePagination/index.d.ts +2 -2
- package/lib/components/src/composite/tablePro/tablePro.d.ts +2 -2
- package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +9 -9
- package/lib/components/src/composite/uploadFile/index.d.ts +25 -25
- package/lib/components/src/composite/uploadFile/uploadFile.d.ts +1 -1
- package/lib/components/src/plugins/message/method.d.ts +4 -4
- package/lib/constants/key.d.ts +9 -0
- package/lib/constants/key.js.map +1 -1
- package/lib/crx/src/login/LoginPrompt.vue.d.ts +1 -1
- package/lib/giime/index.js +404 -385
- package/lib/giime/index.js.map +1 -1
- package/lib/giime/makeInstaller.js +5 -0
- package/lib/giime/makeInstaller.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/track/__tests__/reliability.test.d.ts +1 -0
- package/lib/track/__tests__/track.test.d.ts +1 -0
- package/lib/track/axios.d.ts +1 -0
- package/lib/track/html.d.ts +1 -0
- package/lib/track/index.d.ts +16 -0
- package/lib/track/src/adapters/axios.d.ts +19 -0
- package/lib/track/src/adapters/html.d.ts +18 -0
- package/lib/track/src/adapters/vue2.d.ts +35 -0
- package/lib/track/src/adapters/vue3.d.ts +69 -0
- package/lib/track/src/collectors/click.d.ts +10 -0
- package/lib/track/src/collectors/error.d.ts +13 -0
- package/lib/track/src/collectors/exposure.d.ts +9 -0
- package/lib/track/src/collectors/formAndCopy.d.ts +10 -0
- package/lib/track/src/collectors/hover.d.ts +10 -0
- package/lib/track/src/collectors/lifecycle.d.ts +14 -0
- package/lib/track/src/collectors/scrollAndPath.d.ts +10 -0
- package/lib/track/src/core/pendingStore.d.ts +7 -0
- package/lib/track/src/core/queue.d.ts +68 -0
- package/lib/track/src/core/session.d.ts +138 -0
- package/lib/track/src/core/singleton.d.ts +49 -0
- package/lib/track/src/core/tracker.d.ts +226 -0
- package/lib/track/src/types/index.d.ts +351 -0
- package/lib/track/src/utils/browser.d.ts +16 -0
- package/lib/track/src/utils/dom.d.ts +89 -0
- package/lib/track/src/utils/env.d.ts +101 -0
- package/lib/track/src/utils/id.d.ts +80 -0
- package/lib/track/vue2.d.ts +1 -0
- package/lib/track/vue3.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +19 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/src/watermark/index.d.ts +191 -0
- package/lib/utils/src/watermark/index.js +777 -0
- package/lib/utils/src/watermark/index.js.map +1 -0
- package/lib/watermark/__tests__/watermark.test.d.ts +1 -0
- package/lib/watermark/auto.d.ts +7 -0
- package/lib/watermark/index.d.ts +9 -0
- package/lib/watermark/src/adapters/vue2.d.ts +18 -0
- package/lib/watermark/src/adapters/vue3.d.ts +23 -0
- package/lib/watermark/src/core.d.ts +148 -0
- package/lib/watermark/src/iframe.d.ts +67 -0
- package/lib/watermark/src/types.d.ts +182 -0
- package/lib/watermark/src/user.d.ts +71 -0
- package/lib/watermark/vue2.d.ts +10 -0
- package/lib/watermark/vue3.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 全局无冲突单例注册中心(基于 Symbol.for 保证 Vue3 / Vue2 / HTML / giime 多包共存不冲突)
|
|
3
|
+
*/
|
|
4
|
+
import type { GiimeTrackConfig } from '../types';
|
|
5
|
+
import { GiimeTracker } from './tracker';
|
|
6
|
+
/**
|
|
7
|
+
* 全局唯一 Symbol 键名:无论页面中打包了多少份 @giime/track,始终共享同一实例
|
|
8
|
+
*/
|
|
9
|
+
export declare const GIIME_TRACK_GLOBAL_SYMBOL: unique symbol;
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
__GIIME_TRACK__?: GiimeTracker;
|
|
13
|
+
GiimeTrack?: typeof GiimeTrack;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 获取当前已初始化的全局 Tracker 实例(未初始化时返回 null)
|
|
18
|
+
*/
|
|
19
|
+
export declare const getGlobalTracker: () => GiimeTracker | null;
|
|
20
|
+
/**
|
|
21
|
+
* 获取或创建全局唯一的 GiimeTracker 实例(挂载于 Symbol.for 与 window.__GIIME_TRACK__,绝不污染商城 window.statisticsPoster)
|
|
22
|
+
* @param config 初始化或增量更新配置
|
|
23
|
+
*/
|
|
24
|
+
export declare const getOrCreateTracker: (config?: GiimeTrackConfig) => GiimeTracker;
|
|
25
|
+
/**
|
|
26
|
+
* 面向业务方与全局脚本的统一静态门面 API (GiimeTrack)
|
|
27
|
+
*/
|
|
28
|
+
export declare const GiimeTrack: {
|
|
29
|
+
/**
|
|
30
|
+
* 初始化或更新统一埋点 SDK
|
|
31
|
+
*/
|
|
32
|
+
init(config?: GiimeTrackConfig): GiimeTracker;
|
|
33
|
+
/**
|
|
34
|
+
* 获取当前 Tracker 实例
|
|
35
|
+
*/
|
|
36
|
+
getInstance(): GiimeTracker | null;
|
|
37
|
+
/**
|
|
38
|
+
* 发送埋点事件
|
|
39
|
+
*/
|
|
40
|
+
track(eventName: string, payload?: Record<string, any>, overrides?: Record<string, any>): import("../types").TrackEventRecord<Record<string, any>> | null;
|
|
41
|
+
/**
|
|
42
|
+
* 立即清空并上报队列
|
|
43
|
+
*/
|
|
44
|
+
flush(isUnload?: boolean): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* 获取当前浏览器与设备环境识别报告
|
|
47
|
+
*/
|
|
48
|
+
getBrowserContext(): import("../types").BrowserContext;
|
|
49
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 前端统一全埋点核心控制器 GiimeTracker
|
|
3
|
+
* @description 整合会话管理、浏览器环境指纹、内存攒批队列、L1/L2/L3 自动采集器与 8 大类标准业务埋点方法
|
|
4
|
+
*/
|
|
5
|
+
import type { BrowserContext, GiimeTrackConfig, TrackBatchListener, TrackEventListener, TrackEventName, TrackEventRecord } from '../types';
|
|
6
|
+
import { TrackSessionManager } from './session';
|
|
7
|
+
/** SDK 当前版本号 */
|
|
8
|
+
export declare const GIIME_TRACK_SDK_VERSION = "1.0.0";
|
|
9
|
+
/**
|
|
10
|
+
* 统一全埋点核心类
|
|
11
|
+
*/
|
|
12
|
+
export declare class GiimeTracker {
|
|
13
|
+
private config;
|
|
14
|
+
private customEndpoint?;
|
|
15
|
+
private sessionManager;
|
|
16
|
+
private batchQueue;
|
|
17
|
+
private cachedBrowserContext;
|
|
18
|
+
private collectorCleanups;
|
|
19
|
+
private initializedCollectors;
|
|
20
|
+
constructor(config?: GiimeTrackConfig);
|
|
21
|
+
/**
|
|
22
|
+
* 安装或重启所有自动采集器插件
|
|
23
|
+
*/
|
|
24
|
+
installCollectors(): void;
|
|
25
|
+
/**
|
|
26
|
+
* 动态更新 SDK 配置
|
|
27
|
+
* @param nextConfig 新增或变更的配置项
|
|
28
|
+
*/
|
|
29
|
+
updateConfig(nextConfig: Partial<GiimeTrackConfig>): void;
|
|
30
|
+
/**
|
|
31
|
+
* 获取当前配置
|
|
32
|
+
*/
|
|
33
|
+
getConfig(): GiimeTrackConfig;
|
|
34
|
+
/**
|
|
35
|
+
* 获取会话与页面上下文管理器
|
|
36
|
+
*/
|
|
37
|
+
getSessionManager(): TrackSessionManager;
|
|
38
|
+
/**
|
|
39
|
+
* 获取实时更新视口尺寸后的浏览器与设备环境信息
|
|
40
|
+
*/
|
|
41
|
+
getBrowserContext(): BrowserContext;
|
|
42
|
+
/**
|
|
43
|
+
* 核心事件上报入口:组装完整契约报文并推入批量队列
|
|
44
|
+
* @param eventName 事件名称(小驼峰标准事件名或商城存量事件名)
|
|
45
|
+
* @param payload 事件专属业务属性
|
|
46
|
+
* @param overrides 单次事件覆盖公共字段(如自定义 functionId / pageKey)
|
|
47
|
+
*/
|
|
48
|
+
track<TPayload extends Record<string, any> = Record<string, any>>(eventName: TrackEventName, payload?: TPayload, overrides?: Partial<Pick<TrackEventRecord, 'functionId' | 'moduleId' | 'pageKey' | 'pageName' | 'source' | 'templateId'>>): TrackEventRecord<TPayload> | null;
|
|
49
|
+
/**
|
|
50
|
+
* 兼容上报商城 ShopPlus 存量 102 个埋点事件
|
|
51
|
+
* @param eventName 商城原始事件名
|
|
52
|
+
* @param options 商城原始扩展字段
|
|
53
|
+
* @param time 商城性能耗时(毫秒)
|
|
54
|
+
*/
|
|
55
|
+
trackShopPlusLegacyEvent(eventName: string, options?: Record<string, any>, time?: number): TrackEventRecord | null;
|
|
56
|
+
/**
|
|
57
|
+
* SPA 路由切换通知(由 Vue3 / Vue2 路由钩子调用:先结清上一页 pageLeave,再开启新一页 pageEnter)
|
|
58
|
+
*/
|
|
59
|
+
handleRouteChange(routeMeta: {
|
|
60
|
+
pageKey: string;
|
|
61
|
+
pageName: string;
|
|
62
|
+
functionId?: string;
|
|
63
|
+
url?: string;
|
|
64
|
+
entrySource?: string;
|
|
65
|
+
}): void;
|
|
66
|
+
/**
|
|
67
|
+
* 上报业务页面加载结果 (pageBizLoadResult)
|
|
68
|
+
*/
|
|
69
|
+
trackPageBizLoadResult(params: {
|
|
70
|
+
loadId?: string;
|
|
71
|
+
status: 'success' | 'fail';
|
|
72
|
+
duration: number;
|
|
73
|
+
errorCode?: string;
|
|
74
|
+
}): TrackEventRecord<{
|
|
75
|
+
loadId: string;
|
|
76
|
+
status: "success" | "fail";
|
|
77
|
+
duration: number;
|
|
78
|
+
errorCode: string;
|
|
79
|
+
}> | null;
|
|
80
|
+
/**
|
|
81
|
+
* 上报查询提交与查询结果 (querySubmit / queryResult)
|
|
82
|
+
*/
|
|
83
|
+
trackQuery(params: {
|
|
84
|
+
phase: 'submit' | 'result';
|
|
85
|
+
queryId?: string;
|
|
86
|
+
resourceType: string;
|
|
87
|
+
queryAction?: 'search' | 'filter' | 'sort' | 'paginate' | 'refresh';
|
|
88
|
+
filterKeys?: string[];
|
|
89
|
+
sortField?: string;
|
|
90
|
+
sortOrder?: 'asc' | 'desc';
|
|
91
|
+
pageNumber?: number;
|
|
92
|
+
pageSize?: number;
|
|
93
|
+
returnedCount?: number;
|
|
94
|
+
totalCount?: number;
|
|
95
|
+
status?: 'success' | 'fail' | 'cancel';
|
|
96
|
+
duration?: number;
|
|
97
|
+
errorCode?: string;
|
|
98
|
+
}): TrackEventRecord<{
|
|
99
|
+
queryId: string;
|
|
100
|
+
phase: 'submit' | 'result';
|
|
101
|
+
resourceType: string;
|
|
102
|
+
queryAction?: "sort" | "filter" | "search" | "refresh" | "paginate" | undefined;
|
|
103
|
+
filterKeys?: string[] | undefined;
|
|
104
|
+
sortField?: string | undefined;
|
|
105
|
+
sortOrder?: "desc" | "asc" | undefined;
|
|
106
|
+
pageNumber?: number | undefined;
|
|
107
|
+
pageSize?: number | undefined;
|
|
108
|
+
returnedCount?: number | undefined;
|
|
109
|
+
totalCount?: number | undefined;
|
|
110
|
+
status?: "cancel" | "success" | "fail" | undefined;
|
|
111
|
+
duration?: number | undefined;
|
|
112
|
+
errorCode?: string | undefined;
|
|
113
|
+
}> | null;
|
|
114
|
+
/**
|
|
115
|
+
* 上报资源维护操作提交或结果 (resourceOperateSubmit / resourceOperateResult)
|
|
116
|
+
*/
|
|
117
|
+
trackResourceOperate(params: {
|
|
118
|
+
phase: 'submit' | 'result';
|
|
119
|
+
operationId?: string;
|
|
120
|
+
batchId?: string;
|
|
121
|
+
resourceType: string;
|
|
122
|
+
resourceId?: string;
|
|
123
|
+
resourceVersion?: string;
|
|
124
|
+
operationType: 'create' | 'update' | 'delete' | 'favorite' | 'publish' | string;
|
|
125
|
+
status?: 'success' | 'fail' | 'cancel';
|
|
126
|
+
duration?: number;
|
|
127
|
+
errorCode?: string;
|
|
128
|
+
}): TrackEventRecord<{
|
|
129
|
+
operationId: string;
|
|
130
|
+
phase: 'submit' | 'result';
|
|
131
|
+
batchId?: string | undefined;
|
|
132
|
+
resourceType: string;
|
|
133
|
+
resourceId?: string | undefined;
|
|
134
|
+
resourceVersion?: string | undefined;
|
|
135
|
+
operationType: 'create' | 'update' | 'delete' | 'favorite' | 'publish' | string;
|
|
136
|
+
status?: "cancel" | "success" | "fail" | undefined;
|
|
137
|
+
duration?: number | undefined;
|
|
138
|
+
errorCode?: string | undefined;
|
|
139
|
+
}> | null;
|
|
140
|
+
/**
|
|
141
|
+
* 上报任务操作提交或状态变化 (taskOperateSubmit / taskStatusChange)
|
|
142
|
+
*/
|
|
143
|
+
trackTask(params: {
|
|
144
|
+
phase: 'submit' | 'statusChange';
|
|
145
|
+
operationId?: string;
|
|
146
|
+
operationType?: 'run' | 'cancel' | 'retry';
|
|
147
|
+
taskType: string;
|
|
148
|
+
taskId?: string;
|
|
149
|
+
relatedTaskId?: string;
|
|
150
|
+
resourceType?: string;
|
|
151
|
+
resourceId?: string;
|
|
152
|
+
resourceVersion?: string;
|
|
153
|
+
parameterKeys?: string[];
|
|
154
|
+
previousStatus?: string;
|
|
155
|
+
status?: 'queued' | 'running' | 'success' | 'fail' | 'cancelled' | string;
|
|
156
|
+
attemptNumber?: number;
|
|
157
|
+
queueDuration?: number;
|
|
158
|
+
executionDuration?: number;
|
|
159
|
+
errorCode?: string;
|
|
160
|
+
}): TrackEventRecord<{
|
|
161
|
+
operationId: string;
|
|
162
|
+
phase: 'submit' | 'statusChange';
|
|
163
|
+
operationType?: "cancel" | "run" | "retry" | undefined;
|
|
164
|
+
taskType: string;
|
|
165
|
+
taskId?: string | undefined;
|
|
166
|
+
relatedTaskId?: string | undefined;
|
|
167
|
+
resourceType?: string | undefined;
|
|
168
|
+
resourceId?: string | undefined;
|
|
169
|
+
resourceVersion?: string | undefined;
|
|
170
|
+
parameterKeys?: string[] | undefined;
|
|
171
|
+
previousStatus?: string | undefined;
|
|
172
|
+
status?: string | undefined;
|
|
173
|
+
attemptNumber?: number | undefined;
|
|
174
|
+
queueDuration?: number | undefined;
|
|
175
|
+
executionDuration?: number | undefined;
|
|
176
|
+
errorCode?: string | undefined;
|
|
177
|
+
}> | null;
|
|
178
|
+
/**
|
|
179
|
+
* 上报接口请求异常 (errorRequest)
|
|
180
|
+
*/
|
|
181
|
+
trackErrorRequest(params: {
|
|
182
|
+
requestId?: string;
|
|
183
|
+
requestPath: string;
|
|
184
|
+
requestMethod: string;
|
|
185
|
+
statusCode?: number;
|
|
186
|
+
errorType: 'timeout' | 'network' | 'httpError' | 'bizError';
|
|
187
|
+
errorCode?: string;
|
|
188
|
+
duration?: number;
|
|
189
|
+
}): TrackEventRecord<{
|
|
190
|
+
requestId: string;
|
|
191
|
+
requestPath: string;
|
|
192
|
+
requestMethod: string;
|
|
193
|
+
statusCode: number | undefined;
|
|
194
|
+
errorType: "timeout" | "network" | "httpError" | "bizError";
|
|
195
|
+
errorCode: string;
|
|
196
|
+
duration: number;
|
|
197
|
+
}> | null;
|
|
198
|
+
/**
|
|
199
|
+
* 手动触发队列立即上报
|
|
200
|
+
*/
|
|
201
|
+
flush(isUnload?: boolean): Promise<boolean>;
|
|
202
|
+
/**
|
|
203
|
+
* 获取当前待发送队列快照
|
|
204
|
+
*/
|
|
205
|
+
getPendingEvents(): TrackEventRecord[];
|
|
206
|
+
/**
|
|
207
|
+
* 获取历史已发送批次列表
|
|
208
|
+
*/
|
|
209
|
+
getSentBatchesHistory(): {
|
|
210
|
+
envelope: import("../types").TrackBatchEnvelope;
|
|
211
|
+
mode: "fetch" | "custom" | "beacon";
|
|
212
|
+
success: boolean;
|
|
213
|
+
}[];
|
|
214
|
+
/**
|
|
215
|
+
* 订阅实时采集事件(返回取消订阅函数)
|
|
216
|
+
*/
|
|
217
|
+
onEvent(listener: TrackEventListener): () => void;
|
|
218
|
+
/**
|
|
219
|
+
* 订阅批次发送事件(返回取消订阅函数)
|
|
220
|
+
*/
|
|
221
|
+
onBatch(listener: TrackBatchListener): () => void;
|
|
222
|
+
/**
|
|
223
|
+
* 销毁实例并清理所有事件监听器
|
|
224
|
+
*/
|
|
225
|
+
destroy(): void;
|
|
226
|
+
}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 前端统一全埋点 SDK (@giime/track) 核心类型与契约定义
|
|
3
|
+
* @description 严格对齐《单点埋点系统(AI中台).md》小驼峰规范、评审会决议及商城 ShopPlus 102 个存量事件
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 8大类28个标准通用事件名(小驼峰) + 深度微交互扩展事件名
|
|
7
|
+
*/
|
|
8
|
+
export type StandardTrackEventName = 'pageEnter' | 'domContentLoaded' | 'pageLoaded' | 'pageBizLoadResult' | 'pageVisibilityChange' | 'pageHeartbeat' | 'pageLeave' | 'elementClick' | 'elementExposure' | 'elementHover' | 'pointerPath' | 'rageClick' | 'inputFocus' | 'inputBlur' | 'inputChange' | 'optionChange' | 'dragEnd' | 'pageScroll' | 'formSubmit' | 'formValidateResult' | 'querySubmit' | 'queryResult' | 'resourceOpenResult' | 'resourcePreviewResult' | 'resourceOperateSubmit' | 'resourceOperateResult' | 'fileSelect' | 'fileUploadStart' | 'fileUploadResult' | 'fileDownloadRequest' | 'contentCopyResult' | 'taskOperateSubmit' | 'taskStatusChange' | 'approvalSubmit' | 'approvalResult' | 'configChangeSubmit' | 'configChangeResult' | 'errorResourceLoad' | 'errorRuntime' | 'errorRequest';
|
|
9
|
+
/**
|
|
10
|
+
* 商城 ShopPlus 常见核心存量事件名(支持任意存量 102 个事件字符串)
|
|
11
|
+
*/
|
|
12
|
+
export type ShopPlusLegacyEventName = 'enter' | 'leave' | 'DOMContentLoaded' | 'DOMContentLoadedDiff' | 'loaded' | 'buyNow' | 'cartCheckout' | 'submitForm' | 'addToCart' | 'showRecommend' | 'beforeSubmitOrder' | 'createOrderSuccess' | 'createOrderFail' | 'submitOrderTime' | 'expressPaySuccess' | 'successPage' | 'unpaidContinuePay' | 'unpaidCancelOrder' | 'failBuyAgain' | 'inputAddressForm' | 'customerEmail' | 'echoCustomerAddress' | (string & {});
|
|
13
|
+
/**
|
|
14
|
+
* 统一事件名称类型
|
|
15
|
+
*/
|
|
16
|
+
export type TrackEventName = StandardTrackEventName | ShopPlusLegacyEventName;
|
|
17
|
+
/**
|
|
18
|
+
* 浏览器与设备环境详细指纹(用于分析用户实际使用的浏览器、内核、WebView、系统与设备能力)
|
|
19
|
+
*/
|
|
20
|
+
export interface BrowserContext {
|
|
21
|
+
/** 原始 User-Agent 字符串 */
|
|
22
|
+
userAgent: string;
|
|
23
|
+
/** 浏览器名称:Chrome / Safari / Firefox / Edge / Opera / SamsungBrowser / UCBrowser / QQBrowser / WeChat / TikTokWebView / FacebookWebView / LineWebView 等 */
|
|
24
|
+
browserName: string;
|
|
25
|
+
/** 浏览器完整版本号,如 "130.0.6723.70" */
|
|
26
|
+
browserVersion: string;
|
|
27
|
+
/** 浏览器主版本号,如 "130" */
|
|
28
|
+
browserMajorVersion: string;
|
|
29
|
+
/** 渲染引擎内核:Blink / WebKit / Gecko / Trident / EdgeHTML / Unknown */
|
|
30
|
+
engineName: string;
|
|
31
|
+
/** 操作系统名称:Windows / macOS / iOS / Android / HarmonyOS / Linux / ChromeOS / Unknown */
|
|
32
|
+
osName: string;
|
|
33
|
+
/** 操作系统版本,如 "10/11"、"15.1"、"18.1" */
|
|
34
|
+
osVersion: string;
|
|
35
|
+
/** 设备类型:pc / mobile / tablet */
|
|
36
|
+
deviceType: 'pc' | 'mobile' | 'tablet';
|
|
37
|
+
/** 平台类型(对齐数仓公共属性):pc-web / mobile-web */
|
|
38
|
+
platformType: 'pc-web' | 'mobile-web';
|
|
39
|
+
/** 设备品牌或型号摘要(如 Apple iPhone / Mac / Android Device) */
|
|
40
|
+
deviceModel: string;
|
|
41
|
+
/** 是否运行在 App 内置 WebView 中 */
|
|
42
|
+
isWebView: boolean;
|
|
43
|
+
/** 内置浏览器所属 App 标识:tiktok / facebook / instagram / line / wechat / dingtalk / weibo / none */
|
|
44
|
+
inAppBrowser: string;
|
|
45
|
+
/** 是否为自动化爬虫/无头浏览器 (navigator.webdriver) */
|
|
46
|
+
isWebdriver: boolean;
|
|
47
|
+
/** 当前首选语言,如 "zh-CN"、"ja-JP" */
|
|
48
|
+
language: string;
|
|
49
|
+
/** 浏览器支持的语言列表 */
|
|
50
|
+
languages: string;
|
|
51
|
+
/** IANA 时区名称,如 "Asia/Shanghai" */
|
|
52
|
+
timezoneName: string;
|
|
53
|
+
/** 中文时区偏移描述(兼容商城格式),如 "东8区"、"西5区" */
|
|
54
|
+
timezoneOffset: string;
|
|
55
|
+
/** UTC 偏移分钟数 */
|
|
56
|
+
timezoneOffsetMinutes: number;
|
|
57
|
+
/** 屏幕物理分辨率宽 */
|
|
58
|
+
screenWidth: number;
|
|
59
|
+
/** 屏幕物理分辨率高 */
|
|
60
|
+
screenHeight: number;
|
|
61
|
+
/** 当前浏览器视口宽 */
|
|
62
|
+
viewportWidth: number;
|
|
63
|
+
/** 当前浏览器视口高 */
|
|
64
|
+
viewportHeight: number;
|
|
65
|
+
/** 设备像素比 DPR */
|
|
66
|
+
devicePixelRatio: number;
|
|
67
|
+
/** 屏幕色深 */
|
|
68
|
+
colorDepth: number;
|
|
69
|
+
/** 屏幕方向:landscape / portrait */
|
|
70
|
+
orientation: 'landscape' | 'portrait';
|
|
71
|
+
/** 网络连接类型(4g / wifi / 3g / slow-2g / unknown) */
|
|
72
|
+
networkType: string;
|
|
73
|
+
/** 估算下行带宽 Mbps */
|
|
74
|
+
downlinkMbps: number;
|
|
75
|
+
/** 估算往返延迟 ms */
|
|
76
|
+
rttMs: number;
|
|
77
|
+
/** CPU 逻辑核心数 */
|
|
78
|
+
hardwareConcurrency: number;
|
|
79
|
+
/** 设备内存估算 GB */
|
|
80
|
+
deviceMemoryGb: number;
|
|
81
|
+
/** 最大触摸点数(>0 代表支持触控) */
|
|
82
|
+
maxTouchPoints: number;
|
|
83
|
+
/** Cookie 是否启用 */
|
|
84
|
+
cookieEnabled: boolean;
|
|
85
|
+
/** 关键埋点 Web API 兼容性支持情况 */
|
|
86
|
+
featureSupport: {
|
|
87
|
+
sendBeacon: boolean;
|
|
88
|
+
fetchKeepalive: boolean;
|
|
89
|
+
intersectionObserver: boolean;
|
|
90
|
+
mutationObserver: boolean;
|
|
91
|
+
performanceObserver: boolean;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 商城端(ShopPlus)专属上下文信息(100% 兼容 statistics.[hash].ts 的 getBase 字段)
|
|
96
|
+
*/
|
|
97
|
+
export interface ShopPlusContext {
|
|
98
|
+
/** 访客永久设备 ID (__sx_event_poster_uid) */
|
|
99
|
+
uid: string;
|
|
100
|
+
/** 当前购物结算会话 ID (__sx_event_poster_eid) */
|
|
101
|
+
eid: string;
|
|
102
|
+
/** 上一次成单结算会话 ID (g_pre_eid) */
|
|
103
|
+
preEid: string;
|
|
104
|
+
/** 模板名称,默认 'plus' */
|
|
105
|
+
tplName: string;
|
|
106
|
+
/** 详情页模板标识(如 SGK02 / default / amazon) */
|
|
107
|
+
detailTemplate?: string;
|
|
108
|
+
/** 详情页模式(如 single / onePage / default) */
|
|
109
|
+
detailMode?: string;
|
|
110
|
+
/** 是否为斗篷页 */
|
|
111
|
+
isCloak?: string;
|
|
112
|
+
/** 是否为 Easymall 单页模板 */
|
|
113
|
+
isEasymall?: boolean;
|
|
114
|
+
/** Easymall 原始配置对象 */
|
|
115
|
+
easymall?: Record<string, any>;
|
|
116
|
+
/** 促销活动 ID 列表(逗号分隔) */
|
|
117
|
+
promotionIds?: string;
|
|
118
|
+
/** 站长用户 ID */
|
|
119
|
+
siteUserId?: string;
|
|
120
|
+
/** 地区 ID */
|
|
121
|
+
areaId?: string;
|
|
122
|
+
/** 市场 ID */
|
|
123
|
+
marketId?: string;
|
|
124
|
+
/** 店铺 ID */
|
|
125
|
+
shopId?: string;
|
|
126
|
+
/** 集合/站点 ID */
|
|
127
|
+
collId?: string;
|
|
128
|
+
/** 货币 ID */
|
|
129
|
+
currencyId?: number | string;
|
|
130
|
+
/** 商品 Sale ID(单个或逗号分隔多个) */
|
|
131
|
+
saleId?: string | number;
|
|
132
|
+
/** 订单号 */
|
|
133
|
+
orderNumber?: string;
|
|
134
|
+
/** 服务端写入的浏览器唯一标记 (window.gcookie) */
|
|
135
|
+
serviceUid?: string;
|
|
136
|
+
/** 流量来源标识 (from) */
|
|
137
|
+
from?: string;
|
|
138
|
+
/** URL 查询参数 JSON 字符串 */
|
|
139
|
+
queryParams?: string;
|
|
140
|
+
/** 服务端追踪 ID (Cookie: g_trace_id) */
|
|
141
|
+
traceId?: string;
|
|
142
|
+
/** 页面级服务端追踪 ID (Cookie: p_trace_id) */
|
|
143
|
+
pTraceId?: string;
|
|
144
|
+
/** 页面自定义注解返回值 (window.pageAnnotation()) */
|
|
145
|
+
pageAnnotation?: any;
|
|
146
|
+
/** 请求签名时间戳(12位毫秒+1位校验和) */
|
|
147
|
+
_t?: number;
|
|
148
|
+
/** 请求 MD5 签名 */
|
|
149
|
+
_s?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* 视区内可见业务元素摘要(会议决议:停留区域挂载具体元素集合)
|
|
153
|
+
*/
|
|
154
|
+
export interface VisibleElementSummary {
|
|
155
|
+
/** 元素稳定标识 */
|
|
156
|
+
elementId: string;
|
|
157
|
+
/** 元素类型:button / menu / card / link / input / module */
|
|
158
|
+
elementType: string;
|
|
159
|
+
/** 元素固定名称或文本摘要 */
|
|
160
|
+
elementName: string;
|
|
161
|
+
/** 所属区域容器标识 */
|
|
162
|
+
containerId?: string;
|
|
163
|
+
/** 关联业务资源类型 */
|
|
164
|
+
resourceType?: string;
|
|
165
|
+
/** 关联业务资源 ID */
|
|
166
|
+
resourceId?: string;
|
|
167
|
+
/** 当前在视口内的可见比例 (0 ~ 1) */
|
|
168
|
+
visibleRatio?: number;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* 鼠标或手势划过元素轨迹节点(RLE 游程压缩序列项)
|
|
172
|
+
*/
|
|
173
|
+
export interface PointerPathNode {
|
|
174
|
+
/** 轨迹序号,从 1 开始 */
|
|
175
|
+
seq: number;
|
|
176
|
+
/** 元素稳定标识或选择器 */
|
|
177
|
+
elementId: string;
|
|
178
|
+
/** 元素类型 */
|
|
179
|
+
elementType: string;
|
|
180
|
+
/** 元素文本摘要 */
|
|
181
|
+
elementName: string;
|
|
182
|
+
/** 所属容器标识 */
|
|
183
|
+
containerId?: string;
|
|
184
|
+
/** 在该元素上的连续停留时长(毫秒) */
|
|
185
|
+
duration: number;
|
|
186
|
+
/** 归一化视口水平相对坐标 (0 ~ 1) */
|
|
187
|
+
rx: number;
|
|
188
|
+
/** 归一化页面垂直相对坐标 (0 ~ 1) */
|
|
189
|
+
ry: number;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* 单条埋点事件完整契约结构(对齐 2026-10-23 数据契约评审会决议)
|
|
193
|
+
* - 外层请求体仅保留 { events: TrackEventRecord[] },所有批次与环境字段全部收拢在每条 Event 内
|
|
194
|
+
* - sessionId 代表单次进入/刷新页面的会话标识(原 pageId),preSessionId 代表上一页会话标识(原 prePageId)
|
|
195
|
+
* - visitId 代表跨页面的连续访问会话标识(30分钟超时重建,商城端 shop 映射为购物会话 eid)
|
|
196
|
+
*/
|
|
197
|
+
export interface TrackEventRecord<TPayload extends Record<string, any> = Record<string, any>> {
|
|
198
|
+
/** 事件唯一标识(重发时保持不变,由数据团队在入湖后去重) */
|
|
199
|
+
eventId: string;
|
|
200
|
+
/** 所属上报批次唯一标识(发送时由批量队列统一注入,同批事件共享同一 batchId) */
|
|
201
|
+
batchId: string;
|
|
202
|
+
/** 批次实际发出时的客户端毫秒时间戳(发送时由批量队列统一注入) */
|
|
203
|
+
sendTime: number;
|
|
204
|
+
/** 事件名称(小驼峰,如 pageEnter / elementClick / createOrderSuccess) */
|
|
205
|
+
eventName: TrackEventName;
|
|
206
|
+
/** 事件实际发生时间(毫秒时间戳) */
|
|
207
|
+
eventTime: number;
|
|
208
|
+
/** 用户标识:商城端 (shop) 直接上报访客 uid;管理端 (manage) 固定传空字符串,由后端接收接口层按登录态补充 */
|
|
209
|
+
userId: string;
|
|
210
|
+
/** 来源标识:商城端 (shop) 区分 5 套商城体系(如 plus / single / third / shopline / shopify),管理端 (manage) 默认传空字符串 '' */
|
|
211
|
+
source: string;
|
|
212
|
+
/** 前端路由名称(纯粹取路由 route.name,商城 HTML 取 ShopPlus.router.pageId;必传字段,无路由时允许为空字符串 '') */
|
|
213
|
+
pageKey: string;
|
|
214
|
+
/** 页面标题(纯粹取浏览器 document.title,不与 route.name 掺和) */
|
|
215
|
+
pageName: string;
|
|
216
|
+
/** 页面会话标识(原 pageId,每次进入或刷新页面生成新值,串联当页内所有事件) */
|
|
217
|
+
sessionId: string;
|
|
218
|
+
/** 上一页会话标识(原 prePageId,串联跨页面跳转链路,首次进入为空字符串 '') */
|
|
219
|
+
preSessionId: string;
|
|
220
|
+
/** 连续访问会话标识(原 sessionId,关联跨页面的连续访问,30分钟超时重建;商城端 shop 映射为购物会话 eid) */
|
|
221
|
+
visitId: string;
|
|
222
|
+
/** 当前页面完整地址(已过滤敏感参数,供数据团队入湖后映射系统/模块/功能) */
|
|
223
|
+
url: string;
|
|
224
|
+
/** 来源页面地址 */
|
|
225
|
+
referrer: string;
|
|
226
|
+
/** 事件产生端:固定为 client */
|
|
227
|
+
eventSource: 'client' | 'server';
|
|
228
|
+
/** SDK 版本号 */
|
|
229
|
+
sdkVersion: string;
|
|
230
|
+
/** 数据结构契约版本号 */
|
|
231
|
+
schemaVersion: string;
|
|
232
|
+
/** 页面模板/皮肤标识(会议决议:解决商城同一链接切换多套模板归因) */
|
|
233
|
+
templateId: string;
|
|
234
|
+
/** 兼容旧版显式配置;当前默认不传,由数据团队入湖后补充系统归属 */
|
|
235
|
+
systemId?: string;
|
|
236
|
+
/** 兼容旧版显式配置;当前默认不传,由数据团队入湖后补充模块归属 */
|
|
237
|
+
moduleId?: string;
|
|
238
|
+
/** 兼容旧版显式配置;当前默认不传,由数据团队入湖后补充功能归属 */
|
|
239
|
+
functionId?: string;
|
|
240
|
+
/** 各事件专属业务属性负载(对应《单点埋点系统》第三章各表字段) */
|
|
241
|
+
payload: TPayload;
|
|
242
|
+
/** 浏览器与设备环境指纹信息 */
|
|
243
|
+
browserContext: BrowserContext;
|
|
244
|
+
/** 商城端 (shop) 专属上下文(管理端 manage 模式为 null) */
|
|
245
|
+
shopContext: ShopPlusContext | null;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* 批量推送请求体契约(2026-10-23 评审会决议:外层仅保留 events 数组,所有字段收拢到每条 event 内)
|
|
249
|
+
*/
|
|
250
|
+
export interface TrackBatchEnvelope {
|
|
251
|
+
/** 批量事件数组(每条 event 已内含 batchId / sendTime / sdkVersion / schemaVersion / source / browserContext) */
|
|
252
|
+
events: TrackEventRecord[];
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* SDK 各采集插件开关与阈值配置
|
|
256
|
+
*/
|
|
257
|
+
export interface GiimeTrackPluginOptions {
|
|
258
|
+
/** 是否开启页面进入/加载/离开自动采集,默认 true */
|
|
259
|
+
pageLifecycle?: boolean;
|
|
260
|
+
/** 是否开启页面心跳自动采集(会议要求:严控非正常关页丢数率并支撑大促实时在线统计),默认 true */
|
|
261
|
+
heartbeat?: boolean;
|
|
262
|
+
/** 页面心跳间隔(毫秒),2026-10-23 评审会锁定默认值为 5000 (5秒) */
|
|
263
|
+
heartbeatIntervalMs?: number;
|
|
264
|
+
/** 是否开启全量元素点击采集,默认 true */
|
|
265
|
+
click?: boolean;
|
|
266
|
+
/** 同元素防连点节流间隔(毫秒),默认 300 */
|
|
267
|
+
clickThrottleMs?: number;
|
|
268
|
+
/** 是否开启愤怒点击(Rage Click)检测,默认 true */
|
|
269
|
+
rageClick?: boolean;
|
|
270
|
+
/** 是否开启元素视口曝光采集(IntersectionObserver),默认 true */
|
|
271
|
+
exposure?: boolean;
|
|
272
|
+
/** 元素曝光可见面积比例阈值 (0 ~ 1),默认 0.5 (50%) */
|
|
273
|
+
exposureThreshold?: number;
|
|
274
|
+
/** 元素曝光最小连续可见时长(毫秒),默认 1000 */
|
|
275
|
+
exposureMinDurationMs?: number;
|
|
276
|
+
/** 是否开启有效鼠标悬停与悬浮显隐(Tooltip/Popover/Dropdown)采集,默认 true */
|
|
277
|
+
hover?: boolean;
|
|
278
|
+
/** 有效悬停最小连续停留时长(毫秒),默认 500 */
|
|
279
|
+
hoverMinDurationMs?: number;
|
|
280
|
+
/** 是否开启滚动深度与停顿采集,默认 true */
|
|
281
|
+
scroll?: boolean;
|
|
282
|
+
/** 是否开启鼠标划过元素轨迹序列(PC)与触摸滑动轨迹(Mobile)采集,默认 true */
|
|
283
|
+
pointerPath?: boolean;
|
|
284
|
+
/** 是否开启表单输入/选项变化与复制采集,默认 true */
|
|
285
|
+
formAndCopy?: boolean;
|
|
286
|
+
/** 是否开启资源加载异常与 JS 运行时异常采集,默认 true */
|
|
287
|
+
error?: boolean;
|
|
288
|
+
/** 在商城端 (shop) 模式下,是否开启对存量 window.statisticsPoster 的非侵入式双轨镜像代理,默认 true */
|
|
289
|
+
shopPlusDualTrackProxy?: boolean;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* 业务端采集模式类型:manage(管理端) / shop(商城端)
|
|
293
|
+
*/
|
|
294
|
+
export type TrackAppType = 'manage' | 'shop';
|
|
295
|
+
/**
|
|
296
|
+
* SDK 初始化总配置项(所有字段均为可选,默认内置自动识别)
|
|
297
|
+
*/
|
|
298
|
+
export interface GiimeTrackConfig {
|
|
299
|
+
/** 环境变量对象(可傳 import.meta.env 或 process.env,不传则根据当前域名自动识别环境) */
|
|
300
|
+
env?: Record<string, any> | string;
|
|
301
|
+
/** 接收服务接口地址(管理端 manage 默认 4 套环境 + '/guard/data-capture/ingest/v1/auth/track',商城端 shop 默认相对路径 '/ingest/v1/shop/track',一般无需传) */
|
|
302
|
+
endpoint?: string;
|
|
303
|
+
/** SDK 本地采集模式:manage(管理端) / shop(商城端),仅控制端侧行为,不随 JSON 上报;报文 appType 由后端按接收接口补充 */
|
|
304
|
+
appType?: TrackAppType;
|
|
305
|
+
/** 来源标识(2026-10-23 评审会新增:商城端 shop 区分 5 套商城体系如 'plus' | 'single' | 'third' | 'shopline' | 'shopify',管理端 manage 默认 '') */
|
|
306
|
+
source?: string;
|
|
307
|
+
/** 页面模板标识(商城多皮肤模板自动提取) */
|
|
308
|
+
templateId?: string;
|
|
309
|
+
/** 数据结构契约版本,默认 '1.0.0' */
|
|
310
|
+
schemaVersion?: string;
|
|
311
|
+
/** 总开关,默认 true */
|
|
312
|
+
enabled?: boolean;
|
|
313
|
+
/** 采样率 (0 ~ 1),按会话采样,默认 1.0 (100% 全采) */
|
|
314
|
+
sampleRate?: number;
|
|
315
|
+
/** 队列定时 flush 间隔(毫秒),默认 5000 */
|
|
316
|
+
flushIntervalMs?: number;
|
|
317
|
+
/** 单批次最大事件条数,默认 20 */
|
|
318
|
+
maxBatchSize?: number;
|
|
319
|
+
/** 内存队列最大容量,超出丢弃最旧事件,默认 500 */
|
|
320
|
+
maxQueueSize?: number;
|
|
321
|
+
/** 单批目标字节上限,默认 60000;单条超大事件保留原结构,使用普通请求发送 */
|
|
322
|
+
maxBatchBytes?: number;
|
|
323
|
+
/** 失败重试初始间隔(毫秒),默认 5000,连续失败退避到最多 30000 */
|
|
324
|
+
retryIntervalMs?: number;
|
|
325
|
+
/** 单次发送超时(毫秒),默认 10000 */
|
|
326
|
+
requestTimeoutMs?: number;
|
|
327
|
+
/** 是否在控制台打印调试日志(默认根据 env.DEV 自动开启,无需手动传) */
|
|
328
|
+
debug?: boolean;
|
|
329
|
+
/** 是否将 payload 字段同时平铺到事件顶层(兼容不同 Flink 契约习惯),默认 false */
|
|
330
|
+
flattenPayload?: boolean;
|
|
331
|
+
/** 兼容旧版系统标识配置;新接入无需配置,由数据团队入湖后补充 */
|
|
332
|
+
systemId?: string;
|
|
333
|
+
/** 兼容旧版模块标识配置;新接入无需配置,由数据团队入湖后补充 */
|
|
334
|
+
moduleId?: string;
|
|
335
|
+
/** 兼容旧版功能标识配置;新接入无需配置,由数据团队入湖后补充 */
|
|
336
|
+
functionId?: string;
|
|
337
|
+
/** 动态获取请求头(默认已内置自动从 Cookie 读取 token 拼接 Authorization,无需手动传) */
|
|
338
|
+
getHeaders?: () => Record<string, string>;
|
|
339
|
+
/** 自定义上报传输函数(用于本地 Playground 拦截或自定义通道;返回 true 代表发送成功) */
|
|
340
|
+
customTransport?: (envelope: TrackBatchEnvelope, isUnload: boolean) => Promise<boolean> | boolean;
|
|
341
|
+
/** 采集插件细粒度配置 */
|
|
342
|
+
plugins?: GiimeTrackPluginOptions;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* 事件订阅监听器(供 Playground 面板或调试工具实时观测采集到的事件)
|
|
346
|
+
*/
|
|
347
|
+
export type TrackEventListener = (event: TrackEventRecord, queueLength: number) => void;
|
|
348
|
+
/**
|
|
349
|
+
* 批次发送订阅监听器
|
|
350
|
+
*/
|
|
351
|
+
export type TrackBatchListener = (envelope: TrackBatchEnvelope, mode: 'fetch' | 'beacon' | 'custom', success: boolean) => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 浏览器、渲染内核、操作系统、App WebView 及设备能力全方位识别工具
|
|
3
|
+
* @description 帮助团队精确统计分析管理端(manage)与商城端(shop)用户实际使用的浏览器版本、移动端广告内置容器及 API 兼容性
|
|
4
|
+
*/
|
|
5
|
+
import type { BrowserContext } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* 获取中文时区偏移描述(完全兼容商城 statistics.[hash].ts 的 getTimezoneOffset 格式)
|
|
8
|
+
*/
|
|
9
|
+
export declare const getChineseTimezoneOffset: () => {
|
|
10
|
+
timezoneOffset: string;
|
|
11
|
+
timezoneOffsetMinutes: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 采集完整的浏览器与设备环境上下文
|
|
15
|
+
*/
|
|
16
|
+
export declare const parseBrowserContext: () => BrowserContext;
|