@clr/angular 15.7.0 → 15.8.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.
@@ -4783,14 +4783,11 @@ class WrappedFormControl {
4783
4783
  this.subscriptions = [];
4784
4784
  this.renderer = renderer;
4785
4785
  this.el = el;
4786
- try {
4787
- this.ngControlService = injector.get(NgControlService);
4788
- this.ifControlStateService = injector.get(IfControlStateService);
4789
- this.controlClassService = injector.get(ControlClassService);
4790
- this.markControlService = injector.get(MarkControlService);
4791
- }
4792
- catch (e) {
4793
- // Swallow errors
4786
+ if (injector) {
4787
+ this.ngControlService = injector.get(NgControlService, null);
4788
+ this.ifControlStateService = injector.get(IfControlStateService, null);
4789
+ this.controlClassService = injector.get(ControlClassService, null);
4790
+ this.markControlService = injector.get(MarkControlService, null);
4794
4791
  }
4795
4792
  if (this.controlClassService) {
4796
4793
  this.controlClassService.initControlClass(renderer, el.nativeElement);
@@ -4818,15 +4815,10 @@ class WrappedFormControl {
4818
4815
  ngOnInit() {
4819
4816
  this._containerInjector = new HostWrapper(this.wrapperType, this.vcr, this.index);
4820
4817
  this.controlIdService = this._containerInjector.get(ControlIdService);
4821
- try {
4822
- this.containerIdService = this._containerInjector.get(ContainerIdService);
4823
- }
4824
- catch (_injectorError) {
4825
- /**
4826
- * We suppress error, not all containers will provide `ContainerIdService` so
4827
- * there could be exception that is not provided.
4828
- */
4829
- }
4818
+ /**
4819
+ * not all containers will provide `ContainerIdService`
4820
+ */
4821
+ this.containerIdService = this._containerInjector.get(ContainerIdService, null);
4830
4822
  if (this._id) {
4831
4823
  this.controlIdService.id = this._id;
4832
4824
  }
@@ -7462,6 +7454,7 @@ ClrDatalistContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
7462
7454
  <div class="clr-input-group" [class.clr-focus]="focus">
7463
7455
  <ng-content select="[clrDatalistInput]"></ng-content>
7464
7456
  <ng-content select="datalist"></ng-content>
7457
+ <cds-icon shape="angle" class="clr-datalist-caret" direction="down"></cds-icon>
7465
7458
  </div>
7466
7459
  <cds-icon
7467
7460
  *ngIf="showInvalid"
@@ -7495,6 +7488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
7495
7488
  <div class="clr-input-group" [class.clr-focus]="focus">
7496
7489
  <ng-content select="[clrDatalistInput]"></ng-content>
7497
7490
  <ng-content select="datalist"></ng-content>
7491
+ <cds-icon shape="angle" class="clr-datalist-caret" direction="down"></cds-icon>
7498
7492
  </div>
7499
7493
  <cds-icon
7500
7494
  *ngIf="showInvalid"
@@ -13602,7 +13596,7 @@ class ClrSignpost {
13602
13596
  ClrSignpost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrSignpost, deps: [{ token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
13603
13597
  ClrSignpost.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrSignpost, selector: "clr-signpost", host: { properties: { "class.signpost": "true" } }, providers: [SignpostFocusManager, SignpostIdService], queries: [{ propertyName: "customTrigger", first: true, predicate: ClrSignpostTrigger, descendants: true }], hostDirectives: [{ directive: ClrPopoverHostDirective }], ngImport: i0, template: `
13604
13598
  <ng-container *ngIf="!useCustomTrigger">
13605
- <button type="button" class="signpost-action btn btn-small btn-link" clrSignpostTrigger>
13599
+ <button type="button" class="signpost-action btn btn-small btn-icon btn-link" clrSignpostTrigger>
13606
13600
  <cds-icon shape="info-circle" [attr.title]="commonStrings.keys.info"></cds-icon>
13607
13601
  </button>
13608
13602
  </ng-container>
@@ -13615,7 +13609,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
13615
13609
  selector: 'clr-signpost',
13616
13610
  template: `
13617
13611
  <ng-container *ngIf="!useCustomTrigger">
13618
- <button type="button" class="signpost-action btn btn-small btn-link" clrSignpostTrigger>
13612
+ <button type="button" class="signpost-action btn btn-small btn-icon btn-link" clrSignpostTrigger>
13619
13613
  <cds-icon shape="info-circle" [attr.title]="commonStrings.keys.info"></cds-icon>
13620
13614
  </button>
13621
13615
  </ng-container>
@@ -17370,7 +17364,10 @@ class ClrStackBlock {
17370
17364
  addChild() {
17371
17365
  this.expandable = true;
17372
17366
  }
17373
- toggleExpand() {
17367
+ toggleExpand(event) {
17368
+ if (eventIsInputEvent(event)) {
17369
+ return;
17370
+ }
17374
17371
  if (this.expandable) {
17375
17372
  this.expanded = !this.expanded;
17376
17373
  this.expandedChange.emit(this.expanded);
@@ -17379,6 +17376,12 @@ class ClrStackBlock {
17379
17376
  getStackChildrenId() {
17380
17377
  return this.expanded ? `clr-stack-children-${this.uniqueId}` : null;
17381
17378
  }
17379
+ preventDefaultIfNotInputEvent(event) {
17380
+ if (eventIsInputEvent(event)) {
17381
+ return;
17382
+ }
17383
+ event.preventDefault();
17384
+ }
17382
17385
  }
17383
17386
  ClrStackBlock.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.2", ngImport: i0, type: ClrStackBlock, deps: [{ token: ClrStackBlock, optional: true, skipSelf: true }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
17384
17387
  ClrStackBlock.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.2", type: ClrStackBlock, selector: "clr-stack-block", inputs: { expanded: ["clrSbExpanded", "expanded"], expandable: ["clrSbExpandable", "expandable"], ariaLevel: ["clrStackViewLevel", "ariaLevel"], setChangedValue: ["clrSbNotifyChange", "setChangedValue"] }, outputs: { expandedChange: "clrSbExpandedChange" }, host: { properties: { "class.stack-block": "true", "attr.role": "\"heading\"", "attr.aria-level": "headingLevel", "class.stack-block-expanded": "this.expanded", "class.stack-block-expandable": "this.expandable", "class.stack-block-changed": "this.getChangedValue", "class.on-focus": "this.onStackLabelFocus" } }, queries: [{ propertyName: "stackBlockTitle", first: true, predicate: ClrStackViewLabel, descendants: true }], ngImport: i0, template: `
@@ -17386,10 +17389,10 @@ ClrStackBlock.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
17386
17389
  from scrolling when a stack block is toggled via the space key. -->
17387
17390
  <div
17388
17391
  class="stack-block-label"
17389
- (click)="toggleExpand()"
17390
- (keyup.enter)="toggleExpand()"
17391
- (keyup.space)="toggleExpand()"
17392
- (keydown.space)="$event.preventDefault()"
17392
+ (click)="toggleExpand($event)"
17393
+ (keyup.enter)="toggleExpand($event)"
17394
+ (keyup.space)="toggleExpand($event)"
17395
+ (keydown.space)="preventDefaultIfNotInputEvent($event)"
17393
17396
  (focus)="focused = true"
17394
17397
  (blur)="focused = false"
17395
17398
  [id]="uniqueId"
@@ -17429,10 +17432,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
17429
17432
  from scrolling when a stack block is toggled via the space key. -->
17430
17433
  <div
17431
17434
  class="stack-block-label"
17432
- (click)="toggleExpand()"
17433
- (keyup.enter)="toggleExpand()"
17434
- (keyup.space)="toggleExpand()"
17435
- (keydown.space)="$event.preventDefault()"
17435
+ (click)="toggleExpand($event)"
17436
+ (keyup.enter)="toggleExpand($event)"
17437
+ (keyup.space)="toggleExpand($event)"
17438
+ (keydown.space)="preventDefaultIfNotInputEvent($event)"
17436
17439
  (focus)="focused = true"
17437
17440
  (blur)="focused = false"
17438
17441
  [id]="uniqueId"
@@ -17504,6 +17507,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.2", ngImpor
17504
17507
  type: HostBinding,
17505
17508
  args: ['class.on-focus']
17506
17509
  }] } });
17510
+ function eventIsInputEvent(event) {
17511
+ const targetElement = event?.target;
17512
+ return targetElement?.tagName === 'INPUT';
17513
+ }
17507
17514
 
17508
17515
  /*
17509
17516
  * Copyright (c) 2016-2023 VMware, Inc. All Rights Reserved.