Skip to content

Commit c183644

Browse files
committed
refactor: move tests inline with source files
1 parent 0506b6d commit c183644

File tree

66 files changed

+173
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+173
-172
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ This library is not optimised for mobile. Due to the complex nature of a calenda
141141
All parts of this calendar can be customised via the use of an `ng-template`. The recipe for applying one is as follows:
142142

143143
- Find the template you would like to customise for the month, week or day view component. You can find all available custom templates by reading the [documentation](https://mattlewis92.github.io/angular-calendar/docs/) for each component. For this example we will pick the [`cellTemplate`](https://mattlewis92.github.io/angular-calendar/docs/components/CalendarMonthViewComponent.html#cellTemplate) from the month view.
144-
- Next find the corresponding child component that will render the template by viewing the source. For our example of the month view cell it is [this component](https://github.com/mattlewis92/angular-calendar/blob/main/projects/angular-calendar/src/modules/month/calendar-month-cell.component.ts)
144+
- Next find the corresponding child component that will render the template by viewing the source. For our example of the month view cell it is [this component](https://github.com/mattlewis92/angular-calendar/blob/main/projects/angular-calendar/src/modules/month/calendar-month-view/calendar-month-cell/calendar-month-cell.component.ts)
145145
- Now copy the [template source](https://github.com/mattlewis92/angular-calendar/blob/be842da460a803ebb570418bc10e11fab56bd7b9/projects/angular-calendar/src/modules/month/calendar-month-cell.component.ts#L15-L72) for your chosen template into your own component and modify as your see fit.
146146
- Finally pass the template to the components input: `<mwl-calendar-month-view [cellTemplate]="cellTemplateId" />`
147147
- You can see an e2e working example of this [here](https://mattlewis92.github.io/angular-calendar/#/custom-templates)

angular.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"test": {
128128
"builder": "@angular-devkit/build-angular:karma",
129129
"options": {
130-
"main": "projects/angular-calendar/test/entry.ts",
130+
"main": "projects/angular-calendar/src/test-entry.ts",
131131
"tsConfig": "projects/angular-calendar/tsconfig.spec.json",
132132
"karmaConfig": "projects/angular-calendar/karma.conf.ts",
133133
"sourceMap": true,

projects/angular-calendar/src/angular-calendar.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@import './modules/month/calendar-month-view';
2-
@import './modules/week/calendar-week-view';
3-
@import './modules/day/calendar-day-view';
4-
@import './modules/common/calendar-tooltip';
1+
@import 'modules/month/calendar-month-view/calendar-month-view';
2+
@import 'modules/week/calendar-week-view/calendar-week-view';
3+
@import 'modules/day/calendar-day-view/calendar-day-view';
4+
@import 'modules/common/calendar-tooltip/calendar-tooltip';
55

66
@mixin cal-theme($overrides) {
77
@include cal-month-view-theme($overrides);

projects/angular-calendar/test/calendar-module.spec.ts renamed to projects/angular-calendar/src/modules/calendar-module.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
CalendarMomentDateFormatter,
88
MOMENT,
99
DateAdapter,
10-
} from '../src';
11-
import { adapterFactory } from '../src/date-adapters/date-fns';
10+
} from 'angular-calendar';
11+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
1212

1313
describe('calendar module', () => {
1414
it('should not require providers to be specified when using CalendarModule.forRoot()', () => {

projects/angular-calendar/src/modules/calendar.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { CalendarMonthModule } from './month/calendar-month.module';
1010
import { CalendarWeekModule } from './week/calendar-week.module';
1111
import { CalendarDayModule } from './day/calendar-day.module';
12-
import { CalendarUtils } from './common/calendar-utils.provider';
12+
import { CalendarUtils } from './common/calendar-utils/calendar-utils.provider';
1313

1414
export * from './common/calendar-common.module';
1515
export * from './month/calendar-month.module';

projects/angular-calendar/test/calendar-a11y.pipe.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-a11y/calendar-a11y.pipe.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component } from '@angular/core';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { expect } from 'chai';
4-
import { A11yParams, CalendarModule, DateAdapter } from '../src';
5-
import { adapterFactory } from 'calendar-utils/date-adapters/date-fns';
4+
import { A11yParams, CalendarModule, DateAdapter } from 'angular-calendar';
5+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
66

77
@Component({
88
template: '{{ a11yParams | calendarA11y:method }}',

projects/angular-calendar/test/calendar-angular-date-formatter.provider.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-angular-date-formatter/calendar-angular-date-formatter.provider.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { inject, TestBed } from '@angular/core/testing';
22
import { expect } from 'chai';
33
import { startOfDay } from 'date-fns';
44
import localePl from '@angular/common/locales/pl';
5-
import { CalendarAngularDateFormatter, DateAdapter } from '../src';
6-
import { adapterFactory } from '../src/date-adapters/date-fns';
5+
import { CalendarAngularDateFormatter, DateAdapter } from 'angular-calendar';
6+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
77
import { registerLocaleData } from '@angular/common';
88

99
registerLocaleData(localePl);

projects/angular-calendar/src/modules/common/calendar-angular-date-formatter.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-angular-date-formatter/calendar-angular-date-formatter.provider.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {
22
CalendarDateFormatterInterface,
33
DateFormatterParams,
4-
} from './calendar-date-formatter.interface';
4+
} from '../calendar-date-formatter/calendar-date-formatter.interface';
55
import { formatDate } from '@angular/common';
66
import { Injectable } from '@angular/core';
7-
import { DateAdapter } from '../../date-adapters/date-adapter';
8-
import { getWeekViewPeriod } from './util';
7+
import { DateAdapter } from '../../../date-adapters/date-adapter';
8+
import { getWeekViewPeriod } from '../util/util';
99

1010
/**
1111
* This will use the angular date pipe to do all date formatting. It is the default date formatter used by the calendar.

projects/angular-calendar/test/common-module.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-common.module.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
CalendarDayViewComponent,
1212
MOMENT,
1313
DateAdapter,
14-
} from '../src';
15-
import { adapterFactory } from '../src/date-adapters/date-fns';
14+
} from 'angular-calendar';
15+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
1616

1717
describe('common module', () => {
1818
it('should not require providers to be specified when using CalendarCommonModule.forRoot()', () => {

projects/angular-calendar/src/modules/common/calendar-common.module.ts

+37-37
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { ModuleWithProviders, NgModule, Provider } from '@angular/core';
22
import { CommonModule, I18nPluralPipe } from '@angular/common';
3-
import { CalendarEventActionsComponent } from './calendar-event-actions.component';
4-
import { CalendarEventTitleComponent } from './calendar-event-title.component';
3+
import { CalendarEventActionsComponent } from './calendar-event-actions/calendar-event-actions.component';
4+
import { CalendarEventTitleComponent } from './calendar-event-title/calendar-event-title.component';
55
import {
66
CalendarTooltipDirective,
77
CalendarTooltipWindowComponent,
8-
} from './calendar-tooltip.directive';
9-
import { CalendarPreviousViewDirective } from './calendar-previous-view.directive';
10-
import { CalendarNextViewDirective } from './calendar-next-view.directive';
11-
import { CalendarTodayDirective } from './calendar-today.directive';
12-
import { CalendarDatePipe } from './calendar-date.pipe';
13-
import { CalendarEventTitlePipe } from './calendar-event-title.pipe';
14-
import { ClickDirective } from './click.directive';
15-
import { KeydownEnterDirective } from './keydown-enter.directive';
16-
import { CalendarEventTitleFormatter } from './calendar-event-title-formatter.provider';
17-
import { CalendarDateFormatter } from './calendar-date-formatter.provider';
18-
import { CalendarUtils } from './calendar-utils.provider';
19-
import { CalendarA11y } from './calendar-a11y.provider';
20-
import { CalendarA11yPipe } from './calendar-a11y.pipe';
8+
} from './calendar-tooltip/calendar-tooltip.directive';
9+
import { CalendarPreviousViewDirective } from './calendar-previous-view/calendar-previous-view.directive';
10+
import { CalendarNextViewDirective } from './calendar-next-view/calendar-next-view.directive';
11+
import { CalendarTodayDirective } from './calendar-today/calendar-today.directive';
12+
import { CalendarDatePipe } from './calendar-date/calendar-date.pipe';
13+
import { CalendarEventTitlePipe } from './calendar-event-title/calendar-event-title.pipe';
14+
import { ClickDirective } from './click/click.directive';
15+
import { KeydownEnterDirective } from './keydown-enter/keydown-enter.directive';
16+
import { CalendarEventTitleFormatter } from './calendar-event-title-formatter/calendar-event-title-formatter.provider';
17+
import { CalendarDateFormatter } from './calendar-date-formatter/calendar-date-formatter.provider';
18+
import { CalendarUtils } from './calendar-utils/calendar-utils.provider';
19+
import { CalendarA11y } from './calendar-a11y/calendar-a11y.provider';
20+
import { CalendarA11yPipe } from './calendar-a11y/calendar-a11y.pipe';
2121

2222
export interface CalendarModuleConfig {
2323
eventTitleFormatter?: Provider;
@@ -26,34 +26,34 @@ export interface CalendarModuleConfig {
2626
a11y?: Provider;
2727
}
2828

29-
export * from './calendar-event-title-formatter.provider';
30-
export * from './calendar-moment-date-formatter.provider';
31-
export * from './calendar-native-date-formatter.provider';
32-
export * from './calendar-angular-date-formatter.provider';
33-
export * from './calendar-date-formatter.provider';
34-
export * from './calendar-utils.provider';
35-
export * from './calendar-a11y.provider';
36-
export * from './calendar-a11y.interface';
37-
export * from './calendar-date-formatter.interface';
38-
export * from './calendar-event-times-changed-event.interface';
29+
export * from './calendar-event-title-formatter/calendar-event-title-formatter.provider';
30+
export * from './calendar-moment-date-formatter/calendar-moment-date-formatter.provider';
31+
export * from './calendar-native-date-formatter/calendar-native-date-formatter.provider';
32+
export * from './calendar-angular-date-formatter/calendar-angular-date-formatter.provider';
33+
export * from './calendar-date-formatter/calendar-date-formatter.provider';
34+
export * from './calendar-utils/calendar-utils.provider';
35+
export * from './calendar-a11y/calendar-a11y.provider';
36+
export * from './calendar-a11y/calendar-a11y.interface';
37+
export * from './calendar-date-formatter/calendar-date-formatter.interface';
38+
export * from './calendar-event-times-changed-event/calendar-event-times-changed-event.interface';
3939
export * from '../../date-adapters/date-adapter';
40-
export * from './calendar-view.enum';
40+
export * from './calendar-view/calendar-view.enum';
4141

4242
// needed for ivy, not part of the public api
43-
export { CalendarEventActionsComponent as ɵCalendarEventActionsComponent } from './calendar-event-actions.component';
44-
export { CalendarEventTitleComponent as ɵCalendarEventTitleComponent } from './calendar-event-title.component';
43+
export { CalendarEventActionsComponent as ɵCalendarEventActionsComponent } from './calendar-event-actions/calendar-event-actions.component';
44+
export { CalendarEventTitleComponent as ɵCalendarEventTitleComponent } from './calendar-event-title/calendar-event-title.component';
4545
export {
4646
CalendarTooltipDirective as ɵCalendarTooltipDirective,
4747
CalendarTooltipWindowComponent as ɵCalendarTooltipWindowComponent,
48-
} from './calendar-tooltip.directive';
49-
export { CalendarPreviousViewDirective as ɵCalendarPreviousViewDirective } from './calendar-previous-view.directive';
50-
export { CalendarNextViewDirective as ɵCalendarNextViewDirective } from './calendar-next-view.directive';
51-
export { CalendarTodayDirective as ɵCalendarTodayDirective } from './calendar-today.directive';
52-
export { CalendarDatePipe as ɵCalendarDatePipe } from './calendar-date.pipe';
53-
export { CalendarEventTitlePipe as ɵCalendarEventTitlePipe } from './calendar-event-title.pipe';
54-
export { ClickDirective as ɵClickDirective } from './click.directive';
55-
export { KeydownEnterDirective as ɵKeydownEnterDirective } from './keydown-enter.directive';
56-
export { CalendarA11yPipe as ɵCalendarA11yPipe } from './calendar-a11y.pipe';
48+
} from './calendar-tooltip/calendar-tooltip.directive';
49+
export { CalendarPreviousViewDirective as ɵCalendarPreviousViewDirective } from './calendar-previous-view/calendar-previous-view.directive';
50+
export { CalendarNextViewDirective as ɵCalendarNextViewDirective } from './calendar-next-view/calendar-next-view.directive';
51+
export { CalendarTodayDirective as ɵCalendarTodayDirective } from './calendar-today/calendar-today.directive';
52+
export { CalendarDatePipe as ɵCalendarDatePipe } from './calendar-date/calendar-date.pipe';
53+
export { CalendarEventTitlePipe as ɵCalendarEventTitlePipe } from './calendar-event-title/calendar-event-title.pipe';
54+
export { ClickDirective as ɵClickDirective } from './click/click.directive';
55+
export { KeydownEnterDirective as ɵKeydownEnterDirective } from './keydown-enter/keydown-enter.directive';
56+
export { CalendarA11yPipe as ɵCalendarA11yPipe } from './calendar-a11y/calendar-a11y.pipe';
5757

5858
export {
5959
CalendarEvent,

projects/angular-calendar/src/modules/common/calendar-date-formatter.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-date-formatter/calendar-date-formatter.provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CalendarAngularDateFormatter } from './calendar-angular-date-formatter.provider';
1+
import { CalendarAngularDateFormatter } from '../calendar-angular-date-formatter/calendar-angular-date-formatter.provider';
22
import { Injectable } from '@angular/core';
33

44
/**

projects/angular-calendar/test/calendar-date.pipe.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-date/calendar-date.pipe.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
CalendarMomentDateFormatter,
99
CalendarDateFormatter,
1010
MOMENT,
11-
} from '../src';
12-
import { adapterFactory } from '../src/date-adapters/date-fns';
11+
} from 'angular-calendar';
12+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
1313
import { DateAdapter } from 'angular-calendar';
1414

1515
@Component({

projects/angular-calendar/src/modules/common/calendar-date.pipe.ts renamed to projects/angular-calendar/src/modules/common/calendar-date/calendar-date.pipe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Pipe, PipeTransform, LOCALE_ID, Inject } from '@angular/core';
2-
import { CalendarDateFormatter } from './calendar-date-formatter.provider';
2+
import { CalendarDateFormatter } from '../calendar-date-formatter/calendar-date-formatter.provider';
33

44
/**
55
* This pipe is primarily for rendering the current view title. Example usage:

projects/angular-calendar/src/modules/common/calendar-drag-helper.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-drag-helper/calendar-drag-helper.provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isInsideLeftAndRight, isWithinThreshold } from './util';
1+
import { isInsideLeftAndRight, isWithinThreshold } from '../util/util';
22
import { ValidateDragParams } from 'angular-draggable-droppable';
33

44
export class CalendarDragHelper {

projects/angular-calendar/src/modules/common/calendar-event-actions.component.ts renamed to projects/angular-calendar/src/modules/common/calendar-event-actions/calendar-event-actions.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { CalendarEvent, EventAction } from 'calendar-utils';
2323
tabindex="0"
2424
role="button"
2525
[attr.aria-label]="
26-
{ action: action } | calendarA11y: 'actionButtonLabel'
26+
{ action: action } | calendarA11y : 'actionButtonLabel'
2727
"
2828
>
2929
</a>

projects/angular-calendar/src/modules/common/calendar-event-title.component.ts renamed to projects/angular-calendar/src/modules/common/calendar-event-title/calendar-event-title.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { CalendarEvent } from 'calendar-utils';
77
<ng-template #defaultTemplate let-event="event" let-view="view">
88
<span
99
class="cal-event-title"
10-
[innerHTML]="event.title | calendarEventTitle: view:event"
11-
[attr.aria-hidden]="{} | calendarA11y: 'hideEventTitle'"
10+
[innerHTML]="event.title | calendarEventTitle : view : event"
11+
[attr.aria-hidden]="{} | calendarA11y : 'hideEventTitle'"
1212
>
1313
</span>
1414
</ng-template>

projects/angular-calendar/src/modules/common/calendar-event-title.pipe.ts renamed to projects/angular-calendar/src/modules/common/calendar-event-title/calendar-event-title.pipe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Pipe, PipeTransform } from '@angular/core';
22
import { CalendarEvent } from 'calendar-utils';
3-
import { CalendarEventTitleFormatter } from './calendar-event-title-formatter.provider';
3+
import { CalendarEventTitleFormatter } from '../calendar-event-title-formatter/calendar-event-title-formatter.provider';
44

55
@Pipe({
66
name: 'calendarEventTitle',

projects/angular-calendar/test/calendar-moment-date-formatter.provider.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-moment-date-formatter/calendar-moment-date-formatter.provider.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
MOMENT,
88
CalendarNativeDateFormatter,
99
DateAdapter,
10-
} from '../src';
11-
import { adapterFactory } from '../src/date-adapters/date-fns';
10+
} from 'angular-calendar';
11+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
1212

1313
describe('calendarMomentDateFormatter provider', () => {
1414
beforeEach(() => {

projects/angular-calendar/src/modules/common/calendar-moment-date-formatter.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-moment-date-formatter/calendar-moment-date-formatter.provider.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { InjectionToken, Inject, Injectable } from '@angular/core';
22
import {
33
CalendarDateFormatterInterface,
44
DateFormatterParams,
5-
} from './calendar-date-formatter.interface';
6-
import { getWeekViewPeriod } from './util';
7-
import { DateAdapter } from '../../date-adapters/date-adapter';
5+
} from '../calendar-date-formatter/calendar-date-formatter.interface';
6+
import { getWeekViewPeriod } from '../util/util';
7+
import { DateAdapter } from '../../../date-adapters/date-adapter';
88

99
export const MOMENT: InjectionToken<string> = new InjectionToken('Moment');
1010

projects/angular-calendar/test/calendar-native-date-formatter.provider.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-native-date-formatter/calendar-native-date-formatter.provider.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { inject, TestBed } from '@angular/core/testing';
22
import { expect } from 'chai';
33
import { startOfDay } from 'date-fns';
4-
import { CalendarNativeDateFormatter, DateAdapter } from '../src';
5-
import { adapterFactory } from '../src/date-adapters/date-fns';
4+
import { CalendarNativeDateFormatter, DateAdapter } from 'angular-calendar';
5+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
66

77
describe('calendarNativeDateFormatter provider', () => {
88
beforeEach(() => {

projects/angular-calendar/src/modules/common/calendar-native-date-formatter.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-native-date-formatter/calendar-native-date-formatter.provider.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
22
CalendarDateFormatterInterface,
33
DateFormatterParams,
4-
} from './calendar-date-formatter.interface';
4+
} from '../calendar-date-formatter/calendar-date-formatter.interface';
55
import { Injectable } from '@angular/core';
6-
import { DateAdapter } from '../../date-adapters/date-adapter';
7-
import { getWeekViewPeriod } from './util';
6+
import { DateAdapter } from '../../../date-adapters/date-adapter';
7+
import { getWeekViewPeriod } from '../util/util';
88

99
/**
1010
* This will use <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl" target="_blank">Intl</a> API to do all date formatting.

projects/angular-calendar/test/calendar-next-view.directive.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-next-view/calendar-next-view.directive.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component } from '@angular/core';
22
import { TestBed } from '@angular/core/testing';
33
import { expect } from 'chai';
4-
import { CalendarModule, DateAdapter } from '../src';
5-
import { adapterFactory } from '../src/date-adapters/date-fns';
4+
import { CalendarModule, DateAdapter } from 'angular-calendar';
5+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
66

77
@Component({
88
template: `

projects/angular-calendar/src/modules/common/calendar-next-view.directive.ts renamed to projects/angular-calendar/src/modules/common/calendar-next-view/calendar-next-view.directive.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
Input,
66
Output,
77
} from '@angular/core';
8-
import { DateAdapter } from '../../date-adapters/date-adapter';
9-
import { CalendarView } from './calendar-view.enum';
10-
import { addDaysWithExclusions } from './util';
8+
import { DateAdapter } from '../../../date-adapters/date-adapter';
9+
import { CalendarView } from '../calendar-view/calendar-view.enum';
10+
import { addDaysWithExclusions } from '../util/util';
1111

1212
/**
1313
* Change the view date to the next view. For example:

projects/angular-calendar/test/calendar-previous-view.directive.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-previous-view/calendar-previous-view.directive.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Component } from '@angular/core';
22
import { TestBed } from '@angular/core/testing';
33
import { expect } from 'chai';
4-
import { CalendarModule, DateAdapter } from '../src';
5-
import { adapterFactory } from '../src/date-adapters/date-fns';
4+
import { CalendarModule, DateAdapter } from 'angular-calendar';
5+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
66

77
@Component({
88
template: `

projects/angular-calendar/src/modules/common/calendar-previous-view.directive.ts renamed to projects/angular-calendar/src/modules/common/calendar-previous-view/calendar-previous-view.directive.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
Output,
66
EventEmitter,
77
} from '@angular/core';
8-
import { DateAdapter } from '../../date-adapters/date-adapter';
9-
import { CalendarView } from './calendar-view.enum';
10-
import { addDaysWithExclusions } from './util';
8+
import { DateAdapter } from '../../../date-adapters/date-adapter';
9+
import { CalendarView } from '../calendar-view/calendar-view.enum';
10+
import { addDaysWithExclusions } from '../util/util';
1111

1212
/**
1313
* Change the view date to the previous view. For example:

projects/angular-calendar/src/modules/common/calendar-resize-helper.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-resize-helper/calendar-resize-helper.provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isInside } from './util';
1+
import { isInside } from '../util/util';
22

33
export class CalendarResizeHelper {
44
constructor(

projects/angular-calendar/test/calendar-today.directive.spec.ts renamed to projects/angular-calendar/src/modules/common/calendar-today/calendar-today.directive.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Component } from '@angular/core';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { expect } from 'chai';
44
import { startOfDay } from 'date-fns';
5-
import { CalendarModule, DateAdapter } from '../src';
6-
import { adapterFactory } from '../src/date-adapters/date-fns';
5+
import { CalendarModule, DateAdapter } from 'angular-calendar';
6+
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
77

88
@Component({
99
template: '<button mwlCalendarToday [(viewDate)]="viewDate">Next</button>',

projects/angular-calendar/src/modules/common/calendar-today.directive.ts renamed to projects/angular-calendar/src/modules/common/calendar-today/calendar-today.directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Output,
66
EventEmitter,
77
} from '@angular/core';
8-
import { DateAdapter } from '../../date-adapters/date-adapter';
8+
import { DateAdapter } from '../../../date-adapters/date-adapter';
99

1010
/**
1111
* Change the view date to the current day. For example:

projects/angular-calendar/src/modules/common/calendar-tooltip.scss renamed to projects/angular-calendar/src/modules/common/calendar-tooltip/calendar-tooltip.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use 'sass:map';
2-
@import '../../variables';
2+
@import '../../../variables';
33

44
$cal-tooltip-vars: () !default;
55
$cal-tooltip-vars: map.merge($cal-vars, $cal-tooltip-vars);

projects/angular-calendar/src/modules/common/calendar-utils.provider.ts renamed to projects/angular-calendar/src/modules/common/calendar-utils/calendar-utils.provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
getWeekViewHeader,
1111
getWeekView,
1212
} from 'calendar-utils';
13-
import { DateAdapter } from '../../date-adapters/date-adapter';
13+
import { DateAdapter } from '../../../date-adapters/date-adapter';
1414

1515
@Injectable()
1616
export class CalendarUtils {

0 commit comments

Comments
 (0)