szld-libs 0.2.23 → 0.2.25

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.
@@ -7,6 +7,7 @@ interface WorkFlowNodeProps {
7
7
  rowKey: string | ((record: any) => Key);
8
8
  renderContent?: (record: any, index: number, currentIndex: number) => ReactNode;
9
9
  }
10
+ export declare const WorkFlowNode: (props: WorkFlowNodeProps) => import("react/jsx-runtime").JSX.Element;
10
11
  interface showWorkFlow extends WorkFlowNodeProps, ModalFuncProps {
11
12
  }
12
13
  declare const showWorkFlow: (props: showWorkFlow) => null;
@@ -1,8 +1,8 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { DownOutlined, UpOutlined } from "@ant-design/icons";
2
3
  import { Modal } from "antd";
3
4
  import classNames from "classnames";
4
5
  import { useState, useMemo } from "react";
5
- import { DownOutlined, UpOutlined } from "@ant-design/icons";
6
6
  const main = "workflownode-module_main_dce7f";
7
7
  const item = "workflownode-module_item_73d7c";
8
8
  const tail = "workflownode-module_tail_3cb51";
@@ -135,5 +135,6 @@ const showWorkFlow = (props) => {
135
135
  return null;
136
136
  };
137
137
  export {
138
+ WorkFlowNode,
138
139
  showWorkFlow as default
139
140
  };
package/es/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import CryptoJS from "crypto-js";
3
2
  import { useEffect } from "react";
4
3
  import ReactDOM from "react-dom/client";
5
4
  import { BrowserRouter } from "react-router-dom";
6
5
  import useConfig from "./hooks/useConfig";
6
+ import { AES } from "./main";
7
7
  let key = "U2FsdGVkX1/dG1NSXNR9hnp3Ech/v6Gh8CDDJxgBm1EPFQel12ySIf84ARXCPwTae7TzwgPvjOyE3S5rAEzl/wAZmId6pbezpFeFcJqxdmIl3FeluYHFxJzQHDETTvrr3G/REvv00kHptOVwg6ecjPH6yk7PNit0sWTBLorROxLxMD8lVDmOA66p7Zp4QnYzqScYJGFbutmfHYXfBRBe1Q2UKummJ798svNY5SIwEwl4spzgyWmhARtuyq4zhysFrj/xODuNDjtwitA6XfX566WcZkj3F+2P+mkYzDYOhXXaomnlybjrZ2hEHfcczQhUfJd89O8PNIuEWo24wjYRgMdKlw5CWSeocFCqV7ZJ/CV/7vNRcaO4awKlFNobLikkwDznxpcX+4UEej+ED+pgfmPQLsKedcfEscStkSAZXaD5pBRTiFU9xGLfDt6seUrEnMBeXkpMIY9j1SZDDK18/G7lSHjDQMZYZP6sfLdBdwY=";
8
8
  const Demo = () => {
9
9
  useConfig(key);
@@ -11,14 +11,15 @@ const Demo = () => {
11
11
  jiami();
12
12
  }, []);
13
13
  const jiami = () => {
14
- CryptoJS.AES.encrypt(JSON.stringify({
14
+ const aes = new AES();
15
+ aes.encrypt(JSON.stringify({
15
16
  AppID: "GZY_SZLD_GZYDP",
16
17
  Password: "GZY_SZLD_GZYDP2557013",
17
18
  copyright: " © 云雁科技有限公司 2023 版权所有",
18
19
  icp: 'ICP备案/许可证号:<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">湘B2-20090059</a> 公网安备号 44030502008569 隐私政策',
19
20
  tel: "400-607-0705",
20
21
  Salt: "HnSzldjt#2557013#"
21
- }), "SzlDJd#4202");
22
+ }));
22
23
  };
23
24
  return /* @__PURE__ */ jsx("div", { style: { height: "100vh" }, children: "测试页面" });
24
25
  };
package/es/main.d.ts CHANGED
@@ -5,7 +5,7 @@ import UploadFile from "./components/Upload";
5
5
  import EditTable from "./components/EditTable";
6
6
  import AuthButton from "./components/AuthButton";
7
7
  import CoralButton from "./components/CoralButton";
8
- import showWorkFlow from "./components/WorkFlowNode";
8
+ import showWorkFlow, { WorkFlowNode } from "./components/WorkFlowNode";
9
9
  import * as download from "./utils/download";
10
10
  import * as fileType from "./utils/filetype";
11
11
  import * as FormRules from './utils/formRules';
@@ -16,5 +16,6 @@ import useChangePwd from "./hooks/useChangePwd";
16
16
  import useConfig from "./hooks/useConfig";
17
17
  import useRemember from "./hooks/useRemember";
18
18
  import useRowSelection from "./hooks/useRowSelection";
19
+ import AES from "./utils/aes";
19
20
  import HmacSHA512 from './utils/hmacSHA512';
20
- export { AuthButton, BackHeader, CoralButton, CreateForm, EditTable, FormRules, HmacSHA512, SearchTable, UploadFile, download, fileType, showWorkFlow, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, utils, verfyCode };
21
+ export { AES, AuthButton, BackHeader, CoralButton, CreateForm, EditTable, FormRules, HmacSHA512, SearchTable, UploadFile, WorkFlowNode, download, fileType, showWorkFlow, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, utils, verfyCode };
package/es/main.js CHANGED
@@ -5,7 +5,7 @@ import { default as default5 } from "./components/Upload";
5
5
  import { default as default6 } from "./components/EditTable";
6
6
  import { default as default7 } from "./components/AuthButton";
7
7
  import { default as default8 } from "./components/CoralButton";
8
- import { default as default9 } from "./components/WorkFlowNode";
8
+ import { WorkFlowNode, default as default9 } from "./components/WorkFlowNode";
9
9
  import * as download from "./utils/download";
10
10
  import * as filetype from "./utils/filetype";
11
11
  import * as formRules from "./utils/formRules";
@@ -16,17 +16,20 @@ import { default as default11 } from "./hooks/useChangePwd";
16
16
  import { default as default12 } from "./hooks/useConfig";
17
17
  import { default as default13 } from "./hooks/useRemember";
18
18
  import { default as default14 } from "./hooks/useRowSelection";
19
- import { default as default15 } from "./utils/hmacSHA512";
19
+ import { default as default15 } from "./utils/aes";
20
+ import { default as default16 } from "./utils/hmacSHA512";
20
21
  export {
22
+ default15 as AES,
21
23
  default7 as AuthButton,
22
24
  default2 as BackHeader,
23
25
  default8 as CoralButton,
24
26
  default3 as CreateForm,
25
27
  default6 as EditTable,
26
28
  formRules as FormRules,
27
- default15 as HmacSHA512,
29
+ default16 as HmacSHA512,
28
30
  default4 as SearchTable,
29
31
  default5 as UploadFile,
32
+ WorkFlowNode,
30
33
  download,
31
34
  filetype as fileType,
32
35
  default9 as showWorkFlow,
@@ -0,0 +1,7 @@
1
+ declare class AES {
2
+ salt: string;
3
+ constructor();
4
+ encrypt(value: string): string | undefined;
5
+ decrypt(value: string): string | undefined;
6
+ }
7
+ export default AES;
@@ -0,0 +1,28 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => {
4
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ return value;
6
+ };
7
+ import CryptoJS from "crypto-js";
8
+ class AES {
9
+ constructor() {
10
+ __publicField(this, "salt", "SzlDJd#4202");
11
+ }
12
+ encrypt(value) {
13
+ if (!value) {
14
+ return;
15
+ }
16
+ const msg = typeof value === "string" ? value : JSON.stringify(value);
17
+ return CryptoJS.AES.encrypt(msg, this.salt).toString();
18
+ }
19
+ decrypt(value) {
20
+ if (!value) {
21
+ return;
22
+ }
23
+ return CryptoJS.AES.decrypt(value, this.salt).toString(CryptoJS.enc.Utf8);
24
+ }
25
+ }
26
+ export {
27
+ AES as default
28
+ };
@@ -7,6 +7,7 @@ interface WorkFlowNodeProps {
7
7
  rowKey: string | ((record: any) => Key);
8
8
  renderContent?: (record: any, index: number, currentIndex: number) => ReactNode;
9
9
  }
10
+ export declare const WorkFlowNode: (props: WorkFlowNodeProps) => import("react/jsx-runtime").JSX.Element;
10
11
  interface showWorkFlow extends WorkFlowNodeProps, ModalFuncProps {
11
12
  }
12
13
  declare const showWorkFlow: (props: showWorkFlow) => null;
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ const icons = require("@ant-design/icons");
3
5
  const antd = require("antd");
4
6
  const classNames = require("classnames");
5
7
  const react = require("react");
6
- const icons = require("@ant-design/icons");
7
8
  const main = "workflownode-module_main_dce7f";
8
9
  const item = "workflownode-module_item_73d7c";
9
10
  const tail = "workflownode-module_tail_3cb51";
@@ -135,4 +136,5 @@ const showWorkFlow = (props) => {
135
136
  render();
136
137
  return null;
137
138
  };
138
- module.exports = showWorkFlow;
139
+ exports.WorkFlowNode = WorkFlowNode;
140
+ exports.default = showWorkFlow;
package/lib/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const CryptoJS = require("crypto-js");
4
3
  const react = require("react");
5
4
  const ReactDOM = require("react-dom/client");
6
5
  const reactRouterDom = require("react-router-dom");
7
6
  const useConfig = require("./hooks/useConfig");
7
+ const main = require("./main");
8
8
  let key = "U2FsdGVkX1/dG1NSXNR9hnp3Ech/v6Gh8CDDJxgBm1EPFQel12ySIf84ARXCPwTae7TzwgPvjOyE3S5rAEzl/wAZmId6pbezpFeFcJqxdmIl3FeluYHFxJzQHDETTvrr3G/REvv00kHptOVwg6ecjPH6yk7PNit0sWTBLorROxLxMD8lVDmOA66p7Zp4QnYzqScYJGFbutmfHYXfBRBe1Q2UKummJ798svNY5SIwEwl4spzgyWmhARtuyq4zhysFrj/xODuNDjtwitA6XfX566WcZkj3F+2P+mkYzDYOhXXaomnlybjrZ2hEHfcczQhUfJd89O8PNIuEWo24wjYRgMdKlw5CWSeocFCqV7ZJ/CV/7vNRcaO4awKlFNobLikkwDznxpcX+4UEej+ED+pgfmPQLsKedcfEscStkSAZXaD5pBRTiFU9xGLfDt6seUrEnMBeXkpMIY9j1SZDDK18/G7lSHjDQMZYZP6sfLdBdwY=";
9
9
  const Demo = () => {
10
10
  useConfig(key);
@@ -12,14 +12,15 @@ const Demo = () => {
12
12
  jiami();
13
13
  }, []);
14
14
  const jiami = () => {
15
- CryptoJS.AES.encrypt(JSON.stringify({
15
+ const aes = new main.AES();
16
+ aes.encrypt(JSON.stringify({
16
17
  AppID: "GZY_SZLD_GZYDP",
17
18
  Password: "GZY_SZLD_GZYDP2557013",
18
19
  copyright: " © 云雁科技有限公司 2023 版权所有",
19
20
  icp: 'ICP备案/许可证号:<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">湘B2-20090059</a> 公网安备号 44030502008569 隐私政策',
20
21
  tel: "400-607-0705",
21
22
  Salt: "HnSzldjt#2557013#"
22
- }), "SzlDJd#4202");
23
+ }));
23
24
  };
24
25
  return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "100vh" }, children: "测试页面" });
25
26
  };
package/lib/main.d.ts CHANGED
@@ -5,7 +5,7 @@ import UploadFile from "./components/Upload";
5
5
  import EditTable from "./components/EditTable";
6
6
  import AuthButton from "./components/AuthButton";
7
7
  import CoralButton from "./components/CoralButton";
8
- import showWorkFlow from "./components/WorkFlowNode";
8
+ import showWorkFlow, { WorkFlowNode } from "./components/WorkFlowNode";
9
9
  import * as download from "./utils/download";
10
10
  import * as fileType from "./utils/filetype";
11
11
  import * as FormRules from './utils/formRules';
@@ -16,5 +16,6 @@ import useChangePwd from "./hooks/useChangePwd";
16
16
  import useConfig from "./hooks/useConfig";
17
17
  import useRemember from "./hooks/useRemember";
18
18
  import useRowSelection from "./hooks/useRowSelection";
19
+ import AES from "./utils/aes";
19
20
  import HmacSHA512 from './utils/hmacSHA512';
20
- export { AuthButton, BackHeader, CoralButton, CreateForm, EditTable, FormRules, HmacSHA512, SearchTable, UploadFile, download, fileType, showWorkFlow, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, utils, verfyCode };
21
+ export { AES, AuthButton, BackHeader, CoralButton, CreateForm, EditTable, FormRules, HmacSHA512, SearchTable, UploadFile, WorkFlowNode, download, fileType, showWorkFlow, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, utils, verfyCode };
package/lib/main.js CHANGED
@@ -18,6 +18,7 @@ const useChangePwd = require("./hooks/useChangePwd");
18
18
  const useConfig = require("./hooks/useConfig");
19
19
  const useRemember = require("./hooks/useRemember");
20
20
  const useRowSelection = require("./hooks/useRowSelection");
21
+ const aes = require("./utils/aes");
21
22
  const hmacSHA512 = require("./utils/hmacSHA512");
22
23
  function _interopNamespaceDefault(e) {
23
24
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -47,6 +48,10 @@ exports.UploadFile = Upload;
47
48
  exports.EditTable = EditTable;
48
49
  exports.AuthButton = AuthButton;
49
50
  exports.CoralButton = CoralButton;
51
+ Object.defineProperty(exports, "WorkFlowNode", {
52
+ enumerable: true,
53
+ get: () => WorkFlowNode.WorkFlowNode
54
+ });
50
55
  exports.showWorkFlow = WorkFlowNode;
51
56
  exports.download = download__namespace;
52
57
  exports.fileType = filetype__namespace;
@@ -58,4 +63,5 @@ exports.useChangePwd = useChangePwd;
58
63
  exports.useConfig = useConfig;
59
64
  exports.useRemember = useRemember;
60
65
  exports.useRowSelection = useRowSelection;
66
+ exports.AES = aes;
61
67
  exports.HmacSHA512 = hmacSHA512;
@@ -0,0 +1,7 @@
1
+ declare class AES {
2
+ salt: string;
3
+ constructor();
4
+ encrypt(value: string): string | undefined;
5
+ decrypt(value: string): string | undefined;
6
+ }
7
+ export default AES;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => {
5
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
+ return value;
7
+ };
8
+ const CryptoJS = require("crypto-js");
9
+ class AES {
10
+ constructor() {
11
+ __publicField(this, "salt", "SzlDJd#4202");
12
+ }
13
+ encrypt(value) {
14
+ if (!value) {
15
+ return;
16
+ }
17
+ const msg = typeof value === "string" ? value : JSON.stringify(value);
18
+ return CryptoJS.AES.encrypt(msg, this.salt).toString();
19
+ }
20
+ decrypt(value) {
21
+ if (!value) {
22
+ return;
23
+ }
24
+ return CryptoJS.AES.decrypt(value, this.salt).toString(CryptoJS.enc.Utf8);
25
+ }
26
+ }
27
+ module.exports = AES;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "szld-libs",
3
3
  "private": false,
4
- "version": "0.2.23",
4
+ "version": "0.2.25",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",