@kameleoon/react-sdk 7.5.0 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/kameleoonClient.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Creates an instance of KameleoonClient
|
|
3
3
|
* @param {string} siteCode - client's siteCode defined on Kameleoon platform
|
|
4
4
|
* @param {Partial<SDKConfigurationType> | undefined} configuration - client's configuration
|
|
5
|
-
*/function createClient(a,b){var c="undefined"!=typeof window&&!!window.document,d=c?new _storage.LocalStorageConstructor:new _storage.NativeStorageConstructor,e=c?new _eventSource.BrowserEventSourceConstructor:new _eventSource.NativeEventSourceConstructor,f=new _requester.RequestDispatcher,g=new _javascriptSdkCore.KameleoonCore({siteCode:a,configuration:b,internalConfiguration:{externalStorage:d,externalEventSource:e,externalRequestDispatcher:f,externalPackageInfo:{type:_javascriptSdkCore.SdkLanguageType.REACT,version:"7.5.
|
|
5
|
+
*/function createClient(a,b){var c="undefined"!=typeof window&&!!window.document,d=c?new _storage.LocalStorageConstructor:new _storage.NativeStorageConstructor,e=c?new _eventSource.BrowserEventSourceConstructor:new _eventSource.NativeEventSourceConstructor,f=new _requester.RequestDispatcher,g=new _javascriptSdkCore.KameleoonCore({siteCode:a,configuration:b,internalConfiguration:{externalStorage:d,externalEventSource:e,externalRequestDispatcher:f,externalPackageInfo:{type:_javascriptSdkCore.SdkLanguageType.REACT,version:"7.5.1"}}});return g}
|
|
6
6
|
//# sourceMappingURL=kameleoonClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kameleoonClient.js","names":["createClient","siteCode","configuration","isBrowser","window","document","storage","LocalStorageConstructor","NativeStorageConstructor","eventSource","BrowserEventSourceConstructor","NativeEventSourceConstructor","requestDispatcher","RequestDispatcher","client","KameleoonCore","internalConfiguration","externalStorage","externalEventSource","externalRequestDispatcher","externalPackageInfo","type","SdkLanguageType","REACT","version"],"sources":["../src/kameleoonClient.ts"],"sourcesContent":["import {\n KameleoonCore,\n SDKConfigurationType,\n
|
|
1
|
+
{"version":3,"file":"kameleoonClient.js","names":["createClient","siteCode","configuration","isBrowser","window","document","storage","LocalStorageConstructor","NativeStorageConstructor","eventSource","BrowserEventSourceConstructor","NativeEventSourceConstructor","requestDispatcher","RequestDispatcher","client","KameleoonCore","internalConfiguration","externalStorage","externalEventSource","externalRequestDispatcher","externalPackageInfo","type","SdkLanguageType","REACT","version"],"sources":["../src/kameleoonClient.ts"],"sourcesContent":["import {\n KameleoonCore,\n SDKConfigurationType,\n SdkLanguageType,\n IExternalStorageConstructor,\n IExternalEventSourceConstructor,\n} from '@kameleoon/javascript-sdk-core';\nimport {\n NativeEventSourceConstructor,\n BrowserEventSourceConstructor,\n} from './eventSource';\nimport { LocalStorageConstructor, NativeStorageConstructor } from './storage';\nimport { RequestDispatcher } from './requester';\n\n/**\n * Creates an instance of KameleoonClient\n * @param {string} siteCode - client's siteCode defined on Kameleoon platform\n * @param {Partial<SDKConfigurationType> | undefined} configuration - client's configuration\n */\nexport function createClient(\n siteCode: string,\n configuration?: Partial<SDKConfigurationType>,\n): KameleoonCore {\n const isBrowser = typeof window !== 'undefined' && Boolean(window.document);\n const storage: IExternalStorageConstructor = isBrowser\n ? new LocalStorageConstructor()\n : new NativeStorageConstructor();\n const eventSource: IExternalEventSourceConstructor = isBrowser\n ? new BrowserEventSourceConstructor()\n : new NativeEventSourceConstructor();\n const requestDispatcher = new RequestDispatcher();\n\n const client = new KameleoonCore({\n siteCode,\n configuration,\n internalConfiguration: {\n externalStorage: storage,\n externalEventSource: eventSource,\n externalRequestDispatcher: requestDispatcher,\n externalPackageInfo: {\n type: SdkLanguageType.REACT,\n version: process.env.npm_package_version as string,\n },\n },\n });\n\n return client;\n}\n"],"mappings":"6QAcA;AACA;AACA;AACA;AACA,GACO,QAAS,CAAAA,YAAYA,CAC1BC,CAAgB,CAChBC,CAA6C,CAC9B,IACT,CAAAC,CAAS,CAAqB,WAAW,EAA7B,MAAO,CAAAC,MAAsB,IAAYA,MAAM,CAACC,QAAS,CACrEC,CAAoC,CAAGH,CAAS,CAClD,GAAI,CAAAI,gCAAyB,CAC7B,GAAI,CAAAC,iCAA0B,CAC5BC,CAA4C,CAAGN,CAAS,CAC1D,GAAI,CAAAO,0CAA+B,CACnC,GAAI,CAAAC,yCAA8B,CAChCC,CAAiB,CAAG,GAAI,CAAAC,4BAAmB,CAE3CC,CAAM,CAAG,GAAI,CAAAC,gCAAa,CAAC,CAC/Bd,QAAQ,CAARA,CAAQ,CACRC,aAAa,CAAbA,CAAa,CACbc,qBAAqB,CAAE,CACrBC,eAAe,CAAEX,CAAO,CACxBY,mBAAmB,CAAET,CAAW,CAChCU,yBAAyB,CAAEP,CAAiB,CAC5CQ,mBAAmB,CAAE,CACnBC,IAAI,CAAEC,kCAAe,CAACC,KAAK,CAC3BC,OAAO,QACT,CACF,CACF,CAAC,CAAC,CAEF,MAAO,CAAAV,CACT"}
|