@turndown/library 0.1.63 → 0.1.65
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/README.md +41 -1
- package/dist/{index.cjs → helpers/index.cjs} +30 -1117
- package/dist/helpers/index.cjs.map +1 -0
- package/dist/helpers/index.d.cts +675 -0
- package/dist/helpers/index.d.ts +675 -0
- package/dist/{index.mjs → helpers/index.mjs} +17 -927
- package/dist/helpers/index.mjs.map +1 -0
- package/dist/index-CzB45yLv.d.cts +334 -0
- package/dist/index-CzB45yLv.d.ts +334 -0
- package/dist/types/index.cjs +947 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/{index.d.cts → types/index.d.cts} +14 -1133
- package/dist/{index.d.ts → types/index.d.ts} +14 -1133
- package/dist/types/index.mjs +924 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/validation/index.cjs +195 -0
- package/dist/types/validation/index.cjs.map +1 -0
- package/dist/types/validation/index.d.cts +51 -0
- package/dist/types/validation/index.d.ts +51 -0
- package/dist/types/validation/index.mjs +174 -0
- package/dist/types/validation/index.mjs.map +1 -0
- package/package.json +30 -10
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../node_modules/dayjs/dayjs.min.js","../../node_modules/dayjs/plugin/isoWeek.js","../../node_modules/dayjs/plugin/relativeTime.js","../../src/helpers/date/index.ts","../../src/helpers/object/index.ts","../../src/helpers/string/index.ts","../../src/helpers/index.ts"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){\"use strict\";var e=\"day\";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf(\"year\"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,\"week\")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return\"isoweek\"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf(\"day\"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(\"day\"):n.bind(this)(e,t)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","import dayjs from \"dayjs\";\nimport isoWeek from \"dayjs/plugin/isoWeek\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\n\ndayjs.extend(relativeTime);\ndayjs.extend(isoWeek);\n\nexport type TDateInput = Date | string | number | null | undefined;\nexport type TDateFormat = \"MM/DD/YYYY\" | \"MM/DD/YY HH:mm A\" | string;\n\nconst defaultDateFallback = \"--\";\n\nconst isValidDateInput = (date: TDateInput): boolean => {\n return date !== null && date !== undefined && dayjs(date).isValid();\n};\n\n/**\n * Format a date using a dayjs format string.\n *\n * @param {TDateInput} date - Date-like value to format.\n * @param {TDateFormat} format - dayjs format string.\n * @returns {string} Formatted date or `--` for missing/invalid input.\n */\nexport const formatDate = (\n date?: TDateInput,\n format: TDateFormat = \"MM/DD/YYYY\",\n): string => {\n if (!isValidDateInput(date)) {\n return defaultDateFallback;\n }\n\n return dayjs(date).format(format);\n};\n\n/**\n * Return a human-readable relative time string.\n *\n * @param {TDateInput} date - Date-like value to compare against now.\n * @returns {string} Relative time or `--` for missing/invalid input.\n */\nexport const timeAgo = (date: TDateInput): string => {\n if (!isValidDateInput(date)) {\n return defaultDateFallback;\n }\n\n return dayjs(date).fromNow();\n};\n\n/**\n * Add days to a date.\n *\n * @param {TDateInput} date - Source date.\n * @param {number} days - Number of days to add.\n * @returns {Date} Updated date.\n */\nexport const addDays = (date: TDateInput, days: number): Date => {\n return dayjs(date).add(days, \"day\").toDate();\n};\n\n/**\n * Subtract days from a date.\n *\n * @param {TDateInput} date - Source date.\n * @param {number} days - Number of days to subtract.\n * @returns {Date} Updated date.\n */\nexport const subtractDays = (date: TDateInput, days: number): Date => {\n return dayjs(date).subtract(days, \"day\").toDate();\n};\n\n/**\n * Return the absolute number of whole day boundaries between two dates.\n *\n * @param {TDateInput} dateA - First date.\n * @param {TDateInput} dateB - Second date.\n * @returns {number} Absolute difference in days, or 0 for invalid input.\n */\nexport const daysBetween = (dateA: TDateInput, dateB: TDateInput): number => {\n if (!isValidDateInput(dateA) || !isValidDateInput(dateB)) {\n return 0;\n }\n\n return Math.abs(dayjs(dateA).diff(dayjs(dateB), \"day\"));\n};\n\n/**\n * Check whether a date is today.\n *\n * @param {TDateInput} date - Date-like value.\n * @returns {boolean} True when the date is today.\n */\nexport const isToday = (date: TDateInput): boolean => {\n if (!isValidDateInput(date)) {\n return false;\n }\n\n return dayjs(date).isSame(dayjs(), \"day\");\n};\n\n/**\n * Check whether a date is in the past.\n *\n * @param {TDateInput} date - Date-like value.\n * @returns {boolean} True when the date is before now.\n */\nexport const isPast = (date: TDateInput): boolean => {\n if (!isValidDateInput(date)) {\n return false;\n }\n\n return dayjs(date).isBefore(dayjs());\n};\n\n/**\n * Check whether a date is in the future.\n *\n * @param {TDateInput} date - Date-like value.\n * @returns {boolean} True when the date is after now.\n */\nexport const isFuture = (date: TDateInput): boolean => {\n if (!isValidDateInput(date)) {\n return false;\n }\n\n return dayjs(date).isAfter(dayjs());\n};\n\n/**\n * Return the start of the day for a date.\n *\n * @param {TDateInput} date - Source date.\n * @returns {Date} Date set to 00:00:00.000.\n */\nexport const startOfDay = (date: TDateInput): Date => {\n return dayjs(date).startOf(\"day\").toDate();\n};\n\n/**\n * Return the end of the day for a date.\n *\n * @param {TDateInput} date - Source date.\n * @returns {Date} Date set to 23:59:59.999.\n */\nexport const endOfDay = (date: TDateInput): Date => {\n return dayjs(date).endOf(\"day\").toDate();\n};\n\n/**\n * Return the ISO week start date, Monday at 00:00:00.000.\n *\n * @param {TDateInput} date - Source date.\n * @returns {Date} Start of ISO week.\n */\nexport const startOfWeek = (date: TDateInput): Date => {\n return dayjs(date).startOf(\"isoWeek\").toDate();\n};\n\n/**\n * Return the ISO week end date, Sunday at 23:59:59.999.\n *\n * @param {TDateInput} date - Source date.\n * @returns {Date} End of ISO week.\n */\nexport const endOfWeek = (date: TDateInput): Date => {\n return dayjs(date).endOf(\"isoWeek\").toDate();\n};\n\n/**\n * Return all seven dates in the ISO week containing the provided date.\n *\n * @param {TDateInput} date - Source date.\n * @returns {Date[]} Monday-through-Sunday dates at the start of each day.\n */\nexport const getWeekDays = (date: TDateInput): Date[] => {\n const weekStart = dayjs(date).startOf(\"isoWeek\");\n\n return Array.from({ length: 7 }, (_value, index) => {\n return weekStart.add(index, \"day\").startOf(\"day\").toDate();\n });\n};\n\n/**\n * Add weeks to a date.\n *\n * @param {TDateInput} date - Source date.\n * @param {number} weeks - Number of weeks to add.\n * @returns {Date} Updated date.\n */\nexport const addWeeks = (date: TDateInput, weeks: number): Date => {\n return dayjs(date).add(weeks, \"week\").toDate();\n};\n\n/**\n * Subtract weeks from a date.\n *\n * @param {TDateInput} date - Source date.\n * @param {number} weeks - Number of weeks to subtract.\n * @returns {Date} Updated date.\n */\nexport const subtractWeeks = (date: TDateInput, weeks: number): Date => {\n return dayjs(date).subtract(weeks, \"week\").toDate();\n};\n","import type {\n IFilterCondition,\n ISortCondition,\n} from \"../../types/base/paging.types\";\n\ntype TRecord = Record<string, unknown>;\ntype TPropertyRecord = Record<PropertyKey, unknown>;\ntype TSortableValue =\n | string\n | number\n | bigint\n | boolean\n | Date\n | null\n | undefined;\n\ntype TReplaceNulls<TValue> = TValue extends null\n ? \"\"\n : TValue extends (infer TItem)[]\n ? TReplaceNulls<TItem>[]\n : TValue extends Date\n ? TValue\n : TValue extends object\n ? { [TKey in keyof TValue]: TReplaceNulls<TValue[TKey]> }\n : TValue;\n\nconst unsafePathSegments = new Set([\"__proto__\", \"prototype\", \"constructor\"]);\n\nconst isRecord = (value: unknown): value is TRecord => {\n return (\n typeof value === \"object\" &&\n value !== null &&\n !Array.isArray(value) &&\n !(value instanceof Date)\n );\n};\n\nconst isSafePathSegment = (segment: string): boolean => {\n return segment.length > 0 && !unsafePathSegments.has(segment);\n};\n\nconst getPathSegments = (path: string): string[] => {\n return path.split(\".\").filter((segment) => segment.length > 0);\n};\n\n/**\n * Safely parse a JSON string into a typed value.\n *\n * When a fallback value is provided, the function always returns that generic\n * type. Without a fallback value, parse failures return an empty object.\n *\n * @typeParam TParsed - Expected parsed value type.\n * @param {string | null | undefined} jsonString - JSON string to parse.\n * @param {TParsed} [fallbackValue] - Value returned when parsing fails.\n * @returns {TParsed | Record<string, unknown>} Parsed value or fallback.\n * @example\n * parseJSON<{ a: number }>('{\"a\":1}', { a: 0 }) // => { a: 1 }\n * parseJSON('not json') // => {}\n */\nexport function parseJSON<TParsed>(\n jsonString: string | null | undefined,\n fallbackValue: TParsed,\n): TParsed;\nexport function parseJSON(\n jsonString: string | null | undefined,\n): Record<string, unknown>;\nexport function parseJSON<TParsed>(\n jsonString: string | null | undefined,\n fallbackValue?: TParsed,\n): TParsed | Record<string, unknown> {\n if (!jsonString) {\n return fallbackValue ?? {};\n }\n\n try {\n const parsedValue = JSON.parse(jsonString) as unknown;\n\n return parsedValue as TParsed;\n } catch {\n return fallbackValue ?? {};\n }\n}\n\n/**\n * Stringify a value to JSON while skipping circular references.\n *\n * Uses an internal cache to omit repeated object references that would\n * normally cause `JSON.stringify` to throw.\n *\n * @param {unknown} value - Value to stringify.\n * @returns {string | undefined} JSON string with circulars omitted.\n * @example\n * const value: Record<string, unknown> = {}; value.self = value;\n * JSONStringify(value) // => \"{}\"\n */\nexport const JSONStringify = (value: unknown): string | undefined => {\n const seenValues = new WeakSet<object>();\n\n try {\n return JSON.stringify(value, (_key, nestedValue) => {\n if (typeof nestedValue === \"bigint\") {\n return nestedValue.toString();\n }\n\n if (typeof nestedValue === \"object\" && nestedValue !== null) {\n if (seenValues.has(nestedValue)) {\n return undefined;\n }\n\n seenValues.add(nestedValue);\n }\n\n return nestedValue;\n });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Deep-remove `undefined` properties while preserving Dates and arrays.\n *\n * Object properties with `undefined` values are removed. Array items are\n * preserved so array indexes do not shift.\n *\n * @typeParam TValue - Input value type.\n * @param {TValue} value - Input value.\n * @returns {TValue} Cleaned clone with `undefined` object properties removed.\n */\nexport const removeUndefined = <TValue>(value: TValue): TValue => {\n if (Array.isArray(value)) {\n return value.map((item) => removeUndefined(item)) as TValue;\n }\n\n if (isRecord(value)) {\n const updatedValue = Object.entries(value).reduce<TRecord>(\n (accumulator, [key, nestedValue]) => {\n if (nestedValue !== undefined) {\n accumulator[key] = removeUndefined(nestedValue);\n }\n\n return accumulator;\n },\n {},\n );\n\n return updatedValue as TValue;\n }\n\n return value;\n};\n\n/**\n * Test whether a location object's `pathname` equals a key.\n *\n * @param {{ pathname?: string } | null | undefined} location - Object expected\n * to have a `pathname`.\n * @param {string} key - Path to compare.\n * @returns {boolean}\n * @example\n * validPath({ pathname: \"/home\" }, \"/home\") // true\n */\nexport const validPath = (\n location: { pathname?: string } | null | undefined,\n key: string,\n): boolean => {\n return location?.pathname === key;\n};\n\n/**\n * Return the first element if the input is an array; otherwise return the value itself.\n *\n * @typeParam T - Element type.\n * @param {T | T[]} input - A single value or an array.\n * @returns {T} First element or the input value.\n * @example\n * returnObject([1,2,3]) // 1\n * returnObject(5) // 5\n */\nexport const returnObject = <T>(input: T | T[]): T => {\n return Array.isArray(input) ? input[0] : input;\n};\n\n/**\n * Filter out items from `array1` whose `id` appears in `array2`.\n *\n * @typeParam T - Object type with an `id` field.\n * @param {T[]} [array1] - Source array.\n * @param {T[]} [array2] - Items whose `id`s should be excluded.\n * @returns {T[]} Filtered array (or `[]` on invalid input).\n */\nexport const filterArrayById = <T extends { id: number | string }>(\n array1?: T[],\n array2?: T[],\n): T[] => {\n if (!Array.isArray(array1) || !Array.isArray(array2)) {\n return [];\n }\n\n const idsToExclude = new Set(array2.map((item) => item.id));\n return array1.filter((item) => !idsToExclude.has(item.id));\n};\n\n/**\n * Sort an array of objects by a given property (ascending).\n *\n * Mutates the original array (uses `Array.prototype.sort`).\n *\n * @typeParam T - Object type.\n * @typeParam TKey - Sortable property key.\n * @param {T[]} array - Array to sort.\n * @param {TKey} property - Property name to sort by.\n * @returns {T[]} The same array instance, sorted (or empty array if input invalid).\n */\nexport const sortArrayByProperty = <\n TKey extends PropertyKey,\n T extends Record<TKey, TSortableValue>,\n>(\n array: T[],\n property: TKey,\n): T[] => {\n if (!Array.isArray(array) || array.length === 0) return [];\n\n return array.sort((a, b) => {\n const firstValue = a[property];\n const secondValue = b[property];\n\n if (firstValue === secondValue) return 0;\n if (firstValue === null || firstValue === undefined) return 1;\n if (secondValue === null || secondValue === undefined) return -1;\n if (firstValue < secondValue) return -1;\n if (firstValue > secondValue) return 1;\n return 0;\n });\n};\n\n/**\n * Recursively replace `null` values with empty strings.\n *\n * Works on primitives, arrays, Dates, and plain objects.\n *\n * @typeParam TValue - Input value type.\n * @param {TValue} value - Input value.\n * @returns {TReplaceNulls<TValue>} Value with all `null` replaced by `\"\"`.\n */\nexport const replaceNulls = <TValue>(value: TValue): TReplaceNulls<TValue> => {\n if (value === null) {\n return \"\" as TReplaceNulls<TValue>;\n }\n\n if (Array.isArray(value)) {\n return value.map((item) => replaceNulls(item)) as TReplaceNulls<TValue>;\n }\n\n if (isRecord(value)) {\n const updatedValue = Object.entries(value).reduce<TRecord>(\n (accumulator, [key, nestedValue]) => {\n accumulator[key] = replaceNulls(nestedValue);\n return accumulator;\n },\n {},\n );\n\n return updatedValue as TReplaceNulls<TValue>;\n }\n\n return value as TReplaceNulls<TValue>;\n};\n\n/**\n * Recursively remove object keys that contain a dot (`.`).\n *\n * @typeParam TValue - Input value type.\n * @param {TValue} value - Input object or array.\n * @returns {TValue} New value with dotted keys removed at all levels.\n */\nexport const removeFormProperties = <TValue>(value: TValue): TValue => {\n if (Array.isArray(value)) {\n return value.map((item) => removeFormProperties(item)) as TValue;\n }\n\n if (isRecord(value)) {\n const updatedValue = Object.entries(value).reduce<TRecord>(\n (accumulator, [key, nestedValue]) => {\n if (!key.includes(\".\")) {\n accumulator[key] = removeFormProperties(nestedValue);\n }\n\n return accumulator;\n },\n {},\n );\n\n return updatedValue as TValue;\n }\n\n return value;\n};\n\n/**\n * Recursively convert string booleans `\"true\"`/`\"false\"` to actual booleans.\n *\n * Leaves all other values unchanged.\n *\n * @typeParam TValue - Input value type.\n * @param {TValue} value - Input object or array.\n * @returns {TValue} New value with boolean-like strings converted.\n */\nexport const convertStringBooleans = <TValue>(value: TValue): TValue => {\n if (Array.isArray(value)) {\n return value.map((item) => convertStringBooleans(item)) as TValue;\n }\n\n if (isRecord(value)) {\n const updatedValue = Object.entries(value).reduce<TRecord>(\n (accumulator, [key, nestedValue]) => {\n if (nestedValue === \"true\") {\n accumulator[key] = true;\n } else if (nestedValue === \"false\") {\n accumulator[key] = false;\n } else {\n accumulator[key] = convertStringBooleans(nestedValue);\n }\n\n return accumulator;\n },\n {},\n );\n\n return updatedValue as TValue;\n }\n\n return value;\n};\n\n/**\n * Convenience helper to clean form-like data:\n * - Removes `undefined` properties\n * - Converts string booleans to booleans\n * - Removes keys containing a dot (`.`)\n *\n * @typeParam TObject - Form data object type.\n * @param {TObject} objectToClean - Input data.\n * @returns {Partial<TObject>} Cleaned clone.\n */\nexport const cleanFormData = <TObject extends TRecord>(\n objectToClean: TObject,\n): Partial<TObject> => {\n return removeFormProperties(\n convertStringBooleans(removeUndefined(objectToClean)),\n ) as Partial<TObject>;\n};\n\n/**\n * Return a default pagination object, allowing optional sort and filters.\n *\n * @param {ISortCondition[]} [sort] - Optional sort conditions.\n * @param {IFilterCondition[]} [filters] - Optional filter conditions.\n * @returns {{ page: number; size: number; sort: ISortCondition[]; filters: IFilterCondition[] }}\n * @example\n * resetPagination() // => { page:1, size:25, sort:[], filters:[] }\n */\nexport const resetPagination = (\n sort?: ISortCondition[],\n filters?: IFilterCondition[],\n) => {\n return {\n page: 1,\n size: 25,\n sort: sort || [],\n filters: filters || [],\n };\n};\n\n/**\n * Format a string of digits into a U.S. phone number.\n *\n * Strips non-numeric characters and formats 10 digits as `(XXX) XXX-XXXX`.\n * Strips a leading US country code when 11 digits are provided.\n * If a value cannot be formatted, returns the original value as a string.\n *\n * @param {string | number} value - Phone number digits (string or number).\n * @returns {string} Formatted phone number, or original input if invalid length.\n * @example\n * formatPhoneNumber(\"1234567890\") // \"(123) 456-7890\"\n * formatPhoneNumber(9876543210) // \"(987) 654-3210\"\n * formatPhoneNumber(\"555\") // \"555\"\n */\nexport const formatPhoneNumber = (value: string | number): string => {\n const originalValue = value.toString();\n const digits = originalValue.replace(/\\D/g, \"\");\n const normalizedDigits =\n digits.length === 11 && digits.startsWith(\"1\") ? digits.slice(1) : digits;\n\n if (normalizedDigits.length !== 10) return originalValue;\n\n const area = normalizedDigits.slice(0, 3);\n const prefix = normalizedDigits.slice(3, 6);\n const line = normalizedDigits.slice(6);\n\n return `(${area}) ${prefix}-${line}`;\n};\n\n/**\n * Format a number with thousands separators (commas).\n *\n * @param {number} value - Number to format.\n * @returns {string} String with commas.\n * @example\n * formatNumber(1234567) // \"1,234,567\"\n */\nexport const formatNumber = (value: number): string => {\n return value.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n};\n\n/**\n * Remove comma separators from a number-like value.\n *\n * @param {number | string} value - Number-like value.\n * @returns {string} Value without comma separators.\n */\nexport const parseNumber = (value: number | string): string => {\n return value.toString().replace(/,/g, \"\");\n};\n\n/**\n * Delete a property from an object if it exists (no-op if it doesn't).\n *\n * @typeParam TObject - Object type.\n * @param {TObject} objectToUpdate - Target object (mutated).\n * @param {keyof TObject | string} propertyName - Property to delete.\n * @returns {void}\n */\nexport const deletePropertyIfExists = <TObject extends TRecord>(\n objectToUpdate: TObject,\n propertyName: keyof TObject | string,\n): void => {\n if (Object.prototype.hasOwnProperty.call(objectToUpdate, propertyName)) {\n delete objectToUpdate[propertyName as keyof TObject];\n }\n};\n\n/**\n * Split an array into chunks of a given size.\n *\n * @typeParam T - Element type.\n * @param {T[]} array - Source array.\n * @param {number} chunkSize - Size of each chunk.\n * @returns {T[][]} Array of chunks (last one may be smaller).\n * @example\n * chunkArray([1,2,3,4,5], 2) // [[1,2],[3,4],[5]]\n */\nexport const chunkArray = <T>(array: T[], chunkSize: number): T[][] => {\n if (!Array.isArray(array) || chunkSize <= 0 || !Number.isFinite(chunkSize)) {\n return [];\n }\n\n const result: T[][] = [];\n const normalizedChunkSize = Math.floor(chunkSize);\n\n for (let i = 0; i < array.length; i += normalizedChunkSize) {\n result.push(array.slice(i, i + normalizedChunkSize));\n }\n\n return result;\n};\n\n/**\n * Return a shallow clone of `objectToOmitFrom` without the listed properties.\n *\n * @typeParam TObject - Source object type.\n * @typeParam TKey - Keys to omit.\n * @param {TObject} objectToOmitFrom - Source object.\n * @param {readonly TKey[]} propsToOmit - Property names to omit.\n * @returns {Omit<TObject, TKey>} New object without omitted props.\n * @example\n * omitProperties({a:1,b:2}, [\"b\"]) // { a:1 }\n */\nexport const omitProperties = <\n TObject extends TRecord,\n TKey extends keyof TObject,\n>(\n objectToOmitFrom: TObject,\n propsToOmit: readonly TKey[],\n): Omit<TObject, TKey> => {\n const updatedObject: Partial<TObject> = { ...objectToOmitFrom };\n\n propsToOmit.forEach((propertyName) => {\n delete updatedObject[propertyName];\n });\n\n return updatedObject as Omit<TObject, TKey>;\n};\n\n/**\n * Safe `hasOwnProperty` check.\n *\n * @param {unknown} value - Value to test.\n * @param {PropertyKey} key - Property name.\n * @returns {boolean}\n */\nexport const hasProperty = <TKey extends PropertyKey>(\n value: unknown,\n key: TKey,\n): value is Record<TKey, unknown> => {\n if (value === null || value === undefined) return false;\n return Object.prototype.hasOwnProperty.call(value, key);\n};\n\n/**\n * Safe `hasOwnProperty` alias from the reference utilities.\n *\n * @param {unknown} value - Value to test.\n * @param {PropertyKey} key - Property name.\n * @returns {boolean}\n */\nexport const hasOwnProp = <TKey extends PropertyKey>(\n value: unknown,\n key: TKey,\n): value is Record<TKey, unknown> => {\n return hasProperty(value, key);\n};\n\n/**\n * Determine if an object has at least one own enumerable property.\n *\n * @param {unknown} value - Object to test.\n * @returns {boolean} `true` if there is at least one key.\n */\nexport const hasProperties = (value: unknown): boolean => {\n return isRecord(value) && Object.keys(value).length > 0;\n};\n\n/**\n * Get the first own enumerable property value from an object.\n *\n * @typeParam TObject - Source object type.\n * @param {TObject | null | undefined} value - Source object.\n * @returns {TObject[keyof TObject] | null} First value, or null for empty/non-object input.\n */\nexport const getFirstPropertyValue = <TObject extends TRecord>(\n value: TObject | null | undefined,\n): TObject[keyof TObject] | null => {\n if (value === null || value === undefined || !hasProperties(value)) {\n return null;\n }\n\n const source = value as TObject;\n const keys = Object.keys(source) as (keyof TObject)[];\n return source[keys[0]];\n};\n\n/**\n * Get a nested value from an object using dot notation.\n *\n * @param {unknown} value - Source object.\n * @param {string} path - Dot-delimited path.\n * @returns {unknown} Nested value, or undefined when the path cannot be resolved.\n * @example\n * getNestedValue({ user: { name: \"John\" } }, \"user.name\") // \"John\"\n */\nexport const getNestedValue = (value: unknown, path: string): unknown => {\n const pathSegments = getPathSegments(path);\n\n if (pathSegments.length === 0) {\n return value;\n }\n\n let currentValue: unknown = value;\n\n for (const pathSegment of pathSegments) {\n if (!isSafePathSegment(pathSegment)) {\n return undefined;\n }\n\n if (currentValue === null || currentValue === undefined) {\n return undefined;\n }\n\n if (\n typeof currentValue !== \"object\" &&\n typeof currentValue !== \"function\"\n ) {\n return undefined;\n }\n\n currentValue = (currentValue as TPropertyRecord)[pathSegment];\n }\n\n return currentValue;\n};\n\n/**\n * Set a nested value on an object using dot notation.\n *\n * Mutates and returns the provided object. Unsafe path segments are ignored to\n * prevent prototype pollution.\n *\n * @typeParam TObject - Target object type.\n * @param {TObject} objectToUpdate - Target object.\n * @param {string} path - Dot-delimited path.\n * @param {unknown} value - Value to set.\n * @returns {TObject} The mutated target object.\n * @example\n * setNestedValue({}, \"user.name\", \"John\") // { user: { name: \"John\" } }\n */\nexport const setNestedValue = <TObject extends TRecord>(\n objectToUpdate: TObject,\n path: string,\n value: unknown,\n): TObject => {\n const pathSegments = getPathSegments(path);\n\n if (\n pathSegments.length === 0 ||\n pathSegments.some((pathSegment) => !isSafePathSegment(pathSegment))\n ) {\n return objectToUpdate;\n }\n\n let currentValue: TRecord = objectToUpdate;\n\n for (let i = 0; i < pathSegments.length - 1; i += 1) {\n const pathSegment = pathSegments[i];\n const nextValue = currentValue[pathSegment];\n\n if (!isRecord(nextValue)) {\n currentValue[pathSegment] = {};\n }\n\n currentValue = currentValue[pathSegment] as TRecord;\n }\n\n currentValue[pathSegments[pathSegments.length - 1]] = value;\n return objectToUpdate;\n};\n\n/**\n * Deep clone a value while preserving Dates and circular references.\n *\n * @typeParam TValue - Input value type.\n * @param {TValue} value - Value to clone.\n * @returns {TValue} Deep clone of the input.\n */\nexport const deepClone = <TValue>(value: TValue): TValue => {\n const cloneValue = <TNestedValue>(\n nestedValue: TNestedValue,\n seenValues: WeakMap<object, unknown>,\n ): TNestedValue => {\n if (nestedValue === null || typeof nestedValue !== \"object\") {\n return nestedValue;\n }\n\n if (nestedValue instanceof Date) {\n return new Date(nestedValue.getTime()) as TNestedValue;\n }\n\n if (seenValues.has(nestedValue)) {\n return seenValues.get(nestedValue) as TNestedValue;\n }\n\n if (Array.isArray(nestedValue)) {\n const clonedArray: unknown[] = [];\n seenValues.set(nestedValue, clonedArray);\n\n nestedValue.forEach((item) => {\n clonedArray.push(cloneValue(item, seenValues));\n });\n\n return clonedArray as TNestedValue;\n }\n\n const clonedObject = Object.create(\n Object.getPrototypeOf(nestedValue),\n ) as TPropertyRecord;\n seenValues.set(nestedValue, clonedObject);\n\n Reflect.ownKeys(nestedValue).forEach((key) => {\n clonedObject[key] = cloneValue(\n (nestedValue as TPropertyRecord)[key],\n seenValues,\n );\n });\n\n return clonedObject as TNestedValue;\n };\n\n return cloneValue(value, new WeakMap<object, unknown>());\n};\n\n/**\n * Flatten a nested object into dot notation.\n *\n * Arrays and Dates are treated as leaf values.\n *\n * @param {TRecord} value - Source object.\n * @param {string} [prefix] - Internal prefix for recursion.\n * @returns {TRecord} Flattened object.\n * @example\n * flatten({ user: { name: \"John\" } }) // { \"user.name\": \"John\" }\n */\nexport const flatten = (value: TRecord, prefix = \"\"): TRecord => {\n const result: TRecord = {};\n\n Object.entries(value).forEach(([key, nestedValue]) => {\n const newKey = prefix ? `${prefix}.${key}` : key;\n\n if (isRecord(nestedValue)) {\n Object.assign(result, flatten(nestedValue, newKey));\n return;\n }\n\n result[newKey] = nestedValue;\n });\n\n return result;\n};\n\n/**\n * Convert a dot-notation object into a nested object.\n *\n * Unsafe path segments are ignored to prevent prototype pollution.\n *\n * @param {TRecord} value - Dot-notation source object.\n * @returns {TRecord} Nested object.\n * @example\n * unflatten({ \"user.name\": \"John\" }) // { user: { name: \"John\" } }\n */\nexport const unflatten = (value: TRecord): TRecord => {\n const result: TRecord = {};\n\n Object.entries(value).forEach(([key, nestedValue]) => {\n setNestedValue(result, key, nestedValue);\n });\n\n return result;\n};\n","/**\n * String utilities for common text manipulation tasks.\n */\n\nimport type { TUSStateCode } from \"../../types\";\n\nconst wordBoundaryRegex = /([a-z0-9])([A-Z])/g;\nconst acronymBoundaryRegex = /([A-Z]+)([A-Z][a-z])/g;\n\nconst getWords = (value: string): string[] => {\n return value\n .trim()\n .replace(acronymBoundaryRegex, \"$1 $2\")\n .replace(wordBoundaryRegex, \"$1 $2\")\n .replace(/[^a-zA-Z0-9]+/g, \" \")\n .trim()\n .split(/\\s+/)\n .filter(Boolean);\n};\n\nconst capitalizeWord = (value: string): string => {\n if (!value) {\n return \"\";\n }\n\n return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();\n};\n\n/**\n * Adds commas to a number for thousands separators.\n *\n * @example formatNumber(1000) => '1,000'\n * @example formatNumber('1234567') => '1,234,567'\n * @example formatNumber(1234567.89) => '1,234,567.89'\n */\nexport const formatNumber = (value: string | number): string => {\n const str = String(value);\n const [integer, decimal] = str.split(\".\");\n const formattedInteger = integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n\n return decimal !== undefined\n ? `${formattedInteger}.${decimal}`\n : formattedInteger;\n};\n\nexport const normalCase = (str?: string): string => {\n if (!str) {\n return \"\";\n }\n\n return getWords(str).map(capitalizeWord).join(\" \");\n};\n\nexport const sentenceCase = (str?: string): string => {\n if (!str) {\n return \"\";\n }\n\n const normalizedValue = str.trim().toLowerCase();\n\n return normalizedValue.charAt(0).toUpperCase() + normalizedValue.slice(1);\n};\n\nexport const upperCase = (str?: string): string => {\n return str?.toUpperCase() ?? \"\";\n};\n\nexport const lowerCase = (str?: string): string => {\n return str?.toLowerCase() ?? \"\";\n};\n\n/**\n * Converts a string to camelCase.\n *\n * @example toCamelCase('hello-world') => 'helloWorld'\n * @example toCamelCase('hello_world') => 'helloWorld'\n */\nexport const toCamelCase = (str: string): string => {\n const words = getWords(str);\n\n if (words.length === 0) {\n return \"\";\n }\n\n const [firstWord, ...remainingWords] = words;\n\n return [firstWord.toLowerCase(), ...remainingWords.map(capitalizeWord)].join(\n \"\",\n );\n};\n\nexport const camelCase = toCamelCase;\n\n/**\n * Converts a string to kebab-case.\n *\n * @example toKebabCase('helloWorld') => 'hello-world'\n * @example toKebabCase('Hello_World') => 'hello-world'\n */\nexport const toKebabCase = (str: string): string => {\n return getWords(str)\n .map((word) => word.toLowerCase())\n .join(\"-\");\n};\n\nexport const kebabCase = toKebabCase;\n\n/**\n * Converts a string to snake_case.\n *\n * @example toSnakeCase('helloWorld') => 'hello_world'\n * @example toSnakeCase('hello-world') => 'hello_world'\n */\nexport const toSnakeCase = (str: string): string => {\n return getWords(str)\n .map((word) => word.toLowerCase())\n .join(\"_\");\n};\n\nexport const snakeCase = toSnakeCase;\n\n/**\n * Converts a string to PascalCase.\n *\n * @example toPascalCase('hello-world') => 'HelloWorld'\n * @example toPascalCase('hello_world') => 'HelloWorld'\n */\nexport const toPascalCase = (str: string): string => {\n return getWords(str).map(capitalizeWord).join(\"\");\n};\n\nexport const pascalCase = toPascalCase;\n\nexport const snakeCaseToSpaces = (str: string): string => {\n return str.replace(/_+/g, \" \").trim();\n};\n\nexport const kebabToSpaces = (str: string): string => {\n return str.replace(/-+/g, \" \").trim();\n};\n\n/**\n * Capitalizes the first character of a string.\n *\n * @example capitalize('hello world') => 'Hello world'\n */\nexport const capitalize = (str: string): string => {\n if (!str) {\n return \"\";\n }\n\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n\n/**\n * Capitalizes the first letter of each word.\n *\n * @example titleCase('hello world') => 'Hello World'\n */\nexport const titleCase = (str: string): string => {\n return str.replace(/\\b\\w/g, (char) => char.toUpperCase());\n};\n\n/**\n * Truncates a string to a specified length and adds ellipsis.\n *\n * @example truncate('hello world', 5) => 'he...'\n */\nexport const truncate = (\n str: string,\n length: number,\n suffix = \"...\",\n): string => {\n if (length <= 0) {\n return \"\";\n }\n\n if (str.length <= length) {\n return str;\n }\n\n const maxLength = Math.max(0, length - suffix.length);\n\n if (maxLength === 0) {\n return suffix.length > length ? \"\" : suffix;\n }\n\n return str.slice(0, maxLength) + suffix;\n};\n\n/**\n * Removes all whitespace from a string.\n *\n * @example removeWhitespace('hello world') => 'helloworld'\n */\nexport const removeWhitespace = (str: string): string => {\n return str.replace(/\\s+/g, \"\");\n};\n\n/**\n * Removes all non-alphanumeric characters.\n *\n * @example removeSpecialChars('hello@world#123') => 'helloworld123'\n */\nexport const removeSpecialChars = (str: string): string => {\n return str.replace(/[^a-zA-Z0-9]/g, \"\");\n};\n\n/**\n * Generates a URL-friendly slug from a string.\n *\n * @example slug('Hello World 2024!') => 'hello-world-2024'\n */\nexport const slug = (str: string): string => {\n return str\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_]+/g, \"-\")\n .replace(/-+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n};\n\n/**\n * Validates if a string is a valid email.\n *\n * @example isEmail('user@example.com') => true\n */\nexport const isEmail = (str: string): boolean => {\n const emailRegex = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n return emailRegex.test(str.trim());\n};\n\n/**\n * Validates if a string is a valid URL.\n *\n * @example isUrl('https://example.com') => true\n */\nexport const isUrl = (str: string): boolean => {\n try {\n const parsedUrl = new URL(str);\n return parsedUrl.protocol === \"http:\" || parsedUrl.protocol === \"https:\";\n } catch {\n return false;\n }\n};\n\n/**\n * Validates if a string contains only numbers.\n *\n * @example isNumeric('12345') => true\n * @example isNumeric('123abc') => false\n */\nexport const isNumeric = (str: string): boolean => {\n return /^\\d+$/.test(str);\n};\n\n/**\n * Checks if a string is empty or contains only whitespace.\n *\n * @example isEmpty(' ') => true\n * @example isEmpty('hello') => false\n */\nexport const isEmpty = (str: string): boolean => {\n return str.trim().length === 0;\n};\n\n/**\n * Reverses a string.\n *\n * @example reverse('hello') => 'olleh'\n */\nexport const reverse = (str: string): string => {\n return Array.from(str).reverse().join(\"\");\n};\n\n/**\n * Repeats a string a specified number of times.\n *\n * @example repeat('ab', 3) => 'ababab'\n */\nexport const repeat = (str: string, times: number): string => {\n return str.repeat(Math.max(0, Math.floor(times)));\n};\n\n/**\n * Pads a string to a specified length.\n *\n * @example padStart('5', 3, '0') => '005'\n * @example padEnd('5', 3, '0') => '500'\n */\nexport const padStart = (\n str: string,\n length: number,\n padChar = \" \",\n): string => {\n return str.padStart(length, padChar);\n};\n\nexport const padEnd = (str: string, length: number, padChar = \" \"): string => {\n return str.padEnd(length, padChar);\n};\n\n/**\n * Encodes a string to Base64.\n *\n * @example toBase64('hello') => 'aGVsbG8='\n */\nexport const toBase64 = (str: string): string => {\n const bytes = new TextEncoder().encode(str);\n const binaryValue = Array.from(bytes, (byte) =>\n String.fromCharCode(byte),\n ).join(\"\");\n\n return globalThis.btoa(binaryValue);\n};\n\n/**\n * Decodes a Base64 string.\n *\n * @example fromBase64('aGVsbG8=') => 'hello'\n */\nexport const fromBase64 = (str: string): string => {\n const binaryValue = globalThis.atob(str);\n const bytes = Uint8Array.from(binaryValue, (character) => {\n return character.charCodeAt(0);\n });\n\n return new TextDecoder().decode(bytes);\n};\n\n/**\n * Counts the number of words in a string.\n *\n * @example wordCount('hello world test') => 3\n */\nexport const wordCount = (str: string): number => {\n const trimmedValue = str.trim();\n\n if (!trimmedValue) {\n return 0;\n }\n\n return trimmedValue.split(/\\s+/).length;\n};\n\n/**\n * Counts the number of characters, excluding whitespace.\n *\n * @example charCount('hello world') => 10\n */\nexport const charCount = (str: string): number => {\n return str.replace(/\\s/g, \"\").length;\n};\n\n/**\n * Repeats a character a specified number of times.\n *\n * @example repeatChar('*', 5) => '*****'\n */\nexport const repeatChar = (char: string, times: number): string => {\n return char.repeat(Math.max(0, Math.floor(times)));\n};\n\n/**\n * Extracts numbers from a string.\n *\n * @example extractNumbers('abc123def456') => '123456'\n */\nexport const extractNumbers = (str: string): string => {\n return str.replace(/\\D/g, \"\");\n};\n\n/**\n * Removes duplicate consecutive characters.\n *\n * @example removeDuplicates('aabbccdd') => 'abcd'\n */\nexport const removeDuplicates = (str: string): string => {\n return str.replace(/(.)\\1+/g, \"$1\");\n};\n\n/**\n * Checks if a string is a palindrome.\n *\n * @example isPalindrome('racecar') => true\n * @example isPalindrome('hello') => false\n */\nexport const isPalindrome = (str: string): boolean => {\n const cleaned = str.toLowerCase().replace(/[^a-z0-9]/g, \"\");\n return cleaned === cleaned.split(\"\").reverse().join(\"\");\n};\n\n/**\n * Finds the longest word in a string.\n *\n * @example longestWord('the quick brown fox') => 'quick'\n */\nexport const longestWord = (str: string): string => {\n const words = str.trim().split(/\\s+/).filter(Boolean);\n\n return words.reduce(\n (longest, word) => (word.length > longest.length ? word : longest),\n \"\",\n );\n};\n\n/**\n * Pluralizes common English words using a simple ruleset.\n *\n * @example pluralize('cat') => 'cats'\n * @example pluralize('box') => 'boxes'\n */\nexport const pluralize = (word: string): string => {\n const exceptions: Record<string, string> = {\n child: \"children\",\n person: \"people\",\n man: \"men\",\n woman: \"women\",\n tooth: \"teeth\",\n foot: \"feet\",\n mouse: \"mice\",\n };\n const lowercaseWord = word.toLowerCase();\n const exception = exceptions[lowercaseWord];\n\n if (exception) {\n return word.charAt(0) === word.charAt(0).toUpperCase()\n ? capitalize(exception)\n : exception;\n }\n\n if (/[^aeiou]y$/i.test(word)) {\n return `${word.slice(0, -1)}ies`;\n }\n\n if (/(s|x|z|ch|sh)$/i.test(word)) {\n return `${word}es`;\n }\n\n if (/fe$/i.test(word)) {\n return `${word.slice(0, -2)}ves`;\n }\n\n if (/f$/i.test(word)) {\n return `${word.slice(0, -1)}ves`;\n }\n\n return `${word}s`;\n};\n\n/**\n * Highlights a substring within a string by wrapping it with markers.\n *\n * @example highlight('hello world', 'world', '**') => 'hello **world**'\n */\nexport const highlight = (\n str: string,\n substring: string,\n marker = \"**\",\n): string => {\n if (!substring) {\n return str;\n }\n\n return str.replace(\n new RegExp(`(${escapeRegex(substring)})`, \"gi\"),\n `${marker}$1${marker}`,\n );\n};\n\n/**\n * Converts a string to a regex-safe string.\n *\n * @example escapeRegex('a.b*c') => 'a\\\\.b\\\\*c'\n */\nexport const escapeRegex = (str: string): string => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * Finds similarity between two strings using Levenshtein distance.\n * Returns a value between 0 and 1, where 1 means identical.\n *\n * @example stringSimilarity('hello', 'hallo') => 0.8\n */\nexport const stringSimilarity = (str1: string, str2: string): number => {\n const s1 = str1.toLowerCase();\n const s2 = str2.toLowerCase();\n const longer = s1.length > s2.length ? s1 : s2;\n const shorter = s1.length > s2.length ? s2 : s1;\n\n if (longer.length === 0) {\n return 1;\n }\n\n const editDistance = getEditDistance(longer, shorter);\n return (longer.length - editDistance) / longer.length;\n};\n\n/**\n * Helper function to calculate edit distance (Levenshtein distance).\n */\nconst getEditDistance = (s1: string, s2: string): number => {\n const costs: number[] = [];\n\n for (let i = 0; i <= s1.length; i += 1) {\n let lastValue = i;\n\n for (let j = 0; j <= s2.length; j += 1) {\n if (i === 0) {\n costs[j] = j;\n } else if (j > 0) {\n let newValue = costs[j - 1];\n\n if (s1.charAt(i - 1) !== s2.charAt(j - 1)) {\n newValue = Math.min(Math.min(newValue, lastValue), costs[j]) + 1;\n }\n\n costs[j - 1] = lastValue;\n lastValue = newValue;\n }\n }\n\n if (i > 0) {\n costs[s2.length] = lastValue;\n }\n }\n\n return costs[s2.length];\n};\n\n/**\n * Strips HTML tags from a string.\n *\n * @example stripHtml('<p>Hello <b>world</b></p>') => 'Hello world'\n */\nexport const stripHtml = (str: string): string => {\n return str.replace(/<[^>]*>/g, \"\");\n};\n\n/**\n * Replaces multiple spaces with a single space.\n *\n * @example normalizeSpaces('hello world') => 'hello world'\n */\nexport const normalizeSpaces = (str: string): string => {\n return str.replace(/\\s+/g, \" \").trim();\n};\n\n/**\n * Converts a string to a number, returning null if not valid.\n *\n * @example toNumber('123') => 123\n * @example toNumber('abc') => null\n */\nexport const toNumber = (str: string): number | null => {\n if (str.trim() === \"\") {\n return null;\n }\n\n const num = Number(str);\n return Number.isNaN(num) ? null : num;\n};\n\n/**\n * Splits a string by multiple delimiters.\n *\n * @example splitMultiple('a,b;c:d', ',', ';', ':') => ['a', 'b', 'c', 'd']\n */\nexport const splitMultiple = (\n str: string,\n ...delimiters: string[]\n): string[] => {\n if (delimiters.length === 0) {\n return [str].filter((part) => part.length > 0);\n }\n\n let result = [str];\n\n delimiters.forEach((delimiter) => {\n if (delimiter !== \"\") {\n result = result.flatMap((part) => part.split(delimiter));\n }\n });\n\n return result.filter((part) => part.length > 0);\n};\n\n/**\n * Checks if a string contains any of the provided substrings.\n *\n * @example containsAny('hello world', 'foo', 'world') => true\n */\nexport const containsAny = (str: string, ...substrings: string[]): boolean => {\n return substrings.some((substring) => str.includes(substring));\n};\n\n/**\n * Checks if a string contains all of the provided substrings.\n *\n * @example containsAll('hello world', 'hello', 'world') => true\n */\nexport const containsAll = (str: string, ...substrings: string[]): boolean => {\n return substrings.every((substring) => str.includes(substring));\n};\n\nexport interface IAddress {\n addressLine1: string;\n addressLine2?: string;\n city: string;\n stateCode: TUSStateCode;\n postalCode: string;\n}\n\nexport const formatAddress = (address: IAddress): string => {\n const parts = [\n address.addressLine1,\n address.addressLine2,\n address.city,\n address.stateCode,\n address.postalCode,\n ].filter(Boolean);\n\n return parts.join(\", \");\n};\n","export * from \"./date\";\nexport * from \"./object\";\nexport {\n camelCase,\n capitalize,\n charCount,\n containsAll,\n containsAny,\n escapeRegex,\n extractNumbers,\n formatAddress,\n formatNumber,\n fromBase64,\n highlight,\n isEmail,\n isEmpty,\n isNumeric,\n isPalindrome,\n isUrl,\n kebabCase,\n kebabToSpaces,\n longestWord,\n lowerCase,\n normalCase,\n normalizeSpaces,\n padEnd,\n padStart,\n pascalCase,\n pluralize,\n removeDuplicates,\n removeSpecialChars,\n removeWhitespace,\n repeat,\n repeatChar,\n reverse,\n sentenceCase,\n slug,\n snakeCase,\n snakeCaseToSpaces,\n splitMultiple,\n stringSimilarity,\n stripHtml,\n titleCase,\n toBase64,\n toCamelCase,\n toKebabCase,\n toNumber,\n toPascalCase,\n toSnakeCase,\n truncate,\n upperCase,\n wordCount,\n} from \"./string\";\n\nexport type { IAddress } from \"./string\";\n\ntype Success<T> = {\n data: T;\n error: null;\n};\n\ntype Failure<E> = {\n data: null;\n error: E;\n};\n\ntype Result<T, E = unknown> = Success<T> | Failure<E>;\n\nexport const tryCatch = async <T, E = unknown>(\n callback: () => T | Promise<T>,\n): Promise<Result<T, E>> => {\n try {\n const data = await callback();\n\n return {\n data,\n error: null,\n };\n } catch (error) {\n return {\n data: null,\n error: error as E,\n };\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,MAAC,SAAS,GAAE,GAAE;AAAC,kBAAU,OAAO,WAAS,eAAa,OAAO,SAAO,OAAO,UAAQ,EAAE,IAAE,cAAY,OAAO,UAAQ,OAAO,MAAI,OAAO,CAAC,KAAG,IAAE,eAAa,OAAO,aAAW,aAAW,KAAG,MAAM,QAAM,EAAE;AAAA,IAAC,GAAE,UAAM,WAAU;AAAC;AAAa,UAAI,IAAE,KAAI,IAAE,KAAI,IAAE,MAAK,IAAE,eAAc,IAAE,UAAS,IAAE,UAAS,IAAE,QAAO,IAAE,OAAM,IAAE,QAAO,IAAE,SAAQ,IAAE,WAAU,IAAE,QAAO,IAAE,QAAO,IAAE,gBAAe,IAAE,8FAA6F,IAAE,uFAAsF,IAAE,EAAC,MAAK,MAAK,UAAS,2DAA2D,MAAM,GAAG,GAAE,QAAO,wFAAwF,MAAM,GAAG,GAAE,SAAQ,SAASA,IAAE;AAAC,YAAIC,KAAE,CAAC,MAAK,MAAK,MAAK,IAAI,GAAEC,KAAEF,KAAE;AAAI,eAAM,MAAIA,MAAGC,IAAGC,KAAE,MAAI,EAAE,KAAGD,GAAEC,EAAC,KAAGD,GAAE,CAAC,KAAG;AAAA,MAAG,EAAC,GAAE,IAAE,SAASD,IAAEC,IAAEC,IAAE;AAAC,YAAIC,KAAE,OAAOH,EAAC;AAAE,eAAM,CAACG,MAAGA,GAAE,UAAQF,KAAED,KAAE,KAAG,MAAMC,KAAE,IAAEE,GAAE,MAAM,EAAE,KAAKD,EAAC,IAAEF;AAAA,MAAC,GAAE,IAAE,EAAC,GAAE,GAAE,GAAE,SAASA,IAAE;AAAC,YAAIC,KAAE,CAACD,GAAE,U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","u","a","M","m","f","l","$","y","v","g","D","o","d","c","h","t","i","d","n","e","s","r","e","t","o","n","i","d","dayjs","relativeTime","isoWeek"]}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pagination metadata for a paginated response.
|
|
3
|
+
*/
|
|
4
|
+
interface IPagingResult {
|
|
5
|
+
hasNextPage: boolean;
|
|
6
|
+
totalPages: number;
|
|
7
|
+
totalRecords: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Generic wrapper for paginated data.
|
|
11
|
+
*/
|
|
12
|
+
interface IDataWithPagingResult<TData> {
|
|
13
|
+
data: TData;
|
|
14
|
+
pagination: IPagingResult;
|
|
15
|
+
}
|
|
16
|
+
declare const SortDirection: {
|
|
17
|
+
readonly Asc: "Asc";
|
|
18
|
+
readonly Desc: "Desc";
|
|
19
|
+
};
|
|
20
|
+
type TSortDirection = (typeof SortDirection)[keyof typeof SortDirection];
|
|
21
|
+
/**
|
|
22
|
+
* Sorting condition for query results.
|
|
23
|
+
*/
|
|
24
|
+
interface ISortCondition {
|
|
25
|
+
name: string;
|
|
26
|
+
direction: TSortDirection;
|
|
27
|
+
}
|
|
28
|
+
declare const FilterCondition: {
|
|
29
|
+
readonly Equal: "=";
|
|
30
|
+
readonly GreaterThan: ">";
|
|
31
|
+
readonly LessThan: "<";
|
|
32
|
+
readonly NotEqual: "!=";
|
|
33
|
+
readonly Like: "LIKE";
|
|
34
|
+
readonly In: "IN";
|
|
35
|
+
readonly GreaterThanOrEqual: ">=";
|
|
36
|
+
readonly LessThanOrEqual: "<=";
|
|
37
|
+
};
|
|
38
|
+
type TFilterCondition = (typeof FilterCondition)[keyof typeof FilterCondition];
|
|
39
|
+
interface IFilterConditionBase {
|
|
40
|
+
name: string;
|
|
41
|
+
condition: TFilterCondition;
|
|
42
|
+
useAnd?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface IStringFilterCondition extends IFilterConditionBase {
|
|
45
|
+
valueString: string;
|
|
46
|
+
valueNumber?: never;
|
|
47
|
+
valueBoolean?: never;
|
|
48
|
+
}
|
|
49
|
+
interface INumberFilterCondition extends IFilterConditionBase {
|
|
50
|
+
valueString?: never;
|
|
51
|
+
valueNumber: number;
|
|
52
|
+
valueBoolean?: never;
|
|
53
|
+
}
|
|
54
|
+
interface IBooleanFilterCondition extends IFilterConditionBase {
|
|
55
|
+
valueString?: never;
|
|
56
|
+
valueNumber?: never;
|
|
57
|
+
valueBoolean: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Filter condition for querying data.
|
|
61
|
+
*
|
|
62
|
+
* Exactly one value field should be provided.
|
|
63
|
+
*/
|
|
64
|
+
type TFilterConditionValue = IStringFilterCondition | INumberFilterCondition | IBooleanFilterCondition;
|
|
65
|
+
/**
|
|
66
|
+
* Kept as an exported alias to preserve the existing public API name.
|
|
67
|
+
*/
|
|
68
|
+
type IFilterCondition = TFilterConditionValue;
|
|
69
|
+
/**
|
|
70
|
+
* Request shape for paginated data with optional sorting and filtering.
|
|
71
|
+
*/
|
|
72
|
+
interface IPaginationRequest {
|
|
73
|
+
page: number;
|
|
74
|
+
size: number;
|
|
75
|
+
sort?: ISortCondition[];
|
|
76
|
+
filters?: IFilterCondition[];
|
|
77
|
+
}
|
|
78
|
+
interface IPagingObject {
|
|
79
|
+
pagination: IPaginationRequest;
|
|
80
|
+
}
|
|
81
|
+
declare const createPagingObject: (page: number, size: number, sort?: ISortCondition[], filters?: IFilterCondition[]) => IPagingObject;
|
|
82
|
+
|
|
83
|
+
type TJsonPrimitive = string | number | boolean | null;
|
|
84
|
+
type TJsonObject = {
|
|
85
|
+
[key: string]: TJsonValue;
|
|
86
|
+
};
|
|
87
|
+
type TJsonValue = TJsonPrimitive | TJsonValue[] | TJsonObject;
|
|
88
|
+
type TUnknownRecord = Record<string, unknown>;
|
|
89
|
+
/**
|
|
90
|
+
* Serialized ISO-8601 date/time value returned by API JSON contracts.
|
|
91
|
+
*/
|
|
92
|
+
type TDateTimeString = string;
|
|
93
|
+
type TurndownObject<TObject extends object = TUnknownRecord> = TObject;
|
|
94
|
+
type TEmptyObject = Record<string, never>;
|
|
95
|
+
type IEmptyRouteRequest = TEmptyObject;
|
|
96
|
+
type IEmptyRouteParams = TEmptyObject;
|
|
97
|
+
declare const ENVIRONMENT: {
|
|
98
|
+
readonly Prod: "Prod";
|
|
99
|
+
readonly Dev: "Dev";
|
|
100
|
+
readonly Local: "Local";
|
|
101
|
+
readonly Test: "Test";
|
|
102
|
+
};
|
|
103
|
+
type TEnvironment = (typeof ENVIRONMENT)[keyof typeof ENVIRONMENT];
|
|
104
|
+
interface IMessageResponse {
|
|
105
|
+
message: string;
|
|
106
|
+
}
|
|
107
|
+
interface ISuccessResponse {
|
|
108
|
+
success: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface ICountResponse {
|
|
111
|
+
count: number;
|
|
112
|
+
}
|
|
113
|
+
interface IMetaData {
|
|
114
|
+
createdAt: TDateTimeString;
|
|
115
|
+
updatedAt: TDateTimeString;
|
|
116
|
+
deletedAt: TDateTimeString | null;
|
|
117
|
+
}
|
|
118
|
+
type TRecordValue<TRecord extends object> = TRecord[keyof TRecord];
|
|
119
|
+
type TRecordKeys<TRecord extends object> = keyof TRecord;
|
|
120
|
+
interface IVersion {
|
|
121
|
+
major: number;
|
|
122
|
+
minor: number;
|
|
123
|
+
patch: number;
|
|
124
|
+
}
|
|
125
|
+
type TVersionInput = string | IVersion;
|
|
126
|
+
interface ISelectOption<TValue extends string = string> {
|
|
127
|
+
label: string;
|
|
128
|
+
value: TValue;
|
|
129
|
+
}
|
|
130
|
+
declare const MODE: {
|
|
131
|
+
readonly Create: "Create";
|
|
132
|
+
readonly Edit: "Edit";
|
|
133
|
+
readonly Delete: "Delete";
|
|
134
|
+
readonly Details: "Details";
|
|
135
|
+
};
|
|
136
|
+
type TMode = TRecordValue<typeof MODE> | null;
|
|
137
|
+
declare const IMAGE_ENTITY: {
|
|
138
|
+
readonly USER_PROFILE: "USER_PROFILE";
|
|
139
|
+
readonly PROPERTY: "PROPERTY";
|
|
140
|
+
readonly COMPANY: "COMPANY";
|
|
141
|
+
readonly CHECKLIST_ITEM: "CHECKLIST_ITEM";
|
|
142
|
+
readonly PROPERTY_ROOM: "PROPERTY_ROOM";
|
|
143
|
+
readonly MAINTENANCE_TICKET: "MAINTENANCE_TICKET";
|
|
144
|
+
readonly WORK_REPORT: "WORK_REPORT";
|
|
145
|
+
readonly CLEANING_REPORT: "CLEANING_REPORT";
|
|
146
|
+
readonly TURNDOWN_DEFAULT: "TURNDOWN_DEFAULT";
|
|
147
|
+
};
|
|
148
|
+
type TImageEntityType = TRecordValue<typeof IMAGE_ENTITY>;
|
|
149
|
+
type TUSStateCode = TRecordKeys<typeof US_JURISDICTIONS>;
|
|
150
|
+
declare const US_JURISDICTIONS: {
|
|
151
|
+
readonly AL: "Alabama";
|
|
152
|
+
readonly AK: "Alaska";
|
|
153
|
+
readonly AZ: "Arizona";
|
|
154
|
+
readonly AR: "Arkansas";
|
|
155
|
+
readonly CA: "California";
|
|
156
|
+
readonly CO: "Colorado";
|
|
157
|
+
readonly CT: "Connecticut";
|
|
158
|
+
readonly DE: "Delaware";
|
|
159
|
+
readonly FL: "Florida";
|
|
160
|
+
readonly GA: "Georgia";
|
|
161
|
+
readonly HI: "Hawaii";
|
|
162
|
+
readonly ID: "Idaho";
|
|
163
|
+
readonly IL: "Illinois";
|
|
164
|
+
readonly IN: "Indiana";
|
|
165
|
+
readonly IA: "Iowa";
|
|
166
|
+
readonly KS: "Kansas";
|
|
167
|
+
readonly KY: "Kentucky";
|
|
168
|
+
readonly LA: "Louisiana";
|
|
169
|
+
readonly ME: "Maine";
|
|
170
|
+
readonly MD: "Maryland";
|
|
171
|
+
readonly MA: "Massachusetts";
|
|
172
|
+
readonly MI: "Michigan";
|
|
173
|
+
readonly MN: "Minnesota";
|
|
174
|
+
readonly MS: "Mississippi";
|
|
175
|
+
readonly MO: "Missouri";
|
|
176
|
+
readonly MT: "Montana";
|
|
177
|
+
readonly NE: "Nebraska";
|
|
178
|
+
readonly NV: "Nevada";
|
|
179
|
+
readonly NH: "New Hampshire";
|
|
180
|
+
readonly NJ: "New Jersey";
|
|
181
|
+
readonly NM: "New Mexico";
|
|
182
|
+
readonly NY: "New York";
|
|
183
|
+
readonly NC: "North Carolina";
|
|
184
|
+
readonly ND: "North Dakota";
|
|
185
|
+
readonly OH: "Ohio";
|
|
186
|
+
readonly OK: "Oklahoma";
|
|
187
|
+
readonly OR: "Oregon";
|
|
188
|
+
readonly PA: "Pennsylvania";
|
|
189
|
+
readonly RI: "Rhode Island";
|
|
190
|
+
readonly SC: "South Carolina";
|
|
191
|
+
readonly SD: "South Dakota";
|
|
192
|
+
readonly TN: "Tennessee";
|
|
193
|
+
readonly TX: "Texas";
|
|
194
|
+
readonly UT: "Utah";
|
|
195
|
+
readonly VT: "Vermont";
|
|
196
|
+
readonly VA: "Virginia";
|
|
197
|
+
readonly WA: "Washington";
|
|
198
|
+
readonly WV: "West Virginia";
|
|
199
|
+
readonly WI: "Wisconsin";
|
|
200
|
+
readonly WY: "Wyoming";
|
|
201
|
+
readonly DC: "District of Columbia";
|
|
202
|
+
readonly PR: "Puerto Rico";
|
|
203
|
+
readonly GU: "Guam";
|
|
204
|
+
readonly VI: "United States Virgin Islands";
|
|
205
|
+
readonly AS: "American Samoa";
|
|
206
|
+
readonly MP: "Northern Mariana Islands";
|
|
207
|
+
};
|
|
208
|
+
type TUSJurisdiction = TRecordValue<typeof US_JURISDICTIONS>;
|
|
209
|
+
declare const STATUS: {
|
|
210
|
+
readonly PENDING: "PENDING";
|
|
211
|
+
readonly IN_PROGRESS: "IN_PROGRESS";
|
|
212
|
+
readonly COMPLETED: "COMPLETED";
|
|
213
|
+
readonly OVERDUE: "OVERDUE";
|
|
214
|
+
readonly ACTIVE: "ACTIVE";
|
|
215
|
+
readonly INACTIVE: "INACTIVE";
|
|
216
|
+
};
|
|
217
|
+
type TStatus = TRecordValue<typeof STATUS>;
|
|
218
|
+
declare const SEVERITY: {
|
|
219
|
+
readonly LOW: "LOW";
|
|
220
|
+
readonly MEDIUM: "MEDIUM";
|
|
221
|
+
readonly HIGH: "HIGH";
|
|
222
|
+
};
|
|
223
|
+
type TSeverity = TRecordValue<typeof SEVERITY>;
|
|
224
|
+
declare const SERVICE_TYPES: {
|
|
225
|
+
readonly PROPERTY: "PROPERTY";
|
|
226
|
+
readonly CLEANING: "CLEANING";
|
|
227
|
+
readonly MAINTENANCE: "MAINTENANCE";
|
|
228
|
+
readonly INSPECTION: "INSPECTION";
|
|
229
|
+
readonly OTHER: "OTHER";
|
|
230
|
+
};
|
|
231
|
+
type TServiceType = TRecordValue<typeof SERVICE_TYPES>;
|
|
232
|
+
declare const MONTHS: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
233
|
+
type TMonths = (typeof MONTHS)[number];
|
|
234
|
+
declare const WEEK_DAY: {
|
|
235
|
+
readonly Sunday: "Sunday";
|
|
236
|
+
readonly Monday: "Monday";
|
|
237
|
+
readonly Tuesday: "Tuesday";
|
|
238
|
+
readonly Wednesday: "Wednesday";
|
|
239
|
+
readonly Thursday: "Thursday";
|
|
240
|
+
readonly Friday: "Friday";
|
|
241
|
+
readonly Saturday: "Saturday";
|
|
242
|
+
};
|
|
243
|
+
type TWeekDay = TRecordValue<typeof WEEK_DAY>;
|
|
244
|
+
declare const WEEK_DAY_SHORT_LABEL: {
|
|
245
|
+
readonly Sunday: "Sun";
|
|
246
|
+
readonly Monday: "Mon";
|
|
247
|
+
readonly Tuesday: "Tue";
|
|
248
|
+
readonly Wednesday: "Wed";
|
|
249
|
+
readonly Thursday: "Thu";
|
|
250
|
+
readonly Friday: "Fri";
|
|
251
|
+
readonly Saturday: "Sat";
|
|
252
|
+
};
|
|
253
|
+
type TWeekDayShortLabel = TRecordValue<typeof WEEK_DAY_SHORT_LABEL>;
|
|
254
|
+
declare const WEEK_DAY_LETTER: {
|
|
255
|
+
readonly Sunday: "S";
|
|
256
|
+
readonly Monday: "M";
|
|
257
|
+
readonly Tuesday: "T";
|
|
258
|
+
readonly Wednesday: "W";
|
|
259
|
+
readonly Thursday: "T";
|
|
260
|
+
readonly Friday: "F";
|
|
261
|
+
readonly Saturday: "S";
|
|
262
|
+
};
|
|
263
|
+
type TWeekDayLetter = TRecordValue<typeof WEEK_DAY_LETTER>;
|
|
264
|
+
interface IWeekDay {
|
|
265
|
+
date: Date;
|
|
266
|
+
dayOfMonth: number;
|
|
267
|
+
day: TWeekDay;
|
|
268
|
+
shortLabel: TWeekDayShortLabel;
|
|
269
|
+
letter: TWeekDayLetter;
|
|
270
|
+
isToday: boolean;
|
|
271
|
+
}
|
|
272
|
+
declare const UnitedStatesJurisdictionOptions: ISelectOption<TRecordValue<{
|
|
273
|
+
readonly AL: "Alabama";
|
|
274
|
+
readonly AK: "Alaska";
|
|
275
|
+
readonly AZ: "Arizona";
|
|
276
|
+
readonly AR: "Arkansas";
|
|
277
|
+
readonly CA: "California";
|
|
278
|
+
readonly CO: "Colorado";
|
|
279
|
+
readonly CT: "Connecticut";
|
|
280
|
+
readonly DE: "Delaware";
|
|
281
|
+
readonly FL: "Florida";
|
|
282
|
+
readonly GA: "Georgia";
|
|
283
|
+
readonly HI: "Hawaii";
|
|
284
|
+
readonly ID: "Idaho";
|
|
285
|
+
readonly IL: "Illinois";
|
|
286
|
+
readonly IN: "Indiana";
|
|
287
|
+
readonly IA: "Iowa";
|
|
288
|
+
readonly KS: "Kansas";
|
|
289
|
+
readonly KY: "Kentucky";
|
|
290
|
+
readonly LA: "Louisiana";
|
|
291
|
+
readonly ME: "Maine";
|
|
292
|
+
readonly MD: "Maryland";
|
|
293
|
+
readonly MA: "Massachusetts";
|
|
294
|
+
readonly MI: "Michigan";
|
|
295
|
+
readonly MN: "Minnesota";
|
|
296
|
+
readonly MS: "Mississippi";
|
|
297
|
+
readonly MO: "Missouri";
|
|
298
|
+
readonly MT: "Montana";
|
|
299
|
+
readonly NE: "Nebraska";
|
|
300
|
+
readonly NV: "Nevada";
|
|
301
|
+
readonly NH: "New Hampshire";
|
|
302
|
+
readonly NJ: "New Jersey";
|
|
303
|
+
readonly NM: "New Mexico";
|
|
304
|
+
readonly NY: "New York";
|
|
305
|
+
readonly NC: "North Carolina";
|
|
306
|
+
readonly ND: "North Dakota";
|
|
307
|
+
readonly OH: "Ohio";
|
|
308
|
+
readonly OK: "Oklahoma";
|
|
309
|
+
readonly OR: "Oregon";
|
|
310
|
+
readonly PA: "Pennsylvania";
|
|
311
|
+
readonly RI: "Rhode Island";
|
|
312
|
+
readonly SC: "South Carolina";
|
|
313
|
+
readonly SD: "South Dakota";
|
|
314
|
+
readonly TN: "Tennessee";
|
|
315
|
+
readonly TX: "Texas";
|
|
316
|
+
readonly UT: "Utah";
|
|
317
|
+
readonly VT: "Vermont";
|
|
318
|
+
readonly VA: "Virginia";
|
|
319
|
+
readonly WA: "Washington";
|
|
320
|
+
readonly WV: "West Virginia";
|
|
321
|
+
readonly WI: "Wisconsin";
|
|
322
|
+
readonly WY: "Wyoming";
|
|
323
|
+
readonly DC: "District of Columbia";
|
|
324
|
+
readonly PR: "Puerto Rico";
|
|
325
|
+
readonly GU: "Guam";
|
|
326
|
+
readonly VI: "United States Virgin Islands";
|
|
327
|
+
readonly AS: "American Samoa";
|
|
328
|
+
readonly MP: "Northern Mariana Islands";
|
|
329
|
+
}>>[];
|
|
330
|
+
declare const StatusOptions: ISelectOption<TStatus>[];
|
|
331
|
+
declare const SeverityOptions: ISelectOption<TSeverity>[];
|
|
332
|
+
declare const ServiceTypeOptions: ISelectOption<TServiceType>[];
|
|
333
|
+
|
|
334
|
+
export { type TWeekDayLetter as $, type TEmptyObject as A, type TEnvironment as B, type TFilterCondition as C, type TFilterConditionValue as D, ENVIRONMENT as E, FilterCondition as F, type TImageEntityType as G, type TJsonObject as H, type IBooleanFilterCondition as I, type TJsonPrimitive as J, type TJsonValue as K, type TMode as L, MODE as M, type TMonths as N, type TRecordKeys as O, type TRecordValue as P, type TServiceType as Q, type TSeverity as R, SERVICE_TYPES as S, type TDateTimeString as T, type TSortDirection as U, type TStatus as V, type TUSJurisdiction as W, type TUSStateCode as X, type TUnknownRecord as Y, type TVersionInput as Z, type TWeekDay as _, type ICountResponse as a, type TWeekDayShortLabel as a0, type TurndownObject as a1, US_JURISDICTIONS as a2, UnitedStatesJurisdictionOptions as a3, WEEK_DAY as a4, WEEK_DAY_LETTER as a5, WEEK_DAY_SHORT_LABEL as a6, createPagingObject as a7, type IDataWithPagingResult as b, type IEmptyRouteParams as c, type IEmptyRouteRequest as d, type IFilterCondition as e, type IFilterConditionBase as f, IMAGE_ENTITY as g, type IMessageResponse as h, type IMetaData as i, type INumberFilterCondition as j, type IPaginationRequest as k, type IPagingObject as l, type IPagingResult as m, type ISelectOption as n, type ISortCondition as o, type IStringFilterCondition as p, type ISuccessResponse as q, type IVersion as r, type IWeekDay as s, MONTHS as t, SEVERITY as u, STATUS as v, ServiceTypeOptions as w, SeverityOptions as x, SortDirection as y, StatusOptions as z };
|