From d9ad6895bddb5d9ca0eddd1645d6d4f0c1a468f5 Mon Sep 17 00:00:00 2001 From: kalxd Date: Fri, 17 Nov 2023 06:31:39 +0000 Subject: [PATCH] deploy: 11d61f8ed20dff4d5b55153b19def159f49d4d5f --- main.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 9b6b494..e4142d1 100644 --- a/main.js +++ b/main.js @@ -216,7 +216,7 @@ eval("\nexports.__esModule = true;\nexports.Header4 = exports.Header3 = exports. \********************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nexports.__esModule = true;\n__exportStar(__webpack_require__(/*! ./container */ \"../dist/element/container.js\"), exports);\n__exportStar(__webpack_require__(/*! ./grid */ \"../dist/element/grid.js\"), exports);\n__exportStar(__webpack_require__(/*! ./segment */ \"../dist/element/segment.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message */ \"../dist/element/message.js\"), exports);\n__exportStar(__webpack_require__(/*! ./header */ \"../dist/element/header.js\"), exports);\n__exportStar(__webpack_require__(/*! ./button */ \"../dist/element/button.js\"), exports);\n__exportStar(__webpack_require__(/*! ./input */ \"../dist/element/input.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form */ \"../dist/element/form.js\"), exports);\n\n\n//# sourceURL=webpack:///../dist/element/index.js?"); +eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nexports.__esModule = true;\n__exportStar(__webpack_require__(/*! ./container */ \"../dist/element/container.js\"), exports);\n__exportStar(__webpack_require__(/*! ./grid */ \"../dist/element/grid.js\"), exports);\n__exportStar(__webpack_require__(/*! ./segment */ \"../dist/element/segment.js\"), exports);\n__exportStar(__webpack_require__(/*! ./message */ \"../dist/element/message.js\"), exports);\n__exportStar(__webpack_require__(/*! ./header */ \"../dist/element/header.js\"), exports);\n__exportStar(__webpack_require__(/*! ./button */ \"../dist/element/button.js\"), exports);\n__exportStar(__webpack_require__(/*! ./input */ \"../dist/element/input.js\"), exports);\n__exportStar(__webpack_require__(/*! ./form */ \"../dist/element/form.js\"), exports);\n__exportStar(__webpack_require__(/*! ./modal */ \"../dist/element/modal.js\"), exports);\n\n\n//# sourceURL=webpack:///../dist/element/index.js?"); /***/ }), @@ -250,6 +250,16 @@ eval("\nexports.__esModule = true;\nexports.Message = void 0;\nvar attr_1 = __we /***/ }), +/***/ "../dist/element/modal.js": +/*!********************************!*\ + !*** ../dist/element/modal.js ***! + \********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +eval("\nexports.__esModule = true;\nexports.Alert = exports.Confirm = exports.pickModalAttr = exports.ModalAction = exports.ModalDimmer = exports.Modal = exports.ModalFullscreen = void 0;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar attr_1 = __webpack_require__(/*! ../internal/attr */ \"../dist/internal/attr.js\");\nvar purify_ts_1 = __webpack_require__(/*! purify-ts */ \"../node_modules/purify-ts/index.js\");\nvar animate_1 = __webpack_require__(/*! ../abstract/animate */ \"../dist/abstract/animate.js\");\nvar ModalFullscreen;\n(function (ModalFullscreen) {\n ModalFullscreen[\"Fullscreen\"] = \"fullscreen\";\n ModalFullscreen[\"OverlayFullscreen\"] = \"overlay fullscreen\";\n})(ModalFullscreen = exports.ModalFullscreen || (exports.ModalFullscreen = {}));\nexports.Modal = {\n view: function (_a) {\n var attrs = _a.attrs, children = _a.children;\n var klass = (0, attr_1.pickKlass)([\n purify_ts_1.Maybe.fromNullable(attrs.size),\n purify_ts_1.Maybe.fromNullable(attrs.fullscreen),\n (0, attr_1.selectKlass)(\"inverted\", attrs.isInvert),\n (0, purify_ts_1.Just)(\"ui modal top aligned transition active\")\n ]);\n return m(animate_1.AnimateFrame, { \"class\": klass, \"in\": \"animate__fadeInDown\" }, children);\n }\n};\nexports.ModalDimmer = {\n oncreate: function () {\n document.body.classList.add(\"blurring\", \"dimmed\", \"dimmable\");\n },\n onremove: function () {\n document.body.classList.remove(\"blurring\", \"dimmed\", \"dimmable\");\n },\n view: function (_a) {\n var children = _a.children;\n return m(\"div.ui.modals.dimmer.active.visible.transition\", { style: \"display: flex !important\" }, children);\n }\n};\nexports.ModalAction = {\n view: function (_a) {\n var _b, _c;\n var attrs = _a.attrs;\n var mResolve = purify_ts_1.Maybe.fromNullable(attrs.connectResolve);\n var negative = m(\"button.ui.negative.button\", { onclick: function () { return mResolve.ifJust(function (f) { return f(purify_ts_1.Nothing); }); } }, (_b = attrs.negativeText) !== null && _b !== void 0 ? _b : \"不好\");\n var positive = m(\"button.ui.positive.right.labeled.icon.button\", { onclick: function () { return mResolve.ifJust(function (f) { return f((0, purify_ts_1.Just)(undefined)); }); } }, [\n (_c = attrs.positiveText) !== null && _c !== void 0 ? _c : \"好\",\n m(\"i.icon.checkmark\")\n ]);\n return m(\"div.actions\", [\n negative,\n positive\n ]);\n }\n};\nvar pickModalAttr = function (attr) { return ({\n size: attr.size,\n fullscreen: attr.fullscreen,\n isInvert: attr.isInvert\n}); };\nexports.pickModalAttr = pickModalAttr;\nexports.Confirm = {\n view: function (_a) {\n var _b;\n var attrs = _a.attrs, children = _a.children;\n var modalAttr = (0, exports.pickModalAttr)(attrs);\n var modalActionAttr = {\n positiveText: attrs.positiveText,\n negativeText: attrs.negativeText,\n connectResolve: attrs.connectResolve\n };\n return m(exports.Modal, modalAttr, [\n m(\"div.header\", (_b = attrs.title) !== null && _b !== void 0 ? _b : \"提示\"),\n m(\"div.scrolling.content\", children),\n m(exports.ModalAction, modalActionAttr)\n ]);\n }\n};\nexports.Alert = {\n view: function (_a) {\n var _b, _c;\n var attrs = _a.attrs, children = _a.children;\n var modalAttr = (0, exports.pickModalAttr)(attrs);\n return m(exports.Modal, modalAttr, [\n m(\"div.header\", (_b = attrs.title) !== null && _b !== void 0 ? _b : \"提示\"),\n m(\"div.scrolling.content\", children),\n m(\"div.actions\", m(\"button.ui.positive.right.labeled.icon.button\", { onclick: attrs.connectResolve }, [\n (_c = attrs.positiveText) !== null && _c !== void 0 ? _c : \"好\",\n m(\"i.icon.checkmark\"),\n ]))\n ]);\n }\n};\n\n\n//# sourceURL=webpack:///../dist/element/modal.js?"); + +/***/ }), + /***/ "../dist/element/placeholder.js": /*!**************************************!*\ !*** ../dist/element/placeholder.js ***! @@ -356,7 +366,7 @@ eval("\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argument \*******************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nexports.ModalMask = exports.alertText = exports.alert = exports.confirmTextAsync = exports.confirmText = exports.confirmAsync = exports.confirm = exports.modal = void 0;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar ref_1 = __webpack_require__(/*! ../data/ref */ \"../dist/data/ref.js\");\nvar purify_ts_1 = __webpack_require__(/*! purify-ts */ \"../node_modules/purify-ts/index.js\");\nvar Modal = __webpack_require__(/*! ../widget/modal */ \"../dist/widget/modal.js\");\nvar modalRef = new ref_1.IORef([]);\nvar modal = function (widget) {\n return new Promise(function (resolve) {\n var modalAttr = {\n connectResolve: resolve\n };\n var w = {\n widget: widget,\n attr: modalAttr\n };\n modalRef.update(function (xs) { return (__spreadArray([\n w\n ], xs, true)); });\n m.redraw();\n });\n};\nexports.modal = modal;\nvar renderModal = function (state) {\n return purify_ts_1.List.uncons(state)\n .map(function (t) {\n var w = t.fst();\n var ws = t.snd();\n var attr = __assign(__assign({}, w.attr), { connectResolve: function (x) {\n w.attr.connectResolve(x);\n modalRef.put(ws);\n } });\n return m(w.widget, attr);\n });\n};\nvar confirmRef = new ref_1.IORef([]);\nvar confirm = function (attr) {\n return new Promise(function (resolve) {\n var s = {\n attr: attr,\n resolve: resolve\n };\n confirmRef.update(function (xs) { return __spreadArray([s], xs, true); });\n m.redraw();\n });\n};\nexports.confirm = confirm;\nvar confirmAsync = function (attr) {\n return purify_ts_1.MaybeAsync.fromPromise(function () { return (0, exports.confirm)(attr); });\n};\nexports.confirmAsync = confirmAsync;\nvar confirmText = function (msg) {\n return (0, exports.confirm)({ content: msg });\n};\nexports.confirmText = confirmText;\nvar confirmTextAsync = function (msg) {\n return purify_ts_1.MaybeAsync.fromPromise(function () { return (0, exports.confirmText)(msg); });\n};\nexports.confirmTextAsync = confirmTextAsync;\nvar renderConfirm = function (state) {\n return purify_ts_1.List.uncons(state)\n .map(function (t) {\n var w = t.fst();\n var ws = t.snd();\n var confirmAttr = {\n size: w.attr.size,\n fullscreen: w.attr.fullscreen,\n isInvert: w.attr.isInvert,\n title: w.attr.title,\n positiveText: w.attr.positiveText,\n negativeText: w.attr.negativeText,\n connectPositive: function () {\n confirmRef.put(ws);\n w.resolve((0, purify_ts_1.Just)(undefined));\n },\n connectNegative: function () {\n confirmRef.put(ws);\n w.resolve(purify_ts_1.Nothing);\n }\n };\n return m(Modal.Confirm, confirmAttr, w.attr.content);\n });\n};\n;\nvar alertRef = new ref_1.IORef([]);\nvar alert = function (attr) {\n return new Promise(function (resolve) {\n var s = {\n attr: attr,\n resolve: resolve\n };\n alertRef.update(function (xs) { return __spreadArray([s], xs, true); });\n });\n};\nexports.alert = alert;\nvar alertText = function (msg) {\n return (0, exports.alert)({ content: msg });\n};\nexports.alertText = alertText;\nvar renderAlert = function (state) {\n return purify_ts_1.List.uncons(state)\n .map(function (t) {\n var w = t.fst();\n var ws = t.snd();\n var attr = {\n size: w.attr.size,\n fullscreen: w.attr.fullscreen,\n isInvert: w.attr.isInvert,\n title: w.attr.title,\n positiveText: w.attr.positiveText,\n connectResolve: function () {\n alertRef.put(ws);\n w.resolve();\n }\n };\n return m(Modal.Alert, attr, w.attr.content);\n });\n};\nexports.ModalMask = {\n view: function () {\n var modalWidget = modalRef.asks(renderModal);\n var confirmWidget = confirmRef.asks(renderConfirm);\n var alertWidget = alertRef.asks(renderAlert);\n return alertWidget\n .alt(confirmWidget)\n .alt(modalWidget)\n .map(function (_) { return m(Modal.ModalDimmer, [\n modalWidget.extract(),\n confirmWidget.extract(),\n alertWidget.extract()\n ]); })\n .extract();\n }\n};\n\n\n//# sourceURL=webpack:///../dist/module/modal.js?"); +eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nexports.ModalMask = exports.alertText = exports.alert = exports.confirmTextAsync = exports.confirmText = exports.confirmAsync = exports.confirm = exports.modal = void 0;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar lens_1 = __webpack_require__(/*! ../data/lens */ \"../dist/data/lens.js\");\nvar purify_ts_1 = __webpack_require__(/*! purify-ts */ \"../node_modules/purify-ts/index.js\");\nvar Modal = __webpack_require__(/*! ../element/modal */ \"../dist/element/modal.js\");\nvar modalState = (0, lens_1.mutable)([]);\nvar modal = function (widget) {\n return new Promise(function (resolve) {\n var modalAttr = {\n connectResolve: resolve\n };\n var w = {\n widget: widget,\n attr: modalAttr\n };\n var s = modalState.get();\n modalState.set(__spreadArray([\n w\n ], s, true));\n m.redraw();\n });\n};\nexports.modal = modal;\nvar renderModal = function (state) {\n return purify_ts_1.List.uncons(state)\n .map(function (t) {\n var w = t.fst();\n var ws = t.snd();\n var attr = __assign(__assign({}, w.attr), { connectResolve: function (x) {\n w.attr.connectResolve(x);\n modalState.set(ws);\n } });\n return m(w.widget, attr);\n });\n};\nvar confirmState = (0, lens_1.mutable)([]);\nvar confirm = function (attr) {\n return new Promise(function (resolve) {\n var s = {\n attr: attr,\n resolve: resolve\n };\n var xs = confirmState.get();\n confirmState.set(__spreadArray([s], xs, true));\n m.redraw();\n });\n};\nexports.confirm = confirm;\nvar confirmAsync = function (attr) {\n return purify_ts_1.MaybeAsync.fromPromise(function () { return (0, exports.confirm)(attr); });\n};\nexports.confirmAsync = confirmAsync;\nvar confirmText = function (msg) {\n return (0, exports.confirm)({ content: msg });\n};\nexports.confirmText = confirmText;\nvar confirmTextAsync = function (msg) {\n return purify_ts_1.MaybeAsync.fromPromise(function () { return (0, exports.confirmText)(msg); });\n};\nexports.confirmTextAsync = confirmTextAsync;\nvar renderConfirm = function (state) {\n return purify_ts_1.List.uncons(state)\n .map(function (t) {\n var w = t.fst();\n var ws = t.snd();\n var confirmAttr = {\n size: w.attr.size,\n fullscreen: w.attr.fullscreen,\n isInvert: w.attr.isInvert,\n title: w.attr.title,\n positiveText: w.attr.positiveText,\n negativeText: w.attr.negativeText,\n connectResolve: function (value) {\n confirmState.set(ws);\n w.resolve(value);\n }\n };\n return m(Modal.Confirm, confirmAttr, w.attr.content);\n });\n};\n;\nvar alertState = (0, lens_1.mutable)([]);\nvar alert = function (attr) {\n return new Promise(function (resolve) {\n var s = {\n attr: attr,\n resolve: resolve\n };\n var xs = alertState.get();\n alertState.set(__spreadArray([s], xs, true));\n });\n};\nexports.alert = alert;\nvar alertText = function (msg) {\n return (0, exports.alert)({ content: msg });\n};\nexports.alertText = alertText;\nvar renderAlert = function (state) {\n return purify_ts_1.List.uncons(state)\n .map(function (t) {\n var w = t.fst();\n var ws = t.snd();\n var attr = {\n size: w.attr.size,\n fullscreen: w.attr.fullscreen,\n isInvert: w.attr.isInvert,\n title: w.attr.title,\n positiveText: w.attr.positiveText,\n connectResolve: function () {\n alertState.set(ws);\n w.resolve();\n }\n };\n return m(Modal.Alert, attr, w.attr.content);\n });\n};\nexports.ModalMask = {\n view: function () {\n var modalWidget = renderModal(modalState.get());\n var confirmWidget = renderConfirm(confirmState.get());\n var alertWidget = renderAlert(alertState.get());\n return alertWidget\n .alt(confirmWidget)\n .alt(modalWidget)\n .map(function (_) { return m(Modal.ModalDimmer, [\n modalWidget.extract(),\n confirmWidget.extract(),\n alertWidget.extract()\n ]); })\n .extract();\n }\n};\n\n\n//# sourceURL=webpack:///../dist/module/modal.js?"); /***/ }), @@ -466,7 +476,7 @@ eval("\nexports.__esModule = true;\nexports.loading = void 0;\nvar m = __webpack \*******************************/ /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -eval("\nexports.__esModule = true;\nexports.Alert = exports.Confirm = exports.ModalAction = exports.ModalDimmer = exports.Modal = exports.ModalFullscreen = void 0;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar attr_1 = __webpack_require__(/*! ../internal/attr */ \"../dist/internal/attr.js\");\nvar purify_ts_1 = __webpack_require__(/*! purify-ts */ \"../node_modules/purify-ts/index.js\");\nvar animate_1 = __webpack_require__(/*! ../abstract/animate */ \"../dist/abstract/animate.js\");\nvar ModalFullscreen;\n(function (ModalFullscreen) {\n ModalFullscreen[\"Fullscreen\"] = \"fullscreen\";\n ModalFullscreen[\"OverlayFullscreen\"] = \"overlay fullscreen\";\n})(ModalFullscreen = exports.ModalFullscreen || (exports.ModalFullscreen = {}));\nexports.Modal = {\n view: function (_a) {\n var attrs = _a.attrs, children = _a.children;\n var klass = (0, attr_1.pickKlass)([\n purify_ts_1.Maybe.fromNullable(attrs.size),\n purify_ts_1.Maybe.fromNullable(attrs.fullscreen),\n (0, attr_1.selectKlass)(\"inverted\", attrs.isInvert),\n (0, purify_ts_1.Just)(\"ui modal top aligned transition active\")\n ]);\n return m(animate_1.AnimateFrame, { \"class\": klass, \"in\": \"animate__fadeInDown\" }, children);\n }\n};\nexports.ModalDimmer = {\n oncreate: function () {\n document.body.classList.add(\"blurring\", \"dimmed\", \"dimmable\");\n },\n onremove: function () {\n document.body.classList.remove(\"blurring\", \"dimmed\", \"dimmable\");\n },\n view: function (_a) {\n var children = _a.children;\n return m(\"div.ui.modals.dimmer.active.visible.transition\", { style: \"display: flex !important\" }, children);\n }\n};\nexports.ModalAction = {\n view: function (_a) {\n var _b, _c;\n var attrs = _a.attrs;\n var monPositive = purify_ts_1.Maybe.fromNullable(attrs.connectPositive);\n var monNegative = purify_ts_1.Maybe.fromNullable(attrs.connectNegative);\n var negative = m(\"button.ui.negative.button\", { onclick: function () { return monNegative.ifJust(function (f) { return f(); }); } }, (_b = attrs.negativeText) !== null && _b !== void 0 ? _b : \"不好\");\n var positive = m(\"button.ui.positive.right.labeled.icon.button\", { onclick: function () { return monPositive.ifJust(function (f) { return f(); }); } }, [\n (_c = attrs.positiveText) !== null && _c !== void 0 ? _c : \"好\",\n m(\"i.icon.checkmark\")\n ]);\n return m(\"div.actions\", [\n negative,\n positive\n ]);\n }\n};\nvar pickModalAttr = function (attr) { return ({\n size: attr.size,\n fullscreen: attr.fullscreen,\n isInvert: attr.isInvert\n}); };\nexports.Confirm = {\n view: function (_a) {\n var _b;\n var attrs = _a.attrs, children = _a.children;\n var modalAttr = pickModalAttr(attrs);\n var modalActionAttr = {\n positiveText: attrs.positiveText,\n negativeText: attrs.negativeText,\n connectPositive: attrs.connectPositive,\n connectNegative: attrs.connectNegative\n };\n return m(exports.Modal, modalAttr, [\n m(\"div.header\", (_b = attrs.title) !== null && _b !== void 0 ? _b : \"提示\"),\n m(\"div.scrolling.content\", children),\n m(exports.ModalAction, modalActionAttr)\n ]);\n }\n};\nexports.Alert = {\n view: function (_a) {\n var _b, _c;\n var attrs = _a.attrs, children = _a.children;\n var modalAttr = pickModalAttr(attrs);\n return m(exports.Modal, modalAttr, [\n m(\"div.header\", (_b = attrs.title) !== null && _b !== void 0 ? _b : \"提示\"),\n m(\"div.scrolling.content\", children),\n m(\"div.actions\", m(\"button.ui.positive.right.labeled.icon.button\", { onclick: attrs.connectResolve }, [\n (_c = attrs.positiveText) !== null && _c !== void 0 ? _c : \"好\",\n m(\"i.icon.checkmark\"),\n ]))\n ]);\n }\n};\n\n\n//# sourceURL=webpack:///../dist/widget/modal.js?"); +eval("\nexports.__esModule = true;\nexports.Modal = void 0;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar BaseModal = __webpack_require__(/*! ../element/modal */ \"../dist/element/modal.js\");\nexports.Modal = {\n view: function (_a) {\n var attrs = _a.attrs, children = _a.children;\n var modalAttr = BaseModal.pickModalAttr(attrs);\n var actionAttr = {\n connectResolve: attrs.connectResolve\n };\n return m(BaseModal.Modal, modalAttr, [\n m(\"div.header\", attrs.title),\n m(\"div.scrolling.content\", children),\n m(BaseModal.ModalAction, actionAttr)\n ]);\n }\n};\n\n\n//# sourceURL=webpack:///../dist/widget/modal.js?"); /***/ }), @@ -884,9 +894,9 @@ eval("\nexports.__esModule = true;\nvar fn_1 = __webpack_require__(/*! drifloon/ /*!***************************!*\ !*** ./src/page/modal.ts ***! \***************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("\nexports.__esModule = true;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar button_1 = __webpack_require__(/*! drifloon/element/button */ \"../dist/element/button.js\");\nvar header_1 = __webpack_require__(/*! drifloon/element/header */ \"../dist/element/header.js\");\nvar var_1 = __webpack_require__(/*! drifloon/data/var */ \"../dist/data/var.js\");\nvar modal_1 = __webpack_require__(/*! drifloon/module/modal */ \"../dist/module/modal.js\");\nvar modal_2 = __webpack_require__(/*! drifloon/widget/modal */ \"../dist/widget/modal.js\");\nvar ConfirmS = {\n view: function () {\n var attr1 = {\n title: \"新式标题\",\n content: m(\"div.label.ui.orange\", \"理论上,这里写上任何文本。\")\n };\n var onclick1 = function () {\n (0, modal_1.confirmAsync)(attr1)\n .caseOf({\n Just: function (_) { return (0, modal_1.alertText)(\"你点了确定!\"); },\n Nothing: function () { return (0, modal_1.alertText)(\"你点了取消!\"); }\n });\n };\n return m(button_1.Button, { color: var_1.Color.Green, connectClick: onclick1 }, \"提示\");\n }\n};\nvar AlertModalHere = {\n view: function (_a) {\n var attrs = _a.attrs;\n var actionAttr = {\n connectPositive: attrs.connectResolve,\n connectNegative: attrs.connectResolve\n };\n return m(modal_2.Modal, attrs, [\n m(\"div.header\", \"点击下面几块按钮\"),\n m(\"div.content\", [\n m(button_1.Button, { connectClick: function () { return console.log(\"你看见我了\"); } }, \"alert\"),\n m(button_1.Button, { connectClick: function () { return console.info(\"你看见我了\"); } }, \"confirm\")\n ]),\n m(modal_2.ModalAction, actionAttr)\n ]);\n }\n};\nvar ModalS = {\n view: function () {\n var openModal = function () { return (0, modal_1.modal)(AlertModalHere); };\n return m(\"div\", [\n m(button_1.Button, { connectClick: openModal }, \"打开对话框\")\n ]);\n }\n};\nvar Main = {\n view: function (_) { return m(\"div.ui.teal.segment\", [\n m(header_1.Header, { isDivid: true, size: var_1.Size.Huge }, \"对话框\"),\n m(header_1.Header, { size: var_1.Size.Large }, \"提示\"),\n m(ConfirmS),\n m(header_1.Header, { size: var_1.Size.Large }, \"混合使用\"),\n m(ModalS)\n ]); }\n};\nexports[\"default\"] = Main;\n\n\n//# sourceURL=webpack:///./src/page/modal.ts?"); +eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar m = __webpack_require__(/*! mithril */ \"../node_modules/mithril/index.js\");\nvar button_1 = __webpack_require__(/*! drifloon/element/button */ \"../dist/element/button.js\");\nvar header_1 = __webpack_require__(/*! drifloon/element/header */ \"../dist/element/header.js\");\nvar var_1 = __webpack_require__(/*! drifloon/data/var */ \"../dist/data/var.js\");\nvar modal_1 = __webpack_require__(/*! drifloon/module/modal */ \"../dist/module/modal.js\");\nvar modal_2 = __webpack_require__(/*! drifloon/widget/modal */ \"../dist/widget/modal.js\");\nvar ConfirmS = {\n view: function () {\n var attr1 = {\n title: \"新式标题\",\n content: m(\"div.label.ui.orange\", \"理论上,这里写上任何文本。\")\n };\n var onclick1 = function () {\n (0, modal_1.confirmAsync)(attr1)\n .caseOf({\n Just: function (_) { return (0, modal_1.alertText)(\"你点了确定!\"); },\n Nothing: function () { return (0, modal_1.alertText)(\"你点了取消!\"); }\n });\n };\n return m(button_1.Button, { color: var_1.Color.Green, connectClick: onclick1 }, \"提示\");\n }\n};\nvar AlertModalHere = {\n view: function (_a) {\n var attrs = _a.attrs;\n var modalAttr = __assign(__assign({}, attrs), { title: \"对话框演示\" });\n return m(modal_2.Modal, modalAttr, [\n m(button_1.Button, { connectClick: function () { return console.log(\"你看见我了\"); } }, \"alert\"),\n m(button_1.Button, { connectClick: function () { return console.info(\"你看见我了\"); } }, \"confirm\")\n ]);\n }\n};\nvar ModalS = {\n view: function () {\n var openModal = function () { return (0, modal_1.modal)(AlertModalHere); };\n return m(\"div\", [\n m(button_1.Button, { connectClick: openModal }, \"打开对话框\")\n ]);\n }\n};\nvar Main = {\n view: function (_) { return m(\"div.ui.teal.segment\", [\n m(header_1.Header, { isDivid: true, size: var_1.Size.Huge }, \"对话框\"),\n m(header_1.Header, { size: var_1.Size.Large }, \"提示\"),\n m(ConfirmS),\n m(header_1.Header, { size: var_1.Size.Large }, \"混合使用\"),\n m(ModalS)\n ]); }\n};\nexports[\"default\"] = Main;\n\n\n//# sourceURL=webpack:///./src/page/modal.ts?"); /***/ }),