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 +7 -6
- package/bundles/ngx-mat-tui-calendar.umd.js +96 -70
- package/bundles/ngx-mat-tui-calendar.umd.js.map +1 -1
- package/esm2015/lib/local-date.js +3 -2
- package/esm2015/lib/ngx-mat-tui-calendar-editor-dialog/ngx-mat-tui-calendar-editor-dialog.component.js +1 -1
- package/esm2015/lib/ngx-mat-tui-calendar.component.js +10 -1
- package/esm2015/lib/ngx-mat-tui-calendar.module.js +89 -61
- package/fesm2015/ngx-mat-tui-calendar.js +99 -61
- package/fesm2015/ngx-mat-tui-calendar.js.map +1 -1
- package/lib/ngx-mat-tui-calendar-editor-dialog/ngx-mat-tui-calendar-editor-dialog.component.d.ts +1 -1
- package/lib/ngx-mat-tui-calendar.component.d.ts +1 -1
- package/lib/ngx-mat-tui-calendar.module.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -4,7 +4,6 @@
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
5
5
|
[](https://www.repostatus.org/#active)
|
6
6
|
[](https://github.com/ron2015schmitt/ngx-mat-tui-calendar/stargazers)
|
7
|
-

|
8
7
|

|
9
8
|
|
10
9
|
[](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
|
-
|
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
|
-
|
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
|
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
|
-
//
|
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: [
|
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
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
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
|
-
|
1211
|
-
|
1212
|
-
|
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
|
|