@skyux/code-examples 12.0.0-alpha.4 → 12.0.0-alpha.5

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.
@@ -6571,24 +6571,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
6571
6571
  }] });
6572
6572
 
6573
6573
  class FlyoutCustomHeadersExampleComponent {
6574
+ constructor() {
6575
+ this.recordNumber = 0;
6576
+ this.#flyoutSvc = inject(SkyFlyoutService);
6577
+ }
6578
+ primaryActionCallback() {
6579
+ alert('Primary action clicked!');
6580
+ }
6574
6581
  #flyout;
6575
- #flyoutSvc = inject(SkyFlyoutService);
6582
+ #flyoutSvc;
6576
6583
  openFlyoutWithIterators() {
6577
6584
  this.#flyout = this.#flyoutSvc.open(FlyoutComponent, {
6578
6585
  ariaLabelledBy: 'flyout-title',
6579
6586
  ariaRole: 'dialog',
6580
6587
  showIterator: true,
6588
+ iteratorNextButtonDisabled: this.#nextButtonDisabled(),
6589
+ iteratorPreviousButtonDisabled: this.#previousButtonDisabled(),
6581
6590
  });
6582
6591
  this.#flyout.iteratorNextButtonClick.subscribe(() => {
6583
6592
  alert('Next iterator button clicked!');
6593
+ this.recordNumber += 1;
6594
+ this.#flyout.iteratorNextButtonDisabled = this.#nextButtonDisabled();
6595
+ this.#flyout.iteratorPreviousButtonDisabled =
6596
+ this.#previousButtonDisabled();
6584
6597
  });
6585
6598
  this.#flyout.iteratorPreviousButtonClick.subscribe(() => {
6586
6599
  alert('Previous iterator button clicked!');
6600
+ this.recordNumber -= 1;
6601
+ this.#flyout.iteratorNextButtonDisabled = this.#nextButtonDisabled();
6602
+ this.#flyout.iteratorPreviousButtonDisabled =
6603
+ this.#previousButtonDisabled();
6587
6604
  });
6588
6605
  this.#flyout.closed.subscribe(() => {
6589
6606
  this.#flyout = undefined;
6590
6607
  });
6591
6608
  }
6609
+ openFlyoutWithPrimaryAction() {
6610
+ this.#flyout = this.#flyoutSvc.open(FlyoutComponent, {
6611
+ ariaLabelledBy: 'flyout-title',
6612
+ ariaRole: 'dialog',
6613
+ primaryAction: {
6614
+ label: 'Save',
6615
+ callback: () => {
6616
+ this.primaryActionCallback();
6617
+ },
6618
+ },
6619
+ });
6620
+ }
6592
6621
  openFlyoutWithRoutePermalink() {
6593
6622
  this.#flyout = this.#flyoutSvc.open(FlyoutComponent, {
6594
6623
  ariaLabelledBy: 'flyout-title',
@@ -6623,12 +6652,18 @@ class FlyoutCustomHeadersExampleComponent {
6623
6652
  this.#flyout = undefined;
6624
6653
  });
6625
6654
  }
6655
+ #nextButtonDisabled() {
6656
+ return this.recordNumber >= 3;
6657
+ }
6658
+ #previousButtonDisabled() {
6659
+ return this.recordNumber <= 0;
6660
+ }
6626
6661
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FlyoutCustomHeadersExampleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6627
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FlyoutCustomHeadersExampleComponent, isStandalone: true, selector: "app-flyout-custom-headers-example", ngImport: i0, template: "<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithUrlPermalink()\"\n>\n Open flyout with a URL permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithRoutePermalink()\"\n>\n Open flyout with an Angular routing permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithIterators()\"\n>\n Open flyout with iterators\n</button>\n" }); }
6662
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FlyoutCustomHeadersExampleComponent, isStandalone: true, selector: "app-flyout-custom-headers-example", ngImport: i0, template: "<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithUrlPermalink()\"\n>\n Open flyout with a URL permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithRoutePermalink()\"\n>\n Open flyout with an Angular routing permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithIterators()\"\n>\n Open flyout with iterators\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithPrimaryAction()\"\n>\n Open flyout with primary action\n</button>\n" }); }
6628
6663
  }
6629
6664
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FlyoutCustomHeadersExampleComponent, decorators: [{
6630
6665
  type: Component,
6631
- args: [{ standalone: true, selector: 'app-flyout-custom-headers-example', template: "<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithUrlPermalink()\"\n>\n Open flyout with a URL permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithRoutePermalink()\"\n>\n Open flyout with an Angular routing permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithIterators()\"\n>\n Open flyout with iterators\n</button>\n" }]
6666
+ args: [{ standalone: true, selector: 'app-flyout-custom-headers-example', template: "<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithUrlPermalink()\"\n>\n Open flyout with a URL permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithRoutePermalink()\"\n>\n Open flyout with an Angular routing permalink\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithIterators()\"\n>\n Open flyout with iterators\n</button>\n\n<button\n class=\"sky-btn sky-btn-default sky-margin-inline-sm\"\n type=\"button\"\n (click)=\"openFlyoutWithPrimaryAction()\"\n>\n Open flyout with primary action\n</button>\n" }]
6632
6667
  }] });
6633
6668
 
6634
6669
  class ErrorsErrorEmbeddedExampleComponent {
@@ -9447,7 +9482,7 @@ class LookupCountryFieldBasicExampleComponent {
9447
9482
  });
9448
9483
  }
9449
9484
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LookupCountryFieldBasicExampleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9450
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LookupCountryFieldBasicExampleComponent, isStandalone: true, selector: "app-lookup-country-field-basic-example", ngImport: i0, template: "<form [formGroup]=\"countryForm\">\n <sky-input-box\n data-sky-id=\"country-field\"\n hintText=\"If you have multiple countries, choose your primary country.\"\n labelText=\"Country\"\n [helpPopoverContent]=\"helpPopoverContent\"\n >\n <sky-country-field formControlName=\"country\" />\n @if (countryControl.errors?.['invalidCountry']) {\n <sky-form-error\n errorName=\"invalidCountry\"\n errorText=\"This country is no longer available for the date you selected.\"\n />\n }\n </sky-input-box>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SkyCountryFieldModule }, { kind: "component", type: i3$3.λ3, selector: "sky-country-field", inputs: ["autocompleteAttribute", "defaultCountry", "disabled", "hideSelectedCountryFlag", "includePhoneInfo", "supportedCountryISOs"], outputs: ["selectedCountryChange"] }, { kind: "ngmodule", type: SkyInputBoxModule }, { kind: "component", type: i2.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled", "labelText", "characterLimit", "stacked", "helpPopoverTitle", "helpPopoverContent", "helpKey", "hintText"] }, { kind: "component", type: i2.λ22, selector: "sky-form-error", inputs: ["errorName", "errorText"] }] }); }
9485
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: LookupCountryFieldBasicExampleComponent, isStandalone: true, selector: "app-lookup-country-field-basic-example", ngImport: i0, template: "<form [formGroup]=\"countryForm\">\n <sky-input-box\n data-sky-id=\"country-field\"\n hintText=\"If you have multiple countries, choose your primary country.\"\n labelText=\"Country\"\n [helpPopoverContent]=\"helpPopoverContent\"\n >\n <sky-country-field formControlName=\"country\" />\n @if (countryControl.errors?.['invalidCountry']) {\n <sky-form-error\n errorName=\"invalidCountry\"\n errorText=\"This country is no longer available for the date you selected.\"\n />\n }\n </sky-input-box>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: SkyCountryFieldModule }, { kind: "component", type: i3$3.λ3, selector: "sky-country-field", inputs: ["autocompleteAttribute", "defaultCountry", "disabled", "includePhoneInfo", "supportedCountryISOs"], outputs: ["selectedCountryChange"] }, { kind: "ngmodule", type: SkyInputBoxModule }, { kind: "component", type: i2.λ10, selector: "sky-input-box", inputs: ["hasErrors", "disabled", "labelText", "characterLimit", "stacked", "helpPopoverTitle", "helpPopoverContent", "helpKey", "hintText"] }, { kind: "component", type: i2.λ22, selector: "sky-form-error", inputs: ["errorName", "errorText"] }] }); }
9451
9486
  }
9452
9487
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: LookupCountryFieldBasicExampleComponent, decorators: [{
9453
9488
  type: Component,