keevo-components 1.5.214 → 1.5.215
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.
- package/esm2020/lib/api/services/breadcrumbs.service.mjs +41 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/keevo-components.mjs +38 -1
- package/fesm2015/keevo-components.mjs.map +1 -1
- package/fesm2020/keevo-components.mjs +38 -1
- package/fesm2020/keevo-components.mjs.map +1 -1
- package/lib/api/services/breadcrumbs.service.d.ts +14 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -102,6 +102,7 @@ import * as i1$5 from 'ngx-loading';
|
|
|
102
102
|
import { NgxLoadingModule } from 'ngx-loading';
|
|
103
103
|
import * as i1$6 from '@angular/common/http';
|
|
104
104
|
import { HttpHeaders } from '@angular/common/http';
|
|
105
|
+
import { filter as filter$1 } from 'rxjs/operators';
|
|
105
106
|
|
|
106
107
|
class BaseComponent {
|
|
107
108
|
constructor() {
|
|
@@ -4715,6 +4716,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
4715
4716
|
}]
|
|
4716
4717
|
}], ctorParameters: function () { return [{ type: i1$6.HttpClient }]; } });
|
|
4717
4718
|
|
|
4719
|
+
class BreadcrumbsService {
|
|
4720
|
+
constructor(router, activatedRoute) {
|
|
4721
|
+
this.router = router;
|
|
4722
|
+
this.activatedRoute = activatedRoute;
|
|
4723
|
+
this.breadcrumbs = [];
|
|
4724
|
+
this.router.events
|
|
4725
|
+
.pipe(filter$1((event) => event instanceof NavigationEnd))
|
|
4726
|
+
.subscribe(() => {
|
|
4727
|
+
this.breadcrumbs = [];
|
|
4728
|
+
this.parseRoute(this.router.routerState.root);
|
|
4729
|
+
});
|
|
4730
|
+
}
|
|
4731
|
+
parseRoute(route) {
|
|
4732
|
+
const path = route.routeConfig && route.routeConfig.path ? route.routeConfig.path : '';
|
|
4733
|
+
const label = route.routeConfig && route.routeConfig.data ? route.routeConfig.data['breadcrumb'] : '';
|
|
4734
|
+
if (path && label) {
|
|
4735
|
+
this.breadcrumbs.push({
|
|
4736
|
+
label: label,
|
|
4737
|
+
url: `/${path}`,
|
|
4738
|
+
});
|
|
4739
|
+
}
|
|
4740
|
+
const nextRoute = route.firstChild;
|
|
4741
|
+
if (nextRoute) {
|
|
4742
|
+
this.parseRoute(nextRoute);
|
|
4743
|
+
}
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4746
|
+
BreadcrumbsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BreadcrumbsService, deps: [{ token: i3$1.Router }, { token: i3$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4747
|
+
BreadcrumbsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BreadcrumbsService, providedIn: 'root' });
|
|
4748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: BreadcrumbsService, decorators: [{
|
|
4749
|
+
type: Injectable,
|
|
4750
|
+
args: [{
|
|
4751
|
+
providedIn: 'root',
|
|
4752
|
+
}]
|
|
4753
|
+
}], ctorParameters: function () { return [{ type: i3$1.Router }, { type: i3$1.ActivatedRoute }]; } });
|
|
4754
|
+
|
|
4718
4755
|
;
|
|
4719
4756
|
|
|
4720
4757
|
/*
|
|
@@ -4725,5 +4762,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
|
4725
4762
|
* Generated bundle index. Do not edit.
|
|
4726
4763
|
*/
|
|
4727
4764
|
|
|
4728
|
-
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropdownNew, BaseComponentInput, BaseComponentMultiSelect, ButtonPersonalizeComponent, ButtonPopupComponent, ButtonSecondaryComponent, ButtonSuccessComponent, ChartComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, EditorComponent, ErrorComponent, FormService, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextCheckboxComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KVTreeTableModule, KeevoComponentsModule, KeevoValidators, KvButtonsModule, KvChartModule, KvInputsModule, KvLoaderModule, KvLoginModule, KvMenuModule, KvPageFormModule, KvPickListModule, KvTableModule, KvWorkspaceModule, KvtreeViewModule, LoaderComponent, LoaderService, LoginComponent, MenuComponent, MultiSelectComponent, NotificationService, ObjectService, OrgchartComponent, OrgchartModule, PageFormComponent, PeriodosChart, PickListComponent, PipesModule, PrimeNgModule, RadioGroupComponent, SwitchComponent, TableComponent, TablePaginate, TelefonePipe, TranslatePrimeng, TreeTableComponent, TreeViewComponent, WorkspaceComponent, kvErrorModule, loading };
|
|
4765
|
+
export { BaseApiService, BaseChartComponent, BaseComponent, BaseComponentButton, BaseComponentCrud, BaseComponentCrudForm, BaseComponentCrudList, BaseComponentDropDown, BaseComponentDropdownNew, BaseComponentInput, BaseComponentMultiSelect, BreadcrumbsService, ButtonPersonalizeComponent, ButtonPopupComponent, ButtonSecondaryComponent, ButtonSuccessComponent, ChartComponent, CheckComponent, CodigoFipePipe, ComponentProviders, ComponentService, CpfCnpjPipe, DropdownComponent, EditorComponent, ErrorComponent, FormService, InputCalendarComponent, InputMaskComponent, InputNumberComponent, InputPasswordComponent, InputTextCheckboxComponent, InputTextComponent, InputTextareaComponent, InputTimeComponent, KVTreeTableModule, KeevoComponentsModule, KeevoValidators, KvButtonsModule, KvChartModule, KvInputsModule, KvLoaderModule, KvLoginModule, KvMenuModule, KvPageFormModule, KvPickListModule, KvTableModule, KvWorkspaceModule, KvtreeViewModule, LoaderComponent, LoaderService, LoginComponent, MenuComponent, MultiSelectComponent, NotificationService, ObjectService, OrgchartComponent, OrgchartModule, PageFormComponent, PeriodosChart, PickListComponent, PipesModule, PrimeNgModule, RadioGroupComponent, SwitchComponent, TableComponent, TablePaginate, TelefonePipe, TranslatePrimeng, TreeTableComponent, TreeViewComponent, WorkspaceComponent, kvErrorModule, loading };
|
|
4729
4766
|
//# sourceMappingURL=keevo-components.mjs.map
|