@rocket.chat/fuselage 0.32.0-dev.322 → 0.32.0-dev.323
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Position.d.ts","sourceRoot":"","sources":["../../../src/components/Position/Position.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,YAAY,EACb,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAC;AAE9B,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;AAE5D,QAAA,MAAM,QAAQ,6EAOX,aAAa,KAAG,
|
|
1
|
+
{"version":3,"file":"Position.d.ts","sourceRoot":"","sources":["../../../src/components/Position/Position.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,YAAY,EACb,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAC;AAE9B,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;AAE5D,QAAA,MAAM,QAAQ,6EAOX,aAAa,KAAG,WA2ClB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -12423,6 +12423,22 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
12423
12423
|
}
|
|
12424
12424
|
return t;
|
|
12425
12425
|
};
|
|
12426
|
+
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
12427
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12428
|
+
if (!m) return o;
|
|
12429
|
+
var i = m.call(o), r, ar = [], e;
|
|
12430
|
+
try {
|
|
12431
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12432
|
+
}
|
|
12433
|
+
catch (error) { e = { error: error }; }
|
|
12434
|
+
finally {
|
|
12435
|
+
try {
|
|
12436
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12437
|
+
}
|
|
12438
|
+
finally { if (e) throw e.error; }
|
|
12439
|
+
}
|
|
12440
|
+
return ar;
|
|
12441
|
+
};
|
|
12426
12442
|
|
|
12427
12443
|
|
|
12428
12444
|
|
|
@@ -12431,11 +12447,16 @@ var Position = function (_a) {
|
|
|
12431
12447
|
var target = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
12432
12448
|
var _b = (0,_rocket_chat_fuselage_hooks__WEBPACK_IMPORTED_MODULE_0__.usePosition)(anchor, target, (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return ({ placement: placement, margin: margin }); }, [placement, margin])) || {}, positionStyle = _b.style, positionPlacement = _b.placement;
|
|
12433
12449
|
var style = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () { return (__assign({ position: 'fixed' }, positionStyle)); }, [positionStyle]);
|
|
12434
|
-
var
|
|
12450
|
+
var _c = __read((0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(function () {
|
|
12451
|
+
var prev = document.getElementById('position-container');
|
|
12452
|
+
if (prev) {
|
|
12453
|
+
return prev;
|
|
12454
|
+
}
|
|
12435
12455
|
var element = document.createElement('div');
|
|
12456
|
+
element.id = 'position-container';
|
|
12436
12457
|
document.body.appendChild(element);
|
|
12437
12458
|
return element;
|
|
12438
|
-
}, []
|
|
12459
|
+
}), 1), portalContainer = _c[0];
|
|
12439
12460
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
12440
12461
|
return function () {
|
|
12441
12462
|
document.body.removeChild(portalContainer);
|