diff --git a/packages/biz/CHANGELOG.md b/packages/biz/CHANGELOG.md index 61b9f99..b7767d3 100644 --- a/packages/biz/CHANGELOG.md +++ b/packages/biz/CHANGELOG.md @@ -1,5 +1,26 @@ # @zhst/biz +## 0.12.1 + +### Patch Changes + +- 修改物料库算法编辑新增箭头选择,元组件新增图片标记组件 +- Updated dependencies + - @zhst/meta@0.11.0 + - @zhst/func@0.9.2 + - @zhst/hooks@0.8.11 + +## 0.12.0 + +### Minor Changes + +- 优化 meta 预览图组件 + +### Patch Changes + +- Updated dependencies + - @zhst/meta@0.10.0 + ## 0.11.3 ### Patch Changes diff --git a/packages/biz/es/BigImageModal/BigImageModal.d.ts b/packages/biz/es/BigImageModal/BigImageModal.d.ts deleted file mode 100644 index ae5e46d..0000000 --- a/packages/biz/es/BigImageModal/BigImageModal.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import type { ModalProps, DescriptionsProps, TabsProps, VideoViewRef, ImgViewRef } from '@zhst/meta'; -import './index.less'; -export declare const componentPrefix = "zhst-image"; -export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO'; -export type MODEL_TYPE = 'VIDEO' | 'IMAGE'; -export interface BigImageModalProps extends ModalProps { - visible: boolean; - activeTab?: TAB_TYPE; - attributeList: { - title: string; - children: Pick; - }; - tabs: { - data: Pick & { - key: TAB_TYPE; - }; - }; - dataSource: any; - imageData: any; - relatedData: any; - isRelated?: boolean; - footer?: React.ReactNode; - showCarousel?: boolean; - onTabChange?: (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void; - onIndexChange?: (newVal?: number, oldVal?: number) => void; - transformPropFunc: (data: any) => void; -} -interface BigModalRef { - tab: TAB_TYPE; - setTab: (tab: TAB_TYPE) => void; - modalRef: ModalProps; - activeKey: string; - setActiveKey: (val: string) => void; - videoPlayerRef: VideoViewRef; - combineImageRef: any; - bigImagePreviewRef: ImgViewRef; -} -declare const BigImageModal: React.FC; -export default BigImageModal; diff --git a/packages/biz/es/BigImageModal/components/CombineImage/index.d.ts b/packages/biz/es/BigImageModal/components/CombineImage/index.d.ts deleted file mode 100644 index 19dbaa2..0000000 --- a/packages/biz/es/BigImageModal/components/CombineImage/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { FC } from 'react'; -interface ComBineImageProps { - data: { - imgSummary: string; - compaterImages: string[]; - imageKey: string; - score: number; - }; -} -declare const ComBineImage: FC; -export default ComBineImage; diff --git a/packages/biz/es/BigImageModal/components/CombineImage/index.js b/packages/biz/es/BigImageModal/components/CombineImage/index.js deleted file mode 100644 index abe895d..0000000 --- a/packages/biz/es/BigImageModal/components/CombineImage/index.js +++ /dev/null @@ -1,58 +0,0 @@ -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useRef, forwardRef, useImperativeHandle, useState } from 'react'; -import { CompareImage, Flex, Score } from '@zhst/meta'; -var ComBineImage = /*#__PURE__*/forwardRef(function (props, ref) { - var data = props.data; - var imgSummary = data.imgSummary, - _data$compaterImages = data.compaterImages, - compaterImages = _data$compaterImages === void 0 ? [] : _data$compaterImages; - var targetImageRef = useRef(null); - var compareImageRef = useRef(null); - var _useState = useState(compaterImages.findIndex(function (_url) { - return imgSummary === _url; - }) || 0), - _useState2 = _slicedToArray(_useState, 2), - targetIndex = _useState2[0], - setTargetIndex = _useState2[1]; - useImperativeHandle(ref, function () { - return { - compareImageRef: compareImageRef, - targetImageRef: targetImageRef - }; - }); - return /*#__PURE__*/React.createElement(Flex, { - justify: "space-evenly", - align: "center", - style: { - padding: '0 32px' - } - }, /*#__PURE__*/React.createElement(CompareImage, { - ref: targetImageRef, - preDisable: targetIndex === 0, - nextDisable: targetIndex >= compaterImages.length - 1, - onNext: function onNext() { - return setTargetIndex(targetIndex + 1); - }, - onPre: function onPre() { - return setTargetIndex(targetIndex - 1); - }, - showScore: false, - openRoll: !!compaterImages.length, - url: compaterImages[targetIndex] || imgSummary, - label: "\u76EE\u6807\u56FE" - }), /*#__PURE__*/React.createElement(Score, { - score: data.score - }), /*#__PURE__*/React.createElement(CompareImage, { - ref: compareImageRef, - url: data.imageKey, - openRoll: false, - score: data.score, - label: "\u5BF9\u6BD4\u56FE" - })); -}); -export default ComBineImage; \ No newline at end of file diff --git a/packages/biz/es/BigImageModal/components/navigation/index.d.ts b/packages/biz/es/BigImageModal/components/navigation/index.d.ts deleted file mode 100644 index 78b1ca8..0000000 --- a/packages/biz/es/BigImageModal/components/navigation/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as React from 'react'; -import './index.less'; -declare const Navigation: React.FC<{ - show?: boolean; - onClick?: React.MouseEventHandler; - prev?: boolean; - next?: boolean; - disabled?: boolean; - className?: string; - color?: string; - hoverColor?: string; -}>; -export default Navigation; diff --git a/packages/biz/es/BigImageModal/components/navigation/index.js b/packages/biz/es/BigImageModal/components/navigation/index.js deleted file mode 100644 index 19dae1e..0000000 --- a/packages/biz/es/BigImageModal/components/navigation/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import * as React from 'react'; -import classnames from 'classnames'; -import { Icon, Button } from '@zhst/meta'; -import "./index.less"; -var componentName = "zhst-image__nav"; -var Navigation = function Navigation(props) { - var show = props.show, - prev = props.prev, - next = props.next, - disabled = props.disabled, - onClick = props.onClick, - className = props.className, - color = props.color; - return /*#__PURE__*/React.createElement("div", { - className: classnames("".concat(componentName), prev && "".concat(componentName, "-prev"), next && "".concat(componentName, "-next"), disabled && "".concat(componentName, "--disable"), !show && "".concat(componentName, "--hide"), className) - }, /*#__PURE__*/React.createElement(Button, { - type: "text", - disabled: disabled, - onClick: onClick - }, /*#__PURE__*/React.createElement(Icon, { - size: 28, - color: color, - icon: prev ? 'icon-qiehuanzuo' : 'icon-qiehuanyou' - }))); -}; -export default Navigation; \ No newline at end of file diff --git a/packages/biz/es/BigImageModal/components/navigation/index.less b/packages/biz/es/BigImageModal/components/navigation/index.less deleted file mode 100644 index 0a834f9..0000000 --- a/packages/biz/es/BigImageModal/components/navigation/index.less +++ /dev/null @@ -1,44 +0,0 @@ -.zhst-image__nav { - position: absolute; - display: flex; - width: 48px; - height: 100%; - flex-shrink: 0; - align-items: center; - justify-content: center; - cursor: pointer; - font-size: 0; - - &>button { - & span { - display: flex; - } - } - - :global { - i:hover { - color: #f0f0f0 !important; - } - } - - &--disable { - :global { - i { - color: #f0f0f0; - cursor: not-allowed !important; - } - } - } - - &--hide { - display: none; - } - - &-prev { - left: 20px; - } - - &-next { - right: 20px; - } -} diff --git a/packages/biz/es/BigImageModal/index.d.ts b/packages/biz/es/BigImageModal/index.d.ts deleted file mode 100644 index bb07714..0000000 --- a/packages/biz/es/BigImageModal/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import BigImageModal from "./BigImageModal"; -export type { BigImageModalProps } from './BigImageModal'; -export default BigImageModal; diff --git a/packages/biz/es/BigImageModal/index.js b/packages/biz/es/BigImageModal/index.js deleted file mode 100644 index 417a89d..0000000 --- a/packages/biz/es/BigImageModal/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import BigImageModal from "./BigImageModal"; -export default BigImageModal; \ No newline at end of file diff --git a/packages/biz/es/BigImageModal/index.less b/packages/biz/es/BigImageModal/index.less deleted file mode 100644 index 8e98e2e..0000000 --- a/packages/biz/es/BigImageModal/index.less +++ /dev/null @@ -1,514 +0,0 @@ -.zhst-image { - .zhst-dialog-content { - box-shadow: 0 4px 12px rgb(0 0 0 / 20%); - } - - .zhst-tabs .zhst-tabs-nav-wrap { - background-color: #f6f6f6; - } - - - &-view-container { - position: relative; - width: 100%; - margin-bottom: 16px; - - &__nav { - position: absolute; - z-index: 99; - top: 50%; - width: 40px !important; - height: 40px !important; - background: #d9d9d9; - border-radius: 100%; - cursor: pointer; - transform: translateY(-50%); - - &>button { - display: flex; - align-items: center; - color: #fff !important; - } - - &--disabled { - opacity: 0.3; - - &>button { - color: #fff !important; - } - } - } - - &__nav:hover { - background: #09f; - color: #fff !important; - } - } - - &-tool-container { - width: 100%; - height: 40px; - margin-bottom: 16px; - } - - &__face-score { - position: absolute; - right: 90px; - bottom: 80px; - color: red; - font-family: 'Microsoft YaHei'; - font-size: 19px; - font-weight: bold; - } - - &-carousel-container { - position: relative; - width: 100%; - height: 100px; - margin-top: 16px; - margin-bottom: 24px; - } -} - - -.zhst-image__tool { - display: flex; - width: 100%; - align-items: center; - font-size: 14px; - - &-split { - width: 0; - height: 14px; - - &::before { - display: block; - height: 100%; - border-left: 1px solid #e6e7eb; - content: ''; - } - } - - &-zoom { - display: inline-flex; - align-items: center; - - &> :not(:last-child) { - margin-right: 14px; - } - - &__scale { - display: inline-block; - width: 38px; - height: 14px; - - // margin-left: 15px; - box-sizing: content-box; - border: 1px solid rgb(77 77 77 / 100%); - margin-top: 2px; //对齐 - background: rgb(255 255 255 / 100%); - border-radius: 2px; - color: #4d4d4d; - cursor: default; - font-size: 12px; - line-height: 14px; - text-align: center; - } - } - - &-switch { - display: flex; - width: 30px; - flex-shrink: 0; - align-items: center; - justify-content: center; - margin: 0 26px; - } - - &-left { - display: flex; - flex: 1; - align-items: center; - justify-content: flex-end; - - &> :not(:last-child) { - margin-right: 14px; - } - } - - &-right { - display: flex; - flex: 1; - align-items: center; - justify-content: flex-start; - - &> :not(:first-child) { - margin-left: 20px; - } - } - - &-icon-container { - font-size: 14px; - - &--active { - color: #5584ff !important; - } - - &> :first-child { - margin-right: 2px; - } - } -} - -.zhst-image__carousel { - position: relative; - display: flex; - width: 742px; - height: 100px; - align-items: center; - justify-content: center; - border: 1px solid #f0f0f0; - margin: 0 auto; - background: #fafafa; - border-radius: 2px; - user-select: none; - - &-container { - width: (58px + 8px) * 10; - } - - &-item { - display: flex; - width: 58px + 8px; - align-items: center; - justify-content: center; - } - - &-item-img { - /* 尝试消除transform 副作用 */ - position: relative; - z-index: 99; - - // width: 58px; - // height: 76px; - display: flex; - width: 66px; - height: 84px; - box-sizing: border-box; - align-items: center; - justify-content: center; - background: #fafafa; - cursor: pointer; - - /* 尝试消除transform 副作用 end */ - &--active { - border: 2px solid #09f; - border-radius: 1px; - } - - &>div { - /* 尝试消除transform 副作用 */ - position: relative; - z-index: 99; - overflow: hidden; - width: 58px; - height: 76px; - - /* 尝试消除transform 副作用 end */ - &>img { - width: 58px; - height: 76px; - object-fit: contain; - transition: all 0.2s; - - &:hover { - transform: scale(1.5); - } - } - } - } -} - -.zhst-image__trackmodel { - &__panel { - position: relative; - z-index: 99; - top: 0; - right: 0; - width: 320px; - height: 100%; - background-color: #fff; - - &--head { - width: 100%; - height: 40px; - padding: 0 16px; - border-bottom: 1px solid #f0f0f0; - color: #333; - font-size: 14px; - font-weight: bold; - line-height: 40px; - text-align: left; - } - - &--track { - height: calc(100% - 40px); - } - - &-date { - padding: 10px 6px; - - // position: absolute; - } - } - - &--bigImage { - position: absolute; - z-index: 100; - top: 0; - left: 0; - display: flex; - width: 100%; - height: 100%; - justify-content: center; - padding-top: 59px; - background: rgb(0 0 0 / 40%); - - &--image { - width: 946px; - height: 532px; - - &>img { - width: 946px; - height: 532px; - object-fit: contain; - } - } - - &--close { - margin-left: 16px; - color: #fff; - } - } - - &__flooter { - position: absolute; - z-index: 999; - bottom: -124px; - left: 0; - width: calc(100% - 320px - 10px); - height: 144px; - background: #fff; - box-shadow: 0 0 8px 0 rgb(172 172 172 / 50%); - - &--head { - display: flex; - height: 20px; - align-items: center; - justify-content: center; - background: #f6f6f6; - color: #999; - line-height: 16px; - } - - &--body { - display: flex; - height: calc(100% - 20px); - padding-left: 50px; - - &__title { - color: #333; - font-size: 12px; - font-weight: bold; - line-height: 16px; - } - - &__text { - overflow: hidden; - color: #333; - font-size: 12px; - line-height: 16px; - text-overflow: ellipsis; - white-space: nowrap; - } - - &--left { - display: flex; - width: 75px; - height: 100; - align-items: center; - - &>img { - width: 75px; - height: 100px; - object-fit: contain; - } - } - - &--middle { - display: grid; - width: 331px; - justify-content: flex-start; - padding: 8px 20px; - border-right: 1px solid #f0f0f0; - - &>div { - display: flex; - } - } - - &--right { - display: grid; - width: calc(100% - 331px - 75px); - padding: 8px 20px; - - &>div { - display: flex; - } - - &__button-list { - display: flex; - align-items: center; - - &>button { - margin-right: 20px; - - &>span { - color: #09f !important; - } - - &:hover { - &>span { - color: #247fdb !important; - } - } - } - } - } - } - - @keyframes close { - from { - bottom: 0; - } - - to { - bottom: -124px; - } - } - - @keyframes open { - from { - bottom: -124px; - } - - to { - bottom: 0; - } - } - - &--close { - bottom: -124px; - animation-duration: 1s; - animation-name: close; - } - - &--open { - bottom: 0; - animation-duration: 1s; - animation-name: open; - } - } -} - -.zhst-image__attributePanel { - margin: 0 66px; - background: #f6f6f6; - margin-top: 20px; - padding-top: 16px; - display: flex; - justify-content: center; - - &>div:first-child { - width: fit-content; - display: flex; - flex-direction: column; - } - - &-title { - color: rgb(0 0 0 / 88%); - font-weight: bold; - padding-bottom: 12px; - } - - &-item { - display: flex; - } - - &-label { - color: rgb(0 0 0 / 45%); - } - - &-value { - color: rgb(0 0 0 / 88%); - } -} - -.relatedWrapper { - width: 100%; - height: 100px; - padding: 0 30px; - margin-bottom: 30px; - box-sizing: border-box; - - .relatedTabs { - width: 100%; - height: 100px; - } - - .relatedContent { - width: 100%; - height: 100px; - display: flex; - - .relatedPics { - width: 742px; - height: 100px; - } - - .disabled { - color: rgba(0, 0, 0, 25%); - } - - .relatedBtn { - flex: 1; - font-size: 14px; - color: #333; - display: flex; - align-items: flex-end; - cursor: pointer; - - &:hover { - color: #09f; - } - } - } - - :global { - .ant-tabs-left>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane { - padding-left: 16px; - } - - .ant-tabs-tab { - padding: 8px 12px !important; - text-align: right !important; - } - - .ant-tabs .ant-tabs-tab { - font-size: 14px; - font-weight: bold; - text-align: right; - justify-content: flex-end; - } - } -} diff --git a/packages/biz/es/BigImageModal/mock.d.ts b/packages/biz/es/BigImageModal/mock.d.ts deleted file mode 100644 index 68ff4e3..0000000 --- a/packages/biz/es/BigImageModal/mock.d.ts +++ /dev/null @@ -1,245 +0,0 @@ -export declare const IMAGE_DATA: { - enAbleDeleteFeature: boolean; - tabsFilter: string[]; - selectIndex: number; - disableBtn: number[]; - dataSource: { - objectId: string; - condition: { - featureInfo: null; - featureData: string; - imageData: string; - alg: string; - rect: { - x: number; - y: number; - w: number; - h: number; - }; - objectImageUrl: string; - srcImageUrl: string; - }; - score: number; - timestamp: number; - deviceId: string; - id: string; - name: string; - dirid: string; - status: string; - longitude: number; - latitude: number; - caseId: string; - caseGroup: string; - isDeleted: string; - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - isObjectTrack: boolean; - pathId: string; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - level: number; - bboxInFrame: { - x: number; - y: number; - w: number; - h: number; - }; - bboxExtInFrame: { - x: number; - y: number; - w: number; - h: number; - }; - objectImageKey: string; - objectExtImageKey: string; - frameImageKey: string; - confidence: number; - sourceObjectId: string; - storeTimestamp: string; - gbNumber: string; - qualityScore: number; - subObjectCount: number; - subObjectType: string[]; - subObjectIds: string[]; - solutionId: string; - fragmentId: string; - contrastKey: string; - compaterImages: string[]; - imgSummary: string; - imageKey: string; - srcImageUrl: string; - algorithmVersion: string; - cameraId: string; - cameraName: string; - }[]; - isArchiveDetail: boolean; - ToolProps: { - renderVideoBtn: boolean; - disableVideo: boolean; - }; - specialTitle: string; -}; -export declare const BIG_IMAGE_DATA: ({ - imageKey: string; - imgSummary: string; - flvUrl: string; - compaterImages: string[]; - odRect: { - x: number; - y: number; - w: number; - h: number; - }; - attachImg: { - url: string; - label: string; - }[]; - score: string; - showScore: boolean; - cameraPosition: string; - time: string; - objects: { - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - sourceObjectId: string; - level: number; - confidence: number; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - infoOnSource: { - bboxInFrame: { - bboxRatio: { - x: number; - y: number; - w: number; - h: number; - }; - }; - countInSource: number; - indexInSource: number; - }; - qualityScore: number; - }[]; -} | { - imageKey: string; - imgSummary: string; - odRect: { - x: number; - y: number; - w: number; - h: number; - }; - attachImg: { - url: string; - label: string; - }[]; - flvUrl: string; - score: number; - showScore: boolean; - cameraPosition: string; - time: string; - objects: ({ - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - sourceObjectId: string; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - infoOnSource: { - bboxInFrame: { - bboxRatio: { - x: number; - y: number; - w: number; - h: number; - }; - }; - countInSource: number; - indexInSource: number; - }; - qualityScore: number; - level?: undefined; - confidence?: undefined; - } | { - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - sourceObjectId: string; - level: number; - confidence: number; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - infoOnSource: { - bboxInFrame: { - bboxRatio: { - x: number; - y: number; - w: number; - h: number; - }; - }; - countInSource: number; - indexInSource: number; - }; - qualityScore: number; - })[]; - compaterImages?: undefined; -})[]; -export declare const attributeList: { - title: string; - children: { - key: string; - label: string; - children: string; - }[]; -}[]; diff --git a/packages/biz/es/BigImageModal/mock.js b/packages/biz/es/BigImageModal/mock.js deleted file mode 100644 index 760a766..0000000 --- a/packages/biz/es/BigImageModal/mock.js +++ /dev/null @@ -1,473 +0,0 @@ -export var IMAGE_DATA = { - "enAbleDeleteFeature": true, - "tabsFilter": ["COMPATER", "NORMAL"], - "selectIndex": 4, - "disableBtn": [0, 1, 4, 20], - "dataSource": [{ - "objectId": "1742110565582518272", - "condition": { - "featureInfo": null, - "featureData": "AAAAAAAAAAAAAAAAAAAAAAA==", - "imageData": "", - "alg": "VERSION_REID_HEAD_ATTR", - "rect": { - "x": 0.271875, - "y": 0.32222223, - "w": 0.2859375, - "h": 0.67777777 - }, - "objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg", - "srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg" - }, - "score": 0.7163062, - "timestamp": 1704186491979, - "deviceId": "129533", - "id": "129533", - "name": "4楼门口过道人脸", - "dirid": "0", - "status": "1", - "longitude": 120.125, - "latitude": 30.280500411987305, - "caseId": "0", - "caseGroup": "", - "isDeleted": "DEVICEMANAGER_BOOL_DEFAULT", - "objectIndex": { - "objectId": "1742110565582518272", - "solutionId": "1", - "deviceId": "129533", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "isObjectTrack": true, - "pathId": "1742110532019697664", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1704186491979", - "width": 0, - "height": 0, - "originWidth": 1920, - "originHeight": 1080, - "offsetTime": "24714687", - "skipNumber": "0" - }, - "level": 1, - "bboxInFrame": { - "x": 0.603125, - "y": 0.3314815, - "w": 0.0578125, - "h": 0.2712963 - }, - "bboxExtInFrame": { - "x": 0.546875, - "y": 0.2638889, - "w": 0.17135416, - "h": 0.40648147 - }, - "objectImageKey": "", - "objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg", - "frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg", - "confidence": 0.817271, - "sourceObjectId": "1742110565603489792", - "storeTimestamp": "0", - "gbNumber": "", - "qualityScore": 0, - "subObjectCount": 1, - "subObjectType": ["OBJECT_TYPE_FACE"], - "subObjectIds": ["1742110532015503360"], - "solutionId": "1", - "fragmentId": "0", - "contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg", - "compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"], - "imgSummary": "singer-20240102/1/129533/1742110565582518272.jpg", - "imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg", - "srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg", - "algorithmVersion": "VERSION_REID_HEAD_ATTR", - "cameraId": "129533", - "cameraName": "4楼门口过道人脸" - }, { - "objectId": "1742092680994764802", - "condition": { - "featureInfo": null, - "featureData": "AAAAAAAAAAAAAAAAAAAAAAAAA==", - "imageData": "", - "alg": "VERSION_REID_HEAD_ATTR", - "rect": { - "x": 0.271875, - "y": 0.32222223, - "w": 0.2859375, - "h": 0.67777777 - }, - "objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg", - "srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg" - }, - "score": 0.7007122, - "timestamp": 1704182225679, - "deviceId": "129533", - "id": "129533", - "name": "4楼门口过道人脸", - "dirid": "0", - "status": "1", - "longitude": 120.125, - "latitude": 30.280500411987305, - "caseId": "0", - "caseGroup": "", - "isDeleted": "DEVICEMANAGER_BOOL_DEFAULT", - "objectIndex": { - "objectId": "1742092680994764802", - "solutionId": "1", - "deviceId": "129533", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "isObjectTrack": true, - "pathId": "1742092646219790337", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1704182225679", - "width": 0, - "height": 0, - "originWidth": 1920, - "originHeight": 1080, - "offsetTime": "20448387", - "skipNumber": "0" - }, - "level": 1, - "bboxInFrame": { - "x": 0.5265625, - "y": 0.49537036, - "w": 0.104166664, - "h": 0.35833332 - }, - "bboxExtInFrame": { - "x": 0.465625, - "y": 0.40648147, - "w": 0.22708334, - "h": 0.537963 - }, - "objectImageKey": "", - "objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg", - "frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg", - "confidence": 0.769764, - "sourceObjectId": "1742092681720379392", - "storeTimestamp": "0", - "gbNumber": "", - "qualityScore": 0, - "subObjectCount": 0, - "subObjectType": [], - "subObjectIds": [], - "solutionId": "1", - "fragmentId": "0", - "contrastKey": "singer-20240102/1/129533/1742092680994764802.jpg", - "compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"], - "imgSummary": "singer-20240102/1/129533/1742092680994764802.jpg", - "imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg", - "srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg", - "algorithmVersion": "VERSION_REID_HEAD_ATTR", - "cameraId": "129533", - "cameraName": "4楼门口过道人脸" - }, { - "objectId": "1742092514409592832", - "condition": { - "featureInfo": null, - "featureData": "AAAAAAAAAAAAAAAAAAAAAAAA==", - "imageData": "", - "alg": "VERSION_REID_HEAD_ATTR", - "rect": { - "x": 0.271875, - "y": 0.32222223, - "w": 0.2859375, - "h": 0.67777777 - }, - "objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg", - "srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg" - }, - "score": 0.703765, - "timestamp": 1704182186451, - "deviceId": "129529", - "id": "129529", - "name": "4入口人脸", - "dirid": "0", - "status": "1", - "longitude": 120.12100219726562, - "latitude": 30.280099868774414, - "caseId": "0", - "caseGroup": "", - "isDeleted": "DEVICEMANAGER_BOOL_DEFAULT", - "objectIndex": { - "objectId": "1742092514409592832", - "solutionId": "1", - "deviceId": "129529", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "isObjectTrack": true, - "pathId": "1742092482440607744", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1704182186451", - "width": 0, - "height": 0, - "originWidth": 2560, - "originHeight": 1440, - "offsetTime": "20409182", - "skipNumber": "0" - }, - "level": 1, - "bboxInFrame": { - "x": 0.6195313, - "y": 0.24583334, - "w": 0.09804688, - "h": 0.41944444 - }, - "bboxExtInFrame": { - "x": 0.53515625, - "y": 0.14027777, - "w": 0.26640624, - "h": 0.63125 - }, - "objectImageKey": "", - "objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg", - "frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg", - "confidence": 0.92494, - "sourceObjectId": "1742092515508500480", - "storeTimestamp": "0", - "gbNumber": "", - "qualityScore": 0, - "subObjectCount": 1, - "subObjectType": ["OBJECT_TYPE_FACE"], - "subObjectIds": ["1742092482432219136"], - "solutionId": "1", - "fragmentId": "0", - "contrastKey": "singer-20240102/1/129529/1742092514409592832.jpg", - "compaterImages": ["http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg"], - "imgSummary": "singer-20240102/1/129529/1742092514409592832.jpg", - "imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg", - "srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg", - "algorithmVersion": "VERSION_REID_HEAD_ATTR", - "cameraId": "129529", - "cameraName": "4入口人脸" - }], - "isArchiveDetail": false, - "ToolProps": { - "renderVideoBtn": true, - "disableVideo": false - }, - "specialTitle": "" -}; -export var BIG_IMAGE_DATA = [{ - imageKey: 'http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622934503424.jpg', - imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg", - flvUrl: 'ws://10.0.0.120:9033/flv/Sip/34020000001310000301.flv?ip=10.0.0.120&stime=1704815972&etime=1704815992', - compaterImages: ['http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg', "http://10.0.0.120:30003/file/public/public_20240117/file/dfdd3340-53c8-4dc4-9921-f13230aa0355.jpg"], - odRect: { - "x": 0.5445312, - "y": 0.19166666, - "w": 0.08671875, - "h": 0.40138888 - }, - attachImg: [{ - "url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622695428096.jpg", - "label": "形体" - }, { - "url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894588427964418.jpg", - "label": "人脸" - }], - score: '0.6', - // 人脸质量分 - showScore: true, - // 人脸质量分 - cameraPosition: 'string', - // 摄像头位置 - time: '2022-01-01', - // 摄像头拍摄时间 - objects: [{ - "objectIndex": { - "objectId": "1746832189053474816", - "solutionId": "0", - "deviceId": "0", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "sourceObjectId": "0", - "level": 0, - "confidence": 0.881164, - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1705312223057", - "width": 0, - "height": 0, - "originWidth": 0, - "originHeight": 0, - "offsetTime": "0", - "skipNumber": "0" - }, - "infoOnSource": { - "bboxInFrame": { - "bboxRatio": { - "x": 0.61418945, - "y": 0.34309354, - "w": 0.067661405, - "h": 0.34659258 - } - }, - "countInSource": 0, - "indexInSource": 0 - }, - "qualityScore": 0 - }] -}, { - imageKey: 'http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581994436608.jpg', - imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg", - odRect: { - "x": 0.553125, - "y": 0.29722223, - "w": 0.048958335, - "h": 0.2462963 - }, - attachImg: [{ - "url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581163964416.jpg", - "label": "形体" - }, { - "url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795546867140608.jpg", - "label": "人脸" - }], - flvUrl: 'ws://10.0.0.120:9033/flv/HaikangNvr/34.flv?ip=10.0.2.103&stime=1705302394&etime=1705302414', - score: 0.815207, - // 人脸质量分 - showScore: true, - // 人脸质量分 - cameraPosition: 'string', - // 摄像头位置 - time: '2022-01-01', - // 摄像头拍摄时间 - objects: [{ - "objectIndex": { - "objectId": "1746816737430472704", - "solutionId": "0", - "deviceId": "0", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "sourceObjectId": "0", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1705308539109", - "width": 0, - "height": 0, - "originWidth": 0, - "originHeight": 0, - "offsetTime": "0", - "skipNumber": "0" - }, - "infoOnSource": { - "bboxInFrame": { - "bboxRatio": { - "x": 0.5519352, - "y": 0.2965385, - "w": 0.05185461, - "h": 0.24698898 - } - }, - "countInSource": 0, - "indexInSource": 0 - }, - "qualityScore": 0 - }, { - "objectIndex": { - "objectId": "1746816737430472705", - "solutionId": "0", - "deviceId": "0", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "sourceObjectId": "0", - "level": 0, - "confidence": 0.9310699, - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1705308539109", - "width": 0, - "height": 0, - "originWidth": 0, - "originHeight": 0, - "offsetTime": "0", - "skipNumber": "0" - }, - "infoOnSource": { - "bboxInFrame": { - "bboxRatio": { - "x": 0.58543766, - "y": 0.3203356, - "w": 0.052037954, - "h": 0.2664015 - } - }, - "countInSource": 0, - "indexInSource": 0 - }, - "qualityScore": 0 - }] -}]; -export var attributeList = [{ - title: '人员属性', - children: [{ - key: '1', - label: '性别', - children: '男' - }, { - key: '2', - label: '年龄', - children: '成年' - }, { - key: '3', - label: '帽子', - children: '无' - }, { - key: '4', - label: '上身颜色', - children: '灰' - }, { - key: '5', - label: '下身颜色', - children: '蓝色' - }, { - key: '6', - label: '附着物', - children: '无' - }, { - key: '7', - label: '骑行', - children: '否' - }] -}, { - title: '社区规范', - children: [{ - key: '1', - label: '性别', - children: '男' - }, { - key: '2', - label: '年龄', - children: '成年' - }, { - key: '3', - label: '帽子', - children: '无' - }, { - key: '4', - label: '上身颜色', - children: '灰' - }, { - key: '5', - label: '下身颜色', - children: '蓝色' - }, { - key: '6', - label: '附着物', - children: '无' - }, { - key: '7', - label: '骑行', - children: '否' - }] -}]; \ No newline at end of file diff --git a/packages/biz/es/BigImageModal/util/bigImageModalAdapter.d.ts b/packages/biz/es/BigImageModal/util/bigImageModalAdapter.d.ts deleted file mode 100644 index 185982d..0000000 --- a/packages/biz/es/BigImageModal/util/bigImageModalAdapter.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * 适配老的大屏组件数据格式传入 - */ -import React from 'react'; -import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect } from '@zhst/types'; -import { VideoViewProps, ImgViewProps, VideoViewRef, ImgViewRef } from '@zhst/meta'; -export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK'; -export type MODEL_TYPE = 'VIDEO' | 'IMAGE'; -export interface CarouselProps { - hasPre?: boolean; - hasNext?: boolean; - selectIndex: number; - setSelectIndex: React.Dispatch>; - dataSource: Array<{ - key: string; - url: string; - }>; -} -export type ISelectItem = Partial> & Partial>; -/** - * 描述列表 description - */ -export interface HeaderProps { - value: TAB_TYPE; - onChange: (type: TAB_TYPE) => void; - tabsFilter: TAB_TYPE[]; -} -export interface ParamProps { - tab: string; - selectItem: ISelectItem; - imgViewRef: React.MutableRefObject; - VideoViewRef: React.MutableRefObject; - model: MODEL_TYPE; - setModel: React.Dispatch>; - scale$: number; - showCrop$: boolean; -} -/** - * 工具栏 - */ -export interface ToolProps { - renderRight?: (props: ParamProps) => React.ReactNode; - renderLeft?: (props: ParamProps) => React.ReactNode; - renderVideoBtn?: boolean; - param: ParamProps; - disableVideo: boolean; -} -export interface BigImageData { - extendRectList: (Rect & { - algorithmVersion: AlgorithmVersionStr; - imageKey: string; - })[]; - rectList: (Rect & { - algorithmVersion: AlgorithmVersionStr; - imageKey: string; - })[]; - attachImg: { - url: string; - label: '形体' | '人脸'; - }[]; - odRect: Rect; - compaterImages: string[]; - constractKey: string; - frameImageKey: string; - imageKey?: string; - imgSummary: string; - objectExtImageKey: string; - attributeList: { - label: string; - list: any[]; - }[]; - archiveImages?: any; - spaceName: string; - objectIndex?: { - deviceId: string; - fragmentId: string; - objectId: string; - solutionId: string; - }; - objectType: ObjectType; - objectId: string; - bodyObjectId?: string; - faceObjectId?: string; - sourceObjectId?: string; - cameraId: string; - cameraName: string; - selectIndex: number; - humanProperty: HumanProperty; - qualityScore?: number; - score: number; - timestamp: string; - bodyImageUrl: string; - faceImageUrl: string; - algorithmVersion: AlgorithmVersionStr; - bodySpaceName: string; - faceSpaceName: string; - position: { - lat: number; - lng: number; - }; - solutionId?: string; - [index: string]: any; -} -export interface ImageModalDataProps { - targetData: BigImageData[]; - compactData: BigImageData[]; -} -export interface ModalAdapterConfigProps { - oldMode?: boolean; -} -/** - * 大图组件适配器,兼容老接口 - * @param Cmp 大图组件 - * @param config 额外配置 - * @returns 大图组件 - */ -declare const adapter: (Cmp: any, config: ModalAdapterConfigProps) => any; -export default adapter; diff --git a/packages/biz/es/BigImageModal/util/bigImageModalAdapter.js b/packages/biz/es/BigImageModal/util/bigImageModalAdapter.js deleted file mode 100644 index bad3d69..0000000 --- a/packages/biz/es/BigImageModal/util/bigImageModalAdapter.js +++ /dev/null @@ -1,50 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -/** - * 适配老的大屏组件数据格式传入 - */ -import React from 'react'; - -/** - * 描述列表 description - */ - -/** - * 工具栏 - */ - -/** - * 兼容老数据格式 - * @param _data 老数据格式 - * @returns newData - */ -var translateOldImageData = function translateOldImageData(_data) { - return _objectSpread(_objectSpread({}, _data), {}, { - open: _data.visible, - onCancel: _data.onClose - }); -}; - -/** - * 大图组件适配器,兼容老接口 - * @param Cmp 大图组件 - * @param config 额外配置 - * @returns 大图组件 - */ -var adapter = function adapter(Cmp, config) { - var _config$oldMode = config.oldMode, - oldMode = _config$oldMode === void 0 ? false : _config$oldMode; - return function (props) { - var newProps = oldMode ? translateOldImageData(props) : props; - console.log('adapter----适配数据', props, newProps); - - // 该属性已经废弃 - delete newProps.visible; - return /*#__PURE__*/React.createElement(Cmp, newProps); - }; -}; -export default adapter; \ No newline at end of file diff --git a/packages/biz/es/Demo/index.d.ts b/packages/biz/es/Demo/index.d.ts deleted file mode 100644 index bcc157c..0000000 --- a/packages/biz/es/Demo/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; -declare const _default: () => React.JSX.Element; -export default _default; diff --git a/packages/biz/es/Demo/index.js b/packages/biz/es/Demo/index.js deleted file mode 100644 index b877d8a..0000000 --- a/packages/biz/es/Demo/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Button } from '@zhst/meta'; -import { useThrottleFn } from '@zhst/hooks'; -export default (function () { - var _useThrottleFn = useThrottleFn(function () { - return console.log('123'); - }), - run = _useThrottleFn.run; - return /*#__PURE__*/React.createElement(Button, { - onClick: function onClick() { - return run(); - } - }, "\u6D4B\u8BD5"); -}); \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/RealTimeMonitor.d.ts b/packages/biz/es/RealTimeMonitor/RealTimeMonitor.d.ts deleted file mode 100644 index a3f147f..0000000 --- a/packages/biz/es/RealTimeMonitor/RealTimeMonitor.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { IRecord, VideoPlayerCardProps, ViewLargerImageModalRef } from '@zhst/biz'; -interface RealTimeMonitorProps { - videoDataSource?: VideoPlayerCardProps[]; - handleWindowClick?: (key?: string) => void; - handleCloseButtonClick?: (key?: string) => void; - selectedWindowKey?: string; - warningDataSource?: IRecord[]; - viewLargerImageModalRef?: React.RefObject; - handleDownloadImg?: (imgSrc?: string) => void; - onRecordClick?: (record?: IRecord) => void; - selectedRecordId?: string; - isRecordListLoading?: boolean; - recordListTitle?: string; - style?: React.CSSProperties; - cardStyle?: React.CSSProperties; - imgStyle?: React.CSSProperties; - largeImageTitle?: string; -} -export declare const RealTimeMonitor: React.FC; -export default RealTimeMonitor; diff --git a/packages/biz/es/RealTimeMonitor/RealTimeMonitor.js b/packages/biz/es/RealTimeMonitor/RealTimeMonitor.js deleted file mode 100644 index b11561c..0000000 --- a/packages/biz/es/RealTimeMonitor/RealTimeMonitor.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import WindowToggle from "./components/WindowToggle"; -import WarningRecordList from "./components/WarningRecordList"; -export var RealTimeMonitor = function RealTimeMonitor(props) { - var videoDataSource = props.videoDataSource, - handleWindowClick = props.handleWindowClick, - handleCloseButtonClick = props.handleCloseButtonClick, - selectedWindowKey = props.selectedWindowKey, - warningDataSource = props.warningDataSource, - viewLargerImageModalRef = props.viewLargerImageModalRef, - handleDownloadImg = props.handleDownloadImg, - onRecordClick = props.onRecordClick, - selectedRecordId = props.selectedRecordId, - isRecordListLoading = props.isRecordListLoading; - return /*#__PURE__*/React.createElement("div", { - className: "zhst-biz-real-time-monitor", - style: { - display: 'flex' - } - }, /*#__PURE__*/React.createElement(WindowToggle, { - selectedWindowKey: selectedWindowKey, - dataSource: videoDataSource, - handleWindowClick: handleWindowClick, - handleCloseButtonClick: handleCloseButtonClick - }), /*#__PURE__*/React.createElement(WarningRecordList, { - dataSource: warningDataSource, - handleDownloadImg: handleDownloadImg, - onRecordClick: onRecordClick, - selectedRecordId: selectedRecordId, - viewLargerImageModalRef: viewLargerImageModalRef, - isRecordListLoading: isRecordListLoading, - recordListTitle: "\u76D1\u63A7\u9884\u8B66\u8BB0\u5F55" - })); -}; -export default RealTimeMonitor; \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/WarningRecordList.d.ts b/packages/biz/es/RealTimeMonitor/components/WarningRecordList/WarningRecordList.d.ts deleted file mode 100644 index 6489299..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/WarningRecordList.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { IRecord, ViewLargerImageModalRef } from '@zhst/biz'; -import "./index.less"; -interface WarningRecordListProps { - dataSource?: IRecord[]; - viewLargerImageModalRef?: React.RefObject; - handleDownloadImg?: (imgSrc?: string) => void; - onRecordClick?: (record?: IRecord) => void; - selectedRecordId?: string; - isRecordListLoading?: boolean; - recordListTitle?: string; - style?: React.CSSProperties; - cardStyle?: React.CSSProperties; - imgStyle?: React.CSSProperties; - largeImageTitle?: string; -} -declare const WarningRecordList: React.FC; -export default WarningRecordList; diff --git a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/WarningRecordList.js b/packages/biz/es/RealTimeMonitor/components/WarningRecordList/WarningRecordList.js deleted file mode 100644 index 5715506..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/WarningRecordList.js +++ /dev/null @@ -1,81 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -import React from 'react'; -import { ViewLargerImageModal, WarningRecordCard } from '@zhst/biz'; -import { Empty, Space, Spin } from 'antd'; -import "./index.less"; -import { LoadingOutlined } from '@ant-design/icons'; -var WarningRecordList = function WarningRecordList(props) { - var _props$dataSource = props.dataSource, - dataSource = _props$dataSource === void 0 ? [] : _props$dataSource, - viewLargerImageModalRef = props.viewLargerImageModalRef, - selectedRecordId = props.selectedRecordId, - handleDownloadImg = props.handleDownloadImg, - _onRecordClick = props.onRecordClick, - isRecordListLoading = props.isRecordListLoading, - recordListTitle = props.recordListTitle, - style = props.style, - cardStyle = props.cardStyle, - imgStyle = props.imgStyle, - largeImageTitle = props.largeImageTitle; - return /*#__PURE__*/React.createElement("div", { - className: "zhst-biz-warning-record-list", - style: style - }, /*#__PURE__*/React.createElement("div", { - className: "header" - }, recordListTitle), /*#__PURE__*/React.createElement("div", { - className: "body" - }, isRecordListLoading ? /*#__PURE__*/React.createElement("div", { - style: { - height: '100%', - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - } - }, /*#__PURE__*/React.createElement(Spin, { - indicator: /*#__PURE__*/React.createElement(LoadingOutlined, { - style: { - fontSize: 24 - } - }) - })) : (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 ? /*#__PURE__*/React.createElement(Space, { - direction: "vertical", - size: 10 - }, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (record, index) { - if (index > 2) return; - return /*#__PURE__*/React.createElement(WarningRecordCard, { - key: record === null || record === void 0 ? void 0 : record.id, - record: record, - onRecordClick: function onRecordClick(record) { - _onRecordClick === null || _onRecordClick === void 0 || _onRecordClick(record); - }, - selectedRecordId: selectedRecordId, - cardStyle: _objectSpread({ - width: 300, - height: 264 - }, cardStyle), - imgStyle: _objectSpread({ - width: 280, - height: 169 - }, imgStyle) - }); - })) : /*#__PURE__*/React.createElement("div", { - style: { - height: '100%', - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - } - }, /*#__PURE__*/React.createElement(Empty, { - description: "\u6682\u65E0\u6570\u636E" - }))), /*#__PURE__*/React.createElement(ViewLargerImageModal, { - ref: viewLargerImageModalRef, - downloadImg: handleDownloadImg, - title: largeImageTitle - })); -}; -export default WarningRecordList; \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.d.ts b/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.d.ts deleted file mode 100644 index b50da75..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import WarningRecordList from './WarningRecordList'; -export default WarningRecordList; diff --git a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.js b/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.js deleted file mode 100644 index 6e69d61..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import WarningRecordList from "./WarningRecordList"; -export default WarningRecordList; \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.less b/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.less deleted file mode 100644 index e348f82..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WarningRecordList/index.less +++ /dev/null @@ -1,20 +0,0 @@ -.zhst-biz-warning-record-list { - display: flex; - flex-direction: column; - border-left: solid 1px #00000026; - width: 320px; - - .header { - width: 100%; - height: 48px; - background-color: #EFF2F4; - padding: 10px 20px; - box-sizing: border-box; - } - - .body { - padding: 10px; - overflow: hidden; - flex: 1; - } -} \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/components/WindowToggle/WindowToggle.d.ts b/packages/biz/es/RealTimeMonitor/components/WindowToggle/WindowToggle.d.ts deleted file mode 100644 index c67b407..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WindowToggle/WindowToggle.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { VideoPlayerCardProps } from '@zhst/biz'; -import './index.less'; -interface WindowToggleProps { - dataSource?: VideoPlayerCardProps[]; - handleWindowClick?: (key?: string) => void; - handleCloseButtonClick?: (key?: string) => void; - selectedWindowKey?: string; -} -export declare const WindowToggle: React.FC; -export default WindowToggle; diff --git a/packages/biz/es/RealTimeMonitor/components/WindowToggle/WindowToggle.js b/packages/biz/es/RealTimeMonitor/components/WindowToggle/WindowToggle.js deleted file mode 100644 index d9efe21..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WindowToggle/WindowToggle.js +++ /dev/null @@ -1,81 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useState } from 'react'; -import { Segmented } from 'antd'; -import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons'; -import { VideoPlayerCard } from '@zhst/biz'; -import "./index.less"; -import { theme } from 'antd/lib'; -export var WindowToggle = function WindowToggle(props) { - var _props$dataSource = props.dataSource, - dataSource = _props$dataSource === void 0 ? [] : _props$dataSource, - handleWindowClick = props.handleWindowClick, - handleCloseButtonClick = props.handleCloseButtonClick, - selectedWindowKey = props.selectedWindowKey; - var _useState = useState("large"), - _useState2 = _slicedToArray(_useState, 2), - size = _useState2[0], - setSize = _useState2[1]; - var useToken = theme.useToken; - var _useToken = useToken(), - token = _useToken.token; - var getLabelStyle = function getLabelStyle(isSelected) { - return _objectSpread({ - padding: "0 11px", - background: "#fff" - }, isSelected ? { - background: token.colorPrimary, - color: '#fff' - } : {}); - }; - return /*#__PURE__*/React.createElement("div", { - className: "zhst-biz-window-toggle" - }, /*#__PURE__*/React.createElement("div", { - className: "header" - }, /*#__PURE__*/React.createElement(Segmented, { - defaultValue: "large", - options: [{ - value: 'large', - label: /*#__PURE__*/React.createElement("div", { - style: getLabelStyle(size === 'large') - }, /*#__PURE__*/React.createElement(BarsOutlined, null)) - }, { - value: 'small', - label: /*#__PURE__*/React.createElement("div", { - style: getLabelStyle(size === 'small') - }, /*#__PURE__*/React.createElement(AppstoreOutlined, null)) - }], - onChange: function onChange(value) { - // 当一个窗口时 默认 selectedkey 第一条数据的 windowkey - if (value === 'large' && dataSource.length > 0) { - var windowKey = dataSource[0].windowKey; - handleWindowClick === null || handleWindowClick === void 0 || handleWindowClick(windowKey); - } - setSize(value); - } - })), /*#__PURE__*/React.createElement("div", { - className: "body" - }, dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item, index) { - if (size === "large" && index > 0) return; - return /*#__PURE__*/React.createElement(VideoPlayerCard, _extends({ - key: item.windowKey, - selectedWindowKey: selectedWindowKey, - size: size - }, item, { - handleWindowClick: handleWindowClick, - handleCloseButtonClick: handleCloseButtonClick - })); - }))); -}; -export default WindowToggle; \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.d.ts b/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.d.ts deleted file mode 100644 index 3b57a45..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import WindowToggle from './WindowToggle'; -export default WindowToggle; diff --git a/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.js b/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.js deleted file mode 100644 index 2f4ac13..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import WindowToggle from "./WindowToggle"; -export default WindowToggle; \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.less b/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.less deleted file mode 100644 index 61c77bd..0000000 --- a/packages/biz/es/RealTimeMonitor/components/WindowToggle/index.less +++ /dev/null @@ -1,45 +0,0 @@ -.zhst-biz-window-toggle { - display: flex; - flex-direction: column; - flex: 1; - - .header { - width: 100%; - height: 48px; - background-color: #EFF2F4; - padding: 10px 20px; - box-sizing: border-box; - - .ant-segmented { - padding: 0; - - .ant-segmented-group { - border-radius: 4px; - overflow: hidden; - - .ant-segmented-item { - border-radius: 0; - - .ant-segmented-item-label { - padding: 0; - } - } - } - } - } - - .body { - flex: 1; - width: 100%; - background-color: #E5EAEC; - padding: 10px; - box-sizing: border-box; - display: flex; - flex-wrap: wrap; - justify-content: space-between; - - >div { - margin: 10px; - } - } -} \ No newline at end of file diff --git a/packages/biz/es/RealTimeMonitor/index.d.ts b/packages/biz/es/RealTimeMonitor/index.d.ts deleted file mode 100644 index 9013d29..0000000 --- a/packages/biz/es/RealTimeMonitor/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import RealTimeMonitor from './RealTimeMonitor'; -export default RealTimeMonitor; diff --git a/packages/biz/es/RealTimeMonitor/index.js b/packages/biz/es/RealTimeMonitor/index.js deleted file mode 100644 index 80b2a3c..0000000 --- a/packages/biz/es/RealTimeMonitor/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import RealTimeMonitor from "./RealTimeMonitor"; -export default RealTimeMonitor; \ No newline at end of file diff --git a/packages/biz/es/VideoPlayerCard/VideoPlayerCard.d.ts b/packages/biz/es/VideoPlayerCard/VideoPlayerCard.d.ts deleted file mode 100644 index cd1775e..0000000 --- a/packages/biz/es/VideoPlayerCard/VideoPlayerCard.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CardProps } from 'antd'; -import React, { ReactNode } from 'react'; -import './index.less'; -export interface VideoPlayerCardProps { - windowKey?: string; - selectedWindowKey?: string; - showType?: 'video' | "image"; - imgSrc?: string; - videoSrc?: string; - cardProps?: CardProps; - errorReasonText?: string; - isWindowLoading?: boolean; - size?: 'large' | 'small'; - title?: string | ReactNode; - handleCloseButtonClick?: (key?: string) => void; - handleWindowClick?: (key?: string) => void; -} -export declare const VideoPlayerCard: React.FC; -export default VideoPlayerCard; diff --git a/packages/biz/es/VideoPlayerCard/VideoPlayerCard.js b/packages/biz/es/VideoPlayerCard/VideoPlayerCard.js deleted file mode 100644 index e4daf93..0000000 --- a/packages/biz/es/VideoPlayerCard/VideoPlayerCard.js +++ /dev/null @@ -1,140 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import { Card, Space, Spin, Button } from 'antd'; -import { theme } from 'antd/lib'; -import { VideoPlayer } from '@zhst/meta'; -import React, { useState, useEffect, useRef } from 'react'; -import { CloseOutlined, LoadingOutlined } from '@ant-design/icons'; -import "./index.less"; -export var VideoPlayerCard = function VideoPlayerCard(props) { - var componentName = "zhst-biz-video-player-card"; - var showType = props.showType, - imgSrc = props.imgSrc, - videoSrc = props.videoSrc, - cardProps = props.cardProps, - isWindowLoading = props.isWindowLoading, - errorReasonText = props.errorReasonText, - size = props.size, - title = props.title, - handleCloseButtonClick = props.handleCloseButtonClick, - handleWindowClick = props.handleWindowClick, - windowKey = props.windowKey, - _props$selectedWindow = props.selectedWindowKey, - selectedWindowKey = _props$selectedWindow === void 0 ? '' : _props$selectedWindow; - var _useState = useState(null), - _useState2 = _slicedToArray(_useState, 2), - cardContent = _useState2[0], - setCardContent = _useState2[1]; - var useToken = theme.useToken; - var _useToken = useToken(), - token = _useToken.token; - var videoRef = useRef(null); - var selectedBorderStyle = { - border: "2px solid ".concat(token.colorPrimary), - boxShadow: " 0px 2px 9px 0px rgba(0,0,0,0.16)" - }; - var cardStyle = _objectSpread(_objectSpread({}, size === 'large' ? { - height: 931 - } : { - height: 456, - cursor: 'pointer' - }), size === 'small' && selectedWindowKey === windowKey ? selectedBorderStyle : {}); - var videoPlayerCardStyle = size === 'small' ? { - width: "calc(50% - 20px)" - } : { - flex: 1 - }; - useEffect(function () { - if (!isWindowLoading && (videoSrc || imgSrc)) { - var contentElement = null; - if (videoSrc) { - var _videoRef$current; - contentElement = /*#__PURE__*/React.createElement(VideoPlayer, { - ref: videoRef, - url: videoSrc - }); - (_videoRef$current = videoRef.current) === null || _videoRef$current === void 0 || _videoRef$current.setShowCrop(true); - } else if (imgSrc) { - contentElement = /*#__PURE__*/React.createElement("img", { - alt: "\u9996\u5E27\u56FE", - src: imgSrc, - style: { - width: "100%", - height: "100%", - display: 'block' - } - }); - } - setCardContent(contentElement); - } else { - setCardContent(null); - } - }, [showType, imgSrc, videoSrc, isWindowLoading]); - return /*#__PURE__*/React.createElement("div", { - className: componentName, - onClick: function onClick() { - handleWindowClick === null || handleWindowClick === void 0 || handleWindowClick(windowKey); - }, - style: videoPlayerCardStyle - }, /*#__PURE__*/React.createElement(Card, _extends({ - title: /*#__PURE__*/React.createElement(Space, { - style: { - width: "100%", - justifyContent: "space-between" - } - }, /*#__PURE__*/React.createElement("div", null, title), /*#__PURE__*/React.createElement("div", { - className: "card-close-button" - }, /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick() { - handleCloseButtonClick === null || handleCloseButtonClick === void 0 || handleCloseButtonClick(windowKey); - } - }, /*#__PURE__*/React.createElement(CloseOutlined, null)))), - style: _objectSpread({ - display: "flex", - flexDirection: "column", - borderRadius: 4, - overflow: "hidden" - }, cardStyle), - bodyStyle: { - flex: 1 - } - }, cardProps), cardContent ? /*#__PURE__*/React.createElement(React.Fragment, null, cardContent) : /*#__PURE__*/React.createElement("div", { - style: { - backgroundColor: '#000', - height: '100%', - display: 'flex', - padding: '20px', - boxSizing: 'border-box' - } - }, isWindowLoading ? /*#__PURE__*/React.createElement("div", { - style: { - flex: 1, - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - } - }, /*#__PURE__*/React.createElement(Spin, { - indicator: /*#__PURE__*/React.createElement(LoadingOutlined, { - style: { - fontSize: 24 - } - }) - })) : !!errorReasonText && /*#__PURE__*/React.createElement("span", { - style: { - color: token.colorError - } - }, errorReasonText)))); -}; -export default VideoPlayerCard; \ No newline at end of file diff --git a/packages/biz/es/VideoPlayerCard/index.d.ts b/packages/biz/es/VideoPlayerCard/index.d.ts deleted file mode 100644 index 41afa58..0000000 --- a/packages/biz/es/VideoPlayerCard/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import VideoPlayerCard from './VideoPlayerCard'; -export type { VideoPlayerCardProps } from './VideoPlayerCard'; -export default VideoPlayerCard; diff --git a/packages/biz/es/VideoPlayerCard/index.js b/packages/biz/es/VideoPlayerCard/index.js deleted file mode 100644 index 4cb8f05..0000000 --- a/packages/biz/es/VideoPlayerCard/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import VideoPlayerCard from "./VideoPlayerCard"; -export default VideoPlayerCard; \ No newline at end of file diff --git a/packages/biz/es/VideoPlayerCard/index.less b/packages/biz/es/VideoPlayerCard/index.less deleted file mode 100644 index 0f87e3e..0000000 --- a/packages/biz/es/VideoPlayerCard/index.less +++ /dev/null @@ -1,30 +0,0 @@ -.zhst-biz-video-player-card { - .ant-card-head { - padding: 0 20px; - } - - .ant-card-body { - padding: 0; - overflow: hidden; - border-radius: 0; - - .zhst-image__video-view { - height: 100%; - } - } - - .card-close-button { - .ant-btn { - padding: 0 3px; - height: 22px; - color: #00000073; - } - - .ant-btn:hover { - padding: 0 3px; - height: 22px; - color: #000000e0; - } - } - -} \ No newline at end of file diff --git a/packages/biz/es/ViewLargerImageModal/ViewLargerImageModal.d.ts b/packages/biz/es/ViewLargerImageModal/ViewLargerImageModal.d.ts deleted file mode 100644 index d82a52e..0000000 --- a/packages/biz/es/ViewLargerImageModal/ViewLargerImageModal.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { ModalProps, SpaceProps } from 'antd'; -import './index.less'; -type ViewLargerImageModalParams = { - imgSrc?: string; - warningData?: { - label?: string; - value?: string; - }[]; -}; -export interface ViewLargerImageModalRef { - show: (params?: ViewLargerImageModalParams) => void; - handleCancel: () => void; -} -export interface ViewLargerImageModalProps { - imgStyle?: React.CSSProperties; - downloadImg?: (imgSrc?: string) => void; - title?: string; - downloadText?: string; - modalProps?: ModalProps; - spaceProps?: SpaceProps; -} -export declare const ViewLargerImageModal: React.ForwardRefExoticComponent>; -export default ViewLargerImageModal; -export declare const useViewLargerImageModal: () => React.RefObject; diff --git a/packages/biz/es/ViewLargerImageModal/ViewLargerImageModal.js b/packages/biz/es/ViewLargerImageModal/ViewLargerImageModal.js deleted file mode 100644 index 07638be..0000000 --- a/packages/biz/es/ViewLargerImageModal/ViewLargerImageModal.js +++ /dev/null @@ -1,106 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useImperativeHandle, useRef, useState, forwardRef } from 'react'; -import { Modal, Space } from 'antd'; -import theme from 'antd/lib/theme'; -import { DownloadOutlined } from '@ant-design/icons'; -import "./index.less"; -export var ViewLargerImageModal = /*#__PURE__*/forwardRef(function (props, ref) { - var modalProps = props.modalProps, - downloadImg = props.downloadImg, - imgStyle = props.imgStyle, - _props$title = props.title, - title = _props$title === void 0 ? '预警大图' : _props$title, - _props$downloadText = props.downloadText, - downloadText = _props$downloadText === void 0 ? '下载大图' : _props$downloadText, - spaceProps = props.spaceProps; - var useToken = theme.useToken; - var _useToken = useToken(), - token = _useToken.token; - var _useState = useState(false), - _useState2 = _slicedToArray(_useState, 2), - open = _useState2[0], - setOpen = _useState2[1]; - var _useState3 = useState(), - _useState4 = _slicedToArray(_useState3, 2), - imgSrc = _useState4[0], - setImgSrc = _useState4[1]; - var _useState5 = useState(), - _useState6 = _slicedToArray(_useState5, 2), - warningData = _useState6[0], - setWarningData = _useState6[1]; - var handleCancel = function handleCancel() { - setOpen(false); - }; - useImperativeHandle(ref, function () { - return { - show: function show(_params) { - setOpen(true); - setImgSrc(_params === null || _params === void 0 ? void 0 : _params.imgSrc); - setWarningData(_params === null || _params === void 0 ? void 0 : _params.warningData); - }, - handleCancel: handleCancel - }; - }); - return /*#__PURE__*/React.createElement(Modal, _extends({ - className: "zhst-biz-view-warning-larger-image-modal", - open: open, - destroyOnClose: true, - title: title, - width: "1029px", - footer: null, - onCancel: handleCancel - }, modalProps), /*#__PURE__*/React.createElement(Space, _extends({ - size: 0, - styles: { - item: { - backgroundColor: '#F6F9FAFF' - } - } - }, spaceProps), /*#__PURE__*/React.createElement("img", { - alt: title, - src: imgSrc, - style: _objectSpread({ - width: 789, - height: 444, - display: 'block' - }, imgStyle) - }), /*#__PURE__*/React.createElement("div", { - className: "right-context" - }, warningData === null || warningData === void 0 ? void 0 : warningData.map(function (_ref) { - var label = _ref.label, - value = _ref.value; - return /*#__PURE__*/React.createElement("div", { - key: label - }, /*#__PURE__*/React.createElement("span", { - className: "context-key" - }, "".concat(label, ": ")), value); - }), imgSrc && downloadImg && /*#__PURE__*/React.createElement("div", { - className: "img-download", - style: { - color: token.colorPrimary - }, - onClick: function onClick() { - return downloadImg === null || downloadImg === void 0 ? void 0 : downloadImg(imgSrc); - } - }, /*#__PURE__*/React.createElement(DownloadOutlined, null), /*#__PURE__*/React.createElement("span", { - style: { - paddingLeft: 3 - } - }, downloadText))))); -}); -export default ViewLargerImageModal; -export var useViewLargerImageModal = function useViewLargerImageModal() { - return useRef(null); -}; \ No newline at end of file diff --git a/packages/biz/es/ViewLargerImageModal/index.d.ts b/packages/biz/es/ViewLargerImageModal/index.d.ts deleted file mode 100644 index 417e8be..0000000 --- a/packages/biz/es/ViewLargerImageModal/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import ViewLargerImageModal, { useViewLargerImageModal } from './ViewLargerImageModal'; -export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal'; -export default ViewLargerImageModal; -export { useViewLargerImageModal }; diff --git a/packages/biz/es/ViewLargerImageModal/index.js b/packages/biz/es/ViewLargerImageModal/index.js deleted file mode 100644 index baa9ea1..0000000 --- a/packages/biz/es/ViewLargerImageModal/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import ViewLargerImageModal, { useViewLargerImageModal } from "./ViewLargerImageModal"; -export default ViewLargerImageModal; -export { useViewLargerImageModal }; \ No newline at end of file diff --git a/packages/biz/es/ViewLargerImageModal/index.less b/packages/biz/es/ViewLargerImageModal/index.less deleted file mode 100644 index 32363d0..0000000 --- a/packages/biz/es/ViewLargerImageModal/index.less +++ /dev/null @@ -1,62 +0,0 @@ -.zhst-biz-view-warning-larger-image-modal { - font-family: MicrosoftYaHei; - - .ant-modal-content { - padding: 0; - height: 492px; - border-radius: 6px; - overflow: hidden; - - .ant-modal-close { - top: 14px; - right: 16px; - } - - .ant-modal-header { - height: 48px; - line-height: 48px; - margin-bottom: 0; - - .ant-modal-title { - height: 100%; - line-height: 48px; - font-weight: bold; - padding-left: 20px; - } - } - - .ant-modal-body { - height: 444px; - - >div { - width: 100%; - height: 100%; - align-items: flex-start; - - >div:nth-child(2) { - position: relative; - flex: 1; - box-sizing: border-box; - height: 100%; - padding: 30px 16px; - - .right-context>div { - margin-bottom: 20px; - } - - .right-context .context-key { - font-weight: bold; - } - - .img-download { - position: absolute; - bottom: 0; - cursor: pointer; - } - - } - - } - } - } -} \ No newline at end of file diff --git a/packages/biz/es/WarningRecordCard/WarningRecordCard.d.ts b/packages/biz/es/WarningRecordCard/WarningRecordCard.d.ts deleted file mode 100644 index 966998b..0000000 --- a/packages/biz/es/WarningRecordCard/WarningRecordCard.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { CardProps } from 'antd'; -import React from 'react'; -import './index.less'; -export interface IRecord { - imgSrc?: string; - id?: string; - /** - * 预警类型 - */ - warningType?: string; - warningInfo?: string[]; - boxId: string; - position: string; - cabietId?: string; - cabietText?: string; - warningTime?: string; - warningTimestamp?: string | number; - warningTimeFormat?: string; -} -export interface WarningRecordCardProps { - record?: IRecord; - onRecordClick?: (record?: IRecord) => void; - style?: React.CSSProperties; - cardProps?: CardProps; - selectedRecordId?: string; - cardStyle?: React.CSSProperties; - imgStyle?: React.CSSProperties; -} -export declare const WarningRecordCard: React.FC; -export default WarningRecordCard; diff --git a/packages/biz/es/WarningRecordCard/WarningRecordCard.js b/packages/biz/es/WarningRecordCard/WarningRecordCard.js deleted file mode 100644 index 20a6f82..0000000 --- a/packages/biz/es/WarningRecordCard/WarningRecordCard.js +++ /dev/null @@ -1,89 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -import { Card, Space, Divider } from 'antd'; -import { theme } from 'antd/lib'; -import React from 'react'; -import dayjs from 'dayjs'; -import "./index.less"; -; -; -export var WarningRecordCard = function WarningRecordCard(props) { - var componentName = "zhst-biz-warning-record-card"; - var record = props.record, - onRecordClick = props.onRecordClick, - style = props.style, - cardProps = props.cardProps, - selectedRecordId = props.selectedRecordId, - cardStyle = props.cardStyle, - imgStyle = props.imgStyle; - var _ref = record || {}, - imgSrc = _ref.imgSrc, - id = _ref.id, - warningType = _ref.warningType, - _ref$warningInfo = _ref.warningInfo, - warningInfo = _ref$warningInfo === void 0 ? [] : _ref$warningInfo, - cabietText = _ref.cabietText, - warningTime = _ref.warningTime, - warningTimestamp = _ref.warningTimestamp, - _ref$warningTimeForma = _ref.warningTimeFormat, - warningTimeFormat = _ref$warningTimeForma === void 0 ? 'YYYY-MM-DD HH:mm:ss' : _ref$warningTimeForma; - var formattedDate = warningTimestamp ? dayjs(warningTimestamp).format(warningTimeFormat) : ''; - var warningTimeShow = warningTime ? warningTime : formattedDate; - var useToken = theme.useToken; - var _useToken = useToken(), - token = _useToken.token; - var selectedBorderStyle = { - border: "2px solid ".concat(token.colorPrimary), - boxShadow: " 0px 2px 9px 0px rgba(0,0,0,0.16)" - }; - var selectedCardStyle = _objectSpread({}, selectedRecordId === (record === null || record === void 0 ? void 0 : record.id) ? selectedBorderStyle : {}); - var handleClick = function handleClick() { - onRecordClick === null || onRecordClick === void 0 || onRecordClick(record); - }; - return /*#__PURE__*/React.createElement("div", { - className: componentName, - key: id, - onClick: handleClick, - style: style - }, /*#__PURE__*/React.createElement(Card, _extends({ - cover: /*#__PURE__*/React.createElement("img", { - alt: "\u9884\u8B66\u56FE", - src: imgSrc, - style: _objectSpread({ - width: 336, - height: 203, - borderRadius: 0 - }, imgStyle) - }), - style: _objectSpread(_objectSpread({ - width: 356, - height: 302, - padding: 10, - borderRadius: 4 - }, selectedCardStyle), cardStyle) - }, cardProps), /*#__PURE__*/React.createElement("div", { - className: "left-context" - }, /*#__PURE__*/React.createElement("div", { - className: "warning-type" - }, warningType), /*#__PURE__*/React.createElement(Space, { - size: 0, - split: /*#__PURE__*/React.createElement(Divider, { - type: "vertical" - }) - }, warningInfo === null || warningInfo === void 0 ? void 0 : warningInfo.map(function (item, index) { - return /*#__PURE__*/React.createElement("div", { - key: index, - className: "info-item" - }, item); - })), /*#__PURE__*/React.createElement("div", { - className: "warning-time" - }, warningTimeShow)), /*#__PURE__*/React.createElement("div", { - className: "cabietInfo" - }, cabietText))); -}; -export default WarningRecordCard; \ No newline at end of file diff --git a/packages/biz/es/WarningRecordCard/index.d.ts b/packages/biz/es/WarningRecordCard/index.d.ts deleted file mode 100644 index 8b82d36..0000000 --- a/packages/biz/es/WarningRecordCard/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import WarningRecordCard from './WarningRecordCard'; -export type { IRecord, WarningRecordCardProps } from './WarningRecordCard'; -export default WarningRecordCard; diff --git a/packages/biz/es/WarningRecordCard/index.js b/packages/biz/es/WarningRecordCard/index.js deleted file mode 100644 index 36c3c58..0000000 --- a/packages/biz/es/WarningRecordCard/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import WarningRecordCard from "./WarningRecordCard"; -export default WarningRecordCard; \ No newline at end of file diff --git a/packages/biz/es/WarningRecordCard/index.less b/packages/biz/es/WarningRecordCard/index.less deleted file mode 100644 index 7cfba38..0000000 --- a/packages/biz/es/WarningRecordCard/index.less +++ /dev/null @@ -1,27 +0,0 @@ -.zhst-biz-warning-record-card { - cursor: pointer; - - .ant-card-body { - padding: 0; - font-family: MicrosoftYaHei; - line-height: 19px; - display: flex; - margin-top: 10px; - - .left-context { - flex: 1; - - >div { - margin-top: 6px; - } - - >div:nth-child(1) { - margin-top: 0; - } - } - - .warning-type { - font-weight: bold; - } - } -} \ No newline at end of file diff --git a/packages/biz/es/boxSelectTree/boxSelectTree.d.ts b/packages/biz/es/boxSelectTree/boxSelectTree.d.ts deleted file mode 100644 index 0690e8f..0000000 --- a/packages/biz/es/boxSelectTree/boxSelectTree.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { FC } from 'react'; -import { TabsProps } from 'antd'; -import type { BoxPanelProps } from './components/boxPanel'; -export interface BoxSelectTreeProps extends BoxPanelProps { - onTabChange?: (e: any) => void; - tabsProps?: TabsProps; -} -declare const BoxSelectTree: FC; -export default BoxSelectTree; diff --git a/packages/biz/es/boxSelectTree/boxSelectTree.js b/packages/biz/es/boxSelectTree/boxSelectTree.js deleted file mode 100644 index a08972a..0000000 --- a/packages/biz/es/boxSelectTree/boxSelectTree.js +++ /dev/null @@ -1,92 +0,0 @@ -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -import React from 'react'; -import { Tabs } from 'antd'; -import BoxPanel from "./components/boxPanel"; -var BoxSelectTree = function BoxSelectTree(props) { - var data = props.data, - _props$boxDataSource = props.boxDataSource, - boxDataSource = _props$boxDataSource === void 0 ? [] : _props$boxDataSource, - onTabChange = props.onTabChange, - onSearch = props.onSearch, - onItemCheck = props.onItemCheck, - onItemSelect = props.onItemSelect, - onBoxBatchDelete = props.onBoxBatchDelete, - onBoxDelete = props.onBoxDelete, - onCreateSubmit = props.onCreateSubmit, - onClockClick = props.onClockClick, - onImport = props.onImport, - onCreate = props.onCreate, - tabsProps = props.tabsProps, - searchInputProps = props.searchInputProps, - treeProps = props.treeProps, - customImport = props.customImport, - showOptions = props.showOptions, - extraBtns = props.extraBtns; - var items = [{ - key: '1', - label: /*#__PURE__*/React.createElement("div", { - style: { - textAlign: 'center', - width: '160px' - } - }, "\u76D2\u5B50\u7EC4"), - children: /*#__PURE__*/React.createElement(BoxPanel, { - searchInputProps: searchInputProps, - boxDataSource: boxDataSource, - treeProps: treeProps, - data: data, - onCreate: onCreate, - onCreateSubmit: onCreateSubmit, - onBoxBatchDelete: onBoxBatchDelete, - onBoxDelete: onBoxDelete, - onSearch: onSearch, - onItemCheck: onItemCheck, - onItemSelect: onItemSelect, - showOptions: showOptions, - customImport: customImport, - extraBtns: extraBtns, - onClockClick: onClockClick, - onImport: onImport - }) - }, { - key: '2', - label: /*#__PURE__*/React.createElement("div", { - style: { - textAlign: 'center', - width: '160px' - } - }, "\u76D2\u5B50"), - children: /*#__PURE__*/React.createElement(BoxPanel, { - boxDataSource: boxDataSource, - searchInputProps: searchInputProps, - treeProps: treeProps, - data: data, - onCreate: onCreate, - onBoxBatchDelete: onBoxBatchDelete, - onCreateSubmit: onCreateSubmit, - onBoxDelete: onBoxDelete, - onSearch: onSearch, - onItemCheck: onItemCheck, - onItemSelect: onItemSelect, - showOptions: showOptions, - customImport: customImport, - extraBtns: extraBtns, - onClockClick: onClockClick, - onImport: onImport - }) - }]; - return /*#__PURE__*/React.createElement(Tabs, _extends({ - defaultActiveKey: "1", - centered: true, - items: items, - onChange: onTabChange, - tabBarGutter: 0, - indicator: { - size: function size(origin) { - return origin; - }, - align: 'center' - } - }, tabsProps)); -}; -export default BoxSelectTree; \ No newline at end of file diff --git a/packages/biz/es/boxSelectTree/components/boxPanel/index.js b/packages/biz/es/boxSelectTree/components/boxPanel/index.js deleted file mode 100644 index fa2318c..0000000 --- a/packages/biz/es/boxSelectTree/components/boxPanel/index.js +++ /dev/null @@ -1,290 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useState, useRef } from 'react'; -import { Button, Divider, Input, Space } from 'antd'; -import { ModalForm, ProFormText } from '@ant-design/pro-components'; -import { ClockCircleOutlined, CloseCircleOutlined, DiffOutlined, FolderAddOutlined, ImportOutlined, SwitcherOutlined } from '@ant-design/icons'; -import TreeTransferModal from "../../../treeTransferModal"; -import BoxTree from "../../../tree"; -var BoxPanel = function BoxPanel(props) { - var _createFormRef$curren4, _treeProps$checkedKey; - var searchInputProps = props.searchInputProps, - _props$showOptions = props.showOptions, - showOptions = _props$showOptions === void 0 ? true : _props$showOptions, - extraBtns = props.extraBtns, - _props$data = props.data, - data = _props$data === void 0 ? [] : _props$data, - onSearch = props.onSearch, - treeProps = props.treeProps, - onItemCheck = props.onItemCheck, - onItemSelect = props.onItemSelect, - onCreateSubmit = props.onCreateSubmit, - onBoxBatchDelete = props.onBoxBatchDelete, - onBoxDelete = props.onBoxDelete, - onClockClick = props.onClockClick, - onImport = props.onImport, - onBatch = props.onBatch, - onCreate = props.onCreate, - boxDataSource = props.boxDataSource, - customImport = props.customImport; - var _useState = useState(false), - _useState2 = _slicedToArray(_useState, 2), - isTreeCheckable = _useState2[0], - setIsTreeCheckable = _useState2[1]; - var _useState3 = useState([]), - _useState4 = _slicedToArray(_useState3, 2), - targetItems = _useState4[0], - setTargetItems = _useState4[1]; - var _useState5 = useState(false), - _useState6 = _slicedToArray(_useState5, 2), - boxChoiceOpen = _useState6[0], - setBoxChoiceOpen = _useState6[1]; - var _useState7 = useState([]), - _useState8 = _slicedToArray(_useState7, 2), - checkedKeys = _useState8[0], - setCheckedKeys = _useState8[1]; - var createFormRef = useRef(); - - /** - * 修改选择状态 - * @param _data - */ - var handleCheckable = function handleCheckable() { - setIsTreeCheckable(function (pre) { - return !pre; - }); - }; - var onTreeCheck = function onTreeCheck(keys, info) { - var _targetItems = []; - setCheckedKeys(keys); - info.checkedNodes.forEach(function (o) { - o.isLeaf && _targetItems.push(o); - }); - setTargetItems(_targetItems); - }; - - /** - * 删除 - * @param key - * @param param1 - */ - var onItemDelete = function onItemDelete(key, _ref) { - var keys = _ref.keys; - setCheckedKeys(function (pre) { - var newKeys = pre.filter(function (_key) { - return !keys.includes(_key); - }); - return newKeys; - }); - setTargetItems(function (pre) { - return pre.filter(function (o) { - return o.key !== key; - }); - }); - }; - - // 盒子点击确定 - var onBoxChoiceOk = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) { - var _createFormRef$curren, _createFormRef$curren2, _createFormRef$curren3; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - (_createFormRef$curren = createFormRef.current) === null || _createFormRef$curren === void 0 || _createFormRef$curren.setFieldValue('boxList', data); - (_createFormRef$curren2 = createFormRef.current) === null || _createFormRef$curren2 === void 0 || _createFormRef$curren2.setFieldValue('boxName', 123); - console.log((_createFormRef$curren3 = createFormRef.current) === null || _createFormRef$curren3 === void 0 ? void 0 : _createFormRef$curren3.getFieldValue('boxList')); - setBoxChoiceOpen(false); - case 4: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function onBoxChoiceOk(_x) { - return _ref2.apply(this, arguments); - }; - }(); - - // 盒子选择重置 - var onBoxChoiceReset = function onBoxChoiceReset() { - setCheckedKeys([]); - setTargetItems([]); - }; - return /*#__PURE__*/React.createElement("div", { - style: { - padding: '0 16px' - } - }, /*#__PURE__*/React.createElement(TreeTransferModal, { - open: boxChoiceOpen, - onCancel: function onCancel() { - return setBoxChoiceOpen(false); - }, - onRadioChange: function onRadioChange(e) { - return console.log('radio', e.target.value); - } // 顶部 radio 事件 - , - dataSource: boxDataSource // 数据源 - , - targetItems: targetItems // 右侧选中项 - , - checkedKeys: checkedKeys // 左侧选中 - , - onReset: onBoxChoiceReset // 重置按钮事件 - , - onOk: onBoxChoiceOk // 确定按钮事件 - , - onTreeCheck: onTreeCheck // 树check选中事件 - , - onItemDelete: onItemDelete // 右侧点击删除事件 - }), /*#__PURE__*/React.createElement(Space, { - size: 12, - direction: "vertical", - style: { - width: '100%' - } - }, /*#__PURE__*/React.createElement(Space, { - size: 4, - style: { - width: '100%', - justifyContent: 'space-between' - } - }, /*#__PURE__*/React.createElement(Input, _extends({ - size: "middle", - onChange: function onChange(e) { - return onSearch === null || onSearch === void 0 ? void 0 : onSearch(e); - }, - placeholder: "\u8BF7\u8F93\u5165\u76D2\u5B50\u540D\u79F0" - }, searchInputProps)), customImport || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick() { - return (onBatch === null || onBatch === void 0 ? void 0 : onBatch()) || handleCheckable(); - }, - icon: isTreeCheckable ? /*#__PURE__*/React.createElement(SwitcherOutlined, null) : /*#__PURE__*/React.createElement(DiffOutlined, null) - }), /*#__PURE__*/React.createElement(Button, { - type: "text", - onClick: function onClick() { - return onClockClick === null || onClockClick === void 0 ? void 0 : onClockClick(); - }, - icon: /*#__PURE__*/React.createElement(ClockCircleOutlined, null) - }))), showOptions && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, { - align: "center" - }, /*#__PURE__*/React.createElement(Button, { - type: "text", - style: { - padding: '4px 8px' - }, - onClick: function onClick() { - return onImport === null || onImport === void 0 ? void 0 : onImport(); - }, - icon: /*#__PURE__*/React.createElement(ImportOutlined, null) - }, "\u5BFC\u5165\u76D2\u5B50"), /*#__PURE__*/React.createElement(Divider, { - type: "vertical", - style: { - margin: '8px 0' - } - }), onCreate ? /*#__PURE__*/React.createElement(Button, { - onClick: onCreate, - type: "text", - style: { - padding: '4px 8px' - }, - icon: /*#__PURE__*/React.createElement(FolderAddOutlined, null) - }, "\u65B0\u5EFA\u7EC4") : /*#__PURE__*/React.createElement(ModalForm, { - width: '600px', - open: onCreate ? false : undefined, - formRef: createFormRef, - title: "\u65B0\u5EFA\u7EC4", - modalProps: { - destroyOnClose: true - }, - layout: "horizontal", - labelCol: { - span: 6 - }, - wrapperCol: { - span: 18 - }, - trigger: /*#__PURE__*/React.createElement(Button, { - type: "text", - style: { - padding: '4px 8px' - }, - icon: /*#__PURE__*/React.createElement(FolderAddOutlined, null) - }, "\u65B0\u5EFA\u7EC4"), - submitter: { - searchConfig: { - submitText: '确定', - resetText: '取消' - } - }, - onFinish: onCreateSubmit - }, /*#__PURE__*/React.createElement(ProFormText, { - rules: [{ - required: true, - max: 20 - }, { - pattern: /^[^\s]*$/g, - message: '禁止输入空格' - }], - fieldProps: { - showCount: true - }, - width: "md", - name: "name", - label: "\u76D2\u5B50\u7EC4\u540D\u79F0", - placeholder: "\u8BF7\u8F93\u5165\u76D2\u5B50\u540D\u79F0" - }), /*#__PURE__*/React.createElement(ProFormText, { - width: "md", - name: "boxList", - label: "\u76D2\u5B50\u9009\u62E9", - fieldProps: { - readOnly: true, - value: "\u5DF2\u9009\u62E9".concat(((_createFormRef$curren4 = createFormRef.current) === null || _createFormRef$curren4 === void 0 || (_createFormRef$curren4 = _createFormRef$curren4.getFieldValue('boxList')) === null || _createFormRef$curren4 === void 0 ? void 0 : _createFormRef$curren4.length) || 0, "\u4E2A\u76D2\u5B50"), - suffix: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement("a", { - onClick: function onClick() { - var _createFormRef$curren5; - (_createFormRef$curren5 = createFormRef.current) === null || _createFormRef$curren5 === void 0 || _createFormRef$curren5.setFieldValue('boxList', null); - onBoxChoiceReset(); - } - }, "\u6062\u590D\u9ED8\u8BA4"), /*#__PURE__*/React.createElement("a", { - onClick: function onClick() { - return setBoxChoiceOpen(true); - } - }, "\u8303\u56F4\u9009\u62E9")) - } - })), /*#__PURE__*/React.createElement(Divider, { - type: "vertical", - style: { - margin: '8px 0' - } - }), /*#__PURE__*/React.createElement(Button, { - danger: true, - type: "text", - style: { - padding: '4px 8px' - }, - icon: /*#__PURE__*/React.createElement(CloseCircleOutlined, null), - disabled: (treeProps === null || treeProps === void 0 || (_treeProps$checkedKey = treeProps.checkedKeys) === null || _treeProps$checkedKey === void 0 ? void 0 : _treeProps$checkedKey.length) <= 0, - onClick: onBoxBatchDelete - }, "\u5220\u9664")), /*#__PURE__*/React.createElement(Divider, { - style: { - margin: 0 - } - })), extraBtns, /*#__PURE__*/React.createElement(BoxTree, _extends({ - treeCheckable: isTreeCheckable, - data: data, - onItemSelect: onItemSelect, - onItemCheck: onItemCheck, - onItemDelete: onBoxDelete - }, treeProps)))); -}; -export default BoxPanel; \ No newline at end of file diff --git a/packages/biz/es/boxSelectTree/index.d.ts b/packages/biz/es/boxSelectTree/index.d.ts deleted file mode 100644 index 2ff0f1e..0000000 --- a/packages/biz/es/boxSelectTree/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import BoxSelectTree from './boxSelectTree'; -export type { BoxSelectTreeProps } from './boxSelectTree'; -export default BoxSelectTree; diff --git a/packages/biz/es/boxSelectTree/index.js b/packages/biz/es/boxSelectTree/index.js deleted file mode 100644 index c537873..0000000 --- a/packages/biz/es/boxSelectTree/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import BoxSelectTree from "./boxSelectTree"; -export default BoxSelectTree; \ No newline at end of file diff --git a/packages/biz/es/boxSelectTree/mock.d.ts b/packages/biz/es/boxSelectTree/mock.d.ts deleted file mode 100644 index 84026eb..0000000 --- a/packages/biz/es/boxSelectTree/mock.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { TreeDataNode } from "antd"; -export declare const treeData: TreeDataNode[]; diff --git a/packages/biz/es/boxSelectTree/mock.js b/packages/biz/es/boxSelectTree/mock.js deleted file mode 100644 index f05520b..0000000 --- a/packages/biz/es/boxSelectTree/mock.js +++ /dev/null @@ -1,22 +0,0 @@ -export var treeData = [{ - title: '全部盒子', - key: '0-0', - children: [{ - title: '盒子组1', - key: '0-0-0', - children: [{ - title: '摄像头1', - key: '0-0-0-0' - }, { - title: '摄像头2', - key: '0-0-0-1' - }] - }, { - title: '盒子组2', - key: '0-0-1', - children: [{ - title: '摄像头4', - key: '0-0-1-0' - }] - }] -}]; \ No newline at end of file diff --git a/packages/biz/es/hooks/useIntelligentTracking/index.d.ts b/packages/biz/es/hooks/useIntelligentTracking/index.d.ts deleted file mode 100644 index c1e54ef..0000000 --- a/packages/biz/es/hooks/useIntelligentTracking/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Dayjs as Moment } from 'dayjs'; -export declare const getDefaultRadius: () => number; -export declare const setDefaultRadius: (radius: number) => void; -export declare const setSearchIntervalDuration: (duration: number) => void; -export declare const getSearchIntervalDuration: (time: number) => number; -export declare const operateTrackById: (smartTrackId: number, operationType: OperationType) => Promise; -export declare const deleteTrackById: (smartTrackId: number) => Promise; -export declare const modifyTrackImgs: (smartTrackId: number, images: Array) => Promise; -export declare const modifyTrackConf: (conf: any, smartTrackId: number) => Promise; -export declare const getTrackTaskById: (smartTrackId?: number) => Promise; -export declare const getTackDetailInfo: (smartTrackId?: number) => Promise; -export declare const getTaskCameraByCenterAndPower: (value: { - taskPower: { - facePower: number; - bodyPower: number; - }; - cameraInfos: Array; - center: [number, number]; -}) => Promise; -/**创建追踪任务 */ -export declare const createIntelligentTrack: (value: { - images: Array; - deviceIds: Array; - circleCenter: [number, number]; - model: number; - circleRadius: number; - facePower?: number; - bodyPower?: number; - historyTime?: [Moment, Moment]; - topping?: boolean; -}) => Promise; -export declare const emitHeartbeat: (smartTrackId: number) => Promise; -export declare const ModifyTrackCameras: (value: { - smartTrackId: number; - deviceIds: Array; - centerPoint: [number, number]; -}) => Promise; -export declare const setIntelligentTrackCircleInfo: (smartTrackId: number, circleCenter: [number, number]) => Promise; -export declare const getTackCameraInfo: (value: { - circleCenter: [Moment, Moment]; - radius: number; - zoom: number; -}) => Promise; -export declare const getCameraInfoByCircle: (circleCenter: any, radius: any, zoom?: number) => Promise; -export declare const taskInfoToSearchItem: (taskInfo: any) => any[]; diff --git a/packages/biz/es/hooks/useIntelligentTracking/index.js b/packages/biz/es/hooks/useIntelligentTracking/index.js deleted file mode 100644 index 5a3264e..0000000 --- a/packages/biz/es/hooks/useIntelligentTracking/index.js +++ /dev/null @@ -1,618 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -//@ts-nocheck -import * as turf from '@turf/turf'; -import { getListTaskStatus, getCameraStatusFunc } from "../useTaskState"; -import Tree from '@common/components/CameraTree/Tree'; -import doRequest from "../../utils/request"; -import { message } from '@zhst/meta'; -import { SearchCamera } from '@common/components/CameraTree/utils'; -import { get, isEmpty } from '@zhst/func'; -//默认取值 -var defaultFaceThreshold = 0.68; -var defaultBodyThreshold = 0.7; -//下边栏人脸数量,默认为5 -var defaultFaceResultNum = 5; -//追踪圈半径长度(m),默认为150 -var defaultRadius = 0.15; -//查询周期(s)默认是10,,只负责保存做展示用 -var defaultQueryCycle = 10; - -//获取默认半径 -export var getDefaultRadius = function getDefaultRadius() { - return defaultRadius; -}; -//设置默认半径 -export var setDefaultRadius = function setDefaultRadius(radius) { - defaultRadius = radius; -}; -//检索间隔时长 -var searchIntervalDuration = 10; -//设置检索时长 -export var setSearchIntervalDuration = function setSearchIntervalDuration(duration) { - searchIntervalDuration = duration; -}; -//获取检索时长 -export var getSearchIntervalDuration = function getSearchIntervalDuration(time) { - return time; -}; - -//通过id停止或启动任务 -export var operateTrackById = /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(smartTrackId, operationType) { - var data; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - _context.prev = 0; - data = { - operationType: operationType, - smartTrackId: smartTrackId - }; - _context.next = 4; - return doRequest({ - method: 'PUT', - url: '/singer.SmartTrackService/OperationSmartTrack', - data: data - }); - case 4: - message.success('操作成功'); - _context.next = 11; - break; - case 7: - _context.prev = 7; - _context.t0 = _context["catch"](0); - console.error(_context.t0); - message.success('操作失败'); - case 11: - case "end": - return _context.stop(); - } - }, _callee, null, [[0, 7]]); - })); - return function operateTrackById(_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); -//通过id删除追踪任务 -export var deleteTrackById = /*#__PURE__*/function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(smartTrackId) { - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _context2.prev = 0; - _context2.next = 3; - return doRequest({ - method: 'DELETE', - url: '/singer.SmartTrackService/DeleteSmartTrack', - data: { - smartTrackId: smartTrackId - } - }); - case 3: - _context2.next = 8; - break; - case 5: - _context2.prev = 5; - _context2.t0 = _context2["catch"](0); - console.error(_context2.t0); - case 8: - case "end": - return _context2.stop(); - } - }, _callee2, null, [[0, 5]]); - })); - return function deleteTrackById(_x3) { - return _ref2.apply(this, arguments); - }; -}(); - -//编辑追踪任务图片 -export var modifyTrackImgs = /*#__PURE__*/function () { - var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(smartTrackId, images) { - return _regeneratorRuntime().wrap(function _callee3$(_context3) { - while (1) switch (_context3.prev = _context3.next) { - case 0: - _context3.prev = 0; - _context3.next = 3; - return doRequest({ - method: 'PUT', - url: '/singer.SmartTrackService/ModifyTrackImg', - data: { - images: images, - smartTrackId: smartTrackId - } - }); - case 3: - _context3.next = 8; - break; - case 5: - _context3.prev = 5; - _context3.t0 = _context3["catch"](0); - console.log('err', _context3.t0); - case 8: - case "end": - return _context3.stop(); - } - }, _callee3, null, [[0, 5]]); - })); - return function modifyTrackImgs(_x4, _x5) { - return _ref3.apply(this, arguments); - }; -}(); -//编辑高级设置 -export var modifyTrackConf = /*#__PURE__*/function () { - var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(conf, smartTrackId) { - return _regeneratorRuntime().wrap(function _callee4$(_context4) { - while (1) switch (_context4.prev = _context4.next) { - case 0: - _context4.prev = 0; - _context4.next = 3; - return doRequest({ - method: 'PUT', - url: '/singer.SmartTrackService/ModifyTrackConf', - data: { - conf: conf, - smartTrackId: smartTrackId - } - }); - case 3: - _context4.next = 8; - break; - case 5: - _context4.prev = 5; - _context4.t0 = _context4["catch"](0); - console.log('err', _context4.t0); - case 8: - case "end": - return _context4.stop(); - } - }, _callee4, null, [[0, 5]]); - })); - return function modifyTrackConf(_x6, _x7) { - return _ref4.apply(this, arguments); - }; -}(); -//通过id获取追踪任务 -export var getTrackTaskById = /*#__PURE__*/function () { - var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() { - var smartTrackId, - data, - req, - _args5 = arguments; - return _regeneratorRuntime().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - smartTrackId = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : 0; - _context5.prev = 1; - data = smartTrackId ? { - smartTrackId: smartTrackId - } : {}; - _context5.next = 5; - return doRequest({ - method: 'POST', - url: '/singer.SmartTrackService/GetSmartTrack', - data: data - }); - case 5: - req = _context5.sent; - return _context5.abrupt("return", req); - case 9: - _context5.prev = 9; - _context5.t0 = _context5["catch"](1); - console.error(_context5.t0); - case 12: - case "end": - return _context5.stop(); - } - }, _callee5, null, [[1, 9]]); - })); - return function getTrackTaskById() { - return _ref5.apply(this, arguments); - }; -}(); - -//获取追踪实况 -export var getTackDetailInfo = /*#__PURE__*/function () { - var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() { - var smartTrackId, - data, - req, - _args6 = arguments; - return _regeneratorRuntime().wrap(function _callee6$(_context6) { - while (1) switch (_context6.prev = _context6.next) { - case 0: - smartTrackId = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : 0; - data = smartTrackId ? { - smartTrackId: smartTrackId - } : {}; - _context6.next = 4; - return doRequest({ - method: 'POST', - url: '/singer.SmartTrackService/GetTrackOverView', - data: data - }); - case 4: - req = _context6.sent; - return _context6.abrupt("return", req); - case 6: - case "end": - return _context6.stop(); - } - }, _callee6); - })); - return function getTackDetailInfo() { - return _ref6.apply(this, arguments); - }; -}(); - -//根据传入的算力,圆心,摄像头信息计算出最后需要的摄像头信息 -export var getTaskCameraByCenterAndPower = /*#__PURE__*/function () { - var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(value) { - var realCameraInfos, realPreprocessInfos, _yield$getListTaskSta, taskStatus, runRealCameraInfos, from; - return _regeneratorRuntime().wrap(function _callee7$(_context7) { - while (1) switch (_context7.prev = _context7.next) { - case 0: - realCameraInfos = value['cameraInfos']; //先通过摄像头id拿预处理信息 - realPreprocessInfos = []; - if (isEmpty(realCameraInfos)) { - _context7.next = 8; - break; - } - _context7.next = 5; - return getListTaskStatus(); - case 5: - _yield$getListTaskSta = _context7.sent; - taskStatus = _yield$getListTaskSta.taskStatus; - realPreprocessInfos = getCameraStatusFunc(taskStatus); - case 8: - //去除由实时开启的摄像头 - //缓存下已经开启的 - runRealCameraInfos = []; - realCameraInfos = realCameraInfos.filter(function (v) { - if (Tree.judgeOccupyPowerById(v['id'], realPreprocessInfos)) { - runRealCameraInfos.push(v); - } - return !Tree.judgeOccupyPowerById(v['id'], realPreprocessInfos); - }); - //算力不够时选择离中心点最近的 - from = turf.point(value['center']); - if (realCameraInfos.length > value['taskPower']['bodyPower']) { - realCameraInfos.map(function (v) { - var dis = turf.distance(from, turf.point([v['longitude'], v['latitude']])); - return _objectSpread(_objectSpread({}, v), {}, { - dis: dis - }); - }).sort(function (a, b) { - return a - b; - }); - realCameraInfos = realCameraInfos.slice(0, value['taskPower']['bodyPower']); - } - return _context7.abrupt("return", [].concat(runRealCameraInfos, _toConsumableArray(realCameraInfos))); - case 13: - case "end": - return _context7.stop(); - } - }, _callee7); - })); - return function getTaskCameraByCenterAndPower(_x8) { - return _ref7.apply(this, arguments); - }; -}(); - -/**创建追踪任务 */ -export var createIntelligentTrack = /*#__PURE__*/function () { - var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(value) { - var data, res; - return _regeneratorRuntime().wrap(function _callee8$(_context8) { - while (1) switch (_context8.prev = _context8.next) { - case 0: - data = { - images: value['images'], - type: value['model'], - normalComputerPower: value['bodyPower'] || 0, - faceComputerPower: value['facePower'] || 0, - // deviceIds: ['129537'], - deviceIds: value['deviceIds'], - conf: { - faceThreshold: defaultFaceThreshold, - bodyThreshold: defaultBodyThreshold, - faceResultNum: defaultFaceResultNum, - radius: value['circleRadius'] * 1000, - queryCycle: defaultQueryCycle - }, - centerConf: { - centerX: value['circleCenter'][0], - centerY: value['circleCenter'][1] - } - }; - _context8.next = 3; - return doRequest({ - method: 'PUT', - url: '/singer.SmartTrackService/CreateSmartTrack', - data: data - }); - case 3: - res = _context8.sent; - return _context8.abrupt("return", res); - case 5: - case "end": - return _context8.stop(); - } - }, _callee8); - })); - return function createIntelligentTrack(_x9) { - return _ref8.apply(this, arguments); - }; -}(); - -//发送心跳包 -export var emitHeartbeat = /*#__PURE__*/function () { - var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(smartTrackId) { - return _regeneratorRuntime().wrap(function _callee9$(_context9) { - while (1) switch (_context9.prev = _context9.next) { - case 0: - _context9.prev = 0; - _context9.next = 3; - return doRequest({ - method: 'POST', - url: '/singer.SmartTrackService/SmartTrackHeartBeat', - data: { - smartTrackId: smartTrackId - } - }); - case 3: - _context9.next = 8; - break; - case 5: - _context9.prev = 5; - _context9.t0 = _context9["catch"](0); - console.error(_context9.t0); - case 8: - case "end": - return _context9.stop(); - } - }, _callee9, null, [[0, 5]]); - })); - return function emitHeartbeat(_x10) { - return _ref9.apply(this, arguments); - }; -}(); - -//更改任务摄像头信息 -export var ModifyTrackCameras = /*#__PURE__*/function () { - var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(value) { - return _regeneratorRuntime().wrap(function _callee10$(_context10) { - while (1) switch (_context10.prev = _context10.next) { - case 0: - _context10.prev = 0; - _context10.next = 3; - return setIntelligentTrackCircleInfo(value['smartTrackId'], value['centerPoint']); - case 3: - _context10.next = 5; - return doRequest({ - url: '/singer.SmartTrackService/ModifyTrackCameras', - method: 'PUT', - data: { - smartTrackId: value['smartTrackId'], - deviceIds: value['deviceIds'] - } - }); - case 5: - _context10.next = 10; - break; - case 7: - _context10.prev = 7; - _context10.t0 = _context10["catch"](0); - message.error(_context10.t0); - case 10: - case "end": - return _context10.stop(); - } - }, _callee10, null, [[0, 7]]); - })); - return function ModifyTrackCameras(_x11) { - return _ref10.apply(this, arguments); - }; -}(); - -//保存智能追踪圆的信息 -export var setIntelligentTrackCircleInfo = /*#__PURE__*/function () { - var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(smartTrackId, circleCenter) { - return _regeneratorRuntime().wrap(function _callee11$(_context11) { - while (1) switch (_context11.prev = _context11.next) { - case 0: - _context11.prev = 0; - _context11.next = 3; - return doRequest({ - url: '/singer.SmartTrackService/ModifyTrackScopeConf', - method: 'PUT', - data: { - smartTrackId: smartTrackId, - centerConf: { - centerX: get(circleCenter, '0'), - centerY: get(circleCenter, '1') - } - } - }); - case 3: - _context11.next = 8; - break; - case 5: - _context11.prev = 5; - _context11.t0 = _context11["catch"](0); - message.error(_context11.t0); - case 8: - case "end": - return _context11.stop(); - } - }, _callee11, null, [[0, 5]]); - })); - return function setIntelligentTrackCircleInfo(_x12, _x13) { - return _ref11.apply(this, arguments); - }; -}(); - -//智能追踪的获取摄像头 -export var getTackCameraInfo = /*#__PURE__*/function () { - var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(value) { - var circleCameraInfos; - return _regeneratorRuntime().wrap(function _callee12$(_context12) { - while (1) switch (_context12.prev = _context12.next) { - case 0: - _context12.next = 2; - return getCameraInfoByCircle(value['circleCenter'], value['radius'], value['zoom']); - case 2: - circleCameraInfos = _context12.sent; - return _context12.abrupt("return", circleCameraInfos); - case 4: - case "end": - return _context12.stop(); - } - }, _callee12); - })); - return function getTackCameraInfo(_x14) { - return _ref12.apply(this, arguments); - }; -}(); - -//通过圆心和半径获取摄像头 -export var getCameraInfoByCircle = /*#__PURE__*/function () { - var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(circleCenter, radius) { - var zoom, - centerFeature, - minx, - maxx, - miny, - maxy, - i, - point, - _yield$doRequest, - clusterPoint, - cameraIds, - _yield$SearchCamera, - cameras, - cameraInfos, - _args13 = arguments; - return _regeneratorRuntime().wrap(function _callee13$(_context13) { - while (1) switch (_context13.prev = _context13.next) { - case 0: - zoom = _args13.length > 2 && _args13[2] !== undefined ? _args13[2] : 16; - _context13.prev = 1; - centerFeature = turf.circle(turf.point(circleCenter), radius, { - units: 'kilometers', - steps: 64 - }); - minx = 0; - maxx = 0; - miny = 0; - maxy = 0; - for (i = 0; i < 4; i++) { - point = turf.destination(turf.point(circleCenter), radius, 90 * i, { - units: 'kilometers' - }).geometry.coordinates; - if (point[0] < minx || minx === 0) { - minx = point[0]; - } - if (point[0] > maxx || maxx === 0) { - maxx = point[0]; - } - if (point[1] < miny || miny === 0) { - miny = point[1]; - } - if (point[1] > maxy || maxy === 0) { - maxy = point[1]; - } - } - _context13.next = 10; - return doRequest({ - url: '/singer.DeviceService/GetClusters', - method: 'POST', - data: { - northEast: { - X: maxx, - Y: maxy - }, - southWest: { - X: minx, - Y: miny - }, - zoom: zoom - } - }); - case 10: - _yield$doRequest = _context13.sent; - clusterPoint = _yield$doRequest.clusterPoint; - cameraIds = []; - clusterPoint.forEach(function (v) { - cameraIds.push.apply(cameraIds, _toConsumableArray(v['cameraIDs'])); - }); - _context13.next = 16; - return SearchCamera({ - cameraId: cameraIds, - maxResults: cameraIds.length - }); - case 16: - _yield$SearchCamera = _context13.sent; - cameras = _yield$SearchCamera.cameras; - cameraInfos = cameras.filter(function (v) { - var cameraPoint = turf.point([get(v, 'longitude'), get(v, 'latitude')]); - return turf.booleanPointInPolygon(cameraPoint, centerFeature); - }); - return _context13.abrupt("return", cameraInfos); - case 22: - _context13.prev = 22; - _context13.t0 = _context13["catch"](1); - console.error(_context13.t0); - return _context13.abrupt("return", []); - case 26: - case "end": - return _context13.stop(); - } - }, _callee13, null, [[1, 22]]); - })); - return function getCameraInfoByCircle(_x15, _x16) { - return _ref13.apply(this, arguments); - }; -}(); - -//追踪任务转化为检索的格式 -export var taskInfoToSearchItem = function taskInfoToSearchItem(taskInfo) { - var imageList = []; - get(taskInfo, 'images', []).forEach(function (v) { - var url = get(v, 'conds.0.srcImageUrl'); - var objectId = get(v, 'conds.0.featureInfo.objectId'); - var imageItem = { - index: 0, - url: url, - objectId: objectId, - odRects: get(v, 'conds').map(function (item) { - return { - fileKey: get(item, 'objectImageUrl'), - extendRect: _objectSpread({ - algorithmVersion: get(item, 'alg', '') - }, get(item, 'rect', {})), - rect: { - algorithmVersion: get(item, 'alg', ''), - rect: get(item, 'rect', {}) - } - }; - }) - }; - imageList.push(imageItem); - }); - return imageList; -}; \ No newline at end of file diff --git a/packages/biz/es/index.d.ts b/packages/biz/es/index.d.ts deleted file mode 100644 index 743bed4..0000000 --- a/packages/biz/es/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export { default as BigImageModal } from './BigImageModal'; -export type { BigImageModalProps } from './BigImageModal'; -export { default as BoxSelectTree } from './boxSelectTree'; -export type { BoxSelectTreeProps } from './boxSelectTree'; -export { default as Tree } from './tree'; -export type { BoxTreeProps, TreeData } from './tree'; -export { default as TreeTransfer } from './treeTransfer'; -export type { TreeTransferProps } from './treeTransfer'; -export { default as TreeTransferModal } from './treeTransferModal'; -export type { TreeTransferModalProps } from './treeTransferModal'; -export { default as WarningRecordCard } from './WarningRecordCard'; -export type { IRecord, WarningRecordCardProps } from './WarningRecordCard'; -export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal'; -export { default as ViewLargerImageModal, useViewLargerImageModal } from './ViewLargerImageModal'; -export type { VideoPlayerCardProps } from './VideoPlayerCard'; -export { default as VideoPlayerCard } from './VideoPlayerCard'; -export { default as RealTimeMonitor } from './RealTimeMonitor'; diff --git a/packages/biz/es/index.js b/packages/biz/es/index.js deleted file mode 100644 index d340720..0000000 --- a/packages/biz/es/index.js +++ /dev/null @@ -1,9 +0,0 @@ -export { default as BigImageModal } from "./BigImageModal"; -export { default as BoxSelectTree } from "./boxSelectTree"; -export { default as Tree } from "./tree"; -export { default as TreeTransfer } from "./treeTransfer"; -export { default as TreeTransferModal } from "./treeTransferModal"; -export { default as WarningRecordCard } from "./WarningRecordCard"; -export { default as ViewLargerImageModal, useViewLargerImageModal } from "./ViewLargerImageModal"; -export { default as VideoPlayerCard } from "./VideoPlayerCard"; -export { default as RealTimeMonitor } from "./RealTimeMonitor"; \ No newline at end of file diff --git a/packages/biz/es/tree/boxTree.d.ts b/packages/biz/es/tree/boxTree.d.ts deleted file mode 100644 index 5e34aef..0000000 --- a/packages/biz/es/tree/boxTree.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { FC } from 'react'; -import { TreeDataNode, TreeProps } from 'antd'; -import './index.less'; -export interface BoxTreeProps extends TreeProps { - data: TreeDataNode[]; - treeCheckable?: boolean; - showItemOption?: boolean; - customOptions?: any; - onItemCheck?: TreeProps['onCheck']; - onItemSelect?: TreeProps['onSelect']; - onItemSetting?: (_data: any) => void; - onItemDelete?: (_data: any) => void; - onItemRename?: (_nodeData: any) => void; - onItemRenameFinish?: (_data: any, _nodeData: any) => Promise; -} -declare const boxTree: FC; -export default boxTree; diff --git a/packages/biz/es/tree/boxTree.js b/packages/biz/es/tree/boxTree.js deleted file mode 100644 index e9e44cb..0000000 --- a/packages/biz/es/tree/boxTree.js +++ /dev/null @@ -1,134 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useState } from 'react'; -import { Tree, Badge, Space } from 'antd'; -import theme from 'antd/es/theme'; -import { CloseOutlined, EditOutlined, SettingOutlined } from '@ant-design/icons'; -import { ModalForm, ProFormText } from '@ant-design/pro-components'; -import "./index.less"; -var componentName = 'zhst-biz-tree'; -var useToken = theme.useToken; -var boxTree = function boxTree(props) { - var onItemSelect = props.onItemSelect, - onItemCheck = props.onItemCheck, - onItemSetting = props.onItemSetting, - onItemDelete = props.onItemDelete, - _props$data = props.data, - data = _props$data === void 0 ? [] : _props$data, - _props$showItemOption = props.showItemOption, - showItemOption = _props$showItemOption === void 0 ? true : _props$showItemOption, - _props$treeCheckable = props.treeCheckable, - treeCheckable = _props$treeCheckable === void 0 ? false : _props$treeCheckable, - onItemRename = props.onItemRename, - onItemRenameFinish = props.onItemRenameFinish, - customOptions = props.customOptions; - var _useToken = useToken(), - token = _useToken.token; - var _useState = useState(''), - _useState2 = _slicedToArray(_useState, 2), - checkedItem = _useState2[0], - setCheckedItem = _useState2[1]; - var cameraStatus = new Map([['0', 'error'], ['1', 'success'], ['3', 'processing'], ['4', 'default']]); - return /*#__PURE__*/React.createElement(Tree, _extends({ - checkable: treeCheckable, - blockNode: true, - onSelect: function onSelect(selectedKeys, info) { - setCheckedItem(selectedKeys[0]); - onItemSelect === null || onItemSelect === void 0 || onItemSelect(selectedKeys, info); - }, - onCheck: onItemCheck, - treeData: data, - titleRender: function titleRender(_nodeData) { - return /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-item-render") - }, !_nodeData.children && _nodeData.isCamera && /*#__PURE__*/React.createElement(Badge, { - style: { - marginRight: '6px' - }, - status: cameraStatus.get(_nodeData.status || '4') - }), /*#__PURE__*/React.createElement("span", { - // @ts-ignore - style: checkedItem === _nodeData.key && _nodeData.isCamera ? { - color: token.colorPrimary - } : {} - }, _nodeData.title), showItemOption && /*#__PURE__*/React.createElement(Space, { - className: "".concat(componentName, "-item-render_right"), - style: { - float: 'right' - } - }, customOptions || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ModalForm, { - title: "\u91CD\u547D\u540D", - width: 600, - modalProps: { - destroyOnClose: true - }, - layout: "horizontal", - labelCol: { - span: 6 - }, - wrapperCol: { - span: 18 - }, - trigger: /*#__PURE__*/React.createElement(EditOutlined, { - onClick: function onClick(e) { - e.preventDefault(); - e.stopPropagation(); - onItemRename === null || onItemRename === void 0 || onItemRename(_nodeData); - } - }), - submitter: { - searchConfig: { - submitText: '确定', - resetText: '取消' - } - }, - onFinish: ( /*#__PURE__*/function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) { - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - return _context.abrupt("return", onItemRenameFinish === null || onItemRenameFinish === void 0 ? void 0 : onItemRenameFinish(value, _nodeData)); - case 1: - case "end": - return _context.stop(); - } - }, _callee); - })); - return function (_x) { - return _ref.apply(this, arguments); - }; - }()) - }, /*#__PURE__*/React.createElement(ProFormText, { - rules: [{ - required: true - }], - width: "md", - name: "name", - label: "\u76D2\u5B50\u540D\u79F0", - placeholder: "\u8BF7\u8F93\u5165\u76D2\u5B50\u540D\u79F0" - })), /*#__PURE__*/React.createElement(SettingOutlined, { - onClick: function onClick(e) { - e.preventDefault(); - e.stopPropagation(); - onItemSetting === null || onItemSetting === void 0 || onItemSetting(_nodeData); - } - }), /*#__PURE__*/React.createElement(CloseOutlined, { - onClick: function onClick(e) { - e.preventDefault(); - e.stopPropagation(); - onItemDelete === null || onItemDelete === void 0 || onItemDelete(_nodeData); - } - })))); - } - }, props)); -}; -export default boxTree; \ No newline at end of file diff --git a/packages/biz/es/tree/index.d.ts b/packages/biz/es/tree/index.d.ts deleted file mode 100644 index 4082eb0..0000000 --- a/packages/biz/es/tree/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { TreeDataNode } from 'antd'; -import BoxTree from './boxTree'; -export interface TreeData extends TreeDataNode { - children?: TreeDataNode['children'] & { - isCamera?: boolean; - /** - * 0-失败 1-成功 2-进行中 3-未知 - */ - status?: '0' | '1' | '2' | '3'; - }[]; -} -export type { BoxTreeProps } from './boxTree'; -export default BoxTree; diff --git a/packages/biz/es/tree/index.js b/packages/biz/es/tree/index.js deleted file mode 100644 index 23238e5..0000000 --- a/packages/biz/es/tree/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import BoxTree from "./boxTree"; -export default BoxTree; \ No newline at end of file diff --git a/packages/biz/es/tree/index.less b/packages/biz/es/tree/index.less deleted file mode 100644 index 9da4e2d..0000000 --- a/packages/biz/es/tree/index.less +++ /dev/null @@ -1,9 +0,0 @@ -.zhst-biz-tree-item-render { - &_right { - display: none; - } - - &:hover &_right { - display: inline-flex; - } -} diff --git a/packages/biz/es/treeTransfer/TreeTransfer.d.ts b/packages/biz/es/treeTransfer/TreeTransfer.d.ts deleted file mode 100644 index b74b4f3..0000000 --- a/packages/biz/es/treeTransfer/TreeTransfer.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { InputProps } from 'antd'; -import { TransferProps, TreeDataNode, TreeProps } from 'antd'; -import './index.less'; -export interface TreeTransferProps { - dataSource: TreeDataNode[]; - treeProps?: TreeProps; - searchInputProps?: InputProps; - targetItems: TreeDataNode[]; - checkedKeys: string[]; - onTreeSelect?: TreeProps['onSelect']; - onTreeCheck?: TreeProps['onCheck']; - onItemDelete?: (key: string, info?: { - root: TreeDataNode[]; - keys: string[]; - }) => void; - onChange?: TransferProps['onChange']; - onOk?: (data: any) => void; - onReset?: () => void; -} -declare const TreeTransfer: React.FC; -export default TreeTransfer; diff --git a/packages/biz/es/treeTransfer/TreeTransfer.js b/packages/biz/es/treeTransfer/TreeTransfer.js deleted file mode 100644 index dc3e135..0000000 --- a/packages/biz/es/treeTransfer/TreeTransfer.js +++ /dev/null @@ -1,143 +0,0 @@ -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useState } from 'react'; -import { Button, Card, Flex, Input, Tree } from 'antd'; -import theme from 'antd/es/theme'; -import "./index.less"; -import { DeleteOutlined, DoubleRightOutlined, SearchOutlined } from '@ant-design/icons'; -import { getAllRootKeyById } from "./treeTransferHelper"; -var componentName = 'zhst-biz-treeTransfer'; -var useToken = theme.useToken; -var TreeTransfer = function TreeTransfer(_ref) { - var dataSource = _ref.dataSource, - treeProps = _ref.treeProps, - searchInputProps = _ref.searchInputProps, - _ref$targetItems = _ref.targetItems, - targetItems = _ref$targetItems === void 0 ? [] : _ref$targetItems, - _ref$checkedKeys = _ref.checkedKeys, - checkedKeys = _ref$checkedKeys === void 0 ? [] : _ref$checkedKeys, - onTreeCheck = _ref.onTreeCheck, - onTreeSelect = _ref.onTreeSelect, - onItemDelete = _ref.onItemDelete, - onOk = _ref.onOk, - onReset = _ref.onReset; - var _useToken = useToken(), - token = _useToken.token; - var _useState = useState(''), - _useState2 = _slicedToArray(_useState, 2), - keyWords = _useState2[0], - setKeyWords = _useState2[1]; - function findNodesWithKeyword(_keyWords, _treeData) { - // @ts-ignore - function dfs(node) { - return node.filter(function (item) { - return item.title.includes(_keyWords); - }); - } - var data = dfs(_treeData); - return data || []; - } - return /*#__PURE__*/React.createElement(Flex, { - gap: 20, - className: componentName, - align: "center", - justify: "center" - }, /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-left") - }, /*#__PURE__*/React.createElement(Card, { - className: "".concat(componentName, "-left_card"), - title: /*#__PURE__*/React.createElement("div", { - style: { - textAlign: 'center' - } - }, "\u53EF\u9009\u62E9\u7684\u8303\u56F4"), - bodyStyle: { - padding: 12 - } - }, /*#__PURE__*/React.createElement(Input, _extends({ - prefix: /*#__PURE__*/React.createElement(SearchOutlined, null), - onChange: function onChange(e) { - return setKeyWords(e.target.value); - }, - placeholder: "\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0" - }, searchInputProps)), /*#__PURE__*/React.createElement(Tree, _extends({ - style: { - marginTop: '6px' - }, - height: 420, - blockNode: true, - checkable: true, - checkedKeys: checkedKeys, - treeData: findNodesWithKeyword(keyWords, dataSource), - onCheck: function onCheck(keys, info) { - return onTreeCheck === null || onTreeCheck === void 0 ? void 0 : onTreeCheck(keys, info); - }, - onSelect: function onSelect(keys, info) { - return onTreeSelect === null || onTreeSelect === void 0 ? void 0 : onTreeSelect(keys, info); - } - }, treeProps)))), /*#__PURE__*/React.createElement(DoubleRightOutlined, null), /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-right") - }, /*#__PURE__*/React.createElement(Card, { - className: "".concat(componentName, "-right_card"), - title: /*#__PURE__*/React.createElement("div", { - style: { - textAlign: 'center' - } - }, "\u5DF2\u9009\u62E9\u7684\u8303\u56F4"), - bodyStyle: { - padding: 0 - } - }, /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-right_card__items") - }, targetItems.map(function (item) { - return /*#__PURE__*/React.createElement("div", { - className: "".concat(componentName, "-right_card__items___item"), - key: item.key, - onMouseEnter: function onMouseEnter(e) { - e.target.style.backgroundColor = token.colorPrimaryBg; - e.target.style.color = token.colorPrimary; - }, - onMouseLeave: function onMouseLeave(e) { - e.target.style.color = token.colorText; - e.target.style.backgroundColor = null; - } - }, item.title, /*#__PURE__*/React.createElement("div", { - style: { - float: 'right' - } - }, /*#__PURE__*/React.createElement(DeleteOutlined, { - onClick: function onClick() { - var _getAllRootKeyById = getAllRootKeyById(item.key, dataSource), - root = _getAllRootKeyById.root, - keys = _getAllRootKeyById.keys; - onItemDelete === null || onItemDelete === void 0 || onItemDelete(item.key, { - root: root, - keys: keys - }); - } - }))); - })), /*#__PURE__*/React.createElement(Flex, { - className: "".concat(componentName, "-right_card__btns") - }, /*#__PURE__*/React.createElement(Button, { - style: { - marginRight: 8, - width: '50%' - }, - disabled: targetItems.length <= 0, - onClick: onReset - }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(Button, { - style: { - width: '50%' - }, - type: "primary", - onClick: function onClick() { - return onOk === null || onOk === void 0 ? void 0 : onOk(targetItems); - } - }, "\u786E\u5B9A"))))); -}; -export default TreeTransfer; \ No newline at end of file diff --git a/packages/biz/es/treeTransfer/index.d.ts b/packages/biz/es/treeTransfer/index.d.ts deleted file mode 100644 index 7ea5c47..0000000 --- a/packages/biz/es/treeTransfer/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import TreeTransfer from "./TreeTransfer"; -export type { TreeTransferProps } from './TreeTransfer'; -export * from './treeTransferHelper'; -export default TreeTransfer; diff --git a/packages/biz/es/treeTransfer/index.js b/packages/biz/es/treeTransfer/index.js deleted file mode 100644 index 153880e..0000000 --- a/packages/biz/es/treeTransfer/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import TreeTransfer from "./TreeTransfer"; -export * from "./treeTransferHelper"; -export default TreeTransfer; \ No newline at end of file diff --git a/packages/biz/es/treeTransfer/index.less b/packages/biz/es/treeTransfer/index.less deleted file mode 100644 index 9ffe8cd..0000000 --- a/packages/biz/es/treeTransfer/index.less +++ /dev/null @@ -1,43 +0,0 @@ -.zhst-biz-treeTransfer { - &-left { - &_card { - width: 500px; - height: 522px; - background-color: #FCFCFC; - } - } - - &-right { - &_card { - width: 300px; - height: 522px; - background-color: #FCFCFC; - - &__items { - padding: 8px 4px; - overflow: scroll; - - &::-webkit-scrollbar { - display: none; - } - - &___item { - margin: 0; - padding: 4px 12px; - cursor: pointer; - } - } - - &__btns { - width: 100%; - padding: 8px; - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - box-sizing: border-box; - border-top: 1px solid #f0f0f0; - } - } - } -} diff --git a/packages/biz/es/treeTransfer/treeTransferHelper.d.ts b/packages/biz/es/treeTransfer/treeTransferHelper.d.ts deleted file mode 100644 index 705684c..0000000 --- a/packages/biz/es/treeTransfer/treeTransferHelper.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare const isChecked: (selectedKeys: React.Key[], eventKey: React.Key) => boolean; -/** - * 通过子元素找到父级节点 - * @param objects - * @param element - * @returns - */ -export declare const findParentByChild: (objects: any[], propertyValue: string | number, propertyKey?: string) => any; -export declare const getAllRootKeyById: (val: string | number, list: any[], key?: string) => { - root: any; - keys: any[]; -}; diff --git a/packages/biz/es/treeTransfer/treeTransferHelper.js b/packages/biz/es/treeTransfer/treeTransferHelper.js deleted file mode 100644 index efaf6d8..0000000 --- a/packages/biz/es/treeTransfer/treeTransferHelper.js +++ /dev/null @@ -1,57 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -export var isChecked = function isChecked(selectedKeys, eventKey) { - return selectedKeys.includes(eventKey); -}; -function isObject(value) { - return value !== null && _typeof(value) === 'object' && !Array.isArray(value); -} - -/** - * 通过子元素找到父级节点 - * @param objects - * @param element - * @returns - */ -export var findParentByChild = function findParentByChild(objects, propertyValue) { - var propertyKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'key'; - for (var i = 0; i < objects.length; i++) { - var obj = objects[i]; - if (obj[propertyKey] === propertyValue) { - return obj; - } else if (_typeof(obj) === 'object') { - var found = findParentByChild(Object.values(obj), propertyValue); - if (found) { - return obj; - } - } - } - return null; // 如果找不到包含具有指定属性的子对象的父对象,返回 null -}; -export var getAllRootKeyById = function getAllRootKeyById(val, list) { - var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'key'; - var keys = []; - var findParentByChild = function findParentByChild(propertyValue, objects, propertyKey) { - for (var i = 0; i < objects.length; i++) { - var obj = objects[i]; - if (obj[propertyKey] === propertyValue) { - console.log('obj', obj); - return obj; - } else if (_typeof(obj) === 'object') { - var found = findParentByChild(propertyValue, Object.values(obj), propertyKey); - if (found) { - if (isObject(found)) { - keys.push(found.key); - } - return obj; - } - } - } - return null; // 如果找不到包含具有指定属性的子对象的父对象,返回 null - }; - var data = findParentByChild(val, list, key); - data.key && keys.push(data.key); - return { - root: data, - keys: keys - }; -}; \ No newline at end of file diff --git a/packages/biz/es/treeTransferModal/TreeTransferModal.d.ts b/packages/biz/es/treeTransferModal/TreeTransferModal.d.ts deleted file mode 100644 index e0a0d0e..0000000 --- a/packages/biz/es/treeTransferModal/TreeTransferModal.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { FC } from 'react'; -import { ModalProps, RadioGroupProps, SelectProps, TransferProps, TreeDataNode, TreeProps } from 'antd'; -export interface TreeTransferModalProps { - dataSource: TreeDataNode[]; - treeProps?: TreeProps; - targetItems: TreeDataNode[]; - checkedKeys: string[]; - onTreeSelect?: TreeProps['onSelect']; - onTreeCheck?: TreeProps['onCheck']; - onItemDelete?: (key: string, info?: { - root: TreeDataNode[]; - keys: string[]; - }) => void; - onChange?: TransferProps['onChange']; - onOk?: (data: any) => void; - onReset?: () => void; - open?: boolean; - onCancel?: ModalProps['onCancel']; - onRadioChange?: RadioGroupProps['onChange']; - onSelect?: SelectProps['onSelect']; - modalProps?: ModalProps; - radioProps?: RadioGroupProps; - selectProps?: SelectProps; -} -declare const TreeTransferModal: FC; -export default TreeTransferModal; diff --git a/packages/biz/es/treeTransferModal/TreeTransferModal.js b/packages/biz/es/treeTransferModal/TreeTransferModal.js deleted file mode 100644 index 5580038..0000000 --- a/packages/biz/es/treeTransferModal/TreeTransferModal.js +++ /dev/null @@ -1,80 +0,0 @@ -function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -import React, { useState } from 'react'; -import { Modal, Radio, Select } from 'antd'; -import TreeTransfer from "../treeTransfer"; -import { ALL_LIST, BOX_TYPE_LIST } from "../utils/constants"; -var TreeTransferModal = function TreeTransferModal(props) { - var open = props.open, - _props$dataSource = props.dataSource, - dataSource = _props$dataSource === void 0 ? [] : _props$dataSource, - checkedKeys = props.checkedKeys, - onItemDelete = props.onItemDelete, - onOk = props.onOk, - onCancel = props.onCancel, - onReset = props.onReset, - onRadioChange = props.onRadioChange, - onTreeCheck = props.onTreeCheck, - onSelect = props.onSelect, - targetItems = props.targetItems, - modalProps = props.modalProps, - radioProps = props.radioProps, - selectProps = props.selectProps; - var _useState = useState('1'), - _useState2 = _slicedToArray(_useState, 2), - type = _useState2[0], - setType = _useState2[1]; - return /*#__PURE__*/React.createElement(Modal, _extends({ - open: open, - destroyOnClose: true, - title: "\u7EDF\u8BA1\u70B9\u4F4D", - width: "948px", - footer: null, - onCancel: onCancel - }, modalProps), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Radio.Group, _extends({ - onChange: function onChange(e) { - setType(e.target.value); - onRadioChange === null || onRadioChange === void 0 || onRadioChange(e); - }, - style: { - marginLeft: '24px', - padding: '20px 0' - }, - value: type, - options: BOX_TYPE_LIST - }, radioProps)), /*#__PURE__*/React.createElement(Select, _extends({ - defaultValue: '', - style: { - marginLeft: 200, - width: 150 - }, - options: ALL_LIST, - onSelect: onSelect - }, selectProps))), type === 'box' ? /*#__PURE__*/React.createElement(TreeTransfer, { - dataSource: dataSource, - targetItems: targetItems, - checkedKeys: checkedKeys, - onTreeCheck: onTreeCheck, - onItemDelete: onItemDelete, - onOk: onOk, - onReset: onReset - }) : /*#__PURE__*/React.createElement(TreeTransfer, { - dataSource: dataSource, - targetItems: targetItems, - checkedKeys: checkedKeys, - onTreeCheck: onTreeCheck, - onItemDelete: onItemDelete, - onOk: onOk, - onReset: onReset - }), /*#__PURE__*/React.createElement("p", { - style: { - textAlign: 'right' - } - }, "\u5DF2\u9009\u4E2D", targetItems.length, "\u4E2A\u70B9\u4F4D"))); -}; -export default TreeTransferModal; \ No newline at end of file diff --git a/packages/biz/es/treeTransferModal/index.d.ts b/packages/biz/es/treeTransferModal/index.d.ts deleted file mode 100644 index 8e5245a..0000000 --- a/packages/biz/es/treeTransferModal/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import TreeTransferModal from './TreeTransferModal'; -export type { TreeTransferModalProps } from './TreeTransferModal'; -export default TreeTransferModal; diff --git a/packages/biz/es/treeTransferModal/index.js b/packages/biz/es/treeTransferModal/index.js deleted file mode 100644 index 3c464e7..0000000 --- a/packages/biz/es/treeTransferModal/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import TreeTransferModal from "./TreeTransferModal"; -export default TreeTransferModal; \ No newline at end of file diff --git a/packages/biz/es/utils/constants.js b/packages/biz/es/utils/constants.js deleted file mode 100644 index 925bab4..0000000 --- a/packages/biz/es/utils/constants.js +++ /dev/null @@ -1,43 +0,0 @@ -export var OBJECT_GRNER_THRESHOLD = 0.8; //目标图判断性别阈值 -export var OBJECT_AGE_TYPE_THRESHOLD = 0.5; //目标图判断年龄段阈值 -export var MODE_KEY = 'test_mode'; -//业务约定 -export var SEARCH_IMG_COUNT = 10; //检索图片的最大个数 -export var GLOBAL_IS_ITEM_NUMBER_SHOW = false; //是否展示索引 -export var publicPath = 'hummingbird'; -export var ENTER_CIRCLE = 'MONITORTYPE_ENTER_CIRCLE'; -export var OUT_CIRCLE = 'MONITORTYPE_OUT_CIRCLE'; -export var TEMP = 'MONITORTYPE_TEMP'; -export var GLOBAL_IS_BOX_VMS_SHOW = true; //是否展示盒子vms - -export var BODY_SEARCH_THRESHOID = 0.45; //形体检索阈值 -export var RECORD_VERSION = '3.0.0'; //保存记录的版本号 - -export var DeviceTab = { - EMPTY: 0, - REAL_CAMERA: 1, - PREPROCESS_CAMERA: 2, - //摄像头列表 - TAG_CAMERA: 3, - //预案列表 - HISTORY_VIDEO_GROUP: 4, - //录像回放 - VIRTUAL_CAMERA: 5, - //离线视频 - REAL_CAMERA_NOFACE: 6, - REAL_CAMERA_ONLYFACE: 7, - REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: 8 // 只有普通摄像头,没有人脸、没有盒子、直连 -}; - -// 盒子 Tab 切换 -export var BOX_TYPE_LIST = [{ - value: '1', - label: '盒子' -}, { - value: '2', - label: '盒子组' -}]; -export var ALL_LIST = [{ - value: '', - label: '全部' -}]; \ No newline at end of file diff --git a/packages/biz/es/utils/index.d.ts b/packages/biz/es/utils/index.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/packages/biz/es/utils/index.js b/packages/biz/es/utils/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/packages/biz/lib/BigImageModal/BigImageModal.d.ts b/packages/biz/lib/BigImageModal/BigImageModal.d.ts deleted file mode 100644 index ae5e46d..0000000 --- a/packages/biz/lib/BigImageModal/BigImageModal.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import type { ModalProps, DescriptionsProps, TabsProps, VideoViewRef, ImgViewRef } from '@zhst/meta'; -import './index.less'; -export declare const componentPrefix = "zhst-image"; -export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'VIDEO'; -export type MODEL_TYPE = 'VIDEO' | 'IMAGE'; -export interface BigImageModalProps extends ModalProps { - visible: boolean; - activeTab?: TAB_TYPE; - attributeList: { - title: string; - children: Pick; - }; - tabs: { - data: Pick & { - key: TAB_TYPE; - }; - }; - dataSource: any; - imageData: any; - relatedData: any; - isRelated?: boolean; - footer?: React.ReactNode; - showCarousel?: boolean; - onTabChange?: (newVal?: TAB_TYPE, oldVal?: TAB_TYPE) => void; - onIndexChange?: (newVal?: number, oldVal?: number) => void; - transformPropFunc: (data: any) => void; -} -interface BigModalRef { - tab: TAB_TYPE; - setTab: (tab: TAB_TYPE) => void; - modalRef: ModalProps; - activeKey: string; - setActiveKey: (val: string) => void; - videoPlayerRef: VideoViewRef; - combineImageRef: any; - bigImagePreviewRef: ImgViewRef; -} -declare const BigImageModal: React.FC; -export default BigImageModal; diff --git a/packages/biz/lib/BigImageModal/BigImageModal.js b/packages/biz/lib/BigImageModal/BigImageModal.js deleted file mode 100644 index ff12576..0000000 --- a/packages/biz/lib/BigImageModal/BigImageModal.js +++ /dev/null @@ -1,250 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/BigImageModal/BigImageModal.tsx -var BigImageModal_exports = {}; -__export(BigImageModal_exports, { - componentPrefix: () => componentPrefix, - default: () => BigImageModal_default -}); -module.exports = __toCommonJS(BigImageModal_exports); -var import_react = __toESM(require("react")); -var import_meta = require("@zhst/meta"); -var import_classnames = __toESM(require("classnames")); -var import_func = require("@zhst/func"); -var import_index = require("./index.less"); -var import_navigation = __toESM(require("./components/navigation")); -var import_CombineImage = __toESM(require("./components/CombineImage")); -var DescriptionsItem = import_meta.Descriptions.Item; -var componentPrefix = "zhst-image"; -var initialStyle = { - fontSize: "12px" -}; -var BigImageModal = (0, import_react.forwardRef)((props, ref) => { - var _a; - const { - // 配置 - title = "-", - open, - children, - activeTab, - attributeList = [], - isRelated = false, - tabs = {}, - footer = null, - showCarousel = true, - // 数据 - dataSource = [], - // 总数据源,只允许有一份 - imageData = [], - relatedData = [], - // 事件 - onIndexChange, - onTabChange, - transformPropFunc - } = props; - const combineImageRef = (0, import_react.useRef)(null); - const bigImagePreviewRef = (0, import_react.useRef)(null); - const videoPlayerRef = (0, import_react.useRef)(null); - const modalRef = (0, import_react.useRef)(null); - const [tab, setTab] = (0, import_react.useState)(activeTab || (0, import_func.get)(tabsConfig, "data[0].key")); - const [activeKey, setActiveKey] = (0, import_react.useState)("related"); - const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0); - const tabsConfig = !(0, import_func.isEmpty)(tabs) ? tabs : { - data: [ - { - label: "对比图模式", - key: "COMPATER", - children: /* @__PURE__ */ import_react.default.createElement( - import_CombineImage.default, - { - ref: combineImageRef, - data: dataSource[currentIndex] || {} - } - ) - }, - { - label: "场景图模式", - key: "NORMAL", - children: /* @__PURE__ */ import_react.default.createElement( - import_meta.BigImagePreview, - { - ref: bigImagePreviewRef, - height: "500px", - data: dataSource[currentIndex] - } - ) - } - ] - }; - (0, import_react.useEffect)(() => { - (async () => { - let data = {}; - })(); - }, [currentIndex, dataSource, imageData, isRelated]); - (0, import_react.useImperativeHandle)(ref, () => ({ - ref, - tab, - setTab, - modalRef, - activeKey, - setActiveKey, - videoPlayerRef, - combineImageRef, - bigImagePreviewRef - })); - return /* @__PURE__ */ import_react.default.createElement( - import_meta.Modal, - { - destroyOnClose: true, - open, - ref: modalRef, - footer, - className: componentPrefix, - title, - ...props - }, - /* @__PURE__ */ import_react.default.createElement( - "div", - { - style: { - marginTop: "16px" - } - }, - /* @__PURE__ */ import_react.default.createElement( - import_meta.ConfigProvider, - { - theme: { - token: { - colorTextSecondary: "rgba(0,0,0,0.45)" - }, - components: { - Descriptions: { - titleMarginBottom: "20px", - viewBg: "#f6f6f6", - titleColor: "rgba(0,0,0,0.45)", - colorTextLabel: "rgba(0,0,0,0.45)", - contentColor: "rgba(0,0,0,0.88)" - } - } - } - }, - attributeList.map((descriptions) => { - var _a2; - return /* @__PURE__ */ import_react.default.createElement( - import_meta.Descriptions, - { - key: descriptions.title, - title: /* @__PURE__ */ import_react.default.createElement("p", { style: { margin: "12px 0 0", fontSize: initialStyle.fontSize } }, descriptions.title), - column: 8, - style: { padding: "0 64px" } - }, - (_a2 = descriptions == null ? void 0 : descriptions.children) == null ? void 0 : _a2.map((item) => /* @__PURE__ */ import_react.default.createElement( - DescriptionsItem, - { - key: item.key, - label: item.label, - span: 1, - contentStyle: { fontSize: initialStyle.fontSize }, - labelStyle: { fontSize: initialStyle.fontSize } - }, - item.children - )) - ); - }) - ), - /* @__PURE__ */ import_react.default.createElement( - "div", - { - className: (0, import_classnames.default)(`${componentPrefix}-view-container`) - }, - /* @__PURE__ */ import_react.default.createElement( - import_meta.Tabs, - { - activeKey: tab, - centered: true, - destroyInactiveTabPane: true, - onChange: (v) => { - setTab((pre) => { - onTabChange == null ? void 0 : onTabChange(v, pre); - return v; - }); - }, - tabBarStyle: { fontSize: "18px", fontWeight: "bold" }, - items: tabsConfig.data, - ...tabsConfig - } - ), - tab === "VIDEO" && /* @__PURE__ */ import_react.default.createElement(import_meta.VideoPlayer, { ref: videoPlayerRef, url: (_a = dataSource[currentIndex]) == null ? void 0 : _a.flvUrl }), - /* @__PURE__ */ import_react.default.createElement( - import_navigation.default, - { - className: (0, import_classnames.default)( - `${componentPrefix}-view-container__nav`, - currentIndex <= 0 && `${componentPrefix}-view-container__nav--disabled`, - `${componentPrefix}-view-container__nav--left` - ), - show: isRelated ? imageData.length > 1 : dataSource.length > 1, - disabled: currentIndex <= 0, - prev: true, - onClick: () => { - setCurrentIndex((pre) => { - onIndexChange == null ? void 0 : onIndexChange(pre - 1, pre); - return pre - 1; - }); - } - } - ), - /* @__PURE__ */ import_react.default.createElement( - import_navigation.default, - { - className: (0, import_classnames.default)( - `${componentPrefix}-view-container__nav`, - (currentIndex >= imageData.length - 1 || currentIndex >= dataSource.length - 1) && `${componentPrefix}-view-container__nav--disabled`, - `${componentPrefix}-view-container__nav--right` - ), - show: isRelated ? imageData.length > 1 : dataSource.length > 1, - disabled: currentIndex >= imageData.length - 1 || currentIndex >= dataSource.length - 1, - next: true, - onClick: async (e) => { - setCurrentIndex((pre) => { - onIndexChange == null ? void 0 : onIndexChange(pre + 1, pre); - return pre + 1; - }); - } - } - ) - ) - ) - ); -}); -var BigImageModal_default = BigImageModal; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - componentPrefix -}); diff --git a/packages/biz/lib/BigImageModal/components/CombineImage/index.d.ts b/packages/biz/lib/BigImageModal/components/CombineImage/index.d.ts deleted file mode 100644 index 19dbaa2..0000000 --- a/packages/biz/lib/BigImageModal/components/CombineImage/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { FC } from 'react'; -interface ComBineImageProps { - data: { - imgSummary: string; - compaterImages: string[]; - imageKey: string; - score: number; - }; -} -declare const ComBineImage: FC; -export default ComBineImage; diff --git a/packages/biz/lib/BigImageModal/components/CombineImage/index.js b/packages/biz/lib/BigImageModal/components/CombineImage/index.js deleted file mode 100644 index aa5aca2..0000000 --- a/packages/biz/lib/BigImageModal/components/CombineImage/index.js +++ /dev/null @@ -1,71 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/BigImageModal/components/CombineImage/index.tsx -var CombineImage_exports = {}; -__export(CombineImage_exports, { - default: () => CombineImage_default -}); -module.exports = __toCommonJS(CombineImage_exports); -var import_react = __toESM(require("react")); -var import_meta = require("@zhst/meta"); -var ComBineImage = (0, import_react.forwardRef)((props, ref) => { - const { data } = props; - const { imgSummary, compaterImages = [] } = data; - const targetImageRef = (0, import_react.useRef)(null); - const compareImageRef = (0, import_react.useRef)(null); - const [targetIndex, setTargetIndex] = (0, import_react.useState)(compaterImages.findIndex((_url) => imgSummary === _url) || 0); - (0, import_react.useImperativeHandle)(ref, () => ({ - compareImageRef, - targetImageRef - })); - return /* @__PURE__ */ import_react.default.createElement(import_meta.Flex, { justify: "space-evenly", align: "center", style: { padding: "0 32px" } }, /* @__PURE__ */ import_react.default.createElement( - import_meta.CompareImage, - { - ref: targetImageRef, - preDisable: targetIndex === 0, - nextDisable: targetIndex >= compaterImages.length - 1, - onNext: () => setTargetIndex(targetIndex + 1), - onPre: () => setTargetIndex(targetIndex - 1), - showScore: false, - openRoll: !!compaterImages.length, - url: compaterImages[targetIndex] || imgSummary, - label: "目标图" - } - ), /* @__PURE__ */ import_react.default.createElement(import_meta.Score, { score: data.score }), /* @__PURE__ */ import_react.default.createElement( - import_meta.CompareImage, - { - ref: compareImageRef, - url: data.imageKey, - openRoll: false, - score: data.score, - label: "对比图" - } - )); -}); -var CombineImage_default = ComBineImage; diff --git a/packages/biz/lib/BigImageModal/components/navigation/index.d.ts b/packages/biz/lib/BigImageModal/components/navigation/index.d.ts deleted file mode 100644 index 78b1ca8..0000000 --- a/packages/biz/lib/BigImageModal/components/navigation/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as React from 'react'; -import './index.less'; -declare const Navigation: React.FC<{ - show?: boolean; - onClick?: React.MouseEventHandler; - prev?: boolean; - next?: boolean; - disabled?: boolean; - className?: string; - color?: string; - hoverColor?: string; -}>; -export default Navigation; diff --git a/packages/biz/lib/BigImageModal/components/navigation/index.js b/packages/biz/lib/BigImageModal/components/navigation/index.js deleted file mode 100644 index 53219e6..0000000 --- a/packages/biz/lib/BigImageModal/components/navigation/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/BigImageModal/components/navigation/index.tsx -var navigation_exports = {}; -__export(navigation_exports, { - default: () => navigation_default -}); -module.exports = __toCommonJS(navigation_exports); -var React = __toESM(require("react")); -var import_classnames = __toESM(require("classnames")); -var import_meta = require("@zhst/meta"); -var import_index = require("./index.less"); -var componentName = `zhst-image__nav`; -var Navigation = (props) => { - const { show, prev, next, disabled, onClick, className, color } = props; - return /* @__PURE__ */ React.createElement( - "div", - { - className: (0, import_classnames.default)( - `${componentName}`, - prev && `${componentName}-prev`, - next && `${componentName}-next`, - disabled && `${componentName}--disable`, - !show && `${componentName}--hide`, - className - ) - }, - /* @__PURE__ */ React.createElement(import_meta.Button, { type: "text", disabled, onClick }, /* @__PURE__ */ React.createElement(import_meta.Icon, { size: 28, color, icon: prev ? "icon-qiehuanzuo" : "icon-qiehuanyou" })) - ); -}; -var navigation_default = Navigation; diff --git a/packages/biz/lib/BigImageModal/components/navigation/index.less b/packages/biz/lib/BigImageModal/components/navigation/index.less deleted file mode 100644 index 0a834f9..0000000 --- a/packages/biz/lib/BigImageModal/components/navigation/index.less +++ /dev/null @@ -1,44 +0,0 @@ -.zhst-image__nav { - position: absolute; - display: flex; - width: 48px; - height: 100%; - flex-shrink: 0; - align-items: center; - justify-content: center; - cursor: pointer; - font-size: 0; - - &>button { - & span { - display: flex; - } - } - - :global { - i:hover { - color: #f0f0f0 !important; - } - } - - &--disable { - :global { - i { - color: #f0f0f0; - cursor: not-allowed !important; - } - } - } - - &--hide { - display: none; - } - - &-prev { - left: 20px; - } - - &-next { - right: 20px; - } -} diff --git a/packages/biz/lib/BigImageModal/images/emptyImage.png b/packages/biz/lib/BigImageModal/images/emptyImage.png deleted file mode 100644 index 9762957..0000000 Binary files a/packages/biz/lib/BigImageModal/images/emptyImage.png and /dev/null differ diff --git a/packages/biz/lib/BigImageModal/images/percent_background.png b/packages/biz/lib/BigImageModal/images/percent_background.png deleted file mode 100644 index ebde317..0000000 Binary files a/packages/biz/lib/BigImageModal/images/percent_background.png and /dev/null differ diff --git a/packages/biz/lib/BigImageModal/index.d.ts b/packages/biz/lib/BigImageModal/index.d.ts deleted file mode 100644 index bb07714..0000000 --- a/packages/biz/lib/BigImageModal/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import BigImageModal from "./BigImageModal"; -export type { BigImageModalProps } from './BigImageModal'; -export default BigImageModal; diff --git a/packages/biz/lib/BigImageModal/index.js b/packages/biz/lib/BigImageModal/index.js deleted file mode 100644 index 93ee703..0000000 --- a/packages/biz/lib/BigImageModal/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/BigImageModal/index.tsx -var BigImageModal_exports = {}; -__export(BigImageModal_exports, { - default: () => BigImageModal_default -}); -module.exports = __toCommonJS(BigImageModal_exports); -var import_BigImageModal = __toESM(require("./BigImageModal")); -var BigImageModal_default = import_BigImageModal.default; diff --git a/packages/biz/lib/BigImageModal/index.less b/packages/biz/lib/BigImageModal/index.less deleted file mode 100644 index 8e98e2e..0000000 --- a/packages/biz/lib/BigImageModal/index.less +++ /dev/null @@ -1,514 +0,0 @@ -.zhst-image { - .zhst-dialog-content { - box-shadow: 0 4px 12px rgb(0 0 0 / 20%); - } - - .zhst-tabs .zhst-tabs-nav-wrap { - background-color: #f6f6f6; - } - - - &-view-container { - position: relative; - width: 100%; - margin-bottom: 16px; - - &__nav { - position: absolute; - z-index: 99; - top: 50%; - width: 40px !important; - height: 40px !important; - background: #d9d9d9; - border-radius: 100%; - cursor: pointer; - transform: translateY(-50%); - - &>button { - display: flex; - align-items: center; - color: #fff !important; - } - - &--disabled { - opacity: 0.3; - - &>button { - color: #fff !important; - } - } - } - - &__nav:hover { - background: #09f; - color: #fff !important; - } - } - - &-tool-container { - width: 100%; - height: 40px; - margin-bottom: 16px; - } - - &__face-score { - position: absolute; - right: 90px; - bottom: 80px; - color: red; - font-family: 'Microsoft YaHei'; - font-size: 19px; - font-weight: bold; - } - - &-carousel-container { - position: relative; - width: 100%; - height: 100px; - margin-top: 16px; - margin-bottom: 24px; - } -} - - -.zhst-image__tool { - display: flex; - width: 100%; - align-items: center; - font-size: 14px; - - &-split { - width: 0; - height: 14px; - - &::before { - display: block; - height: 100%; - border-left: 1px solid #e6e7eb; - content: ''; - } - } - - &-zoom { - display: inline-flex; - align-items: center; - - &> :not(:last-child) { - margin-right: 14px; - } - - &__scale { - display: inline-block; - width: 38px; - height: 14px; - - // margin-left: 15px; - box-sizing: content-box; - border: 1px solid rgb(77 77 77 / 100%); - margin-top: 2px; //对齐 - background: rgb(255 255 255 / 100%); - border-radius: 2px; - color: #4d4d4d; - cursor: default; - font-size: 12px; - line-height: 14px; - text-align: center; - } - } - - &-switch { - display: flex; - width: 30px; - flex-shrink: 0; - align-items: center; - justify-content: center; - margin: 0 26px; - } - - &-left { - display: flex; - flex: 1; - align-items: center; - justify-content: flex-end; - - &> :not(:last-child) { - margin-right: 14px; - } - } - - &-right { - display: flex; - flex: 1; - align-items: center; - justify-content: flex-start; - - &> :not(:first-child) { - margin-left: 20px; - } - } - - &-icon-container { - font-size: 14px; - - &--active { - color: #5584ff !important; - } - - &> :first-child { - margin-right: 2px; - } - } -} - -.zhst-image__carousel { - position: relative; - display: flex; - width: 742px; - height: 100px; - align-items: center; - justify-content: center; - border: 1px solid #f0f0f0; - margin: 0 auto; - background: #fafafa; - border-radius: 2px; - user-select: none; - - &-container { - width: (58px + 8px) * 10; - } - - &-item { - display: flex; - width: 58px + 8px; - align-items: center; - justify-content: center; - } - - &-item-img { - /* 尝试消除transform 副作用 */ - position: relative; - z-index: 99; - - // width: 58px; - // height: 76px; - display: flex; - width: 66px; - height: 84px; - box-sizing: border-box; - align-items: center; - justify-content: center; - background: #fafafa; - cursor: pointer; - - /* 尝试消除transform 副作用 end */ - &--active { - border: 2px solid #09f; - border-radius: 1px; - } - - &>div { - /* 尝试消除transform 副作用 */ - position: relative; - z-index: 99; - overflow: hidden; - width: 58px; - height: 76px; - - /* 尝试消除transform 副作用 end */ - &>img { - width: 58px; - height: 76px; - object-fit: contain; - transition: all 0.2s; - - &:hover { - transform: scale(1.5); - } - } - } - } -} - -.zhst-image__trackmodel { - &__panel { - position: relative; - z-index: 99; - top: 0; - right: 0; - width: 320px; - height: 100%; - background-color: #fff; - - &--head { - width: 100%; - height: 40px; - padding: 0 16px; - border-bottom: 1px solid #f0f0f0; - color: #333; - font-size: 14px; - font-weight: bold; - line-height: 40px; - text-align: left; - } - - &--track { - height: calc(100% - 40px); - } - - &-date { - padding: 10px 6px; - - // position: absolute; - } - } - - &--bigImage { - position: absolute; - z-index: 100; - top: 0; - left: 0; - display: flex; - width: 100%; - height: 100%; - justify-content: center; - padding-top: 59px; - background: rgb(0 0 0 / 40%); - - &--image { - width: 946px; - height: 532px; - - &>img { - width: 946px; - height: 532px; - object-fit: contain; - } - } - - &--close { - margin-left: 16px; - color: #fff; - } - } - - &__flooter { - position: absolute; - z-index: 999; - bottom: -124px; - left: 0; - width: calc(100% - 320px - 10px); - height: 144px; - background: #fff; - box-shadow: 0 0 8px 0 rgb(172 172 172 / 50%); - - &--head { - display: flex; - height: 20px; - align-items: center; - justify-content: center; - background: #f6f6f6; - color: #999; - line-height: 16px; - } - - &--body { - display: flex; - height: calc(100% - 20px); - padding-left: 50px; - - &__title { - color: #333; - font-size: 12px; - font-weight: bold; - line-height: 16px; - } - - &__text { - overflow: hidden; - color: #333; - font-size: 12px; - line-height: 16px; - text-overflow: ellipsis; - white-space: nowrap; - } - - &--left { - display: flex; - width: 75px; - height: 100; - align-items: center; - - &>img { - width: 75px; - height: 100px; - object-fit: contain; - } - } - - &--middle { - display: grid; - width: 331px; - justify-content: flex-start; - padding: 8px 20px; - border-right: 1px solid #f0f0f0; - - &>div { - display: flex; - } - } - - &--right { - display: grid; - width: calc(100% - 331px - 75px); - padding: 8px 20px; - - &>div { - display: flex; - } - - &__button-list { - display: flex; - align-items: center; - - &>button { - margin-right: 20px; - - &>span { - color: #09f !important; - } - - &:hover { - &>span { - color: #247fdb !important; - } - } - } - } - } - } - - @keyframes close { - from { - bottom: 0; - } - - to { - bottom: -124px; - } - } - - @keyframes open { - from { - bottom: -124px; - } - - to { - bottom: 0; - } - } - - &--close { - bottom: -124px; - animation-duration: 1s; - animation-name: close; - } - - &--open { - bottom: 0; - animation-duration: 1s; - animation-name: open; - } - } -} - -.zhst-image__attributePanel { - margin: 0 66px; - background: #f6f6f6; - margin-top: 20px; - padding-top: 16px; - display: flex; - justify-content: center; - - &>div:first-child { - width: fit-content; - display: flex; - flex-direction: column; - } - - &-title { - color: rgb(0 0 0 / 88%); - font-weight: bold; - padding-bottom: 12px; - } - - &-item { - display: flex; - } - - &-label { - color: rgb(0 0 0 / 45%); - } - - &-value { - color: rgb(0 0 0 / 88%); - } -} - -.relatedWrapper { - width: 100%; - height: 100px; - padding: 0 30px; - margin-bottom: 30px; - box-sizing: border-box; - - .relatedTabs { - width: 100%; - height: 100px; - } - - .relatedContent { - width: 100%; - height: 100px; - display: flex; - - .relatedPics { - width: 742px; - height: 100px; - } - - .disabled { - color: rgba(0, 0, 0, 25%); - } - - .relatedBtn { - flex: 1; - font-size: 14px; - color: #333; - display: flex; - align-items: flex-end; - cursor: pointer; - - &:hover { - color: #09f; - } - } - } - - :global { - .ant-tabs-left>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane { - padding-left: 16px; - } - - .ant-tabs-tab { - padding: 8px 12px !important; - text-align: right !important; - } - - .ant-tabs .ant-tabs-tab { - font-size: 14px; - font-weight: bold; - text-align: right; - justify-content: flex-end; - } - } -} diff --git a/packages/biz/lib/BigImageModal/mock.d.ts b/packages/biz/lib/BigImageModal/mock.d.ts deleted file mode 100644 index 68ff4e3..0000000 --- a/packages/biz/lib/BigImageModal/mock.d.ts +++ /dev/null @@ -1,245 +0,0 @@ -export declare const IMAGE_DATA: { - enAbleDeleteFeature: boolean; - tabsFilter: string[]; - selectIndex: number; - disableBtn: number[]; - dataSource: { - objectId: string; - condition: { - featureInfo: null; - featureData: string; - imageData: string; - alg: string; - rect: { - x: number; - y: number; - w: number; - h: number; - }; - objectImageUrl: string; - srcImageUrl: string; - }; - score: number; - timestamp: number; - deviceId: string; - id: string; - name: string; - dirid: string; - status: string; - longitude: number; - latitude: number; - caseId: string; - caseGroup: string; - isDeleted: string; - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - isObjectTrack: boolean; - pathId: string; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - level: number; - bboxInFrame: { - x: number; - y: number; - w: number; - h: number; - }; - bboxExtInFrame: { - x: number; - y: number; - w: number; - h: number; - }; - objectImageKey: string; - objectExtImageKey: string; - frameImageKey: string; - confidence: number; - sourceObjectId: string; - storeTimestamp: string; - gbNumber: string; - qualityScore: number; - subObjectCount: number; - subObjectType: string[]; - subObjectIds: string[]; - solutionId: string; - fragmentId: string; - contrastKey: string; - compaterImages: string[]; - imgSummary: string; - imageKey: string; - srcImageUrl: string; - algorithmVersion: string; - cameraId: string; - cameraName: string; - }[]; - isArchiveDetail: boolean; - ToolProps: { - renderVideoBtn: boolean; - disableVideo: boolean; - }; - specialTitle: string; -}; -export declare const BIG_IMAGE_DATA: ({ - imageKey: string; - imgSummary: string; - flvUrl: string; - compaterImages: string[]; - odRect: { - x: number; - y: number; - w: number; - h: number; - }; - attachImg: { - url: string; - label: string; - }[]; - score: string; - showScore: boolean; - cameraPosition: string; - time: string; - objects: { - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - sourceObjectId: string; - level: number; - confidence: number; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - infoOnSource: { - bboxInFrame: { - bboxRatio: { - x: number; - y: number; - w: number; - h: number; - }; - }; - countInSource: number; - indexInSource: number; - }; - qualityScore: number; - }[]; -} | { - imageKey: string; - imgSummary: string; - odRect: { - x: number; - y: number; - w: number; - h: number; - }; - attachImg: { - url: string; - label: string; - }[]; - flvUrl: string; - score: number; - showScore: boolean; - cameraPosition: string; - time: string; - objects: ({ - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - sourceObjectId: string; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - infoOnSource: { - bboxInFrame: { - bboxRatio: { - x: number; - y: number; - w: number; - h: number; - }; - }; - countInSource: number; - indexInSource: number; - }; - qualityScore: number; - level?: undefined; - confidence?: undefined; - } | { - objectIndex: { - objectId: string; - solutionId: string; - deviceId: string; - fragmentId: string; - }; - objectType: string; - sourceObjectId: string; - level: number; - confidence: number; - frameInfo: { - frameId: string; - frameTimestamp: string; - width: number; - height: number; - originWidth: number; - originHeight: number; - offsetTime: string; - skipNumber: string; - }; - infoOnSource: { - bboxInFrame: { - bboxRatio: { - x: number; - y: number; - w: number; - h: number; - }; - }; - countInSource: number; - indexInSource: number; - }; - qualityScore: number; - })[]; - compaterImages?: undefined; -})[]; -export declare const attributeList: { - title: string; - children: { - key: string; - label: string; - children: string; - }[]; -}[]; diff --git a/packages/biz/lib/BigImageModal/mock.js b/packages/biz/lib/BigImageModal/mock.js deleted file mode 100644 index 42b5935..0000000 --- a/packages/biz/lib/BigImageModal/mock.js +++ /dev/null @@ -1,567 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/BigImageModal/mock.ts -var mock_exports = {}; -__export(mock_exports, { - BIG_IMAGE_DATA: () => BIG_IMAGE_DATA, - IMAGE_DATA: () => IMAGE_DATA, - attributeList: () => attributeList -}); -module.exports = __toCommonJS(mock_exports); -var IMAGE_DATA = { - "enAbleDeleteFeature": true, - "tabsFilter": [ - "COMPATER", - "NORMAL" - ], - "selectIndex": 4, - "disableBtn": [ - 0, - 1, - 4, - 20 - ], - "dataSource": [ - { - "objectId": "1742110565582518272", - "condition": { - "featureInfo": null, - "featureData": "AAAAAAAAAAAAAAAAAAAAAAA==", - "imageData": "", - "alg": "VERSION_REID_HEAD_ATTR", - "rect": { - "x": 0.271875, - "y": 0.32222223, - "w": 0.2859375, - "h": 0.67777777 - }, - "objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg", - "srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg" - }, - "score": 0.7163062, - "timestamp": 1704186491979, - "deviceId": "129533", - "id": "129533", - "name": "4楼门口过道人脸", - "dirid": "0", - "status": "1", - "longitude": 120.125, - "latitude": 30.280500411987305, - "caseId": "0", - "caseGroup": "", - "isDeleted": "DEVICEMANAGER_BOOL_DEFAULT", - "objectIndex": { - "objectId": "1742110565582518272", - "solutionId": "1", - "deviceId": "129533", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "isObjectTrack": true, - "pathId": "1742110532019697664", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1704186491979", - "width": 0, - "height": 0, - "originWidth": 1920, - "originHeight": 1080, - "offsetTime": "24714687", - "skipNumber": "0" - }, - "level": 1, - "bboxInFrame": { - "x": 0.603125, - "y": 0.3314815, - "w": 0.0578125, - "h": 0.2712963 - }, - "bboxExtInFrame": { - "x": 0.546875, - "y": 0.2638889, - "w": 0.17135416, - "h": 0.40648147 - }, - "objectImageKey": "", - "objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg", - "frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg", - "confidence": 0.817271, - "sourceObjectId": "1742110565603489792", - "storeTimestamp": "0", - "gbNumber": "", - "qualityScore": 0, - "subObjectCount": 1, - "subObjectType": [ - "OBJECT_TYPE_FACE" - ], - "subObjectIds": [ - "1742110532015503360" - ], - "solutionId": "1", - "fragmentId": "0", - "contrastKey": "singer-20240102/1/129533/1742110565582518272.jpg", - "compaterImages": [ - "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg" - ], - "imgSummary": "singer-20240102/1/129533/1742110565582518272.jpg", - "imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565582518272.jpg", - "srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742110565603489792.jpg", - "algorithmVersion": "VERSION_REID_HEAD_ATTR", - "cameraId": "129533", - "cameraName": "4楼门口过道人脸" - }, - { - "objectId": "1742092680994764802", - "condition": { - "featureInfo": null, - "featureData": "AAAAAAAAAAAAAAAAAAAAAAAAA==", - "imageData": "", - "alg": "VERSION_REID_HEAD_ATTR", - "rect": { - "x": 0.271875, - "y": 0.32222223, - "w": 0.2859375, - "h": 0.67777777 - }, - "objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg", - "srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg" - }, - "score": 0.7007122, - "timestamp": 1704182225679, - "deviceId": "129533", - "id": "129533", - "name": "4楼门口过道人脸", - "dirid": "0", - "status": "1", - "longitude": 120.125, - "latitude": 30.280500411987305, - "caseId": "0", - "caseGroup": "", - "isDeleted": "DEVICEMANAGER_BOOL_DEFAULT", - "objectIndex": { - "objectId": "1742092680994764802", - "solutionId": "1", - "deviceId": "129533", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "isObjectTrack": true, - "pathId": "1742092646219790337", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1704182225679", - "width": 0, - "height": 0, - "originWidth": 1920, - "originHeight": 1080, - "offsetTime": "20448387", - "skipNumber": "0" - }, - "level": 1, - "bboxInFrame": { - "x": 0.5265625, - "y": 0.49537036, - "w": 0.104166664, - "h": 0.35833332 - }, - "bboxExtInFrame": { - "x": 0.465625, - "y": 0.40648147, - "w": 0.22708334, - "h": 0.537963 - }, - "objectImageKey": "", - "objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg", - "frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg", - "confidence": 0.769764, - "sourceObjectId": "1742092681720379392", - "storeTimestamp": "0", - "gbNumber": "", - "qualityScore": 0, - "subObjectCount": 0, - "subObjectType": [], - "subObjectIds": [], - "solutionId": "1", - "fragmentId": "0", - "contrastKey": "singer-20240102/1/129533/1742092680994764802.jpg", - "compaterImages": [ - "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg" - ], - "imgSummary": "singer-20240102/1/129533/1742092680994764802.jpg", - "imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092680994764802.jpg", - "srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129533/1742092681720379392.jpg", - "algorithmVersion": "VERSION_REID_HEAD_ATTR", - "cameraId": "129533", - "cameraName": "4楼门口过道人脸" - }, - { - "objectId": "1742092514409592832", - "condition": { - "featureInfo": null, - "featureData": "AAAAAAAAAAAAAAAAAAAAAAAA==", - "imageData": "", - "alg": "VERSION_REID_HEAD_ATTR", - "rect": { - "x": 0.271875, - "y": 0.32222223, - "w": 0.2859375, - "h": 0.67777777 - }, - "objectImageUrl": "singer-20240102/1/129529/1742047651878156288.jpg", - "srcImageUrl": "singer-20240102/1/129529/1742047652511496192.jpg" - }, - "score": 0.703765, - "timestamp": 1704182186451, - "deviceId": "129529", - "id": "129529", - "name": "4入口人脸", - "dirid": "0", - "status": "1", - "longitude": 120.12100219726562, - "latitude": 30.280099868774414, - "caseId": "0", - "caseGroup": "", - "isDeleted": "DEVICEMANAGER_BOOL_DEFAULT", - "objectIndex": { - "objectId": "1742092514409592832", - "solutionId": "1", - "deviceId": "129529", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "isObjectTrack": true, - "pathId": "1742092482440607744", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1704182186451", - "width": 0, - "height": 0, - "originWidth": 2560, - "originHeight": 1440, - "offsetTime": "20409182", - "skipNumber": "0" - }, - "level": 1, - "bboxInFrame": { - "x": 0.6195313, - "y": 0.24583334, - "w": 0.09804688, - "h": 0.41944444 - }, - "bboxExtInFrame": { - "x": 0.53515625, - "y": 0.14027777, - "w": 0.26640624, - "h": 0.63125 - }, - "objectImageKey": "", - "objectExtImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg", - "frameImageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg", - "confidence": 0.92494, - "sourceObjectId": "1742092515508500480", - "storeTimestamp": "0", - "gbNumber": "", - "qualityScore": 0, - "subObjectCount": 1, - "subObjectType": [ - "OBJECT_TYPE_FACE" - ], - "subObjectIds": [ - "1742092482432219136" - ], - "solutionId": "1", - "fragmentId": "0", - "contrastKey": "singer-20240102/1/129529/1742092514409592832.jpg", - "compaterImages": [ - "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742047651878156288.jpg" - ], - "imgSummary": "singer-20240102/1/129529/1742092514409592832.jpg", - "imageKey": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092514409592832.jpg", - "srcImageUrl": "http://10.0.0.7:30003/file/singer-20240102/1/129529/1742092515508500480.jpg", - "algorithmVersion": "VERSION_REID_HEAD_ATTR", - "cameraId": "129529", - "cameraName": "4入口人脸" - } - ], - "isArchiveDetail": false, - "ToolProps": { - "renderVideoBtn": true, - "disableVideo": false - }, - "specialTitle": "" -}; -var BIG_IMAGE_DATA = [ - { - imageKey: "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622934503424.jpg", - imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg", - flvUrl: "ws://10.0.0.120:9033/flv/Sip/34020000001310000301.flv?ip=10.0.0.120&stime=1704815972&etime=1704815992", - compaterImages: [ - "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg", - "http://10.0.0.120:30003/file/public/public_20240117/file/dfdd3340-53c8-4dc4-9921-f13230aa0355.jpg" - ], - odRect: { - "x": 0.5445312, - "y": 0.19166666, - "w": 0.08671875, - "h": 0.40138888 - }, - attachImg: [ - { - "url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894622695428096.jpg", - "label": "形体" - }, - { - "url": "http://10.0.0.120:30003/file/singer-20240110/1/5/1744894588427964418.jpg", - "label": "人脸" - } - ], - score: "0.6", - // 人脸质量分 - showScore: true, - // 人脸质量分 - cameraPosition: "string", - // 摄像头位置 - time: "2022-01-01", - // 摄像头拍摄时间 - objects: [ - { - "objectIndex": { - "objectId": "1746832189053474816", - "solutionId": "0", - "deviceId": "0", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "sourceObjectId": "0", - "level": 0, - "confidence": 0.881164, - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1705312223057", - "width": 0, - "height": 0, - "originWidth": 0, - "originHeight": 0, - "offsetTime": "0", - "skipNumber": "0" - }, - "infoOnSource": { - "bboxInFrame": { - "bboxRatio": { - "x": 0.61418945, - "y": 0.34309354, - "w": 0.067661405, - "h": 0.34659258 - } - }, - "countInSource": 0, - "indexInSource": 0 - }, - "qualityScore": 0 - } - ] - }, - { - imageKey: "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581994436608.jpg", - imgSummary: "http://10.0.0.120:30003/file/singer-20240117/1/5/1747536346412488704.jpg", - odRect: { - "x": 0.553125, - "y": 0.29722223, - "w": 0.048958335, - "h": 0.2462963 - }, - attachImg: [ - { - "url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795581163964416.jpg", - "label": "形体" - }, - { - "url": "http://10.0.0.120:30003/file/singer-20240115/1/9/1746795546867140608.jpg", - "label": "人脸" - } - ], - flvUrl: "ws://10.0.0.120:9033/flv/HaikangNvr/34.flv?ip=10.0.2.103&stime=1705302394&etime=1705302414", - score: 0.815207, - // 人脸质量分 - showScore: true, - // 人脸质量分 - cameraPosition: "string", - // 摄像头位置 - time: "2022-01-01", - // 摄像头拍摄时间 - objects: [ - { - "objectIndex": { - "objectId": "1746816737430472704", - "solutionId": "0", - "deviceId": "0", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "sourceObjectId": "0", - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1705308539109", - "width": 0, - "height": 0, - "originWidth": 0, - "originHeight": 0, - "offsetTime": "0", - "skipNumber": "0" - }, - "infoOnSource": { - "bboxInFrame": { - "bboxRatio": { - "x": 0.5519352, - "y": 0.2965385, - "w": 0.05185461, - "h": 0.24698898 - } - }, - "countInSource": 0, - "indexInSource": 0 - }, - "qualityScore": 0 - }, - { - "objectIndex": { - "objectId": "1746816737430472705", - "solutionId": "0", - "deviceId": "0", - "fragmentId": "0" - }, - "objectType": "OBJECT_TYPE_PEDESTRAIN", - "sourceObjectId": "0", - "level": 0, - "confidence": 0.9310699, - "frameInfo": { - "frameId": "0", - "frameTimestamp": "1705308539109", - "width": 0, - "height": 0, - "originWidth": 0, - "originHeight": 0, - "offsetTime": "0", - "skipNumber": "0" - }, - "infoOnSource": { - "bboxInFrame": { - "bboxRatio": { - "x": 0.58543766, - "y": 0.3203356, - "w": 0.052037954, - "h": 0.2664015 - } - }, - "countInSource": 0, - "indexInSource": 0 - }, - "qualityScore": 0 - } - ] - } -]; -var attributeList = [ - { - title: "人员属性", - children: [ - { - key: "1", - label: "性别", - children: "男" - }, - { - key: "2", - label: "年龄", - children: "成年" - }, - { - key: "3", - label: "帽子", - children: "无" - }, - { - key: "4", - label: "上身颜色", - children: "灰" - }, - { - key: "5", - label: "下身颜色", - children: "蓝色" - }, - { - key: "6", - label: "附着物", - children: "无" - }, - { - key: "7", - label: "骑行", - children: "否" - } - ] - }, - { - title: "社区规范", - children: [ - { - key: "1", - label: "性别", - children: "男" - }, - { - key: "2", - label: "年龄", - children: "成年" - }, - { - key: "3", - label: "帽子", - children: "无" - }, - { - key: "4", - label: "上身颜色", - children: "灰" - }, - { - key: "5", - label: "下身颜色", - children: "蓝色" - }, - { - key: "6", - label: "附着物", - children: "无" - }, - { - key: "7", - label: "骑行", - children: "否" - } - ] - } -]; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - BIG_IMAGE_DATA, - IMAGE_DATA, - attributeList -}); diff --git a/packages/biz/lib/BigImageModal/util/bigImageModalAdapter.d.ts b/packages/biz/lib/BigImageModal/util/bigImageModalAdapter.d.ts deleted file mode 100644 index 185982d..0000000 --- a/packages/biz/lib/BigImageModal/util/bigImageModalAdapter.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * 适配老的大屏组件数据格式传入 - */ -import React from 'react'; -import { AlgorithmVersionStr, HumanProperty, ObjectType, Rect } from '@zhst/types'; -import { VideoViewProps, ImgViewProps, VideoViewRef, ImgViewRef } from '@zhst/meta'; -export type TAB_TYPE = 'COMPATER' | 'NORMAL' | 'TRACK'; -export type MODEL_TYPE = 'VIDEO' | 'IMAGE'; -export interface CarouselProps { - hasPre?: boolean; - hasNext?: boolean; - selectIndex: number; - setSelectIndex: React.Dispatch>; - dataSource: Array<{ - key: string; - url: string; - }>; -} -export type ISelectItem = Partial> & Partial>; -/** - * 描述列表 description - */ -export interface HeaderProps { - value: TAB_TYPE; - onChange: (type: TAB_TYPE) => void; - tabsFilter: TAB_TYPE[]; -} -export interface ParamProps { - tab: string; - selectItem: ISelectItem; - imgViewRef: React.MutableRefObject; - VideoViewRef: React.MutableRefObject; - model: MODEL_TYPE; - setModel: React.Dispatch>; - scale$: number; - showCrop$: boolean; -} -/** - * 工具栏 - */ -export interface ToolProps { - renderRight?: (props: ParamProps) => React.ReactNode; - renderLeft?: (props: ParamProps) => React.ReactNode; - renderVideoBtn?: boolean; - param: ParamProps; - disableVideo: boolean; -} -export interface BigImageData { - extendRectList: (Rect & { - algorithmVersion: AlgorithmVersionStr; - imageKey: string; - })[]; - rectList: (Rect & { - algorithmVersion: AlgorithmVersionStr; - imageKey: string; - })[]; - attachImg: { - url: string; - label: '形体' | '人脸'; - }[]; - odRect: Rect; - compaterImages: string[]; - constractKey: string; - frameImageKey: string; - imageKey?: string; - imgSummary: string; - objectExtImageKey: string; - attributeList: { - label: string; - list: any[]; - }[]; - archiveImages?: any; - spaceName: string; - objectIndex?: { - deviceId: string; - fragmentId: string; - objectId: string; - solutionId: string; - }; - objectType: ObjectType; - objectId: string; - bodyObjectId?: string; - faceObjectId?: string; - sourceObjectId?: string; - cameraId: string; - cameraName: string; - selectIndex: number; - humanProperty: HumanProperty; - qualityScore?: number; - score: number; - timestamp: string; - bodyImageUrl: string; - faceImageUrl: string; - algorithmVersion: AlgorithmVersionStr; - bodySpaceName: string; - faceSpaceName: string; - position: { - lat: number; - lng: number; - }; - solutionId?: string; - [index: string]: any; -} -export interface ImageModalDataProps { - targetData: BigImageData[]; - compactData: BigImageData[]; -} -export interface ModalAdapterConfigProps { - oldMode?: boolean; -} -/** - * 大图组件适配器,兼容老接口 - * @param Cmp 大图组件 - * @param config 额外配置 - * @returns 大图组件 - */ -declare const adapter: (Cmp: any, config: ModalAdapterConfigProps) => any; -export default adapter; diff --git a/packages/biz/lib/BigImageModal/util/bigImageModalAdapter.js b/packages/biz/lib/BigImageModal/util/bigImageModalAdapter.js deleted file mode 100644 index cc45b23..0000000 --- a/packages/biz/lib/BigImageModal/util/bigImageModalAdapter.js +++ /dev/null @@ -1,57 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/BigImageModal/util/bigImageModalAdapter.tsx -var bigImageModalAdapter_exports = {}; -__export(bigImageModalAdapter_exports, { - default: () => bigImageModalAdapter_default -}); -module.exports = __toCommonJS(bigImageModalAdapter_exports); -var import_react = __toESM(require("react")); -var translateOldImageData = (_data) => { - return { - ..._data, - open: _data.visible, - onCancel: _data.onClose - }; -}; -var adapter = (Cmp, config) => { - const { oldMode = false } = config; - return (props) => { - const newProps = oldMode ? translateOldImageData(props) : props; - console.log("adapter----适配数据", props, newProps); - delete newProps.visible; - return /* @__PURE__ */ import_react.default.createElement( - Cmp, - { - ...newProps - } - ); - }; -}; -var bigImageModalAdapter_default = adapter; diff --git a/packages/biz/lib/Demo/index.d.ts b/packages/biz/lib/Demo/index.d.ts deleted file mode 100644 index bcc157c..0000000 --- a/packages/biz/lib/Demo/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; -declare const _default: () => React.JSX.Element; -export default _default; diff --git a/packages/biz/lib/Demo/index.js b/packages/biz/lib/Demo/index.js deleted file mode 100644 index 53d0cc4..0000000 --- a/packages/biz/lib/Demo/index.js +++ /dev/null @@ -1,41 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/Demo/index.tsx -var Demo_exports = {}; -__export(Demo_exports, { - default: () => Demo_default -}); -module.exports = __toCommonJS(Demo_exports); -var import_react = __toESM(require("react")); -var import_meta = require("@zhst/meta"); -var import_hooks = require("@zhst/hooks"); -var Demo_default = () => { - const { run } = (0, import_hooks.useThrottleFn)(() => console.log("123")); - return /* @__PURE__ */ import_react.default.createElement(import_meta.Button, { onClick: () => run() }, "测试"); -}; diff --git a/packages/biz/lib/RealTimeMonitor/RealTimeMonitor.d.ts b/packages/biz/lib/RealTimeMonitor/RealTimeMonitor.d.ts deleted file mode 100644 index a3f147f..0000000 --- a/packages/biz/lib/RealTimeMonitor/RealTimeMonitor.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { IRecord, VideoPlayerCardProps, ViewLargerImageModalRef } from '@zhst/biz'; -interface RealTimeMonitorProps { - videoDataSource?: VideoPlayerCardProps[]; - handleWindowClick?: (key?: string) => void; - handleCloseButtonClick?: (key?: string) => void; - selectedWindowKey?: string; - warningDataSource?: IRecord[]; - viewLargerImageModalRef?: React.RefObject; - handleDownloadImg?: (imgSrc?: string) => void; - onRecordClick?: (record?: IRecord) => void; - selectedRecordId?: string; - isRecordListLoading?: boolean; - recordListTitle?: string; - style?: React.CSSProperties; - cardStyle?: React.CSSProperties; - imgStyle?: React.CSSProperties; - largeImageTitle?: string; -} -export declare const RealTimeMonitor: React.FC; -export default RealTimeMonitor; diff --git a/packages/biz/lib/RealTimeMonitor/RealTimeMonitor.js b/packages/biz/lib/RealTimeMonitor/RealTimeMonitor.js deleted file mode 100644 index 48ad4dc..0000000 --- a/packages/biz/lib/RealTimeMonitor/RealTimeMonitor.js +++ /dev/null @@ -1,77 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/RealTimeMonitor/RealTimeMonitor.tsx -var RealTimeMonitor_exports = {}; -__export(RealTimeMonitor_exports, { - RealTimeMonitor: () => RealTimeMonitor, - default: () => RealTimeMonitor_default -}); -module.exports = __toCommonJS(RealTimeMonitor_exports); -var import_react = __toESM(require("react")); -var import_WindowToggle = __toESM(require("./components/WindowToggle")); -var import_WarningRecordList = __toESM(require("./components/WarningRecordList")); -var RealTimeMonitor = (props) => { - const { - videoDataSource, - handleWindowClick, - handleCloseButtonClick, - selectedWindowKey, - warningDataSource, - viewLargerImageModalRef, - handleDownloadImg, - onRecordClick, - selectedRecordId, - isRecordListLoading - } = props; - return /* @__PURE__ */ import_react.default.createElement("div", { className: "zhst-biz-real-time-monitor", style: { display: "flex" } }, /* @__PURE__ */ import_react.default.createElement( - import_WindowToggle.default, - { - selectedWindowKey, - dataSource: videoDataSource, - handleWindowClick, - handleCloseButtonClick - } - ), /* @__PURE__ */ import_react.default.createElement( - import_WarningRecordList.default, - { - dataSource: warningDataSource, - handleDownloadImg, - onRecordClick, - selectedRecordId, - viewLargerImageModalRef, - isRecordListLoading, - recordListTitle: "监控预警记录" - } - )); -}; -var RealTimeMonitor_default = RealTimeMonitor; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - RealTimeMonitor -}); diff --git a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/WarningRecordList.d.ts b/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/WarningRecordList.d.ts deleted file mode 100644 index 6489299..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/WarningRecordList.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { IRecord, ViewLargerImageModalRef } from '@zhst/biz'; -import "./index.less"; -interface WarningRecordListProps { - dataSource?: IRecord[]; - viewLargerImageModalRef?: React.RefObject; - handleDownloadImg?: (imgSrc?: string) => void; - onRecordClick?: (record?: IRecord) => void; - selectedRecordId?: string; - isRecordListLoading?: boolean; - recordListTitle?: string; - style?: React.CSSProperties; - cardStyle?: React.CSSProperties; - imgStyle?: React.CSSProperties; - largeImageTitle?: string; -} -declare const WarningRecordList: React.FC; -export default WarningRecordList; diff --git a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/WarningRecordList.js b/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/WarningRecordList.js deleted file mode 100644 index a2441e3..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/WarningRecordList.js +++ /dev/null @@ -1,74 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/RealTimeMonitor/components/WarningRecordList/WarningRecordList.tsx -var WarningRecordList_exports = {}; -__export(WarningRecordList_exports, { - default: () => WarningRecordList_default -}); -module.exports = __toCommonJS(WarningRecordList_exports); -var import_react = __toESM(require("react")); -var import_biz = require("@zhst/biz"); -var import_antd = require("antd"); -var import_index = require("./index.less"); -var import_icons = require("@ant-design/icons"); -var WarningRecordList = (props) => { - const { - dataSource = [], - viewLargerImageModalRef, - selectedRecordId, - handleDownloadImg, - onRecordClick, - isRecordListLoading, - recordListTitle, - style, - cardStyle, - imgStyle, - largeImageTitle - } = props; - return /* @__PURE__ */ import_react.default.createElement("div", { className: "zhst-biz-warning-record-list", style }, /* @__PURE__ */ import_react.default.createElement("div", { className: "header" }, recordListTitle), /* @__PURE__ */ import_react.default.createElement("div", { className: "body" }, isRecordListLoading ? /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "100%", display: "flex", justifyContent: "center", alignItems: "center" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { indicator: /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, { style: { fontSize: 24 } }) })) : (dataSource == null ? void 0 : dataSource.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction: "vertical", size: 10 }, dataSource == null ? void 0 : dataSource.map( - (record, index) => { - if (index > 2) - return; - return /* @__PURE__ */ import_react.default.createElement( - import_biz.WarningRecordCard, - { - key: record == null ? void 0 : record.id, - record, - onRecordClick: (record2) => { - onRecordClick == null ? void 0 : onRecordClick(record2); - }, - selectedRecordId, - cardStyle: { width: 300, height: 264, ...cardStyle }, - imgStyle: { width: 280, height: 169, ...imgStyle } - } - ); - } - )) : /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "100%", display: "flex", justifyContent: "center", alignItems: "center" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, { description: "暂无数据" }))), /* @__PURE__ */ import_react.default.createElement(import_biz.ViewLargerImageModal, { ref: viewLargerImageModalRef, downloadImg: handleDownloadImg, title: largeImageTitle })); -}; -var WarningRecordList_default = WarningRecordList; diff --git a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.d.ts b/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.d.ts deleted file mode 100644 index b50da75..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import WarningRecordList from './WarningRecordList'; -export default WarningRecordList; diff --git a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.js b/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.js deleted file mode 100644 index 6f47b77..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/RealTimeMonitor/components/WarningRecordList/index.tsx -var WarningRecordList_exports = {}; -__export(WarningRecordList_exports, { - default: () => WarningRecordList_default -}); -module.exports = __toCommonJS(WarningRecordList_exports); -var import_WarningRecordList = __toESM(require("./WarningRecordList")); -var WarningRecordList_default = import_WarningRecordList.default; diff --git a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.less b/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.less deleted file mode 100644 index e348f82..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WarningRecordList/index.less +++ /dev/null @@ -1,20 +0,0 @@ -.zhst-biz-warning-record-list { - display: flex; - flex-direction: column; - border-left: solid 1px #00000026; - width: 320px; - - .header { - width: 100%; - height: 48px; - background-color: #EFF2F4; - padding: 10px 20px; - box-sizing: border-box; - } - - .body { - padding: 10px; - overflow: hidden; - flex: 1; - } -} \ No newline at end of file diff --git a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/WindowToggle.d.ts b/packages/biz/lib/RealTimeMonitor/components/WindowToggle/WindowToggle.d.ts deleted file mode 100644 index c67b407..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/WindowToggle.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { VideoPlayerCardProps } from '@zhst/biz'; -import './index.less'; -interface WindowToggleProps { - dataSource?: VideoPlayerCardProps[]; - handleWindowClick?: (key?: string) => void; - handleCloseButtonClick?: (key?: string) => void; - selectedWindowKey?: string; -} -export declare const WindowToggle: React.FC; -export default WindowToggle; diff --git a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/WindowToggle.js b/packages/biz/lib/RealTimeMonitor/components/WindowToggle/WindowToggle.js deleted file mode 100644 index ccd71ed..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/WindowToggle.js +++ /dev/null @@ -1,88 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/RealTimeMonitor/components/WindowToggle/WindowToggle.tsx -var WindowToggle_exports = {}; -__export(WindowToggle_exports, { - WindowToggle: () => WindowToggle, - default: () => WindowToggle_default -}); -module.exports = __toCommonJS(WindowToggle_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_icons = require("@ant-design/icons"); -var import_biz = require("@zhst/biz"); -var import_index = require("./index.less"); -var import_lib = require("antd/lib"); -var WindowToggle = (props) => { - const { dataSource = [], handleWindowClick, handleCloseButtonClick, selectedWindowKey } = props; - const [size, setSize] = (0, import_react.useState)("large"); - const { useToken } = import_lib.theme; - const { token } = useToken(); - const getLabelStyle = (isSelected) => ({ - padding: "0 11px", - background: "#fff", - ...isSelected ? { background: token.colorPrimary, color: "#fff" } : {} - }); - return /* @__PURE__ */ import_react.default.createElement("div", { className: "zhst-biz-window-toggle" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "header" }, /* @__PURE__ */ import_react.default.createElement( - import_antd.Segmented, - { - defaultValue: "large", - options: [ - { value: "large", label: /* @__PURE__ */ import_react.default.createElement("div", { style: getLabelStyle(size === "large") }, /* @__PURE__ */ import_react.default.createElement(import_icons.BarsOutlined, null)) }, - { value: "small", label: /* @__PURE__ */ import_react.default.createElement("div", { style: getLabelStyle(size === "small") }, /* @__PURE__ */ import_react.default.createElement(import_icons.AppstoreOutlined, null)) } - ], - onChange: (value) => { - if (value === "large" && dataSource.length > 0) { - const { windowKey } = dataSource[0]; - handleWindowClick == null ? void 0 : handleWindowClick(windowKey); - } - setSize(value); - } - } - )), /* @__PURE__ */ import_react.default.createElement("div", { className: "body" }, dataSource == null ? void 0 : dataSource.map((item, index) => { - if (size === "large" && index > 0) - return; - return /* @__PURE__ */ import_react.default.createElement( - import_biz.VideoPlayerCard, - { - key: item.windowKey, - selectedWindowKey, - size, - ...item, - handleWindowClick, - handleCloseButtonClick - } - ); - }))); -}; -var WindowToggle_default = WindowToggle; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - WindowToggle -}); diff --git a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.d.ts b/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.d.ts deleted file mode 100644 index 3b57a45..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import WindowToggle from './WindowToggle'; -export default WindowToggle; diff --git a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.js b/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.js deleted file mode 100644 index 9f8c4b6..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/RealTimeMonitor/components/WindowToggle/index.tsx -var WindowToggle_exports = {}; -__export(WindowToggle_exports, { - default: () => WindowToggle_default -}); -module.exports = __toCommonJS(WindowToggle_exports); -var import_WindowToggle = __toESM(require("./WindowToggle")); -var WindowToggle_default = import_WindowToggle.default; diff --git a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.less b/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.less deleted file mode 100644 index 61c77bd..0000000 --- a/packages/biz/lib/RealTimeMonitor/components/WindowToggle/index.less +++ /dev/null @@ -1,45 +0,0 @@ -.zhst-biz-window-toggle { - display: flex; - flex-direction: column; - flex: 1; - - .header { - width: 100%; - height: 48px; - background-color: #EFF2F4; - padding: 10px 20px; - box-sizing: border-box; - - .ant-segmented { - padding: 0; - - .ant-segmented-group { - border-radius: 4px; - overflow: hidden; - - .ant-segmented-item { - border-radius: 0; - - .ant-segmented-item-label { - padding: 0; - } - } - } - } - } - - .body { - flex: 1; - width: 100%; - background-color: #E5EAEC; - padding: 10px; - box-sizing: border-box; - display: flex; - flex-wrap: wrap; - justify-content: space-between; - - >div { - margin: 10px; - } - } -} \ No newline at end of file diff --git a/packages/biz/lib/RealTimeMonitor/index.d.ts b/packages/biz/lib/RealTimeMonitor/index.d.ts deleted file mode 100644 index 9013d29..0000000 --- a/packages/biz/lib/RealTimeMonitor/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import RealTimeMonitor from './RealTimeMonitor'; -export default RealTimeMonitor; diff --git a/packages/biz/lib/RealTimeMonitor/index.js b/packages/biz/lib/RealTimeMonitor/index.js deleted file mode 100644 index 041c33e..0000000 --- a/packages/biz/lib/RealTimeMonitor/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/RealTimeMonitor/index.tsx -var RealTimeMonitor_exports = {}; -__export(RealTimeMonitor_exports, { - default: () => RealTimeMonitor_default -}); -module.exports = __toCommonJS(RealTimeMonitor_exports); -var import_RealTimeMonitor = __toESM(require("./RealTimeMonitor")); -var RealTimeMonitor_default = import_RealTimeMonitor.default; diff --git a/packages/biz/lib/VideoPlayerCard/VideoPlayerCard.d.ts b/packages/biz/lib/VideoPlayerCard/VideoPlayerCard.d.ts deleted file mode 100644 index cd1775e..0000000 --- a/packages/biz/lib/VideoPlayerCard/VideoPlayerCard.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CardProps } from 'antd'; -import React, { ReactNode } from 'react'; -import './index.less'; -export interface VideoPlayerCardProps { - windowKey?: string; - selectedWindowKey?: string; - showType?: 'video' | "image"; - imgSrc?: string; - videoSrc?: string; - cardProps?: CardProps; - errorReasonText?: string; - isWindowLoading?: boolean; - size?: 'large' | 'small'; - title?: string | ReactNode; - handleCloseButtonClick?: (key?: string) => void; - handleWindowClick?: (key?: string) => void; -} -export declare const VideoPlayerCard: React.FC; -export default VideoPlayerCard; diff --git a/packages/biz/lib/VideoPlayerCard/VideoPlayerCard.js b/packages/biz/lib/VideoPlayerCard/VideoPlayerCard.js deleted file mode 100644 index 8dae8f4..0000000 --- a/packages/biz/lib/VideoPlayerCard/VideoPlayerCard.js +++ /dev/null @@ -1,99 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/VideoPlayerCard/VideoPlayerCard.tsx -var VideoPlayerCard_exports = {}; -__export(VideoPlayerCard_exports, { - VideoPlayerCard: () => VideoPlayerCard, - default: () => VideoPlayerCard_default -}); -module.exports = __toCommonJS(VideoPlayerCard_exports); -var import_antd = require("antd"); -var import_lib = require("antd/lib"); -var import_meta = require("@zhst/meta"); -var import_react = __toESM(require("react")); -var import_icons = require("@ant-design/icons"); -var import_index = require("./index.less"); -var VideoPlayerCard = (props) => { - const componentName = `zhst-biz-video-player-card`; - const { showType, imgSrc, videoSrc, cardProps, isWindowLoading, errorReasonText, size, title, handleCloseButtonClick, handleWindowClick, windowKey, selectedWindowKey = "" } = props; - const [cardContent, setCardContent] = (0, import_react.useState)(null); - const { useToken } = import_lib.theme; - const { token } = useToken(); - const videoRef = (0, import_react.useRef)(null); - const selectedBorderStyle = { - border: `2px solid ${token.colorPrimary}`, - boxShadow: " 0px 2px 9px 0px rgba(0,0,0,0.16)" - }; - const cardStyle = { - ...size === "large" ? { height: 931 } : { height: 456, cursor: "pointer" }, - ...size === "small" && selectedWindowKey === windowKey ? selectedBorderStyle : {} - }; - const videoPlayerCardStyle = size === "small" ? { width: "calc(50% - 20px)" } : { flex: 1 }; - (0, import_react.useEffect)(() => { - var _a; - if (!isWindowLoading && (videoSrc || imgSrc)) { - let contentElement = null; - if (videoSrc) { - contentElement = /* @__PURE__ */ import_react.default.createElement(import_meta.VideoPlayer, { ref: videoRef, url: videoSrc }); - (_a = videoRef.current) == null ? void 0 : _a.setShowCrop(true); - } else if (imgSrc) { - contentElement = /* @__PURE__ */ import_react.default.createElement( - "img", - { - alt: "首帧图", - src: imgSrc, - style: { width: "100%", height: "100%", display: "block" } - } - ); - } - setCardContent(contentElement); - } else { - setCardContent(null); - } - }, [showType, imgSrc, videoSrc, isWindowLoading]); - return /* @__PURE__ */ import_react.default.createElement("div", { className: componentName, onClick: () => { - handleWindowClick == null ? void 0 : handleWindowClick(windowKey); - }, style: videoPlayerCardStyle }, /* @__PURE__ */ import_react.default.createElement( - import_antd.Card, - { - title: /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { style: { width: "100%", justifyContent: "space-between" } }, /* @__PURE__ */ import_react.default.createElement("div", null, title), /* @__PURE__ */ import_react.default.createElement("div", { className: "card-close-button" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", onClick: () => { - handleCloseButtonClick == null ? void 0 : handleCloseButtonClick(windowKey); - } }, /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null)))), - style: { display: "flex", flexDirection: "column", borderRadius: 4, overflow: "hidden", ...cardStyle }, - bodyStyle: { flex: 1 }, - ...cardProps - }, - cardContent ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, cardContent) : /* @__PURE__ */ import_react.default.createElement("div", { style: { backgroundColor: "#000", height: "100%", display: "flex", padding: "20px", boxSizing: "border-box" } }, isWindowLoading ? /* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, display: "flex", justifyContent: "center", alignItems: "center" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { indicator: /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, { style: { fontSize: 24 } }) })) : !!errorReasonText && /* @__PURE__ */ import_react.default.createElement("span", { style: { color: token.colorError } }, errorReasonText)) - )); -}; -var VideoPlayerCard_default = VideoPlayerCard; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - VideoPlayerCard -}); diff --git a/packages/biz/lib/VideoPlayerCard/index.d.ts b/packages/biz/lib/VideoPlayerCard/index.d.ts deleted file mode 100644 index 41afa58..0000000 --- a/packages/biz/lib/VideoPlayerCard/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import VideoPlayerCard from './VideoPlayerCard'; -export type { VideoPlayerCardProps } from './VideoPlayerCard'; -export default VideoPlayerCard; diff --git a/packages/biz/lib/VideoPlayerCard/index.js b/packages/biz/lib/VideoPlayerCard/index.js deleted file mode 100644 index 7810d71..0000000 --- a/packages/biz/lib/VideoPlayerCard/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/VideoPlayerCard/index.tsx -var VideoPlayerCard_exports = {}; -__export(VideoPlayerCard_exports, { - default: () => VideoPlayerCard_default -}); -module.exports = __toCommonJS(VideoPlayerCard_exports); -var import_VideoPlayerCard = __toESM(require("./VideoPlayerCard")); -var VideoPlayerCard_default = import_VideoPlayerCard.default; diff --git a/packages/biz/lib/VideoPlayerCard/index.less b/packages/biz/lib/VideoPlayerCard/index.less deleted file mode 100644 index 0f87e3e..0000000 --- a/packages/biz/lib/VideoPlayerCard/index.less +++ /dev/null @@ -1,30 +0,0 @@ -.zhst-biz-video-player-card { - .ant-card-head { - padding: 0 20px; - } - - .ant-card-body { - padding: 0; - overflow: hidden; - border-radius: 0; - - .zhst-image__video-view { - height: 100%; - } - } - - .card-close-button { - .ant-btn { - padding: 0 3px; - height: 22px; - color: #00000073; - } - - .ant-btn:hover { - padding: 0 3px; - height: 22px; - color: #000000e0; - } - } - -} \ No newline at end of file diff --git a/packages/biz/lib/ViewLargerImageModal/ViewLargerImageModal.d.ts b/packages/biz/lib/ViewLargerImageModal/ViewLargerImageModal.d.ts deleted file mode 100644 index d82a52e..0000000 --- a/packages/biz/lib/ViewLargerImageModal/ViewLargerImageModal.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { ModalProps, SpaceProps } from 'antd'; -import './index.less'; -type ViewLargerImageModalParams = { - imgSrc?: string; - warningData?: { - label?: string; - value?: string; - }[]; -}; -export interface ViewLargerImageModalRef { - show: (params?: ViewLargerImageModalParams) => void; - handleCancel: () => void; -} -export interface ViewLargerImageModalProps { - imgStyle?: React.CSSProperties; - downloadImg?: (imgSrc?: string) => void; - title?: string; - downloadText?: string; - modalProps?: ModalProps; - spaceProps?: SpaceProps; -} -export declare const ViewLargerImageModal: React.ForwardRefExoticComponent>; -export default ViewLargerImageModal; -export declare const useViewLargerImageModal: () => React.RefObject; diff --git a/packages/biz/lib/ViewLargerImageModal/ViewLargerImageModal.js b/packages/biz/lib/ViewLargerImageModal/ViewLargerImageModal.js deleted file mode 100644 index 9d5ef6f..0000000 --- a/packages/biz/lib/ViewLargerImageModal/ViewLargerImageModal.js +++ /dev/null @@ -1,87 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/ViewLargerImageModal/ViewLargerImageModal.tsx -var ViewLargerImageModal_exports = {}; -__export(ViewLargerImageModal_exports, { - ViewLargerImageModal: () => ViewLargerImageModal, - default: () => ViewLargerImageModal_default, - useViewLargerImageModal: () => useViewLargerImageModal -}); -module.exports = __toCommonJS(ViewLargerImageModal_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_theme = __toESM(require("antd/lib/theme")); -var import_icons = require("@ant-design/icons"); -var import_index = require("./index.less"); -var ViewLargerImageModal = (0, import_react.forwardRef)( - (props, ref) => { - const { modalProps, downloadImg, imgStyle, title = "预警大图", downloadText = "下载大图", spaceProps } = props; - const { useToken } = import_theme.default; - const { token } = useToken(); - const [open, setOpen] = (0, import_react.useState)(false); - const [imgSrc, setImgSrc] = (0, import_react.useState)(); - const [warningData, setWarningData] = (0, import_react.useState)(); - const handleCancel = () => { - setOpen(false); - }; - (0, import_react.useImperativeHandle)(ref, () => { - return { - show: (_params) => { - setOpen(true); - setImgSrc(_params == null ? void 0 : _params.imgSrc); - setWarningData(_params == null ? void 0 : _params.warningData); - }, - handleCancel - }; - }); - return /* @__PURE__ */ import_react.default.createElement( - import_antd.Modal, - { - className: "zhst-biz-view-warning-larger-image-modal", - open, - destroyOnClose: true, - title, - width: "1029px", - footer: null, - onCancel: handleCancel, - ...modalProps - }, - /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 0, styles: { item: { backgroundColor: "#F6F9FAFF" } }, ...spaceProps }, /* @__PURE__ */ import_react.default.createElement("img", { alt: title, src: imgSrc, style: { width: 789, height: 444, display: "block", ...imgStyle } }), /* @__PURE__ */ import_react.default.createElement("div", { className: "right-context" }, warningData == null ? void 0 : warningData.map(({ label, value }) => /* @__PURE__ */ import_react.default.createElement("div", { key: label }, /* @__PURE__ */ import_react.default.createElement("span", { className: "context-key" }, `${label}: `), value)), imgSrc && downloadImg && /* @__PURE__ */ import_react.default.createElement("div", { className: "img-download", style: { color: token.colorPrimary }, onClick: () => downloadImg == null ? void 0 : downloadImg(imgSrc) }, /* @__PURE__ */ import_react.default.createElement(import_icons.DownloadOutlined, null), /* @__PURE__ */ import_react.default.createElement("span", { style: { paddingLeft: 3 } }, downloadText)))) - ); - } -); -var ViewLargerImageModal_default = ViewLargerImageModal; -var useViewLargerImageModal = () => { - return (0, import_react.useRef)(null); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ViewLargerImageModal, - useViewLargerImageModal -}); diff --git a/packages/biz/lib/ViewLargerImageModal/index.d.ts b/packages/biz/lib/ViewLargerImageModal/index.d.ts deleted file mode 100644 index 417e8be..0000000 --- a/packages/biz/lib/ViewLargerImageModal/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import ViewLargerImageModal, { useViewLargerImageModal } from './ViewLargerImageModal'; -export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal'; -export default ViewLargerImageModal; -export { useViewLargerImageModal }; diff --git a/packages/biz/lib/ViewLargerImageModal/index.js b/packages/biz/lib/ViewLargerImageModal/index.js deleted file mode 100644 index 936db94..0000000 --- a/packages/biz/lib/ViewLargerImageModal/index.js +++ /dev/null @@ -1,41 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/ViewLargerImageModal/index.tsx -var ViewLargerImageModal_exports = {}; -__export(ViewLargerImageModal_exports, { - default: () => ViewLargerImageModal_default, - useViewLargerImageModal: () => import_ViewLargerImageModal.useViewLargerImageModal -}); -module.exports = __toCommonJS(ViewLargerImageModal_exports); -var import_ViewLargerImageModal = __toESM(require("./ViewLargerImageModal")); -var ViewLargerImageModal_default = import_ViewLargerImageModal.default; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - useViewLargerImageModal -}); diff --git a/packages/biz/lib/ViewLargerImageModal/index.less b/packages/biz/lib/ViewLargerImageModal/index.less deleted file mode 100644 index 32363d0..0000000 --- a/packages/biz/lib/ViewLargerImageModal/index.less +++ /dev/null @@ -1,62 +0,0 @@ -.zhst-biz-view-warning-larger-image-modal { - font-family: MicrosoftYaHei; - - .ant-modal-content { - padding: 0; - height: 492px; - border-radius: 6px; - overflow: hidden; - - .ant-modal-close { - top: 14px; - right: 16px; - } - - .ant-modal-header { - height: 48px; - line-height: 48px; - margin-bottom: 0; - - .ant-modal-title { - height: 100%; - line-height: 48px; - font-weight: bold; - padding-left: 20px; - } - } - - .ant-modal-body { - height: 444px; - - >div { - width: 100%; - height: 100%; - align-items: flex-start; - - >div:nth-child(2) { - position: relative; - flex: 1; - box-sizing: border-box; - height: 100%; - padding: 30px 16px; - - .right-context>div { - margin-bottom: 20px; - } - - .right-context .context-key { - font-weight: bold; - } - - .img-download { - position: absolute; - bottom: 0; - cursor: pointer; - } - - } - - } - } - } -} \ No newline at end of file diff --git a/packages/biz/lib/WarningRecordCard/WarningRecordCard.d.ts b/packages/biz/lib/WarningRecordCard/WarningRecordCard.d.ts deleted file mode 100644 index 966998b..0000000 --- a/packages/biz/lib/WarningRecordCard/WarningRecordCard.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { CardProps } from 'antd'; -import React from 'react'; -import './index.less'; -export interface IRecord { - imgSrc?: string; - id?: string; - /** - * 预警类型 - */ - warningType?: string; - warningInfo?: string[]; - boxId: string; - position: string; - cabietId?: string; - cabietText?: string; - warningTime?: string; - warningTimestamp?: string | number; - warningTimeFormat?: string; -} -export interface WarningRecordCardProps { - record?: IRecord; - onRecordClick?: (record?: IRecord) => void; - style?: React.CSSProperties; - cardProps?: CardProps; - selectedRecordId?: string; - cardStyle?: React.CSSProperties; - imgStyle?: React.CSSProperties; -} -export declare const WarningRecordCard: React.FC; -export default WarningRecordCard; diff --git a/packages/biz/lib/WarningRecordCard/WarningRecordCard.js b/packages/biz/lib/WarningRecordCard/WarningRecordCard.js deleted file mode 100644 index b5de8e4..0000000 --- a/packages/biz/lib/WarningRecordCard/WarningRecordCard.js +++ /dev/null @@ -1,74 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/WarningRecordCard/WarningRecordCard.tsx -var WarningRecordCard_exports = {}; -__export(WarningRecordCard_exports, { - WarningRecordCard: () => WarningRecordCard, - default: () => WarningRecordCard_default -}); -module.exports = __toCommonJS(WarningRecordCard_exports); -var import_antd = require("antd"); -var import_lib = require("antd/lib"); -var import_react = __toESM(require("react")); -var import_dayjs = __toESM(require("dayjs")); -var import_index = require("./index.less"); -var WarningRecordCard = (props) => { - const componentName = `zhst-biz-warning-record-card`; - const { record, onRecordClick, style, cardProps, selectedRecordId, cardStyle, imgStyle } = props; - const { imgSrc, id, warningType, warningInfo = [], cabietText, warningTime, warningTimestamp, warningTimeFormat = "YYYY-MM-DD HH:mm:ss" } = record || {}; - const formattedDate = warningTimestamp ? (0, import_dayjs.default)(warningTimestamp).format(warningTimeFormat) : ""; - const warningTimeShow = warningTime ? warningTime : formattedDate; - const { useToken } = import_lib.theme; - const { token } = useToken(); - const selectedBorderStyle = { - border: `2px solid ${token.colorPrimary}`, - boxShadow: " 0px 2px 9px 0px rgba(0,0,0,0.16)" - }; - const selectedCardStyle = { - ...selectedRecordId === (record == null ? void 0 : record.id) ? selectedBorderStyle : {} - }; - const handleClick = () => { - onRecordClick == null ? void 0 : onRecordClick(record); - }; - return /* @__PURE__ */ import_react.default.createElement("div", { className: componentName, key: id, onClick: handleClick, style }, /* @__PURE__ */ import_react.default.createElement( - import_antd.Card, - { - cover: /* @__PURE__ */ import_react.default.createElement("img", { alt: "预警图", src: imgSrc, style: { width: 336, height: 203, borderRadius: 0, ...imgStyle } }), - style: { width: 356, height: 302, padding: 10, borderRadius: 4, ...selectedCardStyle, ...cardStyle }, - ...cardProps - }, - /* @__PURE__ */ import_react.default.createElement("div", { className: "left-context" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "warning-type" }, warningType), /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 0, split: /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical" }) }, warningInfo == null ? void 0 : warningInfo.map((item, index) => /* @__PURE__ */ import_react.default.createElement("div", { key: index, className: "info-item" }, item))), /* @__PURE__ */ import_react.default.createElement("div", { className: "warning-time" }, warningTimeShow)), - /* @__PURE__ */ import_react.default.createElement("div", { className: "cabietInfo" }, cabietText) - )); -}; -var WarningRecordCard_default = WarningRecordCard; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - WarningRecordCard -}); diff --git a/packages/biz/lib/WarningRecordCard/index.d.ts b/packages/biz/lib/WarningRecordCard/index.d.ts deleted file mode 100644 index 8b82d36..0000000 --- a/packages/biz/lib/WarningRecordCard/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import WarningRecordCard from './WarningRecordCard'; -export type { IRecord, WarningRecordCardProps } from './WarningRecordCard'; -export default WarningRecordCard; diff --git a/packages/biz/lib/WarningRecordCard/index.js b/packages/biz/lib/WarningRecordCard/index.js deleted file mode 100644 index 9d01a95..0000000 --- a/packages/biz/lib/WarningRecordCard/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/WarningRecordCard/index.tsx -var WarningRecordCard_exports = {}; -__export(WarningRecordCard_exports, { - default: () => WarningRecordCard_default -}); -module.exports = __toCommonJS(WarningRecordCard_exports); -var import_WarningRecordCard = __toESM(require("./WarningRecordCard")); -var WarningRecordCard_default = import_WarningRecordCard.default; diff --git a/packages/biz/lib/WarningRecordCard/index.less b/packages/biz/lib/WarningRecordCard/index.less deleted file mode 100644 index 7cfba38..0000000 --- a/packages/biz/lib/WarningRecordCard/index.less +++ /dev/null @@ -1,27 +0,0 @@ -.zhst-biz-warning-record-card { - cursor: pointer; - - .ant-card-body { - padding: 0; - font-family: MicrosoftYaHei; - line-height: 19px; - display: flex; - margin-top: 10px; - - .left-context { - flex: 1; - - >div { - margin-top: 6px; - } - - >div:nth-child(1) { - margin-top: 0; - } - } - - .warning-type { - font-weight: bold; - } - } -} \ No newline at end of file diff --git a/packages/biz/lib/boxSelectTree/boxSelectTree.d.ts b/packages/biz/lib/boxSelectTree/boxSelectTree.d.ts deleted file mode 100644 index 0690e8f..0000000 --- a/packages/biz/lib/boxSelectTree/boxSelectTree.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { FC } from 'react'; -import { TabsProps } from 'antd'; -import type { BoxPanelProps } from './components/boxPanel'; -export interface BoxSelectTreeProps extends BoxPanelProps { - onTabChange?: (e: any) => void; - tabsProps?: TabsProps; -} -declare const BoxSelectTree: FC; -export default BoxSelectTree; diff --git a/packages/biz/lib/boxSelectTree/boxSelectTree.js b/packages/biz/lib/boxSelectTree/boxSelectTree.js deleted file mode 100644 index 79df21b..0000000 --- a/packages/biz/lib/boxSelectTree/boxSelectTree.js +++ /dev/null @@ -1,124 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/boxSelectTree/boxSelectTree.tsx -var boxSelectTree_exports = {}; -__export(boxSelectTree_exports, { - default: () => boxSelectTree_default -}); -module.exports = __toCommonJS(boxSelectTree_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_boxPanel = __toESM(require("./components/boxPanel")); -var BoxSelectTree = (props) => { - const { - data, - boxDataSource = [], - onTabChange, - onSearch, - onItemCheck, - onItemSelect, - onBoxBatchDelete, - onBoxDelete, - onCreateSubmit, - onClockClick, - onImport, - onCreate, - tabsProps, - searchInputProps, - treeProps, - customImport, - showOptions, - extraBtns - } = props; - const items = [ - { - key: "1", - label: /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "center", width: "160px" } }, "盒子组"), - children: /* @__PURE__ */ import_react.default.createElement( - import_boxPanel.default, - { - searchInputProps, - boxDataSource, - treeProps, - data, - onCreate, - onCreateSubmit, - onBoxBatchDelete, - onBoxDelete, - onSearch, - onItemCheck, - onItemSelect, - showOptions, - customImport, - extraBtns, - onClockClick, - onImport - } - ) - }, - { - key: "2", - label: /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "center", width: "160px" } }, "盒子"), - children: /* @__PURE__ */ import_react.default.createElement( - import_boxPanel.default, - { - boxDataSource, - searchInputProps, - treeProps, - data, - onCreate, - onBoxBatchDelete, - onCreateSubmit, - onBoxDelete, - onSearch, - onItemCheck, - onItemSelect, - showOptions, - customImport, - extraBtns, - onClockClick, - onImport - } - ) - } - ]; - return /* @__PURE__ */ import_react.default.createElement( - import_antd.Tabs, - { - defaultActiveKey: "1", - centered: true, - items, - onChange: onTabChange, - tabBarGutter: 0, - indicator: { size: (origin) => origin, align: "center" }, - ...tabsProps - } - ); -}; -var boxSelectTree_default = BoxSelectTree; diff --git a/packages/biz/lib/boxSelectTree/components/boxPanel/index.js b/packages/biz/lib/boxSelectTree/components/boxPanel/index.js deleted file mode 100644 index 6fafeaa..0000000 --- a/packages/biz/lib/boxSelectTree/components/boxPanel/index.js +++ /dev/null @@ -1,179 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/boxSelectTree/components/boxPanel/index.tsx -var boxPanel_exports = {}; -__export(boxPanel_exports, { - default: () => boxPanel_default -}); -module.exports = __toCommonJS(boxPanel_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_pro_components = require("@ant-design/pro-components"); -var import_icons = require("@ant-design/icons"); -var import_treeTransferModal = __toESM(require("../../../treeTransferModal")); -var import_tree = __toESM(require("../../../tree")); -var BoxPanel = (props) => { - var _a, _b, _c; - const { - searchInputProps, - showOptions = true, - extraBtns, - data = [], - onSearch, - treeProps, - onItemCheck, - onItemSelect, - onCreateSubmit, - onBoxBatchDelete, - onBoxDelete, - onClockClick, - onImport, - onBatch, - onCreate, - boxDataSource, - customImport - } = props; - const [isTreeCheckable, setIsTreeCheckable] = (0, import_react.useState)(false); - const [targetItems, setTargetItems] = (0, import_react.useState)([]); - const [boxChoiceOpen, setBoxChoiceOpen] = (0, import_react.useState)(false); - const [checkedKeys, setCheckedKeys] = (0, import_react.useState)([]); - const createFormRef = (0, import_react.useRef)(); - const handleCheckable = () => { - setIsTreeCheckable((pre) => !pre); - }; - const onTreeCheck = (keys, info) => { - let _targetItems = []; - setCheckedKeys(keys); - info.checkedNodes.forEach((o) => { - o.isLeaf && _targetItems.push(o); - }); - setTargetItems(_targetItems); - }; - const onItemDelete = (key, { keys }) => { - setCheckedKeys((pre) => { - const newKeys = pre.filter((_key) => !keys.includes(_key)); - return newKeys; - }); - setTargetItems((pre) => pre.filter((o) => o.key !== key)); - }; - const onBoxChoiceOk = async (data2) => { - var _a2, _b2, _c2; - (_a2 = createFormRef.current) == null ? void 0 : _a2.setFieldValue("boxList", data2); - (_b2 = createFormRef.current) == null ? void 0 : _b2.setFieldValue("boxName", 123); - console.log((_c2 = createFormRef.current) == null ? void 0 : _c2.getFieldValue("boxList")); - setBoxChoiceOpen(false); - }; - const onBoxChoiceReset = () => { - setCheckedKeys([]); - setTargetItems([]); - }; - return /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "0 16px" } }, /* @__PURE__ */ import_react.default.createElement( - import_treeTransferModal.default, - { - open: boxChoiceOpen, - onCancel: () => setBoxChoiceOpen(false), - onRadioChange: (e) => console.log("radio", e.target.value), - dataSource: boxDataSource, - targetItems, - checkedKeys, - onReset: onBoxChoiceReset, - onOk: onBoxChoiceOk, - onTreeCheck, - onItemDelete - } - ), /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 12, direction: "vertical", style: { width: "100%" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4, style: { width: "100%", justifyContent: "space-between" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { size: "middle", onChange: (e) => onSearch == null ? void 0 : onSearch(e), placeholder: "请输入盒子名称", ...searchInputProps }), customImport || /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", onClick: () => (onBatch == null ? void 0 : onBatch()) || handleCheckable(), icon: isTreeCheckable ? /* @__PURE__ */ import_react.default.createElement(import_icons.SwitcherOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.DiffOutlined, null) }), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", onClick: () => onClockClick == null ? void 0 : onClockClick(), icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ClockCircleOutlined, null) }))), showOptions && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { align: "center" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", style: { padding: "4px 8px" }, onClick: () => onImport == null ? void 0 : onImport(), icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ImportOutlined, null) }, "导入盒子"), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical", style: { margin: "8px 0" } }), onCreate ? /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: onCreate, type: "text", style: { padding: "4px 8px" }, icon: /* @__PURE__ */ import_react.default.createElement(import_icons.FolderAddOutlined, null) }, "新建组") : /* @__PURE__ */ import_react.default.createElement( - import_pro_components.ModalForm, - { - width: "600px", - open: onCreate ? false : void 0, - formRef: createFormRef, - title: "新建组", - modalProps: { destroyOnClose: true }, - layout: "horizontal", - labelCol: { span: 6 }, - wrapperCol: { span: 18 }, - trigger: /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", style: { padding: "4px 8px" }, icon: /* @__PURE__ */ import_react.default.createElement(import_icons.FolderAddOutlined, null) }, "新建组"), - submitter: { - searchConfig: { - submitText: "确定", - resetText: "取消" - } - }, - onFinish: onCreateSubmit - }, - /* @__PURE__ */ import_react.default.createElement( - import_pro_components.ProFormText, - { - rules: [ - { - required: true, - max: 20 - }, - { - pattern: /^[^\s]*$/g, - message: "禁止输入空格" - } - ], - fieldProps: { showCount: true }, - width: "md", - name: "name", - label: "盒子组名称", - placeholder: "请输入盒子名称" - } - ), - /* @__PURE__ */ import_react.default.createElement( - import_pro_components.ProFormText, - { - width: "md", - name: "boxList", - label: "盒子选择", - fieldProps: { - readOnly: true, - value: `已选择${((_b = (_a = createFormRef.current) == null ? void 0 : _a.getFieldValue("boxList")) == null ? void 0 : _b.length) || 0}个盒子`, - suffix: /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => { - var _a2; - (_a2 = createFormRef.current) == null ? void 0 : _a2.setFieldValue("boxList", null); - onBoxChoiceReset(); - } }, "恢复默认"), /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => setBoxChoiceOpen(true) }, "范围选择")) - } - } - ) - ), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical", style: { margin: "8px 0" } }), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { danger: true, type: "text", style: { padding: "4px 8px" }, icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleOutlined, null), disabled: ((_c = treeProps == null ? void 0 : treeProps.checkedKeys) == null ? void 0 : _c.length) <= 0, onClick: onBoxBatchDelete }, "删除")), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } })), extraBtns, /* @__PURE__ */ import_react.default.createElement( - import_tree.default, - { - treeCheckable: isTreeCheckable, - data, - onItemSelect, - onItemCheck, - onItemDelete: onBoxDelete, - ...treeProps - } - ))); -}; -var boxPanel_default = BoxPanel; diff --git a/packages/biz/lib/boxSelectTree/index.d.ts b/packages/biz/lib/boxSelectTree/index.d.ts deleted file mode 100644 index 2ff0f1e..0000000 --- a/packages/biz/lib/boxSelectTree/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import BoxSelectTree from './boxSelectTree'; -export type { BoxSelectTreeProps } from './boxSelectTree'; -export default BoxSelectTree; diff --git a/packages/biz/lib/boxSelectTree/index.js b/packages/biz/lib/boxSelectTree/index.js deleted file mode 100644 index 74ef62f..0000000 --- a/packages/biz/lib/boxSelectTree/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/boxSelectTree/index.tsx -var boxSelectTree_exports = {}; -__export(boxSelectTree_exports, { - default: () => boxSelectTree_default -}); -module.exports = __toCommonJS(boxSelectTree_exports); -var import_boxSelectTree = __toESM(require("./boxSelectTree")); -var boxSelectTree_default = import_boxSelectTree.default; diff --git a/packages/biz/lib/boxSelectTree/mock.d.ts b/packages/biz/lib/boxSelectTree/mock.d.ts deleted file mode 100644 index 84026eb..0000000 --- a/packages/biz/lib/boxSelectTree/mock.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { TreeDataNode } from "antd"; -export declare const treeData: TreeDataNode[]; diff --git a/packages/biz/lib/boxSelectTree/mock.js b/packages/biz/lib/boxSelectTree/mock.js deleted file mode 100644 index 5160e1d..0000000 --- a/packages/biz/lib/boxSelectTree/mock.js +++ /dev/null @@ -1,60 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/boxSelectTree/mock.tsx -var mock_exports = {}; -__export(mock_exports, { - treeData: () => treeData -}); -module.exports = __toCommonJS(mock_exports); -var treeData = [ - { - title: "全部盒子", - key: "0-0", - children: [ - { - title: "盒子组1", - key: "0-0-0", - children: [ - { - title: "摄像头1", - key: "0-0-0-0" - }, - { - title: "摄像头2", - key: "0-0-0-1" - } - ] - }, - { - title: "盒子组2", - key: "0-0-1", - children: [ - { - title: "摄像头4", - key: "0-0-1-0" - } - ] - } - ] - } -]; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - treeData -}); diff --git a/packages/biz/lib/hooks/useIntelligentTracking/index.d.ts b/packages/biz/lib/hooks/useIntelligentTracking/index.d.ts deleted file mode 100644 index c1e54ef..0000000 --- a/packages/biz/lib/hooks/useIntelligentTracking/index.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Dayjs as Moment } from 'dayjs'; -export declare const getDefaultRadius: () => number; -export declare const setDefaultRadius: (radius: number) => void; -export declare const setSearchIntervalDuration: (duration: number) => void; -export declare const getSearchIntervalDuration: (time: number) => number; -export declare const operateTrackById: (smartTrackId: number, operationType: OperationType) => Promise; -export declare const deleteTrackById: (smartTrackId: number) => Promise; -export declare const modifyTrackImgs: (smartTrackId: number, images: Array) => Promise; -export declare const modifyTrackConf: (conf: any, smartTrackId: number) => Promise; -export declare const getTrackTaskById: (smartTrackId?: number) => Promise; -export declare const getTackDetailInfo: (smartTrackId?: number) => Promise; -export declare const getTaskCameraByCenterAndPower: (value: { - taskPower: { - facePower: number; - bodyPower: number; - }; - cameraInfos: Array; - center: [number, number]; -}) => Promise; -/**创建追踪任务 */ -export declare const createIntelligentTrack: (value: { - images: Array; - deviceIds: Array; - circleCenter: [number, number]; - model: number; - circleRadius: number; - facePower?: number; - bodyPower?: number; - historyTime?: [Moment, Moment]; - topping?: boolean; -}) => Promise; -export declare const emitHeartbeat: (smartTrackId: number) => Promise; -export declare const ModifyTrackCameras: (value: { - smartTrackId: number; - deviceIds: Array; - centerPoint: [number, number]; -}) => Promise; -export declare const setIntelligentTrackCircleInfo: (smartTrackId: number, circleCenter: [number, number]) => Promise; -export declare const getTackCameraInfo: (value: { - circleCenter: [Moment, Moment]; - radius: number; - zoom: number; -}) => Promise; -export declare const getCameraInfoByCircle: (circleCenter: any, radius: any, zoom?: number) => Promise; -export declare const taskInfoToSearchItem: (taskInfo: any) => any[]; diff --git a/packages/biz/lib/hooks/useIntelligentTracking/index.js b/packages/biz/lib/hooks/useIntelligentTracking/index.js deleted file mode 100644 index 6fe4a23..0000000 --- a/packages/biz/lib/hooks/useIntelligentTracking/index.js +++ /dev/null @@ -1,371 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/hooks/useIntelligentTracking/index.tsx -var useIntelligentTracking_exports = {}; -__export(useIntelligentTracking_exports, { - ModifyTrackCameras: () => ModifyTrackCameras, - createIntelligentTrack: () => createIntelligentTrack, - deleteTrackById: () => deleteTrackById, - emitHeartbeat: () => emitHeartbeat, - getCameraInfoByCircle: () => getCameraInfoByCircle, - getDefaultRadius: () => getDefaultRadius, - getSearchIntervalDuration: () => getSearchIntervalDuration, - getTackCameraInfo: () => getTackCameraInfo, - getTackDetailInfo: () => getTackDetailInfo, - getTaskCameraByCenterAndPower: () => getTaskCameraByCenterAndPower, - getTrackTaskById: () => getTrackTaskById, - modifyTrackConf: () => modifyTrackConf, - modifyTrackImgs: () => modifyTrackImgs, - operateTrackById: () => operateTrackById, - setDefaultRadius: () => setDefaultRadius, - setIntelligentTrackCircleInfo: () => setIntelligentTrackCircleInfo, - setSearchIntervalDuration: () => setSearchIntervalDuration, - taskInfoToSearchItem: () => taskInfoToSearchItem -}); -module.exports = __toCommonJS(useIntelligentTracking_exports); -var turf = __toESM(require("@turf/turf")); -var import_useTaskState = require("../useTaskState"); -var import_Tree = __toESM(require("@common/components/CameraTree/Tree")); -var import_request = __toESM(require("../../utils/request")); -var import_meta = require("@zhst/meta"); -var import_utils = require("@common/components/CameraTree/utils"); -var import_func = require("@zhst/func"); -var defaultFaceThreshold = 0.68; -var defaultBodyThreshold = 0.7; -var defaultFaceResultNum = 5; -var defaultRadius = 0.15; -var defaultQueryCycle = 10; -var getDefaultRadius = () => { - return defaultRadius; -}; -var setDefaultRadius = (radius) => { - defaultRadius = radius; -}; -var searchIntervalDuration = 10; -var setSearchIntervalDuration = (duration) => { - searchIntervalDuration = duration; -}; -var getSearchIntervalDuration = (time) => { - return time; -}; -var operateTrackById = async (smartTrackId, operationType) => { - try { - const data = { - operationType, - smartTrackId - }; - await (0, import_request.default)({ - method: "PUT", - url: "/singer.SmartTrackService/OperationSmartTrack", - data - }); - import_meta.message.success("操作成功"); - } catch (err) { - console.error(err); - import_meta.message.success("操作失败"); - } -}; -var deleteTrackById = async (smartTrackId) => { - try { - await (0, import_request.default)({ - method: "DELETE", - url: "/singer.SmartTrackService/DeleteSmartTrack", - data: { - smartTrackId - } - }); - } catch (err) { - console.error(err); - } -}; -var modifyTrackImgs = async (smartTrackId, images) => { - try { - await (0, import_request.default)({ - method: "PUT", - url: "/singer.SmartTrackService/ModifyTrackImg", - data: { - images, - smartTrackId - } - }); - } catch (err) { - console.log("err", err); - } -}; -var modifyTrackConf = async (conf, smartTrackId) => { - try { - await (0, import_request.default)({ - method: "PUT", - url: "/singer.SmartTrackService/ModifyTrackConf", - data: { - conf, - smartTrackId - } - }); - } catch (err) { - console.log("err", err); - } -}; -var getTrackTaskById = async (smartTrackId = 0) => { - try { - const data = smartTrackId ? { - smartTrackId - } : {}; - let req = await (0, import_request.default)({ - method: "POST", - url: "/singer.SmartTrackService/GetSmartTrack", - data - }); - return req; - } catch (err) { - console.error(err); - } -}; -var getTackDetailInfo = async (smartTrackId = 0) => { - const data = smartTrackId ? { - smartTrackId - } : {}; - let req = await (0, import_request.default)({ - method: "POST", - url: "/singer.SmartTrackService/GetTrackOverView", - data - }); - return req; -}; -var getTaskCameraByCenterAndPower = async (value) => { - let realCameraInfos = value["cameraInfos"]; - let realPreprocessInfos = []; - if (!(0, import_func.isEmpty)(realCameraInfos)) { - const { taskStatus } = await (0, import_useTaskState.getListTaskStatus)(); - realPreprocessInfos = (0, import_useTaskState.getCameraStatusFunc)(taskStatus); - } - const runRealCameraInfos = []; - realCameraInfos = realCameraInfos.filter((v) => { - if (import_Tree.default.judgeOccupyPowerById(v["id"], realPreprocessInfos)) { - runRealCameraInfos.push(v); - } - return !import_Tree.default.judgeOccupyPowerById(v["id"], realPreprocessInfos); - }); - let from = turf.point(value["center"]); - if (realCameraInfos.length > value["taskPower"]["bodyPower"]) { - realCameraInfos.map((v) => { - let dis = turf.distance(from, turf.point([v["longitude"], v["latitude"]])); - return { - ...v, - dis - }; - }).sort((a, b) => { - return a - b; - }); - realCameraInfos = realCameraInfos.slice(0, value["taskPower"]["bodyPower"]); - } - return [...runRealCameraInfos, ...realCameraInfos]; -}; -var createIntelligentTrack = async (value) => { - const data = { - images: value["images"], - type: value["model"], - normalComputerPower: value["bodyPower"] || 0, - faceComputerPower: value["facePower"] || 0, - // deviceIds: ['129537'], - deviceIds: value["deviceIds"], - conf: { - faceThreshold: defaultFaceThreshold, - bodyThreshold: defaultBodyThreshold, - faceResultNum: defaultFaceResultNum, - radius: value["circleRadius"] * 1e3, - queryCycle: defaultQueryCycle - }, - centerConf: { - centerX: value["circleCenter"][0], - centerY: value["circleCenter"][1] - } - }; - const res = await (0, import_request.default)({ - method: "PUT", - url: "/singer.SmartTrackService/CreateSmartTrack", - data - }); - return res; -}; -var emitHeartbeat = async (smartTrackId) => { - try { - await (0, import_request.default)({ - method: "POST", - url: "/singer.SmartTrackService/SmartTrackHeartBeat", - data: { - smartTrackId - } - }); - } catch (err) { - console.error(err); - } -}; -var ModifyTrackCameras = async (value) => { - try { - await setIntelligentTrackCircleInfo(value["smartTrackId"], value["centerPoint"]); - await (0, import_request.default)({ - url: "/singer.SmartTrackService/ModifyTrackCameras", - method: "PUT", - data: { - smartTrackId: value["smartTrackId"], - deviceIds: value["deviceIds"] - } - }); - } catch (err) { - import_meta.message.error(err); - } -}; -var setIntelligentTrackCircleInfo = async (smartTrackId, circleCenter) => { - try { - await (0, import_request.default)({ - url: "/singer.SmartTrackService/ModifyTrackScopeConf", - method: "PUT", - data: { - smartTrackId, - centerConf: { - centerX: (0, import_func.get)(circleCenter, "0"), - centerY: (0, import_func.get)(circleCenter, "1") - } - } - }); - } catch (err) { - import_meta.message.error(err); - } -}; -var getTackCameraInfo = async (value) => { - let circleCameraInfos = await getCameraInfoByCircle( - value["circleCenter"], - value["radius"], - value["zoom"] - ); - return circleCameraInfos; -}; -var getCameraInfoByCircle = async (circleCenter, radius, zoom = 16) => { - try { - let centerFeature = turf.circle(turf.point(circleCenter), radius, { - units: "kilometers", - steps: 64 - }); - let minx = 0; - let maxx = 0; - let miny = 0; - let maxy = 0; - for (let i = 0; i < 4; i++) { - let point2 = turf.destination(turf.point(circleCenter), radius, 90 * i, { - units: "kilometers" - }).geometry.coordinates; - if (point2[0] < minx || minx === 0) { - minx = point2[0]; - } - if (point2[0] > maxx || maxx === 0) { - maxx = point2[0]; - } - if (point2[1] < miny || miny === 0) { - miny = point2[1]; - } - if (point2[1] > maxy || maxy === 0) { - maxy = point2[1]; - } - } - let { clusterPoint } = await (0, import_request.default)({ - url: "/singer.DeviceService/GetClusters", - method: "POST", - data: { - northEast: { X: maxx, Y: maxy }, - southWest: { X: minx, Y: miny }, - zoom - } - }); - let cameraIds = []; - clusterPoint.forEach((v) => { - cameraIds.push(...v["cameraIDs"]); - }); - const { cameras } = await (0, import_utils.SearchCamera)({ - cameraId: cameraIds, - maxResults: cameraIds.length - }); - const cameraInfos = cameras.filter((v) => { - let cameraPoint = turf.point([(0, import_func.get)(v, "longitude"), (0, import_func.get)(v, "latitude")]); - return turf.booleanPointInPolygon(cameraPoint, centerFeature); - }); - return cameraInfos; - } catch (err) { - console.error(err); - return []; - } -}; -var taskInfoToSearchItem = (taskInfo) => { - let imageList = []; - (0, import_func.get)(taskInfo, "images", []).forEach((v) => { - const url = (0, import_func.get)(v, "conds.0.srcImageUrl"); - const objectId = (0, import_func.get)(v, "conds.0.featureInfo.objectId"); - let imageItem = { - index: 0, - url, - objectId, - odRects: (0, import_func.get)(v, "conds").map((item) => { - return { - fileKey: (0, import_func.get)(item, "objectImageUrl"), - extendRect: { - algorithmVersion: (0, import_func.get)(item, "alg", ""), - ...(0, import_func.get)(item, "rect", {}) - }, - rect: { - algorithmVersion: (0, import_func.get)(item, "alg", ""), - rect: (0, import_func.get)(item, "rect", {}) - } - }; - }) - }; - imageList.push(imageItem); - }); - return imageList; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ModifyTrackCameras, - createIntelligentTrack, - deleteTrackById, - emitHeartbeat, - getCameraInfoByCircle, - getDefaultRadius, - getSearchIntervalDuration, - getTackCameraInfo, - getTackDetailInfo, - getTaskCameraByCenterAndPower, - getTrackTaskById, - modifyTrackConf, - modifyTrackImgs, - operateTrackById, - setDefaultRadius, - setIntelligentTrackCircleInfo, - setSearchIntervalDuration, - taskInfoToSearchItem -}); diff --git a/packages/biz/lib/index.d.ts b/packages/biz/lib/index.d.ts deleted file mode 100644 index 743bed4..0000000 --- a/packages/biz/lib/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export { default as BigImageModal } from './BigImageModal'; -export type { BigImageModalProps } from './BigImageModal'; -export { default as BoxSelectTree } from './boxSelectTree'; -export type { BoxSelectTreeProps } from './boxSelectTree'; -export { default as Tree } from './tree'; -export type { BoxTreeProps, TreeData } from './tree'; -export { default as TreeTransfer } from './treeTransfer'; -export type { TreeTransferProps } from './treeTransfer'; -export { default as TreeTransferModal } from './treeTransferModal'; -export type { TreeTransferModalProps } from './treeTransferModal'; -export { default as WarningRecordCard } from './WarningRecordCard'; -export type { IRecord, WarningRecordCardProps } from './WarningRecordCard'; -export type { ViewLargerImageModalRef, ViewLargerImageModalProps } from './ViewLargerImageModal'; -export { default as ViewLargerImageModal, useViewLargerImageModal } from './ViewLargerImageModal'; -export type { VideoPlayerCardProps } from './VideoPlayerCard'; -export { default as VideoPlayerCard } from './VideoPlayerCard'; -export { default as RealTimeMonitor } from './RealTimeMonitor'; diff --git a/packages/biz/lib/index.js b/packages/biz/lib/index.js deleted file mode 100644 index 435cd59..0000000 --- a/packages/biz/lib/index.js +++ /dev/null @@ -1,65 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.tsx -var src_exports = {}; -__export(src_exports, { - BigImageModal: () => import_BigImageModal.default, - BoxSelectTree: () => import_boxSelectTree.default, - RealTimeMonitor: () => import_RealTimeMonitor.default, - Tree: () => import_tree.default, - TreeTransfer: () => import_treeTransfer.default, - TreeTransferModal: () => import_treeTransferModal.default, - VideoPlayerCard: () => import_VideoPlayerCard.default, - ViewLargerImageModal: () => import_ViewLargerImageModal.default, - WarningRecordCard: () => import_WarningRecordCard.default, - useViewLargerImageModal: () => import_ViewLargerImageModal.useViewLargerImageModal -}); -module.exports = __toCommonJS(src_exports); -var import_BigImageModal = __toESM(require("./BigImageModal")); -var import_boxSelectTree = __toESM(require("./boxSelectTree")); -var import_tree = __toESM(require("./tree")); -var import_treeTransfer = __toESM(require("./treeTransfer")); -var import_treeTransferModal = __toESM(require("./treeTransferModal")); -var import_WarningRecordCard = __toESM(require("./WarningRecordCard")); -var import_ViewLargerImageModal = __toESM(require("./ViewLargerImageModal")); -var import_VideoPlayerCard = __toESM(require("./VideoPlayerCard")); -var import_RealTimeMonitor = __toESM(require("./RealTimeMonitor")); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - BigImageModal, - BoxSelectTree, - RealTimeMonitor, - Tree, - TreeTransfer, - TreeTransferModal, - VideoPlayerCard, - ViewLargerImageModal, - WarningRecordCard, - useViewLargerImageModal -}); diff --git a/packages/biz/lib/tree/boxTree.d.ts b/packages/biz/lib/tree/boxTree.d.ts deleted file mode 100644 index 5e34aef..0000000 --- a/packages/biz/lib/tree/boxTree.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { FC } from 'react'; -import { TreeDataNode, TreeProps } from 'antd'; -import './index.less'; -export interface BoxTreeProps extends TreeProps { - data: TreeDataNode[]; - treeCheckable?: boolean; - showItemOption?: boolean; - customOptions?: any; - onItemCheck?: TreeProps['onCheck']; - onItemSelect?: TreeProps['onSelect']; - onItemSetting?: (_data: any) => void; - onItemDelete?: (_data: any) => void; - onItemRename?: (_nodeData: any) => void; - onItemRenameFinish?: (_data: any, _nodeData: any) => Promise; -} -declare const boxTree: FC; -export default boxTree; diff --git a/packages/biz/lib/tree/boxTree.js b/packages/biz/lib/tree/boxTree.js deleted file mode 100644 index 835a8f7..0000000 --- a/packages/biz/lib/tree/boxTree.js +++ /dev/null @@ -1,134 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/tree/boxTree.tsx -var boxTree_exports = {}; -__export(boxTree_exports, { - default: () => boxTree_default -}); -module.exports = __toCommonJS(boxTree_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_theme = __toESM(require("antd/es/theme")); -var import_icons = require("@ant-design/icons"); -var import_pro_components = require("@ant-design/pro-components"); -var import_index = require("./index.less"); -var componentName = "zhst-biz-tree"; -var { useToken } = import_theme.default; -var boxTree = (props) => { - const { - onItemSelect, - onItemCheck, - onItemSetting, - onItemDelete, - data = [], - showItemOption = true, - treeCheckable = false, - onItemRename, - onItemRenameFinish, - customOptions - } = props; - const { token } = useToken(); - const [checkedItem, setCheckedItem] = (0, import_react.useState)(""); - const cameraStatus = /* @__PURE__ */ new Map([ - ["0", "error"], - ["1", "success"], - ["3", "processing"], - ["4", "default"] - ]); - return /* @__PURE__ */ import_react.default.createElement( - import_antd.Tree, - { - checkable: treeCheckable, - blockNode: true, - onSelect: (selectedKeys, info) => { - setCheckedItem(selectedKeys[0]); - onItemSelect == null ? void 0 : onItemSelect(selectedKeys, info); - }, - onCheck: onItemCheck, - treeData: data, - titleRender: (_nodeData) => { - return /* @__PURE__ */ import_react.default.createElement("div", { className: `${componentName}-item-render` }, !_nodeData.children && _nodeData.isCamera && /* @__PURE__ */ import_react.default.createElement(import_antd.Badge, { style: { marginRight: "6px" }, status: cameraStatus.get(_nodeData.status || "4") }), /* @__PURE__ */ import_react.default.createElement( - "span", - { - style: checkedItem === _nodeData.key && _nodeData.isCamera ? { - color: token.colorPrimary - } : {} - }, - _nodeData.title - ), showItemOption && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: `${componentName}-item-render_right`, style: { float: "right" } }, customOptions || /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement( - import_pro_components.ModalForm, - { - title: "重命名", - width: 600, - modalProps: { destroyOnClose: true }, - layout: "horizontal", - labelCol: { span: 6 }, - wrapperCol: { span: 18 }, - trigger: /* @__PURE__ */ import_react.default.createElement(import_icons.EditOutlined, { onClick: (e) => { - e.preventDefault(); - e.stopPropagation(); - onItemRename == null ? void 0 : onItemRename(_nodeData); - } }), - submitter: { - searchConfig: { - submitText: "确定", - resetText: "取消" - } - }, - onFinish: async (value) => onItemRenameFinish == null ? void 0 : onItemRenameFinish(value, _nodeData) - }, - /* @__PURE__ */ import_react.default.createElement( - import_pro_components.ProFormText, - { - rules: [ - { - required: true - } - ], - width: "md", - name: "name", - label: "盒子名称", - placeholder: "请输入盒子名称" - } - ) - ), /* @__PURE__ */ import_react.default.createElement(import_icons.SettingOutlined, { onClick: (e) => { - e.preventDefault(); - e.stopPropagation(); - onItemSetting == null ? void 0 : onItemSetting(_nodeData); - } }), /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, { onClick: (e) => { - e.preventDefault(); - e.stopPropagation(); - onItemDelete == null ? void 0 : onItemDelete(_nodeData); - } })))); - }, - ...props - } - ); -}; -var boxTree_default = boxTree; diff --git a/packages/biz/lib/tree/index.d.ts b/packages/biz/lib/tree/index.d.ts deleted file mode 100644 index 4082eb0..0000000 --- a/packages/biz/lib/tree/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { TreeDataNode } from 'antd'; -import BoxTree from './boxTree'; -export interface TreeData extends TreeDataNode { - children?: TreeDataNode['children'] & { - isCamera?: boolean; - /** - * 0-失败 1-成功 2-进行中 3-未知 - */ - status?: '0' | '1' | '2' | '3'; - }[]; -} -export type { BoxTreeProps } from './boxTree'; -export default BoxTree; diff --git a/packages/biz/lib/tree/index.js b/packages/biz/lib/tree/index.js deleted file mode 100644 index 46783d3..0000000 --- a/packages/biz/lib/tree/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/tree/index.tsx -var tree_exports = {}; -__export(tree_exports, { - default: () => tree_default -}); -module.exports = __toCommonJS(tree_exports); -var import_boxTree = __toESM(require("./boxTree")); -var tree_default = import_boxTree.default; diff --git a/packages/biz/lib/tree/index.less b/packages/biz/lib/tree/index.less deleted file mode 100644 index 9da4e2d..0000000 --- a/packages/biz/lib/tree/index.less +++ /dev/null @@ -1,9 +0,0 @@ -.zhst-biz-tree-item-render { - &_right { - display: none; - } - - &:hover &_right { - display: inline-flex; - } -} diff --git a/packages/biz/lib/treeTransfer/TreeTransfer.d.ts b/packages/biz/lib/treeTransfer/TreeTransfer.d.ts deleted file mode 100644 index b74b4f3..0000000 --- a/packages/biz/lib/treeTransfer/TreeTransfer.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { InputProps } from 'antd'; -import { TransferProps, TreeDataNode, TreeProps } from 'antd'; -import './index.less'; -export interface TreeTransferProps { - dataSource: TreeDataNode[]; - treeProps?: TreeProps; - searchInputProps?: InputProps; - targetItems: TreeDataNode[]; - checkedKeys: string[]; - onTreeSelect?: TreeProps['onSelect']; - onTreeCheck?: TreeProps['onCheck']; - onItemDelete?: (key: string, info?: { - root: TreeDataNode[]; - keys: string[]; - }) => void; - onChange?: TransferProps['onChange']; - onOk?: (data: any) => void; - onReset?: () => void; -} -declare const TreeTransfer: React.FC; -export default TreeTransfer; diff --git a/packages/biz/lib/treeTransfer/TreeTransfer.js b/packages/biz/lib/treeTransfer/TreeTransfer.js deleted file mode 100644 index 5c8aa59..0000000 --- a/packages/biz/lib/treeTransfer/TreeTransfer.js +++ /dev/null @@ -1,137 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/treeTransfer/TreeTransfer.tsx -var TreeTransfer_exports = {}; -__export(TreeTransfer_exports, { - default: () => TreeTransfer_default -}); -module.exports = __toCommonJS(TreeTransfer_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_theme = __toESM(require("antd/es/theme")); -var import_index = require("./index.less"); -var import_icons = require("@ant-design/icons"); -var import_treeTransferHelper = require("./treeTransferHelper"); -var componentName = "zhst-biz-treeTransfer"; -var { useToken } = import_theme.default; -var TreeTransfer = ({ - dataSource, - treeProps, - searchInputProps, - targetItems = [], - checkedKeys = [], - onTreeCheck, - onTreeSelect, - onItemDelete, - onOk, - onReset -}) => { - const { token } = useToken(); - const [keyWords, setKeyWords] = (0, import_react.useState)(""); - function findNodesWithKeyword(_keyWords, _treeData) { - function dfs(node) { - return node.filter((item) => item.title.includes(_keyWords)); - } - const data = dfs(_treeData); - return data || []; - } - return /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { gap: 20, className: componentName, align: "center", justify: "center" }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${componentName}-left` }, /* @__PURE__ */ import_react.default.createElement( - import_antd.Card, - { - className: `${componentName}-left_card`, - title: /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "center" } }, "可选择的范围"), - bodyStyle: { padding: 12 } - }, - /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, null), onChange: (e) => setKeyWords(e.target.value), placeholder: "请输入设备名称", ...searchInputProps }), - /* @__PURE__ */ import_react.default.createElement( - import_antd.Tree, - { - style: { marginTop: "6px" }, - height: 420, - blockNode: true, - checkable: true, - checkedKeys, - treeData: findNodesWithKeyword(keyWords, dataSource), - onCheck: (keys, info) => onTreeCheck == null ? void 0 : onTreeCheck(keys, info), - onSelect: (keys, info) => onTreeSelect == null ? void 0 : onTreeSelect(keys, info), - ...treeProps - } - ) - )), /* @__PURE__ */ import_react.default.createElement(import_icons.DoubleRightOutlined, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${componentName}-right` }, /* @__PURE__ */ import_react.default.createElement( - import_antd.Card, - { - className: `${componentName}-right_card`, - title: /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "center" } }, "已选择的范围"), - bodyStyle: { padding: 0 } - }, - /* @__PURE__ */ import_react.default.createElement( - "div", - { - className: `${componentName}-right_card__items` - }, - targetItems.map((item) => /* @__PURE__ */ import_react.default.createElement( - "div", - { - className: `${componentName}-right_card__items___item`, - key: item.key, - onMouseEnter: (e) => { - e.target.style.backgroundColor = token.colorPrimaryBg; - e.target.style.color = token.colorPrimary; - }, - onMouseLeave: (e) => { - e.target.style.color = token.colorText; - e.target.style.backgroundColor = null; - } - }, - item.title, - /* @__PURE__ */ import_react.default.createElement("div", { style: { float: "right" } }, /* @__PURE__ */ import_react.default.createElement(import_icons.DeleteOutlined, { onClick: () => { - const { root, keys } = (0, import_treeTransferHelper.getAllRootKeyById)(item.key, dataSource); - onItemDelete == null ? void 0 : onItemDelete(item.key, { root, keys }); - } })) - )) - ), - /* @__PURE__ */ import_react.default.createElement( - import_antd.Flex, - { - className: `${componentName}-right_card__btns` - }, - /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { style: { marginRight: 8, width: "50%" }, disabled: targetItems.length <= 0, onClick: onReset }, "重置"), - /* @__PURE__ */ import_react.default.createElement( - import_antd.Button, - { - style: { width: "50%" }, - type: "primary", - onClick: () => onOk == null ? void 0 : onOk(targetItems) - }, - "确定" - ) - ) - ))); -}; -var TreeTransfer_default = TreeTransfer; diff --git a/packages/biz/lib/treeTransfer/index.d.ts b/packages/biz/lib/treeTransfer/index.d.ts deleted file mode 100644 index 7ea5c47..0000000 --- a/packages/biz/lib/treeTransfer/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import TreeTransfer from "./TreeTransfer"; -export type { TreeTransferProps } from './TreeTransfer'; -export * from './treeTransferHelper'; -export default TreeTransfer; diff --git a/packages/biz/lib/treeTransfer/index.js b/packages/biz/lib/treeTransfer/index.js deleted file mode 100644 index 7e50781..0000000 --- a/packages/biz/lib/treeTransfer/index.js +++ /dev/null @@ -1,42 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/treeTransfer/index.tsx -var treeTransfer_exports = {}; -__export(treeTransfer_exports, { - default: () => treeTransfer_default -}); -module.exports = __toCommonJS(treeTransfer_exports); -var import_TreeTransfer = __toESM(require("./TreeTransfer")); -__reExport(treeTransfer_exports, require("./treeTransferHelper"), module.exports); -var treeTransfer_default = import_TreeTransfer.default; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ...require("./treeTransferHelper") -}); diff --git a/packages/biz/lib/treeTransfer/index.less b/packages/biz/lib/treeTransfer/index.less deleted file mode 100644 index 9ffe8cd..0000000 --- a/packages/biz/lib/treeTransfer/index.less +++ /dev/null @@ -1,43 +0,0 @@ -.zhst-biz-treeTransfer { - &-left { - &_card { - width: 500px; - height: 522px; - background-color: #FCFCFC; - } - } - - &-right { - &_card { - width: 300px; - height: 522px; - background-color: #FCFCFC; - - &__items { - padding: 8px 4px; - overflow: scroll; - - &::-webkit-scrollbar { - display: none; - } - - &___item { - margin: 0; - padding: 4px 12px; - cursor: pointer; - } - } - - &__btns { - width: 100%; - padding: 8px; - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - box-sizing: border-box; - border-top: 1px solid #f0f0f0; - } - } - } -} diff --git a/packages/biz/lib/treeTransfer/treeTransferHelper.d.ts b/packages/biz/lib/treeTransfer/treeTransferHelper.d.ts deleted file mode 100644 index 705684c..0000000 --- a/packages/biz/lib/treeTransfer/treeTransferHelper.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare const isChecked: (selectedKeys: React.Key[], eventKey: React.Key) => boolean; -/** - * 通过子元素找到父级节点 - * @param objects - * @param element - * @returns - */ -export declare const findParentByChild: (objects: any[], propertyValue: string | number, propertyKey?: string) => any; -export declare const getAllRootKeyById: (val: string | number, list: any[], key?: string) => { - root: any; - keys: any[]; -}; diff --git a/packages/biz/lib/treeTransfer/treeTransferHelper.js b/packages/biz/lib/treeTransfer/treeTransferHelper.js deleted file mode 100644 index 1c3c4eb..0000000 --- a/packages/biz/lib/treeTransfer/treeTransferHelper.js +++ /dev/null @@ -1,77 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/treeTransfer/treeTransferHelper.ts -var treeTransferHelper_exports = {}; -__export(treeTransferHelper_exports, { - findParentByChild: () => findParentByChild, - getAllRootKeyById: () => getAllRootKeyById, - isChecked: () => isChecked -}); -module.exports = __toCommonJS(treeTransferHelper_exports); -var isChecked = (selectedKeys, eventKey) => selectedKeys.includes(eventKey); -function isObject(value) { - return value !== null && typeof value === "object" && !Array.isArray(value); -} -var findParentByChild = (objects, propertyValue, propertyKey = "key") => { - for (let i = 0; i < objects.length; i++) { - const obj = objects[i]; - if (obj[propertyKey] === propertyValue) { - return obj; - } else if (typeof obj === "object") { - const found = findParentByChild(Object.values(obj), propertyValue); - if (found) { - return obj; - } - } - } - return null; -}; -var getAllRootKeyById = (val, list, key = "key") => { - let keys = []; - const findParentByChild2 = (propertyValue, objects, propertyKey) => { - for (let i = 0; i < objects.length; i++) { - const obj = objects[i]; - if (obj[propertyKey] === propertyValue) { - console.log("obj", obj); - return obj; - } else if (typeof obj === "object") { - const found = findParentByChild2(propertyValue, Object.values(obj), propertyKey); - if (found) { - if (isObject(found)) { - keys.push(found.key); - } - return obj; - } - } - } - return null; - }; - const data = findParentByChild2(val, list, key); - data.key && keys.push(data.key); - return { - root: data, - keys - }; -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - findParentByChild, - getAllRootKeyById, - isChecked -}); diff --git a/packages/biz/lib/treeTransferModal/TreeTransferModal.d.ts b/packages/biz/lib/treeTransferModal/TreeTransferModal.d.ts deleted file mode 100644 index e0a0d0e..0000000 --- a/packages/biz/lib/treeTransferModal/TreeTransferModal.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { FC } from 'react'; -import { ModalProps, RadioGroupProps, SelectProps, TransferProps, TreeDataNode, TreeProps } from 'antd'; -export interface TreeTransferModalProps { - dataSource: TreeDataNode[]; - treeProps?: TreeProps; - targetItems: TreeDataNode[]; - checkedKeys: string[]; - onTreeSelect?: TreeProps['onSelect']; - onTreeCheck?: TreeProps['onCheck']; - onItemDelete?: (key: string, info?: { - root: TreeDataNode[]; - keys: string[]; - }) => void; - onChange?: TransferProps['onChange']; - onOk?: (data: any) => void; - onReset?: () => void; - open?: boolean; - onCancel?: ModalProps['onCancel']; - onRadioChange?: RadioGroupProps['onChange']; - onSelect?: SelectProps['onSelect']; - modalProps?: ModalProps; - radioProps?: RadioGroupProps; - selectProps?: SelectProps; -} -declare const TreeTransferModal: FC; -export default TreeTransferModal; diff --git a/packages/biz/lib/treeTransferModal/TreeTransferModal.js b/packages/biz/lib/treeTransferModal/TreeTransferModal.js deleted file mode 100644 index 5c20927..0000000 --- a/packages/biz/lib/treeTransferModal/TreeTransferModal.js +++ /dev/null @@ -1,114 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/treeTransferModal/TreeTransferModal.tsx -var TreeTransferModal_exports = {}; -__export(TreeTransferModal_exports, { - default: () => TreeTransferModal_default -}); -module.exports = __toCommonJS(TreeTransferModal_exports); -var import_react = __toESM(require("react")); -var import_antd = require("antd"); -var import_treeTransfer = __toESM(require("../treeTransfer")); -var import_constants = require("../utils/constants"); -var TreeTransferModal = (props) => { - const { - open, - dataSource = [], - checkedKeys, - onItemDelete, - onOk, - onCancel, - onReset, - onRadioChange, - onTreeCheck, - onSelect, - targetItems, - modalProps, - radioProps, - selectProps - } = props; - const [type, setType] = (0, import_react.useState)("1"); - return /* @__PURE__ */ import_react.default.createElement( - import_antd.Modal, - { - open, - destroyOnClose: true, - title: "统计点位", - width: "948px", - footer: null, - onCancel, - ...modalProps - }, - /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement( - import_antd.Radio.Group, - { - onChange: (e) => { - setType(e.target.value); - onRadioChange == null ? void 0 : onRadioChange(e); - }, - style: { marginLeft: "24px", padding: "20px 0" }, - value: type, - options: import_constants.BOX_TYPE_LIST, - ...radioProps - } - ), /* @__PURE__ */ import_react.default.createElement( - import_antd.Select, - { - defaultValue: "", - style: { marginLeft: 200, width: 150 }, - options: import_constants.ALL_LIST, - onSelect, - ...selectProps - } - )), type === "box" ? /* @__PURE__ */ import_react.default.createElement( - import_treeTransfer.default, - { - dataSource, - targetItems, - checkedKeys, - onTreeCheck, - onItemDelete, - onOk, - onReset - } - ) : /* @__PURE__ */ import_react.default.createElement( - import_treeTransfer.default, - { - dataSource, - targetItems, - checkedKeys, - onTreeCheck, - onItemDelete, - onOk, - onReset - } - ), /* @__PURE__ */ import_react.default.createElement("p", { style: { textAlign: "right" } }, "已选中", targetItems.length, "个点位")) - ); -}; -var TreeTransferModal_default = TreeTransferModal; diff --git a/packages/biz/lib/treeTransferModal/index.d.ts b/packages/biz/lib/treeTransferModal/index.d.ts deleted file mode 100644 index 8e5245a..0000000 --- a/packages/biz/lib/treeTransferModal/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import TreeTransferModal from './TreeTransferModal'; -export type { TreeTransferModalProps } from './TreeTransferModal'; -export default TreeTransferModal; diff --git a/packages/biz/lib/treeTransferModal/index.js b/packages/biz/lib/treeTransferModal/index.js deleted file mode 100644 index 19037a6..0000000 --- a/packages/biz/lib/treeTransferModal/index.js +++ /dev/null @@ -1,36 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/treeTransferModal/index.tsx -var treeTransferModal_exports = {}; -__export(treeTransferModal_exports, { - default: () => treeTransferModal_default -}); -module.exports = __toCommonJS(treeTransferModal_exports); -var import_TreeTransferModal = __toESM(require("./TreeTransferModal")); -var treeTransferModal_default = import_TreeTransferModal.default; diff --git a/packages/biz/lib/utils/constants.js b/packages/biz/lib/utils/constants.js deleted file mode 100644 index 733d65a..0000000 --- a/packages/biz/lib/utils/constants.js +++ /dev/null @@ -1,91 +0,0 @@ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/utils/constants.ts -var constants_exports = {}; -__export(constants_exports, { - ALL_LIST: () => ALL_LIST, - BODY_SEARCH_THRESHOID: () => BODY_SEARCH_THRESHOID, - BOX_TYPE_LIST: () => BOX_TYPE_LIST, - DeviceTab: () => DeviceTab, - ENTER_CIRCLE: () => ENTER_CIRCLE, - GLOBAL_IS_BOX_VMS_SHOW: () => GLOBAL_IS_BOX_VMS_SHOW, - GLOBAL_IS_ITEM_NUMBER_SHOW: () => GLOBAL_IS_ITEM_NUMBER_SHOW, - MODE_KEY: () => MODE_KEY, - OBJECT_AGE_TYPE_THRESHOLD: () => OBJECT_AGE_TYPE_THRESHOLD, - OBJECT_GRNER_THRESHOLD: () => OBJECT_GRNER_THRESHOLD, - OUT_CIRCLE: () => OUT_CIRCLE, - RECORD_VERSION: () => RECORD_VERSION, - SEARCH_IMG_COUNT: () => SEARCH_IMG_COUNT, - TEMP: () => TEMP, - publicPath: () => publicPath -}); -module.exports = __toCommonJS(constants_exports); -var OBJECT_GRNER_THRESHOLD = 0.8; -var OBJECT_AGE_TYPE_THRESHOLD = 0.5; -var MODE_KEY = "test_mode"; -var SEARCH_IMG_COUNT = 10; -var GLOBAL_IS_ITEM_NUMBER_SHOW = false; -var publicPath = "hummingbird"; -var ENTER_CIRCLE = "MONITORTYPE_ENTER_CIRCLE"; -var OUT_CIRCLE = "MONITORTYPE_OUT_CIRCLE"; -var TEMP = "MONITORTYPE_TEMP"; -var GLOBAL_IS_BOX_VMS_SHOW = true; -var BODY_SEARCH_THRESHOID = 0.45; -var RECORD_VERSION = "3.0.0"; -var DeviceTab = { - EMPTY: 0, - REAL_CAMERA: 1, - PREPROCESS_CAMERA: 2, - //摄像头列表 - TAG_CAMERA: 3, - //预案列表 - HISTORY_VIDEO_GROUP: 4, - //录像回放 - VIRTUAL_CAMERA: 5, - //离线视频 - REAL_CAMERA_NOFACE: 6, - REAL_CAMERA_ONLYFACE: 7, - REAL_CAMERA_NOFACE_NOBOX_NODIRECONNECT: 8 - // 只有普通摄像头,没有人脸、没有盒子、直连 -}; -var BOX_TYPE_LIST = [ - { value: "1", label: "盒子" }, - { value: "2", label: "盒子组" } -]; -var ALL_LIST = [ - { value: "", label: "全部" } -]; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - ALL_LIST, - BODY_SEARCH_THRESHOID, - BOX_TYPE_LIST, - DeviceTab, - ENTER_CIRCLE, - GLOBAL_IS_BOX_VMS_SHOW, - GLOBAL_IS_ITEM_NUMBER_SHOW, - MODE_KEY, - OBJECT_AGE_TYPE_THRESHOLD, - OBJECT_GRNER_THRESHOLD, - OUT_CIRCLE, - RECORD_VERSION, - SEARCH_IMG_COUNT, - TEMP, - publicPath -}); diff --git a/packages/biz/lib/utils/index.d.ts b/packages/biz/lib/utils/index.d.ts deleted file mode 100644 index e69de29..0000000 diff --git a/packages/biz/lib/utils/index.js b/packages/biz/lib/utils/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/packages/biz/package.json b/packages/biz/package.json index 3144210..0fd75b1 100644 --- a/packages/biz/package.json +++ b/packages/biz/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/biz", - "version": "0.11.3", + "version": "0.12.1", "description": "业务库", "keywords": [ "business", @@ -42,10 +42,11 @@ "@ant-design/pro-components": "^2.6.49", "@zhst/func": "workspace:^", "@zhst/hooks": "workspace:^", + "@zhst/icon": "workspace:^", "@zhst/meta": "workspace:^", "antd": "^5.12.5", "classnames": "^2.5.1", - "rc-util": "^5.38.1", - "dayjs": "^1.11.10" + "dayjs": "^1.11.10", + "rc-util": "^5.38.1" } } diff --git a/packages/biz/src/BigImageModal/components/navigation/index.tsx b/packages/biz/src/BigImageModal/components/navigation/index.tsx index eeb0afc..946b1e5 100644 --- a/packages/biz/src/BigImageModal/components/navigation/index.tsx +++ b/packages/biz/src/BigImageModal/components/navigation/index.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import classnames from 'classnames'; -import { Icon, Button } from '@zhst/meta'; +import { Button } from '@zhst/meta'; +import { IconFont } from '@zhst/icon' import './index.less'; const componentName = `zhst-image__nav`; @@ -29,7 +30,7 @@ const Navigation: React.FC<{ )} > ); diff --git a/packages/func/CHANGELOG.md b/packages/func/CHANGELOG.md index 38b33d5..0d6864f 100644 --- a/packages/func/CHANGELOG.md +++ b/packages/func/CHANGELOG.md @@ -1,5 +1,12 @@ # @zhst/utils +## 0.9.2 + +### Patch Changes + +- Updated dependencies + - @zhst/request@0.9.1 + ## 0.9.1 ### Patch Changes diff --git a/packages/func/package.json b/packages/func/package.json index 702a401..a43e75a 100644 --- a/packages/func/package.json +++ b/packages/func/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/func", - "version": "0.9.1", + "version": "0.9.2", "description": "函数合集", "keywords": [ "hooks" diff --git a/packages/hooks/CHANGELOG.md b/packages/hooks/CHANGELOG.md index a7f0f66..37342bd 100644 --- a/packages/hooks/CHANGELOG.md +++ b/packages/hooks/CHANGELOG.md @@ -1,5 +1,11 @@ # @zhst/hooks +## 0.8.11 + +### Patch Changes + +- @zhst/func@0.9.2 + ## 0.8.10 ### Patch Changes diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 7df2d88..a74815b 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/hooks", - "version": "0.8.10", + "version": "0.8.11", "description": "hooks合集", "keywords": [ "hooks" diff --git a/packages/material/CHANGELOG.md b/packages/material/CHANGELOG.md index e29de51..d0b21dc 100644 --- a/packages/material/CHANGELOG.md +++ b/packages/material/CHANGELOG.md @@ -1,5 +1,27 @@ # @zhst/material +## 0.8.0 + +### Minor Changes + +- 修改物料库算法编辑新增箭头选择,元组件新增图片标记组件 + +### Patch Changes + +- Updated dependencies + - @zhst/meta@0.11.0 + - @zhst/biz@0.12.1 + - @zhst/func@0.9.2 + - @zhst/hooks@0.8.11 + +## 0.7.8 + +### Patch Changes + +- Updated dependencies + - @zhst/meta@0.10.0 + - @zhst/biz@0.12.0 + ## 0.7.7 ### Patch Changes diff --git a/packages/material/es/algorithmConfig/algorithmConfig.d.ts b/packages/material/es/algorithmConfig/algorithmConfig.d.ts deleted file mode 100644 index 9c0101e..0000000 --- a/packages/material/es/algorithmConfig/algorithmConfig.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import { AlgorithmTableProps } from './components/algorithmTable/AlgorithmTable'; -import { TimeTemplateTableProps } from './components/timeTemplateTable/TimeTemplateTable'; -export interface AlgorithmConfigProps { - onAddAlgorithm?: () => void; - /** - * 单选的图片数据 - */ - drawData?: { - imageKey: string; - odRect?: { - x: number; - y: number; - w: number; - h: number; - }; - score?: string; - time?: string; - }; - /** - * 单选状态圈选后的监听事件 - */ - drawListener?: (data: any) => void; - algorithmTableDataSource?: { - id: string; - templateName: string; - operatingCycle: string; - algorithmOccupied: number; - }[]; - timeTemplateDataSource?: { - id: string; - templateName: string; - operatingCycle: string; - arrangeWeek: string; - algorithmOccupied: string; - }[]; - boxList: { - id: string; - name: string; - }[]; - algorithmTableProps?: AlgorithmTableProps; - timeTemplateTableProps?: TimeTemplateTableProps; - selectedKey?: string; - rowKey?: string; - type: AlgorithmTableProps['tableType']; - onSelect?: (key: string, info?: any) => void; -} -export interface AlgorithmConfigRef { - draw: () => void; - cancelDraw: () => void; -} -declare const AlgorithmConfig: React.ForwardRefExoticComponent>; -export default AlgorithmConfig; diff --git a/packages/material/es/algorithmConfig/algorithmConfig.js b/packages/material/es/algorithmConfig/algorithmConfig.js index f283541..67f06e1 100644 --- a/packages/material/es/algorithmConfig/algorithmConfig.js +++ b/packages/material/es/algorithmConfig/algorithmConfig.js @@ -1,8 +1,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } -import React, { useRef, forwardRef, useImperativeHandle } from 'react'; +import React, { forwardRef } from 'react'; import { Flex, Image } from "antd"; import theme from 'antd/es/theme'; -import { BigImagePreview } from '@zhst/meta'; +import { CropperImage } from '@zhst/meta'; import { AlgorithmConfigImg, ErrorImage } from "../utils/base64Images"; import AlgorithmTable from "./components/algorithmTable"; import TimeTemplateTable from "./components/timeTemplateTable"; @@ -16,15 +16,16 @@ var Title = function Title(props) { } }, props.children); }; -var AlgorithmConfig = /*#__PURE__*/forwardRef(function (props, ref) { +var AlgorithmConfig = /*#__PURE__*/forwardRef(function (props) { var _props$algorithmTable = props.algorithmTableDataSource, algorithmTableDataSource = _props$algorithmTable === void 0 ? [] : _props$algorithmTable, _props$timeTemplateDa = props.timeTemplateDataSource, timeTemplateDataSource = _props$timeTemplateDa === void 0 ? [] : _props$timeTemplateDa, _props$boxList = props.boxList, boxList = _props$boxList === void 0 ? [] : _props$boxList, - drawData = props.drawData, drawListener = props.drawListener, + _props$cropperImagePr = props.cropperImageProps, + cropperImageProps = _props$cropperImagePr === void 0 ? {} : _props$cropperImagePr, algorithmTableProps = props.algorithmTableProps, timeTemplateTableProps = props.timeTemplateTableProps, selectedKey = props.selectedKey, @@ -32,33 +33,28 @@ var AlgorithmConfig = /*#__PURE__*/forwardRef(function (props, ref) { type = _props$type === void 0 ? 'multiple' : _props$type, _props$rowKey = props.rowKey, rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey, - onSelect = props.onSelect; - var drawImageRef = useRef(null); + onSelect = props.onSelect, + _props$title = props.title, + title = _props$title === void 0 ? '盒子名称' : _props$title; var _useToken = useToken(), token = _useToken.token; - useImperativeHandle(ref, function () { - return { - draw: function draw() { - var _drawImageRef$current; - (_drawImageRef$current = drawImageRef.current) === null || _drawImageRef$current === void 0 || _drawImageRef$current.setShowCrop(true); - }, - cancelDraw: function cancelDraw() { - var _drawImageRef$current2; - (_drawImageRef$current2 = drawImageRef.current) === null || _drawImageRef$current2 === void 0 || _drawImageRef$current2.setShowCrop(false); - } - }; - }); + // @ts-ignore + var cropType = cropperImageProps.type; + + // useImperativeHandle(ref, () => ({ + // })) + return /*#__PURE__*/React.createElement(Flex, { style: { border: "1px solid ".concat(token.colorBorder), backgroundColor: token.colorBgBase } }, /*#__PURE__*/React.createElement("div", { - title: "\u76D2\u5B50\u5217\u8868", + title: title, style: { width: '13.9%' } - }, /*#__PURE__*/React.createElement(Title, null, "\u76D2\u5B50\u5217\u8868"), /*#__PURE__*/React.createElement("div", { + }, /*#__PURE__*/React.createElement(Title, null, title), /*#__PURE__*/React.createElement("div", { style: { borderTop: "1px solid ".concat(token.colorBorder) } @@ -76,7 +72,7 @@ var AlgorithmConfig = /*#__PURE__*/forwardRef(function (props, ref) { color: selectedKey === item[rowKey] ? token.colorPrimary : token.colorText, // @ts-ignore backgroundColor: selectedKey === item[rowKey] ? token.blue1 : token.colorBgBase, - transition: '0.2s ease' + transition: '0cancelDraw.2s ease' } }, item.name); }))), /*#__PURE__*/React.createElement("div", { @@ -87,18 +83,10 @@ var AlgorithmConfig = /*#__PURE__*/forwardRef(function (props, ref) { borderLeft: "1px solid ".concat(token.colorBorder), borderRight: "1px solid ".concat(token.colorBorder) } - }, type === 'single' ? /*#__PURE__*/React.createElement(BigImagePreview, { - ref: drawImageRef, - hideTypeBtns: true, - type: "CUSTOM", - screenshotButtonRender: function screenshotButtonRender() { - return /*#__PURE__*/React.createElement(React.Fragment, null); - } - // @ts-ignore - , - data: drawData, - onDraw: drawListener - }) : /*#__PURE__*/React.createElement("div", { + }, type === 'single' ? /*#__PURE__*/React.createElement(CropperImage, _extends({ + type: "line", + onCropEnd: drawListener + }, cropperImageProps)) : /*#__PURE__*/React.createElement("div", { style: { padding: '84px' } diff --git a/packages/material/es/index.d.ts b/packages/material/es/index.d.ts deleted file mode 100644 index 997d45d..0000000 --- a/packages/material/es/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as AlgorithmConfigModal } from './algorithmConfigModal'; -export { default as AlgorithmConfig } from './algorithmConfig'; -export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig'; -export { default as Login } from './login'; -export { default as Password } from './password'; -export { default as SchemaFormModal } from './algorithmConfig/components/schemaFormModal'; -export * from 'rc-util'; diff --git a/packages/material/lib/algorithmConfig/algorithmConfig.d.ts b/packages/material/lib/algorithmConfig/algorithmConfig.d.ts deleted file mode 100644 index 9c0101e..0000000 --- a/packages/material/lib/algorithmConfig/algorithmConfig.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; -import { AlgorithmTableProps } from './components/algorithmTable/AlgorithmTable'; -import { TimeTemplateTableProps } from './components/timeTemplateTable/TimeTemplateTable'; -export interface AlgorithmConfigProps { - onAddAlgorithm?: () => void; - /** - * 单选的图片数据 - */ - drawData?: { - imageKey: string; - odRect?: { - x: number; - y: number; - w: number; - h: number; - }; - score?: string; - time?: string; - }; - /** - * 单选状态圈选后的监听事件 - */ - drawListener?: (data: any) => void; - algorithmTableDataSource?: { - id: string; - templateName: string; - operatingCycle: string; - algorithmOccupied: number; - }[]; - timeTemplateDataSource?: { - id: string; - templateName: string; - operatingCycle: string; - arrangeWeek: string; - algorithmOccupied: string; - }[]; - boxList: { - id: string; - name: string; - }[]; - algorithmTableProps?: AlgorithmTableProps; - timeTemplateTableProps?: TimeTemplateTableProps; - selectedKey?: string; - rowKey?: string; - type: AlgorithmTableProps['tableType']; - onSelect?: (key: string, info?: any) => void; -} -export interface AlgorithmConfigRef { - draw: () => void; - cancelDraw: () => void; -} -declare const AlgorithmConfig: React.ForwardRefExoticComponent>; -export default AlgorithmConfig; diff --git a/packages/material/lib/algorithmConfig/algorithmConfig.js b/packages/material/lib/algorithmConfig/algorithmConfig.js index b21feb9..71c4468 100644 --- a/packages/material/lib/algorithmConfig/algorithmConfig.js +++ b/packages/material/lib/algorithmConfig/algorithmConfig.js @@ -41,33 +41,24 @@ var import_algorithmTable = __toESM(require("./components/algorithmTable")); var import_timeTemplateTable = __toESM(require("./components/timeTemplateTable")); var { useToken } = import_theme.default; var Title = (props) => /* @__PURE__ */ import_react.default.createElement("h2", { style: { margin: "18px 16px", fontSize: "14px", color: "rgba(0, 0, 0, 0.88)" } }, props.children); -var AlgorithmConfig = (0, import_react.forwardRef)((props, ref) => { +var AlgorithmConfig = (0, import_react.forwardRef)((props) => { const { algorithmTableDataSource = [], timeTemplateDataSource = [], boxList = [], - drawData, drawListener, + cropperImageProps = {}, algorithmTableProps, timeTemplateTableProps, selectedKey, type = "multiple", rowKey = "id", - onSelect + onSelect, + title = "盒子名称" } = props; - const drawImageRef = (0, import_react.useRef)(null); const { token } = useToken(); - (0, import_react.useImperativeHandle)(ref, () => ({ - draw: () => { - var _a; - (_a = drawImageRef.current) == null ? void 0 : _a.setShowCrop(true); - }, - cancelDraw: () => { - var _a; - (_a = drawImageRef.current) == null ? void 0 : _a.setShowCrop(false); - } - })); - return /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { style: { border: `1px solid ${token.colorBorder}`, backgroundColor: token.colorBgBase } }, /* @__PURE__ */ import_react.default.createElement("div", { title: "盒子列表", style: { width: "13.9%" } }, /* @__PURE__ */ import_react.default.createElement(Title, null, "盒子列表"), /* @__PURE__ */ import_react.default.createElement("div", { style: { borderTop: `1px solid ${token.colorBorder}` } }, boxList.map((item) => { + const { type: cropType } = cropperImageProps; + return /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { style: { border: `1px solid ${token.colorBorder}`, backgroundColor: token.colorBgBase } }, /* @__PURE__ */ import_react.default.createElement("div", { title, style: { width: "13.9%" } }, /* @__PURE__ */ import_react.default.createElement(Title, null, title), /* @__PURE__ */ import_react.default.createElement("div", { style: { borderTop: `1px solid ${token.colorBorder}` } }, boxList.map((item) => { return /* @__PURE__ */ import_react.default.createElement( "p", { @@ -81,20 +72,17 @@ var AlgorithmConfig = (0, import_react.forwardRef)((props, ref) => { color: selectedKey === item[rowKey] ? token.colorPrimary : token.colorText, // @ts-ignore backgroundColor: selectedKey === item[rowKey] ? token.blue1 : token.colorBgBase, - transition: "0.2s ease" + transition: "0cancelDraw.2s ease" } }, item.name ); }))), /* @__PURE__ */ import_react.default.createElement("div", { style: { boxSizing: "border-box", width: "46.3%", textAlign: "center", borderLeft: `1px solid ${token.colorBorder}`, borderRight: `1px solid ${token.colorBorder}` } }, type === "single" ? /* @__PURE__ */ import_react.default.createElement( - import_meta.BigImagePreview, + import_meta.CropperImage, { - ref: drawImageRef, - hideTypeBtns: true, - type: "CUSTOM", - screenshotButtonRender: () => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null), - data: drawData, - onDraw: drawListener + type: "line", + onCropEnd: drawListener, + ...cropperImageProps } ) : /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "84px" } }, /* @__PURE__ */ import_react.default.createElement( import_antd.Image, diff --git a/packages/material/lib/index.d.ts b/packages/material/lib/index.d.ts deleted file mode 100644 index 997d45d..0000000 --- a/packages/material/lib/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { default as AlgorithmConfigModal } from './algorithmConfigModal'; -export { default as AlgorithmConfig } from './algorithmConfig'; -export type { AlgorithmConfigRef, AlgorithmConfigProps } from './algorithmConfig'; -export { default as Login } from './login'; -export { default as Password } from './password'; -export { default as SchemaFormModal } from './algorithmConfig/components/schemaFormModal'; -export * from 'rc-util'; diff --git a/packages/material/package.json b/packages/material/package.json index 7adce7b..073bfc7 100644 --- a/packages/material/package.json +++ b/packages/material/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/material", - "version": "0.7.7", + "version": "0.8.0", "description": "物料库", "keywords": [ "business", diff --git a/packages/material/src/algorithmConfig/algorithmConfig.tsx b/packages/material/src/algorithmConfig/algorithmConfig.tsx index 02bbe6b..5758c80 100644 --- a/packages/material/src/algorithmConfig/algorithmConfig.tsx +++ b/packages/material/src/algorithmConfig/algorithmConfig.tsx @@ -1,8 +1,8 @@ -import React, { useRef, forwardRef, useImperativeHandle } from 'react'; +import React, { forwardRef } from 'react'; import { Flex, Image } from "antd"; import theme from 'antd/es/theme' -import { BigImagePreview } from '@zhst/meta' -import type { ImgViewRef } from '@zhst/meta' +import { CropperImage } from '@zhst/meta' +import type { CropperImageProps } from '@zhst/meta' import { AlgorithmConfigImg, ErrorImage } from '../utils/base64Images' import AlgorithmTable from './components/algorithmTable' import TimeTemplateTable from './components/timeTemplateTable'; @@ -15,20 +15,6 @@ const Title = (props: any) =>

void - /** - * 单选的图片数据 - */ - drawData?: { - imageKey: string - odRect?: { - x: number - y: number - w: number - h: number - } - score?: string - time?: string - } /** * 单选状态圈选后的监听事件 */ @@ -57,6 +43,7 @@ export interface AlgorithmConfigProps { }[] algorithmTableProps?: AlgorithmTableProps timeTemplateTableProps?: TimeTemplateTableProps + cropperImageProps?: CropperImageProps selectedKey?: string rowKey?: string type: AlgorithmTableProps['tableType'] @@ -65,17 +52,15 @@ export interface AlgorithmConfigProps { } export interface AlgorithmConfigRef { - draw: () => void; - cancelDraw: () => void; } -const AlgorithmConfig = forwardRef((props, ref) => { +const AlgorithmConfig = forwardRef((props) => { const { algorithmTableDataSource = [], timeTemplateDataSource = [], boxList = [], - drawData, drawListener, + cropperImageProps = {}, algorithmTableProps, timeTemplateTableProps, selectedKey, @@ -83,17 +68,12 @@ const AlgorithmConfig = forwardRef((pr rowKey = 'id', onSelect, title='盒子名称', } = props - const drawImageRef = useRef(null) const { token } = useToken() + // @ts-ignore + const { type: cropType } = cropperImageProps - useImperativeHandle(ref, () => ({ - draw: () => { - drawImageRef.current?.setShowCrop(true) - }, - cancelDraw: () => { - drawImageRef.current?.setShowCrop(false) - }, - })) + // useImperativeHandle(ref, () => ({ + // })) return ( @@ -113,7 +93,7 @@ const AlgorithmConfig = forwardRef((pr color: selectedKey === item[rowKey] ? token.colorPrimary : token.colorText, // @ts-ignore backgroundColor: selectedKey === item[rowKey] ? token.blue1 : token.colorBgBase, - transition: '0.2s ease' + transition: '0cancelDraw.2s ease' }} >{item.name}

) @@ -121,15 +101,12 @@ const AlgorithmConfig = forwardRef((pr
+ {/* 单个配置 */} {type === 'single' ? ( - <>} - // @ts-ignore - data={drawData} - onDraw={drawListener} + ) : (
diff --git a/packages/material/src/algorithmConfig/demo/basic.tsx b/packages/material/src/algorithmConfig/demo/basic.tsx index 8afd974..e80605b 100644 --- a/packages/material/src/algorithmConfig/demo/basic.tsx +++ b/packages/material/src/algorithmConfig/demo/basic.tsx @@ -42,43 +42,33 @@ const demo = () => { const [timeTemplateData, setTimeTemplateData] = useState(timeTemplateDataSource) const [boxList, setBoxList] = useState(boxListData) const [selectedKey, setSelectedKey] = useState('1') + const [cropType, setCropType] = useState<'line' | 'rect'>('line') const [algorithmSelectedKey, setAlgorithmSelectedKey] = useState('1') const [tableType, setTableType] = useState('multiple') - const [drawData, setDrawData] = useState<{ - imageKey: string; - odRect?: { x: number; y: number; h: number; w: number } - }>({ - imageKey: '', - }) - + const [editAble, setEditAble] = useState(false) const algorithmConfigRef = useRef(null) // 绘画事件 const handleDraw = (id: any, info: any) => { console.log('箭头圈选事件', id, info) - // 先赋值绘画框对象,再打开绘画功能 - setDrawData({ - imageKey: info.imageKey, - odRect: info.odRect, - }) - algorithmConfigRef.current?.draw() + setEditAble(true) + setCropType('line') } return ( setTableType(_status ? 'single': 'multiple')} /> + setCropType(_status ? 'rect': 'line')} /> + setEditAble(pre => !pre) + }}>{editAble ? '圈选' : '取消圈选'} console.log('监听圈选后的事件', o)} selectedKey={selectedKey} onSelect={key => { @@ -88,6 +78,7 @@ const demo = () => { // setBoxList([]) }} type={tableType} + // 算法模块 algorithmTableProps={{ onItemSwitch: (status, id) => { console.log('算法状态 switch 变更') @@ -115,9 +106,15 @@ const demo = () => { { label: '黑夜', value: '2' }, ] }} + // 时间模板模块 timeTemplateTableProps={{ onItemBlur: (val, id, itemInfo) => console.log('失焦事件', val, id, itemInfo), }} + cropperImageProps={{ + type: cropType, + editAble, + url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png' + }} /> ); diff --git a/packages/material/src/algorithmConfig/index.md b/packages/material/src/algorithmConfig/index.md index cf21815..946dc7b 100644 --- a/packages/material/src/algorithmConfig/index.md +++ b/packages/material/src/algorithmConfig/index.md @@ -55,6 +55,12 @@ group: | type | fire 火焰、smoke:烟雾、traffic: 人流量、face: 面部遮挡、destroy:人员损坏、wander:人员徘徊、cameraBlock:摄像头遮挡、gather:人员聚集 | string | fire | - | | onFinish | 提交事件,可以通过返回布尔值来判定 | async (values) => Promise | - | - | +### cropperImageProps + +图片裁切组件透传,参考 Meta/CropperImage 组件 + +> 详细的参数:[CropperImage](/modules/meta/cropper-image) + ### algorithmConfigRef | 参数 | 说明 | 类型 | 默认值 | 版本 | diff --git a/packages/meta/CHANGELOG.md b/packages/meta/CHANGELOG.md index 7bf6e8f..74921c2 100644 --- a/packages/meta/CHANGELOG.md +++ b/packages/meta/CHANGELOG.md @@ -1,5 +1,29 @@ # @zhst/utils +## 0.11.0 + +### Minor Changes + +- 修改物料库算法编辑新增箭头选择,元组件新增图片标记组件 + +### Patch Changes + +- Updated dependencies + - @zhst/meta@0.11.0 + - @zhst/func@0.9.2 + - @zhst/hooks@0.8.11 + +## 0.10.0 + +### Minor Changes + +- 优化 meta 预览图组件 + +### Patch Changes + +- Updated dependencies + - @zhst/meta@0.10.0 + ## 0.9.7 ### Patch Changes diff --git a/packages/meta/es/BigImagePreview/BigImagePreview.js b/packages/meta/es/BigImagePreview/BigImagePreview.js index a7b5d37..c07d1c2 100644 --- a/packages/meta/es/BigImagePreview/BigImagePreview.js +++ b/packages/meta/es/BigImagePreview/BigImagePreview.js @@ -18,7 +18,7 @@ import classNames from 'classnames'; import { get, pick, isNull, generateImg, dataURLToBlob, getTransforms, addEventListenerWrapper, getFileByRect } from '@zhst/func'; import Align from 'rc-align'; import { Button, Empty } from '..'; -import Icon from "../iconfont"; +import { IconFont as Icon } from '@zhst/icon'; import { Cropper, Viewer, EVENT_VIEWER_TRANSFORM_CHANGE, EVENT_VIEWER_READY, EVENT_CROP_START, EVENT_CROP_END } from "../ImageEditor"; import BtnGroup from "./components/BtnGroup"; import "./index.less"; @@ -237,6 +237,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref) selectShape = shapeList.find(function (v) { return v['id'] === id; }); + console.log('selectShape', selectShape); if (selectShape) { setSelectAlgorithmVersion(selectShape['algorithmVersion']); //换算成屏幕坐标 @@ -258,7 +259,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref) // @ts-ignore setCropRect(null); } - case 4: + case 5: case "end": return _context.stop(); } @@ -323,6 +324,7 @@ export var BigImagePreview = /*#__PURE__*/React.forwardRef(function (props, ref) }()); cropInsRef.current = new Cropper(imgContainerRef.current, { showMask: true, + type: 'arrow', viewer: imgIns }); } diff --git a/packages/meta/es/BigImagePreview/components/BtnGroup/index.js b/packages/meta/es/BigImagePreview/components/BtnGroup/index.js index c8854d7..f385505 100644 --- a/packages/meta/es/BigImagePreview/components/BtnGroup/index.js +++ b/packages/meta/es/BigImagePreview/components/BtnGroup/index.js @@ -2,7 +2,7 @@ import React from 'react'; import classNames from 'classnames'; // @ts-ignore import { Button, Tooltip } from "../../.."; -import Icon from "../../../iconfont"; +import { IconFont as Icon } from '@zhst/icon'; import "./index.less"; var componentName = "zhst-image__btn-group"; export var BtnGroup = function BtnGroup(props) { diff --git a/packages/meta/es/CompareImage/CompareImage.js b/packages/meta/es/CompareImage/CompareImage.js index e4b5558..5d84cc4 100644 --- a/packages/meta/es/CompareImage/CompareImage.js +++ b/packages/meta/es/CompareImage/CompareImage.js @@ -80,7 +80,7 @@ var CompareImage = /*#__PURE__*/forwardRef(function (props, ref) { }); return /*#__PURE__*/React.createElement("div", { className: classNames("".concat(componentName, "__container")) - }, /*#__PURE__*/React.createElement("div", { + }, label && /*#__PURE__*/React.createElement("div", { className: classNames("".concat(componentName, "__label")) }, label), !url ? /*#__PURE__*/React.createElement("div", { className: classNames("".concat(componentName, "__empty")) diff --git a/packages/meta/es/ImageEditor/cropper/event.js b/packages/meta/es/ImageEditor/cropper/event.js index 3d3893a..faefbe1 100644 --- a/packages/meta/es/ImageEditor/cropper/event.js +++ b/packages/meta/es/ImageEditor/cropper/event.js @@ -30,7 +30,7 @@ export default { unbind: function unbind() { var eventHandleList = this.eventHandleList; for (var index = eventHandleList.length; index > 0; index--) { - var handler = eventHandleList.shift; + var handler = eventHandleList[index - 1]; try { handler.remove(); } catch (error) { diff --git a/packages/meta/es/ImageEditor/cropper/viewerBridge.js b/packages/meta/es/ImageEditor/cropper/viewerBridge.js index ab55778..a200d90 100644 --- a/packages/meta/es/ImageEditor/cropper/viewerBridge.js +++ b/packages/meta/es/ImageEditor/cropper/viewerBridge.js @@ -12,9 +12,12 @@ export default { option = this.option; if (this.options.viewer) { var viewer = this.options.viewer; + var scaleAble = this.options.scaleAble; //添加缩放事件 - var handleWhele = addEventListenerWrapper(container, EVENT_WHEEL, this.onWheel.bind(this)); - eventHandleList.push(handleWhele); + if (scaleAble) { + var handleWhele = addEventListenerWrapper(canvas, EVENT_WHEEL, this.onWheel.bind(this)); + eventHandleList.push(handleWhele); + } //添加事件监听 获取limit crop box & 渲染canvas this.onTransformChange(viewer); this.limited = true; @@ -76,8 +79,8 @@ export default { //渲染预览框 if (this.previewBox) { - var canvas = this.previewBox; - var ctx = canvas.getContext('2d'); + var _canvas = this.previewBox; + var ctx = _canvas.getContext('2d'); var viewerRender = viewer.renderCanvas.bind(viewer); viewerRender(ctx); } diff --git a/packages/meta/es/ImageEditor/viewer/event.js b/packages/meta/es/ImageEditor/viewer/event.js index bfcaa00..77ebe5e 100644 --- a/packages/meta/es/ImageEditor/viewer/event.js +++ b/packages/meta/es/ImageEditor/viewer/event.js @@ -59,7 +59,7 @@ export default { unbind: function unbind() { var eventHandleList = this.eventHandleList; for (var index = eventHandleList.length; index > 0; index--) { - var handler = eventHandleList.shift(); + var handler = eventHandleList[index - 1]; try { handler.remove(); } catch (error) { diff --git a/packages/meta/es/ImageEditor/viewer/helper.js b/packages/meta/es/ImageEditor/viewer/helper.js index 9b67aa7..c3462f4 100644 --- a/packages/meta/es/ImageEditor/viewer/helper.js +++ b/packages/meta/es/ImageEditor/viewer/helper.js @@ -1,7 +1,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var _excluded = ["x", "y"], _excluded2 = ["x", "y"], - _excluded3 = ["x", "y", "w", "h"], + _excluded3 = ["x", "y", "w", "h", "image"], _excluded4 = ["x", "y"], _excluded5 = ["x", "y"], _excluded6 = ["x", "y", "w", "h"]; @@ -39,6 +39,13 @@ export var setNumberAccuracy = function setNumberAccuracy(originNumber) { return returnData; }; export default { + targetTransform: { + translateX: 0, + translateY: 0, + scale: 0, + rotate: 0 + // rotate: 90, + }, windowToCanvasAxis: function windowToCanvasAxis(event) { var _this$canvas$getBound = this.canvas.getBoundingClientRect(), x = _this$canvas$getBound.x, @@ -103,11 +110,19 @@ export default { w = _ref4$w === void 0 ? 0 : _ref4$w, _ref4$h = _ref4.h, h = _ref4$h === void 0 ? 0 : _ref4$h, + image = _ref4.image, others = _objectWithoutProperties(_ref4, _excluded3); - var _this$image = this.image, - width = _this$image.width, - height = _this$image.height; - var targetTransform = this.targetTransform; + var _ref5 = this.image || image, + width = _ref5.width, + height = _ref5.height; + var _ref6 = this || { + translateX: 0, + translateY: 0, + scale: 0, + rotate: 0 + // rotate: 90, + }, + targetTransform = _ref6.targetTransform; var rotate = targetTransform.rotate; var theta = Math.PI / 180 * rotate; var offsetRect = { @@ -140,13 +155,13 @@ export default { __AXIS_TYPE__: AXIS_TYPE_CANVAS }); }, - originAxisToImgAxis: function originAxisToImgAxis(_ref5) { - var x = _ref5.x, - y = _ref5.y, - others = _objectWithoutProperties(_ref5, _excluded4); - var _this$image2 = this.image, - width = _this$image2.width, - height = _this$image2.height; + originAxisToImgAxis: function originAxisToImgAxis(_ref7) { + var x = _ref7.x, + y = _ref7.y, + others = _objectWithoutProperties(_ref7, _excluded4); + var _this$image = this.image, + width = _this$image.width, + height = _this$image.height; var targetTransform = this.targetTransform; var rotate = targetTransform.rotate; var theta = Math.PI / 180 * (360 - rotate); @@ -159,13 +174,13 @@ export default { __AXIS_TYPE__: AXIS_TYPE_IMAGE }); }, - imgAxisToOriginAxis: function imgAxisToOriginAxis(_ref6) { - var _x = _ref6.x, - _y = _ref6.y, - others = _objectWithoutProperties(_ref6, _excluded5); - var _this$image3 = this.image, - width = _this$image3.width, - height = _this$image3.height; + imgAxisToOriginAxis: function imgAxisToOriginAxis(_ref8) { + var _x = _ref8.x, + _y = _ref8.y, + others = _objectWithoutProperties(_ref8, _excluded5); + var _this$image2 = this.image, + width = _this$image2.width, + height = _this$image2.height; // var x = width * _x; var y = height * _y; @@ -182,16 +197,16 @@ export default { __AXIS_TYPE__: AXIS_TYPE_ORIGIN }); }, - getDataUrlbyOriginAxis: function getDataUrlbyOriginAxis(_ref7) { - var _ref7$x = _ref7.x, - x = _ref7$x === void 0 ? 0 : _ref7$x, - _ref7$y = _ref7.y, - y = _ref7$y === void 0 ? 0 : _ref7$y, - _ref7$w = _ref7.w, - w = _ref7$w === void 0 ? 0 : _ref7$w, - _ref7$h = _ref7.h, - h = _ref7$h === void 0 ? 0 : _ref7$h, - others = _objectWithoutProperties(_ref7, _excluded6); + getDataUrlbyOriginAxis: function getDataUrlbyOriginAxis(_ref9) { + var _ref9$x = _ref9.x, + x = _ref9$x === void 0 ? 0 : _ref9$x, + _ref9$y = _ref9.y, + y = _ref9$y === void 0 ? 0 : _ref9$y, + _ref9$w = _ref9.w, + w = _ref9$w === void 0 ? 0 : _ref9$w, + _ref9$h = _ref9.h, + h = _ref9$h === void 0 ? 0 : _ref9$h, + others = _objectWithoutProperties(_ref9, _excluded6); var ctx = this.canvas.getContext('2d'); var commonCanvas = document.createElement('canvas'); commonCanvas.width = w; diff --git a/packages/meta/es/VideoPlayer/VideoPlayer.js b/packages/meta/es/VideoPlayer/VideoPlayer.js index efae045..cabb122 100644 --- a/packages/meta/es/VideoPlayer/VideoPlayer.js +++ b/packages/meta/es/VideoPlayer/VideoPlayer.js @@ -20,7 +20,7 @@ import { useLatest, useUpdateEffect, useFullscreen, useUnmount } from '@zhst/hoo import classNames from 'classnames'; import download from 'downloadjs'; import { Button, message } from '..'; -import Icon from "../iconfont"; +import { IconFont } from '@zhst/icon'; import { Cropper, EVENT_CROP_START, EVENT_CROP_END } from "../ImageEditor"; import FlvPlayer, { FLV_EVENT } from "./components/FlvPlayer"; import Range from "./components/Progress"; @@ -638,7 +638,7 @@ var VideoPlayer = /*#__PURE__*/forwardRef(function (props, ref) { videoInsRef === null || videoInsRef === void 0 || (_videoInsRef$current9 = videoInsRef.current) === null || _videoInsRef$current9 === void 0 || _videoInsRef$current9.pause(); } } - }, /*#__PURE__*/React.createElement(Icon, { + }, /*#__PURE__*/React.createElement(IconFont, { styles: { color: '#fff', display: 'flex' @@ -662,7 +662,7 @@ var VideoPlayer = /*#__PURE__*/forwardRef(function (props, ref) { e.stopPropagation(); toggleFullscreen(); } - }, /*#__PURE__*/React.createElement(Icon, { + }, /*#__PURE__*/React.createElement(IconFont, { styles: { color: '#fff', display: 'flex' diff --git a/packages/meta/es/VideoPlayer/components/Loading/index.js b/packages/meta/es/VideoPlayer/components/Loading/index.js index d7d18b6..c88f084 100644 --- a/packages/meta/es/VideoPlayer/components/Loading/index.js +++ b/packages/meta/es/VideoPlayer/components/Loading/index.js @@ -1,7 +1,7 @@ import React from 'react'; import { Spin } from 'antd'; import classNames from 'classnames'; -import Icon from "../../../iconfont"; +import { IconFont as Icon } from '@zhst/icon'; import "./index.less"; var componentName = "zhst-image__video-view"; var Loading = function Loading(props) { diff --git a/packages/meta/es/iconfont/iconfont.css b/packages/meta/es/iconfont/iconfont.css deleted file mode 100644 index f97863a..0000000 --- a/packages/meta/es/iconfont/iconfont.css +++ /dev/null @@ -1,1679 +0,0 @@ -@font-face { - font-family: "iconfont"; /* Project id 1739270 */ - src: url('iconfont.woff2?t=1689583241972') format('woff2'), - url('iconfont.woff?t=1689583241972') format('woff'), - url('iconfont.ttf?t=1689583241972') format('truetype'); -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-danganxiangqing_hangweifenxi:before { - content: "\e78d"; -} - -.icon-danganxiangqing_shujuganzhi:before { - content: "\e78e"; -} - -.icon-danganxiangqing_huodongguiji:before { - content: "\e78f"; -} - -.icon-danganxiangqing_jibenxinxi:before { - content: "\e7ea"; -} - -.icon-danganxiangqing_fushuwupin:before { - content: "\e7eb"; -} - -.icon-danganxiangqing_jizhanyingyong:before { - content: "\e7ec"; -} - -.icon-jiarudanganku:before { - content: "\e787"; -} - -.icon-dangankunor:before { - content: "\e793"; -} - -.icon-bukongrenwuselect:before { - content: "\e799"; -} - -.icon-bukongrenwunor1:before { - content: "\e79a"; -} - -.icon-dangankuselect:before { - content: "\e79b"; -} - -.icon-jizhanfanor:before { - content: "\e79c"; -} - -.icon-feijidongchechaxunnor:before { - content: "\e79d"; -} - -.icon-jidongchechaxunselect:before { - content: "\e79e"; -} - -.icon-a-lixianfenxiselect2:before { - content: "\e7a1"; -} - -.icon-huisufenxiselect:before { - content: "\e7a2"; -} - -.icon-jizhanfaselect:before { - content: "\e7a3"; -} - -.icon-mubiaojiansuonor:before { - content: "\e7ae"; -} - -.icon-lurenkuselect:before { - content: "\e7b1"; -} - -.icon-shujujiashicangselect:before { - content: "\e7b2"; -} - -.icon-shishijiexiselect:before { - content: "\e7b4"; -} - -.icon-shishijiexinor:before { - content: "\e7b9"; -} - -.icon-jidongchechaxunnor:before { - content: "\e7c1"; -} - -.icon-lurenkunor1:before { - content: "\e7cf"; -} - -.icon-mubiaotezhengchaxunnor:before { - content: "\e7e1"; -} - -.icon-yujingjiluselect:before { - content: "\e7e2"; -} - -.icon-mubiaotezhengchaxunselect:before { - content: "\e7e3"; -} - -.icon-feijidongchechaxunselect:before { - content: "\e7e4"; -} - -.icon-yujingjilunor:before { - content: "\e7e5"; -} - -.icon-lixianfenxiselect:before { - content: "\e7e6"; -} - -.icon-huisufenxinor:before { - content: "\e7e7"; -} - -.icon-shujujiashicangnor:before { - content: "\e7e8"; -} - -.icon-mubiaojiansuoselect:before { - content: "\e7e9"; -} - -.icon-kuangxuangongju:before { - content: "\e796"; -} - -.icon-fengniao:before { - content: "\e792"; -} - -.icon-zhankai:before { - content: "\e790"; -} - -.icon-shouqi:before { - content: "\e791"; -} - -.icon-shijian:before { - content: "\e786"; -} - -.icon-dingwei2:before { - content: "\e613"; -} - -.icon-renyuan:before { - content: "\e784"; -} - -.icon-houtai:before { - content: "\e785"; -} - -.icon-zuo:before { - content: "\e781"; -} - -.icon-you:before { - content: "\e783"; -} - -.icon-kakou:before { - content: "\e780"; -} - -.icon-yujing1:before { - content: "\e77e"; -} - -.icon-yuan2:before { - content: "\e77d"; -} - -.icon-moxingpengzhuang:before { - content: "\e777"; -} - -.icon-moxingpengzhuangnor:before { - content: "\e778"; -} - -.icon-lurenku:before { - content: "\e77b"; -} - -.icon-lurenkunor:before { - content: "\e77c"; -} - -.icon-shiming:before { - content: "\e776"; -} - -.icon-suoxiao2:before { - content: "\e774"; -} - -.icon-fangda1:before { - content: "\e775"; -} - -.icon-guanbi2:before { - content: "\e772"; -} - -.icon-fanhui1:before { - content: "\e773"; -} - -.icon-xiansuomopai:before { - content: "\e76f"; -} - -.icon-xiansuomopainor:before { - content: "\e76e"; -} - -.icon-zhajiyujing:before { - content: "\e770"; -} - -.icon-zhajiyujingnor:before { - content: "\e771"; -} - -.icon-zhuizongpeizhi:before { - content: "\e76c"; -} - -.icon-zhuizongpeizhinor:before { - content: "\e76d"; -} - -.icon-dapingqiehuan:before { - content: "\e76b"; -} - -.icon-xuanze:before { - content: "\e769"; -} - -.icon-shaixuan1:before { - content: "\e76a"; -} - -.icon-chekashebei:before { - content: "\e764"; -} - -.icon-imsishebei:before { - content: "\e765"; -} - -.icon-xingtishebei:before { - content: "\e766"; -} - -.icon-renlianshebei:before { - content: "\e767"; -} - -.icon-wifishebei:before { - content: "\e768"; -} - -.icon-a-miaozhun2:before { - content: "\e762"; -} - -.icon-a-bianzu19:before { - content: "\e763"; -} - -.icon-fanye:before { - content: "\e75e"; -} - -.icon-shenfenzheng:before { - content: "\e75f"; -} - -.icon-dizhi:before { - content: "\e760"; -} - -.icon-guanbi:before { - content: "\e761"; -} - -.icon-dianwei1:before { - content: "\e75b"; -} - -.icon-weikakou:before { - content: "\e757"; -} - -.icon-weikakounor:before { - content: "\e758"; -} - -.icon-changsuoma:before { - content: "\e759"; -} - -.icon-changsuomanor:before { - content: "\e75a"; -} - -.icon-yujing:before { - content: "\e756"; -} - -.icon-jiansuonor:before { - content: "\e747"; -} - -.icon-tonghangrenfenxinor1:before { - content: "\e748"; -} - -.icon-zhinengyanpannor:before { - content: "\e749"; -} - -.icon-bukongyujingnor:before { - content: "\e74a"; -} - -.icon-bukongrenwunor:before { - content: "\e74b"; -} - -.icon-dianziditunor:before { - content: "\e754"; -} - -.icon-zhuizongnor1:before { - content: "\e755"; -} - -.icon-zhuizong1:before { - content: "\e746"; -} - -.icon-bukongrenwu3:before { - content: "\e74c"; -} - -.icon-dianziditu:before { - content: "\e74d"; -} - -.icon-bukongyujing:before { - content: "\e750"; -} - -.icon-tonghangrenfenxi1:before { - content: "\e751"; -} - -.icon-zhinengyanpan:before { - content: "\e752"; -} - -.icon-jiansuo1:before { - content: "\e753"; -} - -.icon-kaiqijulei:before { - content: "\e745"; -} - -.icon-tongbu:before { - content: "\e744"; -} - -.icon-tonghangrenfenxi:before { - content: "\e743"; -} - -.icon-tonghangrenfenxinor:before { - content: "\e742"; -} - -.icon-jizhanyingyong:before { - content: "\e741"; -} - -.icon-haikangrenlianbukongnor:before { - content: "\e740"; -} - -.icon-haikangrenlianbukong:before { - content: "\e73f"; -} - -.icon-tuozhanshouduantishi:before { - content: "\e73e"; -} - -.icon-fanhuimopailiebiao:before { - content: "\e73d"; -} - -.icon-toukuijiancenor:before { - content: "\e73c"; -} - -.icon-toukuijiance:before { - content: "\e718"; -} - -.icon-zhuixing:before { - content: "\e717"; -} - -.icon-tishi4:before { - content: "\e73b"; -} - -.icon-a-shaixuanfeiji:before { - content: "\e733"; -} - -.icon-a-zidongtiaozhengfanweifeiji:before { - content: "\e73a"; -} - -.icon-heziyunwei:before { - content: "\e739"; -} - -.icon-qiehuan:before { - content: "\e738"; -} - -.icon-disanfangxiaoxinor:before { - content: "\e737"; -} - -.icon-disanfangxiaoxi:before { - content: "\e736"; -} - -.icon-daohang:before { - content: "\e735"; -} - -.icon-yonghu:before { - content: "\e734"; -} - -.icon-feiji:before { - content: "\e732"; -} - -.icon-jieshuzhuizong:before { - content: "\e730"; -} - -.icon-huisuzhoubian:before { - content: "\e731"; -} - -.icon-jixuzhuizong:before { - content: "\e72d"; -} - -.icon-tiaozhengfanwei:before { - content: "\e72e"; -} - -.icon-jiansuo:before { - content: "\e72f"; -} - -.icon-guiji:before { - content: "\e72c"; -} - -.icon-jichuxinxi:before { - content: "\e72b"; -} - -.icon-danganzhaiyao:before { - content: "\e72a"; -} - -.icon-jingzhunbukongicon_on:before { - content: "\e728"; -} - -.icon-jingzhunbukongicon_off:before { - content: "\e729"; -} - -.icon-tiaozhuan:before { - content: "\e727"; -} - -.icon-shezhi:before { - content: "\e726"; -} - -.icon-bangzhu1:before { - content: "\e725"; -} - -.icon-shuaxin1:before { - content: "\e724"; -} - -.icon-duosucaibeifen:before { - content: "\e722"; -} - -.icon-duosucai:before { - content: "\e723"; -} - -.icon-shujutongji:before { - content: "\e721"; -} - -.icon-renlian:before { - content: "\e71c"; -} - -.icon-xingti:before { - content: "\e71d"; -} - -.icon-jidongche:before { - content: "\e71e"; -} - -.icon-huisufenxi4:before { - content: "\e71f"; -} - -.icon-lixianfenxi4:before { - content: "\e720"; -} - -.icon-feijidongche:before { - content: "\e71b"; -} - -.icon-shujudaping:before { - content: "\e71a"; -} - -.icon-peizhisuanfa:before { - content: "\e719"; -} - -.icon-zhuizong:before { - content: "\e715"; -} - -.icon-zhuizongnor:before { - content: "\e716"; -} - -.icon-dianwei:before { - content: "\e714"; -} - -.icon-Container:before { - content: "\e713"; -} - -.icon-Attachment:before { - content: "\e712"; -} - -.icon-cha:before { - content: "\e711"; -} - -.icon-gou:before { - content: "\e710"; -} - -.icon-daoru:before { - content: "\e70f"; -} - -.icon-quanxijiansuo:before { - content: "\e70e"; -} - -.icon-chakanjiankong:before { - content: "\e70c"; -} - -.icon-tishi3:before { - content: "\e70d"; -} - -.icon-heiyemoshi:before { - content: "\e70b"; -} - -.icon-zhengchangmoshi:before { - content: "\e70a"; -} - -.icon-dingwei1:before { - content: "\e709"; -} - -.icon-paixu:before { - content: "\e708"; -} - -.icon-tianjiayuan:before { - content: "\e707"; -} - -.icon-juleidangankunor:before { - content: "\e705"; -} - -.icon-juleidanganku:before { - content: "\e706"; -} - -.icon-guanlian:before { - content: "\e704"; -} - -.icon-renlianbiaozhu:before { - content: "\e703"; -} - -.icon-juleijieguo:before { - content: "\e6ec"; -} - -.icon-juleirenwunor:before { - content: "\e6fb"; -} - -.icon-juleijieguonor:before { - content: "\e701"; -} - -.icon-juleirenwu:before { - content: "\e702"; -} - -.icon-zhongzhi3:before { - content: "\e8ff"; -} - -.icon-xuanzhuan1:before { - content: "\e6fd"; -} - -.icon-shuangmubiaozhu1:before { - content: "\e700"; -} - -.icon-shoudongkuangxuan:before { - content: "\e6f9"; -} - -.icon-zanting1:before { - content: "\e6fe"; -} - -.icon-zhongzhi1:before { - content: "\e6ff"; -} - -.icon-shoudong:before { - content: "\e6fa"; -} - -.icon-zidong:before { - content: "\e6fc"; -} - -.icon-zhenduan:before { - content: "\e6f8"; -} - -.icon-Check-Circle-Fill1:before { - content: "\e6f3"; -} - -.icon-Info--Circle-Fill:before { - content: "\e6f4"; -} - -.icon-Close-Circle-Fill:before { - content: "\e6f5"; -} - -.icon-Warning-Circle-Fill:before { - content: "\e6f6"; -} - -.icon-Question-Circle-Fill:before { - content: "\e6f7"; -} - -.icon-zancunjia:before { - content: "\e6f2"; -} - -.icon-Check-Circle-Fill:before { - content: "\e6f1"; -} - -.icon-tupianji:before { - content: "\e6f0"; -} - -.icon-quanping1:before { - content: "\e6ed"; -} - -.icon-yinliang:before { - content: "\e6ee"; -} - -.icon-suoxiao1:before { - content: "\e6ef"; -} - -.icon-home:before { - content: "\e6eb"; -} - -.icon-zuixiaohua:before { - content: "\e6e9"; -} - -.icon-zuidahua:before { - content: "\e6ea"; -} - -.icon-biaozhunhua:before { - content: "\e6e6"; -} - -.icon-julei:before { - content: "\e6e5"; -} - -.icon-bianzu:before { - content: "\e6e7"; -} - -.icon-bianzu3:before { - content: "\e6e8"; -} - -.icon-bianzu7:before { - content: "\e6e3"; -} - -.icon-bianzu2:before { - content: "\e6e4"; -} - -.icon-kapianqiehuan:before { - content: "\e6e2"; -} - -.icon-duobianxing1:before { - content: "\e6e0"; -} - -.icon-fang1:before { - content: "\e6e1"; -} - -.icon-yuan1:before { - content: "\e6df"; -} - -.icon-cejuli:before { - content: "\e6de"; -} - -.icon-wanggekuangxuannor:before { - content: "\e6dc"; -} - -.icon-lujingkuangxuannor:before { - content: "\e6dd"; -} - -.icon-chuansuo:before { - content: "\e6db"; -} - -.icon-bianyuanhezinor:before { - content: "\e6d8"; -} - -.icon-wujiankuhov:before { - content: "\e6d9"; -} - -.icon-caozuorizhinor:before { - content: "\e6da"; -} - -.icon-collect_dot:before { - content: "\e619"; -} - -.icon-chuxiandingweibg:before { - content: "\e6d4"; -} - -.icon-chuxiandingweiicon:before { - content: "\e6d5"; -} - -.icon-shexiangtoudingweibg:before { - content: "\e6d6"; -} - -.icon-shexiangtoudingweiicon:before { - content: "\e6d7"; -} - -.icon-xiafajieguo:before { - content: "\e6d2"; -} - -.icon-daochu1:before { - content: "\e6d3"; -} - -.icon-zuijinchuxian:before { - content: "\e6cc"; -} - -.icon-leijizhuapai:before { - content: "\e6d0"; -} - -.icon-yichangshijian:before { - content: "\e6d1"; -} - -.icon-dingwei:before { - content: "\e6cb"; -} - -.icon-tupian:before { - content: "\e6ad"; -} - -.icon-wenti:before { - content: "\e6ac"; -} - -.icon-lixian1:before { - content: "\e6ab"; -} - -.icon-yichang:before { - content: "\e6a8"; -} - -.icon-zhuixing-xiugaidianwei:before { - content: "\e6a7"; -} - -.icon-wenhao1:before { - content: "\e69e"; -} - -.icon-ditu_dingwei:before { - content: "\e69d"; -} - -.icon-ditu_fangda:before { - content: "\e689"; -} - -.icon-ditu_suoxiao:before { - content: "\e69a"; -} - -.icon-chakanbukongrenwu:before { - content: "\e688"; -} - -.icon-lietu:before { - content: "\e687"; -} - -.icon-zhongzhi:before { - content: "\e67e"; -} - -.icon-xialada:before { - content: "\e67f"; -} - -.icon-zhinengguanlian_xingti:before { - content: "\e67b"; -} - -.icon-zhinengguanlian_renlian:before { - content: "\e67c"; -} - -.icon-xiajiantou:before { - content: "\e75c"; -} - -.icon-zhinengguanlian_xiaojiantou:before { - content: "\e67d"; -} - -.icon-zhinengguanlian_jiantou:before { - content: "\e67a"; -} - -.icon-shangjiantou:before { - content: "\e75d"; -} - -.icon-banbenxinxi:before { - content: "\e679"; -} - -.icon-wenhao:before { - content: "\e61f"; -} - -.icon-bianjirenyuan:before { - content: "\e7e0"; -} - -.icon-tishi2:before { - content: "\e7df"; -} - -.icon-shexiangji2:before { - content: "\e7de"; -} - -.icon-guijizhuizong:before { - content: "\e7dd"; -} - -.icon-jiezhen1:before { - content: "\e7dc"; -} - -.icon-tianjiaguijihuisu:before { - content: "\e7db"; -} - -.icon-tingzhi:before { - content: "\e7cd"; -} - -.icon-baoweiquan:before { - content: "\e7ce"; -} - -.icon-shangchuanshipin:before { - content: "\e7d0"; -} - -.icon-yidong:before { - content: "\e7d1"; -} - -.icon-chuangjianxinbukong1:before { - content: "\e7d2"; -} - -.icon-yichu1:before { - content: "\e7d3"; -} - -.icon-tishi1:before { - content: "\e7d4"; -} - -.icon-VS:before { - content: "\e7d5"; -} - -.icon-quanjuzonglan:before { - content: "\e7d6"; -} - -.icon-chakanfenxirenwu1:before { - content: "\e7d7"; -} - -.icon-xiaoxi:before { - content: "\e7d8"; -} - -.icon-yonghuming:before { - content: "\e7d9"; -} - -.icon-tuichu:before { - content: "\e7da"; -} - -.icon-guijizhuizongnor:before { - content: "\e7cb"; -} - -.icon-guijizhuizong2:before { - content: "\e7cc"; -} - -.icon-bukongrenwu1:before { - content: "\e7b7"; -} - -.icon-shexiangji:before { - content: "\e7b8"; -} - -.icon-yujingditu:before { - content: "\e7ba"; -} - -.icon-lixianfenxi2:before { - content: "\e7bb"; -} - -.icon-yuanguanli1:before { - content: "\e7bc"; -} - -.icon-danganku:before { - content: "\e7bd"; -} - -.icon-huisufenxi2:before { - content: "\e7be"; -} - -.icon-kuneijiansuo:before { - content: "\e7bf"; -} - -.icon-jiegouhuachaxun:before { - content: "\e7c0"; -} - -.icon-bukongrenwu2:before { - content: "\e7c2"; -} - -.icon-yuanguanli2:before { - content: "\e7c3"; -} - -.icon-shexiangji1:before { - content: "\e7c4"; -} - -.icon-kuneijiansuo1:before { - content: "\e7c5"; -} - -.icon-lixianfenxi3:before { - content: "\e7c6"; -} - -.icon-danganku1:before { - content: "\e7c7"; -} - -.icon-yujingditu1:before { - content: "\e7c8"; -} - -.icon-huisufenxi3:before { - content: "\e7c9"; -} - -.icon-jiegouhuachaxunnor:before { - content: "\e7ca"; -} - -.icon-chuangjianxinbukong:before { - content: "\e7b6"; -} - -.icon-kuangxuan:before { - content: "\e77f"; -} - -.icon-gaojishaixuan:before { - content: "\e779"; -} - -.icon-gaojishaixuanshouqi:before { - content: "\e77a"; -} - -.icon-bukongrenwu:before { - content: "\e7b5"; -} - -.icon-riqi:before { - content: "\e74f"; -} - -.icon-shijianqiehuan:before { - content: "\e797"; -} - -.icon-shouquan1:before { - content: "\e7b3"; -} - -.icon-video-play:before { - content: "\e653"; -} - -.icon-shishifenxi:before { - content: "\e7af"; -} - -.icon-chakanfenxirenwu:before { - content: "\e7b0"; -} - -.icon-jiegouhuafenxi:before { - content: "\e7ad"; -} - -.icon-tianjiaguiji2:before { - content: "\e6aa"; -} - -.icon-tianjiajiansuomubiao:before { - content: "\e6b0"; -} - -.icon-add:before { - content: "\e661"; -} - -.icon-didian:before { - content: "\e798"; -} - -.icon-bofanghov:before { - content: "\e79f"; -} - -.icon-bofang3:before { - content: "\e7a0"; -} - -.icon-jinggao:before { - content: "\e788"; -} - -.icon-tishi:before { - content: "\e789"; -} - -.icon-bangzhu:before { - content: "\e78a"; -} - -.icon-guanbi1:before { - content: "\e78b"; -} - -.icon-chenggong:before { - content: "\e78c"; -} - -.icon-qianwang:before { - content: "\e7ac"; -} - -.icon-shouquan:before { - content: "\e7ab"; -} - -.icon-jingweidu:before { - content: "\e7aa"; -} - -.icon-shanchu1:before { - content: "\e74e"; -} - -.icon-daochu:before { - content: "\e782"; -} - -.icon-ziyuanguanli:before { - content: "\e7a4"; -} - -.icon-fuwuqishouquan:before { - content: "\e7a5"; -} - -.icon-xiugaimima:before { - content: "\e7a6"; -} - -.icon-zhanghaoguanli:before { - content: "\e7a7"; -} - -.icon-suanlipeie:before { - content: "\e7a8"; -} - -.icon-VMSpeizhi:before { - content: "\e7a9"; -} - -.icon-tianjia1:before { - content: "\e794"; -} - -.icon-yichu:before { - content: "\e795"; -} - -.icon-lujing:before { - content: "\e6cf"; -} - -.icon-jiankongxinxi:before { - content: "\e6c8"; -} - -.icon-fanwei:before { - content: "\e6c9"; -} - -.icon-anfadidian:before { - content: "\e6ca"; -} - -.icon-gongjuxiang:before { - content: "\e6cd"; -} - -.icon-gongjuxiangguanbi1:before { - content: "\e6ce"; -} - -.icon-jiezhen:before { - content: "\e6c2"; -} - -.icon-huisufenxi1:before { - content: "\e6c6"; -} - -.icon-huisufenxi:before { - content: "\e6c7"; -} - -.icon-tianjiashipinwenjian1:before { - content: "\e6c5"; -} - -.icon-jiazaishibai:before { - content: "\e6c3"; -} - -.icon-shuaxin:before { - content: "\e6c4"; -} - -.icon-quanping:before { - content: "\e6c0"; -} - -.icon-quxiaoquanping:before { - content: "\e6c1"; -} - -.icon-shipinbofang:before { - content: "\e6be"; -} - -.icon-shipinzanting:before { - content: "\e6bf"; -} - -.icon-lixianguiji:before { - content: "\e6bd"; -} - -.icon-lixian:before { - content: "\e6bc"; -} - -.icon-xiaojiaobiao:before { - content: "\e6bb"; -} - -.icon-shangchuan1:before { - content: "\e6ba"; -} - -.icon-tianjiaweijiansuoduixiang:before { - content: "\e6b8"; -} - -.icon-tianjiaweijiansuojilu:before { - content: "\e6b9"; -} - -.icon-lixianfenxi1:before { - content: "\e6b7"; -} - -.icon-kuaisujiansuohov:before { - content: "\e6b5"; -} - -.icon-kuaisujiansuo1:before { - content: "\e6b6"; -} - -.icon-kuaisujiansuo:before { - content: "\e6b4"; -} - -.icon-yuanguanli:before { - content: "\e6b1"; -} - -.icon-shexiangtou:before { - content: "\e6b2"; -} - -.icon-lixianfenxi:before { - content: "\e6b3"; -} - -.icon-filter:before { - content: "\e61a"; -} - -.icon-tianjiaweizhuizongduixiang2:before { - content: "\e6af"; -} - -.icon-tianjiaweizhuizongduixiang1:before { - content: "\e6ae"; -} - -.icon-baocun1:before { - content: "\e6a9"; -} - -.icon-tianjiashipinwenjianjia:before { - content: "\e6a5"; -} - -.icon-tianjiashipinwenjian:before { - content: "\e6a6"; -} - -.icon-ditu:before { - content: "\e6a4"; -} - -.icon-xinjianshexiangtou:before { - content: "\e6a3"; -} - -.icon-lishihuisu:before { - content: "\e6a2"; -} - -.icon-decoyitianjiaweiguiji:before { - content: "\e69f"; -} - -.icon-bofangqiehuan:before { - content: "\e6a0"; -} - -.icon-tianjia:before { - content: "\e6a1"; -} - -.icon-baocun:before { - content: "\e698"; -} - -.icon-gongjuxiangguanbi:before { - content: "\e699"; -} - -.icon-shangchuan:before { - content: "\e69b"; -} - -.icon-gongjuxiang1:before { - content: "\e69c"; -} - -.icon-logo:before { - content: "\e692"; -} - -.icon-setting:before { - content: "\e627"; -} - -.icon-user:before { - content: "\e628"; -} - -.icon-quit:before { - content: "\e629"; -} - -.icon-arrowzhankaimeixuanzhong:before { - content: "\e693"; -} - -.icon-arrowzhankaixuanzhong:before { - content: "\e694"; -} - -.icon-xuanzexuanzhong:before { - content: "\e695"; -} - -.icon-xuanzebanxuan:before { - content: "\e696"; -} - -.icon-xuanzenor:before { - content: "\e697"; -} - -.icon-shaixuanguanbinor:before { - content: "\e691"; -} - -.icon-gengduo:before { - content: "\e68e"; -} - -.icon-youzhankai:before { - content: "\e68f"; -} - -.icon-zuoshouqi:before { - content: "\e690"; -} - -.icon-yuan:before { - content: "\e68a"; -} - -.icon-duobianxing:before { - content: "\e68b"; -} - -.icon-fang:before { - content: "\e68c"; -} - -.icon-ceju:before { - content: "\e68d"; -} - -.icon-shishizhuizong1:before { - content: "\e683"; -} - -.icon-guijihuisu1:before { - content: "\e684"; -} - -.icon-tianjiaguiji:before { - content: "\e685"; -} - -.icon-yichuguiji:before { - content: "\e686"; -} - -.icon-fangda:before { - content: "\e680"; -} - -.icon-suoxiao:before { - content: "\e681"; -} - -.icon-xiazai:before { - content: "\e682"; -} - -.icon-fanhui:before { - content: "\e678"; -} - -.icon-sousuo:before { - content: "\e669"; -} - -.icon-quxiaoxuanzhong:before { - content: "\e66a"; -} - -.icon-piliangxuanzenor:before { - content: "\e66b"; -} - -.icon-kaiqifenxi:before { - content: "\e66c"; -} - -.icon-quxiaofenxi:before { - content: "\e66d"; -} - -.icon-shaixuan:before { - content: "\e66e"; -} - -.icon-dangan:before { - content: "\e66f"; -} - -.icon-bofang:before { - content: "\e670"; -} - -.icon-zanting:before { - content: "\e671"; -} - -.icon-shanchu:before { - content: "\e672"; -} - -.icon-tianjiaweizhuizongduixiang:before { - content: "\e673"; -} - -.icon-chakandatu:before { - content: "\e674"; -} - -.icon-jiansuojilu:before { - content: "\e675"; -} - -.icon-yuzhi:before { - content: "\e676"; -} - -.icon-chakanxiangqing:before { - content: "\e677"; -} - -.icon-guijihuisu:before { - content: "\e65c"; -} - -.icon-dianweipeizhinor:before { - content: "\e65d"; -} - -.icon-yirenyidang:before { - content: "\e65e"; -} - -.icon-tongbanfenxi:before { - content: "\e65f"; -} - -.icon-qiehuanzuo:before { - content: "\e662"; -} - -.icon-qiehuanyou:before { - content: "\e663"; -} - -.icon-tingzhidengdai:before { - content: "\e664"; -} - -.icon-yiguanbi:before { - content: "\e665"; -} - -.icon-danchuangguanbi:before { - content: "\e666"; -} - -.icon-lishijilu:before { - content: "\e64a"; -} - -.icon-xuanzhuan:before { - content: "\e648"; -} - -.icon-qingchu:before { - content: "\e649"; -} - -.icon-dangantianjia:before { - content: "\e63d"; -} - -.icon-bianji:before { - content: "\e63e"; -} - -.icon-fullscreen:before { - content: "\e63b"; -} - -.icon-cancle_fullscreen:before { - content: "\e63c"; -} - -.icon-quanyujiansuo_nor:before { - content: "\e639"; -} - -.icon-guijihuisu_nor:before { - content: "\e63a"; -} - diff --git a/packages/meta/es/iconfont/iconfont.js b/packages/meta/es/iconfont/iconfont.js deleted file mode 100644 index 6eeb914..0000000 --- a/packages/meta/es/iconfont/iconfont.js +++ /dev/null @@ -1,43 +0,0 @@ -window._iconfont_svg_string_1739270 = '', function (h) { - var a = (a = document.getElementsByTagName("script"))[a.length - 1], - l = a.getAttribute("data-injectcss"), - a = a.getAttribute("data-disable-injectsvg"); - if (!a) { - var i, - _c, - o, - t, - z, - v = function v(a, l) { - l.parentNode.insertBefore(a, l); - }; - if (l && !h.__iconfont__svg__cssinject__) { - h.__iconfont__svg__cssinject__ = !0; - try { - document.write(""); - } catch (a) { - console && console.log(a); - } - } - i = function i() { - var a, - l = document.createElement("div"); - l.innerHTML = h._iconfont_svg_string_1739270, (l = l.getElementsByTagName("svg")[0]) && (l.setAttribute("aria-hidden", "true"), l.style.position = "absolute", l.style.width = 0, l.style.height = 0, l.style.overflow = "hidden", l = l, (a = document.body).firstChild ? v(l, a.firstChild) : a.appendChild(l)); - }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(i, 0) : (_c = function c() { - document.removeEventListener("DOMContentLoaded", _c, !1), i(); - }, document.addEventListener("DOMContentLoaded", _c, !1)) : document.attachEvent && (o = i, t = h.document, z = !1, p(), t.onreadystatechange = function () { - "complete" == t.readyState && (t.onreadystatechange = null, m()); - }); - } - function m() { - z || (z = !0, o()); - } - function p() { - try { - t.documentElement.doScroll("left"); - } catch (a) { - return void setTimeout(p, 50); - } - m(); - } -}(window); \ No newline at end of file diff --git a/packages/meta/es/iconfont/iconfont.ttf b/packages/meta/es/iconfont/iconfont.ttf deleted file mode 100644 index 0043e6a..0000000 Binary files a/packages/meta/es/iconfont/iconfont.ttf and /dev/null differ diff --git a/packages/meta/es/iconfont/iconfont.woff b/packages/meta/es/iconfont/iconfont.woff deleted file mode 100644 index 84f32bb..0000000 Binary files a/packages/meta/es/iconfont/iconfont.woff and /dev/null differ diff --git a/packages/meta/es/iconfont/iconfont.woff2 b/packages/meta/es/iconfont/iconfont.woff2 deleted file mode 100644 index 8173340..0000000 Binary files a/packages/meta/es/iconfont/iconfont.woff2 and /dev/null differ diff --git a/packages/meta/es/iconfont/index.js b/packages/meta/es/iconfont/index.js deleted file mode 100644 index df5a782..0000000 --- a/packages/meta/es/iconfont/index.js +++ /dev/null @@ -1,42 +0,0 @@ -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -import React from 'react'; -import classNames from 'classnames'; -import "./iconfont.css"; -var IconFont = function IconFont(props) { - var _ref = props || {}, - _ref$title = _ref.title, - title = _ref$title === void 0 ? '' : _ref$title, - _ref$className = _ref.className, - className = _ref$className === void 0 ? '' : _ref$className, - _ref$styles = _ref.styles, - styles = _ref$styles === void 0 ? {} : _ref$styles, - icon = _ref.icon, - _ref$size = _ref.size, - size = _ref$size === void 0 ? 14 : _ref$size, - onIconClick = _ref.onIconClick, - children = _ref.children, - _ref$active = _ref.active, - active = _ref$active === void 0 ? false : _ref$active, - _ref$color = _ref.color, - color = _ref$color === void 0 ? '' : _ref$color; - return /*#__PURE__*/React.createElement("i", { - title: title, - onClick: function onClick(e) { - onIconClick && onIconClick(e); - }, - style: _objectSpread(_objectSpread({}, styles), {}, { - cursor: 'pointer', - fontSize: size, - color: color - }, active ? { - color: '#09f' - } : {}), - className: classNames('iconfont', icon, className) - }, children); -}; -export default IconFont; \ No newline at end of file diff --git a/packages/meta/es/index.js b/packages/meta/es/index.js index 52607d6..791095f 100644 --- a/packages/meta/es/index.js +++ b/packages/meta/es/index.js @@ -1,6 +1,6 @@ -export { default as Icon } from "./iconfont"; export { default as CompareImage } from "./CompareImage"; export { default as BigImagePreview } from "./BigImagePreview"; +export { default as CropperImage } from "./cropperImage"; export { default as VideoPlayer } from "./VideoPlayer"; export { default as Tabs } from "./tabs"; export { default as Button } from "./button"; diff --git a/packages/meta/package.json b/packages/meta/package.json index b1b58a0..7df38d8 100644 --- a/packages/meta/package.json +++ b/packages/meta/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/meta", - "version": "0.9.7", + "version": "0.11.0", "description": "原子组件", "keywords": [ "meta", @@ -86,6 +86,7 @@ "@turf/boolean-point-in-polygon": "^6.5.0", "@turf/turf": "^6.5.0", "@types/downloadjs": "^1.4.6", + "@types/fabric": "^5.3.7", "@zhst/func": "workspace:^", "@zhst/hooks": "workspace:^", "@zhst/icon": "workspace:^", @@ -97,6 +98,7 @@ "copy-to-clipboard": "^3.3.3", "dayjs": "^1.11.10", "downloadjs": "^1.4.7", + "fabric": "^5.3.0", "flv.js": "^1.6.2", "lunar-typescript": "^1.7.3", "rc-align": "^4.0.15", diff --git a/packages/meta/src/BigImagePreview/BigImagePreview.tsx b/packages/meta/src/BigImagePreview/BigImagePreview.tsx index b531541..25a9fa7 100644 --- a/packages/meta/src/BigImagePreview/BigImagePreview.tsx +++ b/packages/meta/src/BigImagePreview/BigImagePreview.tsx @@ -13,7 +13,7 @@ import { import Align from 'rc-align'; import { Button, Empty } from '..'; import { type Rect, type IScreenshotButtonProp, type AlignType } from '@zhst/types' -import Icon from '../iconfont'; +import { IconFont as Icon } from '@zhst/icon' import { Cropper, Viewer, @@ -271,8 +271,7 @@ export const BigImagePreview = React.forwardRef((props const shapeList = odList.map((rect: { [x: string]: any; algorithmVersion: any; }) => ({ ...rect, selectAble: true, - id: - ['id'], + id: ['id'], algorithmVersion: rect.algorithmVersion, })); imgIns.replaceShape(shapeList); @@ -289,6 +288,7 @@ export const BigImagePreview = React.forwardRef((props const id = e.detail; setSelectRectId(id); const selectShape = shapeList.find((v: { [x: string]: any; }) => v['id'] === id); + console.log('selectShape', selectShape,) if (selectShape) { setSelectAlgorithmVersion(selectShape['algorithmVersion']); //换算成屏幕坐标 @@ -337,6 +337,7 @@ export const BigImagePreview = React.forwardRef((props }); cropInsRef.current = new Cropper(imgContainerRef.current, { showMask: true, + type: 'arrow', viewer: imgIns, }); } diff --git a/packages/meta/src/BigImagePreview/components/BtnGroup/index.tsx b/packages/meta/src/BigImagePreview/components/BtnGroup/index.tsx index c7e8019..ac6ee1c 100644 --- a/packages/meta/src/BigImagePreview/components/BtnGroup/index.tsx +++ b/packages/meta/src/BigImagePreview/components/BtnGroup/index.tsx @@ -2,7 +2,7 @@ import React, { MouseEvent } from 'react'; import classNames from 'classnames'; // @ts-ignore import { Button, Tooltip, TooltipProps } from '../../..'; -import Icon from '../../../iconfont'; +import { IconFont as Icon } from '@zhst/icon' import './index.less'; const componentName = `zhst-image__btn-group`; diff --git a/packages/meta/src/CompareImage/CompareImage.tsx b/packages/meta/src/CompareImage/CompareImage.tsx index 0b10d75..7a340ac 100644 --- a/packages/meta/src/CompareImage/CompareImage.tsx +++ b/packages/meta/src/CompareImage/CompareImage.tsx @@ -52,7 +52,7 @@ const CompareImage = forwardRef((props, const { getPrefixCls } = useContext(ConfigContext); const componentName = getPrefixCls('image__compater-view', customizePrefixCls); - const imgContainerRef = useRef(null); + const imgContainerRef = useRef(null); const imgInsRef = useRef(null); const [scale, setScale] = useState(0); @@ -97,8 +97,7 @@ const CompareImage = forwardRef((props, return (
-
{label}
- + {label &&
{label}
} {!url ? (
{ const ref = useRef(null) diff --git a/packages/meta/src/ImageEditor/cropper/event.ts b/packages/meta/src/ImageEditor/cropper/event.ts index 0d75383..d60ec27 100644 --- a/packages/meta/src/ImageEditor/cropper/event.ts +++ b/packages/meta/src/ImageEditor/cropper/event.ts @@ -62,7 +62,7 @@ export default { unbind() { const { eventHandleList } = this; for (let index = eventHandleList.length; index > 0; index--) { - const handler = eventHandleList.shift; + const handler = eventHandleList[index - 1]; try { handler.remove(); } catch (error) { diff --git a/packages/meta/src/ImageEditor/cropper/viewerBridge.ts b/packages/meta/src/ImageEditor/cropper/viewerBridge.ts index ec9159c..d66029a 100644 --- a/packages/meta/src/ImageEditor/cropper/viewerBridge.ts +++ b/packages/meta/src/ImageEditor/cropper/viewerBridge.ts @@ -9,9 +9,12 @@ export default { if (this.options.viewer) { const viewer = this.options.viewer; + const scaleAble = this.options.scaleAble; //添加缩放事件 - const handleWhele = addEventListenerWrapper(container, EVENT_WHEEL, this.onWheel.bind(this)); - eventHandleList.push(handleWhele); + if (scaleAble) { + const handleWhele = addEventListenerWrapper(canvas, EVENT_WHEEL, this.onWheel.bind(this)); + eventHandleList.push(handleWhele); + } //添加事件监听 获取limit crop box & 渲染canvas this.onTransformChange(viewer); this.limited = true; diff --git a/packages/meta/src/ImageEditor/viewer/event.ts b/packages/meta/src/ImageEditor/viewer/event.ts index de1cd71..e9ccb16 100644 --- a/packages/meta/src/ImageEditor/viewer/event.ts +++ b/packages/meta/src/ImageEditor/viewer/event.ts @@ -74,7 +74,7 @@ export default { unbind() { const { eventHandleList } = this; for (let index = eventHandleList.length; index > 0; index--) { - const handler = eventHandleList.shift(); + const handler = eventHandleList[index - 1]; try { handler.remove(); } catch (error) { diff --git a/packages/meta/src/ImageEditor/viewer/helper.ts b/packages/meta/src/ImageEditor/viewer/helper.ts index 1396bd5..aa22bf5 100644 --- a/packages/meta/src/ImageEditor/viewer/helper.ts +++ b/packages/meta/src/ImageEditor/viewer/helper.ts @@ -25,6 +25,13 @@ export const setNumberAccuracy = (originNumber: number, accuracy = 0, isCeil = t } export default { + targetTransform: { + translateX: 0, + translateY: 0, + scale: 0, + rotate: 0, + // rotate: 90, + }, windowToCanvasAxis(event) { const { x, y } = this.canvas.getBoundingClientRect(); @@ -65,9 +72,15 @@ export default { }; return axis; }, - imgRectAxisToCanvasAxisRect({ x = 0, y = 0, w = 0, h = 0, ...others }) { - const { width, height } = this.image; - const { targetTransform } = this; + imgRectAxisToCanvasAxisRect({ x = 0, y = 0, w = 0, h = 0, image, ...others }) { + const { width, height } = this.image || image; + const { targetTransform } = this || { + translateX: 0, + translateY: 0, + scale: 0, + rotate: 0, + // rotate: 90, + }; const { rotate } = targetTransform; const theta = (Math.PI / 180) * rotate; const offsetRect = { diff --git a/packages/meta/src/ImageEditor/viewer/index.ts b/packages/meta/src/ImageEditor/viewer/index.ts index 1b89837..e9286da 100644 --- a/packages/meta/src/ImageEditor/viewer/index.ts +++ b/packages/meta/src/ImageEditor/viewer/index.ts @@ -53,7 +53,7 @@ class Viewer { /* 是否初始化完成 */ ready: boolean; - constructor(element, options) { + constructor(element: HTMLDivElement, options: Option) { this.element = element; this.options = Object.assign({}, isPlainObject(options) && options); this.ready = false; diff --git a/packages/meta/src/ImageEditor/viewer/shape.ts b/packages/meta/src/ImageEditor/viewer/shape.ts index 03aa7b4..47136e4 100644 --- a/packages/meta/src/ImageEditor/viewer/shape.ts +++ b/packages/meta/src/ImageEditor/viewer/shape.ts @@ -19,9 +19,9 @@ function rectToPolygon(axisRect: any) { return polygon; } export interface Shape { - id: number | string; //uuid - selectAble: boolean; - color: string; + id?: number | string; //uuid + selectAble?: boolean; + color?: string; } export interface Rect extends Shape { diff --git a/packages/meta/src/VideoPlayer/VideoPlayer.tsx b/packages/meta/src/VideoPlayer/VideoPlayer.tsx index 56ddf4d..d9b35e2 100644 --- a/packages/meta/src/VideoPlayer/VideoPlayer.tsx +++ b/packages/meta/src/VideoPlayer/VideoPlayer.tsx @@ -15,7 +15,7 @@ import { useLatest, useUpdateEffect, useFullscreen, useUnmount } from '@zhst/hoo import classNames from 'classnames'; import download from 'downloadjs'; import { Button, message } from '..'; -import Icon from '../iconfont'; +import { IconFont } from '@zhst/icon'; import { Cropper, EVENT_CROP_START, @@ -603,7 +603,7 @@ const VideoPlayer = forwardRef((props, ref) => { } }} > - ((props, ref) => { toggleFullscreen(); }} > - { return ( - + diff --git a/packages/meta/src/cropperImage/CropperImage.tsx b/packages/meta/src/cropperImage/CropperImage.tsx new file mode 100644 index 0000000..838847d --- /dev/null +++ b/packages/meta/src/cropperImage/CropperImage.tsx @@ -0,0 +1,335 @@ +import React, { useRef, useEffect, forwardRef, useImperativeHandle, useContext, useState } from 'react' +import classNames from 'classnames' +import { fabric } from 'fabric' +import { addEventListenerWrapper, getTransforms, pick } from '@zhst/func' +import Viewer from '../ImageEditor/viewer'; +import './index.less' +import { ConfigContext } from '../config-provider'; +import { Cropper, EVENT_CROP_END, EVENT_CROP_START, EVENT_SHAPE_SELECT } from '../ImageEditor'; +import { Rect } from '../ImageEditor/viewer/shape'; +import { checkPointInRect, drawArrowLine, getImageDataByPosition, percentToLength } from './cropperImagehelper'; +import Align from 'rc-align'; + +interface RectPro extends Rect { + imageRect: string +} + +export interface CropperImageProps { + prefixCls?: string; + url?: string; + width?: number; + height?: number; + odList?: Rect[] // od框 + lineConfig?: fabric.Line; // 线条配置 + editAble?: boolean; // 是否可编辑 + selectedItem?: RectPro + // 是否可放大缩小 + scaleAble?: boolean; + // 是否展示框选拓展框 + showToast?: boolean; + // 自定义拓展框 + customToast?: (data?: any) => React.JSX.Element + type?: 'line' | 'rect'; // 编辑类型 + onMouseDown?: (data: { x: number; y: number }) => void; + onMouseUp?: (data: { startX: number; startY: number; endX: number; endY: number; imageDom?: HTMLImageElement }) => void; + onShapeSelected?: (id: string, shapeData?: RectPro & { + originData: Rect + }) => void + onCropStart?: () => void + onCropEnd?: (data: RectPro) => void +} + +export interface CanvasPro extends fabric.Canvas { + selectionStart?: { x: number; y: number } + selectionEnd?: { x: number; y: number } + startDraw?: boolean; +} + +export interface CropperImageRefProps { + fabricCanvas?: CanvasPro +} + +// 对比图组件 +const CropperImage = forwardRef((props, ref) => { + const { + prefixCls: customizePrefixCls, + url, + odList, + selectedItem, + onMouseDown, + onMouseUp, + onCropStart, + onCropEnd, + editAble, + onShapeSelected, + showToast = false, + customToast = () =>
, + type = 'ract', + scaleAble = false, + lineConfig = { + stroke: '#09f', + strokeWidth: 3, + selectable: true // 避免线选中而不是箭头 + }, + } = props; + const { getPrefixCls } = useContext(ConfigContext); + const componentName = getPrefixCls('cropper-view', customizePrefixCls); + + const canvasRef = useRef(null); + const currentShapeRef = useRef(null) + const imageRef = useRef(null) + const viewerRef = useRef(null) + const [fabricCanvas, setFabricCanvas] = useState() + + // 自定义弹框 + const alginContainerRef: any = useRef(null); + const alignRef: any = useRef(null); + + // 初始化 - 图片 + useEffect(() => { + viewerRef.current = new Viewer(imageRef.current!!, { + image: url, + scaleAble, + dragAble: false, + }); + + // 监听形状选择事件 + addEventListenerWrapper(imageRef.current, EVENT_SHAPE_SELECT, async (e: { detail: any; }) => { + // 选中的od + const id = e.detail; + if (id) { + const setlectRectData = odList!.filter(_od => _od.id === id)?.[0] + const _data = percentToLength(setlectRectData, viewerRef.current.canvas) + const imageRect = getImageDataByPosition( + { x: _data.x, y: _data.y, w: _data.w, h: _data.h }, + { canvas: viewerRef.current.canvas } + ) + id && onShapeSelected?.(id, { ..._data, imageRect, originData: setlectRectData }) + } + }) + + return () => { + viewerRef?.current?.destroy?.(); + viewerRef.current = null; + viewerRef.current?.clearShape?.(); + } + }, []) + + const cropStartRef = useRef(null) + const cropEndRef = useRef(null) + + // 初始化 - 编辑器 + useEffect(() => { + // 判断是否可编辑 + if (!editAble) { + // 判定是否存在od框 + odList && odList.forEach(_od => { + viewerRef.current?.addShape?.(_od); + }) + return + } else { + viewerRef.current?.clearShape?.(); + + if (type === 'rect') { + currentShapeRef.current = initRect() + // 矩形 - 开始绘制实践 + cropStartRef.current = addEventListenerWrapper(imageRef.current, EVENT_CROP_START, () => onCropStart?.()); + // 矩形 - 结束绘制实践 + cropEndRef.current = addEventListenerWrapper(imageRef.current, EVENT_CROP_END, async (event: { detail: any; }) => { + const data = event.detail; + const imageRect = getImageDataByPosition({ x: data.left, y: data.top, w: data.width, h: data.height }, { canvas: viewerRef.current.canvas }) + onCropEnd?.({ ...data , imageRect }) + }) + } else { + currentShapeRef.current = initLine() + } + } + + return () => { + cropStartRef.current?.remove?.() + cropEndRef.current?.remove?.() + currentShapeRef.current?.destroy?.() + currentShapeRef.current?.dispose?.() + } + },[type, editAble]) + + // 初始化 - 矩形圈选工具 + const initRect = () => { + const currentCropper = new Cropper(imageRef.current, { + showMask: true, + scaleAble: false, + viewer: viewerRef.current, + }); + + return currentCropper + } + + // 初始化线条 + const initLine = () => { + const viewer = viewerRef?.current || {} + const { containerData = {}, targetTransform = {} } = viewer + const imageSize = viewer.getImgSize() + + let currentFabric: CanvasPro = new fabric.Canvas( + canvasRef.current, + { + backgroundColor: 'transparent', + width: containerData.width, + height: containerData.height, + selection: false, + } + ) + + // 事件监听: 鼠标抬起事件 + currentFabric.on('mouse:down', function(options) { + var evt = options.e; + + // 检查鼠标是否按下左键并且没有按住Ctrl键(Windows系统) + if (evt.button === 1 || (evt.button === 0 && evt.ctrlKey === true)) { + return; + } + + // 阻止默认行为 + evt.preventDefault(); + + // 记录起始点坐标 + const pointer = currentFabric.getPointer(evt); + + if (!checkPointInRect(pointer, { + ...pick(targetTransform, 'scale', 'translateX', 'translateY'), + ...imageSize + })) return + + currentFabric.selectionStart = { + x: pointer.x, + y: pointer.y + }; + currentFabric.startDraw = true + currentFabric.renderAll(); + onMouseDown?.(currentFabric.selectionStart) + }); + + // 事件监听:鼠标松开事件 + currentFabric.on('mouse:up', async function(_options) { + currentFabric.clear() + let group = drawArrowLine( + currentFabric?.selectionStart?.x as number, + currentFabric.selectionStart?.y as number, + currentFabric.selectionEnd?.x as number, + currentFabric.selectionEnd?.y as number, + lineConfig + ) + + currentFabric.add(group) + // 停止绘制 + currentFabric.startDraw = false + currentFabric.renderAll(); + + const _shapeData = { + startX: currentFabric.selectionStart?.x as number, + startY: currentFabric.selectionStart?.y as number, + endX: currentFabric.selectionEnd?.x as number, + endY: currentFabric.selectionEnd?.y as number + } + onMouseUp?.({ ..._shapeData }) + }); + + // 事件监听:鼠标移动事件 + currentFabric.on('mouse:move', function(options) { + // 存在起始点,开始绘制 + if (currentFabric.selectionStart && currentFabric.startDraw) { + + // 阻止默认行为 + options.e.preventDefault(); + var endPointer = options.pointer!!; + + // 限定绘制区域 + if (!checkPointInRect(endPointer, { + ...pick(targetTransform, 'scale', 'translateX', 'translateY'), + ...imageSize + } + )) return + + // 更新选区大小 + currentFabric.selectionEnd = { + x: endPointer?.x || 0, + y: endPointer?.y || 0 + }; + + // 清除之前的选择框 + currentFabric.clear(); + let group = drawArrowLine( + currentFabric.selectionStart.x, + currentFabric.selectionStart.y, + endPointer?.x || 0, + endPointer?.y || 0, + lineConfig + ) + + currentFabric.add(group) + } + currentFabric.renderAll(); + }); + setFabricCanvas(currentFabric) + return currentFabric + } + + useImperativeHandle(ref, () => ({ + canvasRef, + fabricCanvas, + viewerRef + })); + + return ( +
+ {/* 图片 */} +
+ {!editAble && showToast && selectedItem && <> +
+
+ + {customToast?.({ + selectedItem + })} + + } + +
+ ); +}) + +export default CropperImage diff --git a/packages/meta/src/cropperImage/cropperImagehelper.ts b/packages/meta/src/cropperImage/cropperImagehelper.ts new file mode 100644 index 0000000..1d5f65e --- /dev/null +++ b/packages/meta/src/cropperImage/cropperImagehelper.ts @@ -0,0 +1,101 @@ +import { isString } from "@zhst/func"; +import { fabric } from 'fabric' +import { ILineOptions } from "fabric/fabric-impl"; +import { Rect } from '../ImageEditor/viewer/shape'; + +export const getImage = (propImage: HTMLImageElement | string) => { + return new Promise((resolve, reject) => { + if (isString(propImage)) { + const image = new Image(); + image.crossOrigin = 'anonymous'; + image.src = propImage; + image.onload = () => { + resolve(image); + }; + image.onerror = (err) => { + reject(err); + }; + } else { + resolve(propImage); + } + }); +} + +// 检查是否在规定区域内 +export const checkPointInRect = (point: { x: number; y: number;}, rect: { w: number; h: number, translateX?: number; translateY?: number, scale: number }) => { + const { w, h, translateX = 0, translateY = 0, scale = 1 } = rect; + const limitStartX = translateX + const limitEndX = translateX + (w * scale) + const limitStartY = translateY + const limitEndY = translateY + (h * scale) + + if ((point.x >= limitStartX) && (point.x <= limitEndX) + && (point.y >= limitStartY) && (point.y <= limitEndY) + ) { + return true + } + return false +} + +// 绘制带箭头的直线函数 +export const drawArrowLine = (startX: number, startY: number, endX: number, endY: number, lineConfig: ILineOptions) => { + + var angle = Math.atan2(endY - startY, endX - startX); + + var line = new fabric.Line([startX, startY, endX, endY], lineConfig); + + var arrowLength = 20; + var arrowWidth = 20; + + var arrow = new fabric.Triangle({ + left: endX - arrowLength / 2 * Math.cos(angle), + top: endY - arrowLength / 2 * Math.sin(angle), + width: arrowWidth, + height: arrowWidth, + originX: 'center', + originY: 'center', + fill: '#09f', + angle: angle * 180 / Math.PI + 90 + }); + + return new fabric.Group([line, arrow], { + selectable: false, + }); + } + +// 百分比转长度 +export const percentToLength = (originData: Rect, canvas: HTMLCanvasElement) => { + const { x = 0, y = 0, w = 0, h = 0 } = originData + const canvasW = canvas.width + const canvasH = canvas.height + + return { + x: x * canvasW, + y: y * canvasH, + w: w * canvasW, + h: h * canvasH + } +} + +// 通过位置截取图片 +export const getImageDataByPosition = (position: { + w: number; + h: number; + x: number; + y: number; +}, opt: { + canvas: HTMLCanvasElement + fileType?: string +}) => { + const { x =0, y = 0, w = 0, h = 0 } = position + const { fileType = 'image/jpg', canvas } = opt + const _canvas = canvas + const ctx = _canvas.getContext('2d') + const imageData = ctx?.getImageData(x, y, w, h) + const newCanvas = document.createElement('canvas') + const newCtx = newCanvas.getContext('2d') + newCanvas.width = imageData?.width || 0 + newCanvas.height = imageData?.height || 0 + newCtx?.putImageData(imageData!!, 0, 0) + return newCanvas.toDataURL(fileType) +} diff --git a/packages/meta/src/cropperImage/demo/basic.tsx b/packages/meta/src/cropperImage/demo/basic.tsx new file mode 100644 index 0000000..cdd9e76 --- /dev/null +++ b/packages/meta/src/cropperImage/demo/basic.tsx @@ -0,0 +1,61 @@ + +import React, { useRef, useState } from 'react'; +import { CropperImage } from '@zhst/meta' +import { Rect } from '@zhst/func' +import { Button, Space, Image } from 'antd'; + +export default () => { + const [type, setType] = useState<'rect' | 'line'>('line') + const [editAble, setEditAble] = useState(false) + const [imgUrl, setImgUrl] = useState('') + const [selectedItem, setSelectedItem] = useState() + + return ( + + + + + + +
+ console.log('箭头绘制结束:', data)} + onShapeSelected={(id, shapeData) => { + console.log('矩形选择', id, shapeData) + setImgUrl(shapeData?.imageRect as string) + }} + onCropStart={() => console.log('矩形开始绘制')} + onCropEnd={(data) => { + console.log('矩形结束绘制', data) + setSelectedItem({ x: data.left, y: data.top, h: data.height, w: data.width }) + setImgUrl(data.imageRect as string) + }} + selectedItem={selectedItem} + showToast + customToast={() =>
多功能框
} + /> +
+ +
+ ) +} diff --git a/packages/meta/src/cropperImage/demo/withOD.tsx b/packages/meta/src/cropperImage/demo/withOD.tsx new file mode 100644 index 0000000..85df364 --- /dev/null +++ b/packages/meta/src/cropperImage/demo/withOD.tsx @@ -0,0 +1,38 @@ + +import React, { useState } from 'react'; +import { CropperImage } from '@zhst/meta' +import { Button, Space } from 'antd'; + +export default () => { + const [editAble, setEditAble] = useState(false) + + return ( + + +
+ +
+
+ ) +} diff --git a/packages/biz/es/BigImageModal/images/emptyImage.png b/packages/meta/src/cropperImage/images/emptyImage.png similarity index 100% rename from packages/biz/es/BigImageModal/images/emptyImage.png rename to packages/meta/src/cropperImage/images/emptyImage.png diff --git a/packages/biz/es/BigImageModal/images/percent_background.png b/packages/meta/src/cropperImage/images/percent_background.png similarity index 100% rename from packages/biz/es/BigImageModal/images/percent_background.png rename to packages/meta/src/cropperImage/images/percent_background.png diff --git a/packages/meta/src/cropperImage/index.less b/packages/meta/src/cropperImage/index.less new file mode 100644 index 0000000..8162f42 --- /dev/null +++ b/packages/meta/src/cropperImage/index.less @@ -0,0 +1,34 @@ +.zhst-cropper-view { + position: relative; + width: 100%; + height: 100%; + font-size: 0; + + &_img { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + } + + .canvas-container { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + } + + &_draw { + width: 100%; + height: 100%; + } + + &-align { + position: absolute; + top: 0; + left: 0; + pointer-events: none; + } +} diff --git a/packages/meta/src/cropperImage/index.md b/packages/meta/src/cropperImage/index.md new file mode 100644 index 0000000..4902a5d --- /dev/null +++ b/packages/meta/src/cropperImage/index.md @@ -0,0 +1,51 @@ +--- +group: 媒体 +category: Components +subtitle: 图片标注 +toc: content +title: CropperImage 图片标注 +--- + +## CropperImage 图片标注 + +导入图片资源,并且能对图片资源进行一些圈选操作 + +### 功能实现 + +* 初始化注入矩形OD框 【✔】 +* 矩形OD框选中可透出图片 【✔】 +* 矩形圈选 【✔】 +* 箭头绘制 【✔】 +* 是否可编辑 【✔】 +* 矩形圈选图片透出 【✔】 + +## 示例 + +基本 + +OD 展示 + +## API + +| 参数 | 说明 | 类型 | 默认值 | 版本 | +| --- | --- | --- | --- | --- | +| url | 链接 | string | - | | +| type | 模式 | 'line' 'rect' | rect | | +| editAble | 是否可编辑 | boolean | false | | +| scaleAble | 缩放 | boolean | false | | +| odList | 缩放 | IODList[] | false | | +| onMouseUp | 箭头绘制结束 | (data) => void; | - | | +| onShapeSelected | 矩形选择 | (id, shapeData) => void; | - | | +| onCropStart | 矩形开始绘制 | () => void; | - | | +| onCropEnd | 矩形结束绘制 | (data) => void; | - | | + +## IODList + +| 参数 | 说明 | 类型 | 默认值 | 版本 | +| --- | --- | --- | --- | --- | +| id | 唯一id | string | - | | +| x | 左上角横坐标 | number | - | | +| y | 左上角纵坐标 | number | - | | +| w | 宽 | number | - | | +| h | 高 | number | - | | +| selectAble | 是否可选中 | boolean | true | | diff --git a/packages/meta/src/cropperImage/index.tsx b/packages/meta/src/cropperImage/index.tsx new file mode 100644 index 0000000..d985aec --- /dev/null +++ b/packages/meta/src/cropperImage/index.tsx @@ -0,0 +1,5 @@ +import CropperImage from "./CropperImage"; + +export type { CropperImageRefProps, CropperImageProps } from './CropperImage' + +export default CropperImage diff --git a/packages/meta/src/iconfont/iconfont.css b/packages/meta/src/iconfont/iconfont.css deleted file mode 100644 index f97863a..0000000 --- a/packages/meta/src/iconfont/iconfont.css +++ /dev/null @@ -1,1679 +0,0 @@ -@font-face { - font-family: "iconfont"; /* Project id 1739270 */ - src: url('iconfont.woff2?t=1689583241972') format('woff2'), - url('iconfont.woff?t=1689583241972') format('woff'), - url('iconfont.ttf?t=1689583241972') format('truetype'); -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-danganxiangqing_hangweifenxi:before { - content: "\e78d"; -} - -.icon-danganxiangqing_shujuganzhi:before { - content: "\e78e"; -} - -.icon-danganxiangqing_huodongguiji:before { - content: "\e78f"; -} - -.icon-danganxiangqing_jibenxinxi:before { - content: "\e7ea"; -} - -.icon-danganxiangqing_fushuwupin:before { - content: "\e7eb"; -} - -.icon-danganxiangqing_jizhanyingyong:before { - content: "\e7ec"; -} - -.icon-jiarudanganku:before { - content: "\e787"; -} - -.icon-dangankunor:before { - content: "\e793"; -} - -.icon-bukongrenwuselect:before { - content: "\e799"; -} - -.icon-bukongrenwunor1:before { - content: "\e79a"; -} - -.icon-dangankuselect:before { - content: "\e79b"; -} - -.icon-jizhanfanor:before { - content: "\e79c"; -} - -.icon-feijidongchechaxunnor:before { - content: "\e79d"; -} - -.icon-jidongchechaxunselect:before { - content: "\e79e"; -} - -.icon-a-lixianfenxiselect2:before { - content: "\e7a1"; -} - -.icon-huisufenxiselect:before { - content: "\e7a2"; -} - -.icon-jizhanfaselect:before { - content: "\e7a3"; -} - -.icon-mubiaojiansuonor:before { - content: "\e7ae"; -} - -.icon-lurenkuselect:before { - content: "\e7b1"; -} - -.icon-shujujiashicangselect:before { - content: "\e7b2"; -} - -.icon-shishijiexiselect:before { - content: "\e7b4"; -} - -.icon-shishijiexinor:before { - content: "\e7b9"; -} - -.icon-jidongchechaxunnor:before { - content: "\e7c1"; -} - -.icon-lurenkunor1:before { - content: "\e7cf"; -} - -.icon-mubiaotezhengchaxunnor:before { - content: "\e7e1"; -} - -.icon-yujingjiluselect:before { - content: "\e7e2"; -} - -.icon-mubiaotezhengchaxunselect:before { - content: "\e7e3"; -} - -.icon-feijidongchechaxunselect:before { - content: "\e7e4"; -} - -.icon-yujingjilunor:before { - content: "\e7e5"; -} - -.icon-lixianfenxiselect:before { - content: "\e7e6"; -} - -.icon-huisufenxinor:before { - content: "\e7e7"; -} - -.icon-shujujiashicangnor:before { - content: "\e7e8"; -} - -.icon-mubiaojiansuoselect:before { - content: "\e7e9"; -} - -.icon-kuangxuangongju:before { - content: "\e796"; -} - -.icon-fengniao:before { - content: "\e792"; -} - -.icon-zhankai:before { - content: "\e790"; -} - -.icon-shouqi:before { - content: "\e791"; -} - -.icon-shijian:before { - content: "\e786"; -} - -.icon-dingwei2:before { - content: "\e613"; -} - -.icon-renyuan:before { - content: "\e784"; -} - -.icon-houtai:before { - content: "\e785"; -} - -.icon-zuo:before { - content: "\e781"; -} - -.icon-you:before { - content: "\e783"; -} - -.icon-kakou:before { - content: "\e780"; -} - -.icon-yujing1:before { - content: "\e77e"; -} - -.icon-yuan2:before { - content: "\e77d"; -} - -.icon-moxingpengzhuang:before { - content: "\e777"; -} - -.icon-moxingpengzhuangnor:before { - content: "\e778"; -} - -.icon-lurenku:before { - content: "\e77b"; -} - -.icon-lurenkunor:before { - content: "\e77c"; -} - -.icon-shiming:before { - content: "\e776"; -} - -.icon-suoxiao2:before { - content: "\e774"; -} - -.icon-fangda1:before { - content: "\e775"; -} - -.icon-guanbi2:before { - content: "\e772"; -} - -.icon-fanhui1:before { - content: "\e773"; -} - -.icon-xiansuomopai:before { - content: "\e76f"; -} - -.icon-xiansuomopainor:before { - content: "\e76e"; -} - -.icon-zhajiyujing:before { - content: "\e770"; -} - -.icon-zhajiyujingnor:before { - content: "\e771"; -} - -.icon-zhuizongpeizhi:before { - content: "\e76c"; -} - -.icon-zhuizongpeizhinor:before { - content: "\e76d"; -} - -.icon-dapingqiehuan:before { - content: "\e76b"; -} - -.icon-xuanze:before { - content: "\e769"; -} - -.icon-shaixuan1:before { - content: "\e76a"; -} - -.icon-chekashebei:before { - content: "\e764"; -} - -.icon-imsishebei:before { - content: "\e765"; -} - -.icon-xingtishebei:before { - content: "\e766"; -} - -.icon-renlianshebei:before { - content: "\e767"; -} - -.icon-wifishebei:before { - content: "\e768"; -} - -.icon-a-miaozhun2:before { - content: "\e762"; -} - -.icon-a-bianzu19:before { - content: "\e763"; -} - -.icon-fanye:before { - content: "\e75e"; -} - -.icon-shenfenzheng:before { - content: "\e75f"; -} - -.icon-dizhi:before { - content: "\e760"; -} - -.icon-guanbi:before { - content: "\e761"; -} - -.icon-dianwei1:before { - content: "\e75b"; -} - -.icon-weikakou:before { - content: "\e757"; -} - -.icon-weikakounor:before { - content: "\e758"; -} - -.icon-changsuoma:before { - content: "\e759"; -} - -.icon-changsuomanor:before { - content: "\e75a"; -} - -.icon-yujing:before { - content: "\e756"; -} - -.icon-jiansuonor:before { - content: "\e747"; -} - -.icon-tonghangrenfenxinor1:before { - content: "\e748"; -} - -.icon-zhinengyanpannor:before { - content: "\e749"; -} - -.icon-bukongyujingnor:before { - content: "\e74a"; -} - -.icon-bukongrenwunor:before { - content: "\e74b"; -} - -.icon-dianziditunor:before { - content: "\e754"; -} - -.icon-zhuizongnor1:before { - content: "\e755"; -} - -.icon-zhuizong1:before { - content: "\e746"; -} - -.icon-bukongrenwu3:before { - content: "\e74c"; -} - -.icon-dianziditu:before { - content: "\e74d"; -} - -.icon-bukongyujing:before { - content: "\e750"; -} - -.icon-tonghangrenfenxi1:before { - content: "\e751"; -} - -.icon-zhinengyanpan:before { - content: "\e752"; -} - -.icon-jiansuo1:before { - content: "\e753"; -} - -.icon-kaiqijulei:before { - content: "\e745"; -} - -.icon-tongbu:before { - content: "\e744"; -} - -.icon-tonghangrenfenxi:before { - content: "\e743"; -} - -.icon-tonghangrenfenxinor:before { - content: "\e742"; -} - -.icon-jizhanyingyong:before { - content: "\e741"; -} - -.icon-haikangrenlianbukongnor:before { - content: "\e740"; -} - -.icon-haikangrenlianbukong:before { - content: "\e73f"; -} - -.icon-tuozhanshouduantishi:before { - content: "\e73e"; -} - -.icon-fanhuimopailiebiao:before { - content: "\e73d"; -} - -.icon-toukuijiancenor:before { - content: "\e73c"; -} - -.icon-toukuijiance:before { - content: "\e718"; -} - -.icon-zhuixing:before { - content: "\e717"; -} - -.icon-tishi4:before { - content: "\e73b"; -} - -.icon-a-shaixuanfeiji:before { - content: "\e733"; -} - -.icon-a-zidongtiaozhengfanweifeiji:before { - content: "\e73a"; -} - -.icon-heziyunwei:before { - content: "\e739"; -} - -.icon-qiehuan:before { - content: "\e738"; -} - -.icon-disanfangxiaoxinor:before { - content: "\e737"; -} - -.icon-disanfangxiaoxi:before { - content: "\e736"; -} - -.icon-daohang:before { - content: "\e735"; -} - -.icon-yonghu:before { - content: "\e734"; -} - -.icon-feiji:before { - content: "\e732"; -} - -.icon-jieshuzhuizong:before { - content: "\e730"; -} - -.icon-huisuzhoubian:before { - content: "\e731"; -} - -.icon-jixuzhuizong:before { - content: "\e72d"; -} - -.icon-tiaozhengfanwei:before { - content: "\e72e"; -} - -.icon-jiansuo:before { - content: "\e72f"; -} - -.icon-guiji:before { - content: "\e72c"; -} - -.icon-jichuxinxi:before { - content: "\e72b"; -} - -.icon-danganzhaiyao:before { - content: "\e72a"; -} - -.icon-jingzhunbukongicon_on:before { - content: "\e728"; -} - -.icon-jingzhunbukongicon_off:before { - content: "\e729"; -} - -.icon-tiaozhuan:before { - content: "\e727"; -} - -.icon-shezhi:before { - content: "\e726"; -} - -.icon-bangzhu1:before { - content: "\e725"; -} - -.icon-shuaxin1:before { - content: "\e724"; -} - -.icon-duosucaibeifen:before { - content: "\e722"; -} - -.icon-duosucai:before { - content: "\e723"; -} - -.icon-shujutongji:before { - content: "\e721"; -} - -.icon-renlian:before { - content: "\e71c"; -} - -.icon-xingti:before { - content: "\e71d"; -} - -.icon-jidongche:before { - content: "\e71e"; -} - -.icon-huisufenxi4:before { - content: "\e71f"; -} - -.icon-lixianfenxi4:before { - content: "\e720"; -} - -.icon-feijidongche:before { - content: "\e71b"; -} - -.icon-shujudaping:before { - content: "\e71a"; -} - -.icon-peizhisuanfa:before { - content: "\e719"; -} - -.icon-zhuizong:before { - content: "\e715"; -} - -.icon-zhuizongnor:before { - content: "\e716"; -} - -.icon-dianwei:before { - content: "\e714"; -} - -.icon-Container:before { - content: "\e713"; -} - -.icon-Attachment:before { - content: "\e712"; -} - -.icon-cha:before { - content: "\e711"; -} - -.icon-gou:before { - content: "\e710"; -} - -.icon-daoru:before { - content: "\e70f"; -} - -.icon-quanxijiansuo:before { - content: "\e70e"; -} - -.icon-chakanjiankong:before { - content: "\e70c"; -} - -.icon-tishi3:before { - content: "\e70d"; -} - -.icon-heiyemoshi:before { - content: "\e70b"; -} - -.icon-zhengchangmoshi:before { - content: "\e70a"; -} - -.icon-dingwei1:before { - content: "\e709"; -} - -.icon-paixu:before { - content: "\e708"; -} - -.icon-tianjiayuan:before { - content: "\e707"; -} - -.icon-juleidangankunor:before { - content: "\e705"; -} - -.icon-juleidanganku:before { - content: "\e706"; -} - -.icon-guanlian:before { - content: "\e704"; -} - -.icon-renlianbiaozhu:before { - content: "\e703"; -} - -.icon-juleijieguo:before { - content: "\e6ec"; -} - -.icon-juleirenwunor:before { - content: "\e6fb"; -} - -.icon-juleijieguonor:before { - content: "\e701"; -} - -.icon-juleirenwu:before { - content: "\e702"; -} - -.icon-zhongzhi3:before { - content: "\e8ff"; -} - -.icon-xuanzhuan1:before { - content: "\e6fd"; -} - -.icon-shuangmubiaozhu1:before { - content: "\e700"; -} - -.icon-shoudongkuangxuan:before { - content: "\e6f9"; -} - -.icon-zanting1:before { - content: "\e6fe"; -} - -.icon-zhongzhi1:before { - content: "\e6ff"; -} - -.icon-shoudong:before { - content: "\e6fa"; -} - -.icon-zidong:before { - content: "\e6fc"; -} - -.icon-zhenduan:before { - content: "\e6f8"; -} - -.icon-Check-Circle-Fill1:before { - content: "\e6f3"; -} - -.icon-Info--Circle-Fill:before { - content: "\e6f4"; -} - -.icon-Close-Circle-Fill:before { - content: "\e6f5"; -} - -.icon-Warning-Circle-Fill:before { - content: "\e6f6"; -} - -.icon-Question-Circle-Fill:before { - content: "\e6f7"; -} - -.icon-zancunjia:before { - content: "\e6f2"; -} - -.icon-Check-Circle-Fill:before { - content: "\e6f1"; -} - -.icon-tupianji:before { - content: "\e6f0"; -} - -.icon-quanping1:before { - content: "\e6ed"; -} - -.icon-yinliang:before { - content: "\e6ee"; -} - -.icon-suoxiao1:before { - content: "\e6ef"; -} - -.icon-home:before { - content: "\e6eb"; -} - -.icon-zuixiaohua:before { - content: "\e6e9"; -} - -.icon-zuidahua:before { - content: "\e6ea"; -} - -.icon-biaozhunhua:before { - content: "\e6e6"; -} - -.icon-julei:before { - content: "\e6e5"; -} - -.icon-bianzu:before { - content: "\e6e7"; -} - -.icon-bianzu3:before { - content: "\e6e8"; -} - -.icon-bianzu7:before { - content: "\e6e3"; -} - -.icon-bianzu2:before { - content: "\e6e4"; -} - -.icon-kapianqiehuan:before { - content: "\e6e2"; -} - -.icon-duobianxing1:before { - content: "\e6e0"; -} - -.icon-fang1:before { - content: "\e6e1"; -} - -.icon-yuan1:before { - content: "\e6df"; -} - -.icon-cejuli:before { - content: "\e6de"; -} - -.icon-wanggekuangxuannor:before { - content: "\e6dc"; -} - -.icon-lujingkuangxuannor:before { - content: "\e6dd"; -} - -.icon-chuansuo:before { - content: "\e6db"; -} - -.icon-bianyuanhezinor:before { - content: "\e6d8"; -} - -.icon-wujiankuhov:before { - content: "\e6d9"; -} - -.icon-caozuorizhinor:before { - content: "\e6da"; -} - -.icon-collect_dot:before { - content: "\e619"; -} - -.icon-chuxiandingweibg:before { - content: "\e6d4"; -} - -.icon-chuxiandingweiicon:before { - content: "\e6d5"; -} - -.icon-shexiangtoudingweibg:before { - content: "\e6d6"; -} - -.icon-shexiangtoudingweiicon:before { - content: "\e6d7"; -} - -.icon-xiafajieguo:before { - content: "\e6d2"; -} - -.icon-daochu1:before { - content: "\e6d3"; -} - -.icon-zuijinchuxian:before { - content: "\e6cc"; -} - -.icon-leijizhuapai:before { - content: "\e6d0"; -} - -.icon-yichangshijian:before { - content: "\e6d1"; -} - -.icon-dingwei:before { - content: "\e6cb"; -} - -.icon-tupian:before { - content: "\e6ad"; -} - -.icon-wenti:before { - content: "\e6ac"; -} - -.icon-lixian1:before { - content: "\e6ab"; -} - -.icon-yichang:before { - content: "\e6a8"; -} - -.icon-zhuixing-xiugaidianwei:before { - content: "\e6a7"; -} - -.icon-wenhao1:before { - content: "\e69e"; -} - -.icon-ditu_dingwei:before { - content: "\e69d"; -} - -.icon-ditu_fangda:before { - content: "\e689"; -} - -.icon-ditu_suoxiao:before { - content: "\e69a"; -} - -.icon-chakanbukongrenwu:before { - content: "\e688"; -} - -.icon-lietu:before { - content: "\e687"; -} - -.icon-zhongzhi:before { - content: "\e67e"; -} - -.icon-xialada:before { - content: "\e67f"; -} - -.icon-zhinengguanlian_xingti:before { - content: "\e67b"; -} - -.icon-zhinengguanlian_renlian:before { - content: "\e67c"; -} - -.icon-xiajiantou:before { - content: "\e75c"; -} - -.icon-zhinengguanlian_xiaojiantou:before { - content: "\e67d"; -} - -.icon-zhinengguanlian_jiantou:before { - content: "\e67a"; -} - -.icon-shangjiantou:before { - content: "\e75d"; -} - -.icon-banbenxinxi:before { - content: "\e679"; -} - -.icon-wenhao:before { - content: "\e61f"; -} - -.icon-bianjirenyuan:before { - content: "\e7e0"; -} - -.icon-tishi2:before { - content: "\e7df"; -} - -.icon-shexiangji2:before { - content: "\e7de"; -} - -.icon-guijizhuizong:before { - content: "\e7dd"; -} - -.icon-jiezhen1:before { - content: "\e7dc"; -} - -.icon-tianjiaguijihuisu:before { - content: "\e7db"; -} - -.icon-tingzhi:before { - content: "\e7cd"; -} - -.icon-baoweiquan:before { - content: "\e7ce"; -} - -.icon-shangchuanshipin:before { - content: "\e7d0"; -} - -.icon-yidong:before { - content: "\e7d1"; -} - -.icon-chuangjianxinbukong1:before { - content: "\e7d2"; -} - -.icon-yichu1:before { - content: "\e7d3"; -} - -.icon-tishi1:before { - content: "\e7d4"; -} - -.icon-VS:before { - content: "\e7d5"; -} - -.icon-quanjuzonglan:before { - content: "\e7d6"; -} - -.icon-chakanfenxirenwu1:before { - content: "\e7d7"; -} - -.icon-xiaoxi:before { - content: "\e7d8"; -} - -.icon-yonghuming:before { - content: "\e7d9"; -} - -.icon-tuichu:before { - content: "\e7da"; -} - -.icon-guijizhuizongnor:before { - content: "\e7cb"; -} - -.icon-guijizhuizong2:before { - content: "\e7cc"; -} - -.icon-bukongrenwu1:before { - content: "\e7b7"; -} - -.icon-shexiangji:before { - content: "\e7b8"; -} - -.icon-yujingditu:before { - content: "\e7ba"; -} - -.icon-lixianfenxi2:before { - content: "\e7bb"; -} - -.icon-yuanguanli1:before { - content: "\e7bc"; -} - -.icon-danganku:before { - content: "\e7bd"; -} - -.icon-huisufenxi2:before { - content: "\e7be"; -} - -.icon-kuneijiansuo:before { - content: "\e7bf"; -} - -.icon-jiegouhuachaxun:before { - content: "\e7c0"; -} - -.icon-bukongrenwu2:before { - content: "\e7c2"; -} - -.icon-yuanguanli2:before { - content: "\e7c3"; -} - -.icon-shexiangji1:before { - content: "\e7c4"; -} - -.icon-kuneijiansuo1:before { - content: "\e7c5"; -} - -.icon-lixianfenxi3:before { - content: "\e7c6"; -} - -.icon-danganku1:before { - content: "\e7c7"; -} - -.icon-yujingditu1:before { - content: "\e7c8"; -} - -.icon-huisufenxi3:before { - content: "\e7c9"; -} - -.icon-jiegouhuachaxunnor:before { - content: "\e7ca"; -} - -.icon-chuangjianxinbukong:before { - content: "\e7b6"; -} - -.icon-kuangxuan:before { - content: "\e77f"; -} - -.icon-gaojishaixuan:before { - content: "\e779"; -} - -.icon-gaojishaixuanshouqi:before { - content: "\e77a"; -} - -.icon-bukongrenwu:before { - content: "\e7b5"; -} - -.icon-riqi:before { - content: "\e74f"; -} - -.icon-shijianqiehuan:before { - content: "\e797"; -} - -.icon-shouquan1:before { - content: "\e7b3"; -} - -.icon-video-play:before { - content: "\e653"; -} - -.icon-shishifenxi:before { - content: "\e7af"; -} - -.icon-chakanfenxirenwu:before { - content: "\e7b0"; -} - -.icon-jiegouhuafenxi:before { - content: "\e7ad"; -} - -.icon-tianjiaguiji2:before { - content: "\e6aa"; -} - -.icon-tianjiajiansuomubiao:before { - content: "\e6b0"; -} - -.icon-add:before { - content: "\e661"; -} - -.icon-didian:before { - content: "\e798"; -} - -.icon-bofanghov:before { - content: "\e79f"; -} - -.icon-bofang3:before { - content: "\e7a0"; -} - -.icon-jinggao:before { - content: "\e788"; -} - -.icon-tishi:before { - content: "\e789"; -} - -.icon-bangzhu:before { - content: "\e78a"; -} - -.icon-guanbi1:before { - content: "\e78b"; -} - -.icon-chenggong:before { - content: "\e78c"; -} - -.icon-qianwang:before { - content: "\e7ac"; -} - -.icon-shouquan:before { - content: "\e7ab"; -} - -.icon-jingweidu:before { - content: "\e7aa"; -} - -.icon-shanchu1:before { - content: "\e74e"; -} - -.icon-daochu:before { - content: "\e782"; -} - -.icon-ziyuanguanli:before { - content: "\e7a4"; -} - -.icon-fuwuqishouquan:before { - content: "\e7a5"; -} - -.icon-xiugaimima:before { - content: "\e7a6"; -} - -.icon-zhanghaoguanli:before { - content: "\e7a7"; -} - -.icon-suanlipeie:before { - content: "\e7a8"; -} - -.icon-VMSpeizhi:before { - content: "\e7a9"; -} - -.icon-tianjia1:before { - content: "\e794"; -} - -.icon-yichu:before { - content: "\e795"; -} - -.icon-lujing:before { - content: "\e6cf"; -} - -.icon-jiankongxinxi:before { - content: "\e6c8"; -} - -.icon-fanwei:before { - content: "\e6c9"; -} - -.icon-anfadidian:before { - content: "\e6ca"; -} - -.icon-gongjuxiang:before { - content: "\e6cd"; -} - -.icon-gongjuxiangguanbi1:before { - content: "\e6ce"; -} - -.icon-jiezhen:before { - content: "\e6c2"; -} - -.icon-huisufenxi1:before { - content: "\e6c6"; -} - -.icon-huisufenxi:before { - content: "\e6c7"; -} - -.icon-tianjiashipinwenjian1:before { - content: "\e6c5"; -} - -.icon-jiazaishibai:before { - content: "\e6c3"; -} - -.icon-shuaxin:before { - content: "\e6c4"; -} - -.icon-quanping:before { - content: "\e6c0"; -} - -.icon-quxiaoquanping:before { - content: "\e6c1"; -} - -.icon-shipinbofang:before { - content: "\e6be"; -} - -.icon-shipinzanting:before { - content: "\e6bf"; -} - -.icon-lixianguiji:before { - content: "\e6bd"; -} - -.icon-lixian:before { - content: "\e6bc"; -} - -.icon-xiaojiaobiao:before { - content: "\e6bb"; -} - -.icon-shangchuan1:before { - content: "\e6ba"; -} - -.icon-tianjiaweijiansuoduixiang:before { - content: "\e6b8"; -} - -.icon-tianjiaweijiansuojilu:before { - content: "\e6b9"; -} - -.icon-lixianfenxi1:before { - content: "\e6b7"; -} - -.icon-kuaisujiansuohov:before { - content: "\e6b5"; -} - -.icon-kuaisujiansuo1:before { - content: "\e6b6"; -} - -.icon-kuaisujiansuo:before { - content: "\e6b4"; -} - -.icon-yuanguanli:before { - content: "\e6b1"; -} - -.icon-shexiangtou:before { - content: "\e6b2"; -} - -.icon-lixianfenxi:before { - content: "\e6b3"; -} - -.icon-filter:before { - content: "\e61a"; -} - -.icon-tianjiaweizhuizongduixiang2:before { - content: "\e6af"; -} - -.icon-tianjiaweizhuizongduixiang1:before { - content: "\e6ae"; -} - -.icon-baocun1:before { - content: "\e6a9"; -} - -.icon-tianjiashipinwenjianjia:before { - content: "\e6a5"; -} - -.icon-tianjiashipinwenjian:before { - content: "\e6a6"; -} - -.icon-ditu:before { - content: "\e6a4"; -} - -.icon-xinjianshexiangtou:before { - content: "\e6a3"; -} - -.icon-lishihuisu:before { - content: "\e6a2"; -} - -.icon-decoyitianjiaweiguiji:before { - content: "\e69f"; -} - -.icon-bofangqiehuan:before { - content: "\e6a0"; -} - -.icon-tianjia:before { - content: "\e6a1"; -} - -.icon-baocun:before { - content: "\e698"; -} - -.icon-gongjuxiangguanbi:before { - content: "\e699"; -} - -.icon-shangchuan:before { - content: "\e69b"; -} - -.icon-gongjuxiang1:before { - content: "\e69c"; -} - -.icon-logo:before { - content: "\e692"; -} - -.icon-setting:before { - content: "\e627"; -} - -.icon-user:before { - content: "\e628"; -} - -.icon-quit:before { - content: "\e629"; -} - -.icon-arrowzhankaimeixuanzhong:before { - content: "\e693"; -} - -.icon-arrowzhankaixuanzhong:before { - content: "\e694"; -} - -.icon-xuanzexuanzhong:before { - content: "\e695"; -} - -.icon-xuanzebanxuan:before { - content: "\e696"; -} - -.icon-xuanzenor:before { - content: "\e697"; -} - -.icon-shaixuanguanbinor:before { - content: "\e691"; -} - -.icon-gengduo:before { - content: "\e68e"; -} - -.icon-youzhankai:before { - content: "\e68f"; -} - -.icon-zuoshouqi:before { - content: "\e690"; -} - -.icon-yuan:before { - content: "\e68a"; -} - -.icon-duobianxing:before { - content: "\e68b"; -} - -.icon-fang:before { - content: "\e68c"; -} - -.icon-ceju:before { - content: "\e68d"; -} - -.icon-shishizhuizong1:before { - content: "\e683"; -} - -.icon-guijihuisu1:before { - content: "\e684"; -} - -.icon-tianjiaguiji:before { - content: "\e685"; -} - -.icon-yichuguiji:before { - content: "\e686"; -} - -.icon-fangda:before { - content: "\e680"; -} - -.icon-suoxiao:before { - content: "\e681"; -} - -.icon-xiazai:before { - content: "\e682"; -} - -.icon-fanhui:before { - content: "\e678"; -} - -.icon-sousuo:before { - content: "\e669"; -} - -.icon-quxiaoxuanzhong:before { - content: "\e66a"; -} - -.icon-piliangxuanzenor:before { - content: "\e66b"; -} - -.icon-kaiqifenxi:before { - content: "\e66c"; -} - -.icon-quxiaofenxi:before { - content: "\e66d"; -} - -.icon-shaixuan:before { - content: "\e66e"; -} - -.icon-dangan:before { - content: "\e66f"; -} - -.icon-bofang:before { - content: "\e670"; -} - -.icon-zanting:before { - content: "\e671"; -} - -.icon-shanchu:before { - content: "\e672"; -} - -.icon-tianjiaweizhuizongduixiang:before { - content: "\e673"; -} - -.icon-chakandatu:before { - content: "\e674"; -} - -.icon-jiansuojilu:before { - content: "\e675"; -} - -.icon-yuzhi:before { - content: "\e676"; -} - -.icon-chakanxiangqing:before { - content: "\e677"; -} - -.icon-guijihuisu:before { - content: "\e65c"; -} - -.icon-dianweipeizhinor:before { - content: "\e65d"; -} - -.icon-yirenyidang:before { - content: "\e65e"; -} - -.icon-tongbanfenxi:before { - content: "\e65f"; -} - -.icon-qiehuanzuo:before { - content: "\e662"; -} - -.icon-qiehuanyou:before { - content: "\e663"; -} - -.icon-tingzhidengdai:before { - content: "\e664"; -} - -.icon-yiguanbi:before { - content: "\e665"; -} - -.icon-danchuangguanbi:before { - content: "\e666"; -} - -.icon-lishijilu:before { - content: "\e64a"; -} - -.icon-xuanzhuan:before { - content: "\e648"; -} - -.icon-qingchu:before { - content: "\e649"; -} - -.icon-dangantianjia:before { - content: "\e63d"; -} - -.icon-bianji:before { - content: "\e63e"; -} - -.icon-fullscreen:before { - content: "\e63b"; -} - -.icon-cancle_fullscreen:before { - content: "\e63c"; -} - -.icon-quanyujiansuo_nor:before { - content: "\e639"; -} - -.icon-guijihuisu_nor:before { - content: "\e63a"; -} - diff --git a/packages/meta/src/iconfont/iconfont.js b/packages/meta/src/iconfont/iconfont.js deleted file mode 100644 index ce21246..0000000 --- a/packages/meta/src/iconfont/iconfont.js +++ /dev/null @@ -1 +0,0 @@ -window._iconfont_svg_string_1739270='',function(h){var a=(a=document.getElementsByTagName("script"))[a.length-1],l=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var i,c,o,t,z,v=function(a,l){l.parentNode.insertBefore(a,l)};if(l&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}i=function(){var a,l=document.createElement("div");l.innerHTML=h._iconfont_svg_string_1739270,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?v(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(c=function(){document.removeEventListener("DOMContentLoaded",c,!1),i()},document.addEventListener("DOMContentLoaded",c,!1)):document.attachEvent&&(o=i,t=h.document,z=!1,p(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,m())})}function m(){z||(z=!0,o())}function p(){try{t.documentElement.doScroll("left")}catch(a){return void setTimeout(p,50)}m()}}(window); \ No newline at end of file diff --git a/packages/meta/src/iconfont/iconfont.ttf b/packages/meta/src/iconfont/iconfont.ttf deleted file mode 100644 index 0043e6a..0000000 Binary files a/packages/meta/src/iconfont/iconfont.ttf and /dev/null differ diff --git a/packages/meta/src/iconfont/iconfont.woff b/packages/meta/src/iconfont/iconfont.woff deleted file mode 100644 index 84f32bb..0000000 Binary files a/packages/meta/src/iconfont/iconfont.woff and /dev/null differ diff --git a/packages/meta/src/iconfont/iconfont.woff2 b/packages/meta/src/iconfont/iconfont.woff2 deleted file mode 100644 index 8173340..0000000 Binary files a/packages/meta/src/iconfont/iconfont.woff2 and /dev/null differ diff --git a/packages/meta/src/iconfont/index.tsx b/packages/meta/src/iconfont/index.tsx deleted file mode 100644 index 12c0509..0000000 --- a/packages/meta/src/iconfont/index.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import React from 'react'; -import classNames from 'classnames'; -import './iconfont.css' - -interface IconFontProps { - styles?: React.CSSProperties; - icon?: string; - size?: number; - color?: string; - title?: string; - className?: string; - onIconClick?: (e: React.MouseEvent) => void; - children?: React.ReactNode; - active?: boolean; - disable?: boolean; -} - -const IconFont: React.FC = (props) => { - const { - title = '', - className = '', - styles = {}, - icon, - size = 14, - onIconClick, - children, - active = false, - color = '', - } = props || {}; - return ( - { - onIconClick && onIconClick(e); - }} - style={{ - ...styles, - cursor: 'pointer', - fontSize: size, - color, - ...(active ? { color: '#09f' } : {}), - }} - className={classNames('iconfont', icon, className)} - > - {children} - - ); -}; -export default IconFont; diff --git a/packages/meta/src/index.tsx b/packages/meta/src/index.tsx index fcf3b8a..50e675c 100644 --- a/packages/meta/src/index.tsx +++ b/packages/meta/src/index.tsx @@ -1,8 +1,9 @@ -export { default as Icon } from './iconfont'; export { default as CompareImage } from './CompareImage' export type { CompareImageProps } from './CompareImage' export { default as BigImagePreview } from './BigImagePreview' export type { ImgViewProps, ImgViewRef } from './BigImagePreview' +export { default as CropperImage } from './cropperImage' +export type { CropperImageProps, CropperImageRefProps } from './cropperImage' export { default as VideoPlayer } from './VideoPlayer' export type { VideoViewProps, VideoViewRef } from './VideoPlayer' export { default as Tabs } from './tabs' diff --git a/packages/meta/src/utils/constants.ts b/packages/meta/src/utils/constants.ts index 48ce79d..2781c76 100644 --- a/packages/meta/src/utils/constants.ts +++ b/packages/meta/src/utils/constants.ts @@ -1,5 +1,3 @@ -import { Empty } from "antd"; - export const CROP_TYPE = { CUSTOM: 'CUSTOM', AUTO: 'AUTO', diff --git a/packages/request/CHANGELOG.md b/packages/request/CHANGELOG.md index 4b073f6..0ff5114 100644 --- a/packages/request/CHANGELOG.md +++ b/packages/request/CHANGELOG.md @@ -1,5 +1,12 @@ # @zhst/request +## 0.9.1 + +### Patch Changes + +- 修改物料库算法编辑新增箭头选择,元组件新增图片标记组件 + - @zhst/func@0.9.2 + ## 0.9.0 ### Minor Changes diff --git a/packages/request/package.json b/packages/request/package.json index b7d23d8..5ff0511 100644 --- a/packages/request/package.json +++ b/packages/request/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/request", - "version": "0.9.0", + "version": "0.9.1", "description": "请求库", "keywords": [ "request", diff --git a/packages/slave/CHANGELOG.md b/packages/slave/CHANGELOG.md index 87f3b2f..639c64d 100644 --- a/packages/slave/CHANGELOG.md +++ b/packages/slave/CHANGELOG.md @@ -1,5 +1,11 @@ # @zhst/slave +## 0.5.1 + +### Patch Changes + +- @zhst/func@0.9.2 + ## 0.5.0 ### Minor Changes diff --git a/packages/slave/package.json b/packages/slave/package.json index 039af69..ea00ef0 100644 --- a/packages/slave/package.json +++ b/packages/slave/package.json @@ -1,6 +1,6 @@ { "name": "@zhst/slave", - "version": "0.5.0", + "version": "0.5.1", "description": "微前端子应用方法库", "keywords": [ "slave",