hsuanxyz / ion2-calendar

📅 A date picker components for ionic2 /ionic3 / ionic4
https://hsuanxyz.github.io/demo/ion2-calendar/
MIT License
555 stars 278 forks source link

ngc compiler issues #186

Open Sonaryr opened 6 years ago

Sonaryr commented 6 years ago

Ionic version: (check one with "x") [ ] 2.x [x] 3.x [ ] 4.x

Ion2-calendar mode: (check one with "x") [ ] components mode [x] modal mode

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] help me

Current behavior: when running ngc it complains on the library:

Error at /Users/maarten/dev/git/ays/fe/hybrid/node_modules/ion2-calendar/dist/components/calendar.component.d.ts.CalendarComponent.html(3,20): Property '_showMonthPicker' is private and only accessible within class 'CalendarComponent'.
Error at /Users/maarten/dev/git/ays/fe/hybrid/node_modules/ion2-calendar/dist/components/calendar.component.d.ts.CalendarComponent.html(19,20): Property '_showToggleButtons' is private and only accessible within class 'CalendarComponent'.
Error at /Users/maarten/dev/git/ays/fe/hybrid/node_modules/ion2-calendar/dist/components/calendar.component.d.ts.CalendarComponent.html(28,18): Property '_view' is private and only accessible within class 'CalendarComponent'.

Expected behavior: No issues when compiling

Steps to reproduce:

  1. Add calendar in modal mode
  2. run ngc

Related code:

showPeriodPicker(): void {
    const calendarOptions: CalendarModalOptions = {
      closeIcon: true,
      doneIcon: true,
      pickMode: this.isDateRangeRequest ? pickModes.RANGE : pickModes.SINGLE,
      from: this.minDate,
      to: this.maxDate,
      weekStart: 1,
      defaultScrollTo: this.selectedStartDate,
      title: 'Calendar'
    };

    if (this.isDateRangeRequest) {
      calendarOptions.defaultDateRange = {
        from: this.selectedStartDate,
        to: this.selectedEndDate
      };
    } else {
      calendarOptions.defaultDate = this.selectedStartDate;
    }

    const myCalendar = this.modalCtrl.create(CalendarModal, {
      options: calendarOptions
    }, {
      showBackdrop: true,
      enableBackdropDismiss: true,
      cssClass: 'ays-calendar-modal'
    });

    myCalendar.onDidDismiss(this.parseDismiss.bind(this));

    myCalendar.present();
}

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: (/Users/maarten/.nvm/versions/node/v8.11.2/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : MyApplication android 6.3.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2 
    Node       : v8.11.2
    npm        : 5.6.0 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro