@tiny-codes/react-easy 1.0.3 → 1.0.5
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/CHANGELOG.md +21 -0
- package/es/components/BreakLines/index.js +43 -26
- package/es/components/BreakLines/index.js.map +1 -1
- package/es/components/ConfigProvider/context.js +3 -3
- package/es/components/ConfigProvider/context.js.map +1 -1
- package/es/components/ConfigProvider/index.js +37 -35
- package/es/components/ConfigProvider/index.js.map +1 -1
- package/es/components/ConfirmAction/index.d.ts +74 -6
- package/es/components/ConfirmAction/index.js +210 -104
- package/es/components/ConfirmAction/index.js.map +1 -1
- package/es/components/DeleteConfirmAction/index.js +22 -20
- package/es/components/DeleteConfirmAction/index.js.map +1 -1
- package/es/components/ModalAction/index.d.ts +45 -5
- package/es/components/ModalAction/index.js +393 -209
- package/es/components/ModalAction/index.js.map +1 -1
- package/es/components/index.js +10 -8
- package/es/components/index.js.map +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.js +5 -4
- package/es/hooks/index.js.map +1 -1
- package/es/hooks/useContextValidator.js +7 -12
- package/es/hooks/useContextValidator.js.map +1 -1
- package/es/hooks/useLocalizedText.js +6 -4
- package/es/hooks/useLocalizedText.js.map +1 -1
- package/es/hooks/useRefFunction.js +13 -6
- package/es/hooks/useRefFunction.js.map +1 -1
- package/es/hooks/useRefValue.d.ts +12 -0
- package/es/hooks/useRefValue.js +18 -0
- package/es/hooks/useRefValue.js.map +1 -0
- package/es/hooks/useT.js +11 -8
- package/es/hooks/useT.js.map +1 -1
- package/es/hooks/useValidator.js +7 -4
- package/es/hooks/useValidator.js.map +1 -1
- package/es/hooks/useValidatorBuilder.js +146 -117
- package/es/hooks/useValidatorBuilder.js.map +1 -1
- package/es/hooks/useValidators.js +94 -58
- package/es/hooks/useValidators.js.map +1 -1
- package/es/index.js +2 -2
- package/es/index.js.map +1 -1
- package/es/locales/index.js +19 -13
- package/es/locales/index.js.map +1 -1
- package/es/locales/langs/en-US.js +20 -20
- package/es/locales/langs/en-US.js.map +1 -1
- package/es/locales/langs/en.js +1 -1
- package/es/locales/langs/en.js.map +1 -1
- package/es/locales/langs/zh-CN.js +20 -20
- package/es/locales/langs/zh-CN.js.map +1 -1
- package/es/utils/index.js +1 -1
- package/es/utils/index.js.map +1 -1
- package/lib/components/BreakLines/index.js +50 -37
- package/lib/components/BreakLines/index.js.map +7 -1
- package/lib/components/ConfigProvider/context.js +35 -6
- package/lib/components/ConfigProvider/context.js.map +7 -1
- package/lib/components/ConfigProvider/index.js +56 -42
- package/lib/components/ConfigProvider/index.js.map +7 -1
- package/lib/components/ConfirmAction/index.d.ts +74 -6
- package/lib/components/ConfirmAction/index.js +194 -138
- package/lib/components/ConfirmAction/index.js.map +7 -1
- package/lib/components/DeleteConfirmAction/index.js +50 -51
- package/lib/components/DeleteConfirmAction/index.js.map +7 -1
- package/lib/components/ModalAction/index.d.ts +45 -5
- package/lib/components/ModalAction/index.js +303 -243
- package/lib/components/ModalAction/index.js.map +7 -1
- package/lib/components/index.js +63 -11
- package/lib/components/index.js.map +7 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +52 -5
- package/lib/hooks/index.js.map +7 -1
- package/lib/hooks/useContextValidator.js +47 -11
- package/lib/hooks/useContextValidator.js.map +7 -1
- package/lib/hooks/useLocalizedText.js +41 -15
- package/lib/hooks/useLocalizedText.js.map +7 -1
- package/lib/hooks/useRefFunction.js +34 -21
- package/lib/hooks/useRefFunction.js.map +7 -1
- package/lib/hooks/useRefValue.d.ts +12 -0
- package/lib/hooks/useRefValue.js +32 -0
- package/lib/hooks/useRefValue.js.map +7 -0
- package/lib/hooks/useT.js +43 -11
- package/lib/hooks/useT.js.map +7 -1
- package/lib/hooks/useValidator.js +41 -12
- package/lib/hooks/useValidator.js.map +7 -1
- package/lib/hooks/useValidatorBuilder.js +149 -132
- package/lib/hooks/useValidatorBuilder.js.map +7 -1
- package/lib/hooks/useValidators.js +104 -67
- package/lib/hooks/useValidators.js.map +7 -1
- package/lib/index.js +26 -3
- package/lib/index.js.map +7 -1
- package/lib/locales/index.js +58 -15
- package/lib/locales/index.js.map +7 -1
- package/lib/locales/langs/en-US.js +46 -22
- package/lib/locales/langs/en-US.js.map +7 -1
- package/lib/locales/langs/en.js +37 -3
- package/lib/locales/langs/en.js.map +7 -1
- package/lib/locales/langs/zh-CN.js +46 -22
- package/lib/locales/langs/zh-CN.js.map +7 -1
- package/lib/utils/index.js +1 -2
- package/lib/utils/index.js.map +7 -1
- package/package.json +14 -15
- package/es/hooks/useValidateContext.d.ts +0 -2
- package/es/hooks/useValidateContext.js +0 -16
- package/es/hooks/useValidateContext.js.map +0 -1
- package/lib/hooks/useValidateContext.d.ts +0 -2
- package/lib/hooks/useValidateContext.js +0 -16
- package/lib/hooks/useValidateContext.js.map +0 -1
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
1
|
+
var _excluded = ["confirmType"],
|
|
2
|
+
_excluded2 = ["triggerComponent", "triggerEvent", "triggerProps", "danger", "title", "content", "titleColor", "contentColor", "icon", "iconColor", "okButtonProps", "onOk", "afterOk", "children"];
|
|
3
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
4
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
7
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
8
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
9
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
21
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
22
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
24
|
import { forwardRef, useContext, useImperativeHandle, useRef, useState } from 'react';
|
|
23
25
|
import { App, Button, Modal, Switch, Typography } from 'antd';
|
|
24
26
|
import useToken from 'antd/es/theme/useToken';
|
|
25
|
-
import useContextValidator from
|
|
26
|
-
import useLocalizedText from
|
|
27
|
-
import useRefFunction from
|
|
28
|
-
import ReactEasyContext from
|
|
27
|
+
import useContextValidator from "../../hooks/useContextValidator";
|
|
28
|
+
import useLocalizedText from "../../hooks/useLocalizedText";
|
|
29
|
+
import useRefFunction from "../../hooks/useRefFunction";
|
|
30
|
+
import ReactEasyContext from "../ConfigProvider/context";
|
|
31
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
32
|
/**
|
|
30
33
|
* **EN:** Generate a confirm box component
|
|
31
34
|
*
|
|
@@ -35,67 +38,145 @@ import ReactEasyContext from '../ConfigProvider/context';
|
|
|
35
38
|
*
|
|
36
39
|
* @returns Component render method | 组件render方法
|
|
37
40
|
*/
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
41
|
+
export var genRenderer = function genRenderer(defaultProps) {
|
|
42
|
+
var Render = function Render(props, ref) {
|
|
43
|
+
var _restDefaults$trigger, _children;
|
|
44
|
+
var confirmType = defaultProps.confirmType,
|
|
45
|
+
restDefaults = _objectWithoutProperties(defaultProps, _excluded);
|
|
46
|
+
var mergedProps = _objectSpread(_objectSpread(_objectSpread({}, restDefaults), props), {}, {
|
|
47
|
+
okButtonProps: _objectSpread(_objectSpread({}, restDefaults.okButtonProps), props.okButtonProps),
|
|
48
|
+
cancelButtonProps: _objectSpread(_objectSpread({}, restDefaults.cancelButtonProps), props.cancelButtonProps),
|
|
49
|
+
bodyProps: _objectSpread(_objectSpread({}, restDefaults.bodyProps), props.bodyProps),
|
|
50
|
+
maskProps: _objectSpread(_objectSpread({}, restDefaults.maskProps), props.maskProps),
|
|
51
|
+
wrapProps: _objectSpread(_objectSpread({}, restDefaults.wrapProps), props.wrapProps),
|
|
52
|
+
triggerProps: _objectSpread(_objectSpread(_objectSpread({}, restDefaults.triggerProps), props.triggerProps), {}, {
|
|
53
|
+
style: _objectSpread(_objectSpread({}, (_restDefaults$trigger = restDefaults.triggerProps) === null || _restDefaults$trigger === void 0 ? void 0 : _restDefaults$trigger.style), props.triggerProps && 'style' in props.triggerProps && _typeof(props.triggerProps.style) === 'object' ? props.triggerProps.style : {})
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
var context = useContext(ReactEasyContext);
|
|
57
|
+
var defaultTitle = useLocalizedText(confirmType === 'delete' ? context.defaultDeletionConfirmTitle : context.defaultConfirmTitle);
|
|
58
|
+
var defaultContent = useLocalizedText(confirmType === 'delete' ? context.defaultDeletionConfirmContent : context.defaultConfirmContent);
|
|
59
|
+
var _mergedProps$triggerC = mergedProps.triggerComponent,
|
|
60
|
+
Trigger = _mergedProps$triggerC === void 0 ? Button : _mergedProps$triggerC,
|
|
61
|
+
_mergedProps$triggerE = mergedProps.triggerEvent,
|
|
62
|
+
triggerEvent = _mergedProps$triggerE === void 0 ? 'onClick' : _mergedProps$triggerE,
|
|
63
|
+
triggerProps = mergedProps.triggerProps,
|
|
64
|
+
danger = mergedProps.danger,
|
|
65
|
+
_mergedProps$title = mergedProps.title,
|
|
66
|
+
title = _mergedProps$title === void 0 ? defaultTitle : _mergedProps$title,
|
|
67
|
+
_mergedProps$content = mergedProps.content,
|
|
68
|
+
content = _mergedProps$content === void 0 ? defaultContent : _mergedProps$content,
|
|
69
|
+
titleColor = mergedProps.titleColor,
|
|
70
|
+
contentColor = mergedProps.contentColor,
|
|
71
|
+
icon = mergedProps.icon,
|
|
72
|
+
iconColor = mergedProps.iconColor,
|
|
73
|
+
okButtonProps = mergedProps.okButtonProps,
|
|
74
|
+
_onOk = mergedProps.onOk,
|
|
75
|
+
afterOk = mergedProps.afterOk,
|
|
76
|
+
children = mergedProps.children,
|
|
77
|
+
restProps = _objectWithoutProperties(mergedProps, _excluded2);
|
|
78
|
+
useContextValidator();
|
|
79
|
+
var _App$useApp = App.useApp(),
|
|
80
|
+
modalFromApp = _App$useApp.modal;
|
|
81
|
+
var modal = modalFromApp !== null && modalFromApp !== void 0 ? modalFromApp : Modal;
|
|
82
|
+
var _useContext = useContext(ReactEasyContext),
|
|
83
|
+
localize = _useContext.localize;
|
|
84
|
+
var _useToken = useToken(),
|
|
85
|
+
_useToken2 = _slicedToArray(_useToken, 2),
|
|
86
|
+
token = _useToken2[1];
|
|
87
|
+
var _useState = useState(),
|
|
88
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
89
|
+
confirmApi = _useState2[0],
|
|
90
|
+
setConfirmApi = _useState2[1];
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
+
var triggerEventArgsRef = useRef(undefined);
|
|
93
|
+
var fallbackColor = danger ? 'danger' : undefined;
|
|
94
|
+
// Text with color
|
|
95
|
+
var coloredText = function coloredText(text, color) {
|
|
96
|
+
var _localize;
|
|
97
|
+
var textContent = typeof text === 'string' ? (_localize = localize === null || localize === void 0 ? void 0 : localize(text)) !== null && _localize !== void 0 ? _localize : text : text;
|
|
98
|
+
if (!color) {
|
|
99
|
+
return textContent;
|
|
100
|
+
}
|
|
101
|
+
if (color === 'primary') {
|
|
102
|
+
return /*#__PURE__*/_jsx(Typography.Text, {
|
|
103
|
+
style: {
|
|
104
|
+
color: token.colorPrimary
|
|
105
|
+
},
|
|
106
|
+
children: textContent
|
|
80
107
|
});
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
[triggerEvent]: (...args) => {
|
|
87
|
-
triggerEventArgsRef.current = args;
|
|
88
|
-
showConfirm();
|
|
89
|
-
if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {
|
|
90
|
-
triggerProps[triggerEvent](...args);
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
}
|
|
94
|
-
: {}), { children: (_b = triggerProps.children) !== null && _b !== void 0 ? _b : children })));
|
|
108
|
+
}
|
|
109
|
+
return textContent ? /*#__PURE__*/_jsx(Typography.Text, {
|
|
110
|
+
type: color,
|
|
111
|
+
children: textContent
|
|
112
|
+
}) : undefined;
|
|
95
113
|
};
|
|
96
|
-
|
|
97
|
-
|
|
114
|
+
|
|
115
|
+
// Show confirm box
|
|
116
|
+
var showConfirm = useRefFunction(function () {
|
|
117
|
+
var _ref, _ref2;
|
|
118
|
+
var api = modal.confirm(_objectSpread({
|
|
119
|
+
title: coloredText(title, (_ref = titleColor !== null && titleColor !== void 0 ? titleColor : fallbackColor) !== null && _ref !== void 0 ? _ref : 'warning'),
|
|
120
|
+
content: coloredText(content, contentColor),
|
|
121
|
+
icon: coloredText(icon, (_ref2 = iconColor !== null && iconColor !== void 0 ? iconColor : fallbackColor) !== null && _ref2 !== void 0 ? _ref2 : 'warning'),
|
|
122
|
+
autoFocusButton: null,
|
|
123
|
+
onOk: function () {
|
|
124
|
+
var _onOk2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
125
|
+
var _triggerEventArgsRef$;
|
|
126
|
+
var result;
|
|
127
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
128
|
+
while (1) switch (_context.prev = _context.next) {
|
|
129
|
+
case 0:
|
|
130
|
+
_context.next = 2;
|
|
131
|
+
return _onOk === null || _onOk === void 0 ? void 0 : _onOk.apply(void 0, _toConsumableArray((_triggerEventArgsRef$ = triggerEventArgsRef.current) !== null && _triggerEventArgsRef$ !== void 0 ? _triggerEventArgsRef$ : []));
|
|
132
|
+
case 2:
|
|
133
|
+
result = _context.sent;
|
|
134
|
+
afterOk === null || afterOk === void 0 || afterOk(result);
|
|
135
|
+
case 4:
|
|
136
|
+
case "end":
|
|
137
|
+
return _context.stop();
|
|
138
|
+
}
|
|
139
|
+
}, _callee);
|
|
140
|
+
}));
|
|
141
|
+
function onOk() {
|
|
142
|
+
return _onOk2.apply(this, arguments);
|
|
143
|
+
}
|
|
144
|
+
return onOk;
|
|
145
|
+
}(),
|
|
146
|
+
okButtonProps: _objectSpread(_objectSpread({}, danger ? {
|
|
147
|
+
type: 'primary',
|
|
148
|
+
danger: true
|
|
149
|
+
} : {}), okButtonProps !== null && okButtonProps !== void 0 ? okButtonProps : {})
|
|
150
|
+
}, restProps));
|
|
151
|
+
setConfirmApi(api);
|
|
152
|
+
return api;
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// Output ref
|
|
156
|
+
useImperativeHandle(ref, function () {
|
|
157
|
+
return _objectSpread({
|
|
158
|
+
show: showConfirm
|
|
159
|
+
}, confirmApi);
|
|
160
|
+
}, [showConfirm, confirmApi]);
|
|
161
|
+
|
|
162
|
+
// Render trigger component
|
|
163
|
+
return /*#__PURE__*/_jsx(Trigger, _objectSpread(_objectSpread(_objectSpread({}, triggerProps), triggerEvent ? _defineProperty({}, triggerEvent, function () {
|
|
164
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
165
|
+
args[_key] = arguments[_key];
|
|
166
|
+
}
|
|
167
|
+
triggerEventArgsRef.current = args;
|
|
168
|
+
showConfirm();
|
|
169
|
+
if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {
|
|
170
|
+
triggerProps[triggerEvent].apply(triggerProps, args);
|
|
171
|
+
}
|
|
172
|
+
}) : {}), {}, {
|
|
173
|
+
children: (_children = triggerProps.children) !== null && _children !== void 0 ? _children : children
|
|
174
|
+
}));
|
|
175
|
+
};
|
|
176
|
+
Render.displayName = 'ConfirmAction';
|
|
177
|
+
return Render;
|
|
98
178
|
};
|
|
179
|
+
|
|
99
180
|
/**
|
|
100
181
|
* **EN:** Add default properties to the ConfirmAction component
|
|
101
182
|
*
|
|
@@ -104,47 +185,72 @@ defaultProps) => {
|
|
|
104
185
|
* @param WrappedComponent ConfirmAction component | ConfirmAction组件
|
|
105
186
|
* @param defaultProps Default properties | 默认属性
|
|
106
187
|
*/
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
188
|
+
export var withDefaultConfirmActionProps = function withDefaultConfirmActionProps(WrappedComponent, defaultProps) {
|
|
189
|
+
var WithDefaultProps = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
190
|
+
var mergedProps = _objectSpread(_objectSpread(_objectSpread({}, defaultProps), props), {}, {
|
|
191
|
+
triggerProps: _objectSpread(_objectSpread({}, defaultProps === null || defaultProps === void 0 ? void 0 : defaultProps.triggerProps), props.triggerProps)
|
|
111
192
|
});
|
|
112
|
-
|
|
113
|
-
|
|
193
|
+
return /*#__PURE__*/_jsx(WrappedComponent, _objectSpread({
|
|
194
|
+
ref: ref
|
|
195
|
+
}, mergedProps));
|
|
196
|
+
});
|
|
197
|
+
WithDefaultProps.displayName = 'ForwardedRef(WithDefaultProps)';
|
|
198
|
+
return WithDefaultProps;
|
|
114
199
|
};
|
|
115
|
-
|
|
116
|
-
|
|
200
|
+
var renderConfirmAction = genRenderer({
|
|
201
|
+
confirmType: 'normal'
|
|
117
202
|
});
|
|
118
|
-
|
|
203
|
+
var forwarded = /*#__PURE__*/forwardRef(renderConfirmAction);
|
|
119
204
|
forwarded.displayName = 'ForwardedRef(ConfirmAction)';
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* **EN:** Interface of generic type component
|
|
208
|
+
*
|
|
209
|
+
* **CN:** 泛型组件的接口
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* **EN:** Interface of specific type component
|
|
214
|
+
*
|
|
215
|
+
* **CN:** 具体类型组件的接口
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* **EN:** Props definition of specific type component
|
|
220
|
+
*
|
|
221
|
+
* **CN:** 具体类型组件的Props定义
|
|
222
|
+
*/
|
|
223
|
+
|
|
120
224
|
/**
|
|
121
225
|
* **EN:** Confirm box component with trigger
|
|
122
226
|
*
|
|
123
227
|
* **CN:** 带触发器的确认框组件
|
|
124
228
|
*/
|
|
125
|
-
|
|
229
|
+
var ConfirmAction = forwarded;
|
|
126
230
|
// Type of button
|
|
127
231
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
232
|
ConfirmAction.Button = withDefaultConfirmActionProps(forwarded, {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
233
|
+
triggerComponent: Button,
|
|
234
|
+
triggerEvent: 'onClick',
|
|
235
|
+
triggerProps: {}
|
|
132
236
|
});
|
|
133
237
|
// Type of switch
|
|
134
238
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
135
239
|
ConfirmAction.Switch = withDefaultConfirmActionProps(forwarded, {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
240
|
+
triggerComponent: Switch,
|
|
241
|
+
triggerEvent: 'onChange',
|
|
242
|
+
triggerProps: {}
|
|
139
243
|
});
|
|
140
244
|
// Type of link
|
|
141
245
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
246
|
ConfirmAction.Link = withDefaultConfirmActionProps(forwarded, {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
247
|
+
triggerComponent: Typography.Link,
|
|
248
|
+
triggerEvent: 'onClick',
|
|
249
|
+
triggerProps: {
|
|
250
|
+
style: {
|
|
251
|
+
whiteSpace: 'nowrap'
|
|
252
|
+
}
|
|
253
|
+
}
|
|
148
254
|
});
|
|
149
255
|
export default ConfirmAction;
|
|
150
256
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ConfirmAction/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG9D,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAG9C,OAAO,mBAAmB,MAAM,iCAAiC,CAAC;AAClE,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,gBAAgB,MAAM,2BAA2B,CAAC;AA8EzD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;AACzB,8DAA8D;AAC9D,YAA4F,EAC5F,EAAE;IACF,MAAM,MAAM,GAAG,CACb,KAAgC,EAChC,GAAmC,EACnC,EAAE;;QACF,MAAM,EAAE,WAAW,KAAsB,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,CAA0B,SAAgB,EAAE;IAC9F,gBAAgB,EAAE,MAAM;IACxB,YAAY,EAAE,UAAU;IACxB,YAAY,EAAE,EAAE;CACjB,CAAC,CAAC;AACH,eAAe;AACf,8DAA8D;AAC9D,aAAa,CAAC,IAAI,GAAG,6BAA6B,CAAuB,SAAgB,EAAE;IACzF,gBAAgB,EAAE,UAAU,CAAC,IAAI;IACjC,YAAY,EAAE,SAAS;IACvB,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;KAChC;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","return","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","_catch","delegateYield","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","iter","Array","from","isArray","_arrayLikeToArray","asyncGeneratorStep","gen","reject","_next","_throw","key","info","error","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","minLen","toString","test","len","arr2","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","_objectSpread","_defineProperty","getOwnPropertyDescriptors","defineProperties","obj","_toPropertyKey","_toPrimitive","String","toPrimitive","Number","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","forwardRef","useContext","useImperativeHandle","useRef","useState","App","Button","Modal","Switch","Typography","useToken","useContextValidator","useLocalizedText","useRefFunction","ReactEasyContext","jsx","_jsx","genRenderer","defaultProps","Render","props","ref","_restDefaults$trigger","_children","confirmType","restDefaults","_excluded","mergedProps","okButtonProps","cancelButtonProps","bodyProps","maskProps","wrapProps","triggerProps","style","context","defaultTitle","defaultDeletionConfirmTitle","defaultConfirmTitle","defaultContent","defaultDeletionConfirmContent","defaultConfirmContent","_mergedProps$triggerC","triggerComponent","Trigger","_mergedProps$triggerE","triggerEvent","danger","_mergedProps$title","title","_mergedProps$content","content","titleColor","contentColor","icon","iconColor","onOk","afterOk","children","restProps","_excluded2","_App$useApp","useApp","modalFromApp","modal","_useContext","localize","_useToken","_useToken2","token","_useState","_useState2","confirmApi","setConfirmApi","triggerEventArgsRef","fallbackColor","coloredText","text","color","_localize","textContent","Text","colorPrimary","showConfirm","_ref","_ref2","api","confirm","autoFocusButton","_onOk2","_callee","_triggerEventArgsRef$","result","_callee$","_context","current","show","_len","_key","withDefaultConfirmActionProps","WrappedComponent","WithDefaultProps","renderConfirmAction","forwarded","ConfirmAction","Link","whiteSpace"],"sources":["../../../src/components/ConfirmAction/index.tsx"],"sourcesContent":["import type { ComponentType, ForwardedRef, PropsWithoutRef, ReactElement, ReactNode, RefAttributes } from 'react';\nimport { forwardRef, useContext, useImperativeHandle, useRef, useState } from 'react';\nimport type { ButtonProps, ModalFuncProps, SwitchProps } from 'antd';\nimport { App, Button, Modal, Switch, Typography } from 'antd';\nimport type { ModalFunc } from 'antd/es/modal/confirm';\nimport type confirm from 'antd/es/modal/confirm';\nimport useToken from 'antd/es/theme/useToken';\nimport type { LinkProps } from 'antd/es/typography/Link';\nimport type { TextProps } from 'antd/es/typography/Text';\nimport useContextValidator from '../../hooks/useContextValidator';\nimport useLocalizedText from '../../hooks/useLocalizedText';\nimport useRefFunction from '../../hooks/useRefFunction';\nimport ReactEasyContext from '../ConfigProvider/context';\n\nexport type ConfirmActionProps<TP extends object, E extends keyof TP> = Omit<ModalFuncProps, 'onOk'> &\n ConfirmActionTrigger<TP, E> & {\n /**\n * **EN:** Whether to display in red danger mode, which will automatically affect the color of\n * the title, icon, and confirm button. Default is `false`, for DeleteConfirmAction, the\n * defaults is `true`.\n *\n * - You can explicitly set `titleColor`, `iconColor`, and `okButtonProps.type` to override\n *\n * **CN:** 是否显示为红色危险模式,会自动影响标题、图标和确认按钮的颜色。默认`false`,DeleteConfirmAction组件的默认值为`true`。\n *\n * - 可以显式设置`titleColor`、`iconColor`和`okButtonProps.type`来覆盖\n */\n danger?: boolean;\n /**\n * **EN:** The color of confirm box title, default is `warning`\n *\n * **CN:** 弹框标题颜色,默认`warning`\n */\n titleColor?: TextProps['type'] | 'primary';\n /**\n * **EN:** The color of confirm box content\n *\n * **CN:** 弹框内容文本颜色\n */\n contentColor?: TextProps['type'] | 'primary';\n /**\n * **EN:** The color of confirm box title icon, default is the same as `titleColor`\n *\n * **CN:** 弹框标题图标颜色,默认与`titleColor`相同\n */\n iconColor?: TextProps['type'] | 'primary';\n /**\n * **EN:** Callback when click confirm button\n *\n * **CN:** 点击确认按钮的回调\n */\n // @ts-expect-error: because TP[E] should be casted to function type\n onOk?: (...args: Parameters<TP[E]>) => unknown | Promise<unknown>;\n /**\n * **EN:** Callback after confirm event, won't trigger if failed, the argument is the return\n * value of `onOk`\n *\n * **CN:** 确认事件完成后的回调,失败时不会触发,参数为`onOk`的返回值\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n afterOk?: (data?: any) => void;\n };\n\nexport interface ConfirmActionTrigger<TP extends object, E extends keyof TP> {\n /**\n * **EN:** Trigger component, trigger to show confirm box\n *\n * **CN:** 触发器组件,触发显示确认弹框\n */\n triggerComponent?: ComponentType<TP>;\n /**\n * **EN:** Props of trigger component\n *\n * **CN:** 触发器组件的Props属性\n */\n triggerProps?: TP;\n /**\n * **EN:** The event name that triggers the dialog\n *\n * **CN:** 触发弹窗的事件名称\n *\n * - `Button`: 'onClick'\n * - `Switch`: 'onChange'\n * - `Link`: 'onClick'\n */\n triggerEvent?: E;\n /**\n * **EN:** Custom trigger content\n *\n * **CN:** 自定义触发器内容\n */\n children?: ReactNode;\n}\nexport type ConfirmActionRef = ReturnType<typeof confirm> & {\n /**\n * **EN:** Show confirm box\n *\n * **CN:** 显示确认弹框\n */\n show: (props?: Parameters<ModalFunc>[0]) => ReturnType<ModalFunc>;\n};\n\n/**\n * **EN:** Generate a confirm box component\n *\n * **CN:** 生成一个确认弹框组件\n *\n * @param defaultProps Default props | 默认属性\n *\n * @returns Component render method | 组件render方法\n */\nexport const genRenderer = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n defaultProps: Partial<ConfirmActionProps<any, never>> & { confirmType: 'normal' | 'delete' }\n) => {\n const Render = <TP extends object, E extends keyof TP>(\n props: ConfirmActionProps<TP, E>,\n ref: ForwardedRef<ConfirmActionRef>\n ) => {\n const { confirmType, ...restDefaults } = defaultProps;\n const mergedProps: ConfirmActionProps<TP, E> = {\n ...restDefaults,\n ...props,\n okButtonProps: {\n ...restDefaults.okButtonProps,\n ...props.okButtonProps,\n },\n cancelButtonProps: {\n ...restDefaults.cancelButtonProps,\n ...props.cancelButtonProps,\n },\n bodyProps: {\n ...restDefaults.bodyProps,\n ...props.bodyProps,\n },\n maskProps: {\n ...restDefaults.maskProps,\n ...props.maskProps,\n },\n wrapProps: {\n ...restDefaults.wrapProps,\n ...props.wrapProps,\n },\n triggerProps: {\n ...restDefaults.triggerProps,\n ...props.triggerProps,\n style: {\n ...restDefaults.triggerProps?.style,\n ...(props.triggerProps && 'style' in props.triggerProps && typeof props.triggerProps.style === 'object'\n ? props.triggerProps.style\n : {}),\n },\n } as TP,\n };\n const context = useContext(ReactEasyContext);\n const defaultTitle = useLocalizedText(\n confirmType === 'delete' ? context.defaultDeletionConfirmTitle : context.defaultConfirmTitle\n );\n const defaultContent = useLocalizedText(\n confirmType === 'delete' ? context.defaultDeletionConfirmContent : context.defaultConfirmContent\n );\n const {\n triggerComponent: Trigger = Button,\n triggerEvent = 'onClick' as E,\n triggerProps,\n danger,\n title = defaultTitle,\n content = defaultContent,\n titleColor,\n contentColor,\n icon,\n iconColor,\n okButtonProps,\n onOk,\n afterOk,\n children,\n ...restProps\n } = mergedProps;\n\n useContextValidator();\n\n const { modal: modalFromApp } = App.useApp();\n const modal = modalFromApp ?? Modal;\n const { localize } = useContext(ReactEasyContext);\n const [, token] = useToken();\n const [confirmApi, setConfirmApi] = useState<ReturnType<typeof confirm>>();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const triggerEventArgsRef = useRef<any[]>(undefined);\n\n const fallbackColor = danger ? 'danger' : undefined;\n // Text with color\n const coloredText = (text: ReactNode, color?: TextProps['type'] | 'primary') => {\n const textContent = typeof text === 'string' ? (localize?.(text) ?? text) : text;\n if (!color) {\n return textContent;\n }\n if (color === 'primary') {\n return <Typography.Text style={{ color: token.colorPrimary }}>{textContent}</Typography.Text>;\n }\n return textContent ? <Typography.Text type={color}>{textContent}</Typography.Text> : undefined;\n };\n\n // Show confirm box\n const showConfirm: ConfirmActionRef['show'] = useRefFunction(() => {\n const api = modal.confirm({\n title: coloredText(title, titleColor ?? fallbackColor ?? 'warning'),\n content: coloredText(content, contentColor),\n icon: coloredText(icon, iconColor ?? fallbackColor ?? 'warning'),\n autoFocusButton: null,\n onOk: async () => {\n const result = await onOk?.(...((triggerEventArgsRef.current ?? []) as Parameters<typeof onOk>));\n afterOk?.(result);\n },\n okButtonProps: {\n ...(danger ? { type: 'primary', danger: true } : {}),\n ...(okButtonProps ?? {}),\n },\n ...restProps,\n });\n setConfirmApi(api);\n return api;\n });\n\n // Output ref\n useImperativeHandle(ref, () => ({ show: showConfirm, ...confirmApi! }), [showConfirm, confirmApi]);\n\n // Render trigger component\n return (\n <Trigger\n {...triggerProps}\n // Trigger event\n {...((triggerEvent\n ? {\n [triggerEvent]: (...args: any[]) => {\n triggerEventArgsRef.current = args;\n showConfirm();\n if (triggerProps && typeof triggerProps[triggerEvent] === 'function') {\n (triggerProps[triggerEvent] as (...args: any[]) => void)(...args);\n }\n },\n }\n : {}) as TP)}\n >\n {(triggerProps as { children?: ReactNode }).children ?? children}\n </Trigger>\n );\n };\n Render.displayName = 'ConfirmAction';\n return Render;\n};\n\n/**\n * **EN:** Add default properties to the ConfirmAction component\n *\n * **CN:** 给ConfirmAction组件添加默认属性\n *\n * @param WrappedComponent ConfirmAction component | ConfirmAction组件\n * @param defaultProps Default properties | 默认属性\n */\nexport const withDefaultConfirmActionProps = <TP extends object, E extends keyof TP>(\n WrappedComponent: ComponentType<PropsWithoutRef<ConfirmActionProps<TP, E>> & RefAttributes<ConfirmActionRef>>,\n defaultProps?: Partial<ConfirmActionProps<TP, E>>\n) => {\n const WithDefaultProps = forwardRef<ConfirmActionRef, ConfirmActionProps<TP, E>>((props, ref) => {\n const mergedProps: ConfirmActionProps<TP, E> = {\n ...defaultProps,\n ...props,\n triggerProps: {\n ...defaultProps?.triggerProps,\n ...props.triggerProps,\n } as TP,\n };\n return <WrappedComponent ref={ref} {...mergedProps} />;\n });\n WithDefaultProps.displayName = 'ForwardedRef(WithDefaultProps)';\n return WithDefaultProps;\n};\n\nconst renderConfirmAction = genRenderer({\n confirmType: 'normal',\n});\nconst forwarded = forwardRef(renderConfirmAction);\nforwarded.displayName = 'ForwardedRef(ConfirmAction)';\n\n/**\n * **EN:** Interface of generic type component\n *\n * **CN:** 泛型组件的接口\n */\nexport type GenericConfirmActionInterface = <TP extends object, E extends keyof TP>(\n props: PropsWithoutRef<TypedConfirmActionProps<TP, E>> & RefAttributes<ConfirmActionRef>\n) => ReactElement;\n\n/**\n * **EN:** Interface of specific type component\n *\n * **CN:** 具体类型组件的接口\n */\nexport type TypedConfirmActionInterface<TP extends object, E extends keyof TP> = ComponentType<\n PropsWithoutRef<TypedConfirmActionProps<TP, E>> & RefAttributes<ConfirmActionRef>\n>;\n\n/**\n * **EN:** Props definition of specific type component\n *\n * **CN:** 具体类型组件的Props定义\n */\ntype TypedConfirmActionProps<TP extends object, E extends keyof TP> = Omit<\n ConfirmActionProps<TP, E>,\n 'triggerComponent' | 'triggerEvent'\n>;\nexport type ConfirmActionWithStatic = GenericConfirmActionInterface & {\n /**\n * **EN:** Confirm box with button trigger\n *\n * **CN:** 按钮类型的确认框\n */\n Button: TypedConfirmActionInterface<ButtonProps, 'onClick'>;\n /**\n * **EN:** Confirm box with switch trigger\n *\n * **CN:** 开关类型的确认框\n */\n Switch: TypedConfirmActionInterface<SwitchProps, 'onChange'>;\n /**\n * **EN:** Confirm box with link trigger\n *\n * **CN:** 链接类型的确认框\n */\n Link: TypedConfirmActionInterface<LinkProps, 'onClick'>;\n};\n\n/**\n * **EN:** Confirm box component with trigger\n *\n * **CN:** 带触发器的确认框组件\n */\nconst ConfirmAction = forwarded as unknown as ConfirmActionWithStatic;\n// Type of button\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfirmAction.Button = withDefaultConfirmActionProps<ButtonProps, 'onClick'>(forwarded as any, {\n triggerComponent: Button,\n triggerEvent: 'onClick',\n triggerProps: {},\n});\n// Type of switch\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfirmAction.Switch = withDefaultConfirmActionProps<SwitchProps, 'onChange'>(forwarded as any, {\n triggerComponent: Switch,\n triggerEvent: 'onChange',\n triggerProps: {},\n});\n// Type of link\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nConfirmAction.Link = withDefaultConfirmActionProps<LinkProps, 'onClick'>(forwarded as any, {\n triggerComponent: Typography.Link,\n triggerEvent: 'onClick',\n triggerProps: {\n style: { whiteSpace: 'nowrap' },\n },\n});\n\nexport default ConfirmAction;\n"],"mappings":";;+CACA,qJAAAA,mBAAA,YAAAA,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AACgG,IAAI;EACjC3D,YAAY,EAAE,SAAS;EACvBb,YAAY,EAAE;IACZC,KAAK,EAAE;MAAEwE,UAAU,EAAE;IAAS;EAChC;AACF,CAAC,CAAC;AAEF,eAAeF,aAAa"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { forwardRef } from 'react';
|
|
3
2
|
import { Button, Switch, Typography } from 'antd';
|
|
4
3
|
import { CloseCircleFilled } from '@ant-design/icons';
|
|
5
|
-
import { genRenderer, withDefaultConfirmActionProps } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { genRenderer, withDefaultConfirmActionProps } from "../ConfirmAction";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
var renderDeleteConfirmAction = genRenderer({
|
|
7
|
+
confirmType: 'delete',
|
|
8
|
+
danger: true,
|
|
9
|
+
icon: /*#__PURE__*/_jsx(CloseCircleFilled, {})
|
|
11
10
|
});
|
|
12
|
-
|
|
11
|
+
var forwarded = /*#__PURE__*/forwardRef(renderDeleteConfirmAction);
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* **EN:** Delete operation confirmation box
|
|
15
15
|
*
|
|
16
16
|
* **CN:** 删除操作确认框
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
var DeleteConfirmAction = forwarded;
|
|
19
19
|
/**
|
|
20
20
|
* **EN:** Deletion confirmation box with button type
|
|
21
21
|
*
|
|
@@ -23,9 +23,9 @@ const DeleteConfirmAction = forwarded;
|
|
|
23
23
|
*/
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
25
|
DeleteConfirmAction.Button = withDefaultConfirmActionProps(forwarded, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
triggerComponent: Button,
|
|
27
|
+
triggerEvent: 'onClick',
|
|
28
|
+
triggerProps: {}
|
|
29
29
|
});
|
|
30
30
|
/**
|
|
31
31
|
* **EN:** Deletion confirmation box with switch type
|
|
@@ -34,9 +34,9 @@ DeleteConfirmAction.Button = withDefaultConfirmActionProps(forwarded, {
|
|
|
34
34
|
*/
|
|
35
35
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
36
|
DeleteConfirmAction.Switch = withDefaultConfirmActionProps(forwarded, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
triggerComponent: Switch,
|
|
38
|
+
triggerEvent: 'onChange',
|
|
39
|
+
triggerProps: {}
|
|
40
40
|
});
|
|
41
41
|
/**
|
|
42
42
|
* **EN:** Deletion confirmation box with link type
|
|
@@ -45,11 +45,13 @@ DeleteConfirmAction.Switch = withDefaultConfirmActionProps(forwarded, {
|
|
|
45
45
|
*/
|
|
46
46
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
47
|
DeleteConfirmAction.Link = withDefaultConfirmActionProps(forwarded, {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
triggerComponent: Typography.Link,
|
|
49
|
+
triggerEvent: 'onClick',
|
|
50
|
+
triggerProps: {
|
|
51
|
+
style: {
|
|
52
|
+
whiteSpace: 'nowrap'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
53
55
|
});
|
|
54
56
|
export default DeleteConfirmAction;
|
|
55
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["forwardRef","Button","Switch","Typography","CloseCircleFilled","genRenderer","withDefaultConfirmActionProps","jsx","_jsx","renderDeleteConfirmAction","confirmType","danger","icon","forwarded","DeleteConfirmAction","triggerComponent","triggerEvent","triggerProps","Link","style","whiteSpace"],"sources":["../../../src/components/DeleteConfirmAction/index.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport type { ButtonProps, SwitchProps } from 'antd';\nimport { Button, Switch, Typography } from 'antd';\nimport type { LinkProps } from 'antd/es/typography/Link';\nimport { CloseCircleFilled } from '@ant-design/icons';\nimport { type ConfirmActionWithStatic, genRenderer, withDefaultConfirmActionProps } from '../ConfirmAction';\n\nconst renderDeleteConfirmAction = genRenderer({\n confirmType: 'delete',\n danger: true,\n icon: <CloseCircleFilled />,\n});\nconst forwarded = forwardRef(renderDeleteConfirmAction);\n\n/**\n * **EN:** Delete operation confirmation box\n *\n * **CN:** 删除操作确认框\n */\nconst DeleteConfirmAction = forwarded as unknown as ConfirmActionWithStatic;\n/**\n * **EN:** Deletion confirmation box with button type\n *\n * **CN:** 按钮类型的删除确认框\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nDeleteConfirmAction.Button = withDefaultConfirmActionProps<ButtonProps, 'onClick'>(forwarded as any, {\n triggerComponent: Button,\n triggerEvent: 'onClick',\n triggerProps: {},\n});\n/**\n * **EN:** Deletion confirmation box with switch type\n *\n * **CN:** 开关类型的删除确认框\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nDeleteConfirmAction.Switch = withDefaultConfirmActionProps<SwitchProps, 'onChange'>(forwarded as any, {\n triggerComponent: Switch,\n triggerEvent: 'onChange',\n triggerProps: {},\n});\n/**\n * **EN:** Deletion confirmation box with link type\n *\n * **CN:** 链接类型的删除确认框\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nDeleteConfirmAction.Link = withDefaultConfirmActionProps<LinkProps, 'onClick'>(forwarded as any, {\n triggerComponent: Typography.Link,\n triggerEvent: 'onClick',\n triggerProps: {\n style: { whiteSpace: 'nowrap' },\n },\n});\n\nexport default DeleteConfirmAction;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,MAAM,EAAEC,MAAM,EAAEC,UAAU,QAAQ,MAAM;AAEjD,SAASC,iBAAiB,QAAQ,mBAAmB;AACrD,SAAuCC,WAAW,EAAEC,6BAA6B;AAA2B,SAAAC,GAAA,IAAAC,IAAA;AAE5G,IAAMC,yBAAyB,GAAGJ,WAAW,CAAC;EAC5CK,WAAW,EAAE,QAAQ;EACrBC,MAAM,EAAE,IAAI;EACZC,IAAI,eAAEJ,IAAA,CAACJ,iBAAiB,IAAE;AAC5B,CAAC,CAAC;AACF,IAAMS,SAAS,gBAAGb,UAAU,CAACS,yBAAyB,CAAC;;AAEvD;AACA;AACA;AACA;AACA;AACA,IAAMK,mBAAmB,GAAGD,SAA+C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACAC,mBAAmB,CAACb,MAAM,GAAGK,6BAA6B,CAAyBO,SAAS,EAAS;EACnGE,gBAAgB,EAAEd,MAAM;EACxBe,YAAY,EAAE,SAAS;EACvBC,YAAY,EAAE,CAAC;AACjB,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACAH,mBAAmB,CAACZ,MAAM,GAAGI,6BAA6B,CAA0BO,SAAS,EAAS;EACpGE,gBAAgB,EAAEb,MAAM;EACxBc,YAAY,EAAE,UAAU;EACxBC,YAAY,EAAE,CAAC;AACjB,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACAH,mBAAmB,CAACI,IAAI,GAAGZ,6BAA6B,CAAuBO,SAAS,EAAS;EAC/FE,gBAAgB,EAAEZ,UAAU,CAACe,IAAI;EACjCF,YAAY,EAAE,SAAS;EACvBC,YAAY,EAAE;IACZE,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAS;EAChC;AACF,CAAC,CAAC;AAEF,eAAeN,mBAAmB"}
|