@siemens/ix-icons 1.1.2 → 1.2.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/dist/cjs/icon-ccc7c3e3.js +123 -0
  2. package/dist/cjs/icon-ccc7c3e3.js.map +1 -0
  3. package/dist/cjs/{index-22d7f5a7.js → index-be0905d2.js} +19 -81
  4. package/dist/cjs/index-be0905d2.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/ix-icon.cjs.entry.js +2 -2
  7. package/dist/cjs/ix-icons.cjs.js +3 -3
  8. package/dist/cjs/ix-icons.cjs.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +3 -3
  10. package/dist/cjs/loader.cjs.js.map +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/icon/icon.css +769 -664
  13. package/dist/collection/components/icon/icon.js +9 -30
  14. package/dist/collection/components/icon/icon.js.map +1 -1
  15. package/dist/collection/components/icon/resolveIcon.js +19 -13
  16. package/dist/collection/components/icon/resolveIcon.js.map +1 -1
  17. package/dist/components/icon.js +30 -22
  18. package/dist/components/icon.js.map +1 -1
  19. package/dist/css/ix-icons.css +673 -641
  20. package/dist/esm/icon-093019e3.js +121 -0
  21. package/dist/esm/icon-093019e3.js.map +1 -0
  22. package/dist/esm/{index-460e19e2.js → index-58099fde.js} +19 -81
  23. package/dist/esm/index-58099fde.js.map +1 -0
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/ix-icon.entry.js +2 -2
  26. package/dist/esm/ix-icons.js +4 -4
  27. package/dist/esm/ix-icons.js.map +1 -1
  28. package/dist/esm/loader.js +4 -4
  29. package/dist/esm/loader.js.map +1 -1
  30. package/dist/fonts/ix-icons.eot +0 -0
  31. package/dist/fonts/ix-icons.svg +738 -642
  32. package/dist/fonts/ix-icons.ttf +0 -0
  33. package/dist/fonts/ix-icons.woff +0 -0
  34. package/dist/fonts/ix-icons.woff2 +0 -0
  35. package/dist/ix-icons/index.esm.js +1 -1
  36. package/dist/ix-icons/ix-icons.esm.js +1 -1
  37. package/dist/ix-icons/ix-icons.esm.js.map +1 -1
  38. package/dist/ix-icons/p-952e642e.entry.js +2 -0
  39. package/dist/ix-icons/p-b2e8f530.js +2 -0
  40. package/dist/ix-icons/p-b2e8f530.js.map +1 -0
  41. package/dist/ix-icons/p-f929045d.js +3 -0
  42. package/dist/ix-icons/p-f929045d.js.map +1 -0
  43. package/dist/sample.html +1214 -670
  44. package/dist/sample.json +64 -0
  45. package/dist/svg/add-application.svg +1 -0
  46. package/dist/svg/add-user-filled.svg +1 -0
  47. package/dist/svg/add-user.svg +1 -0
  48. package/dist/svg/application-screen.svg +1 -0
  49. package/dist/svg/applications.svg +1 -0
  50. package/dist/svg/certificate-error-filled.svg +1 -0
  51. package/dist/svg/certificate-error.svg +1 -0
  52. package/dist/svg/certificate-exclamation-filled.svg +1 -0
  53. package/dist/svg/certificate-exclamation.svg +1 -0
  54. package/dist/svg/certificate-success-filled.svg +1 -0
  55. package/dist/svg/certificate-success.svg +1 -0
  56. package/dist/svg/coffee-empty-filled.svg +1 -0
  57. package/dist/svg/coffee-empty.svg +1 -0
  58. package/dist/svg/coffee-filled.svg +1 -0
  59. package/dist/svg/coffee.svg +1 -0
  60. package/dist/svg/electrical-energy-filled.svg +1 -0
  61. package/dist/svg/electrical-energy.svg +1 -0
  62. package/dist/svg/photo-camera-cancelled-filled.svg +1 -0
  63. package/dist/svg/photo-camera-cancelled.svg +1 -0
  64. package/dist/svg/project-server-filled.svg +1 -0
  65. package/dist/svg/project-server.svg +1 -0
  66. package/dist/svg/remove-application.svg +1 -0
  67. package/dist/svg/stamp-filled.svg +1 -0
  68. package/dist/svg/stamp.svg +1 -0
  69. package/dist/svg/surveillance-cancelled-filled.svg +1 -0
  70. package/dist/svg/surveillance-cancelled.svg +1 -0
  71. package/dist/svg/text-document.svg +1 -9
  72. package/dist/svg/user-reading-reading.svg +1 -0
  73. package/dist/svg/user-reading.svg +1 -0
  74. package/dist/svg/webcam-cancelled-filled.svg +1 -0
  75. package/dist/svg/webcam-cancelled.svg +1 -0
  76. package/dist/svg/workspace.svg +1 -0
  77. package/dist/svg/workspaces.svg +1 -0
  78. package/dist/types/components/icon/icon.d.ts +0 -9
  79. package/dist/types/components/icon/resolveIcon.d.ts +1 -0
  80. package/dist/types/components.d.ts +0 -4
  81. package/dist/types/stencil-public-runtime.d.ts +0 -1
  82. package/icons/index.d.ts +33 -1
  83. package/icons/index.js +34 -2
  84. package/icons/index.mjs +34 -2
  85. package/icons/package.json +1 -1
  86. package/package.json +2 -2
  87. package/dist/cjs/icon-4106de76.js +0 -114
  88. package/dist/cjs/icon-4106de76.js.map +0 -1
  89. package/dist/cjs/index-22d7f5a7.js.map +0 -1
  90. package/dist/esm/icon-cb9cbf8c.js +0 -112
  91. package/dist/esm/icon-cb9cbf8c.js.map +0 -1
  92. package/dist/esm/index-460e19e2.js.map +0 -1
  93. package/dist/ix-icons/p-2a168ebc.entry.js +0 -2
  94. package/dist/ix-icons/p-37738e42.js +0 -2
  95. package/dist/ix-icons/p-37738e42.js.map +0 -1
  96. package/dist/ix-icons/p-625c25c8.js +0 -3
  97. package/dist/ix-icons/p-625c25c8.js.map +0 -1
  98. /package/dist/ix-icons/{p-2a168ebc.entry.js.map → p-952e642e.entry.js.map} +0 -0
@@ -418,11 +418,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
418
418
  let i = 0;
419
419
  let elm;
420
420
  let childNode;
421
- if (newVNode.$text$ !== null) {
422
- // create text node
423
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
424
- }
425
- else {
421
+ {
426
422
  // create element
427
423
  elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
428
424
  // add css classes, attrs, props, listeners, etc.
@@ -489,16 +485,15 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
489
485
  * @param vnodes a list of virtual DOM nodes to remove
490
486
  * @param startIdx the index at which to start removing nodes (inclusive)
491
487
  * @param endIdx the index at which to stop removing nodes (inclusive)
488
+ * @param vnode a VNode
489
+ * @param elm an element
492
490
  */
493
- const removeVnodes = (vnodes, startIdx, endIdx) => {
494
- for (let index = startIdx; index <= endIdx; ++index) {
495
- const vnode = vnodes[index];
496
- if (vnode) {
497
- const elm = vnode.$elm$;
498
- if (elm) {
499
- // remove the vnode's element from the dom
500
- elm.remove();
501
- }
491
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
492
+ for (; startIdx <= endIdx; ++startIdx) {
493
+ if ((vnode = vnodes[startIdx])) {
494
+ elm = vnode.$elm$;
495
+ // remove the vnode's element from the dom
496
+ elm.remove();
502
497
  }
503
498
  }
504
499
  };
@@ -711,8 +706,7 @@ const patch = (oldVNode, newVNode) => {
711
706
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
712
707
  const oldChildren = oldVNode.$children$;
713
708
  const newChildren = newVNode.$children$;
714
- const text = newVNode.$text$;
715
- if (text === null) {
709
+ {
716
710
  {
717
711
  {
718
712
  // either this is the first render of an element OR it's an update
@@ -727,11 +721,6 @@ const patch = (oldVNode, newVNode) => {
727
721
  updateChildren(elm, oldChildren, newVNode, newChildren);
728
722
  }
729
723
  else if (newChildren !== null) {
730
- // no old child vnodes, but there are new child vnodes to add
731
- if (oldVNode.$text$ !== null) {
732
- // the old vnode was text, so be sure to clear it out
733
- elm.textContent = '';
734
- }
735
724
  // add the new vnode children
736
725
  addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
737
726
  }
@@ -740,11 +729,6 @@ const patch = (oldVNode, newVNode) => {
740
729
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
741
730
  }
742
731
  }
743
- else if (oldVNode.$text$ !== text) {
744
- // update the text content for the text only vnode
745
- // and also only if the text is different than before
746
- elm.data = text;
747
- }
748
732
  };
749
733
  /**
750
734
  * The main entry point for Stencil's virtual DOM-based rendering engine
@@ -760,14 +744,9 @@ const patch = (oldVNode, newVNode) => {
760
744
  */
761
745
  const renderVdom = (hostRef, renderFnResults) => {
762
746
  const hostElm = hostRef.$hostElement$;
763
- const cmpMeta = hostRef.$cmpMeta$;
764
747
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
765
748
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
766
749
  hostTagName = hostElm.tagName;
767
- if (cmpMeta.$attrsToReflect$) {
768
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
769
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
770
- }
771
750
  rootVnode.$tag$ = null;
772
751
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
773
752
  hostRef.$vnode$ = rootVnode;
@@ -798,53 +777,15 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
798
777
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
799
778
  return writeTask(dispatch) ;
800
779
  };
801
- /**
802
- * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
803
- * component lifecycle methods like `componentWillLoad` as well as
804
- * {@link updateComponent}, which will kick off the virtual DOM re-render.
805
- *
806
- * @param hostRef a reference to a host DOM node
807
- * @param isInitialLoad whether we're on the initial load or not
808
- * @returns an empty Promise which is used to enqueue a series of operations for
809
- * the component
810
- */
811
780
  const dispatchHooks = (hostRef, isInitialLoad) => {
812
781
  const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
813
782
  const instance = hostRef.$lazyInstance$ ;
814
- // We're going to use this variable together with `enqueue` to implement a
815
- // little promise-based queue. We start out with it `undefined`. When we add
816
- // the first function to the queue we'll set this variable to be that
817
- // function's return value. When we attempt to add subsequent values to the
818
- // queue we'll check that value and, if it was a `Promise`, we'll then chain
819
- // the new function off of that `Promise` using `.then()`. This will give our
820
- // queue two nice properties:
821
- //
822
- // 1. If all functions added to the queue are synchronous they'll be called
823
- // synchronously right away.
824
- // 2. If all functions added to the queue are asynchronous they'll all be
825
- // called in order after `dispatchHooks` exits.
826
- let maybePromise;
783
+ let promise;
827
784
  endSchedule();
828
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
785
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
829
786
  };
830
- /**
831
- * This function uses a Promise to implement a simple first-in, first-out queue
832
- * of functions to be called.
833
- *
834
- * The queue is ordered on the basis of the first argument. If it's
835
- * `undefined`, then nothing is on the queue yet, so the provided function can
836
- * be called synchronously (although note that this function may return a
837
- * `Promise`). The idea is that then the return value of that enqueueing
838
- * operation is kept around, so that if it was a `Promise` then subsequent
839
- * functions can be enqueued by calling this function again with that `Promise`
840
- * as the first argument.
841
- *
842
- * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
843
- * @param fn a function to enqueue
844
- * @returns either a `Promise` or the return value of the provided function
845
- */
846
- const enqueue = (maybePromise, fn) => maybePromise instanceof Promise ? maybePromise.then(fn) : fn();
847
787
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
788
+ // updateComponent
848
789
  const elm = hostRef.$hostElement$;
849
790
  const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
850
791
  const rc = elm['s-rc'];
@@ -960,6 +901,9 @@ const safeCall = (instance, method, arg) => {
960
901
  }
961
902
  return undefined;
962
903
  };
904
+ const then = (promise, thenFn) => {
905
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
906
+ };
963
907
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
964
908
  ;
965
909
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
@@ -1101,9 +1045,6 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1101
1045
  .map(([propName, m]) => {
1102
1046
  const attrName = m[1] || propName;
1103
1047
  attrNameToPropName.set(attrName, propName);
1104
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1105
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1106
- }
1107
1048
  return attrName;
1108
1049
  });
1109
1050
  }
@@ -1113,9 +1054,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1113
1054
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1114
1055
  // initializeComponent
1115
1056
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1116
- // Let the runtime know that the component has been initialized
1117
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1118
1057
  {
1058
+ // we haven't initialized this element yet
1059
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1119
1060
  // lazy loaded components
1120
1061
  // request the component's implementation to be
1121
1062
  // wired up with the host element
@@ -1269,9 +1210,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1269
1210
  {
1270
1211
  cmpMeta.$members$ = compactMeta[2];
1271
1212
  }
1272
- {
1273
- cmpMeta.$attrsToReflect$ = [];
1274
- }
1275
1213
  {
1276
1214
  cmpMeta.$watchers$ = {};
1277
1215
  }
@@ -1478,4 +1416,4 @@ exports.promiseResolve = promiseResolve;
1478
1416
  exports.registerInstance = registerInstance;
1479
1417
  exports.setNonce = setNonce;
1480
1418
 
1481
- //# sourceMappingURL=index-22d7f5a7.js.map
1419
+ //# sourceMappingURL=index-be0905d2.js.map