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

wc-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wc-datepicker - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

dist/wc-datepicker/p-ecb86cf1.entry.js

14

dist/cjs/wc-datepicker.cjs.entry.js

@@ -399,3 +399,3 @@ 'use strict';

return (index.h("tr", { class: this.getClassName('calendar-row'), key: rowKey }, calendarRow.map((day) => {
var _a, _b;
var _a, _b, _c, _d, _e;
const isCurrent = isSameDay(day, this.currentDate);

@@ -415,2 +415,10 @@ const isOverflowing = day.getMonth() !== this.currentDate.getMonth();

});
const orderedValues = Boolean((_c = this.value) === null || _c === void 0 ? void 0 : _c[0])
? [
(_d = this.value) === null || _d === void 0 ? void 0 : _d[0],
((_e = this.value) === null || _e === void 0 ? void 0 : _e[1]) || this.hoveredDate
].sort((a, b) => a - b)
: [];
const isStart = this.range && isSameDay(orderedValues[0], day);
const isEnd = this.range && isSameDay(orderedValues[1], day);
const isToday = isSameDay(day, new Date());

@@ -426,3 +434,5 @@ const isDisabled = this.disableDate(day);

[this.getClassName('date--selected')]: isSelected,
[this.getClassName('date--in-range')]: isInRange
[this.getClassName('date--in-range')]: isInRange,
[this.getClassName('date--start')]: isStart,
[this.getClassName('date--end')]: isEnd
};

@@ -429,0 +439,0 @@ const Tag = isSelected

@@ -257,3 +257,3 @@ import { h, Host } from '@stencil/core';

return (h("tr", { class: this.getClassName('calendar-row'), key: rowKey }, calendarRow.map((day) => {
var _a, _b;
var _a, _b, _c, _d, _e;
const isCurrent = isSameDay(day, this.currentDate);

@@ -273,2 +273,10 @@ const isOverflowing = day.getMonth() !== this.currentDate.getMonth();

});
const orderedValues = Boolean((_c = this.value) === null || _c === void 0 ? void 0 : _c[0])
? [
(_d = this.value) === null || _d === void 0 ? void 0 : _d[0],
((_e = this.value) === null || _e === void 0 ? void 0 : _e[1]) || this.hoveredDate
].sort((a, b) => a - b)
: [];
const isStart = this.range && isSameDay(orderedValues[0], day);
const isEnd = this.range && isSameDay(orderedValues[1], day);
const isToday = isSameDay(day, new Date());

@@ -284,3 +292,5 @@ const isDisabled = this.disableDate(day);

[this.getClassName('date--selected')]: isSelected,
[this.getClassName('date--in-range')]: isInRange
[this.getClassName('date--in-range')]: isInRange,
[this.getClassName('date--start')]: isStart,
[this.getClassName('date--end')]: isEnd
};

@@ -287,0 +297,0 @@ const Tag = isSelected

@@ -396,3 +396,3 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';

return (h("tr", { class: this.getClassName('calendar-row'), key: rowKey }, calendarRow.map((day) => {
var _a, _b;
var _a, _b, _c, _d, _e;
const isCurrent = isSameDay(day, this.currentDate);

@@ -412,2 +412,10 @@ const isOverflowing = day.getMonth() !== this.currentDate.getMonth();

});
const orderedValues = Boolean((_c = this.value) === null || _c === void 0 ? void 0 : _c[0])
? [
(_d = this.value) === null || _d === void 0 ? void 0 : _d[0],
((_e = this.value) === null || _e === void 0 ? void 0 : _e[1]) || this.hoveredDate
].sort((a, b) => a - b)
: [];
const isStart = this.range && isSameDay(orderedValues[0], day);
const isEnd = this.range && isSameDay(orderedValues[1], day);
const isToday = isSameDay(day, new Date());

@@ -423,3 +431,5 @@ const isDisabled = this.disableDate(day);

[this.getClassName('date--selected')]: isSelected,
[this.getClassName('date--in-range')]: isInRange
[this.getClassName('date--in-range')]: isInRange,
[this.getClassName('date--start')]: isStart,
[this.getClassName('date--end')]: isEnd
};

@@ -426,0 +436,0 @@ const Tag = isSelected

@@ -395,3 +395,3 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-2c898150.js';

return (h("tr", { class: this.getClassName('calendar-row'), key: rowKey }, calendarRow.map((day) => {
var _a, _b;
var _a, _b, _c, _d, _e;
const isCurrent = isSameDay(day, this.currentDate);

@@ -411,2 +411,10 @@ const isOverflowing = day.getMonth() !== this.currentDate.getMonth();

});
const orderedValues = Boolean((_c = this.value) === null || _c === void 0 ? void 0 : _c[0])
? [
(_d = this.value) === null || _d === void 0 ? void 0 : _d[0],
((_e = this.value) === null || _e === void 0 ? void 0 : _e[1]) || this.hoveredDate
].sort((a, b) => a - b)
: [];
const isStart = this.range && isSameDay(orderedValues[0], day);
const isEnd = this.range && isSameDay(orderedValues[1], day);
const isToday = isSameDay(day, new Date());

@@ -422,3 +430,5 @@ const isDisabled = this.disableDate(day);

[this.getClassName('date--selected')]: isSelected,
[this.getClassName('date--in-range')]: isInRange
[this.getClassName('date--in-range')]: isInRange,
[this.getClassName('date--start')]: isStart,
[this.getClassName('date--end')]: isEnd
};

@@ -425,0 +435,0 @@ const Tag = isSelected

2

dist/wc-datepicker/wc-datepicker.esm.js

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

import{p as t,b as e}from"./p-b662e034.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),t(n)})().then((t=>e([["p-5cd59291",[[2,"wc-datepicker",{clearButtonContent:[1,"clear-button-content"],disabled:[4],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],range:[4],labels:[16],locale:[1],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],previousMonthButtonContent:[1,"previous-month-button-content"],previousYearButtonContent:[1,"previous-year-button-content"],showClearButton:[4,"show-clear-button"],showMonthStepper:[4,"show-month-stepper"],showTodayButton:[4,"show-today-button"],showYearStepper:[4,"show-year-stepper"],startDate:[1,"start-date"],todayButtonContent:[1,"today-button-content"],value:[1040],currentDate:[32],hoveredDate:[32],weekdays:[32]}]]]],t)));
import{p as t,b as e}from"./p-b662e034.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),t(n)})().then((t=>e([["p-ecb86cf1",[[2,"wc-datepicker",{clearButtonContent:[1,"clear-button-content"],disabled:[4],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],range:[4],labels:[16],locale:[1],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],previousMonthButtonContent:[1,"previous-month-button-content"],previousYearButtonContent:[1,"previous-year-button-content"],showClearButton:[4,"show-clear-button"],showMonthStepper:[4,"show-month-stepper"],showTodayButton:[4,"show-today-button"],showYearStepper:[4,"show-year-stepper"],startDate:[1,"start-date"],todayButtonContent:[1,"today-button-content"],value:[1040],currentDate:[32],hoveredDate:[32],weekdays:[32]}]]]],t)));
{
"name": "wc-datepicker",
"version": "0.4.0",
"version": "0.5.0",
"description": "A small, accessible and customizable datepicker written in TypeScript.",

@@ -5,0 +5,0 @@ "repository": {

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