dts-backoffice-util 14.2.3 → 14.3.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.
@@ -147,7 +147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
147
147
  }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
148
148
 
149
149
  /*
150
- Versão: 1.003
150
+ Versão: 1.004
151
151
  Data Criação: 06/08/2018
152
152
  */
153
153
  class BreadcrumbControlService {
@@ -166,8 +166,7 @@ class BreadcrumbControlService {
166
166
  this.newBreadcrumb();
167
167
  }
168
168
  const breadcrumbAux = { items: [] };
169
- let idx = 0;
170
- for (idx = 0; idx < this.breadcrumb.items.length; idx++) {
169
+ for (let idx = 0; idx < this.breadcrumb.items.length; idx++) {
171
170
  if (this.breadcrumb.items[idx].label !== literal) {
172
171
  breadcrumbAux.items.push(this.breadcrumb.items[idx]);
173
172
  }
@@ -192,6 +191,24 @@ class BreadcrumbControlService {
192
191
  currentRouterURL = currentRouterURL.replace(valueOld, valueNew);
193
192
  this.addBreadcrumbURL(literal, currentRouterURL);
194
193
  }
194
+ delBreadcrumb(literal) {
195
+ if (!literal || literal === '') {
196
+ return;
197
+ }
198
+ if (!this.breadcrumb || !this.breadcrumb.items) {
199
+ return;
200
+ }
201
+ if (this.breadcrumb.items.length === 0) {
202
+ return;
203
+ }
204
+ const breadcrumbAux = { items: [] };
205
+ for (let idx = 0; idx < this.breadcrumb.items.length; idx++) {
206
+ if (this.breadcrumb.items[idx].label !== literal) {
207
+ breadcrumbAux.items.push(this.breadcrumb.items[idx]);
208
+ }
209
+ }
210
+ this.breadcrumb = breadcrumbAux;
211
+ }
195
212
  getBreadcrumb() {
196
213
  if (!this.breadcrumb) {
197
214
  this.newBreadcrumb();