@inploi/plugin-feedback 6.0.0 → 6.1.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/cdn/index.js +13 -13
- package/dist/components/feedback-widget.test.d.ts +1 -0
- package/dist/feedback.d.ts +14 -0
- package/dist/i18n.d.ts +18 -0
- package/dist/plugin-feedback.cjs +373 -241
- package/dist/plugin-feedback.js +373 -241
- package/dist/style/tokens.d.ts +8 -1
- package/dist/style/tokens.test.d.ts +1 -0
- package/package.json +3 -3
package/dist/plugin-feedback.js
CHANGED
|
@@ -1923,10 +1923,6 @@ const oppositeSideMap = {
|
|
|
1923
1923
|
bottom: "top",
|
|
1924
1924
|
top: "bottom"
|
|
1925
1925
|
};
|
|
1926
|
-
const oppositeAlignmentMap = {
|
|
1927
|
-
start: "end",
|
|
1928
|
-
end: "start"
|
|
1929
|
-
};
|
|
1930
1926
|
function clamp(start, value, end) {
|
|
1931
1927
|
return max(start, min(value, end));
|
|
1932
1928
|
}
|
|
@@ -1945,9 +1941,9 @@ function getOppositeAxis(axis) {
|
|
|
1945
1941
|
function getAxisLength(axis) {
|
|
1946
1942
|
return axis === "y" ? "height" : "width";
|
|
1947
1943
|
}
|
|
1948
|
-
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
1949
1944
|
function getSideAxis(placement) {
|
|
1950
|
-
|
|
1945
|
+
const firstChar = placement[0];
|
|
1946
|
+
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
1951
1947
|
}
|
|
1952
1948
|
function getAlignmentAxis(placement) {
|
|
1953
1949
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -1970,7 +1966,7 @@ function getExpandedPlacements(placement) {
|
|
|
1970
1966
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
1971
1967
|
}
|
|
1972
1968
|
function getOppositeAlignmentPlacement(placement) {
|
|
1973
|
-
return placement.replace(
|
|
1969
|
+
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
1974
1970
|
}
|
|
1975
1971
|
const lrPlacement = ["left", "right"];
|
|
1976
1972
|
const rlPlacement = ["right", "left"];
|
|
@@ -2002,7 +1998,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
|
2002
1998
|
return list;
|
|
2003
1999
|
}
|
|
2004
2000
|
function getOppositePlacement(placement) {
|
|
2005
|
-
|
|
2001
|
+
const side = getSide(placement);
|
|
2002
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
2006
2003
|
}
|
|
2007
2004
|
function expandPaddingObject(padding) {
|
|
2008
2005
|
return {
|
|
@@ -2094,6 +2091,63 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
2094
2091
|
}
|
|
2095
2092
|
return coords;
|
|
2096
2093
|
}
|
|
2094
|
+
async function detectOverflow(state, options2) {
|
|
2095
|
+
var _await$platform$isEle;
|
|
2096
|
+
if (options2 === void 0) {
|
|
2097
|
+
options2 = {};
|
|
2098
|
+
}
|
|
2099
|
+
const {
|
|
2100
|
+
x: x2,
|
|
2101
|
+
y: y2,
|
|
2102
|
+
platform: platform2,
|
|
2103
|
+
rects,
|
|
2104
|
+
elements,
|
|
2105
|
+
strategy
|
|
2106
|
+
} = state;
|
|
2107
|
+
const {
|
|
2108
|
+
boundary = "clippingAncestors",
|
|
2109
|
+
rootBoundary = "viewport",
|
|
2110
|
+
elementContext = "floating",
|
|
2111
|
+
altBoundary = false,
|
|
2112
|
+
padding = 0
|
|
2113
|
+
} = evaluate(options2, state);
|
|
2114
|
+
const paddingObject = getPaddingObject(padding);
|
|
2115
|
+
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
2116
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
2117
|
+
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
2118
|
+
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
|
|
2119
|
+
boundary,
|
|
2120
|
+
rootBoundary,
|
|
2121
|
+
strategy
|
|
2122
|
+
}));
|
|
2123
|
+
const rect = elementContext === "floating" ? {
|
|
2124
|
+
x: x2,
|
|
2125
|
+
y: y2,
|
|
2126
|
+
width: rects.floating.width,
|
|
2127
|
+
height: rects.floating.height
|
|
2128
|
+
} : rects.reference;
|
|
2129
|
+
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
2130
|
+
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
2131
|
+
x: 1,
|
|
2132
|
+
y: 1
|
|
2133
|
+
} : {
|
|
2134
|
+
x: 1,
|
|
2135
|
+
y: 1
|
|
2136
|
+
};
|
|
2137
|
+
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2138
|
+
elements,
|
|
2139
|
+
rect,
|
|
2140
|
+
offsetParent,
|
|
2141
|
+
strategy
|
|
2142
|
+
}) : rect);
|
|
2143
|
+
return {
|
|
2144
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
2145
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
2146
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
2147
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
const MAX_RESET_COUNT = 50;
|
|
2097
2151
|
const computePosition$1 = async (reference, floating, config) => {
|
|
2098
2152
|
const {
|
|
2099
2153
|
placement = "bottom",
|
|
@@ -2101,7 +2155,10 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2101
2155
|
middleware = [],
|
|
2102
2156
|
platform: platform2
|
|
2103
2157
|
} = config;
|
|
2104
|
-
const
|
|
2158
|
+
const platformWithDetectOverflow = platform2.detectOverflow ? platform2 : {
|
|
2159
|
+
...platform2,
|
|
2160
|
+
detectOverflow
|
|
2161
|
+
};
|
|
2105
2162
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
|
|
2106
2163
|
let rects = await platform2.getElementRects({
|
|
2107
2164
|
reference,
|
|
@@ -2113,13 +2170,17 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2113
2170
|
y: y2
|
|
2114
2171
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
2115
2172
|
let statefulPlacement = placement;
|
|
2116
|
-
let middlewareData = {};
|
|
2117
2173
|
let resetCount = 0;
|
|
2118
|
-
|
|
2174
|
+
const middlewareData = {};
|
|
2175
|
+
for (let i2 = 0; i2 < middleware.length; i2++) {
|
|
2176
|
+
const currentMiddleware = middleware[i2];
|
|
2177
|
+
if (!currentMiddleware) {
|
|
2178
|
+
continue;
|
|
2179
|
+
}
|
|
2119
2180
|
const {
|
|
2120
2181
|
name,
|
|
2121
2182
|
fn: fn2
|
|
2122
|
-
} =
|
|
2183
|
+
} = currentMiddleware;
|
|
2123
2184
|
const {
|
|
2124
2185
|
x: nextX,
|
|
2125
2186
|
y: nextY,
|
|
@@ -2133,7 +2194,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2133
2194
|
strategy,
|
|
2134
2195
|
middlewareData,
|
|
2135
2196
|
rects,
|
|
2136
|
-
platform:
|
|
2197
|
+
platform: platformWithDetectOverflow,
|
|
2137
2198
|
elements: {
|
|
2138
2199
|
reference,
|
|
2139
2200
|
floating
|
|
@@ -2141,14 +2202,11 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2141
2202
|
});
|
|
2142
2203
|
x2 = nextX != null ? nextX : x2;
|
|
2143
2204
|
y2 = nextY != null ? nextY : y2;
|
|
2144
|
-
middlewareData = {
|
|
2145
|
-
...middlewareData,
|
|
2146
|
-
|
|
2147
|
-
...middlewareData[name],
|
|
2148
|
-
...data
|
|
2149
|
-
}
|
|
2205
|
+
middlewareData[name] = {
|
|
2206
|
+
...middlewareData[name],
|
|
2207
|
+
...data
|
|
2150
2208
|
};
|
|
2151
|
-
if (reset && resetCount
|
|
2209
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
2152
2210
|
resetCount++;
|
|
2153
2211
|
if (typeof reset === "object") {
|
|
2154
2212
|
if (reset.placement) {
|
|
@@ -2177,62 +2235,6 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
2177
2235
|
middlewareData
|
|
2178
2236
|
};
|
|
2179
2237
|
};
|
|
2180
|
-
async function detectOverflow(state, options2) {
|
|
2181
|
-
var _await$platform$isEle;
|
|
2182
|
-
if (options2 === void 0) {
|
|
2183
|
-
options2 = {};
|
|
2184
|
-
}
|
|
2185
|
-
const {
|
|
2186
|
-
x: x2,
|
|
2187
|
-
y: y2,
|
|
2188
|
-
platform: platform2,
|
|
2189
|
-
rects,
|
|
2190
|
-
elements,
|
|
2191
|
-
strategy
|
|
2192
|
-
} = state;
|
|
2193
|
-
const {
|
|
2194
|
-
boundary = "clippingAncestors",
|
|
2195
|
-
rootBoundary = "viewport",
|
|
2196
|
-
elementContext = "floating",
|
|
2197
|
-
altBoundary = false,
|
|
2198
|
-
padding = 0
|
|
2199
|
-
} = evaluate(options2, state);
|
|
2200
|
-
const paddingObject = getPaddingObject(padding);
|
|
2201
|
-
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
2202
|
-
const element = elements[altBoundary ? altContext : elementContext];
|
|
2203
|
-
const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
|
|
2204
|
-
element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
|
|
2205
|
-
boundary,
|
|
2206
|
-
rootBoundary,
|
|
2207
|
-
strategy
|
|
2208
|
-
}));
|
|
2209
|
-
const rect = elementContext === "floating" ? {
|
|
2210
|
-
x: x2,
|
|
2211
|
-
y: y2,
|
|
2212
|
-
width: rects.floating.width,
|
|
2213
|
-
height: rects.floating.height
|
|
2214
|
-
} : rects.reference;
|
|
2215
|
-
const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
|
|
2216
|
-
const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
|
|
2217
|
-
x: 1,
|
|
2218
|
-
y: 1
|
|
2219
|
-
} : {
|
|
2220
|
-
x: 1,
|
|
2221
|
-
y: 1
|
|
2222
|
-
};
|
|
2223
|
-
const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2224
|
-
elements,
|
|
2225
|
-
rect,
|
|
2226
|
-
offsetParent,
|
|
2227
|
-
strategy
|
|
2228
|
-
}) : rect);
|
|
2229
|
-
return {
|
|
2230
|
-
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
2231
|
-
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
2232
|
-
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
2233
|
-
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
2234
|
-
};
|
|
2235
|
-
}
|
|
2236
2238
|
const arrow$3 = (options2) => ({
|
|
2237
2239
|
name: "arrow",
|
|
2238
2240
|
options: options2,
|
|
@@ -2334,7 +2336,7 @@ const flip$2 = function(options2) {
|
|
|
2334
2336
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
2335
2337
|
}
|
|
2336
2338
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
2337
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
2339
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
2338
2340
|
const overflows = [];
|
|
2339
2341
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
2340
2342
|
if (checkMainAxis) {
|
|
@@ -2353,15 +2355,20 @@ const flip$2 = function(options2) {
|
|
|
2353
2355
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
2354
2356
|
const nextPlacement = placements[nextIndex];
|
|
2355
2357
|
if (nextPlacement) {
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2358
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
2359
|
+
if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
|
|
2360
|
+
// overflows the main axis.
|
|
2361
|
+
overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : true)) {
|
|
2362
|
+
return {
|
|
2363
|
+
data: {
|
|
2364
|
+
index: nextIndex,
|
|
2365
|
+
overflows: overflowsData
|
|
2366
|
+
},
|
|
2367
|
+
reset: {
|
|
2368
|
+
placement: nextPlacement
|
|
2369
|
+
}
|
|
2370
|
+
};
|
|
2371
|
+
}
|
|
2365
2372
|
}
|
|
2366
2373
|
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
2367
2374
|
if (!resetPlacement) {
|
|
@@ -2419,7 +2426,8 @@ const hide$2 = function(options2) {
|
|
|
2419
2426
|
options: options2,
|
|
2420
2427
|
async fn(state) {
|
|
2421
2428
|
const {
|
|
2422
|
-
rects
|
|
2429
|
+
rects,
|
|
2430
|
+
platform: platform2
|
|
2423
2431
|
} = state;
|
|
2424
2432
|
const {
|
|
2425
2433
|
strategy = "referenceHidden",
|
|
@@ -2427,7 +2435,7 @@ const hide$2 = function(options2) {
|
|
|
2427
2435
|
} = evaluate(options2, state);
|
|
2428
2436
|
switch (strategy) {
|
|
2429
2437
|
case "referenceHidden": {
|
|
2430
|
-
const overflow = await detectOverflow(state, {
|
|
2438
|
+
const overflow = await platform2.detectOverflow(state, {
|
|
2431
2439
|
...detectOverflowOptions,
|
|
2432
2440
|
elementContext: "reference"
|
|
2433
2441
|
});
|
|
@@ -2440,7 +2448,7 @@ const hide$2 = function(options2) {
|
|
|
2440
2448
|
};
|
|
2441
2449
|
}
|
|
2442
2450
|
case "escaped": {
|
|
2443
|
-
const overflow = await detectOverflow(state, {
|
|
2451
|
+
const overflow = await platform2.detectOverflow(state, {
|
|
2444
2452
|
...detectOverflowOptions,
|
|
2445
2453
|
altBoundary: true
|
|
2446
2454
|
});
|
|
@@ -2459,6 +2467,7 @@ const hide$2 = function(options2) {
|
|
|
2459
2467
|
}
|
|
2460
2468
|
};
|
|
2461
2469
|
};
|
|
2470
|
+
const originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
2462
2471
|
async function convertValueToCoords(state, options2) {
|
|
2463
2472
|
const {
|
|
2464
2473
|
placement,
|
|
@@ -2469,7 +2478,7 @@ async function convertValueToCoords(state, options2) {
|
|
|
2469
2478
|
const side = getSide(placement);
|
|
2470
2479
|
const alignment = getAlignment(placement);
|
|
2471
2480
|
const isVertical = getSideAxis(placement) === "y";
|
|
2472
|
-
const mainAxisMulti =
|
|
2481
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
2473
2482
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
2474
2483
|
const rawValue = evaluate(options2, state);
|
|
2475
2484
|
let {
|
|
@@ -2481,10 +2490,9 @@ async function convertValueToCoords(state, options2) {
|
|
|
2481
2490
|
crossAxis: 0,
|
|
2482
2491
|
alignmentAxis: null
|
|
2483
2492
|
} : {
|
|
2484
|
-
mainAxis: 0,
|
|
2485
|
-
crossAxis: 0,
|
|
2486
|
-
alignmentAxis:
|
|
2487
|
-
...rawValue
|
|
2493
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
2494
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
2495
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
2488
2496
|
};
|
|
2489
2497
|
if (alignment && typeof alignmentAxis === "number") {
|
|
2490
2498
|
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
@@ -2538,7 +2546,8 @@ const shift$2 = function(options2) {
|
|
|
2538
2546
|
const {
|
|
2539
2547
|
x: x2,
|
|
2540
2548
|
y: y2,
|
|
2541
|
-
placement
|
|
2549
|
+
placement,
|
|
2550
|
+
platform: platform2
|
|
2542
2551
|
} = state;
|
|
2543
2552
|
const {
|
|
2544
2553
|
mainAxis: checkMainAxis = true,
|
|
@@ -2561,7 +2570,7 @@ const shift$2 = function(options2) {
|
|
|
2561
2570
|
x: x2,
|
|
2562
2571
|
y: y2
|
|
2563
2572
|
};
|
|
2564
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
2573
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
2565
2574
|
const crossAxis = getSideAxis(getSide(placement));
|
|
2566
2575
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
2567
2576
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -2589,7 +2598,11 @@ const shift$2 = function(options2) {
|
|
|
2589
2598
|
...limitedCoords,
|
|
2590
2599
|
data: {
|
|
2591
2600
|
x: limitedCoords.x - x2,
|
|
2592
|
-
y: limitedCoords.y - y2
|
|
2601
|
+
y: limitedCoords.y - y2,
|
|
2602
|
+
enabled: {
|
|
2603
|
+
[mainAxis]: checkMainAxis,
|
|
2604
|
+
[crossAxis]: checkCrossAxis
|
|
2605
|
+
}
|
|
2593
2606
|
}
|
|
2594
2607
|
};
|
|
2595
2608
|
}
|
|
@@ -2644,7 +2657,7 @@ const limitShift$2 = function(options2) {
|
|
|
2644
2657
|
if (checkCrossAxis) {
|
|
2645
2658
|
var _middlewareData$offse, _middlewareData$offse2;
|
|
2646
2659
|
const len = mainAxis === "y" ? "width" : "height";
|
|
2647
|
-
const isOriginSide =
|
|
2660
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
2648
2661
|
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
2649
2662
|
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
2650
2663
|
if (crossAxisCoord < limitMin) {
|
|
@@ -2668,6 +2681,7 @@ const size$2 = function(options2) {
|
|
|
2668
2681
|
name: "size",
|
|
2669
2682
|
options: options2,
|
|
2670
2683
|
async fn(state) {
|
|
2684
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
2671
2685
|
const {
|
|
2672
2686
|
placement,
|
|
2673
2687
|
rects,
|
|
@@ -2679,7 +2693,7 @@ const size$2 = function(options2) {
|
|
|
2679
2693
|
},
|
|
2680
2694
|
...detectOverflowOptions
|
|
2681
2695
|
} = evaluate(options2, state);
|
|
2682
|
-
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
2696
|
+
const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
|
|
2683
2697
|
const side = getSide(placement);
|
|
2684
2698
|
const alignment = getAlignment(placement);
|
|
2685
2699
|
const isYAxis = getSideAxis(placement) === "y";
|
|
@@ -2703,10 +2717,11 @@ const size$2 = function(options2) {
|
|
|
2703
2717
|
const noShift = !state.middlewareData.shift;
|
|
2704
2718
|
let availableHeight = overflowAvailableHeight;
|
|
2705
2719
|
let availableWidth = overflowAvailableWidth;
|
|
2706
|
-
if (
|
|
2707
|
-
availableWidth =
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2720
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
2721
|
+
availableWidth = maximumClippingWidth;
|
|
2722
|
+
}
|
|
2723
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
2724
|
+
availableHeight = maximumClippingHeight;
|
|
2710
2725
|
}
|
|
2711
2726
|
if (noShift && !alignment) {
|
|
2712
2727
|
const xMin = max(overflow.left, 0);
|
|
@@ -2777,7 +2792,6 @@ function isShadowRoot(value) {
|
|
|
2777
2792
|
}
|
|
2778
2793
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
2779
2794
|
}
|
|
2780
|
-
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
2781
2795
|
function isOverflowElement(element) {
|
|
2782
2796
|
const {
|
|
2783
2797
|
overflow,
|
|
@@ -2785,29 +2799,31 @@ function isOverflowElement(element) {
|
|
|
2785
2799
|
overflowY,
|
|
2786
2800
|
display
|
|
2787
2801
|
} = getComputedStyle$1(element);
|
|
2788
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) &&
|
|
2802
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
2789
2803
|
}
|
|
2790
|
-
const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
2791
2804
|
function isTableElement(element) {
|
|
2792
|
-
return
|
|
2805
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
2793
2806
|
}
|
|
2794
|
-
const topLayerSelectors = [":popover-open", ":modal"];
|
|
2795
2807
|
function isTopLayer(element) {
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
return
|
|
2799
|
-
} catch (_e) {
|
|
2800
|
-
return false;
|
|
2808
|
+
try {
|
|
2809
|
+
if (element.matches(":popover-open")) {
|
|
2810
|
+
return true;
|
|
2801
2811
|
}
|
|
2802
|
-
})
|
|
2812
|
+
} catch (_e) {
|
|
2813
|
+
}
|
|
2814
|
+
try {
|
|
2815
|
+
return element.matches(":modal");
|
|
2816
|
+
} catch (_e) {
|
|
2817
|
+
return false;
|
|
2818
|
+
}
|
|
2803
2819
|
}
|
|
2804
|
-
const
|
|
2805
|
-
const
|
|
2806
|
-
const
|
|
2820
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
2821
|
+
const containRe = /paint|layout|strict|content/;
|
|
2822
|
+
const isNotNone = (value) => !!value && value !== "none";
|
|
2823
|
+
let isWebKitValue;
|
|
2807
2824
|
function isContainingBlock(elementOrCss) {
|
|
2808
|
-
const webkit = isWebKit();
|
|
2809
2825
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
2810
|
-
return
|
|
2826
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
2811
2827
|
}
|
|
2812
2828
|
function getContainingBlock(element) {
|
|
2813
2829
|
let currentNode = getParentNode(element);
|
|
@@ -2822,13 +2838,13 @@ function getContainingBlock(element) {
|
|
|
2822
2838
|
return null;
|
|
2823
2839
|
}
|
|
2824
2840
|
function isWebKit() {
|
|
2825
|
-
if (
|
|
2826
|
-
|
|
2827
|
-
|
|
2841
|
+
if (isWebKitValue == null) {
|
|
2842
|
+
isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
2843
|
+
}
|
|
2844
|
+
return isWebKitValue;
|
|
2828
2845
|
}
|
|
2829
|
-
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
2830
2846
|
function isLastTraversableNode(node) {
|
|
2831
|
-
return
|
|
2847
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
2832
2848
|
}
|
|
2833
2849
|
function getComputedStyle$1(element) {
|
|
2834
2850
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -2882,8 +2898,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
2882
2898
|
if (isBody) {
|
|
2883
2899
|
const frameElement = getFrameElement(win);
|
|
2884
2900
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
2901
|
+
} else {
|
|
2902
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
2885
2903
|
}
|
|
2886
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
2887
2904
|
}
|
|
2888
2905
|
function getFrameElement(win) {
|
|
2889
2906
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
@@ -3005,6 +3022,22 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
3005
3022
|
y: y2
|
|
3006
3023
|
});
|
|
3007
3024
|
}
|
|
3025
|
+
function getWindowScrollBarX(element, rect) {
|
|
3026
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
3027
|
+
if (!rect) {
|
|
3028
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
3029
|
+
}
|
|
3030
|
+
return rect.left + leftScroll;
|
|
3031
|
+
}
|
|
3032
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
3033
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
3034
|
+
const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
3035
|
+
const y2 = htmlRect.top + scroll.scrollTop;
|
|
3036
|
+
return {
|
|
3037
|
+
x: x2,
|
|
3038
|
+
y: y2
|
|
3039
|
+
};
|
|
3040
|
+
}
|
|
3008
3041
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
3009
3042
|
let {
|
|
3010
3043
|
elements,
|
|
@@ -3029,26 +3062,24 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
3029
3062
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
3030
3063
|
scroll = getNodeScroll(offsetParent);
|
|
3031
3064
|
}
|
|
3032
|
-
if (
|
|
3065
|
+
if (isOffsetParentAnElement) {
|
|
3033
3066
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
3034
3067
|
scale = getScale(offsetParent);
|
|
3035
3068
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
3036
3069
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
3037
3070
|
}
|
|
3038
3071
|
}
|
|
3072
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
3039
3073
|
return {
|
|
3040
3074
|
width: rect.width * scale.x,
|
|
3041
3075
|
height: rect.height * scale.y,
|
|
3042
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
3043
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
3076
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
3077
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
3044
3078
|
};
|
|
3045
3079
|
}
|
|
3046
3080
|
function getClientRects(element) {
|
|
3047
3081
|
return Array.from(element.getClientRects());
|
|
3048
3082
|
}
|
|
3049
|
-
function getWindowScrollBarX(element) {
|
|
3050
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
3051
|
-
}
|
|
3052
3083
|
function getDocumentRect(element) {
|
|
3053
3084
|
const html = getDocumentElement(element);
|
|
3054
3085
|
const scroll = getNodeScroll(element);
|
|
@@ -3067,6 +3098,7 @@ function getDocumentRect(element) {
|
|
|
3067
3098
|
y: y2
|
|
3068
3099
|
};
|
|
3069
3100
|
}
|
|
3101
|
+
const SCROLLBAR_MAX = 25;
|
|
3070
3102
|
function getViewportRect(element, strategy) {
|
|
3071
3103
|
const win = getWindow(element);
|
|
3072
3104
|
const html = getDocumentElement(element);
|
|
@@ -3084,6 +3116,19 @@ function getViewportRect(element, strategy) {
|
|
|
3084
3116
|
y2 = visualViewport.offsetTop;
|
|
3085
3117
|
}
|
|
3086
3118
|
}
|
|
3119
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
3120
|
+
if (windowScrollbarX <= 0) {
|
|
3121
|
+
const doc = html.ownerDocument;
|
|
3122
|
+
const body = doc.body;
|
|
3123
|
+
const bodyStyles = getComputedStyle(body);
|
|
3124
|
+
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
3125
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
3126
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
3127
|
+
width -= clippingStableScrollbarWidth;
|
|
3128
|
+
}
|
|
3129
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
3130
|
+
width += windowScrollbarX;
|
|
3131
|
+
}
|
|
3087
3132
|
return {
|
|
3088
3133
|
width,
|
|
3089
3134
|
height,
|
|
@@ -3118,9 +3163,10 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
3118
3163
|
} else {
|
|
3119
3164
|
const visualOffsets = getVisualOffsets(element);
|
|
3120
3165
|
rect = {
|
|
3121
|
-
...clippingAncestor,
|
|
3122
3166
|
x: clippingAncestor.x - visualOffsets.x,
|
|
3123
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
3167
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
3168
|
+
width: clippingAncestor.width,
|
|
3169
|
+
height: clippingAncestor.height
|
|
3124
3170
|
};
|
|
3125
3171
|
}
|
|
3126
3172
|
return rectToClientRect(rect);
|
|
@@ -3147,7 +3193,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
3147
3193
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
3148
3194
|
currentContainingBlockComputedStyle = null;
|
|
3149
3195
|
}
|
|
3150
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
3196
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
3151
3197
|
if (shouldDropCurrentNode) {
|
|
3152
3198
|
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
3153
3199
|
} else {
|
|
@@ -3167,20 +3213,23 @@ function getClippingRect(_ref) {
|
|
|
3167
3213
|
} = _ref;
|
|
3168
3214
|
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
3169
3215
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
3170
|
-
const
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3216
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
3217
|
+
let top = firstRect.top;
|
|
3218
|
+
let right = firstRect.right;
|
|
3219
|
+
let bottom = firstRect.bottom;
|
|
3220
|
+
let left = firstRect.left;
|
|
3221
|
+
for (let i2 = 1; i2 < clippingAncestors.length; i2++) {
|
|
3222
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i2], strategy);
|
|
3223
|
+
top = max(rect.top, top);
|
|
3224
|
+
right = min(rect.right, right);
|
|
3225
|
+
bottom = min(rect.bottom, bottom);
|
|
3226
|
+
left = max(rect.left, left);
|
|
3227
|
+
}
|
|
3179
3228
|
return {
|
|
3180
|
-
width:
|
|
3181
|
-
height:
|
|
3182
|
-
x:
|
|
3183
|
-
y:
|
|
3229
|
+
width: right - left,
|
|
3230
|
+
height: bottom - top,
|
|
3231
|
+
x: left,
|
|
3232
|
+
y: top
|
|
3184
3233
|
};
|
|
3185
3234
|
}
|
|
3186
3235
|
function getDimensions(element) {
|
|
@@ -3203,6 +3252,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
3203
3252
|
scrollTop: 0
|
|
3204
3253
|
};
|
|
3205
3254
|
const offsets = createCoords(0);
|
|
3255
|
+
function setLeftRTLScrollbarOffset() {
|
|
3256
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
3257
|
+
}
|
|
3206
3258
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
3207
3259
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
3208
3260
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -3212,11 +3264,15 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
3212
3264
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
3213
3265
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
3214
3266
|
} else if (documentElement) {
|
|
3215
|
-
|
|
3267
|
+
setLeftRTLScrollbarOffset();
|
|
3216
3268
|
}
|
|
3217
3269
|
}
|
|
3218
|
-
|
|
3219
|
-
|
|
3270
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
3271
|
+
setLeftRTLScrollbarOffset();
|
|
3272
|
+
}
|
|
3273
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
3274
|
+
const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
3275
|
+
const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
3220
3276
|
return {
|
|
3221
3277
|
x: x2,
|
|
3222
3278
|
y: y2,
|
|
@@ -3234,7 +3290,11 @@ function getTrueOffsetParent(element, polyfill) {
|
|
|
3234
3290
|
if (polyfill) {
|
|
3235
3291
|
return polyfill(element);
|
|
3236
3292
|
}
|
|
3237
|
-
|
|
3293
|
+
let rawOffsetParent = element.offsetParent;
|
|
3294
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
3295
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
3296
|
+
}
|
|
3297
|
+
return rawOffsetParent;
|
|
3238
3298
|
}
|
|
3239
3299
|
function getOffsetParent(element, polyfill) {
|
|
3240
3300
|
const win = getWindow(element);
|
|
@@ -3289,6 +3349,9 @@ const platform = {
|
|
|
3289
3349
|
isElement,
|
|
3290
3350
|
isRTL
|
|
3291
3351
|
};
|
|
3352
|
+
function rectsAreEqual(a2, b2) {
|
|
3353
|
+
return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height;
|
|
3354
|
+
}
|
|
3292
3355
|
function observeMove(element, onMove) {
|
|
3293
3356
|
let io = null;
|
|
3294
3357
|
let timeoutId;
|
|
@@ -3307,12 +3370,13 @@ function observeMove(element, onMove) {
|
|
|
3307
3370
|
threshold = 1;
|
|
3308
3371
|
}
|
|
3309
3372
|
cleanup();
|
|
3373
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
3310
3374
|
const {
|
|
3311
3375
|
left,
|
|
3312
3376
|
top,
|
|
3313
3377
|
width,
|
|
3314
3378
|
height
|
|
3315
|
-
} =
|
|
3379
|
+
} = elementRectForRootMargin;
|
|
3316
3380
|
if (!skip) {
|
|
3317
3381
|
onMove();
|
|
3318
3382
|
}
|
|
@@ -3343,6 +3407,9 @@ function observeMove(element, onMove) {
|
|
|
3343
3407
|
refresh(false, ratio);
|
|
3344
3408
|
}
|
|
3345
3409
|
}
|
|
3410
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
3411
|
+
refresh();
|
|
3412
|
+
}
|
|
3346
3413
|
isFirstUpdate = false;
|
|
3347
3414
|
}
|
|
3348
3415
|
try {
|
|
@@ -3351,7 +3418,7 @@ function observeMove(element, onMove) {
|
|
|
3351
3418
|
// Handle <iframe>s
|
|
3352
3419
|
root: root.ownerDocument
|
|
3353
3420
|
});
|
|
3354
|
-
} catch (
|
|
3421
|
+
} catch (_e) {
|
|
3355
3422
|
io = new IntersectionObserver(handleObserve, options2);
|
|
3356
3423
|
}
|
|
3357
3424
|
io.observe(element);
|
|
@@ -3371,7 +3438,7 @@ function autoUpdate(reference, floating, update, options2) {
|
|
|
3371
3438
|
animationFrame = false
|
|
3372
3439
|
} = options2;
|
|
3373
3440
|
const referenceEl = unwrapElement(reference);
|
|
3374
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
3441
|
+
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
3375
3442
|
ancestors.forEach((ancestor) => {
|
|
3376
3443
|
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
3377
3444
|
passive: true
|
|
@@ -3384,7 +3451,7 @@ function autoUpdate(reference, floating, update, options2) {
|
|
|
3384
3451
|
if (elementResize) {
|
|
3385
3452
|
resizeObserver = new ResizeObserver((_ref) => {
|
|
3386
3453
|
let [firstEntry] = _ref;
|
|
3387
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
3454
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
3388
3455
|
resizeObserver.unobserve(floating);
|
|
3389
3456
|
cancelAnimationFrame(reobserveFrame);
|
|
3390
3457
|
reobserveFrame = requestAnimationFrame(() => {
|
|
@@ -3397,7 +3464,9 @@ function autoUpdate(reference, floating, update, options2) {
|
|
|
3397
3464
|
if (referenceEl && !animationFrame) {
|
|
3398
3465
|
resizeObserver.observe(referenceEl);
|
|
3399
3466
|
}
|
|
3400
|
-
|
|
3467
|
+
if (floating) {
|
|
3468
|
+
resizeObserver.observe(floating);
|
|
3469
|
+
}
|
|
3401
3470
|
}
|
|
3402
3471
|
let frameId;
|
|
3403
3472
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -3406,7 +3475,7 @@ function autoUpdate(reference, floating, update, options2) {
|
|
|
3406
3475
|
}
|
|
3407
3476
|
function frameLoop() {
|
|
3408
3477
|
const nextRefRect = getBoundingClientRect(reference);
|
|
3409
|
-
if (prevRefRect && (
|
|
3478
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
3410
3479
|
update();
|
|
3411
3480
|
}
|
|
3412
3481
|
prevRefRect = nextRefRect;
|
|
@@ -5277,6 +5346,8 @@ var createTranslation = (defaultTerms) => {
|
|
|
5277
5346
|
};
|
|
5278
5347
|
const { TranslationProvider, createTFunction, useTranslation } = createTranslation({
|
|
5279
5348
|
a11y_label: "How was your experience?",
|
|
5349
|
+
positive_label: "Good",
|
|
5350
|
+
negative_label: "Bad",
|
|
5280
5351
|
positive_heading: "Thanks!",
|
|
5281
5352
|
negative_heading: "We’re sorry to hear that",
|
|
5282
5353
|
positive_text: "Would you like to tell us more about your experience?",
|
|
@@ -5285,7 +5356,8 @@ const { TranslationProvider, createTFunction, useTranslation } = createTranslati
|
|
|
5285
5356
|
submitting: "Sending feedback...",
|
|
5286
5357
|
skip: "No, thanks",
|
|
5287
5358
|
submitted_heading: "Thank you!",
|
|
5288
|
-
submitted_text: "Your feedback has been sent and will be used to improve our products."
|
|
5359
|
+
submitted_text: "Your feedback has been sent and will be used to improve our products.",
|
|
5360
|
+
comment_minimum: "Please type more characters in the comment box"
|
|
5289
5361
|
});
|
|
5290
5362
|
var COLOR_SHADES = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
5291
5363
|
var OKLCH_PRESETS = {
|
|
@@ -5409,52 +5481,62 @@ var designTokens = () => {
|
|
|
5409
5481
|
};
|
|
5410
5482
|
};
|
|
5411
5483
|
const [black, white, transparent] = ["oklch(0 0 0)", "oklch(100 0 0)", "transparent"];
|
|
5412
|
-
const tokens = designTokens().core(({ theme }) =>
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5484
|
+
const tokens = designTokens().core(({ theme }) => {
|
|
5485
|
+
const accent = generatePalette({
|
|
5486
|
+
prefix: "a-",
|
|
5487
|
+
hue: theme.accent.hue,
|
|
5488
|
+
chroma: theme.accent.chroma,
|
|
5489
|
+
mode: theme.mode,
|
|
5490
|
+
transform: sameAsInput
|
|
5491
|
+
});
|
|
5492
|
+
const exact = theme.exactAccent;
|
|
5493
|
+
return {
|
|
5494
|
+
color: {
|
|
5495
|
+
transparent,
|
|
5496
|
+
black,
|
|
5497
|
+
white,
|
|
5498
|
+
lowest: theme.mode === "light" ? white : black,
|
|
5499
|
+
highest: theme.mode === "light" ? black : white,
|
|
5500
|
+
...accent,
|
|
5501
|
+
/** The solid accent fill (the submit button), pressed, and its text. An exact accent lands unchanged here only:
|
|
5502
|
+
* text and focus rings keep the palette's contrast-controlled shades. */
|
|
5503
|
+
"a-solid": (exact == null ? void 0 : exact.color) ?? accent["a-9"],
|
|
5504
|
+
"a-solid-pressed": exact ? `color-mix(in oklab, ${exact.color} 88%, black)` : theme.mode === "light" ? accent["a-10"] : accent["a-8"],
|
|
5505
|
+
"on-a": (exact == null ? void 0 : exact.text) ?? (theme.mode === "light" ? accent["a-1"] : white),
|
|
5506
|
+
...generatePalette({
|
|
5507
|
+
prefix: "n-",
|
|
5508
|
+
hue: theme.accent.hue,
|
|
5509
|
+
// An achromatic accent gets achromatic neutrals; otherwise neutrals carry a faint tint of the accent hue.
|
|
5510
|
+
chroma: theme.accent.chroma === 0 ? 0 : 0.05,
|
|
5511
|
+
mode: theme.mode,
|
|
5512
|
+
transform: sameAsInput
|
|
5513
|
+
}),
|
|
5514
|
+
...generatePalette({
|
|
5515
|
+
prefix: "p-",
|
|
5516
|
+
hue: theme.positive.hue,
|
|
5517
|
+
chroma: theme.positive.chroma,
|
|
5518
|
+
mode: theme.mode,
|
|
5519
|
+
transform: sameAsInput
|
|
5520
|
+
}),
|
|
5521
|
+
...generatePalette({
|
|
5522
|
+
prefix: "e-",
|
|
5523
|
+
hue: theme.negative.hue,
|
|
5524
|
+
chroma: theme.negative.chroma,
|
|
5525
|
+
mode: theme.mode,
|
|
5526
|
+
transform: sameAsInput
|
|
5527
|
+
})
|
|
5528
|
+
},
|
|
5529
|
+
radius: {
|
|
5530
|
+
base: theme.corners === "rounded" ? ".25rem" : theme.corners === "soft" ? ".125rem" : "0",
|
|
5531
|
+
multiplier: theme.corners === "rounded" ? "0.5rem" : theme.corners === "soft" ? "0.175rem" : "0"
|
|
5532
|
+
},
|
|
5533
|
+
duration: {
|
|
5534
|
+
snappy: ".4s",
|
|
5535
|
+
medium: ".6s",
|
|
5536
|
+
slow: ".9s"
|
|
5537
|
+
}
|
|
5538
|
+
};
|
|
5539
|
+
}).semantic(({ core }) => ({
|
|
5458
5540
|
radius: {
|
|
5459
5541
|
sm: `calc(${core("radius.base")} + (0 * ${core("radius.multiplier")}))`,
|
|
5460
5542
|
md: `calc(${core("radius.base")} + (1 * ${core("radius.multiplier")}))`,
|
|
@@ -5536,12 +5618,12 @@ function noop() {
|
|
|
5536
5618
|
}
|
|
5537
5619
|
const options = [
|
|
5538
5620
|
{
|
|
5539
|
-
label: "
|
|
5621
|
+
label: "positive_label",
|
|
5540
5622
|
icon: /* @__PURE__ */ u$1(Icon, { name: "happy" }),
|
|
5541
5623
|
value: 1,
|
|
5542
5624
|
variant: "positive"
|
|
5543
5625
|
},
|
|
5544
|
-
{ label: "
|
|
5626
|
+
{ label: "negative_label", icon: /* @__PURE__ */ u$1(Icon, { name: "sad" }), value: -1, variant: "negative" }
|
|
5545
5627
|
];
|
|
5546
5628
|
const submitWithMetaEnter = (e2) => {
|
|
5547
5629
|
const isSubmitCombo = e2.key === "Enter" && e2.metaKey;
|
|
@@ -5559,24 +5641,30 @@ const Label = () => {
|
|
|
5559
5641
|
const FeedbackWidget = ({ analytics, params, logger }) => {
|
|
5560
5642
|
const variants = getThemeVariants(params.theme).join(" ");
|
|
5561
5643
|
const id = g$1();
|
|
5644
|
+
const ratings = A$1(null);
|
|
5645
|
+
const t2 = T$1(
|
|
5646
|
+
() => createTFunction({ overrides: params.terms ?? {}, locale: params.locale }),
|
|
5647
|
+
[params.terms, params.locale]
|
|
5648
|
+
);
|
|
5562
5649
|
const [score, setScore] = d(0);
|
|
5563
5650
|
const [open, setOpen] = d();
|
|
5564
|
-
return /* @__PURE__ */ u$1(TranslationProvider, { locale:
|
|
5651
|
+
return /* @__PURE__ */ u$1(TranslationProvider, { locale: params.locale, terms: params.terms, children: /* @__PURE__ */ u$1("div", { role: "group", "aria-labelledby": `${id}-label`, class: variants, children: [
|
|
5565
5652
|
/* @__PURE__ */ u$1("span", { id: `${id}-label`, className: "sr-only", children: /* @__PURE__ */ u$1(Label, {}) }),
|
|
5566
|
-
/* @__PURE__ */ u$1("div", { class: "isolate flex", children: options.map((option) => /* @__PURE__ */ u$1(
|
|
5653
|
+
/* @__PURE__ */ u$1("div", { ref: ratings, class: "isolate flex", children: options.map((option) => /* @__PURE__ */ u$1(
|
|
5567
5654
|
$cb5cc270b50c6fcd$export$be92b6f5f03c0fe9,
|
|
5568
5655
|
{
|
|
5569
5656
|
open: open === option.value,
|
|
5570
|
-
onOpenChange: () => {
|
|
5571
|
-
if (
|
|
5572
|
-
|
|
5573
|
-
|
|
5657
|
+
onOpenChange: (next) => {
|
|
5658
|
+
if (next)
|
|
5659
|
+
setOpen(option.value);
|
|
5660
|
+
else
|
|
5661
|
+
setOpen((current) => current === option.value ? void 0 : current);
|
|
5574
5662
|
},
|
|
5575
5663
|
children: [
|
|
5576
5664
|
/* @__PURE__ */ u$1(
|
|
5577
5665
|
$cb5cc270b50c6fcd$export$41fb9f06171c75f4,
|
|
5578
5666
|
{
|
|
5579
|
-
"aria-label": option.label,
|
|
5667
|
+
"aria-label": t2(option.label),
|
|
5580
5668
|
"aria-pressed": score === option.value,
|
|
5581
5669
|
class: buttonClass({ colorScheme: option.variant, size: params.size }),
|
|
5582
5670
|
onClick: (e2) => {
|
|
@@ -5601,10 +5689,26 @@ const FeedbackWidget = ({ analytics, params, logger }) => {
|
|
|
5601
5689
|
/* @__PURE__ */ u$1($cb5cc270b50c6fcd$export$602eac185826482c, { container: params.host, children: /* @__PURE__ */ u$1("div", { "data-widget": FEEDBACK_WIDGET_ID, "data-key": params.key, children: /* @__PURE__ */ u$1("div", { class: clsx$1("absolute isolate z-50", variants), children: /* @__PURE__ */ u$1(
|
|
5602
5690
|
$cb5cc270b50c6fcd$export$7c6e2c02157bb7d2,
|
|
5603
5691
|
{
|
|
5692
|
+
"aria-labelledby": `${id}-${option.value}-heading`,
|
|
5693
|
+
onInteractOutside: (event) => {
|
|
5694
|
+
var _a;
|
|
5695
|
+
const target = event.detail.originalEvent.target;
|
|
5696
|
+
if (target instanceof Element && ((_a = ratings.current) == null ? void 0 : _a.contains(target.closest("button[aria-pressed]"))))
|
|
5697
|
+
event.preventDefault();
|
|
5698
|
+
},
|
|
5604
5699
|
collisionPadding: 16,
|
|
5605
5700
|
class: "data-[state=open]:animate-slideDownAndFade bg-lowest ring-neutral-5 shadow-surface-lg isolate w-64 max-w-[var(--radix-popover-content-available-width)] rounded-lg p-2 ring-1 will-change-[transform,opacity]",
|
|
5606
5701
|
sideOffset: 5,
|
|
5607
|
-
children: /* @__PURE__ */ u$1(
|
|
5702
|
+
children: /* @__PURE__ */ u$1(
|
|
5703
|
+
CommentForm,
|
|
5704
|
+
{
|
|
5705
|
+
analytics,
|
|
5706
|
+
params,
|
|
5707
|
+
onClose: () => setOpen(0),
|
|
5708
|
+
score,
|
|
5709
|
+
headingId: `${id}-${option.value}-heading`
|
|
5710
|
+
}
|
|
5711
|
+
)
|
|
5608
5712
|
}
|
|
5609
5713
|
) }) }) })
|
|
5610
5714
|
]
|
|
@@ -5617,20 +5721,40 @@ const CommentForm = ({
|
|
|
5617
5721
|
params,
|
|
5618
5722
|
onClose,
|
|
5619
5723
|
score,
|
|
5620
|
-
analytics
|
|
5724
|
+
analytics,
|
|
5725
|
+
headingId
|
|
5621
5726
|
}) => {
|
|
5622
5727
|
const { t: t2 } = useTranslation();
|
|
5623
5728
|
const id = g$1();
|
|
5729
|
+
const form = A$1(null);
|
|
5730
|
+
const success = A$1(null);
|
|
5731
|
+
const transferFocus = A$1(false);
|
|
5624
5732
|
const [submission, setSubmission] = d({ state: "idle" });
|
|
5733
|
+
_(() => {
|
|
5734
|
+
var _a;
|
|
5735
|
+
if (submission.state === "success" && transferFocus.current)
|
|
5736
|
+
(_a = success.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
5737
|
+
}, [submission.state]);
|
|
5625
5738
|
if (submission.state === "success") {
|
|
5626
|
-
return /* @__PURE__ */ u$1(
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5739
|
+
return /* @__PURE__ */ u$1(
|
|
5740
|
+
"div",
|
|
5741
|
+
{
|
|
5742
|
+
ref: success,
|
|
5743
|
+
tabIndex: -1,
|
|
5744
|
+
role: "status",
|
|
5745
|
+
"aria-labelledby": headingId,
|
|
5746
|
+
class: "flex flex-col gap-1 text-balance p-4 text-center",
|
|
5747
|
+
children: [
|
|
5748
|
+
/* @__PURE__ */ u$1("p", { id: headingId, class: "text-neutral-12 text-pretty text-base font-semibold leading-tight tracking-tight", children: t2("submitted_heading") }),
|
|
5749
|
+
/* @__PURE__ */ u$1("p", { class: "text-neutral-11 text-pretty text-sm leading-tight", children: t2("submitted_text") })
|
|
5750
|
+
]
|
|
5751
|
+
}
|
|
5752
|
+
);
|
|
5630
5753
|
}
|
|
5631
5754
|
return /* @__PURE__ */ u$1(
|
|
5632
5755
|
"form",
|
|
5633
5756
|
{
|
|
5757
|
+
ref: form,
|
|
5634
5758
|
class: "flex flex-col gap-2.5 p-2",
|
|
5635
5759
|
onSubmit: (e2) => {
|
|
5636
5760
|
e2.preventDefault();
|
|
@@ -5638,7 +5762,7 @@ const CommentForm = ({
|
|
|
5638
5762
|
const formData = new FormData(e2.currentTarget);
|
|
5639
5763
|
const comment = formData.get("comment");
|
|
5640
5764
|
if (typeof comment !== "string" || comment.length <= 5) {
|
|
5641
|
-
setSubmission({ state: "error", error: "
|
|
5765
|
+
setSubmission({ state: "error", error: t2("comment_minimum") });
|
|
5642
5766
|
return;
|
|
5643
5767
|
}
|
|
5644
5768
|
Promise.all([
|
|
@@ -5646,8 +5770,9 @@ const CommentForm = ({
|
|
|
5646
5770
|
/** Min delay of 500ms so it feels like it’s doing stuff */
|
|
5647
5771
|
new Promise((resolve) => setTimeout(resolve, 1e3))
|
|
5648
5772
|
]).then(() => {
|
|
5649
|
-
var _a;
|
|
5773
|
+
var _a, _b, _c;
|
|
5650
5774
|
(_a = params.onLeaveComment) == null ? void 0 : _a.call(params);
|
|
5775
|
+
transferFocus.current = Boolean((_c = (_b = form.current) == null ? void 0 : _b.closest('[role="dialog"]')) == null ? void 0 : _c.contains(document.activeElement));
|
|
5651
5776
|
setSubmission({ state: "success" });
|
|
5652
5777
|
}).catch((e22) => {
|
|
5653
5778
|
if (e22 instanceof Error) {
|
|
@@ -5661,7 +5786,7 @@ const CommentForm = ({
|
|
|
5661
5786
|
/* @__PURE__ */ u$1("input", { type: "hidden", name: "key", value: params.key }),
|
|
5662
5787
|
/* @__PURE__ */ u$1("fieldset", { class: "flex flex-col gap-4", children: [
|
|
5663
5788
|
/* @__PURE__ */ u$1("label", { htmlFor: id, class: "flex flex-col gap-1", children: [
|
|
5664
|
-
/* @__PURE__ */ u$1("p", { class: "text-neutral-12 text-pretty text-base font-semibold leading-tight tracking-tight", children: t2(score === -1 ? "negative_heading" : "positive_heading") }),
|
|
5789
|
+
/* @__PURE__ */ u$1("p", { id: headingId, class: "text-neutral-12 text-pretty text-base font-semibold leading-tight tracking-tight", children: t2(score === -1 ? "negative_heading" : "positive_heading") }),
|
|
5665
5790
|
/* @__PURE__ */ u$1("p", { class: "text-neutral-11 text-pretty text-sm leading-tight", children: t2(score === -1 ? "negative_text" : "positive_text") })
|
|
5666
5791
|
] }),
|
|
5667
5792
|
/* @__PURE__ */ u$1("div", { class: "flex flex-col gap-2", children: [
|
|
@@ -5675,7 +5800,7 @@ const CommentForm = ({
|
|
|
5675
5800
|
id
|
|
5676
5801
|
}
|
|
5677
5802
|
),
|
|
5678
|
-
submission.state === "error" ? /* @__PURE__ */ u$1("div", { role: "alert", class: "
|
|
5803
|
+
submission.state === "error" ? /* @__PURE__ */ u$1("div", { role: "alert", class: "flex gap-1 text-balance text-xs", children: [
|
|
5679
5804
|
/* @__PURE__ */ u$1(Icon, { name: "warning", class: "size-[1lh] flex-none" }),
|
|
5680
5805
|
submission.error
|
|
5681
5806
|
] }) : null
|
|
@@ -5686,7 +5811,7 @@ const CommentForm = ({
|
|
|
5686
5811
|
"button",
|
|
5687
5812
|
{
|
|
5688
5813
|
onTouchStart: noop,
|
|
5689
|
-
class: "bg-accent-
|
|
5814
|
+
class: "bg-accent-solid active:bg-accent-solid-pressed fr ease-expo-out duration-snappy text-on-accent grid items-center overflow-hidden rounded-lg px-5 py-2 pl-2.5 text-center transition-all hover:scale-[1.02] active:scale-[.97]",
|
|
5690
5815
|
children: submission.state === "submitting" ? t2("submitting") : t2("submit")
|
|
5691
5816
|
}
|
|
5692
5817
|
),
|
|
@@ -6168,8 +6293,8 @@ const tailwind = `[data-widget='inploi-feedback'] {
|
|
|
6168
6293
|
border-width: 1px;
|
|
6169
6294
|
}
|
|
6170
6295
|
|
|
6171
|
-
[data-widget='inploi-feedback'] .bg-accent-
|
|
6172
|
-
background-color: var(--i-color-a-
|
|
6296
|
+
[data-widget='inploi-feedback'] .bg-accent-solid {
|
|
6297
|
+
background-color: var(--i-color-a-solid);
|
|
6173
6298
|
}
|
|
6174
6299
|
|
|
6175
6300
|
[data-widget='inploi-feedback'] .bg-lowest {
|
|
@@ -6287,10 +6412,6 @@ const tailwind = `[data-widget='inploi-feedback'] {
|
|
|
6287
6412
|
letter-spacing: -0.025em;
|
|
6288
6413
|
}
|
|
6289
6414
|
|
|
6290
|
-
[data-widget='inploi-feedback'] .text-accent-1 {
|
|
6291
|
-
color: var(--i-color-a-1);
|
|
6292
|
-
}
|
|
6293
|
-
|
|
6294
6415
|
[data-widget='inploi-feedback'] .text-accent-10 {
|
|
6295
6416
|
color: var(--i-color-a-10);
|
|
6296
6417
|
}
|
|
@@ -6307,6 +6428,10 @@ const tailwind = `[data-widget='inploi-feedback'] {
|
|
|
6307
6428
|
color: var(--i-color-n-12);
|
|
6308
6429
|
}
|
|
6309
6430
|
|
|
6431
|
+
[data-widget='inploi-feedback'] .text-on-accent {
|
|
6432
|
+
color: var(--i-color-on-a);
|
|
6433
|
+
}
|
|
6434
|
+
|
|
6310
6435
|
[data-widget='inploi-feedback'] .underline {
|
|
6311
6436
|
text-decoration-line: underline;
|
|
6312
6437
|
}
|
|
@@ -6342,6 +6467,12 @@ const tailwind = `[data-widget='inploi-feedback'] {
|
|
|
6342
6467
|
outline-style: solid;
|
|
6343
6468
|
}
|
|
6344
6469
|
|
|
6470
|
+
[data-widget='inploi-feedback'] .ring {
|
|
6471
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
6472
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
6473
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
6474
|
+
}
|
|
6475
|
+
|
|
6345
6476
|
[data-widget='inploi-feedback'] .ring-1 {
|
|
6346
6477
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
6347
6478
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
@@ -6514,8 +6645,8 @@ const tailwind = `[data-widget='inploi-feedback'] {
|
|
|
6514
6645
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
6515
6646
|
}
|
|
6516
6647
|
|
|
6517
|
-
[data-widget='inploi-feedback'] .active\\:bg-accent-
|
|
6518
|
-
background-color: var(--i-color-a-
|
|
6648
|
+
[data-widget='inploi-feedback'] .active\\:bg-accent-solid-pressed:active {
|
|
6649
|
+
background-color: var(--i-color-a-solid-pressed);
|
|
6519
6650
|
}
|
|
6520
6651
|
|
|
6521
6652
|
[data-widget='inploi-feedback'] .aria-\\[pressed\\=true\\]\\:text-negative-11[aria-pressed="true"] {
|
|
@@ -6553,14 +6684,6 @@ const tailwind = `[data-widget='inploi-feedback'] {
|
|
|
6553
6684
|
color: var(--i-color-a-10);
|
|
6554
6685
|
}
|
|
6555
6686
|
|
|
6556
|
-
[data-widget='inploi-feedback'] .dark .theme-dark\\:text-highest {
|
|
6557
|
-
color: var(--i-color-highest);
|
|
6558
|
-
}
|
|
6559
|
-
|
|
6560
|
-
[data-widget='inploi-feedback'] .dark .theme-dark\\:active\\:bg-accent-8:active {
|
|
6561
|
-
background-color: var(--i-color-a-8);
|
|
6562
|
-
}
|
|
6563
|
-
|
|
6564
6687
|
[data-widget='inploi-feedback'] .rounded .theme-rounded\\:rounded-sm {
|
|
6565
6688
|
border-radius: var(--i-radius-sm);
|
|
6566
6689
|
}
|
|
@@ -6649,6 +6772,7 @@ const createFeedbackDomManager = (logger) => {
|
|
|
6649
6772
|
const feedbackPlugin = () => createPlugin(({ apiClient, logger, analytics }) => {
|
|
6650
6773
|
const dom = createFeedbackDomManager(logger);
|
|
6651
6774
|
let prerendered = false;
|
|
6775
|
+
const targets = /* @__PURE__ */ new Set();
|
|
6652
6776
|
const App = ({ params }) => {
|
|
6653
6777
|
return _$2(k$3, {}, [
|
|
6654
6778
|
[
|
|
@@ -6676,7 +6800,15 @@ const feedbackPlugin = () => createPlugin(({ apiClient, logger, analytics }) =>
|
|
|
6676
6800
|
typeof window !== "undefined",
|
|
6677
6801
|
"the `render` method of JobSearch cannot be called in non-browser environments. Use `prerender` instead."
|
|
6678
6802
|
);
|
|
6679
|
-
|
|
6803
|
+
const target = params.target ?? dom.getRenderTargetElement(params.key);
|
|
6804
|
+
targets.add(target);
|
|
6805
|
+
fn2(_$2(App, { params }), target);
|
|
6806
|
+
},
|
|
6807
|
+
/** Release components, portals and document listeners when an owning widget unmounts. */
|
|
6808
|
+
destroy: () => {
|
|
6809
|
+
for (const target of targets)
|
|
6810
|
+
J$1(null, target);
|
|
6811
|
+
targets.clear();
|
|
6680
6812
|
},
|
|
6681
6813
|
"~brand": "@inploi/plugin-feedback"
|
|
6682
6814
|
};
|