@aiconomy/aico-components 0.0.158 → 0.0.168

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.
Files changed (57) hide show
  1. package/README.md +14 -12
  2. package/dist/aico-components/aico-components.esm.js +1 -1
  3. package/dist/aico-components/aico-components.esm.js.map +1 -1
  4. package/dist/aico-components/{p-d4f3c776.entry.js → p-020898a6.entry.js} +2 -2
  5. package/dist/aico-components/p-253097be.js +3 -0
  6. package/dist/aico-components/p-253097be.js.map +1 -0
  7. package/dist/aico-components/{p-0d563d4f.entry.js → p-25cf4b75.entry.js} +2 -2
  8. package/dist/aico-components/{p-076c2ca2.entry.js → p-aa633f51.entry.js} +4 -4
  9. package/dist/aico-components/p-aa633f51.entry.js.map +1 -0
  10. package/dist/cjs/aico-album-content_27.cjs.entry.js +39 -10
  11. package/dist/cjs/aico-album-content_27.cjs.entry.js.map +1 -1
  12. package/dist/cjs/aico-asking-list-content.cjs.entry.js +1 -1
  13. package/dist/cjs/aico-collection-content.cjs.entry.js +1 -1
  14. package/dist/cjs/aico-components.cjs.js +2 -2
  15. package/dist/cjs/{index-e52034b7.js → index-0ce53322.js} +60 -2
  16. package/dist/cjs/index-0ce53322.js.map +1 -0
  17. package/dist/cjs/loader.cjs.js +2 -2
  18. package/dist/collection/components/aico-news-list/aico-news-list.js +41 -3
  19. package/dist/collection/components/aico-news-list/aico-news-list.js.map +1 -1
  20. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js +22 -1
  21. package/dist/collection/components/aico-news-list-item/aico-news-list-item.js.map +1 -1
  22. package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js +2 -2
  23. package/dist/collection/components/aico-special-news-carousel/aico-special-news-carousel.js.map +1 -1
  24. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.js +2 -2
  25. package/dist/collection/components/aico-top-news-carousel/aico-top-news-carousel.js.map +1 -1
  26. package/dist/collection/utils/utils.js +7 -1
  27. package/dist/collection/utils/utils.js.map +1 -1
  28. package/dist/components/aico-news-list-item2.js +22 -1
  29. package/dist/components/aico-news-list-item2.js.map +1 -1
  30. package/dist/components/aico-news-list.js +7 -3
  31. package/dist/components/aico-news-list.js.map +1 -1
  32. package/dist/components/aico-special-news-carousel.js +2 -2
  33. package/dist/components/aico-special-news-carousel.js.map +1 -1
  34. package/dist/components/aico-top-news-carousel.js +2 -2
  35. package/dist/components/aico-top-news-carousel.js.map +1 -1
  36. package/dist/components/utils.js +7 -1
  37. package/dist/components/utils.js.map +1 -1
  38. package/dist/esm/aico-album-content_27.entry.js +39 -10
  39. package/dist/esm/aico-album-content_27.entry.js.map +1 -1
  40. package/dist/esm/aico-asking-list-content.entry.js +1 -1
  41. package/dist/esm/aico-collection-content.entry.js +1 -1
  42. package/dist/esm/aico-components.js +3 -3
  43. package/dist/esm/{index-4621a8ba.js → index-1498b9e7.js} +60 -3
  44. package/dist/esm/index-1498b9e7.js.map +1 -0
  45. package/dist/esm/loader.js +3 -3
  46. package/dist/types/components/aico-news-list/aico-news-list.d.ts +8 -0
  47. package/dist/types/components/aico-news-list-item/aico-news-list-item.d.ts +4 -0
  48. package/dist/types/components.d.ts +16 -0
  49. package/dist/types/utils/utils.d.ts +1 -1
  50. package/package.json +1 -1
  51. package/dist/aico-components/p-076c2ca2.entry.js.map +0 -1
  52. package/dist/aico-components/p-ae20e789.js +0 -3
  53. package/dist/aico-components/p-ae20e789.js.map +0 -1
  54. package/dist/cjs/index-e52034b7.js.map +0 -1
  55. package/dist/esm/index-4621a8ba.js.map +0 -1
  56. /package/dist/aico-components/{p-d4f3c776.entry.js.map → p-020898a6.entry.js.map} +0 -0
  57. /package/dist/aico-components/{p-0d563d4f.entry.js.map → p-25cf4b75.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-4621a8ba.js';
2
- export { s as setNonce } from './index-4621a8ba.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-1498b9e7.js';
2
+ export { s as setNonce } from './index-1498b9e7.js';
3
3
 
4
4
  /*
5
5
  Stencil Client Patch Browser v4.9.0 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchBrowser = () => {
14
14
  };
15
15
 
16
16
  patchBrowser().then(options => {
17
- return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_27",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}],[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"newsResponse":[32],"pageNumber":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-top-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-article-detail",{"article":[16],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"]}],[2,"aico-news-list-item",{"article":[16],"articleIndex":[2,"article-index"],"locale":[1]}],[2,"aico-bullet-content",{"content":[16],"locale":[1]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"],"locale":[1]}],[2,"aico-content-card-content",{"content":[16],"locale":[1]}],[2,"aico-heading-content",{"content":[16],"locale":[1]}],[2,"aico-table-content",{"content":[16],"locale":[1]}],[2,"aico-text-content",{"content":[16],"locale":[1]}],[2,"aico-upload-content",{"content":[16],"locale":[1]}],[2,"aico-video-content",{"content":[16],"locale":[1]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16],"locale":[1]}],[2,"aico-block-quote-content",{"content":[16],"locale":[1]}],[2,"aico-divider-content",{"content":[16],"locale":[1]}],[2,"aico-document-content",{"content":[16],"locale":[1]}],[2,"aico-faq-content",{"content":[16],"locale":[1]}],[2,"aico-html-content",{"content":[16],"locale":[1]}],[2,"aico-link-content",{"content":[16],"locale":[1]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16],"locale":[1]}],[2,"aico-testimonial-content",{"content":[16]}],[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]]], options);
17
+ return bootstrapLazy([["aico-asking-list-content",[[6,"aico-asking-list-content"]]],["aico-collection-content",[[6,"aico-collection-content"]]],["aico-album-content_27",[[2,"aico-fetch-article-detail",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"],"articleId":[1,"article-id"],"articleUrlHandle":[1,"article-url-handle"],"article":[32]}],[2,"aico-news-list",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"hideTopArticles":[4,"hide-top-articles"],"hideSpecialArticles":[4,"hide-special-articles"],"pageSize":[2,"page-size"],"nextButtonText":[1,"next-button-text"],"previousButtonText":[1,"previous-button-text"],"locale":[1],"newsResponse":[32],"pageNumber":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-special-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-top-news-carousel",{"aicoUrl":[1,"aico-url"],"aicoBearerToken":[1,"aico-bearer-token"],"newsChannels":[1,"news-channels"],"newsSellerIds":[1,"news-seller-ids"],"newsBrandIds":[1,"news-brand-ids"],"newsLanguageLocales":[1,"news-language-locales"],"numberOfArticles":[2,"number-of-articles"],"locale":[1],"newsResponse":[32],"newsChannelsArr":[32],"newsSellerIdsArr":[32],"newsBrandIdsArr":[32],"newsLanguageLocalesArr":[32]}],[2,"aico-article-detail",{"article":[16],"locale":[1],"hideDateAndAuthor":[4,"hide-date-and-author"],"hideCategoryAndTags":[4,"hide-category-and-tags"]}],[2,"aico-news-list-item",{"article":[16],"articleIndex":[2,"article-index"],"locale":[1]}],[2,"aico-bullet-content",{"content":[16],"locale":[1]}],[2,"aico-carousel-content",{"content":[16],"hasArrows":[4,"has-arrows"],"locale":[1]}],[2,"aico-content-card-content",{"content":[16],"locale":[1]}],[2,"aico-heading-content",{"content":[16],"locale":[1]}],[2,"aico-table-content",{"content":[16],"locale":[1]}],[2,"aico-text-content",{"content":[16],"locale":[1]}],[2,"aico-upload-content",{"content":[16],"locale":[1]}],[2,"aico-video-content",{"content":[16],"locale":[1]}],[2,"aico-album-content",{"content":[16]}],[2,"aico-asking-content",{"content":[16],"locale":[1]}],[2,"aico-block-quote-content",{"content":[16],"locale":[1]}],[2,"aico-divider-content",{"content":[16],"locale":[1]}],[2,"aico-document-content",{"content":[16],"locale":[1]}],[2,"aico-faq-content",{"content":[16],"locale":[1]}],[2,"aico-html-content",{"content":[16],"locale":[1]}],[2,"aico-link-content",{"content":[16],"locale":[1]}],[2,"aico-news-content",{"content":[16]}],[2,"aico-page-content",{"content":[16],"locale":[1]}],[2,"aico-testimonial-content",{"content":[16]}],[2,"aico-title-content",{"content":[16],"locale":[1]}],[2,"aico-no-content"]]]], options);
18
18
  });
19
19
 
20
20
  //# sourceMappingURL=aico-components.js.map
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'aico-components';
2
- 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: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ 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 };
3
3
 
4
4
  /**
5
5
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -89,6 +89,7 @@ function queryNonceMetaTagContent(doc) {
89
89
  // export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
90
90
  const h = (nodeName, vnodeData, ...children) => {
91
91
  let child = null;
92
+ let key = null;
92
93
  let slotName = null;
93
94
  let simple = false;
94
95
  let lastSimple = false;
@@ -117,6 +118,9 @@ const h = (nodeName, vnodeData, ...children) => {
117
118
  };
118
119
  walk(children);
119
120
  if (vnodeData) {
121
+ if (vnodeData.key) {
122
+ key = vnodeData.key;
123
+ }
120
124
  if (vnodeData.name) {
121
125
  slotName = vnodeData.name;
122
126
  }
@@ -142,6 +146,9 @@ const h = (nodeName, vnodeData, ...children) => {
142
146
  if (vNodeChildren.length > 0) {
143
147
  vnode.$children$ = vNodeChildren;
144
148
  }
149
+ {
150
+ vnode.$key$ = key;
151
+ }
145
152
  {
146
153
  vnode.$name$ = slotName;
147
154
  }
@@ -166,6 +173,9 @@ const newVNode = (tag, text) => {
166
173
  {
167
174
  vnode.$attrs$ = null;
168
175
  }
176
+ {
177
+ vnode.$key$ = null;
178
+ }
169
179
  {
170
180
  vnode.$name$ = null;
171
181
  }
@@ -445,6 +455,8 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
445
455
  }
446
456
  }
447
457
  }
458
+ else if (memberName === 'key')
459
+ ;
448
460
  else if ((!isProp ) &&
449
461
  memberName[0] === 'o' &&
450
462
  memberName[1] === 'n') {
@@ -842,6 +854,8 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
842
854
  const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
843
855
  let oldStartIdx = 0;
844
856
  let newStartIdx = 0;
857
+ let idxInOld = 0;
858
+ let i = 0;
845
859
  let oldEndIdx = oldCh.length - 1;
846
860
  let oldStartVnode = oldCh[0];
847
861
  let oldEndVnode = oldCh[oldEndIdx];
@@ -849,6 +863,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
849
863
  let newStartVnode = newCh[0];
850
864
  let newEndVnode = newCh[newEndIdx];
851
865
  let node;
866
+ let elmToMove;
852
867
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
853
868
  if (oldStartVnode == null) {
854
869
  // VNode might have been moved left
@@ -950,7 +965,41 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = fal
950
965
  newStartVnode = newCh[++newStartIdx];
951
966
  }
952
967
  else {
968
+ // Here we do some checks to match up old and new nodes based on the
969
+ // `$key$` attribute, which is set by putting a `key="my-key"` attribute
970
+ // in the JSX for a DOM element in the implementation of a Stencil
971
+ // component.
972
+ //
973
+ // First we check to see if there are any nodes in the array of old
974
+ // children which have the same key as the first node in the new
975
+ // children.
976
+ idxInOld = -1;
953
977
  {
978
+ for (i = oldStartIdx; i <= oldEndIdx; ++i) {
979
+ if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
980
+ idxInOld = i;
981
+ break;
982
+ }
983
+ }
984
+ }
985
+ if (idxInOld >= 0) {
986
+ // We found a node in the old children which matches up with the first
987
+ // node in the new children! So let's deal with that
988
+ elmToMove = oldCh[idxInOld];
989
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
990
+ // the tag doesn't match so we'll need a new DOM element
991
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
992
+ }
993
+ else {
994
+ patch(elmToMove, newStartVnode, isInitialRender);
995
+ // invalidate the matching old node so that we won't try to update it
996
+ // again later on
997
+ oldCh[idxInOld] = undefined;
998
+ node = elmToMove.$elm$;
999
+ }
1000
+ newStartVnode = newCh[++newStartIdx];
1001
+ }
1002
+ else {
954
1003
  // We either didn't find an element in the old children that matches
955
1004
  // the key of the first new child OR the build is not using `key`
956
1005
  // attributes at all. In either case we need to create a new element
@@ -1003,6 +1052,14 @@ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1003
1052
  if (leftVNode.$tag$ === 'slot') {
1004
1053
  return leftVNode.$name$ === rightVNode.$name$;
1005
1054
  }
1055
+ // this will be set if JSX tags in the build have `key` attrs set on them
1056
+ // we only want to check this if we're not on the first render since on
1057
+ // first render `leftVNode.$key$` will always be `null`, so we can be led
1058
+ // astray and, for instance, accidentally delete a DOM node that we want to
1059
+ // keep around.
1060
+ if (!isInitialRender) {
1061
+ return leftVNode.$key$ === rightVNode.$key$;
1062
+ }
1006
1063
  return true;
1007
1064
  }
1008
1065
  return false;
@@ -2241,6 +2298,6 @@ const flush = () => {
2241
2298
  const nextTick = (cb) => promiseResolve().then(cb);
2242
2299
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2243
2300
 
2244
- export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
2301
+ export { Fragment as F, Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
2245
2302
 
2246
- //# sourceMappingURL=index-4621a8ba.js.map
2303
+ //# sourceMappingURL=index-1498b9e7.js.map