@rossigee/clarity-angular 18.2.1-fixed.1 → 18.2.1

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 (180) hide show
  1. package/fesm2022/clr-angular-accordion.mjs +355 -0
  2. package/fesm2022/clr-angular-accordion.mjs.map +1 -0
  3. package/fesm2022/clr-angular-button.mjs +713 -0
  4. package/fesm2022/clr-angular-button.mjs.map +1 -0
  5. package/fesm2022/clr-angular-collapsible-panel.mjs +201 -0
  6. package/fesm2022/clr-angular-collapsible-panel.mjs.map +1 -0
  7. package/fesm2022/clr-angular-data-datagrid.mjs +7635 -0
  8. package/fesm2022/clr-angular-data-datagrid.mjs.map +1 -0
  9. package/fesm2022/clr-angular-data-stack-view.mjs +442 -0
  10. package/fesm2022/clr-angular-data-stack-view.mjs.map +1 -0
  11. package/fesm2022/clr-angular-data-tree-view.mjs +1106 -0
  12. package/fesm2022/clr-angular-data-tree-view.mjs.map +1 -0
  13. package/fesm2022/clr-angular-data.mjs +40 -0
  14. package/fesm2022/clr-angular-data.mjs.map +1 -0
  15. package/fesm2022/clr-angular-emphasis-alert.mjs +624 -0
  16. package/fesm2022/clr-angular-emphasis-alert.mjs.map +1 -0
  17. package/fesm2022/clr-angular-emphasis-badge.mjs +69 -0
  18. package/fesm2022/clr-angular-emphasis-badge.mjs.map +1 -0
  19. package/fesm2022/clr-angular-emphasis-common.mjs +25 -0
  20. package/fesm2022/clr-angular-emphasis-common.mjs.map +1 -0
  21. package/fesm2022/clr-angular-emphasis-label.mjs +105 -0
  22. package/fesm2022/clr-angular-emphasis-label.mjs.map +1 -0
  23. package/fesm2022/clr-angular-emphasis.mjs +41 -0
  24. package/fesm2022/clr-angular-emphasis.mjs.map +1 -0
  25. package/fesm2022/clr-angular-forms-checkbox.mjs +270 -0
  26. package/fesm2022/clr-angular-forms-checkbox.mjs.map +1 -0
  27. package/fesm2022/clr-angular-forms-combobox.mjs +1775 -0
  28. package/fesm2022/clr-angular-forms-combobox.mjs.map +1 -0
  29. package/fesm2022/clr-angular-forms-common.mjs +1251 -0
  30. package/fesm2022/clr-angular-forms-common.mjs.map +1 -0
  31. package/fesm2022/clr-angular-forms-datalist.mjs +263 -0
  32. package/fesm2022/clr-angular-forms-datalist.mjs.map +1 -0
  33. package/fesm2022/clr-angular-forms-datepicker.mjs +3274 -0
  34. package/fesm2022/clr-angular-forms-datepicker.mjs.map +1 -0
  35. package/fesm2022/clr-angular-forms-file-input.mjs +826 -0
  36. package/fesm2022/clr-angular-forms-file-input.mjs.map +1 -0
  37. package/fesm2022/clr-angular-forms-input.mjs +153 -0
  38. package/fesm2022/clr-angular-forms-input.mjs.map +1 -0
  39. package/fesm2022/clr-angular-forms-number-input.mjs +236 -0
  40. package/fesm2022/clr-angular-forms-number-input.mjs.map +1 -0
  41. package/fesm2022/clr-angular-forms-password.mjs +233 -0
  42. package/fesm2022/clr-angular-forms-password.mjs.map +1 -0
  43. package/fesm2022/clr-angular-forms-radio.mjs +231 -0
  44. package/fesm2022/clr-angular-forms-radio.mjs.map +1 -0
  45. package/fesm2022/clr-angular-forms-range.mjs +186 -0
  46. package/fesm2022/clr-angular-forms-range.mjs.map +1 -0
  47. package/fesm2022/clr-angular-forms-select.mjs +153 -0
  48. package/fesm2022/clr-angular-forms-select.mjs.map +1 -0
  49. package/fesm2022/clr-angular-forms-textarea.mjs +136 -0
  50. package/fesm2022/clr-angular-forms-textarea.mjs.map +1 -0
  51. package/fesm2022/clr-angular-forms.mjs +100 -0
  52. package/fesm2022/clr-angular-forms.mjs.map +1 -0
  53. package/fesm2022/clr-angular-icon.mjs +7397 -0
  54. package/fesm2022/clr-angular-icon.mjs.map +1 -0
  55. package/fesm2022/clr-angular-layout-breadcrumbs.mjs +120 -0
  56. package/fesm2022/clr-angular-layout-breadcrumbs.mjs.map +1 -0
  57. package/fesm2022/clr-angular-layout-main-container.mjs +100 -0
  58. package/fesm2022/clr-angular-layout-main-container.mjs.map +1 -0
  59. package/fesm2022/clr-angular-layout-nav.mjs +582 -0
  60. package/fesm2022/clr-angular-layout-nav.mjs.map +1 -0
  61. package/fesm2022/clr-angular-layout-tabs.mjs +807 -0
  62. package/fesm2022/clr-angular-layout-tabs.mjs.map +1 -0
  63. package/fesm2022/clr-angular-layout-vertical-nav.mjs +507 -0
  64. package/fesm2022/clr-angular-layout-vertical-nav.mjs.map +1 -0
  65. package/fesm2022/clr-angular-layout.mjs +44 -0
  66. package/fesm2022/clr-angular-layout.mjs.map +1 -0
  67. package/fesm2022/clr-angular-modal.mjs +617 -0
  68. package/fesm2022/clr-angular-modal.mjs.map +1 -0
  69. package/fesm2022/clr-angular-popover-common.mjs +1082 -0
  70. package/fesm2022/clr-angular-popover-common.mjs.map +1 -0
  71. package/fesm2022/clr-angular-popover-dropdown.mjs +492 -0
  72. package/fesm2022/clr-angular-popover-dropdown.mjs.map +1 -0
  73. package/fesm2022/clr-angular-popover-signpost.mjs +494 -0
  74. package/fesm2022/clr-angular-popover-signpost.mjs.map +1 -0
  75. package/fesm2022/clr-angular-popover-tooltip.mjs +293 -0
  76. package/fesm2022/clr-angular-popover-tooltip.mjs.map +1 -0
  77. package/fesm2022/clr-angular-popover.mjs +41 -0
  78. package/fesm2022/clr-angular-popover.mjs.map +1 -0
  79. package/fesm2022/clr-angular-progress-progress-bars.mjs +217 -0
  80. package/fesm2022/clr-angular-progress-progress-bars.mjs.map +1 -0
  81. package/fesm2022/clr-angular-progress-spinner.mjs +132 -0
  82. package/fesm2022/clr-angular-progress-spinner.mjs.map +1 -0
  83. package/fesm2022/clr-angular-stepper.mjs +694 -0
  84. package/fesm2022/clr-angular-stepper.mjs.map +1 -0
  85. package/fesm2022/clr-angular-timeline.mjs +316 -0
  86. package/fesm2022/clr-angular-timeline.mjs.map +1 -0
  87. package/fesm2022/clr-angular-utils-conditional.mjs +351 -0
  88. package/fesm2022/clr-angular-utils-conditional.mjs.map +1 -0
  89. package/fesm2022/clr-angular-utils-loading.mjs +107 -0
  90. package/fesm2022/clr-angular-utils-loading.mjs.map +1 -0
  91. package/fesm2022/clr-angular-utils.mjs +2079 -0
  92. package/fesm2022/clr-angular-utils.mjs.map +1 -0
  93. package/fesm2022/clr-angular-wizard.mjs +3074 -0
  94. package/fesm2022/clr-angular-wizard.mjs.map +1 -0
  95. package/fesm2022/clr-angular.mjs +2 -2
  96. package/fesm2022/clr-angular.mjs.map +1 -1
  97. package/package.json +7 -5
  98. package/schematics/ng-update/index.d.ts +2 -0
  99. package/schematics/ng-update/index.js +69 -0
  100. package/schematics/ng-update/index.js.map +1 -0
  101. package/schematics/ng-update/migrations/css-migration.d.ts +6 -0
  102. package/schematics/ng-update/migrations/css-migration.js +177 -0
  103. package/schematics/ng-update/migrations/css-migration.js.map +1 -0
  104. package/schematics/ng-update/migrations/import-migration.d.ts +4 -0
  105. package/schematics/ng-update/migrations/import-migration.js +187 -0
  106. package/schematics/ng-update/migrations/import-migration.js.map +1 -0
  107. package/schematics/ng-update/migrations/template-migration.d.ts +6 -0
  108. package/schematics/ng-update/migrations/template-migration.js +261 -0
  109. package/schematics/ng-update/migrations/template-migration.js.map +1 -0
  110. package/schematics/ng-update/replacements/css-replacements.d.ts +17 -0
  111. package/schematics/ng-update/replacements/css-replacements.js +74 -0
  112. package/schematics/ng-update/replacements/css-replacements.js.map +1 -0
  113. package/schematics/ng-update/replacements/import-replacements.d.ts +13 -0
  114. package/schematics/ng-update/replacements/import-replacements.js +108 -0
  115. package/schematics/ng-update/replacements/import-replacements.js.map +1 -0
  116. package/schematics/ng-update/replacements/symbol-replacements.d.ts +12 -0
  117. package/schematics/ng-update/replacements/symbol-replacements.js +67 -0
  118. package/schematics/ng-update/replacements/symbol-replacements.js.map +1 -0
  119. package/schematics/ng-update/replacements/template-replacements.d.ts +19 -0
  120. package/schematics/ng-update/replacements/template-replacements.js +57 -0
  121. package/schematics/ng-update/replacements/template-replacements.js.map +1 -0
  122. package/schematics/ng-update/tests/test-helpers.d.ts +6 -0
  123. package/schematics/ng-update/tests/test-helpers.js +34 -0
  124. package/schematics/ng-update/tests/test-helpers.js.map +1 -0
  125. package/schematics/ng-update/utils/file-visitor.d.ts +8 -0
  126. package/schematics/ng-update/utils/file-visitor.js +44 -0
  127. package/schematics/ng-update/utils/file-visitor.js.map +1 -0
  128. package/schematics/ng-update/utils/regexp-utils.d.ts +16 -0
  129. package/schematics/ng-update/utils/regexp-utils.js +34 -0
  130. package/schematics/ng-update/utils/regexp-utils.js.map +1 -0
  131. package/schematics/vitest.config.d.ts +2 -0
  132. package/schematics/vitest.config.js +17 -0
  133. package/schematics/vitest.config.js.map +1 -0
  134. package/types/clr-angular-accordion.d.ts +100 -0
  135. package/types/clr-angular-button.d.ts +169 -0
  136. package/types/clr-angular-collapsible-panel.d.ts +73 -0
  137. package/types/clr-angular-data-datagrid.d.ts +1843 -0
  138. package/types/clr-angular-data-stack-view.d.ts +87 -0
  139. package/types/clr-angular-data-tree-view.d.ts +229 -0
  140. package/types/clr-angular-data.d.ts +15 -0
  141. package/types/clr-angular-emphasis-alert.d.ts +175 -0
  142. package/types/clr-angular-emphasis-badge.d.ts +25 -0
  143. package/types/clr-angular-emphasis-common.d.ts +6 -0
  144. package/types/clr-angular-emphasis-label.d.ts +29 -0
  145. package/types/clr-angular-emphasis.d.ts +15 -0
  146. package/types/clr-angular-forms-checkbox.d.ts +69 -0
  147. package/types/clr-angular-forms-combobox.d.ts +353 -0
  148. package/types/clr-angular-forms-common.d.ts +339 -0
  149. package/types/clr-angular-forms-datalist.d.ts +59 -0
  150. package/types/clr-angular-forms-datepicker.d.ts +986 -0
  151. package/types/clr-angular-forms-file-input.d.ts +193 -0
  152. package/types/clr-angular-forms-input.d.ts +29 -0
  153. package/types/clr-angular-forms-number-input.d.ts +43 -0
  154. package/types/clr-angular-forms-password.d.ts +52 -0
  155. package/types/clr-angular-forms-radio.d.ts +50 -0
  156. package/types/clr-angular-forms-range.d.ts +37 -0
  157. package/types/clr-angular-forms-select.d.ts +36 -0
  158. package/types/clr-angular-forms-textarea.d.ts +29 -0
  159. package/types/clr-angular-forms.d.ts +36 -0
  160. package/types/clr-angular-icon.d.ts +1498 -0
  161. package/types/clr-angular-layout-breadcrumbs.d.ts +45 -0
  162. package/types/clr-angular-layout-main-container.d.ts +28 -0
  163. package/types/clr-angular-layout-nav.d.ts +142 -0
  164. package/types/clr-angular-layout-tabs.d.ts +158 -0
  165. package/types/clr-angular-layout-vertical-nav.d.ts +128 -0
  166. package/types/clr-angular-layout.d.ts +19 -0
  167. package/types/clr-angular-modal.d.ts +160 -0
  168. package/types/clr-angular-popover-common.d.ts +254 -0
  169. package/types/clr-angular-popover-dropdown.d.ts +123 -0
  170. package/types/clr-angular-popover-signpost.d.ts +157 -0
  171. package/types/clr-angular-popover-tooltip.d.ts +83 -0
  172. package/types/clr-angular-popover.d.ts +16 -0
  173. package/types/clr-angular-progress-progress-bars.d.ts +57 -0
  174. package/types/clr-angular-progress-spinner.d.ts +44 -0
  175. package/types/clr-angular-stepper.d.ts +179 -0
  176. package/types/clr-angular-timeline.d.ts +86 -0
  177. package/types/clr-angular-utils-conditional.d.ts +132 -0
  178. package/types/clr-angular-utils-loading.d.ts +38 -0
  179. package/types/clr-angular-utils.d.ts +913 -0
  180. package/types/clr-angular-wizard.d.ts +1508 -0
@@ -0,0 +1,694 @@
1
+ import * as i4 from '@angular/common';
2
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { ChangeDetectionStrategy, Component, Injectable, PLATFORM_ID, HostBinding, ContentChildren, ViewChild, Inject, Optional, Input, Directive, HostListener, NgModule } from '@angular/core';
5
+ import { CollapsiblePanelModel, CollapsiblePanelGroupModel, CollapsiblePanelService, CollapsiblePanel, collapsiblePanelAnimation } from '@clr/angular/collapsible-panel';
6
+ import * as i1 from '@clr/angular/utils';
7
+ import { triggerAllFormControlValidation, IfExpandService, WillyWonka, OompaLoompa } from '@clr/angular/utils';
8
+ import { map, distinctUntilChanged, tap, startWith, pairwise, filter } from 'rxjs/operators';
9
+ import * as i2 from '@angular/forms';
10
+ import { Subject, Observable } from 'rxjs';
11
+ import * as i5 from '@clr/angular/icon';
12
+ import { ClarityIcons, angleIcon, successStandardIcon, errorStandardIcon, ClrIcon } from '@clr/angular/icon';
13
+
14
+ /*
15
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
16
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
17
+ * This software is released under MIT license.
18
+ * The full license information can be found in LICENSE in the root directory of this project.
19
+ */
20
+ var StepperPanelStatus;
21
+ (function (StepperPanelStatus) {
22
+ StepperPanelStatus["Inactive"] = "inactive";
23
+ StepperPanelStatus["Error"] = "error";
24
+ StepperPanelStatus["Complete"] = "complete";
25
+ })(StepperPanelStatus || (StepperPanelStatus = {}));
26
+
27
+ /*
28
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
29
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
30
+ * This software is released under MIT license.
31
+ * The full license information can be found in LICENSE in the root directory of this project.
32
+ */
33
+ class ClrStepDescription {
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepDescription, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
35
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ClrStepDescription, isStandalone: false, selector: "clr-step-description", host: { properties: { "class.clr-stepper-description": "true" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
36
+ }
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepDescription, decorators: [{
38
+ type: Component,
39
+ args: [{
40
+ selector: 'clr-step-description',
41
+ template: `<ng-content></ng-content>`,
42
+ host: { '[class.clr-stepper-description]': 'true' },
43
+ changeDetection: ChangeDetectionStrategy.OnPush,
44
+ standalone: false,
45
+ }]
46
+ }] });
47
+
48
+ /*
49
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
50
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
51
+ * This software is released under MIT license.
52
+ * The full license information can be found in LICENSE in the root directory of this project.
53
+ */
54
+ class StepperPanelModel extends CollapsiblePanelModel {
55
+ constructor() {
56
+ super(...arguments);
57
+ this.status = StepperPanelStatus.Inactive;
58
+ }
59
+ }
60
+
61
+ /*
62
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
63
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
64
+ * This software is released under MIT license.
65
+ * The full license information can be found in LICENSE in the root directory of this project.
66
+ */
67
+ class StepperModel extends CollapsiblePanelGroupModel {
68
+ constructor() {
69
+ super(...arguments);
70
+ this._panels = {};
71
+ this.stepperModelInitialize = false;
72
+ }
73
+ get panels() {
74
+ return Object.keys(this._panels).map(id => this._panels[id]);
75
+ }
76
+ get allPanelsCompleted() {
77
+ return this.panels.length && this.getNumberOfIncompletePanels() === 0 && this.getNumberOfOpenPanels() === 0;
78
+ }
79
+ get shouldOpenFirstPanel() {
80
+ return !this.initialPanel || (this._panels && Object.keys(this._panels).length && !this._panels[this.initialPanel]);
81
+ }
82
+ addPanel(id, open = false) {
83
+ const panel = new StepperPanelModel(id, this.panelGroupCount);
84
+ panel.open = open;
85
+ panel.disabled = true;
86
+ this._panels[id] = panel;
87
+ }
88
+ updatePanelOrder(ids) {
89
+ super.updatePanelOrder(ids);
90
+ if (this.stepperModelInitialize === false) {
91
+ this.openFirstPanel();
92
+ }
93
+ }
94
+ togglePanel(panelId) {
95
+ if (this._panels[panelId]?.status === StepperPanelStatus.Complete) {
96
+ this._panels[panelId].open = !this._panels[panelId].open;
97
+ }
98
+ }
99
+ navigateToPreviousPanel(currentPanelId) {
100
+ this.openPreviousPanel(this._panels[currentPanelId].id);
101
+ }
102
+ navigateToNextPanel(currentPanelId, currentPanelValid = true) {
103
+ if (currentPanelValid) {
104
+ this.completePanel(currentPanelId);
105
+ this.openNextPanel(this._panels[currentPanelId].id);
106
+ }
107
+ else {
108
+ this.setPanelError(currentPanelId);
109
+ }
110
+ }
111
+ overrideInitialPanel(panelId) {
112
+ this.initialPanel = panelId;
113
+ this.panels
114
+ .filter(() => this._panels[panelId] !== undefined)
115
+ .forEach(panel => {
116
+ if (panel.index < this._panels[panelId].index) {
117
+ this.completePanel(panel.id);
118
+ }
119
+ else if (panel.id === panelId) {
120
+ this._panels[panel.id].open = true;
121
+ }
122
+ else {
123
+ this._panels[panel.id].open = false;
124
+ }
125
+ });
126
+ }
127
+ setPanelValid(panelId) {
128
+ this._panels[panelId].status = StepperPanelStatus.Complete;
129
+ }
130
+ setPanelInvalid(panelId) {
131
+ this._panels[panelId].status = StepperPanelStatus.Error;
132
+ }
133
+ setPanelsWithErrors(ids) {
134
+ ids.forEach(id => this.setPanelError(id));
135
+ }
136
+ resetPanels() {
137
+ this.stepperModelInitialize = false;
138
+ this.panels.forEach(p => this.resetPanel(p.id));
139
+ this.openFirstPanel();
140
+ }
141
+ getNextPanel(currentPanelId) {
142
+ return this.panels.find(s => s.index === this._panels[currentPanelId].index + 1);
143
+ }
144
+ getPreviousPanel(currentPanelId) {
145
+ return this.panels.find(s => s.index === this._panels[currentPanelId].index - 1);
146
+ }
147
+ resetAllFuturePanels(panelId) {
148
+ this.panels.filter(panel => panel.index >= this._panels[panelId].index).forEach(panel => this.resetPanel(panel.id));
149
+ }
150
+ resetPanel(panelId) {
151
+ this._panels[panelId].status = StepperPanelStatus.Inactive;
152
+ this._panels[panelId].open = false;
153
+ this._panels[panelId].disabled = true;
154
+ }
155
+ openFirstPanel() {
156
+ if (!this.shouldOpenFirstPanel) {
157
+ return;
158
+ }
159
+ const firstPanel = this.getFirstPanel();
160
+ if (!firstPanel) {
161
+ return;
162
+ }
163
+ this._panels[firstPanel.id].open = true;
164
+ this._panels[firstPanel.id].disabled = true;
165
+ this.stepperModelInitialize = true;
166
+ }
167
+ completePanel(panelId) {
168
+ this._panels[panelId].status = StepperPanelStatus.Complete;
169
+ this._panels[panelId].disabled = false;
170
+ this._panels[panelId].open = false;
171
+ }
172
+ openNextPanel(currentPanelId) {
173
+ const nextPanel = this.getNextPanel(currentPanelId);
174
+ if (nextPanel) {
175
+ this.resetAllFuturePanels(nextPanel.id);
176
+ this._panels[nextPanel.id].open = true;
177
+ this._panels[nextPanel.id].disabled = true;
178
+ }
179
+ }
180
+ openPreviousPanel(currentPanelId) {
181
+ const prevPanel = this.getPreviousPanel(currentPanelId);
182
+ if (prevPanel) {
183
+ this._panels[currentPanelId].open = false;
184
+ this._panels[currentPanelId].disabled = false;
185
+ this._panels[prevPanel.id].open = true;
186
+ this._panels[prevPanel.id].disabled = true;
187
+ }
188
+ }
189
+ setPanelError(panelId) {
190
+ this.resetAllFuturePanels(panelId);
191
+ this._panels[panelId].open = true;
192
+ this._panels[panelId].status = StepperPanelStatus.Error;
193
+ }
194
+ getFirstPanel() {
195
+ return this.panels.find(panel => panel.index === 0);
196
+ }
197
+ getNumberOfIncompletePanels() {
198
+ return this.panels.reduce((prev, next) => (next.status !== StepperPanelStatus.Complete ? prev + 1 : prev), 0);
199
+ }
200
+ getNumberOfOpenPanels() {
201
+ return this.panels.reduce((prev, next) => (next.open !== false ? prev + 1 : prev), 0);
202
+ }
203
+ }
204
+
205
+ /*
206
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
207
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
208
+ * This software is released under MIT license.
209
+ * The full license information can be found in LICENSE in the root directory of this project.
210
+ */
211
+ class StepperService extends CollapsiblePanelService {
212
+ constructor() {
213
+ super();
214
+ this.panelsCompleted = this.getAllCompletedPanelChanges();
215
+ this.panelGroup = new StepperModel();
216
+ this._activeStepChanges = new Subject();
217
+ this.activeStep = this._activeStepChanges.asObservable();
218
+ }
219
+ resetPanels() {
220
+ this.panelGroup.resetPanels();
221
+ this.emitUpdatedPanels();
222
+ }
223
+ setPanelValid(panelId) {
224
+ this.panelGroup.setPanelValid(panelId);
225
+ this.emitUpdatedPanels();
226
+ }
227
+ setPanelInvalid(panelId) {
228
+ this.panelGroup.setPanelInvalid(panelId);
229
+ this.emitUpdatedPanels();
230
+ }
231
+ setPanelsWithErrors(ids) {
232
+ this.panelGroup.setPanelsWithErrors(ids);
233
+ this.emitUpdatedPanels();
234
+ }
235
+ navigateToPreviousPanel(currentPanelId) {
236
+ this.panelGroup.navigateToPreviousPanel(currentPanelId);
237
+ this.updatePreviousStep(currentPanelId);
238
+ this.emitUpdatedPanels();
239
+ }
240
+ navigateToNextPanel(currentPanelId, currentPanelValid = true) {
241
+ this.panelGroup.navigateToNextPanel(currentPanelId, currentPanelValid);
242
+ this.updateNextStep(currentPanelId, currentPanelValid);
243
+ this.emitUpdatedPanels();
244
+ }
245
+ overrideInitialPanel(panelId) {
246
+ this.panelGroup.overrideInitialPanel(panelId);
247
+ this.emitUpdatedPanels();
248
+ }
249
+ updateNextStep(currentPanelId, currentPanelValid) {
250
+ const nextPanel = this.panelGroup.getNextPanel(currentPanelId);
251
+ if (currentPanelValid && nextPanel) {
252
+ this._activeStepChanges.next(nextPanel.id);
253
+ }
254
+ else if (currentPanelValid) {
255
+ this._activeStepChanges.next(currentPanelId);
256
+ }
257
+ }
258
+ updatePreviousStep(currentPanelId) {
259
+ const prevPanel = this.panelGroup.getPreviousPanel(currentPanelId);
260
+ if (prevPanel) {
261
+ this._activeStepChanges.next(prevPanel.id);
262
+ }
263
+ }
264
+ getAllCompletedPanelChanges() {
265
+ return this._panelsChanges.pipe(map(() => this.panelGroup.allPanelsCompleted), distinctUntilChanged());
266
+ }
267
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
268
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperService }); }
269
+ }
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperService, decorators: [{
271
+ type: Injectable
272
+ }], ctorParameters: () => [] });
273
+
274
+ /*
275
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
276
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
277
+ * This software is released under MIT license.
278
+ * The full license information can be found in LICENSE in the root directory of this project.
279
+ */
280
+ class ClrStepperPanel extends CollapsiblePanel {
281
+ constructor(platformId, commonStrings, formGroupName, ngModelGroup, stepperService, ifExpandService, cdr) {
282
+ super(stepperService, ifExpandService, cdr);
283
+ this.platformId = platformId;
284
+ this.commonStrings = commonStrings;
285
+ this.formGroupName = formGroupName;
286
+ this.ngModelGroup = ngModelGroup;
287
+ this.stepperService = stepperService;
288
+ this.disabled = false;
289
+ this.PanelStatus = StepperPanelStatus;
290
+ this.subscriptions = [];
291
+ }
292
+ get id() {
293
+ return this.formGroupName ? this.formGroupName.name.toString() : this.ngModelGroup.name;
294
+ }
295
+ set id(_value) {
296
+ // overriding parent id required empty setter
297
+ }
298
+ get panelNumber() {
299
+ return this._panelIndex + 1;
300
+ }
301
+ get formGroup() {
302
+ return this.formGroupName ? this.formGroupName.control : this.ngModelGroup.control;
303
+ }
304
+ getPanelStatus(panel) {
305
+ return panel.status;
306
+ }
307
+ getPanelStateClasses(panel) {
308
+ return `clr-stepper-panel-${this.getPanelStatus(panel)} ${panel.open ? 'clr-stepper-panel-open' : ''}`;
309
+ }
310
+ getContentId(id) {
311
+ return `clr-stepper-content-${id}`;
312
+ }
313
+ getHeaderId(id) {
314
+ return `clr-stepper-header-${id}`;
315
+ }
316
+ ngOnInit() {
317
+ super.ngOnInit();
318
+ this.panel = this.panel.pipe(tap(panel => this.triggerAllFormControlValidationIfError(panel)));
319
+ this.stepperService.disablePanel(this.id, true);
320
+ this.listenToFocusChanges();
321
+ // not all stepper panels are guaranteed to have a form (i.e. empty template-driven)
322
+ if (this.formGroup) {
323
+ // Only react to genuine status transitions (e.g. INVALID→VALID or VALID→INVALID).
324
+ // Using startWith to seed the stream with the current status so that repeated
325
+ // same-status emissions produced by Angular's updateValueAndValidity() calls
326
+ // (which always emit even when the status hasn't changed) are filtered out.
327
+ // This prevents a single blurred+typed control from triggering validation on
328
+ // all sibling controls in the group via triggerAllFormControlValidation.
329
+ this.subscriptions.push(this.formGroup.statusChanges
330
+ .pipe(startWith(this.formGroup.status), pairwise(), filter(([prev, curr]) => prev !== curr), map(([, curr]) => curr))
331
+ .subscribe(status => {
332
+ if (!this.formGroup.touched) {
333
+ return;
334
+ }
335
+ if (status === 'VALID') {
336
+ this.stepperService.setPanelValid(this.id);
337
+ }
338
+ else if (status === 'INVALID') {
339
+ this.stepperService.setPanelInvalid(this.id);
340
+ }
341
+ }));
342
+ }
343
+ }
344
+ ngOnDestroy() {
345
+ this.subscriptions.forEach(s => s.unsubscribe());
346
+ }
347
+ stepCompleteText(panelNumber) {
348
+ return this.commonStrings.parse(this.commonStrings.keys.stepComplete, { STEP: panelNumber.toString() });
349
+ }
350
+ stepErrorText(panelNumber) {
351
+ return this.commonStrings.parse(this.commonStrings.keys.stepError, { STEP: panelNumber.toString() });
352
+ }
353
+ listenToFocusChanges() {
354
+ this.subscriptions.push(this.stepperService.activeStep
355
+ .pipe(filter(panelId => isPlatformBrowser(this.platformId) && panelId === this.id))
356
+ .subscribe(() => {
357
+ this.headerButton.nativeElement.focus();
358
+ }));
359
+ }
360
+ triggerAllFormControlValidationIfError(panel) {
361
+ if (panel.status === StepperPanelStatus.Error) {
362
+ triggerAllFormControlValidation(this.formGroup);
363
+ }
364
+ }
365
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepperPanel, deps: [{ token: PLATFORM_ID }, { token: i1.ClrCommonStringsService }, { token: i2.FormGroupName, optional: true }, { token: i2.NgModelGroup, optional: true }, { token: StepperService }, { token: i1.IfExpandService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
366
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: ClrStepperPanel, isStandalone: false, selector: "clr-stepper-panel", host: { properties: { "class.clr-stepper-panel": "true", "class.clr-stepper-panel-disabled": "this.disabled" } }, providers: [IfExpandService], queries: [{ propertyName: "stepDescription", predicate: ClrStepDescription }], viewQueries: [{ propertyName: "headerButton", first: true, predicate: ["headerButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n@if (panel | async; as panel) {\n<div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-stepper-header\">\n <button\n type=\"button\"\n class=\"clr-stepper-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getHeaderId(panel.templateId)\"\n [attr.aria-disabled]=\"panel.disabled\"\n [attr.aria-controls]=\"getContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-stepper-header-has-description]=\"(stepDescription.changes | async)?.length || stepDescription.length\"\n #headerButton\n >\n <span class=\"clr-step-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-stepper-angle clr-step-angle\"></cds-icon>\n <span class=\"clr-step-status-icon\">\n @if (getPanelStatus(panel) === PanelStatus.Error) {\n <cds-icon status=\"danger\" shape=\"error-standard\" class=\"clr-step-error-icon\"></cds-icon>\n } @if (getPanelStatus(panel) === PanelStatus.Complete) {\n <cds-icon status=\"success\" shape=\"success-standard\" class=\"clr-step-complete-icon\"></cds-icon>\n }\n </span>\n </span>\n <span class=\"clr-step-title-wrapper\">\n <span class=\"clr-step-number\">{{panelNumber}}.</span>\n <ng-content select=\"clr-step-title\"></ng-content>\n </span>\n <ng-content select=\"clr-step-description\"></ng-content>\n </button>\n <div class=\"clr-sr-only\" role=\"status\">\n @if (getPanelStatus(panel) === PanelStatus.Error) { {{ stepErrorText(panelNumber)}} } @if (getPanelStatus(panel)\n === PanelStatus.Complete) { {{ stepCompleteText(panelNumber)}} }\n </div>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n class=\"clr-stepper-content-region\"\n [id]=\"getContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getHeaderId(panel.templateId)\"\n >\n @if (panel.open) {\n <div @toggle (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\" class=\"clr-stepper-content\">\n <div class=\"clr-stepper-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n }\n </div>\n</div>\n}\n", dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i5.ClrIcon, selector: "clr-icon, cds-icon", inputs: ["shape", "size", "direction", "flip", "solid", "status", "inverse", "badge"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], animations: collapsiblePanelAnimation, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
367
+ }
368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepperPanel, decorators: [{
369
+ type: Component,
370
+ args: [{ selector: 'clr-stepper-panel', host: { '[class.clr-stepper-panel]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, animations: collapsiblePanelAnimation, providers: [IfExpandService], standalone: false, template: "<!--\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n@if (panel | async; as panel) {\n<div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-stepper-header\">\n <button\n type=\"button\"\n class=\"clr-stepper-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getHeaderId(panel.templateId)\"\n [attr.aria-disabled]=\"panel.disabled\"\n [attr.aria-controls]=\"getContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-stepper-header-has-description]=\"(stepDescription.changes | async)?.length || stepDescription.length\"\n #headerButton\n >\n <span class=\"clr-step-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-stepper-angle clr-step-angle\"></cds-icon>\n <span class=\"clr-step-status-icon\">\n @if (getPanelStatus(panel) === PanelStatus.Error) {\n <cds-icon status=\"danger\" shape=\"error-standard\" class=\"clr-step-error-icon\"></cds-icon>\n } @if (getPanelStatus(panel) === PanelStatus.Complete) {\n <cds-icon status=\"success\" shape=\"success-standard\" class=\"clr-step-complete-icon\"></cds-icon>\n }\n </span>\n </span>\n <span class=\"clr-step-title-wrapper\">\n <span class=\"clr-step-number\">{{panelNumber}}.</span>\n <ng-content select=\"clr-step-title\"></ng-content>\n </span>\n <ng-content select=\"clr-step-description\"></ng-content>\n </button>\n <div class=\"clr-sr-only\" role=\"status\">\n @if (getPanelStatus(panel) === PanelStatus.Error) { {{ stepErrorText(panelNumber)}} } @if (getPanelStatus(panel)\n === PanelStatus.Complete) { {{ stepCompleteText(panelNumber)}} }\n </div>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n class=\"clr-stepper-content-region\"\n [id]=\"getContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getHeaderId(panel.templateId)\"\n >\n @if (panel.open) {\n <div @toggle (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\" class=\"clr-stepper-content\">\n <div class=\"clr-stepper-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n }\n </div>\n</div>\n}\n" }]
371
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
372
+ type: Inject,
373
+ args: [PLATFORM_ID]
374
+ }] }, { type: i1.ClrCommonStringsService }, { type: i2.FormGroupName, decorators: [{
375
+ type: Optional
376
+ }] }, { type: i2.NgModelGroup, decorators: [{
377
+ type: Optional
378
+ }] }, { type: StepperService }, { type: i1.IfExpandService }, { type: i0.ChangeDetectorRef }], propDecorators: { headerButton: [{
379
+ type: ViewChild,
380
+ args: ['headerButton']
381
+ }], stepDescription: [{
382
+ type: ContentChildren,
383
+ args: [ClrStepDescription]
384
+ }], disabled: [{
385
+ type: HostBinding,
386
+ args: ['class.clr-stepper-panel-disabled']
387
+ }] } });
388
+
389
+ /*
390
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
391
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
392
+ * This software is released under MIT license.
393
+ * The full license information can be found in LICENSE in the root directory of this project.
394
+ */
395
+ class ClrStepper {
396
+ constructor(formGroup, ngForm, stepperService) {
397
+ this.formGroup = formGroup;
398
+ this.ngForm = ngForm;
399
+ this.stepperService = stepperService;
400
+ this.subscriptions = [];
401
+ }
402
+ ngOnInit() {
403
+ if (!this.formGroup && !this.ngForm) {
404
+ throw new Error('To use stepper a Reactive or Template Form is required.');
405
+ }
406
+ this.form = this.formGroup ? this.formGroup : this.ngForm;
407
+ this.subscriptions.push(this.listenForPanelsCompleted());
408
+ this.subscriptions.push(this.listenForFormResetChanges());
409
+ }
410
+ ngOnChanges(changes) {
411
+ if (changes.initialPanel &&
412
+ !changes.initialPanel.firstChange &&
413
+ changes.initialPanel.currentValue !== changes.initialPanel.previousValue) {
414
+ this.stepperService.overrideInitialPanel(this.initialPanel);
415
+ }
416
+ }
417
+ ngAfterViewInit() {
418
+ this.subscriptions.push(this.listenForDOMChanges());
419
+ }
420
+ ngOnDestroy() {
421
+ this.subscriptions.forEach(s => s.unsubscribe());
422
+ }
423
+ listenForFormResetChanges() {
424
+ return fromControlReset(this.form.form).subscribe(() => this.stepperService.resetPanels());
425
+ }
426
+ listenForPanelsCompleted() {
427
+ return this.stepperService.panelsCompleted.subscribe(panelsCompleted => {
428
+ if (panelsCompleted && this.form.valid) {
429
+ this.form.ngSubmit.emit();
430
+ }
431
+ else if (!this.form.valid && this.form.touched) {
432
+ this.setPanelsWithFormErrors();
433
+ }
434
+ });
435
+ }
436
+ setPanelsWithFormErrors() {
437
+ const panelsWithErrors = this.panels.reduce((panels, p) => (p.formGroup.invalid ? [...panels, p.id] : panels), []);
438
+ this.stepperService.setPanelsWithErrors(panelsWithErrors);
439
+ }
440
+ listenForDOMChanges() {
441
+ return this.panels.changes.pipe(startWith(this.panels)).subscribe((panels) => {
442
+ this.stepperService.updatePanelOrder(panels.toArray().map(p => p.id));
443
+ if (this.initialPanel) {
444
+ this.stepperService.overrideInitialPanel(this.initialPanel);
445
+ }
446
+ });
447
+ }
448
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepper, deps: [{ token: i2.FormGroupDirective, optional: true }, { token: i2.NgForm, optional: true }, { token: StepperService }], target: i0.ɵɵFactoryTarget.Component }); }
449
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ClrStepper, isStandalone: false, selector: "form[clrStepper]", inputs: { initialPanel: ["clrInitialStep", "initialPanel"] }, host: { properties: { "class.clr-stepper-forms": "true" } }, providers: [StepperService, { provide: CollapsiblePanelService, useExisting: StepperService }], queries: [{ propertyName: "panels", predicate: ClrStepperPanel }], usesOnChanges: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
450
+ }
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepper, decorators: [{
452
+ type: Component,
453
+ args: [{
454
+ selector: 'form[clrStepper]',
455
+ template: `<ng-content></ng-content>`,
456
+ host: {
457
+ '[class.clr-stepper-forms]': 'true',
458
+ },
459
+ providers: [StepperService, { provide: CollapsiblePanelService, useExisting: StepperService }],
460
+ changeDetection: ChangeDetectionStrategy.OnPush,
461
+ standalone: false,
462
+ }]
463
+ }], ctorParameters: () => [{ type: i2.FormGroupDirective, decorators: [{
464
+ type: Optional
465
+ }] }, { type: i2.NgForm, decorators: [{
466
+ type: Optional
467
+ }] }, { type: StepperService }], propDecorators: { initialPanel: [{
468
+ type: Input,
469
+ args: ['clrInitialStep']
470
+ }], panels: [{
471
+ type: ContentChildren,
472
+ args: [ClrStepperPanel]
473
+ }] } });
474
+ function fromControlReset(control) {
475
+ return new Observable(observer => {
476
+ const unpatchedControlReset = control.reset;
477
+ control.reset = () => {
478
+ observer.next();
479
+ unpatchedControlReset.apply(control);
480
+ };
481
+ return () => {
482
+ control.reset = unpatchedControlReset;
483
+ };
484
+ });
485
+ }
486
+
487
+ /*
488
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
489
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
490
+ * This software is released under MIT license.
491
+ * The full license information can be found in LICENSE in the root directory of this project.
492
+ */
493
+ class StepperWillyWonka extends WillyWonka {
494
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperWillyWonka, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
495
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: StepperWillyWonka, isStandalone: false, selector: "form[clrStepper]", usesInheritance: true, ngImport: i0 }); }
496
+ }
497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperWillyWonka, decorators: [{
498
+ type: Directive,
499
+ args: [{
500
+ selector: 'form[clrStepper]',
501
+ standalone: false,
502
+ }]
503
+ }] });
504
+
505
+ /*
506
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
507
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
508
+ * This software is released under MIT license.
509
+ * The full license information can be found in LICENSE in the root directory of this project.
510
+ */
511
+ class StepperOompaLoompa extends OompaLoompa {
512
+ constructor(cdr, willyWonka, ifExpandService) {
513
+ if (!willyWonka) {
514
+ throw new Error('clr-stepper-panel should only be used inside of clrStepper');
515
+ }
516
+ super(cdr, willyWonka);
517
+ this.expand = ifExpandService;
518
+ }
519
+ get flavor() {
520
+ return this.expand.expanded;
521
+ }
522
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperOompaLoompa, deps: [{ token: i0.ChangeDetectorRef }, { token: StepperWillyWonka, optional: true }, { token: i1.IfExpandService }], target: i0.ɵɵFactoryTarget.Directive }); }
523
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: StepperOompaLoompa, isStandalone: false, selector: "clr-stepper-panel, [clrStepButton]", usesInheritance: true, ngImport: i0 }); }
524
+ }
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: StepperOompaLoompa, decorators: [{
526
+ type: Directive,
527
+ args: [{
528
+ selector: 'clr-stepper-panel, [clrStepButton]',
529
+ standalone: false,
530
+ }]
531
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: StepperWillyWonka, decorators: [{
532
+ type: Optional
533
+ }] }, { type: i1.IfExpandService }] });
534
+
535
+ /*
536
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
537
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
538
+ * This software is released under MIT license.
539
+ * The full license information can be found in LICENSE in the root directory of this project.
540
+ */
541
+ var ClrStepButtonType;
542
+ (function (ClrStepButtonType) {
543
+ ClrStepButtonType["Next"] = "next";
544
+ ClrStepButtonType["Previous"] = "previous";
545
+ ClrStepButtonType["Submit"] = "submit";
546
+ })(ClrStepButtonType || (ClrStepButtonType = {}));
547
+ class ClrStepButton {
548
+ constructor(clrStep, stepperService) {
549
+ this.clrStep = clrStep;
550
+ this.stepperService = stepperService;
551
+ this.type = ClrStepButtonType.Next;
552
+ this.submitButton = false;
553
+ this.previousButton = false;
554
+ }
555
+ ngOnInit() {
556
+ this.submitButton = this.type === ClrStepButtonType.Submit;
557
+ this.previousButton = this.type === ClrStepButtonType.Previous;
558
+ }
559
+ navigateToNextPanel() {
560
+ if (this.previousButton) {
561
+ this.stepperService.navigateToPreviousPanel(this.clrStep.id);
562
+ return;
563
+ }
564
+ this.stepperService.navigateToNextPanel(this.clrStep.id, this.clrStep.formGroup.valid);
565
+ }
566
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepButton, deps: [{ token: ClrStepperPanel }, { token: StepperService }], target: i0.ɵɵFactoryTarget.Directive }); }
567
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: ClrStepButton, isStandalone: false, selector: "[clrStepButton]", inputs: { type: ["clrStepButton", "type"] }, host: { listeners: { "click": "navigateToNextPanel()" }, properties: { "class.clr-step-button": "true", "class.btn": "true", "type": "'button'", "class.btn-success": "this.submitButton", "class.btn-link": "this.previousButton" } }, ngImport: i0 }); }
568
+ }
569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepButton, decorators: [{
570
+ type: Directive,
571
+ args: [{
572
+ selector: '[clrStepButton]',
573
+ host: {
574
+ '[class.clr-step-button]': 'true',
575
+ '[class.btn]': 'true',
576
+ '[type]': "'button'",
577
+ },
578
+ standalone: false,
579
+ }]
580
+ }], ctorParameters: () => [{ type: ClrStepperPanel }, { type: StepperService }], propDecorators: { type: [{
581
+ type: Input,
582
+ args: ['clrStepButton']
583
+ }], submitButton: [{
584
+ type: HostBinding,
585
+ args: ['class.btn-success']
586
+ }], previousButton: [{
587
+ type: HostBinding,
588
+ args: ['class.btn-link']
589
+ }], navigateToNextPanel: [{
590
+ type: HostListener,
591
+ args: ['click']
592
+ }] } });
593
+
594
+ /*
595
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
596
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
597
+ * This software is released under MIT license.
598
+ * The full license information can be found in LICENSE in the root directory of this project.
599
+ */
600
+ class ClrStepContent {
601
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
602
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ClrStepContent, isStandalone: false, selector: "clr-step-content", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
603
+ }
604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepContent, decorators: [{
605
+ type: Component,
606
+ args: [{
607
+ selector: 'clr-step-content',
608
+ template: `<ng-content></ng-content>`,
609
+ changeDetection: ChangeDetectionStrategy.OnPush,
610
+ standalone: false,
611
+ }]
612
+ }] });
613
+
614
+ /*
615
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
616
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
617
+ * This software is released under MIT license.
618
+ * The full license information can be found in LICENSE in the root directory of this project.
619
+ */
620
+ class ClrStepTitle {
621
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
622
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ClrStepTitle, isStandalone: false, selector: "clr-step-title", host: { properties: { "class.clr-stepper-title": "true" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
623
+ }
624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepTitle, decorators: [{
625
+ type: Component,
626
+ args: [{
627
+ selector: 'clr-step-title',
628
+ template: `<ng-content></ng-content>`,
629
+ host: { '[class.clr-stepper-title]': 'true' },
630
+ changeDetection: ChangeDetectionStrategy.OnPush,
631
+ standalone: false,
632
+ }]
633
+ }] });
634
+
635
+ /*
636
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
637
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
638
+ * This software is released under MIT license.
639
+ * The full license information can be found in LICENSE in the root directory of this project.
640
+ */
641
+ const declarations = [
642
+ ClrStepper,
643
+ ClrStepButton,
644
+ ClrStepTitle,
645
+ ClrStepDescription,
646
+ ClrStepContent,
647
+ ClrStepperPanel,
648
+ StepperOompaLoompa,
649
+ StepperWillyWonka,
650
+ ];
651
+ class ClrStepperModule {
652
+ constructor() {
653
+ ClarityIcons.addIcons(angleIcon, successStandardIcon, errorStandardIcon);
654
+ }
655
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
656
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: ClrStepperModule, declarations: [ClrStepper,
657
+ ClrStepButton,
658
+ ClrStepTitle,
659
+ ClrStepDescription,
660
+ ClrStepContent,
661
+ ClrStepperPanel,
662
+ StepperOompaLoompa,
663
+ StepperWillyWonka], imports: [CommonModule, ClrIcon], exports: [ClrStepper,
664
+ ClrStepButton,
665
+ ClrStepTitle,
666
+ ClrStepDescription,
667
+ ClrStepContent,
668
+ ClrStepperPanel,
669
+ StepperOompaLoompa,
670
+ StepperWillyWonka, ClrIcon] }); }
671
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepperModule, imports: [CommonModule, ClrIcon] }); }
672
+ }
673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClrStepperModule, decorators: [{
674
+ type: NgModule,
675
+ args: [{
676
+ imports: [CommonModule, ClrIcon],
677
+ declarations: [...declarations],
678
+ exports: [...declarations, ClrIcon],
679
+ }]
680
+ }], ctorParameters: () => [] });
681
+
682
+ /*
683
+ * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.
684
+ * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
685
+ * This software is released under MIT license.
686
+ * The full license information can be found in LICENSE in the root directory of this project.
687
+ */
688
+
689
+ /**
690
+ * Generated bundle index. Do not edit.
691
+ */
692
+
693
+ export { ClrStepButton, ClrStepButtonType, ClrStepContent, ClrStepDescription, ClrStepTitle, ClrStepper, ClrStepperModule, ClrStepperPanel, StepperOompaLoompa, StepperPanelModel, StepperPanelStatus, StepperService, StepperWillyWonka };
694
+ //# sourceMappingURL=clr-angular-stepper.mjs.map