@nocobase/plugin-verification 0.8.0-alpha.8 → 0.8.1-alpha.3
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/client.d.ts +4 -0
- package/client.js +30 -0
- package/lib/client/ProviderOptions.d.ts +3 -0
- package/lib/client/ProviderOptions.js +81 -0
- package/lib/client/Shortcut.d.ts +1 -0
- package/lib/client/Shortcut.js +78 -0
- package/lib/client/VerificationProviders.d.ts +2 -0
- package/lib/client/VerificationProviders.js +55 -0
- package/lib/client/index.d.ts +3 -0
- package/lib/client/index.js +74 -0
- package/lib/client/locale/index.d.ts +3 -0
- package/lib/client/locale/index.js +47 -0
- package/lib/client/locale/zh-CN.d.ts +12 -0
- package/lib/client/locale/zh-CN.js +19 -0
- package/lib/client/providerTypes/index.d.ts +4 -0
- package/lib/client/providerTypes/index.js +25 -0
- package/lib/client/providerTypes/sms-aliyun.d.ts +57 -0
- package/lib/client/providerTypes/sms-aliyun.js +45 -0
- package/lib/client/schemas/providers.d.ts +355 -0
- package/lib/client/schemas/providers.js +356 -0
- package/lib/index.d.ts +1 -4
- package/lib/index.js +3 -34
- package/lib/{Plugin.d.ts → server/Plugin.d.ts} +1 -1
- package/lib/{Plugin.js → server/Plugin.js} +22 -4
- package/lib/{actions → server/actions}/index.d.ts +0 -0
- package/lib/{actions → server/actions}/index.js +0 -0
- package/lib/{actions → server/actions}/verifications.d.ts +0 -0
- package/lib/{actions → server/actions}/verifications.js +12 -5
- package/lib/{collections → server/collections}/verifications.d.ts +0 -0
- package/lib/{collections → server/collections}/verifications.js +0 -0
- package/lib/{collections → server/collections}/verifications_providers.d.ts +0 -0
- package/lib/{collections → server/collections}/verifications_providers.js +3 -0
- package/lib/{constants.d.ts → server/constants.d.ts} +0 -0
- package/lib/{constants.js → server/constants.js} +0 -0
- package/lib/server/index.d.ts +4 -0
- package/lib/server/index.js +46 -0
- package/lib/{locale → server/locale}/index.d.ts +0 -0
- package/lib/{locale → server/locale}/index.js +0 -0
- package/lib/{locale → server/locale}/zh-CN.d.ts +1 -0
- package/lib/{locale → server/locale}/zh-CN.js +2 -1
- package/lib/{providers → server/providers}/index.d.ts +0 -0
- package/lib/{providers → server/providers}/index.js +0 -0
- package/lib/{providers → server/providers}/sms-aliyun.d.ts +0 -0
- package/lib/{providers → server/providers}/sms-aliyun.js +1 -0
- package/package.json +7 -7
- package/server.d.ts +4 -0
- package/server.js +30 -0
- package/src/client/ProviderOptions.tsx +22 -0
- package/src/client/Shortcut.tsx +20 -0
- package/src/client/VerificationProviders.tsx +19 -0
- package/src/client/index.tsx +41 -0
- package/src/client/locale/index.ts +16 -0
- package/src/client/locale/zh-CN.ts +13 -0
- package/src/client/providerTypes/index.ts +9 -0
- package/src/client/providerTypes/sms-aliyun.ts +39 -0
- package/src/client/schemas/providers.ts +330 -0
- package/src/index.ts +1 -5
- package/src/{Plugin.ts → server/Plugin.ts} +13 -2
- package/src/{__tests__ → server/__tests__}/Plugin.test.ts +1 -3
- package/src/{__tests__ → server/__tests__}/collections/authors.ts +0 -0
- package/src/{__tests__ → server/__tests__}/index.ts +0 -0
- package/src/{actions → server/actions}/index.ts +0 -0
- package/src/{actions → server/actions}/verifications.ts +5 -3
- package/src/{collections → server/collections}/verifications.ts +0 -0
- package/src/{collections → server/collections}/verifications_providers.ts +4 -0
- package/src/{constants.ts → server/constants.ts} +0 -0
- package/src/server/index.ts +5 -0
- package/src/{locale → server/locale}/index.ts +0 -0
- package/src/{locale → server/locale}/zh-CN.ts +2 -1
- package/src/{providers → server/providers}/index.ts +0 -0
- package/src/{providers → server/providers}/sms-aliyun.ts +1 -0
package/client.d.ts
ADDED
package/client.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4
|
+
|
|
5
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
6
|
+
|
|
7
|
+
var _index = _interopRequireWildcard(require("./lib/client"));
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
var _exportNames = {};
|
|
13
|
+
Object.defineProperty(exports, "default", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _index.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
Object.keys(_index).forEach(function (key) {
|
|
21
|
+
if (key === "default" || key === "__esModule") return;
|
|
22
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
23
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
24
|
+
Object.defineProperty(exports, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _index[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
function _react() {
|
|
9
|
+
const data = _interopRequireWildcard(require("react"));
|
|
10
|
+
|
|
11
|
+
_react = function _react() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _antd() {
|
|
19
|
+
const data = require("@formily/antd");
|
|
20
|
+
|
|
21
|
+
_antd = function _antd() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _react2() {
|
|
29
|
+
const data = require("@formily/react");
|
|
30
|
+
|
|
31
|
+
_react2 = function _react2() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var _providerTypes = _interopRequireDefault(require("./providerTypes"));
|
|
39
|
+
|
|
40
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
+
|
|
42
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
|
+
|
|
44
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
|
+
|
|
46
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
|
+
|
|
48
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
49
|
+
|
|
50
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
51
|
+
|
|
52
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
53
|
+
|
|
54
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
55
|
+
|
|
56
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
|
+
|
|
58
|
+
var _default = (0, _react2().observer)(props => {
|
|
59
|
+
const form = (0, _react2().useForm)();
|
|
60
|
+
const field = (0, _react2().useField)();
|
|
61
|
+
|
|
62
|
+
const _useState = (0, _react().useState)(new (_react2().Schema)({})),
|
|
63
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
64
|
+
s = _useState2[0],
|
|
65
|
+
setSchema = _useState2[1];
|
|
66
|
+
|
|
67
|
+
(0, _react().useEffect)(() => {
|
|
68
|
+
form.clearFormGraph('options.*');
|
|
69
|
+
setSchema(new (_react2().Schema)(_providerTypes.default.get(form.values.type) || {}));
|
|
70
|
+
}, [form.values.type]);
|
|
71
|
+
return _react().default.createElement(_antd().FormLayout, {
|
|
72
|
+
layout: 'vertical'
|
|
73
|
+
}, _react().default.createElement(_react2().RecursionField, {
|
|
74
|
+
key: form.values.type || 'sms-aliyun',
|
|
75
|
+
basePath: field.address,
|
|
76
|
+
onlyRenderProperties: true,
|
|
77
|
+
schema: s
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Shortcut: () => JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Shortcut = void 0;
|
|
7
|
+
|
|
8
|
+
function _react() {
|
|
9
|
+
const data = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
_react = function _react() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _reactRouterDom() {
|
|
19
|
+
const data = require("react-router-dom");
|
|
20
|
+
|
|
21
|
+
_reactRouterDom = function _reactRouterDom() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _reactI18next() {
|
|
29
|
+
const data = require("react-i18next");
|
|
30
|
+
|
|
31
|
+
_reactI18next = function _reactI18next() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _icons() {
|
|
39
|
+
const data = require("@ant-design/icons");
|
|
40
|
+
|
|
41
|
+
_icons = function _icons() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _client() {
|
|
49
|
+
const data = require("@nocobase/client");
|
|
50
|
+
|
|
51
|
+
_client = function _client() {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var _locale = require("./locale");
|
|
59
|
+
|
|
60
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
61
|
+
|
|
62
|
+
const Shortcut = () => {
|
|
63
|
+
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
64
|
+
t = _useTranslation.t;
|
|
65
|
+
|
|
66
|
+
const history = (0, _reactRouterDom().useHistory)();
|
|
67
|
+
return _react().default.createElement(_client().PluginManager.Toolbar.Item, {
|
|
68
|
+
icon: _react().default.createElement(_icons().CheckCircleOutlined, null),
|
|
69
|
+
title: t('Verification', {
|
|
70
|
+
ns: _locale.NAMESPACE
|
|
71
|
+
}),
|
|
72
|
+
onClick: () => {
|
|
73
|
+
history.push('/admin/settings/verification/providers');
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.Shortcut = Shortcut;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VerificationProviders = VerificationProviders;
|
|
7
|
+
|
|
8
|
+
function _client() {
|
|
9
|
+
const data = require("@nocobase/client");
|
|
10
|
+
|
|
11
|
+
_client = function _client() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _react() {
|
|
19
|
+
const data = _interopRequireDefault(require("react"));
|
|
20
|
+
|
|
21
|
+
_react = function _react() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _antd() {
|
|
29
|
+
const data = require("antd");
|
|
30
|
+
|
|
31
|
+
_antd = function _antd() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var _providers = _interopRequireDefault(require("./schemas/providers"));
|
|
39
|
+
|
|
40
|
+
var _ProviderOptions = _interopRequireDefault(require("./ProviderOptions"));
|
|
41
|
+
|
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
+
|
|
44
|
+
function VerificationProviders() {
|
|
45
|
+
return _react().default.createElement(_antd().Card, {
|
|
46
|
+
bordered: false
|
|
47
|
+
}, _react().default.createElement(_client().SchemaComponent, {
|
|
48
|
+
schema: _providers.default,
|
|
49
|
+
components: {
|
|
50
|
+
ProviderOptions: _ProviderOptions.default
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = _default;
|
|
7
|
+
Object.defineProperty(exports, "verificationProviderTypes", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _providerTypes.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
function _react() {
|
|
15
|
+
const data = _interopRequireWildcard(require("react"));
|
|
16
|
+
|
|
17
|
+
_react = function _react() {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _client() {
|
|
25
|
+
const data = require("@nocobase/client");
|
|
26
|
+
|
|
27
|
+
_client = function _client() {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var _locale = require("./locale");
|
|
35
|
+
|
|
36
|
+
var _VerificationProviders = require("./VerificationProviders");
|
|
37
|
+
|
|
38
|
+
var _providerTypes = _interopRequireDefault(require("./providerTypes"));
|
|
39
|
+
|
|
40
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
|
+
|
|
42
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
|
+
|
|
44
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
|
+
|
|
46
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
47
|
+
|
|
48
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
49
|
+
|
|
50
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
51
|
+
|
|
52
|
+
function _default(props) {
|
|
53
|
+
const ctx = (0, _react().useContext)(_client().PluginManagerContext);
|
|
54
|
+
return _react().default.createElement(_client().SettingsCenterProvider, {
|
|
55
|
+
settings: {
|
|
56
|
+
verification: {
|
|
57
|
+
icon: 'CheckCircleOutlined',
|
|
58
|
+
title: `{{t("Verification", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
59
|
+
tabs: {
|
|
60
|
+
providers: {
|
|
61
|
+
title: `{{t("Verification providers", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
62
|
+
component: _VerificationProviders.VerificationProviders
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, _react().default.createElement(_client().PluginManagerContext.Provider, {
|
|
68
|
+
value: {
|
|
69
|
+
components: _objectSpread({}, ctx === null || ctx === void 0 ? void 0 : ctx.components)
|
|
70
|
+
}
|
|
71
|
+
}, props.children));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NAMESPACE = void 0;
|
|
7
|
+
exports.lang = lang;
|
|
8
|
+
exports.useVerificationTranslation = useVerificationTranslation;
|
|
9
|
+
|
|
10
|
+
function _reactI18next() {
|
|
11
|
+
const data = require("react-i18next");
|
|
12
|
+
|
|
13
|
+
_reactI18next = function _reactI18next() {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _client() {
|
|
21
|
+
const data = require("@nocobase/client");
|
|
22
|
+
|
|
23
|
+
_client = function _client() {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
31
|
+
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
+
|
|
34
|
+
const NAMESPACE = 'verification';
|
|
35
|
+
exports.NAMESPACE = NAMESPACE;
|
|
36
|
+
|
|
37
|
+
_client().i18n.addResources('zh-CN', NAMESPACE, _zhCN.default);
|
|
38
|
+
|
|
39
|
+
function lang(key) {
|
|
40
|
+
return _client().i18n.t(key, {
|
|
41
|
+
ns: NAMESPACE
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function useVerificationTranslation() {
|
|
46
|
+
return (0, _reactI18next().useTranslation)(NAMESPACE);
|
|
47
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
Verification: string;
|
|
3
|
+
'Verification providers': string;
|
|
4
|
+
'Provider type': string;
|
|
5
|
+
'Aliyun SMS': string;
|
|
6
|
+
'Access Key ID': string;
|
|
7
|
+
'Access Key Secret': string;
|
|
8
|
+
Endpoint: string;
|
|
9
|
+
Sign: string;
|
|
10
|
+
'Template code': string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
'Verification': '验证码',
|
|
9
|
+
'Verification providers': '验证码提供商',
|
|
10
|
+
'Provider type': '提供商类型',
|
|
11
|
+
// aliyun sms
|
|
12
|
+
'Aliyun SMS': '阿里云短信服务',
|
|
13
|
+
'Access Key ID': 'Access Key ID',
|
|
14
|
+
'Access Key Secret': 'Access Key Secret',
|
|
15
|
+
'Endpoint': '接入点',
|
|
16
|
+
'Sign': '签名',
|
|
17
|
+
'Template code': '模板代码'
|
|
18
|
+
};
|
|
19
|
+
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
function _client() {
|
|
9
|
+
const data = require("@nocobase/utils/client");
|
|
10
|
+
|
|
11
|
+
_client = function _client() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var _smsAliyun = _interopRequireDefault(require("./sms-aliyun"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
const providerTypes = new (_client().Registry)();
|
|
23
|
+
providerTypes.register('sms-aliyun', _smsAliyun.default);
|
|
24
|
+
var _default = providerTypes;
|
|
25
|
+
exports.default = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare const _default: import("@formily/react").Stringify<{
|
|
2
|
+
[key: symbol]: any;
|
|
3
|
+
[key: `x-${string}`]: any;
|
|
4
|
+
[key: `x-${number}`]: any;
|
|
5
|
+
version?: string;
|
|
6
|
+
name?: import("@formily/react").SchemaKey;
|
|
7
|
+
title?: any;
|
|
8
|
+
description?: any;
|
|
9
|
+
default?: any;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
writeOnly?: boolean;
|
|
12
|
+
type?: import("@formily/react").SchemaTypes;
|
|
13
|
+
enum?: import("@formily/react").SchemaEnum<any>;
|
|
14
|
+
const?: any;
|
|
15
|
+
multipleOf?: number;
|
|
16
|
+
maximum?: number;
|
|
17
|
+
exclusiveMaximum?: number;
|
|
18
|
+
minimum?: number;
|
|
19
|
+
exclusiveMinimum?: number;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
minLength?: number;
|
|
22
|
+
pattern?: string | RegExp;
|
|
23
|
+
maxItems?: number;
|
|
24
|
+
minItems?: number;
|
|
25
|
+
uniqueItems?: boolean;
|
|
26
|
+
maxProperties?: number;
|
|
27
|
+
minProperties?: number;
|
|
28
|
+
required?: string | boolean | string[];
|
|
29
|
+
format?: string;
|
|
30
|
+
$ref?: string;
|
|
31
|
+
$namespace?: string;
|
|
32
|
+
definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
33
|
+
properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
34
|
+
items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
35
|
+
additionalItems?: import("@formily/react").Stringify<any>;
|
|
36
|
+
patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
37
|
+
additionalProperties?: import("@formily/react").Stringify<any>;
|
|
38
|
+
"x-value"?: any;
|
|
39
|
+
"x-index"?: number;
|
|
40
|
+
"x-pattern"?: any;
|
|
41
|
+
"x-display"?: any;
|
|
42
|
+
"x-validator"?: any;
|
|
43
|
+
"x-decorator"?: any;
|
|
44
|
+
"x-decorator-props"?: any;
|
|
45
|
+
"x-component"?: any;
|
|
46
|
+
"x-component-props"?: any;
|
|
47
|
+
"x-reactions"?: import("@formily/react").SchemaReactions<any>;
|
|
48
|
+
"x-content"?: any;
|
|
49
|
+
"x-data"?: any;
|
|
50
|
+
"x-visible"?: boolean;
|
|
51
|
+
"x-hidden"?: boolean;
|
|
52
|
+
"x-disabled"?: boolean;
|
|
53
|
+
"x-editable"?: boolean;
|
|
54
|
+
"x-read-only"?: boolean;
|
|
55
|
+
"x-read-pretty"?: boolean;
|
|
56
|
+
}>;
|
|
57
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _locale = require("../locale");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
accessKeyId: {
|
|
14
|
+
title: `{{t("Access Key ID", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
15
|
+
type: 'string',
|
|
16
|
+
'x-decorator': 'FormItem',
|
|
17
|
+
'x-component': 'Input'
|
|
18
|
+
},
|
|
19
|
+
accessKeySecret: {
|
|
20
|
+
title: `{{t("Access Key Secret", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
21
|
+
type: 'string',
|
|
22
|
+
'x-decorator': 'FormItem',
|
|
23
|
+
'x-component': 'Password'
|
|
24
|
+
},
|
|
25
|
+
endpoint: {
|
|
26
|
+
title: `{{t("Endpoint", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
27
|
+
type: 'string',
|
|
28
|
+
'x-decorator': 'FormItem',
|
|
29
|
+
'x-component': 'Input'
|
|
30
|
+
},
|
|
31
|
+
sign: {
|
|
32
|
+
title: `{{t("Sign", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
33
|
+
type: 'string',
|
|
34
|
+
'x-decorator': 'FormItem',
|
|
35
|
+
'x-component': 'Input'
|
|
36
|
+
},
|
|
37
|
+
template: {
|
|
38
|
+
title: `{{t("Template code", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
39
|
+
type: 'string',
|
|
40
|
+
'x-decorator': 'FormItem',
|
|
41
|
+
'x-component': 'Input'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.default = _default;
|