@tachybase/plugin-auth-dingtalk 1.3.16 → 1.3.17

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.
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@tachybase/client"),require("@tachybase/module-auth/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("antd"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","react","@ant-design/icons","antd","react-router-dom"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@tachybase/plugin-auth-dingtalk"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.react,e["@ant-design/icons"],e.antd,e["react-router-dom"]))})(this,function(e,t,a,n,i,g,s,u){"use strict";var x=(e,t,a)=>new Promise((n,i)=>{var g=r=>{try{u(a.next(r))}catch(d){i(d)}},s=r=>{try{u(a.throw(r))}catch(d){i(d)}},u=r=>r.done?n(r.value):Promise.resolve(r.value).then(g,s);u((a=a.apply(e,t)).next())});const r="dingtalk",d="dingtalk";function S(){return t.useTranslation([d,"core"],{nsMode:"fallback"})}const q=()=>{const{t:o}=S(),c=t.useApp(),m=i.useMemo(()=>c.getApiUrl("dingtalk:redirect"),[c]),l=f=>{navigator.clipboard.writeText(f),s.message.success(o("Copied"))};return n.jsxs("div",{children:[n.jsx(t.SchemaComponent,{scope:{t:o},schema:{type:"object",properties:{public:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox",default:!0}}},dingtalk:{type:"object",properties:{clientId:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Client ID")}}'},clientSecret:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Client Secret")}}'}}}}}}),n.jsxs("div",{children:[n.jsxs(s.Typography.Title,{level:5,style:{fontSize:"14px"},children:[o("Redirect URL"),n.jsx("span",{style:{marginLeft:"2px"},children:":"})]}),n.jsx(s.Input,{value:m,disabled:!0,addonBefore:n.jsx(g.CopyOutlined,{onClick:()=>l(m)})})]})]})},C=({authenticator:o})=>{const[c,m]=i.useState(),{t:l}=S(),f=t.useAPIClient(),I=u.useLocation(),y=new URLSearchParams(I.search),j=y.get("redirect");i.useEffect(()=>{c&&(window.location.href=c)},[c]),i.useEffect(()=>{const p=y.get("authenticator"),h=y.get("error");if(p===o.name&&h){s.message.error(l(h));return}});const v=()=>x(this,null,function*(){var k,T;const p=yield f.request({method:"post",url:"dingtalk:getAuthUrl",headers:{"X-Authenticator":o.name},data:{redirect:j}}),h=(T=(k=p==null?void 0:p.data)==null?void 0:k.data)==null?void 0:T.url;h&&m(h)});return n.jsx(s.Button,{block:!0,icon:n.jsx(g.LoginOutlined,{}),shape:"round",onClick:v,children:o.title?l(o.title):l("Sign in via DingTalk")})};class b extends t.Plugin{load(){return x(this,null,function*(){this.app.pm.get(a).registerType(r,{components:{SignInButton:C,AdminSettingsForm:q}})})}}e.PluginDingding=b,e.default=b,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("@tachybase/client"),require("@tachybase/module-auth/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("antd"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/module-auth/client","react/jsx-runtime","react","@ant-design/icons","antd","react-router-dom"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["@tachybase/plugin-auth-dingtalk"]={},e["@tachybase/client"],e["@tachybase/module-auth"],e.jsxRuntime,e.react,e["@ant-design/icons"],e.antd,e["react-router-dom"]))})(this,function(e,t,a,n,i,g,s,u){"use strict";var x=(e,t,a)=>new Promise((n,i)=>{var g=r=>{try{u(a.next(r))}catch(d){i(d)}},s=r=>{try{u(a.throw(r))}catch(d){i(d)}},u=r=>r.done?n(r.value):Promise.resolve(r.value).then(g,s);u((a=a.apply(e,t)).next())});const r="dingtalk",d="dingtalk";function S(){return t.useTranslation([d,"core"],{nsMode:"fallback"})}const q=()=>{const{t:o}=S(),c=t.useApp(),m=i.useMemo(()=>c.getApiUrl("dingtalk:redirect"),[c]),l=f=>{navigator.clipboard.writeText(f),s.message.success(o("Copied"))};return n.jsxs("div",{children:[n.jsx(t.SchemaComponent,{scope:{t:o},schema:{type:"object",properties:{public:{type:"object",properties:{autoSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Sign up automatically when the user does not exist")}}',"x-component":"Checkbox",default:!0}}},dingtalk:{type:"object",properties:{clientId:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Client ID")}}'},clientSecret:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Client Secret")}}'}}}}}}),n.jsxs("div",{children:[n.jsxs(s.Typography.Title,{level:5,style:{fontSize:"14px"},children:[o("Redirect URL"),n.jsx("span",{style:{marginLeft:"2px"},children:":"})]}),n.jsx(s.Input,{value:m,disabled:!0,addonBefore:n.jsx(g.CopyOutlined,{onClick:()=>l(m)})})]})]})},C=({authenticator:o})=>{const[c,m]=i.useState(),{t:l}=S(),f=t.useAPIClient(),I=u.useLocation(),y=new URLSearchParams(I.search),j=y.get("redirect");i.useEffect(()=>{c&&(window.location.href=c)},[c]),i.useEffect(()=>{const p=y.get("authenticator"),h=y.get("error");if(p===o.name&&h){s.message.error(l(h));return}});const v=()=>x(null,null,function*(){var k,T;const p=yield f.request({method:"post",url:"dingtalk:getAuthUrl",headers:{"X-Authenticator":o.name},data:{redirect:j}}),h=(T=(k=p==null?void 0:p.data)==null?void 0:k.data)==null?void 0:T.url;h&&m(h)});return n.jsx(s.Button,{block:!0,icon:n.jsx(g.LoginOutlined,{}),shape:"round",onClick:v,children:o.title?l(o.title):l("Sign in via DingTalk")})};class b extends t.Plugin{load(){return x(this,null,function*(){this.app.pm.get(a).registerType(r,{components:{SignInButton:C,AdminSettingsForm:q}})})}}e.PluginDingding=b,e.default=b,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,11 +1,11 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.3.16",
3
+ "@tachybase/client": "1.3.17",
4
4
  "@ant-design/icons": "5.5.2",
5
5
  "antd": "5.22.5",
6
6
  "react-router-dom": "6.28.1",
7
- "@tachybase/module-auth": "1.3.16",
8
- "@tachybase/auth": "1.3.16",
9
- "@tachybase/server": "1.3.16",
10
- "@tachybase/actions": "1.3.16"
7
+ "@tachybase/module-auth": "1.3.17",
8
+ "@tachybase/auth": "1.3.17",
9
+ "@tachybase/server": "1.3.17",
10
+ "@tachybase/actions": "1.3.17"
11
11
  };
package/dist/index.js CHANGED
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var src_exports = {};
30
- __export(src_exports, {
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
31
  default: () => import_server.default
32
32
  });
33
- module.exports = __toCommonJS(src_exports);
34
- __reExport(src_exports, require("./server"), module.exports);
33
+ module.exports = __toCommonJS(index_exports);
34
+ __reExport(index_exports, require("./server"), module.exports);
35
35
  var import_server = __toESM(require("./server"));
36
36
  // Annotate the CommonJS export names for ESM import in node:
37
37
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"name":"@alicloud/dingtalk","version":"2.1.75","description":"","main":"dist/index.js","scripts":{"test":"mocha --reporter spec --timeout 3000 test/*.test.js","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Alibaba Cloud SDK","license":"Apache-2.0","devDependencies":{"@types/node":"^16.0.0","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^10.0.0","typescript":"^5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/openapi-client":"^0.4.12","@alicloud/tea-util":"^1.4.9","@alicloud/openapi-util":"^0.3.2","@alicloud/endpoint-util":"^0.0.1","@alicloud/gateway-spi":"^0.0.8","@alicloud/gateway-dingtalk":"^1.0.2"},"files":["dist","src","*.js"],"_lastModified":"2025-07-02T03:52:42.990Z"}
1
+ {"name":"@alicloud/dingtalk","version":"2.1.75","description":"","main":"dist/index.js","scripts":{"test":"mocha --reporter spec --timeout 3000 test/*.test.js","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Alibaba Cloud SDK","license":"Apache-2.0","devDependencies":{"@types/node":"^16.0.0","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^10.0.0","typescript":"^5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/openapi-client":"^0.4.12","@alicloud/tea-util":"^1.4.9","@alicloud/openapi-util":"^0.3.2","@alicloud/endpoint-util":"^0.0.1","@alicloud/gateway-spi":"^0.0.8","@alicloud/gateway-dingtalk":"^1.0.2"},"files":["dist","src","*.js"],"_lastModified":"2025-07-04T04:00:06.450Z"}
@@ -1 +1 @@
1
- {"name":"@alicloud/openapi-client","version":"0.4.12","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"","license":"ISC","devDependencies":{"@types/mocha":"^5.2.7","mocha":"^6.2.0","@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.9","@alicloud/credentials":"^2.3.1","@alicloud/openapi-util":"^0.3.2","@alicloud/gateway-spi":"^0.0.8","@alicloud/tea-xml":"0.0.3"},"files":["dist","src"],"repository":"git@github.com:aliyun/darabonba-openapi.git","_lastModified":"2025-07-02T03:52:44.054Z"}
1
+ {"name":"@alicloud/openapi-client","version":"0.4.12","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts --timeout=10000","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"","license":"ISC","devDependencies":{"@types/mocha":"^5.2.7","mocha":"^6.2.0","@types/node":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5","@alicloud/gateway-pop":"0.0.6"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.9","@alicloud/credentials":"^2.3.1","@alicloud/openapi-util":"^0.3.2","@alicloud/gateway-spi":"^0.0.8","@alicloud/tea-xml":"0.0.3"},"files":["dist","src"],"repository":"git@github.com:aliyun/darabonba-openapi.git","_lastModified":"2025-07-04T04:00:07.581Z"}
@@ -1 +1 @@
1
- {"name":"@alicloud/tea-util","version":"1.4.9","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Jackson Tian","license":"Apache-2.0","devDependencies":{"@types/mocha":"^7.0.1","@types/node":"^12.12.26","mocha":"^7.0.1","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.5.1","kitx":"^2.0.0"},"files":["dist","src"],"repository":"git@github.com:aliyun/tea-util.git","_lastModified":"2025-07-02T03:52:44.264Z"}
1
+ {"name":"@alicloud/tea-util","version":"1.4.9","description":"","main":"dist/client.js","scripts":{"test":"mocha -r ts-node/register -r source-map-support/register test/**/*.spec.ts","test-cov":"nyc -e .ts -r=html -r=text -r=lcov npm run test","build":"tsc","prepublishOnly":"tsc"},"author":"Jackson Tian","license":"Apache-2.0","devDependencies":{"@types/mocha":"^7.0.1","@types/node":"^12.12.26","mocha":"^7.0.1","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.5.1","kitx":"^2.0.0"},"files":["dist","src"],"repository":"git@github.com:aliyun/tea-util.git","_lastModified":"2025-07-04T04:00:07.802Z"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-auth-dingtalk",
3
3
  "displayName": "Auth: Ding Talk",
4
- "version": "1.3.16",
4
+ "version": "1.3.17",
5
5
  "description": "dingding authentication.",
6
6
  "keywords": [
7
7
  "Authentication"
@@ -17,12 +17,12 @@
17
17
  "react-router-dom": "6.28.1"
18
18
  },
19
19
  "peerDependencies": {
20
- "@tachybase/actions": "1.3.16",
21
- "@tachybase/auth": "1.3.16",
22
- "@tachybase/client": "1.3.16",
23
- "@tachybase/module-auth": "1.3.16",
24
- "@tachybase/server": "1.3.16",
25
- "@tachybase/test": "1.3.16"
20
+ "@tachybase/auth": "1.3.17",
21
+ "@tachybase/module-auth": "1.3.17",
22
+ "@tachybase/client": "1.3.17",
23
+ "@tachybase/actions": "1.3.17",
24
+ "@tachybase/server": "1.3.17",
25
+ "@tachybase/test": "1.3.17"
26
26
  },
27
27
  "description.zh-CN": "认证:钉钉",
28
28
  "displayName.zh-CN": "认证:钉钉",