ngx-mat-tui-calendar 12.0.8 → 12.0.12

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.
package/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![Development Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
6
6
  [![GitHub stars](https://img.shields.io/github/stars/ron2015schmitt/ngx-mat-tui-calendar.svg)](https://github.com/ron2015schmitt/ngx-mat-tui-calendar/stargazers)
7
- ![GitHub downloads all releases](https://img.shields.io/github/downloads/ron2015schmitt/ngx-mat-tui-calendar/total)
8
7
  ![GitHub release (latest by date)](https://img.shields.io/github/v/release/ron2015schmitt/ngx-mat-tui-calendar)
9
8
 
10
9
  [![npm](https://img.shields.io/npm/v/ngx-mat-tui-calendar?label=npm%20package)](https://www.npmjs.com/package/ngx-mat-tui-calendar)
@@ -28,6 +27,9 @@ The top-level `angular.json` and `package.json` files are used for building both
28
27
 
29
28
  This repo was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.3. Angular ^12.2 requires node ^v14.15 (npm ^v6.14).
30
29
 
30
+ # Online Demo
31
+
32
+ https://ngx-mat-tui-calendar-demo.netlify.app/
31
33
 
32
34
  # UI
33
35
  ## Month View
@@ -48,7 +50,7 @@ This repo was generated with [Angular CLI](https://github.com/angular/angular-cl
48
50
 
49
51
  Install via npm:
50
52
  ```bash
51
- npm i --save ngx-mat-tui-calendar
53
+ npm i --save ngx-mat-tui-calendar --legacy-peer-deps
52
54
  ```
53
55
  which will add `ngx-mat-tui-calendar`, as well as all of its dependencies to your `package.json` file.
54
56
 
@@ -71,12 +73,11 @@ Set up an [Angular theme](https://material.angular.io/guide/theming). For examp
71
73
 
72
74
  A demonstration of the simple usage described above can be found at repo https://github.com/ron2015schmitt/ngx-mat-tui-calendar-quickstart
73
75
 
74
- ## Demo Repo
76
+ ### Demo Repo
75
77
 
76
78
  A more extensive demonstration of usage can be found at repo https://github.com/ron2015schmitt/ngx-mat-tui-calendar-demo
77
79
 
78
- ### Stackblitz
79
- *Coming soon*
80
+
80
81
 
81
82
  # Documentation
82
83
 
@@ -115,7 +116,7 @@ Selector: `ngx-mat-tui-calendar`
115
116
  ```bash
116
117
  git clone https://github.com/ron2015schmitt/ngx-mat-tui-calendar
117
118
  cd ngx-mat-tui-calendar
118
- npm install
119
+ npm install --legacy-peer-deps
119
120
  ng build
120
121
  ng serve
121
122
  ```
@@ -405,8 +405,9 @@
405
405
  LocalDate.convertNumbersToDate = function (_a) {
406
406
  var year = _a.year, month = _a.month, day = _a.day, hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds, milliseconds = _a.milliseconds;
407
407
  // month = 1 to 12
408
- // start with today's *local* date. this si really important
408
+ // start with today's *local* date. this is really important
409
409
  var date = new Date();
410
+ date.setDate(1); // very important
410
411
  date.setFullYear(year);
411
412
  date.setMonth((month == null) ? 0 : month - 1);
412
413
  date.setDate((day == null) ? 1 : day);
@@ -677,15 +678,19 @@
677
678
  date.setMonth(date.getMonth() + months); // date class does the modular arithmetic
678
679
  date.setDate(date.getDate() + days); // date class does the modular arithmetic
679
680
  this.calendar.setDate(date);
681
+ this.calendar.toggleScheduleView(true);
680
682
  };
681
683
  NgxMatTuiCalendarComponent.prototype.onCalendarPrev = function () {
682
684
  this.calendar.prev();
685
+ this.calendar.toggleScheduleView(true);
683
686
  };
684
687
  NgxMatTuiCalendarComponent.prototype.onCalendarToday = function () {
685
688
  this.calendar.today();
689
+ this.calendar.toggleScheduleView(true);
686
690
  };
687
691
  NgxMatTuiCalendarComponent.prototype.onCalendarNext = function () {
688
692
  this.calendar.next();
693
+ this.calendar.toggleScheduleView(true);
689
694
  };
690
695
  NgxMatTuiCalendarComponent.prototype.onCalendarLongNext = function () {
691
696
  var date = this.calendar.getDate().toDate();
@@ -707,12 +712,15 @@
707
712
  date.setMonth(date.getMonth() + months); // date class does the modular arithmetic
708
713
  date.setDate(date.getDate() + days); // date class does the modular arithmetic
709
714
  this.calendar.setDate(date);
715
+ this.calendar.toggleScheduleView(true);
710
716
  };
711
717
  NgxMatTuiCalendarComponent.prototype.onMonthView = function () {
712
718
  this.calendar.changeView('month');
713
719
  };
714
720
  NgxMatTuiCalendarComponent.prototype.onWeekView = function () {
721
+ console.log("onWeekView");
715
722
  this.calendar.changeView('week');
723
+ this.calendar.render(true); // <-- so that selection is cleared
716
724
  };
717
725
  NgxMatTuiCalendarComponent.prototype.onDayView = function () {
718
726
  this.calendar.changeView('day');
@@ -730,6 +738,7 @@
730
738
  // console.warn(`calendar.component.ts: createTUICalendar: ioptions:`, ioptions);
731
739
  this.calendar = new Calendar__default["default"]('#calendar', ioptions);
732
740
  // console.warn(`calendar.component.ts: createTUICalendar: this.calendar:`, this.calendar);
741
+ this.calendar.toggleScheduleView(true);
733
742
  };
734
743
  NgxMatTuiCalendarComponent.prototype.bindCallbacks = function () {
735
744
  this.bindAfterRenderSchedule();
@@ -939,6 +948,7 @@
939
948
  this.calendar.setOptions(ioptions);
940
949
  this.calendar.setTheme(ioptions.theme);
941
950
  this.calendar.render(true);
951
+ this.calendar.toggleScheduleView(true);
942
952
  return ioptions;
943
953
  };
944
954
  NgxMatTuiCalendarComponent.prototype.preprocessIOptions = function (ioptions) {
@@ -1142,7 +1152,38 @@
1142
1152
  type: i0.Input
1143
1153
  }] } });
1144
1154
 
1145
- // Angular modules
1155
+ // collect all of the above modules into an array
1156
+ var importedModules = [
1157
+ animations.BrowserAnimationsModule,
1158
+ platformBrowser.BrowserModule,
1159
+ flexLayout.FlexLayoutModule,
1160
+ flexLayout.FlexModule,
1161
+ i7.FormsModule,
1162
+ http.HttpClientModule,
1163
+ overlay.OverlayModule,
1164
+ i7.ReactiveFormsModule,
1165
+ i6.MatButtonModule,
1166
+ i5$1.MatButtonToggleModule,
1167
+ card.MatCardModule,
1168
+ i4.MatDatepickerModule,
1169
+ i1.MatDialogModule,
1170
+ i5.MatDividerModule,
1171
+ i2.MatFormFieldModule,
1172
+ icon.MatIconModule,
1173
+ i8.MatInputModule,
1174
+ core.MatNativeDateModule,
1175
+ i3.MatRadioModule,
1176
+ core.MatRippleModule,
1177
+ slideToggle.MatSlideToggleModule,
1178
+ i2$1.MatToolbarModule,
1179
+ i4$1.FontAwesomeModule,
1180
+ i10.MatTimepickerModule,
1181
+ ];
1182
+ var projectModules = [
1183
+ NgxMatTuiCalendarComponent,
1184
+ NgxMatTuiCalendarWrapperComponent,
1185
+ NgxMatTuiCalendarEditorDialogComponent,
1186
+ ];
1146
1187
  var NgxMatTuiCalendarModule = /** @class */ (function () {
1147
1188
  function NgxMatTuiCalendarModule() {
1148
1189
  }
@@ -1174,79 +1215,64 @@
1174
1215
  slideToggle.MatSlideToggleModule,
1175
1216
  i2$1.MatToolbarModule,
1176
1217
  i4$1.FontAwesomeModule,
1177
- i10.MatTimepickerModule], exports: [NgxMatTuiCalendarComponent,
1218
+ i10.MatTimepickerModule], exports: [animations.BrowserAnimationsModule,
1219
+ platformBrowser.BrowserModule,
1220
+ flexLayout.FlexLayoutModule,
1221
+ flexLayout.FlexModule,
1222
+ i7.FormsModule,
1223
+ http.HttpClientModule,
1224
+ overlay.OverlayModule,
1225
+ i7.ReactiveFormsModule,
1226
+ i6.MatButtonModule,
1227
+ i5$1.MatButtonToggleModule,
1228
+ card.MatCardModule,
1229
+ i4.MatDatepickerModule,
1230
+ i1.MatDialogModule,
1231
+ i5.MatDividerModule,
1232
+ i2.MatFormFieldModule,
1233
+ icon.MatIconModule,
1234
+ i8.MatInputModule,
1235
+ core.MatNativeDateModule,
1236
+ i3.MatRadioModule,
1237
+ core.MatRippleModule,
1238
+ slideToggle.MatSlideToggleModule,
1239
+ i2$1.MatToolbarModule,
1240
+ i4$1.FontAwesomeModule,
1241
+ i10.MatTimepickerModule, NgxMatTuiCalendarComponent,
1178
1242
  NgxMatTuiCalendarWrapperComponent,
1179
1243
  NgxMatTuiCalendarEditorDialogComponent] });
1180
- NgxMatTuiCalendarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarModule, imports: [[
1181
- animations.BrowserAnimationsModule,
1182
- platformBrowser.BrowserModule,
1183
- flexLayout.FlexLayoutModule,
1184
- flexLayout.FlexModule,
1185
- i7.FormsModule,
1186
- http.HttpClientModule,
1187
- overlay.OverlayModule,
1188
- i7.ReactiveFormsModule,
1189
- i6.MatButtonModule,
1190
- i5$1.MatButtonToggleModule,
1191
- card.MatCardModule,
1192
- i4.MatDatepickerModule,
1193
- i1.MatDialogModule,
1194
- i5.MatDividerModule,
1195
- i2.MatFormFieldModule,
1196
- icon.MatIconModule,
1197
- i8.MatInputModule,
1198
- core.MatNativeDateModule,
1199
- i3.MatRadioModule,
1200
- core.MatRippleModule,
1201
- slideToggle.MatSlideToggleModule,
1202
- i2$1.MatToolbarModule,
1203
- i4$1.FontAwesomeModule,
1204
- i10.MatTimepickerModule,
1205
- ]] });
1244
+ NgxMatTuiCalendarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarModule, imports: [__spreadArray([], __read(importedModules)), animations.BrowserAnimationsModule,
1245
+ platformBrowser.BrowserModule,
1246
+ flexLayout.FlexLayoutModule,
1247
+ flexLayout.FlexModule,
1248
+ i7.FormsModule,
1249
+ http.HttpClientModule,
1250
+ overlay.OverlayModule,
1251
+ i7.ReactiveFormsModule,
1252
+ i6.MatButtonModule,
1253
+ i5$1.MatButtonToggleModule,
1254
+ card.MatCardModule,
1255
+ i4.MatDatepickerModule,
1256
+ i1.MatDialogModule,
1257
+ i5.MatDividerModule,
1258
+ i2.MatFormFieldModule,
1259
+ icon.MatIconModule,
1260
+ i8.MatInputModule,
1261
+ core.MatNativeDateModule,
1262
+ i3.MatRadioModule,
1263
+ core.MatRippleModule,
1264
+ slideToggle.MatSlideToggleModule,
1265
+ i2$1.MatToolbarModule,
1266
+ i4$1.FontAwesomeModule,
1267
+ i10.MatTimepickerModule] });
1206
1268
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarModule, decorators: [{
1207
1269
  type: i0.NgModule,
1208
1270
  args: [{
1209
- declarations: [
1210
- NgxMatTuiCalendarComponent,
1211
- NgxMatTuiCalendarWrapperComponent,
1212
- NgxMatTuiCalendarEditorDialogComponent,
1213
- ],
1214
- imports: [
1215
- animations.BrowserAnimationsModule,
1216
- platformBrowser.BrowserModule,
1217
- flexLayout.FlexLayoutModule,
1218
- flexLayout.FlexModule,
1219
- i7.FormsModule,
1220
- http.HttpClientModule,
1221
- overlay.OverlayModule,
1222
- i7.ReactiveFormsModule,
1223
- i6.MatButtonModule,
1224
- i5$1.MatButtonToggleModule,
1225
- card.MatCardModule,
1226
- i4.MatDatepickerModule,
1227
- i1.MatDialogModule,
1228
- i5.MatDividerModule,
1229
- i2.MatFormFieldModule,
1230
- icon.MatIconModule,
1231
- i8.MatInputModule,
1232
- core.MatNativeDateModule,
1233
- i3.MatRadioModule,
1234
- core.MatRippleModule,
1235
- slideToggle.MatSlideToggleModule,
1236
- i2$1.MatToolbarModule,
1237
- i4$1.FontAwesomeModule,
1238
- i10.MatTimepickerModule,
1239
- ],
1240
- exports: [
1241
- NgxMatTuiCalendarComponent,
1242
- NgxMatTuiCalendarWrapperComponent,
1243
- NgxMatTuiCalendarEditorDialogComponent,
1244
- ],
1245
- entryComponents: [
1246
- NgxMatTuiCalendarComponent,
1247
- NgxMatTuiCalendarWrapperComponent,
1248
- NgxMatTuiCalendarEditorDialogComponent,
1249
- ],
1271
+ declarations: __spreadArray([], __read(projectModules)),
1272
+ imports: __spreadArray([], __read(importedModules)),
1273
+ exports: __spreadArray(__spreadArray([], __read(importedModules)), __read(projectModules)),
1274
+ entryComponents: __spreadArray([], __read(projectModules)),
1275
+ schemas: [i0.CUSTOM_ELEMENTS_SCHEMA],
1250
1276
  }]
1251
1277
  }] });
1252
1278