@kwiz/common 1.0.73 → 1.0.74
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/lib/cjs/_dependencies.js.map +1 -0
- package/lib/cjs/config.js.map +1 -0
- package/lib/cjs/exports-index.js.map +1 -0
- package/lib/cjs/helpers/Guid.js.map +1 -0
- package/lib/cjs/helpers/_dependencies.js.map +1 -0
- package/lib/cjs/helpers/base64.js.map +1 -0
- package/lib/cjs/helpers/browser.js.map +1 -0
- package/lib/cjs/helpers/browserinfo.js.map +1 -0
- package/{dist → lib/cjs}/helpers/collections.base.js +0 -3
- package/lib/cjs/helpers/collections.base.js.map +1 -0
- package/lib/cjs/helpers/collections.js.map +1 -0
- package/lib/cjs/helpers/color.js.map +1 -0
- package/lib/cjs/helpers/cookies.js.map +1 -0
- package/lib/cjs/helpers/date.js.map +1 -0
- package/{dist → lib/cjs}/helpers/debug.js +1 -1
- package/lib/cjs/helpers/debug.js.map +1 -0
- package/lib/cjs/helpers/emails.js.map +1 -0
- package/lib/cjs/helpers/eval.js.map +1 -0
- package/lib/cjs/helpers/exports-index.js.map +1 -0
- package/lib/cjs/helpers/file.js.map +1 -0
- package/lib/cjs/helpers/flatted.js.map +1 -0
- package/lib/cjs/helpers/functions.js.map +1 -0
- package/lib/cjs/helpers/graph/calendar.types.js.map +1 -0
- package/lib/cjs/helpers/graph/exports-index.js.map +1 -0
- package/lib/cjs/helpers/http.js.map +1 -0
- package/lib/cjs/helpers/images.js.map +1 -0
- package/lib/cjs/helpers/json.js.map +1 -0
- package/lib/cjs/helpers/md5.js.map +1 -0
- package/lib/cjs/helpers/objects.js.map +1 -0
- package/{dist → lib/cjs}/helpers/promises.js +8 -3
- package/lib/cjs/helpers/promises.js.map +1 -0
- package/lib/cjs/helpers/random.js.map +1 -0
- package/lib/cjs/helpers/scheduler/exports-index.js.map +1 -0
- package/lib/cjs/helpers/scheduler/scheduler.js.map +1 -0
- package/{dist → lib/cjs}/helpers/sharepoint.js +17 -17
- package/lib/cjs/helpers/sharepoint.js.map +1 -0
- package/lib/cjs/helpers/strings.js.map +1 -0
- package/lib/cjs/helpers/typecheckers.js.map +1 -0
- package/lib/cjs/helpers/url.js.map +1 -0
- package/lib/cjs/helpers/urlhelper.js.map +1 -0
- package/{dist → lib/cjs}/index.js +5 -2
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/types/auth.js.map +1 -0
- package/lib/cjs/types/common.types.js.map +1 -0
- package/lib/cjs/types/exports-index.js.map +1 -0
- package/lib/cjs/types/flatted.types.js.map +1 -0
- package/lib/cjs/types/globals.types.js.map +1 -0
- package/lib/cjs/types/graph/calendar.types.js.map +1 -0
- package/lib/cjs/types/graph/exports-index.js.map +1 -0
- package/lib/cjs/types/knownscript.types.js.map +1 -0
- package/lib/cjs/types/libs/datajs.types.js.map +1 -0
- package/lib/cjs/types/libs/exports-index.js.map +1 -0
- package/lib/cjs/types/libs/ics.types.js.map +1 -0
- package/lib/cjs/types/libs/msal.types.js.map +1 -0
- package/{dist → lib/cjs}/types/locales.js.map +1 -1
- package/lib/cjs/types/localstoragecache.types.js.map +1 -0
- package/lib/cjs/types/location.types.js.map +1 -0
- package/{dist → lib/cjs}/types/moment.js.map +1 -1
- package/{dist → lib/cjs}/types/regex.types.js.map +1 -1
- package/lib/cjs/types/rest.types.js.map +1 -0
- package/lib/cjs/types/sharepoint.types.js.map +1 -0
- package/lib/cjs/types/sharepoint.utils.types.js.map +1 -0
- package/lib/cjs/utils/_dependencies.js.map +1 -0
- package/lib/cjs/utils/auth/common.js.map +1 -0
- package/{dist → lib/cjs}/utils/auth/discovery.js +16 -14
- package/lib/cjs/utils/auth/discovery.js.map +1 -0
- package/lib/cjs/utils/auth/exports-index.js.map +1 -0
- package/{dist → lib/cjs}/utils/base64.js +4 -3
- package/lib/cjs/utils/base64.js.map +1 -0
- package/{dist → lib/cjs}/utils/consolelogger.js +31 -26
- package/lib/cjs/utils/consolelogger.js.map +1 -0
- package/{dist → lib/cjs}/utils/date.js +3 -3
- package/lib/cjs/utils/date.js.map +1 -0
- package/{dist → lib/cjs}/utils/emails.js +2 -2
- package/lib/cjs/utils/emails.js.map +1 -0
- package/lib/cjs/utils/exports-index.js.map +1 -0
- package/{dist → lib/cjs}/utils/knownscript.js +9 -5
- package/lib/cjs/utils/knownscript.js.map +1 -0
- package/{dist → lib/cjs}/utils/localstoragecache.js +40 -27
- package/lib/cjs/utils/localstoragecache.js.map +1 -0
- package/{dist → lib/cjs}/utils/rest.js +63 -48
- package/lib/cjs/utils/rest.js.map +1 -0
- package/{dist → lib/cjs}/utils/script.js +15 -10
- package/lib/cjs/utils/script.js.map +1 -0
- package/lib/cjs/utils/sharepoint.rest/common.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/date.js +10 -9
- package/lib/cjs/utils/sharepoint.rest/date.js.map +1 -0
- package/lib/cjs/utils/sharepoint.rest/exports-index.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/file.folder.js +49 -46
- package/lib/cjs/utils/sharepoint.rest/file.folder.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/item.js +51 -45
- package/lib/cjs/utils/sharepoint.rest/item.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/list.js +131 -124
- package/lib/cjs/utils/sharepoint.rest/list.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/listutils/GetListItemsByCaml.js +55 -50
- package/lib/cjs/utils/sharepoint.rest/listutils/GetListItemsByCaml.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/listutils/GetListItemsById.js +31 -23
- package/lib/cjs/utils/sharepoint.rest/listutils/GetListItemsById.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/listutils/common.js +20 -16
- package/lib/cjs/utils/sharepoint.rest/listutils/common.js.map +1 -0
- package/lib/cjs/utils/sharepoint.rest/listutils/exports-index.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/location.js +3 -3
- package/lib/cjs/utils/sharepoint.rest/location.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/navigation-links.js +3 -3
- package/lib/cjs/utils/sharepoint.rest/navigation-links.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/user-search.js +7 -5
- package/lib/cjs/utils/sharepoint.rest/user-search.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/user.js +52 -47
- package/lib/cjs/utils/sharepoint.rest/user.js.map +1 -0
- package/{dist → lib/cjs}/utils/sharepoint.rest/web.js +167 -158
- package/lib/cjs/utils/sharepoint.rest/web.js.map +1 -0
- package/{dist → lib/cjs}/utils/sod.js +12 -11
- package/lib/cjs/utils/sod.js.map +1 -0
- package/lib/esm/_dependencies.js +12 -0
- package/lib/esm/_dependencies.js.map +1 -0
- package/lib/esm/config.js +12 -0
- package/lib/esm/config.js.map +1 -0
- package/lib/esm/exports-index.js +5 -0
- package/lib/esm/exports-index.js.map +1 -0
- package/lib/esm/helpers/Guid.js +179 -0
- package/lib/esm/helpers/Guid.js.map +1 -0
- package/{src/helpers/_dependencies.ts → lib/esm/helpers/_dependencies.js} +3 -3
- package/lib/esm/helpers/_dependencies.js.map +1 -0
- package/lib/esm/helpers/base64.js +157 -0
- package/lib/esm/helpers/base64.js.map +1 -0
- package/lib/esm/helpers/browser.js +1158 -0
- package/lib/esm/helpers/browser.js.map +1 -0
- package/lib/esm/helpers/browserinfo.js +206 -0
- package/lib/esm/helpers/browserinfo.js.map +1 -0
- package/lib/esm/helpers/collections.base.js +372 -0
- package/lib/esm/helpers/collections.base.js.map +1 -0
- package/lib/esm/helpers/collections.js +96 -0
- package/lib/esm/helpers/collections.js.map +1 -0
- package/lib/esm/helpers/color.js +51 -0
- package/lib/esm/helpers/color.js.map +1 -0
- package/lib/esm/helpers/cookies.js +53 -0
- package/lib/esm/helpers/cookies.js.map +1 -0
- package/lib/esm/helpers/date.js +163 -0
- package/lib/esm/helpers/date.js.map +1 -0
- package/lib/esm/helpers/debug.js +156 -0
- package/lib/esm/helpers/debug.js.map +1 -0
- package/lib/esm/helpers/emails.js +6 -0
- package/lib/esm/helpers/emails.js.map +1 -0
- package/lib/esm/helpers/eval.js +6 -0
- package/lib/esm/helpers/eval.js.map +1 -0
- package/lib/esm/helpers/exports-index.js +30 -0
- package/lib/esm/helpers/exports-index.js.map +1 -0
- package/lib/esm/helpers/file.js +49 -0
- package/lib/esm/helpers/file.js.map +1 -0
- package/lib/esm/helpers/flatted.js +131 -0
- package/lib/esm/helpers/flatted.js.map +1 -0
- package/lib/esm/helpers/functions.js +13 -0
- package/lib/esm/helpers/functions.js.map +1 -0
- package/lib/esm/helpers/graph/calendar.types.js +10 -0
- package/lib/esm/helpers/graph/calendar.types.js.map +1 -0
- package/lib/esm/helpers/graph/exports-index.js +2 -0
- package/lib/esm/helpers/graph/exports-index.js.map +1 -0
- package/lib/esm/helpers/http.js +65 -0
- package/lib/esm/helpers/http.js.map +1 -0
- package/lib/esm/helpers/images.js +18 -0
- package/lib/esm/helpers/images.js.map +1 -0
- package/lib/esm/helpers/json.js +39 -0
- package/lib/esm/helpers/json.js.map +1 -0
- package/lib/esm/helpers/md5.js +168 -0
- package/lib/esm/helpers/md5.js.map +1 -0
- package/lib/esm/helpers/objects.js +258 -0
- package/lib/esm/helpers/objects.js.map +1 -0
- package/lib/esm/helpers/promises.js +152 -0
- package/lib/esm/helpers/promises.js.map +1 -0
- package/lib/esm/helpers/random.js +27 -0
- package/lib/esm/helpers/random.js.map +1 -0
- package/lib/esm/helpers/scheduler/exports-index.js +2 -0
- package/lib/esm/helpers/scheduler/exports-index.js.map +1 -0
- package/lib/esm/helpers/scheduler/scheduler.js +103 -0
- package/lib/esm/helpers/scheduler/scheduler.js.map +1 -0
- package/lib/esm/helpers/sharepoint.js +669 -0
- package/lib/esm/helpers/sharepoint.js.map +1 -0
- package/lib/esm/helpers/strings.js +273 -0
- package/lib/esm/helpers/strings.js.map +1 -0
- package/lib/esm/helpers/typecheckers.js +238 -0
- package/lib/esm/helpers/typecheckers.js.map +1 -0
- package/lib/esm/helpers/url.js +190 -0
- package/lib/esm/helpers/url.js.map +1 -0
- package/lib/esm/helpers/urlhelper.js +100 -0
- package/lib/esm/helpers/urlhelper.js.map +1 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/types/auth.js +38 -0
- package/lib/esm/types/auth.js.map +1 -0
- package/lib/esm/types/common.types.js +3 -0
- package/lib/esm/types/common.types.js.map +1 -0
- package/lib/esm/types/exports-index.js +16 -0
- package/lib/esm/types/exports-index.js.map +1 -0
- package/lib/esm/types/flatted.types.js +2 -0
- package/lib/esm/types/flatted.types.js.map +1 -0
- package/lib/esm/types/globals.types.js +2 -0
- package/lib/esm/types/globals.types.js.map +1 -0
- package/lib/esm/types/graph/calendar.types.js +2 -0
- package/lib/esm/types/graph/calendar.types.js.map +1 -0
- package/lib/esm/types/graph/exports-index.js +2 -0
- package/lib/esm/types/graph/exports-index.js.map +1 -0
- package/lib/esm/types/knownscript.types.js +2 -0
- package/lib/esm/types/knownscript.types.js.map +1 -0
- package/lib/esm/types/libs/datajs.types.js +2 -0
- package/lib/esm/types/libs/datajs.types.js.map +1 -0
- package/lib/esm/types/libs/exports-index.js +4 -0
- package/lib/esm/types/libs/exports-index.js.map +1 -0
- package/lib/esm/types/libs/ics.types.js +2 -0
- package/lib/esm/types/libs/ics.types.js.map +1 -0
- package/lib/esm/types/libs/msal.types.js +28 -0
- package/lib/esm/types/libs/msal.types.js.map +1 -0
- package/lib/esm/types/locales.js +2 -0
- package/lib/esm/types/locales.js.map +1 -0
- package/lib/esm/types/localstoragecache.types.js +2 -0
- package/lib/esm/types/localstoragecache.types.js.map +1 -0
- package/lib/esm/types/location.types.js +2 -0
- package/lib/esm/types/location.types.js.map +1 -0
- package/lib/esm/types/moment.js +2 -0
- package/lib/esm/types/moment.js.map +1 -0
- package/lib/esm/types/regex.types.js +2 -0
- package/lib/esm/types/regex.types.js.map +1 -0
- package/lib/esm/types/rest.types.js +21 -0
- package/lib/esm/types/rest.types.js.map +1 -0
- package/lib/esm/types/sharepoint.types.js +660 -0
- package/lib/esm/types/sharepoint.types.js.map +1 -0
- package/lib/esm/types/sharepoint.utils.types.js +51 -0
- package/lib/esm/types/sharepoint.utils.types.js.map +1 -0
- package/{src/utils/_dependencies.ts → lib/esm/utils/_dependencies.js} +4 -4
- package/lib/esm/utils/_dependencies.js.map +1 -0
- package/lib/esm/utils/auth/common.js +61 -0
- package/lib/esm/utils/auth/common.js.map +1 -0
- package/lib/esm/utils/auth/discovery.js +104 -0
- package/lib/esm/utils/auth/discovery.js.map +1 -0
- package/lib/esm/utils/auth/exports-index.js +3 -0
- package/lib/esm/utils/auth/exports-index.js.map +1 -0
- package/lib/esm/utils/base64.js +27 -0
- package/lib/esm/utils/base64.js.map +1 -0
- package/lib/esm/utils/consolelogger.js +271 -0
- package/lib/esm/utils/consolelogger.js.map +1 -0
- package/lib/esm/utils/date.js +26 -0
- package/lib/esm/utils/date.js.map +1 -0
- package/lib/esm/utils/emails.js +23 -0
- package/lib/esm/utils/emails.js.map +1 -0
- package/lib/esm/utils/exports-index.js +12 -0
- package/lib/esm/utils/exports-index.js.map +1 -0
- package/lib/esm/utils/knownscript.js +247 -0
- package/lib/esm/utils/knownscript.js.map +1 -0
- package/lib/esm/utils/localstoragecache.js +378 -0
- package/lib/esm/utils/localstoragecache.js.map +1 -0
- package/lib/esm/utils/rest.js +432 -0
- package/lib/esm/utils/rest.js.map +1 -0
- package/lib/esm/utils/script.js +154 -0
- package/lib/esm/utils/script.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/common.js +134 -0
- package/lib/esm/utils/sharepoint.rest/common.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/date.js +54 -0
- package/lib/esm/utils/sharepoint.rest/date.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/exports-index.js +12 -0
- package/lib/esm/utils/sharepoint.rest/exports-index.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/file.folder.js +444 -0
- package/lib/esm/utils/sharepoint.rest/file.folder.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/item.js +453 -0
- package/lib/esm/utils/sharepoint.rest/item.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/list.js +924 -0
- package/lib/esm/utils/sharepoint.rest/list.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/listutils/GetListItemsByCaml.js +624 -0
- package/lib/esm/utils/sharepoint.rest/listutils/GetListItemsByCaml.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/listutils/GetListItemsById.js +214 -0
- package/lib/esm/utils/sharepoint.rest/listutils/GetListItemsById.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/listutils/common.js +198 -0
- package/lib/esm/utils/sharepoint.rest/listutils/common.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/listutils/exports-index.js +4 -0
- package/lib/esm/utils/sharepoint.rest/listutils/exports-index.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/location.js +103 -0
- package/lib/esm/utils/sharepoint.rest/location.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/navigation-links.js +80 -0
- package/lib/esm/utils/sharepoint.rest/navigation-links.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/user-search.js +218 -0
- package/lib/esm/utils/sharepoint.rest/user-search.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/user.js +414 -0
- package/lib/esm/utils/sharepoint.rest/user.js.map +1 -0
- package/lib/esm/utils/sharepoint.rest/web.js +1158 -0
- package/lib/esm/utils/sharepoint.rest/web.js.map +1 -0
- package/lib/esm/utils/sod.js +164 -0
- package/lib/esm/utils/sod.js.map +1 -0
- package/{dist → lib/types}/helpers/collections.base.d.ts +1 -1
- package/{dist → lib/types}/helpers/collections.d.ts +1 -1
- package/{dist → lib/types}/helpers/flatted.d.ts +1 -1
- package/{dist → lib/types}/helpers/graph/calendar.types.d.ts +1 -1
- package/{dist → lib/types}/helpers/sharepoint.d.ts +3 -1
- package/{dist → lib/types}/helpers/strings.d.ts +1 -1
- package/{dist → lib/types}/helpers/url.d.ts +1 -1
- package/{dist → lib/types}/utils/auth/discovery.d.ts +1 -1
- package/{dist → lib/types}/utils/knownscript.d.ts +5 -1
- package/{dist → lib/types}/utils/localstoragecache.d.ts +1 -1
- package/{dist → lib/types}/utils/rest.d.ts +1 -1
- package/{dist → lib/types}/utils/script.d.ts +1 -1
- package/{dist → lib/types}/utils/sharepoint.rest/date.d.ts +1 -1
- package/{dist → lib/types}/utils/sharepoint.rest/file.folder.d.ts +4 -1
- package/{dist → lib/types}/utils/sharepoint.rest/item.d.ts +3 -1
- package/{dist → lib/types}/utils/sharepoint.rest/list.d.ts +4 -1
- package/{dist → lib/types}/utils/sharepoint.rest/listutils/GetListItemsByCaml.d.ts +1 -1
- package/{dist → lib/types}/utils/sharepoint.rest/listutils/GetListItemsById.d.ts +2 -1
- package/{dist → lib/types}/utils/sharepoint.rest/listutils/common.d.ts +2 -1
- package/{dist → lib/types}/utils/sharepoint.rest/navigation-links.d.ts +1 -1
- package/{dist → lib/types}/utils/sharepoint.rest/user-search.d.ts +1 -1
- package/{dist → lib/types}/utils/sharepoint.rest/user.d.ts +3 -1
- package/{dist → lib/types}/utils/sharepoint.rest/web.d.ts +3 -1
- package/{dist → lib/types}/utils/sod.d.ts +1 -1
- package/package.json +15 -7
- package/src/helpers/browser.ts +1 -1
- package/src/helpers/collections.base.ts +1 -2
- package/src/helpers/collections.ts +1 -1
- package/src/helpers/debug.ts +1 -1
- package/src/helpers/flatted.ts +1 -1
- package/src/helpers/graph/calendar.types.ts +1 -1
- package/src/helpers/promises.ts +10 -5
- package/src/helpers/sharepoint.ts +3 -1
- package/src/helpers/strings.ts +1 -1
- package/src/helpers/url.ts +1 -1
- package/src/utils/auth/discovery.ts +3 -1
- package/src/utils/base64.ts +2 -1
- package/src/utils/consolelogger.ts +7 -1
- package/src/utils/date.ts +1 -1
- package/src/utils/emails.ts +1 -1
- package/src/utils/knownscript.ts +7 -1
- package/src/utils/localstoragecache.ts +39 -20
- package/src/utils/rest.ts +23 -4
- package/src/utils/script.ts +4 -1
- package/src/utils/sharepoint.rest/date.ts +3 -1
- package/src/utils/sharepoint.rest/file.folder.ts +7 -1
- package/src/utils/sharepoint.rest/item.ts +9 -1
- package/src/utils/sharepoint.rest/list.ts +10 -1
- package/src/utils/sharepoint.rest/listutils/GetListItemsByCaml.ts +9 -1
- package/src/utils/sharepoint.rest/listutils/GetListItemsById.ts +14 -4
- package/src/utils/sharepoint.rest/listutils/common.ts +6 -1
- package/src/utils/sharepoint.rest/location.ts +1 -1
- package/src/utils/sharepoint.rest/navigation-links.ts +2 -1
- package/src/utils/sharepoint.rest/user-search.ts +4 -1
- package/src/utils/sharepoint.rest/user.ts +7 -1
- package/src/utils/sharepoint.rest/web.ts +12 -2
- package/src/utils/sod.ts +3 -1
- package/dist/_dependencies.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/exports-index.js.map +0 -1
- package/dist/helpers/Guid.js.map +0 -1
- package/dist/helpers/_dependencies.js.map +0 -1
- package/dist/helpers/base64.js.map +0 -1
- package/dist/helpers/browser.js.map +0 -1
- package/dist/helpers/browserinfo.js.map +0 -1
- package/dist/helpers/collections.base.js.map +0 -1
- package/dist/helpers/collections.js.map +0 -1
- package/dist/helpers/color.js.map +0 -1
- package/dist/helpers/cookies.js.map +0 -1
- package/dist/helpers/date.js.map +0 -1
- package/dist/helpers/debug.js.map +0 -1
- package/dist/helpers/emails.js.map +0 -1
- package/dist/helpers/eval.js.map +0 -1
- package/dist/helpers/exports-index.js.map +0 -1
- package/dist/helpers/file.js.map +0 -1
- package/dist/helpers/flatted.js.map +0 -1
- package/dist/helpers/functions.js.map +0 -1
- package/dist/helpers/graph/calendar.types.js.map +0 -1
- package/dist/helpers/graph/exports-index.js.map +0 -1
- package/dist/helpers/http.js.map +0 -1
- package/dist/helpers/images.js.map +0 -1
- package/dist/helpers/json.js.map +0 -1
- package/dist/helpers/md5.js.map +0 -1
- package/dist/helpers/objects.js.map +0 -1
- package/dist/helpers/promises.js.map +0 -1
- package/dist/helpers/random.js.map +0 -1
- package/dist/helpers/scheduler/exports-index.js.map +0 -1
- package/dist/helpers/scheduler/scheduler.js.map +0 -1
- package/dist/helpers/sharepoint.js.map +0 -1
- package/dist/helpers/strings.js.map +0 -1
- package/dist/helpers/typecheckers.js.map +0 -1
- package/dist/helpers/url.js.map +0 -1
- package/dist/helpers/urlhelper.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/auth.js.map +0 -1
- package/dist/types/common.types.js.map +0 -1
- package/dist/types/exports-index.js.map +0 -1
- package/dist/types/flatted.types.js.map +0 -1
- package/dist/types/globals.types.js.map +0 -1
- package/dist/types/graph/calendar.types.js.map +0 -1
- package/dist/types/graph/exports-index.js.map +0 -1
- package/dist/types/knownscript.types.js.map +0 -1
- package/dist/types/libs/datajs.types.js.map +0 -1
- package/dist/types/libs/exports-index.js.map +0 -1
- package/dist/types/libs/ics.types.js.map +0 -1
- package/dist/types/libs/msal.types.js.map +0 -1
- package/dist/types/localstoragecache.types.js.map +0 -1
- package/dist/types/location.types.js.map +0 -1
- package/dist/types/rest.types.js.map +0 -1
- package/dist/types/sharepoint.types.js.map +0 -1
- package/dist/types/sharepoint.utils.types.js.map +0 -1
- package/dist/utils/_dependencies.js.map +0 -1
- package/dist/utils/auth/common.js.map +0 -1
- package/dist/utils/auth/discovery.js.map +0 -1
- package/dist/utils/auth/exports-index.js.map +0 -1
- package/dist/utils/base64.js.map +0 -1
- package/dist/utils/consolelogger.js.map +0 -1
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/emails.js.map +0 -1
- package/dist/utils/exports-index.js.map +0 -1
- package/dist/utils/knownscript.js.map +0 -1
- package/dist/utils/localstoragecache.js.map +0 -1
- package/dist/utils/rest.js.map +0 -1
- package/dist/utils/script.js.map +0 -1
- package/dist/utils/sharepoint.rest/common.js.map +0 -1
- package/dist/utils/sharepoint.rest/date.js.map +0 -1
- package/dist/utils/sharepoint.rest/exports-index.js.map +0 -1
- package/dist/utils/sharepoint.rest/file.folder.js.map +0 -1
- package/dist/utils/sharepoint.rest/item.js.map +0 -1
- package/dist/utils/sharepoint.rest/list.js.map +0 -1
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.js.map +0 -1
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.js.map +0 -1
- package/dist/utils/sharepoint.rest/listutils/common.js.map +0 -1
- package/dist/utils/sharepoint.rest/listutils/exports-index.js.map +0 -1
- package/dist/utils/sharepoint.rest/location.js.map +0 -1
- package/dist/utils/sharepoint.rest/navigation-links.js.map +0 -1
- package/dist/utils/sharepoint.rest/user-search.js.map +0 -1
- package/dist/utils/sharepoint.rest/user.js.map +0 -1
- package/dist/utils/sharepoint.rest/web.js.map +0 -1
- package/dist/utils/sod.js.map +0 -1
- /package/{dist → lib/cjs}/_dependencies.js +0 -0
- /package/{dist → lib/cjs}/config.js +0 -0
- /package/{dist → lib/cjs}/exports-index.js +0 -0
- /package/{dist → lib/cjs}/helpers/Guid.js +0 -0
- /package/{dist → lib/cjs}/helpers/_dependencies.js +0 -0
- /package/{dist → lib/cjs}/helpers/base64.js +0 -0
- /package/{dist → lib/cjs}/helpers/browser.js +0 -0
- /package/{dist → lib/cjs}/helpers/browserinfo.js +0 -0
- /package/{dist → lib/cjs}/helpers/collections.js +0 -0
- /package/{dist → lib/cjs}/helpers/color.js +0 -0
- /package/{dist → lib/cjs}/helpers/cookies.js +0 -0
- /package/{dist → lib/cjs}/helpers/date.js +0 -0
- /package/{dist → lib/cjs}/helpers/emails.js +0 -0
- /package/{dist → lib/cjs}/helpers/eval.js +0 -0
- /package/{dist → lib/cjs}/helpers/exports-index.js +0 -0
- /package/{dist → lib/cjs}/helpers/file.js +0 -0
- /package/{dist → lib/cjs}/helpers/flatted.js +0 -0
- /package/{dist → lib/cjs}/helpers/functions.js +0 -0
- /package/{dist → lib/cjs}/helpers/graph/calendar.types.js +0 -0
- /package/{dist → lib/cjs}/helpers/graph/exports-index.js +0 -0
- /package/{dist → lib/cjs}/helpers/http.js +0 -0
- /package/{dist → lib/cjs}/helpers/images.js +0 -0
- /package/{dist → lib/cjs}/helpers/json.js +0 -0
- /package/{dist → lib/cjs}/helpers/md5.js +0 -0
- /package/{dist → lib/cjs}/helpers/objects.js +0 -0
- /package/{dist → lib/cjs}/helpers/random.js +0 -0
- /package/{dist → lib/cjs}/helpers/scheduler/exports-index.js +0 -0
- /package/{dist → lib/cjs}/helpers/scheduler/scheduler.js +0 -0
- /package/{dist → lib/cjs}/helpers/strings.js +0 -0
- /package/{dist → lib/cjs}/helpers/typecheckers.js +0 -0
- /package/{dist → lib/cjs}/helpers/url.js +0 -0
- /package/{dist → lib/cjs}/helpers/urlhelper.js +0 -0
- /package/{dist → lib/cjs}/types/auth.js +0 -0
- /package/{dist → lib/cjs}/types/common.types.js +0 -0
- /package/{dist → lib/cjs}/types/exports-index.js +0 -0
- /package/{dist → lib/cjs}/types/flatted.types.js +0 -0
- /package/{dist → lib/cjs}/types/globals.types.js +0 -0
- /package/{dist → lib/cjs}/types/graph/calendar.types.js +0 -0
- /package/{dist → lib/cjs}/types/graph/exports-index.js +0 -0
- /package/{dist → lib/cjs}/types/knownscript.types.js +0 -0
- /package/{dist → lib/cjs}/types/libs/datajs.types.js +0 -0
- /package/{dist → lib/cjs}/types/libs/exports-index.js +0 -0
- /package/{dist → lib/cjs}/types/libs/ics.types.js +0 -0
- /package/{dist → lib/cjs}/types/libs/msal.types.js +0 -0
- /package/{dist → lib/cjs}/types/locales.js +0 -0
- /package/{dist → lib/cjs}/types/localstoragecache.types.js +0 -0
- /package/{dist → lib/cjs}/types/location.types.js +0 -0
- /package/{dist → lib/cjs}/types/moment.js +0 -0
- /package/{dist → lib/cjs}/types/regex.types.js +0 -0
- /package/{dist → lib/cjs}/types/rest.types.js +0 -0
- /package/{dist → lib/cjs}/types/sharepoint.types.js +0 -0
- /package/{dist → lib/cjs}/types/sharepoint.utils.types.js +0 -0
- /package/{dist → lib/cjs}/utils/_dependencies.js +0 -0
- /package/{dist → lib/cjs}/utils/auth/common.js +0 -0
- /package/{dist → lib/cjs}/utils/auth/exports-index.js +0 -0
- /package/{dist → lib/cjs}/utils/exports-index.js +0 -0
- /package/{dist → lib/cjs}/utils/sharepoint.rest/common.js +0 -0
- /package/{dist → lib/cjs}/utils/sharepoint.rest/exports-index.js +0 -0
- /package/{dist → lib/cjs}/utils/sharepoint.rest/listutils/exports-index.js +0 -0
- /package/{dist → lib/types}/_dependencies.d.ts +0 -0
- /package/{dist → lib/types}/config.d.ts +0 -0
- /package/{dist → lib/types}/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/helpers/Guid.d.ts +0 -0
- /package/{dist → lib/types}/helpers/_dependencies.d.ts +0 -0
- /package/{dist → lib/types}/helpers/base64.d.ts +0 -0
- /package/{dist → lib/types}/helpers/browser.d.ts +0 -0
- /package/{dist → lib/types}/helpers/browserinfo.d.ts +0 -0
- /package/{dist → lib/types}/helpers/color.d.ts +0 -0
- /package/{dist → lib/types}/helpers/cookies.d.ts +0 -0
- /package/{dist → lib/types}/helpers/date.d.ts +0 -0
- /package/{dist → lib/types}/helpers/debug.d.ts +0 -0
- /package/{dist → lib/types}/helpers/emails.d.ts +0 -0
- /package/{dist → lib/types}/helpers/eval.d.ts +0 -0
- /package/{dist → lib/types}/helpers/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/helpers/file.d.ts +0 -0
- /package/{dist → lib/types}/helpers/functions.d.ts +0 -0
- /package/{dist → lib/types}/helpers/graph/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/helpers/http.d.ts +0 -0
- /package/{dist → lib/types}/helpers/images.d.ts +0 -0
- /package/{dist → lib/types}/helpers/json.d.ts +0 -0
- /package/{dist → lib/types}/helpers/md5.d.ts +0 -0
- /package/{dist → lib/types}/helpers/objects.d.ts +0 -0
- /package/{dist → lib/types}/helpers/promises.d.ts +0 -0
- /package/{dist → lib/types}/helpers/random.d.ts +0 -0
- /package/{dist → lib/types}/helpers/scheduler/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/helpers/scheduler/scheduler.d.ts +0 -0
- /package/{dist → lib/types}/helpers/typecheckers.d.ts +0 -0
- /package/{dist → lib/types}/helpers/urlhelper.d.ts +0 -0
- /package/{dist → lib/types}/index.d.ts +0 -0
- /package/{dist → lib/types}/types/auth.d.ts +0 -0
- /package/{dist → lib/types}/types/common.types.d.ts +0 -0
- /package/{dist → lib/types}/types/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/types/flatted.types.d.ts +0 -0
- /package/{dist → lib/types}/types/globals.types.d.ts +0 -0
- /package/{dist → lib/types}/types/graph/calendar.types.d.ts +0 -0
- /package/{dist → lib/types}/types/graph/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/types/knownscript.types.d.ts +0 -0
- /package/{dist → lib/types}/types/libs/datajs.types.d.ts +0 -0
- /package/{dist → lib/types}/types/libs/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/types/libs/ics.types.d.ts +0 -0
- /package/{dist → lib/types}/types/libs/msal.types.d.ts +0 -0
- /package/{dist → lib/types}/types/locales.d.ts +0 -0
- /package/{dist → lib/types}/types/localstoragecache.types.d.ts +0 -0
- /package/{dist → lib/types}/types/location.types.d.ts +0 -0
- /package/{dist → lib/types}/types/moment.d.ts +0 -0
- /package/{dist → lib/types}/types/regex.types.d.ts +0 -0
- /package/{dist → lib/types}/types/rest.types.d.ts +0 -0
- /package/{dist → lib/types}/types/sharepoint.types.d.ts +0 -0
- /package/{dist → lib/types}/types/sharepoint.utils.types.d.ts +0 -0
- /package/{dist → lib/types}/utils/_dependencies.d.ts +0 -0
- /package/{dist → lib/types}/utils/auth/common.d.ts +0 -0
- /package/{dist → lib/types}/utils/auth/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/utils/base64.d.ts +0 -0
- /package/{dist → lib/types}/utils/consolelogger.d.ts +0 -0
- /package/{dist → lib/types}/utils/date.d.ts +0 -0
- /package/{dist → lib/types}/utils/emails.d.ts +0 -0
- /package/{dist → lib/types}/utils/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/utils/sharepoint.rest/common.d.ts +0 -0
- /package/{dist → lib/types}/utils/sharepoint.rest/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/utils/sharepoint.rest/listutils/exports-index.d.ts +0 -0
- /package/{dist → lib/types}/utils/sharepoint.rest/location.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { isValidEmail } from "../helpers/emails";
|
|
2
|
+
import { GetJsonSync, longLocalCache } from "./rest";
|
|
3
|
+
/** returns true if a valid email that is from a known free email provider */
|
|
4
|
+
export function isFreeEmail(email) {
|
|
5
|
+
if (isValidEmail(email)) {
|
|
6
|
+
var freeEmailListData = GetJsonSync("https://apps.kwizcom.com/products/common/scripts/free-email-list.txt", null, {
|
|
7
|
+
...longLocalCache,
|
|
8
|
+
headers: {
|
|
9
|
+
"content-type": "text/plain",
|
|
10
|
+
"Accept": "*/*"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var freeEmailList = freeEmailListData.success ? freeEmailListData.result.replace(/\r/g, '').split('\n') : [
|
|
14
|
+
"gmail.com",
|
|
15
|
+
"yaho.com",
|
|
16
|
+
"live.com"
|
|
17
|
+
];
|
|
18
|
+
if (freeEmailList.includes(email.split('@')[1].toLowerCase()))
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=emails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emails.js","sourceRoot":"","sources":["../../../src/utils/emails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGrD,6EAA6E;AAC7E,MAAM,UAAU,WAAW,CAAC,KAAa;IACrC,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACtB,IAAI,iBAAiB,GAAG,WAAW,CAAS,sEAAsE,EAAE,IAAI,EAAE;YACtH,GAAG,cAAc;YACjB,OAAO,EAAE;gBACL,cAAc,EAAE,YAAY;gBAC5B,QAAQ,EAAE,KAAK;aAClB;SACJ,CAAC,CAAC;QACH,IAAI,aAAa,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACtG,WAAW;YACX,UAAU;YACV,UAAU;SACb,CAAC;QAEF,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACzD,OAAO,IAAI,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './auth/exports-index';
|
|
2
|
+
export * from './sharepoint.rest/exports-index';
|
|
3
|
+
export * from './base64';
|
|
4
|
+
export * from './consolelogger';
|
|
5
|
+
export * from './date';
|
|
6
|
+
export * from './emails';
|
|
7
|
+
export * from './knownscript';
|
|
8
|
+
export * from './localstoragecache';
|
|
9
|
+
export * from './rest';
|
|
10
|
+
export * from './script';
|
|
11
|
+
export * from './sod';
|
|
12
|
+
//# sourceMappingURL=exports-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports-index.js","sourceRoot":"","sources":["../../../src/utils/exports-index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { assign } from "../helpers/objects";
|
|
2
|
+
import { isNullOrUndefined } from "../helpers/typecheckers";
|
|
3
|
+
import script from "./script";
|
|
4
|
+
/** /products/common/scripts/ */
|
|
5
|
+
export const commonScriptsPrefix = "/products/common/scripts/";
|
|
6
|
+
/** /products/modern/scripts/ */
|
|
7
|
+
export const modernScriptsPrefix = "/products/modern/scripts/";
|
|
8
|
+
export class KnownScriptLoader {
|
|
9
|
+
get globalInstance() { return this._globalInstance; }
|
|
10
|
+
constructor(definition) {
|
|
11
|
+
assign(this, definition);
|
|
12
|
+
}
|
|
13
|
+
async load() {
|
|
14
|
+
if (isNullOrUndefined(this.globalInstance))
|
|
15
|
+
this._globalInstance = await script.Instance.loadKnownScript(this);
|
|
16
|
+
return this.globalInstance;
|
|
17
|
+
}
|
|
18
|
+
loadSync() {
|
|
19
|
+
if (isNullOrUndefined(this.globalInstance))
|
|
20
|
+
this._globalInstance = script.Instance.loadKnownScript_Sync(this);
|
|
21
|
+
return this.globalInstance;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/** loads into $kw */
|
|
25
|
+
export var jQueryKnownScript = new KnownScriptLoader({
|
|
26
|
+
url: commonScriptsPrefix + "jquery-1.8.2.min.js",
|
|
27
|
+
global: "$kw",
|
|
28
|
+
sodName: "kwizcom.common.jquery-1.8.2.js"
|
|
29
|
+
});
|
|
30
|
+
/** loads into moment */
|
|
31
|
+
export var MomentJSKnownScript = new KnownScriptLoader({
|
|
32
|
+
url: "/libs/moment/moment.min.js",
|
|
33
|
+
global: "moment"
|
|
34
|
+
});
|
|
35
|
+
/** loads into moment.tz */
|
|
36
|
+
export var MomentTimezoneJSKnownScript = new KnownScriptLoader({
|
|
37
|
+
url: "/libs/moment/moment-timezone.min.js",
|
|
38
|
+
global: "moment.tz",
|
|
39
|
+
dependencies: [MomentJSKnownScript]
|
|
40
|
+
});
|
|
41
|
+
/** loads into kLocales or kwizcom.kLocales */
|
|
42
|
+
export var LocaleKnownScript = new KnownScriptLoader({
|
|
43
|
+
url: commonScriptsPrefix + "locale.min.js",
|
|
44
|
+
global: "kwizcom.kLocales",
|
|
45
|
+
sodName: "kwizcom.common.locale.js",
|
|
46
|
+
dependencies: [MomentTimezoneJSKnownScript]
|
|
47
|
+
});
|
|
48
|
+
/** Loads jQuery and Select2 with the CSS file for Select2 */
|
|
49
|
+
export var Select2KnownScript = new KnownScriptLoader({
|
|
50
|
+
url: commonScriptsPrefix + "select2.min.js",
|
|
51
|
+
global: "Select2.class",
|
|
52
|
+
sodName: "kwizcom.common.select2.js",
|
|
53
|
+
css: ["/products/common/css/select2.min.css"],
|
|
54
|
+
dependencies: [jQueryKnownScript]
|
|
55
|
+
});
|
|
56
|
+
/** Loads fabric and its CSS */
|
|
57
|
+
export var FabricKnownScript = new KnownScriptLoader({
|
|
58
|
+
url: "/libs/office-ui-fabric-js/1.4.0/js/fabric.min.js?prefix=kw",
|
|
59
|
+
global: "kwfabric",
|
|
60
|
+
//Issue 6494 rename fabric.css since SP modern page will remove any css that ends with fabric.css or fabric.min.css
|
|
61
|
+
css: ["/libs/office-ui-fabric-js/1.4.0/css/fabric.kwizcom.min.css?prefix=kw",
|
|
62
|
+
"/libs/office-ui-fabric-js/1.4.0/css/fabric.kwizcom.components.min.css?prefix=kw"],
|
|
63
|
+
rtlCss: ["/libs/office-ui-fabric-js/1.4.0/css/fabric.kwizcom.rtl.min.css?prefix=kw",
|
|
64
|
+
"/libs/office-ui-fabric-js/1.4.0/css/fabric.kwizcom.components.rtl.min.css?prefix=kw"]
|
|
65
|
+
});
|
|
66
|
+
/** loads into kwizcom.aplfe.api */
|
|
67
|
+
export var APLFEApiKnownScript = new KnownScriptLoader({
|
|
68
|
+
url: "/products/aplfe/scripts/kwizcom.aplfe.api.min.js",
|
|
69
|
+
global: "kwizcom.aplfe.api",
|
|
70
|
+
sodName: "kwizcom.aplfe.api.js"
|
|
71
|
+
});
|
|
72
|
+
/** loads into KWizComRepeatingRowsControlBuilder */
|
|
73
|
+
export var RRWControlBuilderKnownScript = new KnownScriptLoader({
|
|
74
|
+
url: "/products/aprrw/scripts/controlbuilder.min.js",
|
|
75
|
+
global: "KWizComRepeatingRowsControlBuilder",
|
|
76
|
+
dependencies: [jQueryKnownScript]
|
|
77
|
+
});
|
|
78
|
+
/** loads into kwOfficeUiFabricReact */
|
|
79
|
+
export var OfficeUiFabricReactKnownScript = new KnownScriptLoader({
|
|
80
|
+
url: "/libs/office-ui-fabric-react/office-ui-fabric-react.js",
|
|
81
|
+
global: "kwizcom.OfficeUiFabricReact"
|
|
82
|
+
});
|
|
83
|
+
/** loads into $kw.ui */
|
|
84
|
+
export var jQueryUIKnownScript = new KnownScriptLoader({
|
|
85
|
+
url: commonScriptsPrefix + "jquery-ui-1.9.2.custom.min.js",
|
|
86
|
+
global: "$kw.ui",
|
|
87
|
+
sodName: "kwizcom.common.jquery-ui-1.9.2.custom.js",
|
|
88
|
+
dependencies: [jQueryKnownScript],
|
|
89
|
+
css: ["/products/common/css/jquery-ui.min.css"]
|
|
90
|
+
});
|
|
91
|
+
/** loads into $kw.ui.touchLoded */
|
|
92
|
+
export var jQueryTouchPunchKnownScript = new KnownScriptLoader({
|
|
93
|
+
url: commonScriptsPrefix + "jquery.ui.touch-punch.min.js",
|
|
94
|
+
global: "$kw.ui.touchLoded",
|
|
95
|
+
dependencies: [jQueryUIKnownScript]
|
|
96
|
+
});
|
|
97
|
+
/** loads into $kw.fn.camera */
|
|
98
|
+
export var CameraKnownScript = new KnownScriptLoader({
|
|
99
|
+
url: "/libs/camera/js/camera.min.js",
|
|
100
|
+
global: "$kw.fn.camera",
|
|
101
|
+
dependencies: [jQueryUIKnownScript],
|
|
102
|
+
css: ["/libs/camera/css/camera.min.css"]
|
|
103
|
+
});
|
|
104
|
+
/** loads into flatpickr */
|
|
105
|
+
export var FlatPickerKnownScript = new KnownScriptLoader({
|
|
106
|
+
url: "/libs/flatpickr/flatpickr.min.js",
|
|
107
|
+
global: "flatpickr",
|
|
108
|
+
css: ["/libs/flatpickr/flatpickr.min.css"]
|
|
109
|
+
});
|
|
110
|
+
/** loads into noUiSlider */
|
|
111
|
+
export var NoUiSliderKnownScript = new KnownScriptLoader({
|
|
112
|
+
url: "/libs/nouislider/nouislider.min.js",
|
|
113
|
+
global: "noUiSlider",
|
|
114
|
+
css: ["/libs/nouislider/nouislider.min.css"]
|
|
115
|
+
});
|
|
116
|
+
/** loads into blueimp */
|
|
117
|
+
export var BlueImpGalleryKnownScript = new KnownScriptLoader({
|
|
118
|
+
url: "/libs/blueimp-gallery/js/blueimp-gallery.min.js",
|
|
119
|
+
global: "blueimp",
|
|
120
|
+
css: ["/libs/blueimp-gallery/css/blueimp-gallery.min.css"]
|
|
121
|
+
});
|
|
122
|
+
/** loads into dhx */
|
|
123
|
+
export var dhxDiagramKnownScript = new KnownScriptLoader({
|
|
124
|
+
url: "/libs/dhtmlx/diagram.min.js",
|
|
125
|
+
global: "dhx",
|
|
126
|
+
css: ["/libs/dhtmlx/diagram.min.css"]
|
|
127
|
+
});
|
|
128
|
+
/** loads into dragscroll */
|
|
129
|
+
export var dragScrollKnownScript = new KnownScriptLoader({
|
|
130
|
+
url: "/libs/dragscroll/dragscroll.min.js",
|
|
131
|
+
global: "dragscroll"
|
|
132
|
+
});
|
|
133
|
+
/** loads into getOrgChart */
|
|
134
|
+
export var getOrgChartKnownScript = new KnownScriptLoader({
|
|
135
|
+
url: "/libs/getorgchart/getorgchart.min.js",
|
|
136
|
+
global: "getOrgChart",
|
|
137
|
+
css: ["/libs/getorgchart/getorgchart.min.css"]
|
|
138
|
+
});
|
|
139
|
+
/** loads into OrgChart */
|
|
140
|
+
export var OrgChartJsKnownScript = new KnownScriptLoader({
|
|
141
|
+
url: "/libs/orgchartjs/orgchart.min.js",
|
|
142
|
+
global: "OrgChart"
|
|
143
|
+
});
|
|
144
|
+
/** loads into photopile */
|
|
145
|
+
export var PhotopileKnownScript = new KnownScriptLoader({
|
|
146
|
+
url: "/libs/photopile/js/photopile.min.js",
|
|
147
|
+
global: "photopile",
|
|
148
|
+
dependencies: [jQueryTouchPunchKnownScript],
|
|
149
|
+
css: ["/libs/photopile/css/photopile.min.css"]
|
|
150
|
+
});
|
|
151
|
+
/** loads into $kw.fn.fullCalendar */
|
|
152
|
+
export var fullCalendarKnownScript = new KnownScriptLoader({
|
|
153
|
+
url: "/libs/fullcalendar/fullcalendar.min.js",
|
|
154
|
+
global: "$kw.fn.fullCalendar",
|
|
155
|
+
dependencies: [jQueryKnownScript, MomentTimezoneJSKnownScript],
|
|
156
|
+
css: ["/libs/fullcalendar/fullcalendar.min.css"]
|
|
157
|
+
});
|
|
158
|
+
/** loads into spEventsParser */
|
|
159
|
+
export var SpEventsParserKnownScript = new KnownScriptLoader({
|
|
160
|
+
url: commonScriptsPrefix + "sp-events-parser/sp-events-parser.min.js",
|
|
161
|
+
global: "spEventsParser"
|
|
162
|
+
});
|
|
163
|
+
/** loads into kwizcom.controls.Conditions */
|
|
164
|
+
export var ConditionsKnownScript = new KnownScriptLoader({
|
|
165
|
+
url: commonScriptsPrefix + "controls/conditions.min.js",
|
|
166
|
+
global: "kwizcom.controls.Conditions",
|
|
167
|
+
dependencies: [LocaleKnownScript]
|
|
168
|
+
});
|
|
169
|
+
/** loads into KWizComCountdownControlBuilder */
|
|
170
|
+
export var CountdownControlBuilderKnownScript = new KnownScriptLoader({
|
|
171
|
+
url: "/products/apcnt/scripts/controlbuilder.min.js",
|
|
172
|
+
global: "KWizComCountdownControlBuilder",
|
|
173
|
+
dependencies: [LocaleKnownScript]
|
|
174
|
+
});
|
|
175
|
+
/** loads into SP.UI.ModalDialog.showErrorDialog */
|
|
176
|
+
export var OnPremPolyfillKnownScript = new KnownScriptLoader({
|
|
177
|
+
url: commonScriptsPrefix + "onprem.polyfill.min.js",
|
|
178
|
+
sodName: "kwizcom.common.onprem.polyfill.js",
|
|
179
|
+
global: "SP.UI.ModalDialog.showErrorDialog"
|
|
180
|
+
});
|
|
181
|
+
/** loads into kwizcom.datajs */
|
|
182
|
+
export var DataJSKnownScript = new KnownScriptLoader({
|
|
183
|
+
url: "/libs/datajs/datajs.min.js",
|
|
184
|
+
global: "kwizcom.OData"
|
|
185
|
+
});
|
|
186
|
+
/** loads into tinymce */
|
|
187
|
+
export var TinyMCEKnownScript = new KnownScriptLoader({
|
|
188
|
+
url: "/libs/tinymce/tinymce.min.js",
|
|
189
|
+
forceMin: true,
|
|
190
|
+
global: "tinymce"
|
|
191
|
+
});
|
|
192
|
+
/** loads into kwizcom.monaco */
|
|
193
|
+
export var monacoKnownScript = new KnownScriptLoader({
|
|
194
|
+
url: "/libs/monaco/monaco.js",
|
|
195
|
+
global: "kwizcom.monaco"
|
|
196
|
+
});
|
|
197
|
+
/** loads into kwizcom.ModernUILibrary.FormPage */
|
|
198
|
+
export var ModernUIListFormKnownScript = new KnownScriptLoader({
|
|
199
|
+
url: modernScriptsPrefix + "forms/formpage.min.js",
|
|
200
|
+
global: "kwizcom.ModernUILibrary.FormPage",
|
|
201
|
+
//dependencies: [OfficeUiFabricReact]
|
|
202
|
+
});
|
|
203
|
+
/** loads into jsonPath */
|
|
204
|
+
export var jsonPathKnownScript = new KnownScriptLoader({
|
|
205
|
+
url: commonScriptsPrefix + "JSONPath.min.js",
|
|
206
|
+
global: "jsonPath"
|
|
207
|
+
});
|
|
208
|
+
/** loads into _global_kwizcom_appas_modern_core */
|
|
209
|
+
export var PasteModernCoreKnownScript = new KnownScriptLoader({
|
|
210
|
+
url: "/products/appas/scripts/kwizcom.pasteplus.modern.core.min.js",
|
|
211
|
+
global: "$_global_kwizcom_appas_modern_core",
|
|
212
|
+
//dependencies: [OfficeUiFabricReact]
|
|
213
|
+
});
|
|
214
|
+
/** loads into kwizcom.libs.msal */
|
|
215
|
+
export var msalKnownScript = new KnownScriptLoader({
|
|
216
|
+
url: commonScriptsPrefix + "msal/msal.min.js",
|
|
217
|
+
global: "kwizcom.libs.msal"
|
|
218
|
+
});
|
|
219
|
+
/** loads into kwizcom.libs.ics */
|
|
220
|
+
export var icsKnownScript = new KnownScriptLoader({
|
|
221
|
+
url: "/libs/ics/ics.min.js",
|
|
222
|
+
global: "kwizcom.libs.ics"
|
|
223
|
+
});
|
|
224
|
+
var _jQueryTmplKnownScript = new KnownScriptLoader({
|
|
225
|
+
url: "/libs/jquery/js/jquery.tmpl.min.js",
|
|
226
|
+
global: "$kw.fn.tmpl", forceMin: true,
|
|
227
|
+
dependencies: [jQueryKnownScript]
|
|
228
|
+
});
|
|
229
|
+
var _jQueryEasingKnownScript = new KnownScriptLoader({
|
|
230
|
+
url: "/libs/jquery/js/jquery.easing.1.3.js",
|
|
231
|
+
global: "$kw.easing",
|
|
232
|
+
dependencies: [jQueryKnownScript]
|
|
233
|
+
});
|
|
234
|
+
var _jQueryElastislideKnownScript = new KnownScriptLoader({
|
|
235
|
+
url: "/libs/jquery/js/jquery.elastislide.js",
|
|
236
|
+
global: "$kw.fn.elastislide",
|
|
237
|
+
css: ["/libs/jquery/css/elastislide.css"],
|
|
238
|
+
dependencies: [jQueryKnownScript]
|
|
239
|
+
});
|
|
240
|
+
/** Responsive Image Gallery */
|
|
241
|
+
export var rigKnownScript = new KnownScriptLoader({
|
|
242
|
+
url: "/libs/rig/js/gallery.js",
|
|
243
|
+
global: "kwizcom.libs.rig",
|
|
244
|
+
css: ["/libs/rig/css/style.css"],
|
|
245
|
+
dependencies: [jQueryKnownScript, _jQueryTmplKnownScript, _jQueryEasingKnownScript, _jQueryElastislideKnownScript]
|
|
246
|
+
});
|
|
247
|
+
//# sourceMappingURL=knownscript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knownscript.js","sourceRoot":"","sources":["../../../src/utils/knownscript.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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CAAC,kCAAkC,CAAC;IACzC,YAAY,EAAE,CAAC,iBAAiB,CAAC;CACpC,CAAC,CAAC;AACH,+BAA+B;AAC/B,MAAM,CAAC,IAAI,cAAc,GAAG,IAAI,iBAAiB,CAQb;IAChC,GAAG,EAAE,yBAAyB;IAC9B,MAAM,EAAE,kBAAkB;IAC1B,GAAG,EAAE,CAAC,yBAAyB,CAAC;IAChC,YAAY,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,6BAA6B,CAAC;CACrH,CAAC,CAAC"}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { sizeOf } from "../helpers/collections.base";
|
|
2
|
+
import { isDebug } from "../helpers/debug";
|
|
3
|
+
import { flatted } from "../helpers/flatted";
|
|
4
|
+
import { jsonParse } from "../helpers/json";
|
|
5
|
+
import { getGlobal } from "../helpers/objects";
|
|
6
|
+
import { isDate, isNullOrEmptyString, isNullOrUndefined, isNumber } from "../helpers/typecheckers";
|
|
7
|
+
import { ConsoleLogger } from "./consolelogger";
|
|
8
|
+
let logger = ConsoleLogger.get("localstoragecache");
|
|
9
|
+
export const keyPrefix = "kw$_";
|
|
10
|
+
export const LOCAL_STORAGE_PREFIX = "kwizcom-localstorage-cache";
|
|
11
|
+
export const LOCAL_STORGAGE_EXPIRATIONS_KEY = LOCAL_STORAGE_PREFIX + "-expirations";
|
|
12
|
+
export const DEFAULT_EXPIRATION = 20 * 60 * 1000; // 20 minutes;
|
|
13
|
+
/** When caching logic changes (serialization methods, format, schema), the MODULE_REVISION should be incremented
|
|
14
|
+
* and all client side apps will need to be rebuilt */
|
|
15
|
+
export const MODULE_REVISION = "1";
|
|
16
|
+
/** key (no prefix) is kept in lower case. not case sensitive */
|
|
17
|
+
function _getCache() {
|
|
18
|
+
let _cache = getGlobal("common_utils_localstoragecache_module_cache");
|
|
19
|
+
if (!_cache.purgeCalled) {
|
|
20
|
+
//issue 7081 - purge all orphans/expired items
|
|
21
|
+
_cache.purgeCalled = true;
|
|
22
|
+
//clear expired cache items.
|
|
23
|
+
(globalThis || window).setTimeout(() => {
|
|
24
|
+
purgeCache();
|
|
25
|
+
if (isDebug()) {
|
|
26
|
+
let size = _getStoredSize();
|
|
27
|
+
logger.debug(`Size of items in local storage: ${size}KB`);
|
|
28
|
+
}
|
|
29
|
+
}, 5000);
|
|
30
|
+
}
|
|
31
|
+
return _cache;
|
|
32
|
+
}
|
|
33
|
+
var _supportsLocalStorage = null;
|
|
34
|
+
function _parseExpiration(exp) {
|
|
35
|
+
var expirationDate;
|
|
36
|
+
if (isNumber(exp) && exp > 0) {
|
|
37
|
+
expirationDate = new Date();
|
|
38
|
+
expirationDate.setMilliseconds(expirationDate.getMilliseconds() + exp);
|
|
39
|
+
}
|
|
40
|
+
else if (exp instanceof Date) {
|
|
41
|
+
expirationDate = exp;
|
|
42
|
+
}
|
|
43
|
+
else if (exp) {
|
|
44
|
+
var tempexp = exp;
|
|
45
|
+
var seconds = typeof (tempexp.seconds) === "number" ? tempexp.seconds : undefined;
|
|
46
|
+
var minutes = typeof (tempexp.minutes) === "number" ? tempexp.minutes : undefined;
|
|
47
|
+
var hours = typeof (tempexp.hours) === "number" ? tempexp.hours : undefined;
|
|
48
|
+
var days = typeof (tempexp.days) === "number" ? tempexp.days : undefined;
|
|
49
|
+
var months = typeof (tempexp.months) === "number" ? tempexp.months : undefined;
|
|
50
|
+
var years = typeof (tempexp.years) === "number" ? tempexp.years : undefined;
|
|
51
|
+
if (seconds || minutes || hours || days || months || years) {
|
|
52
|
+
expirationDate = new Date();
|
|
53
|
+
if (seconds) {
|
|
54
|
+
expirationDate.setMilliseconds(expirationDate.getMilliseconds() + (seconds * 1000));
|
|
55
|
+
}
|
|
56
|
+
if (minutes) {
|
|
57
|
+
expirationDate.setMilliseconds(expirationDate.getMilliseconds() + (minutes * 60 * 1000));
|
|
58
|
+
}
|
|
59
|
+
if (hours) {
|
|
60
|
+
expirationDate.setMilliseconds(expirationDate.getMilliseconds() + (hours * 60 * 60 * 1000));
|
|
61
|
+
}
|
|
62
|
+
if (days) {
|
|
63
|
+
expirationDate.setMilliseconds(expirationDate.getMilliseconds() + (days * 24 * 60 * 60 * 1000));
|
|
64
|
+
}
|
|
65
|
+
if (months) {
|
|
66
|
+
expirationDate.setMonth(expirationDate.getMonth() + months);
|
|
67
|
+
}
|
|
68
|
+
if (years) {
|
|
69
|
+
expirationDate.setFullYear(expirationDate.getFullYear() + years);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (!expirationDate) {
|
|
74
|
+
expirationDate = new Date();
|
|
75
|
+
expirationDate.setMilliseconds(expirationDate.getMilliseconds() + DEFAULT_EXPIRATION);
|
|
76
|
+
}
|
|
77
|
+
return expirationDate;
|
|
78
|
+
}
|
|
79
|
+
function _getCacheExpirations() {
|
|
80
|
+
let _cache = _getCache();
|
|
81
|
+
if (isNullOrUndefined(_cache.expirations)) {
|
|
82
|
+
_cache.expirations = jsonParse(_getItem(LOCAL_STORGAGE_EXPIRATIONS_KEY));
|
|
83
|
+
//ISSUE: 1525 - expire the cache if it was built with a different version number so that the cache
|
|
84
|
+
//is compatible with the current build
|
|
85
|
+
if (!isNullOrUndefined(_cache.expirations) && _cache.expirations.build !== MODULE_REVISION) {
|
|
86
|
+
logger.log(`Purging cache because of build number change`);
|
|
87
|
+
purgeCache(true);
|
|
88
|
+
_cache.expirations = null;
|
|
89
|
+
}
|
|
90
|
+
if (isNullOrUndefined(_cache.expirations)) {
|
|
91
|
+
_cache.expirations = {
|
|
92
|
+
build: MODULE_REVISION
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return _cache.expirations;
|
|
97
|
+
}
|
|
98
|
+
function _saveCacheExpirations() {
|
|
99
|
+
let _cache = _getCache();
|
|
100
|
+
if (!isNullOrUndefined(_cache.expirations) && sizeOf(_cache.expirations) > 0) {
|
|
101
|
+
_setItem(LOCAL_STORGAGE_EXPIRATIONS_KEY, JSON.stringify(_cache.expirations));
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
_removeItem(LOCAL_STORGAGE_EXPIRATIONS_KEY);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function _setCacheExpiration(keyWithPrefix, expireDate) {
|
|
108
|
+
var expirations = _getCacheExpirations();
|
|
109
|
+
expirations[keyWithPrefix] = expireDate.toISOString();
|
|
110
|
+
_saveCacheExpirations();
|
|
111
|
+
}
|
|
112
|
+
function _isKeyExpired(keyWithPrefix) {
|
|
113
|
+
var expirations = _getCacheExpirations();
|
|
114
|
+
if (expirations && expirations[keyWithPrefix]) {
|
|
115
|
+
var now = new Date();
|
|
116
|
+
var eDate = new Date(expirations[keyWithPrefix]);
|
|
117
|
+
if (now > eDate) {
|
|
118
|
+
try {
|
|
119
|
+
delete expirations[keyWithPrefix];
|
|
120
|
+
}
|
|
121
|
+
catch (ex) {
|
|
122
|
+
expirations[keyWithPrefix] = undefined; // undefined variables are removed when passed to JSON.stringify
|
|
123
|
+
}
|
|
124
|
+
_saveCacheExpirations();
|
|
125
|
+
//has a date, it is expired.
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
//has a date, it is not expired yet.
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
//has no date or not in expirations at all - say it is expired...
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
function _getItem(key) {
|
|
135
|
+
try {
|
|
136
|
+
return localStorage.getItem(key);
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
function _setItem(key, value) {
|
|
143
|
+
try {
|
|
144
|
+
localStorage.setItem(key, value);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
}
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
function _removeItem(key) {
|
|
152
|
+
try {
|
|
153
|
+
localStorage.removeItem(key);
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
}
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
/**Get the size (KB) of all entries in local storage. Only returns the size for entries with kwizcom key prefix. */
|
|
161
|
+
function _getStoredSize() {
|
|
162
|
+
let keys = getCacheKeys();
|
|
163
|
+
let total = 0;
|
|
164
|
+
let length = 0;
|
|
165
|
+
let useBlob = 'Blob' in (globalThis || window);
|
|
166
|
+
keys.forEach((key) => {
|
|
167
|
+
let v = _getItem(`${keyPrefix}${key}`);
|
|
168
|
+
if (!isNullOrEmptyString(v)) {
|
|
169
|
+
if (useBlob) {
|
|
170
|
+
length = (new Blob([v + key])).size;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
length = ((v.length + key.length) * 2);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
total += length;
|
|
177
|
+
});
|
|
178
|
+
return Number((total / 1024).toFixed(2));
|
|
179
|
+
}
|
|
180
|
+
export function isLocalStorageSupported() {
|
|
181
|
+
if (_supportsLocalStorage !== null) {
|
|
182
|
+
return _supportsLocalStorage;
|
|
183
|
+
}
|
|
184
|
+
var result;
|
|
185
|
+
try {
|
|
186
|
+
_setItem(LOCAL_STORAGE_PREFIX, LOCAL_STORAGE_PREFIX);
|
|
187
|
+
result = _getItem(LOCAL_STORAGE_PREFIX) === LOCAL_STORAGE_PREFIX;
|
|
188
|
+
_removeItem(LOCAL_STORAGE_PREFIX);
|
|
189
|
+
_supportsLocalStorage = result;
|
|
190
|
+
}
|
|
191
|
+
catch (ex) {
|
|
192
|
+
_supportsLocalStorage = false;
|
|
193
|
+
}
|
|
194
|
+
return _supportsLocalStorage;
|
|
195
|
+
}
|
|
196
|
+
//#region exported methods
|
|
197
|
+
export function getCacheItem(key, options) {
|
|
198
|
+
key = key.toLowerCase();
|
|
199
|
+
let keyWithPrefix = keyPrefix + key;
|
|
200
|
+
let _cache = _getCache();
|
|
201
|
+
if (typeof (_cache[key]) !== "undefined"
|
|
202
|
+
&& _cache[key] !== null) {
|
|
203
|
+
return _cache[key];
|
|
204
|
+
}
|
|
205
|
+
if (isLocalStorageSupported()) {
|
|
206
|
+
var value = _getItem(keyWithPrefix);
|
|
207
|
+
if (isNullOrUndefined(value)) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
let isExpired = _isKeyExpired(keyWithPrefix);
|
|
211
|
+
if (!isExpired) {
|
|
212
|
+
let valueAsT = options && options.useFlatted ? flatted.parse(value) : jsonParse(value);
|
|
213
|
+
if (valueAsT !== null) {
|
|
214
|
+
_cache[key] = valueAsT;
|
|
215
|
+
return valueAsT;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
_cache[key] = value;
|
|
219
|
+
return value;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//else remove it from cache
|
|
223
|
+
removeCacheItem(key);
|
|
224
|
+
}
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
export function setCacheItem(key, value, expiration, options) {
|
|
228
|
+
if (isLocalStorageSupported()) {
|
|
229
|
+
key = key.toLowerCase();
|
|
230
|
+
removeCacheItem(key);
|
|
231
|
+
var val = null;
|
|
232
|
+
try {
|
|
233
|
+
if (options && options.useFlatted)
|
|
234
|
+
val = flatted.stringify(value);
|
|
235
|
+
else
|
|
236
|
+
val = JSON.stringify(value);
|
|
237
|
+
}
|
|
238
|
+
catch (ex) {
|
|
239
|
+
logger.debug(`Object cannot be stored in local storage: ${ex && ex.message || ex} ${key}`);
|
|
240
|
+
return; //this put [object] in cache for me if object can't be stringified!
|
|
241
|
+
}
|
|
242
|
+
let keyWithPrefix = keyPrefix + key;
|
|
243
|
+
var expireDate = _parseExpiration(expiration);
|
|
244
|
+
let saved = _setItem(keyWithPrefix, val);
|
|
245
|
+
if (saved) {
|
|
246
|
+
_setCacheExpiration(keyWithPrefix, expireDate);
|
|
247
|
+
}
|
|
248
|
+
let _cache = _getCache();
|
|
249
|
+
_cache[key] = value;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
export function removeCacheItem(key) {
|
|
253
|
+
key = key.toLowerCase();
|
|
254
|
+
let _cache = _getCache();
|
|
255
|
+
delete _cache[key];
|
|
256
|
+
let keyWithPrefix = keyPrefix + key;
|
|
257
|
+
if (isLocalStorageSupported()) {
|
|
258
|
+
_removeItem(key); //in case we have an old one
|
|
259
|
+
_removeItem(keyWithPrefix);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
export function removeCacheItems(keys) {
|
|
263
|
+
keys.forEach((key) => {
|
|
264
|
+
removeCacheItem(key);
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
export function getCacheKeys() {
|
|
268
|
+
let keys = [];
|
|
269
|
+
if (isLocalStorageSupported()) {
|
|
270
|
+
keys = Object.keys(localStorage).filter((key) => {
|
|
271
|
+
return key.startsWith(keyPrefix);
|
|
272
|
+
}).map((key) => {
|
|
273
|
+
return key.substring(keyPrefix.length);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
return keys;
|
|
277
|
+
}
|
|
278
|
+
/** remove expired cache keys created by this utility.
|
|
279
|
+
* to remove all keys (non-expired too) send removeAll=true
|
|
280
|
+
*/
|
|
281
|
+
function purgeCache(removeAll) {
|
|
282
|
+
if (!isLocalStorageSupported())
|
|
283
|
+
return;
|
|
284
|
+
var cacheExpirationsKeys = [
|
|
285
|
+
LOCAL_STORGAGE_EXPIRATIONS_KEY,
|
|
286
|
+
"kwizcom-aplfe-caching-expirations", // old clean up
|
|
287
|
+
"localStorageExpirations" // old clean up
|
|
288
|
+
];
|
|
289
|
+
let now = new Date();
|
|
290
|
+
let nonExpiredKeys = [];
|
|
291
|
+
//get all expiration keys (key/expiration date/time)
|
|
292
|
+
for (let j = 0; j < cacheExpirationsKeys.length; j++) {
|
|
293
|
+
try {
|
|
294
|
+
let expirations = null;
|
|
295
|
+
let cacheExpirationsKey = cacheExpirationsKeys[j];
|
|
296
|
+
let removeAllForKey = removeAll || cacheExpirationsKey !== LOCAL_STORGAGE_EXPIRATIONS_KEY;
|
|
297
|
+
if (cacheExpirationsKey === "localStorageExpirations") {
|
|
298
|
+
//old format - load expirations from this one as well
|
|
299
|
+
expirations = _getItem(cacheExpirationsKey); // "key1^11/18/2011 5pm|key2^3/10/2012 3pm"
|
|
300
|
+
if (expirations) {
|
|
301
|
+
let arr = expirations.split("|"); // ["key1^11/18/2011 5pm","key2^3/10/2012 3pm"]
|
|
302
|
+
for (let i = 0; i < arr.length; i++) {
|
|
303
|
+
try {
|
|
304
|
+
let key_expiration_format = arr[i]; // "key1^11/18/2011 5pm"
|
|
305
|
+
let key = key_expiration_format.split("^")[0];
|
|
306
|
+
//old keys - remove all, all the time
|
|
307
|
+
_removeItem(key); //remove key from cache
|
|
308
|
+
}
|
|
309
|
+
catch (e) { }
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
//new format
|
|
315
|
+
expirations = cacheExpirationsKey === LOCAL_STORGAGE_EXPIRATIONS_KEY ? _getCacheExpirations() : jsonParse(_getItem(cacheExpirationsKey));
|
|
316
|
+
if (expirations) {
|
|
317
|
+
let expirationKeys = Object.keys(expirations);
|
|
318
|
+
logger.group(() => {
|
|
319
|
+
expirationKeys.forEach(keyWithPrefix => {
|
|
320
|
+
try {
|
|
321
|
+
let shouldRemoveKey = removeAllForKey || !keyWithPrefix.startsWith(keyPrefix);
|
|
322
|
+
if (!shouldRemoveKey) {
|
|
323
|
+
//check specific key expiration
|
|
324
|
+
let expirationDate = new Date(expirations[keyWithPrefix]);
|
|
325
|
+
if (!isDate(expirationDate) || expirationDate < now) {
|
|
326
|
+
shouldRemoveKey = true;
|
|
327
|
+
delete expirations[keyWithPrefix];
|
|
328
|
+
logger.info(`purging key ${keyWithPrefix}`);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
nonExpiredKeys.push(keyWithPrefix);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (shouldRemoveKey)
|
|
335
|
+
_removeItem(keyWithPrefix);
|
|
336
|
+
}
|
|
337
|
+
catch (e) {
|
|
338
|
+
logger.warn(`failed to remove key ${keyWithPrefix}`);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}, "Checking expired items", true);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (cacheExpirationsKey === LOCAL_STORGAGE_EXPIRATIONS_KEY)
|
|
345
|
+
_saveCacheExpirations();
|
|
346
|
+
else //older keys - just remove them.
|
|
347
|
+
_removeItem(cacheExpirationsKey);
|
|
348
|
+
}
|
|
349
|
+
catch (e) {
|
|
350
|
+
logger.warn(`something went terribly wrong ${e}`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
logger.group(() => {
|
|
354
|
+
logger.table(nonExpiredKeys);
|
|
355
|
+
//cleanup orphans
|
|
356
|
+
//loop on all keys
|
|
357
|
+
//if stats with: jsr_, kwfs| or keyPrefix - and not in nonExpiredKeys, it is an orphan. Remove it.
|
|
358
|
+
let localStorageKeys = Object.keys(localStorage);
|
|
359
|
+
for (let keyIdx = 0; keyIdx < localStorageKeys.length; keyIdx++) {
|
|
360
|
+
let key = localStorageKeys[keyIdx];
|
|
361
|
+
if (key.startsWith("jsr_") || key.startsWith("kwfs|")) {
|
|
362
|
+
logger.log(`removing old key ${key}`);
|
|
363
|
+
_removeItem(key); //old key
|
|
364
|
+
}
|
|
365
|
+
else if (key.startsWith(keyPrefix) && !nonExpiredKeys.includes(key)) //orphan!
|
|
366
|
+
{
|
|
367
|
+
logger.log(`removing orphan key ${key}`);
|
|
368
|
+
_removeItem(key);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}, "Expired keys", true);
|
|
372
|
+
}
|
|
373
|
+
/** cleanup - remove all local storage keys created by this utility */
|
|
374
|
+
export function clearCache() {
|
|
375
|
+
return purgeCache(true);
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
378
|
+
//# sourceMappingURL=localstoragecache.js.map
|