diff --git a/angular.json b/angular.json index e15a426..116539f 100644 --- a/angular.json +++ b/angular.json @@ -27,8 +27,6 @@ "src/assets" ], "styles": [ - "node_modules/boosted/dist/css/orangeHelvetica.css", - "node_modules/boosted/dist/css/orangeIcons.css", "node_modules/boosted/scss/boosted.scss", "dist/ng-boosted/style/ng-boosted.scss", "src/styles.scss" @@ -101,8 +99,6 @@ "tsConfig": "src/tsconfig.spec.json", "karmaConfig": "src/karma.conf.js", "styles": [ - "node_modules/boosted/dist/css/orangeHelvetica.css", - "node_modules/boosted/dist/css/orangeIcons.css", "node_modules/boosted/scss/boosted.scss", "dist/ng-boosted/style/ng-boosted.scss", "src/styles.scss" diff --git a/package-lock.json b/package-lock.json index 6225ab4..68d388a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1939,12 +1939,12 @@ } }, "@ng-bootstrap/ng-bootstrap": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-9.1.1.tgz", - "integrity": "sha512-m31qKJylYueXm+a3YEoOfnrJYR1lovb7WgaQwvXQz3dDmtaYRX4n8aPeCMp1VrI7hFfFITKWo0GxPaI3JIFk4w==", + "version": "11.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-11.0.0-beta.2.tgz", + "integrity": "sha512-H6Kdzw4DBsUIrlvoxEJHCValSTHq0XcsiTVNbb99PjgD6ZhkBjINenT0W62A91k0nQEQBZCjhGGv+aNU/XxQNg==", "dev": true, "requires": { - "tslib": "^2.0.0" + "tslib": "^2.1.0" } }, "@ngtools/webpack": { @@ -3283,9 +3283,9 @@ "dev": true }, "boosted": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/boosted/-/boosted-4.6.0.tgz", - "integrity": "sha512-4/g6tvNpczfhDmj/F7WAq/lXaXZcfSkT2j0AboMgyKQ1Dz7kQsXft+zST0Kd8rDByT8GmeDKOpMOksEYq47b+g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/boosted/-/boosted-5.0.1.tgz", + "integrity": "sha512-R2cnovZt6rODvULDoRXtPoPkSE5VAo3cFX2bK+QTJSSgb8yrhefZ9QDFtsa3nAHdqHT6iOECL72IKvo7l3aPuA==", "dev": true }, "brace-expansion": { diff --git a/package.json b/package.json index 3fe5243..7f4c817 100644 --- a/package.json +++ b/package.json @@ -40,12 +40,12 @@ "@angular/platform-browser": "~12.1.1", "@angular/platform-browser-dynamic": "~12.1.1", "@angular/router": "~12.1.1", - "@ng-bootstrap/ng-bootstrap": "^9.1.1", + "@ng-bootstrap/ng-bootstrap": "^11.0.0-beta.2", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.8", "@types/node": "^14.6.4", "acorn": "^8.0.1", - "boosted": "^4.6.0", + "boosted": "^5.0.0", "classlist.js": "^1.1.20150312", "codelyzer": "^6.0.0", "core-js": "^2.5.4", diff --git a/src/app/demos/datepicker.component.ts b/src/app/demos/datepicker.component.ts index ce4eefb..9a9993d 100644 --- a/src/app/demos/datepicker.component.ts +++ b/src/app/demos/datepicker.component.ts @@ -17,34 +17,34 @@ const I18N_VALUES = { } // Define custom service providing the months and weekdays translations -@Injectable() -export class CustomDatepickerI18n extends NgbDatepickerI18n { - constructor(private _i18n: I18n) { - super(); - } - public getWeekdayShortName(weekday: number): string { - return I18N_VALUES[this._i18n.language].weekdays[weekday - 1]; - } - public getMonthShortName(month: number): string { - return I18N_VALUES[this._i18n.language].months[month - 1]; - } - public getMonthFullName(month: number): string { - return this.getMonthShortName(month); - } - public getDayAriaLabel(date: NgbDateStruct): string { - const newDate = new Date(date.year, date.month - 1, date.day); - let newDay = newDate.getDay(); - newDay = newDay === 0 ? 7 : newDay; - const day = this.getWeekdayShortName(newDay); - return day + ' ' + `${date.day}-${date.month}-${date.year}`; - } -} +// @Injectable() +// export class CustomDatepickerI18n extends NgbDatepickerI18n { +// constructor(private _i18n: I18n) { +// super(); +// } +// public getWeekdayShortName(weekday: number): string { +// return I18N_VALUES[this._i18n.language].weekdays[weekday - 1]; +// } +// public getMonthShortName(month: number): string { +// return I18N_VALUES[this._i18n.language].months[month - 1]; +// } +// public getMonthFullName(month: number): string { +// return this.getMonthShortName(month); +// } +// public getDayAriaLabel(date: NgbDateStruct): string { +// const newDate = new Date(date.year, date.month - 1, date.day); +// let newDay = newDate.getDay(); +// newDay = newDay === 0 ? 7 : newDay; +// const day = this.getWeekdayShortName(newDay); +// return day + ' ' + `${date.day}-${date.month}-${date.year}`; +// } +// } @Component({ selector: 'demo-datepicker', templateUrl: './datepicker.component.html', styleUrls: ['./datepicker.component.scss'], - providers: [I18n, {provide: NgbDatepickerI18n, useClass: CustomDatepickerI18n}] + providers: [I18n] }) export class DemoDatepickerComponent { public model1; diff --git a/src/app/demos/o-calendar.component.ts b/src/app/demos/o-calendar.component.ts index dbf1499..d0b15f8 100644 --- a/src/app/demos/o-calendar.component.ts +++ b/src/app/demos/o-calendar.component.ts @@ -17,32 +17,32 @@ const I18N_VALUES = { } // Define custom service providing the months and weekdays translations -@Injectable() -export class CustomDatepickerI18n extends NgbDatepickerI18n { +// @Injectable() +// export class CustomDatepickerI18n extends NgbDatepickerI18n { -constructor(private _i18n: I18n) { - super(); -} +// constructor(private _i18n: I18n) { +// super(); +// } -public getWeekdayShortName(weekday: number): string { - return I18N_VALUES[this._i18n.language].weekdays[weekday - 1]; -} -public getMonthShortName(month: number): string { - return I18N_VALUES[this._i18n.language].months[month - 1]; -} -public getMonthFullName(month: number): string { - return this.getMonthShortName(month); -} -public getDayAriaLabel(date: NgbDateStruct): string { - return `${date.day}-${date.month}-${date.year}`; - } -} +// public getWeekdayShortName(weekday: number): string { +// return I18N_VALUES[this._i18n.language].weekdays[weekday - 1]; +// } +// public getMonthShortName(month: number): string { +// return I18N_VALUES[this._i18n.language].months[month - 1]; +// } +// public getMonthFullName(month: number): string { +// return this.getMonthShortName(month); +// } +// public getDayAriaLabel(date: NgbDateStruct): string { +// return `${date.day}-${date.month}-${date.year}`; +// } +// } @Component({ selector: 'demo-o-calendar', styles: [], templateUrl: './o-calendar.component.html', - providers: [I18n, {provide: NgbDatepickerI18n, useClass: CustomDatepickerI18n}] + providers: [I18n] }) export class DemoOCalendarComponent { public model: NgbDateStruct;