@pisell/core 0.0.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/README.md +1 -0
- package/es/app/app.d.ts +101 -0
- package/es/app/app.js +177 -0
- package/es/app/const.d.ts +4 -0
- package/es/app/const.js +6 -0
- package/es/app/index.d.ts +14 -0
- package/es/app/index.js +52 -0
- package/es/applicationManager/application.d.ts +197 -0
- package/es/applicationManager/application.js +469 -0
- package/es/applicationManager/index.d.ts +19 -0
- package/es/applicationManager/index.js +206 -0
- package/es/aws/index.d.ts +16 -0
- package/es/aws/index.js +76 -0
- package/es/cmd/const.d.ts +11 -0
- package/es/cmd/const.js +13 -0
- package/es/cmd/index.d.ts +13 -0
- package/es/cmd/index.js +91 -0
- package/es/cmd/type.d.ts +5 -0
- package/es/cmd/type.js +1 -0
- package/es/communicationManager/index.d.ts +59 -0
- package/es/communicationManager/index.js +174 -0
- package/es/config.d.ts +3 -0
- package/es/config.js +14 -0
- package/es/cookie/index.d.ts +13 -0
- package/es/cookie/index.js +47 -0
- package/es/css/global.less +73 -0
- package/es/css/index.less +31 -0
- package/es/css/variables.css +84 -0
- package/es/data/index.d.ts +8 -0
- package/es/data/index.js +16 -0
- package/es/history/config.d.ts +24 -0
- package/es/history/config.js +43 -0
- package/es/history/index.d.ts +26 -0
- package/es/history/index.js +80 -0
- package/es/history/type.d.ts +2 -0
- package/es/history/type.js +1 -0
- package/es/hooks/index.d.ts +12 -0
- package/es/hooks/index.js +13 -0
- package/es/hooks/useDelayedValue/index.d.ts +2 -0
- package/es/hooks/useDelayedValue/index.js +26 -0
- package/es/hooks/useDispatch/index.d.ts +2 -0
- package/es/hooks/useDispatch/index.js +2 -0
- package/es/hooks/useLowCode/index.d.ts +13 -0
- package/es/hooks/useLowCode/index.js +74 -0
- package/es/hooks/useStore/index.d.ts +6 -0
- package/es/hooks/useStore/index.js +11 -0
- package/es/index.d.ts +8 -0
- package/es/index.js +10 -0
- package/es/indexDB/index.d.ts +296 -0
- package/es/indexDB/index.js +1619 -0
- package/es/locales/en.d.ts +3 -0
- package/es/locales/en.js +5 -0
- package/es/locales/index.d.ts +39 -0
- package/es/locales/index.js +199 -0
- package/es/locales/original.d.ts +3 -0
- package/es/locales/original.js +7 -0
- package/es/locales/type.d.ts +19 -0
- package/es/locales/type.js +1 -0
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +5 -0
- package/es/locales/zh-HK.d.ts +3 -0
- package/es/locales/zh-HK.js +5 -0
- package/es/logger/feishu.d.ts +11 -0
- package/es/logger/feishu.js +50 -0
- package/es/logger/index.d.ts +135 -0
- package/es/logger/index.js +870 -0
- package/es/menuManager/hooks.d.ts +17 -0
- package/es/menuManager/hooks.js +136 -0
- package/es/menuManager/index.d.ts +28 -0
- package/es/menuManager/index.js +165 -0
- package/es/models/global.d.ts +32 -0
- package/es/models/global.js +66 -0
- package/es/models/index.d.ts +45 -0
- package/es/models/index.js +65 -0
- package/es/models/type.d.ts +2 -0
- package/es/models/type.js +1 -0
- package/es/plugin/index.d.ts +0 -0
- package/es/plugin/index.js +0 -0
- package/es/pubsub/example.d.ts +5 -0
- package/es/pubsub/example.js +92 -0
- package/es/pubsub/index.d.ts +73 -0
- package/es/pubsub/index.js +166 -0
- package/es/render/index.d.ts +0 -0
- package/es/render/index.js +0 -0
- package/es/request/cache.d.ts +46 -0
- package/es/request/cache.js +372 -0
- package/es/request/cancelToken.d.ts +38 -0
- package/es/request/cancelToken.js +59 -0
- package/es/request/config.d.ts +3 -0
- package/es/request/config.js +63 -0
- package/es/request/constants.d.ts +2 -0
- package/es/request/constants.js +6 -0
- package/es/request/index.d.ts +24 -0
- package/es/request/index.js +267 -0
- package/es/request/pisell2Request.d.ts +6 -0
- package/es/request/pisell2Request.js +62 -0
- package/es/request/type.d.ts +57 -0
- package/es/request/type.js +10 -0
- package/es/request/utils.d.ts +46 -0
- package/es/request/utils.js +147 -0
- package/es/routes/config.d.ts +7 -0
- package/es/routes/config.js +17 -0
- package/es/routes/index.d.ts +28 -0
- package/es/routes/index.js +151 -0
- package/es/socket/components/SocketMonitorPage.d.ts +6 -0
- package/es/socket/components/SocketMonitorPage.js +485 -0
- package/es/socket/components/index.d.ts +2 -0
- package/es/socket/components/index.js +2 -0
- package/es/socket/constants.d.ts +33 -0
- package/es/socket/constants.js +39 -0
- package/es/socket/events.d.ts +31 -0
- package/es/socket/events.js +19 -0
- package/es/socket/heartbeat.d.ts +66 -0
- package/es/socket/heartbeat.js +184 -0
- package/es/socket/index.d.ts +61 -0
- package/es/socket/index.js +246 -0
- package/es/socket/monitor.d.ts +169 -0
- package/es/socket/monitor.js +448 -0
- package/es/socket/reconnect.d.ts +61 -0
- package/es/socket/reconnect.js +199 -0
- package/es/socket/socket.d.ts +130 -0
- package/es/socket/socket.js +613 -0
- package/es/socket/types.d.ts +85 -0
- package/es/socket/types.js +35 -0
- package/es/storage/index.d.ts +17 -0
- package/es/storage/index.js +46 -0
- package/es/tasks/index.d.ts +127 -0
- package/es/tasks/index.js +1119 -0
- package/es/tasks/scheduledTasksExample.d.ts +61 -0
- package/es/tasks/scheduledTasksExample.js +351 -0
- package/es/tasks/type.d.ts +100 -0
- package/es/tasks/type.js +1 -0
- package/es/tasks/useTasks.d.ts +5 -0
- package/es/tasks/useTasks.js +25 -0
- package/es/type.d.ts +2 -0
- package/es/type.js +1 -0
- package/es/utils/adaptiveThrottle/index.d.ts +36 -0
- package/es/utils/adaptiveThrottle/index.js +136 -0
- package/es/variables/VariablesProvider.d.ts +7 -0
- package/es/variables/VariablesProvider.js +12 -0
- package/es/variables/config.d.ts +3 -0
- package/es/variables/config.js +16 -0
- package/es/variables/index.d.ts +6 -0
- package/es/variables/index.js +5 -0
- package/es/variables/type.d.ts +2 -0
- package/es/variables/type.js +1 -0
- package/es/website/index.d.ts +6 -0
- package/es/website/index.js +65 -0
- package/lib/app/app.d.ts +101 -0
- package/lib/app/app.js +171 -0
- package/lib/app/const.d.ts +4 -0
- package/lib/app/const.js +33 -0
- package/lib/app/index.d.ts +14 -0
- package/lib/app/index.js +76 -0
- package/lib/applicationManager/application.d.ts +197 -0
- package/lib/applicationManager/application.js +280 -0
- package/lib/applicationManager/index.d.ts +19 -0
- package/lib/applicationManager/index.js +88 -0
- package/lib/aws/index.d.ts +16 -0
- package/lib/aws/index.js +67 -0
- package/lib/cmd/const.d.ts +11 -0
- package/lib/cmd/const.js +39 -0
- package/lib/cmd/index.d.ts +13 -0
- package/lib/cmd/index.js +96 -0
- package/lib/cmd/type.d.ts +5 -0
- package/lib/cmd/type.js +17 -0
- package/lib/communicationManager/index.d.ts +59 -0
- package/lib/communicationManager/index.js +102 -0
- package/lib/config.d.ts +3 -0
- package/lib/config.js +36 -0
- package/lib/cookie/index.d.ts +13 -0
- package/lib/cookie/index.js +62 -0
- package/lib/css/global.less +73 -0
- package/lib/css/index.less +31 -0
- package/lib/css/variables.css +84 -0
- package/lib/data/index.d.ts +8 -0
- package/lib/data/index.js +38 -0
- package/lib/history/config.d.ts +24 -0
- package/lib/history/config.js +41 -0
- package/lib/history/index.d.ts +26 -0
- package/lib/history/index.js +99 -0
- package/lib/history/type.d.ts +2 -0
- package/lib/history/type.js +17 -0
- package/lib/hooks/index.d.ts +12 -0
- package/lib/hooks/index.js +44 -0
- package/lib/hooks/useDelayedValue/index.d.ts +2 -0
- package/lib/hooks/useDelayedValue/index.js +36 -0
- package/lib/hooks/useDispatch/index.d.ts +2 -0
- package/lib/hooks/useDispatch/index.js +26 -0
- package/lib/hooks/useLowCode/index.d.ts +13 -0
- package/lib/hooks/useLowCode/index.js +75 -0
- package/lib/hooks/useStore/index.d.ts +6 -0
- package/lib/hooks/useStore/index.js +33 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +58 -0
- package/lib/indexDB/index.d.ts +296 -0
- package/lib/indexDB/index.js +767 -0
- package/lib/locales/en.d.ts +3 -0
- package/lib/locales/en.js +29 -0
- package/lib/locales/index.d.ts +39 -0
- package/lib/locales/index.js +159 -0
- package/lib/locales/original.d.ts +3 -0
- package/lib/locales/original.js +31 -0
- package/lib/locales/type.d.ts +19 -0
- package/lib/locales/type.js +17 -0
- package/lib/locales/zh-CN.d.ts +3 -0
- package/lib/locales/zh-CN.js +29 -0
- package/lib/locales/zh-HK.d.ts +3 -0
- package/lib/locales/zh-HK.js +29 -0
- package/lib/logger/feishu.d.ts +11 -0
- package/lib/logger/feishu.js +52 -0
- package/lib/logger/index.d.ts +135 -0
- package/lib/logger/index.js +476 -0
- package/lib/menuManager/hooks.d.ts +17 -0
- package/lib/menuManager/hooks.js +135 -0
- package/lib/menuManager/index.d.ts +28 -0
- package/lib/menuManager/index.js +125 -0
- package/lib/models/global.d.ts +32 -0
- package/lib/models/global.js +62 -0
- package/lib/models/index.d.ts +45 -0
- package/lib/models/index.js +69 -0
- package/lib/models/type.d.ts +2 -0
- package/lib/models/type.js +17 -0
- package/lib/plugin/index.d.ts +0 -0
- package/lib/plugin/index.js +0 -0
- package/lib/pubsub/example.d.ts +5 -0
- package/lib/pubsub/example.js +61 -0
- package/lib/pubsub/index.d.ts +73 -0
- package/lib/pubsub/index.js +141 -0
- package/lib/render/index.d.ts +0 -0
- package/lib/render/index.js +0 -0
- package/lib/request/cache.d.ts +46 -0
- package/lib/request/cache.js +195 -0
- package/lib/request/cancelToken.d.ts +38 -0
- package/lib/request/cancelToken.js +59 -0
- package/lib/request/config.d.ts +3 -0
- package/lib/request/config.js +69 -0
- package/lib/request/constants.d.ts +2 -0
- package/lib/request/constants.js +34 -0
- package/lib/request/index.d.ts +24 -0
- package/lib/request/index.js +210 -0
- package/lib/request/pisell2Request.d.ts +6 -0
- package/lib/request/pisell2Request.js +75 -0
- package/lib/request/type.d.ts +57 -0
- package/lib/request/type.js +36 -0
- package/lib/request/utils.d.ts +46 -0
- package/lib/request/utils.js +113 -0
- package/lib/routes/config.d.ts +7 -0
- package/lib/routes/config.js +50 -0
- package/lib/routes/index.d.ts +28 -0
- package/lib/routes/index.js +121 -0
- package/lib/socket/components/SocketMonitorPage.d.ts +6 -0
- package/lib/socket/components/SocketMonitorPage.js +340 -0
- package/lib/socket/components/index.d.ts +2 -0
- package/lib/socket/components/index.js +39 -0
- package/lib/socket/constants.d.ts +33 -0
- package/lib/socket/constants.js +62 -0
- package/lib/socket/events.d.ts +31 -0
- package/lib/socket/events.js +44 -0
- package/lib/socket/heartbeat.d.ts +66 -0
- package/lib/socket/heartbeat.js +157 -0
- package/lib/socket/index.d.ts +61 -0
- package/lib/socket/index.js +198 -0
- package/lib/socket/monitor.d.ts +169 -0
- package/lib/socket/monitor.js +350 -0
- package/lib/socket/reconnect.d.ts +61 -0
- package/lib/socket/reconnect.js +157 -0
- package/lib/socket/socket.d.ts +130 -0
- package/lib/socket/socket.js +426 -0
- package/lib/socket/types.d.ts +85 -0
- package/lib/socket/types.js +36 -0
- package/lib/storage/index.d.ts +17 -0
- package/lib/storage/index.js +64 -0
- package/lib/tasks/index.d.ts +127 -0
- package/lib/tasks/index.js +710 -0
- package/lib/tasks/scheduledTasksExample.d.ts +61 -0
- package/lib/tasks/scheduledTasksExample.js +267 -0
- package/lib/tasks/type.d.ts +100 -0
- package/lib/tasks/type.js +17 -0
- package/lib/tasks/useTasks.d.ts +5 -0
- package/lib/tasks/useTasks.js +37 -0
- package/lib/type.d.ts +2 -0
- package/lib/type.js +17 -0
- package/lib/utils/adaptiveThrottle/index.d.ts +36 -0
- package/lib/utils/adaptiveThrottle/index.js +121 -0
- package/lib/variables/VariablesProvider.d.ts +7 -0
- package/lib/variables/VariablesProvider.js +51 -0
- package/lib/variables/config.d.ts +3 -0
- package/lib/variables/config.js +38 -0
- package/lib/variables/index.d.ts +6 -0
- package/lib/variables/index.js +29 -0
- package/lib/variables/type.d.ts +2 -0
- package/lib/variables/type.js +17 -0
- package/lib/website/index.d.ts +6 -0
- package/lib/website/index.js +75 -0
- package/package.json +49 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
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); }
|
|
11
|
+
/**
|
|
12
|
+
* 插件基础类型,通信插件(如 socket、ably)需符合此结构
|
|
13
|
+
* 具体插件可扩展自有方法以支持链式调用
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* 插件注册选项
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* 通信管理器:支持注入、获取、移除多种通信插件(如 socket、ably 等)
|
|
20
|
+
* 管理器自身方法支持链式调用
|
|
21
|
+
*/
|
|
22
|
+
var CommunicationManager = /*#__PURE__*/function () {
|
|
23
|
+
function CommunicationManager(app) {
|
|
24
|
+
_classCallCheck(this, CommunicationManager);
|
|
25
|
+
_defineProperty(this, "app", void 0);
|
|
26
|
+
_defineProperty(this, "plugins", new Map());
|
|
27
|
+
this.app = app;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 注入插件
|
|
32
|
+
* @param name 插件名称,如 'socket'、'ably'
|
|
33
|
+
* @param plugin 插件实例
|
|
34
|
+
* @param options 注册选项,可通过 force 强制覆盖已存在的插件
|
|
35
|
+
* @throws 当插件已存在且未设置 force 时抛出错误
|
|
36
|
+
*/
|
|
37
|
+
_createClass(CommunicationManager, [{
|
|
38
|
+
key: "register",
|
|
39
|
+
value: function register(name, plugin, options) {
|
|
40
|
+
if (!(options !== null && options !== void 0 && options.force) && this.plugins.has(name)) {
|
|
41
|
+
var msg = "CommunicationManager: \u63D2\u4EF6 \"".concat(name, "\" \u5DF2\u6CE8\u518C");
|
|
42
|
+
this.app.logger.addLog({
|
|
43
|
+
type: 'warning',
|
|
44
|
+
title: msg
|
|
45
|
+
});
|
|
46
|
+
throw new Error(msg);
|
|
47
|
+
}
|
|
48
|
+
this.plugins.set(name, plugin);
|
|
49
|
+
this.app.logger.addLog({
|
|
50
|
+
type: 'info',
|
|
51
|
+
title: "CommunicationManager: \u6CE8\u518C\u63D2\u4EF6 \"".concat(name, "\" \u6210\u529F")
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 根据名称获取插件,可对返回值进行链式调用(由插件自身实现)
|
|
57
|
+
* @param name 插件名称
|
|
58
|
+
* @returns 插件实例,未注册时返回 undefined
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "getPlugin",
|
|
62
|
+
value: function getPlugin(name) {
|
|
63
|
+
return this.plugins.get(name);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 移除指定插件
|
|
68
|
+
* @param name 插件名称
|
|
69
|
+
*/
|
|
70
|
+
}, {
|
|
71
|
+
key: "remove",
|
|
72
|
+
value: (function () {
|
|
73
|
+
var _remove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(name) {
|
|
74
|
+
var msg, plugin;
|
|
75
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
76
|
+
while (1) switch (_context.prev = _context.next) {
|
|
77
|
+
case 0:
|
|
78
|
+
msg = "CommunicationManager: \u79FB\u9664\u63D2\u4EF6 \"".concat(name, "\"");
|
|
79
|
+
this.app.logger.addLog({
|
|
80
|
+
type: 'info',
|
|
81
|
+
title: msg
|
|
82
|
+
});
|
|
83
|
+
plugin = this.getPlugin(name);
|
|
84
|
+
if (!(plugin && plugin.destroy)) {
|
|
85
|
+
_context.next = 6;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
_context.next = 6;
|
|
89
|
+
return plugin.destroy();
|
|
90
|
+
case 6:
|
|
91
|
+
this.plugins.delete(name);
|
|
92
|
+
this.app.logger.addLog({
|
|
93
|
+
type: 'info',
|
|
94
|
+
title: "".concat(msg, " \u6210\u529F")
|
|
95
|
+
});
|
|
96
|
+
case 8:
|
|
97
|
+
case "end":
|
|
98
|
+
return _context.stop();
|
|
99
|
+
}
|
|
100
|
+
}, _callee, this);
|
|
101
|
+
}));
|
|
102
|
+
function remove(_x) {
|
|
103
|
+
return _remove.apply(this, arguments);
|
|
104
|
+
}
|
|
105
|
+
return remove;
|
|
106
|
+
}()
|
|
107
|
+
/**
|
|
108
|
+
* 移除所有插件
|
|
109
|
+
*/
|
|
110
|
+
)
|
|
111
|
+
}, {
|
|
112
|
+
key: "removeAll",
|
|
113
|
+
value: (function () {
|
|
114
|
+
var _removeAll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
115
|
+
var msg, promises;
|
|
116
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
117
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
118
|
+
case 0:
|
|
119
|
+
msg = "CommunicationManager: \u79FB\u9664\u6240\u6709\u63D2\u4EF6";
|
|
120
|
+
this.app.logger.addLog({
|
|
121
|
+
type: 'info',
|
|
122
|
+
title: msg
|
|
123
|
+
});
|
|
124
|
+
promises = [];
|
|
125
|
+
this.plugins.forEach(function (plugin) {
|
|
126
|
+
if (plugin !== null && plugin !== void 0 && plugin.destroy) {
|
|
127
|
+
promises.push(plugin.destroy());
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
if (!(promises.length > 0)) {
|
|
131
|
+
_context2.next = 7;
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
_context2.next = 7;
|
|
135
|
+
return Promise.all(promises);
|
|
136
|
+
case 7:
|
|
137
|
+
this.plugins.clear();
|
|
138
|
+
this.app.logger.addLog({
|
|
139
|
+
type: 'info',
|
|
140
|
+
title: "".concat(msg, " \u6210\u529F")
|
|
141
|
+
});
|
|
142
|
+
case 9:
|
|
143
|
+
case "end":
|
|
144
|
+
return _context2.stop();
|
|
145
|
+
}
|
|
146
|
+
}, _callee2, this);
|
|
147
|
+
}));
|
|
148
|
+
function removeAll() {
|
|
149
|
+
return _removeAll.apply(this, arguments);
|
|
150
|
+
}
|
|
151
|
+
return removeAll;
|
|
152
|
+
}()
|
|
153
|
+
/**
|
|
154
|
+
* 检查是否已注册指定插件
|
|
155
|
+
*/
|
|
156
|
+
)
|
|
157
|
+
}, {
|
|
158
|
+
key: "has",
|
|
159
|
+
value: function has(name) {
|
|
160
|
+
return this.plugins.has(name);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* 获取已注册的插件名称列表
|
|
165
|
+
*/
|
|
166
|
+
}, {
|
|
167
|
+
key: "getPluginNames",
|
|
168
|
+
value: function getPluginNames() {
|
|
169
|
+
return Array.from(this.plugins.keys());
|
|
170
|
+
}
|
|
171
|
+
}]);
|
|
172
|
+
return CommunicationManager;
|
|
173
|
+
}();
|
|
174
|
+
export { CommunicationManager as default };
|
package/es/config.d.ts
ADDED
package/es/config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
var defaultConfig = {};
|
|
8
|
+
var config = _objectSpread({}, defaultConfig);
|
|
9
|
+
export var setConfig = function setConfig(newConfig) {
|
|
10
|
+
config = _objectSpread(_objectSpread({}, config), newConfig);
|
|
11
|
+
};
|
|
12
|
+
export var getConfig = function getConfig() {
|
|
13
|
+
return config;
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare function setCookie(name: string, value: string, domain?: string): void;
|
|
2
|
+
declare function getCookie(name: string): string | null;
|
|
3
|
+
declare function deleteCookie(name: string, domain?: string): void;
|
|
4
|
+
declare function checkCookie(name: string): boolean;
|
|
5
|
+
declare function updateCookie(name: string, value: string, domain?: string): void;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
setCookie: typeof setCookie;
|
|
8
|
+
getCookie: typeof getCookie;
|
|
9
|
+
deleteCookie: typeof deleteCookie;
|
|
10
|
+
checkCookie: typeof checkCookie;
|
|
11
|
+
updateCookie: typeof updateCookie;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// 设置cookie
|
|
2
|
+
function setCookie(name, value, domain) {
|
|
3
|
+
var expires = "";
|
|
4
|
+
var cookieDomain = "";
|
|
5
|
+
if (domain) {
|
|
6
|
+
cookieDomain = "; domain=" + domain;
|
|
7
|
+
}
|
|
8
|
+
document.cookie = name + "=" + (value || "") + expires + cookieDomain + "; path=/";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// 获取cookie
|
|
12
|
+
function getCookie(name) {
|
|
13
|
+
var nameEQ = name + "=";
|
|
14
|
+
var ca = document.cookie.split(';');
|
|
15
|
+
for (var i = 0; i < ca.length; i++) {
|
|
16
|
+
var c = ca[i];
|
|
17
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
18
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 删除cookie
|
|
24
|
+
function deleteCookie(name, domain) {
|
|
25
|
+
var cookieDomain = "";
|
|
26
|
+
if (domain) {
|
|
27
|
+
cookieDomain = "; domain=" + domain;
|
|
28
|
+
}
|
|
29
|
+
document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC' + cookieDomain + '; path=/;';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// 检查cookie是否存在
|
|
33
|
+
function checkCookie(name) {
|
|
34
|
+
return getCookie(name) !== null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 更新cookie的值
|
|
38
|
+
function updateCookie(name, value, domain) {
|
|
39
|
+
setCookie(name, value, domain);
|
|
40
|
+
}
|
|
41
|
+
export default {
|
|
42
|
+
setCookie: setCookie,
|
|
43
|
+
getCookie: getCookie,
|
|
44
|
+
deleteCookie: deleteCookie,
|
|
45
|
+
checkCookie: checkCookie,
|
|
46
|
+
updateCookie: updateCookie
|
|
47
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.disabled-select {
|
|
2
|
+
-webkit-user-select: none;
|
|
3
|
+
/* Safari */
|
|
4
|
+
-moz-user-select: none;
|
|
5
|
+
/* Firefox */
|
|
6
|
+
-ms-user-select: none;
|
|
7
|
+
/* IE10+/Edge */
|
|
8
|
+
user-select: none;
|
|
9
|
+
/* Standard syntax */
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
ion-segment-button {
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
--color-checked: var(--ion-color-primary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tab-bar {
|
|
18
|
+
//height: 78px;
|
|
19
|
+
--background: #fff;
|
|
20
|
+
padding: 10px 0;
|
|
21
|
+
|
|
22
|
+
.tab-bar-icon {
|
|
23
|
+
margin-bottom: 6px;
|
|
24
|
+
//font-size: 24px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.tab-bar-name {
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
line-height: 18px;
|
|
32
|
+
/* 150% */
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
ul {
|
|
37
|
+
padding: 0;
|
|
38
|
+
margin: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
li {
|
|
42
|
+
list-style: none;
|
|
43
|
+
padding: 0;
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/*默认滚动条样式*/
|
|
49
|
+
::-webkit-scrollbar {
|
|
50
|
+
width: 8px;
|
|
51
|
+
height: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
::-webkit-scrollbar-track {
|
|
55
|
+
background: #f1f1f1;
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
::-webkit-scrollbar-thumb {
|
|
60
|
+
background: #c1c1c1;
|
|
61
|
+
border-radius: 4px;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background: #a8a8a8;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
html.plt-mobile ion-app {
|
|
69
|
+
-webkit-user-select: auto;
|
|
70
|
+
-moz-user-select: auto;
|
|
71
|
+
-ms-user-select: auto;
|
|
72
|
+
user-select: auto;
|
|
73
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* Core CSS required for Ionic components to work properly */
|
|
2
|
+
@import "@ionic/react/css/core.css";
|
|
3
|
+
|
|
4
|
+
/* Basic CSS for apps built with Ionic */
|
|
5
|
+
@import "@ionic/react/css/normalize.css";
|
|
6
|
+
@import "@ionic/react/css/structure.css";
|
|
7
|
+
@import "@ionic/react/css/typography.css";
|
|
8
|
+
|
|
9
|
+
/* Optional CSS utils that can be commented out */
|
|
10
|
+
@import "@ionic/react/css/padding.css";
|
|
11
|
+
@import "@ionic/react/css/float-elements.css";
|
|
12
|
+
@import "@ionic/react/css/text-alignment.css";
|
|
13
|
+
@import "@ionic/react/css/text-transformation.css";
|
|
14
|
+
@import "@ionic/react/css/flex-utils.css";
|
|
15
|
+
@import "@ionic/react/css/display.css";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Ionic Dark Mode
|
|
19
|
+
* -----------------------------------------------------
|
|
20
|
+
* For more info, please see:
|
|
21
|
+
* https://ionicframework.com/docs/theming/dark-mode
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/* @import '@ionic/react/css/palettes/dark.always.css'; */
|
|
25
|
+
/* @import '@ionic/react/css/palettes/dark.class.css'; */
|
|
26
|
+
// @import "@ionic/react/css/palettes/dark.system.css";
|
|
27
|
+
|
|
28
|
+
/* Theme variables */
|
|
29
|
+
@import "./variables.css";
|
|
30
|
+
|
|
31
|
+
@import "./global.less";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* For information on how to create your own theme, please see:
|
|
2
|
+
http://ionicframework.com/docs/theming/ */
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--ion-platform: ios;
|
|
6
|
+
--ion-color-primary: #5D3F9F;
|
|
7
|
+
--ion-color-primary-rgb: 93,63,159;
|
|
8
|
+
--ion-color-primary-contrast: #ffffff;
|
|
9
|
+
--ion-color-primary-contrast-rgb: 255,255,255;
|
|
10
|
+
--ion-color-primary-shade: #52378c;
|
|
11
|
+
--ion-color-primary-tint: #6d52a9;
|
|
12
|
+
|
|
13
|
+
--ion-color-secondary: #7f56da;
|
|
14
|
+
--ion-color-secondary-rgb: 127,86,218;
|
|
15
|
+
--ion-color-secondary-contrast: #ffffff;
|
|
16
|
+
--ion-color-secondary-contrast-rgb: 255,255,255;
|
|
17
|
+
--ion-color-secondary-shade: #704cc0;
|
|
18
|
+
--ion-color-secondary-tint: #8c67de;
|
|
19
|
+
|
|
20
|
+
--ion-color-tertiary: #eee5ff;
|
|
21
|
+
--ion-color-tertiary-rgb: 238,229,255;
|
|
22
|
+
--ion-color-tertiary-contrast: #000000;
|
|
23
|
+
--ion-color-tertiary-contrast-rgb: 0,0,0;
|
|
24
|
+
--ion-color-tertiary-shade: #d1cae0;
|
|
25
|
+
--ion-color-tertiary-tint: #f0e8ff;
|
|
26
|
+
|
|
27
|
+
/** success **/
|
|
28
|
+
--ion-color-success: #2dd36f;
|
|
29
|
+
--ion-color-success-rgb: 45, 211, 111;
|
|
30
|
+
--ion-color-success-contrast: #ffffff;
|
|
31
|
+
--ion-color-success-contrast-rgb: 255, 255, 255;
|
|
32
|
+
--ion-color-success-shade: #28ba62;
|
|
33
|
+
--ion-color-success-tint: #42d77d;
|
|
34
|
+
|
|
35
|
+
/** warning **/
|
|
36
|
+
--ion-color-warning: #ffc409;
|
|
37
|
+
--ion-color-warning-rgb: 255, 196, 9;
|
|
38
|
+
--ion-color-warning-contrast: #000000;
|
|
39
|
+
--ion-color-warning-contrast-rgb: 0, 0, 0;
|
|
40
|
+
--ion-color-warning-shade: #e0ac08;
|
|
41
|
+
--ion-color-warning-tint: #ffca22;
|
|
42
|
+
|
|
43
|
+
/** danger **/
|
|
44
|
+
--ion-color-danger: #eb445a;
|
|
45
|
+
--ion-color-danger-rgb: 235, 68, 90;
|
|
46
|
+
--ion-color-danger-contrast: #ffffff;
|
|
47
|
+
--ion-color-danger-contrast-rgb: 255, 255, 255;
|
|
48
|
+
--ion-color-danger-shade: #cf3c4f;
|
|
49
|
+
--ion-color-danger-tint: #ed576b;
|
|
50
|
+
|
|
51
|
+
/** dark **/
|
|
52
|
+
--ion-color-dark: #222428;
|
|
53
|
+
--ion-color-dark-rgb: 34, 36, 40;
|
|
54
|
+
--ion-color-dark-contrast: #ffffff;
|
|
55
|
+
--ion-color-dark-contrast-rgb: 255, 255, 255;
|
|
56
|
+
--ion-color-dark-shade: #1e2023;
|
|
57
|
+
--ion-color-dark-tint: #383a3e;
|
|
58
|
+
|
|
59
|
+
/** medium **/
|
|
60
|
+
--ion-color-medium: #92949c;
|
|
61
|
+
--ion-color-medium-rgb: 146, 148, 156;
|
|
62
|
+
--ion-color-medium-contrast: #ffffff;
|
|
63
|
+
--ion-color-medium-contrast-rgb: 255, 255, 255;
|
|
64
|
+
--ion-color-medium-shade: #808289;
|
|
65
|
+
--ion-color-medium-tint: #9d9fa6;
|
|
66
|
+
|
|
67
|
+
/** light **/
|
|
68
|
+
--ion-color-light: #f4f5f8;
|
|
69
|
+
--ion-color-light-rgb: 244, 245, 248;
|
|
70
|
+
--ion-color-light-contrast: #000000;
|
|
71
|
+
--ion-color-light-contrast-rgb: 0, 0, 0;
|
|
72
|
+
--ion-color-light-shade: #d7d8da;
|
|
73
|
+
--ion-color-light-tint: #f5f6f9;
|
|
74
|
+
|
|
75
|
+
--ion-toolbar-background: #ffffff;
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
--theme-color: var(--ion-color-primary);
|
|
79
|
+
|
|
80
|
+
--ion-text-color: var(--ion-color-dark);
|
|
81
|
+
|
|
82
|
+
--theme-a-color: #7F56DA;
|
|
83
|
+
|
|
84
|
+
}
|
package/es/data/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
export var Data = /*#__PURE__*/_createClass(function Data(app) {
|
|
9
|
+
_classCallCheck(this, Data);
|
|
10
|
+
_defineProperty(this, "app", void 0);
|
|
11
|
+
_defineProperty(this, "storage", void 0);
|
|
12
|
+
_defineProperty(this, "store", void 0);
|
|
13
|
+
this.app = app;
|
|
14
|
+
this.storage = app.storage;
|
|
15
|
+
this.store = app.models;
|
|
16
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HistoryConfig } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* @title: 默认配置
|
|
4
|
+
* @description:
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: zhiwei.Wang
|
|
7
|
+
*/
|
|
8
|
+
export declare const defaultConfig: HistoryConfig;
|
|
9
|
+
/**
|
|
10
|
+
* @title: 设置配置
|
|
11
|
+
* @description:
|
|
12
|
+
* @param {Partial} newConfig
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: zhiwei.Wang
|
|
15
|
+
*/
|
|
16
|
+
export declare const setConfig: (newConfig: Partial<HistoryConfig>) => HistoryConfig;
|
|
17
|
+
/**
|
|
18
|
+
* @title: 获取配置
|
|
19
|
+
* @description:
|
|
20
|
+
* @param {*} HistoryConfig
|
|
21
|
+
* @return {*}
|
|
22
|
+
* @Author: zhiwei.Wang
|
|
23
|
+
*/
|
|
24
|
+
export declare const getConfig: () => HistoryConfig;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
/**
|
|
8
|
+
* @title: 默认配置
|
|
9
|
+
* @description:
|
|
10
|
+
* @return {*}
|
|
11
|
+
* @Author: zhiwei.Wang
|
|
12
|
+
*/
|
|
13
|
+
export var defaultConfig = {};
|
|
14
|
+
/**
|
|
15
|
+
* @title: 当前配置
|
|
16
|
+
* @description:
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @Author: zhiwei.Wang
|
|
19
|
+
*/
|
|
20
|
+
var config = _objectSpread({}, defaultConfig);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @title: 设置配置
|
|
24
|
+
* @description:
|
|
25
|
+
* @param {Partial} newConfig
|
|
26
|
+
* @return {*}
|
|
27
|
+
* @Author: zhiwei.Wang
|
|
28
|
+
*/
|
|
29
|
+
export var setConfig = function setConfig(newConfig) {
|
|
30
|
+
config = _objectSpread(_objectSpread({}, config), newConfig);
|
|
31
|
+
return config;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @title: 获取配置
|
|
36
|
+
* @description:
|
|
37
|
+
* @param {*} HistoryConfig
|
|
38
|
+
* @return {*}
|
|
39
|
+
* @Author: zhiwei.Wang
|
|
40
|
+
*/
|
|
41
|
+
export var getConfig = function getConfig() {
|
|
42
|
+
return config;
|
|
43
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LocationDescriptor } from "history";
|
|
2
|
+
import type { History as HistoryType } from "history";
|
|
3
|
+
import { useHistory, useLocation, useParams } from "react-router-dom";
|
|
4
|
+
import App from "../app";
|
|
5
|
+
export interface HistoryOptions {
|
|
6
|
+
basename?: string;
|
|
7
|
+
interceptor?: (path: LocationDescriptor<unknown>, state: any, next: () => void) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class History {
|
|
10
|
+
instance: HistoryType<unknown>;
|
|
11
|
+
useHistory: typeof useHistory;
|
|
12
|
+
useLocation: typeof useLocation;
|
|
13
|
+
useParams: typeof useParams;
|
|
14
|
+
app: App;
|
|
15
|
+
interceptor?: (path: LocationDescriptor<unknown>, state: unknown, next: () => void) => void;
|
|
16
|
+
constructor(app: App, options?: HistoryOptions);
|
|
17
|
+
push: HistoryType["push"];
|
|
18
|
+
replace: HistoryType["replace"];
|
|
19
|
+
reload: () => void;
|
|
20
|
+
reloadTo: (path: string) => void;
|
|
21
|
+
externalPage: (path: string) => void;
|
|
22
|
+
goLogin: () => any;
|
|
23
|
+
getQuery: () => {
|
|
24
|
+
[k: string]: string;
|
|
25
|
+
};
|
|
26
|
+
}
|