ng2-jalali-date-picker
Advanced tools
Comparing version 1.3.2 to 1.3.3
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -25,24 +34,50 @@ var CalendarNavComponent = (function () { | ||
}()); | ||
CalendarNavComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
selector: 'dp-calendar-nav', | ||
template: '<div class="dp-calendar-nav-container"> <button class="dp-calendar-nav-left" [hidden]="!showLeftNav" [disabled]="leftNavDisabled" (click)="leftNavClicked()"> < </button> <span class="dp-nav-header" [hidden]="isLabelClickable">{{label}}</span> <button class="dp-nav-header dp-nav-header-btn" [hidden]="!isLabelClickable" (click)="labelClicked()"> {{label}} </button> <button class="dp-calendar-nav-right" [hidden]="!showRightNav" [disabled]="rightNavDisabled" (click)="rightNavClicked()"> > </button> </div>', | ||
styles: ['.dp-calendar-nav-container { position: relative; box-sizing: border-box; height: 25px; border: 1px solid #000000; border-bottom: none;}.dp-nav-date-btn { box-sizing: border-box; height: 25px; border: 1px solid #000000; border-bottom: none;}.dp-calendar-nav-left,.dp-calendar-nav-right { position: absolute; top: 50%; transform: translateY(-50%); cursor: pointer;}.dp-calendar-nav-left { left: 0;}.dp-calendar-nav-right { right: 0;}.dp-nav-header { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 13px;}.dp-nav-header-btn { cursor: pointer;}:host.dp-material .dp-calendar-nav-container { height: 30px; border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-nav-left,:host.dp-material .dp-calendar-nav-right { border: none; background: #FFFFFF; outline: none; font-size: 16px;}:host.dp-material .dp-nav-header-btn { height: 20px; width: 100px; border: none; background: #FFFFFF; outline: none;}:host.dp-material .dp-nav-header-btn:hover { background: rgba(0, 0, 0, 0.05);}:host.dp-material .dp-nav-header-btn:active { background: rgba(0, 0, 0, 0.1);}'] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
CalendarNavComponent.ctorParameters = function () { return []; }; | ||
CalendarNavComponent.propDecorators = { | ||
'onLeftNav': [{ type: core_1.Output },], | ||
'onRightNav': [{ type: core_1.Output },], | ||
'onLabelClick': [{ type: core_1.Output },], | ||
'label': [{ type: core_1.Input },], | ||
'isLabelClickable': [{ type: core_1.Input },], | ||
'showLeftNav': [{ type: core_1.Input },], | ||
'showRightNav': [{ type: core_1.Input },], | ||
'leftNavDisabled': [{ type: core_1.Input },], | ||
'rightNavDisabled': [{ type: core_1.Input },], | ||
'theme': [{ type: core_1.HostBinding, args: ['class',] }, { type: core_1.Input },], | ||
}; | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], CalendarNavComponent.prototype, "onLeftNav", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], CalendarNavComponent.prototype, "onRightNav", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], CalendarNavComponent.prototype, "onLabelClick", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", String) | ||
], CalendarNavComponent.prototype, "label", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Boolean) | ||
], CalendarNavComponent.prototype, "isLabelClickable", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Boolean) | ||
], CalendarNavComponent.prototype, "showLeftNav", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Boolean) | ||
], CalendarNavComponent.prototype, "showRightNav", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Boolean) | ||
], CalendarNavComponent.prototype, "leftNavDisabled", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Boolean) | ||
], CalendarNavComponent.prototype, "rightNavDisabled", void 0); | ||
__decorate([ | ||
core_1.HostBinding('class'), core_1.Input(), | ||
__metadata("design:type", String) | ||
], CalendarNavComponent.prototype, "theme", void 0); | ||
CalendarNavComponent = __decorate([ | ||
core_1.Component({ | ||
selector: 'dp-calendar-nav', | ||
template: '<div class="dp-calendar-nav-container"> <button class="dp-calendar-nav-left" [hidden]="!showLeftNav" [disabled]="leftNavDisabled" (click)="leftNavClicked()"> < </button> <span class="dp-nav-header" [hidden]="isLabelClickable">{{label}}</span> <button class="dp-nav-header dp-nav-header-btn" [hidden]="!isLabelClickable" (click)="labelClicked()"> {{label}} </button> <button class="dp-calendar-nav-right" [hidden]="!showRightNav" [disabled]="rightNavDisabled" (click)="rightNavClicked()"> > </button> </div>', | ||
styles: ['.dp-calendar-nav-container { position: relative; box-sizing: border-box; height: 25px; border: 1px solid #000000; border-bottom: none;}.dp-nav-date-btn { box-sizing: border-box; height: 25px; border: 1px solid #000000; border-bottom: none;}.dp-calendar-nav-left,.dp-calendar-nav-right { position: absolute; top: 50%; transform: translateY(-50%); cursor: pointer;}.dp-calendar-nav-left { left: 0;}.dp-calendar-nav-right { right: 0;}.dp-nav-header { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 13px;}.dp-nav-header-btn { cursor: pointer;}:host.dp-material .dp-calendar-nav-container { height: 30px; border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-nav-left,:host.dp-material .dp-calendar-nav-right { border: none; background: #FFFFFF; outline: none; font-size: 16px;}:host.dp-material .dp-nav-header-btn { height: 20px; width: 100px; border: none; background: #FFFFFF; outline: none;}:host.dp-material .dp-nav-header-btn:hover { background: rgba(0, 0, 0, 0.05);}:host.dp-material .dp-nav-header-btn:active { background: rgba(0, 0, 0, 0.1);}'] | ||
}) | ||
], CalendarNavComponent); | ||
exports.CalendarNavComponent = CalendarNavComponent; | ||
//# sourceMappingURL=calendar-nav.component.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var core_1 = require("@angular/core"); | ||
var DomHelper = (function () { | ||
var DomHelper = DomHelper_1 = (function () { | ||
function DomHelper() { | ||
@@ -62,15 +68,15 @@ } | ||
var element = _a.element, container = _a.container, anchor = _a.anchor, dimElem = _a.dimElem, drops = _a.drops, opens = _a.opens; | ||
DomHelper.setYAxisPosition(element, container, anchor, drops); | ||
DomHelper.setXAxisPosition(element, container, anchor, dimElem, opens); | ||
if (drops === 'down' && !DomHelper.isBottomInView(dimElem)) { | ||
DomHelper.setYAxisPosition(element, container, anchor, 'up'); | ||
DomHelper_1.setYAxisPosition(element, container, anchor, drops); | ||
DomHelper_1.setXAxisPosition(element, container, anchor, dimElem, opens); | ||
if (drops === 'down' && !DomHelper_1.isBottomInView(dimElem)) { | ||
DomHelper_1.setYAxisPosition(element, container, anchor, 'up'); | ||
} | ||
if (drops === 'up' && !DomHelper.isTopInView(dimElem)) { | ||
DomHelper.setYAxisPosition(element, container, anchor, 'down'); | ||
if (drops === 'up' && !DomHelper_1.isTopInView(dimElem)) { | ||
DomHelper_1.setYAxisPosition(element, container, anchor, 'down'); | ||
} | ||
if (opens === 'right' && !DomHelper.isRightInView(dimElem)) { | ||
DomHelper.setXAxisPosition(element, container, anchor, dimElem, 'left'); | ||
if (opens === 'right' && !DomHelper_1.isRightInView(dimElem)) { | ||
DomHelper_1.setXAxisPosition(element, container, anchor, dimElem, 'left'); | ||
} | ||
if (opens === 'left' && !DomHelper.isLeftInView(dimElem)) { | ||
DomHelper.setXAxisPosition(element, container, anchor, dimElem, 'right'); | ||
if (opens === 'left' && !DomHelper_1.isLeftInView(dimElem)) { | ||
DomHelper_1.setXAxisPosition(element, container, anchor, dimElem, 'right'); | ||
} | ||
@@ -80,8 +86,7 @@ }; | ||
}()); | ||
DomHelper.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
DomHelper.ctorParameters = function () { return []; }; | ||
DomHelper = DomHelper_1 = __decorate([ | ||
core_1.Injectable() | ||
], DomHelper); | ||
exports.DomHelper = DomHelper; | ||
var DomHelper_1; | ||
//# sourceMappingURL=dom-appender.service.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -145,8 +151,6 @@ var moment = require("jalali-moment"); | ||
}()); | ||
UtilsService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
UtilsService.ctorParameters = function () { return []; }; | ||
UtilsService = __decorate([ | ||
core_1.Injectable() | ||
], UtilsService); | ||
exports.UtilsService = UtilsService; | ||
//# sourceMappingURL=utils.service.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -20,24 +26,22 @@ var forms_1 = require("@angular/forms"); | ||
}()); | ||
DpDatePickerModule.decorators = [ | ||
{ type: core_1.NgModule, args: [{ | ||
providers: [ | ||
dom_appender_service_1.DomHelper, | ||
utils_service_1.UtilsService | ||
], | ||
declarations: [ | ||
date_picker_component_1.DatePickerComponent, | ||
day_calendar_component_1.DayCalendarComponent, | ||
month_calendar_component_1.MonthCalendarComponent, | ||
calendar_nav_component_1.CalendarNavComponent | ||
], | ||
imports: [ | ||
common_1.CommonModule, | ||
forms_1.FormsModule | ||
], | ||
exports: [date_picker_component_1.DatePickerComponent, month_calendar_component_1.MonthCalendarComponent, day_calendar_component_1.DayCalendarComponent] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
DpDatePickerModule.ctorParameters = function () { return []; }; | ||
DpDatePickerModule = __decorate([ | ||
core_1.NgModule({ | ||
providers: [ | ||
dom_appender_service_1.DomHelper, | ||
utils_service_1.UtilsService | ||
], | ||
declarations: [ | ||
date_picker_component_1.DatePickerComponent, | ||
day_calendar_component_1.DayCalendarComponent, | ||
month_calendar_component_1.MonthCalendarComponent, | ||
calendar_nav_component_1.CalendarNavComponent | ||
], | ||
imports: [ | ||
common_1.CommonModule, | ||
forms_1.FormsModule | ||
], | ||
exports: [date_picker_component_1.DatePickerComponent, month_calendar_component_1.MonthCalendarComponent, day_calendar_component_1.DayCalendarComponent] | ||
}) | ||
], DpDatePickerModule); | ||
exports.DpDatePickerModule = DpDatePickerModule; | ||
//# sourceMappingURL=date-picker.module.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -10,3 +19,4 @@ var moment = require("jalali-moment"); | ||
var calendar_type_1 = require("../common/types/calendar-type"); | ||
var DatePickerComponent = (function () { | ||
var day_calendar_component_1 = require("../day-calendar/day-calendar.component"); | ||
var DatePickerComponent = DatePickerComponent_1 = (function () { | ||
function DatePickerComponent(dayPickerService, domHelper, elemRef, renderer, utilsService) { | ||
@@ -249,47 +259,92 @@ this.dayPickerService = dayPickerService; | ||
}()); | ||
DatePickerComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
selector: 'dp-date-picker', | ||
template: '<div> <div class="dp-input-container"> <input type="text" class="dp-picker-input" [placeholder]="placeholder" [ngModel]="inputElementValue" (ngModelChange)="onViewDateChange($event)" (focus)="inputFocused()" [readonly]="componentConfig.disableKeypress" [disabled]="disabled"/> <button class="dp-current-location-btn" *ngIf="componentConfig.showGoToCurrent" (click)="moveToCurrent()" [hidden]="!_areCalendarsShown"> </button> </div> <div #container> <div class="dp-popup {{theme}}" [ngSwitch]="type" [hidden]="!_areCalendarsShown"> <dp-day-calendar #dayCalendar *ngSwitchCase="\'day\'" [config]="dayCalendarConfig" [ngModel]="_selected" [displayDate]="currentDateView" (onSelect)="dateSelected($event, \'day\')" [theme]="theme"> </dp-day-calendar> <dp-month-calendar #monthCalendar *ngSwitchCase="\'month\'" [config]="dayCalendarConfig" [ngModel]="_selected" [displayDate]="currentDateView" (onSelect)="dateSelected($event, \'month\')" [theme]="theme"> </dp-month-calendar> </div> </div> </div> ', | ||
styles: [':host { display: inline-block;}:host.dp-material .dp-picker-input { box-sizing: border-box; height: 30px; width: 213px; font-size: 13px; outline: none;}:host.dp-material .dp-current-location-btn { top: calc(50% - 9px); right: 5px; height: 18px; width: 18px; border: 2px solid rgba(0, 0, 0, 0.6);}.dp-input-container { position: relative;}.dp-popup { position: relative; background: #FFFFFF; box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1); border-left: 1px solid rgba(0, 0, 0, 0.1); border-right: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1); z-index: 9999; white-space: nowrap;}.dp-selected { background: #106CC8; color: #FFFFFF;}.dp-current-location-btn { position: absolute; top: calc(50% - 7px); right: 5px; height: 14px; width: 13px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(0, 0, 0, 0.6); outline: none; border-radius: 50%; box-shadow: inset 0 0 0 3px #FFFFFF; cursor: pointer;}.dp-current-location-btn:hover { background: #000000;}'], | ||
providers: [ | ||
date_picker_service_1.DatePickerService, | ||
{ | ||
provide: forms_1.NG_VALUE_ACCESSOR, | ||
useExisting: core_1.forwardRef(function () { return DatePickerComponent; }), | ||
multi: true | ||
}, | ||
{ | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return DatePickerComponent; }), | ||
multi: true | ||
} | ||
] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
DatePickerComponent.ctorParameters = function () { return [ | ||
{ type: date_picker_service_1.DatePickerService, }, | ||
{ type: dom_appender_service_1.DomHelper, }, | ||
{ type: core_1.ElementRef, }, | ||
{ type: core_1.Renderer, }, | ||
{ type: utils_service_1.UtilsService, }, | ||
]; }; | ||
DatePickerComponent.propDecorators = { | ||
'config': [{ type: core_1.Input },], | ||
'type': [{ type: core_1.Input },], | ||
'placeholder': [{ type: core_1.Input },], | ||
'disabled': [{ type: core_1.Input },], | ||
'displayDate': [{ type: core_1.Input },], | ||
'theme': [{ type: core_1.HostBinding, args: ['class',] }, { type: core_1.Input },], | ||
'minDate': [{ type: core_1.Input },], | ||
'maxDate': [{ type: core_1.Input },], | ||
'calendarContainer': [{ type: core_1.ViewChild, args: ['container',] },], | ||
'dayCalendarRef': [{ type: core_1.ViewChild, args: ['dayCalendar',] },], | ||
'monthCalendarRef': [{ type: core_1.ViewChild, args: ['monthCalendar',] },], | ||
'onClick': [{ type: core_1.HostListener, args: ['click',] },], | ||
'onBodyClick': [{ type: core_1.HostListener, args: ['document:click',] },], | ||
'onScroll': [{ type: core_1.HostListener, args: ['document:scroll',] }, { type: core_1.HostListener, args: ['window:resize',] },], | ||
}; | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DatePickerComponent.prototype, "config", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", String) | ||
], DatePickerComponent.prototype, "type", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", String) | ||
], DatePickerComponent.prototype, "placeholder", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Boolean) | ||
], DatePickerComponent.prototype, "disabled", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DatePickerComponent.prototype, "displayDate", void 0); | ||
__decorate([ | ||
core_1.HostBinding('class'), core_1.Input(), | ||
__metadata("design:type", String) | ||
], DatePickerComponent.prototype, "theme", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DatePickerComponent.prototype, "minDate", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DatePickerComponent.prototype, "maxDate", void 0); | ||
__decorate([ | ||
core_1.ViewChild('container'), | ||
__metadata("design:type", core_1.ElementRef) | ||
], DatePickerComponent.prototype, "calendarContainer", void 0); | ||
__decorate([ | ||
core_1.ViewChild('dayCalendar'), | ||
__metadata("design:type", day_calendar_component_1.DayCalendarComponent) | ||
], DatePickerComponent.prototype, "dayCalendarRef", void 0); | ||
__decorate([ | ||
core_1.ViewChild('monthCalendar'), | ||
__metadata("design:type", day_calendar_component_1.DayCalendarComponent) | ||
], DatePickerComponent.prototype, "monthCalendarRef", void 0); | ||
__decorate([ | ||
core_1.HostListener('click'), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", []), | ||
__metadata("design:returntype", void 0) | ||
], DatePickerComponent.prototype, "onClick", null); | ||
__decorate([ | ||
core_1.HostListener('document:click'), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", []), | ||
__metadata("design:returntype", void 0) | ||
], DatePickerComponent.prototype, "onBodyClick", null); | ||
__decorate([ | ||
core_1.HostListener('document:scroll'), | ||
core_1.HostListener('window:resize'), | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", []), | ||
__metadata("design:returntype", void 0) | ||
], DatePickerComponent.prototype, "onScroll", null); | ||
DatePickerComponent = DatePickerComponent_1 = __decorate([ | ||
core_1.Component({ | ||
selector: 'dp-date-picker', | ||
template: '<div> <div class="dp-input-container"> <input type="text" class="dp-picker-input" [placeholder]="placeholder" [ngModel]="inputElementValue" (ngModelChange)="onViewDateChange($event)" (focus)="inputFocused()" [readonly]="componentConfig.disableKeypress" [disabled]="disabled"/> <button class="dp-current-location-btn" *ngIf="componentConfig.showGoToCurrent" (click)="moveToCurrent()" [hidden]="!_areCalendarsShown"> </button> </div> <div #container> <div class="dp-popup {{theme}}" [ngSwitch]="type" [hidden]="!_areCalendarsShown"> <dp-day-calendar #dayCalendar *ngSwitchCase="\'day\'" [config]="dayCalendarConfig" [ngModel]="_selected" [displayDate]="currentDateView" (onSelect)="dateSelected($event, \'day\')" [theme]="theme"> </dp-day-calendar> <dp-month-calendar #monthCalendar *ngSwitchCase="\'month\'" [config]="dayCalendarConfig" [ngModel]="_selected" [displayDate]="currentDateView" (onSelect)="dateSelected($event, \'month\')" [theme]="theme"> </dp-month-calendar> </div> </div> </div> ', | ||
styles: [':host { display: inline-block;}:host.dp-material .dp-picker-input { box-sizing: border-box; height: 30px; width: 213px; font-size: 13px; outline: none;}:host.dp-material .dp-current-location-btn { top: calc(50% - 9px); right: 5px; height: 18px; width: 18px; border: 2px solid rgba(0, 0, 0, 0.6);}.dp-input-container { position: relative;}.dp-popup { position: relative; background: #FFFFFF; box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1); border-left: 1px solid rgba(0, 0, 0, 0.1); border-right: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(0, 0, 0, 0.1); z-index: 9999; white-space: nowrap;}.dp-selected { background: #106CC8; color: #FFFFFF;}.dp-current-location-btn { position: absolute; top: calc(50% - 7px); right: 5px; height: 14px; width: 13px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(0, 0, 0, 0.6); outline: none; border-radius: 50%; box-shadow: inset 0 0 0 3px #FFFFFF; cursor: pointer;}.dp-current-location-btn:hover { background: #000000;}'], | ||
providers: [ | ||
date_picker_service_1.DatePickerService, | ||
{ | ||
provide: forms_1.NG_VALUE_ACCESSOR, | ||
useExisting: core_1.forwardRef(function () { return DatePickerComponent_1; }), | ||
multi: true | ||
}, | ||
{ | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return DatePickerComponent_1; }), | ||
multi: true | ||
} | ||
] | ||
}), | ||
__metadata("design:paramtypes", [date_picker_service_1.DatePickerService, | ||
dom_appender_service_1.DomHelper, | ||
core_1.ElementRef, | ||
core_1.Renderer, | ||
utils_service_1.UtilsService]) | ||
], DatePickerComponent); | ||
exports.DatePickerComponent = DatePickerComponent; | ||
var DatePickerComponent_1; | ||
//# sourceMappingURL=date-picker.component.js.map |
@@ -10,2 +10,11 @@ "use strict"; | ||
}; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -163,10 +172,7 @@ var moment = require("jalali-moment"); | ||
}()); | ||
DatePickerService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
DatePickerService.ctorParameters = function () { return [ | ||
{ type: utils_service_1.UtilsService, }, | ||
]; }; | ||
DatePickerService = __decorate([ | ||
core_1.Injectable(), | ||
__metadata("design:paramtypes", [utils_service_1.UtilsService]) | ||
], DatePickerService); | ||
exports.DatePickerService = DatePickerService; | ||
//# sourceMappingURL=date-picker.service.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -7,3 +16,3 @@ var day_calendar_service_1 = require("./day-calendar.service"); | ||
var calendar_type_1 = require("../common/types/calendar-type"); | ||
var DayCalendarComponent = (function () { | ||
var DayCalendarComponent = DayCalendarComponent_1 = (function () { | ||
function DayCalendarComponent(dayCalendarService, utilsService) { | ||
@@ -156,37 +165,54 @@ this.dayCalendarService = dayCalendarService; | ||
}()); | ||
DayCalendarComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
selector: 'dp-day-calendar', | ||
template: '<div class="dp-day-calendar-container" [hidden]="currentCalendarType !== CalendarType.Day"> <dp-calendar-nav [label]="getNavLabel()" [showLeftNav]="shouldShowLeftNav()" [showRightNav]="shouldShowRightNav()" [isLabelClickable]="isNavHeaderBtnClickable()" [theme]="theme" (onLeftNav)="onLeftNav()" (onRightNav)="onRightNav()" (onLabelClick)="toggleCalendar(CalendarType.Month)"> </dp-calendar-nav> <div class="dp-calendar-wrapper" [ngClass]="{\'dp-hide-near-month\': !componentConfig.showNearMonthDays,\'rtl\':isJalali()}"> <div class="dp-weekdays"> <span class="dp-calendar-weekday" *ngFor="let weekday of weekdays">{{weekday}}</span> </div> <div class="dp-calendar-week" *ngFor="let week of weeks"> <span *ngIf="componentConfig.showWeekNumbers" class="dp-week-number">{{week[0].date.isoWeek()}}</span> <button class="dp-calendar-day" *ngFor="let day of week" (click)="dayClicked(day)" [disabled]="isDisabledDay(day)" [ngClass]="{ \'dp-selected\': day.selected, \'dp-current-month\': day.currentMonth, \'dp-prev-month\': day.prevMonth, \'dp-next-month\': day.nextMonth, \'dp-current-day\': day.currentDay }"> {{getDayBtnText(day)}} </button> </div> </div> </div> <dp-month-calendar *ngIf="currentCalendarType === CalendarType.Month" [config]="monthCalendarConfig" [displayDate]="currentDateView" [theme]="theme" (onSelect)="monthSelected($event)" (onNavHeaderBtnClick)="toggleCalendar(CalendarType.Day)"> </dp-month-calendar> ', | ||
styles: [':host { display: inline-block;}.dp-calendar-wrapper { box-sizing: border-box; border: 1px solid #000000; background: #FFFFFF;}.dp-calendar-wrapper .dp-calendar-weekday:first-child { border-left: none;}.dp-calendar-weekday { box-sizing: border-box; display: inline-block; width: 30px; text-align: center; border-left: 1px solid #000000; border-bottom: 1px solid #000000;}.dp-calendar-day { box-sizing: border-box; width: 30px; height: 30px; cursor: pointer;}.dp-selected { background: #106CC8; color: #FFFFFF;}.dp-prev-month,.dp-next-month { opacity: 0.5;}.dp-hide-near-month .dp-prev-month,.dp-hide-near-month .dp-next-month { visibility: hidden;}.dp-week-number { position: absolute; font-size: 9px;}:host.dp-material .dp-calendar-weekday { height: 25px; width: 30px; line-height: 25px; background: #E0E0E0; border: none;}:host.dp-material .dp-calendar-wrapper { border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-wrapper.rtl { direction: rtl;}:host.dp-material .dp-calendar-month,:host.dp-material .dp-calendar-day { box-sizing: border-box; background: #FFFFFF; border-radius: 50%; border: none; outline: none;}:host.dp-material .dp-calendar-month:hover,:host.dp-material .dp-calendar-day:hover { background: #E0E0E0;}:host.dp-material .dp-selected { background: #106CC8; color: #FFFFFF;}:host.dp-material .dp-selected:hover { background: #106CC8;}:host.dp-material .dp-current-day { border: 1px solid #106CC8;}'], | ||
providers: [ | ||
day_calendar_service_1.DayCalendarService, | ||
{ | ||
provide: forms_1.NG_VALUE_ACCESSOR, | ||
useExisting: core_1.forwardRef(function () { return DayCalendarComponent; }), | ||
multi: true | ||
}, | ||
{ | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return DayCalendarComponent; }), | ||
multi: true | ||
} | ||
] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
DayCalendarComponent.ctorParameters = function () { return [ | ||
{ type: day_calendar_service_1.DayCalendarService, }, | ||
{ type: utils_service_1.UtilsService, }, | ||
]; }; | ||
DayCalendarComponent.propDecorators = { | ||
'config': [{ type: core_1.Input },], | ||
'displayDate': [{ type: core_1.Input },], | ||
'minDate': [{ type: core_1.Input },], | ||
'maxDate': [{ type: core_1.Input },], | ||
'theme': [{ type: core_1.HostBinding, args: ['class',] }, { type: core_1.Input },], | ||
'onSelect': [{ type: core_1.Output },], | ||
'onNavHeaderBtnClick': [{ type: core_1.Output },], | ||
}; | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DayCalendarComponent.prototype, "config", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DayCalendarComponent.prototype, "displayDate", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DayCalendarComponent.prototype, "minDate", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], DayCalendarComponent.prototype, "maxDate", void 0); | ||
__decorate([ | ||
core_1.HostBinding('class'), core_1.Input(), | ||
__metadata("design:type", String) | ||
], DayCalendarComponent.prototype, "theme", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], DayCalendarComponent.prototype, "onSelect", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], DayCalendarComponent.prototype, "onNavHeaderBtnClick", void 0); | ||
DayCalendarComponent = DayCalendarComponent_1 = __decorate([ | ||
core_1.Component({ | ||
selector: 'dp-day-calendar', | ||
template: '<div class="dp-day-calendar-container" [hidden]="currentCalendarType !== CalendarType.Day"> <dp-calendar-nav [label]="getNavLabel()" [showLeftNav]="shouldShowLeftNav()" [showRightNav]="shouldShowRightNav()" [isLabelClickable]="isNavHeaderBtnClickable()" [theme]="theme" (onLeftNav)="onLeftNav()" (onRightNav)="onRightNav()" (onLabelClick)="toggleCalendar(CalendarType.Month)"> </dp-calendar-nav> <div class="dp-calendar-wrapper" [ngClass]="{\'dp-hide-near-month\': !componentConfig.showNearMonthDays,\'rtl\':isJalali()}"> <div class="dp-weekdays"> <span class="dp-calendar-weekday" *ngFor="let weekday of weekdays">{{weekday}}</span> </div> <div class="dp-calendar-week" *ngFor="let week of weeks"> <span *ngIf="componentConfig.showWeekNumbers" class="dp-week-number">{{week[0].date.isoWeek()}}</span> <button class="dp-calendar-day" *ngFor="let day of week" (click)="dayClicked(day)" [disabled]="isDisabledDay(day)" [ngClass]="{ \'dp-selected\': day.selected, \'dp-current-month\': day.currentMonth, \'dp-prev-month\': day.prevMonth, \'dp-next-month\': day.nextMonth, \'dp-current-day\': day.currentDay }"> {{getDayBtnText(day)}} </button> </div> </div> </div> <dp-month-calendar *ngIf="currentCalendarType === CalendarType.Month" [config]="monthCalendarConfig" [displayDate]="currentDateView" [theme]="theme" (onSelect)="monthSelected($event)" (onNavHeaderBtnClick)="toggleCalendar(CalendarType.Day)"> </dp-month-calendar> ', | ||
styles: [':host { display: inline-block;}.dp-calendar-wrapper { box-sizing: border-box; border: 1px solid #000000; background: #FFFFFF;}.dp-calendar-wrapper .dp-calendar-weekday:first-child { border-left: none;}.dp-calendar-weekday { box-sizing: border-box; display: inline-block; width: 30px; text-align: center; border-left: 1px solid #000000; border-bottom: 1px solid #000000;}.dp-calendar-day { box-sizing: border-box; width: 30px; height: 30px; cursor: pointer;}.dp-selected { background: #106CC8; color: #FFFFFF;}.dp-prev-month,.dp-next-month { opacity: 0.5;}.dp-hide-near-month .dp-prev-month,.dp-hide-near-month .dp-next-month { visibility: hidden;}.dp-week-number { position: absolute; font-size: 9px;}:host.dp-material .dp-calendar-weekday { height: 25px; width: 30px; line-height: 25px; background: #E0E0E0; border: none;}:host.dp-material .dp-calendar-wrapper { border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-wrapper.rtl { direction: rtl;}:host.dp-material .dp-calendar-month,:host.dp-material .dp-calendar-day { box-sizing: border-box; background: #FFFFFF; border-radius: 50%; border: none; outline: none;}:host.dp-material .dp-calendar-month:hover,:host.dp-material .dp-calendar-day:hover { background: #E0E0E0;}:host.dp-material .dp-selected { background: #106CC8; color: #FFFFFF;}:host.dp-material .dp-selected:hover { background: #106CC8;}:host.dp-material .dp-current-day { border: 1px solid #106CC8;}'], | ||
providers: [ | ||
day_calendar_service_1.DayCalendarService, | ||
{ | ||
provide: forms_1.NG_VALUE_ACCESSOR, | ||
useExisting: core_1.forwardRef(function () { return DayCalendarComponent_1; }), | ||
multi: true | ||
}, | ||
{ | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return DayCalendarComponent_1; }), | ||
multi: true | ||
} | ||
] | ||
}), | ||
__metadata("design:paramtypes", [day_calendar_service_1.DayCalendarService, | ||
utils_service_1.UtilsService]) | ||
], DayCalendarComponent); | ||
exports.DayCalendarComponent = DayCalendarComponent; | ||
var DayCalendarComponent_1; | ||
//# sourceMappingURL=day-calendar.component.js.map |
@@ -10,2 +10,11 @@ "use strict"; | ||
}; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -249,10 +258,7 @@ var moment = require("jalali-moment"); | ||
}()); | ||
DayCalendarService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
DayCalendarService.ctorParameters = function () { return [ | ||
{ type: utils_service_1.UtilsService, }, | ||
]; }; | ||
DayCalendarService = __decorate([ | ||
core_1.Injectable(), | ||
__metadata("design:paramtypes", [utils_service_1.UtilsService]) | ||
], DayCalendarService); | ||
exports.DayCalendarService = DayCalendarService; | ||
//# sourceMappingURL=day-calendar.service.js.map |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -7,3 +16,3 @@ var month_calendar_service_1 = require("./month-calendar.service"); | ||
var calendar_type_1 = require("../common/types/calendar-type"); | ||
var MonthCalendarComponent = (function () { | ||
var MonthCalendarComponent = MonthCalendarComponent_1 = (function () { | ||
function MonthCalendarComponent(monthCalendarService, utilsService) { | ||
@@ -127,37 +136,54 @@ this.monthCalendarService = monthCalendarService; | ||
}()); | ||
MonthCalendarComponent.decorators = [ | ||
{ type: core_1.Component, args: [{ | ||
selector: 'dp-month-calendar', | ||
template: '<dp-calendar-nav [label]="getNavLabel()" [showLeftNav]="shouldShowLeftNav()" [showRightNav]="shouldShowRightNav()" [isLabelClickable]="isNavHeaderBtnClickable()" [theme]="theme" (onLeftNav)="onLeftNav()" (onRightNav)="onRightNav()" (onLabelClick)="toggleCalendar()"> </dp-calendar-nav> <div class="dp-calendar-wrapper" [ngClass]="{\'rtl\':isJalali()}"> <div class="dp-months-row" *ngFor="let monthRow of yearMonths"> <button class="dp-calendar-month" *ngFor="let month of monthRow" [disabled]="isDisabledMonth(month)" [ngClass]="{\'dp-selected\': month.selected,\'dp-current-month\': month.currentMonth}" (click)="monthClicked(month)"> {{getMonthBtnText(month)}} </button> </div> </div> ', | ||
styles: [':host { display: inline-block;}.dp-calendar-wrapper { background: #FFFFFF; border: 1px solid #000000;}.dp-calendar-wrapper.rtl { direction: rtl;}.dp-calendar-month { box-sizing: border-box; width: 52.5px; height: 52.5px; cursor: pointer;}.dp-calendar-month.dp-selected { background: #106CC8; color: #FFFFFF;}:host.dp-material .dp-calendar-weekday { height: 25px; width: 30px; line-height: 25px; background: #E0E0E0; border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-wrapper { border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-month { box-sizing: border-box; background: #FFFFFF; border-radius: 50%; border: none; outline: none;}:host.dp-material .dp-calendar-month:hover { background: #E0E0E0;}:host.dp-material .dp-selected { background: #106CC8; color: #FFFFFF;}:host.dp-material .dp-selected:hover { background: #106CC8;}:host.dp-material .dp-current-month { border: 1px solid #106CC8;}'], | ||
providers: [ | ||
month_calendar_service_1.MonthCalendarService, | ||
{ | ||
provide: forms_1.NG_VALUE_ACCESSOR, | ||
useExisting: core_1.forwardRef(function () { return MonthCalendarComponent; }), | ||
multi: true | ||
}, | ||
{ | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return MonthCalendarComponent; }), | ||
multi: true | ||
} | ||
] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
MonthCalendarComponent.ctorParameters = function () { return [ | ||
{ type: month_calendar_service_1.MonthCalendarService, }, | ||
{ type: utils_service_1.UtilsService, }, | ||
]; }; | ||
MonthCalendarComponent.propDecorators = { | ||
'config': [{ type: core_1.Input },], | ||
'displayDate': [{ type: core_1.Input },], | ||
'minDate': [{ type: core_1.Input },], | ||
'maxDate': [{ type: core_1.Input },], | ||
'theme': [{ type: core_1.HostBinding, args: ['class',] }, { type: core_1.Input },], | ||
'onSelect': [{ type: core_1.Output },], | ||
'onNavHeaderBtnClick': [{ type: core_1.Output },], | ||
}; | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], MonthCalendarComponent.prototype, "config", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], MonthCalendarComponent.prototype, "displayDate", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], MonthCalendarComponent.prototype, "minDate", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object) | ||
], MonthCalendarComponent.prototype, "maxDate", void 0); | ||
__decorate([ | ||
core_1.HostBinding('class'), core_1.Input(), | ||
__metadata("design:type", String) | ||
], MonthCalendarComponent.prototype, "theme", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], MonthCalendarComponent.prototype, "onSelect", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], MonthCalendarComponent.prototype, "onNavHeaderBtnClick", void 0); | ||
MonthCalendarComponent = MonthCalendarComponent_1 = __decorate([ | ||
core_1.Component({ | ||
selector: 'dp-month-calendar', | ||
template: '<dp-calendar-nav [label]="getNavLabel()" [showLeftNav]="shouldShowLeftNav()" [showRightNav]="shouldShowRightNav()" [isLabelClickable]="isNavHeaderBtnClickable()" [theme]="theme" (onLeftNav)="onLeftNav()" (onRightNav)="onRightNav()" (onLabelClick)="toggleCalendar()"> </dp-calendar-nav> <div class="dp-calendar-wrapper" [ngClass]="{\'rtl\':isJalali()}"> <div class="dp-months-row" *ngFor="let monthRow of yearMonths"> <button class="dp-calendar-month" *ngFor="let month of monthRow" [disabled]="isDisabledMonth(month)" [ngClass]="{\'dp-selected\': month.selected,\'dp-current-month\': month.currentMonth}" (click)="monthClicked(month)"> {{getMonthBtnText(month)}} </button> </div> </div> ', | ||
styles: [':host { display: inline-block;}.dp-calendar-wrapper { background: #FFFFFF; border: 1px solid #000000;}.dp-calendar-wrapper.rtl { direction: rtl;}.dp-calendar-month { box-sizing: border-box; width: 52.5px; height: 52.5px; cursor: pointer;}.dp-calendar-month.dp-selected { background: #106CC8; color: #FFFFFF;}:host.dp-material .dp-calendar-weekday { height: 25px; width: 30px; line-height: 25px; background: #E0E0E0; border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-wrapper { border: 1px solid #E0E0E0;}:host.dp-material .dp-calendar-month { box-sizing: border-box; background: #FFFFFF; border-radius: 50%; border: none; outline: none;}:host.dp-material .dp-calendar-month:hover { background: #E0E0E0;}:host.dp-material .dp-selected { background: #106CC8; color: #FFFFFF;}:host.dp-material .dp-selected:hover { background: #106CC8;}:host.dp-material .dp-current-month { border: 1px solid #106CC8;}'], | ||
providers: [ | ||
month_calendar_service_1.MonthCalendarService, | ||
{ | ||
provide: forms_1.NG_VALUE_ACCESSOR, | ||
useExisting: core_1.forwardRef(function () { return MonthCalendarComponent_1; }), | ||
multi: true | ||
}, | ||
{ | ||
provide: forms_1.NG_VALIDATORS, | ||
useExisting: core_1.forwardRef(function () { return MonthCalendarComponent_1; }), | ||
multi: true | ||
} | ||
] | ||
}), | ||
__metadata("design:paramtypes", [month_calendar_service_1.MonthCalendarService, | ||
utils_service_1.UtilsService]) | ||
], MonthCalendarComponent); | ||
exports.MonthCalendarComponent = MonthCalendarComponent; | ||
var MonthCalendarComponent_1; | ||
//# sourceMappingURL=month-calendar.component.js.map |
@@ -10,2 +10,11 @@ "use strict"; | ||
}; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var core_1 = require("@angular/core"); | ||
@@ -159,10 +168,7 @@ var moment = require("jalali-moment"); | ||
}()); | ||
MonthCalendarService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
MonthCalendarService.ctorParameters = function () { return [ | ||
{ type: utils_service_1.UtilsService, }, | ||
]; }; | ||
MonthCalendarService = __decorate([ | ||
core_1.Injectable(), | ||
__metadata("design:paramtypes", [utils_service_1.UtilsService]) | ||
], MonthCalendarService); | ||
exports.MonthCalendarService = MonthCalendarService; | ||
//# sourceMappingURL=month-calendar.service.js.map |
{ | ||
"name": "ng2-jalali-date-picker", | ||
"author": "Mojtaba Zarei", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -6,4 +6,3 @@ [![Build Status](https://travis-ci.org/fingerpich/jalali-angular-datepicker.svg?branch=master)](https://travis-ci.org/fingerpich/jalali-angular-datepicker) | ||
# Jalali Date Picker | ||
This is a configurable jalali date-picker build for Angular2 applications and uses MomentJS as its dependency. | ||
It does not depend on bootstrap or jquery or any other library. | ||
This is a configurable jalali date-picker build for Angular2 applications and uses MomentJS as its dependency. | ||
[DEMO](https://fingerpich.github.io/jalali-angular-datepicker/) | ||
@@ -21,3 +20,3 @@ | ||
2. import the `DpDatePickerModule` module: | ||
`import {DpDatePickerModule} from 'jalali-angular-datepicker';` | ||
`import {DpDatePickerModule} from 'ng2-jalali-date-picker';` | ||
3. Add `DpDatePickerModule` to your module imports: | ||
@@ -94,3 +93,3 @@ ```ts | ||
import {Component, ViewChild} from '@angular/core'; | ||
import {DayPickerComponent} from 'jalali-angular-datepicker'; | ||
import {DayPickerComponent} from 'ng2-jalali-date-picker'; | ||
@@ -97,0 +96,0 @@ @Component({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
260426
2239
209