@spartan-ng/brain 1.9.0-beta.4 → 1.9.1-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.
@@ -79,6 +79,10 @@ const defaultCalendarI18n = {
79
79
  },
80
80
  labelPrevious: () => 'Go to the previous month',
81
81
  labelNext: () => 'Go to the next month',
82
+ labelPreviousYear: () => 'Go to the previous year',
83
+ labelNextYear: () => 'Go to the next year',
84
+ labelPreviousYears: () => 'Go to the previous years',
85
+ labelNextYears: () => 'Go to the next years',
82
86
  labelWeekday: (index) => {
83
87
  const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
84
88
  return weekdays[index];
@@ -1648,8 +1652,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
1648
1652
  class BrnMonthYearCalendarNextButton {
1649
1653
  /** Access the month/year selector */
1650
1654
  _monthYear = injectBrnMonthYearCalendar();
1655
+ /** Access the calendar i18n */
1656
+ _i18n = injectBrnCalendarI18n();
1651
1657
  _disabled = computed(() => this._monthYear.isNextDisabled(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
1652
- _label = computed(() => this._monthYear.view() === 'month' ? 'Go to the next year' : 'Go to the next years', ...(ngDevMode ? [{ debugName: "_label" }] : /* istanbul ignore next */ []));
1658
+ _label = computed(() => {
1659
+ const config = this._i18n.config();
1660
+ return this._monthYear.view() === 'month'
1661
+ ? (config.labelNextYear?.() ?? 'Go to the next year')
1662
+ : (config.labelNextYears?.() ?? 'Go to the next years');
1663
+ }, ...(ngDevMode ? [{ debugName: "_label" }] : /* istanbul ignore next */ []));
1653
1664
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnMonthYearCalendarNextButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1654
1665
  /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnMonthYearCalendarNextButton, isStandalone: true, selector: "button[brnMonthYearCalendarNextButton]", host: { attributes: { "type": "button", "data-slot": "month-year-next-button" }, listeners: { "click": "_monthYear.goToNext()" }, properties: { "attr.aria-label": "_label()", "attr.aria-disabled": "_disabled() ? true : null", "disabled": "_disabled()" } }, exportAs: ["brnMonthYearCalendarNextButton"], ngImport: i0 });
1655
1666
  }
@@ -1672,8 +1683,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
1672
1683
  class BrnMonthYearCalendarPreviousButton {
1673
1684
  /** Access the month/year selector */
1674
1685
  _monthYear = injectBrnMonthYearCalendar();
1686
+ /** Access the calendar i18n */
1687
+ _i18n = injectBrnCalendarI18n();
1675
1688
  _disabled = computed(() => this._monthYear.isPreviousDisabled(), ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
1676
- _label = computed(() => this._monthYear.view() === 'month' ? 'Go to the previous year' : 'Go to the previous years', ...(ngDevMode ? [{ debugName: "_label" }] : /* istanbul ignore next */ []));
1689
+ _label = computed(() => {
1690
+ const config = this._i18n.config();
1691
+ return this._monthYear.view() === 'month'
1692
+ ? (config.labelPreviousYear?.() ?? 'Go to the previous year')
1693
+ : (config.labelPreviousYears?.() ?? 'Go to the previous years');
1694
+ }, ...(ngDevMode ? [{ debugName: "_label" }] : /* istanbul ignore next */ []));
1677
1695
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnMonthYearCalendarPreviousButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1678
1696
  /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: BrnMonthYearCalendarPreviousButton, isStandalone: true, selector: "button[brnMonthYearCalendarPreviousButton]", host: { attributes: { "type": "button", "data-slot": "month-year-previous-button" }, listeners: { "click": "_monthYear.goToPrevious()" }, properties: { "attr.aria-label": "_label()", "attr.aria-disabled": "_disabled() ? true : null", "disabled": "_disabled()" } }, exportAs: ["brnMonthYearCalendarPreviousButton"], ngImport: i0 });
1679
1697
  }