klaritics-react-native-sdk 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.
@@ -0,0 +1,282 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+
11
+ 5E555C0D2413F4C50049A1A2 /* RNApxorSDK.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNApxorSDK.m */; };
12
+
13
+ /* End PBXBuildFile section */
14
+
15
+ /* Begin PBXCopyFilesBuildPhase section */
16
+ 58B511D91A9E6C8500147676 /* CopyFiles */ = {
17
+ isa = PBXCopyFilesBuildPhase;
18
+ buildActionMask = 2147483647;
19
+ dstPath = "include/$(PRODUCT_NAME)";
20
+ dstSubfolderSpec = 16;
21
+ files = (
22
+ );
23
+ runOnlyForDeploymentPostprocessing = 0;
24
+ };
25
+ /* End PBXCopyFilesBuildPhase section */
26
+
27
+ /* Begin PBXFileReference section */
28
+ 134814201AA4EA6300B7C361 /* libRNApxorSDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNApxorSDK.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
+
30
+ B3E7B5881CC2AC0600A0062D /* RNApxorSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNApxorSDK.h; sourceTree = "<group>"; };
31
+ B3E7B5891CC2AC0600A0062D /* RNApxorSDK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNApxorSDK.m; sourceTree = "<group>"; };
32
+
33
+ /* End PBXFileReference section */
34
+
35
+ /* Begin PBXFrameworksBuildPhase section */
36
+ 58B511D81A9E6C8500147676 /* Frameworks */ = {
37
+ isa = PBXFrameworksBuildPhase;
38
+ buildActionMask = 2147483647;
39
+ files = (
40
+ );
41
+ runOnlyForDeploymentPostprocessing = 0;
42
+ };
43
+ /* End PBXFrameworksBuildPhase section */
44
+
45
+ /* Begin PBXGroup section */
46
+ 134814211AA4EA7D00B7C361 /* Products */ = {
47
+ isa = PBXGroup;
48
+ children = (
49
+ 134814201AA4EA6300B7C361 /* libRNApxorSDK.a */,
50
+ );
51
+ name = Products;
52
+ sourceTree = "<group>";
53
+ };
54
+ 58B511D21A9E6C8500147676 = {
55
+ isa = PBXGroup;
56
+ children = (
57
+
58
+ B3E7B5881CC2AC0600A0062D /* RNApxorSDK.h */,
59
+ B3E7B5891CC2AC0600A0062D /* RNApxorSDK.m */,
60
+
61
+ 134814211AA4EA7D00B7C361 /* Products */,
62
+ );
63
+ sourceTree = "<group>";
64
+ };
65
+ /* End PBXGroup section */
66
+
67
+ /* Begin PBXNativeTarget section */
68
+ 58B511DA1A9E6C8500147676 /* RNApxorSDK */ = {
69
+ isa = PBXNativeTarget;
70
+ buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNApxorSDK" */;
71
+ buildPhases = (
72
+ 58B511D71A9E6C8500147676 /* Sources */,
73
+ 58B511D81A9E6C8500147676 /* Frameworks */,
74
+ 58B511D91A9E6C8500147676 /* CopyFiles */,
75
+ );
76
+ buildRules = (
77
+ );
78
+ dependencies = (
79
+ );
80
+ name = RNApxorSDK;
81
+ productName = RCTDataManager;
82
+ productReference = 134814201AA4EA6300B7C361 /* libRNApxorSDK.a */;
83
+ productType = "com.apple.product-type.library.static";
84
+ };
85
+ /* End PBXNativeTarget section */
86
+
87
+ /* Begin PBXProject section */
88
+ 58B511D31A9E6C8500147676 /* Project object */ = {
89
+ isa = PBXProject;
90
+ attributes = {
91
+ LastUpgradeCheck = 0920;
92
+ ORGANIZATIONNAME = Facebook;
93
+ TargetAttributes = {
94
+ 58B511DA1A9E6C8500147676 = {
95
+ CreatedOnToolsVersion = 6.1.1;
96
+ };
97
+ };
98
+ };
99
+ buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNApxorSDK" */;
100
+ compatibilityVersion = "Xcode 3.2";
101
+ developmentRegion = English;
102
+ hasScannedForEncodings = 0;
103
+ knownRegions = (
104
+ English,
105
+ en,
106
+ );
107
+ mainGroup = 58B511D21A9E6C8500147676;
108
+ productRefGroup = 58B511D21A9E6C8500147676;
109
+ projectDirPath = "";
110
+ projectRoot = "";
111
+ targets = (
112
+ 58B511DA1A9E6C8500147676 /* RNApxorSDK */,
113
+ );
114
+ };
115
+ /* End PBXProject section */
116
+
117
+ /* Begin PBXSourcesBuildPhase section */
118
+ 58B511D71A9E6C8500147676 /* Sources */ = {
119
+ isa = PBXSourcesBuildPhase;
120
+ buildActionMask = 2147483647;
121
+ files = (
122
+
123
+ B3E7B58A1CC2AC0600A0062D /* RNApxorSDK.m in Sources */,
124
+
125
+ );
126
+ runOnlyForDeploymentPostprocessing = 0;
127
+ };
128
+ /* End PBXSourcesBuildPhase section */
129
+
130
+ /* Begin XCBuildConfiguration section */
131
+ 58B511ED1A9E6C8500147676 /* Debug */ = {
132
+ isa = XCBuildConfiguration;
133
+ buildSettings = {
134
+ ALWAYS_SEARCH_USER_PATHS = NO;
135
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
136
+ CLANG_CXX_LIBRARY = "libc++";
137
+ CLANG_ENABLE_MODULES = YES;
138
+ CLANG_ENABLE_OBJC_ARC = YES;
139
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
140
+ CLANG_WARN_BOOL_CONVERSION = YES;
141
+ CLANG_WARN_COMMA = YES;
142
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
143
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
144
+ CLANG_WARN_EMPTY_BODY = YES;
145
+ CLANG_WARN_ENUM_CONVERSION = YES;
146
+ CLANG_WARN_INFINITE_RECURSION = YES;
147
+ CLANG_WARN_INT_CONVERSION = YES;
148
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
149
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
150
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
151
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
152
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
153
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
154
+ CLANG_WARN_UNREACHABLE_CODE = YES;
155
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
156
+ COPY_PHASE_STRIP = NO;
157
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
158
+ ENABLE_TESTABILITY = YES;
159
+ GCC_C_LANGUAGE_STANDARD = gnu99;
160
+ GCC_DYNAMIC_NO_PIC = NO;
161
+ GCC_NO_COMMON_BLOCKS = YES;
162
+ GCC_OPTIMIZATION_LEVEL = 0;
163
+ GCC_PREPROCESSOR_DEFINITIONS = (
164
+ "DEBUG=1",
165
+ "$(inherited)",
166
+ );
167
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
168
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
169
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
170
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
171
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
172
+ GCC_WARN_UNUSED_FUNCTION = YES;
173
+ GCC_WARN_UNUSED_VARIABLE = YES;
174
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
175
+ MTL_ENABLE_DEBUG_INFO = YES;
176
+ ONLY_ACTIVE_ARCH = YES;
177
+ SDKROOT = iphoneos;
178
+ };
179
+ name = Debug;
180
+ };
181
+ 58B511EE1A9E6C8500147676 /* Release */ = {
182
+ isa = XCBuildConfiguration;
183
+ buildSettings = {
184
+ ALWAYS_SEARCH_USER_PATHS = NO;
185
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
186
+ CLANG_CXX_LIBRARY = "libc++";
187
+ CLANG_ENABLE_MODULES = YES;
188
+ CLANG_ENABLE_OBJC_ARC = YES;
189
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
190
+ CLANG_WARN_BOOL_CONVERSION = YES;
191
+ CLANG_WARN_COMMA = YES;
192
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
193
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
194
+ CLANG_WARN_EMPTY_BODY = YES;
195
+ CLANG_WARN_ENUM_CONVERSION = YES;
196
+ CLANG_WARN_INFINITE_RECURSION = YES;
197
+ CLANG_WARN_INT_CONVERSION = YES;
198
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
199
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
200
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
201
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
202
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
203
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
204
+ CLANG_WARN_UNREACHABLE_CODE = YES;
205
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
206
+ COPY_PHASE_STRIP = YES;
207
+ ENABLE_NS_ASSERTIONS = NO;
208
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
209
+ GCC_C_LANGUAGE_STANDARD = gnu99;
210
+ GCC_NO_COMMON_BLOCKS = YES;
211
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
212
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
213
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
214
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
215
+ GCC_WARN_UNUSED_FUNCTION = YES;
216
+ GCC_WARN_UNUSED_VARIABLE = YES;
217
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
218
+ MTL_ENABLE_DEBUG_INFO = NO;
219
+ SDKROOT = iphoneos;
220
+ VALIDATE_PRODUCT = YES;
221
+ };
222
+ name = Release;
223
+ };
224
+ 58B511F01A9E6C8500147676 /* Debug */ = {
225
+ isa = XCBuildConfiguration;
226
+ buildSettings = {
227
+ HEADER_SEARCH_PATHS = (
228
+ "$(inherited)",
229
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
230
+ "$(SRCROOT)/../../../React/**",
231
+ "$(SRCROOT)/../../react-native/React/**",
232
+ );
233
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
234
+ OTHER_LDFLAGS = "-ObjC";
235
+ PRODUCT_NAME = RNApxorSDK;
236
+ SKIP_INSTALL = YES;
237
+
238
+ };
239
+ name = Debug;
240
+ };
241
+ 58B511F11A9E6C8500147676 /* Release */ = {
242
+ isa = XCBuildConfiguration;
243
+ buildSettings = {
244
+ HEADER_SEARCH_PATHS = (
245
+ "$(inherited)",
246
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
247
+ "$(SRCROOT)/../../../React/**",
248
+ "$(SRCROOT)/../../react-native/React/**",
249
+ );
250
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
251
+ OTHER_LDFLAGS = "-ObjC";
252
+ PRODUCT_NAME = RNApxorSDK;
253
+ SKIP_INSTALL = YES;
254
+
255
+ };
256
+ name = Release;
257
+ };
258
+ /* End XCBuildConfiguration section */
259
+
260
+ /* Begin XCConfigurationList section */
261
+ 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNApxorSDK" */ = {
262
+ isa = XCConfigurationList;
263
+ buildConfigurations = (
264
+ 58B511ED1A9E6C8500147676 /* Debug */,
265
+ 58B511EE1A9E6C8500147676 /* Release */,
266
+ );
267
+ defaultConfigurationIsVisible = 0;
268
+ defaultConfigurationName = Release;
269
+ };
270
+ 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNApxorSDK" */ = {
271
+ isa = XCConfigurationList;
272
+ buildConfigurations = (
273
+ 58B511F01A9E6C8500147676 /* Debug */,
274
+ 58B511F11A9E6C8500147676 /* Release */,
275
+ );
276
+ defaultConfigurationIsVisible = 0;
277
+ defaultConfigurationName = Release;
278
+ };
279
+ /* End XCConfigurationList section */
280
+ };
281
+ rootObject = 58B511D31A9E6C8500147676 /* Project object */;
282
+ }
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ApxorView=ApxorView;exports.KlariticsProvider=KlariticsProvider;exports.default=void 0;exports.handlePushNotification=handlePushNotification;exports.logAggregateEvent=logAggregateEvent;exports.logAppEvent=logAppEvent;exports.logClientEvent=logClientEvent;exports.logNavigationEvent=logNavigationEvent;exports.registerSimpleNotification=registerSimpleNotification;exports.setApxorDynamicConfig=setApxorDynamicConfig;exports.setSessionCustomInfo=setSessionCustomInfo;exports.setUserCustomInfo=setUserCustomInfo;exports.setUserIdentifier=setUserIdentifier;exports.setup=setup;exports.trackScreen=trackScreen;exports.unregisterSimpleNotification=unregisterSimpleNotification;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=require("react");var _reactNative=require("react-native");var _utils=require("./utils");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/dasarikousik/Desktop/Anthra/react-native-anthra-sdk/packages/klaritics-react-native-sdk/src/index.tsx";var _excluded=["children","tag"];var Klaritics=_reactNative.NativeModules.Klaritics;function setup(apiKey,options){if(apiKey===undefined||apiKey===null||apiKey.trim()===''){console.error('apiKey cannot be null or empty');return;}if(!options||!options.host||options.host.trim()===''){console.error('options.host cannot be null or empty');return;}Klaritics.setup(apiKey,options.host);}function KlariticsProvider(_ref){var apiKey=_ref.apiKey,options=_ref.options,children=_ref.children;(0,_react.useEffect)(function(){return setup(apiKey,options);},[]);return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});}function ApxorView(_ref2){var children=_ref2.children,_ref2$tag=_ref2.tag,tag=_ref2$tag===void 0?'':_ref2$tag,others=(0,_objectWithoutProperties2.default)(_ref2,_excluded);var nativeID=(0,_react.useMemo)(function(){return`tag_${(0,_utils.getTag)(tag)}`;},[]);return(0,_jsxRuntime.jsx)(_reactNative.View,Object.assign({nativeID:nativeID},others,{children:children}));}function setUserIdentifier(userId){if(userId===undefined||userId===null||userId.trim()===''){console.error('User Id cannot be null or empty');return;}Klaritics.setUserIdentifier(userId);}function setUserCustomInfo(userAttributes){Klaritics.setUserCustomInfo((0,_utils.pruneAttributes)(userAttributes));}function logAppEvent(eventName){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var isAggregate=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(eventName===undefined||eventName===null||eventName.trim()===''){console.error('Event name cannot be null or empty');return;}Klaritics.logAppEvent(eventName,(0,_utils.pruneAttributes)(attributes),isAggregate);}function logAggregateEvent(eventName,attributes){if(eventName===undefined||eventName===null||eventName.trim()===''){console.error('Event name cannot be null or empty');return;}Klaritics.logAppEvent(eventName,(0,_utils.pruneAttributes)(attributes),true);}function logClientEvent(eventName){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(eventName===undefined||eventName===null||eventName.trim()===''){console.error('Event name cannot be null or empty');return;}Klaritics.logClientEvent(eventName,(0,_utils.pruneAttributes)(attributes));}function setSessionCustomInfo(sessionAttributes){Klaritics.setSessionCustomInfo((0,_utils.pruneAttributes)(sessionAttributes));}function logNavigationEvent(screenName){if(screenName===undefined||screenName===null||screenName.trim()===''){console.error('Screen name cannot be null or empty');return;}Klaritics.logNavigationEvent(screenName);}function trackScreen(screenName){if(screenName===undefined||screenName===null||screenName.trim()===''){console.error('Screen name cannot be null or empty');return;}Klaritics.trackScreen(screenName);}function handlePushNotification(){var remoteMessage=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(remoteMessage&&remoteMessage.data&&Boolean(remoteMessage.data.is_apx)){Klaritics.handlePushNotification(remoteMessage.data);return true;}return false;}function registerSimpleNotification(notification,key){if(notification==null||key==null){console.error('Notification, key must not be null');return;}console.log('notification recieved');Klaritics.registerSimpleNotification(notification,key);}function unregisterSimpleNotification(notification,key){if(notification==null||key==null){console.error('Notification, key must not be null');return;}Klaritics.unregisterSimpleNotification(notification,key);}function setApxorDynamicConfig(key,value){if(key==null||value==null){console.error('Key and Value must not be null');return;}Klaritics.setApxorDynamicConfig(key,value);}var _default=exports.default={KlariticsProvider:KlariticsProvider,setup:setup,ApxorView:ApxorView,setUserIdentifier:setUserIdentifier,setUserCustomInfo:setUserCustomInfo,logAppEvent:logAppEvent,logAggregateEvent:logAggregateEvent,logClientEvent:logClientEvent,setSessionCustomInfo:setSessionCustomInfo,logNavigationEvent:logNavigationEvent,trackScreen:trackScreen,handlePushNotification:handlePushNotification,registerSimpleNotification:registerSimpleNotification,unregisterSimpleNotification:unregisterSimpleNotification,setApxorDynamicConfig:setApxorDynamicConfig};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_utils","_jsxRuntime","_jsxFileName","_excluded","Klaritics","NativeModules","setup","apiKey","options","undefined","trim","console","error","host","KlariticsProvider","_ref","children","useEffect","jsx","Fragment","ApxorView","_ref2","_ref2$tag","tag","others","_objectWithoutProperties2","default","nativeID","useMemo","getTag","View","Object","assign","setUserIdentifier","userId","setUserCustomInfo","userAttributes","pruneAttributes","logAppEvent","eventName","attributes","arguments","length","isAggregate","logAggregateEvent","logClientEvent","setSessionCustomInfo","sessionAttributes","logNavigationEvent","screenName","trackScreen","handlePushNotification","remoteMessage","data","Boolean","is_apx","registerSimpleNotification","notification","key","log","unregisterSimpleNotification","setApxorDynamicConfig","value","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"m6BAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,MAAA,CAAAF,OAAA,YAAiD,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,YAAA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,OACF,CAEAR,SAAS,CAACyD,qBAAqB,CAACH,GAAG,CAAEI,KAAK,CAAC,CAC7C,CAAC,IAAAC,QAAA,CAAAC,OAAA,CAAAtC,OAAA,CAGc,CACbZ,iBAAiB,CAAjBA,iBAAiB,CACjBR,KAAK,CAALA,KAAK,CACLc,SAAS,CAATA,SAAS,CACTa,iBAAiB,CAAjBA,iBAAiB,CACjBE,iBAAiB,CAAjBA,iBAAiB,CACjBG,WAAW,CAAXA,WAAW,CACXM,iBAAiB,CAAjBA,iBAAiB,CACjBC,cAAc,CAAdA,cAAc,CACdC,oBAAoB,CAApBA,oBAAoB,CACpBE,kBAAkB,CAAlBA,kBAAkB,CAClBE,WAAW,CAAXA,WAAW,CACXC,sBAAsB,CAAtBA,sBAAsB,CACtBK,0BAA0B,CAA1BA,0BAA0B,CAC1BI,4BAA4B,CAA5BA,4BAA4B,CAC5BC,qBAAqB,CAArBA,qBACF,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.getTag=getTag;exports.isValidValue=isValidValue;exports.pruneAttributes=pruneAttributes;function getTag(tag){return tag.toLowerCase().replace(/[\s]+/g,'_');}function isValidValue(aValue){if(typeof aValue==='number'&&(isNaN(aValue)||!isFinite(aValue))){return false;}else if(aValue===undefined||aValue==null){return false;}return true;}function pruneAttributes(obj){if(typeof obj!=='object'){return{};}for(var key in obj){if(typeof obj[key]==='object'){obj[key]=pruneAttributes(obj[key]);if(Object.keys(obj[key]).length===0){delete obj[key];}}else if(!isValidValue(obj[key])){delete obj[key];}}return obj;}
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getTag","tag","toLowerCase","replace","isValidValue","aValue","isNaN","isFinite","undefined","pruneAttributes","obj","key","Object","keys","length"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":"yJAKO,QAAS,CAAAA,MAAMA,CAACC,GAAW,CAAE,CAClC,MAAO,CAAAA,GAAG,CAACC,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,QAAQ,CAAE,GAAG,CAAC,CACjD,CAOO,QAAS,CAAAC,YAAYA,CAACC,MAAe,CAAE,CAC5C,GAAI,MAAO,CAAAA,MAAM,GAAK,QAAQ,GAAKC,KAAK,CAACD,MAAM,CAAC,EAAI,CAACE,QAAQ,CAACF,MAAM,CAAC,CAAC,CAAE,CACtE,MAAO,MAAK,CACd,CAAC,IAAM,IAAIA,MAAM,GAAKG,SAAS,EAAIH,MAAM,EAAI,IAAI,CAAE,CACjD,MAAO,MAAK,CACd,CACA,MAAO,KAAI,CACb,CAOO,QAAS,CAAAI,eAAeA,CAACC,GAAQ,CAAE,CACxC,GAAI,MAAO,CAAAA,GAAG,GAAK,QAAQ,CAAE,CAC3B,MAAO,CAAC,CAAC,CACX,CACA,IAAK,GAAM,CAAAC,GAAG,GAAI,CAAAD,GAAG,CAAE,CACrB,GAAI,MAAO,CAAAA,GAAG,CAACC,GAAG,CAAC,GAAK,QAAQ,CAAE,CAChCD,GAAG,CAACC,GAAG,CAAC,CAAGF,eAAe,CAACC,GAAG,CAACC,GAAG,CAAC,CAAC,CACpC,GAAIC,MAAM,CAACC,IAAI,CAACH,GAAG,CAACC,GAAG,CAAC,CAAC,CAACG,MAAM,GAAK,CAAC,CAAE,CACtC,MAAO,CAAAJ,GAAG,CAACC,GAAG,CAAC,CACjB,CACF,CAAC,IAAM,IAAI,CAACP,YAAY,CAACM,GAAG,CAACC,GAAG,CAAC,CAAC,CAAE,CAClC,MAAO,CAAAD,GAAG,CAACC,GAAG,CAAC,CACjB,CACF,CACA,MAAO,CAAAD,GAAG,CACZ","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.ApxorView=ApxorView;exports.KlariticsProvider=KlariticsProvider;exports.default=void 0;exports.handlePushNotification=handlePushNotification;exports.logAggregateEvent=logAggregateEvent;exports.logAppEvent=logAppEvent;exports.logClientEvent=logClientEvent;exports.logNavigationEvent=logNavigationEvent;exports.registerSimpleNotification=registerSimpleNotification;exports.setApxorDynamicConfig=setApxorDynamicConfig;exports.setSessionCustomInfo=setSessionCustomInfo;exports.setUserCustomInfo=setUserCustomInfo;exports.setUserIdentifier=setUserIdentifier;exports.setup=setup;exports.trackScreen=trackScreen;exports.unregisterSimpleNotification=unregisterSimpleNotification;var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=require("react");var _reactNative=require("react-native");var _utils=require("./utils");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/dasarikousik/Desktop/Anthra/react-native-anthra-sdk/packages/klaritics-react-native-sdk/src/index.tsx";var _excluded=["children","tag"];var Klaritics=_reactNative.NativeModules.Klaritics;function setup(apiKey,options){if(apiKey===undefined||apiKey===null||apiKey.trim()===''){console.error('apiKey cannot be null or empty');return;}if(!options||!options.host||options.host.trim()===''){console.error('options.host cannot be null or empty');return;}Klaritics.setup(apiKey,options.host);}function KlariticsProvider(_ref){var apiKey=_ref.apiKey,options=_ref.options,children=_ref.children;(0,_react.useEffect)(function(){return setup(apiKey,options);},[]);return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children});}function ApxorView(_ref2){var children=_ref2.children,_ref2$tag=_ref2.tag,tag=_ref2$tag===void 0?'':_ref2$tag,others=(0,_objectWithoutProperties2.default)(_ref2,_excluded);var nativeID=(0,_react.useMemo)(function(){return`tag_${(0,_utils.getTag)(tag)}`;},[]);return(0,_jsxRuntime.jsx)(_reactNative.View,Object.assign({nativeID:nativeID},others,{children:children}));}function setUserIdentifier(userId){if(userId===undefined||userId===null||userId.trim()===''){console.error('User Id cannot be null or empty');return;}Klaritics.setUserIdentifier(userId);}function setUserCustomInfo(userAttributes){Klaritics.setUserCustomInfo((0,_utils.pruneAttributes)(userAttributes));}function logAppEvent(eventName){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var isAggregate=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(eventName===undefined||eventName===null||eventName.trim()===''){console.error('Event name cannot be null or empty');return;}Klaritics.logAppEvent(eventName,(0,_utils.pruneAttributes)(attributes),isAggregate);}function logAggregateEvent(eventName,attributes){if(eventName===undefined||eventName===null||eventName.trim()===''){console.error('Event name cannot be null or empty');return;}Klaritics.logAppEvent(eventName,(0,_utils.pruneAttributes)(attributes),true);}function logClientEvent(eventName){var attributes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(eventName===undefined||eventName===null||eventName.trim()===''){console.error('Event name cannot be null or empty');return;}Klaritics.logClientEvent(eventName,(0,_utils.pruneAttributes)(attributes));}function setSessionCustomInfo(sessionAttributes){Klaritics.setSessionCustomInfo((0,_utils.pruneAttributes)(sessionAttributes));}function logNavigationEvent(screenName){if(screenName===undefined||screenName===null||screenName.trim()===''){console.error('Screen name cannot be null or empty');return;}Klaritics.logNavigationEvent(screenName);}function trackScreen(screenName){if(screenName===undefined||screenName===null||screenName.trim()===''){console.error('Screen name cannot be null or empty');return;}Klaritics.trackScreen(screenName);}function handlePushNotification(){var remoteMessage=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(remoteMessage&&remoteMessage.data&&Boolean(remoteMessage.data.is_apx)){Klaritics.handlePushNotification(remoteMessage.data);return true;}return false;}function registerSimpleNotification(notification,key){if(notification==null||key==null){console.error('Notification, key must not be null');return;}console.log('notification recieved');Klaritics.registerSimpleNotification(notification,key);}function unregisterSimpleNotification(notification,key){if(notification==null||key==null){console.error('Notification, key must not be null');return;}Klaritics.unregisterSimpleNotification(notification,key);}function setApxorDynamicConfig(key,value){if(key==null||value==null){console.error('Key and Value must not be null');return;}Klaritics.setApxorDynamicConfig(key,value);}var _default=exports.default={KlariticsProvider:KlariticsProvider,setup:setup,ApxorView:ApxorView,setUserIdentifier:setUserIdentifier,setUserCustomInfo:setUserCustomInfo,logAppEvent:logAppEvent,logAggregateEvent:logAggregateEvent,logClientEvent:logClientEvent,setSessionCustomInfo:setSessionCustomInfo,logNavigationEvent:logNavigationEvent,trackScreen:trackScreen,handlePushNotification:handlePushNotification,registerSimpleNotification:registerSimpleNotification,unregisterSimpleNotification:unregisterSimpleNotification,setApxorDynamicConfig:setApxorDynamicConfig};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_utils","_jsxRuntime","_jsxFileName","_excluded","Klaritics","NativeModules","setup","apiKey","options","undefined","trim","console","error","host","KlariticsProvider","_ref","children","useEffect","jsx","Fragment","ApxorView","_ref2","_ref2$tag","tag","others","_objectWithoutProperties2","default","nativeID","useMemo","getTag","View","Object","assign","setUserIdentifier","userId","setUserCustomInfo","userAttributes","pruneAttributes","logAppEvent","eventName","attributes","arguments","length","isAggregate","logAggregateEvent","logClientEvent","setSessionCustomInfo","sessionAttributes","logNavigationEvent","screenName","trackScreen","handlePushNotification","remoteMessage","data","Boolean","is_apx","registerSimpleNotification","notification","key","log","unregisterSimpleNotification","setApxorDynamicConfig","value","_default","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"m6BAAA,IAAAA,MAAA,CAAAC,OAAA,UACA,IAAAC,YAAA,CAAAD,OAAA,iBACA,IAAAE,MAAA,CAAAF,OAAA,YAAiD,IAAAG,WAAA,CAAAH,OAAA,0BAAAI,YAAA,oHAAAC,SAAA,oBAEjD,GAAQ,CAAAC,SAAS,CAAKC,0BAAa,CAA3BD,SAAS,CA+BV,QAAS,CAAAE,KAAKA,CAACC,MAAc,CAAEC,OAAyB,CAAE,CAC/D,GAAID,MAAM,GAAKE,SAAS,EAAIF,MAAM,GAAK,IAAI,EAAIA,MAAM,CAACG,IAAI,CAAC,CAAC,GAAK,EAAE,CAAE,CACnEC,OAAO,CAACC,KAAK,CAAC,gCAAgC,CAAC,CAC/C,OACF,CACA,GAAI,CAACJ,OAAO,EAAI,CAACA,OAAO,CAACK,IAAI,EAAIL,OAAO,CAACK,IAAI,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B,CACpBE,kBAAkB,CAAlBA,kBAAkB,CAClBE,WAAW,CAAXA,WAAW,CACXC,sBAAsB,CAAtBA,sBAAsB,CACtBK,0BAA0B,CAA1BA,0BAA0B,CAC1BI,4BAA4B,CAA5BA,4BAA4B,CAC5BC,qBAAqB,CAArBA,qBACF,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.getTag=getTag;exports.isValidValue=isValidValue;exports.pruneAttributes=pruneAttributes;function getTag(tag){return tag.toLowerCase().replace(/[\s]+/g,'_');}function isValidValue(aValue){if(typeof aValue==='number'&&(isNaN(aValue)||!isFinite(aValue))){return false;}else if(aValue===undefined||aValue==null){return false;}return true;}function pruneAttributes(obj){if(typeof obj!=='object'){return{};}for(var key in obj){if(typeof obj[key]==='object'){obj[key]=pruneAttributes(obj[key]);if(Object.keys(obj[key]).length===0){delete obj[key];}}else if(!isValidValue(obj[key])){delete obj[key];}}return obj;}
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getTag","tag","toLowerCase","replace","isValidValue","aValue","isNaN","isFinite","undefined","pruneAttributes","obj","key","Object","keys","length"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":"yJAKO,QAAS,CAAAA,MAAMA,CAACC,GAAW,CAAE,CAClC,MAAO,CAAAA,GAAG,CAACC,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,QAAQ,CAAE,GAAG,CAAC,CACjD,CAOO,QAAS,CAAAC,YAAYA,CAACC,MAAe,CAAE,CAC5C,GAAI,MAAO,CAAAA,MAAM,GAAK,QAAQ,GAAKC,KAAK,CAACD,MAAM,CAAC,EAAI,CAACE,QAAQ,CAACF,MAAM,CAAC,CAAC,CAAE,CACtE,MAAO,MAAK,CACd,CAAC,IAAM,IAAIA,MAAM,GAAKG,SAAS,EAAIH,MAAM,EAAI,IAAI,CAAE,CACjD,MAAO,MAAK,CACd,CACA,MAAO,KAAI,CACb,CAOO,QAAS,CAAAI,eAAeA,CAACC,GAAQ,CAAE,CACxC,GAAI,MAAO,CAAAA,GAAG,GAAK,QAAQ,CAAE,CAC3B,MAAO,CAAC,CAAC,CACX,CACA,IAAK,GAAM,CAAAC,GAAG,GAAI,CAAAD,GAAG,CAAE,CACrB,GAAI,MAAO,CAAAA,GAAG,CAACC,GAAG,CAAC,GAAK,QAAQ,CAAE,CAChCD,GAAG,CAACC,GAAG,CAAC,CAAGF,eAAe,CAACC,GAAG,CAACC,GAAG,CAAC,CAAC,CACpC,GAAIC,MAAM,CAACC,IAAI,CAACH,GAAG,CAACC,GAAG,CAAC,CAAC,CAACG,MAAM,GAAK,CAAC,CAAE,CACtC,MAAO,CAAAJ,GAAG,CAACC,GAAG,CAAC,CACjB,CACF,CAAC,IAAM,IAAI,CAACP,YAAY,CAACM,GAAG,CAACC,GAAG,CAAC,CAAC,CAAE,CAClC,MAAO,CAAAD,GAAG,CAACC,GAAG,CAAC,CACjB,CACF,CACA,MAAO,CAAAD,GAAG,CACZ","ignoreList":[]}
@@ -0,0 +1,225 @@
1
+ import { type ReactNode } from 'react';
2
+ import { ViewProps } from 'react-native';
3
+ interface KlariticsOptions {
4
+ /**
5
+ * Server URL to send data to, e.g. `https://server.example.klaritics.com`
6
+ * (no trailing slash). Required.
7
+ */
8
+ host: string;
9
+ }
10
+ interface KlariticsProviderProps {
11
+ /**
12
+ * A unique application key obtained from the Klaritics dashboard.
13
+ */
14
+ apiKey: string;
15
+ options: KlariticsOptions;
16
+ children?: ReactNode;
17
+ }
18
+ /**
19
+ *
20
+ * Initialise the Klaritics SDK. Maps to the native
21
+ * `Klaritics.setup(context, new KlariticsConfig(appId, host))`.
22
+ *
23
+ * @param {string} apiKey - A unique application key from the Klaritics dashboard.
24
+ * @param {KlariticsOptions} options - SDK options. `host` is required.
25
+ *
26
+ * @example
27
+ * setup('<klaritics_app_id>', { host: 'https://us.i.klaritics.com' })
28
+ *
29
+ */
30
+ export declare function setup(apiKey: string, options: KlariticsOptions): void;
31
+ /**
32
+ *
33
+ * Provider that initialises the Klaritics SDK when mounted and renders its
34
+ * children. Place it near the root of your app.
35
+ *
36
+ * @example
37
+ * <KlariticsProvider
38
+ * apiKey='<klaritics_app_id>'
39
+ * options={{ host: 'https://us.i.klaritics.com' }}
40
+ * >
41
+ * <MyComponent />
42
+ * </KlariticsProvider>
43
+ *
44
+ */
45
+ export declare function KlariticsProvider({ apiKey, options, children, }: KlariticsProviderProps): import("react").JSX.Element;
46
+ interface ApxorViewProps extends ViewProps {
47
+ tag?: string;
48
+ }
49
+ /**
50
+ * A wrapper over React Native's `View` component to track the View changes in the app.
51
+ *
52
+ * **NOTE**:
53
+ * 1. Fundamentally, tags are meant to be constant and unique.
54
+ * 2. Even if they change at runtime, ApxorSDK ignores them.
55
+ *
56
+ * @example
57
+ * <ApxorView
58
+ * tag='<unique_constant_tag>'
59
+ * {...otherViewProps}
60
+ * >
61
+ * // Your code goes here
62
+ * </ApxorView>
63
+ *
64
+ */
65
+ export declare function ApxorView({ children, tag, ...others }: ApxorViewProps): import("react").JSX.Element;
66
+ /**
67
+ *
68
+ * Set a Unique ID for each user. A User ID can be email, phone number etc.
69
+ * @param {string} userId - A Unique ID.
70
+ *
71
+ * @example
72
+ * RNApxorSDK.setUserIdentifier("john@doe.com")
73
+ *
74
+ */
75
+ export declare function setUserIdentifier(userId: string): void;
76
+ /**
77
+ *
78
+ * Set attributes with which we can identify and group users. User attributes can be gender, city, LoginMode/SignupMode etc.
79
+ * @param {object} userAttributes - User attributes in the form of key-value pairs.
80
+ *
81
+ * @example
82
+ * RNApxorSDK.setUserCustomInfo({
83
+ * gender: "Male",
84
+ * city: "New York",
85
+ * })
86
+ *
87
+ */
88
+ export declare function setUserCustomInfo(userAttributes: object): void;
89
+ /**
90
+ *
91
+ * Logs an app event.
92
+ * @param {string} eventName - Name of the event.
93
+ * @param {object|null} [attributes=null] - Attributes of the event in the form of key-value pairs.
94
+ * @param {boolean} [isAggregate=false] - Whether the event is an aggregate event or not. Defaults to `false`.
95
+ *
96
+ * @example
97
+ * RNApxorSDK.logAppEvent('ADD_TO_CART', {
98
+ * userId: 'john@doe.com',
99
+ * value: 1299,
100
+ * item: 'Sony Head Phones 1201',
101
+ * })
102
+ *
103
+ */
104
+ export declare function logAppEvent(eventName: string, attributes?: object | null, isAggregate?: boolean): void;
105
+ /**
106
+ * Logs an aggregate event.
107
+ * @param {string} eventName - Name of the event.
108
+ * @param {object} attributes - Attributes of the event in the form of key-value pairs.
109
+ *
110
+ * @example
111
+ * RNApxorSDK.logAggregateEvent("Login", {
112
+ * loginMode: "Google",
113
+ * id: "46Juzcyx",
114
+ * })
115
+ *
116
+ */
117
+ export declare function logAggregateEvent(eventName: string, attributes: object): void;
118
+ /**
119
+ * Logs a client event.
120
+ * @param {string} eventName - Name of the event.
121
+ * @param {object|null} [attributes=null] - Attributes of the event in the form of key-value pairs.
122
+ *
123
+ * @example
124
+ * RNApxorSDK.logClientEvent("SoftBackPressed", {
125
+ * Screen: "HomeScreen",
126
+ * })
127
+ *
128
+ */
129
+ export declare function logClientEvent(eventName: string, attributes?: object | null): void;
130
+ /**
131
+ *
132
+ * Set session attributes.
133
+ * @param {object} sessionAttributes - Session attributes in the form of key-value pairs.
134
+ *
135
+ * @example
136
+ * RNApxorSDK.setSessionCustomInfo({
137
+ * network: "4G",
138
+ * })
139
+ *
140
+ */
141
+ export declare function setSessionCustomInfo(sessionAttributes: object): void;
142
+ /**
143
+ * Logs a navigation event.
144
+ * @param {string} screenName - Name of the screen.
145
+ *
146
+ * **NOTE** : Only use this method on every screen change callback if you are not using the [this snippet for automatic screen tracking](https://guides.apxor.com/getting-started-with-apxor/api-guides/react-native#track-navigation).
147
+ *
148
+ * @example
149
+ * RNApxorSDK.logNavigationEvent("HomeScreen")
150
+ *
151
+ */
152
+ export declare function logNavigationEvent(screenName: string): void;
153
+ /**
154
+ *
155
+ * Track tabs inside your activity to analyze time spent on each tab.
156
+ * @param {string} screenName - Name of the screen.
157
+ *
158
+ * @example
159
+ * RNApxorSDK.trackScreen("SettingsScreen")
160
+ *
161
+ */
162
+ export declare function trackScreen(screenName: string): void;
163
+ /**
164
+ *
165
+ * Handle push notifications.
166
+ * @param {any|null} [remoteMessage=null] - Remote message object.
167
+ * @returns {boolean} - Returns `true` if the message is an APX push notification, `false` otherwise.
168
+ *
169
+ * @example
170
+ * RNApxorSDK.handlePushNotification(remoteMessage)
171
+ *
172
+ */
173
+ export declare function handlePushNotification(remoteMessage?: any | null): boolean;
174
+ /**
175
+ *
176
+ * Launch an event using native device emitter when a registered notification occurs.
177
+ * @param {string} notification - Name of the notification.
178
+ * @param {string} key - Key of the notification.
179
+ *
180
+ * @example
181
+ * RNApxorSDK.registerSimpleNotification("Notification", "key")
182
+ *
183
+ */
184
+ export declare function registerSimpleNotification(notification: string, key: string): void;
185
+ /**
186
+ *
187
+ * Launch a callback for a specified notificaion when it is removed.
188
+ * @param {string} notification - Name of the notification.
189
+ * @param {string} key - Key of the notification.
190
+ *
191
+ * @example
192
+ * RNApxorSDK.unregisterSimpleNotification("Notification", "key")
193
+ *
194
+ */
195
+ export declare function unregisterSimpleNotification(notification: string, key: string): void;
196
+ /**
197
+ *
198
+ * Provide key and value of a config option that will be used by the ApxorSDK to apply dynamic changes to campaign.
199
+ * @param {string} key - Key of the config.
200
+ * @param {string} value - Value of the config.
201
+ *
202
+ * @example
203
+ * RNApxorSDK.setApxorDynamicConfig("key", "value")
204
+ *
205
+ */
206
+ export declare function setApxorDynamicConfig(key: string, value: string): void;
207
+ declare const _default: {
208
+ KlariticsProvider: typeof KlariticsProvider;
209
+ setup: typeof setup;
210
+ ApxorView: typeof ApxorView;
211
+ setUserIdentifier: typeof setUserIdentifier;
212
+ setUserCustomInfo: typeof setUserCustomInfo;
213
+ logAppEvent: typeof logAppEvent;
214
+ logAggregateEvent: typeof logAggregateEvent;
215
+ logClientEvent: typeof logClientEvent;
216
+ setSessionCustomInfo: typeof setSessionCustomInfo;
217
+ logNavigationEvent: typeof logNavigationEvent;
218
+ trackScreen: typeof trackScreen;
219
+ handlePushNotification: typeof handlePushNotification;
220
+ registerSimpleNotification: typeof registerSimpleNotification;
221
+ unregisterSimpleNotification: typeof unregisterSimpleNotification;
222
+ setApxorDynamicConfig: typeof setApxorDynamicConfig;
223
+ };
224
+ export default _default;
225
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAuB,SAAS,EAAE,MAAM,cAAc,CAAA;AAK7D,UAAU,gBAAgB;IACxB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,sBAAsB;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,gBAAgB,CAAA;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,QAW9D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,OAAO,EACP,QAAQ,GACT,EAAE,sBAAsB,+BASxB;AAED,UAAU,cAAe,SAAQ,SAAS;IACxC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,cAAc,+BAgB1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,QAM/C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,QAGvD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CACzB,SAAS,EAAE,MAAM,EACjB,UAAU,GAAE,MAAM,GAAG,IAAW,EAChC,WAAW,GAAE,OAAe,QAY7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAWtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,UAAU,GAAE,MAAM,GAAG,IAAW,QAYjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,iBAAiB,EAAE,MAAM,QAG7D;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,QAWpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,QAW7C;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,GAAE,GAAG,GAAG,IAAW,GAC/B,OAAO,CAUT;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAQ3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,QAQZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAO/D;;;;;;;;;;;;;;;;;;AAGD,wBAgBC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * A utility function to get the formatted tag name from the given string.
3
+ * @param {string} tag Tag Name
4
+ * @returns Formatted Tag Name
5
+ */
6
+ export declare function getTag(tag: string): string;
7
+ /**
8
+ * A utility function to check if the given value is valid.
9
+ * @param aValue Value to check
10
+ * @returns `true` if valid, `false` otherwise
11
+ */
12
+ export declare function isValidValue(aValue: unknown): boolean;
13
+ /**
14
+ * A utility function to prune null, NaN, undefined or Inifinity values from an object.
15
+ * @param {any} obj Object to prune
16
+ * @returns The Pruned object
17
+ */
18
+ export declare function pruneAttributes(obj: any): any;
19
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,UAEjC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,WAO3C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,OAevC"}