ngx-mat-tui-calendar 12.0.7 → 12.0.11
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 +103 -78
- package/bundles/ngx-mat-tui-calendar.umd.js.map +1 -1
- package/esm2015/lib/ngx-mat-tui-calendar-editor-dialog/ngx-mat-tui-calendar-editor-dialog.component.js +3 -3
- package/esm2015/lib/ngx-mat-tui-calendar.component.js +17 -8
- package/esm2015/lib/ngx-mat-tui-calendar.module.js +89 -61
- package/fesm2015/ngx-mat-tui-calendar.js +106 -69
- 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
|
```
|
@@ -473,7 +473,7 @@
|
|
473
473
|
this.closed = false;
|
474
474
|
this.isAllDay = false;
|
475
475
|
this.themeClass = '';
|
476
|
-
console.log('NgxMatTuiCalendarEditorDialogComponent.constructor: data:', data);
|
476
|
+
// console.log('NgxMatTuiCalendarEditorDialogComponent.constructor: data:', data);
|
477
477
|
this.color = data.darkMode ? 'accent' : 'primary';
|
478
478
|
var schedule = data.schedule;
|
479
479
|
if (schedule == null) {
|
@@ -572,7 +572,7 @@
|
|
572
572
|
this.dialogRef.close({ schedule: schedule, performDelete: (performDelete == true) });
|
573
573
|
};
|
574
574
|
NgxMatTuiCalendarEditorDialogComponent.prototype.log = function (str) {
|
575
|
-
console.warn(str);
|
575
|
+
// console.warn(str);
|
576
576
|
};
|
577
577
|
NgxMatTuiCalendarEditorDialogComponent.prototype.onUseAllDay = function () {
|
578
578
|
this.isAllDay = true;
|
@@ -640,15 +640,15 @@
|
|
640
640
|
this.appliedOptions = this.getDefaultOptions();
|
641
641
|
}
|
642
642
|
NgxMatTuiCalendarComponent.prototype.ngOnInit = function () {
|
643
|
-
console.warn(
|
643
|
+
// console.warn(`calendar.component.ts: ngOnit`)
|
644
644
|
this.createTUICalendar();
|
645
645
|
this.bindCallbacks();
|
646
646
|
};
|
647
647
|
NgxMatTuiCalendarComponent.prototype.ngOnChanges = function (changes) {
|
648
|
-
console.warn(changes);
|
648
|
+
// console.warn(changes);
|
649
649
|
if (this.calendar) {
|
650
650
|
if (changes.options) {
|
651
|
-
console.warn(
|
651
|
+
// console.warn(`change.option:`, changes.options);
|
652
652
|
var options = changes.options.currentValue;
|
653
653
|
this.setOptions(options);
|
654
654
|
}
|
@@ -677,15 +677,19 @@
|
|
677
677
|
date.setMonth(date.getMonth() + months); // date class does the modular arithmetic
|
678
678
|
date.setDate(date.getDate() + days); // date class does the modular arithmetic
|
679
679
|
this.calendar.setDate(date);
|
680
|
+
this.calendar.toggleScheduleView(true);
|
680
681
|
};
|
681
682
|
NgxMatTuiCalendarComponent.prototype.onCalendarPrev = function () {
|
682
683
|
this.calendar.prev();
|
684
|
+
this.calendar.toggleScheduleView(true);
|
683
685
|
};
|
684
686
|
NgxMatTuiCalendarComponent.prototype.onCalendarToday = function () {
|
685
687
|
this.calendar.today();
|
688
|
+
this.calendar.toggleScheduleView(true);
|
686
689
|
};
|
687
690
|
NgxMatTuiCalendarComponent.prototype.onCalendarNext = function () {
|
688
691
|
this.calendar.next();
|
692
|
+
this.calendar.toggleScheduleView(true);
|
689
693
|
};
|
690
694
|
NgxMatTuiCalendarComponent.prototype.onCalendarLongNext = function () {
|
691
695
|
var date = this.calendar.getDate().toDate();
|
@@ -707,12 +711,15 @@
|
|
707
711
|
date.setMonth(date.getMonth() + months); // date class does the modular arithmetic
|
708
712
|
date.setDate(date.getDate() + days); // date class does the modular arithmetic
|
709
713
|
this.calendar.setDate(date);
|
714
|
+
this.calendar.toggleScheduleView(true);
|
710
715
|
};
|
711
716
|
NgxMatTuiCalendarComponent.prototype.onMonthView = function () {
|
712
717
|
this.calendar.changeView('month');
|
713
718
|
};
|
714
719
|
NgxMatTuiCalendarComponent.prototype.onWeekView = function () {
|
720
|
+
console.log("onWeekView");
|
715
721
|
this.calendar.changeView('week');
|
722
|
+
this.calendar.render(true); // <-- so that selection is cleared
|
716
723
|
};
|
717
724
|
NgxMatTuiCalendarComponent.prototype.onDayView = function () {
|
718
725
|
this.calendar.changeView('day');
|
@@ -727,9 +734,10 @@
|
|
727
734
|
};
|
728
735
|
NgxMatTuiCalendarComponent.prototype.createTUICalendar = function () {
|
729
736
|
var ioptions = this.preprocessIOptions(null);
|
730
|
-
console.warn(
|
737
|
+
// console.warn(`calendar.component.ts: createTUICalendar: ioptions:`, ioptions);
|
731
738
|
this.calendar = new Calendar__default["default"]('#calendar', ioptions);
|
732
|
-
console.warn(
|
739
|
+
// console.warn(`calendar.component.ts: createTUICalendar: this.calendar:`, this.calendar);
|
740
|
+
this.calendar.toggleScheduleView(true);
|
733
741
|
};
|
734
742
|
NgxMatTuiCalendarComponent.prototype.bindCallbacks = function () {
|
735
743
|
this.bindAfterRenderSchedule();
|
@@ -899,7 +907,7 @@
|
|
899
907
|
if (this.appliedOptions.themeClass) {
|
900
908
|
dialogConfig.panelClass = this.appliedOptions.themeClass;
|
901
909
|
}
|
902
|
-
console.warn(
|
910
|
+
// console.warn(`options: `, this.appliedOptions);
|
903
911
|
dialogConfig.data = { schedule: schedule, darkMode: this.appliedOptions.darkMode, themeClass: this.appliedOptions.themeClass };
|
904
912
|
dialogConfig.autoFocus = true;
|
905
913
|
var dialogRef = this.dialog.open(NgxMatTuiCalendarEditorDialogComponent, dialogConfig);
|
@@ -939,6 +947,7 @@
|
|
939
947
|
this.calendar.setOptions(ioptions);
|
940
948
|
this.calendar.setTheme(ioptions.theme);
|
941
949
|
this.calendar.render(true);
|
950
|
+
this.calendar.toggleScheduleView(true);
|
942
951
|
return ioptions;
|
943
952
|
};
|
944
953
|
NgxMatTuiCalendarComponent.prototype.preprocessIOptions = function (ioptions) {
|
@@ -991,7 +1000,7 @@
|
|
991
1000
|
var el = document.getElementById("theme-" + name);
|
992
1001
|
if (el) {
|
993
1002
|
var style = window.getComputedStyle(el, null);
|
994
|
-
console.warn(
|
1003
|
+
// console.warn(`theme-${name} color:`, style.color);
|
995
1004
|
return style.color;
|
996
1005
|
}
|
997
1006
|
return '';
|
@@ -1142,7 +1151,38 @@
|
|
1142
1151
|
type: i0.Input
|
1143
1152
|
}] } });
|
1144
1153
|
|
1145
|
-
//
|
1154
|
+
// collect all of the above modules into an array
|
1155
|
+
var importedModules = [
|
1156
|
+
animations.BrowserAnimationsModule,
|
1157
|
+
platformBrowser.BrowserModule,
|
1158
|
+
flexLayout.FlexLayoutModule,
|
1159
|
+
flexLayout.FlexModule,
|
1160
|
+
i7.FormsModule,
|
1161
|
+
http.HttpClientModule,
|
1162
|
+
overlay.OverlayModule,
|
1163
|
+
i7.ReactiveFormsModule,
|
1164
|
+
i6.MatButtonModule,
|
1165
|
+
i5$1.MatButtonToggleModule,
|
1166
|
+
card.MatCardModule,
|
1167
|
+
i4.MatDatepickerModule,
|
1168
|
+
i1.MatDialogModule,
|
1169
|
+
i5.MatDividerModule,
|
1170
|
+
i2.MatFormFieldModule,
|
1171
|
+
icon.MatIconModule,
|
1172
|
+
i8.MatInputModule,
|
1173
|
+
core.MatNativeDateModule,
|
1174
|
+
i3.MatRadioModule,
|
1175
|
+
core.MatRippleModule,
|
1176
|
+
slideToggle.MatSlideToggleModule,
|
1177
|
+
i2$1.MatToolbarModule,
|
1178
|
+
i4$1.FontAwesomeModule,
|
1179
|
+
i10.MatTimepickerModule,
|
1180
|
+
];
|
1181
|
+
var projectModules = [
|
1182
|
+
NgxMatTuiCalendarComponent,
|
1183
|
+
NgxMatTuiCalendarWrapperComponent,
|
1184
|
+
NgxMatTuiCalendarEditorDialogComponent,
|
1185
|
+
];
|
1146
1186
|
var NgxMatTuiCalendarModule = /** @class */ (function () {
|
1147
1187
|
function NgxMatTuiCalendarModule() {
|
1148
1188
|
}
|
@@ -1174,79 +1214,64 @@
|
|
1174
1214
|
slideToggle.MatSlideToggleModule,
|
1175
1215
|
i2$1.MatToolbarModule,
|
1176
1216
|
i4$1.FontAwesomeModule,
|
1177
|
-
i10.MatTimepickerModule], exports: [
|
1217
|
+
i10.MatTimepickerModule], exports: [animations.BrowserAnimationsModule,
|
1218
|
+
platformBrowser.BrowserModule,
|
1219
|
+
flexLayout.FlexLayoutModule,
|
1220
|
+
flexLayout.FlexModule,
|
1221
|
+
i7.FormsModule,
|
1222
|
+
http.HttpClientModule,
|
1223
|
+
overlay.OverlayModule,
|
1224
|
+
i7.ReactiveFormsModule,
|
1225
|
+
i6.MatButtonModule,
|
1226
|
+
i5$1.MatButtonToggleModule,
|
1227
|
+
card.MatCardModule,
|
1228
|
+
i4.MatDatepickerModule,
|
1229
|
+
i1.MatDialogModule,
|
1230
|
+
i5.MatDividerModule,
|
1231
|
+
i2.MatFormFieldModule,
|
1232
|
+
icon.MatIconModule,
|
1233
|
+
i8.MatInputModule,
|
1234
|
+
core.MatNativeDateModule,
|
1235
|
+
i3.MatRadioModule,
|
1236
|
+
core.MatRippleModule,
|
1237
|
+
slideToggle.MatSlideToggleModule,
|
1238
|
+
i2$1.MatToolbarModule,
|
1239
|
+
i4$1.FontAwesomeModule,
|
1240
|
+
i10.MatTimepickerModule, NgxMatTuiCalendarComponent,
|
1178
1241
|
NgxMatTuiCalendarWrapperComponent,
|
1179
1242
|
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
|
-
]] });
|
1243
|
+
NgxMatTuiCalendarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarModule, imports: [__spreadArray([], __read(importedModules)), animations.BrowserAnimationsModule,
|
1244
|
+
platformBrowser.BrowserModule,
|
1245
|
+
flexLayout.FlexLayoutModule,
|
1246
|
+
flexLayout.FlexModule,
|
1247
|
+
i7.FormsModule,
|
1248
|
+
http.HttpClientModule,
|
1249
|
+
overlay.OverlayModule,
|
1250
|
+
i7.ReactiveFormsModule,
|
1251
|
+
i6.MatButtonModule,
|
1252
|
+
i5$1.MatButtonToggleModule,
|
1253
|
+
card.MatCardModule,
|
1254
|
+
i4.MatDatepickerModule,
|
1255
|
+
i1.MatDialogModule,
|
1256
|
+
i5.MatDividerModule,
|
1257
|
+
i2.MatFormFieldModule,
|
1258
|
+
icon.MatIconModule,
|
1259
|
+
i8.MatInputModule,
|
1260
|
+
core.MatNativeDateModule,
|
1261
|
+
i3.MatRadioModule,
|
1262
|
+
core.MatRippleModule,
|
1263
|
+
slideToggle.MatSlideToggleModule,
|
1264
|
+
i2$1.MatToolbarModule,
|
1265
|
+
i4$1.FontAwesomeModule,
|
1266
|
+
i10.MatTimepickerModule] });
|
1206
1267
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarModule, decorators: [{
|
1207
1268
|
type: i0.NgModule,
|
1208
1269
|
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
|
-
],
|
1270
|
+
declarations: __spreadArray([], __read(projectModules)),
|
1271
|
+
imports: __spreadArray([], __read(importedModules)),
|
1272
|
+
exports: __spreadArray(__spreadArray([], __read(importedModules)), __read(projectModules)),
|
1273
|
+
entryComponents: __spreadArray([], __read(projectModules)),
|
1274
|
+
schemas: [i0.CUSTOM_ELEMENTS_SCHEMA],
|
1250
1275
|
}]
|
1251
1276
|
}] });
|
1252
1277
|
|