pome-ui 2.0.0-preview33 → 2.0.0-preview35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pome-ui.dev.js +198 -116
- package/pome-ui.dev.min.js +16 -16
- package/pome-ui.js +112 -88
- package/pome-ui.min.js +2 -2
package/package.json
CHANGED
package/pome-ui.dev.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vue
|
|
2
2
|
/**
|
|
3
|
-
* vue v3.5.
|
|
3
|
+
* vue v3.5.13
|
|
4
4
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
5
|
* @license MIT
|
|
6
6
|
**/
|
|
@@ -216,10 +216,9 @@ var Vue = (function (exports) {
|
|
|
216
216
|
return ret;
|
|
217
217
|
}
|
|
218
218
|
function stringifyStyle(styles) {
|
|
219
|
+
if (!styles) return "";
|
|
220
|
+
if (isString(styles)) return styles;
|
|
219
221
|
let ret = "";
|
|
220
|
-
if (!styles || isString(styles)) {
|
|
221
|
-
return ret;
|
|
222
|
-
}
|
|
223
222
|
for (const key in styles) {
|
|
224
223
|
const value = styles[key];
|
|
225
224
|
if (isString(value) || typeof value === "number") {
|
|
@@ -482,17 +481,21 @@ var Vue = (function (exports) {
|
|
|
482
481
|
}
|
|
483
482
|
stop(fromParent) {
|
|
484
483
|
if (this._active) {
|
|
484
|
+
this._active = false;
|
|
485
485
|
let i, l;
|
|
486
486
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
487
487
|
this.effects[i].stop();
|
|
488
488
|
}
|
|
489
|
+
this.effects.length = 0;
|
|
489
490
|
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
490
491
|
this.cleanups[i]();
|
|
491
492
|
}
|
|
493
|
+
this.cleanups.length = 0;
|
|
492
494
|
if (this.scopes) {
|
|
493
495
|
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
494
496
|
this.scopes[i].stop(true);
|
|
495
497
|
}
|
|
498
|
+
this.scopes.length = 0;
|
|
496
499
|
}
|
|
497
500
|
if (!this.detached && this.parent && !fromParent) {
|
|
498
501
|
const last = this.parent.scopes.pop();
|
|
@@ -502,7 +505,6 @@ var Vue = (function (exports) {
|
|
|
502
505
|
}
|
|
503
506
|
}
|
|
504
507
|
this.parent = void 0;
|
|
505
|
-
this._active = false;
|
|
506
508
|
}
|
|
507
509
|
}
|
|
508
510
|
}
|
|
@@ -1268,6 +1270,7 @@ var Vue = (function (exports) {
|
|
|
1268
1270
|
this._isShallow = _isShallow;
|
|
1269
1271
|
}
|
|
1270
1272
|
get(target, key, receiver) {
|
|
1273
|
+
if (key === "__v_skip") return target["__v_skip"];
|
|
1271
1274
|
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
1272
1275
|
if (key === "__v_isReactive") {
|
|
1273
1276
|
return !isReadonly2;
|
|
@@ -2104,7 +2107,7 @@ var Vue = (function (exports) {
|
|
|
2104
2107
|
const scope = getCurrentScope();
|
|
2105
2108
|
const watchHandle = () => {
|
|
2106
2109
|
effect.stop();
|
|
2107
|
-
if (scope) {
|
|
2110
|
+
if (scope && scope.active) {
|
|
2108
2111
|
remove(scope.effects, effect);
|
|
2109
2112
|
}
|
|
2110
2113
|
};
|
|
@@ -3064,11 +3067,32 @@ var Vue = (function (exports) {
|
|
|
3064
3067
|
updateCssVars(n2, true);
|
|
3065
3068
|
}
|
|
3066
3069
|
if (isTeleportDeferred(n2.props)) {
|
|
3067
|
-
queuePostRenderEffect(
|
|
3070
|
+
queuePostRenderEffect(() => {
|
|
3071
|
+
mountToTarget();
|
|
3072
|
+
n2.el.__isMounted = true;
|
|
3073
|
+
}, parentSuspense);
|
|
3068
3074
|
} else {
|
|
3069
3075
|
mountToTarget();
|
|
3070
3076
|
}
|
|
3071
3077
|
} else {
|
|
3078
|
+
if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
|
|
3079
|
+
queuePostRenderEffect(() => {
|
|
3080
|
+
TeleportImpl.process(
|
|
3081
|
+
n1,
|
|
3082
|
+
n2,
|
|
3083
|
+
container,
|
|
3084
|
+
anchor,
|
|
3085
|
+
parentComponent,
|
|
3086
|
+
parentSuspense,
|
|
3087
|
+
namespace,
|
|
3088
|
+
slotScopeIds,
|
|
3089
|
+
optimized,
|
|
3090
|
+
internals
|
|
3091
|
+
);
|
|
3092
|
+
delete n1.el.__isMounted;
|
|
3093
|
+
}, parentSuspense);
|
|
3094
|
+
return;
|
|
3095
|
+
}
|
|
3072
3096
|
n2.el = n1.el;
|
|
3073
3097
|
n2.targetStart = n1.targetStart;
|
|
3074
3098
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
@@ -3374,10 +3398,9 @@ var Vue = (function (exports) {
|
|
|
3374
3398
|
if (innerChild.type !== Comment) {
|
|
3375
3399
|
setTransitionHooks(innerChild, enterHooks);
|
|
3376
3400
|
}
|
|
3377
|
-
|
|
3378
|
-
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3401
|
+
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3379
3402
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3380
|
-
|
|
3403
|
+
let leavingHooks = resolveTransitionHooks(
|
|
3381
3404
|
oldInnerChild,
|
|
3382
3405
|
rawProps,
|
|
3383
3406
|
state,
|
|
@@ -3392,6 +3415,7 @@ var Vue = (function (exports) {
|
|
|
3392
3415
|
instance.update();
|
|
3393
3416
|
}
|
|
3394
3417
|
delete leavingHooks.afterLeave;
|
|
3418
|
+
oldInnerChild = void 0;
|
|
3395
3419
|
};
|
|
3396
3420
|
return emptyPlaceholder(child);
|
|
3397
3421
|
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
@@ -3405,10 +3429,19 @@ var Vue = (function (exports) {
|
|
|
3405
3429
|
earlyRemove();
|
|
3406
3430
|
el[leaveCbKey] = void 0;
|
|
3407
3431
|
delete enterHooks.delayedLeave;
|
|
3432
|
+
oldInnerChild = void 0;
|
|
3433
|
+
};
|
|
3434
|
+
enterHooks.delayedLeave = () => {
|
|
3435
|
+
delayedLeave();
|
|
3436
|
+
delete enterHooks.delayedLeave;
|
|
3437
|
+
oldInnerChild = void 0;
|
|
3408
3438
|
};
|
|
3409
|
-
enterHooks.delayedLeave = delayedLeave;
|
|
3410
3439
|
};
|
|
3440
|
+
} else {
|
|
3441
|
+
oldInnerChild = void 0;
|
|
3411
3442
|
}
|
|
3443
|
+
} else if (oldInnerChild) {
|
|
3444
|
+
oldInnerChild = void 0;
|
|
3412
3445
|
}
|
|
3413
3446
|
return child;
|
|
3414
3447
|
};
|
|
@@ -3713,6 +3746,9 @@ var Vue = (function (exports) {
|
|
|
3713
3746
|
return;
|
|
3714
3747
|
}
|
|
3715
3748
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
3749
|
+
if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
|
|
3750
|
+
setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
|
|
3751
|
+
}
|
|
3716
3752
|
return;
|
|
3717
3753
|
}
|
|
3718
3754
|
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
@@ -3977,7 +4013,7 @@ var Vue = (function (exports) {
|
|
|
3977
4013
|
getContainerType(container),
|
|
3978
4014
|
optimized
|
|
3979
4015
|
);
|
|
3980
|
-
if (isAsyncWrapper(vnode)) {
|
|
4016
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
3981
4017
|
let subTree;
|
|
3982
4018
|
if (isFragmentStart) {
|
|
3983
4019
|
subTree = createVNode(Fragment);
|
|
@@ -4246,6 +4282,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4246
4282
|
getContainerType(container),
|
|
4247
4283
|
slotScopeIds
|
|
4248
4284
|
);
|
|
4285
|
+
if (parentComponent) {
|
|
4286
|
+
parentComponent.vnode.el = vnode.el;
|
|
4287
|
+
updateHOCHostEl(parentComponent, vnode.el);
|
|
4288
|
+
}
|
|
4249
4289
|
return next;
|
|
4250
4290
|
};
|
|
4251
4291
|
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
@@ -5199,6 +5239,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5199
5239
|
$watch: (i) => instanceWatch.bind(i),
|
|
5200
5240
|
$containers: i => i.$containers,
|
|
5201
5241
|
$container: i => i.$container,
|
|
5242
|
+
$delayClose: i => i.$delayClose,
|
|
5202
5243
|
$data: i => i.$data,
|
|
5203
5244
|
$created: i => i.$created,
|
|
5204
5245
|
$unmounted: i => i.$unmounted,
|
|
@@ -8659,7 +8700,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8659
8700
|
}
|
|
8660
8701
|
if (extraAttrs.length) {
|
|
8661
8702
|
warn$1(
|
|
8662
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
8703
|
+
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
8663
8704
|
);
|
|
8664
8705
|
}
|
|
8665
8706
|
if (eventAttrs.length) {
|
|
@@ -9442,9 +9483,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9442
9483
|
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
9443
9484
|
}
|
|
9444
9485
|
let isBlockTreeEnabled = 1;
|
|
9445
|
-
function setBlockTracking(value) {
|
|
9486
|
+
function setBlockTracking(value, inVOnce = false) {
|
|
9446
9487
|
isBlockTreeEnabled += value;
|
|
9447
|
-
if (value < 0 && currentBlock) {
|
|
9488
|
+
if (value < 0 && currentBlock && inVOnce) {
|
|
9448
9489
|
currentBlock.hasOnce = true;
|
|
9449
9490
|
}
|
|
9450
9491
|
}
|
|
@@ -10454,7 +10495,7 @@ Component that was made reactive: `,
|
|
|
10454
10495
|
return true;
|
|
10455
10496
|
}
|
|
10456
10497
|
|
|
10457
|
-
const version = "3.5.
|
|
10498
|
+
const version = "3.5.13";
|
|
10458
10499
|
const warn = warn$1 ;
|
|
10459
10500
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10460
10501
|
const devtools = devtools$1 ;
|
|
@@ -10626,7 +10667,8 @@ Component that was made reactive: `,
|
|
|
10626
10667
|
onAppear = onEnter,
|
|
10627
10668
|
onAppearCancelled = onEnterCancelled
|
|
10628
10669
|
} = baseProps;
|
|
10629
|
-
const finishEnter = (el, isAppear, done) => {
|
|
10670
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
10671
|
+
el._enterCancelled = isCancelled;
|
|
10630
10672
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10631
10673
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
10632
10674
|
done && done();
|
|
@@ -10669,8 +10711,13 @@ Component that was made reactive: `,
|
|
|
10669
10711
|
el._isLeaving = true;
|
|
10670
10712
|
const resolve = () => finishLeave(el, done);
|
|
10671
10713
|
addTransitionClass(el, leaveFromClass);
|
|
10672
|
-
|
|
10673
|
-
|
|
10714
|
+
if (!el._enterCancelled) {
|
|
10715
|
+
forceReflow();
|
|
10716
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10717
|
+
} else {
|
|
10718
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10719
|
+
forceReflow();
|
|
10720
|
+
}
|
|
10674
10721
|
nextFrame(() => {
|
|
10675
10722
|
if (!el._isLeaving) {
|
|
10676
10723
|
return;
|
|
@@ -10684,11 +10731,11 @@ Component that was made reactive: `,
|
|
|
10684
10731
|
callHook(onLeave, [el, resolve]);
|
|
10685
10732
|
},
|
|
10686
10733
|
onEnterCancelled(el) {
|
|
10687
|
-
finishEnter(el, false);
|
|
10734
|
+
finishEnter(el, false, void 0, true);
|
|
10688
10735
|
callHook(onEnterCancelled, [el]);
|
|
10689
10736
|
},
|
|
10690
10737
|
onAppearCancelled(el) {
|
|
10691
|
-
finishEnter(el, true);
|
|
10738
|
+
finishEnter(el, true, void 0, true);
|
|
10692
10739
|
callHook(onAppearCancelled, [el]);
|
|
10693
10740
|
},
|
|
10694
10741
|
onLeaveCancelled(el) {
|
|
@@ -10901,10 +10948,11 @@ Component that was made reactive: `,
|
|
|
10901
10948
|
}
|
|
10902
10949
|
updateTeleports(vars);
|
|
10903
10950
|
};
|
|
10904
|
-
|
|
10905
|
-
|
|
10951
|
+
onBeforeUpdate(() => {
|
|
10952
|
+
queuePostFlushCb(setVars);
|
|
10906
10953
|
});
|
|
10907
10954
|
onMounted(() => {
|
|
10955
|
+
watch(setVars, NOOP, { flush: "post" });
|
|
10908
10956
|
const ob = new MutationObserver(setVars);
|
|
10909
10957
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10910
10958
|
onUnmounted(() => ob.disconnect());
|
|
@@ -11511,6 +11559,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11511
11559
|
this._update();
|
|
11512
11560
|
}
|
|
11513
11561
|
if (shouldReflect) {
|
|
11562
|
+
const ob = this._ob;
|
|
11563
|
+
ob && ob.disconnect();
|
|
11514
11564
|
if (val === true) {
|
|
11515
11565
|
this.setAttribute(hyphenate(key), "");
|
|
11516
11566
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -11518,6 +11568,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11518
11568
|
} else if (!val) {
|
|
11519
11569
|
this.removeAttribute(hyphenate(key));
|
|
11520
11570
|
}
|
|
11571
|
+
ob && ob.observe(this, { attributes: true });
|
|
11521
11572
|
}
|
|
11522
11573
|
}
|
|
11523
11574
|
}
|
|
@@ -12491,12 +12542,13 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
12491
12542
|
loc: locStub
|
|
12492
12543
|
};
|
|
12493
12544
|
}
|
|
12494
|
-
function createCacheExpression(index, value, needPauseTracking = false) {
|
|
12545
|
+
function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
|
|
12495
12546
|
return {
|
|
12496
12547
|
type: 20,
|
|
12497
12548
|
index,
|
|
12498
12549
|
value,
|
|
12499
12550
|
needPauseTracking,
|
|
12551
|
+
inVOnce,
|
|
12500
12552
|
needArraySpread: false,
|
|
12501
12553
|
loc: locStub
|
|
12502
12554
|
};
|
|
@@ -14730,11 +14782,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14730
14782
|
identifier.hoisted = exp;
|
|
14731
14783
|
return identifier;
|
|
14732
14784
|
},
|
|
14733
|
-
cache(exp, isVNode = false) {
|
|
14785
|
+
cache(exp, isVNode = false, inVOnce = false) {
|
|
14734
14786
|
const cacheExp = createCacheExpression(
|
|
14735
14787
|
context.cached.length,
|
|
14736
14788
|
exp,
|
|
14737
|
-
isVNode
|
|
14789
|
+
isVNode,
|
|
14790
|
+
inVOnce
|
|
14738
14791
|
);
|
|
14739
14792
|
context.cached.push(cacheExp);
|
|
14740
14793
|
return cacheExp;
|
|
@@ -15433,7 +15486,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15433
15486
|
push(`_cache[${node.index}] || (`);
|
|
15434
15487
|
if (needPauseTracking) {
|
|
15435
15488
|
indent();
|
|
15436
|
-
push(`${helper(SET_BLOCK_TRACKING)}(-1)
|
|
15489
|
+
push(`${helper(SET_BLOCK_TRACKING)}(-1`);
|
|
15490
|
+
if (node.inVOnce) push(`, true`);
|
|
15491
|
+
push(`),`);
|
|
15437
15492
|
newline();
|
|
15438
15493
|
push(`(`);
|
|
15439
15494
|
}
|
|
@@ -15490,12 +15545,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15490
15545
|
context
|
|
15491
15546
|
);
|
|
15492
15547
|
} else if (node.type === 1) {
|
|
15548
|
+
const memo = findDir(node, "memo");
|
|
15493
15549
|
for (let i = 0; i < node.props.length; i++) {
|
|
15494
15550
|
const dir = node.props[i];
|
|
15495
15551
|
if (dir.type === 7 && dir.name !== "for") {
|
|
15496
15552
|
const exp = dir.exp;
|
|
15497
15553
|
const arg = dir.arg;
|
|
15498
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg))
|
|
15554
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
|
|
15555
|
+
!(memo && arg && arg.type === 4 && arg.content === "key")) {
|
|
15499
15556
|
dir.exp = processExpression(
|
|
15500
15557
|
exp,
|
|
15501
15558
|
context,
|
|
@@ -15823,10 +15880,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15823
15880
|
const isTemplate = isTemplateNode(node);
|
|
15824
15881
|
const memo = findDir(node, "memo");
|
|
15825
15882
|
const keyProp = findProp(node, `key`, false, true);
|
|
15826
|
-
|
|
15883
|
+
const isDirKey = keyProp && keyProp.type === 7;
|
|
15884
|
+
if (isDirKey && !keyProp.exp) {
|
|
15827
15885
|
transformBindShorthand(keyProp);
|
|
15828
15886
|
}
|
|
15829
|
-
|
|
15887
|
+
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
15830
15888
|
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
15831
15889
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
15832
15890
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
@@ -17023,8 +17081,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17023
17081
|
if (cur.codegenNode) {
|
|
17024
17082
|
cur.codegenNode = context.cache(
|
|
17025
17083
|
cur.codegenNode,
|
|
17084
|
+
true,
|
|
17026
17085
|
true
|
|
17027
|
-
/* isVNode */
|
|
17028
17086
|
);
|
|
17029
17087
|
}
|
|
17030
17088
|
};
|
|
@@ -18319,6 +18377,7 @@ function build(options, exports) {
|
|
|
18319
18377
|
instance.$created = component.created || function () { };
|
|
18320
18378
|
instance.$mounted = component.mounted || function () { };
|
|
18321
18379
|
instance.$unmounted = component.unmounted || function () { };
|
|
18380
|
+
instance.$delayClose = component.delayClose || 0;
|
|
18322
18381
|
_attachContainer(instance);
|
|
18323
18382
|
}
|
|
18324
18383
|
|
|
@@ -18415,111 +18474,133 @@ function build(options, exports) {
|
|
|
18415
18474
|
currentProxy = instance.$.proxy;
|
|
18416
18475
|
}
|
|
18417
18476
|
|
|
18477
|
+
var p = Promise.resolve();
|
|
18418
18478
|
if (!this.active || this.active.$view != url || !_options.reuseContainerActiveView()) {
|
|
18419
|
-
this.close();
|
|
18479
|
+
p = this.close();
|
|
18420
18480
|
}
|
|
18421
18481
|
|
|
18422
18482
|
var self = this;
|
|
18423
18483
|
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18484
|
+
return p.then(function () {
|
|
18485
|
+
var p = Promise.resolve();
|
|
18486
|
+
params = generateParametersFromRoute(params);
|
|
18487
|
+
_parseQueryString(params);
|
|
18488
|
+
if (_options.reuseContainerActiveView() && self.active?.$view == url) {
|
|
18489
|
+
var reuseComponentFunc = function (container) {
|
|
18490
|
+
if (!container || !container.active) {
|
|
18491
|
+
return p;
|
|
18492
|
+
}
|
|
18432
18493
|
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
}
|
|
18443
|
-
p = p.then(function () {
|
|
18444
|
-
var initData = container.active.$data();
|
|
18445
|
-
if (_options.resetDataWhenReuseContainerActiveView()) {
|
|
18446
|
-
_combineObject(initData, container.active);
|
|
18494
|
+
if (_options.callUnmountedWhenReuseContainerActiveView(container.active.$view)) {
|
|
18495
|
+
p = p.then(function () {
|
|
18496
|
+
var val = container.active.$unmounted();
|
|
18497
|
+
if (val instanceof Promise) {
|
|
18498
|
+
return val;
|
|
18499
|
+
} else {
|
|
18500
|
+
return Promise.resolve();
|
|
18501
|
+
}
|
|
18502
|
+
});
|
|
18447
18503
|
}
|
|
18448
|
-
_combineObject(params, container.active);
|
|
18449
|
-
return Promise.resolve();
|
|
18450
|
-
});
|
|
18451
|
-
if (_options.callCreatedWhenReuseContainerActiveView(container.active.$view)) {
|
|
18452
|
-
p = p.then(function () {
|
|
18453
|
-
var val = container.active.$created();
|
|
18454
|
-
if (val instanceof Promise) {
|
|
18455
|
-
return val;
|
|
18456
|
-
} else {
|
|
18457
|
-
return Promise.resolve();
|
|
18458
|
-
}
|
|
18459
|
-
});
|
|
18460
|
-
}
|
|
18461
|
-
if (_options.callMountedWhenReuseContainerActiveView(container.active.$view)) {
|
|
18462
18504
|
p = p.then(function () {
|
|
18463
|
-
var
|
|
18464
|
-
if (
|
|
18465
|
-
|
|
18466
|
-
} else {
|
|
18467
|
-
return Promise.resolve();
|
|
18505
|
+
var initData = container.active.$data();
|
|
18506
|
+
if (_options.resetDataWhenReuseContainerActiveView()) {
|
|
18507
|
+
_combineObject(initData, container.active);
|
|
18468
18508
|
}
|
|
18509
|
+
_combineObject(params, container.active);
|
|
18510
|
+
return Promise.resolve();
|
|
18469
18511
|
});
|
|
18470
|
-
|
|
18512
|
+
if (_options.callCreatedWhenReuseContainerActiveView(container.active.$view)) {
|
|
18513
|
+
p = p.then(function () {
|
|
18514
|
+
var val = container.active.$created();
|
|
18515
|
+
if (val instanceof Promise) {
|
|
18516
|
+
return val;
|
|
18517
|
+
} else {
|
|
18518
|
+
return Promise.resolve();
|
|
18519
|
+
}
|
|
18520
|
+
});
|
|
18521
|
+
}
|
|
18522
|
+
if (_options.callMountedWhenReuseContainerActiveView(container.active.$view)) {
|
|
18523
|
+
p = p.then(function () {
|
|
18524
|
+
var val = container.active.$mounted();
|
|
18525
|
+
if (val instanceof Promise) {
|
|
18526
|
+
return val;
|
|
18527
|
+
} else {
|
|
18528
|
+
return Promise.resolve();
|
|
18529
|
+
}
|
|
18530
|
+
});
|
|
18531
|
+
}
|
|
18471
18532
|
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18533
|
+
if (container.active.$containers && container.active.$containers.length) {
|
|
18534
|
+
for (var i = 0; i < container.active.$containers.length; ++i) {
|
|
18535
|
+
reuseComponentFunc(container.active.$containers[i]);
|
|
18536
|
+
}
|
|
18475
18537
|
}
|
|
18476
|
-
}
|
|
18477
18538
|
|
|
18478
|
-
|
|
18539
|
+
return p.then(function () { container.active.$forceUpdate(); return Promise.resolve(container.active) });
|
|
18479
18540
|
|
|
18541
|
+
}
|
|
18542
|
+
return Promise.resolve(reuseComponentFunc(self));
|
|
18480
18543
|
}
|
|
18481
|
-
return Promise.resolve(reuseComponentFunc(this));
|
|
18482
|
-
}
|
|
18483
18544
|
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
|
|
18489
|
-
|
|
18490
|
-
|
|
18491
|
-
|
|
18492
|
-
|
|
18545
|
+
var _result;
|
|
18546
|
+
var retryLeft = 20;
|
|
18547
|
+
var buildRetryPromise = function () {
|
|
18548
|
+
var final = new Promise(function (res, rej) {
|
|
18549
|
+
var active = _result.mount(self.selector);
|
|
18550
|
+
if (active) {
|
|
18551
|
+
self.active = active;
|
|
18552
|
+
return Promise.resolve(active);
|
|
18553
|
+
}
|
|
18493
18554
|
|
|
18494
|
-
|
|
18495
|
-
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18555
|
+
if (--retryLeft > 0) {
|
|
18556
|
+
return sleep(50).then(function () {
|
|
18557
|
+
return buildRetryPromise();
|
|
18558
|
+
});
|
|
18559
|
+
} else {
|
|
18560
|
+
return Promise.reject('Mount component to ' + self.selector + ' failed');
|
|
18561
|
+
}
|
|
18562
|
+
});
|
|
18563
|
+
return final;
|
|
18564
|
+
};
|
|
18503
18565
|
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18566
|
+
return _buildApp(url, params, mobile, currentProxy).then(function (result) {
|
|
18567
|
+
_result = result;
|
|
18568
|
+
return buildRetryPromise();
|
|
18569
|
+
});
|
|
18507
18570
|
});
|
|
18508
18571
|
},
|
|
18509
|
-
close: function (recurse = true) {
|
|
18510
|
-
function liftClose(container) {
|
|
18572
|
+
close: async function (recurse = true) {
|
|
18573
|
+
async function liftClose(container) {
|
|
18511
18574
|
if (container.active && container.active.$) {
|
|
18512
18575
|
if (recurse) {
|
|
18513
18576
|
for (var i = 0; i < container.active.$containers.length; ++i) {
|
|
18514
18577
|
liftClose(container.active.$containers[i]);
|
|
18515
18578
|
}
|
|
18516
18579
|
}
|
|
18517
|
-
|
|
18580
|
+
|
|
18581
|
+
if (container.active.$delayClose) {
|
|
18582
|
+
console.log(container.active.$el);
|
|
18583
|
+
try {
|
|
18584
|
+
if (container.active.$el && container.active.$el.nextElementSibling) {
|
|
18585
|
+
container.active.$el.nextElementSibling?.classList?.add('_pome-ui-closing');
|
|
18586
|
+
}
|
|
18587
|
+
} catch (ex) {
|
|
18588
|
+
console.warn(ex);
|
|
18589
|
+
}
|
|
18590
|
+
console.log(`sleeping ${container.active.$delayClose}ms...`);
|
|
18591
|
+
await sleep(container.active.$delayClose);
|
|
18592
|
+
}
|
|
18593
|
+
|
|
18594
|
+
try {
|
|
18595
|
+
container.active.$.appContext.app.unmount();
|
|
18596
|
+
} catch (ex) {
|
|
18597
|
+
console.warn(ex);
|
|
18598
|
+
}
|
|
18518
18599
|
container.active = null;
|
|
18519
18600
|
}
|
|
18520
18601
|
}
|
|
18521
|
-
|
|
18522
|
-
liftClose(this);
|
|
18602
|
+
|
|
18603
|
+
await liftClose(this);
|
|
18523
18604
|
},
|
|
18524
18605
|
active: null
|
|
18525
18606
|
};
|
|
@@ -19055,16 +19136,17 @@ function build(options, exports) {
|
|
|
19055
19136
|
var val = params[fields[i]];
|
|
19056
19137
|
exports.root()[fields[i]] = val;
|
|
19057
19138
|
}
|
|
19058
|
-
|
|
19059
|
-
exports.root().$containers[0].open(route.view, params)
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19139
|
+
|
|
19140
|
+
return exports.root().$containers[0].open(route.view, params).then(function () {
|
|
19141
|
+
var promise = Promise.resolve();
|
|
19142
|
+
if (typeof exports.root().$.$onUpdating == 'function') {
|
|
19143
|
+
var result = exports.root().$.$onUpdating.call(exports.root());
|
|
19144
|
+
if (result instanceof Promise) {
|
|
19145
|
+
promise = promise.then(() => result);
|
|
19146
|
+
}
|
|
19065
19147
|
}
|
|
19066
|
-
|
|
19067
|
-
|
|
19148
|
+
return promise;
|
|
19149
|
+
});
|
|
19068
19150
|
}
|
|
19069
19151
|
|
|
19070
19152
|
exports.root().$.appContext.app.unmount();
|