carbon-components-angular 5.28.1 → 5.28.3

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 (36) hide show
  1. package/docs/documentation/components/DropdownList.html +41 -27
  2. package/docs/documentation/components/TreeNodeComponent.html +96 -50
  3. package/docs/documentation/coverage.html +4 -4
  4. package/docs/documentation/interfaces/Node.html +47 -1
  5. package/docs/documentation/js/search/search_index.js +2 -2
  6. package/docs/documentation/modules/ToggleModule/dependencies.svg +4 -4
  7. package/docs/documentation/modules/ToggleModule.html +4 -4
  8. package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
  9. package/docs/documentation/modules/ToggletipModule.html +37 -37
  10. package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
  11. package/docs/documentation/modules/TooltipModule.html +4 -4
  12. package/docs/documentation/modules/TreeviewModule/dependencies.svg +34 -34
  13. package/docs/documentation/modules/TreeviewModule.html +34 -34
  14. package/docs/documentation.json +155 -138
  15. package/docs/storybook/{3224.a6cd0578.iframe.bundle.js → 3224.2942835b.iframe.bundle.js} +1 -1
  16. package/docs/storybook/iframe.html +2 -2
  17. package/docs/storybook/main.01f7c071.iframe.bundle.js +1 -0
  18. package/docs/storybook/project.json +1 -1
  19. package/docs/storybook/{runtime~main.ad02d1c9.iframe.bundle.js → runtime~main.e288ebe6.iframe.bundle.js} +1 -1
  20. package/docs/storybook/{treeview-treeview-stories.0b6b2e75.iframe.bundle.js → treeview-treeview-stories.67d5b54c.iframe.bundle.js} +1 -1
  21. package/esm2020/dropdown/list/dropdown-list.component.mjs +22 -10
  22. package/esm2020/treeview/tree-node.component.mjs +30 -7
  23. package/esm2020/treeview/tree-node.types.mjs +1 -1
  24. package/esm2020/treeview/treeview.component.mjs +1 -1
  25. package/fesm2015/carbon-components-angular-dropdown.mjs +21 -9
  26. package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
  27. package/fesm2015/carbon-components-angular-treeview.mjs +37 -14
  28. package/fesm2015/carbon-components-angular-treeview.mjs.map +1 -1
  29. package/fesm2020/carbon-components-angular-dropdown.mjs +21 -9
  30. package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
  31. package/fesm2020/carbon-components-angular-treeview.mjs +30 -7
  32. package/fesm2020/carbon-components-angular-treeview.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/treeview/tree-node.component.d.ts +2 -1
  35. package/treeview/tree-node.types.d.ts +1 -0
  36. package/docs/storybook/main.498528cf.iframe.bundle.js +0 -1
@@ -836,8 +836,8 @@ ArrowUp -&gt; emit event</p>
836
836
 
837
837
  <tr>
838
838
  <td class="col-md-4">
839
- <div class="io-line">Defined in <a href="" data-line="537"
840
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:537</a></div>
839
+ <div class="io-line">Defined in <a href="" data-line="551"
840
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:551</a></div>
841
841
  </td>
842
842
  </tr>
843
843
 
@@ -977,8 +977,8 @@ ArrowUp -&gt; emit event</p>
977
977
 
978
978
  <tr>
979
979
  <td class="col-md-4">
980
- <div class="io-line">Defined in <a href="" data-line="572"
981
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:572</a></div>
980
+ <div class="io-line">Defined in <a href="" data-line="586"
981
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:586</a></div>
982
982
  </td>
983
983
  </tr>
984
984
 
@@ -1572,8 +1572,8 @@ ArrowUp -&gt; emit event</p>
1572
1572
 
1573
1573
  <tr>
1574
1574
  <td class="col-md-4">
1575
- <div class="io-line">Defined in <a href="" data-line="479"
1576
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:479</a></div>
1575
+ <div class="io-line">Defined in <a href="" data-line="493"
1576
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:493</a></div>
1577
1577
  </td>
1578
1578
  </tr>
1579
1579
 
@@ -1611,8 +1611,8 @@ ArrowUp -&gt; emit event</p>
1611
1611
 
1612
1612
  <tr>
1613
1613
  <td class="col-md-4">
1614
- <div class="io-line">Defined in <a href="" data-line="505"
1615
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:505</a></div>
1614
+ <div class="io-line">Defined in <a href="" data-line="519"
1615
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:519</a></div>
1616
1616
  </td>
1617
1617
  </tr>
1618
1618
 
@@ -1759,8 +1759,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
1759
1759
 
1760
1760
  <tr>
1761
1761
  <td class="col-md-4">
1762
- <div class="io-line">Defined in <a href="" data-line="563"
1763
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:563</a></div>
1762
+ <div class="io-line">Defined in <a href="" data-line="577"
1763
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:577</a></div>
1764
1764
  </td>
1765
1765
  </tr>
1766
1766
 
@@ -1822,8 +1822,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
1822
1822
 
1823
1823
  <tr>
1824
1824
  <td class="col-md-4">
1825
- <div class="io-line">Defined in <a href="" data-line="557"
1826
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:557</a></div>
1825
+ <div class="io-line">Defined in <a href="" data-line="571"
1826
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:571</a></div>
1827
1827
  </td>
1828
1828
  </tr>
1829
1829
 
@@ -1885,8 +1885,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
1885
1885
 
1886
1886
  <tr>
1887
1887
  <td class="col-md-4">
1888
- <div class="io-line">Defined in <a href="" data-line="582"
1889
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:582</a></div>
1888
+ <div class="io-line">Defined in <a href="" data-line="596"
1889
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:596</a></div>
1890
1890
  </td>
1891
1891
  </tr>
1892
1892
 
@@ -2023,8 +2023,8 @@ Additionally, any Observables for the <code>DropdownList</code> are initialized.
2023
2023
 
2024
2024
  <tr>
2025
2025
  <td class="col-md-4">
2026
- <div class="io-line">Defined in <a href="" data-line="587"
2027
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:587</a></div>
2026
+ <div class="io-line">Defined in <a href="" data-line="601"
2027
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:601</a></div>
2028
2028
  </td>
2029
2029
  </tr>
2030
2030
 
@@ -2130,8 +2130,8 @@ key input matching the first letter of the item in the list.</p>
2130
2130
 
2131
2131
  <tr>
2132
2132
  <td class="col-md-4">
2133
- <div class="io-line">Defined in <a href="" data-line="490"
2134
- class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:490</a></div>
2133
+ <div class="io-line">Defined in <a href="" data-line="504"
2134
+ class="link-to-prism">src/dropdown/list/dropdown-list.component.ts:504</a></div>
2135
2135
  </td>
2136
2136
  </tr>
2137
2137
 
@@ -3223,24 +3223,38 @@ export class DropdownList implements AbstractDropdownView, AfterViewInit, OnDest
3223
3223
  console.error(&#x60;${this.constructor.name}.propagateSelected expects an Array&lt;ListItem&gt;, got ${JSON.stringify(value)}&#x60;);
3224
3224
  }
3225
3225
  this.onItemsReady(() &#x3D;&gt; {
3226
+ const selectedNewItems &#x3D; [];
3227
+ for (let newItem of value) {
3228
+ if (newItem &amp;&amp; newItem.selected) {
3229
+ // copy the item
3230
+ let tempNewItem: string | ListItem &#x3D; Object.assign({}, newItem);
3231
+ // deleted selected because it&#x27;s what we _want_ to change
3232
+ delete tempNewItem.selected;
3233
+ // stringify for compare later
3234
+ tempNewItem &#x3D; JSON.stringify(tempNewItem);
3235
+ // add to the list of selected items
3236
+ selectedNewItems.push(tempNewItem);
3237
+ }
3238
+ }
3239
+
3226
3240
  // loop through the list items and update the &#x60;selected&#x60; state for matching items in &#x60;value&#x60;
3227
3241
  for (let oldItem of this.getListItems()) {
3242
+ // fast path when no items are selected
3243
+ if (selectedNewItems.length &#x3D;&#x3D;&#x3D; 0) {
3244
+ oldItem.selected &#x3D; false;
3245
+ continue;
3246
+ }
3247
+
3228
3248
  // copy the item
3229
3249
  let tempOldItem: string | ListItem &#x3D; Object.assign({}, oldItem);
3230
3250
  // deleted selected because it&#x27;s what we _want_ to change
3231
3251
  delete tempOldItem.selected;
3232
3252
  // stringify for compare
3233
3253
  tempOldItem &#x3D; JSON.stringify(tempOldItem);
3234
- for (let newItem of value) {
3235
- // copy the item
3236
- let tempNewItem: string | ListItem &#x3D; Object.assign({}, newItem);
3237
- // deleted selected because it&#x27;s what we _want_ to change
3238
- delete tempNewItem.selected;
3239
- // stringify for compare
3240
- tempNewItem &#x3D; JSON.stringify(tempNewItem);
3254
+ for (let selectedNewItem of selectedNewItems) {
3241
3255
  // do the compare
3242
- if (tempOldItem.includes(tempNewItem)) {
3243
- oldItem.selected &#x3D; newItem.selected;
3256
+ if (tempOldItem.includes(selectedNewItem)) {
3257
+ oldItem.selected &#x3D; true;
3244
3258
  // if we&#x27;ve found a matching item, we can stop looping
3245
3259
  break;
3246
3260
  } else {