@microsoft/sp-diagnostics 1.23.2 → 1.24.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/78359e4b-07c2-43c6-8d0b-d060b4d577e8.manifest.json +6 -11
  2. package/dist/index-internal-beta.d.ts +22 -0
  3. package/dist/index-internal-public.d.ts +22 -0
  4. package/dist/index-internal.d.ts +22 -0
  5. package/dist/sp-diagnostics_none_ebdbca9bc199b51d4466.js +1 -0
  6. package/dist/tsdoc-metadata.json +1 -1
  7. package/lib-commonjs/Api/Engagement/EngagementLogger.js +91 -96
  8. package/lib-commonjs/Api/Engagement/IEngagementHandler.js +9 -3
  9. package/lib-commonjs/Api/ExecutionQueue.js +73 -86
  10. package/lib-commonjs/Api/ILogData.js +6 -3
  11. package/lib-commonjs/Api/ILogEntry.js +5 -2
  12. package/lib-commonjs/Api/ILogErrorData.js +6 -3
  13. package/lib-commonjs/Api/ILogSource.js +10 -3
  14. package/lib-commonjs/Api/ILogVerboseData.js +6 -3
  15. package/lib-commonjs/Api/Log/LogHandler.js +27 -26
  16. package/lib-commonjs/Api/LogEntry.js +40 -39
  17. package/lib-commonjs/Api/LogFeature.js +14 -10
  18. package/lib-commonjs/Api/LogLevel.js +22 -19
  19. package/lib-commonjs/Api/LogManager/CircularBuffer.js +56 -64
  20. package/lib-commonjs/Api/LogManager/LogManager.js +61 -78
  21. package/lib-commonjs/Api/LogSource.js +37 -35
  22. package/lib-commonjs/Api/LogType.js +20 -15
  23. package/lib-commonjs/Api/Qos/AutoAlertableQosMonitor.js +68 -82
  24. package/lib-commonjs/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +5 -2
  25. package/lib-commonjs/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +5 -2
  26. package/lib-commonjs/Api/Qos/IQos.js +5 -2
  27. package/lib-commonjs/Api/Qos/IQosEndEvent.js +5 -2
  28. package/lib-commonjs/Api/Qos/IQosExtraData.js +15 -3
  29. package/lib-commonjs/Api/Qos/IQosStartEvent.js +9 -3
  30. package/lib-commonjs/Api/Qos/QosLogger.js +54 -60
  31. package/lib-commonjs/Api/Qos/QosMonitor.js +163 -209
  32. package/lib-commonjs/Api/Qos/QosMonitorShareFailureWithCP.js +72 -92
  33. package/lib-commonjs/Api/Qos/QosResultType.js +14 -7
  34. package/lib-commonjs/Api/Trace/DefaultTraceHandler.js +20 -22
  35. package/lib-commonjs/Api/Trace/ITraceHandler.js +9 -3
  36. package/lib-commonjs/Api/Trace/ITraceLogger.js +5 -2
  37. package/lib-commonjs/Api/Trace/LogEvent.js +86 -125
  38. package/lib-commonjs/Api/Trace/TraceLogger.js +149 -161
  39. package/lib-commonjs/Diagnostics.js +68 -72
  40. package/lib-commonjs/DiagnosticsSettingsManager.js +48 -43
  41. package/lib-commonjs/IDiagnosticsSettings.js +5 -2
  42. package/lib-commonjs/common/Killswitches.js +13 -9
  43. package/lib-commonjs/extraData/DisplayApp.js +13 -5
  44. package/lib-commonjs/extraData/IDiagnosticContextInfo.js +5 -2
  45. package/lib-commonjs/extraData/IPageExtraData.js +5 -2
  46. package/lib-commonjs/extraData/PageType.js +15 -8
  47. package/lib-commonjs/extraData/PromotedState.js +18 -13
  48. package/lib-commonjs/extraData/WebTemplateId.js +13 -5
  49. package/lib-commonjs/extraData/setPageExtraData.js +37 -37
  50. package/lib-commonjs/index.js +102 -50
  51. package/{lib → lib-dts}/Api/Engagement/IEngagementHandler.d.ts +2 -0
  52. package/{lib → lib-dts}/Diagnostics.d.ts +11 -0
  53. package/{lib → lib-dts}/DiagnosticsSettingsManager.d.ts +4 -0
  54. package/lib-esm/Api/Engagement/EngagementLogger.js +137 -0
  55. package/lib-esm/Api/Engagement/IEngagementHandler.js +9 -0
  56. package/lib-esm/Api/ExecutionQueue.js +114 -0
  57. package/lib-esm/Api/ILogData.js +4 -0
  58. package/lib-esm/Api/ILogEntry.js +3 -0
  59. package/lib-esm/Api/ILogErrorData.js +4 -0
  60. package/lib-esm/Api/ILogSource.js +8 -0
  61. package/lib-esm/Api/ILogVerboseData.js +4 -0
  62. package/lib-esm/Api/Log/LogHandler.js +37 -0
  63. package/lib-esm/Api/LogEntry.js +44 -0
  64. package/lib-esm/Api/LogFeature.js +8 -0
  65. package/lib-esm/Api/LogLevel.js +20 -0
  66. package/lib-esm/Api/LogManager/CircularBuffer.js +83 -0
  67. package/lib-esm/Api/LogManager/LogManager.js +103 -0
  68. package/lib-esm/Api/LogSource.js +32 -0
  69. package/lib-esm/Api/LogType.js +20 -0
  70. package/lib-esm/Api/Qos/AutoAlertableQosMonitor.js +74 -0
  71. package/lib-esm/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +6 -0
  72. package/lib-esm/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +6 -0
  73. package/lib-esm/Api/Qos/IQos.js +6 -0
  74. package/lib-esm/Api/Qos/IQosEndEvent.js +6 -0
  75. package/lib-esm/Api/Qos/IQosExtraData.js +12 -0
  76. package/lib-esm/Api/Qos/IQosStartEvent.js +6 -0
  77. package/lib-esm/Api/Qos/QosLogger.js +64 -0
  78. package/lib-esm/Api/Qos/QosMonitor.js +258 -0
  79. package/lib-esm/Api/Qos/QosMonitorShareFailureWithCP.js +89 -0
  80. package/lib-esm/Api/Qos/QosResultType.js +11 -0
  81. package/lib-esm/Api/Trace/DefaultTraceHandler.js +23 -0
  82. package/lib-esm/Api/Trace/ITraceHandler.js +9 -0
  83. package/lib-esm/Api/Trace/ITraceLogger.js +3 -0
  84. package/lib-esm/Api/Trace/LogEvent.js +104 -0
  85. package/lib-esm/Api/Trace/TraceLogger.js +180 -0
  86. package/lib-esm/Diagnostics.js +78 -0
  87. package/lib-esm/DiagnosticsSettingsManager.js +65 -0
  88. package/lib-esm/IDiagnosticsSettings.js +3 -0
  89. package/{lib → lib-esm}/common/Killswitches.js +3 -4
  90. package/{lib → lib-esm}/extraData/DisplayApp.js +3 -2
  91. package/lib-esm/extraData/IDiagnosticContextInfo.js +7 -0
  92. package/lib-esm/extraData/IPageExtraData.js +3 -0
  93. package/{lib → lib-esm}/extraData/PageType.js +4 -4
  94. package/lib-esm/extraData/PromotedState.js +15 -0
  95. package/{lib → lib-esm}/extraData/WebTemplateId.js +3 -2
  96. package/{lib → lib-esm}/extraData/setPageExtraData.js +14 -20
  97. package/{lib → lib-esm}/index.js +3 -3
  98. package/package.json +33 -6
  99. package/dist/sp-diagnostics_none_414da724f4073ce8bb98.js +0 -1
  100. package/lib/Api/Engagement/EngagementLogger.d.ts.map +0 -1
  101. package/lib/Api/Engagement/EngagementLogger.js +0 -143
  102. package/lib/Api/Engagement/IEngagementHandler.d.ts.map +0 -1
  103. package/lib/Api/Engagement/IEngagementHandler.js +0 -2
  104. package/lib/Api/ExecutionQueue.d.ts.map +0 -1
  105. package/lib/Api/ExecutionQueue.js +0 -131
  106. package/lib/Api/ILogData.d.ts.map +0 -1
  107. package/lib/Api/ILogData.js +0 -3
  108. package/lib/Api/ILogEntry.d.ts.map +0 -1
  109. package/lib/Api/ILogEntry.js +0 -2
  110. package/lib/Api/ILogErrorData.d.ts.map +0 -1
  111. package/lib/Api/ILogErrorData.js +0 -3
  112. package/lib/Api/ILogSource.d.ts.map +0 -1
  113. package/lib/Api/ILogSource.js +0 -3
  114. package/lib/Api/ILogVerboseData.d.ts.map +0 -1
  115. package/lib/Api/ILogVerboseData.js +0 -3
  116. package/lib/Api/Log/LogHandler.d.ts.map +0 -1
  117. package/lib/Api/Log/LogHandler.js +0 -40
  118. package/lib/Api/LogEntry.d.ts.map +0 -1
  119. package/lib/Api/LogEntry.js +0 -51
  120. package/lib/Api/LogFeature.d.ts.map +0 -1
  121. package/lib/Api/LogFeature.js +0 -11
  122. package/lib/Api/LogLevel.d.ts.map +0 -1
  123. package/lib/Api/LogLevel.js +0 -24
  124. package/lib/Api/LogManager/CircularBuffer.d.ts.map +0 -1
  125. package/lib/Api/LogManager/CircularBuffer.js +0 -98
  126. package/lib/Api/LogManager/LogManager.d.ts.map +0 -1
  127. package/lib/Api/LogManager/LogManager.js +0 -121
  128. package/lib/Api/LogSource.d.ts.map +0 -1
  129. package/lib/Api/LogSource.js +0 -40
  130. package/lib/Api/LogType.d.ts.map +0 -1
  131. package/lib/Api/LogType.js +0 -23
  132. package/lib/Api/Qos/AutoAlertableQosMonitor.d.ts.map +0 -1
  133. package/lib/Api/Qos/AutoAlertableQosMonitor.js +0 -93
  134. package/lib/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.d.ts.map +0 -1
  135. package/lib/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.js +0 -2
  136. package/lib/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.d.ts.map +0 -1
  137. package/lib/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.js +0 -2
  138. package/lib/Api/Qos/IQos.d.ts.map +0 -1
  139. package/lib/Api/Qos/IQos.js +0 -2
  140. package/lib/Api/Qos/IQosEndEvent.d.ts.map +0 -1
  141. package/lib/Api/Qos/IQosEndEvent.js +0 -2
  142. package/lib/Api/Qos/IQosExtraData.d.ts.map +0 -1
  143. package/lib/Api/Qos/IQosExtraData.js +0 -2
  144. package/lib/Api/Qos/IQosStartEvent.d.ts.map +0 -1
  145. package/lib/Api/Qos/IQosStartEvent.js +0 -2
  146. package/lib/Api/Qos/QosLogger.d.ts.map +0 -1
  147. package/lib/Api/Qos/QosLogger.js +0 -74
  148. package/lib/Api/Qos/QosMonitor.d.ts.map +0 -1
  149. package/lib/Api/Qos/QosMonitor.js +0 -304
  150. package/lib/Api/Qos/QosMonitorShareFailureWithCP.d.ts.map +0 -1
  151. package/lib/Api/Qos/QosMonitorShareFailureWithCP.js +0 -114
  152. package/lib/Api/Qos/QosResultType.d.ts.map +0 -1
  153. package/lib/Api/Qos/QosResultType.js +0 -11
  154. package/lib/Api/Trace/DefaultTraceHandler.d.ts.map +0 -1
  155. package/lib/Api/Trace/DefaultTraceHandler.js +0 -30
  156. package/lib/Api/Trace/ITraceHandler.d.ts.map +0 -1
  157. package/lib/Api/Trace/ITraceHandler.js +0 -2
  158. package/lib/Api/Trace/ITraceLogger.d.ts.map +0 -1
  159. package/lib/Api/Trace/ITraceLogger.js +0 -2
  160. package/lib/Api/Trace/LogEvent.d.ts.map +0 -1
  161. package/lib/Api/Trace/LogEvent.js +0 -147
  162. package/lib/Api/Trace/TraceLogger.d.ts.map +0 -1
  163. package/lib/Api/Trace/TraceLogger.js +0 -196
  164. package/lib/Diagnostics.d.ts.map +0 -1
  165. package/lib/Diagnostics.js +0 -82
  166. package/lib/DiagnosticsSettingsManager.d.ts.map +0 -1
  167. package/lib/DiagnosticsSettingsManager.js +0 -62
  168. package/lib/IDiagnosticsSettings.d.ts.map +0 -1
  169. package/lib/IDiagnosticsSettings.js +0 -2
  170. package/lib/common/Killswitches.d.ts.map +0 -1
  171. package/lib/extraData/DisplayApp.d.ts.map +0 -1
  172. package/lib/extraData/IDiagnosticContextInfo.d.ts.map +0 -1
  173. package/lib/extraData/IDiagnosticContextInfo.js +0 -2
  174. package/lib/extraData/IPageExtraData.d.ts.map +0 -1
  175. package/lib/extraData/IPageExtraData.js +0 -2
  176. package/lib/extraData/PageType.d.ts.map +0 -1
  177. package/lib/extraData/PromotedState.d.ts.map +0 -1
  178. package/lib/extraData/PromotedState.js +0 -17
  179. package/lib/extraData/WebTemplateId.d.ts.map +0 -1
  180. package/lib/extraData/setPageExtraData.d.ts.map +0 -1
  181. package/lib/index.d.ts.map +0 -1
  182. /package/{lib → lib-dts}/Api/Engagement/EngagementLogger.d.ts +0 -0
  183. /package/{lib → lib-dts}/Api/ExecutionQueue.d.ts +0 -0
  184. /package/{lib → lib-dts}/Api/ILogData.d.ts +0 -0
  185. /package/{lib → lib-dts}/Api/ILogEntry.d.ts +0 -0
  186. /package/{lib → lib-dts}/Api/ILogErrorData.d.ts +0 -0
  187. /package/{lib → lib-dts}/Api/ILogSource.d.ts +0 -0
  188. /package/{lib → lib-dts}/Api/ILogVerboseData.d.ts +0 -0
  189. /package/{lib → lib-dts}/Api/Log/LogHandler.d.ts +0 -0
  190. /package/{lib → lib-dts}/Api/LogEntry.d.ts +0 -0
  191. /package/{lib → lib-dts}/Api/LogFeature.d.ts +0 -0
  192. /package/{lib → lib-dts}/Api/LogLevel.d.ts +0 -0
  193. /package/{lib → lib-dts}/Api/LogManager/CircularBuffer.d.ts +0 -0
  194. /package/{lib → lib-dts}/Api/LogManager/LogManager.d.ts +0 -0
  195. /package/{lib → lib-dts}/Api/LogSource.d.ts +0 -0
  196. /package/{lib → lib-dts}/Api/LogType.d.ts +0 -0
  197. /package/{lib → lib-dts}/Api/Qos/AutoAlertableQosMonitor.d.ts +0 -0
  198. /package/{lib → lib-dts}/Api/Qos/CustomerPromiseInterfaces/ICustomerPromiseErrorDetails.d.ts +0 -0
  199. /package/{lib → lib-dts}/Api/Qos/CustomerPromiseInterfaces/IExtraDataForCustomerPromise.d.ts +0 -0
  200. /package/{lib → lib-dts}/Api/Qos/IQos.d.ts +0 -0
  201. /package/{lib → lib-dts}/Api/Qos/IQosEndEvent.d.ts +0 -0
  202. /package/{lib → lib-dts}/Api/Qos/IQosExtraData.d.ts +0 -0
  203. /package/{lib → lib-dts}/Api/Qos/IQosStartEvent.d.ts +0 -0
  204. /package/{lib → lib-dts}/Api/Qos/QosLogger.d.ts +0 -0
  205. /package/{lib → lib-dts}/Api/Qos/QosMonitor.d.ts +0 -0
  206. /package/{lib → lib-dts}/Api/Qos/QosMonitorShareFailureWithCP.d.ts +0 -0
  207. /package/{lib → lib-dts}/Api/Qos/QosResultType.d.ts +0 -0
  208. /package/{lib → lib-dts}/Api/Trace/DefaultTraceHandler.d.ts +0 -0
  209. /package/{lib → lib-dts}/Api/Trace/ITraceHandler.d.ts +0 -0
  210. /package/{lib → lib-dts}/Api/Trace/ITraceLogger.d.ts +0 -0
  211. /package/{lib → lib-dts}/Api/Trace/LogEvent.d.ts +0 -0
  212. /package/{lib → lib-dts}/Api/Trace/TraceLogger.d.ts +0 -0
  213. /package/{lib → lib-dts}/IDiagnosticsSettings.d.ts +0 -0
  214. /package/{lib → lib-dts}/common/Killswitches.d.ts +0 -0
  215. /package/{lib → lib-dts}/extraData/DisplayApp.d.ts +0 -0
  216. /package/{lib → lib-dts}/extraData/IDiagnosticContextInfo.d.ts +0 -0
  217. /package/{lib → lib-dts}/extraData/IPageExtraData.d.ts +0 -0
  218. /package/{lib → lib-dts}/extraData/PageType.d.ts +0 -0
  219. /package/{lib → lib-dts}/extraData/PromotedState.d.ts +0 -0
  220. /package/{lib → lib-dts}/extraData/WebTemplateId.d.ts +0 -0
  221. /package/{lib → lib-dts}/extraData/setPageExtraData.d.ts +0 -0
  222. /package/{lib → lib-dts}/index.d.ts +0 -0
  223. /package/{lib → lib-esm}/sp-diagnostics.manifest.json +0 -0
@@ -3,7 +3,7 @@
3
3
  "id": "78359e4b-07c2-43c6-8d0b-d060b4d577e8",
4
4
  "alias": "SPDiagnostics",
5
5
  "componentType": "Library",
6
- "version": "1.23.2",
6
+ "version": "1.24.0",
7
7
  "loaderConfig": {
8
8
  "internalModuleBaseUrls": [
9
9
  "https://localhost:4321/dist/"
@@ -13,29 +13,24 @@
13
13
  "sp-diagnostics": {
14
14
  "type": "path",
15
15
  "path": {
16
- "path": "sp-diagnostics_none_414da724f4073ce8bb98.js",
17
- "integrity": "sha256-L+dZyInk+zp6V42FCIksk8Dyw21OmXBvc62eafpHiJM="
16
+ "path": "sp-diagnostics_none_ebdbca9bc199b51d4466.js",
17
+ "integrity": "sha256-4ad0mVlKDRMvVb77h7yrCepcuYY61DtO+culXrGkq+w="
18
18
  }
19
19
  },
20
20
  "@microsoft/sp-core-library": {
21
21
  "type": "component",
22
22
  "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
23
- "version": "1.23.2"
23
+ "version": "1.24.0"
24
24
  },
25
25
  "@microsoft/sp-lodash-subset": {
26
26
  "type": "component",
27
27
  "id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a",
28
- "version": "1.23.2"
28
+ "version": "1.24.0"
29
29
  },
30
30
  "@msinternal/odsp-core-bundle": {
31
31
  "type": "component",
32
32
  "id": "2e09fb9b-13bb-48f2-859f-97d6fff71176",
33
- "version": "1.5.82"
34
- },
35
- "tslib": {
36
- "type": "component",
37
- "id": "01c4df03-e775-48cb-aa14-171ee5199a15",
38
- "version": "2.3.1"
33
+ "version": "1.5.212"
39
34
  }
40
35
  }
41
36
  }
@@ -157,6 +157,27 @@ declare interface IQosEndSchema {
157
157
  /* Excluded from this release type: _LogType */
158
158
 
159
159
  declare const ObjectTypes: {
160
+ readonly word: 1;
161
+ readonly excel: 1;
162
+ readonly powerpoint: 1;
163
+ readonly pdf: 1;
164
+ readonly markdown: 1;
165
+ readonly html: 1;
166
+ readonly json: 1;
167
+ readonly csv: 1;
168
+ readonly text: 1;
169
+ readonly code: 1;
170
+ readonly listData: 1;
171
+ readonly itemAction: 1;
172
+ readonly sharing: 1;
173
+ readonly substrate: 1;
174
+ readonly prefetch: 1;
175
+ readonly auth: 1;
176
+ readonly search: 1;
177
+ readonly media: 1;
178
+ readonly metadata: 1;
179
+ readonly embedded: 1;
180
+ readonly other: 1;
160
181
  readonly NPSRating1: 1;
161
182
  readonly NPSRating2: 1;
162
183
  readonly NPSRating3: 1;
@@ -198,6 +219,7 @@ declare const ObjectTypes: {
198
219
  readonly outOfBox: 1;
199
220
  readonly Links: 1;
200
221
  readonly FromALink: 1;
222
+ readonly Media: 1;
201
223
  readonly 'Sharing.getAuthToken': 1;
202
224
  readonly Computed: 1;
203
225
  readonly LinkTitle: 1;
@@ -157,6 +157,27 @@ declare interface IQosEndSchema {
157
157
  /* Excluded from this release type: _LogType */
158
158
 
159
159
  declare const ObjectTypes: {
160
+ readonly word: 1;
161
+ readonly excel: 1;
162
+ readonly powerpoint: 1;
163
+ readonly pdf: 1;
164
+ readonly markdown: 1;
165
+ readonly html: 1;
166
+ readonly json: 1;
167
+ readonly csv: 1;
168
+ readonly text: 1;
169
+ readonly code: 1;
170
+ readonly listData: 1;
171
+ readonly itemAction: 1;
172
+ readonly sharing: 1;
173
+ readonly substrate: 1;
174
+ readonly prefetch: 1;
175
+ readonly auth: 1;
176
+ readonly search: 1;
177
+ readonly media: 1;
178
+ readonly metadata: 1;
179
+ readonly embedded: 1;
180
+ readonly other: 1;
160
181
  readonly NPSRating1: 1;
161
182
  readonly NPSRating2: 1;
162
183
  readonly NPSRating3: 1;
@@ -198,6 +219,7 @@ declare const ObjectTypes: {
198
219
  readonly outOfBox: 1;
199
220
  readonly Links: 1;
200
221
  readonly FromALink: 1;
222
+ readonly Media: 1;
201
223
  readonly 'Sharing.getAuthToken': 1;
202
224
  readonly Computed: 1;
203
225
  readonly LinkTitle: 1;
@@ -157,6 +157,27 @@ declare interface IQosEndSchema {
157
157
  /* Excluded from this release type: _LogType */
158
158
 
159
159
  declare const ObjectTypes: {
160
+ readonly word: 1;
161
+ readonly excel: 1;
162
+ readonly powerpoint: 1;
163
+ readonly pdf: 1;
164
+ readonly markdown: 1;
165
+ readonly html: 1;
166
+ readonly json: 1;
167
+ readonly csv: 1;
168
+ readonly text: 1;
169
+ readonly code: 1;
170
+ readonly listData: 1;
171
+ readonly itemAction: 1;
172
+ readonly sharing: 1;
173
+ readonly substrate: 1;
174
+ readonly prefetch: 1;
175
+ readonly auth: 1;
176
+ readonly search: 1;
177
+ readonly media: 1;
178
+ readonly metadata: 1;
179
+ readonly embedded: 1;
180
+ readonly other: 1;
160
181
  readonly NPSRating1: 1;
161
182
  readonly NPSRating2: 1;
162
183
  readonly NPSRating3: 1;
@@ -198,6 +219,7 @@ declare const ObjectTypes: {
198
219
  readonly outOfBox: 1;
199
220
  readonly Links: 1;
200
221
  readonly FromALink: 1;
222
+ readonly Media: 1;
201
223
  readonly 'Sharing.getAuthToken': 1;
202
224
  readonly Computed: 1;
203
225
  readonly LinkTitle: 1;
@@ -0,0 +1 @@
1
+ define("78359e4b-07c2-43c6-8d0b-d060b4d577e8_1.24.0",["@microsoft/sp-core-library","@microsoft/sp-lodash-subset","@msinternal/odsp-core-bundle"],(a,b,c)=>(()=>{"use strict";var d={676(b){b.exports=a},529(a){a.exports=b},277(a){a.exports=c}},e={};function f(a){var b=e[a];if(void 0!==b)return b.exports;var c=e[a]={exports:{}};return d[a](c,c.exports,f),c.exports}f.d=(a,b)=>{for(var c in b)f.o(b,c)&&!f.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:b[c]})},f.o=(a,b)=>Object.prototype.hasOwnProperty.call(a,b),f.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var g={};return(()=>{f.r(g),f.d(g,{_AutoAlertableMonitorType:()=>F,_AutoAlertableQosMonitor:()=>G,_CircularBuffer:()=>n,_Diagnostics:()=>w,_EngagementLogger:()=>x,_ExecutionQueue:()=>B,_LogEntry:()=>t,_LogEvent:()=>p,_LogFeature:()=>r,_LogHandler:()=>y,_LogLevel:()=>e,_LogManager:()=>o,_LogSource:()=>l,_LogType:()=>s,_PageType:()=>j,_PromotedState:()=>i,_QosLogger:()=>C,_QosMonitor:()=>E,_QosMonitorShareFailureWithCP:()=>H,_QosResultType:()=>A,_TraceLogger:()=>q,_logSourceServiceKey:()=>m});var a,b,c,d,e,h,i,j,k=f(676);class l{static create(a){return new l(a)}get id(){return this._id}isEmpty(){return 0===this._id.length}constructor(a){k.Validate.isNotNullOrUndefined(a,"id"),this._id=a}}let m=k.ServiceKey.createCustom("sp-client-base:LogSource",a=>l.create(""));class n{get count(){return this._count}push(a){this._ensureNotIterating(),this._head++,this._count++,this._head===this._size&&(this._head=0),this._buffer[this._head]=a}forEach(a){if(0!==this._count){this._isIterating=!0;try{let b=this._tail;for(let c=0;c<this._size&&(a(this._buffer[b]),b!==this._head);c++)b=this._getNext(b)}finally{this._isIterating=!1}}}removeAll(){this._ensureNotIterating(),this._head=-1,this._count=0}get _tail(){return this._isNotWrapped()?0:this._getNext(this._head)}_isNotWrapped(){return this._count===this._head+1}_getNext(a){let b=a+1;return b===this._size&&(b=0),b}_ensureNotIterating(){if(this._isIterating)throw Error("Circular buffer cannot be modified during iteration")}constructor(a){if(this._head=-1,this._count=0,this._isIterating=!1,a<=0)throw Error("Size must be positive");this._size=a,this._buffer=Array(a)}}class o{static get _maxVerboseLog(){return 5e3}get events(){return this._events}addHandler(a){this._containsHandler(a)||(this._handlers.push(a),this._shouldLogInRealTime.push(!1))}log(a){Object.freeze(a),this._events.push(a),this._processLogEvent(a)}removeHandler(a){let b=this._handlers.indexOf(a);b>-1&&(this._handlers.splice(b,1),this._shouldLogInRealTime.splice(b,1))}reset(){this._handlers=[],this._shouldLogInRealTime=[],this._events.removeAll()}processAll(a){this._handlers.indexOf(a)>-1&&this._processAllEvents(a)}_containsHandler(a){for(let b of this._handlers)if(b===a)return!0;return!1}_processAllEvents(a){this._events.forEach(b=>{if(b)try{a(b)}catch(a){console.error("failed to handle event:"+a.toString())}}),this._shouldLogInRealTime[this._handlers.indexOf(a)]=!0}_processLogEvent(a){for(let b=0;b<this._handlers.length;b++)if(this._shouldLogInRealTime[b]&&a)try{this._handlers[b](a)}catch(a){console.error("failed to handle event:"+a.toString())}}constructor(a){this._shouldLogInRealTime=[],this._handlers=[],this._events=new n(o._maxVerboseLog),a&&this.addHandler(a)}}class p{static log(a,b,c,d){let e=new p(a,b,c,d);return p.logManager.log(e),e}toString(){let a=`[${this._timestamp}][${this._prefix}]`;return this._message?`${a} ${this._message}`:this._error?`${a} ${this._error.toString()}`:a}get timestamp(){return this._timestamp}get level(){return this._level}get prefix(){return this._prefix}get scope(){return this._scope}get source(){return this._source}get message(){return this._message}get error(){return this._error}get _maxSourceLength(){return 30}get _maxMessageLength(){return 150}_validate(a,b){if(!a)throw Error("source cannot be undefined or null for Logger");if(!b)throw Error("data cannot be undefined or null")}_setData(a){"string"==typeof a?this._message=a.substr(0,this._maxMessageLength):a instanceof Error&&(this._error=a)}_getPrefix(){let a=`${this._source}`;return this._scope&&!this._scope.isEmpty()&&(a=`${this._scope.id.substr(0,this._maxSourceLength)}.${a}`),`${a}`}_getScope(a){let b;return a&&a.whenFinished(()=>{b=a.consume(m)}),b}constructor(a,b,c,d){this._validate(a,b),this._timestamp=new Date().getTime(),this._scope=this._getScope(d),this._source=a.substr(0,this._maxSourceLength),this._setData(b),this._level=c,this._prefix=this._getPrefix()}}p.logManager=new o,(a=e||(e={}))[a.Verbose=1]="Verbose",a[a.Info=2]="Info",a[a.Warning=3]="Warning",a[a.Error=4]="Error";class q{static _addHandler(a){q._logManager.addHandler(a.log),q._logManager.processAll(a.log),q._verboseLogManager.addHandler(a.verbose),q._verboseLogManager.processAll(a.verbose)}static logError(a,b,c,d){k.Validate.isNotNullOrUndefined(b,"error"),this._log(a,b,c,!0,d)}static logErrorData(a){k.Validate.isNotNullOrUndefined(a.error,"error");let b=a.logEntry?a.logEntry.toString():a.error;this._log(a.source,b,a.eventName,!0,a.resultCode,a.serviceScope)}static logVerbose(a,b,c){k.Validate.isNonemptyString(b,"message"),this._log(a,b,c,!1,void 0)}static logVerboseData(a){let b=a.logEntry?a.logEntry.toString():a.message;this._log(a.source,b,a.eventName,!1,void 0,a.serviceScope)}static logErrorWithLogEntry(a,b,c,d){k.Validate.isNotNullOrUndefined(a,"source"),k.Validate.isNotNullOrUndefined(b,"logEntry"),this._log(a,b.toString(),c,!0,d)}static get shouldWriteToConsole(){return q._shouldWriteToConsole}static set shouldWriteToConsole(a){q._shouldWriteToConsole&&!a?(q._logManager.removeHandler(q._defaultLogger.log),q._verboseLogManager.removeHandler(q._defaultLogger.verbose)):!q._shouldWriteToConsole&&a&&(q._logManager.addHandler(q._defaultLogger.log),q._verboseLogManager.addHandler(q._defaultLogger.verbose)),q._shouldWriteToConsole=a}static logVerboseWithLogEntry(a,b,c){k.Validate.isNotNullOrUndefined(b,"LogEntry"),this._log(a,b.toString(),c,!1,void 0)}static _log(a,b,c,d,f,g){let h,i=this._addEventPrefix(a,c);d?(h=p.log(i,b,e.Error,g),q._logManager.log({data:b,eventName:h.prefix,resultCode:f})):(h=p.log(i,b.toString(),e.Verbose,g),q._verboseLogManager.log({data:b,eventName:h.prefix})),q.shouldWriteToConsole&&this._writeToConsole(h,d,f)}static _addEventPrefix(a,b){return b?`${a.id}.${b}`:a.id}static _writeToConsole(a,b,c){let d=a.toString();c&&(d+=`. resultCode: ${c}`),b?console.error(d):console.log(d)}}q._logManager=new o,q._verboseLogManager=new o,q._defaultLogger=new class{log(a){console.log(`Error: ${a.data}, Event Name: ${a.eventName}, Result Code: ${a.resultCode}`)}verbose(a){console.log(`Error: ${a.data}, Event Name: ${a.eventName}`)}},q._shouldWriteToConsole=!1;class r{}r.None="None",(b=h||(h={}))[b.Trace=1]="Trace",b[b.Event=2]="Event",b[b.Error=3]="Error";let s=h,t=class{toString(){let a;if(this.logProperties)try{a=JSON.stringify(this.logProperties)}catch(a){console.log("Error happens in toString():"+a)}return`${this.moduleName} | ${this.logFeature} | ${this.logType} | ${a}`}constructor(a,b=r.None,c=s.Trace,d,e){if(a)this.moduleName=a,this.logFeature=b,this.logType=c,this.logProperties=d,this.isIntentional=e;else throw Error("moduleName is invalid")}};var u=f(529);class v{static initialize(a){this.settings=(0,u.cloneDeep)(a),this._initialized=!0,this._normalizeContextIds()}static updateSettings(a){this.settings=(0,u.merge)(this.settings,a),this._normalizeContextIds()}static updatePageId(a){this.settings.contextInfo&&(this.settings.contextInfo.pageId=this._normalizeId(a))}static updatePageType(a,b){this.settings.contextInfo&&(this.settings.contextInfo.pageType=a,this.settings.contextInfo.promotedState=b)}static clearSettings(a){a.diagnosticSettings&&a.diagnosticSettings.forEach(a=>{delete this.settings[a]}),a.extraDiagnosticInfo&&a.extraDiagnosticInfo.forEach(a=>{this.settings.extraDiagnosticInfo&&this.settings.extraDiagnosticInfo[a]&&delete this.settings.extraDiagnosticInfo[a]})}static get isInitialized(){return this._initialized}static _normalizeId(a){let b=k.Guid.tryParse(a);return b?.toString()||a}static _normalizeContextIds(){this.settings.siteId=this._normalizeId(this.settings.siteId),this.settings.webId=this._normalizeId(this.settings.webId),this.settings.correlationId=this._normalizeId(this.settings.correlationId),this.settings.listId&&(this.settings.listId=this._normalizeId(this.settings.listId),this.settings.listItemUniqueId&&(this.settings.listItemUniqueId=this._normalizeId(this.settings.listItemUniqueId)))}}v._initialized=!1;class w{static initialize(a){w._isInitialized||(v.initialize(a),q.shouldWriteToConsole=a.enableConsoleLog,q._addHandler({log:a=>{k.Log.info(a.eventName,`EventName:${a.data.toString()}, ResultCode: ${a.resultCode}`)},verbose:a=>{k.Log.verbose(a.eventName,a.data.toString())}}),w._isInitialized=!0)}static get isInitialized(){return this._isInitialized}static updateSettings(a){v.updateSettings(a)}static updatePageId(a){v.updatePageId(a)}static updatePageType(a,b){v.updatePageType(a,b)}static getAuthoringSessionClientCountInfo(){return v.settings?.extraDiagnosticInfo?.authoringSessionClientCount}static _getExtraDiagnosticInfo(){return v.settings?.extraDiagnosticInfo}static clearSettings(a){v.clearSettings(a)}}w._isInitialized=!1,(c=i||(i={}))[c.NotPromoted=0]="NotPromoted",c[c.Promoted=2]="Promoted",(d=j||(j={})).News="News",d.Article="Article",d.Home="Home",d.Space="Space",d.NewsDigest="NewsDigest";class x{static _addHandler(a){x._handler=b=>{a.logData(b)},x._logManager.addHandler(x._handler)}static startRealTimeProcessing(){this._shouldProcessInRealTime||(x._logManager.processAll(x._handler),this._shouldProcessInRealTime=!0)}static log(a){x._logEngagementData(a)}static logEvent(a,b){let c={name:a};b&&0!==b.length&&(c.extraData={action:b}),x._logEngagementData(c)}static logEventWithLogEntry(a){let b={isIntentional:a.isIntentional,name:a.moduleName+"."+a.logFeature,extraData:a.logProperties};x._logEngagementData(b,!0)}static _logEngagementData(a,b=!1){if(!a.name||0===a.name.length)throw Error("LogEntry is invalid");x._checkValidTagName(a,b),x._addContextData(a),x._appendExtraData(a),x._logManager.log(a)}static _checkValidTagName(a,b=!1){if(!b&&!1===/(\w+)\.(\w+).(\w+)/gi.test(a.name))throw Error(`${a.name} tagName does not follow AppName.ControlName.ActionName pattern`)}static _addContextData(a){if(v.isInitialized){let{listId:b,listItemUniqueId:c,siteId:d,webId:e}=v.settings;a.siteId=d,a.webId=e,b&&(a.listId=b,c&&(a.docId=c))}}static _appendExtraData(a){if(v.isInitialized){let{settings:{contextInfo:c}}=v;if(c){var b;let d,e,f,g,h;a.extraData||(a.extraData={}),(b=a.extraData).pageId=c.pageId,b.isHub=c.isHubSite,c.isHubSite?(b.hubSiteId=c.hubSiteId,b.isAssociatedSite=!1):!c.isHubSite&&c.hubSiteId?b.isAssociatedSite=!0:b.isAssociatedSite=!1,!b.displayApp&&(k._BrowserUtilities.isTeamsHosted()?(b.displayApp="Teams",c.isEduClass&&(b.isEduClass=!0)):b.displayApp="Sharepoint"),b.userAgent=navigator.userAgent,b.webTemplate=e=c.webTemplate,"1"===e?d="TeamSite":"64"===e?d="GroupSite":"68"===e?d="CommunicationSite":"21"===e&&(d="MySite"),f=c.promotedState,h=g=c.pageType,g===j.Article&&(h=f===i.NotPromoted||void 0===f?j.Article:j.News),b.siteType=d,b.pageType=h,b.isDebug=!!k._BrowserUtilities.safelyAccessSessionStorage("spfx-debug"),b.hasCopilotLicense=!!c.hasCopilotLicense}}}}x._logManager=new o;class y{verbose(a,b,c){p.log(a,b,e.Verbose,c)}info(a,b,c){p.log(a,b,e.Info,c)}warn(a,b,c){p.log(a,b,e.Warning,c)}error(a,b,c){p.log(a,b,e.Error,c)}}var z=f(277);let A={Success:0,Failure:1,ExpectedFailure:2};class B{get shouldExecuteInRealTime(){return this._shouldExecuteInRealTime}set shouldExecuteInRealTime(a){this._shouldExecuteInRealTime=a,this._shouldExecuteInRealTime&&this.flush()}addHandler(a,b){if(this._containsHandler(a,b))return;this._initializeHandlerArrayForKey(a);let c=this._handlers[a];-1===c.indexOf(b)&&c.push(b)}addExecutionEntry(a,...b){Object.freeze(b),this._shouldExecuteInRealTime?this._processExecutionEntry(a,b):this._executionEntries.push({key:a,args:b})}removeHandler(a,b){let c=this._handlers[a].indexOf(b);c>-1&&this._handlers[a].splice(c,1)}reset(){this._handlers={},this._executionEntries=[]}flush(){this._processAllExecutionEntries(),this._executionEntries=[]}_containsHandler(a,b){return null!==this._handlers[a]&&void 0!==this._handlers[a]&&this._handlers[a].indexOf(b)>-1}_initializeHandlerArrayForKey(a){(null===this._handlers[a]||void 0===this._handlers[a])&&(this._handlers[a]=[])}_processAllExecutionEntries(){for(let a of this._executionEntries)if(a&&this._handlers[a.key])try{for(let b of this._handlers[a.key])b.apply(this,a.args)}catch(a){console.error("failed to process execution entry:"+a.toString())}}_processExecutionEntry(a,b){for(let c=0;c<this._handlers[a].length;c++)try{this._handlers[a][c].apply(this,b)}catch(a){console.error("failed to process execution entry:"+a.toString())}}constructor(){this._shouldExecuteInRealTime=!1,this._handlers={},this._executionEntries=[]}}class C{static get instance(){return this._instance||(this._instance=new C),this._instance}get shouldProcessInRealTime(){return this._shouldProcessInRealTime}set shouldProcessInRealTime(a){this._shouldProcessInRealTime=a,this._deferExecutor.shouldExecuteInRealTime=a}setLogger(a){this._qosLogger=a}getQosEvent(a){return this._qosEvents.get(a)}startQosMonitor(a,b){this._qosEvents.has(a)||this._deferExecutor.addExecutionEntry("start",a,b)}writeQosEndResult(a,b){this._deferExecutor.addExecutionEntry("end",a,b)}_startMonitor(a,b){this._qosLogger&&this._qosEvents.set(a,new this._qosLogger(b))}_endMonitor(a,b){let c=this._qosEvents.get(a);c&&(c.end(b),this._qosEvents.delete(a))}_initializeLogger(){let a=(a,b)=>{this._startMonitor(a,b)},b=(a,b)=>{this._endMonitor(a,b)};this._deferExecutor.addHandler("start",a),this._deferExecutor.addHandler("end",b)}constructor(){this._qosEvents=new Map,this._deferExecutor=new B,this._shouldProcessInRealTime=!1,this._initializeLogger()}}let D={id:"QosMonitor"};class E{static startRealTimeProcessing(){C.instance.shouldProcessInRealTime||this._shouldProcessInRealTime(!0)}static _shouldProcessInRealTime(a){C.instance.shouldProcessInRealTime=a}get name(){return this._scenarioName}get shortEventName(){return"Qos"}get resultCode(){return this._endResultCode}get resultType(){return this._endResult}get extraData(){return this._endExtraData}set extraData(a){this._endExtraData=a}get hasEnded(){return this._hasEnded}writeSuccess(a){this._writeQosEnd(A.Success,void 0,void 0,a)}writeUnexpectedFailure(a="DefaultUnexpected",b,c){this._writeQosEnd(A.Failure,a,b,c)}writeExpectedFailure(a="DefaultExpected",b,c){this._writeQosEnd(A.ExpectedFailure,a,b,c)}_writeQosEnd(a,b,c,d){if(this._shouldSkip(a))return;this._ensureCorrelationId(a,d),this._endResultCode=b,this._endResult=a;let e=c?(0,z.getErrorMessage)(c):void 0;if(c instanceof z.CustomError){let a=(0,z.getQosEndSchemaFromError)(c);a&&(a.resultType=this._endResult,a.extraData=(0,u.merge)({},this._endExtraData,a.extraData)),C.instance.writeQosEndResult(this._id,a)}else{let a={resultCode:this._endResultCode,resultType:this._endResult,error:e,extraData:this._endExtraData};C.instance.writeQosEndResult(this._id,a)}this._writeToEngagement()}_ensureCorrelationId(a,b){if(b&&(this._ensureEndExtraData(),Object.keys(b).forEach(a=>this._endExtraData[a]=b[a])),v.isInitialized&&a!==A.Success){let a="CorrelationId",b=this._endExtraData&&(this._endExtraData[a]||this._endExtraData.correlationId)||v.settings.correlationId;b&&(this._endExtraData||(this._endExtraData={}),this._endExtraData[a]=b)}this._logHostType(),this._ensureAuthoringSessionId()}_ensureEndExtraData(){this._endExtraData||(this._endExtraData={})}_logHostType(){if(v.isInitialized){let a=k._BrowserUtilities.getTeamsAppType();if(a){this._ensureEndExtraData();let b="appHostType";this._endExtraData[b]||(this._endExtraData[b]=a)}}}_isDebugSession(){try{if(!k._SPKillSwitch.isActivated("761ccb86-4fa0-4f56-a05b-477bcc09bd9f"))return!1;return!!k._BrowserUtilities.safelyAccessSessionStorage("spfx-debug")}catch{return!1}}_shouldSkip(a){if(!this._hasEnded||void 0===this._endResult)return this._hasEnded=!0,this._isDebugSession();{let b=k.Text.format("QoS monitor '{0}' has ended with '{1}' already. Ignoring '{2}' tag.",this.name,this._qosResultTypeValue[this._endResult],this._qosResultTypeValue[a]);return this._endResult!==a&&q.logError(D,Error(b)),!0}}_writeToEngagement(){if(this._copyToInterana&&x.log({name:this.name,isIntentional:!!(this.extraData||{}).isIntentional,extraData:this.extraData||{}}),this._copyToCosmos){let a={name:"Spfx.Qos.ToEngagement",extraData:this.extraData||{}};a.extraData.qosName=this.name,this.resultType&&(a.extraData.qosResultType=this._qosResultTypeValue[this.resultType]),this.resultCode&&(a.extraData.qosResultCode=this.resultCode),x.log(a)}}constructor(a,b=!1,c=!1){this._qosResultTypeValue={[A.Success]:"Success",[A.Failure]:"Failure",[A.ExpectedFailure]:"ExpectedFailure"},this._ensureAuthoringSessionId=()=>{let a=v.settings?.extraDiagnosticInfo?.authoringSessionId;if(a){this._ensureEndExtraData(),this._endExtraData.AuthoringSessionId=a;let b=v.settings?.extraDiagnosticInfo?.authoringOpSequenceId;b&&(this._endExtraData.AuthoringOpSequenceId=b);let c=w.getAuthoringSessionClientCountInfo();c&&this._endExtraData&&(this._endExtraData.AuthoringSessionClientCount=c)}},k.Validate.isNonemptyString(a,"scenarioName"),this._id=k.Guid.newGuid().toString(),this._isDebugSession()||C.instance.startQosMonitor(this._id,{name:a}),this._scenarioName=a,this._hasEnded=!1,this._copyToCosmos=b,this._copyToInterana=c}}let F={StaticReliabilityQos95Sev4:"StaticReliabilityQos95Sev4",DynamicReliabilityQosMediumSev4:"DynamicReliabilityQosMediumSev4",DynamicReliabilityExpectedFailureHighSev4:"DynamicReliabilityExpectedFailureHighSev4"};class G extends E{writeSuccess(a){super.writeSuccess(this._getExtraDataWithAutoAlertableFields(a))}writeUnexpectedFailure(a="DefaultUnexpected",b,c){super.writeUnexpectedFailure(a,b,this._getExtraDataWithAutoAlertableFields(c))}writeExpectedFailure(a="DefaultExpected",b,c){super.writeExpectedFailure(a,b,this._getExtraDataWithAutoAlertableFields(c))}_getExtraDataWithAutoAlertableFields(a){let b=a??{};return b.autoAlertableMonitorType=F[this._autoAlertableMonitorType],b}constructor(a,b,c=!1){super(a,!1,c),this._autoAlertableMonitorType=b}}class H extends E{writeUnexpectedFailure(a="DefaultUnexpected",b,c){super.writeUnexpectedFailure(a,b,c),this._logCustomerPromiseFailure(b?.message||"DefaultErrorMessage",a,A.Failure,c)}writeExpectedFailure(a="DefaultExpected",b,c,d=!1){super.writeExpectedFailure(a,b,c),d||this._logCustomerPromiseFailure(b?.message||"DefaultErrorMessage",a,A.ExpectedFailure,c)}_logCustomerPromiseFailure(a,b,c=A.Failure,d){this._extraDataForCustomerPromise&&this._extraDataForCustomerPromise.forEach(e=>{let f,{logFailure:g,veto:h}=e,i={errorCode:e.errorModuleName+((f=w._getExtraDiagnosticInfo())&&f.hasAuthoringStarted?f.authoringSessionClientCount?f.authoringSessionClientCount>1?" with Multiple Users":"":f.isAuthoringUsingDDS?" in Legacy Authoring (DDS)":" in Legacy Authoring (no DDS)":"")+(k._SPKillSwitch.isActivated("c125685f-83e7-44c8-b602-5c21f5b748ae")||window.navigator.onLine?"":" (offline)"),errorScenario:b,errorMessage:a,resultType:c,pageType:d?.pageType,errorStack:d?.errorStack,veto:h};g(i)})}constructor(a,b=!1,c,d=!1){super(a,d,b),this._extraDataForCustomerPromise=c}}})(),g})());
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.57.7"
8
+ "packageVersion": "7.58.12"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,102 +1,99 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var LogManager_1 = tslib_1.__importDefault(require("../LogManager/LogManager"));
5
- var DiagnosticsSettingsManager_1 = tslib_1.__importDefault(require("../../DiagnosticsSettingsManager"));
6
- var setPageExtraData_1 = require("../../extraData/setPageExtraData");
7
- /**
8
- * Engagement logging
9
- * use *.Click for all the actions triggered by mouse, keyboard, or touch.
10
- * if you want to add more data or the action is not click but keydown.
11
- * Use extraData to log the type of action or use extraData to log details wrapped in LogEntry
12
- * @internal
13
- */
14
- var EngagementLogger = /** @class */ (function () {
15
- function EngagementLogger() {
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return EngagementLogger;
16
9
  }
10
+ });
11
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
12
+ const _LogManager = /*#__PURE__*/ _interop_require_default._(require("../LogManager/LogManager"));
13
+ const _DiagnosticsSettingsManager = /*#__PURE__*/ _interop_require_default._(require("../../DiagnosticsSettingsManager"));
14
+ const _setPageExtraData = require("../../extraData/setPageExtraData");
15
+ class EngagementLogger {
17
16
  /**
18
- * Init function for the passed logger object
19
- */
20
- EngagementLogger._addHandler = function (logger) {
21
- EngagementLogger._handler = function (e) {
17
+ * Init function for the passed logger object
18
+ */ static _addHandler(logger) {
19
+ EngagementLogger._handler = (e)=>{
22
20
  logger.logData(e);
23
21
  };
24
22
  EngagementLogger._logManager.addHandler(EngagementLogger._handler);
25
- };
23
+ }
26
24
  /**
27
- * Starts processing logs in real time
28
- */
29
- EngagementLogger.startRealTimeProcessing = function () {
25
+ * Starts processing logs in real time
26
+ */ static startRealTimeProcessing() {
30
27
  if (!this._shouldProcessInRealTime) {
31
28
  EngagementLogger._logManager.processAll(EngagementLogger._handler);
32
29
  this._shouldProcessInRealTime = true;
33
30
  }
34
- };
31
+ }
35
32
  /**
36
- * Engagement logging
37
- *
38
- * @remarks
39
- * Use *.Click for all the actions triggered by mouse, keyboard, or touch.
40
- * tagName follows `<Workload>.controlName.actionName` pattern
41
- * For example, `{ name = "AddButton.Click" }`,
42
- * this logs `"<Workload>.AddButton.Click"` with default action triggered by mouse, keyboard, or touch.
43
- * `<Workload>` is set in Telemetry settings
44
- * `IEngagementData` interface is mapped to a set of enums for standardization of mapping.
45
- * Add new items to enum in order to register a new item specification.
46
- * SiteType is defined in SiteType enum
47
- * CurrentPage is defined in CurrentPage enum
48
- * Component is defined in Component enum
49
- * Feature is defined in Feature enum.
50
- */
51
- EngagementLogger.log = function (engagementData) {
33
+ * Engagement logging
34
+ *
35
+ * @remarks
36
+ * Use *.Click for all the actions triggered by mouse, keyboard, or touch.
37
+ * tagName follows `<Workload>.controlName.actionName` pattern
38
+ * For example, `{ name = "AddButton.Click" }`,
39
+ * this logs `"<Workload>.AddButton.Click"` with default action triggered by mouse, keyboard, or touch.
40
+ * `<Workload>` is set in Telemetry settings
41
+ * `IEngagementData` interface is mapped to a set of enums for standardization of mapping.
42
+ * Add new items to enum in order to register a new item specification.
43
+ * SiteType is defined in SiteType enum
44
+ * CurrentPage is defined in CurrentPage enum
45
+ * Component is defined in Component enum
46
+ * Feature is defined in Feature enum.
47
+ */ static log(engagementData) {
52
48
  EngagementLogger._logEngagementData(engagementData);
53
- };
49
+ }
54
50
  /**
55
- * Engagement logging
56
- *
57
- * @remarks
58
- * Use *.Click for all the actions triggered by mouse, keyboard, or touch.
59
- * tagName follows `<Workload>.controlName.actionName` pattern
60
- * For example, `tagName = "AddButton.Click"`,
61
- * this logs `"<Workload>.AddButton.Click"` with default action triggered by mouse, keyboard, or touch.
62
- * `<Workload>` is set in Telemetry settings
63
- * Use extraData to log the type of action.
64
- * For example, `actionName = "Keydown"` and `tagName = "ModernPublish.AddButton.Click"`
65
- * this logs `"<Workload>.AddButton.Click"` with the extraData that it was selected using the Keydown
66
- */
67
- EngagementLogger.logEvent = function (tagName, actionName) {
68
- var logData = { name: tagName };
51
+ * Engagement logging
52
+ *
53
+ * @remarks
54
+ * Use *.Click for all the actions triggered by mouse, keyboard, or touch.
55
+ * tagName follows `<Workload>.controlName.actionName` pattern
56
+ * For example, `tagName = "AddButton.Click"`,
57
+ * this logs `"<Workload>.AddButton.Click"` with default action triggered by mouse, keyboard, or touch.
58
+ * `<Workload>` is set in Telemetry settings
59
+ * Use extraData to log the type of action.
60
+ * For example, `actionName = "Keydown"` and `tagName = "ModernPublish.AddButton.Click"`
61
+ * this logs `"<Workload>.AddButton.Click"` with the extraData that it was selected using the Keydown
62
+ */ static logEvent(tagName, actionName) {
63
+ const logData = {
64
+ name: tagName
65
+ };
69
66
  if (actionName && actionName.length !== 0) {
70
- logData.extraData = { action: actionName };
67
+ logData.extraData = {
68
+ action: actionName
69
+ };
71
70
  }
72
71
  EngagementLogger._logEngagementData(logData);
73
- };
72
+ }
74
73
  /**
75
- * Engagement logging with LogEntry
76
- *
77
- * @remarks
78
- * Here is an example:
79
- * ```
80
- * {"EngagementName":"SPPage.NavigationAction.SPPageQuickLaunchUpdate"`,
81
- * "Properties":"{\"message\":\"[NavigationAction] | SPPageQuickLaunchUpdate | 2 | null\"}",
82
- * "Duration":0,"LogType":0,
83
- * "ClientTime":1459357627444,"Source":"ClientV2Engagement"}
84
- * ```
85
- *
86
- * NavigationAction is moduleName in LogEntry, SPPageQuickLaunchUpdate is log feature name
87
- * In this example, SPPage is workload name which is set in Telemetry settings.
88
- * Do NOT add PII data!
89
- */
90
- EngagementLogger.logEventWithLogEntry = function (logEntry) {
91
- var logData = {
74
+ * Engagement logging with LogEntry
75
+ *
76
+ * @remarks
77
+ * Here is an example:
78
+ * ```
79
+ * {"EngagementName":"SPPage.NavigationAction.SPPageQuickLaunchUpdate"`,
80
+ * "Properties":"{\"message\":\"[NavigationAction] | SPPageQuickLaunchUpdate | 2 | null\"}",
81
+ * "Duration":0,"LogType":0,
82
+ * "ClientTime":1459357627444,"Source":"ClientV2Engagement"}
83
+ * ```
84
+ *
85
+ * NavigationAction is moduleName in LogEntry, SPPageQuickLaunchUpdate is log feature name
86
+ * In this example, SPPage is workload name which is set in Telemetry settings.
87
+ * Do NOT add PII data!
88
+ */ static logEventWithLogEntry(logEntry) {
89
+ const logData = {
92
90
  isIntentional: logEntry.isIntentional,
93
91
  name: logEntry.moduleName + '.' + logEntry.logFeature,
94
92
  extraData: logEntry.logProperties
95
93
  };
96
94
  EngagementLogger._logEngagementData(logData, true);
97
- };
98
- EngagementLogger._logEngagementData = function (engagementData, isLogEntry) {
99
- if (isLogEntry === void 0) { isLogEntry = false; }
95
+ }
96
+ static _logEngagementData(engagementData, isLogEntry = false) {
100
97
  if (!engagementData.name || engagementData.name.length === 0) {
101
98
  throw new Error('LogEntry is invalid');
102
99
  }
@@ -104,20 +101,19 @@ var EngagementLogger = /** @class */ (function () {
104
101
  EngagementLogger._addContextData(engagementData);
105
102
  EngagementLogger._appendExtraData(engagementData);
106
103
  EngagementLogger._logManager.log(engagementData);
107
- };
104
+ }
108
105
  // tagName should follow AppName.ControlName.ActionName pattern
109
- EngagementLogger._checkValidTagName = function (engagementData, isLogEntry) {
110
- if (isLogEntry === void 0) { isLogEntry = false; }
106
+ static _checkValidTagName(engagementData, isLogEntry = false) {
111
107
  if (!isLogEntry) {
112
- var tagNameRegex = /(\w+)\.(\w+).(\w+)/gi;
108
+ const tagNameRegex = /(\w+)\.(\w+).(\w+)/gi;
113
109
  if (tagNameRegex.test(engagementData.name) === false) {
114
- throw new Error("".concat(engagementData.name, " tagName does not follow AppName.ControlName.ActionName pattern"));
110
+ throw new Error(`${engagementData.name} tagName does not follow AppName.ControlName.ActionName pattern`);
115
111
  }
116
112
  }
117
- };
118
- EngagementLogger._addContextData = function (data) {
119
- if (DiagnosticsSettingsManager_1.default.isInitialized) {
120
- var _a = DiagnosticsSettingsManager_1.default.settings, listId = _a.listId, listItemUniqueId = _a.listItemUniqueId, siteId = _a.siteId, webId = _a.webId;
113
+ }
114
+ static _addContextData(data) {
115
+ if (_DiagnosticsSettingsManager.default.isInitialized) {
116
+ const { listId, listItemUniqueId, siteId, webId } = _DiagnosticsSettingsManager.default.settings;
121
117
  data.siteId = siteId;
122
118
  data.webId = webId;
123
119
  if (listId) {
@@ -127,20 +123,19 @@ var EngagementLogger = /** @class */ (function () {
127
123
  }
128
124
  }
129
125
  }
130
- };
131
- EngagementLogger._appendExtraData = function (data) {
132
- if (DiagnosticsSettingsManager_1.default.isInitialized) {
133
- var contextInfo = DiagnosticsSettingsManager_1.default.settings.contextInfo;
126
+ }
127
+ static _appendExtraData(data) {
128
+ if (_DiagnosticsSettingsManager.default.isInitialized) {
129
+ const { settings: { contextInfo } } = _DiagnosticsSettingsManager.default;
134
130
  if (contextInfo) {
135
131
  if (!data.extraData) {
136
132
  data.extraData = {};
137
133
  }
138
- (0, setPageExtraData_1.setPageExtraData)(contextInfo, data.extraData);
134
+ (0, _setPageExtraData.setPageExtraData)(contextInfo, data.extraData);
139
135
  }
140
136
  }
141
- };
142
- EngagementLogger._logManager = new LogManager_1.default();
143
- return EngagementLogger;
144
- }());
145
- exports.default = EngagementLogger;
146
- //# sourceMappingURL=EngagementLogger.js.map
137
+ }
138
+ }
139
+ EngagementLogger._logManager = new _LogManager.default();
140
+
141
+ //# sourceMappingURL=./EngagementLogger.js.map
@@ -1,3 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IEngagementHandler.js.map
1
+ /**
2
+ * Engagement logger log data interface
3
+ * @internal
4
+ */ "use strict";
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+
9
+ //# sourceMappingURL=./IEngagementHandler.js.map