miniapp-web-jsapi
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -8,4 +8,4 @@ { | ||
"dev": "rm -rf ./lib && npx gulp dev", | ||
"build:gulp": "rm -rf ./lib && npx gulp build", | ||
"build:webpack": "rm -rf ./dist && webpack --stats verbose", | ||
"build:gulp": "rm -rf ./lib && npx gulp build && babel lib --out-dir ./lib --config-file ./babel.config.js --extensions \".js\"", | ||
"build:webpack": "rm -rf ./dist && webpack --stats verbose && babel dist --out-dir ./dist --config-file ./babel.config.js --extensions \".js\"", | ||
"build": "npm run build:gulp && npm run build:webpack", | ||
@@ -30,10 +30,7 @@ "build:webpack:analyze": "rm -rf ./dist && cross-env ANALYZE=true webpack --stats verbose", | ||
"device-detector-js": "^2.2.10", | ||
"svelte": "^3.46.4", | ||
"react-style-object-to-css": "^1.1.2" | ||
"react-style-object-to-css": "^1.1.2", | ||
"svelte": "^3.46.4" | ||
}, | ||
"devDependencies": { | ||
"babel-types": "^6.26.0", | ||
"gulp-svelte": "0.8.0", | ||
"svelte-preprocess": "^4.10.4", | ||
"svelte-loader": "^3.1.2", | ||
"@babel/cli": "^7.17.6", | ||
"@types/jest": "^26.0.22", | ||
@@ -44,4 +41,6 @@ "@types/lodash.get": "^4.4.6", | ||
"babel-loader": "^8.2.2", | ||
"babel-types": "^6.26.0", | ||
"cross-env": "^7.0.2", | ||
"css-loader": "^3.5.3", | ||
"gulp-svelte": "0.8.0", | ||
"less": "^4.1.2", | ||
@@ -52,2 +51,4 @@ "less-loader": "^10.2.0", | ||
"postcss-loader": "^3.0.0", | ||
"svelte-loader": "^3.1.2", | ||
"svelte-preprocess": "^4.10.4", | ||
"typescript": "^4.2.3", | ||
@@ -54,0 +55,0 @@ "webpack": "^5.70.0", |
@@ -1,282 +0,318 @@ | ||
/* src/web/components/alert/Alert.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
append_styles, | ||
attr, | ||
create_component, | ||
destroy_component, | ||
detach, | ||
element, | ||
init, | ||
insert, | ||
is_function, | ||
listen, | ||
mount_component, | ||
null_to_empty, | ||
safe_not_equal, | ||
set_data, | ||
space, | ||
text, | ||
transition_in, | ||
transition_out | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
import { getPrefixCls } from "../../../../lib/web"; | ||
import JsUtils from "../../../../lib/utils/js-utils"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/alert/Alert.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, append_styles, attr, create_component, destroy_component, detach, element, init, insert, is_function, listen, mount_component, null_to_empty, safe_not_equal, set_data, space, text, transition_in, transition_out } from "svelte/internal"; | ||
import { getPrefixCls } from "../.."; | ||
import JsUtils from "../../../utils/js-utils"; | ||
import Modal from '../modal'; | ||
function add_css(target) { | ||
append_styles(target, "svelte-hkmdre", ".alipay-mwj-alert.svelte-hkmdre{width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.4);display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-alert-content.svelte-hkmdre{background-color:#fff;width:80vw;border-radius:10px;padding-top:20px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-alert-title.svelte-hkmdre{font-size:30px;color:#000;text-align:center;padding:12px 30px 12px 30px}.alipay-mwj-alert-text.svelte-hkmdre{color:#888;font-size:24px;padding:15px 30px 25px 30px}.alipay-mwj-alert-line.svelte-hkmdre{width:100%;height:1px;background-color:#eee;margin-top:5px}.alipay-mwj-alert-button.svelte-hkmdre{color:#3F8DE2;font-size:30px;padding:20px 30px}"); | ||
} | ||
append_styles(target, "svelte-hkmdre", ".alipay-mwj-alert.svelte-hkmdre{width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.4);display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-alert-content.svelte-hkmdre{background-color:#fff;width:80vw;border-radius:10px;padding-top:20px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-alert-title.svelte-hkmdre{font-size:30px;color:#000;text-align:center;padding:12px 30px 12px 30px}.alipay-mwj-alert-text.svelte-hkmdre{color:#888;font-size:24px;padding:15px 30px 25px 30px}.alipay-mwj-alert-line.svelte-hkmdre{width:100%;height:1px;background-color:#eee;margin-top:5px}.alipay-mwj-alert-button.svelte-hkmdre{color:#3F8DE2;font-size:30px;padding:20px 30px}"); | ||
} // (16:6) {#if isTitleNotEmpty} | ||
// (17:6) {#if isTitleNotEmpty} | ||
function create_if_block_1(ctx) { | ||
let span; | ||
let t; | ||
let span_class_value; | ||
var span; | ||
var t; | ||
var span_class_value; | ||
return { | ||
c: function c() { | ||
span = element("span"); | ||
t = text( | ||
/*title*/ | ||
ctx[0]); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[6] + "-title" + " svelte-hkmdre")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p: function p(ctx, dirty) { | ||
if (dirty & | ||
/*title*/ | ||
1) set_data(t, | ||
/*title*/ | ||
ctx[0]); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} // (20:6) {#if isContentNotEmpty} | ||
return { | ||
c() { | ||
span = element("span"); | ||
t = text(/*title*/ ctx[0]); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[6] + "-title" + " svelte-hkmdre")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*title*/ 1) set_data(t, /*title*/ ctx[0]); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} | ||
// (21:6) {#if isContentNotEmpty} | ||
function create_if_block(ctx) { | ||
let span; | ||
let t; | ||
let span_class_value; | ||
var span; | ||
var t; | ||
var span_class_value; | ||
return { | ||
c: function c() { | ||
span = element("span"); | ||
t = text( | ||
/*content*/ | ||
ctx[1]); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[6] + "-text" + " svelte-hkmdre")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p: function p(ctx, dirty) { | ||
if (dirty & | ||
/*content*/ | ||
2) set_data(t, | ||
/*content*/ | ||
ctx[1]); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} // (13:0) <Modal> | ||
return { | ||
c() { | ||
span = element("span"); | ||
t = text(/*content*/ ctx[1]); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[6] + "-text" + " svelte-hkmdre")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*content*/ 2) set_data(t, /*content*/ ctx[1]); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} | ||
// (14:0) <Modal> | ||
function create_default_slot(ctx) { | ||
let div2; | ||
let div1; | ||
let t0; | ||
let t1; | ||
let div0; | ||
let div0_class_value; | ||
let t2; | ||
let span; | ||
let t3_value = (/*buttonText*/ ctx[2] || 'OK') + ""; | ||
let t3; | ||
let span_class_value; | ||
let div1_class_value; | ||
let div2_class_value; | ||
let mounted; | ||
let dispose; | ||
let if_block0 = /*isTitleNotEmpty*/ ctx[5] && create_if_block_1(ctx); | ||
let if_block1 = /*isContentNotEmpty*/ ctx[4] && create_if_block(ctx); | ||
var div2; | ||
var div1; | ||
var t0; | ||
var t1; | ||
var div0; | ||
var div0_class_value; | ||
var t2; | ||
var span; | ||
var t3_value = ( | ||
/*buttonText*/ | ||
ctx[2] || 'OK') + ""; | ||
var t3; | ||
var span_class_value; | ||
var div1_class_value; | ||
var div2_class_value; | ||
var mounted; | ||
var dispose; | ||
var if_block0 = | ||
/*isTitleNotEmpty*/ | ||
ctx[5] && create_if_block_1(ctx); | ||
var if_block1 = | ||
/*isContentNotEmpty*/ | ||
ctx[4] && create_if_block(ctx); | ||
return { | ||
c: function c() { | ||
div2 = element("div"); | ||
div1 = element("div"); | ||
if (if_block0) if_block0.c(); | ||
t0 = space(); | ||
if (if_block1) if_block1.c(); | ||
t1 = space(); | ||
div0 = element("div"); | ||
t2 = space(); | ||
span = element("span"); | ||
t3 = text(t3_value); | ||
attr(div0, "class", div0_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[6] + "-line" + " svelte-hkmdre")); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[6] + "-button" + " svelte-hkmdre")); | ||
attr(div1, "class", div1_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[6] + "-content" + " svelte-hkmdre")); | ||
attr(div2, "class", div2_class_value = "" + (null_to_empty( | ||
/*prefixCls*/ | ||
ctx[6]) + " svelte-hkmdre")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, div2, anchor); | ||
append(div2, div1); | ||
if (if_block0) if_block0.m(div1, null); | ||
append(div1, t0); | ||
if (if_block1) if_block1.m(div1, null); | ||
append(div1, t1); | ||
append(div1, div0); | ||
append(div1, t2); | ||
append(div1, span); | ||
append(span, t3); | ||
return { | ||
c() { | ||
div2 = element("div"); | ||
div1 = element("div"); | ||
if (if_block0) if_block0.c(); | ||
t0 = space(); | ||
if (if_block1) if_block1.c(); | ||
t1 = space(); | ||
div0 = element("div"); | ||
t2 = space(); | ||
span = element("span"); | ||
t3 = text(t3_value); | ||
attr(div0, "class", div0_class_value = "" + (/*prefixCls*/ ctx[6] + "-line" + " svelte-hkmdre")); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[6] + "-button" + " svelte-hkmdre")); | ||
attr(div1, "class", div1_class_value = "" + (/*prefixCls*/ ctx[6] + "-content" + " svelte-hkmdre")); | ||
attr(div2, "class", div2_class_value = "" + (null_to_empty(/*prefixCls*/ ctx[6]) + " svelte-hkmdre")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div2, anchor); | ||
append(div2, div1); | ||
if (if_block0) if_block0.m(div1, null); | ||
append(div1, t0); | ||
if (if_block1) if_block1.m(div1, null); | ||
append(div1, t1); | ||
append(div1, div0); | ||
append(div1, t2); | ||
append(div1, span); | ||
append(span, t3); | ||
if (!mounted) { | ||
dispose = listen(span, "click", function () { | ||
if (is_function( | ||
/*onClose*/ | ||
ctx[3])) | ||
/*onClose*/ | ||
ctx[3].apply(this, arguments); | ||
}); | ||
mounted = true; | ||
} | ||
}, | ||
p: function p(new_ctx, dirty) { | ||
ctx = new_ctx; | ||
if (!mounted) { | ||
dispose = listen(span, "click", function () { | ||
if (is_function(/*onClose*/ ctx[3])) /*onClose*/ ctx[3].apply(this, arguments); | ||
}); | ||
if ( | ||
/*isTitleNotEmpty*/ | ||
ctx[5]) { | ||
if (if_block0) { | ||
if_block0.p(ctx, dirty); | ||
} else { | ||
if_block0 = create_if_block_1(ctx); | ||
if_block0.c(); | ||
if_block0.m(div1, t0); | ||
} | ||
} else if (if_block0) { | ||
if_block0.d(1); | ||
if_block0 = null; | ||
} | ||
mounted = true; | ||
} | ||
}, | ||
p(new_ctx, dirty) { | ||
ctx = new_ctx; | ||
if ( | ||
/*isContentNotEmpty*/ | ||
ctx[4]) { | ||
if (if_block1) { | ||
if_block1.p(ctx, dirty); | ||
} else { | ||
if_block1 = create_if_block(ctx); | ||
if_block1.c(); | ||
if_block1.m(div1, t1); | ||
} | ||
} else if (if_block1) { | ||
if_block1.d(1); | ||
if_block1 = null; | ||
} | ||
if (/*isTitleNotEmpty*/ ctx[5]) { | ||
if (if_block0) { | ||
if_block0.p(ctx, dirty); | ||
} else { | ||
if_block0 = create_if_block_1(ctx); | ||
if_block0.c(); | ||
if_block0.m(div1, t0); | ||
} | ||
} else if (if_block0) { | ||
if_block0.d(1); | ||
if_block0 = null; | ||
} | ||
if (/*isContentNotEmpty*/ ctx[4]) { | ||
if (if_block1) { | ||
if_block1.p(ctx, dirty); | ||
} else { | ||
if_block1 = create_if_block(ctx); | ||
if_block1.c(); | ||
if_block1.m(div1, t1); | ||
} | ||
} else if (if_block1) { | ||
if_block1.d(1); | ||
if_block1 = null; | ||
} | ||
if (dirty & /*buttonText*/ 4 && t3_value !== (t3_value = (/*buttonText*/ ctx[2] || 'OK') + "")) set_data(t3, t3_value); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(div2); | ||
if (if_block0) if_block0.d(); | ||
if (if_block1) if_block1.d(); | ||
mounted = false; | ||
dispose(); | ||
} | ||
}; | ||
if (dirty & | ||
/*buttonText*/ | ||
4 && t3_value !== (t3_value = ( | ||
/*buttonText*/ | ||
ctx[2] || 'OK') + "")) set_data(t3, t3_value); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(div2); | ||
if (if_block0) if_block0.d(); | ||
if (if_block1) if_block1.d(); | ||
mounted = false; | ||
dispose(); | ||
} | ||
}; | ||
} | ||
function create_fragment(ctx) { | ||
let modal; | ||
let current; | ||
var modal; | ||
var current; | ||
modal = new Modal({ | ||
props: { | ||
$$slots: { | ||
default: [create_default_slot] | ||
}, | ||
$$scope: { | ||
ctx: ctx | ||
} | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
modal = new Modal({ | ||
props: { | ||
$$slots: { default: [create_default_slot] }, | ||
$$scope: { ctx } | ||
} | ||
}); | ||
var modal_changes = {}; | ||
return { | ||
c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p(ctx, [dirty]) { | ||
const modal_changes = {}; | ||
if (dirty & | ||
/*$$scope, onClose, buttonText, content, isContentNotEmpty, title, isTitleNotEmpty*/ | ||
191) { | ||
modal_changes.$$scope = { | ||
dirty: dirty, | ||
ctx: ctx | ||
}; | ||
} | ||
if (dirty & /*$$scope, onClose, buttonText, content, isContentNotEmpty, title, isTitleNotEmpty*/ 191) { | ||
modal_changes.$$scope = { dirty, ctx }; | ||
} | ||
modal.$set(modal_changes); | ||
}, | ||
i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
modal.$set(modal_changes); | ||
}, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let isTitleNotEmpty; | ||
let isContentNotEmpty; | ||
let { title } = $$props; | ||
let { content } = $$props; | ||
let { buttonText } = $$props; | ||
let { onClose } = $$props; | ||
var prefixCls = getPrefixCls('alert'); | ||
var isTitleNotEmpty; | ||
var isContentNotEmpty; | ||
var title = $$props.title; | ||
var content = $$props.content; | ||
var buttonText = $$props.buttonText; | ||
var onClose = $$props.onClose; | ||
var prefixCls = getPrefixCls('alert'); | ||
$$self.$$set = $$props => { | ||
if ('title' in $$props) $$invalidate(0, title = $$props.title); | ||
if ('content' in $$props) $$invalidate(1, content = $$props.content); | ||
if ('buttonText' in $$props) $$invalidate(2, buttonText = $$props.buttonText); | ||
if ('onClose' in $$props) $$invalidate(3, onClose = $$props.onClose); | ||
}; | ||
$$self.$$set = function ($$props) { | ||
if ('title' in $$props) $$invalidate(0, title = $$props.title); | ||
if ('content' in $$props) $$invalidate(1, content = $$props.content); | ||
if ('buttonText' in $$props) $$invalidate(2, buttonText = $$props.buttonText); | ||
if ('onClose' in $$props) $$invalidate(3, onClose = $$props.onClose); | ||
}; | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty & /*title*/ 1) { | ||
$: $$invalidate(5, isTitleNotEmpty = JsUtils.isNotEmpty(title)); | ||
} | ||
$$self.$$.update = function () { | ||
if ($$self.$$.dirty & | ||
/*title*/ | ||
1) { | ||
$: $$invalidate(5, isTitleNotEmpty = JsUtils.isNotEmpty(title)); | ||
} | ||
if ($$self.$$.dirty & /*content*/ 2) { | ||
$: $$invalidate(4, isContentNotEmpty = JsUtils.isNotEmpty(content)); | ||
} | ||
}; | ||
if ($$self.$$.dirty & | ||
/*content*/ | ||
2) { | ||
$: $$invalidate(4, isContentNotEmpty = JsUtils.isNotEmpty(content)); | ||
} | ||
}; | ||
return [ | ||
title, | ||
content, | ||
buttonText, | ||
onClose, | ||
isContentNotEmpty, | ||
isTitleNotEmpty, | ||
prefixCls | ||
]; | ||
return [title, content, buttonText, onClose, isContentNotEmpty, isTitleNotEmpty, prefixCls]; | ||
} | ||
class Alert extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
var Alert = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(Alert, _SvelteComponent); | ||
init( | ||
this, | ||
options, | ||
instance, | ||
create_fragment, | ||
safe_not_equal, | ||
{ | ||
title: 0, | ||
content: 1, | ||
buttonText: 2, | ||
onClose: 3 | ||
}, | ||
add_css | ||
); | ||
} | ||
} | ||
var _super = _createSuper(Alert); | ||
function Alert(options) { | ||
var _this; | ||
_classCallCheck(this, Alert); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
title: 0, | ||
content: 1, | ||
buttonText: 2, | ||
onClose: 3 | ||
}, add_css); | ||
return _this; | ||
} | ||
return _createClass(Alert); | ||
}(SvelteComponent); | ||
export default Alert; |
@@ -1,307 +0,353 @@ | ||
/* src/web/components/confirm/Confirm.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
append_styles, | ||
attr, | ||
create_component, | ||
destroy_component, | ||
detach, | ||
element, | ||
init, | ||
insert, | ||
listen, | ||
mount_component, | ||
null_to_empty, | ||
run_all, | ||
safe_not_equal, | ||
set_data, | ||
space, | ||
text, | ||
transition_in, | ||
transition_out | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
import { getPrefixCls } from "../../../../lib/web"; | ||
import JsUtils from "../../../../lib/utils/js-utils"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/confirm/Confirm.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, append_styles, attr, create_component, destroy_component, detach, element, init, insert, listen, mount_component, null_to_empty, run_all, safe_not_equal, set_data, space, text, transition_in, transition_out } from "svelte/internal"; | ||
import { getPrefixCls } from "../.."; | ||
import JsUtils from "../../../utils/js-utils"; | ||
import Modal from '../modal'; | ||
function add_css(target) { | ||
append_styles(target, "svelte-1ayinak", ".alipay-mwj-confirm.svelte-1ayinak{width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.4);display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-confirm-content.svelte-1ayinak{background-color:#fff;width:80vw;border-radius:10px;padding-top:20px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-confirm-title.svelte-1ayinak{font-size:30px;color:#000;text-align:center;padding:12px 30px 12px 30px}.alipay-mwj-confirm-text.svelte-1ayinak{color:#888;font-size:24px;padding:15px 30px 25px 30px}.alipay-mwj-confirm-line.svelte-1ayinak{width:100%;height:1px;background-color:#eee;margin-top:5px}.alipay-mwj-confirm-buttonContent.svelte-1ayinak{width:100%;display:flex;flex-direction:row;align-items:center;padding-left:30px;padding-right:30px}.alipay-mwj-confirm-button.svelte-1ayinak{flex:1;font-size:30px;text-align:center;padding-top:20px;padding-bottom:20px;color:#3F8DE2}.alipay-mwj-confirm-cancel.svelte-1ayinak{flex:1;font-size:30px;text-align:center;padding-top:20px;padding-bottom:20px;color:#000;border-right:solid 1px #eee}"); | ||
} | ||
append_styles(target, "svelte-1ayinak", ".alipay-mwj-confirm.svelte-1ayinak{width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.4);display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-confirm-content.svelte-1ayinak{background-color:#fff;width:80vw;border-radius:10px;padding-top:20px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-confirm-title.svelte-1ayinak{font-size:30px;color:#000;text-align:center;padding:12px 30px 12px 30px}.alipay-mwj-confirm-text.svelte-1ayinak{color:#888;font-size:24px;padding:15px 30px 25px 30px}.alipay-mwj-confirm-line.svelte-1ayinak{width:100%;height:1px;background-color:#eee;margin-top:5px}.alipay-mwj-confirm-buttonContent.svelte-1ayinak{width:100%;display:flex;flex-direction:row;align-items:center;padding-left:30px;padding-right:30px}.alipay-mwj-confirm-button.svelte-1ayinak{flex:1;font-size:30px;text-align:center;padding-top:20px;padding-bottom:20px;color:#3F8DE2}.alipay-mwj-confirm-cancel.svelte-1ayinak{flex:1;font-size:30px;text-align:center;padding-top:20px;padding-bottom:20px;color:#000;border-right:solid 1px #eee}"); | ||
} // (17:6) {#if isTitleNotEmpty} | ||
// (18:6) {#if isTitleNotEmpty} | ||
function create_if_block_1(ctx) { | ||
let span; | ||
let t; | ||
let span_class_value; | ||
var span; | ||
var t; | ||
var span_class_value; | ||
return { | ||
c: function c() { | ||
span = element("span"); | ||
t = text( | ||
/*title*/ | ||
ctx[0]); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-title" + " svelte-1ayinak")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p: function p(ctx, dirty) { | ||
if (dirty & | ||
/*title*/ | ||
1) set_data(t, | ||
/*title*/ | ||
ctx[0]); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} // (21:6) {#if isContentNotEmpty} | ||
return { | ||
c() { | ||
span = element("span"); | ||
t = text(/*title*/ ctx[0]); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[7] + "-title" + " svelte-1ayinak")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*title*/ 1) set_data(t, /*title*/ ctx[0]); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} | ||
// (22:6) {#if isContentNotEmpty} | ||
function create_if_block(ctx) { | ||
let span; | ||
let t; | ||
let span_class_value; | ||
var span; | ||
var t; | ||
var span_class_value; | ||
return { | ||
c: function c() { | ||
span = element("span"); | ||
t = text( | ||
/*content*/ | ||
ctx[1]); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-text" + " svelte-1ayinak")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p: function p(ctx, dirty) { | ||
if (dirty & | ||
/*content*/ | ||
2) set_data(t, | ||
/*content*/ | ||
ctx[1]); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} // (14:0) <Modal> | ||
return { | ||
c() { | ||
span = element("span"); | ||
t = text(/*content*/ ctx[1]); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[7] + "-text" + " svelte-1ayinak")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, span, anchor); | ||
append(span, t); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*content*/ 2) set_data(t, /*content*/ ctx[1]); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(span); | ||
} | ||
}; | ||
} | ||
// (15:0) <Modal> | ||
function create_default_slot(ctx) { | ||
let div3; | ||
let div2; | ||
let t0; | ||
let t1; | ||
let div0; | ||
let div0_class_value; | ||
let t2; | ||
let div1; | ||
let span0; | ||
let t3_value = (/*cancelButtonText*/ ctx[3] || 'Cancel') + ""; | ||
let t3; | ||
let span0_class_value; | ||
let t4; | ||
let span1; | ||
let t5_value = (/*confirmButtonText*/ ctx[2] || 'OK') + ""; | ||
let t5; | ||
let span1_class_value; | ||
let div1_class_value; | ||
let div2_class_value; | ||
let div3_class_value; | ||
let mounted; | ||
let dispose; | ||
let if_block0 = /*isTitleNotEmpty*/ ctx[6] && create_if_block_1(ctx); | ||
let if_block1 = /*isContentNotEmpty*/ ctx[5] && create_if_block(ctx); | ||
var div3; | ||
var div2; | ||
var t0; | ||
var t1; | ||
var div0; | ||
var div0_class_value; | ||
var t2; | ||
var div1; | ||
var span0; | ||
var t3_value = ( | ||
/*cancelButtonText*/ | ||
ctx[3] || 'Cancel') + ""; | ||
var t3; | ||
var span0_class_value; | ||
var t4; | ||
var span1; | ||
var t5_value = ( | ||
/*confirmButtonText*/ | ||
ctx[2] || 'OK') + ""; | ||
var t5; | ||
var span1_class_value; | ||
var div1_class_value; | ||
var div2_class_value; | ||
var div3_class_value; | ||
var mounted; | ||
var dispose; | ||
var if_block0 = | ||
/*isTitleNotEmpty*/ | ||
ctx[6] && create_if_block_1(ctx); | ||
var if_block1 = | ||
/*isContentNotEmpty*/ | ||
ctx[5] && create_if_block(ctx); | ||
return { | ||
c: function c() { | ||
div3 = element("div"); | ||
div2 = element("div"); | ||
if (if_block0) if_block0.c(); | ||
t0 = space(); | ||
if (if_block1) if_block1.c(); | ||
t1 = space(); | ||
div0 = element("div"); | ||
t2 = space(); | ||
div1 = element("div"); | ||
span0 = element("span"); | ||
t3 = text(t3_value); | ||
t4 = space(); | ||
span1 = element("span"); | ||
t5 = text(t5_value); | ||
attr(div0, "class", div0_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-line" + " svelte-1ayinak")); | ||
attr(span0, "class", span0_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-cancel" + " svelte-1ayinak")); | ||
attr(span1, "class", span1_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-button" + " svelte-1ayinak")); | ||
attr(div1, "class", div1_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-buttonContent" + " svelte-1ayinak")); | ||
attr(div2, "class", div2_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[7] + "-content" + " svelte-1ayinak")); | ||
attr(div3, "class", div3_class_value = "" + (null_to_empty( | ||
/*prefixCls*/ | ||
ctx[7]) + " svelte-1ayinak")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, div3, anchor); | ||
append(div3, div2); | ||
if (if_block0) if_block0.m(div2, null); | ||
append(div2, t0); | ||
if (if_block1) if_block1.m(div2, null); | ||
append(div2, t1); | ||
append(div2, div0); | ||
append(div2, t2); | ||
append(div2, div1); | ||
append(div1, span0); | ||
append(span0, t3); | ||
append(div1, t4); | ||
append(div1, span1); | ||
append(span1, t5); | ||
return { | ||
c() { | ||
div3 = element("div"); | ||
div2 = element("div"); | ||
if (if_block0) if_block0.c(); | ||
t0 = space(); | ||
if (if_block1) if_block1.c(); | ||
t1 = space(); | ||
div0 = element("div"); | ||
t2 = space(); | ||
div1 = element("div"); | ||
span0 = element("span"); | ||
t3 = text(t3_value); | ||
t4 = space(); | ||
span1 = element("span"); | ||
t5 = text(t5_value); | ||
attr(div0, "class", div0_class_value = "" + (/*prefixCls*/ ctx[7] + "-line" + " svelte-1ayinak")); | ||
attr(span0, "class", span0_class_value = "" + (/*prefixCls*/ ctx[7] + "-cancel" + " svelte-1ayinak")); | ||
attr(span1, "class", span1_class_value = "" + (/*prefixCls*/ ctx[7] + "-button" + " svelte-1ayinak")); | ||
attr(div1, "class", div1_class_value = "" + (/*prefixCls*/ ctx[7] + "-buttonContent" + " svelte-1ayinak")); | ||
attr(div2, "class", div2_class_value = "" + (/*prefixCls*/ ctx[7] + "-content" + " svelte-1ayinak")); | ||
attr(div3, "class", div3_class_value = "" + (null_to_empty(/*prefixCls*/ ctx[7]) + " svelte-1ayinak")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div3, anchor); | ||
append(div3, div2); | ||
if (if_block0) if_block0.m(div2, null); | ||
append(div2, t0); | ||
if (if_block1) if_block1.m(div2, null); | ||
append(div2, t1); | ||
append(div2, div0); | ||
append(div2, t2); | ||
append(div2, div1); | ||
append(div1, span0); | ||
append(span0, t3); | ||
append(div1, t4); | ||
append(div1, span1); | ||
append(span1, t5); | ||
if (!mounted) { | ||
dispose = [listen(span0, "click", | ||
/*click_handler*/ | ||
ctx[8]), listen(span1, "click", | ||
/*click_handler_1*/ | ||
ctx[9])]; | ||
mounted = true; | ||
} | ||
}, | ||
p: function p(ctx, dirty) { | ||
if ( | ||
/*isTitleNotEmpty*/ | ||
ctx[6]) { | ||
if (if_block0) { | ||
if_block0.p(ctx, dirty); | ||
} else { | ||
if_block0 = create_if_block_1(ctx); | ||
if_block0.c(); | ||
if_block0.m(div2, t0); | ||
} | ||
} else if (if_block0) { | ||
if_block0.d(1); | ||
if_block0 = null; | ||
} | ||
if (!mounted) { | ||
dispose = [ | ||
listen(span0, "click", /*click_handler*/ ctx[8]), | ||
listen(span1, "click", /*click_handler_1*/ ctx[9]) | ||
]; | ||
if ( | ||
/*isContentNotEmpty*/ | ||
ctx[5]) { | ||
if (if_block1) { | ||
if_block1.p(ctx, dirty); | ||
} else { | ||
if_block1 = create_if_block(ctx); | ||
if_block1.c(); | ||
if_block1.m(div2, t1); | ||
} | ||
} else if (if_block1) { | ||
if_block1.d(1); | ||
if_block1 = null; | ||
} | ||
mounted = true; | ||
} | ||
}, | ||
p(ctx, dirty) { | ||
if (/*isTitleNotEmpty*/ ctx[6]) { | ||
if (if_block0) { | ||
if_block0.p(ctx, dirty); | ||
} else { | ||
if_block0 = create_if_block_1(ctx); | ||
if_block0.c(); | ||
if_block0.m(div2, t0); | ||
} | ||
} else if (if_block0) { | ||
if_block0.d(1); | ||
if_block0 = null; | ||
} | ||
if (/*isContentNotEmpty*/ ctx[5]) { | ||
if (if_block1) { | ||
if_block1.p(ctx, dirty); | ||
} else { | ||
if_block1 = create_if_block(ctx); | ||
if_block1.c(); | ||
if_block1.m(div2, t1); | ||
} | ||
} else if (if_block1) { | ||
if_block1.d(1); | ||
if_block1 = null; | ||
} | ||
if (dirty & /*cancelButtonText*/ 8 && t3_value !== (t3_value = (/*cancelButtonText*/ ctx[3] || 'Cancel') + "")) set_data(t3, t3_value); | ||
if (dirty & /*confirmButtonText*/ 4 && t5_value !== (t5_value = (/*confirmButtonText*/ ctx[2] || 'OK') + "")) set_data(t5, t5_value); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(div3); | ||
if (if_block0) if_block0.d(); | ||
if (if_block1) if_block1.d(); | ||
mounted = false; | ||
run_all(dispose); | ||
} | ||
}; | ||
if (dirty & | ||
/*cancelButtonText*/ | ||
8 && t3_value !== (t3_value = ( | ||
/*cancelButtonText*/ | ||
ctx[3] || 'Cancel') + "")) set_data(t3, t3_value); | ||
if (dirty & | ||
/*confirmButtonText*/ | ||
4 && t5_value !== (t5_value = ( | ||
/*confirmButtonText*/ | ||
ctx[2] || 'OK') + "")) set_data(t5, t5_value); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(div3); | ||
if (if_block0) if_block0.d(); | ||
if (if_block1) if_block1.d(); | ||
mounted = false; | ||
run_all(dispose); | ||
} | ||
}; | ||
} | ||
function create_fragment(ctx) { | ||
let modal; | ||
let current; | ||
var modal; | ||
var current; | ||
modal = new Modal({ | ||
props: { | ||
$$slots: { | ||
default: [create_default_slot] | ||
}, | ||
$$scope: { | ||
ctx: ctx | ||
} | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
modal = new Modal({ | ||
props: { | ||
$$slots: { default: [create_default_slot] }, | ||
$$scope: { ctx } | ||
} | ||
}); | ||
var modal_changes = {}; | ||
return { | ||
c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p(ctx, [dirty]) { | ||
const modal_changes = {}; | ||
if (dirty & | ||
/*$$scope, onClose, confirmButtonText, cancelButtonText, content, isContentNotEmpty, title, isTitleNotEmpty*/ | ||
1151) { | ||
modal_changes.$$scope = { | ||
dirty: dirty, | ||
ctx: ctx | ||
}; | ||
} | ||
if (dirty & /*$$scope, onClose, confirmButtonText, cancelButtonText, content, isContentNotEmpty, title, isTitleNotEmpty*/ 1151) { | ||
modal_changes.$$scope = { dirty, ctx }; | ||
} | ||
modal.$set(modal_changes); | ||
}, | ||
i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
modal.$set(modal_changes); | ||
}, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let isTitleNotEmpty; | ||
let isContentNotEmpty; | ||
let { title } = $$props; | ||
let { content } = $$props; | ||
let { confirmButtonText } = $$props; | ||
let { cancelButtonText } = $$props; | ||
let { onClose } = $$props; | ||
var prefixCls = getPrefixCls('confirm'); | ||
const click_handler = () => onClose(false); | ||
const click_handler_1 = () => onClose(true); | ||
var isTitleNotEmpty; | ||
var isContentNotEmpty; | ||
var title = $$props.title; | ||
var content = $$props.content; | ||
var confirmButtonText = $$props.confirmButtonText; | ||
var cancelButtonText = $$props.cancelButtonText; | ||
var onClose = $$props.onClose; | ||
var prefixCls = getPrefixCls('confirm'); | ||
$$self.$$set = $$props => { | ||
if ('title' in $$props) $$invalidate(0, title = $$props.title); | ||
if ('content' in $$props) $$invalidate(1, content = $$props.content); | ||
if ('confirmButtonText' in $$props) $$invalidate(2, confirmButtonText = $$props.confirmButtonText); | ||
if ('cancelButtonText' in $$props) $$invalidate(3, cancelButtonText = $$props.cancelButtonText); | ||
if ('onClose' in $$props) $$invalidate(4, onClose = $$props.onClose); | ||
}; | ||
var click_handler = function click_handler() { | ||
return onClose(false); | ||
}; | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty & /*title*/ 1) { | ||
$: $$invalidate(6, isTitleNotEmpty = JsUtils.isNotEmpty(title)); | ||
} | ||
var click_handler_1 = function click_handler_1() { | ||
return onClose(true); | ||
}; | ||
if ($$self.$$.dirty & /*content*/ 2) { | ||
$: $$invalidate(5, isContentNotEmpty = JsUtils.isNotEmpty(content)); | ||
} | ||
}; | ||
$$self.$$set = function ($$props) { | ||
if ('title' in $$props) $$invalidate(0, title = $$props.title); | ||
if ('content' in $$props) $$invalidate(1, content = $$props.content); | ||
if ('confirmButtonText' in $$props) $$invalidate(2, confirmButtonText = $$props.confirmButtonText); | ||
if ('cancelButtonText' in $$props) $$invalidate(3, cancelButtonText = $$props.cancelButtonText); | ||
if ('onClose' in $$props) $$invalidate(4, onClose = $$props.onClose); | ||
}; | ||
return [ | ||
title, | ||
content, | ||
confirmButtonText, | ||
cancelButtonText, | ||
onClose, | ||
isContentNotEmpty, | ||
isTitleNotEmpty, | ||
prefixCls, | ||
click_handler, | ||
click_handler_1 | ||
]; | ||
} | ||
$$self.$$.update = function () { | ||
if ($$self.$$.dirty & | ||
/*title*/ | ||
1) { | ||
$: $$invalidate(6, isTitleNotEmpty = JsUtils.isNotEmpty(title)); | ||
} | ||
class Confirm extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
if ($$self.$$.dirty & | ||
/*content*/ | ||
2) { | ||
$: $$invalidate(5, isContentNotEmpty = JsUtils.isNotEmpty(content)); | ||
} | ||
}; | ||
init( | ||
this, | ||
options, | ||
instance, | ||
create_fragment, | ||
safe_not_equal, | ||
{ | ||
title: 0, | ||
content: 1, | ||
confirmButtonText: 2, | ||
cancelButtonText: 3, | ||
onClose: 4 | ||
}, | ||
add_css | ||
); | ||
} | ||
return [title, content, confirmButtonText, cancelButtonText, onClose, isContentNotEmpty, isTitleNotEmpty, prefixCls, click_handler, click_handler_1]; | ||
} | ||
var Confirm = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(Confirm, _SvelteComponent); | ||
var _super = _createSuper(Confirm); | ||
function Confirm(options) { | ||
var _this; | ||
_classCallCheck(this, Confirm); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
title: 0, | ||
content: 1, | ||
confirmButtonText: 2, | ||
cancelButtonText: 3, | ||
onClose: 4 | ||
}, add_css); | ||
return _this; | ||
} | ||
return _createClass(Confirm); | ||
}(SvelteComponent); | ||
export default Confirm; |
@@ -1,27 +0,18 @@ | ||
/* src/web/components/loading/Loading.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
append_styles, | ||
attr, | ||
create_component, | ||
destroy_component, | ||
detach, | ||
element, | ||
empty, | ||
init, | ||
insert, | ||
mount_component, | ||
null_to_empty, | ||
safe_not_equal, | ||
set_data, | ||
space, | ||
text, | ||
transition_in, | ||
transition_out | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
import { getPrefixCls } from "../../../../lib/web"; | ||
import AdapterEvents from "../../../../lib/web/events/events"; | ||
import { defaultEventManager } from "../../../../lib/web/events"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/loading/Loading.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, append_styles, attr, create_component, destroy_component, detach, element, empty, init, insert, mount_component, null_to_empty, safe_not_equal, set_data, space, text, transition_in, transition_out } from "svelte/internal"; | ||
import { getPrefixCls } from "../.."; | ||
import AdapterEvents from "../../events/events"; | ||
import { defaultEventManager } from "../../events"; | ||
import { onMount } from 'svelte'; | ||
@@ -32,167 +23,203 @@ import * as LoadingManager from './LoadingManager'; | ||
function add_css(target) { | ||
append_styles(target, "svelte-14svqov", ".alipay-mwj-loading.svelte-14svqov{background-color:rgba(58, 58, 58, 0.9);min-width:120px;padding:30px;border-radius:10px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-loading-iconRoot.svelte-14svqov{width:72px;height:72px;border:solid 4px #888;border-radius:50%;position:relative}.alipay-mwj-loading-icon.svelte-14svqov{position:absolute;left:-4px;top:-4px;right:-4px;bottom:-4px;border:solid 4px #fff;border-radius:50%;clip-path:polygon(50% 0%, 100% 0%, 100% 3600%, 50% 50%);animation:svelte-14svqov-alipay-mwj-loading-ring 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite}.alipay-mwj-loading-text.svelte-14svqov{color:#fff;font-size:24px;text-align:center;margin-top:24px}@keyframes svelte-14svqov-alipay-mwj-loading-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"); | ||
} | ||
append_styles(target, "svelte-14svqov", ".alipay-mwj-loading.svelte-14svqov{background-color:rgba(58, 58, 58, 0.9);min-width:120px;padding:30px;border-radius:10px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-loading-iconRoot.svelte-14svqov{width:72px;height:72px;border:solid 4px #888;border-radius:50%;position:relative}.alipay-mwj-loading-icon.svelte-14svqov{position:absolute;left:-4px;top:-4px;right:-4px;bottom:-4px;border:solid 4px #fff;border-radius:50%;clip-path:polygon(50% 0%, 100% 0%, 100% 3600%, 50% 50%);animation:svelte-14svqov-alipay-mwj-loading-ring 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite}.alipay-mwj-loading-text.svelte-14svqov{color:#fff;font-size:24px;text-align:center;margin-top:24px}@keyframes svelte-14svqov-alipay-mwj-loading-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"); | ||
} // (27:2) {#if show} | ||
// (27:2) {#if show} | ||
function create_if_block(ctx) { | ||
let div2; | ||
let div1; | ||
let div0; | ||
let div0_class_value; | ||
let div1_class_value; | ||
let t0; | ||
let span; | ||
let t1; | ||
let span_class_value; | ||
let div2_class_value; | ||
var div2; | ||
var div1; | ||
var div0; | ||
var div0_class_value; | ||
var div1_class_value; | ||
var t0; | ||
var span; | ||
var t1; | ||
var span_class_value; | ||
var div2_class_value; | ||
return { | ||
c: function c() { | ||
div2 = element("div"); | ||
div1 = element("div"); | ||
div0 = element("div"); | ||
t0 = space(); | ||
span = element("span"); | ||
t1 = text( | ||
/*content*/ | ||
ctx[0]); | ||
attr(div0, "class", div0_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[2] + "-icon" + " svelte-14svqov")); | ||
attr(div1, "class", div1_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[2] + "-iconRoot" + " svelte-14svqov")); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[2] + "-text" + " svelte-14svqov")); | ||
attr(div2, "class", div2_class_value = "" + (null_to_empty( | ||
/*prefixCls*/ | ||
ctx[2]) + " svelte-14svqov")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, div2, anchor); | ||
append(div2, div1); | ||
append(div1, div0); | ||
append(div2, t0); | ||
append(div2, span); | ||
append(span, t1); | ||
}, | ||
p: function p(ctx, dirty) { | ||
if (dirty & | ||
/*content*/ | ||
1) set_data(t1, | ||
/*content*/ | ||
ctx[0]); | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(div2); | ||
} | ||
}; | ||
} // (26:0) <Modal> | ||
return { | ||
c() { | ||
div2 = element("div"); | ||
div1 = element("div"); | ||
div0 = element("div"); | ||
t0 = space(); | ||
span = element("span"); | ||
t1 = text(/*content*/ ctx[0]); | ||
attr(div0, "class", div0_class_value = "" + (/*prefixCls*/ ctx[2] + "-icon" + " svelte-14svqov")); | ||
attr(div1, "class", div1_class_value = "" + (/*prefixCls*/ ctx[2] + "-iconRoot" + " svelte-14svqov")); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[2] + "-text" + " svelte-14svqov")); | ||
attr(div2, "class", div2_class_value = "" + (null_to_empty(/*prefixCls*/ ctx[2]) + " svelte-14svqov")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div2, anchor); | ||
append(div2, div1); | ||
append(div1, div0); | ||
append(div2, t0); | ||
append(div2, span); | ||
append(span, t1); | ||
}, | ||
p(ctx, dirty) { | ||
if (dirty & /*content*/ 1) set_data(t1, /*content*/ ctx[0]); | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(div2); | ||
} | ||
}; | ||
} | ||
// (26:0) <Modal> | ||
function create_default_slot(ctx) { | ||
let if_block_anchor; | ||
let if_block = /*show*/ ctx[1] && create_if_block(ctx); | ||
return { | ||
c() { | ||
if (if_block) if_block.c(); | ||
if_block_anchor = empty(); | ||
}, | ||
m(target, anchor) { | ||
if (if_block) if_block.m(target, anchor); | ||
insert(target, if_block_anchor, anchor); | ||
}, | ||
p(ctx, dirty) { | ||
if (/*show*/ ctx[1]) { | ||
if (if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if_block = create_if_block(ctx); | ||
if_block.c(); | ||
if_block.m(if_block_anchor.parentNode, if_block_anchor); | ||
} | ||
} else if (if_block) { | ||
if_block.d(1); | ||
if_block = null; | ||
} | ||
}, | ||
d(detaching) { | ||
if (if_block) if_block.d(detaching); | ||
if (detaching) detach(if_block_anchor); | ||
} | ||
}; | ||
var if_block_anchor; | ||
var if_block = | ||
/*show*/ | ||
ctx[1] && create_if_block(ctx); | ||
return { | ||
c: function c() { | ||
if (if_block) if_block.c(); | ||
if_block_anchor = empty(); | ||
}, | ||
m: function m(target, anchor) { | ||
if (if_block) if_block.m(target, anchor); | ||
insert(target, if_block_anchor, anchor); | ||
}, | ||
p: function p(ctx, dirty) { | ||
if ( | ||
/*show*/ | ||
ctx[1]) { | ||
if (if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if_block = create_if_block(ctx); | ||
if_block.c(); | ||
if_block.m(if_block_anchor.parentNode, if_block_anchor); | ||
} | ||
} else if (if_block) { | ||
if_block.d(1); | ||
if_block = null; | ||
} | ||
}, | ||
d: function d(detaching) { | ||
if (if_block) if_block.d(detaching); | ||
if (detaching) detach(if_block_anchor); | ||
} | ||
}; | ||
} | ||
function create_fragment(ctx) { | ||
let modal; | ||
let current; | ||
var modal; | ||
var current; | ||
modal = new Modal({ | ||
props: { | ||
$$slots: { | ||
default: [create_default_slot] | ||
}, | ||
$$scope: { | ||
ctx: ctx | ||
} | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
modal = new Modal({ | ||
props: { | ||
$$slots: { default: [create_default_slot] }, | ||
$$scope: { ctx } | ||
} | ||
}); | ||
var modal_changes = {}; | ||
return { | ||
c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p(ctx, [dirty]) { | ||
const modal_changes = {}; | ||
if (dirty & | ||
/*$$scope, content, show*/ | ||
35) { | ||
modal_changes.$$scope = { | ||
dirty: dirty, | ||
ctx: ctx | ||
}; | ||
} | ||
if (dirty & /*$$scope, content, show*/ 35) { | ||
modal_changes.$$scope = { dirty, ctx }; | ||
} | ||
modal.$set(modal_changes); | ||
}, | ||
i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
modal.$set(modal_changes); | ||
}, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let { content } = $$props; | ||
let { delay } = $$props; | ||
let { onClose } = $$props; | ||
var show = false; | ||
var prefixCls = getPrefixCls('loading'); | ||
var content = $$props.content; | ||
var delay = $$props.delay; | ||
var onClose = $$props.onClose; | ||
var show = false; | ||
var prefixCls = getPrefixCls('loading'); | ||
onMount(function () { | ||
var remover = defaultEventManager.addListener(AdapterEvents.LoadingHide, function () { | ||
onClose(); | ||
remover(); | ||
}); | ||
}); | ||
setTimeout(function () { | ||
$$invalidate(1, show = LoadingManager.willShowLoading()); | ||
onMount(function () { | ||
var remover = defaultEventManager.addListener(AdapterEvents.LoadingHide, function () { | ||
onClose(); | ||
remover(); | ||
}); | ||
}); | ||
if (!show) { | ||
console.log('my.hideLoading called before show'); | ||
} | ||
}, delay || 0); | ||
setTimeout( | ||
function () { | ||
$$invalidate(1, show = LoadingManager.willShowLoading()); | ||
$$self.$$set = function ($$props) { | ||
if ('content' in $$props) $$invalidate(0, content = $$props.content); | ||
if ('delay' in $$props) $$invalidate(3, delay = $$props.delay); | ||
if ('onClose' in $$props) $$invalidate(4, onClose = $$props.onClose); | ||
}; | ||
if (!show) { | ||
console.log('my.hideLoading called before show'); | ||
} | ||
}, | ||
delay || 0 | ||
); | ||
return [content, show, prefixCls, delay, onClose]; | ||
} | ||
$$self.$$set = $$props => { | ||
if ('content' in $$props) $$invalidate(0, content = $$props.content); | ||
if ('delay' in $$props) $$invalidate(3, delay = $$props.delay); | ||
if ('onClose' in $$props) $$invalidate(4, onClose = $$props.onClose); | ||
}; | ||
var Loading = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(Loading, _SvelteComponent); | ||
return [content, show, prefixCls, delay, onClose]; | ||
} | ||
var _super = _createSuper(Loading); | ||
class Loading extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, { content: 0, delay: 3, onClose: 4 }, add_css); | ||
} | ||
} | ||
function Loading(options) { | ||
var _this; | ||
_classCallCheck(this, Loading); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
content: 0, | ||
delay: 3, | ||
onClose: 4 | ||
}, add_css); | ||
return _this; | ||
} | ||
return _createClass(Loading); | ||
}(SvelteComponent); | ||
export default Loading; |
@@ -1,190 +0,183 @@ | ||
/* src/web/components/modal/Modal.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append_styles, | ||
attr, | ||
create_slot, | ||
detach, | ||
element, | ||
get_all_dirty_from_scope, | ||
get_slot_changes, | ||
init, | ||
insert, | ||
null_to_empty, | ||
safe_not_equal, | ||
transition_in, | ||
transition_out, | ||
update_slot_base | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
import { getPrefixCls } from "../../../../lib/web"; | ||
import reactToCSS from 'react-style-object-to-css'; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
function add_css(target) { | ||
append_styles(target, "svelte-1l3ztq7", ".alipay-mwj-modal.svelte-1l3ztq7{width:100vw;height:100vh;position:fixed;left:0;top:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center}"); | ||
} | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function create_fragment(ctx) { | ||
let div; | ||
let div_class_value; | ||
let current; | ||
const default_slot_template = /*#slots*/ ctx[7].default; | ||
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null); | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
return { | ||
c() { | ||
div = element("div"); | ||
if (default_slot) default_slot.c(); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
attr(div, "class", div_class_value = "" + (null_to_empty(/*className*/ ctx[0] | ||
? `${/*prefixCls*/ ctx[2]} ${/*className*/ ctx[0]}` | ||
: /*prefixCls*/ ctx[2]) + " svelte-1l3ztq7")); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
attr(div, "style", /*styleString*/ ctx[1]); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div, anchor); | ||
/* src/web/components/modal/Modal.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append_styles, attr, create_slot, detach, element, get_all_dirty_from_scope, get_slot_changes, init, insert, null_to_empty, safe_not_equal, transition_in, transition_out, update_slot_base } from "svelte/internal"; | ||
import { getPrefixCls } from "../.."; | ||
import reactToCSS from 'react-style-object-to-css'; | ||
if (default_slot) { | ||
default_slot.m(div, null); | ||
} | ||
function add_css(target) { | ||
append_styles(target, "svelte-1l3ztq7", ".alipay-mwj-modal.svelte-1l3ztq7{width:100vw;height:100vh;position:fixed;left:0;top:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center}"); | ||
} | ||
current = true; | ||
}, | ||
p(ctx, [dirty]) { | ||
if (default_slot) { | ||
if (default_slot.p && (!current || dirty & /*$$scope*/ 64)) { | ||
update_slot_base( | ||
default_slot, | ||
default_slot_template, | ||
ctx, | ||
/*$$scope*/ ctx[6], | ||
!current | ||
? get_all_dirty_from_scope(/*$$scope*/ ctx[6]) | ||
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[6], dirty, null), | ||
null | ||
); | ||
} | ||
} | ||
function create_fragment(ctx) { | ||
var div; | ||
var div_class_value; | ||
var current; | ||
var default_slot_template = | ||
/*#slots*/ | ||
ctx[7].default; | ||
var default_slot = create_slot(default_slot_template, ctx, | ||
/*$$scope*/ | ||
ctx[6], null); | ||
return { | ||
c: function c() { | ||
div = element("div"); | ||
if (default_slot) default_slot.c(); | ||
attr(div, "class", div_class_value = "" + (null_to_empty( | ||
/*className*/ | ||
ctx[0] ? "".concat( | ||
/*prefixCls*/ | ||
ctx[2], " ").concat( | ||
/*className*/ | ||
ctx[0]) : | ||
/*prefixCls*/ | ||
ctx[2]) + " svelte-1l3ztq7")); | ||
attr(div, "style", | ||
/*styleString*/ | ||
ctx[1]); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, div, anchor); | ||
if (!current || dirty & /*className*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(/*className*/ ctx[0] | ||
? `${/*prefixCls*/ ctx[2]} ${/*className*/ ctx[0]}` | ||
: /*prefixCls*/ ctx[2]) + " svelte-1l3ztq7"))) { | ||
attr(div, "class", div_class_value); | ||
} | ||
if (default_slot) { | ||
default_slot.m(div, null); | ||
} | ||
if (!current || dirty & /*styleString*/ 2) { | ||
attr(div, "style", /*styleString*/ ctx[1]); | ||
} | ||
}, | ||
i(local) { | ||
if (current) return; | ||
transition_in(default_slot, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(default_slot, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(div); | ||
if (default_slot) default_slot.d(detaching); | ||
} | ||
}; | ||
} | ||
current = true; | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (default_slot) { | ||
if (default_slot.p && (!current || dirty & | ||
/*$$scope*/ | ||
64)) { | ||
update_slot_base(default_slot, default_slot_template, ctx, | ||
/*$$scope*/ | ||
ctx[6], !current ? get_all_dirty_from_scope( | ||
/*$$scope*/ | ||
ctx[6]) : get_slot_changes(default_slot_template, | ||
/*$$scope*/ | ||
ctx[6], dirty, null), null); | ||
} | ||
} | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (!current || dirty & | ||
/*className*/ | ||
1 && div_class_value !== (div_class_value = "" + (null_to_empty( | ||
/*className*/ | ||
ctx[0] ? "".concat( | ||
/*prefixCls*/ | ||
ctx[2], " ").concat( | ||
/*className*/ | ||
ctx[0]) : | ||
/*prefixCls*/ | ||
ctx[2]) + " svelte-1l3ztq7"))) { | ||
attr(div, "class", div_class_value); | ||
} | ||
(enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols)); | ||
} | ||
return keys; | ||
if (!current || dirty & | ||
/*styleString*/ | ||
2) { | ||
attr(div, "style", | ||
/*styleString*/ | ||
ctx[1]); | ||
} | ||
}, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(default_slot, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(default_slot, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(div); | ||
if (default_slot) default_slot.d(detaching); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let styleString; | ||
let { $$slots: slots = {}, $$scope } = $$props; | ||
var styleString; | ||
var _$$props$$$slots = $$props.$$slots, | ||
slots = _$$props$$$slots === void 0 ? {} : _$$props$$$slots, | ||
$$scope = $$props.$$scope; | ||
var prefixCls = getPrefixCls('modal'); | ||
var _$$props$duration = $$props.duration, | ||
duration = _$$props$duration === void 0 ? undefined : _$$props$duration; | ||
var _$$props$afterClose = $$props.afterClose, | ||
afterClose = _$$props$afterClose === void 0 ? function () {} : _$$props$afterClose; | ||
var _$$props$className = $$props.className, | ||
className = _$$props$className === void 0 ? '' : _$$props$className; | ||
var _$$props$style = $$props.style, | ||
style = _$$props$style === void 0 ? {} : _$$props$style; | ||
setTimeout(function () { | ||
if (duration && duration > 0) { | ||
afterClose(); | ||
} | ||
}, duration && duration > 0 ? duration : 0); | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
$$self.$$set = function ($$props) { | ||
if ('duration' in $$props) $$invalidate(3, duration = $$props.duration); | ||
if ('afterClose' in $$props) $$invalidate(4, afterClose = $$props.afterClose); | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
if ('style' in $$props) $$invalidate(5, style = $$props.style); | ||
if ('$$scope' in $$props) $$invalidate(6, $$scope = $$props.$$scope); | ||
}; | ||
i % 2 | ||
? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) | ||
: Object.getOwnPropertyDescriptors | ||
? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) | ||
: ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
$$self.$$.update = function () { | ||
if ($$self.$$.dirty & | ||
/*style*/ | ||
32) { | ||
$: $$invalidate(1, styleString = reactToCSS(_objectSpread({ | ||
zIndex: 100 | ||
}, style))); | ||
} | ||
}; | ||
return target; | ||
} | ||
return [className, styleString, prefixCls, duration, afterClose, style, $$scope, slots]; | ||
} | ||
var prefixCls = getPrefixCls('modal'); | ||
let { duration = undefined } = $$props; | ||
var Modal = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(Modal, _SvelteComponent); | ||
let { afterClose = function afterClose() { | ||
} } = $$props; | ||
var _super = _createSuper(Modal); | ||
let { className = '' } = $$props; | ||
let { style = {} } = $$props; | ||
function Modal(options) { | ||
var _this; | ||
setTimeout( | ||
function () { | ||
if (duration && duration > 0) { | ||
afterClose(); | ||
} | ||
}, | ||
duration && duration > 0 ? duration : 0 | ||
); | ||
_classCallCheck(this, Modal); | ||
$$self.$$set = $$props => { | ||
if ('duration' in $$props) $$invalidate(3, duration = $$props.duration); | ||
if ('afterClose' in $$props) $$invalidate(4, afterClose = $$props.afterClose); | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
if ('style' in $$props) $$invalidate(5, style = $$props.style); | ||
if ('$$scope' in $$props) $$invalidate(6, $$scope = $$props.$$scope); | ||
}; | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
duration: 3, | ||
afterClose: 4, | ||
className: 0, | ||
style: 5 | ||
}, add_css); | ||
return _this; | ||
} | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty & /*style*/ 32) { | ||
$: $$invalidate(1, styleString = reactToCSS(_objectSpread({ zIndex: 100 }, style))); | ||
} | ||
}; | ||
return _createClass(Modal); | ||
}(SvelteComponent); | ||
return [className, styleString, prefixCls, duration, afterClose, style, $$scope, slots]; | ||
} | ||
class Modal extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init( | ||
this, | ||
options, | ||
instance, | ||
create_fragment, | ||
safe_not_equal, | ||
{ | ||
duration: 3, | ||
afterClose: 4, | ||
className: 0, | ||
style: 5 | ||
}, | ||
add_css | ||
); | ||
} | ||
} | ||
export default Modal; |
@@ -1,78 +0,101 @@ | ||
/* src/web/components/toast/ExceptionIcon.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
attr, | ||
detach, | ||
init, | ||
insert, | ||
noop, | ||
safe_not_equal, | ||
svg_element | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/toast/ExceptionIcon.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, attr, detach, init, insert, noop, safe_not_equal, svg_element } from "svelte/internal"; | ||
function create_fragment(ctx) { | ||
let svg; | ||
let g; | ||
let path0; | ||
let path1; | ||
let path2; | ||
var svg; | ||
var g; | ||
var path0; | ||
var path1; | ||
var path2; | ||
return { | ||
c: function c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path0 = svg_element("path"); | ||
path1 = svg_element("path"); | ||
path2 = svg_element("path"); | ||
attr(path0, "d", "M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z"); | ||
attr(path0, "fill", "#FFF"); | ||
attr(path1, "fill", "#FFF"); | ||
attr(path1, "d", "M47 22h2v6h-2zm-24 0h2v6h-2z"); | ||
attr(path2, "d", "M21 51s4.6-7 15-7 15 7 15 7"); | ||
attr(path2, "stroke", "#FFF"); | ||
attr(path2, "stroke-width", "2"); | ||
attr(g, "fill", "none"); | ||
attr(g, "fill-rule", "evenodd"); | ||
attr(svg, "class", | ||
/*className*/ | ||
ctx[0]); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 72 72"); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path0); | ||
append(g, path1); | ||
append(g, path2); | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path0 = svg_element("path"); | ||
path1 = svg_element("path"); | ||
path2 = svg_element("path"); | ||
attr(path0, "d", "M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z"); | ||
attr(path0, "fill", "#FFF"); | ||
attr(path1, "fill", "#FFF"); | ||
attr(path1, "d", "M47 22h2v6h-2zm-24 0h2v6h-2z"); | ||
attr(path2, "d", "M21 51s4.6-7 15-7 15 7 15 7"); | ||
attr(path2, "stroke", "#FFF"); | ||
attr(path2, "stroke-width", "2"); | ||
attr(g, "fill", "none"); | ||
attr(g, "fill-rule", "evenodd"); | ||
attr(svg, "class", /*className*/ ctx[0]); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 72 72"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path0); | ||
append(g, path1); | ||
append(g, path2); | ||
}, | ||
p(ctx, [dirty]) { | ||
if (dirty & /*className*/ 1) { | ||
attr(svg, "class", /*className*/ ctx[0]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
if (dirty & | ||
/*className*/ | ||
1) { | ||
attr(svg, "class", | ||
/*className*/ | ||
ctx[0]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d: function d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let { className } = $$props; | ||
var className = $$props.className; | ||
$$self.$$set = $$props => { | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
}; | ||
$$self.$$set = function ($$props) { | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
}; | ||
return [className]; | ||
return [className]; | ||
} | ||
class ExceptionIcon extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, { className: 0 }); | ||
} | ||
} | ||
var ExceptionIcon = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(ExceptionIcon, _SvelteComponent); | ||
var _super = _createSuper(ExceptionIcon); | ||
function ExceptionIcon(options) { | ||
var _this; | ||
_classCallCheck(this, ExceptionIcon); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
className: 0 | ||
}); | ||
return _this; | ||
} | ||
return _createClass(ExceptionIcon); | ||
}(SvelteComponent); | ||
export default ExceptionIcon; |
@@ -1,73 +0,96 @@ | ||
/* src/web/components/toast/FailIcon.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
attr, | ||
detach, | ||
init, | ||
insert, | ||
noop, | ||
safe_not_equal, | ||
svg_element | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/toast/FailIcon.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, attr, detach, init, insert, noop, safe_not_equal, svg_element } from "svelte/internal"; | ||
function create_fragment(ctx) { | ||
let svg; | ||
let g; | ||
let path0; | ||
let path1; | ||
var svg; | ||
var g; | ||
var path0; | ||
var path1; | ||
return { | ||
c: function c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path0 = svg_element("path"); | ||
path1 = svg_element("path"); | ||
attr(path0, "d", "M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z"); | ||
attr(path0, "fill", "#FFF"); | ||
attr(path1, "d", "M22 22l28.304 28.304m-28.304 0L50.304 22"); | ||
attr(path1, "stroke", "#FFF"); | ||
attr(path1, "stroke-width", "2"); | ||
attr(g, "fill", "none"); | ||
attr(g, "fill-rule", "evenodd"); | ||
attr(svg, "class", | ||
/*className*/ | ||
ctx[0]); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 72 72"); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path0); | ||
append(g, path1); | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path0 = svg_element("path"); | ||
path1 = svg_element("path"); | ||
attr(path0, "d", "M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z"); | ||
attr(path0, "fill", "#FFF"); | ||
attr(path1, "d", "M22 22l28.304 28.304m-28.304 0L50.304 22"); | ||
attr(path1, "stroke", "#FFF"); | ||
attr(path1, "stroke-width", "2"); | ||
attr(g, "fill", "none"); | ||
attr(g, "fill-rule", "evenodd"); | ||
attr(svg, "class", /*className*/ ctx[0]); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 72 72"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path0); | ||
append(g, path1); | ||
}, | ||
p(ctx, [dirty]) { | ||
if (dirty & /*className*/ 1) { | ||
attr(svg, "class", /*className*/ ctx[0]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
if (dirty & | ||
/*className*/ | ||
1) { | ||
attr(svg, "class", | ||
/*className*/ | ||
ctx[0]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d: function d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let { className } = $$props; | ||
var className = $$props.className; | ||
$$self.$$set = $$props => { | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
}; | ||
$$self.$$set = function ($$props) { | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
}; | ||
return [className]; | ||
return [className]; | ||
} | ||
class FailIcon extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, { className: 0 }); | ||
} | ||
} | ||
var FailIcon = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(FailIcon, _SvelteComponent); | ||
var _super = _createSuper(FailIcon); | ||
function FailIcon(options) { | ||
var _this; | ||
_classCallCheck(this, FailIcon); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
className: 0 | ||
}); | ||
return _this; | ||
} | ||
return _createClass(FailIcon); | ||
}(SvelteComponent); | ||
export default FailIcon; |
@@ -1,73 +0,96 @@ | ||
/* src/web/components/toast/SuccessIcon.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
attr, | ||
detach, | ||
init, | ||
insert, | ||
noop, | ||
safe_not_equal, | ||
svg_element | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/toast/SuccessIcon.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, attr, detach, init, insert, noop, safe_not_equal, svg_element } from "svelte/internal"; | ||
function create_fragment(ctx) { | ||
let svg; | ||
let g; | ||
let path0; | ||
let path1; | ||
var svg; | ||
var g; | ||
var path0; | ||
var path1; | ||
return { | ||
c: function c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path0 = svg_element("path"); | ||
path1 = svg_element("path"); | ||
attr(path0, "d", "M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z"); | ||
attr(path0, "fill", "#FFF"); | ||
attr(path1, "stroke", "#FFF"); | ||
attr(path1, "stroke-width", "2"); | ||
attr(path1, "d", "M19 34.54l11.545 11.923L52.815 24"); | ||
attr(g, "fill", "none"); | ||
attr(g, "fill-rule", "evenodd"); | ||
attr(svg, "class", | ||
/*className*/ | ||
ctx[0]); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 72 72"); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path0); | ||
append(g, path1); | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
return { | ||
c() { | ||
svg = svg_element("svg"); | ||
g = svg_element("g"); | ||
path0 = svg_element("path"); | ||
path1 = svg_element("path"); | ||
attr(path0, "d", "M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z"); | ||
attr(path0, "fill", "#FFF"); | ||
attr(path1, "stroke", "#FFF"); | ||
attr(path1, "stroke-width", "2"); | ||
attr(path1, "d", "M19 34.54l11.545 11.923L52.815 24"); | ||
attr(g, "fill", "none"); | ||
attr(g, "fill-rule", "evenodd"); | ||
attr(svg, "class", /*className*/ ctx[0]); | ||
attr(svg, "xmlns", "http://www.w3.org/2000/svg"); | ||
attr(svg, "viewBox", "0 0 72 72"); | ||
}, | ||
m(target, anchor) { | ||
insert(target, svg, anchor); | ||
append(svg, g); | ||
append(g, path0); | ||
append(g, path1); | ||
}, | ||
p(ctx, [dirty]) { | ||
if (dirty & /*className*/ 1) { | ||
attr(svg, "class", /*className*/ ctx[0]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
if (dirty & | ||
/*className*/ | ||
1) { | ||
attr(svg, "class", | ||
/*className*/ | ||
ctx[0]); | ||
} | ||
}, | ||
i: noop, | ||
o: noop, | ||
d: function d(detaching) { | ||
if (detaching) detach(svg); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let { className } = $$props; | ||
var className = $$props.className; | ||
$$self.$$set = $$props => { | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
}; | ||
$$self.$$set = function ($$props) { | ||
if ('className' in $$props) $$invalidate(0, className = $$props.className); | ||
}; | ||
return [className]; | ||
return [className]; | ||
} | ||
class SuccessIcon extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, { className: 0 }); | ||
} | ||
} | ||
var SuccessIcon = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(SuccessIcon, _SvelteComponent); | ||
var _super = _createSuper(SuccessIcon); | ||
function SuccessIcon(options) { | ||
var _this; | ||
_classCallCheck(this, SuccessIcon); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
className: 0 | ||
}); | ||
return _this; | ||
} | ||
return _createClass(SuccessIcon); | ||
}(SvelteComponent); | ||
export default SuccessIcon; |
@@ -1,29 +0,18 @@ | ||
/* src/web/components/toast/Toast.svelte generated by Svelte v3.46.5 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
append_styles, | ||
attr, | ||
check_outros, | ||
create_component, | ||
destroy_component, | ||
detach, | ||
element, | ||
group_outros, | ||
init, | ||
insert, | ||
mount_component, | ||
noop, | ||
null_to_empty, | ||
safe_not_equal, | ||
set_data, | ||
space, | ||
text, | ||
transition_in, | ||
transition_out | ||
} from "svelte/internal"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; | ||
import _inherits from "@babel/runtime/helpers/inherits"; | ||
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; | ||
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; | ||
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
import { getPrefixCls } from "../../../../lib/web"; | ||
import AdapterEvents from "../../../../lib/web/events/events"; | ||
import { defaultEventManager } from "../../../../lib/web/events"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
/* src/web/components/toast/Toast.svelte generated by Svelte v3.47.0 */ | ||
import { SvelteComponent, append, append_styles, attr, check_outros, create_component, destroy_component, detach, element, group_outros, init, insert, mount_component, noop, null_to_empty, safe_not_equal, set_data, space, text, transition_in, transition_out } from "svelte/internal"; | ||
import { getPrefixCls } from "../.."; | ||
import AdapterEvents from "../../events/events"; | ||
import { defaultEventManager } from "../../events"; | ||
import { onMount } from 'svelte/internal'; | ||
@@ -36,307 +25,344 @@ import SuccessIcon from "./SuccessIcon"; | ||
function add_css(target) { | ||
append_styles(target, "svelte-f2gvr3", ".alipay-mwj-toast.svelte-f2gvr3{background-color:rgba(58, 58, 58, 0.9);max-width:80%;min-width:120px;padding:30px;border-radius:10px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-toast-icon.svelte-f2gvr3{width:72px;height:72px;margin-bottom:12px}.alipay-mwj-toast-text.svelte-f2gvr3{color:#fff;font-size:24px;text-align:center}"); | ||
} | ||
append_styles(target, "svelte-f2gvr3", ".alipay-mwj-toast.svelte-f2gvr3{background-color:rgba(58, 58, 58, 0.9);max-width:80%;min-width:120px;padding:30px;border-radius:10px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.alipay-mwj-toast-icon.svelte-f2gvr3{width:72px;height:72px;margin-bottom:12px}.alipay-mwj-toast-text.svelte-f2gvr3{color:#fff;font-size:24px;text-align:center}"); | ||
} // (25:35) | ||
// (24:35) | ||
function create_if_block_2(ctx) { | ||
let exceptionicon; | ||
let t; | ||
let current; | ||
var exceptionicon; | ||
var t; | ||
var current; | ||
exceptionicon = new ExceptionIcon({ | ||
props: { | ||
className: "" + ( | ||
/*prefixCls*/ | ||
ctx[4] + "-icon") | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(exceptionicon.$$.fragment); | ||
t = text(";"); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(exceptionicon, target, anchor); | ||
insert(target, t, anchor); | ||
current = true; | ||
}, | ||
p: noop, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(exceptionicon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(exceptionicon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(exceptionicon, detaching); | ||
if (detaching) detach(t); | ||
} | ||
}; | ||
} // (23:30) | ||
exceptionicon = new ExceptionIcon({ | ||
props: { | ||
className: "" + (/*prefixCls*/ ctx[4] + "-icon") | ||
} | ||
}); | ||
return { | ||
c() { | ||
create_component(exceptionicon.$$.fragment); | ||
t = text(";"); | ||
}, | ||
m(target, anchor) { | ||
mount_component(exceptionicon, target, anchor); | ||
insert(target, t, anchor); | ||
current = true; | ||
}, | ||
p: noop, | ||
i(local) { | ||
if (current) return; | ||
transition_in(exceptionicon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(exceptionicon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(exceptionicon, detaching); | ||
if (detaching) detach(t); | ||
} | ||
}; | ||
} | ||
// (22:30) | ||
function create_if_block_1(ctx) { | ||
let failicon; | ||
let current; | ||
var failicon; | ||
var current; | ||
failicon = new FailIcon({ | ||
props: { | ||
className: "" + ( | ||
/*prefixCls*/ | ||
ctx[4] + "-icon") | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(failicon.$$.fragment); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(failicon, target, anchor); | ||
current = true; | ||
}, | ||
p: noop, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(failicon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(failicon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(failicon, detaching); | ||
} | ||
}; | ||
} // (21:4) {#if type === 'success'} | ||
failicon = new FailIcon({ | ||
props: { | ||
className: "" + (/*prefixCls*/ ctx[4] + "-icon") | ||
} | ||
}); | ||
return { | ||
c() { | ||
create_component(failicon.$$.fragment); | ||
}, | ||
m(target, anchor) { | ||
mount_component(failicon, target, anchor); | ||
current = true; | ||
}, | ||
p: noop, | ||
i(local) { | ||
if (current) return; | ||
transition_in(failicon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(failicon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(failicon, detaching); | ||
} | ||
}; | ||
} | ||
// (20:4) {#if type === 'success'} | ||
function create_if_block(ctx) { | ||
let successicon; | ||
let current; | ||
var successicon; | ||
var current; | ||
successicon = new SuccessIcon({ | ||
props: { | ||
className: "" + ( | ||
/*prefixCls*/ | ||
ctx[4] + "-icon") | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(successicon.$$.fragment); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(successicon, target, anchor); | ||
current = true; | ||
}, | ||
p: noop, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(successicon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(successicon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(successicon, detaching); | ||
} | ||
}; | ||
} // (19:0) <Modal {duration} afterClose={onClose}> | ||
successicon = new SuccessIcon({ | ||
props: { | ||
className: "" + (/*prefixCls*/ ctx[4] + "-icon") | ||
} | ||
}); | ||
return { | ||
c() { | ||
create_component(successicon.$$.fragment); | ||
}, | ||
m(target, anchor) { | ||
mount_component(successicon, target, anchor); | ||
current = true; | ||
}, | ||
p: noop, | ||
i(local) { | ||
if (current) return; | ||
transition_in(successicon.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(successicon.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(successicon, detaching); | ||
} | ||
}; | ||
} | ||
// (18:0) <Modal {duration} afterClose={onClose}> | ||
function create_default_slot(ctx) { | ||
let div; | ||
let current_block_type_index; | ||
let if_block; | ||
let t0; | ||
let span; | ||
let t1; | ||
let span_class_value; | ||
let div_class_value; | ||
let current; | ||
const if_block_creators = [create_if_block, create_if_block_1, create_if_block_2]; | ||
const if_blocks = []; | ||
var div; | ||
var current_block_type_index; | ||
var if_block; | ||
var t0; | ||
var span; | ||
var t1; | ||
var span_class_value; | ||
var div_class_value; | ||
var current; | ||
var if_block_creators = [create_if_block, create_if_block_1, create_if_block_2]; | ||
var if_blocks = []; | ||
function select_block_type(ctx, dirty) { | ||
if (/*type*/ ctx[1] === 'success') return 0; | ||
if (/*type*/ ctx[1] === 'fail') return 1; | ||
if (/*type*/ ctx[1] === 'exception') return 2; | ||
return -1; | ||
} | ||
function select_block_type(ctx, dirty) { | ||
if ( | ||
/*type*/ | ||
ctx[1] === 'success') return 0; | ||
if ( | ||
/*type*/ | ||
ctx[1] === 'fail') return 1; | ||
if ( | ||
/*type*/ | ||
ctx[1] === 'exception') return 2; | ||
return -1; | ||
} | ||
if (~(current_block_type_index = select_block_type(ctx, -1))) { | ||
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); | ||
} | ||
if (~(current_block_type_index = select_block_type(ctx, -1))) { | ||
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); | ||
} | ||
return { | ||
c() { | ||
div = element("div"); | ||
if (if_block) if_block.c(); | ||
t0 = space(); | ||
span = element("span"); | ||
t1 = text(/*content*/ ctx[0]); | ||
attr(span, "class", span_class_value = "" + (/*prefixCls*/ ctx[4] + "-text" + " svelte-f2gvr3")); | ||
attr(div, "class", div_class_value = "" + (null_to_empty(/*prefixCls*/ ctx[4]) + " svelte-f2gvr3")); | ||
}, | ||
m(target, anchor) { | ||
insert(target, div, anchor); | ||
return { | ||
c: function c() { | ||
div = element("div"); | ||
if (if_block) if_block.c(); | ||
t0 = space(); | ||
span = element("span"); | ||
t1 = text( | ||
/*content*/ | ||
ctx[0]); | ||
attr(span, "class", span_class_value = "" + ( | ||
/*prefixCls*/ | ||
ctx[4] + "-text" + " svelte-f2gvr3")); | ||
attr(div, "class", div_class_value = "" + (null_to_empty( | ||
/*prefixCls*/ | ||
ctx[4]) + " svelte-f2gvr3")); | ||
}, | ||
m: function m(target, anchor) { | ||
insert(target, div, anchor); | ||
if (~current_block_type_index) { | ||
if_blocks[current_block_type_index].m(div, null); | ||
} | ||
if (~current_block_type_index) { | ||
if_blocks[current_block_type_index].m(div, null); | ||
} | ||
append(div, t0); | ||
append(div, span); | ||
append(span, t1); | ||
current = true; | ||
}, | ||
p(ctx, dirty) { | ||
let previous_block_index = current_block_type_index; | ||
current_block_type_index = select_block_type(ctx, dirty); | ||
append(div, t0); | ||
append(div, span); | ||
append(span, t1); | ||
current = true; | ||
}, | ||
p: function p(ctx, dirty) { | ||
var previous_block_index = current_block_type_index; | ||
current_block_type_index = select_block_type(ctx, dirty); | ||
if (current_block_type_index === previous_block_index) { | ||
if (~current_block_type_index) { | ||
if_blocks[current_block_type_index].p(ctx, dirty); | ||
} | ||
} else { | ||
if (if_block) { | ||
group_outros(); | ||
if (current_block_type_index === previous_block_index) { | ||
if (~current_block_type_index) { | ||
if_blocks[current_block_type_index].p(ctx, dirty); | ||
} | ||
} else { | ||
if (if_block) { | ||
group_outros(); | ||
transition_out(if_blocks[previous_block_index], 1, 1, function () { | ||
if_blocks[previous_block_index] = null; | ||
}); | ||
check_outros(); | ||
} | ||
transition_out(if_blocks[previous_block_index], 1, 1, () => { | ||
if_blocks[previous_block_index] = null; | ||
}); | ||
if (~current_block_type_index) { | ||
if_block = if_blocks[current_block_type_index]; | ||
check_outros(); | ||
} | ||
if (!if_block) { | ||
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); | ||
if_block.c(); | ||
} else { | ||
if_block.p(ctx, dirty); | ||
} | ||
if (~current_block_type_index) { | ||
if_block = if_blocks[current_block_type_index]; | ||
transition_in(if_block, 1); | ||
if_block.m(div, t0); | ||
} else { | ||
if_block = null; | ||
} | ||
} | ||
if (!if_block) { | ||
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); | ||
if_block.c(); | ||
} else { | ||
if_block.p(ctx, dirty); | ||
} | ||
if (!current || dirty & | ||
/*content*/ | ||
1) set_data(t1, | ||
/*content*/ | ||
ctx[0]); | ||
}, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(if_block); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(if_block); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
if (detaching) detach(div); | ||
transition_in(if_block, 1); | ||
if_block.m(div, t0); | ||
} else { | ||
if_block = null; | ||
} | ||
} | ||
if (!current || dirty & /*content*/ 1) set_data(t1, /*content*/ ctx[0]); | ||
}, | ||
i(local) { | ||
if (current) return; | ||
transition_in(if_block); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(if_block); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
if (detaching) detach(div); | ||
if (~current_block_type_index) { | ||
if_blocks[current_block_type_index].d(); | ||
} | ||
} | ||
}; | ||
if (~current_block_type_index) { | ||
if_blocks[current_block_type_index].d(); | ||
} | ||
} | ||
}; | ||
} | ||
function create_fragment(ctx) { | ||
let modal; | ||
let current; | ||
var modal; | ||
var current; | ||
modal = new Modal({ | ||
props: { | ||
duration: | ||
/*duration*/ | ||
ctx[2], | ||
afterClose: | ||
/*onClose*/ | ||
ctx[3], | ||
$$slots: { | ||
default: [create_default_slot] | ||
}, | ||
$$scope: { | ||
ctx: ctx | ||
} | ||
} | ||
}); | ||
return { | ||
c: function c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m: function m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p: function p(ctx, _ref) { | ||
var _ref2 = _slicedToArray(_ref, 1), | ||
dirty = _ref2[0]; | ||
modal = new Modal({ | ||
props: { | ||
duration: /*duration*/ ctx[2], | ||
afterClose: /*onClose*/ ctx[3], | ||
$$slots: { default: [create_default_slot] }, | ||
$$scope: { ctx } | ||
} | ||
}); | ||
var modal_changes = {}; | ||
if (dirty & | ||
/*duration*/ | ||
4) modal_changes.duration = | ||
/*duration*/ | ||
ctx[2]; | ||
if (dirty & | ||
/*onClose*/ | ||
8) modal_changes.afterClose = | ||
/*onClose*/ | ||
ctx[3]; | ||
return { | ||
c() { | ||
create_component(modal.$$.fragment); | ||
}, | ||
m(target, anchor) { | ||
mount_component(modal, target, anchor); | ||
current = true; | ||
}, | ||
p(ctx, [dirty]) { | ||
const modal_changes = {}; | ||
if (dirty & /*duration*/ 4) modal_changes.duration = /*duration*/ ctx[2]; | ||
if (dirty & /*onClose*/ 8) modal_changes.afterClose = /*onClose*/ ctx[3]; | ||
if (dirty & | ||
/*$$scope, content, type*/ | ||
35) { | ||
modal_changes.$$scope = { | ||
dirty: dirty, | ||
ctx: ctx | ||
}; | ||
} | ||
if (dirty & /*$$scope, content, type*/ 35) { | ||
modal_changes.$$scope = { dirty, ctx }; | ||
} | ||
modal.$set(modal_changes); | ||
}, | ||
i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
modal.$set(modal_changes); | ||
}, | ||
i: function i(local) { | ||
if (current) return; | ||
transition_in(modal.$$.fragment, local); | ||
current = true; | ||
}, | ||
o: function o(local) { | ||
transition_out(modal.$$.fragment, local); | ||
current = false; | ||
}, | ||
d: function d(detaching) { | ||
destroy_component(modal, detaching); | ||
} | ||
}; | ||
} | ||
function instance($$self, $$props, $$invalidate) { | ||
let { content } = $$props; | ||
let { type } = $$props; | ||
let { duration } = $$props; | ||
let { onClose } = $$props; | ||
var prefixCls = getPrefixCls('toast'); | ||
var content = $$props.content; | ||
var type = $$props.type; | ||
var duration = $$props.duration; | ||
var onClose = $$props.onClose; | ||
var prefixCls = getPrefixCls('toast'); | ||
onMount(function () { | ||
defaultEventManager.addListener(AdapterEvents.ToastHide, onClose); | ||
}); | ||
onMount(function () { | ||
defaultEventManager.addListener(AdapterEvents.ToastHide, onClose); | ||
}); | ||
$$self.$$set = function ($$props) { | ||
if ('content' in $$props) $$invalidate(0, content = $$props.content); | ||
if ('type' in $$props) $$invalidate(1, type = $$props.type); | ||
if ('duration' in $$props) $$invalidate(2, duration = $$props.duration); | ||
if ('onClose' in $$props) $$invalidate(3, onClose = $$props.onClose); | ||
}; | ||
$$self.$$set = $$props => { | ||
if ('content' in $$props) $$invalidate(0, content = $$props.content); | ||
if ('type' in $$props) $$invalidate(1, type = $$props.type); | ||
if ('duration' in $$props) $$invalidate(2, duration = $$props.duration); | ||
if ('onClose' in $$props) $$invalidate(3, onClose = $$props.onClose); | ||
}; | ||
return [content, type, duration, onClose, prefixCls]; | ||
return [content, type, duration, onClose, prefixCls]; | ||
} | ||
class Toast extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
var Toast = /*#__PURE__*/function (_SvelteComponent) { | ||
_inherits(Toast, _SvelteComponent); | ||
init( | ||
this, | ||
options, | ||
instance, | ||
create_fragment, | ||
safe_not_equal, | ||
{ | ||
content: 0, | ||
type: 1, | ||
duration: 2, | ||
onClose: 3 | ||
}, | ||
add_css | ||
); | ||
} | ||
} | ||
var _super = _createSuper(Toast); | ||
function Toast(options) { | ||
var _this; | ||
_classCallCheck(this, Toast); | ||
_this = _super.call(this); | ||
init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { | ||
content: 0, | ||
type: 1, | ||
duration: 2, | ||
onClose: 3 | ||
}, add_css); | ||
return _this; | ||
} | ||
return _createClass(Toast); | ||
}(SvelteComponent); | ||
export default Toast; |
import JsUtils from "../../utils/js-utils"; | ||
export function call(apiName, params) { | ||
var _params$fail, _params$complete; | ||
var _params$fail, _params$complete; // 优先使用外部注册的 | ||
// 优先使用外部注册的 | ||
var func = jsApiExtensions[apiName]; | ||
@@ -7,0 +7,0 @@ |
export function pageScrollTo(options) { | ||
if (options.selector) { | ||
var _options$complete; | ||
var _options$complete; // by selector | ||
// by selector | ||
var element = document.querySelector(options.selector); | ||
@@ -27,5 +27,5 @@ | ||
} else { | ||
var _options$fail2, _options$complete2; | ||
var _options$fail2, _options$complete2; // invalid options | ||
// invalid options | ||
(_options$fail2 = options.fail) === null || _options$fail2 === void 0 ? void 0 : _options$fail2.call(options); | ||
@@ -32,0 +32,0 @@ (_options$complete2 = options.complete) === null || _options$complete2 === void 0 ? void 0 : _options$complete2.call(options); |
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
import axios from 'axios'; | ||
@@ -8,0 +30,0 @@ export function request(options) { |
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
import axios from 'axios'; | ||
@@ -8,0 +30,0 @@ import JsUtils from "../../../utils/js-utils"; |
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
import JsUtils from "../../../utils/js-utils"; | ||
@@ -8,0 +30,0 @@ export var defaultRpcErrorResponse = { |
@@ -8,6 +8,34 @@ import _inherits from "@babel/runtime/helpers/inherits"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _createSuper(Derived) { | ||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
return function _createSuperInternal() { | ||
var Super = _getPrototypeOf(Derived), | ||
result; | ||
if (hasNativeReflectConstruct) { | ||
var NewTarget = _getPrototypeOf(this).constructor; | ||
result = Reflect.construct(Super, arguments, NewTarget); | ||
} else { | ||
result = Super.apply(this, arguments); | ||
} | ||
return _possibleConstructorReturn(this, result); | ||
}; | ||
} | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
var AbsExecutor = /*#__PURE__*/function () { | ||
@@ -14,0 +42,0 @@ function AbsExecutor(elements) { |
@@ -10,6 +10,34 @@ import _createClass from "@babel/runtime/helpers/createClass"; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _createSuper(Derived) { | ||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
return function _createSuperInternal() { | ||
var Super = _getPrototypeOf(Derived), | ||
result; | ||
if (hasNativeReflectConstruct) { | ||
var NewTarget = _getPrototypeOf(this).constructor; | ||
result = Reflect.construct(Super, arguments, NewTarget); | ||
} else { | ||
result = Super.apply(this, arguments); | ||
} | ||
return _possibleConstructorReturn(this, result); | ||
}; | ||
} | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
export var RpcError = /*#__PURE__*/function (_Error) { | ||
@@ -16,0 +44,0 @@ _inherits(RpcError, _Error); |
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
var _appEnumsMap; | ||
/** | ||
@@ -10,2 +9,4 @@ * 站点名称枚举 | ||
*/ | ||
export var SiteNameEnums; | ||
@@ -12,0 +13,0 @@ |
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
return target; | ||
} | ||
import JsUtils from "../../utils/js-utils"; | ||
@@ -8,0 +30,0 @@ import { EnvironmentEnums, getEnvironment, getWebPolyfillOptions, getWebQueryParams } from "../index"; |
{ | ||
"name": "miniapp-web-jsapi", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "JSAPI/View adapter for miniprogram running on the web", | ||
@@ -8,4 +8,4 @@ "main": "lib/index.js", | ||
"dev": "rm -rf ./lib && npx gulp dev", | ||
"build:gulp": "rm -rf ./lib && npx gulp build", | ||
"build:webpack": "rm -rf ./dist && webpack --stats verbose", | ||
"build:gulp": "rm -rf ./lib && npx gulp build && babel lib --out-dir ./lib --config-file ./babel.config.js --extensions \".js\"", | ||
"build:webpack": "rm -rf ./dist && webpack --stats verbose && babel dist --out-dir ./dist --config-file ./babel.config.js --extensions \".js\"", | ||
"build": "npm run build:gulp && npm run build:webpack", | ||
@@ -30,10 +30,7 @@ "build:webpack:analyze": "rm -rf ./dist && cross-env ANALYZE=true webpack --stats verbose", | ||
"device-detector-js": "^2.2.10", | ||
"svelte": "^3.46.4", | ||
"react-style-object-to-css": "^1.1.2" | ||
"react-style-object-to-css": "^1.1.2", | ||
"svelte": "^3.46.4" | ||
}, | ||
"devDependencies": { | ||
"babel-types": "^6.26.0", | ||
"gulp-svelte": "0.8.0", | ||
"svelte-preprocess": "^4.10.4", | ||
"svelte-loader": "^3.1.2", | ||
"@babel/cli": "^7.17.6", | ||
"@types/jest": "^26.0.22", | ||
@@ -44,4 +41,6 @@ "@types/lodash.get": "^4.4.6", | ||
"babel-loader": "^8.2.2", | ||
"babel-types": "^6.26.0", | ||
"cross-env": "^7.0.2", | ||
"css-loader": "^3.5.3", | ||
"gulp-svelte": "0.8.0", | ||
"less": "^4.1.2", | ||
@@ -52,2 +51,4 @@ "less-loader": "^10.2.0", | ||
"postcss-loader": "^3.0.0", | ||
"svelte-loader": "^3.1.2", | ||
"svelte-preprocess": "^4.10.4", | ||
"typescript": "^4.2.3", | ||
@@ -54,0 +55,0 @@ "webpack": "^5.70.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
515287
101
6367
1
22