payload-reserve 2.0.0 → 2.1.0

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.
@@ -8,6 +8,11 @@ export declare function getHourInTimezone(date: Date, timeZone: string): number;
8
8
  * (round-trip check rejects shape-valid impossibilities like 2026-02-30).
9
9
  */
10
10
  export declare function isValidDayKey(dayKey: string): boolean;
11
+ /**
12
+ * True when the given string is a usable IANA timezone name. Non-throwing
13
+ * counterpart to {@link validateTimezone}; an empty/nullish value is not valid.
14
+ */
15
+ export declare function isValidTimezone(timeZone: null | string | undefined): timeZone is string;
11
16
  /**
12
17
  * Throws when the given string is not a valid IANA timezone name.
13
18
  */
@@ -61,13 +61,25 @@ function getWallClockFormatter(timeZone) {
61
61
  }
62
62
  }
63
63
  /**
64
- * Throws when the given string is not a valid IANA timezone name.
65
- */ export function validateTimezone(timeZone) {
64
+ * True when the given string is a usable IANA timezone name. Non-throwing
65
+ * counterpart to {@link validateTimezone}; an empty/nullish value is not valid.
66
+ */ export function isValidTimezone(timeZone) {
67
+ if (!timeZone) {
68
+ return false;
69
+ }
66
70
  try {
67
71
  new Intl.DateTimeFormat('en-US', {
68
72
  timeZone
69
73
  });
74
+ return true;
70
75
  } catch {
76
+ return false;
77
+ }
78
+ }
79
+ /**
80
+ * Throws when the given string is not a valid IANA timezone name.
81
+ */ export function validateTimezone(timeZone) {
82
+ if (!isValidTimezone(timeZone)) {
71
83
  throw new Error(`Invalid timezone "${timeZone}" — use an IANA name like 'Europe/Paris' or 'UTC'`);
72
84
  }
73
85
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/timezoneUtils.ts"],"sourcesContent":["import type { DayOfWeek } from '../types.js'\n\nconst DAY_BY_UTC_INDEX: DayOfWeek[] = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']\n\nconst DAY_KEY_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\nconst TIME_RE = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/\n\nconst dayKeyFormatters = new Map<string, Intl.DateTimeFormat>()\nconst wallClockFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction getDayKeyFormatter(timeZone: string): Intl.DateTimeFormat {\n let formatter = dayKeyFormatters.get(timeZone)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat('en-CA', {\n day: '2-digit',\n month: '2-digit',\n timeZone,\n year: 'numeric',\n })\n dayKeyFormatters.set(timeZone, formatter)\n }\n return formatter\n}\n\nfunction getWallClockFormatter(timeZone: string): Intl.DateTimeFormat {\n let formatter = wallClockFormatters.get(timeZone)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat('en-CA', {\n day: '2-digit',\n hour: '2-digit',\n hourCycle: 'h23',\n minute: '2-digit',\n month: '2-digit',\n second: '2-digit',\n timeZone,\n year: 'numeric',\n })\n wallClockFormatters.set(timeZone, formatter)\n }\n return formatter\n}\n\n/**\n * Wall-clock hour (0-23) of an instant as seen in the given timezone.\n */\nexport function getHourInTimezone(date: Date, timeZone: string): number {\n const parts = getWallClockFormatter(timeZone).formatToParts(date)\n return Number(parts.find((p) => p.type === 'hour')?.value ?? '0')\n}\n\n/**\n * True when the string is a real calendar date in YYYY-MM-DD form\n * (round-trip check rejects shape-valid impossibilities like 2026-02-30).\n */\nexport function isValidDayKey(dayKey: string): boolean {\n if (!DAY_KEY_RE.test(dayKey)) {\n return false\n }\n try {\n return new Date(`${dayKey}T00:00:00Z`).toISOString().slice(0, 10) === dayKey\n } catch {\n return false\n }\n}\n\n/**\n * Throws when the given string is not a valid IANA timezone name.\n */\nexport function validateTimezone(timeZone: string): void {\n try {\n new Intl.DateTimeFormat('en-US', { timeZone })\n } catch {\n throw new Error(\n `Invalid timezone \"${timeZone}\" — use an IANA name like 'Europe/Paris' or 'UTC'`,\n )\n }\n}\n\n/**\n * Calendar day key (YYYY-MM-DD) of an instant as seen in the given timezone.\n * en-CA locale formats dates as YYYY-MM-DD natively.\n */\nexport function getDayKeyInTimezone(date: Date, timeZone: string): string {\n return getDayKeyFormatter(timeZone).format(date)\n}\n\n/**\n * Day of week for a calendar date — TZ-independent pure calendar math.\n */\nexport function getDayOfWeekFromDayKey(dayKey: string): DayOfWeek {\n if (!DAY_KEY_RE.test(dayKey)) {\n throw new Error(`Invalid day key \"${dayKey}\" — expected YYYY-MM-DD`)\n }\n return DAY_BY_UTC_INDEX[new Date(`${dayKey}T00:00:00Z`).getUTCDay()]\n}\n\n/**\n * Wall-clock parts of a UTC instant in the given timezone, reconstructed as a\n * UTC timestamp — the difference to the instant is the zone's offset.\n */\nfunction offsetMs(timeZone: string, utcDate: Date): number {\n const parts = getWallClockFormatter(timeZone).formatToParts(utcDate)\n const get = (type: string): number =>\n Number(parts.find((p) => p.type === type)?.value ?? '0')\n const asUTC = Date.UTC(\n get('year'),\n get('month') - 1,\n get('day'),\n get('hour'),\n get('minute'),\n get('second'),\n )\n return asUTC - utcDate.getTime()\n}\n\n/**\n * The UTC instant of wall-clock `HH:mm` on calendar day `dayKey` in `timeZone`.\n * Two-pass offset algorithm; DST-safe. Spring-forward gap times resolve to a\n * nearby valid instant (for midnight-gap zones like America/Santiago this can be\n * late on the prior calendar day); fall-back ambiguous times resolve to one\n * consistent occurrence.\n */\nexport function combineDayKeyAndTime(dayKey: string, time: string, timeZone: string): Date {\n if (!DAY_KEY_RE.test(dayKey)) {\n throw new Error(`Invalid day key \"${dayKey}\" — expected YYYY-MM-DD`)\n }\n if (!TIME_RE.test(time)) {\n throw new Error(`Invalid time \"${time}\" — expected HH:mm`)\n }\n const [y, mo, d] = dayKey.split('-').map(Number)\n const [h, mi] = time.split(':').map(Number)\n const guess = Date.UTC(y, mo - 1, d, h, mi)\n const candidate = guess - offsetMs(timeZone, new Date(guess))\n return new Date(guess - offsetMs(timeZone, new Date(candidate)))\n}\n\n/**\n * Instant of 23:59:59.999 (in `timeZone`) on the day containing `date`.\n */\nexport function endOfDayInTimezone(date: Date, timeZone: string): Date {\n const dayKey = getDayKeyInTimezone(date, timeZone)\n const lastMinute = combineDayKeyAndTime(dayKey, '23:59', timeZone)\n return new Date(lastMinute.getTime() + 59_999)\n}\n\n/**\n * Pure calendar arithmetic on day keys — DST-proof day iteration.\n */\nexport function addDaysToDayKey(dayKey: string, days: number): string {\n if (!DAY_KEY_RE.test(dayKey)) {\n throw new Error(`Invalid day key \"${dayKey}\" — expected YYYY-MM-DD`)\n }\n const base = new Date(`${dayKey}T00:00:00Z`)\n const shifted = new Date(base.getTime() + days * 86_400_000)\n return shifted.toISOString().slice(0, 10)\n}\n"],"names":["DAY_BY_UTC_INDEX","DAY_KEY_RE","TIME_RE","dayKeyFormatters","Map","wallClockFormatters","getDayKeyFormatter","timeZone","formatter","get","Intl","DateTimeFormat","day","month","year","set","getWallClockFormatter","hour","hourCycle","minute","second","getHourInTimezone","date","parts","formatToParts","Number","find","p","type","value","isValidDayKey","dayKey","test","Date","toISOString","slice","validateTimezone","Error","getDayKeyInTimezone","format","getDayOfWeekFromDayKey","getUTCDay","offsetMs","utcDate","asUTC","UTC","getTime","combineDayKeyAndTime","time","y","mo","d","split","map","h","mi","guess","candidate","endOfDayInTimezone","lastMinute","addDaysToDayKey","days","base","shifted"],"mappings":"AAEA,MAAMA,mBAAgC;IAAC;IAAO;IAAO;IAAO;IAAO;IAAO;IAAO;CAAM;AAEvF,MAAMC,aAAa;AAEnB,MAAMC,UAAU;AAEhB,MAAMC,mBAAmB,IAAIC;AAC7B,MAAMC,sBAAsB,IAAID;AAEhC,SAASE,mBAAmBC,QAAgB;IAC1C,IAAIC,YAAYL,iBAAiBM,GAAG,CAACF;IACrC,IAAI,CAACC,WAAW;QACdA,YAAY,IAAIE,KAAKC,cAAc,CAAC,SAAS;YAC3CC,KAAK;YACLC,OAAO;YACPN;YACAO,MAAM;QACR;QACAX,iBAAiBY,GAAG,CAACR,UAAUC;IACjC;IACA,OAAOA;AACT;AAEA,SAASQ,sBAAsBT,QAAgB;IAC7C,IAAIC,YAAYH,oBAAoBI,GAAG,CA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D,aAAaZ,qBAAqBhB,QAAQ,SAASxB;IACzD,OAAO,IAAI0B,KAAK0B,WAAWb,OAAO,KAAK;AACzC;AAEA;;CAEC,GACD,OAAO,SAASc,gBAAgB7B,MAAc,EAAE8B,IAAY;IAC1D,IAAI,CAAC5D,WAAW+B,IAAI,CAACD,SAAS;QAC5B,MAAM,IAAIM,MAAM,CAAC,iBAAiB,EAAEN,OAAO,uBAAuB,CAAC;IACrE;IACA,MAAM+B,OAAO,IAAI7B,KAAK,GAAGF,OAAO,UAAU,CAAC;IAC3C,MAAMgC,UAAU,IAAI9B,KAAK6B,KAAKhB,OAAO,KAAKe,OAAO;IACjD,OAAOE,QAAQ7B,WAAW,GAAGC,KAAK,CAAC,GAAG;AACxC"}
1
+ {"version":3,"sources":["../../src/utilities/timezoneUtils.ts"],"sourcesContent":["import type { DayOfWeek } from '../types.js'\n\nconst DAY_BY_UTC_INDEX: DayOfWeek[] = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']\n\nconst DAY_KEY_RE = /^\\d{4}-\\d{2}-\\d{2}$/\n\nconst TIME_RE = /^(?:[01]\\d|2[0-3]):[0-5]\\d$/\n\nconst dayKeyFormatters = new Map<string, Intl.DateTimeFormat>()\nconst wallClockFormatters = new Map<string, Intl.DateTimeFormat>()\n\nfunction getDayKeyFormatter(timeZone: string): Intl.DateTimeFormat {\n let formatter = dayKeyFormatters.get(timeZone)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat('en-CA', {\n day: '2-digit',\n month: '2-digit',\n timeZone,\n year: 'numeric',\n })\n dayKeyFormatters.set(timeZone, formatter)\n }\n return formatter\n}\n\nfunction getWallClockFormatter(timeZone: string): Intl.DateTimeFormat {\n let formatter = wallClockFormatters.get(timeZone)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat('en-CA', {\n day: '2-digit',\n hour: '2-digit',\n hourCycle: 'h23',\n minute: '2-digit',\n month: '2-digit',\n second: '2-digit',\n timeZone,\n year: 'numeric',\n })\n wallClockFormatters.set(timeZone, formatter)\n }\n return formatter\n}\n\n/**\n * Wall-clock hour (0-23) of an instant as seen in the given timezone.\n */\nexport function getHourInTimezone(date: Date, timeZone: string): number {\n const parts = getWallClockFormatter(timeZone).formatToParts(date)\n return Number(parts.find((p) => p.type === 'hour')?.value ?? '0')\n}\n\n/**\n * True when the string is a real calendar date in YYYY-MM-DD form\n * (round-trip check rejects shape-valid impossibilities like 2026-02-30).\n */\nexport function isValidDayKey(dayKey: string): boolean {\n if (!DAY_KEY_RE.test(dayKey)) {\n return false\n }\n try {\n return new Date(`${dayKey}T00:00:00Z`).toISOString().slice(0, 10) === dayKey\n } catch {\n return false\n }\n}\n\n/**\n * True when the given string is a usable IANA timezone name. Non-throwing\n * counterpart to {@link validateTimezone}; an empty/nullish value is not valid.\n */\nexport function isValidTimezone(timeZone: null | string | undefined): timeZone is string {\n if (!timeZone) {\n return false\n }\n try {\n new Intl.DateTimeFormat('en-US', { timeZone })\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Throws when the given string is not a valid IANA timezone name.\n */\nexport function validateTimezone(timeZone: string): void {\n if (!isValidTimezone(timeZone)) {\n throw new Error(\n `Invalid timezone \"${timeZone}\" — use an IANA name like 'Europe/Paris' or 'UTC'`,\n )\n }\n}\n\n/**\n * Calendar day key (YYYY-MM-DD) of an instant as seen in the given timezone.\n * en-CA locale formats dates as YYYY-MM-DD natively.\n */\nexport function getDayKeyInTimezone(date: Date, timeZone: string): string {\n return getDayKeyFormatter(timeZone).format(date)\n}\n\n/**\n * Day of week for a calendar date — TZ-independent pure calendar math.\n */\nexport function getDayOfWeekFromDayKey(dayKey: string): DayOfWeek {\n if (!DAY_KEY_RE.test(dayKey)) {\n throw new Error(`Invalid day key \"${dayKey}\" — expected YYYY-MM-DD`)\n }\n return DAY_BY_UTC_INDEX[new Date(`${dayKey}T00:00:00Z`).getUTCDay()]\n}\n\n/**\n * Wall-clock parts of a UTC instant in the given timezone, reconstructed as a\n * UTC timestamp — the difference to the instant is the zone's offset.\n */\nfunction offsetMs(timeZone: string, utcDate: Date): number {\n const parts = getWallClockFormatter(timeZone).formatToParts(utcDate)\n const get = (type: string): number =>\n Number(parts.find((p) => p.type === type)?.value ?? '0')\n const asUTC = Date.UTC(\n get('year'),\n get('month') - 1,\n get('day'),\n get('hour'),\n get('minute'),\n get('second'),\n )\n return asUTC - utcDate.getTime()\n}\n\n/**\n * The UTC instant of wall-clock `HH:mm` on calendar day `dayKey` in `timeZone`.\n * Two-pass offset algorithm; DST-safe. Spring-forward gap times resolve to a\n * nearby valid instant (for midnight-gap zones like America/Santiago this can be\n * late on the prior calendar day); fall-back ambiguous times resolve to one\n * consistent occurrence.\n */\nexport function combineDayKeyAndTime(dayKey: string, time: string, timeZone: string): Date {\n if (!DAY_KEY_RE.test(dayKey)) {\n throw new Error(`Invalid day key \"${dayKey}\" — expected YYYY-MM-DD`)\n }\n if (!TIME_RE.test(time)) {\n throw new Error(`Invalid time \"${time}\" — expected HH:mm`)\n }\n const [y, mo, d] = dayKey.split('-').map(Number)\n const [h, mi] = time.split(':').map(Number)\n const guess = Date.UTC(y, mo - 1, d, h, mi)\n const candidate = guess - offsetMs(timeZone, new Date(guess))\n return new Date(guess - offsetMs(timeZone, new Date(candidate)))\n}\n\n/**\n * Instant of 23:59:59.999 (in `timeZone`) on the day containing `date`.\n */\nexport function endOfDayInTimezone(date: Date, timeZone: string): Date {\n const dayKey = getDayKeyInTimezone(date, timeZone)\n const lastMinute = combineDayKeyAndTime(dayKey, '23:59', timeZone)\n return new Date(lastMinute.getTime() + 59_999)\n}\n\n/**\n * Pure calendar arithmetic on day keys — DST-proof day iteration.\n */\nexport function addDaysToDayKey(dayKey: string, days: number): string {\n if (!DAY_KEY_RE.test(dayKey)) {\n throw new Error(`Invalid day key \"${dayKey}\" — expected YYYY-MM-DD`)\n }\n const base = new Date(`${dayKey}T00:00:00Z`)\n const shifted = new Date(base.getTime() + days * 86_400_000)\n return shifted.toISOString().slice(0, 10)\n}\n"],"names":["DAY_BY_UTC_INDEX","DAY_KEY_RE","TIME_RE","dayKeyFormatters","Map","wallClockFormatters","getDayKeyFormatter","timeZone","formatter","get","Intl","DateTimeFormat","day","month","year","set","getWallClockFormatter","hour","hourCycle","minute","second","getHourInTimezone","date","parts","formatToParts","Number","find","p","type","value","isValidDayKey","dayKey","test","Date","toISOString","slice","isValidTimezone","validateTimezone","Error","getDayKeyInTimezone","format","getDayOfWeekFromDayKey","getUTCDay","offsetMs","utcDate","asUTC","UTC","getTime","combineDayKeyAndTime","time","y","mo","d","split","map","h","mi","guess","candidate","endOfDayInTimezone","lastMinute","addDaysToDayKey","days","base","shifted"],"mappings":"AAEA,MAAMA,mBAAgC;IAAC;IAAO;IAAO;IAAO;IAAO;IAAO;IAAO;CAAM;AAEvF,MAAMC,aAAa;AAEnB,MAAMC,UAAU;AAEhB,MAAMC,mBAAmB,IAAIC;AAC7B,MAAMC,sBAAsB,IAAID;AAEhC,SAASE,mBAAmBC,QAAgB;IAC1C,IAAIC,YAAYL,iBAAiBM,GAAG,CAACF;IACrC,IAAI,CAACC,WAAW;QACdA,YAAY,IAAIE,KAAKC,cAAc,CAAC,SAAS;YAC3CC,KAAK;YACLC,OAAO;YACPN;YACAO,MAAM;QACR;QACAX,iBAAiBY,GAAG,CAACR,UAAUC;IACjC;IACA,OAAOA;AACT;AAEA,SAASQ,sBAAsBT,QAAgB;IAC7C,IAAIC,YAAYH,oBAAoBI,GAAG,CAACF;IACxC,IAAI,CAACC,WAAW;QACdA,YAAY,IAAIE,KAAKC,cAAc,CAAC,SAAS;YAC3CC,KAAK;YACLK,MAAM;YACNC,WAAW;YACXC,QAAQ;YACRN,OAAO;YACPO,QAAQ;YACRb;YACAO,MAAM;QACR;QACAT,oBAAoBU,GAAG,CAACR,UAAUC;IACpC;IACA,OAAOA;AACT;AAEA;;CAEC,GACD,OAAO,SAASa,kBAAkBC,IAAU,EAAEf,QAAgB;IAC5D,MAAMgB,QAAQP,sBAAsBT,UAAUiB,aAAa,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WAAW+B,IAAI,CAACD,SAAS;QAC5B,MAAM,IAAIO,MAAM,CAAC,iBAAiB,EAAEP,OAAO,uBAAuB,CAAC;IACrE;IACA,MAAMgC,OAAO,IAAI9B,KAAK,GAAGF,OAAO,UAAU,CAAC;IAC3C,MAAMiC,UAAU,IAAI/B,KAAK8B,KAAKhB,OAAO,KAAKe,OAAO;IACjD,OAAOE,QAAQ9B,WAAW,GAAGC,KAAK,CAAC,GAAG;AACxC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-reserve",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "A Payload CMS 3.x plugin for reservation and booking management with conflict detection, status workflows, and calendar UI",
5
5
  "keywords": [
6
6
  "payload",