reslib 1.0.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/README.md +298 -0
- package/build/auth/index.d.ts +2034 -0
- package/build/auth/index.js +5 -0
- package/build/auth/types.d.ts +465 -0
- package/build/auth/types.js +1 -0
- package/build/countries/countries.d.ts +1454 -0
- package/build/countries/countries.js +1 -0
- package/build/countries/index.d.ts +159 -0
- package/build/countries/index.js +5 -0
- package/build/countries/types.d.ts +65 -0
- package/build/countries/types.js +1 -0
- package/build/currency/currencies.d.ts +8 -0
- package/build/currency/currencies.js +1 -0
- package/build/currency/index.d.ts +51 -0
- package/build/currency/index.js +5 -0
- package/build/currency/session.d.ts +23 -0
- package/build/currency/session.js +5 -0
- package/build/currency/types.d.ts +1039 -0
- package/build/currency/types.js +1 -0
- package/build/currency/utils.d.ts +25 -0
- package/build/currency/utils.js +1 -0
- package/build/i18n/index.d.ts +640 -0
- package/build/i18n/index.js +5 -0
- package/build/inputFormatter/index.d.ts +396 -0
- package/build/inputFormatter/index.js +5 -0
- package/build/inputFormatter/types.d.ts +544 -0
- package/build/inputFormatter/types.js +1 -0
- package/build/logger/index.d.ts +235 -0
- package/build/logger/index.js +5 -0
- package/build/observable/index.d.ts +329 -0
- package/build/observable/index.js +1 -0
- package/build/platform/index.d.ts +32 -0
- package/build/platform/index.js +1 -0
- package/build/resources/ResourcePaginationHelper.d.ts +537 -0
- package/build/resources/ResourcePaginationHelper.js +2 -0
- package/build/resources/decorators/create.decorator.d.ts +20 -0
- package/build/resources/decorators/create.decorator.js +1 -0
- package/build/resources/decorators/index.d.ts +41 -0
- package/build/resources/decorators/index.js +1 -0
- package/build/resources/fields/index.d.ts +33 -0
- package/build/resources/fields/index.js +1 -0
- package/build/resources/filters.d.ts +62 -0
- package/build/resources/filters.js +1 -0
- package/build/resources/index.d.ts +854 -0
- package/build/resources/index.js +6 -0
- package/build/resources/types/filters.d.ts +508 -0
- package/build/resources/types/filters.js +1 -0
- package/build/resources/types/index.d.ts +4138 -0
- package/build/resources/types/index.js +1 -0
- package/build/session/index.d.ts +1474 -0
- package/build/session/index.js +1 -0
- package/build/translations/auth.en.d.ts +3 -0
- package/build/translations/auth.en.js +1 -0
- package/build/translations/countries.en.d.ts +6 -0
- package/build/translations/countries.en.js +1 -0
- package/build/translations/currencies.en.d.ts +5 -0
- package/build/translations/currencies.en.js +1 -0
- package/build/translations/date.en.d.ts +19 -0
- package/build/translations/date.en.js +1 -0
- package/build/translations/index.d.ts +1583 -0
- package/build/translations/index.js +5 -0
- package/build/translations/resources.en.d.ts +6 -0
- package/build/translations/resources.en.js +1 -0
- package/build/translations/validator.en.d.ts +104 -0
- package/build/translations/validator.en.js +5 -0
- package/build/types/date.d.ts +44 -0
- package/build/types/date.js +1 -0
- package/build/types/dictionary.d.ts +29 -0
- package/build/types/dictionary.js +1 -0
- package/build/types/i18n.d.ts +121 -0
- package/build/types/i18n.js +1 -0
- package/build/types/index.d.ts +145 -0
- package/build/types/index.js +1 -0
- package/build/utils/areEquals.d.ts +19 -0
- package/build/utils/areEquals.js +1 -0
- package/build/utils/date/dateHelper.d.ts +371 -0
- package/build/utils/date/dateHelper.js +5 -0
- package/build/utils/date/index.d.ts +212 -0
- package/build/utils/date/index.js +5 -0
- package/build/utils/date/isDateObj.d.ts +14 -0
- package/build/utils/date/isDateObj.js +1 -0
- package/build/utils/debounce.d.ts +52 -0
- package/build/utils/debounce.js +1 -0
- package/build/utils/defaultArray.d.ts +18 -0
- package/build/utils/defaultArray.js +1 -0
- package/build/utils/defaultBool.d.ts +14 -0
- package/build/utils/defaultBool.js +1 -0
- package/build/utils/defaultStr.d.ts +17 -0
- package/build/utils/defaultStr.js +1 -0
- package/build/utils/defaultVal.d.ts +18 -0
- package/build/utils/defaultVal.js +1 -0
- package/build/utils/dom/index.d.ts +65 -0
- package/build/utils/dom/index.js +1 -0
- package/build/utils/dom/isDOMElement.d.ts +11 -0
- package/build/utils/dom/isDOMElement.js +1 -0
- package/build/utils/file/index.d.ts +26 -0
- package/build/utils/file/index.js +1 -0
- package/build/utils/global.d.ts +53 -0
- package/build/utils/global.js +1 -0
- package/build/utils/image.d.ts +56 -0
- package/build/utils/image.js +1 -0
- package/build/utils/index.d.ts +39 -0
- package/build/utils/index.js +6 -0
- package/build/utils/interpolate.d.ts +105 -0
- package/build/utils/interpolate.js +1 -0
- package/build/utils/isEmail.d.ts +57 -0
- package/build/utils/isEmail.js +1 -0
- package/build/utils/isEmpty.d.ts +18 -0
- package/build/utils/isEmpty.js +1 -0
- package/build/utils/isNonNullString.d.ts +17 -0
- package/build/utils/isNonNullString.js +1 -0
- package/build/utils/isNullable.d.ts +7 -0
- package/build/utils/isNullable.js +1 -0
- package/build/utils/isNumber.d.ts +36 -0
- package/build/utils/isNumber.js +1 -0
- package/build/utils/isPrimitive.d.ts +16 -0
- package/build/utils/isPrimitive.js +1 -0
- package/build/utils/isPromise.d.ts +14 -0
- package/build/utils/isPromise.js +1 -0
- package/build/utils/isRegex.d.ts +15 -0
- package/build/utils/isRegex.js +1 -0
- package/build/utils/isTime.d.ts +18 -0
- package/build/utils/isTime.js +1 -0
- package/build/utils/json.d.ts +224 -0
- package/build/utils/json.js +1 -0
- package/build/utils/numbers.d.ts +148 -0
- package/build/utils/numbers.js +5 -0
- package/build/utils/object.d.ts +567 -0
- package/build/utils/object.js +1 -0
- package/build/utils/sort.d.ts +67 -0
- package/build/utils/sort.js +1 -0
- package/build/utils/string.d.ts +165 -0
- package/build/utils/string.js +1 -0
- package/build/utils/stringify.d.ts +23 -0
- package/build/utils/stringify.js +1 -0
- package/build/utils/uniqid.d.ts +18 -0
- package/build/utils/uniqid.js +1 -0
- package/build/utils/uri/index.d.ts +333 -0
- package/build/utils/uri/index.js +2 -0
- package/build/validator/index.d.ts +4 -0
- package/build/validator/index.js +6 -0
- package/build/validator/rules/array.d.ts +848 -0
- package/build/validator/rules/array.js +5 -0
- package/build/validator/rules/boolean.d.ts +87 -0
- package/build/validator/rules/boolean.js +5 -0
- package/build/validator/rules/date.d.ts +551 -0
- package/build/validator/rules/date.js +5 -0
- package/build/validator/rules/default.d.ts +367 -0
- package/build/validator/rules/default.js +5 -0
- package/build/validator/rules/enum.d.ts +155 -0
- package/build/validator/rules/enum.js +5 -0
- package/build/validator/rules/file.d.ts +356 -0
- package/build/validator/rules/file.js +5 -0
- package/build/validator/rules/format.d.ts +2825 -0
- package/build/validator/rules/format.js +6 -0
- package/build/validator/rules/index.d.ts +16 -0
- package/build/validator/rules/index.js +6 -0
- package/build/validator/rules/multiRules.d.ts +475 -0
- package/build/validator/rules/multiRules.js +5 -0
- package/build/validator/rules/numeric.d.ts +1135 -0
- package/build/validator/rules/numeric.js +5 -0
- package/build/validator/rules/string.d.ts +504 -0
- package/build/validator/rules/string.js +5 -0
- package/build/validator/rules/target.d.ts +137 -0
- package/build/validator/rules/target.js +5 -0
- package/build/validator/rules/utils.d.ts +1 -0
- package/build/validator/rules/utils.js +1 -0
- package/build/validator/rulesMarkers.d.ts +11 -0
- package/build/validator/rulesMarkers.js +1 -0
- package/build/validator/types.d.ts +2906 -0
- package/build/validator/types.js +1 -0
- package/build/validator/validator.d.ts +3692 -0
- package/build/validator/validator.js +5 -0
- package/lib/cjs/auth.js +1 -0
- package/lib/cjs/countries.js +1 -0
- package/lib/cjs/currency.js +1 -0
- package/lib/cjs/i18n.js +1 -0
- package/lib/cjs/inputFormatter.js +1 -0
- package/lib/cjs/logger.js +1 -0
- package/lib/cjs/observable.js +1 -0
- package/lib/cjs/platform.js +1 -0
- package/lib/cjs/resources.js +1 -0
- package/lib/cjs/session.js +1 -0
- package/lib/cjs/types.js +1 -0
- package/lib/cjs/utils.js +1 -0
- package/lib/cjs/validator.js +1 -0
- package/lib/esm/auth.mjs +1 -0
- package/lib/esm/countries.mjs +1 -0
- package/lib/esm/currency.mjs +1 -0
- package/lib/esm/i18n.mjs +1 -0
- package/lib/esm/inputFormatter.mjs +1 -0
- package/lib/esm/logger.mjs +1 -0
- package/lib/esm/observable.mjs +1 -0
- package/lib/esm/platform.mjs +1 -0
- package/lib/esm/resources.mjs +1 -0
- package/lib/esm/session.mjs +1 -0
- package/lib/esm/types.mjs +1 -0
- package/lib/esm/utils.mjs +1 -0
- package/lib/esm/validator.mjs +1 -0
- package/package.json +244 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('reflect-metadata');function S(e){return typeof e=="boolean"||!e||typeof e=="number"||typeof e=="string"||typeof e=="symbol"?false:Object(e).constructor===Promise||e.constructor&&(e.constructor.name==="Promise"||e.constructor.name==="AsyncFunction")||e instanceof Promise||typeof(e==null?void 0:e.then)=="function"&&typeof(e==null?void 0:e.catch)=="function"&&typeof(e==null?void 0:e.finally)=="function"?true:e&&typeof e.constructor=="function"&&Function.prototype.toString.call(e.constructor).replace(/\(.*\)/,"()")===Function.prototype.toString.call(Function).replace("Function","Promise").replace(/\(.*\)/,"()")}function y(e){return e&&Object.prototype.toString.call(e)==="[object Promise]"?true:S(e)}function d(){return typeof window!="undefined"&&(window==null?void 0:window.document)!==void 0&&typeof document!="undefined"&&typeof navigator!="undefined"}var c=()=>{var e;try{if(typeof process!="undefined"&&(process!=null&&process.versions)&&((e=process==null?void 0:process.versions)!=null&&e.node)||typeof global=="object"&&(global==null?void 0:global.toString.call(global))==="[object global]")return !0}catch(t){}return false},h=()=>{var e,t;return !!(typeof window!="undefined"&&window&&typeof(window==null?void 0:window.process)=="object"&&((e=window==null?void 0:window.process)==null?void 0:e.type)==="renderer"||typeof process!="undefined"&&typeof(process==null?void 0:process.versions)=="object"&&((t=process.versions)!=null&&t.electron)||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&String(navigator==null?void 0:navigator.userAgent).toLowerCase().indexOf("electron")>=0)},v=()=>{if(typeof document!="undefined"&&document)try{return document.createEvent("TouchEvent"),!0}catch(e){try{return "ontouchstart"in window||"onmsgesturechange"in window}catch(t){}}return false},N=()=>typeof window=="undefined"&&typeof process!="undefined",p=()=>!!(typeof window!="undefined"&&typeof window=="object"&&window),A=()=>{if(!d()||typeof navigator!="object"||!navigator||typeof navigator.userAgent!="string")return false;let e=navigator.userAgent.toLowerCase();return /android/i.test(e)},D=()=>{var e;return !p()||!(window!=null&&window.ReactNativeWebView)?false:typeof((e=window==null?void 0:window.ReactNativeWebView)==null?void 0:e.postMessage)=="function"},P=()=>c()&&process.platform==="darwin",x=()=>c()&&process.platform==="win32",C=()=>c()&&process.platform==="linux",m={isWeb:d,isLinux:C,isDarwin:P,isWin32:x,isNode:c,isElectron:h,isTouchDevice:v,isServerSide:N,isClientSide:p,isAndroidMobileBrowser:A,isReactNativeWebview:D};function f(e){return !!(e&&typeof e=="string")}var a=class e{static decycle(t,r=[]){if(typeof t=="function")return;if(!t||typeof t!="object")return t;if(r.includes(t))return null;let n=r.concat([t]);return Array.isArray(t)?t.map(o=>e.decycle(o,n)):Object.fromEntries(Object.entries(t).map(([o,g])=>[o,e.decycle(g,n)]))}static stringify(t,r=false){return typeof t=="string"?t:JSON.stringify(r!==false?e.decycle(t):t)}static isJSON(t){if(typeof t!="string")return false;let r=t.trim();if(r.length===0)return false;let n=r[0];if(n!=="{"&&n!=="[")return false;try{let o=JSON.parse(r);return o!==null&&typeof o=="object"}catch(o){return false}}static parse(t,r){if(typeof t=="string")try{t=JSON.parse(t,r);}catch(n){return t}if(t&&typeof t=="object")for(let n in t){let o=t[n];e.isJSON(o)&&(t[n]=e.parse(o,r));}return t}};var s=class s{static get storage(){var r;let t=Reflect.getMetadata(s.sessionStorageMetaData,s);if(l(t)&&(this._storage=t),this._storage)return this._storage;if(m.isClientSide()&&typeof window!="undefined"&&window.localStorage&&((r=window.localStorage)!=null&&r.getItem))this._storage={get:n=>window.localStorage.getItem(n),set:(n,o)=>window.localStorage.setItem(n,o),remove:n=>window.localStorage.removeItem(n),removeAll:()=>window.localStorage.clear()};else {let n={};this._storage={get:o=>n[o],set:(o,g)=>n[o]=g,remove:o=>delete n[o],removeAll:()=>n={}};}return this._storage}static set storage(t){l(t)&&Reflect.defineMetadata(s.sessionStorageMetaData,t,s);}static get keyNamespace(){return f(this._keyNamespace)?this._keyNamespace:""}static set keyNamespace(t){f(t)&&(this._keyNamespace=t.trim().replace(/\s+/g,"-"));}static sanitizeKey(t){if(!t||!f(t))return "";t=t.trim().replace(/\s+/g,"-");let r=this.keyNamespace;return r?`${r}-${t}`:t}};s.sessionStorageMetaData=Symbol("sessionStorage"),s._keyNamespace=void 0;var i=s;function u(e){return i.sanitizeKey(e)}var w=(e,t)=>(e=e&&a.stringify(e,t),e==null&&(e=""),e),b=e=>{if(y(e))return new Promise((t,r)=>{e.then(n=>{t(a.parse(n));}).catch(n=>{r(n);});});if(e!=null)return a.parse(e)},O=e=>{if(e=u(e),i.storage&&e&&typeof e=="string"){let t=i.storage.get(e);return b(t)}},T=e=>{if(e=u(e),i.storage&&e&&typeof e=="string")return i.storage.remove(e)},W=()=>{if(i.storage)return i.storage.removeAll()},l=e=>{if(!e)return false;try{return ["get","set","remove","removeAll"].every(t=>typeof e[t]=="function")}catch(t){return false}},$={get:O,set:(e,t,r=true)=>(e=u(e),i.storage.set(e,w(t,r))),remove:T,handleGetValue:b,sanitizeKey:u,handleSetValue:w,isValidStorage:l,Manager:i,removeAll:W};function B(){return function(e){try{let t=new e;if(!l(t))return;i.storage=t;}catch(t){console.error(t," registering session storage");}}}exports.AttachSessionStorage=B;exports.Session=$;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var i={invalidSignInUser:"Invalid user provided to sign in"};exports.auth=i;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Country, CountryCode } from '../countries/index';
|
|
2
|
+
/***
|
|
3
|
+
* The list of available countries in the application.
|
|
4
|
+
* This object contains the country codes and their corresponding country objects.
|
|
5
|
+
*/
|
|
6
|
+
export declare const countries: Record<CountryCode, Country>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var e={US:{code:"US",dialCode:"+1",phoneNumberExample:"(123) 456-7890",name:"United States"},CA:{code:"CA",dialCode:"+1",phoneNumberExample:"(123) 456-7890",name:"Canada"}};exports.countries=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var a={thousandSeparator:",",decimalSeparator:".",decimalDigits:2};exports.currencies=a;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/***
|
|
2
|
+
* @param {string} resourceLabel - The label of the resource.
|
|
3
|
+
* @param {string} resourceName - The name of the resource.
|
|
4
|
+
* @returns {string} - The translated string.
|
|
5
|
+
*/
|
|
6
|
+
export declare const dates: {
|
|
7
|
+
defaultDateFormat: string;
|
|
8
|
+
defaultTimeFormat: string;
|
|
9
|
+
defaultDateTimeFormat: string;
|
|
10
|
+
invalidDate: string;
|
|
11
|
+
invalidTime: string;
|
|
12
|
+
invalidDateTime: string;
|
|
13
|
+
today: string;
|
|
14
|
+
yesterday: string;
|
|
15
|
+
tomorrow: string;
|
|
16
|
+
selectedDate: string;
|
|
17
|
+
selectedTime: string;
|
|
18
|
+
selectedDateTime: string;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var e={defaultDateFormat:"YYYY-MM-DD",defaultTimeFormat:"HH:mm",defaultDateTimeFormat:"YYYY-MM-DD HH:mm",invalidDate:"Invalid date",invalidTime:"Invalid time",invalidDateTime:"Invalid date and time",today:"Today",yesterday:"Yesterday",tomorrow:"Tomorrow",selectedDate:"Selected date",selectedTime:"Selected time",selectedDateTime:"Selected date and time"};exports.dates=e;
|