yootd 0.0.72 → 0.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { HolidayProps } from './types/types';
3
+ export declare const Holiday: React.FC<HolidayProps>;
@@ -0,0 +1,37 @@
1
+ var _excluded = ["showSearch"];
2
+ 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); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ import { useQuery } from '@tanstack/react-query';
6
+ import React, { useMemo } from 'react';
7
+ import { Select } from "./..";
8
+ import { useRequest } from "../hooks/useRequest";
9
+ export var Holiday = function Holiday(_ref) {
10
+ var _ref$showSearch = _ref.showSearch,
11
+ showSearch = _ref$showSearch === void 0 ? true : _ref$showSearch,
12
+ rest = _objectWithoutProperties(_ref, _excluded);
13
+ var request = useRequest();
14
+ // 查询所有假期
15
+ var _useQuery = useQuery({
16
+ queryKey: ['holidayData'],
17
+ queryFn: function queryFn() {
18
+ return request('/v1/education/vacation/info/all');
19
+ }
20
+ }),
21
+ holidayData = _useQuery.data;
22
+ // 将职务数据处理成下拉框
23
+ var allHolidayOptions = useMemo(function () {
24
+ var _holidayData$content;
25
+ return holidayData === null || holidayData === void 0 || (_holidayData$content = holidayData.content) === null || _holidayData$content === void 0 ? void 0 : _holidayData$content.map(function (item) {
26
+ return {
27
+ label: item.vacationName,
28
+ value: item.vacationId
29
+ };
30
+ });
31
+ }, [holidayData]);
32
+ return /*#__PURE__*/React.createElement(Select, _extends({
33
+ options: allHolidayOptions,
34
+ showSearch: showSearch,
35
+ optionFilterProp: "label"
36
+ }, rest));
37
+ };
@@ -0,0 +1,22 @@
1
+ import { SelectProps } from 'yootd';
2
+
3
+ export interface PageData<T> {
4
+ content: T[];
5
+ page: {
6
+ number: number;
7
+ size: number;
8
+ totalElements: number;
9
+ totalPages: number;
10
+ };
11
+ }
12
+ // 查询职务返回的数据类型
13
+ export interface IjobTitleItem {
14
+ titleId: number;
15
+ titleName: string;
16
+ }
17
+ // 查询角色返回的数据类型
18
+ export interface IHolidayItem {
19
+ vacationId: number;
20
+ vacationName: string;
21
+ }
22
+ export type HolidayProps = SelectProps;
package/dist/index.d.ts CHANGED
@@ -24,6 +24,8 @@ export type { DepartmentProps } from './department/types/types';
24
24
  export { DropdownSelect } from './dropdown-select';
25
25
  export type { DropdownSelectProps } from './dropdown-select/types/type';
26
26
  export { Export } from './export';
27
+ export { Holiday } from './holiday';
28
+ export type { HolidayProps } from './holiday/types/types';
27
29
  export { JobTitle } from './job-title';
28
30
  export type { JobTitleProps } from './job-title/types/types';
29
31
  export { Role } from './role';
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ export { Dropdown } from "./dropdown";
13
13
  export { Department } from "./department";
14
14
  export { DropdownSelect } from "./dropdown-select";
15
15
  export { Export } from "./export";
16
+ export { Holiday } from "./holiday";
16
17
  export { JobTitle } from "./job-title";
17
18
  export { Role } from "./role";
18
19
  export { Flex } from "./flex";
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  import * as faceapi from '@vladmandic/face-api';
18
18
  import * as posedetection from '@tensorflow-models/pose-detection';
19
19
  import * as tf from '@tensorflow/tfjs';
20
- console.log("Hello, World!");
20
+ console.log('Hello, World!');
21
21
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
22
22
  import { EndPoint } from 'yootd-webrtc-sdk';
23
23
  import { useBem } from "../hooks/useBem";
@@ -158,6 +158,10 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
158
158
  },
159
159
  // 设置播放时间
160
160
  setVideoCurrentTime: function setVideoCurrentTime(time) {
161
+ // 判断是否为数字
162
+ if (typeof time !== 'number' || isNaN(time)) {
163
+ return;
164
+ }
161
165
  if (videoRef.current) {
162
166
  videoRef.current.currentTime = time;
163
167
  }
@@ -704,26 +708,26 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
704
708
  useEffect(function () {
705
709
  var handler = null;
706
710
  // let lastTime = Date.now();
707
- /* const start = () => {
708
- if (
709
- !faceFeature.anchor &&
710
- !faceFeature.emotion &&
711
- !faceFeature.character
712
- ) {
713
- return;
714
- }
715
- if (lastTime + 1000 <= Date.now()) {
716
- lastTime = Date.now();
717
- detect()
718
- .catch((e) => {
719
- console.log("error", e);
720
- })
721
- .finally(() => {
722
- handler = requestAnimationFrame(start);
723
- });
724
- } else {
725
- handler = requestAnimationFrame(start);
726
- }
711
+ /* const start = () => {
712
+ if (
713
+ !faceFeature.anchor &&
714
+ !faceFeature.emotion &&
715
+ !faceFeature.character
716
+ ) {
717
+ return;
718
+ }
719
+ if (lastTime + 1000 <= Date.now()) {
720
+ lastTime = Date.now();
721
+ detect()
722
+ .catch((e) => {
723
+ console.log("error", e);
724
+ })
725
+ .finally(() => {
726
+ handler = requestAnimationFrame(start);
727
+ });
728
+ } else {
729
+ handler = requestAnimationFrame(start);
730
+ }
727
731
  }; */
728
732
 
729
733
  var lastTime = 0;
package/package.json CHANGED
@@ -1,106 +1,106 @@
1
- {
2
- "name": "yootd",
3
- "version": "0.0.72",
4
- "description": "A react library developed with dumi",
5
- "license": "MIT",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "build": "father build",
13
- "build:watch": "father dev",
14
- "dev": "dumi dev",
15
- "docs:build": "dumi build",
16
- "docs:preview": "dumi preview",
17
- "doctor": "father doctor",
18
- "lint": "npm run lint:es && npm run lint:css",
19
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
- "prepare": "husky install && dumi setup",
22
- "prepublishOnly": "father doctor && npm run build",
23
- "start": "npm run dev"
24
- },
25
- "commitlint": {
26
- "extends": [
27
- "@commitlint/config-conventional"
28
- ]
29
- },
30
- "lint-staged": {
31
- "*.{md,json}": [
32
- "prettier --write --no-error-on-unmatched-pattern"
33
- ],
34
- "*.{css,less}": [
35
- "stylelint --fix",
36
- "prettier --write"
37
- ],
38
- "*.{js,jsx}": [
39
- "eslint --fix",
40
- "prettier --write"
41
- ],
42
- "*.{ts,tsx}": [
43
- "eslint --fix",
44
- "prettier --parser=typescript --write"
45
- ]
46
- },
47
- "dependencies": {
48
- "@tensorflow-models/pose-detection": "^2.1.3",
49
- "@tensorflow/tfjs": "^4.22.0"
50
- },
51
- "devDependencies": {
52
- "@commitlint/cli": "^17.1.2",
53
- "@commitlint/config-conventional": "^17.1.0",
54
- "@dnd-kit/core": "^6.1.0",
55
- "@dnd-kit/modifiers": "^7.0.0",
56
- "@dnd-kit/sortable": "^8.0.0",
57
- "@dnd-kit/utilities": "^3.2.2",
58
- "@tanstack/react-query": "^5.59.15",
59
- "@types/lodash": "^4.17.12",
60
- "@types/react": "^18.0.0",
61
- "@types/react-dom": "^18.0.0",
62
- "@umijs/lint": "^4.0.0",
63
- "@vladmandic/face-api": "^1.7.14",
64
- "antd": "^5.21.4",
65
- "axios": "^1.7.7",
66
- "dayjs": "^1.11.13",
67
- "dumi": "^2.3.0",
68
- "dumi-theme-antd": "^0.4.2",
69
- "eslint": "^8.23.0",
70
- "father": "^4.1.0",
71
- "husky": "^8.0.1",
72
- "lint-staged": "^13.0.3",
73
- "lodash": "^4.17.21",
74
- "nanoid": "^5.0.8",
75
- "prettier": "^2.7.1",
76
- "prettier-plugin-organize-imports": "^3.0.0",
77
- "prettier-plugin-packagejson": "^2.2.18",
78
- "react": "^18.0.0",
79
- "react-dom": "^18.0.0",
80
- "sass": "^1.80.0",
81
- "stylelint": "^14.9.1",
82
- "yootd-webrtc-sdk": "^1.0.1"
83
- },
84
- "peerDependencies": {
85
- "@dnd-kit/core": ">=6.1.0",
86
- "@dnd-kit/modifiers": ">=7.0.0",
87
- "@dnd-kit/sortable": ">=8.0.0",
88
- "@dnd-kit/utilities": ">=3.2.2",
89
- "@tanstack/react-query": ">=5.59.15",
90
- "@vladmandic/face-api": "^1.7.14",
91
- "@xyflow/react": ">=12.3.3",
92
- "antd": ">=5.21.4",
93
- "axios": ">=1.7.7",
94
- "dayjs": ">=1.11.13",
95
- "lodash": ">=4.17.21",
96
- "nanoid": ">=5.0.8",
97
- "react": ">=16.9.0",
98
- "react-dom": ">=16.9.0",
99
- "react-router-dom": ">=6.25.0",
100
- "yootd-webrtc-sdk": "^1.0.1"
101
- },
102
- "publishConfig": {
103
- "access": "public"
104
- },
105
- "authors": []
106
- }
1
+ {
2
+ "name": "yootd",
3
+ "version": "0.0.74",
4
+ "description": "A react library developed with dumi",
5
+ "license": "MIT",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "dev": "dumi dev",
15
+ "docs:build": "dumi build",
16
+ "docs:preview": "dumi preview",
17
+ "doctor": "father doctor",
18
+ "lint": "npm run lint:es && npm run lint:css",
19
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
20
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
21
+ "prepare": "husky install && dumi setup",
22
+ "prepublishOnly": "father doctor && npm run build",
23
+ "start": "npm run dev"
24
+ },
25
+ "commitlint": {
26
+ "extends": [
27
+ "@commitlint/config-conventional"
28
+ ]
29
+ },
30
+ "lint-staged": {
31
+ "*.{md,json}": [
32
+ "prettier --write --no-error-on-unmatched-pattern"
33
+ ],
34
+ "*.{css,less}": [
35
+ "stylelint --fix",
36
+ "prettier --write"
37
+ ],
38
+ "*.{js,jsx}": [
39
+ "eslint --fix",
40
+ "prettier --write"
41
+ ],
42
+ "*.{ts,tsx}": [
43
+ "eslint --fix",
44
+ "prettier --parser=typescript --write"
45
+ ]
46
+ },
47
+ "dependencies": {
48
+ "@tensorflow-models/pose-detection": "^2.1.3",
49
+ "@tensorflow/tfjs": "^4.22.0"
50
+ },
51
+ "devDependencies": {
52
+ "@commitlint/cli": "^17.1.2",
53
+ "@commitlint/config-conventional": "^17.1.0",
54
+ "@dnd-kit/core": "^6.1.0",
55
+ "@dnd-kit/modifiers": "^7.0.0",
56
+ "@dnd-kit/sortable": "^8.0.0",
57
+ "@dnd-kit/utilities": "^3.2.2",
58
+ "@tanstack/react-query": "^5.59.15",
59
+ "@types/lodash": "^4.17.12",
60
+ "@types/react": "^18.0.0",
61
+ "@types/react-dom": "^18.0.0",
62
+ "@umijs/lint": "^4.0.0",
63
+ "@vladmandic/face-api": "^1.7.14",
64
+ "antd": "^5.21.4",
65
+ "axios": "^1.7.7",
66
+ "dayjs": "^1.11.13",
67
+ "dumi": "^2.3.0",
68
+ "dumi-theme-antd": "^0.4.2",
69
+ "eslint": "^8.23.0",
70
+ "father": "^4.1.0",
71
+ "husky": "^8.0.1",
72
+ "lint-staged": "^13.0.3",
73
+ "lodash": "^4.17.21",
74
+ "nanoid": "^5.0.8",
75
+ "prettier": "^2.7.1",
76
+ "prettier-plugin-organize-imports": "^3.0.0",
77
+ "prettier-plugin-packagejson": "^2.2.18",
78
+ "react": "^18.0.0",
79
+ "react-dom": "^18.0.0",
80
+ "sass": "^1.80.0",
81
+ "stylelint": "^14.9.1",
82
+ "yootd-webrtc-sdk": "^1.0.1"
83
+ },
84
+ "peerDependencies": {
85
+ "@dnd-kit/core": ">=6.1.0",
86
+ "@dnd-kit/modifiers": ">=7.0.0",
87
+ "@dnd-kit/sortable": ">=8.0.0",
88
+ "@dnd-kit/utilities": ">=3.2.2",
89
+ "@tanstack/react-query": ">=5.59.15",
90
+ "@vladmandic/face-api": "^1.7.14",
91
+ "@xyflow/react": ">=12.3.3",
92
+ "antd": ">=5.21.4",
93
+ "axios": ">=1.7.7",
94
+ "dayjs": ">=1.11.13",
95
+ "lodash": ">=4.17.21",
96
+ "nanoid": ">=5.0.8",
97
+ "react": ">=16.9.0",
98
+ "react-dom": ">=16.9.0",
99
+ "react-router-dom": ">=6.25.0",
100
+ "yootd-webrtc-sdk": "^1.0.1"
101
+ },
102
+ "publishConfig": {
103
+ "access": "public"
104
+ },
105
+ "authors": []
106
+ }