@aiconomy/aico-components 0.0.164 → 0.0.174
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/dist/aico-components/aico-components.esm.js +1 -1
- package/dist/aico-components/{p-d4f3c776.entry.js → p-020898a6.entry.js} +2 -2
- package/dist/aico-components/p-253097be.js +3 -0
- package/dist/aico-components/p-253097be.js.map +1 -0
- package/dist/aico-components/{p-0d563d4f.entry.js → p-25cf4b75.entry.js} +2 -2
- package/dist/aico-components/{p-43d0546f.entry.js → p-c4d3fd22.entry.js} +4 -4
- package/dist/aico-components/p-c4d3fd22.entry.js.map +1 -0
- package/dist/cjs/aico-album-content_27.cjs.entry.js +29 -5
- package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
- package/dist/cjs/aico-asking-list-content.cjs.entry.js +1 -1
- package/dist/cjs/aico-collection-content.cjs.entry.js +1 -1
- package/dist/cjs/aico-components.cjs.js +1 -1
- package/dist/cjs/{index-e52034b7.js → index-0ce53322.js} +60 -2
- package/dist/cjs/index-0ce53322.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/aico-article-detail/aico-article-detail.js +5 -2
- package/dist/collection/components/aico-article-detail/aico-article-detail.js.map +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js +1 -1
- package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +22 -1
- package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
- package/dist/collection/model/Article.js.map +1 -1
- package/dist/components/aico-article-detail2.js +5 -2
- package/dist/components/aico-article-detail2.js.map +1 -1
- package/dist/components/aico-news-list-item2.js +22 -1
- package/dist/components/aico-news-list-item2.js.map +1 -1
- package/dist/components/aico-news-list.js +1 -1
- package/dist/components/aico-news-list.js.map +1 -1
- package/dist/esm/aico-album-content_27.entry.js +29 -5
- package/dist/esm/aico-album-content_27.entry.js.map +1 -1
- package/dist/esm/aico-asking-list-content.entry.js +1 -1
- package/dist/esm/aico-collection-content.entry.js +1 -1
- package/dist/esm/aico-components.js +2 -2
- package/dist/esm/{index-4621a8ba.js → index-1498b9e7.js} +60 -3
- package/dist/esm/index-1498b9e7.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +4 -0
- package/dist/types/model/Article.d.ts +1 -0
- package/package.json +1 -1
- package/dist/aico-components/p-43d0546f.entry.js.map +0 -1
- package/dist/aico-components/p-ae20e789.js +0 -3
- package/dist/aico-components/p-ae20e789.js.map +0 -1
- package/dist/cjs/index-e52034b7.js.map +0 -1
- package/dist/esm/index-4621a8ba.js.map +0 -1
- /package/dist/aico-components/{p-d4f3c776.entry.js.map → p-020898a6.entry.js.map} +0 -0
- /package/dist/aico-components/{p-0d563d4f.entry.js.map → p-25cf4b75.entry.js.map} +0 -0
|
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'aico-components';
|
|
24
|
-
const BUILD = /* aico-components */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: true, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey:
|
|
24
|
+
const BUILD = /* aico-components */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: true, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
@@ -111,6 +111,7 @@ function queryNonceMetaTagContent(doc) {
|
|
|
111
111
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
112
112
|
const h = (nodeName, vnodeData, ...children) => {
|
|
113
113
|
let child = null;
|
|
114
|
+
let key = null;
|
|
114
115
|
let slotName = null;
|
|
115
116
|
let simple = false;
|
|
116
117
|
let lastSimple = false;
|
|
@@ -139,6 +140,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
139
140
|
};
|
|
140
141
|
walk(children);
|
|
141
142
|
if (vnodeData) {
|
|
143
|
+
if (vnodeData.key) {
|
|
144
|
+
key = vnodeData.key;
|
|
145
|
+
}
|
|
142
146
|
if (vnodeData.name) {
|
|
143
147
|
slotName = vnodeData.name;
|
|
144
148
|
}
|
|
@@ -164,6 +168,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
164
168
|
if (vNodeChildren.length > 0) {
|
|
165
169
|
vnode.$children$ = vNodeChildren;
|
|
166
170
|
}
|
|
171
|
+
{
|
|
172
|
+
vnode.$key$ = key;
|
|
173
|
+
}
|
|
167
174
|
{
|
|
168
175
|
vnode.$name$ = slotName;
|
|
169
176
|
}
|
|
@@ -188,6 +195,9 @@ const newVNode = (tag, text) => {
|
|
|
188
195
|
{
|
|
189
196
|
vnode.$attrs$ = null;
|
|
190
197
|
}
|
|
198
|
+
{
|
|
199
|
+
vnode.$key$ = null;
|
|
200
|
+
}
|
|
191
201
|
{
|
|
192
202
|
vnode.$name$ = null;
|
|
193
203
|
}
|
|
@@ -467,6 +477,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
467
477
|
}
|
|
468
478
|
}
|
|
469
479
|
}
|
|
480
|
+
else if (memberName === 'key')
|
|
481
|
+
;
|
|
470
482
|
else if ((!isProp ) &&
|
|
471
483
|
memberName[0] === 'o' &&
|
|
472
484
|
memberName[1] === 'n') {
|
|
@@ -864,6 +876,8 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
864
876
|
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
865
877
|
let oldStartIdx = 0;
|
|
866
878
|
let newStartIdx = 0;
|
|
879
|
+
let idxInOld = 0;
|
|
880
|
+
let i = 0;
|
|
867
881
|
let oldEndIdx = oldCh.length - 1;
|
|
868
882
|
let oldStartVnode = oldCh[0];
|
|
869
883
|
let oldEndVnode = oldCh[oldEndIdx];
|
|
@@ -871,6 +885,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
|
|
|
871
885
|
let newStartVnode = newCh[0];
|
|
872
886
|
let newEndVnode = newCh[newEndIdx];
|
|
873
887
|
let node;
|
|
888
|
+
let elmToMove;
|
|
874
889
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
875
890
|
if (oldStartVnode == null) {
|
|
876
891
|
// VNode might have been moved left
|
|
@@ -972,7 +987,41 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
|
|
|
972
987
|
newStartVnode = newCh[++newStartIdx];
|
|
973
988
|
}
|
|
974
989
|
else {
|
|
990
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
991
|
+
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
992
|
+
// in the JSX for a DOM element in the implementation of a Stencil
|
|
993
|
+
// component.
|
|
994
|
+
//
|
|
995
|
+
// First we check to see if there are any nodes in the array of old
|
|
996
|
+
// children which have the same key as the first node in the new
|
|
997
|
+
// children.
|
|
998
|
+
idxInOld = -1;
|
|
975
999
|
{
|
|
1000
|
+
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
1001
|
+
if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
|
|
1002
|
+
idxInOld = i;
|
|
1003
|
+
break;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
if (idxInOld >= 0) {
|
|
1008
|
+
// We found a node in the old children which matches up with the first
|
|
1009
|
+
// node in the new children! So let's deal with that
|
|
1010
|
+
elmToMove = oldCh[idxInOld];
|
|
1011
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1012
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
1013
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1017
|
+
// invalidate the matching old node so that we won't try to update it
|
|
1018
|
+
// again later on
|
|
1019
|
+
oldCh[idxInOld] = undefined;
|
|
1020
|
+
node = elmToMove.$elm$;
|
|
1021
|
+
}
|
|
1022
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1023
|
+
}
|
|
1024
|
+
else {
|
|
976
1025
|
// We either didn't find an element in the old children that matches
|
|
977
1026
|
// the key of the first new child OR the build is not using `key`
|
|
978
1027
|
// attributes at all. In either case we need to create a new element
|
|
@@ -1025,6 +1074,14 @@ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
1025
1074
|
if (leftVNode.$tag$ === 'slot') {
|
|
1026
1075
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1027
1076
|
}
|
|
1077
|
+
// this will be set if JSX tags in the build have `key` attrs set on them
|
|
1078
|
+
// we only want to check this if we're not on the first render since on
|
|
1079
|
+
// first render `leftVNode.$key$` will always be `null`, so we can be led
|
|
1080
|
+
// astray and, for instance, accidentally delete a DOM node that we want to
|
|
1081
|
+
// keep around.
|
|
1082
|
+
if (!isInitialRender) {
|
|
1083
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
1084
|
+
}
|
|
1028
1085
|
return true;
|
|
1029
1086
|
}
|
|
1030
1087
|
return false;
|
|
@@ -2267,9 +2324,10 @@ exports.Fragment = Fragment;
|
|
|
2267
2324
|
exports.Host = Host;
|
|
2268
2325
|
exports.bootstrapLazy = bootstrapLazy;
|
|
2269
2326
|
exports.createEvent = createEvent;
|
|
2327
|
+
exports.getElement = getElement;
|
|
2270
2328
|
exports.h = h;
|
|
2271
2329
|
exports.promiseResolve = promiseResolve;
|
|
2272
2330
|
exports.registerInstance = registerInstance;
|
|
2273
2331
|
exports.setNonce = setNonce;
|
|
2274
2332
|
|
|
2275
|
-
//# sourceMappingURL=index-
|
|
2333
|
+
//# sourceMappingURL=index-0ce53322.js.map
|