@tachybase/plugin-auth-wecom 1.3.15 → 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.
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +5 -5
- package/dist/index.js +4 -4
- package/package.json +8 -8
package/dist/client/index.js
CHANGED
|
@@ -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-wecom"]={},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,c,r,s,m,i,u){"use strict";var x=(e,t,c)=>new Promise((r,s)=>{var m=o=>{try{u(c.next(o))}catch(d){s(d)}},i=o=>{try{u(c.throw(o))}catch(d){s(d)}},u=o=>o.done?r(o.value):Promise.resolve(o.value).then(m,i);u((c=c.apply(e,t)).next())});const o="Work WeChat",d="work";function C(){return t.useTranslation([d,"core"],{nsMode:"fallback"})}const k=()=>{const{t:n}=C(),a=t.useApp(),f=s.useMemo(()=>a.getApiUrl("workWeChat:redirect"),[a]),p=y=>{navigator.clipboard.writeText(y),i.message.success(n("Copied"))};return r.jsxs("div",{children:[r.jsx(t.SchemaComponent,{scope:{t:n},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}}},workWeChat:{type:"object",properties:{agentId:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Agent ID")}}'},corpId:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Corp ID")}}'},corpSecret:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Corp Secret")}}'}}}}}}),r.jsxs("div",{children:[r.jsxs(i.Typography.Title,{level:5,style:{fontSize:"14px"},children:[n("Redirect URL"),r.jsx("span",{style:{marginLeft:"2px"},children:":"})]}),r.jsx(i.Input,{value:f,disabled:!0,addonBefore:r.jsx(m.CopyOutlined,{onClick:()=>p(f)})})]})]})},w=({authenticator:n})=>{const[a,f]=s.useState(),{t:p}=C(),y=t.useAPIClient(),q=u.useLocation(),g=new URLSearchParams(q.search),T=g.get("redirect");s.useEffect(()=>{a&&(window.location.href=a)},[a]),s.useEffect(()=>{const l=g.get("authenticator"),h=g.get("error");if(l===n.name&&h){i.message.error(p(h));return}});const W=()=>x(
|
|
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-wecom"]={},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,c,r,s,m,i,u){"use strict";var x=(e,t,c)=>new Promise((r,s)=>{var m=o=>{try{u(c.next(o))}catch(d){s(d)}},i=o=>{try{u(c.throw(o))}catch(d){s(d)}},u=o=>o.done?r(o.value):Promise.resolve(o.value).then(m,i);u((c=c.apply(e,t)).next())});const o="Work WeChat",d="work";function C(){return t.useTranslation([d,"core"],{nsMode:"fallback"})}const k=()=>{const{t:n}=C(),a=t.useApp(),f=s.useMemo(()=>a.getApiUrl("workWeChat:redirect"),[a]),p=y=>{navigator.clipboard.writeText(y),i.message.success(n("Copied"))};return r.jsxs("div",{children:[r.jsx(t.SchemaComponent,{scope:{t:n},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}}},workWeChat:{type:"object",properties:{agentId:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Agent ID")}}'},corpId:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Corp ID")}}'},corpSecret:{"x-decorator":"FormItem","x-component":"Input",type:"string",required:!0,title:'{{t("Corp Secret")}}'}}}}}}),r.jsxs("div",{children:[r.jsxs(i.Typography.Title,{level:5,style:{fontSize:"14px"},children:[n("Redirect URL"),r.jsx("span",{style:{marginLeft:"2px"},children:":"})]}),r.jsx(i.Input,{value:f,disabled:!0,addonBefore:r.jsx(m.CopyOutlined,{onClick:()=>p(f)})})]})]})},w=({authenticator:n})=>{const[a,f]=s.useState(),{t:p}=C(),y=t.useAPIClient(),q=u.useLocation(),g=new URLSearchParams(q.search),T=g.get("redirect");s.useEffect(()=>{a&&(window.location.href=a)},[a]),s.useEffect(()=>{const l=g.get("authenticator"),h=g.get("error");if(l===n.name&&h){i.message.error(p(h));return}});const W=()=>x(null,null,function*(){var S,b;const l=yield y.request({method:"post",url:"workWeChat:getAuthUrl",headers:{"X-Authenticator":n.name},data:{redirect:T}}),h=(b=(S=l==null?void 0:l.data)==null?void 0:S.data)==null?void 0:b.url;h&&f(h)});return r.jsx(i.Button,{block:!0,icon:r.jsx(m.LoginOutlined,{}),shape:"round",onClick:W,children:n.title?p(n.title):p("Sign in via work WeChat")})};class I extends t.Plugin{load(){return x(this,null,function*(){this.app.pm.get(c).registerType(o,{components:{SignInButton:w,AdminSettingsForm:k}})})}}e.PluginWorkWeChatClient=I,e.default=I,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "1.3.
|
|
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.
|
|
8
|
-
"@tachybase/server": "1.3.
|
|
9
|
-
"@tachybase/auth": "1.3.
|
|
7
|
+
"@tachybase/module-auth": "1.3.17",
|
|
8
|
+
"@tachybase/server": "1.3.17",
|
|
9
|
+
"@tachybase/auth": "1.3.17",
|
|
10
10
|
"axios": "1.7.7",
|
|
11
|
-
"@tachybase/actions": "1.3.
|
|
11
|
+
"@tachybase/actions": "1.3.17"
|
|
12
12
|
};
|
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
|
|
30
|
-
__export(
|
|
29
|
+
var index_exports = {};
|
|
30
|
+
__export(index_exports, {
|
|
31
31
|
default: () => import_server.default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
__reExport(
|
|
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 = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-auth-wecom",
|
|
3
3
|
"displayName": "Auth: WeCom",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.17",
|
|
5
5
|
"description": "work WeChat authentication.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Authentication"
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"react-router-dom": "6.28.1"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@tachybase/actions": "1.3.
|
|
20
|
-
"@tachybase/auth": "1.3.
|
|
21
|
-
"@tachybase/database": "1.3.
|
|
22
|
-
"@tachybase/
|
|
23
|
-
"@tachybase/module-auth": "1.3.
|
|
24
|
-
"@tachybase/
|
|
25
|
-
"@tachybase/
|
|
19
|
+
"@tachybase/actions": "1.3.17",
|
|
20
|
+
"@tachybase/auth": "1.3.17",
|
|
21
|
+
"@tachybase/database": "1.3.17",
|
|
22
|
+
"@tachybase/server": "1.3.17",
|
|
23
|
+
"@tachybase/module-auth": "1.3.17",
|
|
24
|
+
"@tachybase/test": "1.3.17",
|
|
25
|
+
"@tachybase/client": "1.3.17"
|
|
26
26
|
},
|
|
27
27
|
"description.zh-CN": "提供企业微信的认证支持",
|
|
28
28
|
"displayName.zh-CN": "认证:企业微信",
|