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

@schedule-x/date-picker

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schedule-x/date-picker - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

49

./dist/core.cjs.js

@@ -870,18 +870,24 @@ 'use strict';

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const datePickerItIT = {
Date: 'Data',
'MM/DD/YYYY': 'DD/MM/YYYY',
'Next month': 'Mese successivo',
'Previous month': 'Mese precedente',
};
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
const calendarItIT = {
Today: 'Oggi',
Month: 'Mese',
Week: 'Settimana',
Day: 'Giorno',
events: 'eventi',
event: 'evento',
'No events': 'Nessun evento',
};
const itIT = {
...datePickerItIT,
...calendarItIT,
};
const datePickerEnGB = {

@@ -953,5 +959,22 @@ Date: 'Date',

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
};
const translations = {
deDE,
enUS,
itIT,
enGB,

@@ -958,0 +981,0 @@ svSE,

@@ -870,18 +870,24 @@ 'use strict';

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const datePickerItIT = {
Date: 'Data',
'MM/DD/YYYY': 'DD/MM/YYYY',
'Next month': 'Mese successivo',
'Previous month': 'Mese precedente',
};
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
const calendarItIT = {
Today: 'Oggi',
Month: 'Mese',
Week: 'Settimana',
Day: 'Giorno',
events: 'eventi',
event: 'evento',
'No events': 'Nessun evento',
};
const itIT = {
...datePickerItIT,
...calendarItIT,
};
const datePickerEnGB = {

@@ -953,5 +959,22 @@ Date: 'Date',

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
};
const translations = {
deDE,
enUS,
itIT,
enGB,

@@ -958,0 +981,0 @@ svSE,

@@ -868,18 +868,24 @@ import { options, createContext, Fragment, render, createElement } from 'preact';

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const datePickerItIT = {
Date: 'Data',
'MM/DD/YYYY': 'DD/MM/YYYY',
'Next month': 'Mese successivo',
'Previous month': 'Mese precedente',
};
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
const calendarItIT = {
Today: 'Oggi',
Month: 'Mese',
Week: 'Settimana',
Day: 'Giorno',
events: 'eventi',
event: 'evento',
'No events': 'Nessun evento',
};
const itIT = {
...datePickerItIT,
...calendarItIT,
};
const datePickerEnGB = {

@@ -951,5 +957,22 @@ Date: 'Date',

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
};
const translations = {
deDE,
enUS,
itIT,
enGB,

@@ -956,0 +979,0 @@ svSE,

@@ -870,18 +870,24 @@ (function (global, factory) {

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const datePickerItIT = {
Date: 'Data',
'MM/DD/YYYY': 'DD/MM/YYYY',
'Next month': 'Mese successivo',
'Previous month': 'Mese precedente',
};
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
const calendarItIT = {
Today: 'Oggi',
Month: 'Mese',
Week: 'Settimana',
Day: 'Giorno',
events: 'eventi',
event: 'evento',
'No events': 'Nessun evento',
};
const itIT = {
...datePickerItIT,
...calendarItIT,
};
const datePickerEnGB = {

@@ -953,5 +959,22 @@ Date: 'Date',

class InvalidLocaleError extends Error {
constructor(locale) {
super(`Invalid locale: ${locale}`);
}
}
const translate = (locale, languages) => (key) => {
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale))
throw new InvalidLocaleError(locale);
const deHyphenatedLocale = locale.replace('-', '');
const language = languages[deHyphenatedLocale];
if (!language)
return key;
return language[key] || key;
};
const translations = {
deDE,
enUS,
itIT,
enGB,

@@ -958,0 +981,0 @@ svSE,

{
"name": "@schedule-x/date-picker",
"version": "1.3.0",
"version": "1.4.0",
"description": "Schedule-X date picker component",

@@ -33,3 +33,3 @@ "author": {

"homepage": "https://schedule-x.dev",
"gitHead": "b00c5c989e877d5451829ca58d9162992c5d85f5"
"gitHead": "d2dc237f52dfccb30ef98fc06a1b8941cde820b6"
}
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