ngx-mat-tui-calendar 12.0.4 → 12.0.8

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
@@ -21,7 +21,7 @@ This project is an [Angular](https://angular.io/), [Material Design](https://mat
21
21
  * Dark mode in progress...
22
22
 
23
23
  This repo contains two projects:
24
- 1. the npm library called `ngx-mat-tui-calendar`, located in `projects/ngx-mat-tui-calendar`
24
+ 1. the source code for the npm library [`ngx-mat-tui-calendar`](https://www.npmjs.com/package/ngx-mat-tui-calendar), located in `projects/ngx-mat-tui-calendar`
25
25
  2. the demo app, located in `src`
26
26
 
27
27
  The top-level `angular.json` and `package.json` files are used for building both projects.
@@ -50,25 +50,33 @@ Install via npm:
50
50
  ```bash
51
51
  npm i --save ngx-mat-tui-calendar
52
52
  ```
53
+ which will add `ngx-mat-tui-calendar`, as well as all of its dependencies to your `package.json` file.
54
+
53
55
  Next import the module into your app's ```app.module.ts```:
54
56
  ```typescript
55
57
  import {NgxMatTuiCalendarModule} from 'ngx-mat-tui-calendar';
56
58
  ```
57
59
  Then add `NgxMatTuiCalendarModule` to your list of NgModule imports, in ```app.module.ts```
58
60
 
59
- Insert the following HTML into one of your app's template files
61
+ Insert the following HTML into your app's template file
60
62
  ```angular2html
61
63
  <mat-tui-calendar></mat-tui-calendar>
62
64
  ```
65
+ Set up an [Angular theme](https://material.angular.io/guide/theming). For example add the following line to the top of your `src/styles.scss` file
66
+ ```typescript
67
+ @import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
68
+ ```
63
69
 
64
- ## Quickstart Project
65
- *TODO*
70
+ ### Quickstart Repo
66
71
 
67
- ## Demo Project
68
- *TODO*
72
+ A demonstration of the simple usage described above can be found at repo https://github.com/ron2015schmitt/ngx-mat-tui-calendar-quickstart
73
+
74
+ ## Demo Repo
75
+
76
+ A more extensive demonstration of usage can be found at repo https://github.com/ron2015schmitt/ngx-mat-tui-calendar-demo
69
77
 
70
78
  ### Stackblitz
71
- *TODO*
79
+ *Coming soon*
72
80
 
73
81
  # Documentation
74
82
 
@@ -102,6 +110,18 @@ Selector: `ngx-mat-tui-calendar`
102
110
 
103
111
  # Development
104
112
 
113
+ ## Getting started
114
+
115
+ ```bash
116
+ git clone https://github.com/ron2015schmitt/ngx-mat-tui-calendar
117
+ cd ngx-mat-tui-calendar
118
+ npm install
119
+ ng build
120
+ ng serve
121
+ ```
122
+ Point your browser to http://localhost:4200/
123
+
124
+
105
125
  ## library package for ngx-mat-tui-calendar
106
126
 
107
127
  The code that makes up the npm package is located in folder ```projects/ngx-mat-tui-calendar```.
@@ -116,7 +136,7 @@ The API is defined in ```projects/ngx-mat-tui-calendar/src/public-api.ts```.
116
136
 
117
137
  ### Build
118
138
 
119
- Run `ng build` to build the project. The build artifacts will be stored in the `dist/ngx-mat-tui-calendar` directory.
139
+ Run `ng build` to build the library project. The build artifacts will be stored in the `dist/ngx-mat-tui-calendar` directory.
120
140
 
121
141
  ### README
122
142
 
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('distinct-colors'), require('uuid'), require('@fortawesome/free-solid-svg-icons'), require('tui-calendar'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/radio'), require('@angular/material/datepicker'), require('@angular/material/divider'), require('@angular/material/button'), require('@angular/material/input'), require('@angular/common'), require('mat-timepicker'), require('@angular/material/toolbar'), require('@fortawesome/angular-fontawesome'), require('@angular/material/button-toggle'), require('@angular/platform-browser/animations'), require('@angular/platform-browser'), require('@angular/flex-layout'), require('@angular/common/http'), require('@angular/cdk/overlay'), require('@angular/material/card'), require('@angular/material/icon'), require('@angular/material/core'), require('@angular/material/slide-toggle')) :
3
- typeof define === 'function' && define.amd ? define('ngx-mat-tui-calendar', ['exports', '@angular/core', '@angular/material/dialog', 'distinct-colors', 'uuid', '@fortawesome/free-solid-svg-icons', 'tui-calendar', '@angular/forms', '@angular/material/form-field', '@angular/material/radio', '@angular/material/datepicker', '@angular/material/divider', '@angular/material/button', '@angular/material/input', '@angular/common', 'mat-timepicker', '@angular/material/toolbar', '@fortawesome/angular-fontawesome', '@angular/material/button-toggle', '@angular/platform-browser/animations', '@angular/platform-browser', '@angular/flex-layout', '@angular/common/http', '@angular/cdk/overlay', '@angular/material/card', '@angular/material/icon', '@angular/material/core', '@angular/material/slide-toggle'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-mat-tui-calendar"] = {}, global.ng.core, global.ng.material.dialog, global.distinctColors, global.uuid, global.freeSolidSvgIcons, global.Calendar, global.ng.forms, global.ng.material.formField, global.ng.material.radio, global.ng.material.datepicker, global.ng.material.divider, global.ng.material.button, global.ng.material.input, global.ng.common, global.i10, global.ng.material.toolbar, global.i4$1, global.ng.material.buttonToggle, global.ng.platformBrowser.animations, global.ng.platformBrowser, global.ng.flexLayout, global.ng.common.http, global.ng.cdk.overlay, global.ng.material.card, global.ng.material.icon, global.ng.material.core, global.ng.material.slideToggle));
5
- })(this, (function (exports, i0, i1, distinctColors, uuid, freeSolidSvgIcons, Calendar, i7, i2, i3, i4, i5, i6, i8, i9, i10, i2$1, i4$1, i5$1, animations, platformBrowser, flexLayout, http, overlay, card, icon, core, slideToggle) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/platform-browser/animations'), require('@angular/platform-browser'), require('@angular/flex-layout'), require('@angular/forms'), require('@angular/common/http'), require('@angular/core'), require('@angular/cdk/overlay'), require('@angular/material/button'), require('@angular/material/button-toggle'), require('@angular/material/card'), require('@angular/material/datepicker'), require('@angular/material/dialog'), require('@angular/material/divider'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/core'), require('@angular/material/slide-toggle'), require('@angular/material/radio'), require('@angular/material/toolbar'), require('@fortawesome/angular-fontawesome'), require('mat-timepicker'), require('distinct-colors'), require('uuid'), require('@fortawesome/free-solid-svg-icons'), require('tui-calendar'), require('@angular/common')) :
3
+ typeof define === 'function' && define.amd ? define('ngx-mat-tui-calendar', ['exports', '@angular/platform-browser/animations', '@angular/platform-browser', '@angular/flex-layout', '@angular/forms', '@angular/common/http', '@angular/core', '@angular/cdk/overlay', '@angular/material/button', '@angular/material/button-toggle', '@angular/material/card', '@angular/material/datepicker', '@angular/material/dialog', '@angular/material/divider', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/core', '@angular/material/slide-toggle', '@angular/material/radio', '@angular/material/toolbar', '@fortawesome/angular-fontawesome', 'mat-timepicker', 'distinct-colors', 'uuid', '@fortawesome/free-solid-svg-icons', 'tui-calendar', '@angular/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-mat-tui-calendar"] = {}, global.ng.platformBrowser.animations, global.ng.platformBrowser, global.ng.flexLayout, global.ng.forms, global.ng.common.http, global.ng.core, global.ng.cdk.overlay, global.ng.material.button, global.ng.material.buttonToggle, global.ng.material.card, global.ng.material.datepicker, global.ng.material.dialog, global.ng.material.divider, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.core, global.ng.material.slideToggle, global.ng.material.radio, global.ng.material.toolbar, global.i4$1, global.i10, global.distinctColors, global.uuid, global.freeSolidSvgIcons, global.Calendar, global.ng.common));
5
+ })(this, (function (exports, animations, platformBrowser, flexLayout, i7, http, i0, overlay, i6, i5$1, card, i4, i1, i5, i2, icon, i8, core, slideToggle, i3, i2$1, i4$1, i10, distinctColors, uuid, freeSolidSvgIcons, Calendar, i9) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -24,36 +24,22 @@
24
24
  return Object.freeze(n);
25
25
  }
26
26
 
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var distinctColors__default = /*#__PURE__*/_interopDefaultLegacy(distinctColors);
30
- var Calendar__default = /*#__PURE__*/_interopDefaultLegacy(Calendar);
31
27
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
32
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
33
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
29
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
30
+ var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
34
31
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
32
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
35
33
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
36
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
34
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
37
35
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
38
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
39
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
36
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
40
37
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
41
38
  var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
42
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
43
-
44
- var NgxMatTuiCalendarService = /** @class */ (function () {
45
- function NgxMatTuiCalendarService() {
46
- }
47
- return NgxMatTuiCalendarService;
48
- }());
49
- NgxMatTuiCalendarService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
50
- NgxMatTuiCalendarService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarService, providedIn: 'root' });
51
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarService, decorators: [{
52
- type: i0.Injectable,
53
- args: [{
54
- providedIn: 'root'
55
- }]
56
- }], ctorParameters: function () { return []; } });
39
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
40
+ var distinctColors__default = /*#__PURE__*/_interopDefaultLegacy(distinctColors);
41
+ var Calendar__default = /*#__PURE__*/_interopDefaultLegacy(Calendar);
42
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
57
43
 
58
44
  /*! *****************************************************************************
59
45
  Copyright (c) Microsoft Corporation.
@@ -487,7 +473,7 @@
487
473
  this.closed = false;
488
474
  this.isAllDay = false;
489
475
  this.themeClass = '';
490
- console.log('NgxMatTuiCalendarEditorDialogComponent.constructor: data:', data);
476
+ // console.log('NgxMatTuiCalendarEditorDialogComponent.constructor: data:', data);
491
477
  this.color = data.darkMode ? 'accent' : 'primary';
492
478
  var schedule = data.schedule;
493
479
  if (schedule == null) {
@@ -586,7 +572,7 @@
586
572
  this.dialogRef.close({ schedule: schedule, performDelete: (performDelete == true) });
587
573
  };
588
574
  NgxMatTuiCalendarEditorDialogComponent.prototype.log = function (str) {
589
- console.warn(str);
575
+ // console.warn(str);
590
576
  };
591
577
  NgxMatTuiCalendarEditorDialogComponent.prototype.onUseAllDay = function () {
592
578
  this.isAllDay = true;
@@ -654,15 +640,15 @@
654
640
  this.appliedOptions = this.getDefaultOptions();
655
641
  }
656
642
  NgxMatTuiCalendarComponent.prototype.ngOnInit = function () {
657
- console.warn("calendar.component.ts: ngOnit");
643
+ // console.warn(`calendar.component.ts: ngOnit`)
658
644
  this.createTUICalendar();
659
645
  this.bindCallbacks();
660
646
  };
661
647
  NgxMatTuiCalendarComponent.prototype.ngOnChanges = function (changes) {
662
- console.warn(changes);
648
+ // console.warn(changes);
663
649
  if (this.calendar) {
664
650
  if (changes.options) {
665
- console.warn("change.option:", changes.options);
651
+ // console.warn(`change.option:`, changes.options);
666
652
  var options = changes.options.currentValue;
667
653
  this.setOptions(options);
668
654
  }
@@ -741,9 +727,9 @@
741
727
  };
742
728
  NgxMatTuiCalendarComponent.prototype.createTUICalendar = function () {
743
729
  var ioptions = this.preprocessIOptions(null);
744
- console.warn("calendar.component.ts: createTUICalendar: ioptions:", ioptions);
730
+ // console.warn(`calendar.component.ts: createTUICalendar: ioptions:`, ioptions);
745
731
  this.calendar = new Calendar__default["default"]('#calendar', ioptions);
746
- console.warn("calendar.component.ts: createTUICalendar: this.calendar:", this.calendar);
732
+ // console.warn(`calendar.component.ts: createTUICalendar: this.calendar:`, this.calendar);
747
733
  };
748
734
  NgxMatTuiCalendarComponent.prototype.bindCallbacks = function () {
749
735
  this.bindAfterRenderSchedule();
@@ -913,7 +899,7 @@
913
899
  if (this.appliedOptions.themeClass) {
914
900
  dialogConfig.panelClass = this.appliedOptions.themeClass;
915
901
  }
916
- console.warn("options: ", this.appliedOptions);
902
+ // console.warn(`options: `, this.appliedOptions);
917
903
  dialogConfig.data = { schedule: schedule, darkMode: this.appliedOptions.darkMode, themeClass: this.appliedOptions.themeClass };
918
904
  dialogConfig.autoFocus = true;
919
905
  var dialogRef = this.dialog.open(NgxMatTuiCalendarEditorDialogComponent, dialogConfig);
@@ -1005,7 +991,7 @@
1005
991
  var el = document.getElementById("theme-" + name);
1006
992
  if (el) {
1007
993
  var style = window.getComputedStyle(el, null);
1008
- console.warn("theme-" + name + " color:", style.color);
994
+ // console.warn(`theme-${name} color:`, style.color);
1009
995
  return style.color;
1010
996
  }
1011
997
  return '';
@@ -1188,7 +1174,9 @@
1188
1174
  slideToggle.MatSlideToggleModule,
1189
1175
  i2$1.MatToolbarModule,
1190
1176
  i4$1.FontAwesomeModule,
1191
- i10.MatTimepickerModule], exports: [NgxMatTuiCalendarComponent] });
1177
+ i10.MatTimepickerModule], exports: [NgxMatTuiCalendarComponent,
1178
+ NgxMatTuiCalendarWrapperComponent,
1179
+ NgxMatTuiCalendarEditorDialogComponent] });
1192
1180
  NgxMatTuiCalendarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarModule, imports: [[
1193
1181
  animations.BrowserAnimationsModule,
1194
1182
  platformBrowser.BrowserModule,
@@ -1251,13 +1239,31 @@
1251
1239
  ],
1252
1240
  exports: [
1253
1241
  NgxMatTuiCalendarComponent,
1242
+ NgxMatTuiCalendarWrapperComponent,
1243
+ NgxMatTuiCalendarEditorDialogComponent,
1254
1244
  ],
1255
1245
  entryComponents: [
1256
1246
  NgxMatTuiCalendarComponent,
1247
+ NgxMatTuiCalendarWrapperComponent,
1248
+ NgxMatTuiCalendarEditorDialogComponent,
1257
1249
  ],
1258
1250
  }]
1259
1251
  }] });
1260
1252
 
1253
+ var NgxMatTuiCalendarService = /** @class */ (function () {
1254
+ function NgxMatTuiCalendarService() {
1255
+ }
1256
+ return NgxMatTuiCalendarService;
1257
+ }());
1258
+ NgxMatTuiCalendarService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1259
+ NgxMatTuiCalendarService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarService, providedIn: 'root' });
1260
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: NgxMatTuiCalendarService, decorators: [{
1261
+ type: i0.Injectable,
1262
+ args: [{
1263
+ providedIn: 'root'
1264
+ }]
1265
+ }], ctorParameters: function () { return []; } });
1266
+
1261
1267
  /*
1262
1268
  * Public API Surface of ngx-mat-tui-calendar
1263
1269
  */
@@ -1268,8 +1274,10 @@
1268
1274
 
1269
1275
  exports.LocalDate = LocalDate;
1270
1276
  exports.NgxMatTuiCalendarComponent = NgxMatTuiCalendarComponent;
1277
+ exports.NgxMatTuiCalendarEditorDialogComponent = NgxMatTuiCalendarEditorDialogComponent;
1271
1278
  exports.NgxMatTuiCalendarModule = NgxMatTuiCalendarModule;
1272
1279
  exports.NgxMatTuiCalendarService = NgxMatTuiCalendarService;
1280
+ exports.NgxMatTuiCalendarWrapperComponent = NgxMatTuiCalendarWrapperComponent;
1273
1281
 
1274
1282
  Object.defineProperty(exports, '__esModule', { value: true });
1275
1283