Open michelebombardi opened 6 years ago
@bm-software You can import as shown below (as a temporary workaround)
import { CalendarDragHelper } from 'angular-calendar/esm2015/modules/common/calendar-drag-helper.provider';
import { CalendarResizeHelper } from 'angular-calendar/esm2015/modules/common/calendar-resize-helper.provider';
@halilibrahim Thank you very much!
Hi, with version 0.30.1
I run into this issue again.
I was able to import CalendarResizeHelper
and CalendarDragHelper
in this way:
import { CalendarDragHelper } from 'angular-calendar/modules/common/calendar-drag-helper.provider';
import { CalendarResizeHelper } from 'angular-calendar/modules/common/calendar-resize-helper.provider';
but when I try to build my library it says:
./lib/modules/scheduler/calendar-scheduler-view.component.ts:3:0-99 - Error: Module not found: Error: Package path ./modules/common/calendar-drag-helper.provider is not exported from package E:\Programmazione\Projects\NodeJsProjects\angular-calendar-scheduler\node_modules\angular-calendar (see exports field in E:\Programmazione\Projects\NodeJsProjects\angular-calendar-scheduler\node_modules\angular-calendar\package.json)
./lib/modules/scheduler/calendar-scheduler-view.component.ts:4:0-103 - Error: Module not found: Error: Package path ./modules/common/calendar-resize-helper.provider is not exported from package E:\Programmazione\Projects\NodeJsProjects\angular-calendar-scheduler\node_modules\angular-calendar (see exports field in E:\Programmazione\Projects\NodeJsProjects\angular-calendar-scheduler\node_modules\angular-calendar\package.json)
Is there any solution?
@michelebombardi I ran into the same issue. Seems like CalendarDragHelper and CalendarResizeHelper are meant to be only internal to angular-calendar, not to be used by us. That's why they are not exported from CalendarCommonModule.
You have three options now: 1) Contribute with a pull request to angular-calendar and see if @mattlewis92 accepts it. Then pull the new version into your project. (Content of the pull request would be to add CalendarDragHelper and CalendarResizeHelper to the exports of CalendarCommonModule) 2) Fork the project, make the change described in (1), and in your project use your own fork instead of the official release of angular-calendar. 3) Quick and dirty: Copy the source code files CalendarDragHelper and CalendarResizeHelper into your project. Change the imports to point to your local copies instead of the library. (May take multiple iterations, in case you need to copy other files that these two depend on.)
Legal disclaimer: As far as I understand the MIT license this project is published under, copying the code is allowed. But don't take my word for it, check for yourself.
I'm trying to implement my own drag and resize featured component but when I try to import
CalendarResizeHelper
andCalendarDragHelper
in this way:the angular compiler returns the following errors:
In the previsous version of your library I didn't experienced this problem. How can I import those components now?
To reproduce the issue: try to import
CalendarResizeHelper
andCalendarDragHelper
as snown above.Versions
@angular/core
: 6.0.3angular-calendar
: 0.26.0