@servicetitan/dte-unlayer 0.108.0 → 0.110.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.
- package/dist/editor-core-source.d.ts +2 -2
- package/dist/editor-core-source.d.ts.map +1 -1
- package/dist/editor-core-source.js +2 -2
- package/dist/editor-core-source.js.map +1 -1
- package/dist/shared/date-calc.d.ts +6 -0
- package/dist/shared/date-calc.d.ts.map +1 -1
- package/dist/shared/date-calc.js +13 -0
- package/dist/shared/date-calc.js.map +1 -1
- package/package.json +1 -1
- package/src/editor-core-source.ts +2 -2
- package/src/shared/date-calc.ts +16 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare const MAX_DATE_CALC_DAYS = 365;
|
|
2
|
+
export declare const DATE_RANGE_YEARS = 2;
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if the date's year falls within [currentYear - DATE_RANGE_YEARS, currentYear + DATE_RANGE_YEARS].
|
|
5
|
+
* Invalid or unparseable dates return false.
|
|
6
|
+
*/
|
|
7
|
+
export declare function isDateWithinRange(dateInput: string | Date): boolean;
|
|
2
8
|
export interface DateCalcOptions {
|
|
3
9
|
holidays?: string[];
|
|
4
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-calc.d.ts","sourceRoot":"","sources":["../../src/shared/date-calc.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AA4CD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CA0B/F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,OAAO,CAAC,EAAE,eAAe,GAC1B,MAAM,CA0BR;AAED,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAKnD;AAED,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAgChD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAkB/D"}
|
|
1
|
+
{"version":3,"file":"date-calc.d.ts","sourceRoot":"","sources":["../../src/shared/date-calc.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAQnE;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AA4CD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CA0B/F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,OAAO,CAAC,EAAE,eAAe,GAC1B,MAAM,CA0BR;AAED,qDAAqD;AACrD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAKnD;AAED,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAgChD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAkB/D"}
|
package/dist/shared/date-calc.js
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export const MAX_DATE_CALC_DAYS = 365;
|
|
2
|
+
export const DATE_RANGE_YEARS = 2;
|
|
3
|
+
/**
|
|
4
|
+
* Returns true if the date's year falls within [currentYear - DATE_RANGE_YEARS, currentYear + DATE_RANGE_YEARS].
|
|
5
|
+
* Invalid or unparseable dates return false.
|
|
6
|
+
*/ export function isDateWithinRange(dateInput) {
|
|
7
|
+
const d = typeof dateInput === 'string' ? new Date(dateInput) : dateInput;
|
|
8
|
+
if (!isFinite(d.getTime())) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
const currentYear = new Date().getUTCFullYear();
|
|
12
|
+
const year = d.getUTCFullYear();
|
|
13
|
+
return year >= currentYear - DATE_RANGE_YEARS && year <= currentYear + DATE_RANGE_YEARS;
|
|
14
|
+
}
|
|
2
15
|
function toDateOnly(input) {
|
|
3
16
|
const d = typeof input === 'string' ? new Date(input) : new Date(input.getTime());
|
|
4
17
|
d.setUTCHours(0, 0, 0, 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shared/date-calc.ts"],"sourcesContent":["export const MAX_DATE_CALC_DAYS = 365;\n\nexport interface DateCalcOptions {\n holidays?: string[];\n}\n\nfunction toDateOnly(input: string | Date): Date {\n const d = typeof input === 'string' ? new Date(input) : new Date(input.getTime());\n d.setUTCHours(0, 0, 0, 0);\n return d;\n}\n\nfunction toDateKey(d: Date): string {\n const y = d.getUTCFullYear();\n const m = String(d.getUTCMonth() + 1).padStart(2, '0');\n const day = String(d.getUTCDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n}\n\nfunction isWeekend(d: Date): boolean {\n const day = d.getUTCDay();\n return day === 0 || day === 6;\n}\n\nfunction buildHolidaySet(holidays?: string[]): Set<string> {\n if (!holidays?.length) {\n return new Set();\n }\n const set = new Set<string>();\n for (const h of holidays) {\n const d = toDateOnly(h);\n if (!isNaN(d.getTime())) {\n set.add(toDateKey(d));\n }\n }\n return set;\n}\n\nfunction isNonBusinessDay(d: Date, holidaySet: Set<string>): boolean {\n if (isWeekend(d)) {\n return true;\n }\n if (holidaySet.size > 0 && holidaySet.has(toDateKey(d))) {\n return true;\n }\n return false;\n}\n\n/**\n * Add business days to a date, always skipping weekends and provided holidays.\n * Negative days subtracts.\n */\nexport function addDays(dateInput: string | Date, days: number, options?: DateCalcOptions): Date {\n const result = toDateOnly(dateInput);\n if (!isFinite(result.getTime())) {\n return result;\n }\n\n const intDays = Math.trunc(days);\n if (intDays === 0) {\n return result;\n }\n if (Math.abs(intDays) > MAX_DATE_CALC_DAYS) {\n return new Date(NaN);\n }\n\n const holidaySet = buildHolidaySet(options?.holidays);\n const direction = intDays > 0 ? 1 : -1;\n let remaining = Math.abs(intDays);\n\n while (remaining > 0) {\n result.setUTCDate(result.getUTCDate() + direction);\n if (!isNonBusinessDay(result, holidaySet)) {\n remaining--;\n }\n }\n\n return result;\n}\n\n/**\n * Count the number of business days between two dates, always skipping weekends and provided holidays.\n * Returns a positive number when `to` is after `from`, negative otherwise.\n */\nexport function dateDiffDays(\n from: string | Date,\n to: string | Date,\n options?: DateCalcOptions,\n): number {\n const start = toDateOnly(from);\n const end = toDateOnly(to);\n\n if (!isFinite(start.getTime()) || !isFinite(end.getTime())) {\n return 0;\n }\n\n const calendarDiff = Math.abs(end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000);\n if (calendarDiff > MAX_DATE_CALC_DAYS * 2) {\n return NaN;\n }\n\n const holidaySet = buildHolidaySet(options?.holidays);\n const direction = end.getTime() >= start.getTime() ? 1 : -1;\n const cursor = new Date(start.getTime());\n let count = 0;\n\n while (toDateKey(cursor) !== toDateKey(end)) {\n cursor.setUTCDate(cursor.getUTCDate() + direction);\n if (!isNonBusinessDay(cursor, holidaySet)) {\n count++;\n }\n }\n\n return count * direction;\n}\n\n/** Format a Date to ISO date string (YYYY-MM-DD). */\nexport function formatDateResult(date: Date): string {\n if (!isFinite(date.getTime())) {\n return '';\n }\n return toDateKey(date);\n}\n\nexport const DEFAULT_DATE_FORMAT = 'MM/DD/YYYY';\n\nconst MONTH_NAMES_FULL = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nconst MONTH_NAMES_SHORT = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\n\n/**\n * Format a Date using a pattern string.\n * Supported tokens: YYYY, YY, MMMM, MMM, MM, M, DD, D.\n * All other characters are treated as literals.\n */\nexport function formatDate(date: Date, pattern?: string): string {\n if (!isFinite(date.getTime())) {\n return '';\n }\n const fmt = pattern ?? DEFAULT_DATE_FORMAT;\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const day = date.getUTCDate();\n\n return fmt\n .replace(/YYYY/g, String(year))\n .replace(/YY/g, String(year).slice(-2))\n .replace(/MMMM/g, MONTH_NAMES_FULL[month])\n .replace(/MMM/g, MONTH_NAMES_SHORT[month])\n .replace(/MM/g, String(month + 1).padStart(2, '0'))\n .replace(/\\bM\\b/g, String(month + 1))\n .replace(/DD/g, String(day).padStart(2, '0'))\n .replace(/\\bD\\b/g, String(day));\n}\n"],"names":["MAX_DATE_CALC_DAYS","
|
|
1
|
+
{"version":3,"sources":["../../src/shared/date-calc.ts"],"sourcesContent":["export const MAX_DATE_CALC_DAYS = 365;\n\nexport const DATE_RANGE_YEARS = 2;\n\n/**\n * Returns true if the date's year falls within [currentYear - DATE_RANGE_YEARS, currentYear + DATE_RANGE_YEARS].\n * Invalid or unparseable dates return false.\n */\nexport function isDateWithinRange(dateInput: string | Date): boolean {\n const d = typeof dateInput === 'string' ? new Date(dateInput) : dateInput;\n if (!isFinite(d.getTime())) {\n return false;\n }\n const currentYear = new Date().getUTCFullYear();\n const year = d.getUTCFullYear();\n return year >= currentYear - DATE_RANGE_YEARS && year <= currentYear + DATE_RANGE_YEARS;\n}\n\nexport interface DateCalcOptions {\n holidays?: string[];\n}\n\nfunction toDateOnly(input: string | Date): Date {\n const d = typeof input === 'string' ? new Date(input) : new Date(input.getTime());\n d.setUTCHours(0, 0, 0, 0);\n return d;\n}\n\nfunction toDateKey(d: Date): string {\n const y = d.getUTCFullYear();\n const m = String(d.getUTCMonth() + 1).padStart(2, '0');\n const day = String(d.getUTCDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n}\n\nfunction isWeekend(d: Date): boolean {\n const day = d.getUTCDay();\n return day === 0 || day === 6;\n}\n\nfunction buildHolidaySet(holidays?: string[]): Set<string> {\n if (!holidays?.length) {\n return new Set();\n }\n const set = new Set<string>();\n for (const h of holidays) {\n const d = toDateOnly(h);\n if (!isNaN(d.getTime())) {\n set.add(toDateKey(d));\n }\n }\n return set;\n}\n\nfunction isNonBusinessDay(d: Date, holidaySet: Set<string>): boolean {\n if (isWeekend(d)) {\n return true;\n }\n if (holidaySet.size > 0 && holidaySet.has(toDateKey(d))) {\n return true;\n }\n return false;\n}\n\n/**\n * Add business days to a date, always skipping weekends and provided holidays.\n * Negative days subtracts.\n */\nexport function addDays(dateInput: string | Date, days: number, options?: DateCalcOptions): Date {\n const result = toDateOnly(dateInput);\n if (!isFinite(result.getTime())) {\n return result;\n }\n\n const intDays = Math.trunc(days);\n if (intDays === 0) {\n return result;\n }\n if (Math.abs(intDays) > MAX_DATE_CALC_DAYS) {\n return new Date(NaN);\n }\n\n const holidaySet = buildHolidaySet(options?.holidays);\n const direction = intDays > 0 ? 1 : -1;\n let remaining = Math.abs(intDays);\n\n while (remaining > 0) {\n result.setUTCDate(result.getUTCDate() + direction);\n if (!isNonBusinessDay(result, holidaySet)) {\n remaining--;\n }\n }\n\n return result;\n}\n\n/**\n * Count the number of business days between two dates, always skipping weekends and provided holidays.\n * Returns a positive number when `to` is after `from`, negative otherwise.\n */\nexport function dateDiffDays(\n from: string | Date,\n to: string | Date,\n options?: DateCalcOptions,\n): number {\n const start = toDateOnly(from);\n const end = toDateOnly(to);\n\n if (!isFinite(start.getTime()) || !isFinite(end.getTime())) {\n return 0;\n }\n\n const calendarDiff = Math.abs(end.getTime() - start.getTime()) / (24 * 60 * 60 * 1000);\n if (calendarDiff > MAX_DATE_CALC_DAYS * 2) {\n return NaN;\n }\n\n const holidaySet = buildHolidaySet(options?.holidays);\n const direction = end.getTime() >= start.getTime() ? 1 : -1;\n const cursor = new Date(start.getTime());\n let count = 0;\n\n while (toDateKey(cursor) !== toDateKey(end)) {\n cursor.setUTCDate(cursor.getUTCDate() + direction);\n if (!isNonBusinessDay(cursor, holidaySet)) {\n count++;\n }\n }\n\n return count * direction;\n}\n\n/** Format a Date to ISO date string (YYYY-MM-DD). */\nexport function formatDateResult(date: Date): string {\n if (!isFinite(date.getTime())) {\n return '';\n }\n return toDateKey(date);\n}\n\nexport const DEFAULT_DATE_FORMAT = 'MM/DD/YYYY';\n\nconst MONTH_NAMES_FULL = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\nconst MONTH_NAMES_SHORT = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\n\n/**\n * Format a Date using a pattern string.\n * Supported tokens: YYYY, YY, MMMM, MMM, MM, M, DD, D.\n * All other characters are treated as literals.\n */\nexport function formatDate(date: Date, pattern?: string): string {\n if (!isFinite(date.getTime())) {\n return '';\n }\n const fmt = pattern ?? DEFAULT_DATE_FORMAT;\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const day = date.getUTCDate();\n\n return fmt\n .replace(/YYYY/g, String(year))\n .replace(/YY/g, String(year).slice(-2))\n .replace(/MMMM/g, MONTH_NAMES_FULL[month])\n .replace(/MMM/g, MONTH_NAMES_SHORT[month])\n .replace(/MM/g, String(month + 1).padStart(2, '0'))\n .replace(/\\bM\\b/g, String(month + 1))\n .replace(/DD/g, String(day).padStart(2, '0'))\n .replace(/\\bD\\b/g, String(day));\n}\n"],"names":["MAX_DATE_CALC_DAYS","DATE_RANGE_YEARS","isDateWithinRange","dateInput","d","Date","isFinite","getTime","currentYear","getUTCFullYear","year","toDateOnly","input","setUTCHours","toDateKey","y","m","String","getUTCMonth","padStart","day","getUTCDate","isWeekend","getUTCDay","buildHolidaySet","holidays","length","Set","set","h","isNaN","add","isNonBusinessDay","holidaySet","size","has","addDays","days","options","result","intDays","Math","trunc","abs","NaN","direction","remaining","setUTCDate","dateDiffDays","from","to","start","end","calendarDiff","cursor","count","formatDateResult","date","DEFAULT_DATE_FORMAT","MONTH_NAMES_FULL","MONTH_NAMES_SHORT","formatDate","pattern","fmt","month","replace","slice"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,IAAI;AAEtC,OAAO,MAAMC,mBAAmB,EAAE;AAElC;;;CAGC,GACD,OAAO,SAASC,kBAAkBC,SAAwB;IACtD,MAAMC,IAAI,OAAOD,cAAc,WAAW,IAAIE,KAAKF,aAAaA;IAChE,IAAI,CAACG,SAASF,EAAEG,OAAO,KAAK;QACxB,OAAO;IACX;IACA,MAAMC,cAAc,IAAIH,OAAOI,cAAc;IAC7C,MAAMC,OAAON,EAAEK,cAAc;IAC7B,OAAOC,QAAQF,cAAcP,oBAAoBS,QAAQF,cAAcP;AAC3E;AAMA,SAASU,WAAWC,KAAoB;IACpC,MAAMR,IAAI,OAAOQ,UAAU,WAAW,IAAIP,KAAKO,SAAS,IAAIP,KAAKO,MAAML,OAAO;IAC9EH,EAAES,WAAW,CAAC,GAAG,GAAG,GAAG;IACvB,OAAOT;AACX;AAEA,SAASU,UAAUV,CAAO;IACtB,MAAMW,IAAIX,EAAEK,cAAc;IAC1B,MAAMO,IAAIC,OAAOb,EAAEc,WAAW,KAAK,GAAGC,QAAQ,CAAC,GAAG;IAClD,MAAMC,MAAMH,OAAOb,EAAEiB,UAAU,IAAIF,QAAQ,CAAC,GAAG;IAC/C,OAAO,GAAGJ,EAAE,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