@siemens/ix-icons 1.1.1 → 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 +10 -31
  14. package/dist/collection/components/icon/icon.js.map +1 -1
  15. package/dist/collection/components/icon/resolveIcon.js +28 -17
  16. package/dist/collection/components/icon/resolveIcon.js.map +1 -1
  17. package/dist/components/icon.js +39 -26
  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 +11 -7
  79. package/dist/types/components/icon/resolveIcon.d.ts +2 -1
  80. package/dist/types/components.d.ts +2 -6
  81. package/dist/types/stencil-public-runtime.d.ts +0 -1
  82. package/icons/index.d.ts +35 -1
  83. package/icons/index.js +36 -2
  84. package/icons/index.mjs +36 -2
  85. package/icons/package.json +1 -1
  86. package/package.json +6 -6
  87. package/dist/cjs/icon-e8935d69.js +0 -109
  88. package/dist/cjs/icon-e8935d69.js.map +0 -1
  89. package/dist/cjs/index-22d7f5a7.js.map +0 -1
  90. package/dist/esm/icon-e3678129.js +0 -107
  91. package/dist/esm/icon-e3678129.js.map +0 -1
  92. package/dist/esm/index-460e19e2.js.map +0 -1
  93. package/dist/ix-icons/p-625c25c8.js +0 -3
  94. package/dist/ix-icons/p-625c25c8.js.map +0 -1
  95. package/dist/ix-icons/p-7d9639f8.js +0 -2
  96. package/dist/ix-icons/p-7d9639f8.js.map +0 -1
  97. package/dist/ix-icons/p-a465725f.entry.js +0 -2
  98. /package/dist/ix-icons/{p-a465725f.entry.js.map → p-952e642e.entry.js.map} +0 -0
@@ -396,11 +396,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
396
396
  let i = 0;
397
397
  let elm;
398
398
  let childNode;
399
- if (newVNode.$text$ !== null) {
400
- // create text node
401
- elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
402
- }
403
- else {
399
+ {
404
400
  // create element
405
401
  elm = newVNode.$elm$ = (doc.createElement(newVNode.$tag$));
406
402
  // add css classes, attrs, props, listeners, etc.
@@ -467,16 +463,15 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
467
463
  * @param vnodes a list of virtual DOM nodes to remove
468
464
  * @param startIdx the index at which to start removing nodes (inclusive)
469
465
  * @param endIdx the index at which to stop removing nodes (inclusive)
466
+ * @param vnode a VNode
467
+ * @param elm an element
470
468
  */
471
- const removeVnodes = (vnodes, startIdx, endIdx) => {
472
- for (let index = startIdx; index <= endIdx; ++index) {
473
- const vnode = vnodes[index];
474
- if (vnode) {
475
- const elm = vnode.$elm$;
476
- if (elm) {
477
- // remove the vnode's element from the dom
478
- elm.remove();
479
- }
469
+ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
470
+ for (; startIdx <= endIdx; ++startIdx) {
471
+ if ((vnode = vnodes[startIdx])) {
472
+ elm = vnode.$elm$;
473
+ // remove the vnode's element from the dom
474
+ elm.remove();
480
475
  }
481
476
  }
482
477
  };
@@ -689,8 +684,7 @@ const patch = (oldVNode, newVNode) => {
689
684
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
690
685
  const oldChildren = oldVNode.$children$;
691
686
  const newChildren = newVNode.$children$;
692
- const text = newVNode.$text$;
693
- if (text === null) {
687
+ {
694
688
  {
695
689
  {
696
690
  // either this is the first render of an element OR it's an update
@@ -705,11 +699,6 @@ const patch = (oldVNode, newVNode) => {
705
699
  updateChildren(elm, oldChildren, newVNode, newChildren);
706
700
  }
707
701
  else if (newChildren !== null) {
708
- // no old child vnodes, but there are new child vnodes to add
709
- if (oldVNode.$text$ !== null) {
710
- // the old vnode was text, so be sure to clear it out
711
- elm.textContent = '';
712
- }
713
702
  // add the new vnode children
714
703
  addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
715
704
  }
@@ -718,11 +707,6 @@ const patch = (oldVNode, newVNode) => {
718
707
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
719
708
  }
720
709
  }
721
- else if (oldVNode.$text$ !== text) {
722
- // update the text content for the text only vnode
723
- // and also only if the text is different than before
724
- elm.data = text;
725
- }
726
710
  };
727
711
  /**
728
712
  * The main entry point for Stencil's virtual DOM-based rendering engine
@@ -738,14 +722,9 @@ const patch = (oldVNode, newVNode) => {
738
722
  */
739
723
  const renderVdom = (hostRef, renderFnResults) => {
740
724
  const hostElm = hostRef.$hostElement$;
741
- const cmpMeta = hostRef.$cmpMeta$;
742
725
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
743
726
  const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
744
727
  hostTagName = hostElm.tagName;
745
- if (cmpMeta.$attrsToReflect$) {
746
- rootVnode.$attrs$ = rootVnode.$attrs$ || {};
747
- cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
748
- }
749
728
  rootVnode.$tag$ = null;
750
729
  rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
751
730
  hostRef.$vnode$ = rootVnode;
@@ -776,53 +755,15 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
776
755
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
777
756
  return writeTask(dispatch) ;
778
757
  };
779
- /**
780
- * Dispatch initial-render and update lifecycle hooks, enqueuing calls to
781
- * component lifecycle methods like `componentWillLoad` as well as
782
- * {@link updateComponent}, which will kick off the virtual DOM re-render.
783
- *
784
- * @param hostRef a reference to a host DOM node
785
- * @param isInitialLoad whether we're on the initial load or not
786
- * @returns an empty Promise which is used to enqueue a series of operations for
787
- * the component
788
- */
789
758
  const dispatchHooks = (hostRef, isInitialLoad) => {
790
759
  const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
791
760
  const instance = hostRef.$lazyInstance$ ;
792
- // We're going to use this variable together with `enqueue` to implement a
793
- // little promise-based queue. We start out with it `undefined`. When we add
794
- // the first function to the queue we'll set this variable to be that
795
- // function's return value. When we attempt to add subsequent values to the
796
- // queue we'll check that value and, if it was a `Promise`, we'll then chain
797
- // the new function off of that `Promise` using `.then()`. This will give our
798
- // queue two nice properties:
799
- //
800
- // 1. If all functions added to the queue are synchronous they'll be called
801
- // synchronously right away.
802
- // 2. If all functions added to the queue are asynchronous they'll all be
803
- // called in order after `dispatchHooks` exits.
804
- let maybePromise;
761
+ let promise;
805
762
  endSchedule();
806
- return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
763
+ return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
807
764
  };
808
- /**
809
- * This function uses a Promise to implement a simple first-in, first-out queue
810
- * of functions to be called.
811
- *
812
- * The queue is ordered on the basis of the first argument. If it's
813
- * `undefined`, then nothing is on the queue yet, so the provided function can
814
- * be called synchronously (although note that this function may return a
815
- * `Promise`). The idea is that then the return value of that enqueueing
816
- * operation is kept around, so that if it was a `Promise` then subsequent
817
- * functions can be enqueued by calling this function again with that `Promise`
818
- * as the first argument.
819
- *
820
- * @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
821
- * @param fn a function to enqueue
822
- * @returns either a `Promise` or the return value of the provided function
823
- */
824
- const enqueue = (maybePromise, fn) => maybePromise instanceof Promise ? maybePromise.then(fn) : fn();
825
765
  const updateComponent = async (hostRef, instance, isInitialLoad) => {
766
+ // updateComponent
826
767
  const elm = hostRef.$hostElement$;
827
768
  const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
828
769
  const rc = elm['s-rc'];
@@ -938,6 +879,9 @@ const safeCall = (instance, method, arg) => {
938
879
  }
939
880
  return undefined;
940
881
  };
882
+ const then = (promise, thenFn) => {
883
+ return promise && promise.then ? promise.then(thenFn) : thenFn();
884
+ };
941
885
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
942
886
  ;
943
887
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
@@ -1079,9 +1023,6 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1079
1023
  .map(([propName, m]) => {
1080
1024
  const attrName = m[1] || propName;
1081
1025
  attrNameToPropName.set(attrName, propName);
1082
- if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
1083
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
1084
- }
1085
1026
  return attrName;
1086
1027
  });
1087
1028
  }
@@ -1091,9 +1032,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1091
1032
  const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
1092
1033
  // initializeComponent
1093
1034
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
1094
- // Let the runtime know that the component has been initialized
1095
- hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1096
1035
  {
1036
+ // we haven't initialized this element yet
1037
+ hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
1097
1038
  // lazy loaded components
1098
1039
  // request the component's implementation to be
1099
1040
  // wired up with the host element
@@ -1247,9 +1188,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1247
1188
  {
1248
1189
  cmpMeta.$members$ = compactMeta[2];
1249
1190
  }
1250
- {
1251
- cmpMeta.$attrsToReflect$ = [];
1252
- }
1253
1191
  {
1254
1192
  cmpMeta.$watchers$ = {};
1255
1193
  }
@@ -1451,4 +1389,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1451
1389
 
1452
1390
  export { Host as H, bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
1453
1391
 
1454
- //# sourceMappingURL=index-460e19e2.js.map
1392
+ //# sourceMappingURL=index-58099fde.js.map