Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-jalali-date-picker

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-jalali-date-picker - npm Package Compare versions

Comparing version 1.4.1 to 1.5.0

2

common/models/date.model.d.ts
import { Moment } from 'jalali-moment';
export interface IDate {
date: Moment;
selected: boolean;
selected?: boolean;
}

@@ -60,3 +60,3 @@ import { ECalendarValue } from '../common/types/calendar-value-enum';

getNavLabel(): string;
getDayBtnText(day: IDay): string;
getDayBtnText(day: IDay): any;
onLeftNav(): void;

@@ -63,0 +63,0 @@ onRightNav(): void;

@@ -7,4 +7,6 @@ import { Moment } from 'jalali-moment';

import { IMonthCalendarConfig } from '../month-calendar/month-calendar-config';
import { DomSanitizer } from "@angular/platform-browser";
export declare class DayCalendarService {
private utilsService;
private sanitizer;
readonly DAYS: string[];

@@ -14,3 +16,3 @@ readonly GREGORIAN_DEFAULT_CONFIG: IDayCalendarConfig;

DEFAULT_CONFIG: IDayCalendarConfig;
constructor(utilsService: UtilsService);
constructor(utilsService: UtilsService, sanitizer: DomSanitizer);
private getMonthFormat(config?);

@@ -34,3 +36,3 @@ private removeNearMonthWeeks(currentMonth, monthArray);

getMonthCalendarConfig(componentConfig: IDayCalendarConfig): IMonthCalendarConfig;
getDayBtnText(config: IDayCalendarConfig, day: Moment): string;
getDayBtnText(config: IDayCalendarConfig, day: Moment): any;
}

@@ -14,5 +14,7 @@ "use strict";

var calendar_type_enum_1 = require("../common/types/calendar-type-enum");
var platform_browser_1 = require("@angular/platform-browser");
var DayCalendarService = (function () {
function DayCalendarService(utilsService) {
function DayCalendarService(utilsService, sanitizer) {
this.utilsService = utilsService;
this.sanitizer = sanitizer;
this.DAYS = ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'];

@@ -51,7 +53,7 @@ this.GREGORIAN_DEFAULT_CONFIG = {

firstDayOfWeek: 'sa',
format: 'jDD-jMM-jYYYY',
format: 'jD-jM-jYYYY',
allowMultiSelect: false,
monthFormat: 'jMMMM, jYYYY',
enableMonthSelector: true,
dayBtnFormat: 'jDD'
dayBtnFormat: 'jD'
};

@@ -75,3 +77,3 @@ this.DEFAULT_CONFIG = this.JALALI_DEFAULT_CONFIG;

if (!config || (config.calendarSystem !== calendar_type_enum_1.ECalendarSystem.gregorian)) {
moment.loadPersian();
moment.loadPersian(true);
this.DEFAULT_CONFIG = this.JALALI_DEFAULT_CONFIG;

@@ -81,2 +83,3 @@ }

this.DEFAULT_CONFIG = this.GREGORIAN_DEFAULT_CONFIG;
moment.unloadPersian();
}

@@ -188,6 +191,6 @@ return __assign({}, this.DEFAULT_CONFIG, this.utilsService.clearUndefined(config));

DayCalendarService.prototype.getDayBtnText = function (config, day) {
if (config.dayBtnFormatter) {
return config.dayBtnFormatter(day);
}
return day.format(config.dayBtnFormat);
return config.dayBtnFormatter ?
config.dayBtnFormatter(day) :
day.format(config.dayBtnFormat);
// return this.sanitizer.bypassSecurityTrustHtml(formattedDay);
};

@@ -202,4 +205,5 @@ return DayCalendarService;

{ type: utils_service_1.UtilsService, },
{ type: platform_browser_1.DomSanitizer, },
]; };
exports.DayCalendarService = DayCalendarService;
//# sourceMappingURL=day-calendar.service.js.map

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"DayCalendarService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../common/services/utils/utils.service","name":"UtilsService"}]}],"getMonthFormat":[{"__symbolic":"method"}],"removeNearMonthWeeks":[{"__symbolic":"method"}],"getConfig":[{"__symbolic":"method"}],"generateDaysMap":[{"__symbolic":"method"}],"generateMonthArray":[{"__symbolic":"method"}],"generateWeekdays":[{"__symbolic":"method"}],"isDateDisabled":[{"__symbolic":"method"}],"getHeaderLabel":[{"__symbolic":"method"}],"shouldShowLeft":[{"__symbolic":"method"}],"shouldShowRight":[{"__symbolic":"method"}],"generateDaysIndexMap":[{"__symbolic":"method"}],"getMonthCalendarConfig":[{"__symbolic":"method"}],"getDayBtnText":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"DayCalendarService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../common/services/utils/utils.service","name":"UtilsService"}]}],"getMonthFormat":[{"__symbolic":"method"}],"removeNearMonthWeeks":[{"__symbolic":"method"}],"getConfig":[{"__symbolic":"method"}],"generateDaysMap":[{"__symbolic":"method"}],"generateMonthArray":[{"__symbolic":"method"}],"generateWeekdays":[{"__symbolic":"method"}],"isDateDisabled":[{"__symbolic":"method"}],"getHeaderLabel":[{"__symbolic":"method"}],"shouldShowLeft":[{"__symbolic":"method"}],"shouldShowRight":[{"__symbolic":"method"}],"generateDaysIndexMap":[{"__symbolic":"method"}],"getMonthCalendarConfig":[{"__symbolic":"method"}],"getDayBtnText":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"DayCalendarService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../common/services/utils/utils.service","name":"UtilsService"},{"__symbolic":"reference","module":"@angular/platform-browser","name":"DomSanitizer"}]}],"getMonthFormat":[{"__symbolic":"method"}],"removeNearMonthWeeks":[{"__symbolic":"method"}],"getConfig":[{"__symbolic":"method"}],"generateDaysMap":[{"__symbolic":"method"}],"generateMonthArray":[{"__symbolic":"method"}],"generateWeekdays":[{"__symbolic":"method"}],"isDateDisabled":[{"__symbolic":"method"}],"getHeaderLabel":[{"__symbolic":"method"}],"shouldShowLeft":[{"__symbolic":"method"}],"shouldShowRight":[{"__symbolic":"method"}],"generateDaysIndexMap":[{"__symbolic":"method"}],"getMonthCalendarConfig":[{"__symbolic":"method"}],"getDayBtnText":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"DayCalendarService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../common/services/utils/utils.service","name":"UtilsService"},{"__symbolic":"reference","module":"@angular/platform-browser","name":"DomSanitizer"}]}],"getMonthFormat":[{"__symbolic":"method"}],"removeNearMonthWeeks":[{"__symbolic":"method"}],"getConfig":[{"__symbolic":"method"}],"generateDaysMap":[{"__symbolic":"method"}],"generateMonthArray":[{"__symbolic":"method"}],"generateWeekdays":[{"__symbolic":"method"}],"isDateDisabled":[{"__symbolic":"method"}],"getHeaderLabel":[{"__symbolic":"method"}],"shouldShowLeft":[{"__symbolic":"method"}],"shouldShowRight":[{"__symbolic":"method"}],"generateDaysIndexMap":[{"__symbolic":"method"}],"getMonthCalendarConfig":[{"__symbolic":"method"}],"getDayBtnText":[{"__symbolic":"method"}]}}}}]

@@ -5,3 +5,3 @@ import { Moment } from 'jalali-moment';

date: Moment;
selected: boolean;
selected?: boolean;
currentMonth?: boolean;

@@ -8,0 +8,0 @@ prevMonth?: boolean;

{
"name": "ng2-jalali-date-picker",
"author": "Mojtaba Zarei",
"version": "1.4.1",
"version": "1.5.0",
"license": "MIT",

@@ -40,25 +40,25 @@ "main": "index.js",

"dependencies": {
"jalali-moment": "^1.1.0"
"jalali-moment": "^1.2.3"
},
"devDependencies": {
"@angular/cli": "^1.0.4",
"@angular/common": "^4.0.3",
"@angular/compiler": "^4.0.3",
"@angular/compiler-cli": "^4.0.3",
"@angular/core": "^4.0.3",
"@angular/forms": "^4.0.3",
"@angular/platform-browser": "^4.0.3",
"@angular/platform-browser-dynamic": "^4.0.3",
"@angular/router": "^4.0.3",
"@types/jasmine": "2.5.38",
"@angular/cli": "^1.1.1",
"@angular/common": "^4.1.3",
"@angular/compiler": "^4.1.3",
"@angular/compiler-cli": "^4.1.3",
"@angular/core": "^4.1.3",
"@angular/forms": "^4.1.3",
"@angular/platform-browser": "^4.1.3",
"@angular/platform-browser-dynamic": "^4.1.3",
"@angular/router": "^4.1.3",
"@types/jasmine": "2.5.51",
"@types/node": "~6.0.60",
"codacy-coverage": "^2.0.2",
"codelyzer": "~2.1.1",
"codelyzer": "~3.0.1",
"core-js": "^2.4.1",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"jasmine-core": "~2.6.3",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",

@@ -68,10 +68,10 @@ "karma-jasmine-html-reporter": "^0.2.2",

"ncp": "^2.0.0",
"protractor": "~5.1.0",
"protractor": "~5.1.2",
"rimraf": "^2.6.1",
"rxjs": "^5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.4.2",
"typescript": "~2.1.6",
"uglify-js": "^2.8.12",
"zone.js": "^0.8.4"
"rxjs": "^5.4.0",
"ts-node": "~3.0.6",
"tslint": "~5.4.3",
"typescript": "~2.3.4",
"uglify-js": "^3.0.15",
"zone.js": "^0.8.12"
},

@@ -78,0 +78,0 @@ "angularCompilerOptions": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc