carbon-components-angular 5.47.1 → 5.48.0

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 (99) hide show
  1. package/dialog/dialog.directive.d.ts +9 -1
  2. package/docs/documentation/classes/NumberChange.html +34 -0
  3. package/docs/documentation/components/NumberComponent.html +48 -14
  4. package/docs/documentation/components/PaginationNav.html +262 -33
  5. package/docs/documentation/components/ProgressIndicator.html +2 -2
  6. package/docs/documentation/components/Toggletip.html +104 -68
  7. package/docs/documentation/coverage.html +12 -12
  8. package/docs/documentation/directives/DialogDirective.html +134 -84
  9. package/docs/documentation/directives/OverflowMenuDirective.html +73 -30
  10. package/docs/documentation/interfaces/PaginationNavTranslations.html +20 -2
  11. package/docs/documentation/js/search/search_index.js +2 -2
  12. package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
  13. package/docs/documentation/modules/ComboBoxModule.html +4 -4
  14. package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +34 -38
  15. package/docs/documentation/modules/DatePickerInputModule.html +34 -38
  16. package/docs/documentation/modules/DatePickerModule/dependencies.svg +52 -56
  17. package/docs/documentation/modules/DatePickerModule.html +52 -56
  18. package/docs/documentation/modules/FileUploaderModule/dependencies.svg +35 -35
  19. package/docs/documentation/modules/FileUploaderModule.html +35 -35
  20. package/docs/documentation/modules/InlineLoadingModule/dependencies.svg +4 -4
  21. package/docs/documentation/modules/InlineLoadingModule.html +4 -4
  22. package/docs/documentation/modules/ProgressBarModule/dependencies.svg +4 -4
  23. package/docs/documentation/modules/ProgressBarModule.html +4 -4
  24. package/docs/documentation/modules/RadioModule/dependencies.svg +35 -35
  25. package/docs/documentation/modules/RadioModule.html +35 -35
  26. package/docs/documentation/modules/SearchModule/dependencies.svg +4 -4
  27. package/docs/documentation/modules/SearchModule.html +4 -4
  28. package/docs/documentation/modules/SelectModule/dependencies.svg +60 -60
  29. package/docs/documentation/modules/SelectModule.html +60 -60
  30. package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
  31. package/docs/documentation/modules/SliderModule.html +4 -4
  32. package/docs/documentation/modules/TableModule/dependencies.svg +4 -4
  33. package/docs/documentation/modules/TableModule.html +4 -4
  34. package/docs/documentation/modules/TabsModule/dependencies.svg +68 -68
  35. package/docs/documentation/modules/TabsModule.html +68 -68
  36. package/docs/documentation/modules/TagModule/dependencies.svg +4 -4
  37. package/docs/documentation/modules/TagModule.html +4 -4
  38. package/docs/documentation/modules/ThemeModule/dependencies.svg +4 -4
  39. package/docs/documentation/modules/ThemeModule.html +4 -4
  40. package/docs/documentation/modules/TilesModule/dependencies.svg +86 -86
  41. package/docs/documentation/modules/TilesModule.html +86 -86
  42. package/docs/documentation/modules/TimePickerModule/dependencies.svg +41 -37
  43. package/docs/documentation/modules/TimePickerModule.html +41 -37
  44. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +40 -44
  45. package/docs/documentation/modules/TimePickerSelectModule.html +40 -44
  46. package/docs/documentation/modules/ToggleModule/dependencies.svg +4 -4
  47. package/docs/documentation/modules/ToggleModule.html +4 -4
  48. package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
  49. package/docs/documentation/modules/ToggletipModule.html +4 -4
  50. package/docs/documentation/modules/TooltipModule/dependencies.svg +29 -29
  51. package/docs/documentation/modules/TooltipModule.html +29 -29
  52. package/docs/documentation/modules/TreeviewModule/dependencies.svg +36 -36
  53. package/docs/documentation/modules/TreeviewModule.html +36 -36
  54. package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
  55. package/docs/documentation/modules/UIShellModule.html +4 -4
  56. package/docs/documentation.json +245 -172
  57. package/docs/storybook/7773.b5e74332.iframe.bundle.js +1 -0
  58. package/docs/storybook/{8341.2bf88948.iframe.bundle.js → 8341.d095fdee.iframe.bundle.js} +1 -1
  59. package/docs/storybook/{dialog-overflow-menu-overflow-menu-stories.a7b8273a.iframe.bundle.js → dialog-overflow-menu-overflow-menu-stories.cd56a223.iframe.bundle.js} +1 -1
  60. package/docs/storybook/iframe.html +2 -2
  61. package/docs/storybook/main.css +3007 -2790
  62. package/docs/storybook/main.e6ee5d76.iframe.bundle.js +1 -0
  63. package/docs/storybook/{number-input-number-stories.6aba5a3d.iframe.bundle.js → number-input-number-stories.8d02c22f.iframe.bundle.js} +1 -1
  64. package/docs/storybook/pagination-pagination-nav-stories.7b305bf2.iframe.bundle.js +1 -0
  65. package/docs/storybook/project.json +1 -1
  66. package/docs/storybook/{runtime~main.724b23c2.iframe.bundle.js → runtime~main.90978505.iframe.bundle.js} +1 -1
  67. package/docs/storybook/{toggletip-toggletip-stories.93f48d46.iframe.bundle.js → toggletip-toggletip-stories.c3354041.iframe.bundle.js} +1 -1
  68. package/esm2020/dialog/dialog.directive.mjs +19 -15
  69. package/esm2020/number-input/number.component.mjs +31 -1
  70. package/esm2020/pagination/pagination-nav/pagination-nav.component.mjs +32 -5
  71. package/esm2020/progress-indicator/progress-indicator.component.mjs +2 -2
  72. package/esm2020/toggletip/toggletip.component.mjs +5 -2
  73. package/fesm2015/carbon-components-angular-dialog.mjs +18 -15
  74. package/fesm2015/carbon-components-angular-dialog.mjs.map +1 -1
  75. package/fesm2015/carbon-components-angular-number-input.mjs +30 -0
  76. package/fesm2015/carbon-components-angular-number-input.mjs.map +1 -1
  77. package/fesm2015/carbon-components-angular-pagination.mjs +31 -4
  78. package/fesm2015/carbon-components-angular-pagination.mjs.map +1 -1
  79. package/fesm2015/carbon-components-angular-progress-indicator.mjs +1 -1
  80. package/fesm2015/carbon-components-angular-progress-indicator.mjs.map +1 -1
  81. package/fesm2015/carbon-components-angular-toggletip.mjs +4 -1
  82. package/fesm2015/carbon-components-angular-toggletip.mjs.map +1 -1
  83. package/fesm2020/carbon-components-angular-dialog.mjs +18 -15
  84. package/fesm2020/carbon-components-angular-dialog.mjs.map +1 -1
  85. package/fesm2020/carbon-components-angular-number-input.mjs +30 -0
  86. package/fesm2020/carbon-components-angular-number-input.mjs.map +1 -1
  87. package/fesm2020/carbon-components-angular-pagination.mjs +31 -4
  88. package/fesm2020/carbon-components-angular-pagination.mjs.map +1 -1
  89. package/fesm2020/carbon-components-angular-progress-indicator.mjs +1 -1
  90. package/fesm2020/carbon-components-angular-progress-indicator.mjs.map +1 -1
  91. package/fesm2020/carbon-components-angular-toggletip.mjs +4 -1
  92. package/fesm2020/carbon-components-angular-toggletip.mjs.map +1 -1
  93. package/package.json +1 -1
  94. package/pagination/pagination-nav/pagination-nav.component.d.ts +8 -1
  95. package/progress-indicator/progress-indicator.component.d.ts +1 -1
  96. package/toggletip/toggletip.component.d.ts +4 -2
  97. package/docs/storybook/7773.cac12c93.iframe.bundle.js +0 -1
  98. package/docs/storybook/main.76a5a273.iframe.bundle.js +0 -1
  99. package/docs/storybook/pagination-pagination-nav-stories.ace8938b.iframe.bundle.js +0 -1
@@ -37,6 +37,9 @@ export declare class DialogDirective implements OnInit, OnDestroy, OnChanges {
37
37
  protected elementRef: ElementRef;
38
38
  protected viewContainerRef: ViewContainerRef;
39
39
  protected dialogService: DialogService;
40
+ /**
41
+ * Deprecated as of v5
42
+ */
40
43
  protected eventService: EventService;
41
44
  static dialogCounter: number;
42
45
  /**
@@ -122,6 +125,7 @@ export declare class DialogDirective implements OnInit, OnDestroy, OnChanges {
122
125
  * Keeps a reference to the currently opened dialog
123
126
  */
124
127
  protected dialogRef: ComponentRef<Dialog>;
128
+ private subscriptions;
125
129
  /**
126
130
  * Creates an instance of DialogDirective.
127
131
  * @param elementRef
@@ -129,7 +133,11 @@ export declare class DialogDirective implements OnInit, OnDestroy, OnChanges {
129
133
  * @param dialogService
130
134
  * @param eventService
131
135
  */
132
- constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef, dialogService: DialogService, eventService: EventService);
136
+ constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef, dialogService: DialogService,
137
+ /**
138
+ * Deprecated as of v5
139
+ */
140
+ eventService: EventService);
133
141
  ngOnChanges(changes: SimpleChanges): void;
134
142
  /**
135
143
  * Sets the config object and binds events for hovering or clicking before
@@ -601,6 +601,23 @@ export class NumberComponent implements ControlValueAccessor {
601
601
  * Adds &#x60;step&#x60; to the current &#x60;value&#x60;.
602
602
  */
603
603
  onIncrement(): void {
604
+ // if max is set and value + step is greater than max, set value to max
605
+ // example: max &#x3D; 100, step &#x3D; 10, value &#x3D; 95 , value + step &#x3D; 105, value will be set to 100 (max) instead of 105
606
+ if (this.max !&#x3D;&#x3D; null &amp;&amp; this.value + this.step &gt; this.max) {
607
+ this.value &#x3D; this.max;
608
+ this.emitChangeEvent();
609
+ return;
610
+ }
611
+
612
+ // if min is set and value + step is less than min, set value to min
613
+ // example: min &#x3D; 5, step &#x3D; 2, value &#x3D; 0, value + step &#x3D; 2, value will be set to 5 (min) instead of 2
614
+ if (this.min !&#x3D;&#x3D; null &amp;&amp; this.value + this.step &lt; this.min) {
615
+ this.value &#x3D; this.min;
616
+ this.emitChangeEvent();
617
+ return;
618
+ }
619
+
620
+ // if max is not set or value + step is less than max, increment value by step
604
621
  if (this.max &#x3D;&#x3D;&#x3D; null || this.value + this.step &lt;&#x3D; this.max) {
605
622
  this.value +&#x3D; this.step;
606
623
  this.value &#x3D; parseFloat(this.value.toPrecision(this.precision));
@@ -612,6 +629,23 @@ export class NumberComponent implements ControlValueAccessor {
612
629
  * Subtracts &#x60;step&#x60; to the current &#x60;value&#x60;.
613
630
  */
614
631
  onDecrement(): void {
632
+ // if max is set and value - step is greater than max, set value to max
633
+ // example: max &#x3D; 15, step &#x3D; 2, value &#x3D; 20, value - step &#x3D; 18, value will be set to 15 (max) instead of 18
634
+ if (this.max !&#x3D;&#x3D; null &amp;&amp; this.value - this.step &gt; this.max) {
635
+ this.value &#x3D; this.max;
636
+ this.emitChangeEvent();
637
+ return;
638
+ }
639
+
640
+ // if min is set and value - step is less than min, set value to min
641
+ // example: min &#x3D; 5, step &#x3D; 2, value &#x3D; 6, value - step &#x3D; 4, value will be set to 5 (min) instead of 4
642
+ if (this.min !&#x3D;&#x3D; null &amp;&amp; this.value - this.step &lt; this.min) {
643
+ this.value &#x3D; this.min;
644
+ this.emitChangeEvent();
645
+ return;
646
+ }
647
+
648
+ // if min is not set or value - step is greater than min, decrement value by step
615
649
  if (this.min &#x3D;&#x3D;&#x3D; null || this.value - this.step &gt;&#x3D; this.min) {
616
650
  this.value -&#x3D; this.step;
617
651
  this.value &#x3D; parseFloat(this.value.toPrecision(this.precision));
@@ -1504,8 +1504,8 @@
1504
1504
 
1505
1505
  <tr>
1506
1506
  <td class="col-md-4">
1507
- <div class="io-line">Defined in <a href="" data-line="384"
1508
- class="link-to-prism">src/number-input/number.component.ts:384</a></div>
1507
+ <div class="io-line">Defined in <a href="" data-line="418"
1508
+ class="link-to-prism">src/number-input/number.component.ts:418</a></div>
1509
1509
  </td>
1510
1510
  </tr>
1511
1511
 
@@ -1589,8 +1589,8 @@
1589
1589
 
1590
1590
  <tr>
1591
1591
  <td class="col-md-4">
1592
- <div class="io-line">Defined in <a href="" data-line="373"
1593
- class="link-to-prism">src/number-input/number.component.ts:373</a></div>
1592
+ <div class="io-line">Defined in <a href="" data-line="407"
1593
+ class="link-to-prism">src/number-input/number.component.ts:407</a></div>
1594
1594
  </td>
1595
1595
  </tr>
1596
1596
 
@@ -1626,8 +1626,8 @@
1626
1626
 
1627
1627
  <tr>
1628
1628
  <td class="col-md-4">
1629
- <div class="io-line">Defined in <a href="" data-line="377"
1630
- class="link-to-prism">src/number-input/number.component.ts:377</a></div>
1629
+ <div class="io-line">Defined in <a href="" data-line="411"
1630
+ class="link-to-prism">src/number-input/number.component.ts:411</a></div>
1631
1631
  </td>
1632
1632
  </tr>
1633
1633
 
@@ -1663,8 +1663,8 @@
1663
1663
 
1664
1664
  <tr>
1665
1665
  <td class="col-md-4">
1666
- <div class="io-line">Defined in <a href="" data-line="401"
1667
- class="link-to-prism">src/number-input/number.component.ts:401</a></div>
1666
+ <div class="io-line">Defined in <a href="" data-line="435"
1667
+ class="link-to-prism">src/number-input/number.component.ts:435</a></div>
1668
1668
  </td>
1669
1669
  </tr>
1670
1670
 
@@ -1732,8 +1732,8 @@
1732
1732
 
1733
1733
  <tr>
1734
1734
  <td class="col-md-4">
1735
- <div class="io-line">Defined in <a href="" data-line="397"
1736
- class="link-to-prism">src/number-input/number.component.ts:397</a></div>
1735
+ <div class="io-line">Defined in <a href="" data-line="431"
1736
+ class="link-to-prism">src/number-input/number.component.ts:431</a></div>
1737
1737
  </td>
1738
1738
  </tr>
1739
1739
 
@@ -1795,8 +1795,8 @@
1795
1795
 
1796
1796
  <tr>
1797
1797
  <td class="col-md-4">
1798
- <div class="io-line">Defined in <a href="" data-line="365"
1799
- class="link-to-prism">src/number-input/number.component.ts:365</a></div>
1798
+ <div class="io-line">Defined in <a href="" data-line="382"
1799
+ class="link-to-prism">src/number-input/number.component.ts:382</a></div>
1800
1800
  </td>
1801
1801
  </tr>
1802
1802
 
@@ -1873,8 +1873,8 @@
1873
1873
 
1874
1874
  <tr>
1875
1875
  <td class="col-md-4">
1876
- <div class="io-line">Defined in <a href="" data-line="392"
1877
- class="link-to-prism">src/number-input/number.component.ts:392</a></div>
1876
+ <div class="io-line">Defined in <a href="" data-line="426"
1877
+ class="link-to-prism">src/number-input/number.component.ts:426</a></div>
1878
1878
  </td>
1879
1879
  </tr>
1880
1880
 
@@ -3139,6 +3139,23 @@ export class NumberComponent implements ControlValueAccessor {
3139
3139
  * Adds &#x60;step&#x60; to the current &#x60;value&#x60;.
3140
3140
  */
3141
3141
  onIncrement(): void {
3142
+ // if max is set and value + step is greater than max, set value to max
3143
+ // example: max &#x3D; 100, step &#x3D; 10, value &#x3D; 95 , value + step &#x3D; 105, value will be set to 100 (max) instead of 105
3144
+ if (this.max !&#x3D;&#x3D; null &amp;&amp; this.value + this.step &gt; this.max) {
3145
+ this.value &#x3D; this.max;
3146
+ this.emitChangeEvent();
3147
+ return;
3148
+ }
3149
+
3150
+ // if min is set and value + step is less than min, set value to min
3151
+ // example: min &#x3D; 5, step &#x3D; 2, value &#x3D; 0, value + step &#x3D; 2, value will be set to 5 (min) instead of 2
3152
+ if (this.min !&#x3D;&#x3D; null &amp;&amp; this.value + this.step &lt; this.min) {
3153
+ this.value &#x3D; this.min;
3154
+ this.emitChangeEvent();
3155
+ return;
3156
+ }
3157
+
3158
+ // if max is not set or value + step is less than max, increment value by step
3142
3159
  if (this.max &#x3D;&#x3D;&#x3D; null || this.value + this.step &lt;&#x3D; this.max) {
3143
3160
  this.value +&#x3D; this.step;
3144
3161
  this.value &#x3D; parseFloat(this.value.toPrecision(this.precision));
@@ -3150,6 +3167,23 @@ export class NumberComponent implements ControlValueAccessor {
3150
3167
  * Subtracts &#x60;step&#x60; to the current &#x60;value&#x60;.
3151
3168
  */
3152
3169
  onDecrement(): void {
3170
+ // if max is set and value - step is greater than max, set value to max
3171
+ // example: max &#x3D; 15, step &#x3D; 2, value &#x3D; 20, value - step &#x3D; 18, value will be set to 15 (max) instead of 18
3172
+ if (this.max !&#x3D;&#x3D; null &amp;&amp; this.value - this.step &gt; this.max) {
3173
+ this.value &#x3D; this.max;
3174
+ this.emitChangeEvent();
3175
+ return;
3176
+ }
3177
+
3178
+ // if min is set and value - step is less than min, set value to min
3179
+ // example: min &#x3D; 5, step &#x3D; 2, value &#x3D; 6, value - step &#x3D; 4, value will be set to 5 (min) instead of 4
3180
+ if (this.min !&#x3D;&#x3D; null &amp;&amp; this.value - this.step &lt; this.min) {
3181
+ this.value &#x3D; this.min;
3182
+ this.emitChangeEvent();
3183
+ return;
3184
+ }
3185
+
3186
+ // if min is not set or value - step is greater than min, decrement value by step
3153
3187
  if (this.min &#x3D;&#x3D;&#x3D; null || this.value - this.step &gt;&#x3D; this.min) {
3154
3188
  this.value -&#x3D; this.step;
3155
3189
  this.value &#x3D; parseFloat(this.value.toPrecision(this.precision));