@indice/ng-components 0.5.0-beta.0 → 0.5.0-beta.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.
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common';
4
4
  import { isPlatformBrowser, formatDate, getLocaleMonthNames, FormStyle, TranslationWidth, getLocaleDayNames, CommonModule } from '@angular/common';
5
5
  import * as i1$1 from '@angular/router';
6
6
  import { NavigationEnd, Router, ActivatedRoute, NavigationStart, ActivationStart, RouterModule } from '@angular/router';
7
- import { Subject, BehaviorSubject, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, of, fromEvent } from 'rxjs';
7
+ import { Subject, isObservable, BehaviorSubject, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, of, fromEvent } from 'rxjs';
8
8
  import { filter, distinctUntilChanged, debounceTime, share, map } from 'rxjs/operators';
9
9
  import * as i2 from '@angular/forms';
10
10
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
@@ -683,7 +683,11 @@ class BreadcrumbService {
683
683
  }
684
684
  _getRouteTitle(route) {
685
685
  if (this.breadcrumbLabelResolver) {
686
- return this.breadcrumbLabelResolver.process(route);
686
+ const context = {
687
+ //will have to change things for additional info from route snapshot
688
+ route: route
689
+ };
690
+ return this.breadcrumbLabelResolver.process(context);
687
691
  }
688
692
  else {
689
693
  return route?.data?.breadcrumb?.title || route.component?.name.replace('Component', '');
@@ -832,12 +836,15 @@ class BreadcrumbComponent {
832
836
  this.breadcrumb = [...breadcrumb, new BreadcrumbItem('', '')];
833
837
  });
834
838
  }
839
+ isAsync(value) {
840
+ return isObservable(value);
841
+ }
835
842
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component }); }
836
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: BreadcrumbComponent, isStandalone: false, selector: "lib-breadcrumb", ngImport: i0, template: "<nav class=\"bg-white border-b border-gray-200 flex\"\n aria-label=\"Breadcrumb\">\n <ol role=\"list\"\n class=\"w-full mx-auto px-4 flex space-x-4 sm:px-6 lg:px-8\">\n <li class=\"flex\"\n *ngFor=\"let item of breadcrumb; let i = index\">\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"i === 0 ? homeTemplate : linkTemplate; context: { value: item }\"></ng-container>\n </div>\n </li>\n </ol>\n</nav>\n<ng-template let-value=\"value\"\n #homeTemplate>\n <a [routerLink]=\"value.urlSegments\"\n [title]=\"value.title\"\n class=\"text-gray-400 hover:text-gray-500\">\n <svg class=\"flex-shrink-0 h-5 w-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\">\n <path d=\"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\" />\n </svg>\n <span class=\"sr-only\">{{ value.title }}</span>\n </a>\n</ng-template>\n<ng-template let-value=\"value\"\n #linkTemplate>\n <svg class=\"flex-shrink-0 w-6 h-full text-gray-200\"\n viewBox=\"0 0 24 44\"\n preserveAspectRatio=\"none\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\">\n <path d=\"M.293 0l22 22-22 22h1.414l22-22-22-22H.293z\" />\n </svg>\n <a [routerLink]=\"value.urlSegments\"\n class=\"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700\">\n {{ value.title }}\n </a>\n</ng-template>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
843
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: BreadcrumbComponent, isStandalone: false, selector: "lib-breadcrumb", ngImport: i0, template: "<nav class=\"bg-white border-b border-gray-200 flex\"\n aria-label=\"Breadcrumb\">\n <ol role=\"list\"\n class=\"w-full mx-auto px-4 flex space-x-4 sm:px-6 lg:px-8\">\n <li class=\"flex\"\n *ngFor=\"let item of breadcrumb; let i = index\">\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"i === 0 ? homeTemplate : linkTemplate; context: { value: item }\"></ng-container>\n </div>\n </li>\n </ol>\n</nav>\n<ng-template let-value=\"value\"\n #homeTemplate>\n <a [routerLink]=\"value.urlSegments\"\n [title]=\"isAsync(value.title) ? (value.title | async) : value.title\"\n class=\"text-gray-400 hover:text-gray-500\">\n <svg class=\"flex-shrink-0 h-5 w-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\">\n <path d=\"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\" />\n </svg>\n <span class=\"sr-only\">{{ isAsync(value.title) ? (value.title | async) : value.title }}</span>\n </a>\n</ng-template>\n<ng-template let-value=\"value\"\n #linkTemplate>\n <svg class=\"flex-shrink-0 w-6 h-full text-gray-200\"\n viewBox=\"0 0 24 44\"\n preserveAspectRatio=\"none\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\">\n <path d=\"M.293 0l22 22-22 22h1.414l22-22-22-22H.293z\" />\n </svg>\n <a [routerLink]=\"value.urlSegments\"\n class=\"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700\">\n {{ isAsync(value.title) ? (value.title | async) : value.title }}\n </a>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
837
844
  }
838
845
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: BreadcrumbComponent, decorators: [{
839
846
  type: Component,
840
- args: [{ selector: 'lib-breadcrumb', standalone: false, template: "<nav class=\"bg-white border-b border-gray-200 flex\"\n aria-label=\"Breadcrumb\">\n <ol role=\"list\"\n class=\"w-full mx-auto px-4 flex space-x-4 sm:px-6 lg:px-8\">\n <li class=\"flex\"\n *ngFor=\"let item of breadcrumb; let i = index\">\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"i === 0 ? homeTemplate : linkTemplate; context: { value: item }\"></ng-container>\n </div>\n </li>\n </ol>\n</nav>\n<ng-template let-value=\"value\"\n #homeTemplate>\n <a [routerLink]=\"value.urlSegments\"\n [title]=\"value.title\"\n class=\"text-gray-400 hover:text-gray-500\">\n <svg class=\"flex-shrink-0 h-5 w-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\">\n <path d=\"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\" />\n </svg>\n <span class=\"sr-only\">{{ value.title }}</span>\n </a>\n</ng-template>\n<ng-template let-value=\"value\"\n #linkTemplate>\n <svg class=\"flex-shrink-0 w-6 h-full text-gray-200\"\n viewBox=\"0 0 24 44\"\n preserveAspectRatio=\"none\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\">\n <path d=\"M.293 0l22 22-22 22h1.414l22-22-22-22H.293z\" />\n </svg>\n <a [routerLink]=\"value.urlSegments\"\n class=\"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700\">\n {{ value.title }}\n </a>\n</ng-template>" }]
847
+ args: [{ selector: 'lib-breadcrumb', standalone: false, template: "<nav class=\"bg-white border-b border-gray-200 flex\"\n aria-label=\"Breadcrumb\">\n <ol role=\"list\"\n class=\"w-full mx-auto px-4 flex space-x-4 sm:px-6 lg:px-8\">\n <li class=\"flex\"\n *ngFor=\"let item of breadcrumb; let i = index\">\n <div class=\"flex items-center\">\n <ng-container *ngTemplateOutlet=\"i === 0 ? homeTemplate : linkTemplate; context: { value: item }\"></ng-container>\n </div>\n </li>\n </ol>\n</nav>\n<ng-template let-value=\"value\"\n #homeTemplate>\n <a [routerLink]=\"value.urlSegments\"\n [title]=\"isAsync(value.title) ? (value.title | async) : value.title\"\n class=\"text-gray-400 hover:text-gray-500\">\n <svg class=\"flex-shrink-0 h-5 w-5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\">\n <path d=\"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\" />\n </svg>\n <span class=\"sr-only\">{{ isAsync(value.title) ? (value.title | async) : value.title }}</span>\n </a>\n</ng-template>\n<ng-template let-value=\"value\"\n #linkTemplate>\n <svg class=\"flex-shrink-0 w-6 h-full text-gray-200\"\n viewBox=\"0 0 24 44\"\n preserveAspectRatio=\"none\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\">\n <path d=\"M.293 0l22 22-22 22h1.414l22-22-22-22H.293z\" />\n </svg>\n <a [routerLink]=\"value.urlSegments\"\n class=\"ml-4 text-sm font-medium text-gray-500 hover:text-gray-700\">\n {{ isAsync(value.title) ? (value.title | async) : value.title }}\n </a>\n</ng-template>\n" }]
841
848
  }], ctorParameters: () => [{ type: BreadcrumbService }] });
842
849
 
843
850
  class ListColumnComponent {