@solhun/feedback-kit-core 0.2.0 → 0.2.2
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/index.cjs +10 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +10 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2216,27 +2216,6 @@ function buildLassoEnvelope(report) {
|
|
|
2216
2216
|
const parsed = Date.parse(report.createdAt);
|
|
2217
2217
|
const timestamp = Number.isFinite(parsed) ? parsed : 0;
|
|
2218
2218
|
const el = report.element;
|
|
2219
|
-
if (report.kind === "annotation") {
|
|
2220
|
-
return {
|
|
2221
|
-
clientSubmissionId: report.clientSubmissionId,
|
|
2222
|
-
clientType,
|
|
2223
|
-
event: "annotation.add",
|
|
2224
|
-
timestamp,
|
|
2225
|
-
url: c.url ?? "",
|
|
2226
|
-
priority: report.priority,
|
|
2227
|
-
annotation: {
|
|
2228
|
-
id: report.clientSubmissionId,
|
|
2229
|
-
comment: renderReportBody(report),
|
|
2230
|
-
x: report.pin?.x ?? null,
|
|
2231
|
-
y: report.pin?.y ?? null,
|
|
2232
|
-
element: el ? el.tag : null,
|
|
2233
|
-
elementPath: el?.attributes["data-feedback-source"] ?? null,
|
|
2234
|
-
selectedText: el?.text ?? null,
|
|
2235
|
-
boundingBox: el?.boundingBox ?? null,
|
|
2236
|
-
timestamp
|
|
2237
|
-
}
|
|
2238
|
-
};
|
|
2239
|
-
}
|
|
2240
2219
|
return {
|
|
2241
2220
|
clientSubmissionId: report.clientSubmissionId,
|
|
2242
2221
|
clientType,
|
|
@@ -2249,6 +2228,16 @@ function buildLassoEnvelope(report) {
|
|
|
2249
2228
|
comment: renderReportBody(report),
|
|
2250
2229
|
pin: report.pin ? { x: report.pin.x, y: report.pin.y } : null,
|
|
2251
2230
|
sourceFile: el?.attributes["data-feedback-source"] ?? null,
|
|
2231
|
+
element: el ? {
|
|
2232
|
+
tag: el.tag,
|
|
2233
|
+
// 요소를 다시 찾는 선택자. 없으면 사람이 화면에서 찾아야 하지만
|
|
2234
|
+
// 제보 자체는 성립한다.
|
|
2235
|
+
path: el.selector ?? null,
|
|
2236
|
+
text: el.text,
|
|
2237
|
+
cssClasses: el.className,
|
|
2238
|
+
reactComponents: el.attributes["react-components"] ?? null,
|
|
2239
|
+
boundingBox: el.boundingBox
|
|
2240
|
+
} : null,
|
|
2252
2241
|
web: clientType === "web" ? {
|
|
2253
2242
|
url: c.url,
|
|
2254
2243
|
route: c.screen,
|