carbon-components-angular 5.28.2 → 5.28.4

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 (42) hide show
  1. package/README.md +1 -1
  2. package/docs/documentation/components/ComboBox.html +20 -16
  3. package/docs/documentation/components/DropdownList.html +41 -27
  4. package/docs/documentation/index.html +1 -1
  5. package/docs/documentation/js/search/search_index.js +2 -2
  6. package/docs/documentation/modules/TagModule/dependencies.svg +4 -4
  7. package/docs/documentation/modules/TagModule.html +4 -4
  8. package/docs/documentation/modules/ThemeModule/dependencies.svg +13 -13
  9. package/docs/documentation/modules/ThemeModule.html +13 -13
  10. package/docs/documentation/modules/TilesModule/dependencies.svg +101 -101
  11. package/docs/documentation/modules/TilesModule.html +101 -101
  12. package/docs/documentation/modules/TimePickerModule/dependencies.svg +42 -46
  13. package/docs/documentation/modules/TimePickerModule.html +42 -46
  14. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +41 -45
  15. package/docs/documentation/modules/TimePickerSelectModule.html +41 -45
  16. package/docs/documentation/modules/ToggleModule/dependencies.svg +44 -40
  17. package/docs/documentation/modules/ToggleModule.html +44 -40
  18. package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
  19. package/docs/documentation/modules/TooltipModule.html +4 -4
  20. package/docs/documentation/modules/TreeviewModule/dependencies.svg +28 -28
  21. package/docs/documentation/modules/TreeviewModule.html +28 -28
  22. package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
  23. package/docs/documentation/modules/UIShellModule.html +4 -4
  24. package/docs/documentation.json +19 -19
  25. package/docs/storybook/{3224.a6cd0578.iframe.bundle.js → 3224.2942835b.iframe.bundle.js} +1 -1
  26. package/docs/storybook/{combobox-combobox-stories.92875119.iframe.bundle.js → combobox-combobox-stories.57374785.iframe.bundle.js} +1 -1
  27. package/docs/storybook/iframe.html +2 -2
  28. package/docs/storybook/main.7bcedca9.iframe.bundle.js +1 -0
  29. package/docs/storybook/project.json +1 -1
  30. package/docs/storybook/{runtime~main.65e5750e.iframe.bundle.js → runtime~main.6f9ba53e.iframe.bundle.js} +1 -1
  31. package/esm2020/combobox/combobox.component.mjs +4 -1
  32. package/esm2020/dropdown/list/dropdown-list.component.mjs +22 -10
  33. package/fesm2015/carbon-components-angular-combobox.mjs +3 -0
  34. package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
  35. package/fesm2015/carbon-components-angular-dropdown.mjs +21 -9
  36. package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
  37. package/fesm2020/carbon-components-angular-combobox.mjs +3 -0
  38. package/fesm2020/carbon-components-angular-combobox.mjs.map +1 -1
  39. package/fesm2020/carbon-components-angular-dropdown.mjs +21 -9
  40. package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
  41. package/package.json +1 -1
  42. package/docs/storybook/main.7f1e6078.iframe.bundle.js +0 -1
package/README.md CHANGED
@@ -101,7 +101,7 @@ How to read this table:
101
101
  - **if you are contributing a fix**:
102
102
  - add your fix, update the documentation as needed
103
103
  - consider adding or modifying a test case to cover the fix
104
- - follow the [Angular style guide](https://angular.io/styleguide)
104
+ - follow the [Angular style guide](https://angular.dev/style-guide)
105
105
  - be sure to run `npm test` and `npm run lint` to make sure the tests and linter pass
106
106
  - submit a PR
107
107
 
@@ -1899,8 +1899,8 @@ Multi-select comboboxes also provide &quot;pills&quot; of selected items.</p>
1899
1899
 
1900
1900
  <tr>
1901
1901
  <td class="col-md-4">
1902
- <div class="io-line">Defined in <a href="" data-line="821"
1903
- class="link-to-prism">src/combobox/combobox.component.ts:821</a></div>
1902
+ <div class="io-line">Defined in <a href="" data-line="825"
1903
+ class="link-to-prism">src/combobox/combobox.component.ts:825</a></div>
1904
1904
  </td>
1905
1905
  </tr>
1906
1906
 
@@ -1938,8 +1938,8 @@ Multi-select comboboxes also provide &quot;pills&quot; of selected items.</p>
1938
1938
 
1939
1939
  <tr>
1940
1940
  <td class="col-md-4">
1941
- <div class="io-line">Defined in <a href="" data-line="832"
1942
- class="link-to-prism">src/combobox/combobox.component.ts:832</a></div>
1941
+ <div class="io-line">Defined in <a href="" data-line="836"
1942
+ class="link-to-prism">src/combobox/combobox.component.ts:836</a></div>
1943
1943
  </td>
1944
1944
  </tr>
1945
1945
 
@@ -1977,8 +1977,8 @@ Multi-select comboboxes also provide &quot;pills&quot; of selected items.</p>
1977
1977
 
1978
1978
  <tr>
1979
1979
  <td class="col-md-4">
1980
- <div class="io-line">Defined in <a href="" data-line="801"
1981
- class="link-to-prism">src/combobox/combobox.component.ts:801</a></div>
1980
+ <div class="io-line">Defined in <a href="" data-line="805"
1981
+ class="link-to-prism">src/combobox/combobox.component.ts:805</a></div>
1982
1982
  </td>
1983
1983
  </tr>
1984
1984
 
@@ -2083,8 +2083,8 @@ Multi-select comboboxes also provide &quot;pills&quot; of selected items.</p>
2083
2083
 
2084
2084
  <tr>
2085
2085
  <td class="col-md-4">
2086
- <div class="io-line">Defined in <a href="" data-line="861"
2087
- class="link-to-prism">src/combobox/combobox.component.ts:861</a></div>
2086
+ <div class="io-line">Defined in <a href="" data-line="865"
2087
+ class="link-to-prism">src/combobox/combobox.component.ts:865</a></div>
2088
2088
  </td>
2089
2089
  </tr>
2090
2090
 
@@ -2148,8 +2148,8 @@ Multi-select comboboxes also provide &quot;pills&quot; of selected items.</p>
2148
2148
 
2149
2149
  <tr>
2150
2150
  <td class="col-md-4">
2151
- <div class="io-line">Defined in <a href="" data-line="841"
2152
- class="link-to-prism">src/combobox/combobox.component.ts:841</a></div>
2151
+ <div class="io-line">Defined in <a href="" data-line="845"
2152
+ class="link-to-prism">src/combobox/combobox.component.ts:845</a></div>
2153
2153
  </td>
2154
2154
  </tr>
2155
2155
 
@@ -2190,8 +2190,8 @@ This can be overridden by passing in a value to the <code>dropUp</code> input.</
2190
2190
 
2191
2191
  <tr>
2192
2192
  <td class="col-md-4">
2193
- <div class="io-line">Defined in <a href="" data-line="882"
2194
- class="link-to-prism">src/combobox/combobox.component.ts:882</a></div>
2193
+ <div class="io-line">Defined in <a href="" data-line="886"
2194
+ class="link-to-prism">src/combobox/combobox.component.ts:886</a></div>
2195
2195
  </td>
2196
2196
  </tr>
2197
2197
 
@@ -2476,8 +2476,8 @@ This can be overridden by passing in a value to the <code>dropUp</code> input.</
2476
2476
 
2477
2477
  <tr>
2478
2478
  <td class="col-md-4">
2479
- <div class="io-line">Defined in <a href="" data-line="794"
2480
- class="link-to-prism">src/combobox/combobox.component.ts:794</a></div>
2479
+ <div class="io-line">Defined in <a href="" data-line="798"
2480
+ class="link-to-prism">src/combobox/combobox.component.ts:798</a></div>
2481
2481
  </td>
2482
2482
  </tr>
2483
2483
 
@@ -3242,8 +3242,8 @@ Updates pills if necessary.</p>
3242
3242
 
3243
3243
  <tr>
3244
3244
  <td class="col-md-4">
3245
- <div class="io-line">Defined in <a href="" data-line="870"
3246
- class="link-to-prism">src/combobox/combobox.component.ts:870</a></div>
3245
+ <div class="io-line">Defined in <a href="" data-line="874"
3246
+ class="link-to-prism">src/combobox/combobox.component.ts:874</a></div>
3247
3247
  </td>
3248
3248
  </tr>
3249
3249
 
@@ -5352,6 +5352,10 @@ export class ComboBox implements OnChanges, AfterViewInit, AfterContentInit, OnD
5352
5352
  clearInput(event) {
5353
5353
  event.stopPropagation();
5354
5354
  event.preventDefault();
5355
+
5356
+ if (this.disabled) {
5357
+ return;
5358
+ }
5355
5359
 
5356
5360
  if (this.type &#x3D;&#x3D;&#x3D; &quot;single&quot;) { // don&#x27;t want to clear selected or close if multi
5357
5361
  this.clearSelected(event);
@@ -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 {
@@ -280,7 +280,7 @@ $ npm i --save carbon-components-angular &#64;carbon/styles</code></pre></div><p
280
280
  <li>consider adding or modifying a test case to cover the fix</li>
281
281
  </ul>
282
282
  </li>
283
- <li>follow the <a href="https://angular.io/styleguide">Angular style guide</a></li>
283
+ <li>follow the <a href="https://angular.dev/style-guide">Angular style guide</a></li>
284
284
  <li>be sure to run <code>npm test</code> and <code>npm run lint</code> to make sure the tests and linter pass</li>
285
285
  <li>submit a PR</li>
286
286
  </ul>