@nocobase/plugin-verification 1.7.0-alpha.1 → 1.7.0-beta.2
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/7551e1f2e04bca2f.js +10 -0
- package/dist/client/{verificators/VerificatorSelect.d.ts → ProviderOptions.d.ts} +2 -1
- package/dist/client/{otp-verification/sms/providers/TencentSettings.d.ts → VerificationProviders.d.ts} +1 -1
- package/dist/client/index.d.ts +0 -7
- package/dist/client/index.js +1 -1
- package/dist/client/locale/index.d.ts +1 -1
- package/dist/client/{otp-verification/sms/BindForm.d.ts → providerTypes/index.d.ts} +4 -3
- package/dist/client/providerTypes/sms-aliyun.d.ts +66 -0
- package/dist/client/providerTypes/sms-tencent.d.ts +66 -0
- package/dist/externalVersion.js +11 -11
- package/dist/locale/de-DE.json +22 -0
- package/dist/locale/en-US.json +1 -17
- package/dist/locale/nl-NL.json +22 -0
- package/dist/locale/zh-CN.json +2 -19
- package/dist/node_modules/@alicloud/dysmsapi20170525/package.json +1 -1
- package/dist/node_modules/@alicloud/openapi-client/package.json +1 -1
- package/dist/node_modules/@alicloud/tea-util/package.json +1 -1
- package/dist/node_modules/tencentcloud-sdk-nodejs/package.json +1 -1
- package/dist/server/Plugin.d.ts +16 -5
- package/dist/server/Plugin.js +72 -57
- package/dist/{client/otp-verification/sms/providers/AliyunSettings.d.ts → server/actions/index.d.ts} +3 -2
- package/dist/server/{collections/verificators.js → actions/index.js} +19 -10
- package/dist/server/{collections/verificators.d.ts → actions/verifications.d.ts} +2 -2
- package/dist/server/actions/verifications.js +146 -0
- package/dist/server/constants.d.ts +2 -0
- package/dist/server/constants.js +8 -2
- package/dist/server/index.d.ts +2 -5
- package/dist/server/index.js +5 -12
- package/dist/server/{otp-verification/sms/providers/index.d.ts → providers/Provider.d.ts} +4 -2
- package/dist/server/{otp-verification/sms/providers/index.js → providers/Provider.js} +10 -8
- package/dist/server/{migrations/20250111192640-providers2verificators.d.ts → providers/index.d.ts} +6 -5
- package/dist/server/providers/index.js +52 -0
- package/dist/server/{otp-verification/sms/providers → providers}/sms-aliyun.d.ts +3 -3
- package/dist/server/{otp-verification/sms/providers → providers}/sms-aliyun.js +4 -4
- package/dist/server/{otp-verification/sms/providers → providers}/sms-tencent.d.ts +3 -3
- package/dist/server/{otp-verification/sms/providers → providers}/sms-tencent.js +4 -4
- package/package.json +6 -8
- package/dist/client/VerificationMenu.d.ts +0 -13
- package/dist/client/cfedbdcfbe65d5f6.js +0 -10
- package/dist/client/d0b398212e5aa575.js +0 -10
- package/dist/client/otp-verification/VerificationCode.d.ts +0 -16
- package/dist/client/otp-verification/sms/AdminSettingsForm.d.ts +0 -12
- package/dist/client/otp-verification/sms/VerificationForm.d.ts +0 -11
- package/dist/client/otp-verification/sms/index.d.ts +0 -26
- package/dist/client/otp-verification/sms/provider-manager.d.ts +0 -19
- package/dist/client/schemas/verificators.d.ts +0 -66
- package/dist/client/verification-manager/index.d.ts +0 -32
- package/dist/client/verificators/Verificators.d.ts +0 -12
- package/dist/client/verificators/verification-types.d.ts +0 -24
- package/dist/collections/verificators.d.ts +0 -50
- package/dist/collections/verificators.js +0 -70
- package/dist/constants.d.ts +0 -11
- package/dist/constants.js +0 -42
- package/dist/server/actions/verificators.d.ts +0 -18
- package/dist/server/actions/verificators.js +0 -175
- package/dist/server/collections/otp-records.d.ts +0 -10
- package/dist/server/collections/otp-records.js +0 -75
- package/dist/server/collections/users-verificators.d.ts +0 -14
- package/dist/server/collections/users-verificators.js +0 -58
- package/dist/server/migrations/20250111192640-providers2verificators.js +0 -83
- package/dist/server/otp-verification/index.d.ts +0 -25
- package/dist/server/otp-verification/index.js +0 -94
- package/dist/server/otp-verification/sms/index.d.ts +0 -37
- package/dist/server/otp-verification/sms/index.js +0 -87
- package/dist/server/otp-verification/sms/resource/sms-otp-providers.d.ts +0 -16
- package/dist/server/otp-verification/sms/resource/sms-otp-providers.js +0 -41
- package/dist/server/otp-verification/sms/resource/sms-otp.d.ts +0 -18
- package/dist/server/otp-verification/sms/resource/sms-otp.js +0 -141
- package/dist/server/verification-manager.d.ts +0 -68
- package/dist/server/verification-manager.js +0 -223
- package/dist/server/verification.d.ts +0 -70
- package/dist/server/verification.js +0 -70
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_verification=self.webpackChunk_nocobase_plugin_verification||[]).push([["478"],{178:function(e,t,o){o.r(t),o.d(t,{VerificationProviders:function(){return g}});var r=o("772"),n=o("156"),c=o.n(n),i=o("721"),p=o("875"),a=o("573"),l={name:"verifications_providers",fields:[{type:"string",name:"id",interface:"input",uiSchema:{title:'{{t("ID")}}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"title",interface:"input",uiSchema:{title:'{{t("Title")}}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"type",interface:"select",uiSchema:{title:'{{t("Provider type", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-component":"Select",required:!0,enum:[{label:'{{t("Aliyun SMS", { ns: "'.concat(a.A7,'" })}}'),value:"sms-aliyun"},{label:'{{t("Tencent SMS", { ns: "'.concat(a.A7,'" })}}'),value:"sms-tencent"}]}},{type:"radio",name:"default",interface:"checkbox",uiSchema:{title:'{{t("Default")}}',type:"boolean","x-component":"Checkbox"}}]},s={type:"void",name:"providers","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:l,resourceName:"verifications_providers",request:{resource:"verifications_providers",action:"list",params:{pageSize:50,sort:["-default","id"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:l},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{delete:{type:"void",title:'{{t("Delete")}}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:"{{ cm.useBulkDestroyAction }}",confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:function(e){var t,o,n=(0,r.useActionContext)();return(0,r.useRequest)(function(){return Promise.resolve({data:{name:"s_".concat((0,p.uid)())}})},(t=function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},r=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),r.forEach(function(t){var r,n,c;r=e,n=t,c=o[t],n in r?Object.defineProperty(r,n,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[n]=c})}return e}({},e),o=(o={refreshDeps:[n.visible]},o),Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):(function(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o.push.apply(o,r)}return o})(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}),t))}},title:'{{t("Add new")}}',properties:{id:{"x-component":"CollectionField","x-decorator":"FormItem",description:'{{t("Identifier for program usage. Support letters, numbers and underscores, must start with an letter.")}}'},title:{"x-component":"CollectionField","x-decorator":"FormItem"},type:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"ProviderOptions"},default:{"x-component":"CollectionField","x-decorator":"FormItem"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{id:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{id:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},title:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},type:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{type:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},default:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{default:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{type:"primary"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{id:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":!0},title:{"x-component":"CollectionField","x-decorator":"FormItem"},type:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":!0},options:{type:"object","x-component":"ProviderOptions"},default:{"x-component":"CollectionField","x-decorator":"FormItem"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"}}}}}}}}}},m=o("632"),d=o("505"),u=o("749"),y=o("584"),x={type:"object",properties:{accessKeyId:{title:'{{t("Access Key ID", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},accessKeySecret:{title:'{{t("Access Key Secret", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{password:!0}},endpoint:{title:'{{t("Endpoint", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},sign:{title:'{{t("Sign", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},template:{title:'{{t("Template code", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"}}},b={type:"object",properties:{secretId:{title:'{{t("Secret Id", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},secretKey:{title:'{{t("Secret Key", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{password:!0}},region:{title:'{{t("Region", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},endpoint:{title:'{{t("Endpoint", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",default:"sms.tencentcloudapi.com"},SignName:{title:'{{t("Sign name", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},SmsSdkAppId:{title:'{{t("Sms sdk app id", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},TemplateId:{title:'{{t("Template Id", { ns: "'.concat(a.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"}}},f=new y.Registry;f.register("sms-aliyun",x),f.register("sms-tencent",b);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=Array(t);o<t;o++)r[o]=e[o];return r}var v=(0,d.observer)(function(e){var t,o,r=(0,d.useForm)(),i=(0,d.useField)();var p=(t=(0,n.useState)(new d.Schema(f.get(r.values.type)||{})),o=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var o,r,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var c=[],i=!0,p=!1;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(c.push(o.value),!t||c.length!==t);i=!0);}catch(e){p=!0,r=e}finally{try{!i&&null!=n.return&&n.return()}finally{if(p)throw r}}return c}}(t,2)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if("Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o)return Array.from(o);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return A(e,t)}}(t,o)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=p[0],l=p[1];return(0,u.useUpdateEffect)(function(){r.clearFormGraph("options.*"),l(new d.Schema(f.get(r.values.type)||{}))},[r.values.type]),c().createElement(m.FormLayout,{layout:"vertical"},c().createElement(d.RecursionField,{key:r.values.type||"sms-aliyun",basePath:i.address,onlyRenderProperties:!0,schema:a}))},{displayName:"Verification"});function g(){return c().createElement(i.Card,{bordered:!1},c().createElement(r.SchemaComponent,{schema:s,components:{ProviderOptions:v}}))}}}]);
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
-
|
|
10
|
+
declare const Verification: React.MemoExoticComponent<import("@formily/react").ReactFC<unknown>>;
|
|
11
|
+
export default Verification;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -7,14 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { Plugin } from '@nocobase/client';
|
|
10
|
-
import { SMS_OTP_VERIFICATION_TYPE } from '../constants';
|
|
11
|
-
import { VerificationManager } from './verification-manager';
|
|
12
|
-
import { SMSOTPProviderManager } from './otp-verification/sms/provider-manager';
|
|
13
10
|
export declare class PluginVerificationClient extends Plugin {
|
|
14
|
-
verificationManager: VerificationManager;
|
|
15
|
-
smsOTPProviderManager: SMSOTPProviderManager;
|
|
16
11
|
load(): Promise<void>;
|
|
17
12
|
}
|
|
18
|
-
export { SMS_OTP_VERIFICATION_TYPE };
|
|
19
|
-
export { UserVerificatorsContext } from './VerificationMenu';
|
|
20
13
|
export default PluginVerificationClient;
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@formily/antd-v5"),require("@formily/shared"),require("@nocobase/utils/client"),require("@formily/core"),require("@nocobase/client"),require("antd"),require("@formily/react"),require("react-router-dom"),require("@ant-design/icons"),require("react")):"function"==typeof define&&define.amd?define("@nocobase/plugin-verification",["react-i18next","@formily/antd-v5","@formily/shared","@nocobase/utils/client","@formily/core","@nocobase/client","antd","@formily/react","react-router-dom","@ant-design/icons","react"],t):"object"==typeof exports?exports["@nocobase/plugin-verification"]=t(require("react-i18next"),require("@formily/antd-v5"),require("@formily/shared"),require("@nocobase/utils/client"),require("@formily/core"),require("@nocobase/client"),require("antd"),require("@formily/react"),require("react-router-dom"),require("@ant-design/icons"),require("react")):e["@nocobase/plugin-verification"]=t(e["react-i18next"],e["@formily/antd-v5"],e["@formily/shared"],e["@nocobase/utils/client"],e["@formily/core"],e["@nocobase/client"],e.antd,e["@formily/react"],e["react-router-dom"],e["@ant-design/icons"],e.react)}(self,function(e,t,n,r,o,i,c,a,u,s,l){return function(){var f,p,d,m,v,y,b={573:function(e,t,n){"use strict";n.d(t,{A7:function(){return o},SD:function(){return i}}),n(772);var r=n(238),o="verification";function i(){return(0,r.useTranslation)([o,"client"],{nsMode:"fallback"})}},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=s},632:function(e){"use strict";e.exports=t},563:function(e){"use strict";e.exports=o},505:function(e){"use strict";e.exports=a},875:function(e){"use strict";e.exports=n},772:function(e){"use strict";e.exports=i},584:function(e){"use strict";e.exports=r},721:function(e){"use strict";e.exports=c},156:function(e){"use strict";e.exports=l},238:function(t){"use strict";t.exports=e},128:function(e){"use strict";e.exports=u}},h={};function g(e){var t=h[e];if(void 0!==t)return t.exports;var n=h[e]={exports:{}};return b[e](n,n.exports,g),n.exports}g.m=b,g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var n in t)g.o(t,n)&&!g.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},g.f={},g.e=function(e){return Promise.all(Object.keys(g.f).reduce(function(t,n){return g.f[n](e,t),t},[]))},g.u=function(e){return""+({835:"cfedbdcfbe65d5f6",995:"d0b398212e5aa575"})[e]+".js"},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f={},p="@nocobase/plugin-verification:",g.l=function(e,t,n,r){if(f[e]){f[e].push(t);return}if(void 0!==n){for(var o,i,c=document.getElementsByTagName("script"),a=0;a<c.length;a++){var u=c[a];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==p+n){o=u;break}}}!o&&(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,g.nc&&o.setAttribute("nonce",g.nc),o.setAttribute("data-webpack",p+n),o.src=e),f[e]=[t];var s=function(t,n){o.onerror=o.onload=null,clearTimeout(l);var r=f[e];if(delete f[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},l=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),i&&document.head.appendChild(o)},g.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},g.p=(!(d=window.__nocobase_public_path__||"/").endsWith("/")&&(d+="/"),d+"static/plugins/@nocobase/plugin-verification/dist/client/"),m={909:0},g.f.j=function(e,t){var n=g.o(m,e)?m[e]:void 0;if(0!==n){if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=m[e]=[t,r]});t.push(n[2]=r);var o=g.p+g.u(e),i=Error();g.l(o,function(t){if(g.o(m,e)&&(0!==(n=m[e])&&(m[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}}},v=function(e,t){var n=t[0],r=t[1],o=t[2],i,c,a=0;if(n.some(function(e){return 0!==m[e]})){for(i in r)g.o(r,i)&&(g.m[i]=r[i]);o&&o(g)}for(e&&e(t);a<n.length;a++)c=n[a],g.o(m,c)&&m[c]&&m[c][0](),m[c]=0},(y=self.webpackChunk_nocobase_plugin_verification=self.webpackChunk_nocobase_plugin_verification||[]).forEach(v.bind(null,0)),y.push=v.bind(null,y.push.bind(y));var x={};return!function(){"use strict";g.r(x),g.d(x,{PluginVerificationClient:function(){return er},default:function(){return eo},UserVerificatorsContext:function(){return D},SMS_OTP_VERIFICATION_TYPE:function(){return n}});var e=g("772"),t=g("573"),n="sms-otp",r=g("584");function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){var e,t,n;function i(){var e,t,n;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),e=this,t="verifications",n=new r.Registry,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}return e=i,t=[{key:"registerVerificationType",value:function(e,t){this.verifications.register(e,t)}},{key:"getVerification",value:function(e){return this.verifications.get(e)}}],o(e.prototype,t),i}(),c=g("156"),a=g.n(c),u={type:"object",properties:{accessKeyId:{title:'{{t("Access Key ID", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0},accessKeySecret:{title:'{{t("Access Key Secret", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{password:!0},required:!0},endpoint:{title:'{{t("Endpoint", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0},sign:{title:'{{t("Sign", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0},template:{title:'{{t("Template code", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0}}},s={type:"object",properties:{secretId:{title:'{{t("Secret Id", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0},secretKey:{title:'{{t("Secret Key", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{password:!0},required:!0},region:{title:'{{t("Region", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0},endpoint:{title:'{{t("Endpoint", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",default:"sms.tencentcloudapi.com"},SignName:{title:'{{t("Sign name", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope"},SmsSdkAppId:{title:'{{t("Sms sdk app id", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0},TemplateId:{title:'{{t("Template Id", { ns: "'.concat(t.A7,'" })}}'),type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope",required:!0}}},l=g("505"),f=g("721"),p=g("238");function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function v(){var e,t,n=(e=["\n display: flex;\n gap: 0.5em;\n "],!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return v=function(){return n},n}var y=(0,e.withDynamicSchemaProps)(function(t){var n,r,o=t.actionType,i=t.verificator,u=t.value,s=t.onChange,y=t.isLogged,b=(0,p.useTranslation)().t,h=(0,e.useAPIClient)(),g=(0,l.useForm)();var x=(n=(0,c.useState)(0),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],c=!0,a=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){a=!0,r=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(a)throw r}}return i}}(n,2)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}}(n,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),S=x[0],P=x[1],A=(0,c.useRef)(null);function w(){var e;return e=function(){var e,t;return function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,function(n){switch(n.label){case 0:if(S>0)return[2];e=y?"create":"publicCreate",n.label=1;case 1:return n.trys.push([1,3,,4]),[4,h.resource("smsOTP")[e]({values:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r,o,i;r=e,o=t,i=n[t],o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i})}return e}({action:o,verificator:i},g.values)})];case 2:return t=n.sent().data.data,f.message.success(b("Operation succeeded")),u&&s(""),P(t.expiresAt?Math.ceil((Date.parse(t.expiresAt)-Date.now())/1e3):60),A.current=setInterval(function(){P(function(e){return e-1})},1e3),[3,4];case 3:return console.error(n.sent()),[3,4];case 4:return[2]}})},(w=function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){m(i,r,o,c,a,"next",e)}function a(e){m(i,r,o,c,a,"throw",e)}c(void 0)})}).apply(this,arguments)}return(0,c.useEffect)(function(){S<=0&&A.current&&clearInterval(A.current)},[S]),a().createElement("fieldset",{className:(0,e.css)(v())},a().createElement(f.Input,{value:u,onChange:s}),a().createElement(f.Button,{onClick:function(){return w.apply(this,arguments)},disabled:S>0},S>0?b("Retry after {{count}} seconds",{count:S}):b("Send code")))},{displayName:"VerificationCode"}),b={type:"void",name:"sms-otp",properties:{uuid:{type:"string",required:!0,"x-component":"Input","x-decorator":"FormItem",title:'{{t("Phone")}}',"x-component-props":{style:{}},"x-read-pretty":"{{ phone ? true : false }}",default:"{{ phone }}"},code:{type:"string",required:!0,title:'{{t("Verification code")}}',"x-component":"VerificationCode","x-use-component-props":"useVerificationCodeProps","x-decorator":"FormItem"}}},h=function(t){var n,r=(0,e.usePlugin)("verification").smsOTPProviderManager.getProvider(t);return null==r?void 0:null===(n=r.components)||void 0===n?void 0:n.AdminSettingsForm},S=(0,l.observer)(function(){var e,t=h(null===(e=(0,l.useForm)().values.options)||void 0===e?void 0:e.provider);return t?a().createElement(t,null):null},{displayName:"SMSOTPVerificationSettings"}),P={type:"void",name:"sms-otp",properties:{uuid:{type:"string",required:!0,"x-component":"Input","x-decorator":"FormItem",title:'{{t("Phone")}}',"x-component-props":{style:{}}},code:{type:"string",required:!0,title:'{{t("Verification code")}}',"x-component":"VerificationCode","x-component-props":{targetFieldName:"phone",actionType:"{{ actionType }}",verificator:"{{ verificator }}"},"x-decorator":"FormItem"}}},A={components:{VerificationForm:function(t){var n=t.verificator,r=t.actionType,o=t.boundInfo,i=t.isLogged;return a().createElement(e.SchemaComponent,{schema:b,scope:{phone:null==o?void 0:o.publicInfo,useVerificationCodeProps:function(){return{actionType:r,verificator:n,isLogged:i}}},components:{VerificationCode:y}})},AdminSettingsForm:function(){return a().createElement(e.SchemaComponent,{components:{Settings:S},schema:{type:"void",properties:{provider:{title:(0,r.tval)("Provider",{ns:t.A7}),type:"string",required:!0,"x-decorator":"FormItem","x-component":"RemoteSelect","x-component-props":{manual:!1,fieldNames:{label:"title",value:"name"},service:{resource:"smsOTPProviders"}}},settings:{type:"object","x-component":"Settings"}}}})},BindForm:function(t){var n=t.verificator,r=t.actionType;return a().createElement(e.SchemaComponent,{scope:{verificator:n,actionType:r},schema:P,components:{VerificationCode:y}})}}},w={components:{AdminSettingsForm:function(){return a().createElement(e.SchemaComponent,{schema:u})}}},C={components:{AdminSettingsForm:function(){return a().createElement(e.SchemaComponent,{schema:s})}}};function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var E=function(){var e,t,n;function o(){var e,t,n;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e=this,t="providers",n=new r.Registry,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}return e=o,t=[{key:"registerProvider",value:function(e,t){this.providers.register(e,t)}},{key:"getProvider",value:function(e){return this.providers.get(e)}}],T(e.prototype,t),o}(),I=g("875"),O=g("563");function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){k(i,r,o,c,a,"next",e)}function a(e){k(i,r,o,c,a,"throw",e)}c(void 0)})}}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){F(e,t,n[t])})}return e}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],c=!0,a=!1;try{for(o=o.call(e);!(c=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);c=!0);}catch(e){a=!0,r=e}finally{try{!c&&null!=o.return&&o.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}var D=(0,c.createContext)(null),G=function(n){var r=(0,l.useForm)(),o=(0,e.useAPIClient)(),i=(0,t.SD)().t,a=(0,c.useContext)(D).refresh,u=(0,e.useActionContext)().setVisible;return{type:"primary",htmlType:"submit",onClick:V(function(){return M(this,function(e){switch(e.label){case 0:return[4,r.submit()];case 1:return e.sent(),[4,o.resource("verificators").bind({values:_({verificator:n},r.values)})];case 2:return e.sent(),f.message.success(i("Bound successfully")),u(!1),a(),[2]}})})}},B=function(){var n=(0,l.useForm)(),r=(0,e.useAPIClient)(),o=(0,t.SD)().t,i=(0,c.useContext)(D).refresh,a=(0,e.useActionContext)().setVisible;return{type:"primary",htmlType:"submit",onClick:V(function(){return M(this,function(e){switch(e.label){case 0:return[4,n.submit()];case 1:return e.sent(),[4,r.resource("verificators").unbind({values:_({},n.values)})];case 2:return e.sent(),f.message.success(o("Unbound successfully")),a(!1),i(),[2]}})})}},L=function(){var t=(0,e.useActionContext)().setVisible;return{onClick:function(){t(!1)}}},R=function(n){var r,o=n.verificator,i=(0,t.SD)().t,c=(0,e.usePlugin)("verification");if(!o)return null;var u=c.verificationManager.getVerification(o.verificationType),s=null==u?void 0:null===(r=u.components)||void 0===r?void 0:r.BindForm;return a().createElement(e.SchemaComponent,{components:{C:s},scope:{useBindActionProps:function(){return G(o.name)},useCancelActionProps:L},schema:{type:"void",properties:F({},(0,I.uid)(),{type:"object","x-component":"Action.Modal","x-component-props":{width:520},title:i(o.title),"x-decorator":"FormV2",properties:{form:{type:"void","x-component":"C","x-component-props":{verificator:o.name,actionType:"verificators:bind",isLogged:!0}},footer:{type:"void","x-component":"Action.Modal.Footer",properties:{close:{title:i("Cancel"),"x-component":"Action","x-component-props":{type:"default"},"x-use-component-props":"useCancelActionProps"},submit:{title:i("Bind"),"x-component":"Action","x-use-component-props":"useBindActionProps"}}}}})}})},U=function(n){var r=n.verificators,o=n.unbindVerificator,i=(0,t.SD)().t,u=(0,e.usePlugin)("verification"),s=r.map(function(t){var n,r=u.verificationManager.getVerification(t.verificationType),s=null==r?void 0:null===(n=r.components)||void 0===n?void 0:n.VerificationForm;if(!!s){var f=l.Schema.compile(t.verificationTypeTitle||t.verificationType,{t:i});return _({component:a().createElement(e.SchemaComponent,{components:{C:s},scope:{useCancelActionProps:L,useUnbindActionProps:B,useFormProps:function(){var e,n;return e=t.name,n=o,{form:(0,c.useMemo)(function(){return(0,O.createForm)({initialValues:{verificator:e,unbindVerificator:n}})},[e,n])}}},schema:{type:"void",properties:{form:{type:"object","x-component":"FormV2","x-use-component-props":"useFormProps",properties:{bind:{type:"void","x-component":"C","x-component-props":{actionType:"verificators:unbind",verificator:t.name,boundInfo:t.boundInfo,isLogged:!0}},footer:{type:"void","x-component":"Action.Modal.FootBar",properties:{close:{title:i("Cancel"),"x-component":"Action","x-component-props":{type:"default"},"x-use-component-props":"useCancelActionProps"},submit:{title:i("Unbind"),"x-component":"Action","x-use-component-props":"useUnbindActionProps"}}}}}}}}),tabTitle:t.title||f},t)}}).filter(function(e){return e});return a().createElement(a().Fragment,null,s.length?a().createElement(f.Tabs,{destroyInactiveTabPane:!0,items:s.map(function(e){return{label:e.tabTitle,key:e.name,children:e.component}})}):null)},W=function(n){var r=n.verificator,o=(0,t.SD)().t,i=(0,e.useAPIClient)(),c=(0,e.useRequest)(function(){return i.resource("verificators").listForVerify({scene:"unbind-verificator"}).then(function(e){var t;return null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.data})},{refreshDeps:[r]}),u=c.data,s=c.loading;return!r||s?null:a().createElement(e.SchemaComponent,{components:{UnbindForm:U},schema:{type:"void",properties:F({},(0,I.uid)(),{type:"object","x-component":"Action.Modal","x-component-props":{width:520},title:o("Unbind verificator"),properties:F({},(0,I.uid)(),{type:"void","x-component":"UnbindForm","x-component-props":{verificators:u,unbindVerificator:r.name}})})}})},N=function(){var n=(0,t.SD)().t,r=(0,e.useAPIClient)(),o=(0,e.useRequest)(function(){return r.resource("verificators").listByUser().then(function(e){var t;return null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.data})}),i=o.data,u=o.refresh,s=q((0,c.useState)(!1),2),p=s[0],d=s[1],m=q((0,c.useState)(!1),2),v=m[0],y=m[1],b=q((0,c.useState)(null),2),h=b[0],g=b[1],x=function(e){d(!0),g(e)},S=function(e){y(!0),g(e)};return a().createElement(D.Provider,{value:{refresh:u}},a().createElement(f.List,{bordered:!0,dataSource:i,renderItem:function(e){var t,r,o;return a().createElement(f.List.Item,{actions:(null===(t=e.boundInfo)||void 0===t?void 0:t.bound)?[a().createElement("a",{key:"unbind",onClick:function(){return S(e)}},n("Unbind"))]:[a().createElement("a",{key:"bind",onClick:function(){return x(e)}},n("Bind"))]},a().createElement(f.List.Item.Meta,{title:a().createElement(a().Fragment,null,l.Schema.compile(e.title,{t:n}),(null===(r=e.boundInfo)||void 0===r?void 0:r.bound)?a().createElement(f.Tag,{color:"success",style:{marginLeft:"10px"}},n("Configured")):a().createElement(f.Tag,{color:"warning",style:{marginLeft:"10px"}},n("Not configured"))),description:l.Schema.compile(e.description,{t:n})}),a().createElement("div",{style:{marginLeft:"10px"}},null===(o=e.boundInfo)||void 0===o?void 0:o.publicInfo))}}),a().createElement(e.ActionContextProvider,{value:{visible:p,setVisible:d}},p?a().createElement(R,{verificator:h}):null),a().createElement(e.ActionContextProvider,{value:{visible:v,setVisible:y}},v?a().createElement(W,{verificator:h}):null))},z=function(){var n=(0,c.useContext)(e.DropdownVisibleContext),r=q((0,c.useState)(!1),2),o=r[0],i=r[1],u=(0,t.SD)().t,s=(0,e.useZIndexContext)()+10,l=(0,c.useCallback)(function(e){var t;e.stopPropagation(),null==n||null===(t=n.setVisible)||void 0===t||t.call(n,!1),i(function(e){return!e||e})},[n]),f=(0,c.useMemo)(function(){return a().createElement(e.SchemaComponent,{components:{Verificators:N},schema:{type:"object",properties:F({},(0,I.uid)(),{"x-component":"Action.Drawer","x-component-props":{zIndex:s},type:"void",title:'{{t("Verification")}}',properties:{form:{type:"void","x-component":"Verificators"}}})}})},[s]);return a().createElement(e.zIndexContext.Provider,{value:s},a().createElement(e.SchemaSettingsItem,{eventKey:"Verification",title:"Verification"},a().createElement("div",{onClick:l},u("Verification"))),a().createElement(e.ActionContextProvider,{value:{visible:o,setVisible:i}},o&&a().createElement("div",{onClick:function(e){return e.stopPropagation()}},f)))},K=g(581);function $(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function Y(e,t,n){return(Y=ee()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Q(o,n.prototype),o}).apply(null,arguments)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t="function"==typeof Map?new Map:void 0;return(X=function(e){var n;if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Y(e,arguments,J(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Q(r,e)})(e)}function ee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ee=function(){return!!e})()}var et=(0,e.lazy)(function(){return K("imported_4g78mb_component",g.e("995").then(g.bind(g,252)))},"Verificators").Verificators,en=(0,e.lazy)(function(){return K("imported_e2nirj_component",g.e("835").then(g.bind(g,564)))},"VerificatorSelect").VerificatorSelect,er=function(e){var r,o,c;function a(){var e,t,n,r;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,a),t=this,n=a,r=arguments,n=J(n),H(e=function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,ee()?Reflect.construct(n,r||[],J(t).constructor):n.apply(t,r)),"verificationManager",new i),H(e,"smsOTPProviderManager",new E),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(a,e),r=a,o=[{key:"load",value:function(){var e,r=this;return(e=function(){return function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,function(e){return r.app.pluginSettingsManager.add(t.A7,{icon:"CheckCircleOutlined",title:'{{t("Verification", { ns: "'.concat(t.A7,'" })}}'),Component:et,aclSnippet:"pm.verification.verificators"}),r.app.addComponents({VerificatorSelect:en}),r.app.addUserCenterSettingsItem({name:"verification",Component:z,sort:150}),r.verificationManager.registerVerificationType(n,A),r.smsOTPProviderManager.registerProvider("sms-aliyun",w),r.smsOTPProviderManager.registerProvider("sms-tencent",C),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){$(i,r,o,c,a,"next",e)}function a(e){$(i,r,o,c,a,"throw",e)}c(void 0)})})()}}],Z(r.prototype,o),a}(X(e.Plugin)),eo=er}(),x}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@formily/shared"),require("@nocobase/utils/client"),require("@nocobase/client"),require("ahooks"),require("antd"),require("@formily/react"),require("react"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-verification",["react-i18next","@formily/shared","@nocobase/utils/client","@nocobase/client","ahooks","antd","@formily/react","react","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-verification"]=t(require("react-i18next"),require("@formily/shared"),require("@nocobase/utils/client"),require("@nocobase/client"),require("ahooks"),require("antd"),require("@formily/react"),require("react"),require("@formily/antd-v5")):e["@nocobase/plugin-verification"]=t(e["react-i18next"],e["@formily/shared"],e["@nocobase/utils/client"],e["@nocobase/client"],e.ahooks,e.antd,e["@formily/react"],e.react,e["@formily/antd-v5"])}(self,function(e,t,n,r,o,i,u,c,a){return function(){var f,l,s,p,d,b,y={573:function(e,t,n){"use strict";n.d(t,{A7:function(){return r}}),n(772),n(238);var r="verification"},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},632:function(e){"use strict";e.exports=a},505:function(e){"use strict";e.exports=u},875:function(e){"use strict";e.exports=t},772:function(e){"use strict";e.exports=r},584:function(e){"use strict";e.exports=n},749:function(e){"use strict";e.exports=o},721:function(e){"use strict";e.exports=i},156:function(e){"use strict";e.exports=c},238:function(t){"use strict";t.exports=e}},v={};function h(e){var t=v[e];if(void 0!==t)return t.exports;var n=v[e]={exports:{}};return y[e](n,n.exports,h),n.exports}h.m=y,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.f={},h.e=function(e){return Promise.all(Object.keys(h.f).reduce(function(t,n){return h.f[n](e,t),t},[]))},h.u=function(e){return"7551e1f2e04bca2f.js"},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f={},l="@nocobase/plugin-verification:",h.l=function(e,t,n,r){if(f[e]){f[e].push(t);return}if(void 0!==n){for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-webpack")==l+n){o=a;break}}}!o&&(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,h.nc&&o.setAttribute("nonce",h.nc),o.setAttribute("data-webpack",l+n),o.src=e),f[e]=[t];var s=function(t,n){o.onerror=o.onload=null,clearTimeout(p);var r=f[e];if(delete f[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),i&&document.head.appendChild(o)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},h.p=(!(s=window.__nocobase_public_path__||"/").endsWith("/")&&(s+="/"),s+"static/plugins/@nocobase/plugin-verification/dist/client/"),p={909:0},h.f.j=function(e,t){var n=h.o(p,e)?p[e]:void 0;if(0!==n){if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=p[e]=[t,r]});t.push(n[2]=r);var o=h.p+h.u(e),i=Error();h.l(o,function(t){if(h.o(p,e)&&(0!==(n=p[e])&&(p[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}}},d=function(e,t){var n=t[0],r=t[1],o=t[2],i,u,c=0;if(n.some(function(e){return 0!==p[e]})){for(i in r)h.o(r,i)&&(h.m[i]=r[i]);o&&o(h)}for(e&&e(t);c<n.length;c++)u=n[c],h.o(p,u)&&p[u]&&p[u][0](),p[u]=0},(b=self.webpackChunk_nocobase_plugin_verification=self.webpackChunk_nocobase_plugin_verification||[]).forEach(d.bind(null,0)),b.push=d.bind(null,b.push.bind(b));var m={};return!function(){"use strict";h.r(m),h.d(m,{PluginVerificationClient:function(){return s}});var e=h(772),t=h(573),n=h(581);function r(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function o(e,t,n){return(o=f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&c(o,n.prototype),o}).apply(null,arguments)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){var n;if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var l=(0,e.lazy)(function(){return n("imported_-73m02n_component",h.e("478").then(h.bind(h,178)))},"VerificationProviders").VerificationProviders,s=function(e){var n,o,a;function s(){var e,t,n;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,s),e=this,t=s,n=arguments,t=u(t),function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(s,e),n=s,o=[{key:"load",value:function(){var e,n=this;return(e=function(){return function(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,function(e){return n.app.pluginSettingsManager.add(t.A7,{icon:"CheckCircleOutlined",title:'{{t("Verification", { ns: "'.concat(t.A7,'" })}}'),Component:l,aclSnippet:"pm.verification.providers"}),[2]})},function(){var t=this,n=arguments;return new Promise(function(o,i){var u=e.apply(t,n);function c(e){r(u,o,i,c,a,"next",e)}function a(e){r(u,o,i,c,a,"throw",e)}c(void 0)})})()}}],i(n.prototype,o),s}(a(e.Plugin));m.default=s}(),m}()});
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const NAMESPACE = "verification";
|
|
10
10
|
export declare function lang(key: string): string;
|
|
11
|
-
export declare function useVerificationTranslation(): import("react-i18next").UseTranslationResponse<
|
|
11
|
+
export declare function useVerificationTranslation(): import("react-i18next").UseTranslationResponse<"verification", undefined>;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { ISchema } from '@formily/react';
|
|
10
|
+
import { Registry } from '@nocobase/utils/client';
|
|
11
|
+
declare const providerTypes: Registry<ISchema>;
|
|
12
|
+
export default providerTypes;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@formily/react").Stringify<{
|
|
10
|
+
[key: symbol]: any;
|
|
11
|
+
[key: `x-${string}`]: any;
|
|
12
|
+
[key: `x-${number}`]: any;
|
|
13
|
+
version?: string;
|
|
14
|
+
name?: import("@formily/react").SchemaKey;
|
|
15
|
+
title?: any;
|
|
16
|
+
description?: any;
|
|
17
|
+
default?: any;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
writeOnly?: boolean;
|
|
20
|
+
type?: import("@formily/react").SchemaTypes;
|
|
21
|
+
enum?: import("@formily/react").SchemaEnum<any>;
|
|
22
|
+
const?: any;
|
|
23
|
+
multipleOf?: number;
|
|
24
|
+
maximum?: number;
|
|
25
|
+
exclusiveMaximum?: number;
|
|
26
|
+
minimum?: number;
|
|
27
|
+
exclusiveMinimum?: number;
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
minLength?: number;
|
|
30
|
+
pattern?: string | RegExp;
|
|
31
|
+
maxItems?: number;
|
|
32
|
+
minItems?: number;
|
|
33
|
+
uniqueItems?: boolean;
|
|
34
|
+
maxProperties?: number;
|
|
35
|
+
minProperties?: number;
|
|
36
|
+
required?: string | boolean | string[];
|
|
37
|
+
format?: string;
|
|
38
|
+
$ref?: string;
|
|
39
|
+
$namespace?: string;
|
|
40
|
+
definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
41
|
+
properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
42
|
+
items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
43
|
+
additionalItems?: import("@formily/react").Stringify<any>;
|
|
44
|
+
patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
45
|
+
additionalProperties?: import("@formily/react").Stringify<any>;
|
|
46
|
+
"x-value"?: any;
|
|
47
|
+
"x-index"?: number;
|
|
48
|
+
"x-pattern"?: any;
|
|
49
|
+
"x-display"?: any;
|
|
50
|
+
"x-validator"?: any;
|
|
51
|
+
"x-decorator"?: any;
|
|
52
|
+
"x-decorator-props"?: any;
|
|
53
|
+
"x-component"?: any;
|
|
54
|
+
"x-component-props"?: any;
|
|
55
|
+
"x-reactions"?: import("@formily/react").SchemaReactions<any>;
|
|
56
|
+
"x-content"?: any;
|
|
57
|
+
"x-data"?: any;
|
|
58
|
+
"x-visible"?: boolean;
|
|
59
|
+
"x-hidden"?: boolean;
|
|
60
|
+
"x-disabled"?: boolean;
|
|
61
|
+
"x-editable"?: boolean;
|
|
62
|
+
"x-read-only"?: boolean;
|
|
63
|
+
"x-read-pretty"?: boolean;
|
|
64
|
+
"x-compile-omitted"?: string[];
|
|
65
|
+
}>;
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@formily/react").Stringify<{
|
|
10
|
+
[key: symbol]: any;
|
|
11
|
+
[key: `x-${string}`]: any;
|
|
12
|
+
[key: `x-${number}`]: any;
|
|
13
|
+
version?: string;
|
|
14
|
+
name?: import("@formily/react").SchemaKey;
|
|
15
|
+
title?: any;
|
|
16
|
+
description?: any;
|
|
17
|
+
default?: any;
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
writeOnly?: boolean;
|
|
20
|
+
type?: import("@formily/react").SchemaTypes;
|
|
21
|
+
enum?: import("@formily/react").SchemaEnum<any>;
|
|
22
|
+
const?: any;
|
|
23
|
+
multipleOf?: number;
|
|
24
|
+
maximum?: number;
|
|
25
|
+
exclusiveMaximum?: number;
|
|
26
|
+
minimum?: number;
|
|
27
|
+
exclusiveMinimum?: number;
|
|
28
|
+
maxLength?: number;
|
|
29
|
+
minLength?: number;
|
|
30
|
+
pattern?: string | RegExp;
|
|
31
|
+
maxItems?: number;
|
|
32
|
+
minItems?: number;
|
|
33
|
+
uniqueItems?: boolean;
|
|
34
|
+
maxProperties?: number;
|
|
35
|
+
minProperties?: number;
|
|
36
|
+
required?: string | boolean | string[];
|
|
37
|
+
format?: string;
|
|
38
|
+
$ref?: string;
|
|
39
|
+
$namespace?: string;
|
|
40
|
+
definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
41
|
+
properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
42
|
+
items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
43
|
+
additionalItems?: import("@formily/react").Stringify<any>;
|
|
44
|
+
patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
45
|
+
additionalProperties?: import("@formily/react").Stringify<any>;
|
|
46
|
+
"x-value"?: any;
|
|
47
|
+
"x-index"?: number;
|
|
48
|
+
"x-pattern"?: any;
|
|
49
|
+
"x-display"?: any;
|
|
50
|
+
"x-validator"?: any;
|
|
51
|
+
"x-decorator"?: any;
|
|
52
|
+
"x-decorator-props"?: any;
|
|
53
|
+
"x-component"?: any;
|
|
54
|
+
"x-component-props"?: any;
|
|
55
|
+
"x-reactions"?: import("@formily/react").SchemaReactions<any>;
|
|
56
|
+
"x-content"?: any;
|
|
57
|
+
"x-data"?: any;
|
|
58
|
+
"x-visible"?: boolean;
|
|
59
|
+
"x-hidden"?: boolean;
|
|
60
|
+
"x-disabled"?: boolean;
|
|
61
|
+
"x-editable"?: boolean;
|
|
62
|
+
"x-read-only"?: boolean;
|
|
63
|
+
"x-read-pretty"?: boolean;
|
|
64
|
+
"x-compile-omitted"?: string[];
|
|
65
|
+
}>;
|
|
66
|
+
export default _default;
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@
|
|
11
|
+
"@formily/antd-v5": "1.1.9",
|
|
12
|
+
"@formily/core": "2.3.0",
|
|
13
|
+
"@formily/react": "2.3.0",
|
|
14
|
+
"ahooks": "3.7.8",
|
|
12
15
|
"react": "18.2.0",
|
|
16
|
+
"@nocobase/client": "1.7.0-beta.2",
|
|
13
17
|
"antd": "5.12.8",
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
17
|
-
"@nocobase/server": "1.7.0-
|
|
18
|
-
"@nocobase/utils": "1.7.0-
|
|
19
|
-
"@nocobase/actions": "1.7.0-alpha.1",
|
|
20
|
-
"@nocobase/database": "1.7.0-alpha.1",
|
|
18
|
+
"@nocobase/actions": "1.7.0-beta.2",
|
|
19
|
+
"@nocobase/database": "1.7.0-beta.2",
|
|
20
|
+
"@nocobase/resourcer": "1.7.0-beta.2",
|
|
21
|
+
"@nocobase/server": "1.7.0-beta.2",
|
|
22
|
+
"@nocobase/utils": "1.7.0-beta.2",
|
|
21
23
|
"react-i18next": "11.18.6",
|
|
22
|
-
"
|
|
23
|
-
"@formily/antd-v5": "1.1.9",
|
|
24
|
-
"@ant-design/icons": "5.6.1",
|
|
24
|
+
"@formily/shared": "2.3.2",
|
|
25
25
|
"dayjs": "1.11.10"
|
|
26
26
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Verification": "Verifizierung",
|
|
3
|
+
"Verification providers": "Verifizierungsanbieter",
|
|
4
|
+
"Provider type": "Anbietertyp",
|
|
5
|
+
"Aliyun SMS": "Aliyun SMS",
|
|
6
|
+
"Access Key ID": "Zugriffsschlüssel-ID",
|
|
7
|
+
"Access Key Secret": "Zugriffsschlüssel-Geheimnis",
|
|
8
|
+
"Endpoint": "Endpunkt",
|
|
9
|
+
"Sign": "Signatur",
|
|
10
|
+
"Template code": "Vorlagencode",
|
|
11
|
+
"Secret Id": "Geheime ID",
|
|
12
|
+
"Secret Key": "Geheimer Schlüssel",
|
|
13
|
+
"Region": "Region",
|
|
14
|
+
"Sign name": "Signaturname",
|
|
15
|
+
"Sms sdk app id": "SMS-SDK-App-ID",
|
|
16
|
+
"Template Id": "Vorlagen-ID",
|
|
17
|
+
"Verification send failed, please try later or contact to administrator": "Verifizierungsversand fehlgeschlagen, bitte versuchen Sie es später oder kontaktieren Sie den Administrator",
|
|
18
|
+
"Not a valid cellphone number, please re-enter": "Keine gültige Handynummer, bitte erneut eingeben",
|
|
19
|
+
"Please don't retry in {{time}} seconds": "Bitte versuchen Sie es nicht in {{time}} Sekunden erneut",
|
|
20
|
+
"You are trying so frequently, please slow down": "Sie versuchen es zu häufig, bitte verlangsamen Sie",
|
|
21
|
+
"Verification code is invalid": "Verifizierungscode ist ungültig"
|
|
22
|
+
}
|
package/dist/locale/en-US.json
CHANGED
|
@@ -18,21 +18,5 @@
|
|
|
18
18
|
"Not a valid cellphone number, please re-enter": "Not a valid cellphone number, please re-enter",
|
|
19
19
|
"Please don't retry in {{time}} seconds": "Please don't retry in {{time}} seconds",
|
|
20
20
|
"You are trying so frequently, please slow down": "You are trying so frequently, please slow down",
|
|
21
|
-
"Verification code is invalid": "Verification code is invalid"
|
|
22
|
-
"SMS OTP": "SMS OTP",
|
|
23
|
-
"Get one-time codes sent to your phone via SMS to complete authentication requests.": "Get one-time codes sent to your phone via SMS to complete authentication requests.",
|
|
24
|
-
"Unbind": "Unbind",
|
|
25
|
-
"Bind": "Bind",
|
|
26
|
-
"Configured": "Configured",
|
|
27
|
-
"Unbind verificator": "Unbind verificator",
|
|
28
|
-
"Not configured": "Not configured",
|
|
29
|
-
"Unbound successfully": "Unbound successfully",
|
|
30
|
-
"Bound successfully": "Bound successfully",
|
|
31
|
-
"Verification type": "Verification type",
|
|
32
|
-
"Provider": "Provider",
|
|
33
|
-
"Verificator": "Verificator",
|
|
34
|
-
"Verificators": "Verificators",
|
|
35
|
-
"The following types of verificators are available:": "The following types of verifications are available: ",
|
|
36
|
-
"Go to": "Go to",
|
|
37
|
-
"create verificators": "create verificators"
|
|
21
|
+
"Verification code is invalid": "Verification code is invalid"
|
|
38
22
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Verification": "Verification",
|
|
3
|
+
"Verification providers": "Verification providers",
|
|
4
|
+
"Provider type": "Provider type",
|
|
5
|
+
"Aliyun SMS": "Aliyun SMS",
|
|
6
|
+
"Access Key ID": "Access Key ID",
|
|
7
|
+
"Access Key Secret": "Access Key Secret",
|
|
8
|
+
"Endpoint": "Endpoint",
|
|
9
|
+
"Sign": "Sign",
|
|
10
|
+
"Template code": "Template code",
|
|
11
|
+
"Secret Id": "Secret Id",
|
|
12
|
+
"Secret Key": "Secret Key",
|
|
13
|
+
"Region": "Region",
|
|
14
|
+
"Sign name": "Sign name",
|
|
15
|
+
"Sms sdk app id": "Sms sdk app id",
|
|
16
|
+
"Template Id": "Template Id",
|
|
17
|
+
"Verification send failed, please try later or contact to administrator": "Verification send failed, please try later or contact to administrator",
|
|
18
|
+
"Not a valid cellphone number, please re-enter": "Not a valid cellphone number, please re-enter",
|
|
19
|
+
"Please don't retry in {{time}} seconds": "Please don't retry in {{time}} seconds",
|
|
20
|
+
"You are trying so frequently, please slow down": "You are trying so frequently, please slow down",
|
|
21
|
+
"Verification code is invalid": "Verification code is invalid"
|
|
22
|
+
}
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"Verification": "
|
|
2
|
+
"Verification": "验证码",
|
|
3
3
|
"Verification providers": "验证码提供商",
|
|
4
4
|
"Provider type": "提供商类型",
|
|
5
5
|
"Aliyun SMS": "阿里云短信服务",
|
|
6
|
-
"Tencent SMS": "腾讯云短信服务",
|
|
7
6
|
"Access Key ID": "Access Key ID",
|
|
8
7
|
"Access Key Secret": "Access Key Secret",
|
|
9
8
|
"Endpoint": "接入点",
|
|
@@ -19,21 +18,5 @@
|
|
|
19
18
|
"Not a valid cellphone number, please re-enter": "不是有效的手机号,请重新输入",
|
|
20
19
|
"Please don't retry in {{time}} seconds": "请 {{time}} 秒后再试",
|
|
21
20
|
"You are trying so frequently, please slow down": "您的操作太频繁,请稍后再试",
|
|
22
|
-
"Verification code is invalid": "无效的验证码"
|
|
23
|
-
"SMS OTP": "短信验证码",
|
|
24
|
-
"Get one-time codes sent to your phone via SMS to complete authentication requests.": "获取一次性短信验证码,以完成身份验证请求。",
|
|
25
|
-
"Unbind": "解绑",
|
|
26
|
-
"Bind": "绑定",
|
|
27
|
-
"Configured": "已配置",
|
|
28
|
-
"Unbind verificator": "解绑验证器",
|
|
29
|
-
"Not configured": "未配置",
|
|
30
|
-
"Unbound successfully": "解绑成功",
|
|
31
|
-
"Bound successfully": "绑定成功",
|
|
32
|
-
"Verification type": "验证类型",
|
|
33
|
-
"Provider": "服务商",
|
|
34
|
-
"Verificator": "验证器",
|
|
35
|
-
"Verificators": "验证器",
|
|
36
|
-
"The following types of verificators are available:": "以下类型的验证器可选:",
|
|
37
|
-
"Go to": "前往",
|
|
38
|
-
"create verificators": "创建验证器"
|
|
21
|
+
"Verification code is invalid": "无效的验证码"
|
|
39
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/dysmsapi20170525","version":"2.0.17","description":"","main":"dist/client.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":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.4","@alicloud/openapi-client":"^0.4.1","@alicloud/endpoint-util":"^0.0.1","@alicloud/openapi-util":"^0.2.9"},"files":["dist","src"],"_lastModified":"2025-03-
|
|
1
|
+
{"name":"@alicloud/dysmsapi20170525","version":"2.0.17","description":"","main":"dist/client.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":"^12.12.26","nyc":"^15.0.0","source-map-support":"^0.5.16","ts-node":"^8.6.2","typescript":"^3.7.5"},"dependencies":{"@alicloud/tea-typescript":"^1.7.1","@alicloud/tea-util":"^1.4.4","@alicloud/openapi-client":"^0.4.1","@alicloud/endpoint-util":"^0.0.1","@alicloud/openapi-util":"^0.2.9"},"files":["dist","src"],"_lastModified":"2025-03-13T14:02:51.456Z"}
|
|
@@ -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-03-
|
|
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-03-13T14:02:52.479Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@alicloud/tea-util","version":"1.4.4","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"],"_lastModified":"2025-03-
|
|
1
|
+
{"name":"@alicloud/tea-util","version":"1.4.4","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"],"_lastModified":"2025-03-13T14:02:52.737Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"tencentcloud-sdk-nodejs","version":"4.0.759","description":"腾讯云 API NODEJS SDK","main":"tencentcloud/index.js","scripts":{"test":"mocha -t 10000","build":"tsc","prettier":"prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'"},"engines":{"node":">=10"},"keywords":["tencentcloudapi","tencentcloud","qcloud","sdk","js","nodejs"],"author":"tencentcloudapi","license":"Apache-2.0","dependencies":{"form-data":"^3.0.0","get-stream":"^6.0.0","https-proxy-agent":"^5.0.0","is-stream":"^2.0.0","json-bigint":"^1.0.0","node-fetch":"^2.2.0","tslib":"1.13.0"},"directories":{"example":"examples","lib":"lib"},"repository":{"type":"git","url":"https://github.com/tencentcloud/tencentcloud-sdk-nodejs"},"devDependencies":{"@types/form-data":"^2.5.0","@types/json-bigint":"^1.0.1","@types/node":"^14.0.26","@types/node-fetch":"^2.5.7","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","babel-eslint":"^10.0.2","chai":"^4.2.0","eslint":"^6.8.0","eslint-plugin-react":"^7.17.0","mocha":"^8.1.1","prettier":"^2.3.0","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2025-03-
|
|
1
|
+
{"name":"tencentcloud-sdk-nodejs","version":"4.0.759","description":"腾讯云 API NODEJS SDK","main":"tencentcloud/index.js","scripts":{"test":"mocha -t 10000","build":"tsc","prettier":"prettier --config prettier.config.js --write 'src/**/*.{tsx,ts,jsx,js,css,json,vue}'"},"engines":{"node":">=10"},"keywords":["tencentcloudapi","tencentcloud","qcloud","sdk","js","nodejs"],"author":"tencentcloudapi","license":"Apache-2.0","dependencies":{"form-data":"^3.0.0","get-stream":"^6.0.0","https-proxy-agent":"^5.0.0","is-stream":"^2.0.0","json-bigint":"^1.0.0","node-fetch":"^2.2.0","tslib":"1.13.0"},"directories":{"example":"examples","lib":"lib"},"repository":{"type":"git","url":"https://github.com/tencentcloud/tencentcloud-sdk-nodejs"},"devDependencies":{"@types/form-data":"^2.5.0","@types/json-bigint":"^1.0.1","@types/node":"^14.0.26","@types/node-fetch":"^2.5.7","@typescript-eslint/eslint-plugin":"^2.34.0","@typescript-eslint/parser":"^2.34.0","babel-eslint":"^10.0.2","chai":"^4.2.0","eslint":"^6.8.0","eslint-plugin-react":"^7.17.0","mocha":"^8.1.1","prettier":"^2.3.0","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2025-03-13T14:03:00.501Z"}
|
package/dist/server/Plugin.d.ts
CHANGED
|
@@ -6,12 +6,23 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import { Context } from '@nocobase/actions';
|
|
10
|
+
import { HandlerType } from '@nocobase/resourcer';
|
|
9
11
|
import { Plugin } from '@nocobase/server';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
+
import { Registry } from '@nocobase/utils';
|
|
13
|
+
import { Provider } from '.';
|
|
14
|
+
export interface Interceptor {
|
|
15
|
+
manual?: boolean;
|
|
16
|
+
expiresIn?: number;
|
|
17
|
+
getReceiver(ctx: any): string;
|
|
18
|
+
getCode?(ctx: any): string;
|
|
19
|
+
validate?(ctx: Context, receiver: string): boolean | Promise<boolean>;
|
|
20
|
+
}
|
|
12
21
|
export default class PluginVerficationServer extends Plugin {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
providers: Registry<typeof Provider>;
|
|
23
|
+
interceptors: Registry<Interceptor>;
|
|
24
|
+
intercept: HandlerType;
|
|
16
25
|
install(): Promise<void>;
|
|
26
|
+
load(): Promise<void>;
|
|
27
|
+
getDefault(): Promise<any>;
|
|
17
28
|
}
|