@orderingstack/front-hooks 3.12.0 → 3.13.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.
Files changed (65) hide show
  1. package/dist/index-09c930a6.mjs +9585 -0
  2. package/dist/index-09c930a6.mjs.map +1 -0
  3. package/dist/index-61278580.js +43 -0
  4. package/dist/index-61278580.js.map +1 -0
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.es.js +46 -1
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/types/auth/AuthContext.d.ts +39 -0
  9. package/dist/types/auth/AuthContext.d.ts.map +1 -0
  10. package/dist/types/auth/AuthProvider.d.ts +78 -0
  11. package/dist/types/auth/AuthProvider.d.ts.map +1 -0
  12. package/dist/types/auth/ConfigContext.d.ts +13 -0
  13. package/dist/types/auth/ConfigContext.d.ts.map +1 -0
  14. package/dist/types/auth/index.d.ts +4 -0
  15. package/dist/types/auth/index.d.ts.map +1 -0
  16. package/dist/{src → types}/index.d.ts +2 -1
  17. package/dist/{src → types}/index.d.ts.map +1 -1
  18. package/dist/{src/storage.d.ts → types/secureStorage.d.ts} +2 -3
  19. package/dist/types/secureStorage.d.ts.map +1 -0
  20. package/dist/web-5132f230.js +6 -0
  21. package/dist/web-5132f230.js.map +1 -0
  22. package/dist/web-6d1846e3.js +2 -0
  23. package/dist/web-6d1846e3.js.map +1 -0
  24. package/dist/web-71df6a96.mjs +91 -0
  25. package/dist/web-71df6a96.mjs.map +1 -0
  26. package/dist/web-7aa1c1aa.js +2 -0
  27. package/dist/web-7aa1c1aa.js.map +1 -0
  28. package/dist/web-9e04d552.js +2 -0
  29. package/dist/web-9e04d552.js.map +1 -0
  30. package/dist/web-baa6c9c4.mjs +135 -0
  31. package/dist/web-baa6c9c4.mjs.map +1 -0
  32. package/dist/web-d7c04fc0.mjs +38 -0
  33. package/dist/web-d7c04fc0.mjs.map +1 -0
  34. package/dist/web-ee21016a.mjs +105 -0
  35. package/dist/web-ee21016a.mjs.map +1 -0
  36. package/package.json +12 -6
  37. package/dist/index.js +0 -16
  38. package/dist/index.js.map +0 -1
  39. package/dist/src/storage.d.ts.map +0 -1
  40. package/dist/web.js +0 -2
  41. package/dist/web.js.map +0 -1
  42. /package/dist/{src → types}/pkce.d.ts +0 -0
  43. /package/dist/{src → types}/pkce.d.ts.map +0 -0
  44. /package/dist/{src → types}/useAvailability.d.ts +0 -0
  45. /package/dist/{src → types}/useAvailability.d.ts.map +0 -0
  46. /package/dist/{src → types}/useChannelAvailability.d.ts +0 -0
  47. /package/dist/{src → types}/useChannelAvailability.d.ts.map +0 -0
  48. /package/dist/{src → types}/useCms.d.ts +0 -0
  49. /package/dist/{src → types}/useCms.d.ts.map +0 -0
  50. /package/dist/{src → types}/useDisplayPrice.d.ts +0 -0
  51. /package/dist/{src → types}/useDisplayPrice.d.ts.map +0 -0
  52. /package/dist/{src → types}/useGroupOrderLines.d.ts +0 -0
  53. /package/dist/{src → types}/useGroupOrderLines.d.ts.map +0 -0
  54. /package/dist/{src → types}/useInterval.d.ts +0 -0
  55. /package/dist/{src → types}/useInterval.d.ts.map +0 -0
  56. /package/dist/{src → types}/useMediaUrl.d.ts +0 -0
  57. /package/dist/{src → types}/useMediaUrl.d.ts.map +0 -0
  58. /package/dist/{src → types}/useOnClickOutside.d.ts +0 -0
  59. /package/dist/{src → types}/useOnClickOutside.d.ts.map +0 -0
  60. /package/dist/{src → types}/utils/cms.d.ts +0 -0
  61. /package/dist/{src → types}/utils/cms.d.ts.map +0 -0
  62. /package/dist/{src → types}/utils/timeAvailabilityFilter.d.ts +0 -0
  63. /package/dist/{src → types}/utils/timeAvailabilityFilter.d.ts.map +0 -0
  64. /package/dist/{src → types}/utils.d.ts +0 -0
  65. /package/dist/{src → types}/utils.d.ts.map +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAI3E,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,GAAG,EAAE,CACH,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,GAAG;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IAC/C,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CACpE;AAqBD,eAAO,MAAM,OAAO,EAAE,QAUrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAO1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,2BAKjC,CAAC"}
package/dist/web.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t=require("./index.js");require("react");require("@orderingstack/ordering-core-react");require("react-i18next");class i extends t.WebPlugin{constructor(){super(...arguments),this.PREFIX="cap_sec_",this.addPrefix=e=>this.PREFIX+e,this.removePrefix=e=>e.replace(this.PREFIX,"")}get(e){const r=localStorage.getItem(this.addPrefix(e.key));return r!==null?Promise.resolve({value:atob(r)}):Promise.reject("Item with given key does not exist")}set(e){return localStorage.setItem(this.addPrefix(e.key),btoa(e.value)),Promise.resolve({value:!0})}remove(e){return localStorage.getItem(this.addPrefix(e.key))?(localStorage.removeItem(this.addPrefix(e.key)),Promise.resolve({value:!0})):Promise.reject("Item with given key does not exist")}clear(){for(const e in localStorage)e.indexOf(this.PREFIX)===0&&localStorage.removeItem(e);return Promise.resolve({value:!0})}keys(){const e=Object.keys(localStorage).filter(r=>r.indexOf(this.PREFIX)===0).map(this.removePrefix);return Promise.resolve({value:e})}getPlatform(){return Promise.resolve({value:"web"})}}exports.SecureStoragePluginWeb=i;
2
- //# sourceMappingURL=web.js.map
package/dist/web.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"web.js","sources":["../node_modules/capacitor-secure-storage-plugin/dist/esm/web.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class SecureStoragePluginWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.PREFIX = 'cap_sec_';\n this.addPrefix = (key) => this.PREFIX + key;\n this.removePrefix = (key) => key.replace(this.PREFIX, '');\n }\n get(options) {\n const value = localStorage.getItem(this.addPrefix(options.key));\n return value !== null\n ? Promise.resolve({\n value: atob(value),\n })\n : Promise.reject('Item with given key does not exist');\n }\n set(options) {\n localStorage.setItem(this.addPrefix(options.key), btoa(options.value));\n return Promise.resolve({ value: true });\n }\n remove(options) {\n if (localStorage.getItem(this.addPrefix(options.key))) {\n localStorage.removeItem(this.addPrefix(options.key));\n return Promise.resolve({ value: true });\n }\n else {\n return Promise.reject('Item with given key does not exist');\n }\n }\n clear() {\n for (const key in localStorage) {\n if (key.indexOf(this.PREFIX) === 0) {\n localStorage.removeItem(key);\n }\n }\n return Promise.resolve({ value: true });\n }\n keys() {\n const keys = Object.keys(localStorage)\n .filter(k => k.indexOf(this.PREFIX) === 0)\n .map(this.removePrefix);\n return Promise.resolve({ value: keys });\n }\n getPlatform() {\n return Promise.resolve({ value: 'web' });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["WebPlugin"],"mappings":"oMACO,MAAM,SAA+BA,GAAAA,SAAU,CAClD,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,OAAS,WACd,KAAK,UAAY,AAAC,GAAQ,KAAK,OAAS,EACxC,KAAK,aAAe,AAAC,GAAQ,EAAI,QAAQ,KAAK,OAAQ,EAAE,CAC3D,CACD,IAAI,EAAS,CACT,KAAM,GAAQ,aAAa,QAAQ,KAAK,UAAU,EAAQ,GAAG,CAAC,EAC9D,MAAO,KAAU,KACX,QAAQ,QAAQ,CACd,MAAO,KAAK,CAAK,CACjC,CAAa,EACC,QAAQ,OAAO,oCAAoC,CAC5D,CACD,IAAI,EAAS,CACT,oBAAa,QAAQ,KAAK,UAAU,EAAQ,GAAG,EAAG,KAAK,EAAQ,KAAK,CAAC,EAC9D,QAAQ,QAAQ,CAAE,MAAO,EAAM,CAAA,CACzC,CACD,OAAO,EAAS,CACZ,MAAI,cAAa,QAAQ,KAAK,UAAU,EAAQ,GAAG,CAAC,EAChD,cAAa,WAAW,KAAK,UAAU,EAAQ,GAAG,CAAC,EAC5C,QAAQ,QAAQ,CAAE,MAAO,EAAM,CAAA,GAG/B,QAAQ,OAAO,oCAAoC,CAEjE,CACD,OAAQ,CACJ,SAAW,KAAO,cACd,AAAI,EAAI,QAAQ,KAAK,MAAM,IAAM,GAC7B,aAAa,WAAW,CAAG,EAGnC,MAAO,SAAQ,QAAQ,CAAE,MAAO,EAAM,CAAA,CACzC,CACD,MAAO,CACH,KAAM,GAAO,OAAO,KAAK,YAAY,EAChC,OAAO,GAAK,EAAE,QAAQ,KAAK,MAAM,IAAM,CAAC,EACxC,IAAI,KAAK,YAAY,EAC1B,MAAO,SAAQ,QAAQ,CAAE,MAAO,CAAM,CAAA,CACzC,CACD,aAAc,CACV,MAAO,SAAQ,QAAQ,CAAE,MAAO,KAAO,CAAA,CAC1C,CACL"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes